Michael Eager wrote:
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.
The preprocessor had better know about preprocessing
tokens, and it does. It doesn't know about keywords
though (unless you consider conversion from preprocessing
tokens to tokens to be the final stage of proprocessing).
It's true that it doesn't know about most of 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".
Possibly. It's also very likely that the question is not
topical here, as it doesn't appear to be about development
of GCC.
-- James