comp.lang.ada
 help / color / mirror / Atom feed
* Q: recent Ada grammar for Ada tools ?
@ 2007-09-16  5:17 Gautier
  2007-09-16  7:10 ` Pascal Obry
  0 siblings, 1 reply; 7+ messages in thread
From: Gautier @ 2007-09-16  5:17 UTC (permalink / raw)


Hello,
Is there some free, recent Ada grammar for Ada tools ?
By "Ada tool", I mean ayacc or something newer.
The best match I found is the Ada 95 grammar/lexer for yacc/lex on the AdaIC
site. But all for C; at least a ayacc/aflex version would be better...
TIA
______________________________________________________________
Gautier         -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Q: recent Ada grammar for Ada tools ?
  2007-09-16  5:17 Q: recent Ada grammar for Ada tools ? Gautier
@ 2007-09-16  7:10 ` Pascal Obry
  2007-09-16  9:58   ` Gautier
  0 siblings, 1 reply; 7+ messages in thread
From: Pascal Obry @ 2007-09-16  7:10 UTC (permalink / raw)
  To: Gautier

Hi Gautier,

> By "Ada tool", I mean ayacc or something newer.
> The best match I found is the Ada 95 grammar/lexer for yacc/lex on the
> AdaIC
> site. But all for C; at least a ayacc/aflex version would be better...

I have an "old" aflex/ayacc link on my homepage. This is a fix for the
Irvive University (IIRC) version of aflex/ayacc... I just don't remember
if it is Ada83 or Ada95. Maybe a good start.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Q: recent Ada grammar for Ada tools ?
  2007-09-16  7:10 ` Pascal Obry
@ 2007-09-16  9:58   ` Gautier
  2007-09-20 16:18     ` Georg Bauhaus
  0 siblings, 1 reply; 7+ messages in thread
From: Gautier @ 2007-09-16  9:58 UTC (permalink / raw)


Pascal Obry wrote:
> Hi Gautier,
> 
>> By "Ada tool", I mean ayacc or something newer.
>> The best match I found is the Ada 95 grammar/lexer for yacc/lex on the
>> AdaIC
>> site. But all for C; at least a ayacc/aflex version would be better...
> 
> I have an "old" aflex/ayacc link on my homepage. This is a fix for the
> Irvive University (IIRC) version of aflex/ayacc... I just don't remember
> if it is Ada83 or Ada95. Maybe a good start.
> 
> Pascal.

Sorry for being unclear: by "a ayacc/aflex version", I meant "a version [of the 
Ada 95 lexer/parser] for ayacc/aflex".
As for the ayacc/aflex tools, I have an up-to-date version, with several fixes 
(of bugs spotted by recent versions of GNAT) and a few improvements, like not 
hard-coded stack sizes. If you are interested (e.g. for merging versions), it is 
packaged in newp2ada.zip, subdirectories ayacc95, aflex95 - cf 2nd link below.
______________________________________________________________
Gautier         -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm#p2ada

NB: For a direct answer, e-mail address on the Web site!



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Q: recent Ada grammar for Ada tools ?
  2007-09-16  9:58   ` Gautier
@ 2007-09-20 16:18     ` Georg Bauhaus
  2007-09-20 18:17       ` Robert A Duff
  0 siblings, 1 reply; 7+ messages in thread
From: Georg Bauhaus @ 2007-09-20 16:18 UTC (permalink / raw)


On Sun, 2007-09-16 at 11:58 +0200, Gautier wrote:
> Pascal Obry wrote:
> > Hi Gautier,
> > 
> >> By "Ada tool", I mean ayacc or something newer.
> >> The best match I found is the Ada 95 grammar/lexer for yacc/lex on the
> >> AdaIC
> >> site. But all for C; at least a ayacc/aflex version would be better...
> > 
> > I have an "old" aflex/ayacc link on my homepage. This is a fix for the
> > Irvive University (IIRC) version of aflex/ayacc... I just don't remember
> > if it is Ada83 or Ada95. Maybe a good start.
> > 
> > Pascal.
> 
> Sorry for being unclear: by "a ayacc/aflex version", I meant "a version [of the 
> Ada 95 lexer/parser] for ayacc/aflex".


Wouldn't the sources of the LRM have the grammar rules marked up such
that they can be extracted? I have never seen the sources and
I don't know whether they are publicly available at all (like the
processed sources are).






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Q: recent Ada grammar for Ada tools ?
  2007-09-20 16:18     ` Georg Bauhaus
