antlr-kotlin
antlr-kotlin copied to clipboard
Fix: Operator precedence is not respected
This PR contains a failing test showing that operator precedence is not respected.
~~No idea how to fix it, though :/~~ Fixed!
Actually, I'm having trouble parsing expressions like a - b + c
.
- It should be interpreted as
(a - b) + c
, - Instead it's interpreted as
a - (b + c)
.
It makes a big difference!
@yaccoff @ftomassetti I you can point me in the right direction of where the bug could be, I'd happily try to contribute a fix.
@ftomassetti I was able to apply the patch from @atsushieno and fix the failing unit test! Please take a look!
@ftomassetti, will you take a look?
Included in #107 , so closing