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:a945:: with SMTP id x5mr28053700iti.26.1546234698734; Sun, 30 Dec 2018 21:38:18 -0800 (PST) X-Received: by 2002:aca:5884:: with SMTP id m126mr428837oib.4.1546234698530; Sun, 30 Dec 2018 21:38:18 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!2.eu.feeder.erje.net!4.us.feeder.erje.net!feeder.erje.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!k10no374145itk.0!news-out.google.com!v141ni571ita.0!nntp.google.com!k10no374142itk.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 30 Dec 2018 21:38:18 -0800 (PST) In-Reply-To: <0d16f930-33ce-4e62-bc63-4719199b4e02@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=101.164.96.244; posting-account=wavAeAoAAAAZF_sXSZepBukuPCBO0Zqt NNTP-Posting-Host: 101.164.96.244 References: <73eb9d07-b3cf-4d3b-9802-eeb148a0c2e0@googlegroups.com> <0d16f930-33ce-4e62-bc63-4719199b4e02@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: ANTLR grammar for Ada available From: alby.gamper@gmail.com Injection-Date: Mon, 31 Dec 2018 05:38:18 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55132 Date: 2018-12-30T21:38:18-08:00 List-Id: On Saturday, December 29, 2018 at 12:38:33 AM UTC+11, Vincent DIEMUNSCH wro= te: > Le vendredi 28 d=C3=A9cembre 2018 10:32:49 UTC+1, oliverm...@gmail.com a = =C3=A9crit=C2=A0: > > Since ANTLR version 2 is very outdated and the links to v2 grammars are= mostly dead, I have resurrected the project on GitHub: > >=20 > > https://github.com/okellogg/ada_antlr_grammar > >=20 > > I plan to update the grammar to Ada 202x and ANTLR version 3. > > (Going to ANTLR v4 straight away looks too earth shaking). > >=20 > > - Oliver >=20 > Great Idea Oliver !=20 >=20 > ANTLR v3 is, in my opinion, the way to go, since ANTLR v4 is unduly compl= ex for a regular language like Ada. >=20 > But the target language of the ANTLR generator in the GitHub repository i= s C++... Why not generate an AST for Ada in Ada ? Many Ada compilers are wr= itten in Ada, in fact. >=20 > Kind regards, >=20 > Vincent Hi Vincent I would be very interested in your reasoning in saying that ANTLR v4 is mor= e complex than V3. In my experience v4 capabilities in auto generating a AST = and being able to visit/listen to specific nodes in the AST far surpasses the V= 3 capabilities and make it easier to parse Ada Syntactically at a rudimentary= level. Note I am in no way a ANTLR/Ada expert in this area, but I have used ANTLR = v4 with my ADA 2012 grammar and used it in "VisualAda" to implement Intellisen= se outlining and other intelisense features (albeit very limited at the moment= ). Feature wise, I believe a well constructed ANTLR v4 grammar is on par with libadalang (BUT NOT performant with libadalang ?) Alex