4#define YY_INT_ALIGNED short int
8#define yy_create_buffer tp_create_buffer
9#define yy_delete_buffer tp_delete_buffer
10#define yy_scan_buffer tp_scan_buffer
11#define yy_scan_string tp_scan_string
12#define yy_scan_bytes tp_scan_bytes
13#define yy_init_buffer tp_init_buffer
14#define yy_flush_buffer tp_flush_buffer
15#define yy_load_buffer_state tp_load_buffer_state
16#define yy_switch_to_buffer tp_switch_to_buffer
17#define yypush_buffer_state tppush_buffer_state
18#define yypop_buffer_state tppop_buffer_state
19#define yyensure_buffer_stack tpensure_buffer_stack
20#define yy_flex_debug tp_flex_debug
24#define yylineno tplineno
26#define yyrestart tprestart
29#define yyalloc tpalloc
30#define yyrealloc tprealloc
34#define YY_FLEX_MAJOR_VERSION 2
35#define YY_FLEX_MINOR_VERSION 6
36#define YY_FLEX_SUBMINOR_VERSION 4
37#if YY_FLEX_SUBMINOR_VERSION > 0
41#ifdef yy_create_buffer
42#define tp_create_buffer_ALREADY_DEFINED
44#define yy_create_buffer tp_create_buffer
47#ifdef yy_delete_buffer
48#define tp_delete_buffer_ALREADY_DEFINED
50#define yy_delete_buffer tp_delete_buffer
54#define tp_scan_buffer_ALREADY_DEFINED
56#define yy_scan_buffer tp_scan_buffer
60#define tp_scan_string_ALREADY_DEFINED
62#define yy_scan_string tp_scan_string
66#define tp_scan_bytes_ALREADY_DEFINED
68#define yy_scan_bytes tp_scan_bytes
72#define tp_init_buffer_ALREADY_DEFINED
74#define yy_init_buffer tp_init_buffer
78#define tp_flush_buffer_ALREADY_DEFINED
80#define yy_flush_buffer tp_flush_buffer
83#ifdef yy_load_buffer_state
84#define tp_load_buffer_state_ALREADY_DEFINED
86#define yy_load_buffer_state tp_load_buffer_state
89#ifdef yy_switch_to_buffer
90#define tp_switch_to_buffer_ALREADY_DEFINED
92#define yy_switch_to_buffer tp_switch_to_buffer
95#ifdef yypush_buffer_state
96#define tppush_buffer_state_ALREADY_DEFINED
98#define yypush_buffer_state tppush_buffer_state
101#ifdef yypop_buffer_state
102#define tppop_buffer_state_ALREADY_DEFINED
104#define yypop_buffer_state tppop_buffer_state
107#ifdef yyensure_buffer_stack
108#define tpensure_buffer_stack_ALREADY_DEFINED
110#define yyensure_buffer_stack tpensure_buffer_stack
114#define tplex_ALREADY_DEFINED
120#define tprestart_ALREADY_DEFINED
122#define yyrestart tprestart
126#define tplex_init_ALREADY_DEFINED
128#define yylex_init tplex_init
131#ifdef yylex_init_extra
132#define tplex_init_extra_ALREADY_DEFINED
134#define yylex_init_extra tplex_init_extra
138#define tplex_destroy_ALREADY_DEFINED
140#define yylex_destroy tplex_destroy
144#define tpget_debug_ALREADY_DEFINED
146#define yyget_debug tpget_debug
150#define tpset_debug_ALREADY_DEFINED
152#define yyset_debug tpset_debug
156#define tpget_extra_ALREADY_DEFINED
158#define yyget_extra tpget_extra
162#define tpset_extra_ALREADY_DEFINED
164#define yyset_extra tpset_extra
168#define tpget_in_ALREADY_DEFINED
170#define yyget_in tpget_in
174#define tpset_in_ALREADY_DEFINED
176#define yyset_in tpset_in
180#define tpget_out_ALREADY_DEFINED
182#define yyget_out tpget_out
186#define tpset_out_ALREADY_DEFINED
188#define yyset_out tpset_out
192#define tpget_leng_ALREADY_DEFINED
194#define yyget_leng tpget_leng
198#define tpget_text_ALREADY_DEFINED
200#define yyget_text tpget_text
204#define tpget_lineno_ALREADY_DEFINED
206#define yyget_lineno tpget_lineno
210#define tpset_lineno_ALREADY_DEFINED
212#define yyset_lineno tpset_lineno
216#define tpwrap_ALREADY_DEFINED
222#define tpalloc_ALREADY_DEFINED
224#define yyalloc tpalloc
228#define tprealloc_ALREADY_DEFINED
230#define yyrealloc tprealloc
234#define tpfree_ALREADY_DEFINED
240#define tptext_ALREADY_DEFINED
246#define tpleng_ALREADY_DEFINED
252#define tpin_ALREADY_DEFINED
258#define tpout_ALREADY_DEFINED
264#define tp_flex_debug_ALREADY_DEFINED
266#define yy_flex_debug tp_flex_debug
270#define tplineno_ALREADY_DEFINED
272#define yylineno tplineno
292#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
297#ifndef __STDC_LIMIT_MACROS
298#define __STDC_LIMIT_MACROS 1
302typedef int8_t flex_int8_t;
303typedef uint8_t flex_uint8_t;
304typedef int16_t flex_int16_t;
305typedef uint16_t flex_uint16_t;
306typedef int32_t flex_int32_t;
307typedef uint32_t flex_uint32_t;
309typedef signed char flex_int8_t;
310typedef short int flex_int16_t;
311typedef int flex_int32_t;
312typedef unsigned char flex_uint8_t;
313typedef unsigned short int flex_uint16_t;
314typedef unsigned int flex_uint32_t;
318#define INT8_MIN (-128)
321#define INT16_MIN (-32767-1)
324#define INT32_MIN (-2147483647-1)
327#define INT8_MAX (127)
330#define INT16_MAX (32767)
333#define INT32_MAX (2147483647)
336#define UINT8_MAX (255U)
339#define UINT16_MAX (65535U)
342#define UINT32_MAX (4294967295U)
346#define SIZE_MAX (~(size_t)0)
358#if defined(__GNUC__) && __GNUC__ >= 3
359#define yynoreturn __attribute__((__noreturn__))
370#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
376#define BEGIN (yy_start) = 1 + 2 *
381#define YY_START (((yy_start) - 1) / 2)
382#define YYSTATE YY_START
384#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
386#define YY_NEW_FILE yyrestart( yyin )
387#define YY_END_OF_BUFFER_CHAR 0
396#define YY_BUF_SIZE 32768
398#define YY_BUF_SIZE 16384
404#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
406#ifndef YY_TYPEDEF_YY_BUFFER_STATE
407#define YY_TYPEDEF_YY_BUFFER_STATE
411#ifndef YY_TYPEDEF_YY_SIZE_T
412#define YY_TYPEDEF_YY_SIZE_T
413typedef size_t yy_size_t;
418extern FILE *yyin, *yyout;
420#define EOB_ACT_CONTINUE_SCAN 0
421#define EOB_ACT_END_OF_FILE 1
422#define EOB_ACT_LAST_MATCH 2
424 #define YY_LESS_LINENO(n)
425 #define YY_LINENO_REWIND_TO(ptr)
432 int yyless_macro_arg = (n); \
433 YY_LESS_LINENO(yyless_macro_arg);\
434 *yy_cp = (yy_hold_char); \
435 YY_RESTORE_YY_MORE_OFFSET \
436 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
437 YY_DO_BEFORE_ACTION; \
440#define unput(c) yyunput( c, (yytext_ptr) )
442#ifndef YY_STRUCT_YY_BUFFER_STATE
443#define YY_STRUCT_YY_BUFFER_STATE
465 int yy_is_our_buffer;
472 int yy_is_interactive;
488 int yy_buffer_status;
490#define YY_BUFFER_NEW 0
491#define YY_BUFFER_NORMAL 1
502#define YY_BUFFER_EOF_PENDING 2
518#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
519 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
524#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
527static char yy_hold_char;
528static int yy_n_chars;
532static char *yy_c_buf_p = NULL;
533static int yy_init = 0;
534static int yy_start = 0;
539static int yy_did_buffer_switch_on_eof;
541void yyrestart ( FILE *input_file );
547void yypop_buffer_state (
void );
549static void yyensure_buffer_stack (
void );
550static void yy_load_buffer_state (
void );
552#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
558void *yyalloc ( yy_size_t );
559void *yyrealloc (
void *, yy_size_t );
560void yyfree (
void * );
562#define yy_new_buffer yy_create_buffer
563#define yy_set_interactive(is_interactive) \
565 if ( ! YY_CURRENT_BUFFER ){ \
566 yyensure_buffer_stack (); \
567 YY_CURRENT_BUFFER_LVALUE = \
568 yy_create_buffer( yyin, YY_BUF_SIZE ); \
570 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
572#define yy_set_bol(at_bol) \
574 if ( ! YY_CURRENT_BUFFER ){\
575 yyensure_buffer_stack (); \
576 YY_CURRENT_BUFFER_LVALUE = \
577 yy_create_buffer( yyin, YY_BUF_SIZE ); \
579 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
581#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
586#define YY_SKIP_YYWRAP
587typedef flex_uint8_t YY_CHAR;
589FILE *yyin = NULL, *yyout = NULL;
591typedef int yy_state_type;
600#define yytext_ptr yytext
602static yy_state_type yy_get_previous_state (
void );
603static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
604static int yy_get_next_buffer (
void );
605static void yynoreturn yy_fatal_error (
const char* msg );
610#define YY_DO_BEFORE_ACTION \
611 (yytext_ptr) = yy_bp; \
612 yyleng = (int) (yy_cp - yy_bp); \
613 (yy_hold_char) = *yy_cp; \
615 (yy_c_buf_p) = yy_cp;
616#define YY_NUM_RULES 7
617#define YY_END_OF_BUFFER 8
622 flex_int32_t yy_verify;
625static const flex_int16_t yy_accept[39] =
627 0, 0, 8, 6, 4, 2, 1, 6, 1, 0,
628 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
629 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
630 0, 0, 0, 0, 0, 0, 5, 0
633static const YY_CHAR yy_ec[256] =
635 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
636 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
637 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
638 1, 2, 1, 1, 4, 1, 1, 1, 1, 1,
639 1, 1, 1, 1, 1, 1, 5, 6, 6, 6,
640 6, 6, 6, 6, 6, 6, 6, 1, 1, 7,
641 1, 8, 1, 1, 9, 9, 9, 9, 9, 9,
642 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
643 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
644 1, 1, 1, 1, 1, 1, 10, 10, 10, 10,
646 11, 10, 12, 10, 13, 10, 14, 10, 10, 15,
647 10, 10, 10, 16, 17, 18, 10, 10, 10, 10,
648 19, 10, 1, 1, 1, 1, 1, 1, 1, 1,
649 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
650 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
651 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
652 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
653 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
654 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
655 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
657 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
658 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
659 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
660 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
661 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
665static const YY_CHAR yy_meta[20] =
667 1, 2, 3, 1, 1, 2, 1, 1, 2, 2,
668 2, 2, 2, 2, 2, 2, 2, 2, 2
671static const flex_int16_t yy_base[43] =
673 0, 6, 54, 55, 55, 55, 0, 0, 0, 42,
674 34, 32, 34, 41, 35, 0, 32, 39, 33, 39,
675 35, 28, 0, 30, 33, 20, 11, 30, 4, 55,
676 5, 8, 12, 13, 15, 22, 19, 55, 30, 33,
680static const flex_int16_t yy_def[43] =
682 39, 39, 38, 38, 38, 38, 40, 38, 40, 38,
683 38, 38, 38, 38, 38, 41, 38, 41, 38, 38,
684 38, 38, 42, 38, 42, 38, 42, 38, 42, 38,
685 42, 42, 42, 42, 42, 42, 42, 0, 38, 38,
689static const flex_int16_t yy_nxt[75] =
691 38, 5, 6, 7, 18, 38, 8, 5, 6, 7,
692 27, 27, 8, 10, 27, 29, 11, 27, 27, 27,
693 31, 27, 32, 33, 34, 27, 36, 35, 27, 37,
694 4, 4, 4, 9, 9, 25, 25, 30, 28, 27,
695 26, 24, 23, 22, 21, 20, 19, 17, 16, 15,
696 14, 13, 12, 38, 3, 38, 38, 38, 38, 38,
697 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
701static const flex_int16_t yy_chk[75] =
703 0, 1, 1, 1, 41, 0, 1, 2, 2, 2,
704 29, 31, 2, 8, 32, 27, 8, 27, 33, 34,
705 29, 35, 31, 32, 33, 37, 35, 34, 36, 36,
706 39, 39, 39, 40, 40, 42, 42, 28, 26, 25,
707 24, 22, 21, 20, 19, 18, 17, 15, 14, 13,
708 12, 11, 10, 3, 38, 38, 38, 38, 38, 38,
709 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
713static yy_state_type yy_last_accepting_state;
714static char *yy_last_accepting_cpos;
716extern int yy_flex_debug;
717int yy_flex_debug = 0;
722#define REJECT reject_used_but_not_detected
723#define yymore() yymore_used_but_not_detected
725#define YY_RESTORE_YY_MORE_OFFSET
727#line 1 "tokenparser.l"
766#line 42 "tokenparser.l"
781static void eval_key(
char *pcToken,
list_t *list_key);
782static void eval_value(
char *pcToken,
list_t *list_values);
783void tperrorCheck (
char *pcToken_error);
788#line 789 "tokenparser.c"
790#line 791 "tokenparser.c"
794#ifndef YY_NO_UNISTD_H
803#define YY_EXTRA_TYPE void *
806static int yy_init_globals (
void );
811int yylex_destroy (
void );
813int yyget_debug (
void );
815void yyset_debug (
int debug_flag );
817YY_EXTRA_TYPE yyget_extra (
void );
819void yyset_extra ( YY_EXTRA_TYPE user_defined );
821FILE *yyget_in (
void );
823void yyset_in ( FILE * _in_str );
825FILE *yyget_out (
void );
827void yyset_out ( FILE * _out_str );
829 int yyget_leng (
void );
831char *yyget_text (
void );
833int yyget_lineno (
void );
835void yyset_lineno (
int _line_number );
841#ifndef YY_SKIP_YYWRAP
843extern "C" int yywrap (
void );
845extern int yywrap (
void );
854static void yy_flex_strncpy (
char *,
const char *,
int );
858static int yy_flex_strlen (
const char * );
863static int yyinput (
void );
865static int input (
void );
871#ifndef YY_READ_BUF_SIZE
874#define YY_READ_BUF_SIZE 16384
876#define YY_READ_BUF_SIZE 8192
885#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
892#define YY_INPUT(buf,result,max_size) \
893 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
897 for ( n = 0; n < max_size && \
898 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
901 buf[n++] = (char) c; \
902 if ( c == EOF && ferror( yyin ) ) \
903 YY_FATAL_ERROR( "input in flex scanner failed" ); \
909 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
911 if( errno != EINTR) \
913 YY_FATAL_ERROR( "input in flex scanner failed" ); \
929#define yyterminate() return YY_NULL
933#ifndef YY_START_STACK_INCR
934#define YY_START_STACK_INCR 25
938#ifndef YY_FATAL_ERROR
939#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
948#define YY_DECL_IS_OURS 1
950extern int yylex (
void);
952#define YY_DECL int yylex (void)
958#ifndef YY_USER_ACTION
959#define YY_USER_ACTION
964#define YY_BREAK break;
967#define YY_RULE_SETUP \
974 yy_state_type yy_current_state;
995 if ( ! YY_CURRENT_BUFFER ) {
996 yyensure_buffer_stack ();
997 YY_CURRENT_BUFFER_LVALUE =
998 yy_create_buffer( yyin, YY_BUF_SIZE );
1001 yy_load_buffer_state( );
1005#line 69 "tokenparser.l"
1008#line 1009 "tokenparser.c"
1012 yy_cp = (yy_c_buf_p);
1015 *yy_cp = (yy_hold_char);
1022 yy_current_state = (yy_start);
1026 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1027 if ( yy_accept[yy_current_state] )
1029 (yy_last_accepting_state) = yy_current_state;
1030 (yy_last_accepting_cpos) = yy_cp;
1032 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1034 yy_current_state = (int) yy_def[yy_current_state];
1035 if ( yy_current_state >= 39 )
1036 yy_c = yy_meta[yy_c];
1038 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1041 while ( yy_base[yy_current_state] != 55 );
1044 yy_act = yy_accept[yy_current_state];
1047 yy_cp = (yy_last_accepting_cpos);
1048 yy_current_state = (yy_last_accepting_state);
1049 yy_act = yy_accept[yy_current_state];
1052 YY_DO_BEFORE_ACTION;
1060 *yy_cp = (yy_hold_char);
1061 yy_cp = (yy_last_accepting_cpos);
1062 yy_current_state = (yy_last_accepting_state);
1063 goto yy_find_action;
1067#line 71 "tokenparser.l"
1073#line 72 "tokenparser.l"
1078#line 73 "tokenparser.l"
1079{ eval_key(yytext, ListKeys); }
1083#line 74 "tokenparser.l"
1088#line 75 "tokenparser.l"
1089{ eval_value(yytext, ListValues); }
1093#line 76 "tokenparser.l"
1094{ tperrorCheck(yytext); }
1098#line 77 "tokenparser.l"
1101#line 1102 "tokenparser.c"
1102case YY_STATE_EOF(INITIAL):
1105 case YY_END_OF_BUFFER:
1108 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1111 *yy_cp = (yy_hold_char);
1112 YY_RESTORE_YY_MORE_OFFSET
1114 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1125 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1126 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1127 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1137 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1139 yy_state_type yy_next_state;
1141 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1143 yy_current_state = yy_get_previous_state( );
1154 yy_next_state = yy_try_NUL_trans( yy_current_state );
1156 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1158 if ( yy_next_state )
1161 yy_cp = ++(yy_c_buf_p);
1162 yy_current_state = yy_next_state;
1168 yy_cp = (yy_c_buf_p);
1169 goto yy_find_action;
1173 else switch ( yy_get_next_buffer( ) )
1175 case EOB_ACT_END_OF_FILE:
1177 (yy_did_buffer_switch_on_eof) = 0;
1190 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1192 yy_act = YY_STATE_EOF(YY_START);
1198 if ( ! (yy_did_buffer_switch_on_eof) )
1204 case EOB_ACT_CONTINUE_SCAN:
1206 (yytext_ptr) + yy_amount_of_matched_text;
1208 yy_current_state = yy_get_previous_state( );
1210 yy_cp = (yy_c_buf_p);
1211 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1214 case EOB_ACT_LAST_MATCH:
1216 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1218 yy_current_state = yy_get_previous_state( );
1220 yy_cp = (yy_c_buf_p);
1221 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1222 goto yy_find_action;
1229 "fatal flex scanner internal error--no action found" );
1242static int yy_get_next_buffer (
void)
1244 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1245 char *source = (yytext_ptr);
1246 int number_to_move, i;
1249 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1251 "fatal flex scanner internal error--end of buffer missed" );
1253 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1255 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1260 return EOB_ACT_END_OF_FILE;
1268 return EOB_ACT_LAST_MATCH;
1275 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1277 for ( i = 0; i < number_to_move; ++i )
1278 *(dest++) = *(source++);
1280 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1284 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1289 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1291 while ( num_to_read <= 0 )
1297 int yy_c_buf_p_offset =
1298 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1300 if ( b->yy_is_our_buffer )
1302 int new_size = b->yy_buf_size * 2;
1304 if ( new_size <= 0 )
1305 b->yy_buf_size += b->yy_buf_size / 8;
1307 b->yy_buf_size *= 2;
1309 b->yy_ch_buf = (
char *)
1311 yyrealloc( (
void *) b->yy_ch_buf,
1312 (yy_size_t) (b->yy_buf_size + 2) );
1316 b->yy_ch_buf = NULL;
1318 if ( ! b->yy_ch_buf )
1320 "fatal error - scanner input buffer overflow" );
1322 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1324 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1329 if ( num_to_read > YY_READ_BUF_SIZE )
1330 num_to_read = YY_READ_BUF_SIZE;
1333 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1334 (yy_n_chars), num_to_read );
1336 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1339 if ( (yy_n_chars) == 0 )
1341 if ( number_to_move == YY_MORE_ADJ )
1343 ret_val = EOB_ACT_END_OF_FILE;
1349 ret_val = EOB_ACT_LAST_MATCH;
1350 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1351 YY_BUFFER_EOF_PENDING;
1356 ret_val = EOB_ACT_CONTINUE_SCAN;
1358 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1360 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1361 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) yyrealloc(
1362 (
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1363 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1364 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1366 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1369 (yy_n_chars) += number_to_move;
1370 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1371 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1373 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1380 static yy_state_type yy_get_previous_state (
void)
1382 yy_state_type yy_current_state;
1385 yy_current_state = (yy_start);
1387 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1389 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1390 if ( yy_accept[yy_current_state] )
1392 (yy_last_accepting_state) = yy_current_state;
1393 (yy_last_accepting_cpos) = yy_cp;
1395 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1397 yy_current_state = (int) yy_def[yy_current_state];
1398 if ( yy_current_state >= 39 )
1399 yy_c = yy_meta[yy_c];
1401 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1404 return yy_current_state;
1412 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1415 char *yy_cp = (yy_c_buf_p);
1418 if ( yy_accept[yy_current_state] )
1420 (yy_last_accepting_state) = yy_current_state;
1421 (yy_last_accepting_cpos) = yy_cp;
1423 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1425 yy_current_state = (int) yy_def[yy_current_state];
1426 if ( yy_current_state >= 39 )
1427 yy_c = yy_meta[yy_c];
1429 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1430 yy_is_jam = (yy_current_state == 38);
1432 return yy_is_jam ? 0 : yy_current_state;
1441 static int yyinput (
void)
1443 static int input (
void)
1449 *(yy_c_buf_p) = (yy_hold_char);
1451 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1457 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1459 *(yy_c_buf_p) =
'\0';
1463 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1466 switch ( yy_get_next_buffer( ) )
1468 case EOB_ACT_LAST_MATCH:
1484 case EOB_ACT_END_OF_FILE:
1489 if ( ! (yy_did_buffer_switch_on_eof) )
1498 case EOB_ACT_CONTINUE_SCAN:
1499 (yy_c_buf_p) = (yytext_ptr) + offset;
1505 c = *(
unsigned char *) (yy_c_buf_p);
1506 *(yy_c_buf_p) =
'\0';
1507 (yy_hold_char) = *++(yy_c_buf_p);
1518 void yyrestart (FILE * input_file )
1521 if ( ! YY_CURRENT_BUFFER ){
1522 yyensure_buffer_stack ();
1523 YY_CURRENT_BUFFER_LVALUE =
1524 yy_create_buffer( yyin, YY_BUF_SIZE );
1527 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1528 yy_load_buffer_state( );
1543 yyensure_buffer_stack ();
1544 if ( YY_CURRENT_BUFFER == new_buffer )
1547 if ( YY_CURRENT_BUFFER )
1550 *(yy_c_buf_p) = (yy_hold_char);
1551 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1552 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1555 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1556 yy_load_buffer_state( );
1563 (yy_did_buffer_switch_on_eof) = 1;
1566static void yy_load_buffer_state (
void)
1568 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1569 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1570 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1571 (yy_hold_char) = *(yy_c_buf_p);
1586 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1588 b->yy_buf_size = size;
1593 b->yy_ch_buf = (
char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1594 if ( ! b->yy_ch_buf )
1595 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1597 b->yy_is_our_buffer = 1;
1599 yy_init_buffer( b, file );
1614 if ( b == YY_CURRENT_BUFFER )
1617 if ( b->yy_is_our_buffer )
1618 yyfree( (
void *) b->yy_ch_buf );
1620 yyfree( (
void *) b );
1632 yy_flush_buffer( b );
1634 b->yy_input_file = file;
1635 b->yy_fill_buffer = 1;
1641 if (b != YY_CURRENT_BUFFER){
1646 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1666 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1667 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1669 b->yy_buf_pos = &b->yy_ch_buf[0];
1672 b->yy_buffer_status = YY_BUFFER_NEW;
1674 if ( b == YY_CURRENT_BUFFER )
1675 yy_load_buffer_state( );
1686 if (new_buffer == NULL)
1689 yyensure_buffer_stack();
1692 if ( YY_CURRENT_BUFFER )
1695 *(yy_c_buf_p) = (yy_hold_char);
1696 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1697 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1701 if (YY_CURRENT_BUFFER)
1703 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1706 yy_load_buffer_state( );
1707 (yy_did_buffer_switch_on_eof) = 1;
1714void yypop_buffer_state (
void)
1716 if (!YY_CURRENT_BUFFER)
1719 yy_delete_buffer(YY_CURRENT_BUFFER );
1720 YY_CURRENT_BUFFER_LVALUE = NULL;
1724 if (YY_CURRENT_BUFFER) {
1725 yy_load_buffer_state( );
1726 (yy_did_buffer_switch_on_eof) = 1;
1733static void yyensure_buffer_stack (
void)
1735 yy_size_t num_to_alloc;
1748 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
1760 yy_size_t grow_size = 8 ;
1768 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
1787 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1788 base[size-1] != YY_END_OF_BUFFER_CHAR )
1794 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_buffer()" );
1796 b->yy_buf_size = (int) (size - 2);
1797 b->yy_buf_pos = b->yy_ch_buf = base;
1798 b->yy_is_our_buffer = 0;
1799 b->yy_input_file = NULL;
1800 b->yy_n_chars = b->yy_buf_size;
1801 b->yy_is_interactive = 0;
1803 b->yy_fill_buffer = 0;
1804 b->yy_buffer_status = YY_BUFFER_NEW;
1806 yy_switch_to_buffer( b );
1822 return yy_scan_bytes( yystr, (
int) strlen(yystr) );
1832YY_BUFFER_STATE yy_scan_bytes (
const char * yybytes,
int _yybytes_len )
1840 n = (yy_size_t) (_yybytes_len + 2);
1841 buf = (
char *) yyalloc( n );
1843 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_bytes()" );
1845 for ( i = 0; i < _yybytes_len; ++i )
1846 buf[i] = yybytes[i];
1848 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1850 b = yy_scan_buffer( buf, n );
1852 YY_FATAL_ERROR(
"bad buffer in yy_scan_bytes()" );
1857 b->yy_is_our_buffer = 1;
1862#ifndef YY_EXIT_FAILURE
1863#define YY_EXIT_FAILURE 2
1866static void yynoreturn yy_fatal_error (
const char* msg )
1868 fprintf( stderr,
"%s\n", msg );
1869 exit( YY_EXIT_FAILURE );
1879 int yyless_macro_arg = (n); \
1880 YY_LESS_LINENO(yyless_macro_arg);\
1881 yytext[yyleng] = (yy_hold_char); \
1882 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1883 (yy_hold_char) = *(yy_c_buf_p); \
1884 *(yy_c_buf_p) = '\0'; \
1885 yyleng = yyless_macro_arg; \
1894int yyget_lineno (
void)
1903FILE *yyget_in (
void)
1911FILE *yyget_out (
void)
1919int yyget_leng (
void)
1928char *yyget_text (
void)
1937void yyset_lineno (
int _line_number )
1940 yylineno = _line_number;
1949void yyset_in (FILE * _in_str )
1954void yyset_out (FILE * _out_str )
1959int yyget_debug (
void)
1961 return yy_flex_debug;
1964void yyset_debug (
int _bdebug )
1966 yy_flex_debug = _bdebug ;
1969static int yy_init_globals (
void)
1978 (yy_c_buf_p) = NULL;
1998int yylex_destroy (
void)
2002 while(YY_CURRENT_BUFFER){
2003 yy_delete_buffer( YY_CURRENT_BUFFER );
2004 YY_CURRENT_BUFFER_LVALUE = NULL;
2005 yypop_buffer_state();
2024static void yy_flex_strncpy (
char* s1,
const char * s2,
int n )
2028 for ( i = 0; i < n; ++i )
2033#ifdef YY_NEED_STRLEN
2034static int yy_flex_strlen (
const char * s )
2037 for ( n = 0; s[n]; ++n )
2044void *yyalloc (yy_size_t size )
2046 return malloc(size);
2049void *yyrealloc (
void * ptr, yy_size_t size )
2059 return realloc(ptr, size);
2062void yyfree (
void * ptr )
2064 free( (
char *) ptr );
2067#define YYTABLES_NAME "yytables"
2069#line 77 "tokenparser.l"
2073static void eval_key(
char *pcToken,
list_t *list_key)
2080 elt = malloc(
sizeof(*elt));
2087 for (len=0; pcToken[len+5] !=
'<'; len++)
2091 elt->key = malloc(len);
2092 memcpy(elt->key, &pcToken[5], len-1);
2093 elt->key[len-1] =
'\0';
2095 r = list_init(&elt->values);
2100 list_append(list_key, elt);
2103 ListValues = &elt->values;
2106static void eval_value(
char *pcToken,
list_t *list_values)
2117 for (len=0; pcToken[len+8] !=
'<'; len++)
2121 value = malloc(len);
2124 memcpy(value, &pcToken[8], len-1);
2125 value[len-1] =
'\0';
2129 while ((amp = strstr(amp,
"&")) != NULL)
2134 for (p = amp+1; *(p+4); p++)
2145 r = list_append(list_values, value);
2150void tperrorCheck (
char *token_error)
2165int LTPBundleFindValueWithKey(
list_t *l,
const char *key,
list_t **values)
2170 for (i=0; i < list_size(l); i++)
2174 elt = list_get_at(l, i);
2177 if (0 == strcmp(elt->key, key))
2179 *values = &elt->values;
2196int bundleParse(
const char *fileName,
list_t *l)
2204 file = fopen(fileName,
"r");
2207 Log3(PCSC_LOG_CRITICAL,
"Could not open bundle file %s: %s",
2208 fileName, strerror(errno));
2222 }
while (!feof(file));
2228 printf(
"size: %d\n", list_size(l));
2229 for (i=0; i < list_size(l); i++)
2234 elt = list_get_at(l, i);
2236 printf(
"Key: %s\n", elt->key);
2238 for (j=0; j<list_size(&elt->values); j++)
2240 char *v = list_get_at(&elt->values, j);
2241 printf(
" value: %s\n", v);
2254void bundleRelease(
list_t *l)
2258 for (i=0; i < list_size(l); i++)
2263 elt = list_get_at(l, i);
2267 for (j=0; j<list_size(&elt->values); j++)
2268 free(list_get_at(&elt->values, j));
2269 list_destroy(&elt->values);
Reads lexical config files and updates database.
int yy_bs_lineno
The line count.
int yy_bs_column
The column count.
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
static size_t yy_buffer_stack_max
capacity of stack.
static size_t yy_buffer_stack_top
index of top of stack.