Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!allegra!alice!ark From: ark@alice.UUCP Newsgroups: comp.lang.c Subject: Re: C sintax Message-ID: <7655@alice.UUCP> Date: 26 Jan 88 16:17:58 GMT References: <7072@brl-smoke.ARPA> <7160@brl-smoke.ARPA> <3932@hoptoad.uucp> <4080@june.cs.washington.edu> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 26 Posted: Tue Jan 26 11:17:58 1988 In article <4080@june.cs.washington.edu>, pardo@uw-june.UUCP writes: > ( This isn't related to anything, but I've been unable to figure ) > ( out a mail path to the guy who asked, and I wanted to answer ) > > >> ;-D on (My favorite sintax: switch(x+=*a+++*b){...}) Pardo > > > >Boy, you've got that. That's a sin, or should be. > >What, precisely, does x+=*a+++*b mean? > > Well, actually it is ambiguous. There are 2 (or more?) ways to parse > it. I'm not sure the behavior is defined from lexer to lexer as to > which one is preferred. It's not ambiguous: C lexical analysis is defined by "maximal munch." There is one issue, though: whether this is run on a C compiler in which =* is a token (ancient). If so, then += is probably defined as two tokens as well. On such an ancient compiler, it means x + =* a ++ + * b which is illegal. On more modern compilers, it means x += * a ++ + * b with no ambiguity.