Path: utzoo!attcan!uunet!decwrl!wuarchive!cs.utexas.edu!news-server.csri.toronto.edu!dgp.toronto.edu!flaps From: flaps@dgp.toronto.edu (Alan J Rosenthal) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C Suggestions Message-ID: <1990Oct9.111049.28398@jarvis.csri.toronto.edu> Date: 9 Oct 90 15:10:49 GMT References: <20912@well.sf.ca.us> <1990Oct7.232419.20984@ida.liu.se> <1990Oct8.154744.15837@nntp-server.caltech.edu> <1990Oct9.020415.16763@eng.umd.edu> Lines: 12 russotto@eng.umd.edu (Matthew T. Russotto) writes: >>(The reason why '->>' should be used instead of '-->' is because it >>shows up better, and it would not be parsed as a post-decrement >>greater-than combination.) > >No, instead as minus shift right. You can't win. Nope, the rule for C, known as the "maximal munch" rule, is that the lexer tries, from left to right, to grab as many characters as possible for the one token. So "->>" becomes "->" ">". Since these are both always binary, it's always a syntax error currently. (However, I think language extensions like the one proposed here are usually a mistake.)