using gcc's lexer/parser (was: Re: 'recording' program execution.)

Ian Lance Taylor iant@google.com
Mon Nov 3 17:54:00 GMT 2008


"Edward Peschko" <horos11@gmail.com> writes:

> wrt the below, I was giving it some thought, and was wondering how
> usable the gcc lexer/parser combo was by itself, how 'pluggable' it
> was - my hope was that I could take the lexer/parser and instead of
> making an executable out of the incoming code, I could transform the
> code in place, ie: add extra code of my own choosing that I would then
> compile with gcc.
>
> How feasible would that be? Where's a good place to start?

It's not really feasible.  gcc's lexer and parser are not pluggable at
all.  Obviously it could be done, but it's quite a lot of work.

Ian



More information about the Gcc mailing list