Write a compiler.

Hi guys!
I'm currently writing a toy language. And I was wondering if it's possible to write a compiler to the language, you know just for fun. If so, how would it work?


//ozzle
Last edited on
Hm.. Right know I've built a compiler that translates my toy language into C and then uses a C-compiler. Does that count as a real compiler?
I'm fairly sure that counts as a real (if dependent) compiler... Sure!
That's what CFront (the first C++ compiler) did. It used C as a portable assembler so it could support multiple environments.
There are many definitions for 'compiler', one of this says that it converts a program from a higher level language to a lower level language. So a tool which converts from language foobar to C can be said to be a compiler
Topic archived. No new replies allowed.