[cfe-dev] insert source code from parser to lexer
Rong, Hongbo
hongbo.rong at intel.com
Thu Jan 15 23:24:08 PST 2015
Hello,
In parsing a function definition, at certain places, for example, after a "{",
I would like to dynamically insert some code, for example, "static int count=0; count++;". Injecting tokens can be a choice, but I have to create the tokens manually. So I would like to insert source code, and let the lexer to lex it into the new tokens.
Any suggestion how to proceed?
Thanks,
Hongbo
More information about the cfe-dev
mailing list