aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse-scan.c
AgeCommit message (Collapse)AuthorFilesLines
2000-07-12gcc_update (files_and_dependencies): Remove generated YACC files.Mark Mitchell1-2571/+0
* gcc_update (files_and_dependencies): Remove generated YACC files. * c-parse.c: Remove. * c-parse.h: Likewise. * c-parse.y: Likewise. * objc/objc-parse.c: Likewise. * objc/objc-pasre.y: Likewise. * Makefile.in ($(PARSE_H)): Depend directly on parse.y. * parse.c: Remove. * parse.h: Likewise. * parse-scan.c: Remove. From-SVN: r34982
2000-03-28parse-scan.y (pop_class_context): Reset `inner_qualifier_length' when ↵Alexandre Petit-Bianco1-1/+1
negative *before* using it as an array index. 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (pop_class_context): Reset `inner_qualifier_length' when negative *before* using it as an array index. * ChangeLog: Fixed typo. (Fixes the following bogus patch: http://gcc.gnu.org/ml/gcc-patches/2000-03/msg00937.html) From-SVN: r32793
2000-03-28[multiple changes]Alexandre Petit-Bianco1-1027/+1101
2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (pop_class_context): Reset `inner_qualifier_length' to 0 when it reaches -1. 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com> * jcf-parse.c (get_constant): Properly cast `num' during the invocation of `add_double call'. * jcf-write.c (push_long_const): Properly cast `lo' before comparing it to short bounds. * parse-scan.y (interface_declaration:): Rule re-arrange so that `interface_body:' is reduced after the current interface is pushed. 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com> * parse-scan.y (inner_qualifier, inner_qualifier_length): New static globals. (push_class_context, pop_class_context): New function. (class_body:): Call pop_class_context. (interface_body:): Likewise. (INNER_QUALIFIER): New macro. (report_class_declaration): Changed output format and use INNER_QUALIFIER. Call push_class_context. From-SVN: r32779
2000-03-07*** empty log message ***Alexandre Petit-Bianco1-162/+230
From-SVN: r32385
2000-01-21buffer.h: PROTO -> PARAMS.Kaveh R. Ghazi1-2/+2
* buffer.h: PROTO -> PARAMS. * check-init.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * convert.h: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * gjavah.c: Likewise. * java-except.h: Likewise. * java-tree.h: Likewise. * jcf-depend.c: Likewise. * jcf-dump.c: Likewise. * jcf-parse.c: Likewise. * jcf-path.c: Likewise. * jcf-reader.c: Likewise. * jcf-write.c: Likewise. * jcf.h: Likewise. * jv-scan.c: Likewise. * jvgenmain.c: Likewise. * jvspec.c: Likewise. * lang.c: Likewise. * lex.c: Likewise. * lex.h: Likewise. * parse-scan.y: Likewise. * parse.h: Likewise. * parse.y: Likewise. * typeck.c: Likewise. * verify.c: Likewise. * xref.c: Likewise. * xref.h: Likewise. * zextract.c: Likewise. * zipfile.h: Likewise. From-SVN: r31550
1999-10-14jcf-dump.c (print_constant, [...]): Don't call a variadic function with a ↵Kaveh R. Ghazi1-1/+1
non-literal format string. * jcf-dump.c (print_constant, disassemble_method): Don't call a variadic function with a non-literal format string. * parse-scan.y (report_main_declaration): Likewise. * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise. * parse.y (read_import_dir, patch_assignment, patch_binop, patch_array_ref): Likewise. * typeck.c (build_java_array_type): Likewise. * verify.c (verify_jvm_instructions): Likewise. From-SVN: r29981
1999-10-04re GNATS gcj/59 (Problem with jv-scan --print-main)Tom Tromey1-4/+6
* lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as well. Fixes Java PR gcj/59. * parse-scan.y (yyerror): Report errors. From-SVN: r29811
1999-09-16gjavah.c (get_field_name, [...]): Use xmalloc, not malloc.Kaveh R. Ghazi1-112/+90
* gjavah.c (get_field_name, print_method_info, print_include, add_namelet): Use xmalloc, not malloc. * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup. (munge): Use xrealloc, not realloc, trust xrealloc to handle a NULL pointer. * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup. * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise. * jcf-path.c (add_entry): Likewise. * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc. * jv-scan.c (xmalloc): Remove definition. * jvgenmain.c (xmalloc): Likewise. * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero. * lex.c (java_store_unicode): Use xrealloc, not realloc. * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use concat, not xmalloc/sprintf. (java_push_parser_context): Use xcalloc, not xmalloc/bzero. (xstrdup): Remove definition. * parse.y (duplicate_declaration_error_p, constructor_circularity_msg, verify_constructor_circularity, check_abstract_method_definitions, java_check_regular_methods, java_check_abstract_methods, patch_method_invocation, check_for_static_method_reference, patch_assignment, patch_binop, patch_cast, array_constructor_check_entry, patch_return, patch_conditional_expr): Use xstrdup, not strdup. * zextract.c (ALLOC): Use xmalloc, not malloc. From-SVN: r29457
1999-09-06Merge in gcc2-ss-010999Jeff Law1-3/+3
From-SVN: r29150
1999-08-25gjavah.c (print_name, [...]): Add static prototype.Kaveh R. Ghazi1-89/+90
* gjavah.c (print_name, print_base_classname, utf8_cmp, cxx_keyword_subst, generate_access, name_is_method_p, get_field_name, print_field_name, super_class_name, print_include, decode_signature_piece, print_class_decls, usage, help, java_no_argument, version, add_namelet, print_namelet): Add static prototype. (print_base_classname, utf8_cmp, cxx_keyword_subst, name_is_method_p): Constify a char*. (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy. Provide a final else clause in an if-else-if. (print_field_info): Add missing final arg in function call to `print_field_name'. (print_method_info, decompile_method, decode_signature_piece, print_c_decl, print_full_cxx_name, print_stub, print_mangled_classname, super_class_name, print_include, add_namelet, add_class_decl, print_class_decls, process_file, help): Constify a char*. * jcf-write.c (jcf_handler, push_constant1, push_constant2, push_int_const, find_constant_wide, find_constant_index, push_long_const, field_op, maybe_wide, emit_dup, emit_pop, emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop, emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc, emit_if, emit_goto, emit_jsr, call_cleanups, make_class_file_name): Add static prototypes. (generate_bytecode_return, generate_bytecode_insns): Pass a NULL_PTR, not a NULL_TREE. * jv-scan.c: Include "jcf.h". (main): Declare using DEFUN macro. * jvspec.c (find_spec_file, lang_specific_pre_link, lang_specific_driver): Add prototypes. (find_spec_file): Constify a char*. * keyword.gperf (hash, java_keyword): Add prototypes. * lang.c (lang_print_error): Add static prototype. (lang_init): Prefer memcpy over bcopy to avoid casts. * lex.c (yylex): Add static prototype. * parse-scan.y: Include "lex.c" earlier. * parse.h: Remove redundant declaration for `yylex'. * parse.y (java_decl_equiv, binop_compound_p, search_loop, labeled_block_contains_loop_p): Add static prototypes. (not_accessible_p): Make static to match prototype. * verify.c (start_pc_cmp): Don't needlessly cast away const. From-SVN: r28862
1999-08-04Warning fixes:Kaveh R. Ghazi1-10/+10
* 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
1999-06-22verify.c (verify_jvm_instructions): Check for pending blocks before invalid ↵Andrew Haley1-3/+3
PC test and opcode switch, not after. 1999-06-22 Andrew Haley <aph@cygnus.com> * verify.c (verify_jvm_instructions): Check for pending blocks before invalid PC test and opcode switch, not after. From-SVN: r27710
1999-05-03parse-scan.y (interface_declaration): Call report_class_declaration for ↵Tom Tromey1-45/+53
interfaces. * parse-scan.y (interface_declaration): Call report_class_declaration for interfaces. From-SVN: r26761
1999-04-05class.c (add_method_1): Cast the argument of `bzero' to PTR.Kaveh R. Ghazi1-1/+1
* class.c (add_method_1): Cast the argument of `bzero' to PTR. * decl.c (copy_lang_decl): Likewise for `bcopy'. * jcf-depend.c: Include "config.h", not <config.h>. * jcf-parse.c (jcf_figure_file_type): Cast the arguments of `bcopy' to PTR. * jcf-path.c: Include "config.h", not <config.h>. * lex.c: Don't include various system header files. (java_init_lex): Cast the argument of `bzero' to PTR * parse-scan.y (java_push_parser_context): Likewise. * parse.y (java_push_parser_context): Likewise. * xref.c: Don't include <stdio.h>. From-SVN: r26203
1999-03-06Makefile.in (jcf-parse.o): Depend on $(PARSE_H).Kaveh R. Ghazi1-91/+92
* Makefile.in (jcf-parse.o): Depend on $(PARSE_H). (parse-scan.o): Depend on toplev.h. * class.c (make_method_value): Add prototype. Make it static. Remove unused second argument, caller changed. * expr.c (java_lang_expand_expr): Remove unused variable `return_label'. * java-tree.h: Don't prototype find_in_current_zip. Add prototypes for verify_constant_pool, start_java_method, end_java_method, give_name_to_locals, expand_byte_code, open_in_zip, set_constant_value, find_constant1, find_constant2, find_utf8_constant, find_string_constant, find_class_constant, find_fieldref_index, find_methodref_index, write_constant_pool, count_constant_pool_bytes and encode_newarray_type. * jcf-dump.c: Remove unused variable `LONG_temp'. * jcf-parse.c: Include parse.h. (jcf_parse_source): Remove unused parameter, all callers changed. (jcf_figure_file_type): Add static prototype. (find_in_current_zip): Likewise. Also remove unused parameter, all callers changed. (read_class): Initialize variable `saved_pos'. * jcf-reader.c (jcf_parse_preamble): Mark variables `minor_version' and `major_version' with ATTRIBUTE_UNUSED. * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE. (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE. (java_parse_doc_section): Initialize variable `seen_star'. (java_lex): Wrap variable `number_beginning' in !JC1_LITE. (java_lex_error): Mark parameters `msg' and `forward' with ATTRIBUTE_UNUSED. (java_get_line_col): Mark parameters `filename' and `line' with ATTRIBUTE_UNUSED. * parse-scan.y: Include toplev.h. (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED. * parse.h: use `struct JCF', not plain `JCF'. (java_parser_context_save_global, java_expand_classes java_parser_context_restore_global, java_parse): Add prototypes. * typeck.c (convert_ieee_real_to_integer): Remove unused variable `node'. From-SVN: r25616
1999-01-08parse-scan.y (variable_declarator_id): Set or increment bracket_count.Tom Tromey1-88/+118
* parse-scan.y (variable_declarator_id): Set or increment bracket_count. (bracket_count): New global. (formal_parameter): Handle case where bracket pairs trail variable declarator id. From-SVN: r24573
1998-12-17parse-scan.y (report_main_declaration): Recognize `java.lang.String' in ↵Tom Tromey1-1/+2
argument to main. * parse-scan.y (report_main_declaration): Recognize `java.lang.String' in argument to main. From-SVN: r24361
1998-12-16* parse-scan.y (qualified_name): Use correct sprintf format.Tom Tromey1-5/+5
From-SVN: r24345
1998-11-27Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).Kaveh R. Ghazi1-94/+98
* Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK). * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition. * jvgenmain.c: Remove the xmalloc prototype, we get it from libiberty.h. Provide an xmalloc definition. * jvspec.c: Remove the xmalloc prototype. * parse-scan.y: Include config.h and system.h. Don't include OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup. Provide an xstrdup definition. From-SVN: r23934
1998-11-01Get it in the repoJeff Law1-0/+2404
From-SVN: r23483