spec: add ~ to list of punctuation tokens, and reorganize

Also add bitwise ops to Dialect Differences.

Change-Id: Ieb0fbf422e45cbf88fc9651b17e8c48643d5409d
diff --git a/doc/spec.md b/doc/spec.md
index 6489f7c..051e07c 100644
--- a/doc/spec.md
+++ b/doc/spec.md
@@ -233,13 +233,12 @@
 characters are tokens:
 
 ```text
-+    -    *    /    //   %   ^
-&    |    **                     <<    >>
-&=   |=
-.    ,    =    ;    :
++    -    *    /    //   %    =
++=   -=   *=   /=   //=  %=   ==   !=
+^    <    >    <<   >>   &    |
+^=   <=   >=   <<=  >>=  &=   |=
+.    ,    ;    :    ~    **
 (    )    [    ]    {    }
-<    >    >=   <=   ==   !=
-+=   -=   *=   /=   //=  %=  ^=  <<=   >>=
 ```
 
 *Keywords*: The following tokens are keywords and may not be used as
@@ -274,7 +273,8 @@
 and this feature is widely used in its tests.
 
 <b>Implementation note:</b>
-The Java implementation does not recognize `&` as a valid token.
+The Java implementation does not recognize the following tokens:
+`&`, `&=`, `|=`, `<<`, `>>`, `<<=`, `>>=`, `^`, `^=`, `~`.
 
 *Identifiers*: an identifier is a sequence of Unicode letters, decimal
  digits, and underscores (`_`), not starting with a digit.
@@ -3986,6 +3986,7 @@
 
 * Integers are represented with infinite precision.
 * Integer arithmetic is exact.
+* Integers support bitwise operators `&`, `|`, `<<`, `>>`, `^`, `~`, and their assignment forms.
 * Floating-point literals are supported (option: `-float`).
 * The `float` built-in function is provided (option: `-float`).
 * Real division using `float / float` is supported (option: `-float`).
@@ -3996,10 +3997,9 @@
 * Strings have the additional methods `elem_ords`, `codepoint_ords`, and `codepoints`.
 * The `chr` and `ord` built-in functions are supported.
 * The `set` built-in function is provided (option: `-set`).
+* `set & set` and `set | set` compute set intersection and union, respectively.
 * `x += y` rebindings are permitted at top level.
 * `assert` is a valid identifier.
-* `&` is a token; `int & int` and `set & set` are supported.
-* `int | int` is supported.
 * The parser accepts unary `+` expressions.
 * A method call `x.f()` may be separated into two steps: `y = x.f; y()`.
 * Dot expressions may appear on the left side of an assignment: `x.f = 1`.