Premium
Modelling of space‐efficient one‐pass translation using attribute grammars
Author(s) -
Koskimies Kai,
Räihä KariJouko
Publication year - 1983
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380130203
Subject(s) - compiler , programming language , computer science , rule based machine translation , grammar , class (philosophy) , definite clause grammar , compiler construction , l attributed grammar , context free grammar , artificial intelligence , parsing , linguistics , philosophy
Automatic production of one‐pass compilers from attribute grammars is considered. An examination of a one‐pass grammar for the programming language Euclid shows that the present definition of one‐pass grammars is too general: the space behaviour of the produced compilers differs from that found in conventional hand‐written compilers. A new class of attribute grammars is defined. The class models naturally the use of space in a hand‐written compiler. This implies that the compiler produced automatically on the basis of the grammar uses space in the same way as a practical hand‐written recursive descent compiler. Furthermore, a graphical notation is introduced as a design tool for obtaining grammars in the proposed class.