>>5Here's a C subset interpreter in less than 500 SLoC:
https://github.com/rswier/c4/blob/master/c4.cContains lexer, parser, code generator, and stack-based VM interpreter.
But the most important part is the optimiser/instruction generator. All these toy interpreters/compilers generate horrible code because they didn't think of code generation too much.