mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
Prototype support of %lex-param and %parse-param.
* src/parse-gram.y: Add the definition of the %lex-param and %parse-param tokens, plus their rules. Drop the `_' version of %glr-parser. Add the "," token. * src/scan-gram.l (INITIAL): Scan them. * src/muscle_tab.c: Comment changes. (muscle_insert, muscle_find): Rename `pair' as `probe'. * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused. (muscle_entry_s): The `value' member is no longer const. Adjust all dependencies. * src/muscle_tab.c (muscle_init): Adjust: use MUSCLE_INSERT_STRING. Initialize the obstack earlier. * src/muscle_tab.h, src/muscle_tab.c (muscle_grow) (muscle_pair_list_grow): New. * data/c.m4 (b4_c_function_call, b4_c_args): New. * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param. * tests/calc.at: Use %locations, not --locations. (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
This commit is contained in:
20
src/output.c
20
src/output.c
@@ -355,9 +355,9 @@ merger_output (FILE *out)
|
||||
fputs ("]])\n\n", out);
|
||||
}
|
||||
|
||||
/*---------------------------------------.
|
||||
| Output the tokens definition to OOUT. |
|
||||
`---------------------------------------*/
|
||||
/*--------------------------------------.
|
||||
| Output the tokens definition to OUT. |
|
||||
`--------------------------------------*/
|
||||
|
||||
static void
|
||||
token_definitions_output (FILE *out)
|
||||
@@ -405,9 +405,9 @@ token_definitions_output (FILE *out)
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------.
|
||||
| Output the symbol destructors to OOUT. |
|
||||
`----------------------------------------*/
|
||||
/*---------------------------------------.
|
||||
| Output the symbol destructors to OUT. |
|
||||
`---------------------------------------*/
|
||||
|
||||
static void
|
||||
symbol_destructors_output (FILE *out)
|
||||
@@ -438,9 +438,9 @@ symbol_destructors_output (FILE *out)
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------.
|
||||
| Output the symbol printers to OOUT. |
|
||||
`-------------------------------------*/
|
||||
/*------------------------------------.
|
||||
| Output the symbol printers to OUT. |
|
||||
`------------------------------------*/
|
||||
|
||||
static void
|
||||
symbol_printers_output (FILE *out)
|
||||
@@ -456,7 +456,7 @@ symbol_printers_output (FILE *out)
|
||||
|
||||
/* Filename, lineno,
|
||||
Symbol-name, Symbol-number,
|
||||
destructor, typename. */
|
||||
printer, typename. */
|
||||
fprintf (out, "%s[[[%s]], [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]",
|
||||
first ? "" : ",\n",
|
||||
infile, symbol->printer_location.first_line,
|
||||
|
||||
Reference in New Issue
Block a user