Open
Description
There is no easy way to detect infinite left recursion when it crosses a call boundary. Currently calls are always rolled up into the caller when descending the left side. Instead the subgrammar could be checked for dangerous recursion (pure left side, any right recursion in path breaks the loop and makes it safe) in advance and only rolled up when it's unsafe.