Eliminating Left Recursion without the Epsilon
James Smith

TL;DR
This paper presents a revised algorithm for eliminating left recursion in grammars that avoids exponential blow-up and preserves parse tree detail, making it practical for real-world use.
Contribution
The authors introduce a graph-theoretic approach to eliminate indirect left recursion and extend the algorithm to recover original parse trees, improving upon standard methods.
Findings
The revised algorithm effectively eliminates left recursion without exponential complexity.
It preserves parse tree detail that standard algorithms often lose.
The method is practical and applicable to real-world grammar processing.
Abstract
The standard algorithm to eliminate indirect left recursion takes a preventative approach, rewriting a grammar's rules so that indirect left recursion is no longer possible, rather than eliminating it only as and when it occurs. This approach results in many of the rules being lost, so that the parse trees that result are often devoid of the detail that the BNF was supposed to capture in the first place. Furthermore, the standard algorithm results in exponential blow-up as the BNF is rewritten, making it wholly unworkable in practice. To avoid these pitfalls, we revise the standard algorithm to eliminate direct left recursion and then take a graph-theoretic approach to eliminating indirect left recursion. We also extend the algorithm to rewrite the resultant parse trees in order to recover the parse trees that would have resulted if left recursion had not had to be eliminated in the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Logic, programming, and type systems · semigroups and automata theory
