Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
0006c832
Commit
0006c832
authored
Jun 17, 2008
by
Ken Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optional semi-colons
SVN=123245
parent
9615542d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
src/cmd/gc/go.y
src/cmd/gc/go.y
+25
-11
No files found.
src/cmd/gc/go.y
View file @
0006c832
...
...
@@ -33,7 +33,7 @@
%
type
<
node
>
else_stmt1
else_stmt2
%
type
<
node
>
complex_stmt
compound_stmt
ostmt_list
%
type
<
node
>
stmt_list_r
Astmt_list_r
Bstmt_list_r
%
type
<
node
>
Astmt
Bstmt
Cstmt
%
type
<
node
>
Astmt
Bstmt
Cstmt
Dstmt
%
type
<
node
>
for_stmt
for_body
for_header
%
type
<
node
>
if_stmt
if_body
if_header
%
type
<
node
>
range_header
range_body
range_stmt
...
...
@@ -314,10 +314,6 @@ complex_stmt:
poptodcl
();
$$
=
nod
(
OXCASE
,
N
,
N
);
}
|
new_name
':'
{
$$
=
nod
(
OLABEL
,
$
1
,
N
);
}
semi_stmt
:
LFALL
...
...
@@ -1101,31 +1097,49 @@ Cstmt:
simple_stmt
/*
*
statement
list
that
need
semi
in
back
NO
*
need
semi
in
front
YES
*
need
semi
in
back
NO
*/
Dstmt
:
new_name
':'
{
$$
=
nod
(
OLABEL
,
$
1
,
N
);
}
/*
*
statement
list
that
ends
AorD
*/
Astmt_list_r
:
Astmt
|
Dstmt
|
Astmt_list_r
Astmt
{
$$
=
nod
(
OLIST
,
$
1
,
$
2
);
}
|
Bstmt_list_r
';'
|
Astmt_list_r
Dstmt
{
$$
=
nod
(
OLIST
,
$
1
,
$
2
);
}
|
Bstmt_list_r
Astmt
{
$$
=
nod
(
OLIST
,
$
1
,
$
2
);
}
/*
*
statement
list
that
need
semi
in
back
YES
*
statement
list
that
ends
BorC
*/
Bstmt_list_r
:
Bstmt
|
Cstmt
|
B
stmt_list_r
Bstmt
|
A
stmt_list_r
Bstmt
{
$$
=
nod
(
OLIST
,
$
1
,
$
2
);
}
|
Astmt_list_r
B
stmt
|
Astmt_list_r
C
stmt
{
$$
=
nod
(
OLIST
,
$
1
,
$
2
);
}
|
Astmt_list_r
C
stmt
|
Bstmt_list_r
B
stmt
{
$$
=
nod
(
OLIST
,
$
1
,
$
2
);
}
...
...
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