After a brief discussion of grammars, parsers, and BNF, this article introduces JavaCC, a popular parser generator tool. We'll develop sample code showing how to use JavaCC to build a custom parser, starting from a BNF description of the grammar. Part 2 goes on to show how to use an auxilliary tool, JJTree, to build a parse tree representation of the same parse and how to walk that tree at runtime to recover its state information. The article concludes by developing sample code to build and walk a parse tree that we'll generate for a small portion of the XQuery grammar.
This forum has been locked.Log in to start a topic.
Started by SystemAdmin 110000D4XK
By SystemAdmin 110000D4XK