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 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada to Ada Translator ? Date: Wed, 22 May 2019 15:16:35 -0500 Organization: JSA Research & Innovation Message-ID: References: <100ad407-090e-4316-9746-a4469568b53e@googlegroups.com> <64883feb-3e49-4c6a-855c-6673068e970c@googlegroups.com> <1bb467ae-6e2c-4fef-aaab-556a8df71747@googlegroups.com> Injection-Date: Wed, 22 May 2019 20:16:36 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="11903"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:56373 Date: 2019-05-22T15:16:35-05:00 List-Id: "Optikos" wrote in message news:1bb467ae-6e2c-4fef-aaab-556a8df71747@googlegroups.com... ... >> There are (or at least were) a number of YACC >> grammars for Ada floating around the web. And there's no difficulty in >> using >> them... > >Aren't all the "number of YACC grammars for Ada floating around on the web" >rather out-of-date for only Ada83 or Ada95? Dunno. Since any computer science graduate (not to mention many others) can and probably has built a parser for some language, it's hardly that important to have one to reuse. >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. Maybe for self-taught programmers, but anyone who is familar with the basics of compiler construction can create/modify one very quickly. If it takes very long to understand someone else's parser, it's probably better to build your own. After all, the parser is probably less than 2% of a compiler or translator (even the lexer is likely to be harder). >I reiterate: Such an open-source Yacc grammar comprehensive of >all variants of Ada (so that it could be a completely transparent >front-end to GNAT) "would be an admirable accomplishment in its >own right" as I originally stated. That would take at most a week or two to create. The Janus/Ada grammar supports all of Ada 2012, and that only took about two weeks to build (most of the time being spent redoing the rest of the compiler to be able to detect/reject unimplemented stuff without crashing. the actual grammar work being only a day or so). It's just not that big of a deal. (The tool as a whole, of course, is a different story.) Randy.