On 14 Sep 2006, at 16:22, Satya wrote:
I had been studying Bison for a while now, and I came up with this
small
writeup on the internals of a parser generated by Bison 2.3. I
described the
tables and operation of a bare yyparse() (sans the more gory
details like
stack relocation and error handling).
http://cs.uic.edu/~spopuri/cparser.html
I have done this in the hope that it will be useful for anyone who
wants to
change the skeleton/ hand optimize the generated parser or simply
want to
understand whats going on. It would be great if anyone
knowledgeable about
the current yacc.c skeleton can go through this and pass me
comments/corrections etc.
I think it would be good to include something like that in the Bison
distribution, because from time to time, there have requests for in
the Bison lists. Then, the best answer so far has been the RTFC by
Akim Demaille. :-)
The parser used in LR is evidently called "push-down" automaton. See
the book by Waite & Goos, "Compiler Construction". Dick Grune has
also written a parsing book free online; I think it is mentioned in
the comp.compilers FAQ.
Hans Aberg
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison