summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/otps
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-28 12:31:56 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-28 12:31:56 +0000
commit137b56a5c65d26eec13dede7b8f398611aaa008d (patch)
tree7ff549e19f9fb5010d5aff8d4d37f50c377643b1 /Build/source/texk/web2c/otps
parent203d0153798d0cc9813c1672e75c0e0395a1c3b9 (diff)
flex 2.5.39
git-svn-id: svn://tug.org/texlive/trunk@33311 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/otps')
-rw-r--r--Build/source/texk/web2c/otps/otp-lexer.c221
1 files changed, 106 insertions, 115 deletions
diff --git a/Build/source/texk/web2c/otps/otp-lexer.c b/Build/source/texk/web2c/otps/otp-lexer.c
index 2e2f916ca61..ae6c286a186 100644
--- a/Build/source/texk/web2c/otps/otp-lexer.c
+++ b/Build/source/texk/web2c/otps/otp-lexer.c
@@ -14,7 +14,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 37
+#define YY_FLEX_SUBMINOR_VERSION 39
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -186,6 +186,13 @@ extern FILE *yyin, *yyout;
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
+ #define YY_LINENO_REWIND_TO(dst) \
+ do {\
+ const char *p;\
+ for ( p = yy_cp-1; p >= (dst); --p)\
+ if ( *p == '\n' )\
+ --yylineno;\
+ }while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
@@ -377,12 +384,9 @@ static void yy_fatal_error (yyconst char msg[] );
yyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
- if ( yyleng + (yy_more_offset) >= YYLMAX ) \
+ if ( yyleng >= YYLMAX ) \
YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
- yy_flex_strncpy( &yytext[(yy_more_offset)], (yytext_ptr), yyleng + 1 ); \
- yyleng += (yy_more_offset); \
- (yy_prev_more_offset) = (yy_more_offset); \
- (yy_more_offset) = 0; \
+ yy_flex_strncpy( yytext, (yytext_ptr), yyleng + 1 ); \
(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 25
@@ -394,38 +398,20 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_acclist[130] =
+static yyconst flex_int16_t yy_accept[102] =
{ 0,
- 26, 24, 25, 1, 24, 25, 3, 25, 3, 24,
- 25, 24, 25, 24, 25, 6, 24, 25, 24, 25,
- 24, 25, 24, 25, 8, 24, 25, 24, 25, 8,
- 24, 25, 8, 24, 25, 8, 24, 25, 8, 24,
- 25, 8, 24, 25, 8, 24, 25, 8, 24, 25,
- 8, 24, 25, 8, 24, 25, 8, 24, 25, 3,
- 9, 2, 6, 11, 10, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 4, 5,
- 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 22, 20, 23, 8, 8, 21,
-
- 8, 19, 8, 8, 8, 8, 8, 8, 8, 18,
- 8, 8, 8, 8, 12, 8, 8, 8, 8, 8,
- 13, 15, 16, 14, 8, 8, 8, 8, 17
- } ;
-
-static yyconst flex_int16_t yy_accept[103] =
- { 0,
- 1, 1, 1, 2, 4, 7, 9, 12, 14, 16,
- 19, 21, 23, 25, 28, 30, 33, 36, 39, 42,
- 45, 48, 51, 54, 57, 60, 61, 61, 62, 62,
- 63, 64, 65, 66, 66, 66, 67, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
- 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
- 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
-
- 130, 130
+ 0, 0, 26, 24, 1, 3, 3, 24, 24, 6,
+ 24, 24, 24, 8, 24, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 3, 0, 9, 0, 2,
+ 6, 11, 10, 0, 0, 8, 0, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 4,
+ 5, 7, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 22, 20, 23, 8, 8,
+ 21, 8, 19, 8, 8, 8, 8, 8, 8, 8,
+ 18, 8, 8, 8, 8, 12, 8, 8, 8, 8,
+ 8, 13, 15, 16, 14, 8, 8, 8, 8, 17,
+
+ 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -550,30 +536,19 @@ static yyconst flex_int32_t yy_rule_can_match_eol[26] =
0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, };
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
extern int yy_flex_debug;
int yy_flex_debug = 0;
-static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
-static char *yy_full_match;
-static int yy_lp;
-#define REJECT \
-{ \
-*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
-yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
-++(yy_lp); \
-goto find_rule; \
-}
-
-static int yy_more_offset = 0;
-static int yy_prev_more_offset = 0;
-#define yymore() ((yy_more_offset) = yy_flex_strlen( yytext ))
-#define YY_NEED_STRLEN
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET \
- { \
- (yy_more_offset) = (yy_prev_more_offset); \
- yyleng -= (yy_more_offset); \
- }
+#define YY_RESTORE_YY_MORE_OFFSET
#ifndef YYLMAX
#define YYLMAX 8192
#endif
@@ -611,7 +586,7 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#define OTP_MAXCODE 0xFFFF
int line_number = 1;
extern YYSTYPE yylval;
-#line 615 "otp-lexer.c"
+#line 590 "otp-lexer.c"
#define INITIAL 0
@@ -793,10 +768,6 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 48 "otp-lexer.l"
-
-#line 799 "otp-lexer.c"
-
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -805,12 +776,6 @@ YY_DECL
YY_USER_INIT;
#endif
- /* Create the reject buffer large enough to save one state per allowed character. */
- if ( ! (yy_state_buf) )
- (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
- if ( ! (yy_state_buf) )
- YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
-
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
@@ -829,6 +794,11 @@ YY_DECL
yy_load_buffer_state( );
}
+ {
+#line 48 "otp-lexer.l"
+
+#line 801 "otp-lexer.c"
+
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
@@ -842,14 +812,15 @@ YY_DECL
yy_bp = yy_cp;
yy_current_state = (yy_start);
-
- (yy_state_ptr) = (yy_state_buf);
- *(yy_state_ptr)++ = yy_current_state;
-
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
@@ -857,36 +828,21 @@ yy_match:
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- *(yy_state_ptr)++ = yy_current_state;
++yy_cp;
}
while ( yy_current_state != 101 );
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
yy_find_action:
- yy_current_state = *--(yy_state_ptr);
- (yy_lp) = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
- for ( ; ; ) /* until we find what rule we matched */
- {
- if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
- {
- yy_act = yy_acclist[(yy_lp)];
- {
- (yy_full_match) = yy_cp;
- break;
- }
- }
- --yy_cp;
- yy_current_state = *--(yy_state_ptr);
- (yy_lp) = yy_accept[yy_current_state];
- }
+ yy_act = yy_accept[yy_current_state];
YY_DO_BEFORE_ACTION;
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- int yyl;
- for ( yyl = (yy_prev_more_offset); yyl < yyleng; ++yyl )
+ yy_size_t yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
yylineno++;
@@ -897,6 +853,13 @@ do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
+ case 0: /* must back up */
+ /* undo the effects of YY_DO_BEFORE_ACTION */
+ *yy_cp = (yy_hold_char);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+
case 1:
YY_RULE_SETUP
#line 49 "otp-lexer.l"
@@ -1088,9 +1051,9 @@ YY_RULE_SETUP
#line 137 "otp-lexer.l"
ECHO;
YY_BREAK
-#line 1092 "otp-lexer.c"
- case YY_STATE_EOF(INITIAL):
- yyterminate();
+#line 1055 "otp-lexer.c"
+case YY_STATE_EOF(INITIAL):
+ yyterminate();
case YY_END_OF_BUFFER:
{
@@ -1155,7 +1118,8 @@ ECHO;
else
{
- yy_cp = (yy_c_buf_p);
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
goto yy_find_action;
}
}
@@ -1219,6 +1183,7 @@ ECHO;
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
+ } /* end of user's declarations */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
@@ -1280,8 +1245,37 @@ static int yy_get_next_buffer (void)
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ yy_size_t new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
}
@@ -1340,12 +1334,14 @@ static int yy_get_next_buffer (void)
yy_current_state = (yy_start);
- (yy_state_ptr) = (yy_state_buf);
- *(yy_state_ptr)++ = yy_current_state;
-
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
@@ -1353,7 +1349,6 @@ static int yy_get_next_buffer (void)
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- *(yy_state_ptr)++ = yy_current_state;
}
return yy_current_state;
@@ -1367,8 +1362,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
register int yy_is_jam;
-
+ register char *yy_cp = (yy_c_buf_p);
+
register YY_CHAR yy_c = 1;
+ if ( yy_accept[yy_current_state] )
+ {
+ (yy_last_accepting_state) = yy_current_state;
+ (yy_last_accepting_cpos) = yy_cp;
+ }
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
@@ -1377,8 +1378,6 @@ static int yy_get_next_buffer (void)
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 101);
- if ( ! yy_is_jam )
- *(yy_state_ptr)++ = yy_current_state;
return yy_is_jam ? 0 : yy_current_state;
}
@@ -1827,7 +1826,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- int i;
+ yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -1975,11 +1974,6 @@ static int yy_init_globals (void)
(yy_init) = 0;
(yy_start) = 0;
- (yy_state_buf) = 0;
- (yy_state_ptr) = 0;
- (yy_full_match) = 0;
- (yy_lp) = 0;
-
/* Defined in main.c */
#ifdef YY_STDINIT
yyin = stdin;
@@ -2010,9 +2004,6 @@ int yylex_destroy (void)
yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
- yyfree ( (yy_state_buf) );
- (yy_state_buf) = NULL;
-
/* Reset the globals. This is important in a non-reentrant scanner so the next time
* yylex() is called, initialization will occur. */
yy_init_globals( );