Nothing Special   »   [go: up one dir, main page]

skip to main content
article
Free access

Regular right part grammars and their parsers

Published: 01 October 1977 Publication History

Abstract

This paper introduces an alternative to context-free grammars called regular right part (RRP) grammars, which resemble PASCAL syntax diagrams. Formally, RRP grammars have production right parts, which are nondeterministic finite state machines (FSMs), and, as a special case, regular expression, since these can be converted to FSMs. RRP grammars describe the syntax of programming languages more concisely and more understandably than is possible with CF grammars. Also introduced is a class of parsers, RRP LR(m, k) parsers, which includes the CF LR(k) parsers and provides the same advantages. Informally, an RRP LR(m, k) parser can determine the right end of each handle by considering at most k symbols to the right of the handle and the left end, after the right end has been found, by considering at most m symbols to the left of the handle. A mechanism for determining the left end is required because there is no bound on the length of the handle.

References

[1]
Aho, A.V., and Ullman, J.D. The Theory of Parsing, Translation and Compiling, Vols. 1, 2. Prentice-Hall, Englewood Cliffs, N.J., 1972.
[2]
DeRemer, F.L., and LaLonde, W.R. A proposal to develop and implement an advanced translator writing system. U. of California, Santa Cruz, Calif., 1971-75.
[3]
DeRemer, F.L. Extended LR(k) grammars and their parsers, U. of California, Santa Cruz, Calif., 1970.
[4]
Earley, J. An efficient context free parsing algorithm. Ph.D. Th., Carnegie-Mellon U., Pittsburgh, Pa., 1968; also Comm. ACM 13, 2 (Feb. 1970), 94-102.
[5]
Floyd, R. A grammatical description of AlgolW. In Sites, R.L., Tech. Rept. STAN-CS-71-230, Comptr. Sci. Dept., Stanford U., Stanford, Calif., 1972, pp. 128-139.
[6]
Gries, D. Compiler Construction for Digital Computers. Wiley, New York, 1971.
[7]
Jensen, K., and Wirth, N. PASCAL User Manual and Report. Springer-Verlag, New York, Second Ed., 1975.
[8]
Knuth, D.E. On the translation of languages from left to right. Inform. Contr. 8 (Oct. 1965), 607-639.
[9]
LaLonde, W.R. Practical LR analysis of regular right part grammars. Ph.D. Th., U. of Waterloo, Waterloo, Ont., Oct. 1975.
[10]
Woods, W.A. Transition network grammars for natural language analysis. Comm. ACM 13, 10 (Oct. 1970), 591-606.

Cited By

View all
  • (2022)The Semantics of PluralsProceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3567512.3567516(36-54)Online publication date: 29-Nov-2022
  • (2018)Weighted dag automata for semantic graphsComputational Linguistics10.1162/COLI_a_0030944:1(119-186)Online publication date: 1-Mar-2018
  • (2010)Efficient recognition of trace languages defined by repeat-until loopsInformation and Computation10.1016/j.ic.2010.03.001208:8(969-981)Online publication date: 1-Aug-2010
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Communications of the ACM
Communications of the ACM  Volume 20, Issue 10
Oct. 1977
93 pages
ISSN:0001-0782
EISSN:1557-7317
DOI:10.1145/359842
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 October 1977
Published in CACM Volume 20, Issue 10

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. LR(k) grammars
  2. compilers
  3. finite state machines (automata)
  4. formal definition
  5. language generation
  6. parser construction
  7. parsing
  8. programming languages
  9. regular expressions
  10. scanners
  11. syntax diagrams
  12. translators

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)100
  • Downloads (Last 6 weeks)22
Reflects downloads up to 21 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2022)The Semantics of PluralsProceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3567512.3567516(36-54)Online publication date: 29-Nov-2022
  • (2018)Weighted dag automata for semantic graphsComputational Linguistics10.1162/COLI_a_0030944:1(119-186)Online publication date: 1-Mar-2018
  • (2010)Efficient recognition of trace languages defined by repeat-until loopsInformation and Computation10.1016/j.ic.2010.03.001208:8(969-981)Online publication date: 1-Aug-2010
  • (2009)Towards a Taxonomy for ECFG and RRPG ParsingProceedings of the 3rd International Conference on Language and Automata Theory and Applications10.1007/978-3-642-00982-2_35(410-421)Online publication date: 31-Mar-2009
  • (2008)Macros for context-free grammarsProceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programming10.1145/1389449.1389465(120-130)Online publication date: 15-Jul-2008
  • (2005)Deterministic regular languagesSTACS 9210.1007/3-540-55210-3_182(173-184)Online publication date: 2-Jun-2005
  • (2003)On predictive parsing and extended context-free grammarsComputer Science in Perspective10.5555/865449.865456(69-87)Online publication date: 1-Jan-2003
  • (2003)Program Synthesis from Formal Requirements Specifications Using APTSHigher-Order and Symbolic Computation10.1023/A:102307210455316:1-2(63-92)Online publication date: 1-Mar-2003
  • (2003)On Predictive Parsing and Extended Context-Free GrammarsImplementation and Application of Automata10.1007/3-540-44977-9_24(239-247)Online publication date: 24-Jun-2003
  • (2003)On Predictive Parsing and Extended Context-Free GrammarsComputer Science in Perspective10.1007/3-540-36477-3_6(69-87)Online publication date: 28-Feb-2003
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media