5 ms·
Generalized LL parsers[0] (effectively, memoized parser combinators) can effectively handle backtracking for you, supporting both left and right recursive gramm
by slimsag 5y ago
Generalized LL parsers[0] (effectively, memoized parser combinators) can effectively handle backtracking for you, supporting both left and right recursive grammars without issue. I'll leave some links that were particularly useful when I was learning about them[1][2]
[0] https://github.com/hexops/zorex/tree/main/src/combn#combn-runtime-gll-parser-combinators-for-zig- https://github.com/hexops/zorex/tree/main/src/combn#combn-ru...
[1] https://epsil.github.io/gll/ https://epsil.github.io/gll/
[2] https://github.com/robey/packrattle https://github.com/robey/packrattle