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.9 required=5.0 tests=BAYES_00 autolearn=ham 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-08 07:54:00 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.telebeam.net!washdc3-snf1!washdc3-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!inmet!not-for-mail From: Tucker Taft Newsgroups: comp.lang.ada Subject: Re: Ada95 BNF Date: Tue, 08 May 2001 10:53:59 -0400 Organization: AverStar (formerly Intermetrics) Burlington, MA USA Message-ID: <3AF80887.F8942BE3@averstar.com> References: <3af1541f$1@pull.gecm.com> <99iI6.18964$Kt2.2053818@news6-win.server.ntlworld.com> NNTP-Posting-Host: nebula.burl.averstar.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: inmet2.burl.averstar.com 989333637 2183 141.199.8.77 (8 May 2001 14:53:57 GMT) X-Complaints-To: usenet@inmet2.burl.averstar.com NNTP-Posting-Date: 8 May 2001 14:53:57 GMT X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en Xref: newsfeed.google.com comp.lang.ada:7324 Date: 2001-05-08T14:53:57+00:00 List-Id: 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)