/* -1 while reading a character if prev char was %. */
int after_percent;
-#if 0
if (!no_lines_flag)
{
obstack_fgrow2 (&attrs_obstack, muscle_find ("linef"),
lineno, quotearg_style (c_quoting_style,
muscle_find("filename")));
}
-#endif
after_percent = 0;
/*---------------------------------.
-| Parse a double quoted parameter. |
+| Parse a double quoted parameter. |
`---------------------------------*/
static const char *
else
break;
}
-
+
obstack_1grow (¶m_obstack, '\0');
param = obstack_finish (¶m_obstack);
| Parse what comes after %skeleton. |
`----------------------------------*/
-void
+static void
parse_skel_decl (void)
{
skeleton = parse_dquoted_param ("%skeleton");
{
int c;
int count;
- char buf[4096];
/* offset is always 0 if parser has already popped the stack pointer */
if (semantic_parser)
obstack_init (&el_obstack);
+ if (!no_lines_flag)
+ {
+ obstack_fgrow2 (&el_obstack, muscle_find ("linef"),
+ lineno, quotearg_style (c_quoting_style,
+ muscle_find("filename")));
+ }
+
while ((c = getc (finput)) != EOF)
obstack_1grow (&el_obstack, c);
obstack_free (&tokendefs, NULL);
}
-#if 0
- if (!no_parser_flag)
- output_token_defines (&table_obstack);
-#endif
-
if (defines_flag)
{
output_token_defines (&defines_obstack);
if (!pure_parser)
- {
- if (spec_name_prefix)
- obstack_fgrow1 (&defines_obstack, "\nextern YYSTYPE %slval;\n",
- spec_name_prefix);
- else
- obstack_sgrow (&defines_obstack,
- "\nextern YYSTYPE yylval;\n");
- }
-
+ obstack_fgrow1 (&defines_obstack, "\nextern YYSTYPE %slval;\n",
+ spec_name_prefix);
if (semantic_parser)
{
int i;
rule_table[ruleno].lhs = p->sym->value;
rule_table[ruleno].rhs = itemno;
rule_table[ruleno].line = p->line;
+ rule_table[ruleno].useful = TRUE;
p = p->next;
while (p && p->sym)
}
ritem[itemno] = 0;
+
+ if (trace_flag)
+ ritem_print (stderr);
}
\f
/*-------------------------------------------------------------------.
/* Assign the symbols their symbol numbers. Write #defines for the
token symbols into FDEFINES if requested. */
packsymbols ();
- symbols_output ();
/* Convert the grammar into the format described in gram.h. */
packgram ();
/* Output the headers. */