From: Marc Autret Date: Fri, 31 Aug 2001 11:47:08 +0000 (+0000) Subject: * src/reader.c (readgram): CleanUp. X-Git-Tag: pre-merge-of-1-29-branch~38 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/d8cb51834b4b8ec018d3262238df526078c78159 * src/reader.c (readgram): CleanUp. (output_token_defines): Likewise. (packsymbols): Likewise. (reader): Likewise. * src/output.c (output): CPP-out useless code. --- diff --git a/ChangeLog b/ChangeLog index 443e3803..f2c7fad7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-08-31 Marc Autret + + * src/reader.c (readgram): CleanUp. + (output_token_defines): Likewise. + (packsymbols): Likewise. + (reader): Likewise. + * src/output.c (output): CPP-out useless code. + 2001-08-31 Pascal Bart * src/reader.c (reader): Delete obsolete call to function diff --git a/src/output.c b/src/output.c index c8830c4e..b4d44376 100644 --- a/src/output.c +++ b/src/output.c @@ -1095,7 +1095,9 @@ output (void) { obstack_init (&output_obstack); - /* reader_output_yylsp (&table_obstack); */ +#if 0 + reader_output_yylsp (&table_obstack); */ +#endif free_itemsets (); output_token_translations (); @@ -1106,8 +1108,10 @@ output (void) output_stos (); output_rule_data (); output_actions (); - - /* if (!no_parser_flag) */ + +#if 0 + if (!no_parser_flag) */ +#endif prepare (); /* Copy definitions in directive. */ macro_insert ("definitions", obstack_finish (&attrs_obstack)); diff --git a/src/reader.c b/src/reader.c index e46d5fab..31af907d 100644 --- a/src/reader.c +++ b/src/reader.c @@ -1650,24 +1650,6 @@ readgram (void) if (nrules == 0) fatal (_("no rules in the input grammar")); -#if 0 /* This code is in the skeleton now. */ - /* JF put out same default YYSTYPE as YACC does */ - if (typed == 0 - && !value_components_used) - { - /* We used to use `unsigned long' as YYSTYPE on MSDOS, - but it seems better to be consistent. - Most programs should declare their own type anyway. */ - obstack_sgrow (&attrs_obstack, - "#ifndef YYSTYPE\n#define YYSTYPE int\n#endif\n"); - if (defines_flag) - obstack_sgrow (&defines_obstack, "\ -# ifndef YYSTYPE\n\ -# define YYSTYPE int\n\ -# endif\n"); - } -#endif - /* Report any undefined symbols and consider them nonterminals. */ for (bp = firstsymbol; bp; bp = bp->next) @@ -1747,8 +1729,6 @@ output_token_defines (struct obstack *oout) if (semantic_parser) obstack_fgrow2 (oout, "# define\tT%s\t%d\n", symbol, bp->value); } - - /* obstack_1grow (oout, '\n'); */ } @@ -1767,8 +1747,6 @@ packsymbols (void) int last_user_token_number; static char DOLLAR[] = "$"; - /* int lossage = 0; JF set but not used */ - tags = XCALLOC (char *, nsyms + 1); tags[0] = DOLLAR; user_toknums = XCALLOC (short, nsyms + 1); @@ -1874,8 +1852,10 @@ packsymbols (void) obstack_1grow (&output_obstack, 0); macro_insert ("tokendef", obstack_finish (&output_obstack)); - /* if (!no_parser_flag) - output_token_defines (&table_obstack); */ +#if 0 + if (!no_parser_flag) + output_token_defines (&table_obstack); +#endif if (startval->class == unknown_sym) fatal (_("the start symbol %s is undefined"), startval->tag); @@ -2053,11 +2033,6 @@ reader (void) #if 0 if (defines_flag) reader_output_yylsp (&defines_obstack); -#endif - /* Write closing delimiters for actions and guards. */ -#if 0 - if (locations_flag) - obstack_sgrow (&table_obstack, "#define YYLSP_NEEDED 1\n\n"); #endif /* Assign the symbols their symbol numbers. Write #defines for the token symbols into FDEFINES if requested. */