From: Stefan S. <sse...@ar...> - 2004-11-01 18:02:25
|
> From: Iwan Birrer [mailto:ib...@co...] > Sent: November 1, 2004 12:06 > Is it possible to transform C/C++ source code in a way that > the layout of > the original source code is preserved? Or is it possble to parse and > anylize code while the layout information is available is the AST. The layout of the original code is preserved. All changes you apply to the parse tree are local and don't affect the code outside the scope of the modified nodes. However, preprocessing is a separate stage that is delegated from 'occ' down to an external tool. I don't think comments are currently preserved when the preprocessor is invoked that way. If you need this you may want to preprocess the file yourself (using 'gcc -E -C' for example) and then invoke 'occ' on the result. But I could be wrong. Grzegorz ? Regards, Stefan |