Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!roger@ll-sst From: roger@ll-sst (Roger Hale) Newsgroups: net.lang.c Subject: Re: LALR(1) Grammer for C Message-ID: <2363@brl-tgr.ARPA> Date: Wed, 23-Oct-85 16:55:12 EDT Article-I.D.: brl-tgr.2363 Posted: Wed Oct 23 16:55:12 1985 Date-Received: Fri, 25-Oct-85 02:39:58 EDT Sender: news@brl-tgr.ARPA Lines: 46 [From: datacube!stephen; Date: 21 Oct 85 15:12:00 GMT] > I have recently been engaged in implementing a yacc grammar based > on the one provided in Harbison and Steele's _C: A Reference Manual_ and > have encountered a bug. On page 337 the following productions have been > provided: > > ::= > ... > <0008> ::= > <0008> ::= , > ... > > Neither nor <0008> are otherwise referenced in the grammar. I saw these orphans a while ago, too; here's what they suggest to me: [enter just so story] The line ::= ( ) used to have (or some such name) in place of , and a line group ::= ::= <0008> followed the group defining <0008>. [This being the output of their parser generator.] This gives function declarators like main(argc, argv) . To accommodate the new style main(int argc, char **argv) was defined and plugged into , and was garbage collected, but not <0008> or (perhaps because <0008> refers to itself). [leave just so story] FIX: Just flush and <0008>. Anyway, that's my opinion, just going by the text in front of me. [Standard cover-everything disclaimer] Flames to me, not the net; I'll warm up some chicken soup with them if they're nice and toasty. Yours, Roger Hale Arpa: roger@ll-sst.arpa Uucp: {ucbvax,...}!roger%ll-sst.arpa might work