Top-down Parsing with Simultaneous Evaluation of Noncircular Attribute Grammars

This paper introduces a machinery called attributed top-down parsing automaton which performs top-down parsing of strings and, simultaneously, the evaluation of arbitrary noncircular attribute grammars. The strategy of the machinery is based on a single depth-first left-to-right traversal over the syntax tree. There is no need to traverse parts of the syntax tree more than once, and hence, the syntax tree itself does not have to be maintained. Attribute values are stored in a graph component, and values of attributes which are needed but not yet computed are represented by particular nodes. Values of attributes which refer to such uncomputed attributes are represented by trees over operation symbols in which pointers to the particular nodes at their leaves are maintained. Whenever eventually the needed attribute value is computed, it is glued into the graph at the appropriate nodes.

[1]  Jukka Paakki,et al.  A Logic-Based Modification of Attribute Grammars for Practical Compiler Writing , 1990, International Conference on Logic Programming.

[2]  Joost Engelfriet,et al.  Attribute Grammars: Attribute Evaluation Methods , 1984, Method and tools for compiler construction.

[3]  Joost Engelfriet,et al.  Pushdown Machines for the Macro Tree Transducer , 1986, Theor. Comput. Sci..

[4]  Thomas Thierauf,et al.  Complexity-Restricted Advice Functions , 1994, SIAM J. Comput..

[5]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[6]  Lane A. Hemaspaandra,et al.  Reductions to Sets of Low Information Content , 1992, Complexity Theory: Current Research.

[7]  Ken Kennedy,et al.  Automatic generation of efficient evaluators for attribute grammars , 1976, POPL.

[8]  Jan Maluszynski,et al.  Relating Logic Programs and Attribute Grammars , 1985, J. Log. Program..

[9]  Gregor von Bochmann,et al.  Semantic evaluation from left to right , 1976, CACM.

[10]  Borivoj Melichar,et al.  The Hierarchy of LR-Attributed Grammars , 1990, WAGA.

[11]  Robert Giegerich,et al.  Counter-One-Pass Features in One-Pass Compilation: A Formalization Using Attribute Grammars , 1978, Inf. Process. Lett..

[12]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[13]  G. Goos,et al.  Attribute Grammars, Applications and Systems: International Summer School Saga Prague, Czechoslovakia, June 4-13, 1991 Proceedings , 1991 .

[14]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[15]  Mikko Saarinen,et al.  On Constructing Efficient Evaluators for Attribute Grammars , 1978, ICALP.

[16]  Daniel J. Rosenkrantz,et al.  Attributed Translations , 1974, J. Comput. Syst. Sci..

[17]  Pierre Deransart,et al.  Attribute Grammars: Definitions, Systems and Bibliography , 1988 .

[18]  Jacobo Torán,et al.  The power of the middle bit , 1992, [1992] Proceedings of the Seventh Annual Structure in Complexity Theory Conference.