Title of article
Circular reference attributed grammars — their evaluation and applications
Author/Authors
Eva Magnusson، نويسنده , , G?rel Hedin، نويسنده ,
Issue Information
دوهفته نامه با شماره پیاپی سال 2007
Pages
17
From page
21
To page
37
Abstract
This paper presents a combination of Reference Attributed Grammars (RAGs) and Circular Attribute Grammars (CAGs). While RAGs allow the direct and easy specification of nonlocally dependent information, CAGs allow iterative fixed-point computations to be expressed directly using recursive (circular) equations. We demonstrate how the combined formalism, Circular Reference Attributed Grammars (CRAGs), can take advantage of both these strengths, making it possible to express solutions to many problems in an easy way. We exemplify with the specification and computation of the nullable, first, and follow sets used in parser construction, a problem which is highly recursive and normally programmed by hand using an iterative algorithm. We also present a general demand-driven evaluation algorithm for CRAGs and some optimizations of it. The approach has been implemented and experimental results include computations on a series of grammars including that of Java 1.2. We also revisit some of the classical examples of CAGs and show how their solutions are facilitated by CRAGs.
Keywords
Circular attribute evaluation , Reference attributes , Demand-driven evaluation , Fixed-point evaluation , Grammar flow , Attribute grammars , Live analysis
Journal title
Science of Computer Programming
Serial Year
2007
Journal title
Science of Computer Programming
Record number
1079978
Link To Document