Concrete Syntax

Stratego -- Strategies for Program Transformation
Abstract syntax written using prefix constructor terms can become rather unreadable when patterns become large. Therefore it is attractrive to write transformation rules using the concrete syntax of the object language instead of its abstract syntax. For example, to write
  PlusZero :
     |[ e + 0 ]| -> |[ e ]|
instead of
  PlusZero :
     Plus(e, Int(0)) -> e

Starting with StrategoRelease08 concrete syntax is supported by Stratego. For a full account of this new feature and its implementation see the paper Meta Programming with Concrete Object Syntax.

The techniques for handling embedded syntax in a meta-language have now been generalized and are implemented in the parse-cs tool in the concrete syntax package in the StrategoXT distribution. This tool has been used in the embedding of concrete syntax in Prolog implemented in the Prolog tools package.

-- EelcoVisser - 28 Nov 2003