@ 2007-09-20 18:17       ` Robert A Duff
  2007-09-21  0:24         ` Randy Brukardt
  0 siblings, 1 reply; 7+ messages in thread
From: Robert A Duff @ 2007-09-20 18:17 UTC (permalink / raw)


Georg Bauhaus <bauhaus+rm.tsoh@maps.futureapps.de> writes:

> Wouldn't the sources of the LRM have the grammar rules marked up such
> that they can be extracted?

Yes.  In fact, that's already done -- Annex P, "Syntax Summary"
is just that.

However, the RM grammar is not what you want for AYACC, which I believe
is a LALR(1) parser generator.  The RM grammar is ambiguous, for one
thing.  E.g., what is "X(Y)" in the following:

    A := X(Y);

function_call, type_conversion, indexed_component?
If it's a function_call, what is "X" -- name or
implicit_dereference?

According to the grammar, it can be any of the above,
and some I didn't mention.

Here's an interesting part of the RM grammar:

    prefix ::= name | implicit_dereference
    implicit_dereference ::= name

>...I have never seen the sources and
> I don't know whether they are publicly available at all (like the
> processed sources are).

Surely they're publicly available somewhere?
Maybe Randy can tell us.

- Bob



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Q: recent Ada grammar for Ada tools ?
  2007-09-20 18:17       ` Robert A Duff
@ 2007-09-21  0:24         ` Randy Brukardt
  2007-09-21  3:36           ` Georg Bauhaus
  0 siblings, 1 reply; 7+ messages in thread
From: Randy Brukardt @ 2007-09-21  0:24 UTC (permalink / raw)


"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message
news:wcc3ax9dwvz.fsf@shell01.TheWorld.com...
> Georg Bauhaus <bauhaus+rm.tsoh@maps.futureapps.de> writes:
...
> >...I have never seen the sources and
> > I don't know whether they are publicly available at all (like the
> > processed sources are).
>
> Surely they're publicly available somewhere?
> Maybe Randy can tell us.

They're available on Ada-Auth.Org. I'm too lazy to look up the link right
now.

                        Randy.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Q: recent Ada grammar for Ada tools ?
  2007-09-21  0:24         ` Randy Brukardt
@ 2007-09-21  3:36           ` Georg Bauhaus
  0 siblings, 0 replies; 7+ messages in thread
From: Georg Bauhaus @ 2007-09-21  3:36 UTC (permalink / raw)


On Thu, 2007-09-20 at 19:24 -0500, Randy Brukardt wrote:
> "Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message
> news:wcc3ax9dwvz.fsf@shell01.TheWorld.com...
> > Georg Bauhaus <bauhaus+rm.tsoh@maps.futureapps.de> writes:
> ...
> > >...I have never seen the sources and
> > > I don't know whether they are publicly available at all (like the
> > > processed sources are).
> >
> > Surely they're publicly available somewhere?
> > Maybe Randy can tell us.
> 
> They're available on Ada-Auth.Org. I'm too lazy to look up the link right
> now.

I should have looked. Linked from here,
http://www.ada-auth.org/arm.html






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-09-21  3:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-16  5:17 Q: recent Ada grammar for Ada tools ? Gautier
2007-09-16  7:10 ` Pascal Obry
2007-09-16  9:58   ` Gautier
2007-09-20 16:18     ` Georg Bauhaus
2007-09-20 18:17       ` Robert A Duff
2007-09-21  0:24         ` Randy Brukardt
2007-09-21  3:36           ` Georg Bauhaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox