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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9f7c0fce90769654 X-Google-Attributes: gid103376,public From: kst@thomsoft.com (Keith Thompson) Subject: Re: Ada Code Formatting Date: 1996/08/13 Message-ID: #1/1 X-Deja-AN: 173840900 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: pulsar references: <4ug0pq$q64@zeus.orl.mmc.com> <4ui14m$m0l@mulga.cs.mu.OZ.AU> organization: Thomson Software Products, San Diego, CA, USA newsgroups: comp.lang.ada originator: kst@pulsar Date: 1996-08-13T00:00:00+00:00 List-Id: In dewar@cs.nyu.edu (Robert Dewar) writes: [...] > A useful utility would be an Ada specific diff, with an option to ignore > white space, ignore line changes, ignore reformatting of comments, or > igore comments completely. > > (it could even consider ABC and abc to be the same optionally, or > 10 and 2#1010#) > > So there's a nice little project for someone in an enthusiastic mood! A simpler, and nearly as useful, utility would translate its Ada input into individual tokens and print them one per line. So, for example, this input: with Text_IO; procedure Hello is -- a comment begin Text_IO.Put_Line("Hello"); end Hello; would yield this output: with text_io ; procedure hello is begin text_io . put_line ( "Hello" ) ; end hello ; You could then run two versions of an Ada source through this relatively simple filter and compare the outputs. If they compare equal, there is no semantically significant difference between the original sources. If they don't, finding where in the original sources the differences occur is left as an exercise. -- Keith Thompson (The_Other_Keith) kst@thomsoft.com <*> TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718 "As the most participatory form of mass speech yet developed, the Internet deserves the highest protection from government intrusion." -- ACLU v. Reno