Reverse Polish notation expressions
Opened this issue · 1 comments
GeriatricJacob commented
How could I have reverse polish notation expressions in my language?
expr : <number> | <expr>+ <operator> ;
Results in error: Maximum recursion depth exceeded!
kumachan-mis commented
You forget ‘(‘ and ‘)’ at the beginning and the end of expr
, don’t you?
Since your regex contains left-recursion (https://en.m.wikipedia.org/wiki/Left_recursion), the parser goes into infinite-loop! :(