Remote attribute grammars

被引:38
作者
Boyland, JT [1 ]
机构
[1] Univ Wisconsin, Dept Elect Engn & Comp Sci, Milwaukee, WI 53201 USA
关键词
languages; language description; remote attribution; collection attributes;
D O I
10.1145/1082036.1082042
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Describing the static semantics of programming languages with attribute grammars is eased when the formalism allows direct dependencies to be induced between rules for nodes arbitrarily far away in the tree. Such direct non-local dependencies cannot be analyzed using classical methods, which enable efficient evaluation. This article defines an attribute grammar extension ("remote attribute grammars") to permit references to objects with fields to be passed through the attribute system. Fields may be read and written through these references. The extension has a declarative semantics in the spirit of classical attribute grammars. It is shown that determining circularity of remote attribute grammars is undecidable. The article then describes a family of conservative tests of noncircularity and shows how they can be used to "schedule" a remote attribute grammar using standard techniques. The article discusses practical batch and incremental evaluation of remote attribute grammars.
引用
收藏
页码:627 / 687
页数:61
相关论文
共 44 条
[1]   Cool: A portable project for teaching compiler construction [J].
Aiken, A .
ACM SIGPLAN NOTICES, 1996, 31 (07) :19-24
[2]  
ALBLAS H, 1991, LECT NOTES COMPUT SC, V545, P48
[3]  
AUGUSTEIJN L, 1990, LECT NOTES COMPUT SC, V461, P238
[4]   SEMANTIC EVALUATION FROM LEFT TO RIGHT [J].
BOCHMANN, GV .
COMMUNICATIONS OF THE ACM, 1976, 19 (02) :55-62
[5]  
BORRAS P, 1988, P ACM SIGSOFT SIGPLA, P14
[6]  
BOYLAND J, 1994, 21 ANN ACM SIGACT SI, P375
[7]  
BOYLAND J, 2002, ELECT NOTES THEORETI, V63, P3
[8]   Conditional attribute grammars [J].
Boyland, JT .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1996, 18 (01) :73-108
[9]  
Boyland JT, 1998, LECT NOTES COMPUT SC, V1383, P31, DOI 10.1007/BFb0026421
[10]  
BOYLAND JT, 1996, UCBCSD96916