How can I interface myself with the C preprocessor?

Michael Eager eager@eagercon.com
Thu Oct 5 12:53:00 GMT 2006


Matteo Fioroni wrote:
> Thanks for your help, I saw the gcc -E output: but it
> don't match my needs.
> I've to interface the Preprocessor to get the tokens
> (keyword, preprocessor directives, grammar, ecc..) it
> analyzes on which I've to permorm some operations.

The preprocessor doesn't break C into the tokens you
describe.  Basically, all it knows about are preprocessor
directives (starting with #), words, and other characters.
The preprocessor doesn't know anything about keywords
or the grammar.

I think you have fallen (and we with you) into the trap of
your telling us about how you want to solve some problem,
without telling us what the problem is.  So every solution
is going to get the response "thanks, but that is what
I need".

If you want help with a problem, describe the problem.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Gcc mailing list