Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mh3bc1.UUCP Path: utzoo!linus!philabs!seismo!harpo!eagle!mh3bs!mh3bc1!cw From: cw@mh3bc1.UUCP Newsgroups: net.sources Subject: Re: Ada grammar Message-ID: <110@mh3bc1.UUCP> Date: Wed, 14-Dec-83 20:58:04 EST Article-I.D.: mh3bc1.110 Posted: Wed Dec 14 20:58:04 1983 Date-Received: Fri, 16-Dec-83 03:16:26 EST References: <671@ssc-vax.UUCP> Organization: Bell Labs, Murray Hill Lines: 25 David Norris has recently supplied a YACC version of an Ada grammar to net.sources. He claimed that the grammar is LALR(1). It should be noted that the grammar is not even LR(1). He did note the correct place where the problem occurs. YACC will handle the problem area by chosing to shift; Norris claims that this is a correct resolution. I have not tested the claim. I also have not tested to see if the grammar in fact covers the real Ada grammar. This is a general problem with fast grammars for Ada; to get them to be LALR(1) or LR(1), you actually have to write a grammar for a little larger language. Sometimes you make a mistake and cut off a bit of Ada. I have also not checked to see if this grammar is appropriate for all of ANSI 1983 Ada. We can, however, thank Norris for providing one more example of a grammar that we can use to understand nice solutions to Ada parsing problems. Charles Wetherell -- Charles Wetherell MH 3C-327 x-3099 eagle!cw