Hacker News new | past | comments | ask | show | jobs | submit login

> More interesting [...] are examples implementing a simple tokenizer, parser, and compiler to another source language

> This point of view does tend to displease the traditional SICP crowd though :-).

I disagree. SICP does a fairly good job in explaining what's behind compilers and other languages. See chapter 5 "Computing with Register Machines" that follows immediately the chapter that contains the eval/apply loop.

Although the tokenizer and parser are sadly missing in SICP, these are also the most boring topics. Yes, you can write them by hand, but in the end you'll learn how to use regexes and parser generators. Which is important, but only a tiny fraction of what happens inside a compiler or interpreter.




> 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: