Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!rutgers!clyde!burl!codas!novavax!hcx1!tom From: tom@hcx1.SSD.HARRIS.COM Newsgroups: comp.lang.c Subject: Re: Harbison/Steele C grammar bugs Message-ID: <44100005@hcx1> Date: Thu, 12-Nov-87 07:20:00 EST Article-I.D.: hcx1.44100005 Posted: Thu Nov 12 07:20:00 1987 Date-Received: Sun, 15-Nov-87 17:34:06 EST References: <660002@hpclmao.HP.COM> Lines: 45 Nf-ID: #R:hpclmao.HP.COM:660002:hcx1:44100005:000:1532 Nf-From: hcx1.SSD.HARRIS.COM!tom Nov 12 07:20:00 1987 More errors in Harbison and Steele Grammar as published: In definition of inner-declaration-list the nonterminal initialized-declaration-list is referenced, but is not defined anywhere. Should add: initialized-declaration-list : initialized-declaration initialized-declaration-list initialized-declaration In definition of type-specifier the symbol floating-point-type-specifier should be just floating-type-specifier The definition of type-specifier-list is missing a production. It should read: type-specifier-list : type-specifier <-- missing type-specifier-list type-specifier In case anyone is interested in such trivia -- after fixing all the bugs, running the grammar through a LALR(1) parser generator results in 40 states with conflicts. The grammar published in the draft ANSI C standard only has 14 states with conflicts. Also one of the previously posted corrections is wrong: > p. 383 There is a missing production: > > declarator-list: > declarator > declarator , declarator Should read: p. 383 There is a missing production: declarator-list: declarator declarator-list , declarator ------------------------------------------------------------------------ tahorsley@hcx1.harris.com | Aging - just say no! ------------------------------------------------------------------------