lark-parser / lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
MIT License
4.77k stars 404 forks source link

Docs: Added section about strict-mode to how-to-use #1265

Closed erezsh closed 1 year ago

erezsh commented 1 year ago

Cool, well done on taking the initiative and testing them.

I think it will come down to either optimizing the algorithm, or setting a maximum number of steps, after which it exits without an example.

MegaIng commented 1 year ago

I will actually do both I think. Stopping after a certain number of steps is easy and reliable no matter how the exact regex(es) look like. Optimizations can only provide so much I think, it will always be possible to create a very slow example I think.