Rod said:
Also, I don't see why it should be a particular problem for bison or
lex, particularly since lex tends to match the longest possible
sequence, IIRC.
Well, I can't find it at the moment. I did find these:
Wikipedia
http://en.wikipedia.org/wiki/C_programming_language
"The =+ operator was changed to += to remove the semantic ambiguity created
by the construct i=+10, which could be interpreted as either i =+ 10 or i =
+10. "
"The Development of the C Language" by Dennis M. Ritchie, Bell Labs/Lucent
Technologies, Murray Hill, NJ 07974 USA
On page 5,
"More History
After the TMG version of B was working, Thompson rewrote B in itself (a
bootstrapping
step). During development, he continually struggled against memory
limitations: each language
addition inflated the compiler so it could barely fit, but each rewrite
taking advantage of the feature
reduced its size. For example, B introduced generalized assignment
operators, using x=+y
to add y to x. The notation came from Algol 68 [Wijngaarden 75] via McIlroy,
who had incorporated
it into his version of TMG. (In B and early C, the operator was spelled =+
instead of += ;
this mistake, repaired in 1976, was induced by a seductively easy way of
handling the first form
in B's lexical analyzer.)"
From 7.14.1 of 1975's "C Reference Manual", Dennis M. Ritchie, Bell
Telephone Laboratories, Murray Hill, New Jersey 07974, I know the following
operators were reverse from what they are today:
7.14.2 lvalue =+ expression
7.14.3 lvalue =- expression
7.14.4 lvalue =* expression
7.14.5 lvalue =/ expression
7.14.6 lvalue =% expression
7.14.7 lvalue =>> expression
7.14.8 lvalue =<< expression
7.14.9 lvalue =& expression
7.14.10 lvalue =^ expression
7.14.11 lvalue = | expression
Oh well, it's not important.
Rod Pemberton