Erez Shinan
Erez Shinan
I found a minimal breaking example: ```python from lark import Lark p = Lark(""" ?start: "foo" x "bar" x: $ x """, parser="lalr") p.parse("foo") ``` The infinite loop happens because...
So, it seems that this can be "solved" by testing that the parser only shifts once on END, and otherwise throwing a run time error for infinite loop. But I...
@seimit There are issues with this PR, so currently no. The problem is that in some edge cases, the parser gets stuck in a loop forever. Which is something I...
It's a good point that we can detect it during grammar analysis. And then we can just throw an error if anything follows the $END symbol. I don't think there's...
If we do it at the grammar analysis level, we can make sure `FOLLOWS[$]` is empty. That should take care of all edge cases (I think)
Hmm actually, no, that's the crux of the problem, which I guess is why I left it open. On one hand, the grammar has to allow the option of something...
`Lark.save` exists in order to save the parse table the LALR generates, because it's expensive to compute. Earley doesn't perform any significant precomputation. It's entire parsing process is completely dynamic....
@MegaIng > I also can't edit the docs. That's just not true. You can submit a PR, just like you often do with code.
Probably the right thing to do here is not to change the docs, but to override XEarley.serialize to produce a nicer exception telling the user they are doing something wrong.
Hi @zxteloiv, 1. Pickle supports recursion, so I don't think that's the case. It's more likely that the grammar is just huge. You can manually set the recursion limit, and...