comp.lang.ada
 help / color / mirror / Atom feed
From: Ray Blaak <blaak@infomatch.com>
Subject: Re: Ada grammar
Date: 2000/05/11
Date: 2000-05-11T00:00:00+00:00	[thread overview]
Message-ID: <uzopxgj6j.fsf@infomatch.com> (raw)
In-Reply-To: 3919D285.E046DC9F@acenet.com.au

Geoff Bull <gbull@acenet.com.au> writes:
> I can't see why they would have to use the clients compiler.
> Couldn't they just bundle gnat with their application?

Assuming the product is a commercial one, is one even allowed to do this under
copyleft? I suppose that one can make gnat separately available on the same
website or CD.

The main problem, though, is one of ease of use/installation. For a commerical
product, one would presumably have a trial version on a website somewhere. It
is a lot easier and attractive to clients to be able to download a single
reasonably-sized installable and run it with just a few mouse clicks. Gnat is
pretty big, and its installation is not completely trivial.

Furthermore, most of the machinery of gnat would not be needed by a reverse
eningeering tool.

> IMO, building a parser from the ground up, especially with lex/yacc,
> is plain silly.

It would be silly to not make use of existing resources as opposed to writing
a parser from scratch. But it is definitely reasonable to try to have a parsing
component that fits the design of the tool that is using it, even if that
means custom development.

I am speaking from experience here. I once worked on a very related product
that needed to reverse engineer Java code. The parser was a third-party tool,
used precisely to save on the effort of developing one from scratch. It also
was the major source of bugs, not because of errors in the parser
implementation, but because its design did not fit well with the needs of the
tool that was using it. We ended up writing a Java parser from scratch anyways
so as to have complete control over how information was extracted from the
source files.

Once you have done a number of parsers for a number of languages, writing
another one is less of a daunting task than one would think.  Note too, that
there are better technologies than lex/yacc that are more powerful, allowing
for grammars that are easier to write and faster development times.

If you want a challenging task, try writing a Delphi parser sometime. The
quirks and irregularities of that language make the grammars interesting to
say the least. Ada's grammar is a joy by comparison. Of course, Ada's
overloading and renaming abilities present its own difficulties during
analysis.

-- 
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
blaak@infomatch.com                            The Rhythm has my soul.




  parent reply	other threads:[~2000-05-11  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     ` Ted Dennison
2000-05-08  0:00     ` Robert Dewar
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       ` Samuel T. Harris
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-09  0:00     ` Ray Blaak
2000-05-10  0:00       ` Ira D. Baxter
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 [this message]
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