From: Iwan B. <ib...@co...> - 2004-11-13 13:08:28
|
I do not only want the comments to be preserved, but also: macros, =20 file/directory structure, includes etc. Actally everything, so the =20 transformed code would be equal to the base code if only a dummy =20 transformation is being made. Regards, Iwan On Tue, 02 Nov 2004 19:20:19 +0800, Grzegorz Jakacki <ja...@ac...> =20 wrote: > > > 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 layou= t =20 >>> 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 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=3D5588&alloc_id=3D12065&op=3Dclick > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users On Tue, 02 Nov 2004 19:20:19 +0800, Grzegorz Jakacki <ja...@ac...> =20 wrote: > > > 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 layou= t =20 >>> 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 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=3D5588&alloc_id=3D12065&op=3Dclick > _______________________________________________ > Opencxx-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opencxx-users |