From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada to Ada Translator ?
Date: Wed, 22 May 2019 15:16:35 -0500
Date: 2019-05-22T15:16:35-05:00 [thread overview]
Message-ID: <qc4an4$bjv$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 1bb467ae-6e2c-4fef-aaab-556a8df71747@googlegroups.com
"Optikos" <optikos@verizon.net> 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.
next prev parent reply other threads:[~2019-05-22 20:16 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 14:21 Ada to Ada Translator ? foo wong
2019-05-17 21:00 ` Simon Wright
2019-05-18 12:05 ` foo wong
2019-05-18 12:11 ` foo wong
2019-05-18 14:47 ` Simon Wright
2019-05-18 15:26 ` foo wong
2019-05-18 16:48 ` Simon Wright
2019-05-19 16:04 ` G.B.
2019-05-19 17:08 ` Simon Wright
2019-05-19 18:27 ` Optikos
2019-05-19 21:27 ` Simon Wright
2019-05-19 21:42 ` Simon Wright
2019-05-21 20:54 ` Optikos
2019-05-22 6:59 ` Simon Wright
2019-05-22 12:06 ` Optikos
2019-05-22 12:33 ` Simon Wright
2019-05-22 12:57 ` foo wong
2019-05-22 15:24 ` Shark8
2019-05-22 16:34 ` Optikos
2019-05-22 20:07 ` Randy Brukardt
2019-05-23 7:21 ` G. B.
2019-05-22 13:33 ` Optikos
2019-05-20 14:11 ` Optikos
2019-05-20 16:37 ` foo wong
2019-05-18 15:44 ` foo wong
2019-05-18 16:49 ` Simon Wright
2019-05-19 15:04 ` G.B.
2019-05-19 12:41 ` Optikos
2019-05-19 17:38 ` foo wong
2019-05-19 22:52 ` foo wong
2019-05-20 23:19 ` Randy Brukardt
2019-05-21 0:13 ` Optikos
2019-05-21 22:15 ` Randy Brukardt
2019-05-22 0:16 ` Optikos
2019-05-22 20:16 ` Randy Brukardt [this message]
2019-05-22 23:27 ` foo wong
2019-05-23 7:56 ` Simon Wright
2019-05-23 12:29 ` foo wong
2019-05-21 22:20 ` Randy Brukardt
2019-05-21 0:17 ` Optikos
2019-05-22 18:49 ` Optikos
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox