From: Grzegorz J. <ja...@ac...> - 2004-11-02 11:25:55
|
Stefan Seefeld wrote: >>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' occ2 > 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 ? Right modulo 'occ2'. BR Grzegorz |