* data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.

Adding #line.
Remove the duplicate `typedefs'.
(RhsNumberType): Fix the declaration and various other typos.
Use __ofile__.
* data/bison.simple: Use __ofile__.
* src/scan-skel.l: Handle __ofile__.
This commit is contained in:
Akim Demaille
2002-04-08 12:31:15 +00:00
parent 62a3e4f0c5
commit 06446ccf94
4 changed files with 27 additions and 9 deletions

View File

@@ -26,16 +26,20 @@
#include "files.h"
int skel_lex PARAMS ((void));
static int yylineno = 1;
static char *yyoutname = NULL;
%}
%%
/* This is an approximation, but we don't need more. */
^"#output \""[^\"]+\"\n {
yytext[yyleng - 2] = '\0';
skel_out = xfopen (yytext + strlen ("#output \""), "w");
XFREE (yyoutname);
yyoutname = xstrdup (yytext + strlen ("#output \""));
yyout = xfopen (yyoutname, "w");
yylineno = 1;
}
"__oline__" fprintf (yyout, "%d", yylineno);
"__ofile__" fprintf (yyout, "%s", yyoutname);
[^_\n]+ ECHO;
\n+ yylineno += yyleng; ECHO;
. ECHO;