summaryrefslogtreecommitdiff
path: root/flex.skl
diff options
context:
space:
mode:
authorvern <vern>1995-03-20 14:02:24 +0000
committervern <vern>1995-03-20 14:02:24 +0000
commit78f633b5f4ed89d0f52f3464331ec1a9415d1fe2 (patch)
tree4dd7ae4efa0bb1a879783983894fba3c4e091155 /flex.skl
parent086ca470e292791a3e392414f902286c1baa15ec (diff)
downloadflex-78f633b5f4ed89d0f52f3464331ec1a9415d1fe2.tar.gz
%option yylineno support
Diffstat (limited to 'flex.skl')
-rw-r--r--flex.skl7
1 files changed, 4 insertions, 3 deletions
diff --git a/flex.skl b/flex.skl
index c7010f3..a389366 100644
--- a/flex.skl
+++ b/flex.skl
@@ -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;