/[bison]/bison/src/scan-skel.l
ViewVC logotype

Diff of /bison/src/scan-skel.l

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by akim, Tue Feb 5 10:08:59 2002 UTC revision 1.8 by akim, Mon Apr 8 12:31:15 2002 UTC
# Line 26  Line 26 
26  #include "files.h"  #include "files.h"
27  int skel_lex PARAMS ((void));  int skel_lex PARAMS ((void));
28  static int yylineno = 1;  static int yylineno = 1;
29    static char *yyoutname = NULL;
30  %}  %}
31  %%  %%
32    /* This is an approximation, but we don't need more. */    /* This is an approximation, but we don't need more. */
33  ^"#output \""[^\"]+\"\n        {  ^"#output \""[^\"]+\"\n        {
34       yytext[yyleng - 2] = '\0';       yytext[yyleng - 2] = '\0';
35       skel_out = xfopen (yytext + strlen ("#output \""), "w");       XFREE (yyoutname);
36         yyoutname = xstrdup (yytext + strlen ("#output \""));
37         yyout = xfopen (yyoutname, "w");
38       yylineno = 1;       yylineno = 1;
39     }     }
40    
41  "__oline__"      fprintf (yyout, "%d", yylineno);  "__oline__"      fprintf (yyout, "%d", yylineno);
42    "__ofile__"      fprintf (yyout, "%s", yyoutname);
43  [^_\n]+          ECHO;  [^_\n]+          ECHO;
44  \n+              yylineno += yyleng; ECHO;  \n+              yylineno += yyleng; ECHO;
45  .                ECHO;  .                ECHO;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26