Symbolic Lookaheads for Bottom-up Parsing

Author Paola Quaglia

Thumbnail PDF


  • Filesize: 493 kB
  • 13 pages

Document Identifiers

Author Details

Paola Quaglia

Cite AsGet BibTex

Paola Quaglia. Symbolic Lookaheads for Bottom-up Parsing. In 41st International Symposium on Mathematical Foundations of Computer Science (MFCS 2016). Leibniz International Proceedings in Informatics (LIPIcs), Volume 58, pp. 79:1-79:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2016)


We present algorithms for the construction of LALR(1) parsing tables, and of LR(1) parsing tables of reduced size. We first define specialized characteristic automata whose states are parametric w.r.t. variables symbolically representing lookahead-sets. The propagation flow of lookaheads is kept in the form of a system of recursive equations, which is resolved to obtain the concrete LALR(1) table. By inspection of the LALR(1) automaton and of its lookahead ropagation flow, we decide whether the grammar is LR(1) or not. In the positive case, an LR(1) parsing table of reduced size is computed by refinement of the LALR(1) table.
  • LALR(1) grammars; LR(1) grammars; bottom-up parsing


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools (2nd Edition). Prentice Hall, 2006. Google Scholar
  2. Alfred V. Aho and Jeffrey D. Ullman. Principles of Compiler Design. Addison-Wesley, 1977. Google Scholar
  3. Frank DeRemer. Practical Translators for LR(k) Languages. PhD thesis, MIT, Cambridge, Mass., 1969. Google Scholar
  4. Frank DeRemer. Simple LR(k) Grammars. Commun. ACM, 14(7):453-460, 1971. URL:
  5. Frank DeRemer and Thomas J. Pennello. Efficient Computation of LALR(1) Look-Ahead Sets. ACM Trans. Program. Lang. Syst., 4(4):615-649, 1982. URL:
  6. Charles Donnelly and Richard Stallman. Bison: The Yacc-compatible Parser Generator (Ver. 3.0.4). 2015. URL:
  7. François Pottier et Yann Régis-Gianas. Menhir. URL:
  8. J. Eve and Reino Kurki-Suonio. On Computing the Transitive Closure of a Relation. Acta Inf., 8:303-314, 1977. URL:
  9. Stephen C. Johnson. Yacc: Yet Another Compiler-Compiler. Tech. Rep. CSTR 32, Bell Laboratories, Murray Hill, N.J., 1974. URL:
  10. Xavier Leroy, Damien Doligez, Alain Frisch, Jacques Garrigue, Didier Rémy, and Jérôme Vouillon. The OCaml system release 4.02. 2014. URL:
  11. David Pager. A Practical General Method for Constructing LR(k) Parsers. Acta Informatica, 7:249-268, 1977. Google Scholar
  12. Seppo Sippu and Eljas Soisalon-Soininen. Parsing Theory - Volume II: LR(k) and LL(k) Parsing, volume 20 of EATCS Monographs on Theoretical Computer Science. Springer, 1990. URL:
  13. Robert Endre Tarjan. Depth-First Search and Linear Graph Algorithms. SIAM J. Comput., 1(2):146-160, 1972. URL: