LL(1) Parser Generator

This entry in the Archive of Interesting Code contains an LL(1) parser generator, which accepts as input an LL(1) grammar and returns a parser that can construct a parse tree for a string contained in the grammar.

This code is much more complex than some of the other entires in the Archive, mainly because of the complexity of managing grammars, terminals, nonterminals, etc. As a result, I have prepared a Javadoc overview of the code contained here, which should make it easier to reason about the code here.

The most interesting code here is contained in the GrammarAttributes.java and LL1ParserGenerator.java files, which contain the actual logic required to construct the parser. The remaining code is mostly infrastructural.