A minus directly after colon of a DynRuleDef is ambiguous:
———————-
module dr-undefine-amb
imports lib
strategies
main = rules(A :-2)
———————-

[adam@freshwater misc]$ parse-stratego -i dr-undefine-amb.str | pp-aterm
Specification(
[ Imports([“lib”])
, Strategies(
[ SDef(
“main”
, []
, GenDynRules(
[ amb(
[ UndefineDynRule(DynRuleId(RDecT(“A”, [], [])), Int(2))
, SetDynRuleMatch(DynRuleId(RDecT(“A”, [], [])), Int(-2))
]
)
… etc. …

Submitted on 26 June 2004 at 19:31

On 5 October 2004 at 12:46 Jira commented:

STR-127, martin:
I don’t think this should be solved: having ambiguities is not necessarily a bad thing. It can easily be resolved by adding a space between the - and number or between the : and -number.


On 5 October 2004 at 12:48 Jira commented:

STR-127, martin:
Maybe we can improve the error reporting. For example, amb nodes should be reported earlier (as errors) in the compiler.

Log in to post comments