Commit 6d61f1bd by Akim Demaille Committed by Tom Tromey

parse.y (class_declaration, [...]): Make sure all their rules have an action...

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

	* parse.y (class_declaration, interface_declaration): Make sure
	all their rules have an action, in order to avoid meaningless `$$
	= $1' and their type clashes.

From-SVN: r54592
parent aaae0bb9
2002-06-13 Akim Demaille <akim@epita.fr>
* parse.y (class_declaration, interface_declaration): Make sure
all their rules have an action, in order to avoid meaningless `$$
= $1' and their type clashes.
2002-06-11 Tom Tromey <tromey@redhat.com> 2002-06-11 Tom Tromey <tromey@redhat.com>
* jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC. * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
......
...@@ -846,20 +846,22 @@ class_declaration: ...@@ -846,20 +846,22 @@ class_declaration:
modifiers CLASS_TK identifier super interfaces modifiers CLASS_TK identifier super interfaces
{ create_class ($1, $3, $4, $5); } { create_class ($1, $3, $4, $5); }
class_body class_body
{;}
| CLASS_TK identifier super interfaces | CLASS_TK identifier super interfaces
{ create_class (0, $2, $3, $4); } { create_class (0, $2, $3, $4); }
class_body class_body
{;}
| modifiers CLASS_TK error | modifiers CLASS_TK error
{yyerror ("Missing class name"); RECOVER;} { yyerror ("Missing class name"); RECOVER; }
| CLASS_TK error | CLASS_TK error
{yyerror ("Missing class name"); RECOVER;} { yyerror ("Missing class name"); RECOVER; }
| CLASS_TK identifier error | CLASS_TK identifier error
{ {
if (!ctxp->class_err) yyerror ("'{' expected"); if (!ctxp->class_err) yyerror ("'{' expected");
DRECOVER(class1); DRECOVER(class1);
} }
| modifiers CLASS_TK identifier error | modifiers CLASS_TK identifier error
{if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER;} { if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER; }
; ;
super: super:
...@@ -1279,19 +1281,23 @@ interface_declaration: ...@@ -1279,19 +1281,23 @@ interface_declaration:
INTERFACE_TK identifier INTERFACE_TK identifier
{ create_interface (0, $2, NULL_TREE); } { create_interface (0, $2, NULL_TREE); }
interface_body interface_body
{ ; }
| modifiers INTERFACE_TK identifier | modifiers INTERFACE_TK identifier
{ create_interface ($1, $3, NULL_TREE); } { create_interface ($1, $3, NULL_TREE); }
interface_body interface_body
{ ; }
| INTERFACE_TK identifier extends_interfaces | INTERFACE_TK identifier extends_interfaces
{ create_interface (0, $2, $3); } { create_interface (0, $2, $3); }
interface_body interface_body
{ ; }
| modifiers INTERFACE_TK identifier extends_interfaces | modifiers INTERFACE_TK identifier extends_interfaces
{ create_interface ($1, $3, $4); } { create_interface ($1, $3, $4); }
interface_body interface_body
{ ; }
| INTERFACE_TK identifier error | INTERFACE_TK identifier error
{yyerror ("'{' expected"); RECOVER;} { yyerror ("'{' expected"); RECOVER; }
| modifiers INTERFACE_TK identifier error | modifiers INTERFACE_TK identifier error
{yyerror ("'{' expected"); RECOVER;} { yyerror ("'{' expected"); RECOVER; }
; ;
extends_interfaces: extends_interfaces:
......
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