1
0
mirror of https://github.com/golang/go synced 2024-11-22 06:24:38 -07:00

change notation: s/Stat/Stmt/ in grammatical productions

DELTA=26  (0 added, 0 deleted, 26 changed)
OCL=26703
CL=26705
This commit is contained in:
Rob Pike 2009-03-24 17:45:53 -07:00
parent 94b67eb8d8
commit 1141716c5c

View File

@ -2960,12 +2960,12 @@ Statements control execution.
<pre class="grammar"> <pre class="grammar">
Statement = Statement =
Declaration | EmptyStat | LabeledStat | Declaration | EmptyStmt | LabeledStmt |
SimpleStat | GoStat | ReturnStat | BreakStat | ContinueStat | GotoStat | SimpleStmt | GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStmt |
FallthroughStat | Block | IfStat | SwitchStat | SelectStat | ForStat | FallthroughStmt | Block | IfStmt | SwitchStmt | SelectStmt | ForStmt |
DeferStat . DeferStmt .
SimpleStat = ExpressionStat | IncDecStat | Assignment | SimpleVarDecl . SimpleStmt = ExpressionStmt | IncDecStmt | Assignment | SimpleVarDecl .
StatementList = Statement { Separator Statement } . StatementList = Statement { Separator Statement } .
Separator = [ ";" ] Separator = [ ";" ]
@ -2992,7 +2992,7 @@ The empty statement does nothing.
</p> </p>
<pre class="grammar"> <pre class="grammar">
EmptyStat = . EmptyStmt = .
</pre> </pre>
<p> <p>
@ -3009,7 +3009,7 @@ A labeled statement may be the target of a <code>goto</code>,
</p> </p>
<pre class="grammar"> <pre class="grammar">
LabeledStat = Label ":" Statement . LabeledStmt = Label ":" Statement .
Label = identifier . Label = identifier .
</pre> </pre>
@ -3027,7 +3027,7 @@ can appear in statement context.
<pre class="grammar"> <pre class="grammar">
ExpressionStat = Expression . ExpressionStmt = Expression .
</pre> </pre>
<pre> <pre>
@ -3045,7 +3045,7 @@ must be a variable, pointer indirection, field selector or index expression.
</p> </p>
<pre class="grammar"> <pre class="grammar">
IncDecStat = Expression ( "++" | "--" ) . IncDecStmt = Expression ( "++" | "--" ) .
</pre> </pre>
<p> <p>
@ -3141,7 +3141,7 @@ is equivalent to <code>true</code>.
</p> </p>
<pre class="grammar"> <pre class="grammar">
IfStat = "if" [ [ SimpleStat ] ";" ] [ Expression ] Block [ "else" Statement ] . IfStmt = "if" [ [ SimpleStmt ] ";" ] [ Expression ] Block [ "else" Statement ] .
</pre> </pre>
<pre> <pre>
@ -3178,7 +3178,7 @@ to execute.
</p> </p>
<pre class="grammar"> <pre class="grammar">
SwitchStat = ExprSwitchStat | TypeSwitchStat . SwitchStmt = ExprSwitchStmt | TypeSwitchStmt .
</pre> </pre>
<p> <p>
@ -3208,7 +3208,7 @@ the expression <code>true</code>.
</p> </p>
<pre class="grammar"> <pre class="grammar">
ExprSwitchStat = "switch" [ [ SimpleStat ] ";" ] [ Expression ] "{" { ExprCaseClause } "}" . ExprSwitchStmt = "switch" [ [ SimpleStmt ] ";" ] [ Expression ] "{" { ExprCaseClause } "}" .
ExprCaseClause = ExprSwitchCase ":" [ StatementList ] . ExprCaseClause = ExprSwitchCase ":" [ StatementList ] .
ExprSwitchCase = "case" ExpressionList | "default" . ExprSwitchCase = "case" ExpressionList | "default" .
</pre> </pre>
@ -3265,7 +3265,7 @@ in the type guard.
</p> </p>
<pre class="grammar"> <pre class="grammar">
TypeSwitchStat = "switch" [ [ SimpleStat ] ";" ] TypeSwitchGuard "{" { TypeCaseClause } "}" . TypeSwitchStmt = "switch" [ [ SimpleStmt ] ";" ] TypeSwitchGuard "{" { TypeCaseClause } "}" .
TypeSwitchGuard = identifier ":=" Expression "." "(" "type" ")" . TypeSwitchGuard = identifier ":=" Expression "." "(" "type" ")" .
TypeCaseClause = TypeSwitchCase ":" [ StatementList ] . TypeCaseClause = TypeSwitchCase ":" [ StatementList ] .
TypeSwitchCase = "case" ( type | "nil" ) | "default" . TypeSwitchCase = "case" ( type | "nil" ) | "default" .
@ -3331,7 +3331,7 @@ controlled by a condition, a "for" clause, or a "range" clause.
</p> </p>
<pre class="grammar"> <pre class="grammar">
ForStat = "for" [ Condition | ForClause | RangeClause ] Block . ForStmt = "for" [ Condition | ForClause | RangeClause ] Block .
Condition = Expression . Condition = Expression .
</pre> </pre>
@ -3359,9 +3359,9 @@ it declares ends at the end of the statement
</p> </p>
<pre class="grammar"> <pre class="grammar">
ForClause = [ InitStat ] ";" [ Condition ] ";" [ PostStat ] . ForClause = [ InitStmt ] ";" [ Condition ] ";" [ PostStmt ] .
InitStat = SimpleStat . InitStmt = SimpleStmt .
PostStat = SimpleStat . PostStmt = SimpleStmt .
</pre> </pre>
<pre> <pre>
@ -3460,7 +3460,7 @@ within the same address space.
</p> </p>
<pre class="grammar"> <pre class="grammar">
GoStat = "go" Expression . GoStmt = "go" Expression .
</pre> </pre>
<p> <p>
@ -3484,7 +3484,7 @@ cases all referring to communication operations.
</p> </p>
<pre class="grammar"> <pre class="grammar">
SelectStat = "select" "{" { CommClause } "}" . SelectStmt = "select" "{" { CommClause } "}" .
CommClause = CommCase ":" StatementList . CommClause = CommCase ":" StatementList .
CommCase = "case" ( SendExpr | RecvExpr) | "default" . CommCase = "case" ( SendExpr | RecvExpr) | "default" .
SendExpr = Expression "&lt;-" Expression . SendExpr = Expression "&lt;-" Expression .
@ -3557,7 +3557,7 @@ and optionally provides a result value or values to the caller.
</p> </p>
<pre class="grammar"> <pre class="grammar">
ReturnStat = "return" [ ExpressionList ] . ReturnStmt = "return" [ ExpressionList ] .
</pre> </pre>
<pre> <pre>
@ -3627,7 +3627,7 @@ A "break" statement terminates execution of the innermost
</p> </p>
<pre class="grammar"> <pre class="grammar">
BreakStat = "break" [ Label ]. BreakStmt = "break" [ Label ].
</pre> </pre>
<p> <p>
@ -3653,7 +3653,7 @@ innermost "for" loop at the post statement (§For statements).
</p> </p>
<pre class="grammar"> <pre class="grammar">
ContinueStat = "continue" [ Label ]. ContinueStmt = "continue" [ Label ].
</pre> </pre>
<p> <p>
@ -3667,7 +3667,7 @@ A "goto" statement transfers control to the statement with the corresponding lab
</p> </p>
<pre class="grammar"> <pre class="grammar">
GotoStat = "goto" Label . GotoStmt = "goto" Label .
</pre> </pre>
<pre> <pre>
@ -3702,7 +3702,7 @@ expression "switch" statement.
</p> </p>
<pre class="grammar"> <pre class="grammar">
FallthroughStat = "fallthrough" . FallthroughStmt = "fallthrough" .
</pre> </pre>
@ -3714,7 +3714,7 @@ the surrounding function returns.
</p> </p>
<pre class="grammar"> <pre class="grammar">
DeferStat = "defer" Expression . DeferStmt = "defer" Expression .
</pre> </pre>
<p> <p>