summaryrefslogtreecommitdiff
path: root/gen.c
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1996-10-11 15:33:03 +0000
committerVern Paxson <vern@ee.lbl.gov>1996-10-11 15:33:03 +0000
commit058410f4bb21ca0f91b78aabbf586d793c0a668f (patch)
tree1b1f454ba26e4bbd09cab79cfec742c4668cf775 /gen.c
parent8fa5e7529d7e74b375434630e34f3ef3817df470 (diff)
bug fix for yymore()/yylineno interaction
Diffstat (limited to 'gen.c')
-rw-r--r--gen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gen.c b/gen.c
index a56a449..e3bb628 100644
--- a/gen.c
+++ b/gen.c
@@ -1418,7 +1418,10 @@ void make_tables()
indent_up();
indent_puts( "{" );
indent_puts( "int yyl;" );
- indent_puts( "for ( yyl = 0; yyl < yyleng; ++yyl )" );
+ do_indent();
+ out_str( "for ( yyl = %s; yyl < yyleng; ++yyl )\n",
+ yymore_used ? (yytext_is_array ? "yy_prev_more_offset" :
+ "yy_more_len") : "0");
indent_up();
indent_puts( "if ( yytext[yyl] == '\\n' )" );
indent_up();