3 ms·
Same experience here; recursive descent parser advantages: - It's just normal code; you don't have to go learn a whole 'nother thing - Easy and fun to write (
by dilap 5y ago
Same experience here; recursive descent parser advantages:
- It's just normal code; you don't have to go learn a whole 'nother thing
- Easy and fun to write (ymmv)
- Does not add extra dependencies to your build system (the time I've wasted getting the right version of yacc installed just to handle software that parses some trivial grammar...)
- You can easily deliver really good error messages to your users (they love this!)
Disadvantages:
If you're not careful, you can accidentally end up w/ some sort of weird frankenstein grammar