>> I'll come up with a patch to implement this scheme when I have >> time to and send it, it might take a while. > > Can you keep the change to the core sparse library (e.g. adding > hook in parser and pre-processor) as a separate patch? You can > send that part out for review earlier if other part of your dependency > analyse is not ready yet. I appended a diff for review. Is this kind of interface ok? This is kind of not a patch to apply, rather I want to avoid to put effort in it and you telling me later I am too intrusive...:). So can you give a ok or comment... Interface so far: struct preprocess_hook { def : called when #define is processed args_beg : called before argument expasnion args_end : called after argument expasnion body_beg : called before body expansion body_end : called after body expansion post : called after preprocess }; All of there I found are needed. There might be more to be added... I also introduce a tokentype TOKEN_M_EMPTY so that I can track empty expansion. To filter these out again I add the post hook. -- Konrad > > Chris >