STR-87: Separate match, build and congruence term patterns in syntax definition.
* 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:
Submitted on 12 May 2004 at 10:24
http://www.stratego-language.org/Stratego/MatchSymbolsInBuildPatterns
Issue Log
STR-87, martin:
See also:
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).
STR-87, martin:
If the constructors stay the same, then why would it break the compiler?
STR-87, visser:
But Stratego/XT does not support that very well. In particular, GPP requires that constructors for different productions are unique.
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.
STR-87, visser:
But maybe an experiment using the approach you suggest is worthwhile.
STR-87, visser:
(if you can do this without breaking the compiler, go ahead)
Log in to post comments