X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/4f82b42a9d5ce6f0baa70714f25346ba9303be73..960349830600dc408ebd1ddc9710aa3ed955ed66:/src/scan-code.l diff --git a/src/scan-code.l b/src/scan-code.l index d41c6e46..0a338b4e 100644 --- a/src/scan-code.l +++ b/src/scan-code.l @@ -372,16 +372,14 @@ handle_action_at (symbol_list *rule, char *text, location at_loc) translation is for \a rule, in the context \a sc_context (SC_RULE_ACTION, SC_SYMBOL_ACTION, INITIAL). */ -static char * -translate_action (int sc_context, symbol_list *rule, const char *a, location l) +static char const * +translate_action (int sc_context, symbol_list *rule, char const *a, location l) { char *res; static bool initialized = false; if (!initialized) { obstack_init (&obstack_for_string); - /* The initial buffer, never used. */ - yy_delete_buffer (YY_CURRENT_BUFFER); yy_flex_debug = 0; initialized = true; } @@ -394,21 +392,21 @@ translate_action (int sc_context, symbol_list *rule, const char *a, location l) return res; } -char * +char const * translate_rule_action (symbol_list *rule) { return translate_action (SC_RULE_ACTION, rule, rule->action, rule->action_location); } -char * -translate_symbol_action (const char *a, location l) +char const * +translate_symbol_action (char const *a, location l) { return translate_action (SC_SYMBOL_ACTION, NULL, a, l); } -char * -translate_code (const char *a, location l) +char const * +translate_code (char const *a, location l) { return translate_action (INITIAL, NULL, a, l); } @@ -422,5 +420,5 @@ code_scanner_free (void) { obstack_free (&obstack_for_string, 0); /* Reclaim Flex's buffers. */ - yy_delete_buffer (YY_CURRENT_BUFFER); + yylex_destroy (); }