#include "univ.i"#include <stdio.h>#include "pars0pars.h"#include "pars0grm.h"#include "pars0sym.h"#include "mem0mem.h"#include "os0proc.h"Include dependency graph for lexyy.c:

Classes | |
| struct | yy_buffer_state |
Defines | |
| #define | FLEX_SCANNER |
| #define | YY_FLEX_MAJOR_VERSION 2 |
| #define | YY_FLEX_MINOR_VERSION 5 |
| #define | yyconst |
| #define | YY_PROTO(proto) () |
| #define | YY_NULL 0 |
| #define | YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
| #define | BEGIN yy_start = 1 + 2 * |
| #define | YY_START ((yy_start - 1) / 2) |
| #define | YYSTATE YY_START |
| #define | YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
| #define | YY_NEW_FILE yyrestart( yyin ) |
| #define | YY_END_OF_BUFFER_CHAR 0 |
| #define | YY_BUF_SIZE 16384 |
| #define | EOB_ACT_CONTINUE_SCAN 0 |
| #define | EOB_ACT_END_OF_FILE 1 |
| #define | EOB_ACT_LAST_MATCH 2 |
| #define | yyless(n) |
| #define | unput(c) yyunput( c, yytext_ptr ) |
| #define | YY_BUFFER_NEW 0 |
| #define | YY_BUFFER_NORMAL 1 |
| #define | YY_BUFFER_EOF_PENDING 2 |
| #define | YY_CURRENT_BUFFER yy_current_buffer |
| #define | YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) |
| #define | yy_new_buffer yy_create_buffer |
| #define | yy_set_interactive(is_interactive) |
| #define | yy_set_bol(at_bol) |
| #define | YY_AT_BOL() (yy_current_buffer->yy_at_bol) |
| #define | yywrap() 1 |
| #define | YY_SKIP_YYWRAP |
| #define | yytext_ptr yytext |
| #define | YY_DO_BEFORE_ACTION |
| #define | YY_NUM_RULES 107 |
| #define | YY_END_OF_BUFFER 108 |
| #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 |
| #define | INITIAL 0 |
| #define | YY_NEVER_INTERACTIVE 1 |
| #define | YY_NO_INPUT 1 |
| #define | YY_NO_UNPUT 1 |
| #define | YY_NO_SCAN_BUFFER 1 |
| #define | YY_NO_SCAN_BYTES 1 |
| #define | YY_NO_SCAN_STRING 1 |
| #define | YYSTYPE que_node_t* |
| #define | malloc(A) ut_malloc(A) |
| #define | free(A) ut_free(A) |
| #define | realloc(P, A) ut_realloc(P, A) |
| #define | exit(A) ut_error |
| #define | YY_INPUT(buf, result, max_size) pars_get_lex_chars(buf, &result, max_size) |
| #define | comment 1 |
| #define | quoted 2 |
| #define | YY_NO_PUSH_STATE 1 |
| #define | YY_NO_POP_STATE 1 |
| #define | YY_NO_TOP_STATE 1 |
| #define | YY_READ_BUF_SIZE 8192 |
| #define | ECHO (void) fwrite( yytext, yyleng, 1, yyout ) |
| #define | yyterminate() return YY_NULL |
| #define | YY_START_STACK_INCR 25 |
| #define | YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
| #define | YY_DECL int yylex YY_PROTO(( void )) |
| #define | YY_BREAK break; |
| #define | YY_RULE_SETUP YY_USER_ACTION |
| #define | YY_EXIT_FAILURE 2 |
| #define | yyless(n) |
Typedefs | |
| typedef yy_buffer_state * | YY_BUFFER_STATE |
| typedef unsigned int | yy_size_t |
| typedef unsigned char | YY_CHAR |
| typedef int | yy_state_type |
Functions | |
| void | yyrestart () |
| void | yy_switch_to_buffer () |
| void | yy_load_buffer_state () |
| YY_BUFFER_STATE | yy_create_buffer () |
| void | yy_delete_buffer () |
| void | yy_init_buffer () |
| void | yy_flush_buffer () |
| YY_BUFFER_STATE | yy_scan_buffer () |
| YY_BUFFER_STATE | yy_scan_string () |
| YY_BUFFER_STATE | yy_scan_bytes () |
| void * | yy_flex_alloc () |
| void * | yy_flex_realloc () |
| void | yy_flex_free () |
| yy_state_type | yy_get_previous_state () |
| yy_state_type | yy_try_NUL_trans () |
| int | yy_get_next_buffer () |
| void | yy_fatal_error () |
| void | string_append (const char *str, ulint len) |
| int | yylex () |
| yy_state_type | yy_try_NUL_trans (yy_state_type yy_current_state) |
| int | input () |
| void | yyrestart (FILE *input_file) |
| void | yy_switch_to_buffer (YY_BUFFER_STATE new_buffer) |
| YY_BUFFER_STATE | yy_create_buffer (FILE *file, int size) |
| void | yy_delete_buffer (YY_BUFFER_STATE b) |
| void | yy_init_buffer (YY_BUFFER_STATE b, FILE *file) |
| void | yy_flush_buffer (YY_BUFFER_STATE b) |
| void | yy_fatal_error (msg) |
| void * | yy_flex_alloc (yy_size_t size) |
| void * | yy_flex_realloc (void *ptr, yy_size_t size) |
| void | yy_flex_free (void *ptr) |
Variables | |
| int | yyleng |
| FILE * | yyin = (FILE *) 0 *yyout = (FILE *) 0 |
| FILE * | yyout |
| YY_BUFFER_STATE | yy_current_buffer = 0 |
| char | yy_hold_char |
| int | yy_n_chars |
| char * | yy_c_buf_p = (char *) 0 |
| int | yy_init = 1 |
| int | yy_start = 0 |
| int | yy_did_buffer_switch_on_eof |
| char * | yytext |
| short int | yy_accept [367] |
| int | yy_ec [256] |
| int | yy_meta [49] |
| short int | yy_base [373] |
| short int | yy_def [373] |
| short int | yy_nxt [445] |
| short int | yy_chk [445] |
| yy_state_type | yy_last_accepting_state |
| char * | yy_last_accepting_cpos |
| ulint | stringbuf_len_alloc = 0 |
| ulint | stringbuf_len = 0 |
| char * | stringbuf |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: { \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
|
|
|
Value: { \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: |
|
|
Value: do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
02100 {
02101 int c;
02102
02103 *yy_c_buf_p = yy_hold_char;
02104
02105 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
02106 {
02107 /* yy_c_buf_p now points to the character we want to return.
02108 * If this occurs *before* the EOB characters, then it's a
02109 * valid NUL; if not, then we've hit the end of the buffer.
02110 */
02111 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
02112 /* This was really a NUL. */
02113 *yy_c_buf_p = '\0';
02114
02115 else
02116 { /* need more input */
02117 int offset = yy_c_buf_p - yytext_ptr;
02118 ++yy_c_buf_p;
02119
02120 switch ( yy_get_next_buffer() )
02121 {
02122 case EOB_ACT_LAST_MATCH:
02123 /* This happens because yy_g_n_b()
02124 * sees that we've accumulated a
02125 * token and flags that we need to
02126 * try matching the token before
02127 * proceeding. But for input(),
02128 * there's no matching to consider.
02129 * So convert the EOB_ACT_LAST_MATCH
02130 * to EOB_ACT_END_OF_FILE.
02131 */
02132
02133 /* Reset buffer status. */
02134 yyrestart( yyin );
02135
02136 /* fall through */
02137
02138 case EOB_ACT_END_OF_FILE:
02139 {
02140 if ( yywrap() )
02141 return EOF;
02142
02143 if ( ! yy_did_buffer_switch_on_eof )
02144 YY_NEW_FILE;
02145 #ifdef __cplusplus
02146 return yyinput();
02147 #else
02148 return input();
02149 #endif
02150 }
02151
02152 case EOB_ACT_CONTINUE_SCAN:
02153 yy_c_buf_p = yytext_ptr + offset;
02154 break;
02155 }
02156 }
02157 }
02158
02159 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
02160 *yy_c_buf_p = '\0'; /* preserve yytext */
02161 yy_hold_char = *++yy_c_buf_p;
02162
02163
02164 return c;
02165 }
|
|
||||||||||||
|
00654 : string to be appended */ 00655 ulint len) /* in: length of the string */ 00656 { 00657 if (stringbuf == NULL) { 00658 stringbuf = malloc(1); 00659 stringbuf_len_alloc = 1; 00660 } 00661 00662 if (stringbuf_len + len > stringbuf_len_alloc) { 00663 while (stringbuf_len + len > stringbuf_len_alloc) { 00664 stringbuf_len_alloc <<= 1; 00665 } 00666 stringbuf = realloc(stringbuf, stringbuf_len_alloc); 00667 } 00668 00669 memcpy(stringbuf + stringbuf_len, str, len); 00670 stringbuf_len += len; 00671 }
|
|
||||||||||||
|
02233 {
02234 YY_BUFFER_STATE b;
02235
02236 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
02237 if ( ! b )
02238 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02239
02240 b->yy_buf_size = size;
02241
02242 /* yy_ch_buf has to be 2 characters longer than the size given because
02243 * we need to put in 2 end-of-buffer characters.
02244 */
02245 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
02246 if ( ! b->yy_ch_buf )
02247 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
02248
02249 b->yy_is_our_buffer = 1;
02250
02251 yy_init_buffer( b, file );
02252
02253 return b;
02254 }
|
|
|
|
|
|
02263 {
02264 if ( ! b )
02265 return;
02266
02267 if ( b == yy_current_buffer )
02268 yy_current_buffer = (YY_BUFFER_STATE) 0;
02269
02270 if ( b->yy_is_our_buffer )
02271 yy_flex_free( (void *) b->yy_ch_buf );
02272
02273 yy_flex_free( (void *) b );
02274 }
|
|
|
|
|
|
02496 {
02497 (void) fprintf( stderr, "%s\n", msg );
02498 exit( YY_EXIT_FAILURE );
02499 }
|
|
|
|
|
|
02560 {
02561 return (void *) malloc( size );
02562 }
|
|
|
|
|
|
02588 {
02589 free( ptr );
02590 }
|
|
|
|
|
||||||||||||
|
02571 {
02572 /* The cast to (char *) in the following accommodates both
02573 * implementations that use char* generic pointers, and those
02574 * that use void* generic pointers. It works with the latter
02575 * because both ANSI C and C++ allow castless assignment from
02576 * any pointer type to void*, and deal with argument conversions
02577 * as though doing an assignment.
02578 */
02579 return (void *) realloc( (char *) ptr, size );
02580 }
|
|
|
|
|
|
02317 {
02318 if ( ! b )
02319 return;
02320
02321 b->yy_n_chars = 0;
02322
02323 /* We always need two end-of-buffer characters. The first causes
02324 * a transition to the end-of-buffer state. The second causes
02325 * a jam in that state.
02326 */
02327 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
02328 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
02329
02330 b->yy_buf_pos = &b->yy_ch_buf[0];
02331
02332 b->yy_at_bol = 1;
02333 b->yy_buffer_status = YY_BUFFER_NEW;
02334
02335 if ( b == yy_current_buffer )
02336 yy_load_buffer_state();
02337 }
|
|
|
|
|
|
01856 {
01857 register char *dest = yy_current_buffer->yy_ch_buf;
01858 register char *source = yytext_ptr;
01859 register int number_to_move, i;
01860 int ret_val;
01861
01862 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
01863 YY_FATAL_ERROR(
01864 "fatal flex scanner internal error--end of buffer missed" );
01865
01866 if ( yy_current_buffer->yy_fill_buffer == 0 )
01867 { /* Don't try to fill the buffer, so this is an EOF. */
01868 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
01869 {
01870 /* We matched a single character, the EOB, so
01871 * treat this as a final EOF.
01872 */
01873 return EOB_ACT_END_OF_FILE;
01874 }
01875
01876 else
01877 {
01878 /* We matched some text prior to the EOB, first
01879 * process it.
01880 */
01881 return EOB_ACT_LAST_MATCH;
01882 }
01883 }
01884
01885 /* Try to read more data. */
01886
01887 /* First move last chars to start of buffer. */
01888 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
01889
01890 for ( i = 0; i < number_to_move; ++i )
01891 *(dest++) = *(source++);
01892
01893 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
01894 /* don't do the read, it's not guaranteed to return an EOF,
01895 * just force an EOF
01896 */
01897 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
01898
01899 else
01900 {
01901 int num_to_read =
01902 yy_current_buffer->yy_buf_size - number_to_move - 1;
01903
01904 while ( num_to_read <= 0 )
01905 { /* Not enough room in the buffer - grow it. */
01906 #ifdef YY_USES_REJECT
01907 YY_FATAL_ERROR(
01908 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
01909 #else
01910
01911 /* just a shorter name for the current buffer */
01912 YY_BUFFER_STATE b = yy_current_buffer;
01913
01914 int yy_c_buf_p_offset =
01915 (int) (yy_c_buf_p - b->yy_ch_buf);
01916
01917 if ( b->yy_is_our_buffer )
01918 {
01919 int new_size = b->yy_buf_size * 2;
01920
01921 if ( new_size <= 0 )
01922 b->yy_buf_size += b->yy_buf_size / 8;
01923 else
01924 b->yy_buf_size *= 2;
01925
01926 b->yy_ch_buf = (char *)
01927 /* Include room in for 2 EOB chars. */
01928 yy_flex_realloc( (void *) b->yy_ch_buf,
01929 b->yy_buf_size + 2 );
01930 }
01931 else
01932 /* Can't grow it, we don't own it. */
01933 b->yy_ch_buf = 0;
01934
01935 if ( ! b->yy_ch_buf )
01936 YY_FATAL_ERROR(
01937 "fatal error - scanner input buffer overflow" );
01938
01939 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
01940
01941 num_to_read = yy_current_buffer->yy_buf_size -
01942 number_to_move - 1;
01943 #endif
01944 }
01945
01946 if ( num_to_read > YY_READ_BUF_SIZE )
01947 num_to_read = YY_READ_BUF_SIZE;
01948
01949 /* Read in more data. */
01950 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
01951 yy_n_chars, num_to_read );
01952
01953 yy_current_buffer->yy_n_chars = yy_n_chars;
01954 }
01955
01956 if ( yy_n_chars == 0 )
01957 {
01958 if ( number_to_move == YY_MORE_ADJ )
01959 {
01960 ret_val = EOB_ACT_END_OF_FILE;
01961 yyrestart( yyin );
01962 }
01963
01964 else
01965 {
01966 ret_val = EOB_ACT_LAST_MATCH;
01967 yy_current_buffer->yy_buffer_status =
01968 YY_BUFFER_EOF_PENDING;
01969 }
01970 }
01971
01972 else
01973 ret_val = EOB_ACT_CONTINUE_SCAN;
01974
01975 yy_n_chars += number_to_move;
01976 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
01977 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
01978
01979 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
01980
01981 return ret_val;
01982 }
|
|
|
01988 {
01989 register yy_state_type yy_current_state;
01990 register char *yy_cp;
01991
01992 yy_current_state = yy_start;
01993
01994 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
01995 {
01996 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
01997 if ( yy_accept[yy_current_state] )
01998 {
01999 yy_last_accepting_state = yy_current_state;
02000 yy_last_accepting_cpos = yy_cp;
02001 }
02002 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
02003 {
02004 yy_current_state = (int) yy_def[yy_current_state];
02005 if ( yy_current_state >= 367 )
02006 yy_c = yy_meta[(unsigned int) yy_c];
02007 }
02008 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
02009 }
02010
02011 return yy_current_state;
02012 }
|
|
||||||||||||
|
02292 {
02293 yy_flush_buffer( b );
02294
02295 b->yy_input_file = file;
02296 b->yy_fill_buffer = 1;
02297
02298 #if YY_ALWAYS_INTERACTIVE
02299 b->yy_is_interactive = 1;
02300 #else
02301 #if YY_NEVER_INTERACTIVE
02302 b->yy_is_interactive = 0;
02303 #else
02304 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
02305 #endif
02306 #endif
02307 }
|
|
|
|
|
|
02218 {
02219 yy_n_chars = yy_current_buffer->yy_n_chars;
02220 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
02221 yyin = yy_current_buffer->yy_input_file;
02222 yy_hold_char = *yy_c_buf_p;
02223 }
|
|
|
|
|
|
|
|
|
|
|
|
02189 {
02190 if ( yy_current_buffer == new_buffer )
02191 return;
02192
02193 if ( yy_current_buffer )
02194 {
02195 /* Flush out information for old buffer. */
02196 *yy_c_buf_p = yy_hold_char;
02197 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
02198 yy_current_buffer->yy_n_chars = yy_n_chars;
02199 }
02200
02201 yy_current_buffer |