quale@puff.cs.wisc.edu (quale) (03/31/89)
I didn't plan to post this, but since noone has brought it up yet, ... The syntax given in Kernighan and Ritchie is incorrect. As they themselves state it is not intended to be a rigorous definition of C syntax, but rather a rough guide. Even so, the syntax they give is broken, and I don't think there is or ever was a C compiler accepting exactly that language. An amusing article on C syntax was published in SIGPLAN Notices a few years ago. I think that the difficulty of writing a yacc parser for C speaks volumes about the messiness of its syntax, but I'll withhold further comment. -- Doug Quale quale@uhura.cs.wisc.edu