summaryrefslogtreecommitdiff
path: root/gen.c
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1993-11-29 17:13:35 +0000
committerVern Paxson <vern@ee.lbl.gov>1993-11-29 17:13:35 +0000
commitcde528826f68fd9019a23b0fd0d5a9a3737e2707 (patch)
treef43864488347322e896a9f80799570e3bd83e200 /gen.c
parent18a7d069a1aef814f454c6343e231ac847854d99 (diff)
Fixed YYLMAX headaches
Diffstat (limited to 'gen.c')
-rw-r--r--gen.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gen.c b/gen.c
index 5d527e0..b9e36ca 100644
--- a/gen.c
+++ b/gen.c
@@ -1221,6 +1221,21 @@ void make_tables()
indent_puts( "#define YY_MORE_ADJ 0" );
}
+ if ( ! C_plus_plus )
+ {
+ if ( yytext_is_array )
+ {
+ puts( "#ifndef YYLMAX" );
+ puts( "#define YYLMAX 8192" );
+ puts( "#endif\n" );
+ puts( "char yytext[YYLMAX];" );
+ puts( "char *yytext_ptr;" );
+ }
+
+ else
+ puts( "char *yytext;" );
+ }
+
fputs( &action_array[defs1_offset], stdout );
skelout();