+2001-08-31 Marc Autret <autret_m@epita.fr>
+
+ * 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 <pascal.bart@epita.fr>
* src/reader.c (reader): Delete obsolete call to function
{
obstack_init (&output_obstack);
- /* reader_output_yylsp (&table_obstack); */
+#if 0
+ reader_output_yylsp (&table_obstack); */
+#endif
free_itemsets ();
output_token_translations ();
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));
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)
if (semantic_parser)
obstack_fgrow2 (oout, "# define\tT%s\t%d\n", symbol, bp->value);
}
-
- /* obstack_1grow (oout, '\n'); */
}
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);
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);
#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. */