ANTLR: a predicated- LL(k) parser generator

作者: T. J. Parr , R. W. Quong

DOI: 10.1002/SPE.4380250705

关键词: ParsingProgramming languageGrammarSyntactic predicatePredicate (grammar)Natural language processingTop-down parsingCompilerRecursive descent parserComputer scienceSyntaxArtificial intelligenceBackus–Naur FormRule-based machine translationLALR parserParser combinator

摘要: SUMMARY Despite the parsing power of LR=LALR algorithms, e.g. YACC, programmers often choose to write recursive-descent parsers by hand obtain increased flexibility, better error handling, and ease debugging. We introduce ANTLR, a public-domain parser generator that combines flexibility hand-coded with convenience generator, which is component PCCTS. ANTLR has many features make it easier use than other language tools. Most important, provides predicates let programmer systematically direct parse via arbitrary expressions using semantic syntactic context; in practice, eliminates need hand-tweak output, even for difficult problems. also integrates description lexical analysis, accepts LL(k) grammars k> 1with extended BNF notation, can automatically generate

参考文章(7)
Terence J. Parr, Russell W. Quong, Adding Semantic and Syntactic Predicates To LL(k): pred-LL(k) compiler construction. pp. 263- 277 ,(1994) , 10.1007/3-540-57877-3_18
Charles N. Fischer, Richard J. LeBlanc, Crafting a Compiler with C ,(1991)
Bjarne Stroustrup, Margaret A. Ellis, The Annotated C++ Reference Manual ,(1990)
T. J. Parr, H. G. Dietz, W. E. Cohen, PCCTS reference manual ACM SIGPLAN Notices. ,vol. 27, pp. 88- 165 ,(1992) , 10.1145/130973.130980
Donald E. Knuth, On the translation of languages from left to right Information & Computation. ,vol. 8, pp. 607- 639 ,(1965) , 10.1016/S0019-9958(65)90426-2
Stephen C. Johnson, Murray Hill, Yacc : Yet Another Compiler Compiler UNIX Programmer's Manual. ,vol. 2, pp. 353- 387 ,(1978)
P.M. Lewis, D.J. Rosenkrantz, R.E. Stearns, Attributed translations Journal of Computer and System Sciences archive. ,vol. 9, pp. 279- 307 ,(1974) , 10.1016/S0022-0000(74)80045-0