Skip to main content
Log in

On the Transformation of LL(k)-linear to LL(1)-linear Grammars

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

A Correction to this article was published on 11 February 2023

This article has been updated

Abstract

It is proved that every LL(k)-linear grammar can be transformed to an equivalent LL(1)-linear grammar. The transformation incurs a blow-up in the number of nonterminal symbols by a factor of m2kO(1), where m is the size of the alphabet. A close lower bound is established: for certain LL(k)-linear grammars with n nonterminal symbols, every equivalent LL(1)-linear grammar must have at least \(n \cdot (m-1)^{2k-O(\log k)}\) nonterminal symbols.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Change history

References

  1. Aho, A. V., Ullman, J. D.: The Theory of Parsing, Translation and Compiling, vol. 1, Parsing. Prentice-Hall (1972)

  2. de la Higuera, C., Oncina, J.: Inferring deterministic linear languages. In: Computational Learning Theory (COLT 2002, Sydney, Australia, July 8–10, 2002, LNCS 2375, 185–200 (2002)

  3. Holzer, M., Lange, K. -J.: On the complexities of linear LL(1) and LR(1) grammars. In: Fundamentals of Computation Theory (FCT 1993, Hungary, August 23–27, 1993), LNCS 710, 299–308 (1993)

  4. Ibarra, O. H., Jiang, T., Ravikumar, B.: Some subclasses of context-free languages in NC1. Inf. Process. Lett. 29(3), 111–117 (1988)

    Article  MATH  Google Scholar 

  5. Jirásková, G., Klíma, O.: On linear languages recognized by deterministic biautomata. Inf. Comput. 286, 104778 (2022)

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MATH  Google Scholar 

  7. Kurki-Suonio, R.: Notes on top-down languages. BIT Numer. Math. 9(3), 225–238 (1969)

    Article  MathSciNet  MATH  Google Scholar 

  8. Lewis, P. M. II., Stearns, R. E.: Syntax-directed transduction. J. ACM 15(3), 465–488 (1968)

    Article  MATH  Google Scholar 

  9. Okhotin, A.: Expressive power of LL(k) Boolean grammars. Theor. Comput. Sci. 412(39), 5132–5155 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  10. Okhotin, A.: Underlying principles and recurring ideas of formal grammars. In: Language and Automata Theory and Applications (LATA 2018, Bar-Ilan near Tel Aviv, Israel, 9–11 April 2018), LNCS 10792, 36–59 (2018)

  11. Rosenkrantz, D. J., Stearns, R. E.: Properties of deterministic top-down grammars. Inf. Control. 17, 226–256 (1970)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

The authors are grateful to Henning Fernau and Dominik Kempa for interesting comments on the conference paper, and, in particular, for suggesting the idea of Section 7. Thanks are due to an anonymous referee for careful reading, and for convincing the authors to make numerous improvements to the presentation.

This work was carried out during the first author’s appointment at the Leonhard Euler International Mathematical Institute at St. Petersburg State University, Russia, and was supported by the Ministry of Science and Higher Education of the Russian Federation, agreement 075-15-2022-287.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ilya Olkhovsky.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

A preliminary version of this paper was presented at Computer Science in Russia (CSR 2020) conference, and its extended abstract appeared in the proceedings.

The original online version of this article was revised to update the affiliation of corresponding author Ilya Olkhovsky.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Olkhovsky, I., Okhotin, A. On the Transformation of LL(k)-linear to LL(1)-linear Grammars. Theory Comput Syst 67, 234–262 (2023). https://doi.org/10.1007/s00224-022-10108-6

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-022-10108-6

Keywords

Navigation