I submitted a patch to output the generated LALR(1) automaton as a graphviz source file. The --graph command line option now generates a file that can be parsed and manipulated by the ``dot'' tool. Here is a sample output. This patch is now merged into Bison (2.3+).
A gdb style command line debugger for grammars. This tool can be used to debug the structure of your grammar. You can test-parse sample input and see what shifts/reductions are taking place on the parse stack after each token in consumed. You can set break points at required tokens and adjust input at runtime.
Do you want to know how an LALR parser works in the real world? Then this article is for you. It compares ``theoretical'' LALR parsing tables illustrated by compiler text books to the real world tables generated by GNU bison and gives an in-depth explanation of how a parser produced by GNU Bison operates.
<<< Back to my home page