Path: utzoo!attcan!uunet!world!iecc!compilers-sender From: mcl@tko.vtt.fi (Matthew Clegg) Newsgroups: comp.compilers Subject: Re: LL(1) Grammar for Ada Keywords: Ada, parse, bibliography Message-ID: <9102010803.AA17330@tko.vtt.fi> Date: 1 Feb 91 08:03:59 GMT Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: mcl@tko.vtt.fi (Matthew Clegg) Organization: Compilers Central Lines: 49 Approved: compilers@iecc.cambridge.ma.us In article <1991Jan30.192303.5219@viewlogic.com> sunder@viewlogic.com (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: mfeldman@seas.gwu.edu (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 wsmr-simtel20.army.mil). The grammar is found in PD2: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 arcadia-software@isc.uci.edu. --------------------------------------------------------------------------- Matthew Clegg Technical Research Center of Finland, in Oulu mcl@tko.vtt.fi -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.