Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The main reason for using a parser genarator tool is being able to use the canonical BNF version of the grammar, as you said. Another good thing is that LR parser generations can also help detect ambiguities in the grammar -- those appear as shift-reduce or reduce-reduce conflicts.

But there can also be good reasons to use a hand-rolled recursive descent parser. It simplifies the build system, and it can also be easier to produce good error messages.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: