Hi,
 Thank you guys very much. I noticed my mistakes as well. Forgetting to 
allocate memory is quite embrassing. Thank you very much again for helping 
me. 
 I guess in a sense it is a pretty-printing function. The point however is 
not the print anything. I want to generate a bunch of strings based/accepted 
on a given grammar. That is really fundamentally what I needed. As you seen 
I pick a random transition stepping through the grammar until I reach the 
end state. (pop out of the stack) My problem is that for some reason I keep 
getting deference to pointer error. The compiler doesn't seem to recognize 
structures decleared in state.h even when it's included. Thank so much 
again. Sorry for the amateur mistakes.
 Best,
David

 On 8/14/05, Hans Aberg <[EMAIL PROTECTED]> wrote: 
> 
> 
> On 14 Aug 2005, at 06:15, David Ja wrote:
> 
> > I
> > been trying to adapted bison to my own purpose but after a month of
> > trying I
> > can't seem to figure out a way to make it work. All I wanted to do
> > was to
> > take advantage of bison's parser which generates the DFA,
> 
> Bison does not generate a DFA, but uses the LALR(1) algorithm to
> generate a push-down automaton. Flex does generate a DFA.
> 
> > which in turn,
> > allows me to step through the DFA in sequence generating a sample
> > string
> > that fits the grammar input. For example if the grammar is the
> > grammar for
> > an web address. My program will be able to generate
> > http://www.abc.org<http://www.abc.org>.
> 
> It seems that you attempt to do some kind of pretty-printing, which
> is the opposite of what tools like Bison and Flex do. A parser
> translates one computer language to another. So if you feed it with
> one string, it will produce another (which might be some binary code).
> 
> Hans Aberg
> 
> 
>
_______________________________________________
Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to