Abstract
We consider parsers of deterministic context-free languages and study the sizes of their syntax checking components. More precisely, we allow the input processing from left to right or, alternatively, from right to left, whatever is best for the given language. We establish an infinite sequence of deterministic context-free languages \(L_k\), for \(k\ge 1\), such that there is an exponential size trade-off between a deterministic pushdown automaton that reads its input from right to left and another one that reads its input from left to right. Concerning the constructibility of such a parser out of a given deterministic context-free language, it is shown that it is undecidable whether the reversal of a given deterministic context-free language is again deterministic context free. Furthermore, we study the expressive capacity of the family of languages whose reversals are deterministic context free. Finally, we turn to the family of deterministic context-free languages whose reversals are also deterministic context free and collect several of their closure properties.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Autebert, J.-M., Berstel, J., Boasson, L.: Context-free languages and pushdown automata. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 111–174. Springer, Heidelberg (1997). https://doi.org/10.1007/978-3-642-59136-5_3
Geller, M.M., Hunt III, H.B., Szymanski, T.G., Ullman, J.D.: Economy of description by parsers, DPDA’s, and PDA’s. Theor. Comput. Sci. 4, 143–153 (1977)
Ginsburg, S., Greibach, S.A.: Deterministic context-free languages. Inform. Control 9, 620–648 (1966)
Ginsburg, S., Spanier, E.H.: Finite-turn pushdown automata. SIAM J. Contr. 4, 429–453 (1966)
Goldstine, J., Leung, H., Wotschke, D.: Measuring nondeterminism in pushdown automata. J. Comput. Syst. Sci. 71, 440–466 (2005)
Goldstine, J., Price, J.K., Wotschke, D.: A pushdown automaton or a context-free grammar - which is more economical? Theor. Comput. Sci. 18, 33–40 (1982)
Greibach, S.A.: The unsolvability of the recognition of linear context-free languages. J. ACM 13, 582–587 (1966)
Harrison, M.A.: Introduction to Formal Language Theory. Addison-Wesley, Boston (1978)
Hartmanis, J.: Context-free languages and Turing machine computations. In: Proceedings Symposia in Applied Mathematics, vol. 19, pp. 42–51 (1967)
Holzer, M., Lange, K.-J.: On the complexities of linear LL(1) and LR(1) grammars. In: Ésik, Z. (ed.) FCT 1993. LNCS, vol. 710, pp. 299–308. Springer, Heidelberg (1993). https://doi.org/10.1007/3-540-57163-9_25
Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation. Addison-Wesley (1979)
Knuth, D.E.: On the translation of languages from left to right. Inform. Control 8, 607–639 (1965)
Knuth, D.E.: Top-down syntax analysis. Acta Inform. 1, 79–110 (1971)
Kutrib, M., Malcher, A.: Context-dependent nondeterminism for pushdown automata. Theor. Comput. Sci. 376, 101–111 (2007)
Leung, H., Wotschke, D.: On the size of parsers and LR(\(k\))-grammars. Theor. Comput. Sci. 242, 59–69 (2000)
Ukkonen, E.: Lower bounds on the size of deterministic parsers. J. Comput. Syst. Sci. 26, 153–170 (1983)
Valiant, L.G.: A note on the succinctness of descriptions of deterministic languages. Inform. Control 32, 139–145 (1976)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this paper
Cite this paper
Kutrib, M., Meyer, U. (2022). Syntax Checking Either Way. In: Caron, P., Mignot, L. (eds) Implementation and Application of Automata. CIAA 2022. Lecture Notes in Computer Science, vol 13266. Springer, Cham. https://doi.org/10.1007/978-3-031-07469-1_10
Download citation
DOI: https://doi.org/10.1007/978-3-031-07469-1_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-07468-4
Online ISBN: 978-3-031-07469-1
eBook Packages: Computer ScienceComputer Science (R0)