Fluffy intro to C frontend

Neil Booth neil@daikokuya.demon.co.uk
Thu Apr 19 12:01:00 GMT 2001


Andrew Birkett wrote:-

> I thought I'd let people know that I'm working on an 'introduction to the
> gcc C front end' document.  It's based on on the 2.95 sources, and is
> intended to make it easier for people to find their way around the gcc
> sources.   I'm currently redrafting it.  I've put a number of sections up
> on the web which cover tools, the lexer implementation and the tree
> datatype.
> 
> http://www.tardis.ed.ac.uk/~adb/compilers/gcc_for_humans.html
> 
> I'll be adding the other sections as I redraft them.  My next task is to
> turn my copious amount of notes on the parser into organized chapters.  
> Since I'm basically documenting my process of learning the gcc sources,
> there's probably plenty of mistakes.  I'd appreciate any feedback or
> suggestions.

It looks nice.  However, I would suggest you document 3.0 instead -
your docs would need to be updated anyway.  2.95.x is 2 years old, and
the code has changed a bit - anyone wanting to contribute to GCC will
start with 3.x not 2.95.x.

In particular, most of your lexer stuff is obsolete.  In fact, the GCC
compiler proper no longer has a lexer; it's all done in the
preprocessor, avoiding unnecessary duplication.  You may want to
integrate into your document the 70% job I've done documenting cpp
internals in cppinternals.texi - if so, please feel free to grab
whatever you need.

Neil.



More information about the Gcc mailing list