Abstract
A method is presented to augment a conventional evaluator for an ordered attributed grammar into an incremental one, though it is applicable to tree-walker evaluators for any non-circular attributed grammars. Also three improvements are suggested. The resulting incremental evaluator is statically deterministic and evaluates a modified semantic tree in time proportional to the amount of attribute instances affected by the modification.
Similar content being viewed by others
References
A. V. Aho and J. D. Ullman,The Theory of Parsing, Translation, and Compiling. Vols. 1 & 2, Prentice-Hall, (1972 & 1973).
R. Cohen and E. Harry,Automatic generation of near-optimal linear-time evaluators for noncircular attribute grammars. Conference record of the 6th ACM symposium on principles of programming languages, (January 1979), 121–134.
A Demers, T. Reps and T. Teitelbaum,Incremental evaluation for attribute grammars with application to syntax-directed editors. Conference record of the 8th ACM symposium on principles of programming languages, (January 1981), 105–116.
H. Ganzinger, R. Giegerich, U. Moencker and R. Wilhelm,A truly generative semantics-directed compiler-generator. Proceedings of the SIGPLAN'82 symposium on compiler construction, (June 1982), 172–184.
U. Kastens,Ordered attributed grammars, Acta Informatica, Vol. 13 (1980), 229–256.
T. Reps,Optimal-time incremental semantic analysis for syntax-directed editors. Conference record of the 9th annual ACM SIGACT_SIGPLAN symposium on principles of programming languages, (January 1982), 169–176.
D. S. Yeh,On incremental shift-reduce parsing, BIT 23 (1983), 36–48.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Yeh, D. On incremental evaluation of ordered attributed grammars. BIT 23, 308–320 (1983). https://doi.org/10.1007/BF01934460
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01934460