Conditional attribute grammars
- 1 January 1996
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 18 (1) , 73-108
- https://doi.org/10.1145/225540.225544
Abstract
Attribute grammars are a useful formalism for the specification of computations on structured terms. The classical definition of attribute grammars, however, has no way of treating conditionals nonstrictly. Consequently, the natural way of expressing many otherwise well-behaved computations involves a circularity. This article presents conditional attribute grammars , and extension of attribute grammars that enables more precise analysis of conditionals. In conditional attribute grammars, attribute equations may have guards. Equations are active only when their guards are satisfied. The standard attribute grammar evaluation classes are definable for conditional attribute grammars, and the corresponding evaluation techniques can be easily adapted. However, determining membership in standard evaluation classes such as 1-SWEEP, OAG, and SNC is NP-hard.Keywords
This publication has 12 references indexed in Scilit:
- Internals and externals of the FNC-2 attribute grammar systemPublished by Springer Nature ,1991
- Introduction to attribute grammarsPublished by Springer Nature ,1991
- Composition and evaluation of attribute coupled grammarsActa Informatica, 1988
- An optimal-time recursive evaluator for attribute grammarsPublished by Springer Nature ,1984
- Simple multi-visit attribute grammarsJournal of Computer and System Sciences, 1982
- Attribute grammars and recursive program schemes ITheoretical Computer Science, 1982
- The formal power of one-visit attribute grammarsActa Informatica, 1981
- Ordered attributed grammarsActa Informatica, 1980
- 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