From 5583e8a4213467d3401710873f67403cb2de22f7 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Tue, 23 Feb 2016 10:42:06 -0800 Subject: [PATCH] spec: fix EBNF for slice syntax The () parentheses grouped wrongly. Removed them completely in favor of separate 2- and 3-index slice alternatives which is clearer. Fixes #14477. Change-Id: I0b7521ac912130d9ea8740b8793b3b88e2609418 Reviewed-on: https://go-review.googlesource.com/19853 Reviewed-by: Ian Lance Taylor --- doc/go_spec.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 6b6e75c7c9..437fc066bb 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -2443,9 +2443,8 @@ PrimaryExpr = Selector = "." identifier . Index = "[" Expression "]" . -Slice = "[" ( [ Expression ] ":" [ Expression ] ) | - ( [ Expression ] ":" Expression ":" Expression ) - "]" . +Slice = "[" [ Expression ] ":" [ Expression ] "]" | + "[" [ Expression ] ":" Expression ":" Expression "]" . TypeAssertion = "." "(" Type ")" . Arguments = "(" [ ( ExpressionList | Type [ "," ExpressionList ] ) [ "..." ] [ "," ] ] ")" .