* No wildcards should occur in build and congruence patterns.

  • No @ should occur in build patterns
    • No wildcards should occur in congruence.

Parameterized modules can be used to avoid the duplication of production rules.

See also:
http://www.stratego-language.org/Stratego/MatchSymbolsInBuildPatterns

Submitted on 12 May 2004 at 10:24

On 21 January 2005 at 12:05 Jira commented:

STR-87, martin:
See also:

http://journal.boblycat.org/karltk/archives/000170.html


On 25 July 2005 at 12:45 Jira commented:

STR-87, martin:
Note that this will break existing embeddings of object syntax.

On the other hand, it might also be an advantage in an embedding that you can distinguish match and build (observed by Rob Vermaas).


On 25 July 2005 at 13:13 Jira commented:

STR-87, martin:
If the constructors stay the same, then why would it break the compiler?


On 25 July 2005 at 13:35 Jira commented:

STR-87, visser:
But Stratego/XT does not support that very well. In particular, GPP requires that constructors for different productions are unique.


On 25 July 2005 at 13:40 Jira commented:

STR-87, martin:
In a parameterized sdf module, the syntax is the same for all the alternatives, so pretty-printg (GPP) should not be an issue. But, I agree that this overloading of constructors is still a bit unconvenient in Stratego/XT.

However, the idea is to let the different term patterns only have a different concrete syntax, not abstract syntax. So, in fact you could say that there is no overloading in the AST.


On 25 July 2005 at 13:41 Jira commented:

STR-87, visser:
But maybe an experiment using the approach you suggest is worthwhile.


On 29 July 2005 at 00:00 Jira commented:

STR-87, visser:
(if you can do this without breaking the compiler, go ahead)

Log in to post comments