▲ | codebje 9 days ago | |
The main advantage of recursive descent parsing is readability. Forget the machinery of the parser, which is (a) trivial enough that AI will generate correctly it for you with next to no prompting, and (b) widely available in libraries anyway. The win is writing a parser that reads like the grammar it implements, which means changes to your grammar are easy to apply to your parser. Regexes are effectively write-only. If you change the grammar parsed by a regex, you're probably going to discard the regex and make a new one. |