Shift-Resolve Parsing: Simple, Unbounded Lookahead, Linear Time

  • José Fortes Gálvez
  • Sylvain Schmitz
  • Jacques Farré
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4094)


This paper introduces a mechanism for combining unbounded lookahead exploration with linear time complexity in a deterministic parser. The idea is to use a resolve parsing action in place of the classical reduce. The construction of shift-resolve parsers is presented as a two-step algorithm, from the grammar to a finite nondeterministic automaton, and from this automaton to the deterministic parser. Grammar classes comparisons are provided.


Equivalence Relation Linear Time Input String Position Graph Nondeterministic Automaton 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Donnely, C., Stallman, R.: Bison, The YACC-compatible Parser Generator. The Free Software Foundation (2002)Google Scholar
  2. 2.
    Baker, T.P.: Extending lookahead for LR parsers. Journal of Computer and System Sciences 22(2), 243–259 (1981)MATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Bermudez, M.E., Schimpf, K.M.: Practical arbitrary lookahead LR parsing. Journal of Computer and System Sciences 41(2), 230–250 (1990)MATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Farré, J., Fortes Gálvez, J.: A bounded graph-connect construction for LR-regular parsers. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 244–258. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  5. 5.
    Szymanski, T.G., Williams, J.H.: Noncanonical extensions of bottom-up parsing techniques. SIAM Journal on Computing 5(2), 231–250 (1976)MATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Tai, K.C.: Noncanonical SLR(1) grammars. ACM Transactions on Programming Languages and Systems 1(2), 295–320 (1979)MATHCrossRefGoogle Scholar
  7. 7.
    Schmitz, S.: Noncanonical LALR(1) parsing. In: Dang, Z., Ibarra, O.H. (eds.) DLT 2006. LNCS, vol. 4036, pp. 95–107. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  8. 8.
    Aho, A.V., Ullman, J.D.: The Theory of Parsing, Translation, and Compiling. Parsing of Series in Automatic Computation, vol. I. Prentice Hall, Englewood Cliffs (1972)Google Scholar
  9. 9.
    Tomita, M.: Efficient Parsing for Natural Language. Kluwer Academic Publishers, Dordrecht (1986)Google Scholar
  10. 10.
    Čulik, K., Cohen, R.: LR-Regular grammars—an extension of LR(k) grammars. Journal of Computer and System Sciences 7, 66–96 (1973)MATHMathSciNetCrossRefGoogle Scholar
  11. 11.
    Farré, J., Fortes Gálvez, J.: Bounded-connect noncanonical discriminating-reverse parsers. Theoretical Computer Science 313(1), 73–91 (2004)MATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Fortes Gálvez, J.: A Discriminating Reverse Approach to LR(k) Parsing. PhD thesis, Universidad de Las Palmas de Gran Canaria and Université de Nice-Sophia Antipolis (1998)Google Scholar
  13. 13.
    Grune, D., Jacobs, C.J.H.: Parsing Techniques: A Practical Guide. Ellis Horwood Limited (1990)Google Scholar
  14. 14.
    Hunt III, H.B., Szymanski, T.G., Ullman, J.D.: On the complexity of LR(k) testing. Communications of the ACM 18(12), 707–716 (1975)MATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Heilbrunner, S.: A parsing automata approach to LR theory. Theoretical Computer Science 15(2), 117–157 (1981)MATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    Schöbel-Theuer, T.: Towards a unifying theory of context-free parsing. In: Pighizzini, G., San Pietro, P. (eds.) Proceedings ASMICS Workshop on Parsing Theory. Technical Report 126-1994, Università di Milano, pp. 89–100 (1994)Google Scholar
  17. 17.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL 1977, pp. 238–252. ACM Press, New York (1977)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • José Fortes Gálvez
    • 1
  • Sylvain Schmitz
    • 2
  • Jacques Farré
    • 2
  1. 1.Universidad de Las Palmas de Gran CanariaSpain
  2. 2.Laboratoire I3SUniversité de NiceSophia AntipolisFrance

Personalised recommendations