From 2e5eb5c578774168395f6b6e47f503841850589f Mon Sep 17 00:00:00 2001 From: Alexandre Petit-Bianco Date: Mon, 17 May 1999 19:33:13 +0000 Subject: parse.y (constructor_block_end:): New rule, tagged . Mon May 17 19:20:24 1999 Alexandre Petit-Bianco * parse.y (constructor_block_end:): New rule, tagged . (constructor_body:): Use `constructor_block_end' instead of `block_end'. From-SVN: r26978 --- gcc/java/parse.y | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gcc/java/parse.y') 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 class_body block_end +%type class_body block_end constructor_block_end %type 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 -- cgit v1.1