Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Compilers

Name: Anonymous 2016-10-04 22:08

Is the most important part of a compiler the lexer, or the parser?

Name: Cudder !cXCudderUE 2016-10-06 11:25

>>5
Here's a C subset interpreter in less than 500 SLoC:
https://github.com/rswier/c4/blob/master/c4.c

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

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List