skip to main content
article
Free Access

Right nulled GLR parsers

Published:01 July 2006Publication History
Skip Abstract Section

Abstract

The right nulled generalized LR parsing algorithm is a new generalization of LR parsing which provides an elegant correction to, and extension of, Tomita's GLR methods whereby we extend the notion of a reduction in a shift-reduce parser to include right nulled items. The result is a parsing technique which runs in linear time on LR(1) grammars and whose performance degrades gracefully to a polynomial bound in the presence of nonLR(1) rules. Compared to other GLR-based techniques, our algorithm is simpler and faster.

References

  1. Aho, A. V., Johnson, S. C., and Ullman, J. D. 1975. Deterministic parsing of ambiguous grammars. Commun. ACM 18, 8 (Aug.). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Aho, A. V., Sethi, R., and Ullman., J. D. 1986. Compilers: Principles Techniques and Tools. Addison-Wesley, Reading, Mass. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Aho, A. V. and Ullman, J. D. 1972. The Theory of Parsing, Translation and Compiling. Series in Automatic Computation, vol. 1---Parsing. Prentice-Hall, Upper Saddle River, N. J. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Aycock, J. and Horspool, N. 1999. Faster generalised LR parsing. In Proceedings of the Compiler Construction, 8th International Conference CC'99. LNCS, vol. 1575. Springer, New York 32--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Billot, S. and Lang, B. 1989. The structure of shared forests in ambiguous parsing. In Proceedings of the 27th Conference on Association for Computational Linguistics 143--151. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Breuer, P. T. and Bowen, J. P. 1995. A PREttier compiler-compiler: Generating higher-order parsers in C. Softw. Pract. Exper. 25, 11 (Nov.), 1263--1297. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bunt, H. and Tomita, M., eds. 1991. Recent Advances in Parsing Technology. Text speech and language technology, vol. 1. Kluwer Academic, Hingham, Mass. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. DeRemer, F. L. 1969. Practical translators for LR(k) languages. Ph.D. thesis, Massachussetts Institute of Technology.Google ScholarGoogle Scholar
  9. DeRemer, F. L. 1971. Simple LR(k) grammars. Commun. ACM 14, 7 (July), 453--460. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dodd, C. and Maslov, V. 1995. http://compilers.iecc.com/comparch/article/95-03-044.Google ScholarGoogle Scholar
  11. Earley, J. 1970. An efficient context-free parsing algorithm. Commun. ACM 13, 2 (Feb.), 94--102. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Eggert, P. 2003. http://compilers.iecc.com/comparch/article/03-01-005.Google ScholarGoogle Scholar
  13. Graham, S. L. and Harrison, M. A. 1976. Parsing of general context-free languages. Adv. Comput. 14, 77--185.Google ScholarGoogle ScholarCross RefCross Ref
  14. Grune, D. and Jacobs, C. 1990. Parsing Techniques: A Practial Guide. Ellis Horwood, Chichester, England. http://www.cs.vu.nl/~dick/PTAPG.html. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Hanson, D. R. and Proebsting, T. A. 2003. A research C# compiler. Tech. Rep. MSR-TR-2003-32, Microsoft Research, Redmond, WA.Google ScholarGoogle Scholar
  16. Hays, D. 1967. Introductions to Computational Linguistics. Elsevier, New York.Google ScholarGoogle Scholar
  17. Irons, E. 1961. A syntax directed compiler for Algol 60. Commun. ACM 4, 1, 51--55. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Johnstone, A. and Scott, E. 1998. Generalized recursive descent parsing and follow determinism. In Proceedings of the 7th International Conference on Compiler Construction (CC'98), LNCS, vol. 1383. K. Koskimies, ed. Springer, Berlin, 16--30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Johnstone, A. and Scott, E. 2002. Generalized reduction modified LR parsing for domain specific language prototyping. In Proceedings of the 35th Annual Hawaii International Conference on System Sciences (HICSS02). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Johnstone, A. and Scott, E. 2003. Generalized regular parsers. In Proceedings of the Compiler Construction, 12th International Conference, CC'03, G. Hedin, ed. LNCS, vol. 2622. Springer Berlin, 232--246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Johnstone, A., Scott, E., and Economopoulos, G. 2004a. Generalized parsing: Some costs. In Proceedings of the Compiler Construction, 13th International Conference, CC'04, E. Duesterwald, ed. LNCS, vol. 2985. Springer Berlin, 89--103.Google ScholarGoogle Scholar
  22. Johnstone, A., Scott, E., and Economopoulos, G. 2004b. The grammar tool box: A case study comparing GLR parsing algorithms. In Proceedings of the 4th Workshop on Language Descriptions, Tools and Applications LDTA2004, G. Hedin and E. V. Wick, eds. Also in Electronic Notes in Theoretical Computer Science. Elsevier, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Kasami, T. 1965. An efficient recognition and syntax analysis algorithm for context-free languages. Tech. Rep. AFCRL-65-758, Air Force Cambridge Research Laboratory, Bedford, Mass.Google ScholarGoogle Scholar
  24. Knuth, D. E. 1965. On the translation of languages from left to right. Inf. Control 8, 6, 607--639.Google ScholarGoogle ScholarCross RefCross Ref
  25. Lang, B. 1974. Deterministic techniques for efficient nondeterministic parsers. In Proceedings of the Automata, Lanugages and Programming 2nd Colloquium. LNCS, vol. 14. Springer, Berlin, 255--269. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Lewis II, P. M. and Stearns, R. E. 1968. Syntax directed transduction. J. ACM 15, 3, 465--488. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. McPeak, S. and Necula, G. 2004. Elkhound: A fast, practical GLR parser generator. In Proceedings of the Compiler Construction, 13th Internationl. Conference CC'04, E. Duesterwald, ed. LNCS. Springer, Berlin.Google ScholarGoogle Scholar
  28. Nederhof, M.-J. 1994. An optimal tabular parsing algorithm. In Proceedings of the 32nd Meeting of the Association for Computational Linguistics. 117--124. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Nederhof, M.-J. and Sarbo, J. J. 1996. Increasing the applicability of LR parsing. In Recent Advances in Parsing Technology, H.Bunt and M. Tomita, eds. Kluwer Academic, Amsterdam, the Netherlands, 35--57.Google ScholarGoogle Scholar
  30. Nederhof, M.-J. and Satta, G. 1996. Efficient tabular LR parsing. In Proceedings of the 34th Meeting of the Association for Computational Linguistics. 239--246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Nederhof, M.-J. and Satta, G. 2004. Tabular parsing. In Formal Languages and Applications, Studies in Fuzziness and Soft Computing 148, G. C.Martin-Vide, V.Mitrana, eds. Springer, New York, 529--549.Google ScholarGoogle Scholar
  32. Nozohoor-Farshi, R. 1991. GLR parsing for ε-grammars. In Generalized LR Parsing, M. Tomita, ed. Kluwer Academic, Amsterdam, the Netherlands, 60--75.Google ScholarGoogle Scholar
  33. Parr, T. J. 1996. Language Translation Using PCCTS and C++. Automata Publishing.Google ScholarGoogle Scholar
  34. Rekers, J. G. 1992. Parser generation for interactive environments. Ph.D. thesis, Universty of Amsterdam.Google ScholarGoogle Scholar
  35. Sakai, I. 1962. Syntax in universal translation. In Proceedings of the 1961 International Conference on Machine Translation of Languages and Applied Language Analysis. 593--608.Google ScholarGoogle Scholar
  36. Scott, E. and Johnstone, A. 2004. Reducing nondeterminism in right nulled GLR parsers. Acta Informatica 40, 459--489. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Scott, E., Johnstone, A., and Hussain, S. S. 2000. Tomita-Style generalized LR parsers. Updated version. Tech. Rep. TR-00-12, Royal Holloway, University of London Dec.Google ScholarGoogle Scholar
  38. Sheil, B. 1976. Observations on context-free parsing. In Statistical Methods in Linguistics. 71--109.Google ScholarGoogle Scholar
  39. Stroustrup, B. 1994. The Design and Evolution of C++. Addison-Wesley, Reading, Mass. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Tomita, M. 1986. Efficient Parsing for Natural Language. Kluwer Academic, Boston. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Unger, S. 1968. A global parser for context-free phrase structure grammars. Comm. ACM 11, 4, 240--246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Valiant, L. 1975. General context-free recognition in less than cubic time. J. Comput. Syst. Sci. 10, 308--315.Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. van den Brand, M., Heering, J., Klint, P., and Olivier, P. 2002. Compiling language definitions: The ASF+SDF compiler. ACM Trans. Program. Languages Syst. 24, 4, 334--368. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Visser, E. 1997. Syntax definition for langauge prototyping. Ph.D. thesis, Universty of Amsterdam.Google ScholarGoogle Scholar
  45. Visser, E. 2004. Program transformation with Stratego/XT: Rules, strategies, tools, and systems in StrategoXT-0.9. In Domain-Specific Program Generation, C. et al, ed. LNCS, vol. 3016. Springer, Berlin, 216--238.Google ScholarGoogle Scholar
  46. Younger, D. H. 1967. Recognition of context-free languages in time n3. Inform. Control 10, 2 (Feb.), 189--208.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Right nulled GLR parsers

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM Transactions on Programming Languages and Systems
          ACM Transactions on Programming Languages and Systems  Volume 28, Issue 4
          July 2006
          217 pages
          ISSN:0164-0925
          EISSN:1558-4593
          DOI:10.1145/1146809
          Issue’s Table of Contents

          Copyright © 2006 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 July 2006
          Published in toplas Volume 28, Issue 4

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!