4 ms·
Writing Your Own Toy Compiler Using Flex, Bison and LLVM (2009)
- mtdewcmu 12y agoThat's interesting and looks like fun. I'm not sure you can call that writing a compiler, though. It looks like just a front-end to LLVM. But it would give you a taste.
- peterashford 12y agoIt reads source, parses it, creates output. What part of compilation did he leave out?
- mtdewcmu 12y agoThe part that LLVM is doing: code generation, optimization, etc. I don't think writing a whole compiler is a reasonable goal at anywhere near that level of effort. But I just pointed out that it's an exaggeration. Gcc's architecture is split into front, middle, and back end. This corresponds closely to what Gcc calls the front end, afaik.