53 ms·
Interesting paper on left-recursion in recursive descent parsers like PEGs and Packrats http://web.cs.ucla.edu/~todd/research/pub.php?id=pepm08 http://web.cs.u
by nly 11y ago
Interesting paper on left-recursion in recursive descent parsers like PEGs and Packrats
http://web.cs.ucla.edu/~todd/research/pub.php?id=pepm08 http://web.cs.ucla.edu/~todd/research/pub.php?id=pepm08
- sklogic 11y agoYes, I implemented exactly this approach. But for the binary expressions I am using Pratt, it is faster and easier to construct left-associative nodes.
- ltratt 11y agoIf you're interested in left-recursion in PEGS then, at the risk of gross immodesty, you may be interested in http://tratt.net/laurie/research/pubs/html/tratt__direct_left_recursive_parsing_expression_grammars/ http://tratt.net/laurie/research/pubs/html/tratt__direct_lef... With less risk of immodesty you may also find http://arxiv.org/pdf/1207.0443.pdf?ref=driverlayer.com/web http://arxiv.org/pdf/1207.0443.pdf?ref=driverlayer.com/web interesting. There's probably more recent work than these two papers, but I'm a little out of date when it comes to the PEG world.
- nly 11y agoThanks, looks like you've put a lot of work in to it and I'll enjoy reading it.