Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!astroatc!nicmad!karsh From: karsh@nicmad.UUCP Newsgroups: comp.lang.c Subject: YACC grammer for c Message-ID: <1338@nicmad.UUCP> Date: Fri, 28-Nov-86 00:38:37 EST Article-I.D.: nicmad.1338 Posted: Fri Nov 28 00:38:37 1986 Date-Received: Fri, 28-Nov-86 20:16:40 EST Reply-To: karsh@nicmad.UUCP (Bruce Karsh) Organization: Nicolet Instrument Corp. Madison WI Lines: 28 [] Pardon me if this has been discussed here before. I tried to write a yacc grammer for the C language by using the grammer in K&R appendix A. I typed in the grammer from the book almost verbatim. I've found the following anomaly: Under the definition for "function-body" there is a reference to the non-terminal "type-decl-list". However, "type-decl-list" is not defined anywhere. Is there any difference between "type-decl-list" and "struct-decl-list"? I.e. can I get away with: type-decl-list : struct-decl-list ; By the way, does anybody know if there are any known bugs in the K&R C grammer? What's a good reference for information on the precise syntax of the C language? Does anybody out there have a yacc grammer for the C language? How about for the ANSI C language? Could you send me a copy? Thanks, Bruce Karsh {ihnp4,uwvax}!nicmad!karsh