summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/otps
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-19 23:24:32 +0000
committerKarl Berry <karl@freefriends.org>2016-04-19 23:24:32 +0000
commit70873fbc1b23e1fa77240c892895d4eed21e2e34 (patch)
tree6b9362eafe3598cd12c4df729a6d83ffee4f678f /Build/source/texk/web2c/otps
parentadbe3eb411d50490f1c17e55c82e29d63a1ecfe5 (diff)
flex 2.6.0
git-svn-id: svn://tug.org/texlive/trunk@40623 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/otps')
-rw-r--r--Build/source/texk/web2c/otps/otp-lexer.c190
1 files changed, 108 insertions, 82 deletions
diff --git a/Build/source/texk/web2c/otps/otp-lexer.c b/Build/source/texk/web2c/otps/otp-lexer.c
index ae6c286a186..4f838a68a00 100644
--- a/Build/source/texk/web2c/otps/otp-lexer.c
+++ b/Build/source/texk/web2c/otps/otp-lexer.c
@@ -1,11 +1,11 @@
-#line 29 "otp-lexer.l"
+#line 29 "../../../../texk/web2c/otps/otp-lexer.l"
#include "routines.h"
#include "yystype.h"
#include "otp-parser.h"
-#line 9 "otp-lexer.c"
+#line 9 "../../../../texk/web2c/otps/otp-lexer.c"
#define YY_INT_ALIGNED short int
@@ -13,8 +13,8 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 39
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 0
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -147,7 +147,15 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -374,6 +382,9 @@ extern char yytext[];
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
+#if defined(__GNUC__) && __GNUC__ >= 3
+__attribute__((__noreturn__))
+#endif
static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
@@ -414,7 +425,7 @@ static yyconst flex_int16_t yy_accept[102] =
0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
@@ -446,7 +457,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[39] =
+static yyconst YY_CHAR yy_meta[39] =
{ 0,
1, 1, 1, 1, 2, 2, 2, 2, 2, 3,
3, 2, 2, 2, 2, 2, 3, 4, 4, 2,
@@ -454,7 +465,7 @@ static yyconst flex_int32_t yy_meta[39] =
4, 4, 4, 4, 4, 4, 4, 4
} ;
-static yyconst flex_int16_t yy_base[107] =
+static yyconst flex_uint16_t yy_base[107] =
{ 0,
0, 0, 130, 131, 131, 131, 126, 121, 124, 29,
112, 110, 34, 0, 0, 96, 99, 95, 12, 91,
@@ -486,7 +497,7 @@ static yyconst flex_int16_t yy_def[107] =
0, 101, 101, 101, 101, 101
} ;
-static yyconst flex_int16_t yy_nxt[170] =
+static yyconst flex_uint16_t yy_nxt[170] =
{ 0,
4, 5, 6, 7, 5, 4, 8, 9, 4, 10,
10, 4, 11, 12, 4, 13, 14, 14, 4, 15,
@@ -555,7 +566,7 @@ int yy_flex_debug = 0;
char yytext[YYLMAX];
char *yytext_ptr;
-#line 1 "otp-lexer.l"
+#line 1 "../../../../texk/web2c/otps/otp-lexer.l"
/* otp-lexer.l: Lexical analysis for OTP files
This file is part of Omega,
@@ -581,12 +592,12 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
*/
-#line 35 "otp-lexer.l"
+#line 35 "../../../../texk/web2c/otps/otp-lexer.l"
#define YY_NO_UNPUT
#define OTP_MAXCODE 0xFFFF
int line_number = 1;
extern YYSTYPE yylval;
-#line 590 "otp-lexer.c"
+#line 601 "../../../../texk/web2c/otps/otp-lexer.c"
#define INITIAL 0
@@ -619,11 +630,11 @@ void yyset_extra (YY_EXTRA_TYPE user_defined );
FILE *yyget_in (void );
-void yyset_in (FILE * in_str );
+void yyset_in (FILE * _in_str );
FILE *yyget_out (void );
-void yyset_out (FILE * out_str );
+void yyset_out (FILE * _out_str );
yy_size_t yyget_leng (void );
@@ -631,7 +642,7 @@ char *yyget_text (void );
int yyget_lineno (void );
-void yyset_lineno (int line_number );
+void yyset_lineno (int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -645,8 +656,12 @@ extern int yywrap (void );
#endif
#endif
+#ifndef YY_NO_UNPUT
+
static void yyunput (int c,char *buf_ptr );
+#endif
+
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
@@ -667,7 +682,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -754,7 +774,7 @@ extern int yylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -764,9 +784,9 @@ extern int yylex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
if ( !(yy_init) )
{
@@ -795,11 +815,11 @@ YY_DECL
}
{
-#line 48 "otp-lexer.l"
+#line 48 "../../../../texk/web2c/otps/otp-lexer.l"
-#line 801 "otp-lexer.c"
+#line 821 "../../../../texk/web2c/otps/otp-lexer.c"
- while ( 1 ) /* loops until end-of-file is reached */
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
@@ -815,7 +835,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ 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;
@@ -862,24 +882,24 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 49 "otp-lexer.l"
+#line 49 "../../../../texk/web2c/otps/otp-lexer.l"
{}
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 50 "otp-lexer.l"
+#line 50 "../../../../texk/web2c/otps/otp-lexer.l"
{ line_number++;}
YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
-#line 51 "otp-lexer.l"
+#line 51 "../../../../texk/web2c/otps/otp-lexer.l"
{ line_number++;}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 52 "otp-lexer.l"
+#line 52 "../../../../texk/web2c/otps/otp-lexer.l"
{
int i, j;
yylval.yint=0;
@@ -903,7 +923,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 72 "otp-lexer.l"
+#line 72 "../../../../texk/web2c/otps/otp-lexer.l"
{
int i, j;
yylval.yint=0;
@@ -921,7 +941,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 86 "otp-lexer.l"
+#line 86 "../../../../texk/web2c/otps/otp-lexer.l"
{
int i, j;
yylval.yint=0;
@@ -939,7 +959,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 100 "otp-lexer.l"
+#line 100 "../../../../texk/web2c/otps/otp-lexer.l"
{
yylval.yint=yytext[1];
return(NUMBER);
@@ -947,13 +967,13 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 104 "otp-lexer.l"
+#line 104 "../../../../texk/web2c/otps/otp-lexer.l"
{ yylval.ystring=xstrdup(yytext); return(ID); }
YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 105 "otp-lexer.l"
+#line 105 "../../../../texk/web2c/otps/otp-lexer.l"
{
int i, j, last;
char *newtext;
@@ -973,85 +993,85 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 121 "otp-lexer.l"
+#line 121 "../../../../texk/web2c/otps/otp-lexer.l"
return(RIGHTARROW);
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 122 "otp-lexer.l"
+#line 122 "../../../../texk/web2c/otps/otp-lexer.l"
return(LEFTARROW);
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 123 "otp-lexer.l"
+#line 123 "../../../../texk/web2c/otps/otp-lexer.l"
return(INPUT);
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 124 "otp-lexer.l"
+#line 124 "../../../../texk/web2c/otps/otp-lexer.l"
return(OUTPUT);
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 125 "otp-lexer.l"
+#line 125 "../../../../texk/web2c/otps/otp-lexer.l"
return(ALIASES);
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 126 "otp-lexer.l"
+#line 126 "../../../../texk/web2c/otps/otp-lexer.l"
return(STATES);
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 127 "otp-lexer.l"
+#line 127 "../../../../texk/web2c/otps/otp-lexer.l"
return(TABLES);
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 128 "otp-lexer.l"
+#line 128 "../../../../texk/web2c/otps/otp-lexer.l"
return(EXPRESSIONS);
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 129 "otp-lexer.l"
+#line 129 "../../../../texk/web2c/otps/otp-lexer.l"
return(PUSH);
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 130 "otp-lexer.l"
+#line 130 "../../../../texk/web2c/otps/otp-lexer.l"
return(POP);
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 131 "otp-lexer.l"
+#line 131 "../../../../texk/web2c/otps/otp-lexer.l"
return(DIV);
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 132 "otp-lexer.l"
+#line 132 "../../../../texk/web2c/otps/otp-lexer.l"
return(MOD);
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 133 "otp-lexer.l"
+#line 133 "../../../../texk/web2c/otps/otp-lexer.l"
return(BEG);
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 134 "otp-lexer.l"
+#line 134 "../../../../texk/web2c/otps/otp-lexer.l"
return(END);
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 135 "otp-lexer.l"
+#line 135 "../../../../texk/web2c/otps/otp-lexer.l"
return(yytext[0]);
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 137 "otp-lexer.l"
+#line 137 "../../../../texk/web2c/otps/otp-lexer.l"
ECHO;
YY_BREAK
-#line 1055 "otp-lexer.c"
+#line 1075 "../../../../texk/web2c/otps/otp-lexer.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1195,9 +1215,9 @@ case YY_STATE_EOF(INITIAL):
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ yy_size_t number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -1226,7 +1246,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1329,14 +1349,14 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
yy_current_state = (yy_start);
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);
+ 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;
@@ -1361,10 +1381,10 @@ 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);
+ int yy_is_jam;
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1382,9 +1402,11 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp )
+#ifndef YY_NO_UNPUT
+
+ static void yyunput (int c, char * yy_bp )
{
- register char *yy_cp;
+ char *yy_cp;
yy_cp = (yy_c_buf_p);
@@ -1394,10 +1416,10 @@ static int yy_get_next_buffer (void)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ yy_size_t number_to_move = (yy_n_chars) + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1423,6 +1445,8 @@ static int yy_get_next_buffer (void)
(yy_c_buf_p) = yy_cp;
}
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -1577,7 +1601,7 @@ static void yy_load_buffer_state (void)
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
- b->yy_buf_size = size;
+ b->yy_buf_size = (yy_size_t)size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
@@ -1732,7 +1756,7 @@ static void yyensure_buffer_stack (void)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
+ num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
@@ -1749,7 +1773,7 @@ static void yyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
@@ -1857,7 +1881,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
static void yy_fatal_error (yyconst char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -1923,29 +1947,29 @@ char *yyget_text (void)
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
*
*/
-void yyset_lineno (int line_number )
+void yyset_lineno (int _line_number )
{
- yylineno = line_number;
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
*
* @see yy_switch_to_buffer
*/
-void yyset_in (FILE * in_str )
+void yyset_in (FILE * _in_str )
{
- yyin = in_str ;
+ yyin = _in_str ;
}
-void yyset_out (FILE * out_str )
+void yyset_out (FILE * _out_str )
{
- yyout = out_str ;
+ yyout = _out_str ;
}
int yyget_debug (void)
@@ -1953,9 +1977,9 @@ int yyget_debug (void)
return yy_flex_debug;
}
-void yyset_debug (int bdebug )
+void yyset_debug (int _bdebug )
{
- yy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
static int yy_init_globals (void)
@@ -2018,7 +2042,8 @@ int yylex_destroy (void)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
- register int i;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@@ -2027,7 +2052,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -2037,11 +2062,12 @@ static int yy_flex_strlen (yyconst char * s )
void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return (void *) malloc( size );
}
void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -2054,12 +2080,12 @@ void *yyrealloc (void * ptr, yy_size_t size )
void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 137 "otp-lexer.l"
+#line 137 "../../../../texk/web2c/otps/otp-lexer.l"