Summary
The principal tools in LR theory, viz. item grammars and their corresponding automata, are adapted for use with affix grammars. The items (and automata states) are furnished with attributes that serve as pointers into the parsing stack and thus determine the inherited affixes needed in a reduction step. This attribute mechanism can be tested for ambiguity. If unambiguous and consistent in the sense of LR theory, the attributed automaton defines a deterministec bottom-up parser for the affix grammar in question.
Similar content being viewed by others
References
Bochmann, G.V.: Semantic Evaluation from Left to Right. CACM 19, 55–62 (1976)
Heilbrunner, S.: A Parsing Automata Approach to LR-Theory. Theor. Comput. Sci. 15, 117–157 (1981)
Jones, N.D., Madsen, C.M.: Attribute Influenced LR-Parsing. In: Semantics Directed Compiler Generation (N.D. Jones, ed.), Lecture Notes in Computer Science, Vol. 94, pp. 393–407. Berlin-Heidelberg-New York, Springer 1980
Koster, C.H.A.: Affix Grammars. In: Algol 68 Implementation (J.E.L. Peck, ed.), pp. 95–106. Amsterdam: North Holland 1971
Pohlmann, W.: LR-Zerteilung für Affixgrammatiken. Bericht Nr. 8202 HSBw Neubiberg, 1982
Watt, D.A.: Analysis-Oriented Two-Level Grammars. Ph. D. Thesis, Glasgow University 1974
Watt, D.A.: The Parsing Problem for Affix Grammars. Acta Informat. 8, 1–20 (1977)
Watt, D.A.: Rule Splitting and Attribute-Directed Parsing. In: Semantics Directed Compiler Generation (N.D. Jones, ed.), Lecture Notes in Computer Science, Vol. 94, pp. 363–389. Berlin-Heidelberg-New York, Springer 1980
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Pohlmann, W. LR parsing for affix grammars. Acta Informatica 20, 283–300 (1983). https://doi.org/10.1007/BF00264275
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00264275