Attribute-influenced LR parsing

  • Neil D. Jones
  • Michael Madsen
Attribute And Affix Grammars
Part of the Lecture Notes in Computer Science book series (LNCS, volume 94)


Methods are described which make it possible, when given an arbitrary attribute grammar (or AG),
  1. 1.

    to analyze the AG to determine which of its attributes may be computed during LR parsing;

  2. 2.

    to augment the parser with instructions and data structures to compute many attributes during parsing;

  3. 3.

    to use attribute values to assist the parsing process (e.g. to use symbol table information to decide whether P(X) is an array element or a function call).



Parse Tree Unknown Attribute Attribute Grammar Parsing Process Attribute Occurrence 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. [AhU77]
    Aho, A. and Ullman, J.: Principles of Compiler Design. Addison-Wesley (1977).Google Scholar
  2. [Boc76]
    Bochmann, G.V.: Semantic evaluation from left to right. In: Comm. ACM 19, 55–62 (1976).CrossRefGoogle Scholar
  3. [CoH79]
    Cohen, R. and Harry, E.: Automatic Generation of Near-Optimal Linear-Time Translation for Non-circular Attribute Grammars. In: Conference Record of 6th ACM Symposium on Principles of Programming Languages. 121–134 (1979).Google Scholar
  4. [Dem77]
    Demers, A.: Generalized left-corner parsing. In: Conference Record of the 4th ACM Symposium on Principles of Programming Languages, 170–182 (1977).Google Scholar
  5. [KeW76]
    Kennedy, K. and Warren, S.K. Automatic Generation of Efficient Evaluations for Attribute Grammars. In: Conference Record of 3rd ACM Symposium on Principles of Programming Languages, 32–49 (1976).Google Scholar
  6. [Knu68]
    Knuth, D.E.: Semantics of context-free languages. In: Mathematical Systems Theory 2, 127–145 (1968).CrossRefGoogle Scholar
  7. [Knu71]
    Knuth, D.E.: Semantics of context-free languages: correction. In: Mathematical Systems Theory 5, 95–96 (1971).CrossRefGoogle Scholar
  8. [LRS74]
    Lewis, P.M., Rosenkrantz, D.J. and Stearns, R.E.: Attributed Translations. In: Journal of Computer and System Sciences 9, 279–307 (1974).Google Scholar
  9. [Mad80a]
    Madsen, M.: Parsing Attribute Grammars. Thesis, University of Aarhus, Denmark (1980).Google Scholar
  10. [Mad80b]
    Madsen, O.L.: On defining semantics by means of extended attribute grammars. Report DAIMI PB-109, 65 pp, University of Aarhus, Denmark, (1980).Google Scholar
  11. [Mil77]
    Milton, D.: Syntactic specification and analysis with attributed grammars. Computer Science Technical Report #304, University of Wisconsin-Madison (1977).Google Scholar
  12. [MiF79]
    Milton, D. and Fischer, C.: LL(k) parsing for attributed grammars. In: Automata, Languages and Programming, (ed. Maurer, H.A.) 422–430. Lecture Notes in Computer Science, vol. 7. Berlin-Heidelberg-New York, Springer (1979).Google Scholar
  13. [PuB79]
    Purdom, P. and Brown, C.A.: Semantic Routines and LR(k) Parsers. Tech. Report 83, Computer Science Department, Indiana Univ. (1979).Google Scholar
  14. [Row77]
    Rowland, B.: Combining parsing and evaluation for attributed grammars. Computer Science Technical Report #308, University of Wisconsin-Madison (1977).Google Scholar
  15. [RäU80]
    Räihä, K. and Ukkonen, E.: One-pass evaluation of attribute grammars using recursive parsing techniques. To appear in IFIP Proceedings, 1980.Google Scholar
  16. [Sch76]
    Schulz, W.A.: Semantic analysis and target language synthesis in a translator. Ph.D. Thesis, University of Colorado, Boulder, Colorado (1976).Google Scholar
  17. [Wat77a]
    Watt, D.A.: The parsing problem for affix grammars. In: Acta Informatica 8, 1–20 (1977).Google Scholar
  18. [Wat77b]
    Watt, D.A.: An extended attribute grammar for Pascal. Report no. 11, Computing Department, University of Glasgow (1977). Also in: SIGPLAN Notices 14, no. 2, 60–74 (1979).Google Scholar
  19. [Wat80]
    Watt, D.A.: Rule splitting and attribute-directed parsing, These proceedings.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1980

Authors and Affiliations

  • Neil D. Jones
    • 1
  • Michael Madsen
    • 1
  1. 1.Computer Science DepartmentAarhus UniversityAarhus CDenmark

Personalised recommendations