|C preprocessor that include column information email@example.com (Ben War) (2002-02-06)|
|Re: C preprocessor that include column information firstname.lastname@example.org (Zack Weinberg) (2002-02-16)|
|Re: C preprocessor that include column information email@example.com (Erik Schnetter) (2002-02-16)|
|Re: C preprocessor that include column information firstname.lastname@example.org (Ira D. Baxter) (2002-02-16)|
|From:||Zack Weinberg <email@example.com>|
|Date:||16 Feb 2002 01:10:22 -0500|
|Organization:||PANIX -- Public Access Networks Corp.|
|Posted-Date:||16 Feb 2002 01:10:22 EST|
Ben War <firstname.lastname@example.org> writes:
>In A Research Project We Are Using Already Preprocessed C Code, Where We
>Have To Map Source Code Positions Back Onto The Original Sources. ...
> Now in gcc-3, the preprocessor doesn't
>preserve whitespace any longer and we have to use a different
>preprocessor. This raised the question, if there is a c preprocessor
>that not only annotates the preprocessed code with line number
>information but also includes column information?
Um, actually, the gcc-3 preprocessor does that. It's not accessible
from the textual output, but if you use the library interface (which
is pretty easy) every token comes with a column position.
We haven't finished documenting the interface yet, and the library
isn't really set up to be used outside GCC, but you can look at
cppinternals.texi from the GCC source tree, or c-lex.c, fix-header.c,
and cpplib.h. I'm also happy to answer questions - please use
my other address, <email@example.com>.
Return to the
Search the comp.compilers archives again.