4 ms·
Recursive descent is great for parsing most of an algol-like programming language. Once you get into expressions, you'll really want to do precedence climbing
by sneed_chucker 3y ago
Recursive descent is great for parsing most of an algol-like programming language.
Once you get into expressions, you'll really want to do precedence climbing or Pratt parsing to get things working correctly.
This assumes that you want PEMDAS-like operator precedence in the first place. It does seem like a waste once you've implemented it and realize how little it's actually utilized by most code. Maybe the Lisp and forth people have a point...