]> Cypherpunks repositories - gostls13.git/commitdiff
cosmetic change only:
authorRobert Griesemer <gri@golang.org>
Thu, 22 Jan 2009 23:16:48 +0000 (15:16 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 22 Jan 2009 23:16:48 +0000 (15:16 -0800)
- slightly simplified a couple of productions (CommClause, SwitchClause)
  by reordering

R=r
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=23304
CL=23323

doc/go_spec.txt

index 50a647d55b63ad049363f1b32752f05706a286f3..6a64d5e4c65da030c62582b1bc42946ac6030ccf 100644 (file)
@@ -3,7 +3,7 @@ The Go Programming Language Specification (DRAFT)
 
 Robert Griesemer, Rob Pike, Ken Thompson
 
-(January 16, 2009)
+(January 22, 2009)
 
 ----
 
@@ -2638,8 +2638,8 @@ Switch statements
 Switches provide multi-way execution.
 
        SwitchStat = "switch" [ [ Simplestat ] ";" ] [ Expression ] "{" { CaseClause } "}" .
-       CaseClause = Case [ StatementList ] .
-       Case = ( "case" ExpressionList | "default" ) ":" .
+       CaseClause = SwitchCase ":" [ StatementList ] .
+       SwitchCase = "case" ExpressionList | "default" .
 
 There can be at most one default case in a switch statement. In a case clause,
 the last statement only may be a fallthrough statement ($Fallthrough statement).
@@ -2810,8 +2810,8 @@ will proceed.  It looks similar to a switch statement but with the
 cases all referring to communication operations.
 
        SelectStat = "select" "{" { CommClause } "}" .
-       CommClause = CommCase [ StatementList ] .
-       CommCase = ( "default" | ( "case" ( SendExpr | RecvExpr) ) ) ":" .
+       CommClause = CommCase ":" [ StatementList ] .
+       CommCase = "case" ( SendExpr | RecvExpr) | "default" .
        SendExpr =  Expression "<-" Expression .
        RecvExpr =  [ Expression ( "=" | ":=" ) ] "<-" Expression .