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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a5d:9057:: with SMTP id v23mr9223052ioq.6.1546554880554; Thu, 03 Jan 2019 14:34:40 -0800 (PST) X-Received: by 2002:a9d:6f14:: with SMTP id n20mr1025809otq.2.1546554880431; Thu, 03 Jan 2019 14:34:40 -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.215.MISMATCH!k10no16097itk.0!news-out.google.com!v71ni113ita.0!nntp.google.com!k10no16093itk.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 3 Jan 2019 14:34:40 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.109.61.2; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 70.109.61.2 References: <30ba8954-a19e-4c95-b350-798b0276db41@googlegroups.com> <38103aef-2528-41ae-bb29-eec551a64808@googlegroups.com> <10d98401-d974-459f-93ed-e0b315b414e8@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada grammar rules for names too permissive? From: Jere Injection-Date: Thu, 03 Jan 2019 22:34:40 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55180 Date: 2019-01-03T14:34:40-08:00 List-Id: On Thursday, January 3, 2019 at 5:05:34 PM UTC-5, Stephen Leake wrote: > On Wednesday, January 2, 2019 at 12:47:22 PM UTC-8, Dmitry A. Kazakov wro= te: > > On 2019-01-02 20:21, Stephen Leake wrote: > > > On Tuesday, January 1, 2019 at 12:42:36 PM UTC-8, Dmitry A. Kazakov w= rote: > > >> On 2019-01-01 20:49, Stephen Leake wrote: > > >>> On Tuesday, January 1, 2019 at 12:44:17 AM UTC-8, Dmitry A. Kazakov= wrote: > > >>>> The grammar as written is never the one actually used for whatever > > >>>> purpose other than explanation or, maybe, validation. An extreme c= ase > > >>>> illustrating why, is source code coloring, > > >>> > > >>> On the contrary, Emacs Ada mode source code coloring uses a generat= ed parser for the Ada language, with only minimal changes from Annex P. > > >> > > >> In which case it should not work with syntactically incorrect progra= ms. > > >=20 > > > No, it has error correction to deal with that. > >=20 > > Ada grammar contains no correction productions. >=20 > True for LRM Annex P, and also for Emacs ada.wy, but irrelevant. For LR p= arsers, there are error correction algorithms that do not require modifying= the grammar. Emacs ada-mode uses the McKenzie algorithm (1); exploration o= f the parse table near the error location, combined with the redundancy of = the Ada language (especially named blocks). >=20 > One of these days I'll have to write a paper on it ... >=20 > Meanwhile, it works quite nicely for me, and I'm waiting to hear from mor= e people on how it works for them (a few positive responses so far, no nega= tive). >=20 > (1) McKenzie, Bruce J., Yeatman, Corey, and De Vere, > Lorraine. Error repair in shift reduce parsers. ACM Trans. Prog. > Lang. Syst., 17(4):672-689, July 1995. Is there a guide on how to manually update the Ada mode part of emacs? I= =20 have a slightly older version, but it doesn't list ada mode in emacs when I go through the normal update procedure. I can't really update emacs itself due to IT policies but was hoping to test out the newer Ada mode fixes at some point. In the version I have, it has trouble with things like expression functions (situations where you have "is" but no "begin/end= " blocks).