Commit 49f48c71 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).

        * expr.c (java_stack_pop, java_array_data_offset,
        build_java_throw_out_of_bounds_exception, case_identity,
        build_java_check_indexed_type): Add static prototypes.
        (linenumber_table, expand_invoke, expand_java_field_op,
        build_primtype_type_ref, expand_byte_code): Constify a char*.

        * java-tree.h (build_primtype_type_ref, linenumber_table):
        Constify a char*.
        (java_lang_expand_expr): Add prototype.

        * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
        `java_lang_expand_expr'.

        * lex.c (java_lex_error): Constify a char*.
        (java_get_unicode, java_read_char, java_allocate_new_line,
        java_unget_unicode, java_sneak_unicode): Prototype.

        * parse-scan.y (current_class, package_name, method_declarator,
        report_class_declaration, yyerror): Constify a char*.

        * parse.h (java_report_errors): Prototype.
        (yyerror): Constify a char*.

        * parse.y (classitf_redefinition_error, check_modifiers,
        parse_jdk1_1_error, lookup_package_type,
        lookup_package_type_and_set_next, get_printable_method_name,
        purify_type_name): Constify a char*.
        (build_super_invocation, maybe_generate_finit,
        verify_constructor_super, parser_add_interface,
        add_superinterfaces, jdep_resolve_class, note_possible_classname,
        java_complete_expand_methods, java_expand_finals,
        cut_identifier_in_qualified, java_stabilize_reference,
        do_unary_numeric_promotion, operator_string, do_merge_string_cste,
        merge_string_cste): Prototype.
        (single_type_import_declaration, yyerror,
        variable_redefinition_error, build_array_from_name,
        build_unresolved_array_type, check_class_interface_creation,
        resolve_class, complete_class_report_errors,
        note_possible_classname, read_import_dir,
        find_in_imports_on_demand, resolve_package, fix_constructors,
        check_deprecation, lookup_method_invoke,
        maybe_build_primttype_type_ref, array_constructor_check_entry):
        Constify a char*.
        (java_complete_expand_methods, java_expand_finals): Make static.
        (convert_narrow): Remove static prototype.

From-SVN: r28498
parent cc3dea85
1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
* expr.c (java_stack_pop, java_array_data_offset,
build_java_throw_out_of_bounds_exception, case_identity,
build_java_check_indexed_type): Add static prototypes.
(linenumber_table, expand_invoke, expand_java_field_op,
build_primtype_type_ref, expand_byte_code): Constify a char*.
* java-tree.h (build_primtype_type_ref, linenumber_table):
Constify a char*.
(java_lang_expand_expr): Add prototype.
* lang.c: Include rtl.h and expr.h. Remove extern prototype for
`java_lang_expand_expr'.
* lex.c (java_lex_error): Constify a char*.
(java_get_unicode, java_read_char, java_allocate_new_line,
java_unget_unicode, java_sneak_unicode): Prototype.
* parse-scan.y (current_class, package_name, method_declarator,
report_class_declaration, yyerror): Constify a char*.
* parse.h (java_report_errors): Prototype.
(yyerror): Constify a char*.
* parse.y (classitf_redefinition_error, check_modifiers,
parse_jdk1_1_error, lookup_package_type,
lookup_package_type_and_set_next, get_printable_method_name,
purify_type_name): Constify a char*.
(build_super_invocation, maybe_generate_finit,
verify_constructor_super, parser_add_interface,
add_superinterfaces, jdep_resolve_class, note_possible_classname,
java_complete_expand_methods, java_expand_finals,
cut_identifier_in_qualified, java_stabilize_reference,
do_unary_numeric_promotion, operator_string, do_merge_string_cste,
merge_string_cste): Prototype.
(single_type_import_declaration, yyerror,
variable_redefinition_error, build_array_from_name,
build_unresolved_array_type, check_class_interface_creation,
resolve_class, complete_class_report_errors,
note_possible_classname, read_import_dir,
find_in_imports_on_demand, resolve_package, fix_constructors,
check_deprecation, lookup_method_invoke,
maybe_build_primttype_type_ref, array_constructor_check_entry):
Constify a char*.
(java_complete_expand_methods, java_expand_finals): Make static.
(convert_narrow): Remove static prototype.
Tue Aug 3 20:21:20 1999 J"orn Rennecke <amylaar@cygnus.co.uk> Tue Aug 3 20:21:20 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h. * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
......
...@@ -310,7 +310,7 @@ jcf-write.o : jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(RTL_H) \ ...@@ -310,7 +310,7 @@ jcf-write.o : jcf-write.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(RTL_H) \
jv-scan.o : jv-scan.c $(CONFIG_H) $(srcdir)/../system.h jv-scan.o : jv-scan.c $(CONFIG_H) $(srcdir)/../system.h
jvgenmain.o : jvgenmain.c $(CONFIG_H) $(srcdir)/../system.h jvgenmain.o : jvgenmain.c $(CONFIG_H) $(srcdir)/../system.h
lang.o : lang.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(srcdir)/../input.h \ lang.o : lang.c $(CONFIG_H) $(JAVA_TREE_H) jcf.h $(srcdir)/../input.h \
$(srcdir)/../toplev.h $(srcdir)/../system.h $(srcdir)/../toplev.h $(srcdir)/../system.h $(RTL_H) $(EXPR_H)
mangle.o : mangle.c $(CONFIG_H) jcf.h $(JAVA_TREE_H) $(srcdir)/../system.h \ mangle.o : mangle.c $(CONFIG_H) jcf.h $(JAVA_TREE_H) $(srcdir)/../system.h \
$(srcdir)/../toplev.h $(srcdir)/../toplev.h
parse-scan.o : $(CONFIG_H) $(srcdir)/../system.h $(srcdir)/../toplev.h parse-scan.o : $(CONFIG_H) $(srcdir)/../system.h $(srcdir)/../toplev.h
......
...@@ -74,6 +74,11 @@ static tree pop_arguments PROTO ((tree)); ...@@ -74,6 +74,11 @@ static tree pop_arguments PROTO ((tree));
static void expand_invoke PROTO ((int, int, int)); static void expand_invoke PROTO ((int, int, int));
static void expand_java_field_op PROTO ((int, int, int)); static void expand_java_field_op PROTO ((int, int, int));
static void java_push_constant_from_pool PROTO ((struct JCF *, int)); static void java_push_constant_from_pool PROTO ((struct JCF *, int));
static void java_stack_pop PROTO ((int));
static tree build_java_throw_out_of_bounds_exception PROTO ((tree));
static tree build_java_check_indexed_type PROTO ((tree, tree));
static tree java_array_data_offset PROTO ((tree));
static tree case_identity PROTO ((tree, tree));
static tree operand_type[59]; static tree operand_type[59];
extern struct obstack permanent_obstack; extern struct obstack permanent_obstack;
...@@ -125,7 +130,7 @@ tree tree_list_free_list = NULL_TREE; ...@@ -125,7 +130,7 @@ tree tree_list_free_list = NULL_TREE;
int stack_pointer; int stack_pointer;
unsigned char *linenumber_table; const unsigned char *linenumber_table;
int linenumber_count; int linenumber_count;
tree tree
...@@ -1630,7 +1635,7 @@ expand_invoke (opcode, method_ref_index, nargs) ...@@ -1630,7 +1635,7 @@ expand_invoke (opcode, method_ref_index, nargs)
tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index); tree method_name = COMPONENT_REF_NAME (&current_jcf->cpool, method_ref_index);
tree self_type = get_class_constant tree self_type = get_class_constant
(current_jcf, COMPONENT_REF_CLASS_INDEX(&current_jcf->cpool, method_ref_index)); (current_jcf, COMPONENT_REF_CLASS_INDEX(&current_jcf->cpool, method_ref_index));
char *self_name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type))); const char *self_name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
tree call, func, method, arg_list, method_type; tree call, func, method, arg_list, method_type;
if (! CLASS_LOADED_P (self_type)) if (! CLASS_LOADED_P (self_type))
...@@ -1738,7 +1743,7 @@ expand_java_field_op (is_static, is_putting, field_ref_index) ...@@ -1738,7 +1743,7 @@ expand_java_field_op (is_static, is_putting, field_ref_index)
get_class_constant (current_jcf, get_class_constant (current_jcf,
COMPONENT_REF_CLASS_INDEX (&current_jcf->cpool, COMPONENT_REF_CLASS_INDEX (&current_jcf->cpool,
field_ref_index)); field_ref_index));
char *self_name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type))); const char *self_name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (self_type)));
tree field_name = COMPONENT_REF_NAME (&current_jcf->cpool, field_ref_index); tree field_name = COMPONENT_REF_NAME (&current_jcf->cpool, field_ref_index);
tree field_signature = COMPONENT_REF_SIGNATURE (&current_jcf->cpool, tree field_signature = COMPONENT_REF_SIGNATURE (&current_jcf->cpool,
field_ref_index); field_ref_index);
...@@ -1820,9 +1825,9 @@ expand_java_field_op (is_static, is_putting, field_ref_index) ...@@ -1820,9 +1825,9 @@ expand_java_field_op (is_static, is_putting, field_ref_index)
tree tree
build_primtype_type_ref (self_name) build_primtype_type_ref (self_name)
char *self_name; const char *self_name;
{ {
char *class_name = self_name+10; const char *class_name = self_name+10;
tree typ; tree typ;
if (strncmp(class_name, "Byte", 4) == 0) if (strncmp(class_name, "Byte", 4) == 0)
typ = byte_type_node; typ = byte_type_node;
...@@ -2043,7 +2048,7 @@ expand_byte_code (jcf, method) ...@@ -2043,7 +2048,7 @@ expand_byte_code (jcf, method)
int PC; int PC;
int i; int i;
int saw_index; int saw_index;
unsigned char *linenumber_pointer; const unsigned char *linenumber_pointer;
int dead_code_index = -1; int dead_code_index = -1;
#undef RET /* Defined by config/i386/i386.h */ #undef RET /* Defined by config/i386/i386.h */
......
...@@ -584,7 +584,7 @@ extern void write_classfile PROTO ((tree)); ...@@ -584,7 +584,7 @@ extern void write_classfile PROTO ((tree));
extern char *print_int_node PROTO ((tree)); extern char *print_int_node PROTO ((tree));
extern void parse_error_context PVPROTO ((tree cl, const char *, ...)) extern void parse_error_context PVPROTO ((tree cl, const char *, ...))
ATTRIBUTE_PRINTF_2; ATTRIBUTE_PRINTF_2;
extern tree build_primtype_type_ref PROTO ((char *)); extern tree build_primtype_type_ref PROTO ((const char *));
extern tree java_get_real_method_name PROTO ((tree)); extern tree java_get_real_method_name PROTO ((tree));
extern void finish_class PROTO ((tree)); extern void finish_class PROTO ((tree));
extern void java_layout_seen_class_methods PROTO ((void)); extern void java_layout_seen_class_methods PROTO ((void));
...@@ -647,6 +647,13 @@ extern char* open_class PROTO ((char *, struct JCF *, int, const char *)); ...@@ -647,6 +647,13 @@ extern char* open_class PROTO ((char *, struct JCF *, int, const char *));
# endif /* JCF_USE_STDIO */ # endif /* JCF_USE_STDIO */
#endif #endif
/* We use ARGS_SIZE_RTX to indicate that gcc/expr.h has been included
to declare `enum expand_modifier'. */
#if defined (TREE_CODE) && defined(RTX_CODE) && defined (HAVE_MACHINE_MODES) && defined (ARGS_SIZE_RTX)
struct rtx_def * java_lang_expand_expr PROTO ((tree, rtx, enum machine_mode,
enum expand_modifier));
#endif /* TREE_CODE && RTX_CODE && HAVE_MACHINE_MODES && ARGS_SIZE_RTX */
/* Access flags etc for a method (a FUNCTION_DECL): */ /* Access flags etc for a method (a FUNCTION_DECL): */
#define METHOD_PUBLIC(DECL) DECL_LANG_FLAG_1 (DECL) #define METHOD_PUBLIC(DECL) DECL_LANG_FLAG_1 (DECL)
...@@ -731,7 +738,7 @@ extern char *instruction_bits; ...@@ -731,7 +738,7 @@ extern char *instruction_bits;
#define BCODE_VERIFIED 8 #define BCODE_VERIFIED 8
/* A pointer to the line number table of the current method. */ /* A pointer to the line number table of the current method. */
extern unsigned char *linenumber_table; extern const unsigned char *linenumber_table;
/* The length (in items) of the line number table. */ /* The length (in items) of the line number table. */
extern int linenumber_count; extern int linenumber_count;
......
...@@ -28,6 +28,8 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -28,6 +28,8 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "system.h" #include "system.h"
#include "tree.h" #include "tree.h"
#include "input.h" #include "input.h"
#include "rtl.h"
#include "expr.h"
#include "java-tree.h" #include "java-tree.h"
#include "jcf.h" #include "jcf.h"
#include "toplev.h" #include "toplev.h"
...@@ -485,7 +487,6 @@ lang_print_error (file) ...@@ -485,7 +487,6 @@ lang_print_error (file)
void void
lang_init () lang_init ()
{ {
extern struct rtx_def * java_lang_expand_expr ();
extern struct rtx_def * (*lang_expand_expr) (); extern struct rtx_def * (*lang_expand_expr) ();
extern void (*print_error_function) PROTO((char *)); extern void (*print_error_function) PROTO((char *));
#if 0 #if 0
......
...@@ -44,7 +44,7 @@ extern struct obstack *expression_obstack; ...@@ -44,7 +44,7 @@ extern struct obstack *expression_obstack;
static int java_lineterminator PROTO ((unicode_t)); static int java_lineterminator PROTO ((unicode_t));
static char *java_sprint_unicode PROTO ((struct java_line *, int)); static char *java_sprint_unicode PROTO ((struct java_line *, int));
static void java_unicode_2_utf8 PROTO ((unicode_t)); static void java_unicode_2_utf8 PROTO ((unicode_t));
static void java_lex_error PROTO ((char *, int)); static void java_lex_error PROTO ((const char *, int));
#ifndef JC1_LITE #ifndef JC1_LITE
static int java_is_eol PROTO ((FILE *, int)); static int java_is_eol PROTO ((FILE *, int));
static tree build_wfl_node PROTO ((tree)); static tree build_wfl_node PROTO ((tree));
...@@ -54,13 +54,13 @@ static unicode_t java_parse_escape_sequence PROTO ((void)); ...@@ -54,13 +54,13 @@ static unicode_t java_parse_escape_sequence PROTO ((void));
static int java_letter_or_digit_p PROTO ((unicode_t)); static int java_letter_or_digit_p PROTO ((unicode_t));
static int java_parse_doc_section PROTO ((unicode_t)); static int java_parse_doc_section PROTO ((unicode_t));
static void java_parse_end_comment PROTO ((unicode_t)); static void java_parse_end_comment PROTO ((unicode_t));
static unicode_t java_get_unicode PROTO (()); static unicode_t java_get_unicode PROTO ((void));
static unicode_t java_read_unicode PROTO ((int, int *)); static unicode_t java_read_unicode PROTO ((int, int *));
static void java_store_unicode PROTO ((struct java_line *, unicode_t, int)); static void java_store_unicode PROTO ((struct java_line *, unicode_t, int));
static unicode_t java_read_char PROTO (()); static unicode_t java_read_char PROTO ((void));
static void java_allocate_new_line PROTO (()); static void java_allocate_new_line PROTO ((void));
static void java_unget_unicode PROTO (()); static void java_unget_unicode PROTO ((void));
static unicode_t java_sneak_unicode PROTO (()); static unicode_t java_sneak_unicode PROTO ((void));
void void
java_init_lex () java_init_lex ()
...@@ -1295,7 +1295,7 @@ build_wfl_node (node) ...@@ -1295,7 +1295,7 @@ build_wfl_node (node)
static void static void
java_lex_error (msg, forward) java_lex_error (msg, forward)
char *msg ATTRIBUTE_UNUSED; const char *msg ATTRIBUTE_UNUSED;
int forward ATTRIBUTE_UNUSED; int forward ATTRIBUTE_UNUSED;
{ {
#ifndef JC1_LITE #ifndef JC1_LITE
......
...@@ -143,8 +143,8 @@ static int absorber; ...@@ -143,8 +143,8 @@ static int absorber;
#define USE_ABSORBER absorber = 0 #define USE_ABSORBER absorber = 0
/* Keep track of the current class name and package name. */ /* Keep track of the current class name and package name. */
static char *current_class; static const char *current_class;
static char *package_name; static const char *package_name;
/* Keep track of whether things have be listed before. */ /* Keep track of whether things have be listed before. */
static int previous_output; static int previous_output;
...@@ -158,8 +158,8 @@ static int bracket_count; ...@@ -158,8 +158,8 @@ static int bracket_count;
/* Record a method declaration */ /* Record a method declaration */
struct method_declarator { struct method_declarator {
char *method_name; const char *method_name;
char *args; const char *args;
}; };
#define NEW_METHOD_DECLARATOR(D,N,A) \ #define NEW_METHOD_DECLARATOR(D,N,A) \
{ \ { \
...@@ -170,7 +170,7 @@ struct method_declarator { ...@@ -170,7 +170,7 @@ struct method_declarator {
} }
/* Two actions for this grammar */ /* Two actions for this grammar */
static void report_class_declaration PROTO ((char *)); static void report_class_declaration PROTO ((const char *));
static void report_main_declaration PROTO ((struct method_declarator *)); static void report_main_declaration PROTO ((struct method_declarator *));
#include "lex.h" #include "lex.h"
...@@ -1375,7 +1375,7 @@ static const short yycheck[] = { 3, ...@@ -1375,7 +1375,7 @@ static const short yycheck[] = { 3,
#define YYPURE 1 #define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/x1/java/posix/share/bison.simple" #line 3 "/usr/local/gnu/share/bison.simple"
/* Skeleton output parser for bison, /* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
...@@ -1568,7 +1568,7 @@ __yy_memcpy (char *to, char *from, int count) ...@@ -1568,7 +1568,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif #endif
#endif #endif
#line 196 "/x1/java/posix/share/bison.simple" #line 196 "/usr/local/gnu/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed /* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *. into yyparse. The argument should have type void *.
...@@ -2156,7 +2156,7 @@ case 337: ...@@ -2156,7 +2156,7 @@ case 337:
break;} break;}
} }
/* the action file gets copied in in place of this dollarsign */ /* the action file gets copied in in place of this dollarsign */
#line 498 "/x1/java/posix/share/bison.simple" #line 498 "/usr/local/gnu/share/bison.simple"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
...@@ -2374,7 +2374,7 @@ java_push_parser_context () ...@@ -2374,7 +2374,7 @@ java_push_parser_context ()
static void static void
report_class_declaration (name) report_class_declaration (name)
char * name; const char * name;
{ {
extern int flag_dump_class, flag_list_filename; extern int flag_dump_class, flag_list_filename;
...@@ -2432,7 +2432,7 @@ void reset_report () ...@@ -2432,7 +2432,7 @@ void reset_report ()
void void
yyerror (msg) yyerror (msg)
char *msg ATTRIBUTE_UNUSED; const char *msg ATTRIBUTE_UNUSED;
{ {
} }
......
...@@ -63,8 +63,8 @@ static int absorber; ...@@ -63,8 +63,8 @@ static int absorber;
#define USE_ABSORBER absorber = 0 #define USE_ABSORBER absorber = 0
/* Keep track of the current class name and package name. */ /* Keep track of the current class name and package name. */
static char *current_class; static const char *current_class;
static char *package_name; static const char *package_name;
/* Keep track of whether things have be listed before. */ /* Keep track of whether things have be listed before. */
static int previous_output; static int previous_output;
...@@ -78,8 +78,8 @@ static int bracket_count; ...@@ -78,8 +78,8 @@ static int bracket_count;
/* Record a method declaration */ /* Record a method declaration */
struct method_declarator { struct method_declarator {
char *method_name; const char *method_name;
char *args; const char *args;
}; };
#define NEW_METHOD_DECLARATOR(D,N,A) \ #define NEW_METHOD_DECLARATOR(D,N,A) \
{ \ { \
...@@ -90,7 +90,7 @@ struct method_declarator { ...@@ -90,7 +90,7 @@ struct method_declarator {
} }
/* Two actions for this grammar */ /* Two actions for this grammar */
static void report_class_declaration PROTO ((char *)); static void report_class_declaration PROTO ((const char *));
static void report_main_declaration PROTO ((struct method_declarator *)); static void report_main_declaration PROTO ((struct method_declarator *));
#include "lex.h" #include "lex.h"
...@@ -1123,7 +1123,7 @@ java_push_parser_context () ...@@ -1123,7 +1123,7 @@ java_push_parser_context ()
static void static void
report_class_declaration (name) report_class_declaration (name)
char * name; const char * name;
{ {
extern int flag_dump_class, flag_list_filename; extern int flag_dump_class, flag_list_filename;
...@@ -1181,7 +1181,7 @@ void reset_report () ...@@ -1181,7 +1181,7 @@ void reset_report ()
void void
yyerror (msg) yyerror (msg)
char *msg ATTRIBUTE_UNUSED; const char *msg ATTRIBUTE_UNUSED;
{ {
} }
......
/* A Bison parser, made from ./parse.y /* A Bison parser, made from ./parse.y
by GNU Bison version 1.27 by GNU Bison version 1.25
*/ */
#define YYBISON 1 /* Identify Bison output. */ #define YYBISON 1 /* Identify Bison output. */
...@@ -12,113 +12,113 @@ ...@@ -12,113 +12,113 @@
#define yychar java_char #define yychar java_char
#define yydebug java_debug #define yydebug java_debug
#define yynerrs java_nerrs #define yynerrs java_nerrs
#define PLUS_TK 257 #define PLUS_TK 258
#define MINUS_TK 258 #define MINUS_TK 259
#define MULT_TK 259 #define MULT_TK 260
#define DIV_TK 260 #define DIV_TK 261
#define REM_TK 261 #define REM_TK 262
#define LS_TK 262 #define LS_TK 263
#define SRS_TK 263 #define SRS_TK 264
#define ZRS_TK 264 #define ZRS_TK 265
#define AND_TK 265 #define AND_TK 266
#define XOR_TK 266 #define XOR_TK 267
#define OR_TK 267 #define OR_TK 268
#define BOOL_AND_TK 268 #define BOOL_AND_TK 269
#define BOOL_OR_TK 269 #define BOOL_OR_TK 270
#define EQ_TK 270 #define EQ_TK 271
#define NEQ_TK 271 #define NEQ_TK 272
#define GT_TK 272 #define GT_TK 273
#define GTE_TK 273 #define GTE_TK 274
#define LT_TK 274 #define LT_TK 275
#define LTE_TK 275 #define LTE_TK 276
#define PLUS_ASSIGN_TK 276 #define PLUS_ASSIGN_TK 277
#define MINUS_ASSIGN_TK 277 #define MINUS_ASSIGN_TK 278
#define MULT_ASSIGN_TK 278 #define MULT_ASSIGN_TK 279
#define DIV_ASSIGN_TK 279 #define DIV_ASSIGN_TK 280
#define REM_ASSIGN_TK 280 #define REM_ASSIGN_TK 281
#define LS_ASSIGN_TK 281 #define LS_ASSIGN_TK 282
#define SRS_ASSIGN_TK 282 #define SRS_ASSIGN_TK 283
#define ZRS_ASSIGN_TK 283 #define ZRS_ASSIGN_TK 284
#define AND_ASSIGN_TK 284 #define AND_ASSIGN_TK 285
#define XOR_ASSIGN_TK 285 #define XOR_ASSIGN_TK 286
#define OR_ASSIGN_TK 286 #define OR_ASSIGN_TK 287
#define PUBLIC_TK 287 #define PUBLIC_TK 288
#define PRIVATE_TK 288 #define PRIVATE_TK 289
#define PROTECTED_TK 289 #define PROTECTED_TK 290
#define STATIC_TK 290 #define STATIC_TK 291
#define FINAL_TK 291 #define FINAL_TK 292
#define SYNCHRONIZED_TK 292 #define SYNCHRONIZED_TK 293
#define VOLATILE_TK 293 #define VOLATILE_TK 294
#define TRANSIENT_TK 294 #define TRANSIENT_TK 295
#define NATIVE_TK 295 #define NATIVE_TK 296
#define PAD_TK 296 #define PAD_TK 297
#define ABSTRACT_TK 297 #define ABSTRACT_TK 298
#define MODIFIER_TK 298 #define MODIFIER_TK 299
#define DECR_TK 299 #define DECR_TK 300
#define INCR_TK 300 #define INCR_TK 301
#define DEFAULT_TK 301 #define DEFAULT_TK 302
#define IF_TK 302 #define IF_TK 303
#define THROW_TK 303 #define THROW_TK 304
#define BOOLEAN_TK 304 #define BOOLEAN_TK 305
#define DO_TK 305 #define DO_TK 306
#define IMPLEMENTS_TK 306 #define IMPLEMENTS_TK 307
#define THROWS_TK 307 #define THROWS_TK 308
#define BREAK_TK 308 #define BREAK_TK 309
#define IMPORT_TK 309 #define IMPORT_TK 310
#define ELSE_TK 310 #define ELSE_TK 311
#define INSTANCEOF_TK 311 #define INSTANCEOF_TK 312
#define RETURN_TK 312 #define RETURN_TK 313
#define VOID_TK 313 #define VOID_TK 314
#define CATCH_TK 314 #define CATCH_TK 315
#define INTERFACE_TK 315 #define INTERFACE_TK 316
#define CASE_TK 316 #define CASE_TK 317
#define EXTENDS_TK 317 #define EXTENDS_TK 318
#define FINALLY_TK 318 #define FINALLY_TK 319
#define SUPER_TK 319 #define SUPER_TK 320
#define WHILE_TK 320 #define WHILE_TK 321
#define CLASS_TK 321 #define CLASS_TK 322
#define SWITCH_TK 322 #define SWITCH_TK 323
#define CONST_TK 323 #define CONST_TK 324
#define TRY_TK 324 #define TRY_TK 325
#define FOR_TK 325 #define FOR_TK 326
#define NEW_TK 326 #define NEW_TK 327
#define CONTINUE_TK 327 #define CONTINUE_TK 328
#define GOTO_TK 328 #define GOTO_TK 329
#define PACKAGE_TK 329 #define PACKAGE_TK 330
#define THIS_TK 330 #define THIS_TK 331
#define BYTE_TK 331 #define BYTE_TK 332
#define SHORT_TK 332 #define SHORT_TK 333
#define INT_TK 333 #define INT_TK 334
#define LONG_TK 334 #define LONG_TK 335
#define CHAR_TK 335 #define CHAR_TK 336
#define INTEGRAL_TK 336 #define INTEGRAL_TK 337
#define FLOAT_TK 337 #define FLOAT_TK 338
#define DOUBLE_TK 338 #define DOUBLE_TK 339
#define FP_TK 339 #define FP_TK 340
#define ID_TK 340 #define ID_TK 341
#define REL_QM_TK 341 #define REL_QM_TK 342
#define REL_CL_TK 342 #define REL_CL_TK 343
#define NOT_TK 343 #define NOT_TK 344
#define NEG_TK 344 #define NEG_TK 345
#define ASSIGN_ANY_TK 345 #define ASSIGN_ANY_TK 346
#define ASSIGN_TK 346 #define ASSIGN_TK 347
#define OP_TK 347 #define OP_TK 348
#define CP_TK 348 #define CP_TK 349
#define OCB_TK 349 #define OCB_TK 350
#define CCB_TK 350 #define CCB_TK 351
#define OSB_TK 351 #define OSB_TK 352
#define CSB_TK 352 #define CSB_TK 353
#define SC_TK 353 #define SC_TK 354
#define C_TK 354 #define C_TK 355
#define DOT_TK 355 #define DOT_TK 356
#define STRING_LIT_TK 356 #define STRING_LIT_TK 357
#define CHAR_LIT_TK 357 #define CHAR_LIT_TK 358
#define INT_LIT_TK 358 #define INT_LIT_TK 359
#define FP_LIT_TK 359 #define FP_LIT_TK 360
#define TRUE_TK 360 #define TRUE_TK 361
#define FALSE_TK 361 #define FALSE_TK 362
#define BOOL_LIT_TK 362 #define BOOL_LIT_TK 363
#define NULL_TK 363 #define NULL_TK 364
#line 48 "./parse.y" #line 48 "./parse.y"
...@@ -148,9 +148,9 @@ ...@@ -148,9 +148,9 @@
/* Local function prototypes */ /* Local function prototypes */
static char *java_accstring_lookup PROTO ((int)); static char *java_accstring_lookup PROTO ((int));
static void classitf_redefinition_error PROTO ((char *,tree, tree, tree)); static void classitf_redefinition_error PROTO ((const char *,tree, tree, tree));
static void variable_redefinition_error PROTO ((tree, tree, tree, int)); static void variable_redefinition_error PROTO ((tree, tree, tree, int));
static void check_modifiers PROTO ((char *, int, int)); static void check_modifiers PROTO ((const char *, int, int));
static tree create_class PROTO ((int, tree, tree, tree)); static tree create_class PROTO ((int, tree, tree, tree));
static tree create_interface PROTO ((int, tree, tree)); static tree create_interface PROTO ((int, tree, tree));
static tree find_field PROTO ((tree, tree)); static tree find_field PROTO ((tree, tree));
...@@ -169,7 +169,7 @@ static tree method_declarator PROTO ((tree, tree)); ...@@ -169,7 +169,7 @@ static tree method_declarator PROTO ((tree, tree));
static void parse_warning_context PVPROTO ((tree cl, const char *msg, ...)) static void parse_warning_context PVPROTO ((tree cl, const char *msg, ...))
ATTRIBUTE_PRINTF_2; ATTRIBUTE_PRINTF_2;
static void issue_warning_error_from_context PROTO ((tree, const char *msg, va_list)); static void issue_warning_error_from_context PROTO ((tree, const char *msg, va_list));
static tree parse_jdk1_1_error PROTO ((char *)); static tree parse_jdk1_1_error PROTO ((const char *));
static void complete_class_report_errors PROTO ((jdep *)); static void complete_class_report_errors PROTO ((jdep *));
static int process_imports PROTO ((void)); static int process_imports PROTO ((void));
static void read_import_dir PROTO ((tree)); static void read_import_dir PROTO ((tree));
...@@ -177,8 +177,8 @@ static int find_in_imports_on_demand PROTO ((tree)); ...@@ -177,8 +177,8 @@ static int find_in_imports_on_demand PROTO ((tree));
static int find_in_imports PROTO ((tree)); static int find_in_imports PROTO ((tree));
static int check_pkg_class_access PROTO ((tree, tree)); static int check_pkg_class_access PROTO ((tree, tree));
static tree resolve_package PROTO ((tree, tree *)); static tree resolve_package PROTO ((tree, tree *));
static tree lookup_package_type PROTO ((char *, int)); static tree lookup_package_type PROTO ((const char *, int));
static tree lookup_package_type_and_set_next PROTO ((char *, int, tree *)); static tree lookup_package_type_and_set_next PROTO ((const char *, int, tree *));
static tree resolve_class PROTO ((tree, tree, tree)); static tree resolve_class PROTO ((tree, tree, tree));
static void declare_local_variables PROTO ((int, tree, tree)); static void declare_local_variables PROTO ((int, tree, tree));
static void source_start_java_method PROTO ((tree)); static void source_start_java_method PROTO ((tree));
...@@ -291,16 +291,16 @@ static int check_thrown_exceptions_do PROTO ((tree)); ...@@ -291,16 +291,16 @@ static int check_thrown_exceptions_do PROTO ((tree));
static void purge_unchecked_exceptions PROTO ((tree)); static void purge_unchecked_exceptions PROTO ((tree));
static void check_throws_clauses PROTO ((tree, tree, tree)); static void check_throws_clauses PROTO ((tree, tree, tree));
static void finish_method_declaration PROTO ((tree)); static void finish_method_declaration PROTO ((tree));
static tree build_super_invocation PROTO (()); static tree build_super_invocation PROTO ((void));
static int verify_constructor_circularity PROTO ((tree, tree)); static int verify_constructor_circularity PROTO ((tree, tree));
static char *constructor_circularity_msg PROTO ((tree, tree)); static char *constructor_circularity_msg PROTO ((tree, tree));
static tree build_this_super_qualified_invocation PROTO ((int, tree, tree, static tree build_this_super_qualified_invocation PROTO ((int, tree, tree,
int, int)); int, int));
static char *get_printable_method_name PROTO ((tree)); static const char *get_printable_method_name PROTO ((tree));
static tree patch_conditional_expr PROTO ((tree, tree, tree)); static tree patch_conditional_expr PROTO ((tree, tree, tree));
static void maybe_generate_finit PROTO (()); static void maybe_generate_finit PROTO ((void));
static void fix_constructors PROTO ((tree)); static void fix_constructors PROTO ((tree));
static int verify_constructor_super PROTO (()); static int verify_constructor_super PROTO ((void));
static tree create_artificial_method PROTO ((tree, int, tree, tree, tree)); static tree create_artificial_method PROTO ((tree, int, tree, tree, tree));
static void start_artificial_method_body PROTO ((tree)); static void start_artificial_method_body PROTO ((tree));
static void end_artificial_method_body PROTO ((tree)); static void end_artificial_method_body PROTO ((tree));
...@@ -316,11 +316,23 @@ static tree build_new_array_init PROTO ((int, tree)); ...@@ -316,11 +316,23 @@ static tree build_new_array_init PROTO ((int, tree));
static tree patch_new_array_init PROTO ((tree, tree)); static tree patch_new_array_init PROTO ((tree, tree));
static tree maybe_build_array_element_wfl PROTO ((tree)); static tree maybe_build_array_element_wfl PROTO ((tree));
static int array_constructor_check_entry PROTO ((tree, tree)); static int array_constructor_check_entry PROTO ((tree, tree));
static char *purify_type_name PROTO ((char *)); static const char *purify_type_name PROTO ((const char *));
static tree fold_constant_for_init PROTO ((tree, tree)); static tree fold_constant_for_init PROTO ((tree, tree));
static tree strip_out_static_field_access_decl PROTO ((tree)); static tree strip_out_static_field_access_decl PROTO ((tree));
static jdeplist *reverse_jdep_list PROTO ((struct parser_ctxt *)); static jdeplist *reverse_jdep_list PROTO ((struct parser_ctxt *));
static void static_ref_err PROTO ((tree, tree, tree)); static void static_ref_err PROTO ((tree, tree, tree));
static void parser_add_interface PROTO ((tree, tree, tree));
static void add_superinterfaces PROTO ((tree, tree));
static tree jdep_resolve_class PROTO ((jdep *));
static int note_possible_classname PROTO ((const char *, int));
static void java_complete_expand_methods PROTO ((void));
static void java_expand_finals PROTO ((void));
static tree cut_identifier_in_qualified PROTO ((tree));
static tree java_stabilize_reference PROTO ((tree));
static tree do_unary_numeric_promotion PROTO ((tree));
static char * operator_string PROTO ((tree));
static tree do_merge_string_cste PROTO ((tree, const char *, int, int));
static tree merge_string_cste PROTO ((tree, tree, int));
/* Number of error found so far. */ /* Number of error found so far. */
int java_error_count; int java_error_count;
...@@ -378,7 +390,7 @@ static tree java_lang_cloneable = NULL_TREE; ...@@ -378,7 +390,7 @@ static tree java_lang_cloneable = NULL_TREE;
static tree current_static_block = NULL_TREE; static tree current_static_block = NULL_TREE;
#line 306 "./parse.y" #line 318 "./parse.y"
typedef union { typedef union {
tree node; tree node;
int sub_token; int sub_token;
...@@ -388,7 +400,7 @@ typedef union { ...@@ -388,7 +400,7 @@ typedef union {
} operator; } operator;
int value; int value;
} YYSTYPE; } YYSTYPE;
#line 316 "./parse.y" #line 328 "./parse.y"
#include "lex.c" #include "lex.c"
#ifndef YYDEBUG #ifndef YYDEBUG
...@@ -409,7 +421,7 @@ typedef union { ...@@ -409,7 +421,7 @@ typedef union {
#define YYFLAG -32768 #define YYFLAG -32768
#define YYNTBASE 110 #define YYNTBASE 110
#define YYTRANSLATE(x) ((unsigned)(x) <= 363 ? yytranslate[x] : 266) #define YYTRANSLATE(x) ((unsigned)(x) <= 364 ? yytranslate[x] : 266)
static const char yytranslate[] = { 0, static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
...@@ -437,18 +449,18 @@ static const char yytranslate[] = { 0, ...@@ -437,18 +449,18 @@ static const char yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
107, 108, 109 106, 107, 108, 109
}; };
#if YYDEBUG != 0 #if YYDEBUG != 0
...@@ -686,57 +698,57 @@ static const short yyrhs[] = { 123, ...@@ -686,57 +698,57 @@ static const short yyrhs[] = { 123,
#if YYDEBUG != 0 #if YYDEBUG != 0
static const short yyrline[] = { 0, static const short yyrline[] = { 0,
460, 466, 468, 469, 470, 471, 472, 476, 478, 481, 472, 478, 480, 481, 482, 483, 484, 488, 490, 493,
483, 484, 487, 489, 492, 496, 500, 504, 510, 512, 495, 496, 499, 501, 504, 508, 512, 516, 522, 524,
514, 516, 521, 523, 526, 530, 535, 540, 542, 543, 526, 528, 533, 535, 538, 542, 547, 552, 554, 555,
544, 545, 546, 547, 548, 551, 556, 562, 564, 567, 556, 557, 558, 559, 560, 563, 568, 574, 576, 579,
570, 572, 576, 578, 581, 608, 610, 614, 627, 629, 582, 584, 588, 590, 593, 620, 622, 626, 639, 641,
633, 640, 645, 647, 657, 662, 677, 681, 684, 687, 645, 652, 657, 659, 669, 674, 689, 693, 696, 699,
690, 692, 694, 699, 703, 705, 707, 709, 713, 715, 702, 704, 706, 711, 715, 717, 719, 721, 725, 727,
717, 724, 730, 735, 739, 748, 758, 760, 763, 765, 729, 736, 742, 747, 751, 760, 770, 772, 775, 777,
766, 767, 771, 773, 775, 776, 778, 783, 786, 796, 778, 779, 783, 785, 787, 788, 790, 795, 798, 808,
799, 801, 805, 808, 815, 821, 829, 831, 833, 835, 811, 813, 817, 820, 827, 833, 841, 843, 845, 847,
837, 841, 843, 847, 854, 855, 859, 862, 864, 866, 849, 853, 855, 859, 866, 867, 871, 874, 876, 878,
868, 870, 872, 874, 876, 883, 886, 888, 897, 899, 880, 882, 884, 886, 888, 895, 898, 900, 909, 911,
903, 908, 913, 917, 922, 927, 929, 936, 938, 940, 915, 920, 925, 929, 934, 939, 941, 948, 950, 952,
944, 947, 949, 953, 955, 956, 961, 967, 974, 982, 956, 959, 961, 965, 967, 968, 973, 979, 986, 994,
989, 992, 995, 999, 1002, 1006, 1015, 1017, 1019, 1023, 1001, 1004, 1007, 1011, 1014, 1018, 1027, 1029, 1031, 1035,
1025, 1028, 1035, 1043, 1045, 1049, 1056, 1066, 1070, 1073, 1037, 1040, 1047, 1055, 1057, 1061, 1068, 1078, 1082, 1085,
1076, 1079, 1082, 1085, 1088, 1091, 1093, 1097, 1103, 1108, 1088, 1091, 1094, 1097, 1100, 1103, 1105, 1109, 1115, 1120,
1110, 1114, 1117, 1121, 1123, 1126, 1128, 1129, 1131, 1135, 1122, 1126, 1129, 1133, 1135, 1138, 1140, 1141, 1143, 1147,
1139, 1145, 1150, 1153, 1155, 1159, 1165, 1169, 1174, 1183, 1151, 1157, 1162, 1165, 1167, 1171, 1177, 1181, 1186, 1195,
1187, 1192, 1204, 1206, 1209, 1211, 1213, 1217, 1221, 1224, 1199, 1204, 1216, 1218, 1221, 1223, 1225, 1229, 1233, 1236,
1228, 1230, 1231, 1232, 1233, 1234, 1238, 1240, 1241, 1242, 1240, 1242, 1243, 1244, 1245, 1246, 1250, 1252, 1253, 1254,
1243, 1247, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1255, 1259, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268,
1257, 1258, 1261, 1266, 1277, 1280, 1284, 1291, 1301, 1307, 1269, 1270, 1273, 1278, 1289, 1292, 1296, 1303, 1313, 1319,
1313, 1319, 1321, 1327, 1329, 1335, 1337, 1339, 1341, 1343, 1325, 1331, 1333, 1339, 1341, 1347, 1349, 1351, 1353, 1355,
1347, 1349, 1350, 1351, 1352, 1353, 1354, 1357, 1363, 1365, 1359, 1361, 1362, 1363, 1364, 1365, 1366, 1369, 1375, 1377,
1367, 1371, 1376, 1381, 1387, 1397, 1403, 1405, 1407, 1414, 1379, 1383, 1388, 1393, 1399, 1409, 1415, 1417, 1419, 1426,
1417, 1419, 1421, 1425, 1427, 1430, 1434, 1436, 1439, 1446, 1429, 1431, 1433, 1437, 1439, 1442, 1446, 1448, 1451, 1458,
1452, 1454, 1456, 1460, 1468, 1471, 1473, 1475, 1479, 1484, 1464, 1466, 1468, 1472, 1480, 1483, 1485, 1487, 1491, 1496,
1493, 1498, 1501, 1508, 1510, 1512, 1516, 1519, 1528, 1535, 1505, 1510, 1513, 1520, 1522, 1524, 1528, 1531, 1540, 1547,
1537, 1541, 1554, 1556, 1562, 1568, 1572, 1574, 1578, 1581, 1549, 1553, 1566, 1568, 1574, 1580, 1584, 1586, 1590, 1593,
1583, 1587, 1590, 1592, 1594, 1598, 1601, 1603, 1605, 1609, 1595, 1599, 1602, 1604, 1606, 1610, 1613, 1615, 1617, 1621,
1612, 1614, 1616, 1620, 1626, 1628, 1632, 1639, 1641, 1643, 1624, 1626, 1628, 1632, 1638, 1640, 1644, 1651, 1653, 1655,
1645, 1649, 1657, 1660, 1662, 1667, 1671, 1673, 1680, 1688, 1657, 1661, 1669, 1672, 1674, 1679, 1683, 1685, 1692, 1700,
1705, 1707, 1709, 1713, 1716, 1721, 1723, 1726, 1728, 1730, 1717, 1719, 1721, 1725, 1728, 1733, 1735, 1738, 1740, 1742,
1732, 1733, 1734, 1735, 1739, 1741, 1743, 1748, 1750, 1752, 1744, 1745, 1746, 1747, 1751, 1753, 1755, 1760, 1762, 1764,
1754, 1756, 1760, 1763, 1768, 1770, 1775, 1776, 1777, 1778, 1766, 1768, 1772, 1775, 1780, 1782, 1787, 1788, 1789, 1790,
1779, 1781, 1783, 1785, 1787, 1789, 1793, 1795, 1798, 1804, 1791, 1793, 1795, 1797, 1799, 1801, 1805, 1807, 1810, 1816,
1809, 1813, 1816, 1818, 1820, 1824, 1826, 1828, 1830, 1834, 1821, 1825, 1828, 1830, 1832, 1836, 1838, 1840, 1842, 1846,
1837, 1841, 1847, 1849, 1857, 1884, 1886, 1890, 1895, 1902, 1849, 1853, 1859, 1861, 1869, 1896, 1898, 1902, 1907, 1914,
1906, 1909, 1911, 1922, 1933, 1938, 1947, 1949, 1953, 1956, 1918, 1921, 1923, 1934, 1945, 1950, 1959, 1961, 1965, 1968,
1958, 1963, 1968, 1973, 1980, 1982, 1983, 1984, 1987, 1992, 1970, 1975, 1980, 1985, 1992, 1994, 1995, 1996, 1999, 2004,
1997, 1999, 2000, 2002, 2004, 2005, 2007, 2011, 2014, 2018, 2009, 2011, 2012, 2014, 2016, 2017, 2019, 2023, 2026, 2030,
2021, 2025, 2027, 2029, 2031, 2032, 2034, 2038, 2047, 2049, 2033, 2037, 2039, 2041, 2043, 2044, 2046, 2050, 2059, 2061,
2051, 2064, 2066, 2072, 2074, 2076, 2080, 2082, 2087, 2092, 2063, 2076, 2078, 2084, 2086, 2088, 2092, 2094, 2099, 2104,
2097, 2099, 2101, 2105, 2107, 2112, 2117, 2119, 2123, 2125, 2109, 2111, 2113, 2117, 2119, 2124, 2129, 2131, 2135, 2137,
2130, 2135, 2140, 2142, 2144, 2148, 2150, 2155, 2160, 2165, 2142, 2147, 2152, 2154, 2156, 2160, 2162, 2167, 2172, 2177,
2170, 2172, 2174, 2176, 2178, 2180, 2184, 2186, 2191, 2196, 2182, 2184, 2186, 2188, 2190, 2192, 2196, 2198, 2203, 2208,
2198, 2202, 2204, 2209, 2213, 2215, 2220, 2224, 2226, 2231, 2210, 2214, 2216, 2221, 2225, 2227, 2232, 2236, 2238, 2243,
2235, 2237, 2242, 2246, 2248, 2253, 2257, 2259, 2264, 2270, 2247, 2249, 2254, 2258, 2260, 2265, 2269, 2271, 2276, 2282,
2272, 2276, 2278, 2281, 2284, 2292, 2294, 2295, 2298, 2300, 2284, 2288, 2290, 2293, 2296, 2304, 2306, 2307, 2310, 2312,
2303, 2307 2315, 2319
}; };
#endif #endif
...@@ -2214,8 +2226,7 @@ static const short yycheck[] = { 3, ...@@ -2214,8 +2226,7 @@ static const short yycheck[] = { 3,
#define YYPURE 1 #define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/lib/bison.simple" #line 3 "/usr/local/gnu/share/bison.simple"
/* This file comes from bison-1.27. */
/* Skeleton output parser for bison, /* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
...@@ -2232,66 +2243,46 @@ static const short yycheck[] = { 3, ...@@ -2232,66 +2243,46 @@ static const short yycheck[] = { 3,
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a /* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction. Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */ in version 1.24 of Bison. */
/* This is the parser code that is written into each bison parser #ifndef alloca
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
#ifndef YYSTACK_USE_ALLOCA
#ifdef alloca
#define YYSTACK_USE_ALLOCA
#else /* alloca not defined */
#ifdef __GNUC__ #ifdef __GNUC__
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca #define alloca __builtin_alloca
#else /* not GNU C. */ #else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#define YYSTACK_USE_ALLOCA
#include <alloca.h> #include <alloca.h>
#else /* not sparc */ #else /* not sparc */
/* We think this test detects Watcom and Microsoft C. */ #if defined (MSDOS) && !defined (__TURBOC__)
/* This used to test MSDOS, but that is a bad idea
since that symbol is in the user namespace. */
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
#if 0 /* No need for malloc.h, which pollutes the namespace;
instead, just don't use alloca. */
#include <malloc.h> #include <malloc.h>
#endif
#else /* not MSDOS, or __TURBOC__ */ #else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX) #if defined(_AIX)
/* I don't know what this was needed for, but it pollutes the namespace. #include <malloc.h>
So I turned it off. rms, 2 May 1997. */
/* #include <malloc.h> */
#pragma alloca #pragma alloca
#define YYSTACK_USE_ALLOCA #else /* not MSDOS, __TURBOC__, or _AIX */
#else /* not MSDOS, or __TURBOC__, or _AIX */ #ifdef __hpux
#if 0 #ifdef __cplusplus
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, extern "C" {
and on HPUX 10. Eventually we can turn this on. */ void *alloca (unsigned int);
#define YYSTACK_USE_ALLOCA };
#define alloca __builtin_alloca #else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */ #endif /* __hpux */
#endif
#endif /* not _AIX */ #endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */ #endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc */ #endif /* not sparc. */
#endif /* not GNU C */ #endif /* not GNU C. */
#endif /* alloca not defined */ #endif /* alloca not defined. */
#endif /* YYSTACK_USE_ALLOCA not defined */
#ifdef YYSTACK_USE_ALLOCA /* This is the parser code that is written into each bison parser
#define YYSTACK_ALLOC alloca when the %semantic_parser declaration is not specified in the grammar.
#else It was written by Richard Stallman by simplifying the hairy parser
#define YYSTACK_ALLOC malloc used when %semantic_parser is specified. */
#endif
/* Note: there must be only one dollar sign in this file. /* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action It is replaced by the list of actions, each action
...@@ -2301,8 +2292,8 @@ static const short yycheck[] = { 3, ...@@ -2301,8 +2292,8 @@ static const short yycheck[] = { 3,
#define yyclearin (yychar = YYEMPTY) #define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2 #define YYEMPTY -2
#define YYEOF 0 #define YYEOF 0
#define YYACCEPT goto yyacceptlab #define YYACCEPT return(0)
#define YYABORT goto yyabortlab #define YYABORT return(1)
#define YYERROR goto yyerrlab1 #define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. /* Like YYERROR except do call yyerror.
This remains here temporarily to ease the This remains here temporarily to ease the
...@@ -2384,10 +2375,10 @@ int yydebug; /* nonzero means print parse trace */ ...@@ -2384,10 +2375,10 @@ int yydebug; /* nonzero means print parse trace */
#define YYMAXDEPTH 10000 #define YYMAXDEPTH 10000
#endif #endif
/* Define __yy_memcpy. Note that the size argument /* Prevent warning if -Wstrict-prototypes. */
should be passed with type unsigned int, because that is what the non-GCC #ifdef __GNUC__
definitions require. With GCC, __builtin_memcpy takes an arg int yyparse (void);
of type size_t, but it can handle unsigned int. */ #endif
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
...@@ -2400,7 +2391,7 @@ static void ...@@ -2400,7 +2391,7 @@ static void
__yy_memcpy (to, from, count) __yy_memcpy (to, from, count)
char *to; char *to;
char *from; char *from;
unsigned int count; int count;
{ {
register char *f = from; register char *f = from;
register char *t = to; register char *t = to;
...@@ -2415,10 +2406,10 @@ __yy_memcpy (to, from, count) ...@@ -2415,10 +2406,10 @@ __yy_memcpy (to, from, count)
/* This is the most reliable way to avoid incompatibilities /* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */ in available built-in functions on various systems. */
static void static void
__yy_memcpy (char *to, char *from, unsigned int count) __yy_memcpy (char *to, char *from, int count)
{ {
register char *t = to;
register char *f = from; register char *f = from;
register char *t = to;
register int i = count; register int i = count;
while (i-- > 0) while (i-- > 0)
...@@ -2428,7 +2419,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) ...@@ -2428,7 +2419,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
#endif #endif
#endif #endif
#line 216 "/usr/lib/bison.simple" #line 196 "/usr/local/gnu/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed /* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *. into yyparse. The argument should have type void *.
...@@ -2449,15 +2440,6 @@ __yy_memcpy (char *to, char *from, unsigned int count) ...@@ -2449,15 +2440,6 @@ __yy_memcpy (char *to, char *from, unsigned int count)
#define YYPARSE_PARAM_DECL #define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */ #endif /* not YYPARSE_PARAM */
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
#ifdef YYPARSE_PARAM
int yyparse (void *);
#else
int yyparse (void);
#endif
#endif
int int
yyparse(YYPARSE_PARAM_ARG) yyparse(YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL YYPARSE_PARAM_DECL
...@@ -2486,7 +2468,6 @@ yyparse(YYPARSE_PARAM_ARG) ...@@ -2486,7 +2468,6 @@ yyparse(YYPARSE_PARAM_ARG)
#endif #endif
int yystacksize = YYINITDEPTH; int yystacksize = YYINITDEPTH;
int yyfree_stacks = 0;
#ifdef YYPURE #ifdef YYPURE
int yychar; int yychar;
...@@ -2571,32 +2552,18 @@ yynewstate: ...@@ -2571,32 +2552,18 @@ yynewstate:
if (yystacksize >= YYMAXDEPTH) if (yystacksize >= YYMAXDEPTH)
{ {
yyerror("parser stack overflow"); yyerror("parser stack overflow");
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
#ifdef YYLSP_NEEDED
free (yyls);
#endif
}
return 2; return 2;
} }
yystacksize *= 2; yystacksize *= 2;
if (yystacksize > YYMAXDEPTH) if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH; yystacksize = YYMAXDEPTH;
#ifndef YYSTACK_USE_ALLOCA yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
yyfree_stacks = 1; __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
#endif yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
__yy_memcpy ((char *)yyss, (char *)yyss1,
size * (unsigned int) sizeof (*yyssp));
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
__yy_memcpy ((char *)yyvs, (char *)yyvs1,
size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED #ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
__yy_memcpy ((char *)yyls, (char *)yyls1, __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
size * (unsigned int) sizeof (*yylsp));
#endif #endif
#endif /* no yyoverflow */ #endif /* no yyoverflow */
...@@ -2757,70 +2724,70 @@ yyreduce: ...@@ -2757,70 +2724,70 @@ yyreduce:
switch (yyn) { switch (yyn) {
case 1: case 1:
#line 462 "./parse.y" #line 474 "./parse.y"
{; {;
break;} break;}
case 18: case 18:
#line 506 "./parse.y" #line 518 "./parse.y"
{ {
yyval.node = build_java_array_type (yyvsp[-2].node, -1); yyval.node = build_java_array_type (yyvsp[-2].node, -1);
CLASS_LOADED_P (yyval.node) = 1; CLASS_LOADED_P (yyval.node) = 1;
; ;
break;} break;}
case 19: case 19:
#line 511 "./parse.y" #line 523 "./parse.y"
{ yyval.node = build_unresolved_array_type (yyvsp[-2].node); ; { yyval.node = build_unresolved_array_type (yyvsp[-2].node); ;
break;} break;}
case 20: case 20:
#line 513 "./parse.y" #line 525 "./parse.y"
{ yyval.node = build_unresolved_array_type (yyvsp[-2].node); ; { yyval.node = build_unresolved_array_type (yyvsp[-2].node); ;
break;} break;}
case 21: case 21:
#line 515 "./parse.y" #line 527 "./parse.y"
{RULE ("']' expected"); RECOVER;; {RULE ("']' expected"); RECOVER;;
break;} break;}
case 22: case 22:
#line 517 "./parse.y" #line 529 "./parse.y"
{RULE ("']' expected"); RECOVER;; {RULE ("']' expected"); RECOVER;;
break;} break;}
case 26: case 26:
#line 532 "./parse.y" #line 544 "./parse.y"
{ yyval.node = make_qualified_name (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ; { yyval.node = make_qualified_name (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ;
break;} break;}
case 28: case 28:
#line 541 "./parse.y" #line 553 "./parse.y"
{yyval.node = NULL;; {yyval.node = NULL;;
break;} break;}
case 36: case 36:
#line 553 "./parse.y" #line 565 "./parse.y"
{ {
yyval.node = NULL; yyval.node = NULL;
; ;
break;} break;}
case 37: case 37:
#line 557 "./parse.y" #line 569 "./parse.y"
{ {
yyval.node = NULL; yyval.node = NULL;
; ;
break;} break;}
case 40: case 40:
#line 569 "./parse.y" #line 581 "./parse.y"
{ ctxp->package = EXPR_WFL_NODE (yyvsp[-1].node); ; { ctxp->package = EXPR_WFL_NODE (yyvsp[-1].node); ;
break;} break;}
case 41: case 41:
#line 571 "./parse.y" #line 583 "./parse.y"
{yyerror ("Missing name"); RECOVER;; {yyerror ("Missing name"); RECOVER;;
break;} break;}
case 42: case 42:
#line 573 "./parse.y" #line 585 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 45: case 45:
#line 583 "./parse.y" #line 595 "./parse.y"
{ {
tree name = EXPR_WFL_NODE (yyvsp[-1].node), node, last_name; tree name = EXPR_WFL_NODE (yyvsp[-1].node), node, last_name;
int i = IDENTIFIER_LENGTH (name)-1; int i = IDENTIFIER_LENGTH (name)-1;
char *last = &IDENTIFIER_POINTER (name)[i]; const char *last = &IDENTIFIER_POINTER (name)[i];
while (last != IDENTIFIER_POINTER (name)) while (last != IDENTIFIER_POINTER (name))
{ {
if (last [0] == '.') if (last [0] == '.')
...@@ -2844,15 +2811,15 @@ case 45: ...@@ -2844,15 +2811,15 @@ case 45:
; ;
break;} break;}
case 46: case 46:
#line 609 "./parse.y" #line 621 "./parse.y"
{yyerror ("Missing name"); RECOVER;; {yyerror ("Missing name"); RECOVER;;
break;} break;}
case 47: case 47:
#line 611 "./parse.y" #line 623 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 48: case 48:
#line 616 "./parse.y" #line 628 "./parse.y"
{ {
tree name = EXPR_WFL_NODE (yyvsp[-3].node); tree name = EXPR_WFL_NODE (yyvsp[-3].node);
/* Don't import java.lang.* twice. */ /* Don't import java.lang.* twice. */
...@@ -2866,15 +2833,15 @@ case 48: ...@@ -2866,15 +2833,15 @@ case 48:
; ;
break;} break;}
case 49: case 49:
#line 628 "./parse.y" #line 640 "./parse.y"
{yyerror ("'*' expected"); RECOVER;; {yyerror ("'*' expected"); RECOVER;;
break;} break;}
case 50: case 50:
#line 630 "./parse.y" #line 642 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 51: case 51:
#line 635 "./parse.y" #line 647 "./parse.y"
{ {
maybe_generate_finit (); maybe_generate_finit ();
maybe_generate_clinit (); maybe_generate_clinit ();
...@@ -2882,31 +2849,31 @@ case 51: ...@@ -2882,31 +2849,31 @@ case 51:
; ;
break;} break;}
case 52: case 52:
#line 641 "./parse.y" #line 653 "./parse.y"
{ {
maybe_generate_clinit (); maybe_generate_clinit ();
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 53: case 53:
#line 646 "./parse.y" #line 658 "./parse.y"
{ yyval.node = NULL; ; { yyval.node = NULL; ;
break;} break;}
case 54: case 54:
#line 648 "./parse.y" #line 660 "./parse.y"
{ {
YYERROR_NOW; YYERROR_NOW;
yyerror ("Class or interface declaration expected"); yyerror ("Class or interface declaration expected");
; ;
break;} break;}
case 55: case 55:
#line 659 "./parse.y" #line 671 "./parse.y"
{ {
yyval.value = (1 << yyvsp[0].value); yyval.value = (1 << yyvsp[0].value);
; ;
break;} break;}
case 56: case 56:
#line 663 "./parse.y" #line 675 "./parse.y"
{ {
int acc = (1 << yyvsp[0].value); int acc = (1 << yyvsp[0].value);
if (yyval.value & acc) if (yyval.value & acc)
...@@ -2920,95 +2887,95 @@ case 56: ...@@ -2920,95 +2887,95 @@ case 56:
; ;
break;} break;}
case 57: case 57:
#line 679 "./parse.y" #line 691 "./parse.y"
{ create_class (yyvsp[-4].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; { create_class (yyvsp[-4].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 58: case 58:
#line 681 "./parse.y" #line 693 "./parse.y"
{ {
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 59: case 59:
#line 685 "./parse.y" #line 697 "./parse.y"
{ create_class (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; { create_class (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 60: case 60:
#line 687 "./parse.y" #line 699 "./parse.y"
{ {
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 61: case 61:
#line 691 "./parse.y" #line 703 "./parse.y"
{yyerror ("Missing class name"); RECOVER;; {yyerror ("Missing class name"); RECOVER;;
break;} break;}
case 62: case 62:
#line 693 "./parse.y" #line 705 "./parse.y"
{yyerror ("Missing class name"); RECOVER;; {yyerror ("Missing class name"); RECOVER;;
break;} break;}
case 63: case 63:
#line 695 "./parse.y" #line 707 "./parse.y"
{ {
if (!ctxp->class_err) yyerror ("'{' expected"); if (!ctxp->class_err) yyerror ("'{' expected");
DRECOVER(class1); DRECOVER(class1);
; ;
break;} break;}
case 64: case 64:
#line 700 "./parse.y" #line 712 "./parse.y"
{if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER;; {if (!ctxp->class_err) yyerror ("'{' expected"); RECOVER;;
break;} break;}
case 65: case 65:
#line 704 "./parse.y" #line 716 "./parse.y"
{ yyval.node = NULL; ; { yyval.node = NULL; ;
break;} break;}
case 66: case 66:
#line 706 "./parse.y" #line 718 "./parse.y"
{ yyval.node = yyvsp[0].node; ; { yyval.node = yyvsp[0].node; ;
break;} break;}
case 67: case 67:
#line 708 "./parse.y" #line 720 "./parse.y"
{yyerror ("'{' expected"); ctxp->class_err=1;; {yyerror ("'{' expected"); ctxp->class_err=1;;
break;} break;}
case 68: case 68:
#line 710 "./parse.y" #line 722 "./parse.y"
{yyerror ("Missing super class name"); ctxp->class_err=1;; {yyerror ("Missing super class name"); ctxp->class_err=1;;
break;} break;}
case 69: case 69:
#line 714 "./parse.y" #line 726 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 70: case 70:
#line 716 "./parse.y" #line 728 "./parse.y"
{ yyval.node = yyvsp[0].node; ; { yyval.node = yyvsp[0].node; ;
break;} break;}
case 71: case 71:
#line 718 "./parse.y" #line 730 "./parse.y"
{ {
ctxp->class_err=1; ctxp->class_err=1;
yyerror ("Missing interface name"); yyerror ("Missing interface name");
; ;
break;} break;}
case 72: case 72:
#line 726 "./parse.y" #line 738 "./parse.y"
{ {
ctxp->interface_number = 1; ctxp->interface_number = 1;
yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE);
; ;
break;} break;}
case 73: case 73:
#line 731 "./parse.y" #line 743 "./parse.y"
{ {
ctxp->interface_number++; ctxp->interface_number++;
yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE));
; ;
break;} break;}
case 74: case 74:
#line 736 "./parse.y" #line 748 "./parse.y"
{yyerror ("Missing interface name"); RECOVER;; {yyerror ("Missing interface name"); RECOVER;;
break;} break;}
case 75: case 75:
#line 741 "./parse.y" #line 753 "./parse.y"
{ {
/* Store the location of the `}' when doing xrefs */ /* Store the location of the `}' when doing xrefs */
if (flag_emit_xref) if (flag_emit_xref)
...@@ -3018,7 +2985,7 @@ case 75: ...@@ -3018,7 +2985,7 @@ case 75:
; ;
break;} break;}
case 76: case 76:
#line 749 "./parse.y" #line 761 "./parse.y"
{ {
/* Store the location of the `}' when doing xrefs */ /* Store the location of the `}' when doing xrefs */
if (flag_emit_xref) if (flag_emit_xref)
...@@ -3028,27 +2995,27 @@ case 76: ...@@ -3028,27 +2995,27 @@ case 76:
; ;
break;} break;}
case 82: case 82:
#line 768 "./parse.y" #line 780 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("instance initializer"); ; { yyval.node = parse_jdk1_1_error ("instance initializer"); ;
break;} break;}
case 84: case 84:
#line 774 "./parse.y" #line 786 "./parse.y"
{ yyval.node = yyvsp[-1].node; ; { yyval.node = yyvsp[-1].node; ;
break;} break;}
case 86: case 86:
#line 777 "./parse.y" #line 789 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner classe declaration"); ; { yyval.node = parse_jdk1_1_error ("inner classe declaration"); ;
break;} break;}
case 87: case 87:
#line 779 "./parse.y" #line 791 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner interface declaration"); ; { yyval.node = parse_jdk1_1_error ("inner interface declaration"); ;
break;} break;}
case 88: case 88:
#line 785 "./parse.y" #line 797 "./parse.y"
{ register_fields (0, yyvsp[-2].node, yyvsp[-1].node); ; { register_fields (0, yyvsp[-2].node, yyvsp[-1].node); ;
break;} break;}
case 89: case 89:
#line 787 "./parse.y" #line 799 "./parse.y"
{ {
check_modifiers check_modifiers
("Illegal modifier `%s' for field declaration", ("Illegal modifier `%s' for field declaration",
...@@ -3058,19 +3025,19 @@ case 89: ...@@ -3058,19 +3025,19 @@ case 89:
; ;
break;} break;}
case 91: case 91:
#line 800 "./parse.y" #line 812 "./parse.y"
{ yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ; { yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); ;
break;} break;}
case 92: case 92:
#line 802 "./parse.y" #line 814 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 93: case 93:
#line 807 "./parse.y" #line 819 "./parse.y"
{ yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ; { yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); ;
break;} break;}
case 94: case 94:
#line 809 "./parse.y" #line 821 "./parse.y"
{ {
if (java_error_count) if (java_error_count)
yyvsp[0].node = NULL_TREE; yyvsp[0].node = NULL_TREE;
...@@ -3079,7 +3046,7 @@ case 94: ...@@ -3079,7 +3046,7 @@ case 94:
; ;
break;} break;}
case 95: case 95:
#line 816 "./parse.y" #line 828 "./parse.y"
{ {
yyerror ("Missing variable initializer"); yyerror ("Missing variable initializer");
yyval.node = build_tree_list (yyvsp[-2].node, NULL_TREE); yyval.node = build_tree_list (yyvsp[-2].node, NULL_TREE);
...@@ -3087,7 +3054,7 @@ case 95: ...@@ -3087,7 +3054,7 @@ case 95:
; ;
break;} break;}
case 96: case 96:
#line 822 "./parse.y" #line 834 "./parse.y"
{ {
yyerror ("';' expected"); yyerror ("';' expected");
yyval.node = build_tree_list (yyvsp[-3].node, NULL_TREE); yyval.node = build_tree_list (yyvsp[-3].node, NULL_TREE);
...@@ -3095,85 +3062,85 @@ case 96: ...@@ -3095,85 +3062,85 @@ case 96:
; ;
break;} break;}
case 98: case 98:
#line 832 "./parse.y" #line 844 "./parse.y"
{ yyval.node = build_unresolved_array_type (yyvsp[-2].node); ; { yyval.node = build_unresolved_array_type (yyvsp[-2].node); ;
break;} break;}
case 99: case 99:
#line 834 "./parse.y" #line 846 "./parse.y"
{yyerror ("Invalid declaration"); DRECOVER(vdi);; {yyerror ("Invalid declaration"); DRECOVER(vdi);;
break;} break;}
case 100: case 100:
#line 836 "./parse.y" #line 848 "./parse.y"
{yyerror ("']' expected"); DRECOVER(vdi);; {yyerror ("']' expected"); DRECOVER(vdi);;
break;} break;}
case 101: case 101:
#line 838 "./parse.y" #line 850 "./parse.y"
{yyerror ("Unbalanced ']'"); DRECOVER(vdi);; {yyerror ("Unbalanced ']'"); DRECOVER(vdi);;
break;} break;}
case 104: case 104:
#line 849 "./parse.y" #line 861 "./parse.y"
{ {
current_function_decl = yyvsp[0].node; current_function_decl = yyvsp[0].node;
source_start_java_method (current_function_decl); source_start_java_method (current_function_decl);
; ;
break;} break;}
case 105: case 105:
#line 854 "./parse.y" #line 866 "./parse.y"
{ finish_method_declaration (yyvsp[0].node); ; { finish_method_declaration (yyvsp[0].node); ;
break;} break;}
case 106: case 106:
#line 856 "./parse.y" #line 868 "./parse.y"
{YYNOT_TWICE yyerror ("'{' expected"); RECOVER;; {YYNOT_TWICE yyerror ("'{' expected"); RECOVER;;
break;} break;}
case 107: case 107:
#line 861 "./parse.y" #line 873 "./parse.y"
{ yyval.node = method_header (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = method_header (0, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 108: case 108:
#line 863 "./parse.y" #line 875 "./parse.y"
{ yyval.node = method_header (0, void_type_node, yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = method_header (0, void_type_node, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 109: case 109:
#line 865 "./parse.y" #line 877 "./parse.y"
{ yyval.node = method_header (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = method_header (yyvsp[-3].value, yyvsp[-2].node, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 110: case 110:
#line 867 "./parse.y" #line 879 "./parse.y"
{ yyval.node = method_header (yyvsp[-3].value, void_type_node, yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = method_header (yyvsp[-3].value, void_type_node, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 111: case 111:
#line 869 "./parse.y" #line 881 "./parse.y"
{RECOVER;; {RECOVER;;
break;} break;}
case 112: case 112:
#line 871 "./parse.y" #line 883 "./parse.y"
{RECOVER;; {RECOVER;;
break;} break;}
case 113: case 113:
#line 873 "./parse.y" #line 885 "./parse.y"
{yyerror ("Identifier expected"); RECOVER;; {yyerror ("Identifier expected"); RECOVER;;
break;} break;}
case 114: case 114:
#line 875 "./parse.y" #line 887 "./parse.y"
{yyerror ("Identifier expected"); RECOVER;; {yyerror ("Identifier expected"); RECOVER;;
break;} break;}
case 115: case 115:
#line 877 "./parse.y" #line 889 "./parse.y"
{ {
yyerror ("Invalid method declaration, return type required"); yyerror ("Invalid method declaration, return type required");
RECOVER; RECOVER;
; ;
break;} break;}
case 116: case 116:
#line 885 "./parse.y" #line 897 "./parse.y"
{ yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ; { yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ;
break;} break;}
case 117: case 117:
#line 887 "./parse.y" #line 899 "./parse.y"
{ yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ; { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ;
break;} break;}
case 118: case 118:
#line 889 "./parse.y" #line 901 "./parse.y"
{ {
EXPR_WFL_LINECOL (wfl_operator) = yyvsp[-1].operator.location; EXPR_WFL_LINECOL (wfl_operator) = yyvsp[-1].operator.location;
TREE_PURPOSE (yyvsp[-2].node) = TREE_PURPOSE (yyvsp[-2].node) =
...@@ -3184,150 +3151,150 @@ case 118: ...@@ -3184,150 +3151,150 @@ case 118:
; ;
break;} break;}
case 119: case 119:
#line 898 "./parse.y" #line 910 "./parse.y"
{yyerror ("')' expected"); DRECOVER(method_declarator);; {yyerror ("')' expected"); DRECOVER(method_declarator);;
break;} break;}
case 120: case 120:
#line 900 "./parse.y" #line 912 "./parse.y"
{yyerror ("']' expected"); RECOVER;; {yyerror ("']' expected"); RECOVER;;
break;} break;}
case 121: case 121:
#line 905 "./parse.y" #line 917 "./parse.y"
{ {
ctxp->formal_parameter_number = 1; ctxp->formal_parameter_number = 1;
; ;
break;} break;}
case 122: case 122:
#line 909 "./parse.y" #line 921 "./parse.y"
{ {
ctxp->formal_parameter_number += 1; ctxp->formal_parameter_number += 1;
yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node); yyval.node = chainon (yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 123: case 123:
#line 914 "./parse.y" #line 926 "./parse.y"
{yyerror ("Missing formal parameter term"); RECOVER;; {yyerror ("Missing formal parameter term"); RECOVER;;
break;} break;}
case 124: case 124:
#line 919 "./parse.y" #line 931 "./parse.y"
{ {
yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node);
; ;
break;} break;}
case 125: case 125:
#line 923 "./parse.y" #line 935 "./parse.y"
{ {
parse_jdk1_1_error ("final parameters"); parse_jdk1_1_error ("final parameters");
yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node); yyval.node = build_tree_list (yyvsp[0].node, yyvsp[-1].node);
; ;
break;} break;}
case 126: case 126:
#line 928 "./parse.y" #line 940 "./parse.y"
{yyerror ("Missing identifier"); RECOVER;; {yyerror ("Missing identifier"); RECOVER;;
break;} break;}
case 127: case 127:
#line 930 "./parse.y" #line 942 "./parse.y"
{ {
SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[-2].value)); SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[-2].value));
yyerror ("Missing identifier"); RECOVER; yyerror ("Missing identifier"); RECOVER;
; ;
break;} break;}
case 128: case 128:
#line 937 "./parse.y" #line 949 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 129: case 129:
#line 939 "./parse.y" #line 951 "./parse.y"
{ yyval.node = yyvsp[0].node; ; { yyval.node = yyvsp[0].node; ;
break;} break;}
case 130: case 130:
#line 941 "./parse.y" #line 953 "./parse.y"
{yyerror ("Missing class type term"); RECOVER;; {yyerror ("Missing class type term"); RECOVER;;
break;} break;}
case 131: case 131:
#line 946 "./parse.y" #line 958 "./parse.y"
{ yyval.node = build_tree_list (yyvsp[0].node, yyvsp[0].node); ; { yyval.node = build_tree_list (yyvsp[0].node, yyvsp[0].node); ;
break;} break;}
case 132: case 132:
#line 948 "./parse.y" #line 960 "./parse.y"
{ yyval.node = tree_cons (yyvsp[0].node, yyvsp[0].node, yyvsp[-2].node); ; { yyval.node = tree_cons (yyvsp[0].node, yyvsp[0].node, yyvsp[-2].node); ;
break;} break;}
case 133: case 133:
#line 950 "./parse.y" #line 962 "./parse.y"
{yyerror ("Missing class type term"); RECOVER;; {yyerror ("Missing class type term"); RECOVER;;
break;} break;}
case 136: case 136:
#line 957 "./parse.y" #line 969 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 137: case 137:
#line 963 "./parse.y" #line 975 "./parse.y"
{ {
TREE_CHAIN (yyvsp[0].node) = ctxp->static_initialized; TREE_CHAIN (yyvsp[0].node) = ctxp->static_initialized;
ctxp->static_initialized = yyvsp[0].node; ctxp->static_initialized = yyvsp[0].node;
; ;
break;} break;}
case 138: case 138:
#line 968 "./parse.y" #line 980 "./parse.y"
{ {
TREE_CHAIN (yyvsp[-1].node) = ctxp->static_initialized; TREE_CHAIN (yyvsp[-1].node) = ctxp->static_initialized;
ctxp->static_initialized = yyvsp[-1].node; ctxp->static_initialized = yyvsp[-1].node;
; ;
break;} break;}
case 139: case 139:
#line 976 "./parse.y" #line 988 "./parse.y"
{ {
SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[0].value)); SOURCE_FRONTEND_DEBUG (("Modifiers: %d", yyvsp[0].value));
; ;
break;} break;}
case 140: case 140:
#line 984 "./parse.y" #line 996 "./parse.y"
{ {
current_function_decl = yyvsp[0].node; current_function_decl = yyvsp[0].node;
source_start_java_method (current_function_decl); source_start_java_method (current_function_decl);
; ;
break;} break;}
case 141: case 141:
#line 989 "./parse.y" #line 1001 "./parse.y"
{ finish_method_declaration (yyvsp[0].node); ; { finish_method_declaration (yyvsp[0].node); ;
break;} break;}
case 142: case 142:
#line 994 "./parse.y" #line 1006 "./parse.y"
{ yyval.node = method_header (0, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = method_header (0, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 143: case 143:
#line 996 "./parse.y" #line 1008 "./parse.y"
{ yyval.node = method_header (yyvsp[-2].value, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = method_header (yyvsp[-2].value, NULL_TREE, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 144: case 144:
#line 1001 "./parse.y" #line 1013 "./parse.y"
{ yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ; { yyval.node = method_declarator (yyvsp[-2].node, NULL_TREE); ;
break;} break;}
case 145: case 145:
#line 1003 "./parse.y" #line 1015 "./parse.y"
{ yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ; { yyval.node = method_declarator (yyvsp[-3].node, yyvsp[-1].node); ;
break;} break;}
case 146: case 146:
#line 1011 "./parse.y" #line 1023 "./parse.y"
{ {
BLOCK_EXPR_BODY (yyvsp[0].node) = empty_stmt_node; BLOCK_EXPR_BODY (yyvsp[0].node) = empty_stmt_node;
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 147: case 147:
#line 1016 "./parse.y" #line 1028 "./parse.y"
{ yyval.node = yyvsp[0].node; ; { yyval.node = yyvsp[0].node; ;
break;} break;}
case 148: case 148:
#line 1018 "./parse.y" #line 1030 "./parse.y"
{ yyval.node = yyvsp[0].node; ; { yyval.node = yyvsp[0].node; ;
break;} break;}
case 149: case 149:
#line 1020 "./parse.y" #line 1032 "./parse.y"
{ yyval.node = yyvsp[0].node; ; { yyval.node = yyvsp[0].node; ;
break;} break;}
case 152: case 152:
#line 1030 "./parse.y" #line 1042 "./parse.y"
{ {
yyval.node = build_method_invocation (yyvsp[-3].node, NULL_TREE); yyval.node = build_method_invocation (yyvsp[-3].node, NULL_TREE);
yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-3].node), yyval.node); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-3].node), yyval.node);
...@@ -3335,7 +3302,7 @@ case 152: ...@@ -3335,7 +3302,7 @@ case 152:
; ;
break;} break;}
case 153: case 153:
#line 1036 "./parse.y" #line 1048 "./parse.y"
{ {
yyval.node = build_method_invocation (yyvsp[-4].node, yyvsp[-2].node); yyval.node = build_method_invocation (yyvsp[-4].node, yyvsp[-2].node);
yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-4].node), yyval.node); yyval.node = build_debugable_stmt (EXPR_WFL_LINECOL (yyvsp[-4].node), yyval.node);
...@@ -3343,15 +3310,15 @@ case 153: ...@@ -3343,15 +3310,15 @@ case 153:
; ;
break;} break;}
case 154: case 154:
#line 1044 "./parse.y" #line 1056 "./parse.y"
{yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ; {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ;
break;} break;}
case 155: case 155:
#line 1046 "./parse.y" #line 1058 "./parse.y"
{yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ; {yyval.node = parse_jdk1_1_error ("explicit constructor invocation"); ;
break;} break;}
case 156: case 156:
#line 1051 "./parse.y" #line 1063 "./parse.y"
{ {
tree wfl = build_wfl_node (this_identifier_node); tree wfl = build_wfl_node (this_identifier_node);
EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location;
...@@ -3359,7 +3326,7 @@ case 156: ...@@ -3359,7 +3326,7 @@ case 156:
; ;
break;} break;}
case 157: case 157:
#line 1057 "./parse.y" #line 1069 "./parse.y"
{ {
tree wfl = build_wfl_node (super_identifier_node); tree wfl = build_wfl_node (super_identifier_node);
EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location; EXPR_WFL_LINECOL (wfl) = yyvsp[0].operator.location;
...@@ -3367,133 +3334,133 @@ case 157: ...@@ -3367,133 +3334,133 @@ case 157:
; ;
break;} break;}
case 158: case 158:
#line 1068 "./parse.y" #line 1080 "./parse.y"
{ create_interface (0, yyvsp[0].node, NULL_TREE); ; { create_interface (0, yyvsp[0].node, NULL_TREE); ;
break;} break;}
case 159: case 159:
#line 1070 "./parse.y" #line 1082 "./parse.y"
{ {
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 160: case 160:
#line 1074 "./parse.y" #line 1086 "./parse.y"
{ create_interface (yyvsp[-2].value, yyvsp[0].node, NULL_TREE); ; { create_interface (yyvsp[-2].value, yyvsp[0].node, NULL_TREE); ;
break;} break;}
case 161: case 161:
#line 1076 "./parse.y" #line 1088 "./parse.y"
{ {
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 162: case 162:
#line 1080 "./parse.y" #line 1092 "./parse.y"
{ create_interface (0, yyvsp[-1].node, yyvsp[0].node); ; { create_interface (0, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 163: case 163:
#line 1082 "./parse.y" #line 1094 "./parse.y"
{ {
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 164: case 164:
#line 1086 "./parse.y" #line 1098 "./parse.y"
{ create_interface (yyvsp[-3].value, yyvsp[-1].node, yyvsp[0].node); ; { create_interface (yyvsp[-3].value, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 165: case 165:
#line 1088 "./parse.y" #line 1100 "./parse.y"
{ {
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 166: case 166:
#line 1092 "./parse.y" #line 1104 "./parse.y"
{yyerror ("'{' expected"); RECOVER;; {yyerror ("'{' expected"); RECOVER;;
break;} break;}
case 167: case 167:
#line 1094 "./parse.y" #line 1106 "./parse.y"
{yyerror ("'{' expected"); RECOVER;; {yyerror ("'{' expected"); RECOVER;;
break;} break;}
case 168: case 168:
#line 1099 "./parse.y" #line 1111 "./parse.y"
{ {
ctxp->interface_number = 1; ctxp->interface_number = 1;
yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE); yyval.node = build_tree_list (yyvsp[0].node, NULL_TREE);
; ;
break;} break;}
case 169: case 169:
#line 1104 "./parse.y" #line 1116 "./parse.y"
{ {
ctxp->interface_number++; ctxp->interface_number++;
yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE)); yyval.node = chainon (yyvsp[-2].node, build_tree_list (yyvsp[0].node, NULL_TREE));
; ;
break;} break;}
case 170: case 170:
#line 1109 "./parse.y" #line 1121 "./parse.y"
{yyerror ("Invalid interface type"); RECOVER;; {yyerror ("Invalid interface type"); RECOVER;;
break;} break;}
case 171: case 171:
#line 1111 "./parse.y" #line 1123 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 172: case 172:
#line 1116 "./parse.y" #line 1128 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 173: case 173:
#line 1118 "./parse.y" #line 1130 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 178: case 178:
#line 1130 "./parse.y" #line 1142 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner class declaration"); ; { yyval.node = parse_jdk1_1_error ("inner class declaration"); ;
break;} break;}
case 179: case 179:
#line 1132 "./parse.y" #line 1144 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner interface declaration"); ; { yyval.node = parse_jdk1_1_error ("inner interface declaration"); ;
break;} break;}
case 181: case 181:
#line 1141 "./parse.y" #line 1153 "./parse.y"
{ {
check_abstract_method_header (yyvsp[-1].node); check_abstract_method_header (yyvsp[-1].node);
current_function_decl = NULL_TREE; /* FIXME ? */ current_function_decl = NULL_TREE; /* FIXME ? */
; ;
break;} break;}
case 182: case 182:
#line 1146 "./parse.y" #line 1158 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 183: case 183:
#line 1152 "./parse.y" #line 1164 "./parse.y"
{ yyval.node = build_new_array_init (yyvsp[-1].operator.location, NULL_TREE); ; { yyval.node = build_new_array_init (yyvsp[-1].operator.location, NULL_TREE); ;
break;} break;}
case 184: case 184:
#line 1154 "./parse.y" #line 1166 "./parse.y"
{ yyval.node = build_new_array_init (yyvsp[-2].operator.location, yyvsp[-1].node); ; { yyval.node = build_new_array_init (yyvsp[-2].operator.location, yyvsp[-1].node); ;
break;} break;}
case 185: case 185:
#line 1156 "./parse.y" #line 1168 "./parse.y"
{ yyval.node = build_new_array_init (yyvsp[-3].operator.location, yyvsp[-2].node); ; { yyval.node = build_new_array_init (yyvsp[-3].operator.location, yyvsp[-2].node); ;
break;} break;}
case 186: case 186:
#line 1161 "./parse.y" #line 1173 "./parse.y"
{ {
yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node),
yyvsp[0].node, NULL_TREE); yyvsp[0].node, NULL_TREE);
; ;
break;} break;}
case 187: case 187:
#line 1166 "./parse.y" #line 1178 "./parse.y"
{ {
yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, yyvsp[-2].node); yyval.node = tree_cons (maybe_build_array_element_wfl (yyvsp[0].node), yyvsp[0].node, yyvsp[-2].node);
; ;
break;} break;}
case 188: case 188:
#line 1170 "./parse.y" #line 1182 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 189: case 189:
#line 1176 "./parse.y" #line 1188 "./parse.y"
{ {
/* Store the location of the `}' when doing xrefs */ /* Store the location of the `}' when doing xrefs */
if (current_function_decl && flag_emit_xref) if (current_function_decl && flag_emit_xref)
...@@ -3503,15 +3470,15 @@ case 189: ...@@ -3503,15 +3470,15 @@ case 189:
; ;
break;} break;}
case 190: case 190:
#line 1184 "./parse.y" #line 1196 "./parse.y"
{ yyval.node = yyvsp[0].node; ; { yyval.node = yyvsp[0].node; ;
break;} break;}
case 191: case 191:
#line 1189 "./parse.y" #line 1201 "./parse.y"
{ enter_block (); ; { enter_block (); ;
break;} break;}
case 192: case 192:
#line 1194 "./parse.y" #line 1206 "./parse.y"
{ {
maybe_absorb_scoping_blocks (); maybe_absorb_scoping_blocks ();
/* Store the location of the `}' when doing xrefs */ /* Store the location of the `}' when doing xrefs */
...@@ -3522,35 +3489,35 @@ case 192: ...@@ -3522,35 +3489,35 @@ case 192:
; ;
break;} break;}
case 196: case 196:
#line 1212 "./parse.y" #line 1224 "./parse.y"
{ java_method_add_stmt (current_function_decl, yyvsp[0].node); ; { java_method_add_stmt (current_function_decl, yyvsp[0].node); ;
break;} break;}
case 197: case 197:
#line 1214 "./parse.y" #line 1226 "./parse.y"
{ parse_jdk1_1_error ("inner class declaration"); ; { parse_jdk1_1_error ("inner class declaration"); ;
break;} break;}
case 199: case 199:
#line 1223 "./parse.y" #line 1235 "./parse.y"
{ declare_local_variables (0, yyvsp[-1].node, yyvsp[0].node); ; { declare_local_variables (0, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 200: case 200:
#line 1225 "./parse.y" #line 1237 "./parse.y"
{ declare_local_variables (yyvsp[-2].value, yyvsp[-1].node, yyvsp[0].node); ; { declare_local_variables (yyvsp[-2].value, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 206: case 206:
#line 1235 "./parse.y" #line 1247 "./parse.y"
{ yyval.node = exit_block (); ; { yyval.node = exit_block (); ;
break;} break;}
case 211: case 211:
#line 1244 "./parse.y" #line 1256 "./parse.y"
{ yyval.node = exit_block (); ; { yyval.node = exit_block (); ;
break;} break;}
case 223: case 223:
#line 1263 "./parse.y" #line 1275 "./parse.y"
{ yyval.node = empty_stmt_node; ; { yyval.node = empty_stmt_node; ;
break;} break;}
case 224: case 224:
#line 1268 "./parse.y" #line 1280 "./parse.y"
{ {
yyval.node = build_labeled_block (EXPR_WFL_LINECOL (yyvsp[-1].node), yyval.node = build_labeled_block (EXPR_WFL_LINECOL (yyvsp[-1].node),
EXPR_WFL_NODE (yyvsp[-1].node)); EXPR_WFL_NODE (yyvsp[-1].node));
...@@ -3560,19 +3527,19 @@ case 224: ...@@ -3560,19 +3527,19 @@ case 224:
; ;
break;} break;}
case 225: case 225:
#line 1279 "./parse.y" #line 1291 "./parse.y"
{ yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 226: case 226:
#line 1281 "./parse.y" #line 1293 "./parse.y"
{yyerror ("':' expected"); RECOVER;; {yyerror ("':' expected"); RECOVER;;
break;} break;}
case 227: case 227:
#line 1286 "./parse.y" #line 1298 "./parse.y"
{ yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = finish_labeled_statement (yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 228: case 228:
#line 1293 "./parse.y" #line 1305 "./parse.y"
{ {
/* We have a statement. Generate a WFL around it so /* We have a statement. Generate a WFL around it so
we can debug it */ we can debug it */
...@@ -3583,7 +3550,7 @@ case 228: ...@@ -3583,7 +3550,7 @@ case 228:
; ;
break;} break;}
case 229: case 229:
#line 1302 "./parse.y" #line 1314 "./parse.y"
{ {
if (ctxp->prevent_ese != lineno) if (ctxp->prevent_ese != lineno)
yyerror ("Invalid expression statement"); yyerror ("Invalid expression statement");
...@@ -3591,7 +3558,7 @@ case 229: ...@@ -3591,7 +3558,7 @@ case 229:
; ;
break;} break;}
case 230: case 230:
#line 1308 "./parse.y" #line 1320 "./parse.y"
{ {
if (ctxp->prevent_ese != lineno) if (ctxp->prevent_ese != lineno)
yyerror ("Invalid expression statement"); yyerror ("Invalid expression statement");
...@@ -3599,7 +3566,7 @@ case 230: ...@@ -3599,7 +3566,7 @@ case 230:
; ;
break;} break;}
case 231: case 231:
#line 1314 "./parse.y" #line 1326 "./parse.y"
{ {
if (ctxp->prevent_ese != lineno) if (ctxp->prevent_ese != lineno)
yyerror ("Invalid expression statement"); yyerror ("Invalid expression statement");
...@@ -3607,11 +3574,11 @@ case 231: ...@@ -3607,11 +3574,11 @@ case 231:
; ;
break;} break;}
case 232: case 232:
#line 1320 "./parse.y" #line 1332 "./parse.y"
{yyerror ("')' expected"); RECOVER;; {yyerror ("')' expected"); RECOVER;;
break;} break;}
case 233: case 233:
#line 1322 "./parse.y" #line 1334 "./parse.y"
{ {
yyerror ("Constructor invocation must be first " yyerror ("Constructor invocation must be first "
"thing in a constructor"); "thing in a constructor");
...@@ -3619,11 +3586,11 @@ case 233: ...@@ -3619,11 +3586,11 @@ case 233:
; ;
break;} break;}
case 234: case 234:
#line 1328 "./parse.y" #line 1340 "./parse.y"
{yyerror ("')' expected"); RECOVER;; {yyerror ("')' expected"); RECOVER;;
break;} break;}
case 235: case 235:
#line 1330 "./parse.y" #line 1342 "./parse.y"
{ {
yyerror ("Constructor invocation must be first " yyerror ("Constructor invocation must be first "
"thing in a constructor"); "thing in a constructor");
...@@ -3631,60 +3598,60 @@ case 235: ...@@ -3631,60 +3598,60 @@ case 235:
; ;
break;} break;}
case 236: case 236:
#line 1336 "./parse.y" #line 1348 "./parse.y"
{yyerror ("'(' expected"); RECOVER;; {yyerror ("'(' expected"); RECOVER;;
break;} break;}
case 237: case 237:
#line 1338 "./parse.y" #line 1350 "./parse.y"
{yyerror ("')' expected"); RECOVER;; {yyerror ("')' expected"); RECOVER;;
break;} break;}
case 238: case 238:
#line 1340 "./parse.y" #line 1352 "./parse.y"
{yyerror ("')' expected"); RECOVER;; {yyerror ("')' expected"); RECOVER;;
break;} break;}
case 239: case 239:
#line 1342 "./parse.y" #line 1354 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 240: case 240:
#line 1344 "./parse.y" #line 1356 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 248: case 248:
#line 1359 "./parse.y" #line 1371 "./parse.y"
{ {
yyval.node = build_if_else_statement (yyvsp[-3].operator.location, yyvsp[-2].node, yyval.node = build_if_else_statement (yyvsp[-3].operator.location, yyvsp[-2].node,
yyvsp[0].node, NULL_TREE); yyvsp[0].node, NULL_TREE);
; ;
break;} break;}
case 249: case 249:
#line 1364 "./parse.y" #line 1376 "./parse.y"
{yyerror ("'(' expected"); RECOVER;; {yyerror ("'(' expected"); RECOVER;;
break;} break;}
case 250: case 250:
#line 1366 "./parse.y" #line 1378 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 251: case 251:
#line 1368 "./parse.y" #line 1380 "./parse.y"
{yyerror ("')' expected"); RECOVER;; {yyerror ("')' expected"); RECOVER;;
break;} break;}
case 252: case 252:
#line 1373 "./parse.y" #line 1385 "./parse.y"
{ yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
break;} break;}
case 253: case 253:
#line 1378 "./parse.y" #line 1390 "./parse.y"
{ yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; { yyval.node = build_if_else_statement (yyvsp[-5].operator.location, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
break;} break;}
case 254: case 254:
#line 1383 "./parse.y" #line 1395 "./parse.y"
{ {
enter_block (); enter_block ();
; ;
break;} break;}
case 255: case 255:
#line 1387 "./parse.y" #line 1399 "./parse.y"
{ {
/* Make into "proper list" of COMPOUND_EXPRs. /* Make into "proper list" of COMPOUND_EXPRs.
I.e. make the last statment also have its own I.e. make the last statment also have its own
...@@ -3695,42 +3662,42 @@ case 255: ...@@ -3695,42 +3662,42 @@ case 255:
; ;
break;} break;}
case 256: case 256:
#line 1399 "./parse.y" #line 1411 "./parse.y"
{ {
yyval.node = build (SWITCH_EXPR, NULL_TREE, yyvsp[-1].node, NULL_TREE); yyval.node = build (SWITCH_EXPR, NULL_TREE, yyvsp[-1].node, NULL_TREE);
EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location;
; ;
break;} break;}
case 257: case 257:
#line 1404 "./parse.y" #line 1416 "./parse.y"
{yyerror ("'(' expected"); RECOVER;; {yyerror ("'(' expected"); RECOVER;;
break;} break;}
case 258: case 258:
#line 1406 "./parse.y" #line 1418 "./parse.y"
{yyerror ("Missing term or ')'"); DRECOVER(switch_statement);; {yyerror ("Missing term or ')'"); DRECOVER(switch_statement);;
break;} break;}
case 259: case 259:
#line 1408 "./parse.y" #line 1420 "./parse.y"
{yyerror ("'{' expected"); RECOVER;; {yyerror ("'{' expected"); RECOVER;;
break;} break;}
case 260: case 260:
#line 1416 "./parse.y" #line 1428 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 261: case 261:
#line 1418 "./parse.y" #line 1430 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 262: case 262:
#line 1420 "./parse.y" #line 1432 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 263: case 263:
#line 1422 "./parse.y" #line 1434 "./parse.y"
{ yyval.node = NULL_TREE; ; { yyval.node = NULL_TREE; ;
break;} break;}
case 269: case 269:
#line 1441 "./parse.y" #line 1453 "./parse.y"
{ {
tree lab = build1 (CASE_EXPR, NULL_TREE, yyvsp[-1].node); tree lab = build1 (CASE_EXPR, NULL_TREE, yyvsp[-1].node);
EXPR_WFL_LINECOL (lab) = yyvsp[-2].operator.location; EXPR_WFL_LINECOL (lab) = yyvsp[-2].operator.location;
...@@ -3738,7 +3705,7 @@ case 269: ...@@ -3738,7 +3705,7 @@ case 269:
; ;
break;} break;}
case 270: case 270:
#line 1447 "./parse.y" #line 1459 "./parse.y"
{ {
tree lab = build1 (DEFAULT_EXPR, NULL_TREE, NULL_TREE); tree lab = build1 (DEFAULT_EXPR, NULL_TREE, NULL_TREE);
EXPR_WFL_LINECOL (lab) = yyvsp[-1].operator.location; EXPR_WFL_LINECOL (lab) = yyvsp[-1].operator.location;
...@@ -3746,61 +3713,61 @@ case 270: ...@@ -3746,61 +3713,61 @@ case 270:
; ;
break;} break;}
case 271: case 271:
#line 1453 "./parse.y" #line 1465 "./parse.y"
{yyerror ("Missing or invalid constant expression"); RECOVER;; {yyerror ("Missing or invalid constant expression"); RECOVER;;
break;} break;}
case 272: case 272:
#line 1455 "./parse.y" #line 1467 "./parse.y"
{yyerror ("':' expected"); RECOVER;; {yyerror ("':' expected"); RECOVER;;
break;} break;}
case 273: case 273:
#line 1457 "./parse.y" #line 1469 "./parse.y"
{yyerror ("':' expected"); RECOVER;; {yyerror ("':' expected"); RECOVER;;
break;} break;}
case 274: case 274:
#line 1462 "./parse.y" #line 1474 "./parse.y"
{ {
tree body = build_loop_body (yyvsp[-2].operator.location, yyvsp[-1].node, 0); tree body = build_loop_body (yyvsp[-2].operator.location, yyvsp[-1].node, 0);
yyval.node = build_new_loop (body); yyval.node = build_new_loop (body);
; ;
break;} break;}
case 275: case 275:
#line 1470 "./parse.y" #line 1482 "./parse.y"
{ yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ; { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ;
break;} break;}
case 276: case 276:
#line 1472 "./parse.y" #line 1484 "./parse.y"
{YYERROR_NOW; yyerror ("'(' expected"); RECOVER;; {YYERROR_NOW; yyerror ("'(' expected"); RECOVER;;
break;} break;}
case 277: case 277:
#line 1474 "./parse.y" #line 1486 "./parse.y"
{yyerror ("Missing term and ')' expected"); RECOVER;; {yyerror ("Missing term and ')' expected"); RECOVER;;
break;} break;}
case 278: case 278:
#line 1476 "./parse.y" #line 1488 "./parse.y"
{yyerror ("')' expected"); RECOVER;; {yyerror ("')' expected"); RECOVER;;
break;} break;}
case 279: case 279:
#line 1481 "./parse.y" #line 1493 "./parse.y"
{ yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ; { yyval.node = finish_loop_body (0, NULL_TREE, yyvsp[0].node, 0); ;
break;} break;}
case 280: case 280:
#line 1486 "./parse.y" #line 1498 "./parse.y"
{ {
tree body = build_loop_body (0, NULL_TREE, 1); tree body = build_loop_body (0, NULL_TREE, 1);
yyval.node = build_new_loop (body); yyval.node = build_new_loop (body);
; ;
break;} break;}
case 281: case 281:
#line 1495 "./parse.y" #line 1507 "./parse.y"
{ yyval.node = finish_loop_body (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-5].node, 1); ; { yyval.node = finish_loop_body (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[-5].node, 1); ;
break;} break;}
case 282: case 282:
#line 1500 "./parse.y" #line 1512 "./parse.y"
{ yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ; { yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
break;} break;}
case 283: case 283:
#line 1502 "./parse.y" #line 1514 "./parse.y"
{ {
yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node);
/* We have not condition, so we get rid of the EXIT_EXPR */ /* We have not condition, so we get rid of the EXIT_EXPR */
...@@ -3809,23 +3776,23 @@ case 283: ...@@ -3809,23 +3776,23 @@ case 283:
; ;
break;} break;}
case 284: case 284:
#line 1509 "./parse.y" #line 1521 "./parse.y"
{yyerror ("Invalid control expression"); RECOVER;; {yyerror ("Invalid control expression"); RECOVER;;
break;} break;}
case 285: case 285:
#line 1511 "./parse.y" #line 1523 "./parse.y"
{yyerror ("Invalid update expression"); RECOVER;; {yyerror ("Invalid update expression"); RECOVER;;
break;} break;}
case 286: case 286:
#line 1513 "./parse.y" #line 1525 "./parse.y"
{yyerror ("Invalid update expression"); RECOVER;; {yyerror ("Invalid update expression"); RECOVER;;
break;} break;}
case 287: case 287:
#line 1518 "./parse.y" #line 1530 "./parse.y"
{ yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);; { yyval.node = finish_for_loop (EXPR_WFL_LINECOL (yyvsp[-4].node), yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);;
break;} break;}
case 288: case 288:
#line 1520 "./parse.y" #line 1532 "./parse.y"
{ {
yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); yyval.node = finish_for_loop (0, NULL_TREE, yyvsp[-2].node, yyvsp[0].node);
/* We have not condition, so we get rid of the EXIT_EXPR */ /* We have not condition, so we get rid of the EXIT_EXPR */
...@@ -3834,7 +3801,7 @@ case 288: ...@@ -3834,7 +3801,7 @@ case 288:
; ;
break;} break;}
case 289: case 289:
#line 1530 "./parse.y" #line 1542 "./parse.y"
{ {
/* This scope defined for local variable that may be /* This scope defined for local variable that may be
defined within the scope of the for loop */ defined within the scope of the for loop */
...@@ -3842,15 +3809,15 @@ case 289: ...@@ -3842,15 +3809,15 @@ case 289:
; ;
break;} break;}
case 290: case 290:
#line 1536 "./parse.y" #line 1548 "./parse.y"
{yyerror ("'(' expected"); DRECOVER(for_1);; {yyerror ("'(' expected"); DRECOVER(for_1);;
break;} break;}
case 291: case 291:
#line 1538 "./parse.y" #line 1550 "./parse.y"
{yyerror ("Invalid init statement"); RECOVER;; {yyerror ("Invalid init statement"); RECOVER;;
break;} break;}
case 292: case 292:
#line 1543 "./parse.y" #line 1555 "./parse.y"
{ {
/* We now declare the loop body. The loop is /* We now declare the loop body. The loop is
declared as a for loop. */ declared as a for loop. */
...@@ -3863,11 +3830,11 @@ case 292: ...@@ -3863,11 +3830,11 @@ case 292:
; ;
break;} break;}
case 293: case 293:
#line 1555 "./parse.y" #line 1567 "./parse.y"
{ yyval.node = empty_stmt_node; ; { yyval.node = empty_stmt_node; ;
break;} break;}
case 294: case 294:
#line 1557 "./parse.y" #line 1569 "./parse.y"
{ {
/* Init statement recorded within the previously /* Init statement recorded within the previously
defined block scope */ defined block scope */
...@@ -3875,7 +3842,7 @@ case 294: ...@@ -3875,7 +3842,7 @@ case 294:
; ;
break;} break;}
case 295: case 295:
#line 1563 "./parse.y" #line 1575 "./parse.y"
{ {
/* Local variable are recorded within the previously /* Local variable are recorded within the previously
defined block scope */ defined block scope */
...@@ -3883,94 +3850,94 @@ case 295: ...@@ -3883,94 +3850,94 @@ case 295:
; ;
break;} break;}
case 296: case 296:
#line 1569 "./parse.y" #line 1581 "./parse.y"
{yyerror ("';' expected"); DRECOVER(for_init_1);; {yyerror ("';' expected"); DRECOVER(for_init_1);;
break;} break;}
case 297: case 297:
#line 1573 "./parse.y" #line 1585 "./parse.y"
{yyval.node = empty_stmt_node;; {yyval.node = empty_stmt_node;;
break;} break;}
case 298: case 298:
#line 1575 "./parse.y" #line 1587 "./parse.y"
{ yyval.node = build_debugable_stmt (BUILD_LOCATION (), yyvsp[0].node); ; { yyval.node = build_debugable_stmt (BUILD_LOCATION (), yyvsp[0].node); ;
break;} break;}
case 299: case 299:
#line 1580 "./parse.y" #line 1592 "./parse.y"
{ yyval.node = add_stmt_to_compound (NULL_TREE, NULL_TREE, yyvsp[0].node); ; { yyval.node = add_stmt_to_compound (NULL_TREE, NULL_TREE, yyvsp[0].node); ;
break;} break;}
case 300: case 300:
#line 1582 "./parse.y" #line 1594 "./parse.y"
{ yyval.node = add_stmt_to_compound (yyvsp[-2].node, NULL_TREE, yyvsp[0].node); ; { yyval.node = add_stmt_to_compound (yyvsp[-2].node, NULL_TREE, yyvsp[0].node); ;
break;} break;}
case 301: case 301:
#line 1584 "./parse.y" #line 1596 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 302: case 302:
#line 1589 "./parse.y" #line 1601 "./parse.y"
{ yyval.node = build_bc_statement (yyvsp[-1].operator.location, 1, NULL_TREE); ; { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 1, NULL_TREE); ;
break;} break;}
case 303: case 303:
#line 1591 "./parse.y" #line 1603 "./parse.y"
{ yyval.node = build_bc_statement (yyvsp[-2].operator.location, 1, yyvsp[-1].node); ; { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 1, yyvsp[-1].node); ;
break;} break;}
case 304: case 304:
#line 1593 "./parse.y" #line 1605 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 305: case 305:
#line 1595 "./parse.y" #line 1607 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 306: case 306:
#line 1600 "./parse.y" #line 1612 "./parse.y"
{ yyval.node = build_bc_statement (yyvsp[-1].operator.location, 0, NULL_TREE); ; { yyval.node = build_bc_statement (yyvsp[-1].operator.location, 0, NULL_TREE); ;
break;} break;}
case 307: case 307:
#line 1602 "./parse.y" #line 1614 "./parse.y"
{ yyval.node = build_bc_statement (yyvsp[-2].operator.location, 0, yyvsp[-1].node); ; { yyval.node = build_bc_statement (yyvsp[-2].operator.location, 0, yyvsp[-1].node); ;
break;} break;}
case 308: case 308:
#line 1604 "./parse.y" #line 1616 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 309: case 309:
#line 1606 "./parse.y" #line 1618 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 310: case 310:
#line 1611 "./parse.y" #line 1623 "./parse.y"
{ yyval.node = build_return (yyvsp[-1].operator.location, NULL_TREE); ; { yyval.node = build_return (yyvsp[-1].operator.location, NULL_TREE); ;
break;} break;}
case 311: case 311:
#line 1613 "./parse.y" #line 1625 "./parse.y"
{ yyval.node = build_return (yyvsp[-2].operator.location, yyvsp[-1].node); ; { yyval.node = build_return (yyvsp[-2].operator.location, yyvsp[-1].node); ;
break;} break;}
case 312: case 312:
#line 1615 "./parse.y" #line 1627 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 313: case 313:
#line 1617 "./parse.y" #line 1629 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 314: case 314:
#line 1622 "./parse.y" #line 1634 "./parse.y"
{ {
yyval.node = build1 (THROW_EXPR, NULL_TREE, yyvsp[-1].node); yyval.node = build1 (THROW_EXPR, NULL_TREE, yyvsp[-1].node);
EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location; EXPR_WFL_LINECOL (yyval.node) = yyvsp[-2].operator.location;
; ;
break;} break;}
case 315: case 315:
#line 1627 "./parse.y" #line 1639 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 316: case 316:
#line 1629 "./parse.y" #line 1641 "./parse.y"
{yyerror ("';' expected"); RECOVER;; {yyerror ("';' expected"); RECOVER;;
break;} break;}
case 317: case 317:
#line 1634 "./parse.y" #line 1646 "./parse.y"
{ {
yyval.node = build (SYNCHRONIZED_EXPR, NULL_TREE, yyvsp[-2].node, yyvsp[0].node); yyval.node = build (SYNCHRONIZED_EXPR, NULL_TREE, yyvsp[-2].node, yyvsp[0].node);
EXPR_WFL_LINECOL (yyval.node) = EXPR_WFL_LINECOL (yyval.node) =
...@@ -3978,56 +3945,56 @@ case 317: ...@@ -3978,56 +3945,56 @@ case 317:
; ;
break;} break;}
case 318: case 318:
#line 1640 "./parse.y" #line 1652 "./parse.y"
{yyerror ("'{' expected"); RECOVER;; {yyerror ("'{' expected"); RECOVER;;
break;} break;}
case 319: case 319:
#line 1642 "./parse.y" #line 1654 "./parse.y"
{yyerror ("'(' expected"); RECOVER;; {yyerror ("'(' expected"); RECOVER;;
break;} break;}
case 320: case 320:
#line 1644 "./parse.y" #line 1656 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 321: case 321:
#line 1646 "./parse.y" #line 1658 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 322: case 322:
#line 1651 "./parse.y" #line 1663 "./parse.y"
{ {
if ((1 << yyvsp[0].value) != ACC_SYNCHRONIZED) if ((1 << yyvsp[0].value) != ACC_SYNCHRONIZED)
fatal ("synchronized was '%d' - yyparse", (1 << yyvsp[0].value)); fatal ("synchronized was '%d' - yyparse", (1 << yyvsp[0].value));
; ;
break;} break;}
case 323: case 323:
#line 1659 "./parse.y" #line 1671 "./parse.y"
{ yyval.node = build_try_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = build_try_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 324: case 324:
#line 1661 "./parse.y" #line 1673 "./parse.y"
{ yyval.node = build_try_finally_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ; { yyval.node = build_try_finally_statement (yyvsp[-2].operator.location, yyvsp[-1].node, yyvsp[0].node); ;
break;} break;}
case 325: case 325:
#line 1663 "./parse.y" #line 1675 "./parse.y"
{ yyval.node = build_try_finally_statement { yyval.node = build_try_finally_statement
(yyvsp[-3].operator.location, build_try_statement (yyvsp[-3].operator.location, (yyvsp[-3].operator.location, build_try_statement (yyvsp[-3].operator.location,
yyvsp[-2].node, yyvsp[-1].node), yyvsp[0].node); yyvsp[-2].node, yyvsp[-1].node), yyvsp[0].node);
; ;
break;} break;}
case 326: case 326:
#line 1668 "./parse.y" #line 1680 "./parse.y"
{yyerror ("'{' expected"); DRECOVER (try_statement);; {yyerror ("'{' expected"); DRECOVER (try_statement);;
break;} break;}
case 328: case 328:
#line 1674 "./parse.y" #line 1686 "./parse.y"
{ {
TREE_CHAIN (yyvsp[0].node) = yyvsp[-1].node; TREE_CHAIN (yyvsp[0].node) = yyvsp[-1].node;
yyval.node = yyvsp[0].node; yyval.node = yyvsp[0].node;
; ;
break;} break;}
case 329: case 329:
#line 1682 "./parse.y" #line 1694 "./parse.y"
{ {
java_method_add_stmt (current_function_decl, yyvsp[0].node); java_method_add_stmt (current_function_decl, yyvsp[0].node);
exit_block (); exit_block ();
...@@ -4035,7 +4002,7 @@ case 329: ...@@ -4035,7 +4002,7 @@ case 329:
; ;
break;} break;}
case 330: case 330:
#line 1690 "./parse.y" #line 1702 "./parse.y"
{ {
/* We add a block to define a scope for /* We add a block to define a scope for
formal_parameter (CCBP). The formal parameter is formal_parameter (CCBP). The formal parameter is
...@@ -4053,176 +4020,176 @@ case 330: ...@@ -4053,176 +4020,176 @@ case 330:
; ;
break;} break;}
case 331: case 331:
#line 1706 "./parse.y" #line 1718 "./parse.y"
{yyerror ("'(' expected"); RECOVER;; {yyerror ("'(' expected"); RECOVER;;
break;} break;}
case 332: case 332:
#line 1708 "./parse.y" #line 1720 "./parse.y"
{yyerror ("Missing term or ')' expected"); DRECOVER (2);; {yyerror ("Missing term or ')' expected"); DRECOVER (2);;
break;} break;}
case 333: case 333:
#line 1710 "./parse.y" #line 1722 "./parse.y"
{yyerror ("')' expected"); DRECOVER (1);; {yyerror ("')' expected"); DRECOVER (1);;
break;} break;}
case 334: case 334:
#line 1715 "./parse.y" #line 1727 "./parse.y"
{ yyval.node = yyvsp[0].node; ; { yyval.node = yyvsp[0].node; ;
break;} break;}
case 335: case 335:
#line 1717 "./parse.y" #line 1729 "./parse.y"
{yyerror ("'{' expected"); RECOVER; ; {yyerror ("'{' expected"); RECOVER; ;
break;} break;}
case 339: case 339:
#line 1729 "./parse.y" #line 1741 "./parse.y"
{ yyval.node = build_this (yyvsp[0].operator.location); ; { yyval.node = build_this (yyvsp[0].operator.location); ;
break;} break;}
case 340: case 340:
#line 1731 "./parse.y" #line 1743 "./parse.y"
{yyval.node = yyvsp[-1].node;; {yyval.node = yyvsp[-1].node;;
break;} break;}
case 345: case 345:
#line 1740 "./parse.y" #line 1752 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("named class literals"); ; { yyval.node = parse_jdk1_1_error ("named class literals"); ;
break;} break;}
case 346: case 346:
#line 1742 "./parse.y" #line 1754 "./parse.y"
{ yyval.node = build_class_ref (yyvsp[-2].node); ; { yyval.node = build_class_ref (yyvsp[-2].node); ;
break;} break;}
case 347: case 347:
#line 1744 "./parse.y" #line 1756 "./parse.y"
{ yyval.node = build_class_ref (void_type_node); ; { yyval.node = build_class_ref (void_type_node); ;
break;} break;}
case 348: case 348:
#line 1749 "./parse.y" #line 1761 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("class literals"); ; { yyval.node = parse_jdk1_1_error ("class literals"); ;
break;} break;}
case 349: case 349:
#line 1751 "./parse.y" #line 1763 "./parse.y"
{yyerror ("')' expected"); RECOVER;; {yyerror ("')' expected"); RECOVER;;
break;} break;}
case 350: case 350:
#line 1753 "./parse.y" #line 1765 "./parse.y"
{yyerror ("'class' or 'this' expected" ); RECOVER;; {yyerror ("'class' or 'this' expected" ); RECOVER;;
break;} break;}
case 351: case 351:
#line 1755 "./parse.y" #line 1767 "./parse.y"
{yyerror ("'class' expected" ); RECOVER;; {yyerror ("'class' expected" ); RECOVER;;
break;} break;}
case 352: case 352:
#line 1757 "./parse.y" #line 1769 "./parse.y"
{yyerror ("'class' expected" ); RECOVER;; {yyerror ("'class' expected" ); RECOVER;;
break;} break;}
case 353: case 353:
#line 1762 "./parse.y" #line 1774 "./parse.y"
{ yyval.node = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ; { yyval.node = build_new_invocation (yyvsp[-3].node, yyvsp[-1].node); ;
break;} break;}
case 354: case 354:
#line 1764 "./parse.y" #line 1776 "./parse.y"
{ yyval.node = build_new_invocation (yyvsp[-2].node, NULL_TREE); ; { yyval.node = build_new_invocation (yyvsp[-2].node, NULL_TREE); ;
break;} break;}
case 355: case 355:
#line 1769 "./parse.y" #line 1781 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner class instance creation"); ; { yyval.node = parse_jdk1_1_error ("inner class instance creation"); ;
break;} break;}
case 356: case 356:
#line 1771 "./parse.y" #line 1783 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("inner class instance creation"); ; { yyval.node = parse_jdk1_1_error ("inner class instance creation"); ;
break;} break;}
case 361: case 361:
#line 1780 "./parse.y" #line 1792 "./parse.y"
{yyerror ("'(' expected"); DRECOVER(new_1);; {yyerror ("'(' expected"); DRECOVER(new_1);;
break;} break;}
case 362: case 362:
#line 1782 "./parse.y" #line 1794 "./parse.y"
{yyerror ("'(' expected"); RECOVER;; {yyerror ("'(' expected"); RECOVER;;
break;} break;}
case 363: case 363:
#line 1784 "./parse.y" #line 1796 "./parse.y"
{yyerror ("')' or term expected"); RECOVER;; {yyerror ("')' or term expected"); RECOVER;;
break;} break;}
case 364: case 364:
#line 1786 "./parse.y" #line 1798 "./parse.y"
{yyerror ("')' expected"); RECOVER;; {yyerror ("')' expected"); RECOVER;;
break;} break;}
case 365: case 365:
#line 1788 "./parse.y" #line 1800 "./parse.y"
{YYERROR_NOW; yyerror ("Identifier expected"); RECOVER;; {YYERROR_NOW; yyerror ("Identifier expected"); RECOVER;;
break;} break;}
case 366: case 366:
#line 1790 "./parse.y" #line 1802 "./parse.y"
{yyerror ("'(' expected"); RECOVER;; {yyerror ("'(' expected"); RECOVER;;
break;} break;}
case 369: case 369:
#line 1800 "./parse.y" #line 1812 "./parse.y"
{ {
yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, NULL_TREE); yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, NULL_TREE);
ctxp->formal_parameter_number = 1; ctxp->formal_parameter_number = 1;
; ;
break;} break;}
case 370: case 370:
#line 1805 "./parse.y" #line 1817 "./parse.y"
{ {
ctxp->formal_parameter_number += 1; ctxp->formal_parameter_number += 1;
yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyvsp[-2].node); yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyvsp[-2].node);
; ;
break;} break;}
case 371: case 371:
#line 1810 "./parse.y" #line 1822 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 372: case 372:
#line 1815 "./parse.y" #line 1827 "./parse.y"
{ yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ; { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ;
break;} break;}
case 373: case 373:
#line 1817 "./parse.y" #line 1829 "./parse.y"
{ yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ; { yyval.node = build_newarray_node (yyvsp[-1].node, yyvsp[0].node, 0); ;
break;} break;}
case 374: case 374:
#line 1819 "./parse.y" #line 1831 "./parse.y"
{ yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, CURRENT_OSB (ctxp));; { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, CURRENT_OSB (ctxp));;
break;} break;}
case 375: case 375:
#line 1821 "./parse.y" #line 1833 "./parse.y"
{ yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, CURRENT_OSB (ctxp));; { yyval.node = build_newarray_node (yyvsp[-2].node, yyvsp[-1].node, CURRENT_OSB (ctxp));;
break;} break;}
case 376: case 376:
#line 1825 "./parse.y" #line 1837 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("anonymous array"); ; { yyval.node = parse_jdk1_1_error ("anonymous array"); ;
break;} break;}
case 377: case 377:
#line 1827 "./parse.y" #line 1839 "./parse.y"
{ yyval.node = parse_jdk1_1_error ("anonymous array"); ; { yyval.node = parse_jdk1_1_error ("anonymous array"); ;
break;} break;}
case 378: case 378:
#line 1829 "./parse.y" #line 1841 "./parse.y"
{yyerror ("'[' expected"); DRECOVER ("]");; {yyerror ("'[' expected"); DRECOVER ("]");;
break;} break;}
case 379: case 379:
#line 1831 "./parse.y" #line 1843 "./parse.y"
{yyerror ("']' expected"); RECOVER;; {yyerror ("']' expected"); RECOVER;;
break;} break;}
case 380: case 380:
#line 1836 "./parse.y" #line 1848 "./parse.y"
{ yyval.node = build_tree_list (NULL_TREE, yyvsp[0].node); ; { yyval.node = build_tree_list (NULL_TREE, yyvsp[0].node); ;
break;} break;}
case 381: case 381:
#line 1838 "./parse.y" #line 1850 "./parse.y"
{ yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyval.node); ; { yyval.node = tree_cons (NULL_TREE, yyvsp[0].node, yyval.node); ;
break;} break;}
case 382: case 382:
#line 1843 "./parse.y" #line 1855 "./parse.y"
{ {
EXPR_WFL_LINECOL (yyvsp[-1].node) = yyvsp[-2].operator.location; EXPR_WFL_LINECOL (yyvsp[-1].node) = yyvsp[-2].operator.location;
yyval.node = yyvsp[-1].node; yyval.node = yyvsp[-1].node;
; ;
break;} break;}
case 383: case 383:
#line 1848 "./parse.y" #line 1860 "./parse.y"
{yyerror ("']' expected"); RECOVER;; {yyerror ("']' expected"); RECOVER;;
break;} break;}
case 384: case 384:
#line 1850 "./parse.y" #line 1862 "./parse.y"
{ {
yyerror ("Missing term"); yyerror ("Missing term");
yyerror ("']' expected"); yyerror ("']' expected");
...@@ -4230,7 +4197,7 @@ case 384: ...@@ -4230,7 +4197,7 @@ case 384:
; ;
break;} break;}
case 385: case 385:
#line 1859 "./parse.y" #line 1871 "./parse.y"
{ {
int allocate = 0; int allocate = 0;
/* If not initialized, allocate memory for the osb /* If not initialized, allocate memory for the osb
...@@ -4258,19 +4225,19 @@ case 385: ...@@ -4258,19 +4225,19 @@ case 385:
; ;
break;} break;}
case 386: case 386:
#line 1885 "./parse.y" #line 1897 "./parse.y"
{ CURRENT_OSB (ctxp)++; ; { CURRENT_OSB (ctxp)++; ;
break;} break;}
case 387: case 387:
#line 1887 "./parse.y" #line 1899 "./parse.y"
{ yyerror ("']' expected"); RECOVER;; { yyerror ("']' expected"); RECOVER;;
break;} break;}
case 388: case 388:
#line 1892 "./parse.y" #line 1904 "./parse.y"
{ yyval.node = make_qualified_primary (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ; { yyval.node = make_qualified_primary (yyvsp[-2].node, yyvsp[0].node, yyvsp[-1].operator.location); ;
break;} break;}
case 389: case 389:
#line 1896 "./parse.y" #line 1908 "./parse.y"
{ {
tree super_wfl = tree super_wfl =
build_wfl_node (super_identifier_node); build_wfl_node (super_identifier_node);
...@@ -4279,19 +4246,19 @@ case 389: ...@@ -4279,19 +4246,19 @@ case 389:
; ;
break;} break;}
case 390: case 390:
#line 1903 "./parse.y" #line 1915 "./parse.y"
{yyerror ("Field expected"); DRECOVER (super_field_acces);; {yyerror ("Field expected"); DRECOVER (super_field_acces);;
break;} break;}
case 391: case 391:
#line 1908 "./parse.y" #line 1920 "./parse.y"
{ yyval.node = build_method_invocation (yyvsp[-2].node, NULL_TREE); ; { yyval.node = build_method_invocation (yyvsp[-2].node, NULL_TREE); ;
break;} break;}
case 392: case 392:
#line 1910 "./parse.y" #line 1922 "./parse.y"
{ yyval.node = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); ; { yyval.node = build_method_invocation (yyvsp[-3].node, yyvsp[-1].node); ;
break;} break;}
case 393: case 393:
#line 1912 "./parse.y" #line 1924 "./parse.y"
{ {
if (TREE_CODE (yyvsp[-4].node) == THIS_EXPR) if (TREE_CODE (yyvsp[-4].node) == THIS_EXPR)
yyval.node = build_this_super_qualified_invocation yyval.node = build_this_super_qualified_invocation
...@@ -4304,7 +4271,7 @@ case 393: ...@@ -4304,7 +4271,7 @@ case 393:
; ;
break;} break;}
case 394: case 394:
#line 1923 "./parse.y" #line 1935 "./parse.y"
{ {
if (TREE_CODE (yyvsp[-5].node) == THIS_EXPR) if (TREE_CODE (yyvsp[-5].node) == THIS_EXPR)
yyval.node = build_this_super_qualified_invocation yyval.node = build_this_super_qualified_invocation
...@@ -4317,121 +4284,121 @@ case 394: ...@@ -4317,121 +4284,121 @@ case 394:
; ;
break;} break;}
case 395: case 395:
#line 1934 "./parse.y" #line 1946 "./parse.y"
{ {
yyval.node = build_this_super_qualified_invocation yyval.node = build_this_super_qualified_invocation
(0, yyvsp[-2].node, NULL_TREE, yyvsp[-4].operator.location, yyvsp[-3].operator.location); (0, yyvsp[-2].node, NULL_TREE, yyvsp[-4].operator.location, yyvsp[-3].operator.location);
; ;
break;} break;}
case 396: case 396:
#line 1939 "./parse.y" #line 1951 "./parse.y"
{ {
yyval.node = build_this_super_qualified_invocation yyval.node = build_this_super_qualified_invocation
(0, yyvsp[-3].node, yyvsp[-1].node, yyvsp[-5].operator.location, yyvsp[-4].operator.location); (0, yyvsp[-3].node, yyvsp[-1].node, yyvsp[-5].operator.location, yyvsp[-4].operator.location);
; ;
break;} break;}
case 397: case 397:
#line 1948 "./parse.y" #line 1960 "./parse.y"
{ yyerror ("'(' expected"); DRECOVER (method_invocation); ; { yyerror ("'(' expected"); DRECOVER (method_invocation); ;
break;} break;}
case 398: case 398:
#line 1950 "./parse.y" #line 1962 "./parse.y"
{ yyerror ("'(' expected"); DRECOVER (method_invocation); ; { yyerror ("'(' expected"); DRECOVER (method_invocation); ;
break;} break;}
case 399: case 399:
#line 1955 "./parse.y" #line 1967 "./parse.y"
{ yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ;
break;} break;}
case 400: case 400:
#line 1957 "./parse.y" #line 1969 "./parse.y"
{ yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ; { yyval.node = build_array_ref (yyvsp[-2].operator.location, yyvsp[-3].node, yyvsp[-1].node); ;
break;} break;}
case 401: case 401:
#line 1959 "./parse.y" #line 1971 "./parse.y"
{ {
yyerror ("Missing term and ']' expected"); yyerror ("Missing term and ']' expected");
DRECOVER(array_access); DRECOVER(array_access);
; ;
break;} break;}
case 402: case 402:
#line 1964 "./parse.y" #line 1976 "./parse.y"
{ {
yyerror ("']' expected"); yyerror ("']' expected");
DRECOVER(array_access); DRECOVER(array_access);
; ;
break;} break;}
case 403: case 403:
#line 1969 "./parse.y" #line 1981 "./parse.y"
{ {
yyerror ("Missing term and ']' expected"); yyerror ("Missing term and ']' expected");
DRECOVER(array_access); DRECOVER(array_access);
; ;
break;} break;}
case 404: case 404:
#line 1974 "./parse.y" #line 1986 "./parse.y"
{ {
yyerror ("']' expected"); yyerror ("']' expected");
DRECOVER(array_access); DRECOVER(array_access);
; ;
break;} break;}
case 409: case 409:
#line 1989 "./parse.y" #line 2001 "./parse.y"
{ yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ; { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ;
break;} break;}
case 410: case 410:
#line 1994 "./parse.y" #line 2006 "./parse.y"
{ yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ; { yyval.node = build_incdec (yyvsp[0].operator.token, yyvsp[0].operator.location, yyvsp[-1].node, 1); ;
break;} break;}
case 413: case 413:
#line 2001 "./parse.y" #line 2013 "./parse.y"
{yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;
break;} break;}
case 414: case 414:
#line 2003 "./parse.y" #line 2015 "./parse.y"
{yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;
break;} break;}
case 416: case 416:
#line 2006 "./parse.y" #line 2018 "./parse.y"
{yyerror ("Missing term"); RECOVER; {yyerror ("Missing term"); RECOVER;
break;} break;}
case 417: case 417:
#line 2008 "./parse.y" #line 2020 "./parse.y"
{yyerror ("Missing term"); RECOVER; {yyerror ("Missing term"); RECOVER;
break;} break;}
case 418: case 418:
#line 2013 "./parse.y" #line 2025 "./parse.y"
{yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ; {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ;
break;} break;}
case 419: case 419:
#line 2015 "./parse.y" #line 2027 "./parse.y"
{yyerror ("Missing term"); RECOVER; {yyerror ("Missing term"); RECOVER;
break;} break;}
case 420: case 420:
#line 2020 "./parse.y" #line 2032 "./parse.y"
{yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ; {yyval.node = build_incdec (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node, 0); ;
break;} break;}
case 421: case 421:
#line 2022 "./parse.y" #line 2034 "./parse.y"
{yyerror ("Missing term"); RECOVER; {yyerror ("Missing term"); RECOVER;
break;} break;}
case 423: case 423:
#line 2028 "./parse.y" #line 2040 "./parse.y"
{yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;
break;} break;}
case 424: case 424:
#line 2030 "./parse.y" #line 2042 "./parse.y"
{yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ; {yyval.node = build_unaryop (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[0].node); ;
break;} break;}
case 426: case 426:
#line 2033 "./parse.y" #line 2045 "./parse.y"
{yyerror ("Missing term"); RECOVER; {yyerror ("Missing term"); RECOVER;
break;} break;}
case 427: case 427:
#line 2035 "./parse.y" #line 2047 "./parse.y"
{yyerror ("Missing term"); RECOVER; {yyerror ("Missing term"); RECOVER;
break;} break;}
case 428: case 428:
#line 2040 "./parse.y" #line 2052 "./parse.y"
{ {
tree type = yyvsp[-3].node; tree type = yyvsp[-3].node;
while (CURRENT_OSB (ctxp)--) while (CURRENT_OSB (ctxp)--)
...@@ -4441,17 +4408,17 @@ case 428: ...@@ -4441,17 +4408,17 @@ case 428:
; ;
break;} break;}
case 429: case 429:
#line 2048 "./parse.y" #line 2060 "./parse.y"
{ yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ; { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ;
break;} break;}
case 430: case 430:
#line 2050 "./parse.y" #line 2062 "./parse.y"
{ yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ; { yyval.node = build_cast (yyvsp[-3].operator.location, yyvsp[-2].node, yyvsp[0].node); ;
break;} break;}
case 431: case 431:
#line 2052 "./parse.y" #line 2064 "./parse.y"
{ {
char *ptr; const char *ptr;
while (CURRENT_OSB (ctxp)--) while (CURRENT_OSB (ctxp)--)
obstack_1grow (&temporary_obstack, '['); obstack_1grow (&temporary_obstack, '[');
ctxp->osb_depth--; ctxp->osb_depth--;
...@@ -4464,11 +4431,11 @@ case 431: ...@@ -4464,11 +4431,11 @@ case 431:
; ;
break;} break;}
case 432: case 432:
#line 2065 "./parse.y" #line 2077 "./parse.y"
{yyerror ("']' expected, invalid type expression");; {yyerror ("']' expected, invalid type expression");;
break;} break;}
case 433: case 433:
#line 2067 "./parse.y" #line 2079 "./parse.y"
{ {
if (ctxp->prevent_ese != lineno) if (ctxp->prevent_ese != lineno)
yyerror ("Invalid type expression"); RECOVER; yyerror ("Invalid type expression"); RECOVER;
...@@ -4476,243 +4443,243 @@ case 433: ...@@ -4476,243 +4443,243 @@ case 433:
; ;
break;} break;}
case 434: case 434:
#line 2073 "./parse.y" #line 2085 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 435: case 435:
#line 2075 "./parse.y" #line 2087 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 436: case 436:
#line 2077 "./parse.y" #line 2089 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 438: case 438:
#line 2083 "./parse.y" #line 2095 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token),
yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 439: case 439:
#line 2088 "./parse.y" #line 2100 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 440: case 440:
#line 2093 "./parse.y" #line 2105 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 441: case 441:
#line 2098 "./parse.y" #line 2110 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 442: case 442:
#line 2100 "./parse.y" #line 2112 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 443: case 443:
#line 2102 "./parse.y" #line 2114 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 445: case 445:
#line 2108 "./parse.y" #line 2120 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 446: case 446:
#line 2113 "./parse.y" #line 2125 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 447: case 447:
#line 2118 "./parse.y" #line 2130 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 448: case 448:
#line 2120 "./parse.y" #line 2132 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 450: case 450:
#line 2126 "./parse.y" #line 2138 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 451: case 451:
#line 2131 "./parse.y" #line 2143 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 452: case 452:
#line 2136 "./parse.y" #line 2148 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 453: case 453:
#line 2141 "./parse.y" #line 2153 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 454: case 454:
#line 2143 "./parse.y" #line 2155 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 455: case 455:
#line 2145 "./parse.y" #line 2157 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 457: case 457:
#line 2151 "./parse.y" #line 2163 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 458: case 458:
#line 2156 "./parse.y" #line 2168 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 459: case 459:
#line 2161 "./parse.y" #line 2173 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 460: case 460:
#line 2166 "./parse.y" #line 2178 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 461: case 461:
#line 2171 "./parse.y" #line 2183 "./parse.y"
{ yyval.node = build_binop (INSTANCEOF_EXPR, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; { yyval.node = build_binop (INSTANCEOF_EXPR, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ;
break;} break;}
case 462: case 462:
#line 2173 "./parse.y" #line 2185 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 463: case 463:
#line 2175 "./parse.y" #line 2187 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 464: case 464:
#line 2177 "./parse.y" #line 2189 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 465: case 465:
#line 2179 "./parse.y" #line 2191 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 466: case 466:
#line 2181 "./parse.y" #line 2193 "./parse.y"
{yyerror ("Invalid reference type"); RECOVER;; {yyerror ("Invalid reference type"); RECOVER;;
break;} break;}
case 468: case 468:
#line 2187 "./parse.y" #line 2199 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 469: case 469:
#line 2192 "./parse.y" #line 2204 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 470: case 470:
#line 2197 "./parse.y" #line 2209 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 471: case 471:
#line 2199 "./parse.y" #line 2211 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 473: case 473:
#line 2205 "./parse.y" #line 2217 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 474: case 474:
#line 2210 "./parse.y" #line 2222 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 476: case 476:
#line 2216 "./parse.y" #line 2228 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 477: case 477:
#line 2221 "./parse.y" #line 2233 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 479: case 479:
#line 2227 "./parse.y" #line 2239 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 480: case 480:
#line 2232 "./parse.y" #line 2244 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 482: case 482:
#line 2238 "./parse.y" #line 2250 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 483: case 483:
#line 2243 "./parse.y" #line 2255 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 485: case 485:
#line 2249 "./parse.y" #line 2261 "./parse.y"
{ {
yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location, yyval.node = build_binop (BINOP_LOOKUP (yyvsp[-1].operator.token), yyvsp[-1].operator.location,
yyvsp[-2].node, yyvsp[0].node); yyvsp[-2].node, yyvsp[0].node);
; ;
break;} break;}
case 486: case 486:
#line 2254 "./parse.y" #line 2266 "./parse.y"
{yyerror ("Missing term"); RECOVER;; {yyerror ("Missing term"); RECOVER;;
break;} break;}
case 488: case 488:
#line 2260 "./parse.y" #line 2272 "./parse.y"
{ {
yyval.node = build (CONDITIONAL_EXPR, NULL_TREE, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); yyval.node = build (CONDITIONAL_EXPR, NULL_TREE, yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node);
EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location; EXPR_WFL_LINECOL (yyval.node) = yyvsp[-3].operator.location;
; ;
break;} break;}
case 489: case 489:
#line 2265 "./parse.y" #line 2277 "./parse.y"
{ {
YYERROR_NOW; YYERROR_NOW;
yyerror ("Missing term"); yyerror ("Missing term");
...@@ -4720,19 +4687,19 @@ case 489: ...@@ -4720,19 +4687,19 @@ case 489:
; ;
break;} break;}
case 490: case 490:
#line 2271 "./parse.y" #line 2283 "./parse.y"
{yyerror ("Missing term"); DRECOVER (2);; {yyerror ("Missing term"); DRECOVER (2);;
break;} break;}
case 491: case 491:
#line 2273 "./parse.y" #line 2285 "./parse.y"
{yyerror ("Missing term"); DRECOVER (3);; {yyerror ("Missing term"); DRECOVER (3);;
break;} break;}
case 494: case 494:
#line 2283 "./parse.y" #line 2295 "./parse.y"
{ yyval.node = build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ; { yyval.node = build_assignment (yyvsp[-1].operator.token, yyvsp[-1].operator.location, yyvsp[-2].node, yyvsp[0].node); ;
break;} break;}
case 495: case 495:
#line 2285 "./parse.y" #line 2297 "./parse.y"
{ {
if (ctxp->prevent_ese != lineno) if (ctxp->prevent_ese != lineno)
yyerror ("Missing term"); yyerror ("Missing term");
...@@ -4741,7 +4708,7 @@ case 495: ...@@ -4741,7 +4708,7 @@ case 495:
break;} break;}
} }
/* the action file gets copied in in place of this dollarsign */ /* the action file gets copied in in place of this dollarsign */
#line 542 "/usr/lib/bison.simple" #line 498 "/usr/local/gnu/share/bison.simple"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
...@@ -4936,32 +4903,8 @@ yyerrhandle: ...@@ -4936,32 +4903,8 @@ yyerrhandle:
yystate = yyn; yystate = yyn;
goto yynewstate; goto yynewstate;
yyacceptlab:
/* YYACCEPT comes here. */
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
#ifdef YYLSP_NEEDED
free (yyls);
#endif
}
return 0;
yyabortlab:
/* YYABORT comes here. */
if (yyfree_stacks)
{
free (yyss);
free (yyvs);
#ifdef YYLSP_NEEDED
free (yyls);
#endif
}
return 1;
} }
#line 2311 "./parse.y" #line 2323 "./parse.y"
...@@ -5069,7 +5012,7 @@ java_pop_parser_context (generate) ...@@ -5069,7 +5012,7 @@ java_pop_parser_context (generate)
static tree static tree
parse_jdk1_1_error (msg) parse_jdk1_1_error (msg)
char *msg; const char *msg;
{ {
sorry (": `%s' JDK1.1(TM) feature", msg); sorry (": `%s' JDK1.1(TM) feature", msg);
java_error_count++; java_error_count++;
...@@ -5080,11 +5023,11 @@ static int do_warning = 0; ...@@ -5080,11 +5023,11 @@ static int do_warning = 0;
void void
yyerror (msg) yyerror (msg)
char *msg; const char *msg;
{ {
static java_lc elc; static java_lc elc;
static int prev_lineno; static int prev_lineno;
static char *prev_msg; static const char *prev_msg;
int save_lineno; int save_lineno;
char *remainder, *code_from_source; char *remainder, *code_from_source;
...@@ -5334,7 +5277,7 @@ java_accstring_lookup (flags) ...@@ -5334,7 +5277,7 @@ java_accstring_lookup (flags)
static void static void
classitf_redefinition_error (context, id, decl, cl) classitf_redefinition_error (context, id, decl, cl)
char *context; const char *context;
tree id, decl, cl; tree id, decl, cl;
{ {
parse_error_context (cl, "%s `%s' already defined in %s:%d", parse_error_context (cl, "%s `%s' already defined in %s:%d",
...@@ -5348,7 +5291,7 @@ variable_redefinition_error (context, name, type, line) ...@@ -5348,7 +5291,7 @@ variable_redefinition_error (context, name, type, line)
tree context, name, type; tree context, name, type;
int line; int line;
{ {
char *type_name; const char *type_name;
/* Figure a proper name for type. We might haven't resolved it */ /* Figure a proper name for type. We might haven't resolved it */
if (TREE_CODE (type) == POINTER_TYPE && !TREE_TYPE (type)) if (TREE_CODE (type) == POINTER_TYPE && !TREE_TYPE (type))
...@@ -5368,7 +5311,7 @@ build_array_from_name (type, type_wfl, name, ret_name) ...@@ -5368,7 +5311,7 @@ build_array_from_name (type, type_wfl, name, ret_name)
tree type, type_wfl, name, *ret_name; tree type, type_wfl, name, *ret_name;
{ {
int more_dims = 0; int more_dims = 0;
char *string; const char *string;
/* Eventually get more dims */ /* Eventually get more dims */
string = IDENTIFIER_POINTER (name); string = IDENTIFIER_POINTER (name);
...@@ -5419,7 +5362,7 @@ static tree ...@@ -5419,7 +5362,7 @@ static tree
build_unresolved_array_type (type_or_wfl) build_unresolved_array_type (type_or_wfl)
tree type_or_wfl; tree type_or_wfl;
{ {
char *ptr; const char *ptr;
/* TYPE_OR_WFL might be an array on a resolved type. In this case, /* TYPE_OR_WFL might be an array on a resolved type. In this case,
just create a array type */ just create a array type */
...@@ -5446,7 +5389,7 @@ build_unresolved_array_type (type_or_wfl) ...@@ -5446,7 +5389,7 @@ build_unresolved_array_type (type_or_wfl)
static void static void
check_modifiers (message, value, mask) check_modifiers (message, value, mask)
char *message; const char *message;
int value; int value;
int mask; int mask;
{ {
...@@ -5507,7 +5450,7 @@ check_class_interface_creation (is_interface, flags, raw_name, qualified_name, d ...@@ -5507,7 +5450,7 @@ check_class_interface_creation (is_interface, flags, raw_name, qualified_name, d
/* If public, file name should match class/interface name */ /* If public, file name should match class/interface name */
if (flags & ACC_PUBLIC) if (flags & ACC_PUBLIC)
{ {
char *f; const char *f;
/* Contains OS dependent assumption on path separator. FIXME */ /* Contains OS dependent assumption on path separator. FIXME */
for (f = &input_filename [strlen (input_filename)]; for (f = &input_filename [strlen (input_filename)];
...@@ -6803,8 +6746,8 @@ static tree ...@@ -6803,8 +6746,8 @@ static tree
resolve_class (class_type, decl, cl) resolve_class (class_type, decl, cl)
tree class_type, decl, cl; tree class_type, decl, cl;
{ {
char *name = IDENTIFIER_POINTER (TYPE_NAME (class_type)); const char *name = IDENTIFIER_POINTER (TYPE_NAME (class_type));
char *base = name; const char *base = name;
tree resolved_type = TREE_TYPE (class_type); tree resolved_type = TREE_TYPE (class_type);
tree resolved_type_decl; tree resolved_type_decl;
...@@ -7020,9 +6963,9 @@ resolve_no_layout (name, cl) ...@@ -7020,9 +6963,9 @@ resolve_no_layout (name, cl)
/* Called when reporting errors. Skip leader '[' in a complex array /* Called when reporting errors. Skip leader '[' in a complex array
type description that failed to be resolved. */ type description that failed to be resolved. */
static char * static const char *
purify_type_name (name) purify_type_name (name)
char *name; const char *name;
{ {
while (*name && *name == '[') while (*name && *name == '[')
name++; name++;
...@@ -7035,7 +6978,7 @@ static void ...@@ -7035,7 +6978,7 @@ static void
complete_class_report_errors (dep) complete_class_report_errors (dep)
jdep *dep; jdep *dep;
{ {
char *name; const char *name;
if (!JDEP_WFL (dep)) if (!JDEP_WFL (dep))
return; return;
...@@ -7108,11 +7051,11 @@ java_check_final () ...@@ -7108,11 +7051,11 @@ java_check_final ()
DECL is a constructor, use the class name instead of the form DECL is a constructor, use the class name instead of the form
<init> */ <init> */
static char * static const char *
get_printable_method_name (decl) get_printable_method_name (decl)
tree decl; tree decl;
{ {
char *to_return; const char *to_return;
tree name = NULL_TREE; tree name = NULL_TREE;
if (DECL_CONSTRUCTOR_P (decl)) if (DECL_CONSTRUCTOR_P (decl))
...@@ -7689,7 +7632,7 @@ find_in_imports (class_type) ...@@ -7689,7 +7632,7 @@ find_in_imports (class_type)
static int static int
note_possible_classname (name, len) note_possible_classname (name, len)
char *name; const char *name;
int len; int len;
{ {
tree node; tree node;
...@@ -7714,7 +7657,7 @@ read_import_dir (wfl) ...@@ -7714,7 +7657,7 @@ read_import_dir (wfl)
tree wfl; tree wfl;
{ {
tree package_id = EXPR_WFL_NODE (wfl); tree package_id = EXPR_WFL_NODE (wfl);
char *package_name = IDENTIFIER_POINTER (package_id); const char *package_name = IDENTIFIER_POINTER (package_id);
int package_length = IDENTIFIER_LENGTH (package_id); int package_length = IDENTIFIER_LENGTH (package_id);
DIR *dirp = NULL; DIR *dirp = NULL;
JCF *saved_jcf = current_jcf; JCF *saved_jcf = current_jcf;
...@@ -7734,7 +7677,7 @@ read_import_dir (wfl) ...@@ -7734,7 +7677,7 @@ read_import_dir (wfl)
for (entry = jcf_path_start (); entry != NULL; entry = jcf_path_next (entry)) for (entry = jcf_path_start (); entry != NULL; entry = jcf_path_next (entry))
{ {
char *entry_name = jcf_path_name (entry); const char *entry_name = jcf_path_name (entry);
int entry_length = strlen (entry_name); int entry_length = strlen (entry_name);
if (jcf_path_is_zipfile (entry)) if (jcf_path_is_zipfile (entry))
{ {
...@@ -7758,7 +7701,7 @@ read_import_dir (wfl) ...@@ -7758,7 +7701,7 @@ read_import_dir (wfl)
for (k = 0; k < zipf->count; k++, zipd = ZIPDIR_NEXT (zipd)) for (k = 0; k < zipf->count; k++, zipd = ZIPDIR_NEXT (zipd))
{ {
char *current_entry = ZIPDIR_FILENAME (zipd); const char *current_entry = ZIPDIR_FILENAME (zipd);
int current_entry_len = zipd->filename_length; int current_entry_len = zipd->filename_length;
if (current_entry_len >= BUFFER_LENGTH (filename) if (current_entry_len >= BUFFER_LENGTH (filename)
...@@ -7790,7 +7733,7 @@ read_import_dir (wfl) ...@@ -7790,7 +7733,7 @@ read_import_dir (wfl)
for (;;) for (;;)
{ {
int len; int len;
char *d_name; const char *d_name;
struct dirent *direntp = readdir (dirp); struct dirent *direntp = readdir (dirp);
if (!direntp) if (!direntp)
break; break;
...@@ -7846,7 +7789,7 @@ find_in_imports_on_demand (class_type) ...@@ -7846,7 +7789,7 @@ find_in_imports_on_demand (class_type)
for (import = ctxp->import_demand_list; import; import = TREE_CHAIN (import)) for (import = ctxp->import_demand_list; import; import = TREE_CHAIN (import))
{ {
char *id_name; const char *id_name;
obstack_grow (&temporary_obstack, obstack_grow (&temporary_obstack,
IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))), IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))),
IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import)))); IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import))));
...@@ -7904,7 +7847,7 @@ resolve_package (pkg, next) ...@@ -7904,7 +7847,7 @@ resolve_package (pkg, next)
{ {
tree current; tree current;
tree type_name = NULL_TREE; tree type_name = NULL_TREE;
char *name = IDENTIFIER_POINTER (EXPR_WFL_NODE (pkg)); const char *name = IDENTIFIER_POINTER (EXPR_WFL_NODE (pkg));
/* The trick is to determine when the package name stops and were /* The trick is to determine when the package name stops and were
the name of something contained in the package starts. Then we the name of something contained in the package starts. Then we
...@@ -7963,11 +7906,11 @@ resolve_package (pkg, next) ...@@ -7963,11 +7906,11 @@ resolve_package (pkg, next)
static tree static tree
lookup_package_type_and_set_next (name, len, next) lookup_package_type_and_set_next (name, len, next)
char *name; const char *name;
int len; int len;
tree *next; tree *next;
{ {
char *ptr; const char *ptr;
tree type_name = lookup_package_type (name, len); tree type_name = lookup_package_type (name, len);
if (!type_name) if (!type_name)
...@@ -7984,11 +7927,11 @@ lookup_package_type_and_set_next (name, len, next) ...@@ -7984,11 +7927,11 @@ lookup_package_type_and_set_next (name, len, next)
static tree static tree
lookup_package_type (name, from) lookup_package_type (name, from)
char *name; const char *name;
int from; int from;
{ {
char subname [128]; char subname [128];
char *sub = &name[from+1]; const char *sub = &name[from+1];
while (*sub != '.' && *sub) while (*sub != '.' && *sub)
sub++; sub++;
strncpy (subname, name, sub-name); strncpy (subname, name, sub-name);
...@@ -8454,7 +8397,7 @@ java_layout_classes () ...@@ -8454,7 +8397,7 @@ java_layout_classes ()
/* Expand all methods in all registered classes. */ /* Expand all methods in all registered classes. */
void static void
java_complete_expand_methods () java_complete_expand_methods ()
{ {
tree current; tree current;
...@@ -8652,7 +8595,7 @@ fix_constructors (mdecl) ...@@ -8652,7 +8595,7 @@ fix_constructors (mdecl)
if (verify_constructor_super ()) if (verify_constructor_super ())
{ {
tree sclass_decl = TYPE_NAME (CLASSTYPE_SUPER (current_class)); tree sclass_decl = TYPE_NAME (CLASSTYPE_SUPER (current_class));
char *n = IDENTIFIER_POINTER (DECL_NAME (sclass_decl)); const char *n = IDENTIFIER_POINTER (DECL_NAME (sclass_decl));
parse_error_context (lookup_cl (TYPE_NAME (current_class)), parse_error_context (lookup_cl (TYPE_NAME (current_class)),
"No constructor matching `%s()' found in " "No constructor matching `%s()' found in "
"class `%s'", n, n); "class `%s'", n, n);
...@@ -8733,7 +8676,7 @@ verify_constructor_super () ...@@ -8733,7 +8676,7 @@ verify_constructor_super ()
/* Expand finals. */ /* Expand finals. */
void static void
java_expand_finals () java_expand_finals ()
{ {
} }
...@@ -9474,7 +9417,7 @@ static void ...@@ -9474,7 +9417,7 @@ static void
check_deprecation (wfl, decl) check_deprecation (wfl, decl)
tree wfl, decl; tree wfl, decl;
{ {
char *file = DECL_SOURCE_FILE (decl); const char *file = DECL_SOURCE_FILE (decl);
/* Complain if the field is deprecated and the file it was defined /* Complain if the field is deprecated and the file it was defined
in isn't compiled at the same time the file which contains its in isn't compiled at the same time the file which contains its
use is */ use is */
...@@ -10006,7 +9949,7 @@ lookup_method_invoke (lc, cl, class, name, arg_list) ...@@ -10006,7 +9949,7 @@ lookup_method_invoke (lc, cl, class, name, arg_list)
{ {
tree atl = end_params_node; /* Arg Type List */ tree atl = end_params_node; /* Arg Type List */
tree method, signature, list, node; tree method, signature, list, node;
char *candidates; /* Used for error report */ const char *candidates; /* Used for error report */
/* Fix the arguments */ /* Fix the arguments */
for (node = arg_list; node; node = TREE_CHAIN (node)) for (node = arg_list; node; node = TREE_CHAIN (node))
...@@ -11482,7 +11425,7 @@ maybe_build_primttype_type_ref (rhs, wfl) ...@@ -11482,7 +11425,7 @@ maybe_build_primttype_type_ref (rhs, wfl)
&& DECL_NAME (n) == TYPE_identifier_node && DECL_NAME (n) == TYPE_identifier_node
&& rhs_type == class_ptr_type) && rhs_type == class_ptr_type)
{ {
char *self_name = IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl)); const char *self_name = IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl));
if (!strncmp (self_name, "java.lang.", 10)) if (!strncmp (self_name, "java.lang.", 10))
to_return = build_primtype_type_ref (self_name); to_return = build_primtype_type_ref (self_name);
} }
...@@ -12376,11 +12319,11 @@ patch_binop (node, wfl_op1, wfl_op2) ...@@ -12376,11 +12319,11 @@ patch_binop (node, wfl_op1, wfl_op2)
static tree static tree
do_merge_string_cste (cste, string, string_len, after) do_merge_string_cste (cste, string, string_len, after)
tree cste; tree cste;
char *string; const char *string;
int string_len, after; int string_len, after;
{ {
int len = TREE_STRING_LENGTH (cste) + string_len; int len = TREE_STRING_LENGTH (cste) + string_len;
char *old = TREE_STRING_POINTER (cste); const char *old = TREE_STRING_POINTER (cste);
TREE_STRING_LENGTH (cste) = len; TREE_STRING_LENGTH (cste) = len;
TREE_STRING_POINTER (cste) = obstack_alloc (expression_obstack, len+1); TREE_STRING_POINTER (cste) = obstack_alloc (expression_obstack, len+1);
if (after) if (after)
...@@ -12412,11 +12355,11 @@ merge_string_cste (op1, op2, after) ...@@ -12412,11 +12355,11 @@ merge_string_cste (op1, op2, after)
/* Reasonable integer constant can be treated right away */ /* Reasonable integer constant can be treated right away */
if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2)) if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2))
{ {
static char *boolean_true = "true"; static const char *boolean_true = "true";
static char *boolean_false = "false"; static const char *boolean_false = "false";
static char *null_pointer = "null"; static const char *null_pointer = "null";
char ch[3]; char ch[3];
char *string; const char *string;
if (op2 == boolean_true_node) if (op2 == boolean_true_node)
string = boolean_true; string = boolean_true;
...@@ -12863,7 +12806,6 @@ patch_cast (node, wfl_operator) ...@@ -12863,7 +12806,6 @@ patch_cast (node, wfl_operator)
/* Check on cast that are proven correct at compile time */ /* Check on cast that are proven correct at compile time */
if (JNUMERIC_TYPE_P (cast_type) && JNUMERIC_TYPE_P (op_type)) if (JNUMERIC_TYPE_P (cast_type) && JNUMERIC_TYPE_P (op_type))
{ {
static tree convert_narrow ();
/* Same type */ /* Same type */
if (cast_type == op_type) if (cast_type == op_type)
return node; return node;
...@@ -13256,7 +13198,7 @@ array_constructor_check_entry (type, entry) ...@@ -13256,7 +13198,7 @@ array_constructor_check_entry (type, entry)
/* Check and report errors */ /* Check and report errors */
if (!new_value) if (!new_value)
{ {
char *msg = (!valid_cast_to_p (type_value, type) ? const char *msg = (!valid_cast_to_p (type_value, type) ?
"Can't" : "Explicit cast needed to"); "Can't" : "Explicit cast needed to");
if (!array_type_string) if (!array_type_string)
array_type_string = strdup (lang_printable_name (type, 1)); array_type_string = strdup (lang_printable_name (type, 1));
......
...@@ -659,7 +659,7 @@ void java_check_final PROTO ((void)); ...@@ -659,7 +659,7 @@ void java_check_final PROTO ((void));
void java_layout_classes PROTO ((void)); void java_layout_classes PROTO ((void));
tree java_method_add_stmt PROTO ((tree, tree)); tree java_method_add_stmt PROTO ((tree, tree));
void java_expand_switch PROTO ((tree)); void java_expand_switch PROTO ((tree));
int java_report_errors PROTO (()); int java_report_errors PROTO ((void));
extern tree do_resolve_class PROTO ((tree, tree, tree)); extern tree do_resolve_class PROTO ((tree, tree, tree));
#endif #endif
char *java_get_line_col PROTO ((char *, int, int)); char *java_get_line_col PROTO ((char *, int, int));
...@@ -674,6 +674,6 @@ extern void java_parser_context_restore_global PROTO ((void)); ...@@ -674,6 +674,6 @@ extern void java_parser_context_restore_global PROTO ((void));
int yyparse PROTO ((void)); int yyparse PROTO ((void));
extern int java_parse PROTO ((void)); extern int java_parse PROTO ((void));
int yylex (); int yylex ();
void yyerror PROTO ((char *)); void yyerror PROTO ((const char *));
extern void java_expand_classes PROTO ((void)); extern void java_expand_classes PROTO ((void));
#endif #endif
...@@ -72,9 +72,9 @@ definitions and other extensions. */ ...@@ -72,9 +72,9 @@ definitions and other extensions. */
/* Local function prototypes */ /* Local function prototypes */
static char *java_accstring_lookup PROTO ((int)); static char *java_accstring_lookup PROTO ((int));
static void classitf_redefinition_error PROTO ((char *,tree, tree, tree)); static void classitf_redefinition_error PROTO ((const char *,tree, tree, tree));
static void variable_redefinition_error PROTO ((tree, tree, tree, int)); static void variable_redefinition_error PROTO ((tree, tree, tree, int));
static void check_modifiers PROTO ((char *, int, int)); static void check_modifiers PROTO ((const char *, int, int));
static tree create_class PROTO ((int, tree, tree, tree)); static tree create_class PROTO ((int, tree, tree, tree));
static tree create_interface PROTO ((int, tree, tree)); static tree create_interface PROTO ((int, tree, tree));
static tree find_field PROTO ((tree, tree)); static tree find_field PROTO ((tree, tree));
...@@ -93,7 +93,7 @@ static tree method_declarator PROTO ((tree, tree)); ...@@ -93,7 +93,7 @@ static tree method_declarator PROTO ((tree, tree));
static void parse_warning_context PVPROTO ((tree cl, const char *msg, ...)) static void parse_warning_context PVPROTO ((tree cl, const char *msg, ...))
ATTRIBUTE_PRINTF_2; ATTRIBUTE_PRINTF_2;
static void issue_warning_error_from_context PROTO ((tree, const char *msg, va_list)); static void issue_warning_error_from_context PROTO ((tree, const char *msg, va_list));
static tree parse_jdk1_1_error PROTO ((char *)); static tree parse_jdk1_1_error PROTO ((const char *));
static void complete_class_report_errors PROTO ((jdep *)); static void complete_class_report_errors PROTO ((jdep *));
static int process_imports PROTO ((void)); static int process_imports PROTO ((void));
static void read_import_dir PROTO ((tree)); static void read_import_dir PROTO ((tree));
...@@ -101,8 +101,8 @@ static int find_in_imports_on_demand PROTO ((tree)); ...@@ -101,8 +101,8 @@ static int find_in_imports_on_demand PROTO ((tree));
static int find_in_imports PROTO ((tree)); static int find_in_imports PROTO ((tree));
static int check_pkg_class_access PROTO ((tree, tree)); static int check_pkg_class_access PROTO ((tree, tree));
static tree resolve_package PROTO ((tree, tree *)); static tree resolve_package PROTO ((tree, tree *));
static tree lookup_package_type PROTO ((char *, int)); static tree lookup_package_type PROTO ((const char *, int));
static tree lookup_package_type_and_set_next PROTO ((char *, int, tree *)); static tree lookup_package_type_and_set_next PROTO ((const char *, int, tree *));
static tree resolve_class PROTO ((tree, tree, tree)); static tree resolve_class PROTO ((tree, tree, tree));
static void declare_local_variables PROTO ((int, tree, tree)); static void declare_local_variables PROTO ((int, tree, tree));
static void source_start_java_method PROTO ((tree)); static void source_start_java_method PROTO ((tree));
...@@ -215,16 +215,16 @@ static int check_thrown_exceptions_do PROTO ((tree)); ...@@ -215,16 +215,16 @@ static int check_thrown_exceptions_do PROTO ((tree));
static void purge_unchecked_exceptions PROTO ((tree)); static void purge_unchecked_exceptions PROTO ((tree));
static void check_throws_clauses PROTO ((tree, tree, tree)); static void check_throws_clauses PROTO ((tree, tree, tree));
static void finish_method_declaration PROTO ((tree)); static void finish_method_declaration PROTO ((tree));
static tree build_super_invocation PROTO (()); static tree build_super_invocation PROTO ((void));
static int verify_constructor_circularity PROTO ((tree, tree)); static int verify_constructor_circularity PROTO ((tree, tree));
static char *constructor_circularity_msg PROTO ((tree, tree)); static char *constructor_circularity_msg PROTO ((tree, tree));
static tree build_this_super_qualified_invocation PROTO ((int, tree, tree, static tree build_this_super_qualified_invocation PROTO ((int, tree, tree,
int, int)); int, int));
static char *get_printable_method_name PROTO ((tree)); static const char *get_printable_method_name PROTO ((tree));
static tree patch_conditional_expr PROTO ((tree, tree, tree)); static tree patch_conditional_expr PROTO ((tree, tree, tree));
static void maybe_generate_finit PROTO (()); static void maybe_generate_finit PROTO ((void));
static void fix_constructors PROTO ((tree)); static void fix_constructors PROTO ((tree));
static int verify_constructor_super PROTO (()); static int verify_constructor_super PROTO ((void));
static tree create_artificial_method PROTO ((tree, int, tree, tree, tree)); static tree create_artificial_method PROTO ((tree, int, tree, tree, tree));
static void start_artificial_method_body PROTO ((tree)); static void start_artificial_method_body PROTO ((tree));
static void end_artificial_method_body PROTO ((tree)); static void end_artificial_method_body PROTO ((tree));
...@@ -240,11 +240,23 @@ static tree build_new_array_init PROTO ((int, tree)); ...@@ -240,11 +240,23 @@ static tree build_new_array_init PROTO ((int, tree));
static tree patch_new_array_init PROTO ((tree, tree)); static tree patch_new_array_init PROTO ((tree, tree));
static tree maybe_build_array_element_wfl PROTO ((tree)); static tree maybe_build_array_element_wfl PROTO ((tree));
static int array_constructor_check_entry PROTO ((tree, tree)); static int array_constructor_check_entry PROTO ((tree, tree));
static char *purify_type_name PROTO ((char *)); static const char *purify_type_name PROTO ((const char *));
static tree fold_constant_for_init PROTO ((tree, tree)); static tree fold_constant_for_init PROTO ((tree, tree));
static tree strip_out_static_field_access_decl PROTO ((tree)); static tree strip_out_static_field_access_decl PROTO ((tree));
static jdeplist *reverse_jdep_list PROTO ((struct parser_ctxt *)); static jdeplist *reverse_jdep_list PROTO ((struct parser_ctxt *));
static void static_ref_err PROTO ((tree, tree, tree)); static void static_ref_err PROTO ((tree, tree, tree));
static void parser_add_interface PROTO ((tree, tree, tree));
static void add_superinterfaces PROTO ((tree, tree));
static tree jdep_resolve_class PROTO ((jdep *));
static int note_possible_classname PROTO ((const char *, int));
static void java_complete_expand_methods PROTO ((void));
static void java_expand_finals PROTO ((void));
static tree cut_identifier_in_qualified PROTO ((tree));
static tree java_stabilize_reference PROTO ((tree));
static tree do_unary_numeric_promotion PROTO ((tree));
static char * operator_string PROTO ((tree));
static tree do_merge_string_cste PROTO ((tree, const char *, int, int));
static tree merge_string_cste PROTO ((tree, tree, int));
/* Number of error found so far. */ /* Number of error found so far. */
int java_error_count; int java_error_count;
...@@ -583,7 +595,7 @@ single_type_import_declaration: ...@@ -583,7 +595,7 @@ single_type_import_declaration:
{ {
tree name = EXPR_WFL_NODE ($2), node, last_name; tree name = EXPR_WFL_NODE ($2), node, last_name;
int i = IDENTIFIER_LENGTH (name)-1; int i = IDENTIFIER_LENGTH (name)-1;
char *last = &IDENTIFIER_POINTER (name)[i]; const char *last = &IDENTIFIER_POINTER (name)[i];
while (last != IDENTIFIER_POINTER (name)) while (last != IDENTIFIER_POINTER (name))
{ {
if (last [0] == '.') if (last [0] == '.')
...@@ -2050,7 +2062,7 @@ cast_expression: /* Error handling here is potentially weak */ ...@@ -2050,7 +2062,7 @@ cast_expression: /* Error handling here is potentially weak */
{ $$ = build_cast ($1.location, $2, $4); } { $$ = build_cast ($1.location, $2, $4); }
| OP_TK name dims CP_TK unary_expression_not_plus_minus | OP_TK name dims CP_TK unary_expression_not_plus_minus
{ {
char *ptr; const char *ptr;
while (CURRENT_OSB (ctxp)--) while (CURRENT_OSB (ctxp)--)
obstack_1grow (&temporary_obstack, '['); obstack_1grow (&temporary_obstack, '[');
ctxp->osb_depth--; ctxp->osb_depth--;
...@@ -2415,7 +2427,7 @@ java_pop_parser_context (generate) ...@@ -2415,7 +2427,7 @@ java_pop_parser_context (generate)
static tree static tree
parse_jdk1_1_error (msg) parse_jdk1_1_error (msg)
char *msg; const char *msg;
{ {
sorry (": `%s' JDK1.1(TM) feature", msg); sorry (": `%s' JDK1.1(TM) feature", msg);
java_error_count++; java_error_count++;
...@@ -2426,11 +2438,11 @@ static int do_warning = 0; ...@@ -2426,11 +2438,11 @@ static int do_warning = 0;
void void
yyerror (msg) yyerror (msg)
char *msg; const char *msg;
{ {
static java_lc elc; static java_lc elc;
static int prev_lineno; static int prev_lineno;
static char *prev_msg; static const char *prev_msg;
int save_lineno; int save_lineno;
char *remainder, *code_from_source; char *remainder, *code_from_source;
...@@ -2680,7 +2692,7 @@ java_accstring_lookup (flags) ...@@ -2680,7 +2692,7 @@ java_accstring_lookup (flags)
static void static void
classitf_redefinition_error (context, id, decl, cl) classitf_redefinition_error (context, id, decl, cl)
char *context; const char *context;
tree id, decl, cl; tree id, decl, cl;
{ {
parse_error_context (cl, "%s `%s' already defined in %s:%d", parse_error_context (cl, "%s `%s' already defined in %s:%d",
...@@ -2694,7 +2706,7 @@ variable_redefinition_error (context, name, type, line) ...@@ -2694,7 +2706,7 @@ variable_redefinition_error (context, name, type, line)
tree context, name, type; tree context, name, type;
int line; int line;
{ {
char *type_name; const char *type_name;
/* Figure a proper name for type. We might haven't resolved it */ /* Figure a proper name for type. We might haven't resolved it */
if (TREE_CODE (type) == POINTER_TYPE && !TREE_TYPE (type)) if (TREE_CODE (type) == POINTER_TYPE && !TREE_TYPE (type))
...@@ -2714,7 +2726,7 @@ build_array_from_name (type, type_wfl, name, ret_name) ...@@ -2714,7 +2726,7 @@ build_array_from_name (type, type_wfl, name, ret_name)
tree type, type_wfl, name, *ret_name; tree type, type_wfl, name, *ret_name;
{ {
int more_dims = 0; int more_dims = 0;
char *string; const char *string;
/* Eventually get more dims */ /* Eventually get more dims */
string = IDENTIFIER_POINTER (name); string = IDENTIFIER_POINTER (name);
...@@ -2765,7 +2777,7 @@ static tree ...@@ -2765,7 +2777,7 @@ static tree
build_unresolved_array_type (type_or_wfl) build_unresolved_array_type (type_or_wfl)
tree type_or_wfl; tree type_or_wfl;
{ {
char *ptr; const char *ptr;
/* TYPE_OR_WFL might be an array on a resolved type. In this case, /* TYPE_OR_WFL might be an array on a resolved type. In this case,
just create a array type */ just create a array type */
...@@ -2792,7 +2804,7 @@ build_unresolved_array_type (type_or_wfl) ...@@ -2792,7 +2804,7 @@ build_unresolved_array_type (type_or_wfl)
static void static void
check_modifiers (message, value, mask) check_modifiers (message, value, mask)
char *message; const char *message;
int value; int value;
int mask; int mask;
{ {
...@@ -2853,7 +2865,7 @@ check_class_interface_creation (is_interface, flags, raw_name, qualified_name, d ...@@ -2853,7 +2865,7 @@ check_class_interface_creation (is_interface, flags, raw_name, qualified_name, d
/* If public, file name should match class/interface name */ /* If public, file name should match class/interface name */
if (flags & ACC_PUBLIC) if (flags & ACC_PUBLIC)
{ {
char *f; const char *f;
/* Contains OS dependent assumption on path separator. FIXME */ /* Contains OS dependent assumption on path separator. FIXME */
for (f = &input_filename [strlen (input_filename)]; for (f = &input_filename [strlen (input_filename)];
...@@ -4149,8 +4161,8 @@ static tree ...@@ -4149,8 +4161,8 @@ static tree
resolve_class (class_type, decl, cl) resolve_class (class_type, decl, cl)
tree class_type, decl, cl; tree class_type, decl, cl;
{ {
char *name = IDENTIFIER_POINTER (TYPE_NAME (class_type)); const char *name = IDENTIFIER_POINTER (TYPE_NAME (class_type));
char *base = name; const char *base = name;
tree resolved_type = TREE_TYPE (class_type); tree resolved_type = TREE_TYPE (class_type);
tree resolved_type_decl; tree resolved_type_decl;
...@@ -4366,9 +4378,9 @@ resolve_no_layout (name, cl) ...@@ -4366,9 +4378,9 @@ resolve_no_layout (name, cl)
/* Called when reporting errors. Skip leader '[' in a complex array /* Called when reporting errors. Skip leader '[' in a complex array
type description that failed to be resolved. */ type description that failed to be resolved. */
static char * static const char *
purify_type_name (name) purify_type_name (name)
char *name; const char *name;
{ {
while (*name && *name == '[') while (*name && *name == '[')
name++; name++;
...@@ -4381,7 +4393,7 @@ static void ...@@ -4381,7 +4393,7 @@ static void
complete_class_report_errors (dep) complete_class_report_errors (dep)
jdep *dep; jdep *dep;
{ {
char *name; const char *name;
if (!JDEP_WFL (dep)) if (!JDEP_WFL (dep))
return; return;
...@@ -4454,11 +4466,11 @@ java_check_final () ...@@ -4454,11 +4466,11 @@ java_check_final ()
DECL is a constructor, use the class name instead of the form DECL is a constructor, use the class name instead of the form
<init> */ <init> */
static char * static const char *
get_printable_method_name (decl) get_printable_method_name (decl)
tree decl; tree decl;
{ {
char *to_return; const char *to_return;
tree name = NULL_TREE; tree name = NULL_TREE;
if (DECL_CONSTRUCTOR_P (decl)) if (DECL_CONSTRUCTOR_P (decl))
...@@ -5035,7 +5047,7 @@ find_in_imports (class_type) ...@@ -5035,7 +5047,7 @@ find_in_imports (class_type)
static int static int
note_possible_classname (name, len) note_possible_classname (name, len)
char *name; const char *name;
int len; int len;
{ {
tree node; tree node;
...@@ -5060,7 +5072,7 @@ read_import_dir (wfl) ...@@ -5060,7 +5072,7 @@ read_import_dir (wfl)
tree wfl; tree wfl;
{ {
tree package_id = EXPR_WFL_NODE (wfl); tree package_id = EXPR_WFL_NODE (wfl);
char *package_name = IDENTIFIER_POINTER (package_id); const char *package_name = IDENTIFIER_POINTER (package_id);
int package_length = IDENTIFIER_LENGTH (package_id); int package_length = IDENTIFIER_LENGTH (package_id);
DIR *dirp = NULL; DIR *dirp = NULL;
JCF *saved_jcf = current_jcf; JCF *saved_jcf = current_jcf;
...@@ -5080,7 +5092,7 @@ read_import_dir (wfl) ...@@ -5080,7 +5092,7 @@ read_import_dir (wfl)
for (entry = jcf_path_start (); entry != NULL; entry = jcf_path_next (entry)) for (entry = jcf_path_start (); entry != NULL; entry = jcf_path_next (entry))
{ {
char *entry_name = jcf_path_name (entry); const char *entry_name = jcf_path_name (entry);
int entry_length = strlen (entry_name); int entry_length = strlen (entry_name);
if (jcf_path_is_zipfile (entry)) if (jcf_path_is_zipfile (entry))
{ {
...@@ -5104,7 +5116,7 @@ read_import_dir (wfl) ...@@ -5104,7 +5116,7 @@ read_import_dir (wfl)
for (k = 0; k < zipf->count; k++, zipd = ZIPDIR_NEXT (zipd)) for (k = 0; k < zipf->count; k++, zipd = ZIPDIR_NEXT (zipd))
{ {
char *current_entry = ZIPDIR_FILENAME (zipd); const char *current_entry = ZIPDIR_FILENAME (zipd);
int current_entry_len = zipd->filename_length; int current_entry_len = zipd->filename_length;
if (current_entry_len >= BUFFER_LENGTH (filename) if (current_entry_len >= BUFFER_LENGTH (filename)
...@@ -5136,7 +5148,7 @@ read_import_dir (wfl) ...@@ -5136,7 +5148,7 @@ read_import_dir (wfl)
for (;;) for (;;)
{ {
int len; int len;
char *d_name; const char *d_name;
struct dirent *direntp = readdir (dirp); struct dirent *direntp = readdir (dirp);
if (!direntp) if (!direntp)
break; break;
...@@ -5192,7 +5204,7 @@ find_in_imports_on_demand (class_type) ...@@ -5192,7 +5204,7 @@ find_in_imports_on_demand (class_type)
for (import = ctxp->import_demand_list; import; import = TREE_CHAIN (import)) for (import = ctxp->import_demand_list; import; import = TREE_CHAIN (import))
{ {
char *id_name; const char *id_name;
obstack_grow (&temporary_obstack, obstack_grow (&temporary_obstack,
IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))), IDENTIFIER_POINTER (EXPR_WFL_NODE (TREE_PURPOSE (import))),
IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import)))); IDENTIFIER_LENGTH (EXPR_WFL_NODE (TREE_PURPOSE (import))));
...@@ -5250,7 +5262,7 @@ resolve_package (pkg, next) ...@@ -5250,7 +5262,7 @@ resolve_package (pkg, next)
{ {
tree current; tree current;
tree type_name = NULL_TREE; tree type_name = NULL_TREE;
char *name = IDENTIFIER_POINTER (EXPR_WFL_NODE (pkg)); const char *name = IDENTIFIER_POINTER (EXPR_WFL_NODE (pkg));
/* The trick is to determine when the package name stops and were /* The trick is to determine when the package name stops and were
the name of something contained in the package starts. Then we the name of something contained in the package starts. Then we
...@@ -5309,11 +5321,11 @@ resolve_package (pkg, next) ...@@ -5309,11 +5321,11 @@ resolve_package (pkg, next)
static tree static tree
lookup_package_type_and_set_next (name, len, next) lookup_package_type_and_set_next (name, len, next)
char *name; const char *name;
int len; int len;
tree *next; tree *next;
{ {
char *ptr; const char *ptr;
tree type_name = lookup_package_type (name, len); tree type_name = lookup_package_type (name, len);
if (!type_name) if (!type_name)
...@@ -5330,11 +5342,11 @@ lookup_package_type_and_set_next (name, len, next) ...@@ -5330,11 +5342,11 @@ lookup_package_type_and_set_next (name, len, next)
static tree static tree
lookup_package_type (name, from) lookup_package_type (name, from)
char *name; const char *name;
int from; int from;
{ {
char subname [128]; char subname [128];
char *sub = &name[from+1]; const char *sub = &name[from+1];
while (*sub != '.' && *sub) while (*sub != '.' && *sub)
sub++; sub++;
strncpy (subname, name, sub-name); strncpy (subname, name, sub-name);
...@@ -5800,7 +5812,7 @@ java_layout_classes () ...@@ -5800,7 +5812,7 @@ java_layout_classes ()
/* Expand all methods in all registered classes. */ /* Expand all methods in all registered classes. */
void static void
java_complete_expand_methods () java_complete_expand_methods ()
{ {
tree current; tree current;
...@@ -5998,7 +6010,7 @@ fix_constructors (mdecl) ...@@ -5998,7 +6010,7 @@ fix_constructors (mdecl)
if (verify_constructor_super ()) if (verify_constructor_super ())
{ {
tree sclass_decl = TYPE_NAME (CLASSTYPE_SUPER (current_class)); tree sclass_decl = TYPE_NAME (CLASSTYPE_SUPER (current_class));
char *n = IDENTIFIER_POINTER (DECL_NAME (sclass_decl)); const char *n = IDENTIFIER_POINTER (DECL_NAME (sclass_decl));
parse_error_context (lookup_cl (TYPE_NAME (current_class)), parse_error_context (lookup_cl (TYPE_NAME (current_class)),
"No constructor matching `%s()' found in " "No constructor matching `%s()' found in "
"class `%s'", n, n); "class `%s'", n, n);
...@@ -6079,7 +6091,7 @@ verify_constructor_super () ...@@ -6079,7 +6091,7 @@ verify_constructor_super ()
/* Expand finals. */ /* Expand finals. */
void static void
java_expand_finals () java_expand_finals ()
{ {
} }
...@@ -6820,7 +6832,7 @@ static void ...@@ -6820,7 +6832,7 @@ static void
check_deprecation (wfl, decl) check_deprecation (wfl, decl)
tree wfl, decl; tree wfl, decl;
{ {
char *file = DECL_SOURCE_FILE (decl); const char *file = DECL_SOURCE_FILE (decl);
/* Complain if the field is deprecated and the file it was defined /* Complain if the field is deprecated and the file it was defined
in isn't compiled at the same time the file which contains its in isn't compiled at the same time the file which contains its
use is */ use is */
...@@ -7352,7 +7364,7 @@ lookup_method_invoke (lc, cl, class, name, arg_list) ...@@ -7352,7 +7364,7 @@ lookup_method_invoke (lc, cl, class, name, arg_list)
{ {
tree atl = end_params_node; /* Arg Type List */ tree atl = end_params_node; /* Arg Type List */
tree method, signature, list, node; tree method, signature, list, node;
char *candidates; /* Used for error report */ const char *candidates; /* Used for error report */
/* Fix the arguments */ /* Fix the arguments */
for (node = arg_list; node; node = TREE_CHAIN (node)) for (node = arg_list; node; node = TREE_CHAIN (node))
...@@ -8828,7 +8840,7 @@ maybe_build_primttype_type_ref (rhs, wfl) ...@@ -8828,7 +8840,7 @@ maybe_build_primttype_type_ref (rhs, wfl)
&& DECL_NAME (n) == TYPE_identifier_node && DECL_NAME (n) == TYPE_identifier_node
&& rhs_type == class_ptr_type) && rhs_type == class_ptr_type)
{ {
char *self_name = IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl)); const char *self_name = IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl));
if (!strncmp (self_name, "java.lang.", 10)) if (!strncmp (self_name, "java.lang.", 10))
to_return = build_primtype_type_ref (self_name); to_return = build_primtype_type_ref (self_name);
} }
...@@ -9722,11 +9734,11 @@ patch_binop (node, wfl_op1, wfl_op2) ...@@ -9722,11 +9734,11 @@ patch_binop (node, wfl_op1, wfl_op2)
static tree static tree
do_merge_string_cste (cste, string, string_len, after) do_merge_string_cste (cste, string, string_len, after)
tree cste; tree cste;
char *string; const char *string;
int string_len, after; int string_len, after;
{ {
int len = TREE_STRING_LENGTH (cste) + string_len; int len = TREE_STRING_LENGTH (cste) + string_len;
char *old = TREE_STRING_POINTER (cste); const char *old = TREE_STRING_POINTER (cste);
TREE_STRING_LENGTH (cste) = len; TREE_STRING_LENGTH (cste) = len;
TREE_STRING_POINTER (cste) = obstack_alloc (expression_obstack, len+1); TREE_STRING_POINTER (cste) = obstack_alloc (expression_obstack, len+1);
if (after) if (after)
...@@ -9758,11 +9770,11 @@ merge_string_cste (op1, op2, after) ...@@ -9758,11 +9770,11 @@ merge_string_cste (op1, op2, after)
/* Reasonable integer constant can be treated right away */ /* Reasonable integer constant can be treated right away */
if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2)) if (TREE_CODE (op2) == INTEGER_CST && !TREE_CONSTANT_OVERFLOW (op2))
{ {
static char *boolean_true = "true"; static const char *boolean_true = "true";
static char *boolean_false = "false"; static const char *boolean_false = "false";
static char *null_pointer = "null"; static const char *null_pointer = "null";
char ch[3]; char ch[3];
char *string; const char *string;
if (op2 == boolean_true_node) if (op2 == boolean_true_node)
string = boolean_true; string = boolean_true;
...@@ -10209,7 +10221,6 @@ patch_cast (node, wfl_operator) ...@@ -10209,7 +10221,6 @@ patch_cast (node, wfl_operator)
/* Check on cast that are proven correct at compile time */ /* Check on cast that are proven correct at compile time */
if (JNUMERIC_TYPE_P (cast_type) && JNUMERIC_TYPE_P (op_type)) if (JNUMERIC_TYPE_P (cast_type) && JNUMERIC_TYPE_P (op_type))
{ {
static tree convert_narrow ();
/* Same type */ /* Same type */
if (cast_type == op_type) if (cast_type == op_type)
return node; return node;
...@@ -10602,7 +10613,7 @@ array_constructor_check_entry (type, entry) ...@@ -10602,7 +10613,7 @@ array_constructor_check_entry (type, entry)
/* Check and report errors */ /* Check and report errors */
if (!new_value) if (!new_value)
{ {
char *msg = (!valid_cast_to_p (type_value, type) ? const char *msg = (!valid_cast_to_p (type_value, type) ?
"Can't" : "Explicit cast needed to"); "Can't" : "Explicit cast needed to");
if (!array_type_string) if (!array_type_string)
array_type_string = strdup (lang_printable_name (type, 1)); array_type_string = strdup (lang_printable_name (type, 1));
......
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