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_flex_debug tp_flex_debug
11#define yy_init_buffer tp_init_buffer
12#define yy_flush_buffer tp_flush_buffer
13#define yy_load_buffer_state tp_load_buffer_state
14#define yy_switch_to_buffer tp_switch_to_buffer
18#define yylineno tplineno
20#define yyrestart tprestart
23#define yyalloc tpalloc
24#define yyrealloc tprealloc
28#define YY_FLEX_MAJOR_VERSION 2
29#define YY_FLEX_MINOR_VERSION 5
30#define YY_FLEX_SUBMINOR_VERSION 35
31#if YY_FLEX_SUBMINOR_VERSION > 0
52#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
57#ifndef __STDC_LIMIT_MACROS
58#define __STDC_LIMIT_MACROS 1
62typedef int8_t flex_int8_t;
63typedef uint8_t flex_uint8_t;
64typedef int16_t flex_int16_t;
65typedef uint16_t flex_uint16_t;
66typedef int32_t flex_int32_t;
67typedef uint32_t flex_uint32_t;
68typedef uint64_t flex_uint64_t;
70typedef signed char flex_int8_t;
71typedef short int flex_int16_t;
72typedef int flex_int32_t;
73typedef unsigned char flex_uint8_t;
74typedef unsigned short int flex_uint16_t;
75typedef unsigned int flex_uint32_t;
80#define INT8_MIN (-128)
83#define INT16_MIN (-32767-1)
86#define INT32_MIN (-2147483647-1)
92#define INT16_MAX (32767)
95#define INT32_MAX (2147483647)
98#define UINT8_MAX (255U)
101#define UINT16_MAX (65535U)
104#define UINT32_MAX (4294967295U)
117#if defined (__STDC__)
138#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
144#define BEGIN (yy_start) = 1 + 2 *
150#define YY_START (((yy_start) - 1) / 2)
151#define YYSTATE YY_START
154#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
157#define YY_NEW_FILE tprestart(tpin )
159#define YY_END_OF_BUFFER_CHAR 0
163#define YY_BUF_SIZE 16384
168#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
170#ifndef YY_TYPEDEF_YY_BUFFER_STATE
171#define YY_TYPEDEF_YY_BUFFER_STATE
175#ifndef YY_TYPEDEF_YY_SIZE_T
176#define YY_TYPEDEF_YY_SIZE_T
177typedef size_t yy_size_t;
180extern yy_size_t tpleng;
182extern FILE *tpin, *tpout;
184#define EOB_ACT_CONTINUE_SCAN 0
185#define EOB_ACT_END_OF_FILE 1
186#define EOB_ACT_LAST_MATCH 2
188 #define YY_LESS_LINENO(n)
195 int yyless_macro_arg = (n); \
196 YY_LESS_LINENO(yyless_macro_arg);\
197 *yy_cp = (yy_hold_char); \
198 YY_RESTORE_YY_MORE_OFFSET \
199 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
200 YY_DO_BEFORE_ACTION; \
204#define unput(c) yyunput( c, (yytext_ptr) )
206#ifndef YY_STRUCT_YY_BUFFER_STATE
207#define YY_STRUCT_YY_BUFFER_STATE
218 yy_size_t yy_buf_size;
223 yy_size_t yy_n_chars;
229 int yy_is_our_buffer;
236 int yy_is_interactive;
252 int yy_buffer_status;
254#define YY_BUFFER_NEW 0
255#define YY_BUFFER_NORMAL 1
266#define YY_BUFFER_EOF_PENDING 2
282#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
283 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
289#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
292static char yy_hold_char;
293static yy_size_t yy_n_chars;
297static char *yy_c_buf_p = (
char *) 0;
298static int yy_init = 0;
299static int yy_start = 0;
304static int yy_did_buffer_switch_on_eof;
314static void tpensure_buffer_stack (
void );
315static void tp_load_buffer_state (
void );
318#define YY_FLUSH_BUFFER tp_flush_buffer(YY_CURRENT_BUFFER )
324void *tpalloc (yy_size_t );
325void *tprealloc (
void *,yy_size_t );
326void tpfree (
void * );
328#define yy_new_buffer tp_create_buffer
330#define yy_set_interactive(is_interactive) \
332 if ( ! YY_CURRENT_BUFFER ){ \
333 tpensure_buffer_stack (); \
334 YY_CURRENT_BUFFER_LVALUE = \
335 tp_create_buffer(tpin,YY_BUF_SIZE ); \
337 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
340#define yy_set_bol(at_bol) \
342 if ( ! YY_CURRENT_BUFFER ){\
343 tpensure_buffer_stack (); \
344 YY_CURRENT_BUFFER_LVALUE = \
345 tp_create_buffer(tpin,YY_BUF_SIZE ); \
347 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
350#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
355#define YY_SKIP_YYWRAP
357typedef unsigned char YY_CHAR;
359FILE *tpin = (FILE *) 0, *tpout = (FILE *) 0;
361typedef int yy_state_type;
368#define yytext_ptr tptext
370static yy_state_type yy_get_previous_state (
void );
371static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
372static int yy_get_next_buffer (
void );
373static void yy_fatal_error (yyconst
char msg[] );
378#define YY_DO_BEFORE_ACTION \
379 (yytext_ptr) = yy_bp; \
380 tpleng = (yy_size_t) (yy_cp - yy_bp); \
381 (yy_hold_char) = *yy_cp; \
383 (yy_c_buf_p) = yy_cp;
385#define YY_NUM_RULES 7
386#define YY_END_OF_BUFFER 8
391 flex_int32_t yy_verify;
394static yyconst flex_int16_t yy_accept[39] =
396 0, 0, 8, 6, 4, 2, 1, 6, 1, 0,
397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
398 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
399 0, 0, 0, 0, 0, 0, 5, 0
402static yyconst flex_int32_t yy_ec[256] =
404 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 2, 1, 1, 4, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 5, 6, 6, 6,
409 6, 6, 6, 6, 6, 6, 6, 1, 1, 7,
410 1, 8, 1, 1, 9, 9, 9, 9, 9, 9,
411 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
412 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
413 1, 1, 1, 1, 1, 1, 10, 10, 10, 10,
415 11, 10, 12, 10, 13, 10, 14, 10, 10, 15,
416 10, 10, 10, 16, 17, 18, 10, 10, 10, 10,
417 19, 10, 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434static yyconst flex_int32_t yy_meta[20] =
436 1, 2, 3, 1, 1, 2, 1, 1, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2
440static yyconst flex_int16_t yy_base[43] =
442 0, 6, 54, 55, 55, 55, 0, 0, 0, 42,
443 34, 32, 34, 41, 35, 0, 32, 39, 33, 39,
444 35, 28, 0, 30, 33, 20, 11, 30, 4, 55,
445 5, 8, 12, 13, 15, 22, 19, 55, 30, 33,
449static yyconst flex_int16_t yy_def[43] =
451 39, 39, 38, 38, 38, 38, 40, 38, 40, 38,
452 38, 38, 38, 38, 38, 41, 38, 41, 38, 38,
453 38, 38, 42, 38, 42, 38, 42, 38, 42, 38,
454 42, 42, 42, 42, 42, 42, 42, 0, 38, 38,
458static yyconst flex_int16_t yy_nxt[75] =
460 38, 5, 6, 7, 18, 38, 8, 5, 6, 7,
461 27, 27, 8, 10, 27, 29, 11, 27, 27, 27,
462 31, 27, 32, 33, 34, 27, 36, 35, 27, 37,
463 4, 4, 4, 9, 9, 25, 25, 30, 28, 27,
464 26, 24, 23, 22, 21, 20, 19, 17, 16, 15,
465 14, 13, 12, 38, 3, 38, 38, 38, 38, 38,
466 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
470static yyconst flex_int16_t yy_chk[75] =
472 0, 1, 1, 1, 41, 0, 1, 2, 2, 2,
473 29, 31, 2, 8, 32, 27, 8, 27, 33, 34,
474 29, 35, 31, 32, 33, 37, 35, 34, 36, 36,
475 39, 39, 39, 40, 40, 42, 42, 28, 26, 25,
476 24, 22, 21, 20, 19, 18, 17, 15, 14, 13,
477 12, 11, 10, 3, 38, 38, 38, 38, 38, 38,
478 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
482static yy_state_type yy_last_accepting_state;
483static char *yy_last_accepting_cpos;
485extern int tp_flex_debug;
486int tp_flex_debug = 0;
491#define REJECT reject_used_but_not_detected
492#define yymore() yymore_used_but_not_detected
494#define YY_RESTORE_YY_MORE_OFFSET
496#line 1 "tokenparser.l"
535#line 42 "tokenparser.l"
550static void eval_key(
char *pcToken,
list_t *list_key);
551static void eval_value(
char *pcToken,
list_t *list_values);
552void tperrorCheck (
char *pcToken_error);
558#line 559 "tokenparser.c"
562#ifndef YY_NO_UNISTD_H
571#define YY_EXTRA_TYPE void *
574static int yy_init_globals (
void );
579int tplex_destroy (
void );
581int tpget_debug (
void );
583void tpset_debug (
int debug_flag );
585YY_EXTRA_TYPE tpget_extra (
void );
587void tpset_extra (YY_EXTRA_TYPE user_defined );
595void tpset_out (FILE * out_str );
609#ifndef YY_SKIP_YYWRAP
611extern "C" int tpwrap (
void );
613extern int tpwrap (
void );
618static void yy_flex_strncpy (
char *,yyconst
char *,
int );
622static int yy_flex_strlen (yyconst
char * );
628static int yyinput (
void );
630static int input (
void );
636#ifndef YY_READ_BUF_SIZE
637#define YY_READ_BUF_SIZE 8192
645#define ECHO fwrite( tptext, tpleng, 1, tpout )
652#define YY_INPUT(buf,result,max_size) \
653 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
657 for ( n = 0; n < max_size && \
658 (c = getc( tpin )) != EOF && c != '\n'; ++n ) \
661 buf[n++] = (char) c; \
662 if ( c == EOF && ferror( tpin ) ) \
663 YY_FATAL_ERROR( "input in flex scanner failed" ); \
669 while ( (result = fread(buf, 1, max_size, tpin))==0 && ferror(tpin)) \
671 if( errno != EINTR) \
673 YY_FATAL_ERROR( "input in flex scanner failed" ); \
689#define yyterminate() return YY_NULL
693#ifndef YY_START_STACK_INCR
694#define YY_START_STACK_INCR 25
698#ifndef YY_FATAL_ERROR
699#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
708#define YY_DECL_IS_OURS 1
710extern int tplex (
void);
712#define YY_DECL int tplex (void)
718#ifndef YY_USER_ACTION
719#define YY_USER_ACTION
724#define YY_BREAK break;
727#define YY_RULE_SETUP \
734 register yy_state_type yy_current_state;
735 register char *yy_cp, *yy_bp;
738#line 69 "tokenparser.l"
741#line 742 "tokenparser.c"
760 if ( ! YY_CURRENT_BUFFER ) {
761 tpensure_buffer_stack ();
762 YY_CURRENT_BUFFER_LVALUE =
766 tp_load_buffer_state( );
771 yy_cp = (yy_c_buf_p);
774 *yy_cp = (yy_hold_char);
781 yy_current_state = (yy_start);
785 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
786 if ( yy_accept[yy_current_state] )
788 (yy_last_accepting_state) = yy_current_state;
789 (yy_last_accepting_cpos) = yy_cp;
791 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
793 yy_current_state = (int) yy_def[yy_current_state];
794 if ( yy_current_state >= 39 )
795 yy_c = yy_meta[(
unsigned int) yy_c];
797 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
800 while ( yy_base[yy_current_state] != 55 );
803 yy_act = yy_accept[yy_current_state];
806 yy_cp = (yy_last_accepting_cpos);
807 yy_current_state = (yy_last_accepting_state);
808 yy_act = yy_accept[yy_current_state];
819 *yy_cp = (yy_hold_char);
820 yy_cp = (yy_last_accepting_cpos);
821 yy_current_state = (yy_last_accepting_state);
826#line 71 "tokenparser.l"
832#line 72 "tokenparser.l"
837#line 73 "tokenparser.l"
838{ eval_key(tptext, ListKeys); }
842#line 74 "tokenparser.l"
847#line 75 "tokenparser.l"
848{ eval_value(tptext, ListValues); }
852#line 76 "tokenparser.l"
853{ tperrorCheck(tptext); }
857#line 77 "tokenparser.l"
860#line 861 "tokenparser.c"
861case YY_STATE_EOF(INITIAL):
864 case YY_END_OF_BUFFER:
867 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
870 *yy_cp = (yy_hold_char);
871 YY_RESTORE_YY_MORE_OFFSET
873 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
884 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
885 YY_CURRENT_BUFFER_LVALUE->yy_input_file = tpin;
886 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
896 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
898 yy_state_type yy_next_state;
900 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
902 yy_current_state = yy_get_previous_state( );
913 yy_next_state = yy_try_NUL_trans( yy_current_state );
915 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
920 yy_cp = ++(yy_c_buf_p);
921 yy_current_state = yy_next_state;
927 yy_cp = (yy_c_buf_p);
932 else switch ( yy_get_next_buffer( ) )
934 case EOB_ACT_END_OF_FILE:
936 (yy_did_buffer_switch_on_eof) = 0;
949 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
951 yy_act = YY_STATE_EOF(YY_START);
957 if ( ! (yy_did_buffer_switch_on_eof) )
963 case EOB_ACT_CONTINUE_SCAN:
965 (yytext_ptr) + yy_amount_of_matched_text;
967 yy_current_state = yy_get_previous_state( );
969 yy_cp = (yy_c_buf_p);
970 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
973 case EOB_ACT_LAST_MATCH:
975 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
977 yy_current_state = yy_get_previous_state( );
979 yy_cp = (yy_c_buf_p);
980 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
988 "fatal flex scanner internal error--no action found" );
1000static int yy_get_next_buffer (
void)
1002 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1003 register char *source = (yytext_ptr);
1004 register int number_to_move, i;
1007 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1009 "fatal flex scanner internal error--end of buffer missed" );
1011 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1013 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1018 return EOB_ACT_END_OF_FILE;
1026 return EOB_ACT_LAST_MATCH;
1033 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1035 for ( i = 0; i < number_to_move; ++i )
1036 *(dest++) = *(source++);
1038 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1042 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1046 yy_size_t num_to_read =
1047 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1049 while ( num_to_read <= 0 )
1055 int yy_c_buf_p_offset =
1056 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1058 if ( b->yy_is_our_buffer )
1060 yy_size_t new_size = b->yy_buf_size * 2;
1062 if ( new_size <= 0 )
1063 b->yy_buf_size += b->yy_buf_size / 8;
1065 b->yy_buf_size *= 2;
1067 b->yy_ch_buf = (
char *)
1069 tprealloc((
void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1075 if ( ! b->yy_ch_buf )
1077 "fatal error - scanner input buffer overflow" );
1079 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1081 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1086 if ( num_to_read > YY_READ_BUF_SIZE )
1087 num_to_read = YY_READ_BUF_SIZE;
1090 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1091 (yy_n_chars), num_to_read );
1093 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1096 if ( (yy_n_chars) == 0 )
1098 if ( number_to_move == YY_MORE_ADJ )
1100 ret_val = EOB_ACT_END_OF_FILE;
1106 ret_val = EOB_ACT_LAST_MATCH;
1107 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1108 YY_BUFFER_EOF_PENDING;
1113 ret_val = EOB_ACT_CONTINUE_SCAN;
1115 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1117 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1118 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (
char *) tprealloc((
void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1119 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1120 YY_FATAL_ERROR(
"out of dynamic memory in yy_get_next_buffer()" );
1123 (yy_n_chars) += number_to_move;
1124 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1125 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1127 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1134 static yy_state_type yy_get_previous_state (
void)
1136 register yy_state_type yy_current_state;
1137 register char *yy_cp;
1139 yy_current_state = (yy_start);
1141 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1143 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1144 if ( yy_accept[yy_current_state] )
1146 (yy_last_accepting_state) = yy_current_state;
1147 (yy_last_accepting_cpos) = yy_cp;
1149 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1151 yy_current_state = (int) yy_def[yy_current_state];
1152 if ( yy_current_state >= 39 )
1153 yy_c = yy_meta[(
unsigned int) yy_c];
1155 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1158 return yy_current_state;
1166 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1168 register int yy_is_jam;
1169 register char *yy_cp = (yy_c_buf_p);
1171 register YY_CHAR yy_c = 1;
1172 if ( yy_accept[yy_current_state] )
1174 (yy_last_accepting_state) = yy_current_state;
1175 (yy_last_accepting_cpos) = yy_cp;
1177 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1179 yy_current_state = (int) yy_def[yy_current_state];
1180 if ( yy_current_state >= 39 )
1181 yy_c = yy_meta[(
unsigned int) yy_c];
1183 yy_current_state = yy_nxt[yy_base[yy_current_state] + (
unsigned int) yy_c];
1184 yy_is_jam = (yy_current_state == 38);
1186 return yy_is_jam ? 0 : yy_current_state;
1191 static int yyinput (
void)
1193 static int input (
void)
1199 *(yy_c_buf_p) = (yy_hold_char);
1201 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1207 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1209 *(yy_c_buf_p) =
'\0';
1213 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1216 switch ( yy_get_next_buffer( ) )
1218 case EOB_ACT_LAST_MATCH:
1234 case EOB_ACT_END_OF_FILE:
1239 if ( ! (yy_did_buffer_switch_on_eof) )
1248 case EOB_ACT_CONTINUE_SCAN:
1249 (yy_c_buf_p) = (yytext_ptr) + offset;
1255 c = *(
unsigned char *) (yy_c_buf_p);
1256 *(yy_c_buf_p) =
'\0';
1257 (yy_hold_char) = *++(yy_c_buf_p);
1271 if ( ! YY_CURRENT_BUFFER ){
1272 tpensure_buffer_stack ();
1273 YY_CURRENT_BUFFER_LVALUE =
1277 tp_init_buffer(YY_CURRENT_BUFFER,input_file );
1278 tp_load_buffer_state( );
1293 tpensure_buffer_stack ();
1294 if ( YY_CURRENT_BUFFER == new_buffer )
1297 if ( YY_CURRENT_BUFFER )
1300 *(yy_c_buf_p) = (yy_hold_char);
1301 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1302 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1305 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1306 tp_load_buffer_state( );
1313 (yy_did_buffer_switch_on_eof) = 1;
1316static void tp_load_buffer_state (
void)
1318 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1319 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1320 tpin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1321 (yy_hold_char) = *(yy_c_buf_p);
1336 YY_FATAL_ERROR(
"out of dynamic memory in tp_create_buffer()" );
1338 b->yy_buf_size = size;
1343 b->yy_ch_buf = (
char *) tpalloc(b->yy_buf_size + 2 );
1344 if ( ! b->yy_ch_buf )
1345 YY_FATAL_ERROR(
"out of dynamic memory in tp_create_buffer()" );
1347 b->yy_is_our_buffer = 1;
1349 tp_init_buffer(b,file );
1364 if ( b == YY_CURRENT_BUFFER )
1367 if ( b->yy_is_our_buffer )
1368 tpfree((
void *) b->yy_ch_buf );
1370 tpfree((
void *) b );
1374extern int isatty (
int );
1388 b->yy_input_file = file;
1389 b->yy_fill_buffer = 1;
1395 if (b != YY_CURRENT_BUFFER){
1400 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1420 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1421 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1423 b->yy_buf_pos = &b->yy_ch_buf[0];
1426 b->yy_buffer_status = YY_BUFFER_NEW;
1428 if ( b == YY_CURRENT_BUFFER )
1429 tp_load_buffer_state( );
1440 if (new_buffer == NULL)
1443 tpensure_buffer_stack();
1446 if ( YY_CURRENT_BUFFER )
1449 *(yy_c_buf_p) = (yy_hold_char);
1450 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1451 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1455 if (YY_CURRENT_BUFFER)
1457 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1460 tp_load_buffer_state( );
1461 (yy_did_buffer_switch_on_eof) = 1;
1470 if (!YY_CURRENT_BUFFER)
1474 YY_CURRENT_BUFFER_LVALUE = NULL;
1478 if (YY_CURRENT_BUFFER) {
1479 tp_load_buffer_state( );
1480 (yy_did_buffer_switch_on_eof) = 1;
1487static void tpensure_buffer_stack (
void)
1489 yy_size_t num_to_alloc;
1502 YY_FATAL_ERROR(
"out of dynamic memory in tpensure_buffer_stack()" );
1522 YY_FATAL_ERROR(
"out of dynamic memory in tpensure_buffer_stack()" );
1541 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1542 base[size-1] != YY_END_OF_BUFFER_CHAR )
1548 YY_FATAL_ERROR(
"out of dynamic memory in tp_scan_buffer()" );
1550 b->yy_buf_size = size - 2;
1551 b->yy_buf_pos = b->yy_ch_buf = base;
1552 b->yy_is_our_buffer = 0;
1553 b->yy_input_file = 0;
1554 b->yy_n_chars = b->yy_buf_size;
1555 b->yy_is_interactive = 0;
1557 b->yy_fill_buffer = 0;
1558 b->yy_buffer_status = YY_BUFFER_NEW;
1593 n = _yybytes_len + 2;
1594 buf = (
char *) tpalloc(n );
1596 YY_FATAL_ERROR(
"out of dynamic memory in tp_scan_bytes()" );
1598 for ( i = 0; i < _yybytes_len; ++i )
1599 buf[i] = yybytes[i];
1601 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1605 YY_FATAL_ERROR(
"bad buffer in tp_scan_bytes()" );
1610 b->yy_is_our_buffer = 1;
1615#ifndef YY_EXIT_FAILURE
1616#define YY_EXIT_FAILURE 2
1619static void yy_fatal_error (yyconst
char* msg )
1621 (void) fprintf( stderr,
"%s\n", msg );
1622 exit( YY_EXIT_FAILURE );
1632 int yyless_macro_arg = (n); \
1633 YY_LESS_LINENO(yyless_macro_arg);\
1634 tptext[tpleng] = (yy_hold_char); \
1635 (yy_c_buf_p) = tptext + yyless_macro_arg; \
1636 (yy_hold_char) = *(yy_c_buf_p); \
1637 *(yy_c_buf_p) = '\0'; \
1638 tpleng = yyless_macro_arg; \
1693 tplineno = line_number;
1707void tpset_out (FILE * out_str )
1712int tpget_debug (
void)
1714 return tp_flex_debug;
1717void tpset_debug (
int bdebug )
1719 tp_flex_debug = bdebug ;
1722static int yy_init_globals (
void)
1731 (yy_c_buf_p) = (
char *) 0;
1751int tplex_destroy (
void)
1755 while(YY_CURRENT_BUFFER){
1757 YY_CURRENT_BUFFER_LVALUE = NULL;
1777static void yy_flex_strncpy (
char* s1, yyconst
char * s2,
int n )
1780 for ( i = 0; i < n; ++i )
1785#ifdef YY_NEED_STRLEN
1786static int yy_flex_strlen (yyconst
char * s )
1789 for ( n = 0; s[n]; ++n )
1796void *tpalloc (yy_size_t size )
1798 return (
void *) malloc( size );
1801void *tprealloc (
void * ptr, yy_size_t size )
1810 return (
void *) realloc( (
char *) ptr, size );
1813void tpfree (
void * ptr )
1815 free( (
char *) ptr );
1818#define YYTABLES_NAME "yytables"
1820#line 77 "tokenparser.l"
1825static void eval_key(
char *pcToken,
list_t *list_key)
1832 elt = malloc(
sizeof(*elt));
1839 for (len=0; pcToken[len+5] !=
'<'; len++)
1843 elt->key = malloc(len);
1844 memcpy(elt->key, &pcToken[5], len-1);
1845 elt->key[len-1] =
'\0';
1847 r = list_init(&elt->values);
1852 list_append(list_key, elt);
1855 ListValues = &elt->values;
1858static void eval_value(
char *pcToken,
list_t *list_values)
1869 for (len=0; pcToken[len+8] !=
'<'; len++)
1873 value = malloc(len);
1876 memcpy(value, &pcToken[8], len-1);
1877 value[len-1] =
'\0';
1881 while ((amp = strstr(amp,
"&")) != NULL)
1886 for (p = amp+1; *(p+4); p++)
1897 r = list_append(list_values, value);
1902void tperrorCheck (
char *token_error)
1922 for (i=0; i < list_size(l); i++)
1926 elt = list_get_at(l, i);
1929 if (0 == strcmp(elt->key, key))
1931 *values = &elt->values;
1956 file = fopen(fileName,
"r");
1959 Log3(PCSC_LOG_CRITICAL,
"Could not open bundle file %s: %s",
1960 fileName, strerror(errno));
1974 }
while (!feof(file));
1980 printf(
"size: %d\n", list_size(l));
1981 for (i=0; i < list_size(l); i++)
1986 elt = list_get_at(l, i);
1988 printf(
"Key: %s\n", elt->key);
1990 for (j=0; j<list_size(&elt->values); j++)
1992 char *v = list_get_at(&elt->values, j);
1993 printf(
" value: %s\n", v);
2010 for (i=0; i < list_size(l); i++)
2015 elt = list_get_at(l, i);
2019 for (j=0; j<list_size(&elt->values); j++)
2020 free(list_get_at(&elt->values, j));
2021 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.
FILE * tpget_in(void)
Get the input stream.
void tppop_buffer_state(void)
Removes and deletes the top of the stack, if present.
YY_BUFFER_STATE tp_scan_string(yyconst char *yy_str)
Setup the input buffer state to scan a string.
void tp_switch_to_buffer(YY_BUFFER_STATE new_buffer)
Switch to a different input buffer.
void tpset_lineno(int line_number)
Set the current line number.
void tppush_buffer_state(YY_BUFFER_STATE new_buffer)
Pushes the new state onto the stack.
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
FILE * tpget_out(void)
Get the output stream.
void tprestart(FILE *input_file)
Immediately switch to a different input stream.
static size_t yy_buffer_stack_max
capacity of stack.
YY_BUFFER_STATE tp_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
int tpget_lineno(void)
Get the current line number.
YY_BUFFER_STATE tp_scan_bytes(yyconst char *bytes, yy_size_t len)
Setup the input buffer state to scan the given bytes.
int LTPBundleFindValueWithKey(list_t *l, const char *key, list_t **values)
Find an optional key in a configuration file No error is logged if the key is not found.
yy_size_t tpget_leng(void)
Get the length of the current token.
void tp_flush_buffer(YY_BUFFER_STATE b)
Discard all buffered characters.
void bundleRelease(list_t *l)
Free the list created by bundleParse()
void tpset_in(FILE *in_str)
Set the input stream.
char * tpget_text(void)
Get the current token.
void tp_delete_buffer(YY_BUFFER_STATE b)
Destroy the buffer.
int bundleParse(const char *fileName, list_t *l)
Parse a Info.plist file and file a list.
static size_t yy_buffer_stack_top
index of top of stack.
YY_BUFFER_STATE tp_scan_buffer(char *base, yy_size_t size)
Setup the input buffer state to scan directly from a user-specified character buffer.