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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:878c:: with SMTP id f134mr36290989ite.14.1546555151293; Thu, 03 Jan 2019 14:39:11 -0800 (PST) X-Received: by 2002:a9d:da3:: with SMTP id 32mr1027872ots.3.1546555151150; Thu, 03 Jan 2019 14:39:11 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!q69no16591itb.0!news-out.google.com!v71ni113ita.0!nntp.google.com!k10no16545itk.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 3 Jan 2019 14:39:10 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:e7:ff1c:445:d63d:7eff:fe98:7b00; posting-account=Md_OIgoAAAAkZyQ6nYoc3WBIThMpPfV7 NNTP-Posting-Host: 2003:e7:ff1c:445:d63d:7eff:fe98:7b00 References: <30ba8954-a19e-4c95-b350-798b0276db41@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <78b94e7e-521b-46c4-8975-1f4c6afbb4b5@googlegroups.com> Subject: Re: Ada grammar rules for names too permissive? From: olivermkellogg@gmail.com Injection-Date: Thu, 03 Jan 2019 22:39:11 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:55182 Date: 2019-01-03T14:39:10-08:00 List-Id: On Tuesday, January 1, 2019 at 9:44:17 AM UTC+1, Dmitry A. Kazakov wrote: > [...] > Never push semantic rules into syntax. I'm not so sure about that: A nice feature of ANTLR is that is supports semantic predicates which can be embedded in the grammar. For example, using sem preds on the basis of symbol tables would permit discerning among indexed_component, type_conversion, function_call. > The grammar as written is never the one actually used for whatever > purpose other than explanation or, maybe, validation. The interesting question IMO is: What are the necessary transformations for going from Annex P BNF plus informal description of semantic rules to the actual implementation grammar. - Oliver