|
|
|
|
|
by simonask
40 days ago
|
|
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. |
|