Could someone please explain to me why recursive-descent parsers can't work with a grammar containing left recursion?
相关问题
- Correctly parse PDF paragraphs with Python
- R: eval(parse()) error message: cannot ope
- How do I parse a .pls file using PHP? Having troub
-
Create array from the contents of 相关文章
- How do I get from a type to the TryParse method?
- Algorithm for partially filling a polygonal mesh
- Slow ANTLR4 generated Parser in Python, but fast i
- Parsing JSON in QML [duplicate]
- How do I generate an AST from a string of C++ usin
- JSoup will not fetch all items?
- Content is not allowed in prolog
- How to manage parsing an null object for DateTime
consider:
the equivalent code is
see the infinite recursion?
For whoever is interested
can be rewritten as:
The general form of the transformation is: any one of the non left recursive disjuncts followed by any number of the left recursive disjuncts without the first element.
Reforming the action code is a bit trickery but I thing that can be plug-n-chug as well.