comp.lang.ada
 help / color / mirror / Atom feed
From: Optikos <optikos@verizon.net>
Subject: Re: Ada to Ada Translator ?
Date: Tue, 21 May 2019 17:16:39 -0700 (PDT)
Date: 2019-05-21T17:16:39-07:00	[thread overview]
Message-ID: <1bb467ae-6e2c-4fef-aaab-556a8df71747@googlegroups.com> (raw)
In-Reply-To: <qc1tap$6pk$1@franka.jacob-sparre.dk>

On Tuesday, May 21, 2019 at 5:15:54 PM UTC-5, Randy Brukardt wrote:
> "Optikos" wrote in message 
> 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 
> >> >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 
> >> formed
> >> the basis of Janus/Ada, and we discovered that switching was impractical 
> >> as
> >> an LL parser was going to be several times larger than the 48K RAM 
> >> available
> >> on CP/M-80. With some clever storage, we got the LR tables to fit with 
> >> space
> >> to spare.)
> >
> >I said "admirable", not unique.  I was speaking in the context of an 
> >open-source
> >Ada language-translator, not a closed-source one.
> 
> Which is relevant how?

Patrick's entire thread here is about an •open•-source tool that he is proposing.  Relevant means related to the matter at hand.

> 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?  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 some degree of laudable accomplishment, as some degree of incremental advancement.  (Even better if the modern-Ada Yacc grammar in the open source project 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 not 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 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.


  reply	other threads:[~2019-05-22  0: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 [this message]
2019-05-22 20:16           ` Randy Brukardt
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