+Mon Jan 17 11:58:17 2000 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
+
+ * parse.y (format_parameter:): Use final: rule instead of modifiers:.
+ (final:): New rule.
+
2000-01-17 Tom Tromey <tromey@cygnus.com>
* gjavah.c (print_field_info): Allow non-static final fields.
{
$$ = build_tree_list ($2, $1);
}
-| modifiers type variable_declarator_id /* Added, JDK1.1 final parms */
+| final type variable_declarator_id /* Added, JDK1.1 final parms */
{
parse_jdk1_1_error ("final parameters");
$$ = build_tree_list ($3, $2);
}
| type error
{yyerror ("Missing identifier"); RECOVER;}
-| modifiers type error
+| final type error
{
- SOURCE_FRONTEND_DEBUG (("Modifiers: %d", $1));
yyerror ("Missing identifier"); RECOVER;
}
;
+final:
+ modifiers
+ {
+ check_modifiers ("Illegal modifier `%s'. Only `final' was expected here",
+ $1, ACC_FINAL);
+ if ($1 != ACC_FINAL)
+ MODIFIER_WFL (FINAL_TK) = build_wfl_node (NULL_TREE);
+ }
+;
+
throws:
{ $$ = NULL_TREE; }
| THROWS_TK class_type_list