X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/63c2d5de0fa3237edad53913dca35abda6a36f2d..4134cae3c5ff2fc3346ebc5b10d5c25c72c72cfe:/src/output.c diff --git a/src/output.c b/src/output.c index 944ebb54..eecb8c68 100644 --- a/src/output.c +++ b/src/output.c @@ -129,8 +129,8 @@ struct obstack output_obstack; /* FIXME. */ static inline void -output_table_data (struct obstack* oout, - short* table_data, +output_table_data (struct obstack *oout, + short *table_data, short first, short begin, short end) @@ -969,7 +969,7 @@ output_parser (void) } fskel = xfopen (skeleton, "r"); - /* New output code. */ + /* New output code. */ line = 1; c = getc (fskel); while (c != EOF) @@ -983,14 +983,14 @@ output_parser (void) } else if ((c = getc (fskel)) == '%') { - /* Read the macro. */ - const char* macro_key = 0; - const char* macro_value = 0; + /* Read the macro. */ + const char *macro_key = 0; + const char *macro_value = 0; while (isalnum (c = getc (fskel)) || c == '_') obstack_1grow (¯o_obstack, c); obstack_1grow (¯o_obstack, 0); - /* Output the right value, or see if it's something special. */ + /* Output the right value, or see if it's something special. */ macro_key = obstack_finish (¯o_obstack); macro_value = macro_find (macro_key); if (macro_value) @@ -1013,7 +1013,7 @@ output_parser (void) obstack_1grow (&table_obstack, '%'); } - /* End. */ + /* End. */ xfclose (fskel); } @@ -1067,23 +1067,15 @@ prepare (void) MACRO_INSERT_INT ("ntbase", ntokens); MACRO_INSERT_INT ("verbose", 0); - MACRO_INSERT_STRING ("filename", infile); - MACRO_INSERT_INT ("nnts", nvars); MACRO_INSERT_INT ("nrules", nrules); MACRO_INSERT_INT ("nstates", nstates); MACRO_INSERT_INT ("ntokens", ntokens); + MACRO_INSERT_INT ("locations_flag", locations_flag); + if (spec_name_prefix) - { - MACRO_INSERT_PREFIX ("yylex", "lex"); - MACRO_INSERT_PREFIX ("yychar", "char"); - MACRO_INSERT_PREFIX ("yylval", "lval"); - MACRO_INSERT_PREFIX ("yydebug", "debug"); - MACRO_INSERT_PREFIX ("yyerror", "error"); - MACRO_INSERT_PREFIX ("yynerrs", "nerrs"); - MACRO_INSERT_PREFIX ("yyparse", "parse"); - } + MACRO_INSERT_STRING ("prefix", spec_name_prefix); } /*----------------------------------------------------------.