Other 'significant' blanks

Henry Spencer henry at utzoo.UUCP
Tue Dec 11 10:03:14 AEST 1984


> Should a compiler allow blanks between the 'op' and the '=' in an
> 'op=' operation? ...

K&R actually says explicitly that (e.g.) "+=" is two tokens; hence
space between them is allowable (section 7.14).  However, practically
no C compilers other than the original Ritchie compiler have done it
this way.  One reason for this is that it makes the language non-LALR(1),
so all the yacc-based parsers croak.  The current ANSI C draft (12 Nov)
says that "+=" is one token.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list