by nu11ptr · 3y ago · 0 comments
Not that there is anything wrong with Rust if you are ready to pay the price of having so much low level things to deal with.
Rust has a pretty darn good ecosystem too btw. chumsky for parsing, rowan for syntax trees, salsa for incremental computation, miette for errors, inkwell/walrus for code generation.
> I tend to prefer hand written parsers, either via a combinator library or fully manually.
That’s common with people used to languages which provide poor parser generators.
I don’t know of many production compilers that use parser generators
Simple to write, debug, recover from errors, provide decent error messages, unit test, integrate into build systems, IDEs etc.
I also believe that nearly all the popular compilers these days do something similar - gcc was rewritten a few years ago in this fashion because of the technical benefits I’ve listed above.
The vast majority of real languages have hand-rolled parsers and there is no real reason they shouldn't.
lmao