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 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.180.102.69 with SMTP id fm5mr732655wib.0.1360922602983; Fri, 15 Feb 2013 02:03:22 -0800 (PST) Path: g1ni12261wig.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.meeh.mikalv.net!aioe.org!rt.uk.eu.org!newsfeed.straub-nv.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 08 Feb 2013 22:09:58 +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: Re: chopping Ada source that have preprocessor symbols in them References: <5111a9d5$0$6567$9b4e6d93@newsspool3.arcor-online.net> <87r4kq7dqv.fsf@mid.deneb.enyo.de> In-Reply-To: <87r4kq7dqv.fsf@mid.deneb.enyo.de> X-Enigmail-Version: 1.5 Message-ID: <511569a4$0$6577$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 08 Feb 2013 22:09:56 CET NNTP-Posting-Host: 30879333.newsspool3.arcor-online.net X-Trace: DXC=c\Z_PiE8C50gP]QSEBQ^d4McF=Q^Z^V384Fo<]lROoR18kF_ljHi:Lh>_cHTX3j=:0f>GmGil31 X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2013-02-08T22:09:56+01:00 List-Id: On 08.02.13 21:27, Florian Weimer wrote: > * Georg Bauhaus: > >> 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. > > Given that the choice of preprocessor symbols can change how the file > is split up, I think what you want is not solvable in general. True, but GNAT's preprocessor symbols should keep things reasonably sane? Unless the programmer chooses to define substitutes for words like "package", say, in which case the preprocesor will have to know the substitute. Not for actually replacing, but for deciding where gnatchop should should chop. For reference, Definition -> Symbol ":=" Value Symbol -> identifier_ASCII Value -> ε Value -> string_literal Value -> 1*{ letter, digit, '.', '_' }