Pretty-printing of SDF cannot even be done based on the constructor name and the arity. Seq is overloaded vor (… …) and Lookahead sequences. Currently the Lookahead sequences are preferred.

Workaround for now: Don’t use tuples.

Submitted on 23 April 2004 at 10:18

On 23 April 2004 at 10:28 Jira commented:

STR-59, martin:
Possible solution: rename one of the constructors in sdf-ppfix.


On 25 April 2004 at 10:19 Jira commented:

STR-59, martin:
The basic problem is that a seq needs to know its type. This type is based on the context of the seq. As a general solution interpretation of the ATerm against an abstract syntax can be considered. In this case the ATerm should then be interpreted against an RTG for SDF. These tools are available in stratego-regular. Type-based pretty-printing and rewriting can in some cases be very useful.

IRTG can currently just be imploded to an ATerm, loosing the type information. Maybe I should add an option to preserve the type in annotations.

Log in to post comments