Associativity ignored on indirect SDF sort
This syntax, where the
Addconstructor is indirectly (throughBinOp) defined onExp:Exp.Var = <<ID>> Exp = BinOp BinOp.Add = <<Exp> + <Exp>> {left}parses the following example:
x + y + zambiguously:
amb([ Add(Add(Var("x"), Var("y")), Var("z")), Add(Var("x"), Add(Var("y"), Var("z"))) ])because the associativity is ignored.
However, defining the
Addconstructor directly onExp:Exp.Var = <<ID>> Exp.Add = <<Exp> + <Exp>> {left}works as expected.
Submitted by D. Pelsmaeker on 14 August 2014 at 14:31