Anton Gavrilov wrote:
> Hi all,
>
> I seek your advice on where to start if I want to write a compiler for a
> toy C-like language I invented (or, rather, am in the process of
> inventing). Yes, yes, I know I'm crazy and the very idea is
> brain-damaged and all that. Chances are I will lose interest long before
> I reach break-even, but it doesn't hurt trying, does it?
[snip]
>
> Any help is appreciated.
>
> BR,
> Anton 'Tonik' Gavrilov
In my Compiler Design class, we first tackled a simple expression
parser, then a language lexer. After the lexer worked, we moved
on to emitting executable code for the compiler. The language
was the instructor's "D-" which a very simple subset of the C
language.
The course was one year long and dreaded by all of the Computer
Science students. Kind of our Final Project.
I don't wish the task on any single person.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq:
http://www.parashift.com/c++-faq-lite
C Faq:
http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book