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

...so users write specific rules in their grammars for error cases and then add custom error messages?

The actual state of the technology are tools like tree sitter, which doesn't generate an abstract syntax tree like this one does.

I've written many parsers in my life. They're almost exclusively recursive descent because a generated parser is inferior in many, many ways. A lot of parser generators miss the forest for the trees - lexers are usually trivial to write and a hand rolled recursive descent parser takes about a day (and lets you handle precedence in a sane way that can be extensible!) - usually for better performance, easier maintainability, and good error handling.

What's super hard to do is an incremental query oriented parser and compiler with a concrete syntax tree that doesn't use ungodly amounts of memory and has bad performance. Generative tools for that architecture are few and far between but much more useful than lex/yacc alternative.



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

Search: