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
I'm not sure if this one can be fixed with the current algorithm. It doesn't support rules that are only left recursive some of them time, everything with @leftrec on it will go through the bounded left recursion step
Okay, what I think I have to do to fix this is flagging concrete invocations of rules as left recursive instead of assuming that the whole rule is left recursive all the time.
This is how the parser currently sees the second case:
@nomemo (don't memoize this rule) @leftrec (don't memoize this rule, use bounded left recursion)
start = A $ ; A = | 'a' A | A 'a' | 'a' ;
But this is is what should happen:
start = A $; A = | 'a' A | A 'a' | 'a' ;
It already gathers the information necessary to do this but I'd have to figure out how to transfer it to the generated parser as well.
EDIT: I wrongly assumed that the second case is failing when it's always right recursion that wins.
The text was updated successfully, but these errors were encountered: