aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-03-17 20:41:46 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-03-17 20:41:46 +0000
commit52dabb6c609b81591884caf64894caa84e16a29f (patch)
tree01d8cbe7674c79a641d252751aa12e5e865b5e8c /gcc/java
parent6e1a435df002c87da258a71a64a43720b17d1631 (diff)
downloadgcc-52dabb6c609b81591884caf64894caa84e16a29f.zip
gcc-52dabb6c609b81591884caf64894caa84e16a29f.tar.gz
gcc-52dabb6c609b81591884caf64894caa84e16a29f.tar.bz2
c-common.h (yyparse, [...]): New.
* c-common.h (yyparse, c_common_parse_file): New. * c-lang.c: Include c-common.h. (LANG_HOOKS_PARSE_FILE): Redefine. * c-lex.c: Include c-common.h. (yyparse): Rename c_common_parse_file. Call yyparse. * c-parse.in (yyparse): Remove macro. * c-tree.h (yyparse_1): Remove. * langhooks-def.h (LANG_HOOKS_PARSE_FILE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hoooks): New hook parse_file. * toplev.c (compile_file): Use parse_file hook. * tree.h (yyparse): Remove. ada: * misc.c (LANG_HOOKS_PARSE_FILE): Redefine. (yyparse): Rename gnat_parse_file. cp: * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. * parse.y (yyparse): Remove macro. f: * com.c (LANG_HOOKS_PARSE_FILE): Redefine. * com.h (ffe_parse_file): New. * parse.c (NAME_OF_STDIN): Remove. (yyparse): Rename ffe_parse_file. java: * java-tree.h (java_parse_file): New. * jcf-parse.c (yyparse): Rename java_parse_file. * lang.c (LANG_HOOKS_PARSE_FILE): Redefine. objc: * objc-lang.c (LANG_HOOKS_PARSE_FILE): Redefine. From-SVN: r50926
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/java-tree.h1
-rw-r--r--gcc/java/jcf-parse.c7
-rw-r--r--gcc/java/lang.c2
4 files changed, 12 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index ce82f8d..3dbb7f0 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * java-tree.h (java_parse_file): New.
+ * jcf-parse.c (yyparse): Rename java_parse_file.
+ * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
+
2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* parse.y (craft_constructor): Return the constructor decl.
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 898c851..aa92f27 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -1037,6 +1037,7 @@ struct lang_type
#define JCF_u2 unsigned short
extern void java_set_yydebug PARAMS ((int));
+extern void java_parse_file PARAMS ((void));
extern void add_assume_compiled PARAMS ((const char *, int));
extern tree lookup_class PARAMS ((tree));
extern tree lookup_java_constructor PARAMS ((tree, tree));
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index d77ddce..9f5b44e 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -913,8 +913,8 @@ predefined_filename_p (node)
return 0;
}
-int
-yyparse ()
+void
+java_parse_file ()
{
int filename_count = 0;
char *list, *next;
@@ -1054,7 +1054,7 @@ yyparse ()
resource_filename = IDENTIFIER_POINTER (TREE_VALUE (current_file_list));
compile_resource_file (resource_name, resource_filename);
- return 0;
+ return;
}
current_jcf = main_jcf;
@@ -1156,7 +1156,6 @@ yyparse ()
if (flag_indirect_dispatch)
emit_offset_symbol_table ();
}
- return 0;
}
/* Process all class entries found in the zip file. */
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 24e0375..d9e5847 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -221,6 +221,8 @@ static int dependency_tracking = 0;
#define LANG_HOOKS_DECODE_OPTION java_decode_option
#undef LANG_HOOKS_SET_YYDEBUG
#define LANG_HOOKS_SET_YYDEBUG java_set_yydebug
+#undef LANG_HOOKS_PARSE_FILE
+#define LANG_HOOKS_PARSE_FILE java_parse_file
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl