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,2ca464c92c72e0e9 X-Google-Attributes: gid103376,public From: Ray Blaak Subject: Re: Ada grammar Date: 2000/05/11 Message-ID: #1/1 X-Deja-AN: 622161744 Sender: blaak@LANGLEY References: <07a73f60.478cecce@usw-ex0102-015.remarq.com> <8euivq$qso$1@nnrp1.deja.com> <004d942d.2e326cd2@usw-ex0104-026.remarq.com> <3919D285.E046DC9F@acenet.com.au> X-Complaints-To: news@bctel.net X-Trace: news.bc.tac.net 958061419 209.53.149.68 (Thu, 11 May 2000 09:10:19 PDT) Organization: The Transcend NNTP-Posting-Date: Thu, 11 May 2000 09:10:19 PDT Newsgroups: comp.lang.ada Date: 2000-05-11T00:00:00+00:00 List-Id: Geoff Bull 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.