djspiewak / parseback

A Scala implementation of parsing with derivatives
http://parseback.io
Apache License 2.0
197 stars 22 forks source link

Arithmetic parser example is bizarrely ambiguous #19

Closed djspiewak closed 7 years ago

djspiewak commented 7 years ago

For some reason, ArithmeticParser's tests of precedence seem to be ambiguous. That seems… weird. And very broken, since the grammar itself is unambiguous (I think). Relevant lines: https://github.com/djspiewak/parseback/blob/master/core/src/test/scala/parseback/ArithmeticSpec.scala#L49-L52