3 ms·
It's a AST walking interpreter, completely built from scratch, including the lexer, the parser, the AST and, of course, the walking/evaluation step.
by misternugget 10y ago
It's a AST walking interpreter, completely built from scratch, including the lexer, the parser, the AST and, of course, the walking/evaluation step.
- AYBABTME 10y agoCool, asking because the level _past_ the AST walking is where I'm at personally in my learnings. I feel most treatments stop at the AST interpreter step, which is what most people see in school already. I wish there was equally good treatment for everything that comes after that. Type systems, bytecode generation, JIT, optimization phases, etc.
- abecedarius 10y agoLisp in Small Pieces is pretty good for that.
- AYBABTME 10y agoCool I'll check it out!
- msangi 10y agoPart of this should be covered by the upcoming chapters of http://www.craftinginterpreters.com/ http://www.craftinginterpreters.com/
- curun1r 10y agoI'm not sure if this is what you're after, since it's not really in book form, but I've learned a lot about advanced language implementation from reading the Rust RFCs [1], especially those relating to MIR. Between the discussion on each PR and the resulting implementation in the actual compiler, it makes some very complicated subjects more relatable than they normally would be. I'm really grateful that so much of Rust's development happens in such an open fashion. [1] https://github.com/rust-lang/rfcs https://github.com/rust-lang/rfcs