From dea4394a674c9b7868eb06b2325fc17a909c3064 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 16 Mar 2009 17:36:52 -0700 Subject: [PATCH] instead of unlabeled statements, have a single labeled statement - no syntactic or semantic change R=r DELTA=45 (24 added, 18 deleted, 3 changed) OCL=26349 CL=26368 --- doc/go_spec.html | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 315df8f1987..18c4b84a25d 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -2908,16 +2908,13 @@ Statements control execution.

-Statement = { Label ":" } UnlabeledStatement .
-Label     = identifier .
-UnlabeledStatement =
-	Declaration | EmptyStat |
+Statement =
+	Declaration | EmptyStat | LabeledStat |
 	SimpleStat | GoStat | ReturnStat | BreakStat | ContinueStat | GotoStat |
 	FallthroughStat | Block | IfStat | SwitchStat | SelectStat | ForStat |
 	DeferStat .
 
-SimpleStat =
-	ExpressionStat | IncDecStat | Assignment | SimpleVarDecl .
+SimpleStat = ExpressionStat | IncDecStat | Assignment | SimpleVarDecl .
 
 StatementList = Statement { Separator Statement } .
 Separator     = [ ";" ]
@@ -2936,14 +2933,6 @@ which may be omitted only if the previous statement:
 	    (including "switch" and "select" statements).
 
 
-

-A labeled statement may be the target of a goto, -break or continue statement. -

- -
-Error: log.Fatal("error encountered")
-

Empty statements

@@ -2961,6 +2950,23 @@ adding an empty statement.

+

Labeled statements

+ +

+A labeled statement may be the target of a goto, +break or continue statement. +

+ +
+LabeledStat = Label ":" Statement .
+Label       = identifier .
+
+ +
+Error: log.Fatal("error encountered")
+
+ +

Expression statements