summaryrefslogtreecommitdiff
path: root/flex.skl
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1995-03-20 14:02:24 +0000
committerVern Paxson <vern@ee.lbl.gov>1995-03-20 14:02:24 +0000
commite3c29e6b014f6b1435bc73d18a85fb6c2a2e9f66 (patch)
tree0d1fdeeff66a201217f63e699b16a190f0668c53 /flex.skl
parent7952505cbf29015e04a67ce0202f5da83d6f9cb3 (diff)
%option yylineno support
Diffstat (limited to 'flex.skl')
-rw-r--r--flex.skl5
1 files changed, 3 insertions, 2 deletions
diff --git a/flex.skl b/flex.skl
index 3293100..66059e9 100644
--- a/flex.skl
+++ b/flex.skl
@@ -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;