From 52dabb6c609b81591884caf64894caa84e16a29f Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 17 Mar 2002 20:41:46 +0000 Subject: 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 --- gcc/f/ChangeLog | 7 +++++++ gcc/f/com.c | 4 +++- gcc/f/com.h | 1 + gcc/f/parse.c | 8 ++------ 4 files changed, 13 insertions(+), 7 deletions(-) (limited to 'gcc/f') diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 0f3ec2c..43c9c9c 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,10 @@ +Sun Mar 17 20:57:30 2002 Neil Booth + + * com.c (LANG_HOOKS_PARSE_FILE): Redefine. + * com.h (ffe_parse_file): New. + * parse.c (NAME_OF_STDIN): Remove. + (yyparse): Rename ffe_parse_file. + Tue Mar 12 20:23:18 2002 Kaveh R. Ghazi * com.c (tree_code_type, tree_code_length, tree_code_name): diff --git a/gcc/f/com.c b/gcc/f/com.c index f895db4..016b422 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -13928,7 +13928,7 @@ start_decl (tree decl, bool is_top_level) Returns 1 on success. If the DECLARATOR is not suitable for a function (it defines a datum instead), we return 0, which tells - yyparse to report a parse error. + ffe_parse_file to report a parse error. NESTED is nonzero for a function nested within another function. */ @@ -14211,6 +14211,8 @@ static void ffe_print_identifier PARAMS ((FILE *, tree, int)); #define LANG_HOOKS_INIT_OPTIONS ffe_init_options #undef LANG_HOOKS_DECODE_OPTION #define LANG_HOOKS_DECODE_OPTION ffe_decode_option +#undef LANG_HOOKS_PARSE_FILE +#define LANG_HOOKS_PARSE_FILE ffe_parse_file #undef LANG_HOOKS_PRINT_IDENTIFIER #define LANG_HOOKS_PRINT_IDENTIFIER ffe_print_identifier diff --git a/gcc/f/com.h b/gcc/f/com.h index 5e20e2b..58b0131 100644 --- a/gcc/f/com.h +++ b/gcc/f/com.h @@ -265,6 +265,7 @@ tree ffecom_truth_value (tree expr); tree ffecom_truth_value_invert (tree expr); tree ffecom_type_expr (ffebld expr); tree ffecom_which_entrypoint_decl (void); +void ffe_parse_file (); /* Define macros. */ diff --git a/gcc/f/parse.c b/gcc/f/parse.c index 29c6133..fe48b6d 100644 --- a/gcc/f/parse.c +++ b/gcc/f/parse.c @@ -26,12 +26,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "version.h" #include "flags.h" -#define NAME_OF_STDIN "" - extern FILE *finput; -int -yyparse () +void +ffe_parse_file () { ffewhereFile wf; @@ -46,6 +44,4 @@ yyparse () ffe_file (wf, finput); ffecom_finish_compile (); - - return 0; } -- cgit v1.1