dmiruke@isis.UUCP (Dataram Miruke) (01/29/86)
Sometime back someone posted a question about an error in the LALR grammar given in the book 'C - A Reference Manual' by Harbison and Steele, in which there are two productions present that don't seem to be used anywhere at all in the rest of the grammar. I do not know if any solution or improvement was suggested by someone about this. If someone has any idea would like to hear about it. Here are the two offending(!) productions. For reference please see the above book..(pp. 335-342). The edition that I have is the one published in 1984. Is there a new edition in which this problem is taken care of ? key_dcltr := <identifier> <0008> := <key_dcltr> | <0008> , <key_dcltr> where <identifier> is a token. Does anyone know of any LALR grammar for C++ available anywhere ? Thanx in advance for any clues, info or lead or whatever... - D. T. Miruke 2455, S. York St. Denver, Co 80210. res. : (303) 744-6045 office : (303) 871-3073 csnet : dmiruke@isis dmiruke@udenva
steven@boring.uucp (Steven Pemberton) (02/03/86)
In article <294@isis.UUCP> dmiruke@isis.UUCP asks: > Sometime back someone posted a question about an error in the LALR grammar > given in the book 'C - A Reference Manual' by Harbison and Steele, in which > there are two productions present that don't seem to be used anywhere at all > in the rest of the grammar. I do not know if any solution or improvement was > suggested by someone about this. If someone has any idea would like to hear > about it. In May 1985, Don Taylor posted the following corrections: | There are a handful of typo's in the lalr(1) grammar in appendix c [of H&S]. | A letter to them resulted in a prompt reply from Mr. Harbison, and I quote | ------------ | | -Change all occurences of "..._ctype>" to "..._type>". | | -Remove definitions of "<008>" and "<key_dcltr>"; they are not needed. | | -"<decl or stmt>" should be "<dcl_or_stmt>". | | In addition, if you have the first printing of the book, the production | | <cast_exp> ::= ( <typename_declaration> ) <prefix_exp> | should be | <cast_exp> ::= ( <typename_declaration> ) <cast_exp> | | You should also know that this grammar does not accomodate C's "old" form of | initializers and compound assignments. | ------------ Steven Pemberton, CWI, Amsterdam; steven@mcvax.uucp