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:4105:: with SMTP id x5mr32172454ita.33.1546417936756; Wed, 02 Jan 2019 00:32:16 -0800 (PST) X-Received: by 2002:a9d:da3:: with SMTP id 32mr879095ots.3.1546417936643; Wed, 02 Jan 2019 00:32:16 -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!q69no20081itb.0!news-out.google.com!v141ni53ita.0!nntp.google.com!k10no20133itk.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 2 Jan 2019 00:32:16 -0800 (PST) In-Reply-To: <594af043-39aa-451a-85a1-558b9e21492d@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=101.164.108.182; posting-account=wavAeAoAAAAZF_sXSZepBukuPCBO0Zqt NNTP-Posting-Host: 101.164.108.182 References: <73eb9d07-b3cf-4d3b-9802-eeb148a0c2e0@googlegroups.com> <0d16f930-33ce-4e62-bc63-4719199b4e02@googlegroups.com> <697312a4-5b96-472e-ae50-3ae33232c4de@googlegroups.com> <87wonq5dao.fsf@nightsong.com> <594af043-39aa-451a-85a1-558b9e21492d@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <64964707-bb32-44fa-be6e-55cab411836a@googlegroups.com> Subject: Re: ANTLR grammar for Ada available From: alby.gamper@gmail.com Injection-Date: Wed, 02 Jan 2019 08:32:16 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:55162 Date: 2019-01-02T00:32:16-08:00 List-Id: On Wednesday, January 2, 2019 at 7:07:18 PM UTC+11, alby....@gmail.com wrote: > On Wednesday, January 2, 2019 at 9:20:22 AM UTC+11, oliverm...@gmail.com wrote: > > On Monday, December 31, 2018 at 11:08:52 AM UTC+1, alby....@gmail.com wrote: > > > [...] > > > Thanks for the feedback!, Let me wait for some further feedback from the > > > Ada community, so I can ascertain the extent of the interest in this piece > > > of work. > > > > Sure, I'd be interested too, to compare with > > https://github.com/okellogg/ada_antlr_grammar/blob/master/antlr4/ada.g4 > > > > On this grammar, I am getting the following message from org.antlr.v4.Tool : > > > > > error(119): ada.g4::: The following sets of rules are mutually > > left-recursive > > > [name, explicit_dereference, prefix, implicit_dereference, > > > subtype_mark, function_call, generalized_reference, type_conversion, > > > qualified_expression, indexed_component, slice, selected_component, > > > attribute_reference, generalized_indexing] > > > > Have you encountered a similar problem in your version? > > > > - Oliver > > Hi Oliver > > My version of the grammar was done a couple of years ago, So I don't recall this > specific error as such, I do recall issues with the "name" terminals (ie section > 4.1) > > Alex Hi Oliver Having had a further look at your grammar, this seems to be the same area that I had issues with. I'll post my version up later this week, so we can compare our approaches, Note however my grammar is for Ada 2012, but also based of the grammar found in the Ada RM. One minor diff is that my lexer rules are at the end of the grammar file (as was/is typical in ANTLR grammars). Your approach is however far more readable/referable back to the RM Alex