Commit cd04ec95 authored by Rob Pike's avatar Rob Pike

bit clear: &^ and &^=

R=gri
DELTA=5  (3 added, 0 deleted, 2 changed)
OCL=26155
CL=26157
parent bb02e481
...@@ -297,6 +297,7 @@ The following character sequences represent operators, delimiters, and other spe ...@@ -297,6 +297,7 @@ The following character sequences represent operators, delimiters, and other spe
* ^ *= ^= <- > >= { } * ^ *= ^= <- > >= { }
/ << /= <<= ++ = := , ; / << /= <<= ++ = := , ;
% >> %= >>= -- ! ... . : % >> %= >>= -- ! ... . :
&amp;^ &amp;^=
</pre> </pre>
<h3>Integer literals</h3> <h3>Integer literals</h3>
...@@ -2416,7 +2417,7 @@ log_op = "||" | "&amp;&amp;" . ...@@ -2416,7 +2417,7 @@ log_op = "||" | "&amp;&amp;" .
com_op = "&lt;-" . com_op = "&lt;-" .
rel_op = "==" | "!=" | "&lt;" | "&lt;=" | ">" | ">=" . rel_op = "==" | "!=" | "&lt;" | "&lt;=" | ">" | ">=" .
add_op = "+" | "-" | "|" | "^" . add_op = "+" | "-" | "|" | "^" .
mul_op = "*" | "/" | "%" | "&lt;&lt;" | ">>" | "&amp;" . mul_op = "*" | "/" | "%" | "&lt;&lt;" | ">>" | "&amp;" | "&amp;^" .
unary_op = "+" | "-" | "!" | "^" | "*" | "&amp;" | "&lt;-" . unary_op = "+" | "-" | "!" | "^" | "*" | "&amp;" | "&lt;-" .
</pre> </pre>
...@@ -2460,7 +2461,7 @@ operators, comparison operators, communication operators, ...@@ -2460,7 +2461,7 @@ operators, comparison operators, communication operators,
<pre class="grammar"> <pre class="grammar">
Precedence Operator Precedence Operator
6 * / % &lt;&lt; >> &amp; 6 * / % &lt;&lt; >> &amp; &amp;^
5 + - | ^ 5 + - | ^
4 == != &lt; &lt;= > >= 4 == != &lt; &lt;= > >=
3 &lt;- 3 &lt;-
...@@ -2505,6 +2506,7 @@ to strings; all other arithmetic operators apply to integers only. ...@@ -2505,6 +2506,7 @@ to strings; all other arithmetic operators apply to integers only.
&amp; bitwise and integers &amp; bitwise and integers
| bitwise or integers | bitwise or integers
^ bitwise xor integers ^ bitwise xor integers
&amp;^ bitwise nand integers
<< left shift integer << unsigned integer << left shift integer << unsigned integer
>> right shift integer >> unsigned integer >> right shift integer >> unsigned integer
...@@ -3021,6 +3023,7 @@ x = 1 ...@@ -3021,6 +3023,7 @@ x = 1
*p = f() *p = f()
a[i] = 23 a[i] = 23
k = <-ch k = <-ch
i &^= (1<<n)
</pre> </pre>
<p> <p>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment