In Meta-Programming with Concrete Object Syntax it is shown how the syntax definition formalism SDF can be used to implement meta programs in Stratego with concrete syntax for the object language. The approach is generalized to the embedding of concrete syntax for object languages in other meta languages.
Stratego is a language for program transformations based on the paradigm of rewriting strategies. The application of rewrite rules is controlled by programmable strategies. This paper accompanies the new concrete syntax capabilities of Stratego 0.8, which was released a few days ago.
SDF is a modular formalism to define syntax. SDF is supported by Scannerless Generalized LR Parsing. Therefore it allows ambiguities and removes the restriction to a non-ambiguous subclass of context-free grammars. Because SDF covers the full class of context-free grammars (unlike most other current parsing techniques), it is a modular formalism. This modularity also allows us to combine separate languages easily. Because SDF covers the full class of context-free grammars, SDF allows you to expres the syntax of your language in a natural way and there is no need to encode this grammar in a restricted subclass.
|