toplevel ambiguity in stratego editor
This (incorrect) stratego code:
module ambiguous_stratego
rules
r: x -> <> xresults in a syntax error at line 3 (expected) and a toplevel ambiguity (not expected):
amb(
[ Module(
“ambiguous_stratego”
, [Rules(
[RDefNoArgs(“r”, RuleNoCond(Var(“x”), Var(“x”)))]
)]
)
, Module(
“ambiguous_stratego”
, [ Rules(
[RDefNoArgs(
“r”
, RuleNoCond(Var(“x”), RootApp(CallNoArgs(SVar(“x”))))
)]
)
]
)
]
)It appears to happen regardless of the rules before the rule with syntax error (whole file is underlined in Eclipse). It reduces to a local ambiguity if there is a correctly parsed construct after the construct with syntax error.
I don’t know if it’s desired to have this (completely) fixed but I report anyway because having a complete Stratego file underlined as ambiguous, when adding a rule at the end of the file, may scare some users maybe :)
Submitted by Tobi Vollebregt on 13 December 2010 at 11:44
Issue Log
It seems that error recovery somehow is causing an ambiguity here. Or maybe there was an ambiguity that is not properly filtered because of error recovery?
I think this is caused by the same deployment snafu as Spoofax/320. Should be fixed in 0.6.0.2.
Log in to post comments