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;
308typedef uint64_t flex_uint64_t;
310typedef signed char flex_int8_t;
311typedef short int flex_int16_t;
312typedef int flex_int32_t;
313typedef unsigned char flex_uint8_t;
314typedef unsigned short int flex_uint16_t;
315typedef unsigned int flex_uint32_t;
319#define INT8_MIN (-128)
322#define INT16_MIN (-32767-1)
325#define INT32_MIN (-2147483647-1)
328#define INT8_MAX (127)
331#define INT16_MAX (32767)
334#define INT32_MAX (2147483647)
337#define UINT8_MAX (255U)
340#define UINT16_MAX (65535U)
343#define UINT32_MAX (4294967295U)
347#define SIZE_MAX (~(size_t)0)
359#if defined(__GNUC__) && __GNUC__ >= 3
360#define yynoreturn __attribute__((__noreturn__))
371#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
377#define BEGIN (yy_start) = 1 + 2 *
382#define YY_START (((yy_start) - 1) / 2)
383#define YYSTATE YY_START
385#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
387#define YY_NEW_FILE yyrestart( yyin )
388#define YY_END_OF_BUFFER_CHAR 0
397#define YY_BUF_SIZE 32768
399#define YY_BUF_SIZE 16384
405#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
407#ifndef YY_TYPEDEF_YY_BUFFER_STATE
408#define YY_TYPEDEF_YY_BUFFER_STATE
412#ifndef YY_TYPEDEF_YY_SIZE_T
413#define YY_TYPEDEF_YY_SIZE_T
414typedef size_t yy_size_t;
417extern yy_size_t yyleng;
419extern FILE *yyin, *yyout;
421#define EOB_ACT_CONTINUE_SCAN 0
422#define EOB_ACT_END_OF_FILE 1
423#define EOB_ACT_LAST_MATCH 2
425 #define YY_LESS_LINENO(n)
426 #define YY_LINENO_REWIND_TO(ptr)
433 int yyless_macro_arg = (n); \
434 YY_LESS_LINENO(yyless_macro_arg);\
435 *yy_cp = (yy_hold_char); \
436 YY_RESTORE_YY_MORE_OFFSET \
437 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
438 YY_DO_BEFORE_ACTION; \
441#define unput(c) yyunput( c, (yytext_ptr) )
443#ifndef YY_STRUCT_YY_BUFFER_STATE
444#define YY_STRUCT_YY_BUFFER_STATE
460 yy_size_t yy_n_chars;
466 int yy_is_our_buffer;
473 int yy_is_interactive;
489 int yy_buffer_status;
491#define YY_BUFFER_NEW 0
492#define YY_BUFFER_NORMAL 1
503#define YY_BUFFER_EOF_PENDING 2
519#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
520 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
525#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
528static char yy_hold_char;
529static yy_size_t yy_n_chars;
533static char *yy_c_buf_p = NULL;
534static int yy_init = 0;
535static int yy_start = 0;
540static int yy_did_buffer_switch_on_eof;
542void yyrestart ( FILE *input_file );
548void yypop_buffer_state (
void );
550static void yyensure_buffer_stack (
void );
551static void yy_load_buffer_state (
void );
553#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
559void *yyalloc ( yy_size_t );
560void *yyrealloc (
void *, yy_size_t );
561void yyfree (
void * );
563#define yy_new_buffer yy_create_buffer
564#define yy_set_interactive(is_interactive) \
566 if ( ! YY_CURRENT_BUFFER ){ \
567 yyensure_buffer_stack (); \
568 YY_CURRENT_BUFFER_LVALUE = \
569 yy_create_buffer( yyin, YY_BUF_SIZE ); \
571 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
573#define yy_set_bol(at_bol) \
575 if ( ! YY_CURRENT_BUFFER ){\
576 yyensure_buffer_stack (); \
577 YY_CURRENT_BUFFER_LVALUE = \
578 yy_create_buffer( yyin, YY_BUF_SIZE ); \
580 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
582#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
587#define YY_SKIP_YYWRAP
588typedef flex_uint8_t YY_CHAR;
590FILE *yyin = NULL, *yyout = NULL;
592typedef int yy_state_type;
601#define yytext_ptr yytext
603static yy_state_type yy_get_previous_state (
void );
604static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
605static int yy_get_next_buffer (
void );
606static void yynoreturn yy_fatal_error (
const char* msg );
611#define YY_DO_BEFORE_ACTION \
612 (yytext_ptr) = yy_bp; \
613 yyleng = (yy_size_t) (yy_cp - yy_bp); \
614 (yy_hold_char) = *yy_cp; \
616 (yy_c_buf_p) = yy_cp;
617#define YY_NUM_RULES 7
618#define YY_END_OF_BUFFER 8
623 flex_int32_t yy_verify;
626static const flex_int16_t yy_accept[39] =
628 0, 0, 8, 6, 4, 2, 1, 6, 1, 0,
629 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
630 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
631 0, 0, 0, 0, 0, 0, 5, 0
634static const YY_CHAR yy_ec[256] =
636 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
637 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
638 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
639 1, 2, 1, 1, 4, 1, 1, 1, 1, 1,
640 1, 1, 1, 1, 1, 1, 5, 6, 6, 6,
641 6, 6, 6, 6, 6, 6, 6, 1, 1, 7,
642 1, 8, 1, 1, 9, 9, 9, 9, 9, 9,
643 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
644 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
645 1, 1, 1, 1, 1, 1, 10, 10, 10, 10,
647 11, 10, 12, 10, 13, 10, 14, 10, 10, 15,
648 10, 10, 10, 16, 17, 18, 10, 10, 10, 10,
649 19, 10, 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,
656 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,
662 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
666static const YY_CHAR yy_meta[20] =
668 1, 2, 3, 1, 1, 2, 1, 1, 2, 2,
669 2, 2, 2, 2, 2, 2, 2, 2, 2
672static const flex_int16_t yy_base[43] =
674 0, 6, 54, 55, 55, 55, 0, 0, 0, 42,
675 34, 32, 34, 41, 35, 0, 32, 39, 33, 39,
676 35, 28, 0, 30, 33, 20, 11, 30, 4, 55,
677 5, 8, 12, 13, 15, 22, 19, 55, 30, 33,
681static const flex_int16_t yy_def[43] =
683 39, 39, 38, 38, 38, 38, 40, 38, 40, 38,
684 38, 38, 38, 38, 38, 41, 38, 41, 38, 38,
685 38, 38, 42, 38, 42, 38, 42, 38, 42, 38,
686 42, 42, 42, 42, 42, 42, 42, 0, 38, 38,
690static const flex_int16_t yy_nxt[75] =
692 38, 5, 6, 7, 18, 38, 8, 5, 6, 7,
693 27, 27, 8, 10, 27, 29, 11, 27, 27, 27,
694 31, 27, 32, 33, 34, 27, 36, 35, 27, 37,
695 4, 4, 4, 9, 9, 25, 25, 30, 28, 27,
696 26, 24, 23, 22, 21, 20, 19, 17, 16, 15,
697 14, 13, 12, 38, 3, 38, 38, 38, 38, 38,
698 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
702static const flex_int16_t yy_chk[75] =
704 0, 1, 1, 1, 41, 0, 1, 2, 2, 2,
705 29, 31, 2, 8, 32, 27, 8, 27, 33, 34,
706 29, 35, 31, 32, 33, 37, 35, 34, 36, 36,
707 39, 39, 39, 40, 40, 42, 42, 28, 26, 25,
708 24, 22, 21, 20, 19, 18, 17, 15, 14, 13,
709 12, 11, 10, 3, 38, 38, 38, 38, 38, 38,
710 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
714static yy_state_type yy_last_accepting_state;
715static char *yy_last_accepting_cpos;
717extern int yy_flex_debug;
718int yy_flex_debug = 0;
723#define REJECT reject_used_but_not_detected
724#define yymore() yymore_used_but_not_detected
726#define YY_RESTORE_YY_MORE_OFFSET
728#line 1 "tokenparser.l"
767#line 42 "tokenparser.l"
782static void eval_key(
char *pcToken,
list_t *list_key);
783static void eval_value(
char *pcToken,
list_t *list_values);
784void tperrorCheck (
char *pcToken_error);
789#line 789 "tokenparser.c"
791#line 791 "tokenparser.c"
795#ifndef YY_NO_UNISTD_H
804#define YY_EXTRA_TYPE void *
807static int yy_init_globals (
void );
812int yylex_destroy (
void );
814int yyget_debug (
void );
816void yyset_debug (
int debug_flag );
818YY_EXTRA_TYPE yyget_extra (
void );
820void yyset_extra ( YY_EXTRA_TYPE user_defined );
822FILE *yyget_in (
void );
824void yyset_in ( FILE * _in_str );
826FILE *yyget_out (
void );
828void yyset_out ( FILE * _out_str );
830 yy_size_t yyget_leng (
void );
832char *yyget_text (
void );
834int yyget_lineno (
void );
836void yyset_lineno (
int _line_number );
842#ifndef YY_SKIP_YYWRAP
844extern "C" int yywrap (
void );
846extern int yywrap (
void );
855static void yy_flex_strncpy (
char *,
const char *,
int );
859static int yy_flex_strlen (
const char * );
864static int yyinput (
void );
866static int input (
void );
872#ifndef YY_READ_BUF_SIZE
875#define YY_READ_BUF_SIZE 16384
877#define YY_READ_BUF_SIZE 8192
886#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
893#define YY_INPUT(buf,result,max_size) \
894 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
898 for ( n = 0; n < max_size && \
899 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
902 buf[n++] = (char) c; \
903 if ( c == EOF && ferror( yyin ) ) \
904 YY_FATAL_ERROR( "input in flex scanner failed" ); \
910 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
912 if( errno != EINTR) \
914 YY_FATAL_ERROR( "input in flex scanner failed" ); \
930#define yyterminate() return YY_NULL
934#ifndef YY_START_STACK_INCR
935#define YY_START_STACK_INCR 25
939#ifndef YY_FATAL_ERROR
940#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
949#define YY_DECL_IS_OURS 1
951extern int yylex (
void);
953#define YY_DECL int yylex (void)
959#ifndef YY_USER_ACTION
960#define YY_USER_ACTION
965#define YY_BREAK break;
968#define YY_RULE_SETUP \
975 yy_state_type yy_current_state;
996 if ( ! YY_CURRENT_BUFFER ) {
997 yyensure_buffer_stack ();
998 YY_CURRENT_BUFFER_LVALUE =
999 yy_create_buffer( yyin, YY_BUF_SIZE );
1002 yy_load_buffer_state( );
1006#line 69 "tokenparser.l"
1009#line 1009 "tokenparser.c"
1013 yy_cp = (yy_c_buf_p);
1016 *yy_cp = (yy_hold_char);
1023 yy_current_state = (yy_start);
1027 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1028 if ( yy_accept[yy_current_state] )
1030 (yy_last_accepting_state) = yy_current_state;
1031 (yy_last_accepting_cpos) = yy_cp;
1033 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1035 yy_current_state = (int) yy_def[yy_current_state];
1036 if ( yy_current_state >= 39 )
1037 yy_c = yy_meta[yy_c];
1039 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1042 while ( yy_base[yy_current_state] != 55 );
1045 yy_act = yy_accept[yy_current_state];
1048 yy_cp = (yy_last_accepting_cpos);
1049 yy_current_state = (yy_last_accepting_state);
1050 yy_act = yy_accept[yy_current_state];
1053 YY_DO_BEFORE_ACTION;
1061 *yy_cp = (yy_hold_char);
1062 yy_cp = (yy_last_accepting_cpos);
1063 yy_current_state = (yy_last_accepting_state);
1064 goto yy_find_action;
1068#line 71 "tokenparser.l"
1074#line 72 "tokenparser.l"
1079#line 73 "tokenparser.l"
1080{ eval_key(yytext, ListKeys); }
1084#line 74 "tokenparser.l"
1089#line 75 "tokenparser.l"
1090{ eval_value(yytext, ListValues); }
1094#line 76 "tokenparser.l"
1095{ tperrorCheck(yytext); }
1099#line 77 "tokenparser.l"
1102#line 1102 "tokenparser.c"
1103case YY_STATE_EOF(INITIAL):
1106 case YY_END_OF_BUFFER:
1109 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1112 *yy_cp = (yy_hold_char);
1113 YY_RESTORE_YY_MORE_OFFSET
1115 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1126 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1127 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1128 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1138 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1140 yy_state_type yy_next_state;
1142 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1144 yy_current_state = yy_get_previous_state( );
1155 yy_next_state = yy_try_NUL_trans( yy_current_state );
1157 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1159 if ( yy_next_state )
1162 yy_cp = ++(yy_c_buf_p);
1163 yy_current_state = yy_next_state;
1169 yy_cp = (yy_c_buf_p);
1170 goto yy_find_action;
1174 else switch ( yy_get_next_buffer( ) )
1176 case EOB_ACT_END_OF_FILE:
1178 (yy_did_buffer_switch_on_eof) = 0;
1191 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1193 yy_act = YY_STATE_EOF(YY_START);
1199 if ( ! (yy_did_buffer_switch_on_eof) )
1205 case EOB_ACT_CONTINUE_SCAN:
1207 (yytext_ptr) + yy_amount_of_matched_text;
1209 yy_current_state = yy_get_previous_state( );
1211 yy_cp = (yy_c_buf_p);
1212 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1215 case EOB_ACT_LAST_MATCH:
1217 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1219 yy_current_state = yy_get_previous_state( );
1221 yy_cp = (yy_c_buf_p);
1222 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1223 goto yy_find_action;
1230 "fatal flex scanner internal error--no action found" );
1243static int yy_get_next_buffer (
void)
1245 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1246 char *source = (yytext_ptr);
1247 int number_to_move, i;
1250 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1252 "fatal flex scanner internal error--end of buffer missed" );
1254 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1256 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1261 return EOB_ACT_END_OF_FILE;
1269 return EOB_ACT_LAST_MATCH;
1276 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1278 for ( i = 0; i < number_to_move; ++i )
1279 *(dest++) = *(source++);
1281 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1285 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1289 yy_size_t num_to_read =
1290 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1292 while ( num_to_read <= 0 )
1298 int yy_c_buf_p_offset =
1299 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1301 if ( b->yy_is_our_buffer )
1303 yy_size_t new_size = b->yy_buf_size * 2;
1305 if ( new_size <= 0 )
1306 b->yy_buf_size += b->yy_buf_size / 8;
1308 b->yy_buf_size *= 2;
1310 b->yy_ch_buf = (
char *)
1312 yyrealloc( (
void *) b->yy_ch_buf,
1313 (yy_size_t) (b->yy_buf_size + 2) );
1317 b->yy_ch_buf = NULL;
1319 if ( ! b->yy_ch_buf )
1321 "fatal error - scanner input buffer overflow" );
1323 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1325 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1330 if ( num_to_read > YY_READ_BUF_SIZE )
1331 num_to_read = YY_READ_BUF_SIZE;
1334 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1335 (yy_n_chars), num_to_read );
1337 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1340 if ( (yy_n_chars) == 0 )
1342 if ( number_to_move == YY_MORE_ADJ )
1344 ret_val = EOB_ACT_END_OF_FILE;
1350 ret_val = EOB_ACT_LAST_MATCH;
1351 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1352 YY_BUFFER_EOF_PENDING;
1357 ret_val = EOB_ACT_CONTINUE_SCAN;
1359 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1361 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1362 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) yyrealloc(
1363 (
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1364 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1365 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1367 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1370 (yy_n_chars) += number_to_move;
1371 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1372 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1374 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1381 static yy_state_type yy_get_previous_state (
void)
1383 yy_state_type yy_current_state;
1386 yy_current_state = (yy_start);
1388 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1390 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1391 if ( yy_accept[yy_current_state] )
1393 (yy_last_accepting_state) = yy_current_state;
1394 (yy_last_accepting_cpos) = yy_cp;
1396 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1398 yy_current_state = (int) yy_def[yy_current_state];
1399 if ( yy_current_state >= 39 )
1400 yy_c = yy_meta[yy_c];
1402 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1405 return yy_current_state;
1413 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1416 char *yy_cp = (yy_c_buf_p);
1419 if ( yy_accept[yy_current_state] )
1421 (yy_last_accepting_state) = yy_current_state;
1422 (yy_last_accepting_cpos) = yy_cp;
1424 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1426 yy_current_state = (int) yy_def[yy_current_state];
1427 if ( yy_current_state >= 39 )
1428 yy_c = yy_meta[yy_c];
1430 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1431 yy_is_jam = (yy_current_state == 38);
1433 return yy_is_jam ? 0 : yy_current_state;
1442 static int yyinput (
void)
1444 static int input (
void)
1450 *(yy_c_buf_p) = (yy_hold_char);
1452 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1458 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1460 *(yy_c_buf_p) =
'\0';
1464 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1467 switch ( yy_get_next_buffer( ) )
1469 case EOB_ACT_LAST_MATCH:
1485 case EOB_ACT_END_OF_FILE:
1490 if ( ! (yy_did_buffer_switch_on_eof) )
1499 case EOB_ACT_CONTINUE_SCAN:
1500 (yy_c_buf_p) = (yytext_ptr) + offset;
1506 c = *(
unsigned char *) (yy_c_buf_p);
1507 *(yy_c_buf_p) =
'\0';
1508 (yy_hold_char) = *++(yy_c_buf_p);
1519 void yyrestart (FILE * input_file )
1522 if ( ! YY_CURRENT_BUFFER ){
1523 yyensure_buffer_stack ();
1524 YY_CURRENT_BUFFER_LVALUE =
1525 yy_create_buffer( yyin, YY_BUF_SIZE );
1528 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1529 yy_load_buffer_state( );
1544 yyensure_buffer_stack ();
1545 if ( YY_CURRENT_BUFFER == new_buffer )
1548 if ( YY_CURRENT_BUFFER )
1551 *(yy_c_buf_p) = (yy_hold_char);
1552 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1553 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1556 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1557 yy_load_buffer_state( );
1564 (yy_did_buffer_switch_on_eof) = 1;
1567static void yy_load_buffer_state (
void)
1569 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1570 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1571 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1572 (yy_hold_char) = *(yy_c_buf_p);
1587 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1589 b->yy_buf_size = size;
1594 b->yy_ch_buf = (
char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1595 if ( ! b->yy_ch_buf )
1596 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1598 b->yy_is_our_buffer = 1;
1600 yy_init_buffer( b, file );
1615 if ( b == YY_CURRENT_BUFFER )
1618 if ( b->yy_is_our_buffer )
1619 yyfree( (
void *) b->yy_ch_buf );
1621 yyfree( (
void *) b );
1633 yy_flush_buffer( b );
1635 b->yy_input_file = file;
1636 b->yy_fill_buffer = 1;
1642 if (b != YY_CURRENT_BUFFER){
1647 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1667 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1668 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1670 b->yy_buf_pos = &b->yy_ch_buf[0];
1673 b->yy_buffer_status = YY_BUFFER_NEW;
1675 if ( b == YY_CURRENT_BUFFER )
1676 yy_load_buffer_state( );
1687 if (new_buffer == NULL)
1690 yyensure_buffer_stack();
1693 if ( YY_CURRENT_BUFFER )
1696 *(yy_c_buf_p) = (yy_hold_char);
1697 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1698 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1702 if (YY_CURRENT_BUFFER)
1704 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1707 yy_load_buffer_state( );
1708 (yy_did_buffer_switch_on_eof) = 1;
1715void yypop_buffer_state (
void)
1717 if (!YY_CURRENT_BUFFER)
1720 yy_delete_buffer(YY_CURRENT_BUFFER );
1721 YY_CURRENT_BUFFER_LVALUE = NULL;
1725 if (YY_CURRENT_BUFFER) {
1726 yy_load_buffer_state( );
1727 (yy_did_buffer_switch_on_eof) = 1;
1734static void yyensure_buffer_stack (
void)
1736 yy_size_t num_to_alloc;
1749 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
1761 yy_size_t grow_size = 8 ;
1769 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
1788 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1789 base[size-1] != YY_END_OF_BUFFER_CHAR )
1795 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_buffer()" );
1797 b->yy_buf_size = (int) (size - 2);
1798 b->yy_buf_pos = b->yy_ch_buf = base;
1799 b->yy_is_our_buffer = 0;
1800 b->yy_input_file = NULL;
1801 b->yy_n_chars = b->yy_buf_size;
1802 b->yy_is_interactive = 0;
1804 b->yy_fill_buffer = 0;
1805 b->yy_buffer_status = YY_BUFFER_NEW;
1807 yy_switch_to_buffer( b );
1823 return yy_scan_bytes( yystr, (
int) strlen(yystr) );
1833YY_BUFFER_STATE yy_scan_bytes (
const char * yybytes, yy_size_t _yybytes_len )
1841 n = (yy_size_t) (_yybytes_len + 2);
1842 buf = (
char *) yyalloc( n );
1844 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_bytes()" );
1846 for ( i = 0; i < _yybytes_len; ++i )
1847 buf[i] = yybytes[i];
1849 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1851 b = yy_scan_buffer( buf, n );
1853 YY_FATAL_ERROR(
"bad buffer in yy_scan_bytes()" );
1858 b->yy_is_our_buffer = 1;
1863#ifndef YY_EXIT_FAILURE
1864#define YY_EXIT_FAILURE 2
1867static void yynoreturn yy_fatal_error (
const char* msg )
1869 fprintf( stderr,
"%s\n", msg );
1870 exit( YY_EXIT_FAILURE );
1880 yy_size_t yyless_macro_arg = (n); \
1881 YY_LESS_LINENO(yyless_macro_arg);\
1882 yytext[yyleng] = (yy_hold_char); \
1883 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1884 (yy_hold_char) = *(yy_c_buf_p); \
1885 *(yy_c_buf_p) = '\0'; \
1886 yyleng = yyless_macro_arg; \
1895int yyget_lineno (
void)
1904FILE *yyget_in (
void)
1912FILE *yyget_out (
void)
1920yy_size_t yyget_leng (
void)
1929char *yyget_text (
void)
1938void yyset_lineno (
int _line_number )
1941 yylineno = _line_number;
1950void yyset_in (FILE * _in_str )
1955void yyset_out (FILE * _out_str )
1960int yyget_debug (
void)
1962 return yy_flex_debug;
1965void yyset_debug (
int _bdebug )
1967 yy_flex_debug = _bdebug ;
1970static int yy_init_globals (
void)
1979 (yy_c_buf_p) = NULL;
1999int yylex_destroy (
void)
2003 while(YY_CURRENT_BUFFER){
2004 yy_delete_buffer( YY_CURRENT_BUFFER );
2005 YY_CURRENT_BUFFER_LVALUE = NULL;
2006 yypop_buffer_state();
2025static void yy_flex_strncpy (
char* s1,
const char * s2,
int n )
2029 for ( i = 0; i < n; ++i )
2034#ifdef YY_NEED_STRLEN
2035static int yy_flex_strlen (
const char * s )
2038 for ( n = 0; s[n]; ++n )
2045void *yyalloc (yy_size_t size )
2047 return malloc(size);
2050void *yyrealloc (
void * ptr, yy_size_t size )
2060 return realloc(ptr, size);
2063void yyfree (
void * ptr )
2065 free( (
char *) ptr );
2068#define YYTABLES_NAME "yytables"
2070#line 77 "tokenparser.l"
2074static void eval_key(
char *pcToken,
list_t *list_key)
2081 elt = malloc(
sizeof(*elt));
2088 for (len=0; pcToken[len+5] !=
'<'; len++)
2092 elt->key = malloc(len);
2093 memcpy(elt->key, &pcToken[5], len-1);
2094 elt->key[len-1] =
'\0';
2096 r = list_init(&elt->values);
2101 list_append(list_key, elt);
2104 ListValues = &elt->values;
2107static void eval_value(
char *pcToken,
list_t *list_values)
2118 for (len=0; pcToken[len+8] !=
'<'; len++)
2122 value = malloc(len);
2125 memcpy(value, &pcToken[8], len-1);
2126 value[len-1] =
'\0';
2130 while ((amp = strstr(amp,
"&")) != NULL)
2135 for (p = amp+1; *(p+4); p++)
2146 r = list_append(list_values, value);
2151void tperrorCheck (
char *token_error)
2166int LTPBundleFindValueWithKey(
list_t *l,
const char *key,
list_t **values)
2171 for (i=0; i < list_size(l); i++)
2175 elt = list_get_at(l, i);
2178 if (0 == strcmp(elt->key, key))
2180 *values = &elt->values;
2197int bundleParse(
const char *fileName,
list_t *l)
2205 file = fopen(fileName,
"r");
2208 Log3(PCSC_LOG_CRITICAL,
"Could not open bundle file %s: %s",
2209 fileName, strerror(errno));
2223 }
while (!feof(file));
2229 printf(
"size: %d\n", list_size(l));
2230 for (i=0; i < list_size(l); i++)
2235 elt = list_get_at(l, i);
2237 printf(
"Key: %s\n", elt->key);
2239 for (j=0; j<list_size(&elt->values); j++)
2241 char *v = list_get_at(&elt->values, j);
2242 printf(
" value: %s\n", v);
2255void bundleRelease(
list_t *l)
2259 for (i=0; i < list_size(l); i++)
2264 elt = list_get_at(l, i);
2268 for (j=0; j<list_size(&elt->values); j++)
2269 free(list_get_at(&elt->values, j));
2270 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.