diff options
author | vern <vern> | 1995-03-20 14:02:24 +0000 |
---|---|---|
committer | vern <vern> | 1995-03-20 14:02:24 +0000 |
commit | 78f633b5f4ed89d0f52f3464331ec1a9415d1fe2 (patch) | |
tree | 4dd7ae4efa0bb1a879783983894fba3c4e091155 /flex.skl | |
parent | 086ca470e292791a3e392414f902286c1baa15ec (diff) | |
download | flex-78f633b5f4ed89d0f52f3464331ec1a9415d1fe2.tar.gz |
%option yylineno support
Diffstat (limited to 'flex.skl')
-rw-r--r-- | flex.skl | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,7 +1,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvsroot/flex/flex/flex.skl,v 2.80 1995/03/05 21:35:23 vern Exp $ + * $Header: /cvsroot/flex/flex/flex.skl,v 2.81 1995/03/20 14:02:24 vern Exp $ */ #define FLEX_SCANNER @@ -499,7 +499,7 @@ yy_find_action: YY_DO_BEFORE_ACTION; -%% code for yylineno update (if -l) goes here +%% code for yylineno update goes here do_action: /* This label is used only to access EOF actions. */ @@ -646,6 +646,7 @@ yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout ) yy_init = 1; yy_start = 0; yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno yy_did_buffer_switch_on_eof = 0; @@ -944,7 +945,7 @@ void yyFlexLexer::yyunput( int c, register char* yy_bp ) *--yy_cp = (char) c; -%% update yylineno here, if doing -l +%% update yylineno here yytext_ptr = yy_bp; yy_hold_char = *yy_cp; |