|
|
|
|
|
by userbinator
2678 days ago
|
|
I haven't been able to figure out any real difference. The biggest difference is that Pratt/precedence climbing does not require manipulating an extra stack, but instead uses the normal procedure stack in the same manner as recursive descent. This leads to somewhat simpler code. I've seen far more uses of recursive descent/Pratt than shunting-yard. |
|
I can't imagine any case where a user will care -- it's an internal detail. Whereas there are places where a user would notice if you used a CFG vs. a PEG.
A long time ago, people might have been concerned about the recursive calls of Pratt parsing, but it seems like a non-issue now.
I do think Pratt parsing is easier to understand, but that might be because I encountered it first.