0

This seems to be a pretty fundamental flaw of greedy parsers that you cannot parse left associative operators because infinite recursion will always occur. Is there a way to prevent this from happening or is this just reality?

Joran
  • 154
  • 1
  • 10
  • You parse the same language with a different grammar and then fix the parse tree. In practice, you can use techniques [like the one described here](https://stackoverflow.com/a/71771279/1566221). Of course, you can always use a different parsing algorithm. – rici May 01 '22 at 13:42
  • Ah too bad my parser does not include that feature. Thanks for answering. – Joran May 01 '22 at 17:46

0 Answers0