Abstract
We give a new direct construction of the shift-reduce ELR (1) parsers for recursive Transition Networks (TN), which is suitable for languages specified by Extended BNF grammars (EBNF). Such parsers are characterized by their absence of conflicts, not just the classical shift-reduce and reduce-reduce types, but also a new type named convergence conflict. Such a condition is proved correct and is more general than the past proposed conditions for the shift-reduce parsing of EBNF grammars or TN’s. The corresponding parser is smaller than a classical one, without any extra bookkeeping. A constraint on TN’s is mentioned, which enables top-down deterministic ELL (1) analysis.
Work partially supported by PRIN “Automi e Linguaggi Formali”, and by CNR - IEIIT.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Beatty, J.C.: On the relationship between the LL(1) and LR(1) grammars. JACM 29(4), 1007–1022 (1982)
Breveglieri, L., Crespi Reghizzi, S., Morzenti, A.: Parsing methods streamlined. arXiv:1309.7584 [cs.FL], pp. 1–64 (2013)
Celentano, A.: LR parsing technique for extended context-free grammars. Comput. Lang. 6(2), 95–107 (1981)
Chapman, N.P.: LALR(1,1) parser generation for regular right part grammars. Acta Inform. 21, 29–45 (1984), http://dx.doi.org/10.1007/BF00289138
Conway, M.E.: Design of a separable transition-diagram compiler. Comm. ACM 6(7), 396–408 (1963)
Crespi Reghizzi, S., Breveglieri, L., Morzenti, A.: Formal languages and compilation, 2nd edn. Springer, London (2013)
Crespi Reghizzi, S., Psaila, G.: Grammar partitioning and modular deterministic parsing. Comput. Lang. 24(4), 197–227 (1998)
Gálvez, J.F.: A note on a proposed LALR parser for extended context-free grammars. Inf. Process. Lett. 50(6), 303–305 (1994), http://dx.doi.org/10.1016/0020-01909400051-4
Heilbrunner, S.: On the definition of ELR(k) and ELL(k) grammars. Acta Inform. 11, 169–176 (1979)
Hemerik, K.: Towards a taxonomy for ECFG and RRPG parsing. In: Dediu, A.H., Ionescu, A.M., Martín-Vide, C. (eds.) LATA 2009. LNCS, vol. 5457, pp. 410–421. Springer, Heidelberg (2009), http://dx.doi.org/10.1007/978-3-642-00982-2
Kannapinn, S.: Reconstructing LR theory to eliminate redundance, with an application to the construction of ELR parsers (in German). Ph.D. thesis, Tech. Univ. Berlin (2001)
Knuth, D.E.: On the translation of languages from left to right. Information and Control 8, 607–639 (1965)
Korenjak, A.J.: A practical method for constructing LR(k) processors. Commun. ACM 12(11), 613–623 (1969)
LaLonde, W.R.: Constructing LR parsers for regular right part grammars. Acta Inform. 11, 177–193 (1979), http://dx.doi.org/10.1007/BF00264024
Lee, G.O., Kim, D.H.: Characterization of extended LR(k) grammars. Inf. Process. Lett. 64(2), 75–82 (1997), http://dx.doi.org/10.1016/S0020-01909700152-X
Morimoto, S., Sassa, M.: Yet another generation of LALR parsers for regular right part grammars. Acta Inform. 37, 671–697 (2001)
Sassa, M., Nakata, I.: A simple realization of LR-parsers for regular right part grammars. Inf. Process. Lett. 24(2), 113–120 (1987), http://dx.doi.org/10.1016/0020-01908790104-9
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Breveglieri, L., Crespi Reghizzi, S., Morzenti, A. (2014). Shift-Reduce Parsers for Transition Networks. In: Dediu, AH., Martín-Vide, C., Sierra-Rodríguez, JL., Truthe, B. (eds) Language and Automata Theory and Applications. LATA 2014. Lecture Notes in Computer Science, vol 8370. Springer, Cham. https://doi.org/10.1007/978-3-319-04921-2_18
Download citation
DOI: https://doi.org/10.1007/978-3-319-04921-2_18
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-04920-5
Online ISBN: 978-3-319-04921-2
eBook Packages: Computer ScienceComputer Science (R0)