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,d5e5c645a7ec696f X-Google-Attributes: gid103376,public From: mazzanti@iei.pi.cnr.it (Franco Mazzanti) Subject: Re: Ada Code Formatting (Ada source diff) Date: 1996/09/06 Message-ID: #1/1 X-Deja-AN: 178842324 organization: IEI-CNR newsgroups: comp.lang.ada Date: 1996-09-06T00:00:00+00:00 List-Id: Robert wrote: > The given script is neither reliable (two different programs > can give the same -do output -- for example 16#1# will look the same as 9#1#)) This, actually, could be seen as a feature, when it documented inside the script, rather then a bug. Is there any other really meaningful difference which is lost, (apart from not distinguing the literals 01, 001, 0001, 2#1#, 4#1#, and similars)? > > nor is the differences that you get very useful if there is no match > (line numbers are wrong ...) True, they are related to the gnatf -s -do output. In case of mismatch, however, we might avoid to delete the gnatf output and give the user the names of the two gnatf-dumped output so that it were possible to look inside them for getting a more complete understanding of line numbers. > > The output of course is not useful in doing a patch either. > I have the impression that the possibility of performing a patch would not be very meaningful in this case. The real purpose of the script is just to allow an easy verification that a simple maintenance operation (or pretty-printing) did not inadvertedly modify the code. This is not thought as an utility which compares different versions of a program. Probably the name should be changed, since "diff" implicitly carries that other stronger meaning (maybe we could call it "src-equiv", "src-compare", ....). > So while this script has some value as an approximate check, it does > not obviate the utility of a more intelligent Ada diff program! Sure, this was not considered a perfect solution, just a very simple one. A more intellingent tool might, for example, do not consider as a difference the removal of unnecessary code, and many other intelligent things. The main problem of this approach is that the "-do" switch is not an official gnatf feature, but just an internal debugging option. This means that there is no guarantee that the switch will exist in future versions of gnatf, or its effect could be completely different. This also should be noted in the script (which doesn not even specify with which version of gnat it supposes to find). Franco