From ad8a3efc5a6107ffe74261510d396ef05b12dd09 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 27 Nov 2002 18:33:18 +0000 Subject: [PATCH] (print_token_value): Renamed from yyprint. All uses changed. (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed. The name "yycontrol" violates the name space rules, and this stuff wasn't being used anyway. (input): Remove action; this stuff wasn't being used. (gram_error): Rename local variable yylloc -> loc. --- src/parse-gram.y | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/parse-gram.y b/src/parse-gram.y index 8af3e885..303e3cee 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -57,22 +57,15 @@ do { \ } \ } while (0) -/* Pass the control structure to YYPARSE and YYLEX. */ -#define YYPARSE_PARAM gram_control -#define YYLEX_PARAM gram_control -/* YYPARSE receives GRAM_CONTROL as a void *. Provide a - correctly typed access to it. */ -#define yycontrol ((gram_control_t *) gram_control) - /* Request detailed syntax error messages, and pass them to GRAM_ERROR. - FIXME: depends on the undocumented availability of YYLLOC.t */ + FIXME: depends on the undocumented availability of YYLLOC. */ #undef yyerror #define yyerror(Msg) \ gram_error (&yylloc, Msg) #define YYPRINT(File, Type, Value) \ - yyprint (File, Type, &Value) -static void yyprint (FILE *file, int type, const yystype *value); + print_token_value (File, Type, &Value) +static void print_token_value (FILE *file, int type, YYSTYPE const *value); symbol_class current_class = unknown_sym; struniq_t current_type = 0; @@ -169,9 +162,6 @@ braced_code_t current_braced_code = action_braced_code; input: declarations "%%" grammar epilogue.opt - { - yycontrol->errcode = 0; - } ; @@ -450,8 +440,7 @@ semi_colon.opt: `------------------------------------------------------------------*/ static void -yyprint (FILE *file, - int type, const yystype *value) +print_token_value (FILE *file, int type, YYSTYPE const *value) { fputc (' ', file); switch (type) @@ -485,7 +474,7 @@ yyprint (FILE *file, } void -gram_error (location_t *yylloc, const char *msg) +gram_error (location_t const *loc, char const *msg) { - complain_at (*yylloc, "%s", msg); + complain_at (*loc, "%s", msg); } -- 2.45.2