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

To add, another reason to hand-write your parser is that it gives you much, much better opportunities for adding helpful diagnostics.

Grammar rules are not meaningful to your users - they don’t have the same mental model as whatever parser generator you’re using. If you want to be helpful to them, you probably want some pattern matching in the error path as well.

Best in class here is probably rustc, which has incredible UX compared to most compilers.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: