comp.lang.ada
 help / color / mirror / Atom feed
From: "Ira D. Baxter" <idbaxter@semdesigns.com>
Subject: Re: Ada grammar
Date: 2000/05/10
Date: 2000-05-10T00:00:00+00:00	[thread overview]
Message-ID: <shirsofhd5849@corp.supernews.com> (raw)
In-Reply-To: m366sn2h95.fsf@ns55.infomatch.bc.ca


Ray Blaak <blaak@infomatch.com> wrote in message
news:m366sn2h95.fsf@ns55.infomatch.bc.ca...
> bradders <bradNObrSPAM@england.com.invalid> writes:
> >  I need to be able to Parse Ada code ...
>
> Everyone is telling you to use ASIS, but I think you should go for it and
parse
> the sources directly.

> Certainly if one is reverse engineering Ada code, there is bound to be an
Ada
> compiler nearby, but that is not reason enough to require it.

> The main reasons you want your own parser are:
>
> - You can do tricks that a normal parser cannot do, like play games with
>   whitespace, reconstructing comments, etc. (How good is ASIS at getting
>   perfect reconstruction of the source)?
>
>   Consider, for example, that your tool might require all sources of a
project
>   to be loaded simultaneously (i.e. if one is doing "interactive"
>   forward/reverse engineering from UML to code and vice versa). With your
own
>   parser and parse trees you can optimize things to reduce space cost
>   (e.g. loading on the fly, indirect token references to the source file
>   instead of actually having contents in memory, etc.).

The DMS Reengineering Toolkit has an Ada95 parser automatically builds
compact ASTs that captures whitespace and comments
"perfectly", and has built in prettyprinters for arbitrary reformatting and
"fidelity printing", reproducing the original layout, or a mixture of the
two.
It can apply source-to-source transforms directly to the tree.

The ASTs are cache-line aligned, typically occupy one cache-line per node,
eliminate non-value bearing tokens and useless unit-reductions eliminated,
list nodes for sequences, etc.)
While we have not done this for Ada, we have read 3500 Java files (some 1.1
million lines)
into a 1Gb address space under Windows/NT for analysis, and similar scale
sources in COBOL, and don't see any reason why DMS can't do the same for
large Ada suites.

See http://www.semdesigns.com/Products/DMS/DMSToolkit.html.


--
Ira Baxter, Ph.D., CTO  idbaxter@semdesigns.com 512-250-1018x140
Semantic Designs, Inc., www.semdesigns.com FAX 512-250-1191
12636 Research Blvd #C214, Austin, Texas 78759









  reply	other threads:[~2000-05-10  0:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-05  0:00 Ada grammar bradders
2000-05-05  0:00 ` Ira D. Baxter
2000-05-05  0:00 ` Robert Dewar
2000-05-08  0:00   ` bradders
2000-05-08  0:00     ` David C. Hoos, Sr.
2000-05-08  0:00       ` Ted Dennison
2000-05-08  0:00         ` Tucker Taft
2000-05-08  0:00     ` Robert Dewar
2000-05-08  0:00       ` Samuel T. Harris
2000-05-08  0:00       ` Ted Dennison
2000-05-08  0:00         ` Robert Dewar
2000-05-08  0:00           ` Ted Dennison
2000-05-09  0:00         ` Pascal Obry
2000-05-09  0:00           ` Samuel T. Harris
2000-05-08  0:00       ` baysinger
2000-05-08  0:00     ` Ted Dennison
2000-05-09  0:00     ` Ray Blaak
2000-05-10  0:00       ` Ira D. Baxter [this message]
2000-05-11  0:00       ` Geoff Bull
2000-05-10  0:00         ` Ken Garlington
2000-05-11  0:00           ` dale
2000-05-11  0:00             ` Ken Garlington
2000-05-13  0:00           ` Robert Dewar
2000-05-11  0:00         ` Ray Blaak
2000-05-11  0:00           ` Ted Dennison
2000-05-13  0:00             ` Robert Dewar
2000-05-12  0:00           ` Geoff Bull
2000-05-12  0:00             ` Robert A Duff
2000-05-13  0:00               ` Robert Dewar
2000-05-30  0:00                 ` bradders
2000-05-30  0:00                   ` Robert A Duff
2000-05-12  0:00             ` Ray Blaak
2000-05-12  0:00               ` Samuel T. Harris
2000-05-05  0:00 ` tmoran
2000-05-05  0:00 ` Gautier
2000-05-08  0:00 ` Tucker Taft
  -- strict thread matches above, loose matches on Subject: below --
1999-01-07  0:00 ADA grammar JamesO
1999-01-08  0:00 ` Tucker Taft
1999-01-08  0:00   ` Tucker Taft
1999-01-08  0:00     ` JamesO
1999-01-11  0:00     ` Tom Moran
1991-06-10 14:30 Orsi Jean-Christophe
1990-12-14 20:08 Ada grammar sivesh pradhaan
1990-09-06 21:03 ada grammar gene
1990-07-05 16:26 Ada Grammar Rindert Schutten
1988-02-04 19:57 ADA grammar Joe Gallagher
replies disabled

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