From d36d191e25053f499f7e84ed4b8a858a4838b3aa Mon Sep 17 00:00:00 2001
From: Robert Griesemer
-In The Unicode Standard 5.0,
+In The Unicode Standard 5.1,
Section 4.5 General Category-Normative
defines a set of character categories. Go treats
those characters in category Lu, Ll, Lt, Lm, or Lo as Unicode letters,
@@ -218,7 +218,7 @@ An identifier is a sequence of one or more letters and digits.
The first character in an identifier must be a letter.
-The following character sequences represent operators, delimiters, and other special tokens:
+The following character sequences represent operators, delimiters, and other special tokens:
-identifier = letter { letter | unicode_digit } .
+identifier = letter { letter | unicode_digit } .
a
@@ -244,7 +244,7 @@ continue for import return var
Operators and Delimiters
+ & += &= && == != ( )
@@ -265,10 +265,10 @@ sets a non-decimal base:
0
for octal, 0x
or
a-f
and A-F
represent values 10 through 15.
-int_lit = decimal_lit | octal_lit | hex_lit . -decimal_lit = ( "1" ... "9" ) { decimal_digit } . -octal_lit = "0" { octal_digit } . -hex_lit = "0" ( "x" | "X" ) hex_digit { hex_digit } . +int_lit = decimal_lit | octal_lit | hex_lit . +decimal_lit = ( "1" ... "9" ) { decimal_digit } . +octal_lit = "0" { octal_digit } . +hex_lit = "0" ( "x" | "X" ) hex_digit { hex_digit } .
@@ -289,11 +289,11 @@ integer part or the fractional part may be elided; one of the decimal point or the exponent may be elided.-float_lit = decimals "." [ decimals ] [ exponent ] | - decimals exponent | - "." decimals [ exponent ] . -decimals = decimal_digit { decimal_digit } . -exponent = ( "e" | "E" ) [ "+" | "-" ] decimals . +float_lit = decimals "." [ decimals ] [ exponent ] | + decimals exponent | + "." decimals [ exponent ] . +decimals = decimal_digit { decimal_digit } . +exponent = ( "e" | "E" ) [ "+" | "-" ] decimals .@@ -2527,6 +2527,7 @@ var f = float(1<<s); // illegal: 1 has type float, cannot shift var g = float(1<<33); // legal; 1<<33 is a constant shift operation; g == 1<<33+Operator precedence
Unary operators have the highest precedence. As the
++
and--
operators form @@ -2536,7 +2537,7 @@ As a consequence, statement*p++
is the same as(*p)++
There are six precedence levels for binary operators. Multiplication operators bind strongest, followed by addition -operators, comparison operators, communication operators, +operators, comparison operators,
@@ -2552,10 +2553,7 @@ Precedence Operator<-
(channel send),&&
(logical and), and finally||
(logical or):Binary operators of the same precedence associate from left to right. -For instance,
-x / y / z
is the same as(x / y) / z
. --Examples: +For instance,
x / y * z
is the same as(x / y) * z
.@@ -2564,7 +2562,7 @@ Examples: x <= f() ^a >> b f() || g() -x == y + 1 && <-chan_ptr > 0 +x == y+1 && <-chan_ptr > 0@@ -2963,7 +2961,7 @@ the receiver is provided as the first argument to the call. That is, givenf := T.Mv
,f
is invoked asf(t, 7)
nott.f(7)
. To construct a function that binds the receiver, use a -closure. +closure.