aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>1999-05-17 19:33:13 +0000
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>1999-05-17 12:33:13 -0700
commit2e5eb5c578774168395f6b6e47f503841850589f (patch)
treeff63539469bc79e873663c6d1db94e7cef4a7865 /gcc/java/parse.y
parent6efa1cc2732196980ee9d3f0f864e3de79764142 (diff)
downloadgcc-2e5eb5c578774168395f6b6e47f503841850589f.zip
gcc-2e5eb5c578774168395f6b6e47f503841850589f.tar.gz
gcc-2e5eb5c578774168395f6b6e47f503841850589f.tar.bz2
parse.y (constructor_block_end:): New rule, tagged <node>.
Mon May 17 19:20:24 1999 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse.y (constructor_block_end:): New rule, tagged <node>. (constructor_body:): Use `constructor_block_end' instead of `block_end'. From-SVN: r26978
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 84d2b25..3013c76 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -396,7 +396,7 @@ static tree current_static_block = NULL_TREE;
variable_initializers constructor_body
array_initializer
-%type <node> class_body block_end
+%type <node> class_body block_end constructor_block_end
%type <node> statement statement_without_trailing_substatement
labeled_statement if_then_statement label_decl
if_then_else_statement while_statement for_statement
@@ -1001,19 +1001,23 @@ constructor_body:
/* Unlike regular method, we always need a complete (empty)
body so we can safely perform all the required code
addition (super invocation and field initialization) */
- block_begin block_end
+ block_begin constructor_block_end
{
BLOCK_EXPR_BODY ($2) = empty_stmt_node;
$$ = $2;
}
-| block_begin explicit_constructor_invocation block_end
+| block_begin explicit_constructor_invocation constructor_block_end
{ $$ = $3; }
-| block_begin block_statements block_end
+| block_begin block_statements constructor_block_end
{ $$ = $3; }
-| block_begin explicit_constructor_invocation block_statements block_end
+| block_begin explicit_constructor_invocation block_statements constructor_block_end
{ $$ = $4; }
;
+constructor_block_end:
+ block_end
+| block_end SC_TK
+
/* Error recovery for that rule moved down expression_statement: rule. */
explicit_constructor_invocation:
this_or_super OP_TK CP_TK SC_TK