summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1993-12-09 13:58:40 +0000
committerVern Paxson <vern@ee.lbl.gov>1993-12-09 13:58:40 +0000
commitefb1cf6aa4c2cfa507fd90df763092598a761f24 (patch)
tree4f021d0ba525a876a86129504490b9ef4100abe9 /main.c
parente89ab843296311d34122769645394f04feb7f36c (diff)
Detect REJECT etc. before generating YY_USES_REJECT!
Diffstat (limited to 'main.c')
-rw-r--r--main.c116
1 files changed, 58 insertions, 58 deletions
diff --git a/main.c b/main.c
index dd6d8cc..ea19c19 100644
--- a/main.c
+++ b/main.c
@@ -119,64 +119,6 @@ char **argv;
readin();
- if ( syntaxerror )
- flexend( 1 );
-
- if ( yymore_really_used == REALLY_USED )
- yymore_used = true;
- else if ( yymore_really_used == REALLY_NOT_USED )
- yymore_used = false;
-
- if ( reject_really_used == REALLY_USED )
- reject = true;
- else if ( reject_really_used == REALLY_NOT_USED )
- reject = false;
-
- if ( performance_report > 0 )
- {
- if ( lex_compat )
- {
- fprintf( stderr,
-"-l AT&T lex compatibility option entails a large performance penalty\n" );
- fprintf( stderr,
-" and may be the actual source of other reported performance penalties\n" );
- }
-
- if ( performance_report > 1 )
- {
- if ( interactive )
- fprintf( stderr,
- "-I (interactive) entails a minor performance penalty\n" );
-
- if ( yymore_used )
- fprintf( stderr,
- "yymore() entails a minor performance penalty\n" );
- }
-
- if ( reject )
- fprintf( stderr,
- "REJECT entails a large performance penalty\n" );
-
- if ( variable_trailing_context_rules )
- fprintf( stderr,
-"Variable trailing context rules entail a large performance penalty\n" );
- }
-
- if ( reject )
- real_reject = true;
-
- if ( variable_trailing_context_rules )
- reject = true;
-
- if ( (fulltbl || fullspd) && reject )
- {
- if ( real_reject )
- flexerror( "REJECT cannot be used with -f or -F" );
- else
- flexerror(
- "variable trailing context rules cannot be used with -f or -F" );
- }
-
ntod();
for ( i = 1; i <= num_rules; ++i )
@@ -817,6 +759,64 @@ void readin()
flexend( 1 );
}
+ if ( syntaxerror )
+ flexend( 1 );
+
+ if ( yymore_really_used == REALLY_USED )
+ yymore_used = true;
+ else if ( yymore_really_used == REALLY_NOT_USED )
+ yymore_used = false;
+
+ if ( reject_really_used == REALLY_USED )
+ reject = true;
+ else if ( reject_really_used == REALLY_NOT_USED )
+ reject = false;
+
+ if ( performance_report > 0 )
+ {
+ if ( lex_compat )
+ {
+ fprintf( stderr,
+"-l AT&T lex compatibility option entails a large performance penalty\n" );
+ fprintf( stderr,
+" and may be the actual source of other reported performance penalties\n" );
+ }
+
+ if ( performance_report > 1 )
+ {
+ if ( interactive )
+ fprintf( stderr,
+ "-I (interactive) entails a minor performance penalty\n" );
+
+ if ( yymore_used )
+ fprintf( stderr,
+ "yymore() entails a minor performance penalty\n" );
+ }
+
+ if ( reject )
+ fprintf( stderr,
+ "REJECT entails a large performance penalty\n" );
+
+ if ( variable_trailing_context_rules )
+ fprintf( stderr,
+"Variable trailing context rules entail a large performance penalty\n" );
+ }
+
+ if ( reject )
+ real_reject = true;
+
+ if ( variable_trailing_context_rules )
+ reject = true;
+
+ if ( (fulltbl || fullspd) && reject )
+ {
+ if ( real_reject )
+ flexerror( "REJECT cannot be used with -f or -F" );
+ else
+ flexerror(
+ "variable trailing context rules cannot be used with -f or -F" );
+ }
+
if ( csize == 256 )
puts( "typedef unsigned char YY_CHAR;" );
else