Re:Implement a programming language from scratch
by vidarh on Wednesday April 01, 2015 @06:38AM
(#9302708)
> but in the end you'll learn how to use regexes and parser generators.
In my experience, most production compilers and interpreters use handwritten parsers, not regexes and parser generators. The latter is usually confined to small DSLs and toy compilers because things like error reporting and recovery is usually a nightmare with parser generators.
I don't agree the tonenizer and parser bit is "boring", but they are extremely well covered compared to subjects like code generation, though.
In my experience, most production compilers and interpreters use handwritten parsers, not regexes and parser generators. The latter is usually confined to small DSLs and toy compilers because things like error reporting and recovery is usually a nightmare with parser generators.
I don't agree the tonenizer and parser bit is "boring", but they are extremely well covered compared to subjects like code generation, though.