Re:We Need to Know LR and Recursive Descent Parsing Techniques
by bjourne on Tuesday January 17, 2023 @04:21PM
(#34419376)
> In practise, a recursive descent parser can be thought of as meaning "a hand-written written parser": unless you go out of your way to do otherwise, nearly all hand-written parsers are recursive descent parsers.
I don't think this is true. Yes, almost all hand-written parsers are recursive descent (top-down), but not all recursive descent parsers are handwritten. PEG parsers are top-down, but can be generated very similar to bottom-up parsers. See for example PyParsing. Packrat parsing seem to me to be the best of both worlds and there is not much use for bottom-up parsing anymore.
I don't think this is true. Yes, almost all hand-written parsers are recursive descent (top-down), but not all recursive descent parsers are handwritten. PEG parsers are top-down, but can be generated very similar to bottom-up parsers. See for example PyParsing. Packrat parsing seem to me to be the best of both worlds and there is not much use for bottom-up parsing anymore.