Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
1141716c
Commit
1141716c
authored
Mar 25, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change notation: s/Stat/Stmt/ in grammatical productions
DELTA=26 (0 added, 0 deleted, 26 changed) OCL=26703 CL=26705
parent
94b67eb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
go_spec.html
doc/go_spec.html
+25
-25
No files found.
doc/go_spec.html
View file @
1141716c
...
...
@@ -2960,12 +2960,12 @@ Statements control execution.
<pre
class=
"grammar"
>
Statement =
Declaration | EmptySt
at | LabeledSta
t |
SimpleSt
at | GoStat | ReturnStat | BreakStat | ContinueStat | GotoSta
t |
FallthroughSt
at | Block | IfStat | SwitchStat | SelectStat | ForSta
t |
DeferSt
a
t .
Declaration | EmptySt
mt | LabeledStm
t |
SimpleSt
mt | GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStm
t |
FallthroughSt
mt | Block | IfStmt | SwitchStmt | SelectStmt | ForStm
t |
DeferSt
m
t .
SimpleSt
at = ExpressionStat | IncDecSta
t | Assignment | SimpleVarDecl .
SimpleSt
mt = ExpressionStmt | IncDecStm
t | Assignment | SimpleVarDecl .
StatementList = Statement { Separator Statement } .
Separator = [ ";" ]
...
...
@@ -2992,7 +2992,7 @@ The empty statement does nothing.
</p>
<pre
class=
"grammar"
>
EmptySt
a
t = .
EmptySt
m
t = .
</pre>
<p>
...
...
@@ -3009,7 +3009,7 @@ A labeled statement may be the target of a <code>goto</code>,
</p>
<pre
class=
"grammar"
>
LabeledSt
a
t = Label ":" Statement .
LabeledSt
m
t = Label ":" Statement .
Label = identifier .
</pre>
...
...
@@ -3027,7 +3027,7 @@ can appear in statement context.
<pre
class=
"grammar"
>
ExpressionSt
a
t = Expression .
ExpressionSt
m
t = Expression .
</pre>
<pre>
...
...
@@ -3045,7 +3045,7 @@ must be a variable, pointer indirection, field selector or index expression.
</p>
<pre
class=
"grammar"
>
IncDecSt
a
t = Expression ( "++" | "--" ) .
IncDecSt
m
t = Expression ( "++" | "--" ) .
</pre>
<p>
...
...
@@ -3141,7 +3141,7 @@ is equivalent to <code>true</code>.
</p>
<pre
class=
"grammar"
>
IfSt
at = "if" [ [ SimpleSta
t ] ";" ] [ Expression ] Block [ "else" Statement ] .
IfSt
mt = "if" [ [ SimpleStm
t ] ";" ] [ Expression ] Block [ "else" Statement ] .
</pre>
<pre>
...
...
@@ -3178,7 +3178,7 @@ to execute.
</p>
<pre
class=
"grammar"
>
SwitchSt
at = ExprSwitchStat | TypeSwitchSta
t .
SwitchSt
mt = ExprSwitchStmt | TypeSwitchStm
t .
</pre>
<p>
...
...
@@ -3208,7 +3208,7 @@ the expression <code>true</code>.
</p>
<pre
class=
"grammar"
>
ExprSwitchSt
at = "switch" [ [ SimpleSta
t ] ";" ] [ Expression ] "{" { ExprCaseClause } "}" .
ExprSwitchSt
mt = "switch" [ [ SimpleStm
t ] ";" ] [ Expression ] "{" { ExprCaseClause } "}" .
ExprCaseClause = ExprSwitchCase ":" [ StatementList ] .
ExprSwitchCase = "case" ExpressionList | "default" .
</pre>
...
...
@@ -3265,7 +3265,7 @@ in the type guard.
</p>
<pre
class=
"grammar"
>
TypeSwitchSt
at = "switch" [ [ SimpleSta
t ] ";" ] TypeSwitchGuard "{" { TypeCaseClause } "}" .
TypeSwitchSt
mt = "switch" [ [ SimpleStm
t ] ";" ] TypeSwitchGuard "{" { TypeCaseClause } "}" .
TypeSwitchGuard = identifier ":=" Expression "." "(" "type" ")" .
TypeCaseClause = TypeSwitchCase ":" [ StatementList ] .
TypeSwitchCase = "case" ( type | "nil" ) | "default" .
...
...
@@ -3331,7 +3331,7 @@ controlled by a condition, a "for" clause, or a "range" clause.
</p>
<pre
class=
"grammar"
>
ForSt
a
t = "for" [ Condition | ForClause | RangeClause ] Block .
ForSt
m
t = "for" [ Condition | ForClause | RangeClause ] Block .
Condition = Expression .
</pre>
...
...
@@ -3359,9 +3359,9 @@ it declares ends at the end of the statement
</p>
<pre
class=
"grammar"
>
ForClause = [ InitSt
at ] ";" [ Condition ] ";" [ PostSta
t ] .
InitSt
at = SimpleSta
t .
PostSt
at = SimpleSta
t .
ForClause = [ InitSt
mt ] ";" [ Condition ] ";" [ PostStm
t ] .
InitSt
mt = SimpleStm
t .
PostSt
mt = SimpleStm
t .
</pre>
<pre>
...
...
@@ -3460,7 +3460,7 @@ within the same address space.
</p>
<pre
class=
"grammar"
>
GoSt
a
t = "go" Expression .
GoSt
m
t = "go" Expression .
</pre>
<p>
...
...
@@ -3484,7 +3484,7 @@ cases all referring to communication operations.
</p>
<pre
class=
"grammar"
>
SelectSt
a
t = "select" "{" { CommClause } "}" .
SelectSt
m
t = "select" "{" { CommClause } "}" .
CommClause = CommCase ":" StatementList .
CommCase = "case" ( SendExpr | RecvExpr) | "default" .
SendExpr = Expression "
<
-" Expression .
...
...
@@ -3557,7 +3557,7 @@ and optionally provides a result value or values to the caller.
</p>
<pre
class=
"grammar"
>
ReturnSt
a
t = "return" [ ExpressionList ] .
ReturnSt
m
t = "return" [ ExpressionList ] .
</pre>
<pre>
...
...
@@ -3627,7 +3627,7 @@ A "break" statement terminates execution of the innermost
</p>
<pre
class=
"grammar"
>
BreakSt
a
t = "break" [ Label ].
BreakSt
m
t = "break" [ Label ].
</pre>
<p>
...
...
@@ -3653,7 +3653,7 @@ innermost "for" loop at the post statement (§For statements).
</p>
<pre
class=
"grammar"
>
ContinueSt
a
t = "continue" [ Label ].
ContinueSt
m
t = "continue" [ Label ].
</pre>
<p>
...
...
@@ -3667,7 +3667,7 @@ A "goto" statement transfers control to the statement with the corresponding lab
</p>
<pre
class=
"grammar"
>
GotoSt
a
t = "goto" Label .
GotoSt
m
t = "goto" Label .
</pre>
<pre>
...
...
@@ -3702,7 +3702,7 @@ expression "switch" statement.
</p>
<pre
class=
"grammar"
>
FallthroughSt
a
t = "fallthrough" .
FallthroughSt
m
t = "fallthrough" .
</pre>
...
...
@@ -3714,7 +3714,7 @@ the surrounding function returns.
</p>
<pre
class=
"grammar"
>
DeferSt
a
t = "defer" Expression .
DeferSt
m
t = "defer" Expression .
</pre>
<p>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment