diff --git a/doc/go_spec.html b/doc/go_spec.html index 279dd279fa..3376c47065 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -22,20 +22,23 @@ dependencies.

-The grammar is compact and simple to parse, allowing for easy analysis +The syntax is compact and simple to parse, allowing for easy analysis by automatic tools such as integrated development environments.

Notation

-The syntax is specified using Extended Backus-Naur Form (EBNF): +The syntax is specified using a +variant +of Extended Backus-Naur Form (EBNF):

+Syntax      = { Production } .
 Production  = production_name "=" [ Expression ] "." .
-Expression  = Alternative { "|" Alternative } .
-Alternative = Term { Term } .
-Term        = production_name | token [ "…" token ] | Group | Option | Repetition .
+Expression  = Term { "|" Term } .
+Term        = Factor { Factor } .
+Factor      = production_name | token [ "…" token ] | Group | Option | Repetition .
 Group       = "(" Expression ")" .
 Option      = "[" Expression "]" .
 Repetition  = "{" Expression "}" .
@@ -53,7 +56,7 @@ operators, in increasing precedence:
 

-Lowercase production names are used to identify lexical tokens. +Lowercase production names are used to identify lexical (terminal) tokens. Non-terminals are in CamelCase. Lexical tokens are enclosed in double quotes "" or back quotes ``.

@@ -170,7 +173,7 @@ valid token.

Semicolons

-The formal grammar uses semicolons ";" as terminators in +The formal syntax uses semicolons ";" as terminators in a number of productions. Go programs may omit most of these semicolons using the following two rules:

@@ -3038,7 +3041,7 @@ Element = Expression | LiteralValue .

The LiteralType's core type T must be a struct, array, slice, or map type -(the grammar enforces this constraint except when the type is given +(the syntax enforces this constraint except when the type is given as a TypeName). The types of the elements and keys must be assignable to the respective field, element, and key types of type T;