STR-127: ambiguity for negative numbers following colon in rules(..)
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
Submitted on 26 June 2004 at 19:31
Specification(
[ Imports([“lib”])
, Strategies(
[ SDef(
“main”
, []
, GenDynRules(
[ amb(
[ UndefineDynRule(DynRuleId(RDecT(“A”, [], [])), Int(2))
, SetDynRuleMatch(DynRuleId(RDecT(“A”, [], [])), Int(-2))
]
)
… etc. …
Issue Log
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.
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