Blasphemy (Shaun Flisakowski)
Sat, 18 Feb 1995 15:56:42 GMT

          From comp.compilers

Related articles
Blasphemy (1995-02-18)
Re: Blasphemy bittyblue! (1995-02-20)
| List of all articles for this month |

Newsgroups: comp.lang.c,comp.compilers
From: (Shaun Flisakowski)
Keywords: C, errors, parse, books
Organization: U of Wisconsin CS Dept
Date: Sat, 18 Feb 1995 15:56:42 GMT

I have the fourth edition of "C - A Reference Manual" by
Harbison & Steele. Much to my distress, the grammar in the
back of the book appears to be riddled with bugs.


pg 425: The first item of the production for 'compound-statement'
        is 'inner-declaration-list(opt)'. There is no such thing
        in the grammar, I replaced with 'declaration-list(opt)'.

pg 425: In the production for 'declaration',
        'initialized-declarator-list' should be optional.

pg 433: The production 'top-level-declaration-list' is not used
        in the grammar, it appears it is not needed (since multiple
        top-level-declaration are split apart in 'translation-unit')

I would appreciate it if someone could either:

1) Point me in the direction of a error-free version of the C
      grammar (cheap).

2) Point out any bugs I have missed in the Harbison & Steele
      grammar, and let me know if the "fixes" I made are valid.


Shaun (flisakow@cs)

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.