aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/misc.c
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/ada/misc.c
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/ada/misc.c')
-rw-r--r--gcc/ada/misc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c
index 393f70a..46e2802 100644
--- a/gcc/ada/misc.c
+++ b/gcc/ada/misc.c
@@ -85,6 +85,7 @@ static void gnat_print_type PARAMS ((FILE *, tree, int));
static const char *gnat_printable_name PARAMS ((tree, int));
static tree gnat_eh_runtime_type PARAMS ((tree));
static int gnat_eh_type_covers PARAMS ((tree, tree));
+static void gnat_parse_file PARAMS ((void));
/* Structure giving our language-specific hooks. */
@@ -98,6 +99,8 @@ static int gnat_eh_type_covers PARAMS ((tree, tree));
#define LANG_HOOKS_INIT_OPTIONS gnat_init_options
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION gnat_decode_option
+#undef LANG_HOOKS_PARSE_FILE
+#define LANG_HOOKS_PARSE_FILE gnat_parse_file
#undef LANG_HOOKS_HONOR_READONLY
#define LANG_HOOKS_HONOR_READONLY 1
#undef LANG_HOOKS_GET_ALIAS_SET
@@ -167,11 +170,10 @@ extern void __gnat_initialize PARAMS((void));
extern void adainit PARAMS((void));
extern void _ada_gnat1drv PARAMS((void));
-/* For most front-ends, this is the parser for the language. For us, we
- process the GNAT tree. */
+/* The parser for the language. For us, we process the GNAT tree. */
-int
-yyparse ()
+static void
+gnat_parse_file ()
{
/* call the target specific initializations */
__gnat_initialize();
@@ -183,8 +185,6 @@ yyparse ()
/* Call the front end */
_ada_gnat1drv ();
-
- return 0;
}
/* Decode all the language specific options that cannot be decoded by GCC.