Conditional evaluation in simple multi-visit attribute-grammar evaluators

Wuu Yang*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Attribute grammars are a formalism for specifying computations on context-free languages. Due to the nonstrictness of the if constructs in attribution equations, it is possible to avoid evaluating certain attribute instances in a syntax tree. A dynamic evaluator can easily avoid such useless computations with a demand-driven approach. However, dynamic evaluators are not efficient because they need to keep the attribute dependence graph during evaluation, and they need to decide an evaluation order for each syntax tree. In contrast, a visit-oriented (static) evaluator can carefully re-arrange the evaluation order and still avoid unnecessary computations. We propose such a technique in this paper.

Original languageEnglish
Pages (from-to)601-610
Number of pages10
JournalProceedings of the National Science Council, Republic of China, Part A: Physical Science and Engineering
Volume21
Issue number6
DOIs
StatePublished - 5 Nov 1997

Fingerprint

Dive into the research topics of 'Conditional evaluation in simple multi-visit attribute-grammar evaluators'. Together they form a unique fingerprint.

Cite this