5 #define YY_INT_ALIGNED short int
9 #define yy_create_buffer csv__create_buffer
10 #define yy_delete_buffer csv__delete_buffer
11 #define yy_flex_debug csv__flex_debug
12 #define yy_init_buffer csv__init_buffer
13 #define yy_flush_buffer csv__flush_buffer
14 #define yy_load_buffer_state csv__load_buffer_state
15 #define yy_switch_to_buffer csv__switch_to_buffer
17 #define yyleng csv_leng
19 #define yylineno csv_lineno
21 #define yyrestart csv_restart
22 #define yytext csv_text
23 #define yywrap csv_wrap
24 #define yyalloc csv_alloc
25 #define yyrealloc csv_realloc
26 #define yyfree csv_free
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 5
31 #define YY_FLEX_SUBMINOR_VERSION 35
32 #if YY_FLEX_SUBMINOR_VERSION > 0
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
79 #define INT8_MIN (-128)
82 #define INT16_MIN (-32767-1)
85 #define INT32_MIN (-2147483647-1)
88 #define INT8_MAX (127)
91 #define INT16_MAX (32767)
94 #define INT32_MAX (2147483647)
97 #define UINT8_MAX (255U)
100 #define UINT16_MAX (65535U)
103 #define UINT32_MAX (4294967295U)
118 #if defined (__STDC__)
126 #define yyconst const
139 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
145 #define BEGIN (yy_start) = 1 + 2 *
151 #define YY_START (((yy_start) - 1) / 2)
152 #define YYSTATE YY_START
155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
158 #define YY_NEW_FILE csv_restart(csv_in )
160 #define YY_END_OF_BUFFER_CHAR 0
169 #define YY_BUF_SIZE 32768
171 #define YY_BUF_SIZE 16384
177 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
179 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
180 #define YY_TYPEDEF_YY_BUFFER_STATE
188 #define EOB_ACT_CONTINUE_SCAN 0
189 #define EOB_ACT_END_OF_FILE 1
190 #define EOB_ACT_LAST_MATCH 2
199 #define YY_LESS_LINENO(n) \
202 for ( yyl = n; yyl < csv_leng; ++yyl )\
203 if ( csv_text[yyl] == '\n' )\
212 int yyless_macro_arg = (n); \
213 YY_LESS_LINENO(yyless_macro_arg);\
214 *yy_cp = (yy_hold_char); \
215 YY_RESTORE_YY_MORE_OFFSET \
216 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
217 YY_DO_BEFORE_ACTION; \
221 #define unput(c) yyunput( c, (yytext_ptr) )
223 #ifndef YY_TYPEDEF_YY_SIZE_T
224 #define YY_TYPEDEF_YY_SIZE_T
228 #ifndef YY_STRUCT_YY_BUFFER_STATE
229 #define YY_STRUCT_YY_BUFFER_STATE
276 #define YY_BUFFER_NEW 0
277 #define YY_BUFFER_NORMAL 1
288 #define YY_BUFFER_EOF_PENDING 2
294 static size_t yy_buffer_stack_top = 0;
295 static size_t yy_buffer_stack_max = 0;
296 static YY_BUFFER_STATE * yy_buffer_stack = 0;
304 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
305 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
311 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
314 static char yy_hold_char;
315 static int yy_n_chars;
319 static char *yy_c_buf_p = (
char *) 0;
320 static int yy_init = 0;
321 static int yy_start = 0;
326 static int yy_did_buffer_switch_on_eof;
336 static void csv_ensure_buffer_stack (
void );
337 static void csv__load_buffer_state (
void );
338 static void csv__init_buffer (YY_BUFFER_STATE
b,FILE *file );
340 #define YY_FLUSH_BUFFER csv__flush_buffer(YY_CURRENT_BUFFER )
350 #define yy_new_buffer csv__create_buffer
352 #define yy_set_interactive(is_interactive) \
354 if ( ! YY_CURRENT_BUFFER ){ \
355 csv_ensure_buffer_stack (); \
356 YY_CURRENT_BUFFER_LVALUE = \
357 csv__create_buffer(csv_in,YY_BUF_SIZE ); \
359 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
362 #define yy_set_bol(at_bol) \
364 if ( ! YY_CURRENT_BUFFER ){\
365 csv_ensure_buffer_stack (); \
366 YY_CURRENT_BUFFER_LVALUE = \
367 csv__create_buffer(csv_in,YY_BUF_SIZE ); \
369 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
372 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
376 #define csv_wrap(n) 1
377 #define YY_SKIP_YYWRAP
390 #define yytext_ptr csv_text
392 static yy_state_type yy_get_previous_state (
void );
393 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
394 static int yy_get_next_buffer (
void );
395 static void yy_fatal_error (
yyconst char msg[] );
400 #define YY_DO_BEFORE_ACTION \
401 (yytext_ptr) = yy_bp; \
402 csv_leng = (size_t) (yy_cp - yy_bp); \
403 (yy_hold_char) = *yy_cp; \
405 (yy_c_buf_p) = yy_cp;
407 #define YY_NUM_RULES 12
408 #define YY_END_OF_BUFFER 13
418 0, 0, 0, 0, 4, 4, 13, 9, 7, 2,
419 9, 1, 9, 9, 8, 3, 10, 7, 11, 10,
420 4, 4, 6, 12, 5, 2, 0, 8, 8, 0,
421 3, 0, 11, 4, 6, 0, 0, 8, 0, 0,
427 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
428 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 2, 1, 5, 1, 1, 1, 1, 1, 1,
431 1, 1, 6, 7, 6, 8, 1, 9, 9, 9,
432 9, 9, 9, 9, 9, 9, 9, 1, 10, 1,
433 1, 1, 1, 1, 11, 11, 11, 11, 12, 11,
434 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
435 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
436 13, 1, 14, 1, 11, 1, 11, 11, 11, 11,
438 12, 11, 11, 11, 11, 11, 11, 11, 11, 11,
439 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
440 11, 11, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 1, 1, 2, 2, 2, 1, 1, 3, 3, 1,
465 0, 0, 13, 22, 32, 0, 73, 74, 74, 74,
466 69, 74, 10, 62, 39, 57, 74, 74, 74, 66,
467 0, 0, 74, 65, 74, 74, 58, 0, 18, 22,
468 53, 55, 74, 0, 74, 43, 49, 48, 46, 47,
469 41, 13, 45, 74, 74, 59, 18, 62
474 45, 1, 46, 46, 45, 5, 45, 45, 45, 45,
475 45, 45, 45, 45, 45, 47, 45, 45, 45, 45,
476 48, 48, 45, 45, 45, 45, 45, 15, 45, 45,
477 47, 45, 45, 48, 45, 45, 45, 45, 45, 45,
478 45, 45, 45, 45, 0, 45, 45, 45
483 8, 9, 10, 11, 12, 13, 9, 14, 15, 9,
484 16, 16, 8, 8, 18, 19, 20, 27, 28, 18,
485 31, 43, 18, 18, 19, 20, 29, 37, 18, 36,
486 38, 18, 21, 22, 23, 24, 25, 21, 22, 21,
487 21, 22, 21, 21, 21, 21, 27, 28, 40, 41,
488 30, 41, 42, 43, 39, 41, 38, 38, 44, 17,
489 17, 17, 34, 39, 34, 32, 29, 35, 33, 32,
490 29, 26, 45, 7, 45, 45, 45, 45, 45, 45,
491 45, 45, 45, 45, 45, 45, 45, 45
496 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 1, 1, 1, 1, 3, 3, 3, 13, 13, 3,
498 47, 42, 3, 4, 4, 4, 29, 30, 4, 29,
499 30, 4, 5, 5, 5, 5, 5, 5, 5, 5,
500 5, 5, 5, 5, 5, 5, 15, 15, 36, 41,
501 15, 36, 39, 43, 39, 40, 38, 37, 43, 46,
502 46, 46, 48, 32, 48, 31, 27, 24, 20, 16,
503 14, 11, 7, 45, 45, 45, 45, 45, 45, 45,
504 45, 45, 45, 45, 45, 45, 45, 45
510 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, };
512 static yy_state_type yy_last_accepting_state;
513 static char *yy_last_accepting_cpos;
516 int csv__flex_debug = 0;
521 #define REJECT reject_used_but_not_detected
522 #define yymore() yymore_used_but_not_detected
523 #define YY_MORE_ADJ 0
524 #define YY_RESTORE_YY_MORE_OFFSET
579 #line 580 "scan_csv.cpp"
585 #ifndef YY_EXTRA_TYPE
586 #define YY_EXTRA_TYPE void *
589 static int yy_init_globals (
void );
624 #ifndef YY_SKIP_YYWRAP
633 static void yy_flex_strncpy (
char *,
yyconst char *,
int );
636 #ifdef YY_NEED_STRLEN
637 static int yy_flex_strlen (
yyconst char * );
643 static int yyinput (
void );
645 static int input (
void );
651 #ifndef YY_READ_BUF_SIZE
654 #define YY_READ_BUF_SIZE 16384
656 #define YY_READ_BUF_SIZE 8192
665 #define ECHO do { if (fwrite( csv_text, csv_leng, 1, csv_out )) {} } while (0)
672 #define YY_INPUT(buf,result,max_size) \
673 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
677 for ( n = 0; n < max_size && \
678 (c = getc( csv_in )) != EOF && c != '\n'; ++n ) \
681 buf[n++] = (char) c; \
682 if ( c == EOF && ferror( csv_in ) ) \
683 YY_FATAL_ERROR( "input in flex scanner failed" ); \
689 while ( (result = fread(buf, 1, max_size, csv_in))==0 && ferror(csv_in)) \
691 if( errno != EINTR) \
693 YY_FATAL_ERROR( "input in flex scanner failed" ); \
709 #define yyterminate() return YY_NULL
713 #ifndef YY_START_STACK_INCR
714 #define YY_START_STACK_INCR 25
718 #ifndef YY_FATAL_ERROR
719 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
728 #define YY_DECL_IS_OURS 1
732 #define YY_DECL int csv_lex (void)
738 #ifndef YY_USER_ACTION
739 #define YY_USER_ACTION
744 #define YY_BREAK break;
747 #define YY_RULE_SETUP \
754 register yy_state_type yy_current_state;
758 #line 70 "scan_csv.l"
761 #line 762 "scan_csv.cpp"
781 csv_ensure_buffer_stack ();
786 csv__load_buffer_state( );
791 yy_cp = (yy_c_buf_p);
794 *yy_cp = (yy_hold_char);
801 yy_current_state = (yy_start);
806 if ( yy_accept[yy_current_state] )
808 (yy_last_accepting_state) = yy_current_state;
809 (yy_last_accepting_cpos) = yy_cp;
811 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
813 yy_current_state = (int) yy_def[yy_current_state];
814 if ( yy_current_state >= 46 )
815 yy_c = yy_meta[(
unsigned int) yy_c];
817 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
820 while ( yy_base[yy_current_state] != 74 );
823 yy_act = yy_accept[yy_current_state];
826 yy_cp = (yy_last_accepting_cpos);
827 yy_current_state = (yy_last_accepting_state);
828 yy_act = yy_accept[yy_current_state];
836 for ( yyl = 0; yyl <
csv_leng; ++yyl )
837 if ( csv_text[yyl] ==
'\n' )
849 *yy_cp = (yy_hold_char);
850 yy_cp = (yy_last_accepting_cpos);
851 yy_current_state = (yy_last_accepting_state);
856 #line 72 "scan_csv.l"
862 #line 73 "scan_csv.l"
867 #line 75 "scan_csv.l"
875 #line 80 "scan_csv.l"
883 #line 85 "scan_csv.l"
889 #line 86 "scan_csv.l"
894 #line 88 "scan_csv.l"
899 #line 90 "scan_csv.l"
907 #line 95 "scan_csv.l"
910 "line %d: syntax error, unrecognized character: `%s'\n",
911 csv_lineno, csv_text);
917 #line 102 "scan_csv.l"
923 #line 103 "scan_csv.l"
928 #line 105 "scan_csv.l"
931 #line 932 "scan_csv.cpp"
940 int yy_amount_of_matched_text = (int) (yy_cp - (
yytext_ptr)) - 1;
943 *yy_cp = (yy_hold_char);
971 yy_state_type yy_next_state;
973 (yy_c_buf_p) = (
yytext_ptr) + yy_amount_of_matched_text;
975 yy_current_state = yy_get_previous_state( );
986 yy_next_state = yy_try_NUL_trans( yy_current_state );
993 yy_cp = ++(yy_c_buf_p);
994 yy_current_state = yy_next_state;
1000 yy_cp = (yy_c_buf_p);
1001 goto yy_find_action;
1005 else switch ( yy_get_next_buffer( ) )
1009 (yy_did_buffer_switch_on_eof) = 0;
1030 if ( ! (yy_did_buffer_switch_on_eof) )
1040 yy_current_state = yy_get_previous_state( );
1042 yy_cp = (yy_c_buf_p);
1050 yy_current_state = yy_get_previous_state( );
1052 yy_cp = (yy_c_buf_p);
1054 goto yy_find_action;
1061 "fatal flex scanner internal error--no action found" );
1073 static int yy_get_next_buffer (
void)
1077 register int number_to_move,
i;
1082 "fatal flex scanner internal error--end of buffer missed" );
1106 number_to_move = (int) ((yy_c_buf_p) - (
yytext_ptr)) - 1;
1108 for ( i = 0; i < number_to_move; ++
i )
1109 *(dest++) = *(source++);
1122 while ( num_to_read <= 0 )
1128 int yy_c_buf_p_offset =
1135 if ( new_size <= 0 )
1150 "fatal error - scanner input buffer overflow" );
1152 (yy_c_buf_p) = &b->
yy_ch_buf[yy_c_buf_p_offset];
1164 (yy_n_chars), (
size_t) num_to_read );
1169 if ( (yy_n_chars) == 0 )
1190 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1193 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1196 (yy_n_chars) += number_to_move;
1207 static yy_state_type yy_get_previous_state (
void)
1209 register yy_state_type yy_current_state;
1210 register char *
yy_cp;
1212 yy_current_state = (yy_start);
1217 if ( yy_accept[yy_current_state] )
1219 (yy_last_accepting_state) = yy_current_state;
1220 (yy_last_accepting_cpos) = yy_cp;
1222 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1224 yy_current_state = (int) yy_def[yy_current_state];
1225 if ( yy_current_state >= 46 )
1226 yy_c = yy_meta[(
unsigned int) yy_c];
1228 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1231 return yy_current_state;
1239 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1241 register int yy_is_jam;
1242 register char *yy_cp = (yy_c_buf_p);
1245 if ( yy_accept[yy_current_state] )
1247 (yy_last_accepting_state) = yy_current_state;
1248 (yy_last_accepting_cpos) = yy_cp;
1250 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1252 yy_current_state = (int) yy_def[yy_current_state];
1253 if ( yy_current_state >= 46 )
1254 yy_c = yy_meta[(
unsigned int) yy_c];
1256 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1257 yy_is_jam = (yy_current_state == 45);
1259 return yy_is_jam ? 0 : yy_current_state;
1264 static int yyinput (
void)
1266 static int input (
void)
1272 *(yy_c_buf_p) = (yy_hold_char);
1282 *(yy_c_buf_p) =
'\0';
1289 switch ( yy_get_next_buffer( ) )
1312 if ( ! (yy_did_buffer_switch_on_eof) )
1328 c = *(
unsigned char *) (yy_c_buf_p);
1329 *(yy_c_buf_p) =
'\0';
1330 (yy_hold_char) = *++(yy_c_buf_p);
1350 csv_ensure_buffer_stack ();
1356 csv__load_buffer_state( );
1371 csv_ensure_buffer_stack ();
1378 *(yy_c_buf_p) = (yy_hold_char);
1384 csv__load_buffer_state( );
1391 (yy_did_buffer_switch_on_eof) = 1;
1394 static void csv__load_buffer_state (
void)
1399 (yy_hold_char) = *(yy_c_buf_p);
1414 YY_FATAL_ERROR(
"out of dynamic memory in csv__create_buffer()" );
1423 YY_FATAL_ERROR(
"out of dynamic memory in csv__create_buffer()" );
1427 csv__init_buffer(b,file );
1452 extern int isatty (
int );
1459 static void csv__init_buffer (YY_BUFFER_STATE b, FILE * file )
1507 csv__load_buffer_state( );
1518 if (new_buffer == NULL)
1521 csv_ensure_buffer_stack();
1527 *(yy_c_buf_p) = (yy_hold_char);
1534 (yy_buffer_stack_top)++;
1538 csv__load_buffer_state( );
1539 (yy_did_buffer_switch_on_eof) = 1;
1553 if ((yy_buffer_stack_top) > 0)
1554 --(yy_buffer_stack_top);
1557 csv__load_buffer_state( );
1558 (yy_did_buffer_switch_on_eof) = 1;
1565 static void csv_ensure_buffer_stack (
void)
1569 if (!(yy_buffer_stack)) {
1579 if ( ! (yy_buffer_stack) )
1580 YY_FATAL_ERROR(
"out of dynamic memory in csv_ensure_buffer_stack()" );
1582 memset((yy_buffer_stack), 0, num_to_alloc *
sizeof(
struct yy_buffer_state*));
1584 (yy_buffer_stack_max) = num_to_alloc;
1585 (yy_buffer_stack_top) = 0;
1589 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1594 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1599 if ( ! (yy_buffer_stack) )
1600 YY_FATAL_ERROR(
"out of dynamic memory in csv_ensure_buffer_stack()" );
1603 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size *
sizeof(
struct yy_buffer_state*));
1604 (yy_buffer_stack_max) = num_to_alloc;
1672 n = _yybytes_len + 2;
1677 for ( i = 0; i < _yybytes_len; ++
i )
1678 buf[i] = yybytes[i];
1694 #ifndef YY_EXIT_FAILURE
1695 #define YY_EXIT_FAILURE 2
1698 static void yy_fatal_error (
yyconst char* msg )
1700 (void)
fprintf( stderr,
"%s\n", msg );
1711 int yyless_macro_arg = (n); \
1712 YY_LESS_LINENO(yyless_macro_arg);\
1713 csv_text[csv_leng] = (yy_hold_char); \
1714 (yy_c_buf_p) = csv_text + yyless_macro_arg; \
1715 (yy_hold_char) = *(yy_c_buf_p); \
1716 *(yy_c_buf_p) = '\0'; \
1717 csv_leng = yyless_macro_arg; \
1772 csv_lineno = line_number;
1798 csv__flex_debug = bdebug ;
1801 static int yy_init_globals (
void)
1810 (yy_buffer_stack) = 0;
1811 (yy_buffer_stack_top) = 0;
1812 (yy_buffer_stack_max) = 0;
1813 (yy_c_buf_p) = (
char *) 0;
1845 (yy_buffer_stack) = NULL;
1859 static void yy_flex_strncpy (
char* s1,
yyconst char * s2,
int n )
1862 for ( i = 0; i <
n; ++
i )
1867 #ifdef YY_NEED_STRLEN
1868 static int yy_flex_strlen (
yyconst char *
s )
1871 for ( n = 0; s[
n]; ++
n )
1880 return (
void *) malloc( size );
1892 return (
void *) realloc( (
char *) ptr, size );
1897 free( (
char *) ptr );
1900 #define YYTABLES_NAME "yytables"
1902 #line 105 "scan_csv.l"