Publication
ACM Transactions on Programming Languages and Systems (TOPLAS)
Paper

A Deterministic Attribute Grammar Evaluator Based on Dynamic Scheduling

Download paper

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. for inclusion in a general translator-writing system. © 1979, ACM. All rights reserved.

Date

Publication

ACM Transactions on Programming Languages and Systems (TOPLAS)

Authors

Resources

Share