LLgen, an extended LL(1) parser generator

Abstract

LLgen provides a tool for generating an efficient recursive descent parser with no backtrack from an Extended Context Free syntax. The LLgen user specifies the syntax, together with code describing actions associated with the parsing process. LLgen turns this specification into a number of subroutines that handle the parsing process. The grammar may be ambiguous. LLgen contains both static and dynamic facilities to resolve these ambiguities. The specification can be split into several files, for each of which LLgen generates an output file containing the corresponding part of the parser. Furthermore, only output files that differ from their previous version are updated. Other output files are not affected in any way. This allows the user to recompile only those output files that have changed. The subroutine produced by LLgen calls a user supplied routine that must return the next token. This way, the input to the parser can be split into single characters or higher level tokens. An error recovery mechanism is generated almost completely automatically. It is based on so called default choices, which are implicitly or explicitly specified by the user. LLgen has succesfully been used to create recognizers for Pascal, C, and Modula-2.

Cite this paper

@inproceedings{Jacobs2005LLgenAE, title={LLgen, an extended LL(1) parser generator}, author={Ceriel J. H. Jacobs}, year={2005} }