From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6458d1ee91b224ec,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.89.133 with SMTP id bo5mr1744190wib.6.1360469027672; Sat, 09 Feb 2013 20:03:47 -0800 (PST) Path: g1ni1983wig.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.139.MISMATCH!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newspeer1.nac.net!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin2!goblin.stu.neva.ru!feeder.erje.net!eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 06 Feb 2013 01:54:46 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: chopping Ada source that have preprocessor symbols in them Message-ID: <5111a9d5$0$6567$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 06 Feb 2013 01:54:45 CET NNTP-Posting-Host: 19691f2f.newsspool3.arcor-online.net X-Trace: DXC=@YRLT:;cG3O@Y=h<_c3PkHMcF=Q^Z^V3H4Fo<]lROoRA8kFejVH79PgeImENNF3gO;NMa_9[J X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: 2013-02-06T01:54:45+01:00 List-Id: I need to integrate an Ada source program that consists of a few compilation units. When I want one unit per file, then, usually, I can call gnatchop and be done. However, the program is using preprocessor symbols that I wish to keep. gnatchop can parse source files using different characters sets, but apparently it cannot parse files that use preprocessor symbols, including GNAT ones. My "solutions" are not solutions, I feel. Either - I call gnatprep with the original program as input and use the output as input to gnatchop. I loose the preprocessor symbols in all resulting compilation units, or - I do manual labor. Neither is working well, really. Are there other options?