This one bit me today

Alan J Rosenthal flaps at dgp.toronto.edu
Mon Oct 9 12:00:34 AEST 1989


dricejb at drilex.UUCP (Craig Jackson drilex1) writes:
>In C, it is normally acceptable to elide whitespace between tokens.

No, only if you don't change the tokenization.  For example, if you remove
the whitespace in "int i;", you will change the meaning of the statement.
Similarly for "a / *b", or "a - -b".

>There is one and only one parse for a+++b.

Indeed, and this contradicts your previous statement.  If whitespace didn't
matter, this would be ambiguous between "a + ++b" and "a++ + b".



More information about the Comp.lang.c mailing list