3 ms·
There is some truth to this. I also think that when people say "compiler" they commonly have an expectation that is closer to something like GCC. What he's
by Nelson69 18y ago
There is some truth to this. I also think that when people say "compiler" they commonly have an expectation that is closer to something like GCC. What he's describing is akin to a code to assembly translator; in college in the first week or two of the compilers class we wrote simple C to assembly code translators in yacc. It's really not much more to it than that. You simply lex it, you parse it and if your language is simple enough you can pretty much just emit instructions. Traditionally, those were some of the hardest and most time consuming parts of compiler development.
When you start to add all the translations to perform advanced optimization and those optimizations, you're talking about some very very cool stuff and it is kind of hard and I think of lot of people think of that when they think "compiler." Those simple code translators really ignore that which is the part most compiler users are really thankful for.
How did Bruce Lee say it? "It is like a finger pointing away to the moon. Do not concentrate on the finger or you will miss all that heavenly glory."