A Deterministic Attribute Grammar Evaluator Based on Dynamic Scheduling
- 1 January 1979
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 1 (1) , 142-160
- https://doi.org/10.1145/357062.357072
Abstract
The problem of semantic evaluation in a compiler-generating system can be addressed by specifying language semantics in an attribute grammar [19], a context-free grammar augmented with “attributes” for the nonterminals and “semantic functions” to compute the attributes. A deterministic method for evaluating all attributes in a “semantic” parse tree is derived and shown to have time and space complexities which are essentially linear in the size of the tree. In a prepass through the parse tree, the method determines an evaluation sequence for the attributes; thus it is somewhat analogous to dynamic programming. The constructor-evaluator system described should be suitable for inclusion in a general translator-writing system.Keywords
This publication has 11 references indexed in Scilit:
- Semantic evaluation from left to rightCommunications of the ACM, 1976
- The intrinsically exponential complexity of the circularity problem for attribute grammarsCommunications of the ACM, 1975
- Removal of invariant statements from nested-loops in a single effective compiler passACM SIGPLAN Notices, 1975
- Semantics of context-free languages: CorrectionTheory of Computing Systems, 1971
- Examples of formal semanticsPublished by Springer Nature ,1971
- Property grammars and table machinesInformation and Control, 1969
- Programmed Grammars and Classes of Formal LanguagesJournal of the ACM, 1969
- Syntax-Directed TransductionJournal of the ACM, 1968
- Semantics of context-free languagesTheory of Computing Systems, 1968
- Towards more versatile mechanical translatorsProceedings of Symposia in Applied Mathematics, 1963