No, since the terminal `+= exists in the grammar and the lexer is constructed to always choose the longest possible terminal. So if `-= was added to the grammar then it would be just as wrong to parse the sequence `-= as two tokens.
(This shows that it isn't so easy to extend the set of operator tokens and backquote identifiers. If the new token is a concatenation of shorter tokens then one must make sure that the concatenation isn't grammatically valid anywhere in the language.)
/ Martin Stjernholm, Roxen IS
Previous text:
2003-04-05 19:23: Subject: `-=
That is of course a problem. Does that mean that it is an error in the grammar that
int `+ =7;
works but
int `+=7;
does not?
/ Martin Nilsson (har bott i google)