Left recursion seems to be a big problem for many parser generators that are built upon the foundations of recursive descent parsing. I'm looking for a PEG-based parser generator that supports it - in whatever language.
0
votes
PEGs don't support left recursion, as wikipedia says - "PEGs cannot express left-recursive rules where a rule refers to itself without moving forward in the string." There may be some that try to remove the left recursion, though.
- user395760
Well I'm open to PEGs that transform or remove the left recursion without user intervention.
- Frankie Ribery
possible duplicate of Any PEG parser capable to handle left recursion?
- bummi
2 Answers
2
votes
There is a paper on the topic available here: http://tratt.net/laurie/research/publications/papers/tratt__direct_left_recursive_parsing_expression_grammars.pdf
The author describes multiple approaches for handling left-recursive rules in PEG/Packrat parsing.