Mail Archives: djgpp/1999/12/15/04:26:41
On Wed, 15 Dec 1999, Michael Abbott aka frEk wrote:
> GCC is great and I've been looking through the source to figure out
> where to begin (tho' it's too hefty for me at the moment) and since some
> of the people on this list would have a good idea of the internals of
> compilers, where would I find anything on compiler design? Any simple
> compilers (it doesn't necessarily have to be C/++ at the moment) or
> papers / documents or anything? Or maybe just a pointer to a useful
> newsgroup, etc.
I would suggest to start with something simpler that an
industry-strength compiler such as GCC. A real-life compiler, and a
highly-portable one on top of that, has lots of gory details to sort
out, and that usually completely overwhelms someone who needs to learn
the basics. Also, lots of GCC is about code optimizations, which is
probably irrelevant for you at this stage.
A better way would be to find a simpler language. Things that come to
mind are Gawk and GNU bc, both available in DJGPP ports.
There was once a book called "The Unix Programming Environment" (by
Kernighan and Pike, I think) which had a chapter on developing a
calculator using Lex and Yacc. If you can still find that book, that
would be a good beginning. There are a couple of other books that
teach compiler construction using these tools as well.
- Raw text -