comp.lang.ada
 help / color / mirror / Atom feed
From: kst@thomsoft.com (Keith Thompson)
Subject: Re: Ada Code Formatting
Date: 1996/08/13
Date: 1996-08-13T00:00:00+00:00	[thread overview]
Message-ID: <Dw1y15.L2u@thomsoft.com> (raw)
In-Reply-To: dewar.839723478@schonberg


In <dewar.839723478@schonberg> 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




  reply	other threads:[~1996-08-13  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-09  0:00 Ada Code Formatting campbell james b0159
1996-08-10  0:00 ` James D. Veale
1996-08-10  0:00 ` John McCabe
1996-08-10  0:00   ` David Weller
1996-08-14  0:00   ` Laurent Gasser
1996-08-10  0:00 ` Robert Dewar
1996-08-10  0:00 ` Fergus Henderson
1996-08-10  0:00   ` Robert Dewar
1996-08-13  0:00     ` Keith Thompson [this message]
1996-08-13  0:00       ` James D. Veale
1996-08-12  0:00 ` Ted Dennison
1996-08-14  0:00 ` Paul Hussein
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox