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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a5d:9d01:: with SMTP id j1mr16704793ioj.205.1558484199804; Tue, 21 May 2019 17:16:39 -0700 (PDT) X-Received: by 2002:a9d:5a86:: with SMTP id w6mr22995222oth.82.1558484199603; Tue, 21 May 2019 17:16:39 -0700 (PDT) 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!u76no39121ita.0!news-out.google.com!p73ni57itp.0!nntp.google.com!u76no39116ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 21 May 2019 17:16:39 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.234.171; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.234.171 References: <100ad407-090e-4316-9746-a4469568b53e@googlegroups.com> <64883feb-3e49-4c6a-855c-6673068e970c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1bb467ae-6e2c-4fef-aaab-556a8df71747@googlegroups.com> Subject: Re: Ada to Ada Translator ? From: Optikos Injection-Date: Wed, 22 May 2019 00:16:39 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56362 Date: 2019-05-21T17:16:39-07:00 List-Id: On Tuesday, May 21, 2019 at 5:15:54 PM UTC-5, Randy Brukardt wrote: > "Optikos" wrote in message=20 > news:a8d0f6ca-d5cf-4831-8803-9c1bb6198116@googlegroups.com... > >On Monday, May 20, 2019 at 6:19:55 PM UTC-5, Randy Brukardt wrote: > >> "Optikos" wrote in message > >> news:64883feb-3e49-4c6a-855c-6673068e970c@googlegroups.com... > >> ... > >> >Conversely, if you utilize Yacc & Flex, it would be LR(k) bottom-up= =20 > >> >parser, > >> >which would be an admirable accomplishment in its own right. > >> > >> Why? There are a number of such grammars out there, and Janus/Ada was > >> designed from the beginning (in 1980!) using an LALR parser. (That was= a > >> requirement of the class project at the University of Wisconsin that= =20 > >> formed > >> the basis of Janus/Ada, and we discovered that switching was impractic= al=20 > >> as > >> an LL parser was going to be several times larger than the 48K RAM=20 > >> available > >> on CP/M-80. With some clever storage, we got the LR tables to fit with= =20 > >> space > >> to spare.) > > > >I said "admirable", not unique. I was speaking in the context of an=20 > >open-source > >Ada language-translator, not a closed-source one. >=20 > Which is relevant how? Patrick's entire thread here is about an =E2=80=A2open=E2=80=A2-source tool= that he is proposing. Relevant means related to the matter at hand. > There are (or at least were) a number of YACC=20 > grammars for Ada floating around the web. And there's no difficulty in us= ing=20 > them... Aren't all the =E2=80=9Cnumber of YACC grammars for Ada floating around on = the web=E2=80=9D rather out-of-date for only Ada83 or Ada95? If Patrick is= proposing a tool that is capable of parsing Ada2005 or Ada2012 or Ada2020,= then modernizing those out-of-date yacc grammars to the current era is of = some degree of difficulty. Doing so in an open-source project would be som= e degree of laudable accomplishment, as some degree of incremental advancem= ent. (Even better if the modern-Ada Yacc grammar in the open source projec= t were licensed with an MIT-esque permissive license instead of GPL, since = GNAT and ELPA ada-mode for Emacs are both GPL-licensed.) Furthermore, Patrick is effectively proposing something further: parsing n= ot merely bland modern Ada straight from the ISO standards, but also every = GNAT extension so that his Ada-to-Ada code-generator is a drop-in front-end= wrapping GNAT. I am fairly certain that absolutely no extant open-source = Yacc grammar for Ada has all the GNAT extensions (as well as parsing modern= Ada2005 or Ada2012 or Ada2020). I reiterate: Such an open-source Yacc gr= ammar comprehensive of all variants of Ada (so that it could be a completel= y transparent front-end to GNAT) =E2=80=9Cwould be an admirable accomplishm= ent in its own right=E2=80=9D as I originally stated.