Sciweavers

IWPC
2008
IEEE

The Reuse of Grammars with Embedded Semantic Actions

13 years 11 months ago
The Reuse of Grammars with Embedded Semantic Actions
Reusing syntax specifications without embedded arbitrary semantic actions is straightforward because the semantic analysis phases of new applications can feed off trees or other intermediate structures constructed by the pre-existing parser. The presence of arbitrary embedded semantic actions, however, makes reuse difficult with existing mechanisms such as grammar inheritance and modules. This short paper proposes a mechanism based upon prototype grammars that automatically pushes changes from prototypes to derived grammars even in the presence of semantic actions. The prototype mechanism alone would be unsuitable for creating a new grammar from multiple preexisting grammars. When combined with grammar composition, however, the prototype mechanism would improve grammar reuse because imported pre-existing grammars could be altered to suit each new application.
Terence Parr
Added 31 May 2010
Updated 31 May 2010
Type Conference
Year 2008
Where IWPC
Authors Terence Parr
Comments (0)