Commit 84d901be by Akim Demaille Committed by Zack Weinberg

c-parse.in (initelt: identifier ':' initval): Add an empty action to fix a type clash.

2002-06-19  Akim Demaille  <akim@epita.fr>

	* c-parse.in (initelt: identifier ':' initval): Add an empty
	action to fix a type clash.
	(aliasdecl, classdef): Add the missing closing `;'.
	Whitespace changes.
	* gengtype-yacc.y (typedef_struct): Add an empty action to preevnt
	$$ = $1 type clashes.

cp:
	* parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
	decl.h's TYPENAME.
	* spew.c, lex.c: Adjust.
	* parse.y (explicit_instantiation): Add empty action to override
	the default $$ = $1 where it introduces a type clash.

From-SVN: r54811
parent ef40bc65
2002-06-19 Akim Demaille <akim@epita.fr>
* c-parse.in (initelt: identifier ':' initval): Add an empty
action to fix a type clash.
(aliasdecl, classdef): Add the missing closing `;'.
Whitespace changes.
* gengtype-yacc.y (typedef_struct): Add an empty action to preevnt
$$ = $1 type clashes.
2002-06-19 Eric Christopher <echristo@redhat.com> 2002-06-19 Eric Christopher <echristo@redhat.com>
* config/mips/mips.c (symbol_operand): New function. * config/mips/mips.c (symbol_operand): New function.
...@@ -70,7 +79,7 @@ ...@@ -70,7 +79,7 @@
2002-06-19 Andrew Pinski <pinskia@physics.uc.edu> 2002-06-19 Andrew Pinski <pinskia@physics.uc.edu>
* cpptrad.c (_cpp_replacement_text_len): initialize len. * cpptrad.c (_cpp_replacement_text_len): initialize len.
2002-06-19 Jason Merrill <jason@redhat.com> 2002-06-19 Jason Merrill <jason@redhat.com>
......
2002-06-19 Akim Demaille <akim@epita.fr>
* parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
decl.h's TYPENAME.
* spew.c, lex.c: Adjust.
* parse.y (explicit_instantiation): Add empty action to override
the default $$ = $1 where it introduces a type clash.
2002-06-14 Jason Merrill <jason@redhat.com> 2002-06-14 Jason Merrill <jason@redhat.com>
* semantics.c (begin_for_stmt): Push the 'for' scope before * semantics.c (begin_for_stmt): Push the 'for' scope before
...@@ -75,8 +83,8 @@ ...@@ -75,8 +83,8 @@
* mangle.c (start_mangling): Allocate G.substitutions here... * mangle.c (start_mangling): Allocate G.substitutions here...
(init_mangle): ... rather than here. (init_mangle): ... rather than here.
(finish_mangling): Clear the varray pointer when done with it. (finish_mangling): Clear the varray pointer when done with it.
* spew.c (yylexstring): Don't use VARRAY_FREE. * spew.c (yylexstring): Don't use VARRAY_FREE.
* search.c (bfs_walk): Don't use VARRAY_FREE. * search.c (bfs_walk): Don't use VARRAY_FREE.
* decl2.c (pending_statics): Use gengtype to mark. * decl2.c (pending_statics): Use gengtype to mark.
(deferred_fns): Likewise. (deferred_fns): Likewise.
(ssdf_decls): Likewise. (ssdf_decls): Likewise.
...@@ -988,7 +996,7 @@ ...@@ -988,7 +996,7 @@
2002-03-21 Aldy Hernandez <aldyh@redhat.com> 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
* tree.c (cp_cannot_inline_tree_fn): Same. * tree.c (cp_cannot_inline_tree_fn): Same.
2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk> 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
...@@ -1306,10 +1314,10 @@ ...@@ -1306,10 +1314,10 @@
2002-02-21 Aldy Hernandez <aldyh@redhat.com> 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
* cp/decl.c (duplicate_decls): Merge always_inline attribute. * cp/decl.c (duplicate_decls): Merge always_inline attribute.
* cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
unless DECL_ALWAYS_INLINE. unless DECL_ALWAYS_INLINE.
2002-02-20 Jakub Jelinek <jakub@redhat.com> 2002-02-20 Jakub Jelinek <jakub@redhat.com>
......
...@@ -86,10 +86,11 @@ extern YYSTYPE yylval; /* the semantic value of the */ ...@@ -86,10 +86,11 @@ extern YYSTYPE yylval; /* the semantic value of the */
int warn_traditional = 0; int warn_traditional = 0;
int flag_digraphs = 1; int flag_digraphs = 1;
/* the declaration found for the last IDENTIFIER token read in. /* the declaration found for the last IDENTIFIER token read in. yylex
yylex must look this up to detect typedefs, which get token type TYPENAME, must look this up to detect typedefs, which get token type
so it is left around in case the identifier is not a typedef but is tTYPENAME, so it is left around in case the identifier is not a
used in a context which makes it a reference to a variable. */ typedef but is used in a context which makes it a reference to a
variable. */
tree lastiddecl; tree lastiddecl;
/* Array for holding counts of the numbers of tokens seen. */ /* Array for holding counts of the numbers of tokens seen. */
...@@ -692,7 +693,7 @@ yyprint (file, yychar, yylval) ...@@ -692,7 +693,7 @@ yyprint (file, yychar, yylval)
switch (yychar) switch (yychar)
{ {
case IDENTIFIER: case IDENTIFIER:
case TYPENAME: case tTYPENAME:
case TYPESPEC: case TYPESPEC:
case PTYPENAME: case PTYPENAME:
case PFUNCNAME: case PFUNCNAME:
...@@ -914,7 +915,7 @@ check_for_missing_semicolon (type) ...@@ -914,7 +915,7 @@ check_for_missing_semicolon (type)
if ((yychar > 255 if ((yychar > 255
&& yychar != SCSPEC && yychar != SCSPEC
&& yychar != IDENTIFIER && yychar != IDENTIFIER
&& yychar != TYPENAME && yychar != tTYPENAME
&& yychar != CV_QUALIFIER && yychar != CV_QUALIFIER
&& yychar != SELFNAME) && yychar != SELFNAME)
|| yychar == 0 /* EOF */) || yychar == 0 /* EOF */)
......
...@@ -86,7 +86,7 @@ struct unparsed_text GTY(()) ...@@ -86,7 +86,7 @@ struct unparsed_text GTY(())
struct token_chunk * tokens; /* Start of the token list. */ struct token_chunk * tokens; /* Start of the token list. */
struct token_chunk *last_chunk; /* End of the token list. */ struct token_chunk *last_chunk; /* End of the token list. */
short last_pos; /* Number of tokens used in the last chunk of short last_pos; /* Number of tokens used in the last chunk of
TOKENS. */ TOKENS. */
short cur_pos; /* Current token in 'cur_chunk', when rescanning. */ short cur_pos; /* Current token in 'cur_chunk', when rescanning. */
...@@ -126,7 +126,7 @@ static SPEW_INLINE void consume_token PARAMS ((void)); ...@@ -126,7 +126,7 @@ static SPEW_INLINE void consume_token PARAMS ((void));
static SPEW_INLINE int read_process_identifier PARAMS ((YYSTYPE *)); static SPEW_INLINE int read_process_identifier PARAMS ((YYSTYPE *));
static SPEW_INLINE void feed_input PARAMS ((struct unparsed_text *)); static SPEW_INLINE void feed_input PARAMS ((struct unparsed_text *));
static SPEW_INLINE struct token * space_for_token static SPEW_INLINE struct token * space_for_token
PARAMS ((struct unparsed_text *t)); PARAMS ((struct unparsed_text *t));
static SPEW_INLINE struct token * remove_last_token static SPEW_INLINE struct token * remove_last_token
PARAMS ((struct unparsed_text *t)); PARAMS ((struct unparsed_text *t));
...@@ -161,10 +161,11 @@ static enum cpp_ttype last_token; ...@@ -161,10 +161,11 @@ static enum cpp_ttype last_token;
static tree last_token_id; static tree last_token_id;
/* From lex.c: */ /* From lex.c: */
/* the declaration found for the last IDENTIFIER token read in. /* the declaration found for the last IDENTIFIER token read in. yylex
yylex must look this up to detect typedefs, which get token type TYPENAME, must look this up to detect typedefs, which get token type
so it is left around in case the identifier is not a typedef but is tTYPENAME, so it is left around in case the identifier is not a
used in a context which makes it a reference to a variable. */ typedef but is used in a context which makes it a reference to a
variable. */
extern tree lastiddecl; /* let our brains leak out here too */ extern tree lastiddecl; /* let our brains leak out here too */
extern int yychar; /* the lookahead symbol */ extern int yychar; /* the lookahead symbol */
extern YYSTYPE yylval; /* the semantic value of the */ extern YYSTYPE yylval; /* the semantic value of the */
...@@ -178,7 +179,7 @@ static int first_token; ...@@ -178,7 +179,7 @@ static int first_token;
through and parse all of them using do_pending_defargs. Since yacc through and parse all of them using do_pending_defargs. Since yacc
parsers are not reentrant, we retain defargs state in these two parsers are not reentrant, we retain defargs state in these two
variables so that subsequent calls to do_pending_defargs can resume variables so that subsequent calls to do_pending_defargs can resume
where the previous call left off. DEFARG_FNS is a tree_list where where the previous call left off. DEFARG_FNS is a tree_list where
the TREE_TYPE is the current_class_type, TREE_VALUE is the FUNCTION_DECL, the TREE_TYPE is the current_class_type, TREE_VALUE is the FUNCTION_DECL,
and TREE_PURPOSE is the list unprocessed dependent functions. */ and TREE_PURPOSE is the list unprocessed dependent functions. */
...@@ -359,7 +360,7 @@ read_token (t) ...@@ -359,7 +360,7 @@ read_token (t)
case CPP_EOF: case CPP_EOF:
t->yychar = 0; t->yychar = 0;
break; break;
case CPP_NAME: case CPP_NAME:
t->yychar = read_process_identifier (&t->yylval); t->yychar = read_process_identifier (&t->yylval);
break; break;
...@@ -486,12 +487,12 @@ next_token (t) ...@@ -486,12 +487,12 @@ next_token (t)
feed->input->cur_chunk = feed->input->cur_chunk->next; feed->input->cur_chunk = feed->input->cur_chunk->next;
feed->input->cur_pos = 0; feed->input->cur_pos = 0;
} }
memcpy (t, feed->input->cur_chunk->toks + feed->input->cur_pos, memcpy (t, feed->input->cur_chunk->toks + feed->input->cur_pos,
sizeof (struct token)); sizeof (struct token));
feed->input->cur_pos++; feed->input->cur_pos++;
return t->yychar; return t->yychar;
} }
memcpy (t, &Teosi, sizeof (struct token)); memcpy (t, &Teosi, sizeof (struct token));
return END_OF_SAVED_INPUT; return END_OF_SAVED_INPUT;
} }
...@@ -579,7 +580,7 @@ scan_tokens (n) ...@@ -579,7 +580,7 @@ scan_tokens (n)
goto pad_tokens; goto pad_tokens;
} }
return; return;
pad_tokens: pad_tokens:
while (num_tokens () <= n) while (num_tokens () <= n)
obstack_grow (&token_obstack, &Tpad, sizeof (struct token)); obstack_grow (&token_obstack, &Tpad, sizeof (struct token));
...@@ -605,7 +606,7 @@ identifier_type (decl) ...@@ -605,7 +606,7 @@ identifier_type (decl)
{ {
if (TREE_CODE (DECL_TEMPLATE_RESULT (decl)) == TYPE_DECL) if (TREE_CODE (DECL_TEMPLATE_RESULT (decl)) == TYPE_DECL)
return PTYPENAME; return PTYPENAME;
else if (looking_for_template) else if (looking_for_template)
return PFUNCNAME; return PFUNCNAME;
} }
if (looking_for_template && really_overloaded_fn (decl)) if (looking_for_template && really_overloaded_fn (decl))
...@@ -615,7 +616,7 @@ identifier_type (decl) ...@@ -615,7 +616,7 @@ identifier_type (decl)
decl = TREE_VALUE (decl); decl = TREE_VALUE (decl);
for (t = decl; t != NULL_TREE; t = OVL_CHAIN (t)) for (t = decl; t != NULL_TREE; t = OVL_CHAIN (t))
if (DECL_FUNCTION_TEMPLATE_P (OVL_FUNCTION (t))) if (DECL_FUNCTION_TEMPLATE_P (OVL_FUNCTION (t)))
return PFUNCNAME; return PFUNCNAME;
} }
if (TREE_CODE (decl) == NAMESPACE_DECL) if (TREE_CODE (decl) == NAMESPACE_DECL)
...@@ -636,11 +637,11 @@ identifier_type (decl) ...@@ -636,11 +637,11 @@ identifier_type (decl)
if (t && t == decl) if (t && t == decl)
return SELFNAME; return SELFNAME;
return TYPENAME; return tTYPENAME;
} }
/* token[0] == AGGR (struct/union/enum) /* token[0] == AGGR (struct/union/enum)
Thus, token[1] is either a TYPENAME or a TYPENAME_DEFN. Thus, token[1] is either a tTYPENAME or a TYPENAME_DEFN.
If token[2] == '{' or ':' then it's TYPENAME_DEFN. If token[2] == '{' or ':' then it's TYPENAME_DEFN.
It's also a definition if it's a forward declaration (as in 'struct Foo;') It's also a definition if it's a forward declaration (as in 'struct Foo;')
which we can tell if token[2] == ';' *and* token[-1] != FRIEND or NEW. */ which we can tell if token[2] == ';' *and* token[-1] != FRIEND or NEW. */
...@@ -649,10 +650,10 @@ static SPEW_INLINE void ...@@ -649,10 +650,10 @@ static SPEW_INLINE void
do_aggr () do_aggr ()
{ {
int yc1, yc2; int yc1, yc2;
scan_tokens (2); scan_tokens (2);
yc1 = nth_token (1)->yychar; yc1 = nth_token (1)->yychar;
if (yc1 != TYPENAME && yc1 != IDENTIFIER && yc1 != PTYPENAME) if (yc1 != tTYPENAME && yc1 != IDENTIFIER && yc1 != PTYPENAME)
return; return;
yc2 = nth_token (2)->yychar; yc2 = nth_token (2)->yychar;
if (yc2 == ';') if (yc2 == ';')
...@@ -667,7 +668,7 @@ do_aggr () ...@@ -667,7 +668,7 @@ do_aggr ()
switch (yc1) switch (yc1)
{ {
case TYPENAME: case tTYPENAME:
nth_token (1)->yychar = TYPENAME_DEFN; nth_token (1)->yychar = TYPENAME_DEFN;
break; break;
case PTYPENAME: case PTYPENAME:
...@@ -679,7 +680,7 @@ do_aggr () ...@@ -679,7 +680,7 @@ do_aggr ()
default: default:
abort (); abort ();
} }
} }
void void
see_typename () see_typename ()
...@@ -739,7 +740,7 @@ yylex () ...@@ -739,7 +740,7 @@ yylex ()
{ {
case EMPTY: case EMPTY:
/* This is a lexical no-op. */ /* This is a lexical no-op. */
#ifdef SPEW_DEBUG #ifdef SPEW_DEBUG
if (spew_debug) if (spew_debug)
debug_yychar (yychr); debug_yychar (yychr);
#endif #endif
...@@ -758,14 +759,14 @@ yylex () ...@@ -758,14 +759,14 @@ yylex ()
case IDENTIFIER: case IDENTIFIER:
{ {
int peek; int peek;
scan_tokens (1); scan_tokens (1);
peek = nth_token (1)->yychar; peek = nth_token (1)->yychar;
yychr = frob_id (yychr, peek, &nth_token (0)->yylval.ttype); yychr = frob_id (yychr, peek, &nth_token (0)->yylval.ttype);
break; break;
} }
case IDENTIFIER_DEFN: case IDENTIFIER_DEFN:
case TYPENAME: case tTYPENAME:
case TYPENAME_DEFN: case TYPENAME_DEFN:
case PTYPENAME: case PTYPENAME:
case PTYPENAME_DEFN: case PTYPENAME_DEFN:
...@@ -831,13 +832,13 @@ yylex () ...@@ -831,13 +832,13 @@ yylex ()
yychar = yychr; yychar = yychr;
{ {
struct token *tok = nth_token (0); struct token *tok = nth_token (0);
yylval = tok->yylval; yylval = tok->yylval;
if (tok->lineno) if (tok->lineno)
lineno = tok->lineno; lineno = tok->lineno;
} }
#ifdef SPEW_DEBUG #ifdef SPEW_DEBUG
if (spew_debug) if (spew_debug)
debug_yychar (yychr); debug_yychar (yychr);
#endif #endif
...@@ -883,7 +884,7 @@ frob_id (yyc, peek, idp) ...@@ -883,7 +884,7 @@ frob_id (yyc, peek, idp)
{ {
tree trrr; tree trrr;
int old_looking_for_typename = 0; int old_looking_for_typename = 0;
if (peek == SCOPE) if (peek == SCOPE)
{ {
/* Don't interfere with the setting from an 'aggr' prefix. */ /* Don't interfere with the setting from an 'aggr' prefix. */
...@@ -898,7 +899,7 @@ frob_id (yyc, peek, idp) ...@@ -898,7 +899,7 @@ frob_id (yyc, peek, idp)
yyc = identifier_type (trrr); yyc = identifier_type (trrr);
switch(yyc) switch(yyc)
{ {
case TYPENAME: case tTYPENAME:
case SELFNAME: case SELFNAME:
case NSNAME: case NSNAME:
case PTYPENAME: case PTYPENAME:
...@@ -1042,7 +1043,7 @@ space_for_token (t) ...@@ -1042,7 +1043,7 @@ space_for_token (t)
t->last_chunk->next = ggc_alloc (sizeof (*t->last_chunk->next)); t->last_chunk->next = ggc_alloc (sizeof (*t->last_chunk->next));
t->last_chunk = t->last_chunk->next; t->last_chunk = t->last_chunk->next;
t->last_chunk->next = NULL; t->last_chunk->next = NULL;
t->last_pos = 1; t->last_pos = 1;
return t->last_chunk->toks; return t->last_chunk->toks;
} }
...@@ -1134,7 +1135,7 @@ snarf_block (t) ...@@ -1134,7 +1135,7 @@ snarf_block (t)
{ {
if (!look_for_catch) if (!look_for_catch)
break; break;
if (next_token (space_for_token (t)) != CATCH) if (next_token (space_for_token (t)) != CATCH)
{ {
push_token (remove_last_token (t)); push_token (remove_last_token (t));
...@@ -1149,7 +1150,7 @@ snarf_block (t) ...@@ -1149,7 +1150,7 @@ snarf_block (t)
if (look_for_lbrac) if (look_for_lbrac)
{ {
struct token *fake; struct token *fake;
error ("function body for constructor missing"); error ("function body for constructor missing");
/* fake a { } to avoid further errors */ /* fake a { } to avoid further errors */
fake = space_for_token (t); fake = space_for_token (t);
...@@ -1183,7 +1184,7 @@ snarf_method (decl) ...@@ -1183,7 +1184,7 @@ snarf_method (decl)
struct unparsed_text *meth; struct unparsed_text *meth;
meth = alloc_unparsed_text (starting_filename, starting_lineno, decl, meth = alloc_unparsed_text (starting_filename, starting_lineno, decl,
(interface_unknown ? 1 (interface_unknown ? 1
: (interface_only ? 0 : 2))); : (interface_only ? 0 : 2)));
snarf_block (meth); snarf_block (meth);
...@@ -1284,7 +1285,7 @@ add_defarg_fn (decl) ...@@ -1284,7 +1285,7 @@ add_defarg_fn (decl)
TREE_VALUE (defarg_fns) = decl; TREE_VALUE (defarg_fns) = decl;
else else
{ {
defarg_fns = tree_cons (NULL_TREE, decl, defarg_fns); defarg_fns = tree_cons (NULL_TREE, decl, defarg_fns);
TREE_TYPE (defarg_fns) = current_class_type; TREE_TYPE (defarg_fns) = current_class_type;
} }
} }
...@@ -1313,7 +1314,7 @@ finish_defarg () ...@@ -1313,7 +1314,7 @@ finish_defarg ()
error ("parse error at end of saved function text"); error ("parse error at end of saved function text");
end_input (); end_input ();
} }
/* Main function for deferred parsing of default arguments. Called from /* Main function for deferred parsing of default arguments. Called from
the parser. */ the parser. */
...@@ -1327,7 +1328,7 @@ do_pending_defargs () ...@@ -1327,7 +1328,7 @@ do_pending_defargs ()
for (; defarg_fns;) for (; defarg_fns;)
{ {
tree current = defarg_fns; tree current = defarg_fns;
tree defarg_fn = TREE_VALUE (defarg_fns); tree defarg_fn = TREE_VALUE (defarg_fns);
if (defarg_parm == NULL_TREE) if (defarg_parm == NULL_TREE)
{ {
...@@ -1367,7 +1368,7 @@ do_pending_defargs () ...@@ -1367,7 +1368,7 @@ do_pending_defargs ()
poplevel (0, 0, 0); poplevel (0, 0, 0);
pop_nested_class (); pop_nested_class ();
defarg_fns = TREE_CHAIN (defarg_fns); defarg_fns = TREE_CHAIN (defarg_fns);
if (defarg_depfns) if (defarg_depfns)
{ {
...@@ -1375,8 +1376,8 @@ do_pending_defargs () ...@@ -1375,8 +1376,8 @@ do_pending_defargs ()
of defarg_fns. We will need to reprocess this function, and of defarg_fns. We will need to reprocess this function, and
check for circular dependencies. */ check for circular dependencies. */
tree a, b; tree a, b;
for (a = defarg_depfns, b = TREE_PURPOSE (current); a && b; for (a = defarg_depfns, b = TREE_PURPOSE (current); a && b;
a = TREE_CHAIN (a), b = TREE_CHAIN (b)) a = TREE_CHAIN (a), b = TREE_CHAIN (b))
if (TREE_VALUE (a) != TREE_VALUE (b)) if (TREE_VALUE (a) != TREE_VALUE (b))
goto different; goto different;
...@@ -1392,7 +1393,7 @@ do_pending_defargs () ...@@ -1392,7 +1393,7 @@ do_pending_defargs ()
cp_warning_at ("circular dependency in default args of `%#D'", defarg_fn); cp_warning_at ("circular dependency in default args of `%#D'", defarg_fn);
/* No need to say what else is dependent, as they will be /* No need to say what else is dependent, as they will be
picked up in another pass. */ picked up in another pass. */
/* Immediately repeat, but marked so that we break the loop. */ /* Immediately repeat, but marked so that we break the loop. */
defarg_fns = current; defarg_fns = current;
TREE_PURPOSE (current) = error_mark_node; TREE_PURPOSE (current) = error_mark_node;
...@@ -1413,7 +1414,7 @@ done_pending_defargs () ...@@ -1413,7 +1414,7 @@ done_pending_defargs ()
{ {
tree fn = TREE_VALUE (defarg_fnsdone); tree fn = TREE_VALUE (defarg_fnsdone);
tree parms; tree parms;
if (TREE_CODE (fn) == FUNCTION_DECL) if (TREE_CODE (fn) == FUNCTION_DECL)
parms = TYPE_ARG_TYPES (TREE_TYPE (fn)); parms = TYPE_ARG_TYPES (TREE_TYPE (fn));
else else
...@@ -1460,7 +1461,7 @@ replace_defarg (arg, init) ...@@ -1460,7 +1461,7 @@ replace_defarg (arg, init)
} }
} }
#ifdef SPEW_DEBUG #ifdef SPEW_DEBUG
/* debug_yychar takes a yychar (token number) value and prints its name. */ /* debug_yychar takes a yychar (token number) value and prints its name. */
static void static void
...@@ -1469,7 +1470,7 @@ debug_yychar (yy) ...@@ -1469,7 +1470,7 @@ debug_yychar (yy)
{ {
if (yy<256) if (yy<256)
fprintf (stderr, "->%d < %c >\n", lineno, yy); fprintf (stderr, "->%d < %c >\n", lineno, yy);
else if (yy == IDENTIFIER || yy == TYPENAME) else if (yy == IDENTIFIER || yy == tTYPENAME)
{ {
const char *id; const char *id;
if (TREE_CODE (yylval.ttype) == IDENTIFIER_NODE) if (TREE_CODE (yylval.ttype) == IDENTIFIER_NODE)
......
...@@ -73,6 +73,7 @@ typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID ...@@ -73,6 +73,7 @@ typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID
lexer_toplevel_done = 1; lexer_toplevel_done = 1;
} }
';' ';'
{}
| ENT_STRUCT options '{' struct_fields '}' | ENT_STRUCT options '{' struct_fields '}'
{ {
new_structure ($1->u.s.tag, UNION_P ($1), &lexer_line, new_structure ($1->u.s.tag, UNION_P ($1), &lexer_line,
...@@ -80,6 +81,7 @@ typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID ...@@ -80,6 +81,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment