| Regular right part grammars and their parsers |
| Full text |
Pdf
(966 KB)
|
Source
|
Communications of the ACM
archive
Volume 20 , Issue 10 (October 1977)
table of contents
Pages: 731 - 741
Year of Publication: 1977
ISSN:0001-0782
|
|
Author
|
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 7, Downloads (12 Months): 30, Citation Count: 9
|
|
|
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
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
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
|
|
| |
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
|
|
| |
7
|
|
| |
8
|
Knuth, D.E. On the translation of languages from left to right. Inform. Contr. 8 (Oct. 1965), 607-639.
|
| |
9
|
|
 |
10
|
|
INDEX TERMS
Keywords:
LR(k) grammars,
compilers,
finite state machines (automata),
formal definition,
language generation,
parser construction,
parsing,
programming languages,
regular expressions,
scanners,
syntax diagrams,
translators
|