help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variables produced by Bison


From: Hans Aberg
Subject: Re: Variables produced by Bison
Date: Wed, 18 Sep 2002 19:13:25 +0200

At 12:37 -0400 2002/09/18, Hart, Justin wrote:
>Hi, I just joined this list today.  I figured that if anybody would know
>where to go for this sort of documentation, it would be here.
>
>I am currently developing a system that uses a yacc grammar in an
>interesting fashion.  Unfortunately, some things that this system does will
>require me to redefine yyparse().  Of course, there is tons of documentation
>on writing yacc files on the web, and I have written numerous ones before.
>However, there seems to be a lack of documentation on the output files.  Is
>there anywhere that I can go to find documentation on the variables in the
>y.tab.c output files?  I need to know what they are in order to develop my
>yyparse.

Bison is using the LALR(1) algorithm to eliminate all variables, and
replace them with states for use with a stack based machine called
push-down automaton.

LALR(1) and such algorithms are described in books on compilers, like Aho,
Sethi & Ullman, "Compilers...", or perhaps the Parsing Techniques book:
    http://www.cs.vu.nl/~dick/PTAPG.html

Bison has an option --verbose that produces a .output file with all the
data of this translation.

>I can use either bison or the yacc distributed with the Forte compiler, but
>I really need to know what these variables are in either case.

Latest Bison beta: ftp://alpha.gnu.org/gnu/bison/  (bison-1.49x.tar.gz)

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]