Re: LL(1) Grammar for Ada (Matthew Clegg)
Fri, 1 Feb 91 10:03:59 +0200

          From comp.compilers

Related articles
LL(1) Grammar for ADA (1991-01-30)
Re: LL(1) Grammar for Ada (1991-02-01)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Matthew Clegg)
Keywords: Ada, parse, bibliography
Organization: Compilers Central
Date: Fri, 1 Feb 91 10:03:59 +0200

In article <> (Sunder Singhani) writes:
> I am looking for an LL(1) grammar for ADA. An EBNF/BNF grammar
> would be OK.

I picked up the following two messages from comp.languages.ada a month
or two ago. They mention machine-readable grammars, but unfortunately
they are not advertised as being LL(1) or EBNF/BNF. I hope this
information will be of some help anyways.


Reply-To: (Michael Feldman)

The NASA PrettyPrinter, on Simtel20 in the ASR, contains an Ada LR parser,
which it needs to pretty-print a program. It also builds a tree of the
input program, which it can manipulate to add e.g. certain kinds of
comments. I have a YACC specification for Ada, which I will be glad to
e-mail you if you wish. The nice thing about the one inside Pretty is
that it's written in Ada and, since you have the source, you can make the
"back end" do whatever you like. This product is not bad, was developed
for NASA, and seems to be fairly decent Ada. It's in the public domain.


Reply-To: joevl@mojsys.uucp (Joe Vlietstra)

A yacc compatible grammar for Ada was developed by Herman Fischer
at Litton Data Systems, Van Nuys, CA.
An updated version of this grammar is available in the SIMTEL20 Ada
Software Repository (ftp
The grammar is found in PD2:<ADA.EXTERNAL-TOOLS>GRAM2.SRC
It is approximately 80K.

If you want a yacc parser written in Ada, consider the ayacc parser
developed by the Arcadia project at Univ Calif at Irvine.
ayacc is not available via ftp -- it is bundled with a bunch of
other tools from the Arcadia project. It isn't free, but you can't
complain about $75.00 for a mag-tape full of software.
Contact Arcadia project at


Matthew Clegg
Technical Research Center of Finland, in Oulu

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.