You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parser currently accepts some inputs it shouldn't:
scala> org.dhallj.parser.DhallParser.parse("foo { x = 0 } with x = 1")
valres0: org.dhallj.core.Expr.Parsed= (foo {x =0}) with x =1
scala> org.dhallj.parser.DhallParser.parse("{ x = 0 } with x = 1 : T")
valres1: org.dhallj.core.Expr.Parsed= ({x =0} with x =1) :T
Both of these should be parsing failures, but our handling of the precedence of with is currently somewhat awkward, and while I don't think it would be excessively hard to fix these cases, it's not trivial, and it would be much easier if we move to this approach, so I haven't done it yet.
Note that we're currently ignoring the WithPrecedence2 and WithPrecedence3 tests, which catch this bug.
In any case this bug should not affect most users, and it's unlikely to cause problems. As you can see in the printed code above, even when the parser does accept code it shouldn't, the parses it comes up with aren't unreasonable.
The text was updated successfully, but these errors were encountered:
The parser currently accepts some inputs it shouldn't:
Both of these should be parsing failures, but our handling of the precedence of
with
is currently somewhat awkward, and while I don't think it would be excessively hard to fix these cases, it's not trivial, and it would be much easier if we move to this approach, so I haven't done it yet.Note that we're currently ignoring the
WithPrecedence2
andWithPrecedence3
tests, which catch this bug.In any case this bug should not affect most users, and it's unlikely to cause problems. As you can see in the printed code above, even when the parser does accept code it shouldn't, the parses it comes up with aren't unreasonable.
The text was updated successfully, but these errors were encountered: