Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
cea554e0
Commit
cea554e0
authored
Jun 05, 2002
by
Zack Weinberg
Committed by
Zack Weinberg
Jun 05, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gengtype-yacc.y: Make sure all rules end with a semicolon.
From-SVN: r54270
parent
07232638
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
gcc/ChangeLog
+4
-0
gcc/gengtype-yacc.y
+19
-3
No files found.
gcc/ChangeLog
View file @
cea554e0
2002-06-04 Zack Weinberg <zack@codesourcery.com>
* gengtype-yacc.y: Make sure all rules end with a semicolon.
2002-06-04 Bob Wilson <bob.wilson@acm.org>
2002-06-04 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (xtensa_init_machine_status): Fix
* config/xtensa/xtensa.c (xtensa_init_machine_status): Fix
...
...
gcc/gengtype-yacc.y
View file @
cea554e0
...
@@ -63,6 +63,7 @@ start: /* empty */
...
@@ -63,6 +63,7 @@ start: /* empty */
| typedef_struct start
| typedef_struct start
| externstatic start
| externstatic start
| yacc_union start
| yacc_union start
;
typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID
typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID
{
{
...
@@ -79,6 +80,7 @@ typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID
...
@@ -79,6 +80,7 @@ typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID
lexer_toplevel_done = 1;
lexer_toplevel_done = 1;
}
}
';'
';'
;
externstatic: ENT_EXTERNSTATIC options lasttype ID semiequal
externstatic: ENT_EXTERNSTATIC options lasttype ID semiequal
{
{
...
@@ -96,21 +98,25 @@ externstatic: ENT_EXTERNSTATIC options lasttype ID semiequal
...
@@ -96,21 +98,25 @@ externstatic: ENT_EXTERNSTATIC options lasttype ID semiequal
$5),
$5),
$2, &lexer_line);
$2, &lexer_line);
}
}
;
lasttype: type
lasttype: type
{
{
lexer_toplevel_done = 1;
lexer_toplevel_done = 1;
$$ = $1;
$$ = $1;
}
}
;
semiequal: ';'
semiequal: ';'
| '='
| '='
;
;
yacc_union: ENT_YACCUNION options struct_fields '}' yacc_typematch PERCENTPERCENT
yacc_union: ENT_YACCUNION options struct_fields '}' yacc_typematch
PERCENTPERCENT
{
{
note_yacc_type ($2, $3, $5, &lexer_line);
note_yacc_type ($2, $3, $5, &lexer_line);
}
}
;
yacc_typematch: /* empty */
yacc_typematch: /* empty */
{ $$ = NULL; }
{ $$ = NULL; }
...
@@ -170,6 +176,7 @@ yacc_ids: /* empty */
...
@@ -170,6 +176,7 @@ yacc_ids: /* empty */
sprintf (p->opt->info, "'%s'", $2);
sprintf (p->opt->info, "'%s'", $2);
$$ = p;
$$ = p;
}
}
;
struct_fields: { $$ = NULL; }
struct_fields: { $$ = NULL; }
| type optionsopt ID bitfieldopt ';' struct_fields
| type optionsopt ID bitfieldopt ';' struct_fields
...
@@ -202,9 +209,11 @@ struct_fields: { $$ = NULL; }
...
@@ -202,9 +209,11 @@ struct_fields: { $$ = NULL; }
p->line = lexer_line;
p->line = lexer_line;
$$ = p;
$$ = p;
}
}
;
bitfieldopt: /* empty */
bitfieldopt: /* empty */
| ':' NUM
| ':' NUM
;
type: SCALAR
type: SCALAR
{ $$ = $1; }
{ $$ = $1; }
...
@@ -230,6 +239,7 @@ type: SCALAR
...
@@ -230,6 +239,7 @@ type: SCALAR
{ $$ = create_scalar_type ($2, strlen ($2)); }
{ $$ = create_scalar_type ($2, strlen ($2)); }
| ENUM ID '{' enum_items '}'
| ENUM ID '{' enum_items '}'
{ $$ = create_scalar_type ($2, strlen ($2)); }
{ $$ = create_scalar_type ($2, strlen ($2)); }
;
enum_items: /* empty */
enum_items: /* empty */
| ID '=' NUM ',' enum_items
| ID '=' NUM ',' enum_items
...
@@ -242,13 +252,17 @@ enum_items: /* empty */
...
@@ -242,13 +252,17 @@ enum_items: /* empty */
optionsopt: { $$ = NULL; }
optionsopt: { $$ = NULL; }
| options { $$ = $1; }
| options { $$ = $1; }
;
options: GTY_TOKEN '(' '(' optionseqopt ')' ')' { $$ = $4; }
options: GTY_TOKEN '(' '(' optionseqopt ')' ')'
{ $$ = $4; }
;
type_option : ALIAS
type_option : ALIAS
{ $$ = "ptr_alias"; }
{ $$ = "ptr_alias"; }
| PARAM_IS
| PARAM_IS
{ $$ = "param_is"; }
{ $$ = "param_is"; }
;
option: type_option '(' type ')'
option: type_option '(' type ')'
{
{
...
@@ -264,6 +278,7 @@ option: type_option '(' type ')'
...
@@ -264,6 +278,7 @@ option: type_option '(' type ')'
o->info = (void *)$3;
o->info = (void *)$3;
$$ = o;
$$ = o;
}
}
;
optionseq: option
optionseq: option
{
{
...
@@ -275,8 +290,9 @@ optionseq: option
...
@@ -275,8 +290,9 @@ optionseq: option
$3->next = $1;
$3->next = $1;
$$ = $3;
$$ = $3;
}
}
;
optionseqopt: { $$ = NULL }
optionseqopt: { $$ = NULL }
| optionseq { $$ = $1; }
| optionseq { $$ = $1; }
;
%%
%%
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