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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5df086f5b450f5c4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-09 06:48:15 PST Path: newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3af1541f$1@pull.gecm.com> <99iI6.18964$Kt2.2053818@news6-win.server.ntlworld.com> <3AF80887.F8942BE3@averstar.com> <3af8ded6$1@pull.gecm.com> Subject: Re: Ada95 BNF Message-ID: <9UbK6.7578$vg1.620956@www.newsranger.com> X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Wed, 09 May 2001 09:47:49 EDT Organization: http://www.newsranger.com Date: Wed, 09 May 2001 13:47:49 GMT Xref: newsfeed.google.com comp.lang.ada:7365 Date: 2001-05-09T13:47:49+00:00 List-Id: In article <3af8ded6$1@pull.gecm.com>, Martin Dowie says... > >Fair enough, but I still thnk it is strange that it >wasn't defined along the lines of: > >defining_program_unit_name ::= > [ parent_unit_name "." ] defining_identifier > >parent_unit_name ::= > identifier > >given that "identifier" already exists and can be >navigated to through the existing definitions in >about 2 clicks and by-passing all the 'invalid' >options anyway... > >:-) > > >Tucker Taft wrote in message >news:3AF80887.F8942BE3@averstar.com... >> Martin Dowie wrote: >> > >> > Ok... this seems a little strange to me - but if those are the rules! >:-) >> > >> > Is it really that hard to come up with a BNF that does actually match >> > what the language does allow? >> >> In many cases it is preferable to make the BNF somewhat >> "looser" than the "official" grammar, and then do the >> checking as part of semantic checking, because the errors >> tend to be handled a bit more gracefully. In addition, >> in Ada, there are constructs which look identical >> syntactically but which are distinct semantically, such >> as a type conversion and an array indexing. The grammar >> in the LRM distinguishes these, whereas the grammar used >> for an LR parser can't, since an LR parser requires that >> the grammar be context-free (i.e. independent of the >> "meaning" of particular identifiers). >> >> -- >> -Tucker Taft stt@avercom.net http://www.averstar.com/~stt/ >> Chief Technology Officer, AverCom Corporation (A Titan Company) >> Burlington, MA USA (AverCom was formerly the Commercial Division of >AverStar: >> http://www.averstar.com/services/ebusiness_applications.html) > > --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com