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
286#if !defined(__GNU_LIBRARY__) && defined(__STDC__)
289#if !(defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
290 defined(_POSIX_SOURCE))
291# define _POSIX_C_SOURCE 1
292# define _POSIX_SOURCE 1
306#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
311# define YYFLEX_USE_STDINT
313# if defined(_MSC_VER) && _MSC_VER >= 1600
318# define YYFLEX_USE_STDINT
321#ifdef YYFLEX_USE_STDINT
322typedef int8_t flex_int8_t;
323typedef uint8_t flex_uint8_t;
324typedef int16_t flex_int16_t;
325typedef uint16_t flex_uint16_t;
326typedef int32_t flex_int32_t;
327typedef uint32_t flex_uint32_t;
329typedef unsigned char flex_uint8_t;
330typedef short int flex_int16_t;
331typedef unsigned short int flex_uint16_t;
333typedef signed char flex_int8_t;
336# if UINT_MAX >= 4294967295
337# define YYFLEX_INT32_DEFINED
338typedef int flex_int32_t;
339typedef unsigned int flex_uint32_t;
342typedef char flex_int8_t;
344# ifndef YYFLEX_INT32_DEFINED
345typedef long int flex_int32_t;
346typedef unsigned long int flex_uint32_t;
353#if defined(__GNUC__) && __GNUC__ >= 3
354#define yynoreturn __attribute__((__noreturn__))
365#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
371#define BEGIN (yy_start) = 1 + 2 *
376#define YY_START (((yy_start) - 1) / 2)
377#define YYSTATE YY_START
379#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
381#define YY_NEW_FILE yyrestart( yyin )
382#define YY_END_OF_BUFFER_CHAR 0
391#define YY_BUF_SIZE 32768
393#define YY_BUF_SIZE 16384
399#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
401#ifndef YY_TYPEDEF_YY_BUFFER_STATE
402#define YY_TYPEDEF_YY_BUFFER_STATE
406#ifndef YY_TYPEDEF_YY_SIZE_T
407#define YY_TYPEDEF_YY_SIZE_T
408typedef size_t yy_size_t;
413extern FILE *yyin, *yyout;
415#define EOB_ACT_CONTINUE_SCAN 0
416#define EOB_ACT_END_OF_FILE 1
417#define EOB_ACT_LAST_MATCH 2
419 #define YY_LESS_LINENO(n)
420 #define YY_LINENO_REWIND_TO(ptr)
427 int yyless_macro_arg = (n); \
428 YY_LESS_LINENO(yyless_macro_arg);\
429 *yy_cp = (yy_hold_char); \
430 YY_RESTORE_YY_MORE_OFFSET \
431 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
432 YY_DO_BEFORE_ACTION; \
435#define unput(c) yyunput( c, (yytext_ptr) )
437#ifndef YY_STRUCT_YY_BUFFER_STATE
438#define YY_STRUCT_YY_BUFFER_STATE
460 int yy_is_our_buffer;
467 int yy_is_interactive;
483 int yy_buffer_status;
485#define YY_BUFFER_NEW 0
486#define YY_BUFFER_NORMAL 1
497#define YY_BUFFER_EOF_PENDING 2
513#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
514 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
519#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
522static char yy_hold_char;
523static int yy_n_chars;
527static char *yy_c_buf_p = NULL;
528static int yy_init = 0;
529static int yy_start = 0;
534static int yy_did_buffer_switch_on_eof;
536void yyrestart ( FILE *input_file );
542void yypop_buffer_state (
void );
544static void yyensure_buffer_stack (
void );
545static void yy_load_buffer_state (
void );
547#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
553void *yyalloc ( yy_size_t );
554void *yyrealloc (
void *, yy_size_t );
555void yyfree (
void * );
557#define yy_new_buffer yy_create_buffer
558#define yy_set_interactive(is_interactive) \
560 if ( ! YY_CURRENT_BUFFER ){ \
561 yyensure_buffer_stack (); \
562 YY_CURRENT_BUFFER_LVALUE = \
563 yy_create_buffer( yyin, YY_BUF_SIZE ); \
565 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
567#define yy_set_bol(at_bol) \
569 if ( ! YY_CURRENT_BUFFER ){\
570 yyensure_buffer_stack (); \
571 YY_CURRENT_BUFFER_LVALUE = \
572 yy_create_buffer( yyin, YY_BUF_SIZE ); \
574 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
576#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
581#define YY_SKIP_YYWRAP
582typedef flex_uint8_t YY_CHAR;
584FILE *yyin = NULL, *yyout = NULL;
586typedef int yy_state_type;
595#define yytext_ptr yytext
597static yy_state_type yy_get_previous_state (
void );
598static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
599static int yy_get_next_buffer (
void );
600static void yynoreturn yy_fatal_error (
const char* msg );
605#define YY_DO_BEFORE_ACTION \
606 (yytext_ptr) = yy_bp; \
607 yyleng = (int) (yy_cp - yy_bp); \
608 (yy_hold_char) = *yy_cp; \
610 (yy_c_buf_p) = yy_cp;
611#define YY_NUM_RULES 7
612#define YY_END_OF_BUFFER 8
617 flex_int32_t yy_verify;
620static const flex_int16_t yy_accept[39] =
622 0, 0, 8, 6, 4, 2, 1, 6, 1, 0,
623 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
624 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
625 0, 0, 0, 0, 0, 0, 5, 0
628static const YY_CHAR yy_ec[256] =
630 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
631 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
632 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
633 1, 2, 1, 1, 4, 1, 1, 1, 1, 1,
634 1, 1, 1, 1, 1, 1, 5, 6, 6, 6,
635 6, 6, 6, 6, 6, 6, 6, 1, 1, 7,
636 1, 8, 1, 1, 9, 9, 9, 9, 9, 9,
637 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
638 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
639 1, 1, 1, 1, 1, 1, 10, 10, 10, 10,
641 11, 10, 12, 10, 13, 10, 14, 10, 10, 15,
642 10, 10, 10, 16, 17, 18, 10, 10, 10, 10,
643 19, 10, 1, 1, 1, 1, 1, 1, 1, 1,
644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
646 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
647 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
648 1, 1, 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,
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,
660static const YY_CHAR yy_meta[20] =
662 1, 2, 3, 1, 1, 2, 1, 1, 2, 2,
663 2, 2, 2, 2, 2, 2, 2, 2, 2
666static const flex_int16_t yy_base[43] =
668 0, 6, 54, 55, 55, 55, 0, 0, 0, 42,
669 34, 32, 34, 41, 35, 0, 32, 39, 33, 39,
670 35, 28, 0, 30, 33, 20, 11, 30, 4, 55,
671 5, 8, 12, 13, 15, 22, 19, 55, 30, 33,
675static const flex_int16_t yy_def[43] =
677 39, 39, 38, 38, 38, 38, 40, 38, 40, 38,
678 38, 38, 38, 38, 38, 41, 38, 41, 38, 38,
679 38, 38, 42, 38, 42, 38, 42, 38, 42, 38,
680 42, 42, 42, 42, 42, 42, 42, 0, 38, 38,
684static const flex_int16_t yy_nxt[75] =
686 38, 5, 6, 7, 18, 38, 8, 5, 6, 7,
687 27, 27, 8, 10, 27, 29, 11, 27, 27, 27,
688 31, 27, 32, 33, 34, 27, 36, 35, 27, 37,
689 4, 4, 4, 9, 9, 25, 25, 30, 28, 27,
690 26, 24, 23, 22, 21, 20, 19, 17, 16, 15,
691 14, 13, 12, 38, 3, 38, 38, 38, 38, 38,
692 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
696static const flex_int16_t yy_chk[75] =
698 0, 1, 1, 1, 41, 0, 1, 2, 2, 2,
699 29, 31, 2, 8, 32, 27, 8, 27, 33, 34,
700 29, 35, 31, 32, 33, 37, 35, 34, 36, 36,
701 39, 39, 39, 40, 40, 42, 42, 28, 26, 25,
702 24, 22, 21, 20, 19, 18, 17, 15, 14, 13,
703 12, 11, 10, 3, 38, 38, 38, 38, 38, 38,
704 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
708static yy_state_type yy_last_accepting_state;
709static char *yy_last_accepting_cpos;
711extern int yy_flex_debug;
712int yy_flex_debug = 0;
717#define REJECT reject_used_but_not_detected
718#define yymore() yymore_used_but_not_detected
720#define YY_RESTORE_YY_MORE_OFFSET
722#line 1 "tokenparser.l"
761#line 42 "tokenparser.l"
776static void eval_key(
char *pcToken,
list_t *list_key);
777static void eval_value(
char *pcToken,
list_t *list_values);
778void tperrorCheck (
char *pcToken_error);
783#line 784 "tokenparser.c"
785#line 786 "tokenparser.c"
789#ifndef YY_NO_UNISTD_H
798#define YY_EXTRA_TYPE void *
801static int yy_init_globals (
void );
806int yylex_destroy (
void );
808int yyget_debug (
void );
810void yyset_debug (
int debug_flag );
812YY_EXTRA_TYPE yyget_extra (
void );
814void yyset_extra ( YY_EXTRA_TYPE user_defined );
816FILE *yyget_in (
void );
818void yyset_in ( FILE * _in_str );
820FILE *yyget_out (
void );
822void yyset_out ( FILE * _out_str );
824 int yyget_leng (
void );
826char *yyget_text (
void );
828int yyget_lineno (
void );
830void yyset_lineno (
int _line_number );
836#ifndef YY_SKIP_YYWRAP
838extern "C" int yywrap (
void );
840extern int yywrap (
void );
849static void yy_flex_strncpy (
char *,
const char *,
int );
853static int yy_flex_strlen (
const char * );
858static int yyinput (
void );
860static int input (
void );
866#ifndef YY_READ_BUF_SIZE
869#define YY_READ_BUF_SIZE 16384
871#define YY_READ_BUF_SIZE 8192
880#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
887#define YY_INPUT(buf,result,max_size) \
888 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
892 for ( n = 0; n < max_size && \
893 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
896 buf[n++] = (char) c; \
897 if ( c == EOF && ferror( yyin ) ) \
898 YY_FATAL_ERROR( "input in flex scanner failed" ); \
904 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
906 if( errno != EINTR) \
908 YY_FATAL_ERROR( "input in flex scanner failed" ); \
924#define yyterminate() return YY_NULL
928#ifndef YY_START_STACK_INCR
929#define YY_START_STACK_INCR 25
933#ifndef YY_FATAL_ERROR
934#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
943#define YY_DECL_IS_OURS 1
945extern int yylex (
void);
947#define YY_DECL int yylex (void)
953#ifndef YY_USER_ACTION
954#define YY_USER_ACTION
959#define YY_BREAK break;
962#define YY_RULE_SETUP \
969 yy_state_type yy_current_state;
990 if ( ! YY_CURRENT_BUFFER ) {
991 yyensure_buffer_stack ();
992 YY_CURRENT_BUFFER_LVALUE =
993 yy_create_buffer( yyin, YY_BUF_SIZE );
996 yy_load_buffer_state( );
1000#line 69 "tokenparser.l"
1003#line 1004 "tokenparser.c"
1007 yy_cp = (yy_c_buf_p);
1010 *yy_cp = (yy_hold_char);
1017 yy_current_state = (yy_start);
1021 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1022 if ( yy_accept[yy_current_state] )
1024 (yy_last_accepting_state) = yy_current_state;
1025 (yy_last_accepting_cpos) = yy_cp;
1027 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1029 yy_current_state = (int) yy_def[yy_current_state];
1030 if ( yy_current_state >= 39 )
1031 yy_c = yy_meta[yy_c];
1033 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1036 while ( yy_base[yy_current_state] != 55 );
1039 yy_act = yy_accept[yy_current_state];
1042 yy_cp = (yy_last_accepting_cpos);
1043 yy_current_state = (yy_last_accepting_state);
1044 yy_act = yy_accept[yy_current_state];
1047 YY_DO_BEFORE_ACTION;
1055 *yy_cp = (yy_hold_char);
1056 yy_cp = (yy_last_accepting_cpos);
1057 yy_current_state = (yy_last_accepting_state);
1058 goto yy_find_action;
1062#line 71 "tokenparser.l"
1068#line 72 "tokenparser.l"
1073#line 73 "tokenparser.l"
1074{ eval_key(yytext, ListKeys); }
1078#line 74 "tokenparser.l"
1083#line 75 "tokenparser.l"
1084{ eval_value(yytext, ListValues); }
1088#line 76 "tokenparser.l"
1089{ tperrorCheck(yytext); }
1093#line 77 "tokenparser.l"
1096#line 1097 "tokenparser.c"
1097case YY_STATE_EOF(INITIAL):
1100 case YY_END_OF_BUFFER:
1103 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1106 *yy_cp = (yy_hold_char);
1107 YY_RESTORE_YY_MORE_OFFSET
1109 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1120 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1121 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1122 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1132 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1134 yy_state_type yy_next_state;
1136 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1138 yy_current_state = yy_get_previous_state( );
1149 yy_next_state = yy_try_NUL_trans( yy_current_state );
1151 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1153 if ( yy_next_state )
1156 yy_cp = ++(yy_c_buf_p);
1157 yy_current_state = yy_next_state;
1163 yy_cp = (yy_c_buf_p);
1164 goto yy_find_action;
1168 else switch ( yy_get_next_buffer( ) )
1170 case EOB_ACT_END_OF_FILE:
1172 (yy_did_buffer_switch_on_eof) = 0;
1185 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1187 yy_act = YY_STATE_EOF(YY_START);
1193 if ( ! (yy_did_buffer_switch_on_eof) )
1199 case EOB_ACT_CONTINUE_SCAN:
1201 (yytext_ptr) + yy_amount_of_matched_text;
1203 yy_current_state = yy_get_previous_state( );
1205 yy_cp = (yy_c_buf_p);
1206 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1209 case EOB_ACT_LAST_MATCH:
1211 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1213 yy_current_state = yy_get_previous_state( );
1215 yy_cp = (yy_c_buf_p);
1216 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1217 goto yy_find_action;
1224 "fatal flex scanner internal error--no action found" );
1237static int yy_get_next_buffer (
void)
1239 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1240 char *source = (yytext_ptr);
1241 int number_to_move, i;
1244 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1246 "fatal flex scanner internal error--end of buffer missed" );
1248 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1250 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1255 return EOB_ACT_END_OF_FILE;
1263 return EOB_ACT_LAST_MATCH;
1270 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1272 for ( i = 0; i < number_to_move; ++i )
1273 *(dest++) = *(source++);
1275 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1279 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1284 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1286 while ( num_to_read <= 0 )
1292 int yy_c_buf_p_offset =
1293 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1295 if ( b->yy_is_our_buffer )
1297 int new_size = b->yy_buf_size * 2;
1299 if ( new_size <= 0 )
1300 b->yy_buf_size += b->yy_buf_size / 8;
1302 b->yy_buf_size *= 2;
1304 b->yy_ch_buf = (
char *)
1306 yyrealloc( (
void *) b->yy_ch_buf,
1307 (yy_size_t) (b->yy_buf_size + 2) );
1311 b->yy_ch_buf = NULL;
1313 if ( ! b->yy_ch_buf )
1315 "fatal error - scanner input buffer overflow" );
1317 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1319 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1324 if ( num_to_read > YY_READ_BUF_SIZE )
1325 num_to_read = YY_READ_BUF_SIZE;
1328 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1329 (yy_n_chars), num_to_read );
1331 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1334 if ( (yy_n_chars) == 0 )
1336 if ( number_to_move == YY_MORE_ADJ )
1338 ret_val = EOB_ACT_END_OF_FILE;
1344 ret_val = EOB_ACT_LAST_MATCH;
1345 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1346 YY_BUFFER_EOF_PENDING;
1351 ret_val = EOB_ACT_CONTINUE_SCAN;
1353 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1355 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1356 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) yyrealloc(
1357 (
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1358 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1359 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1361 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1364 (yy_n_chars) += number_to_move;
1365 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1366 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1368 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1375 static yy_state_type yy_get_previous_state (
void)
1377 yy_state_type yy_current_state;
1380 yy_current_state = (yy_start);
1382 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1384 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1385 if ( yy_accept[yy_current_state] )
1387 (yy_last_accepting_state) = yy_current_state;
1388 (yy_last_accepting_cpos) = yy_cp;
1390 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1392 yy_current_state = (int) yy_def[yy_current_state];
1393 if ( yy_current_state >= 39 )
1394 yy_c = yy_meta[yy_c];
1396 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1399 return yy_current_state;
1407 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1410 char *yy_cp = (yy_c_buf_p);
1413 if ( yy_accept[yy_current_state] )
1415 (yy_last_accepting_state) = yy_current_state;
1416 (yy_last_accepting_cpos) = yy_cp;
1418 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1420 yy_current_state = (int) yy_def[yy_current_state];
1421 if ( yy_current_state >= 39 )
1422 yy_c = yy_meta[yy_c];
1424 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1425 yy_is_jam = (yy_current_state == 38);
1427 return yy_is_jam ? 0 : yy_current_state;
1436 static int yyinput (
void)
1438 static int input (
void)
1444 *(yy_c_buf_p) = (yy_hold_char);
1446 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1452 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1454 *(yy_c_buf_p) =
'\0';
1458 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1461 switch ( yy_get_next_buffer( ) )
1463 case EOB_ACT_LAST_MATCH:
1479 case EOB_ACT_END_OF_FILE:
1484 if ( ! (yy_did_buffer_switch_on_eof) )
1493 case EOB_ACT_CONTINUE_SCAN:
1494 (yy_c_buf_p) = (yytext_ptr) + offset;
1500 c = *(
unsigned char *) (yy_c_buf_p);
1501 *(yy_c_buf_p) =
'\0';
1502 (yy_hold_char) = *++(yy_c_buf_p);
1513 void yyrestart (FILE * input_file )
1516 if ( ! YY_CURRENT_BUFFER ){
1517 yyensure_buffer_stack ();
1518 YY_CURRENT_BUFFER_LVALUE =
1519 yy_create_buffer( yyin, YY_BUF_SIZE );
1522 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1523 yy_load_buffer_state( );
1538 yyensure_buffer_stack ();
1539 if ( YY_CURRENT_BUFFER == new_buffer )
1542 if ( YY_CURRENT_BUFFER )
1545 *(yy_c_buf_p) = (yy_hold_char);
1546 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1547 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1550 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1551 yy_load_buffer_state( );
1558 (yy_did_buffer_switch_on_eof) = 1;
1561static void yy_load_buffer_state (
void)
1563 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1564 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1565 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1566 (yy_hold_char) = *(yy_c_buf_p);
1581 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1583 b->yy_buf_size = size;
1588 b->yy_ch_buf = (
char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
1589 if ( ! b->yy_ch_buf )
1590 YY_FATAL_ERROR(
"out of dynamic memory in yy_create_buffer()" );
1592 b->yy_is_our_buffer = 1;
1594 yy_init_buffer( b, file );
1609 if ( b == YY_CURRENT_BUFFER )
1612 if ( b->yy_is_our_buffer )
1613 yyfree( (
void *) b->yy_ch_buf );
1615 yyfree( (
void *) b );
1627 yy_flush_buffer( b );
1629 b->yy_input_file = file;
1630 b->yy_fill_buffer = 1;
1636 if (b != YY_CURRENT_BUFFER){
1641 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1661 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1662 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1664 b->yy_buf_pos = &b->yy_ch_buf[0];
1667 b->yy_buffer_status = YY_BUFFER_NEW;
1669 if ( b == YY_CURRENT_BUFFER )
1670 yy_load_buffer_state( );
1681 if (new_buffer == NULL)
1684 yyensure_buffer_stack();
1687 if ( YY_CURRENT_BUFFER )
1690 *(yy_c_buf_p) = (yy_hold_char);
1691 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1692 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1696 if (YY_CURRENT_BUFFER)
1698 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1701 yy_load_buffer_state( );
1702 (yy_did_buffer_switch_on_eof) = 1;
1709void yypop_buffer_state (
void)
1711 if (!YY_CURRENT_BUFFER)
1714 yy_delete_buffer(YY_CURRENT_BUFFER );
1715 YY_CURRENT_BUFFER_LVALUE = NULL;
1719 if (YY_CURRENT_BUFFER) {
1720 yy_load_buffer_state( );
1721 (yy_did_buffer_switch_on_eof) = 1;
1728static void yyensure_buffer_stack (
void)
1730 yy_size_t num_to_alloc;
1743 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
1755 yy_size_t grow_size = 8 ;
1763 YY_FATAL_ERROR(
"out of dynamic memory in yyensure_buffer_stack()" );
1782 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1783 base[size-1] != YY_END_OF_BUFFER_CHAR )
1789 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_buffer()" );
1791 b->yy_buf_size = (int) (size - 2);
1792 b->yy_buf_pos = b->yy_ch_buf = base;
1793 b->yy_is_our_buffer = 0;
1794 b->yy_input_file = NULL;
1795 b->yy_n_chars = b->yy_buf_size;
1796 b->yy_is_interactive = 0;
1798 b->yy_fill_buffer = 0;
1799 b->yy_buffer_status = YY_BUFFER_NEW;
1801 yy_switch_to_buffer( b );
1817 return yy_scan_bytes( yystr, (
int) strlen(yystr) );
1827YY_BUFFER_STATE yy_scan_bytes (
const char * yybytes,
int _yybytes_len )
1835 n = (yy_size_t) (_yybytes_len + 2);
1836 buf = (
char *) yyalloc( n );
1838 YY_FATAL_ERROR(
"out of dynamic memory in yy_scan_bytes()" );
1840 for ( i = 0; i < _yybytes_len; ++i )
1841 buf[i] = yybytes[i];
1843 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1845 b = yy_scan_buffer( buf, n );
1847 YY_FATAL_ERROR(
"bad buffer in yy_scan_bytes()" );
1852 b->yy_is_our_buffer = 1;
1857#ifndef YY_EXIT_FAILURE
1858#define YY_EXIT_FAILURE 2
1861static void yynoreturn yy_fatal_error (
const char* msg )
1863 fprintf( stderr,
"%s\n", msg );
1864 exit( YY_EXIT_FAILURE );
1874 int yyless_macro_arg = (n); \
1875 YY_LESS_LINENO(yyless_macro_arg);\
1876 yytext[yyleng] = (yy_hold_char); \
1877 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1878 (yy_hold_char) = *(yy_c_buf_p); \
1879 *(yy_c_buf_p) = '\0'; \
1880 yyleng = yyless_macro_arg; \
1889int yyget_lineno (
void)
1898FILE *yyget_in (
void)
1906FILE *yyget_out (
void)
1914int yyget_leng (
void)
1923char *yyget_text (
void)
1932void yyset_lineno (
int _line_number )
1935 yylineno = _line_number;
1944void yyset_in (FILE * _in_str )
1949void yyset_out (FILE * _out_str )
1954int yyget_debug (
void)
1956 return yy_flex_debug;
1959void yyset_debug (
int _bdebug )
1961 yy_flex_debug = _bdebug ;
1964static int yy_init_globals (
void)
1973 (yy_c_buf_p) = NULL;
1993int yylex_destroy (
void)
1997 while(YY_CURRENT_BUFFER){
1998 yy_delete_buffer( YY_CURRENT_BUFFER );
1999 YY_CURRENT_BUFFER_LVALUE = NULL;
2000 yypop_buffer_state();
2019static void yy_flex_strncpy (
char* s1,
const char * s2,
int n )
2023 for ( i = 0; i < n; ++i )
2028#ifdef YY_NEED_STRLEN
2029static int yy_flex_strlen (
const char * s )
2032 for ( n = 0; s[n]; ++n )
2039void *yyalloc (yy_size_t size )
2041 return malloc(size);
2044void *yyrealloc (
void * ptr, yy_size_t size )
2054 return realloc(ptr, size);
2057void yyfree (
void * ptr )
2059 free( (
char *) ptr );
2062#define YYTABLES_NAME "yytables"
2064#line 77 "tokenparser.l"
2068static void eval_key(
char *pcToken,
list_t *list_key)
2075 elt = malloc(
sizeof(*elt));
2082 for (len=0; pcToken[len+5] !=
'<'; len++)
2086 elt->key = malloc(len);
2087 memcpy(elt->key, &pcToken[5], len-1);
2088 elt->key[len-1] =
'\0';
2090 r = list_init(&elt->values);
2095 list_append(list_key, elt);
2098 ListValues = &elt->values;
2101static void eval_value(
char *pcToken,
list_t *list_values)
2112 for (len=0; pcToken[len+8] !=
'<'; len++)
2116 value = malloc(len);
2119 memcpy(value, &pcToken[8], len-1);
2120 value[len-1] =
'\0';
2124 while ((amp = strstr(amp,
"&")) != NULL)
2129 for (p = amp+1; *(p+4); p++)
2140 r = list_append(list_values, value);
2145void tperrorCheck (
char *token_error)
2160int LTPBundleFindValueWithKey(
list_t *l,
const char *key,
list_t **values)
2165 for (i=0; i < list_size(l); i++)
2169 elt = list_get_at(l, i);
2172 if (0 == strcmp(elt->key, key))
2174 *values = &elt->values;
2191int bundleParse(
const char *fileName,
list_t *l)
2199 file = fopen(fileName,
"r");
2202 Log3(PCSC_LOG_CRITICAL,
"Could not open bundle file %s: %s",
2203 fileName, strerror(errno));
2217 }
while (!feof(file));
2223 printf(
"size: %d\n", list_size(l));
2224 for (i=0; i < list_size(l); i++)
2229 elt = list_get_at(l, i);
2231 printf(
"Key: %s\n", elt->key);
2233 for (j=0; j<list_size(&elt->values); j++)
2235 char *v = list_get_at(&elt->values, j);
2236 printf(
" value: %s\n", v);
2249void bundleRelease(
list_t *l)
2253 for (i=0; i < list_size(l); i++)
2258 elt = list_get_at(l, i);
2262 for (j=0; j<list_size(&elt->values); j++)
2263 free(list_get_at(&elt->values, j));
2264 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.