Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!decvax!mcnc!ecsvax!dgary From: dgary@ecsvax.UUCP Newsgroups: net.lang.c Subject: a+++b parsing according to manual Message-ID: <2388@ecsvax.UUCP> Date: Fri, 27-Apr-84 13:19:48 EST Article-I.D.: ecsvax.2388 Posted: Fri Apr 27 13:19:48 1984 Date-Received: Sat, 28-Apr-84 10:30:48 EST Lines: 14 The argument over whether a+++b parses as (a++)+b or a+(++b) is solved (at least I think it's solved, but what do I know?) by reference to section 2 of the C reference manual in K&R's The C Programming Language. There we are clearly told that the parser is to return the longest possible string that could be a token, so (a++)+b has to be right. In addition, some people have claimed that C ignores spaces in its parses. I think that's due to a misreading of K&R. It clearly says that spaces are required (by spaces I mean white space, by the way, including comments) to separate identifiers that would otherwise be adjacent. In addition, it asserts that white space between tokens is syntactically meaningless, but that's whitespace BETWEEN tokens, not within them. The expression a+ ++b cannot be parsed as (a++)+b because the token ++ cannot contain an imbedded blank. Or am I misreading this?