0
votes

One of the shortcomings/implementation challenges of recursive-descent parsers is dealing with left recursion, e.g.

<expr> :=    <expr> '+' <num> 
          |  <num>

The parser needs to parse an expr before it can parse an expr...

Now, Boost::Spirit::X3 generates recursive descent parsers. Does that mean it doesn't support left-recursion, or does it have workarounds for it?

Note: Left recursion can (often? always?) be eliminated from the grammar beforehand (like in the solution to this question), but that's not what I'm asking.

1

1 Answers

0
votes

Spirit doesn't rewrite your grammar at all, it runs exactly what you've wrote.