Scannerless NSLR(1) parsing of programming languages

The disadvantages of traditional two-phase parsing (a scanner phase preprocessing input for a parser phase) are discussed. We present metalanguage enhancements for context-free grammars that allow the syntax of programming languages to be completely described in a single grammar. The enhancements consist of two new grammar rules, the exclusion rule, and the adjacency-restriction rule. We also present parser construction techniques for building parsers from these enhanced grammars, that eliminate the need for a scanner phase.

[1]  Frank DeRemer,et al.  Lexical Analysis , 1976, Handbook of Natural Language Processing.

[2]  Roman Krzemien,et al.  Automatic Generation of Lexical Analyzers in a Compiler-Compiler , 1976, Inf. Process. Lett..

[3]  Kuo-Chung Tai,et al.  Noncanonical SLR(1) Grammars , 1979, TOPL.

[4]  Alfred V. Aho,et al.  Deterministic parsing of ambiguous grammars , 1973, POPL.

[5]  Niklaus Wirth,et al.  Programming in Modula-2 , 1985, Texts and Monographs in Computer Science.

[6]  Theodore P. Baker,et al.  Extending Lookahead for LR Parsers , 1981, J. Comput. Syst. Sci..

[7]  Karl M. Schimpf,et al.  A practical arbitrary look-ahead LR parsing technique , 1986, SIGPLAN '86.

[8]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[9]  David Maier Review of "Introduction to automata theory, languages and computation" by John E. Hopcroft and Jeffrey D. Ullman. Addison-Wesley 1979. , 1980, SIGA.

[10]  Wilf R. LaLonde,et al.  Regular right part grammars and their parsers , 1977, CACM.

[11]  Niklaus Wirth,et al.  Pascal User Manual and Report , 1991, Springer New York.

[12]  E. Schmidt,et al.  Lex—a lexical analyzer generator , 1990 .

[13]  Jeffrey D. Ullman,et al.  Introduction to Automata Theory, Languages and Computation , 1979 .

[14]  Jean D. etc. Ichbiah Reference Manual for the ADA Programming Language , 1983 .

[15]  Gordon V. Cormack,et al.  Modular Attribute Grammars , 1990, Comput. J..