Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Syntax Checking Either Way

  • Conference paper
  • First Online:
Implementation and Application of Automata (CIAA 2022)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. 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

    Chapter  Google Scholar 

  2. 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)

    Google Scholar 

  3. Ginsburg, S., Greibach, S.A.: Deterministic context-free languages. Inform. Control 9, 620–648 (1966)

    Article  MathSciNet  Google Scholar 

  4. Ginsburg, S., Spanier, E.H.: Finite-turn pushdown automata. SIAM J. Contr. 4, 429–453 (1966)

    Article  MathSciNet  Google Scholar 

  5. Goldstine, J., Leung, H., Wotschke, D.: Measuring nondeterminism in pushdown automata. J. Comput. Syst. Sci. 71, 440–466 (2005)

    Article  MathSciNet  Google Scholar 

  6. 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)

    Article  MathSciNet  Google Scholar 

  7. Greibach, S.A.: The unsolvability of the recognition of linear context-free languages. J. ACM 13, 582–587 (1966)

    Article  MathSciNet  Google Scholar 

  8. Harrison, M.A.: Introduction to Formal Language Theory. Addison-Wesley, Boston (1978)

    MATH  Google Scholar 

  9. Hartmanis, J.: Context-free languages and Turing machine computations. In: Proceedings Symposia in Applied Mathematics, vol. 19, pp. 42–51 (1967)

    Google Scholar 

  10. 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

    Chapter  MATH  Google Scholar 

  11. Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation. Addison-Wesley (1979)

    Google Scholar 

  12. Knuth, D.E.: On the translation of languages from left to right. Inform. Control 8, 607–639 (1965)

    Article  MathSciNet  Google Scholar 

  13. Knuth, D.E.: Top-down syntax analysis. Acta Inform. 1, 79–110 (1971)

    Article  Google Scholar 

  14. Kutrib, M., Malcher, A.: Context-dependent nondeterminism for pushdown automata. Theor. Comput. Sci. 376, 101–111 (2007)

    Article  MathSciNet  Google Scholar 

  15. Leung, H., Wotschke, D.: On the size of parsers and LR(\(k\))-grammars. Theor. Comput. Sci. 242, 59–69 (2000)

    Article  MathSciNet  Google Scholar 

  16. Ukkonen, E.: Lower bounds on the size of deterministic parsers. J. Comput. Syst. Sci. 26, 153–170 (1983)

    Article  MathSciNet  Google Scholar 

  17. Valiant, L.G.: A note on the succinctness of descriptions of deterministic languages. Inform. Control 32, 139–145 (1976)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Martin Kutrib .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics