ABSTRACT
A new kind of attribute grammars, called higher order attribute grammars, is defined. In higher order attribute grammars the structure tree can be expanded as a result of attribute computation. A structure tree may be stored in an attribute. The term higher order is used because of the analogy with higher order functions, where a function can be the result or parameter of another function. A relatively simple method, using OAGs, is described to derive an evaluation order on the defining attribute occurrences which comprises all possible direct and indirect attribute dependencies. As in OAGs, visit-sequences are computed from which an efficient algorithm for attribute evaluation can be derived.
- Jazayeri 1975.M. Jazayeri, W.F. Ogden, W.C. Rounds. The intrinsically exponential complexity of the circularity problem for attributed grammars. In CACM 18, pages 679-706, 1975. Google ScholarDigital Library
- Kastens, Hutt, Zimmerman 81.U. Kastens, B. Hutt, and E. Zimmerman. GAG: A Practical Compiler Generator. Springer, 1982.Google Scholar
- Ganzinger, Giegerich 84.H. Ganzinger and R. Giegerich. Attribute Coupled Grammars Sigplan Notices Vol. 19, No. 6, pages 157-170, 1984. Google ScholarDigital Library
- Kastens 80.U. Kastens. Ordered Attributed Grammars. Acta Informatica, 13, pages 229-256, 1980.Google Scholar
- Knuth 1968.D.E. Knuth. Semantics of context-free languages. Math. Syst. Theory, 2(2):127-145, 1968.Google ScholarCross Ref
- Knuth 1971.D.E. Knuth. Semantics of context-free languages (correction). Math. Syst. Theory, 5(1):95-96, 1971.Google ScholarCross Ref
- Reps 1982.T. Reps. Generating language based environments, Tech. Rep, 82-514 and Ph.D dissertation, Dept. of Computer Science, Cot'nell Univ., Ithaca, N.Y., Aug. 1982. Google ScholarDigital Library
- Reps, Teitelbaum and Demers 1983.T. Reps, T. Teitelbaum and A. Demers. Incremental Context-Dependent Analysis for Language Based Editors. In ACM Transactions on Progr. Lang. and Systems, Vol. 5, No. 3, pages 449-477, July 1983. Google ScholarDigital Library
- Reps and Teitelbaum 1987.Reps, T. and Teitelbaum, T. The Synthesizer Generator Reference Manual. Cornell University, July, 1987. Google ScholarDigital Library
- Waite and Goos 84.W.M. Waite and G.Goos. Compiler Construction. Springer, 1984. Google ScholarDigital Library
Index Terms
- Higher order attribute grammars
Recommendations
Linearly Ordered Attribute Grammars: with Automatic Augmenting Dependency Selection
PEPM '15: Proceedings of the 2015 Workshop on Partial Evaluation and Program ManipulationAttribute Grammars (AGs) extend Context-Free Grammars with attributes: information gathered on the syntax tree that adds semantics to the syntax. AGs are very well suited for describing static analyses, code-generation and other phases incorporated in a ...
Higher order attribute grammars
Proceedings of the SIGPLAN '89 symposium on Interpreters and interpretive techniquesA new kind of attribute grammars, called higher order attribute grammars, is defined. In higher order attribute grammars the structure tree can be expanded as a result of attribute computation. A structure tree may be stored in an attribute. The term ...
Monolithic and modular termination analyses for higher-order attribute grammars
In this paper we describe a sound, but not complete, analysis to prove the termination of higher-order attribute grammar evaluation caused by the creation of an unbounded number of (finite) trees as local tree-valued attributes, which are then ...
Comments