1 #line 1 "matcher_parser_lex.c"
2 
3 #line 3 "matcher_parser_lex.c"
4 
5 #define  YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define yy_create_buffer matcher_parser_create_buffer
10 #define yy_delete_buffer matcher_parser_delete_buffer
11 #define yy_scan_buffer matcher_parser_scan_buffer
12 #define yy_scan_string matcher_parser_scan_string
13 #define yy_scan_bytes matcher_parser_scan_bytes
14 #define yy_init_buffer matcher_parser_init_buffer
15 #define yy_flush_buffer matcher_parser_flush_buffer
16 #define yy_load_buffer_state matcher_parser_load_buffer_state
17 #define yy_switch_to_buffer matcher_parser_switch_to_buffer
18 #define yypush_buffer_state matcher_parserpush_buffer_state
19 #define yypop_buffer_state matcher_parserpop_buffer_state
20 #define yyensure_buffer_stack matcher_parserensure_buffer_stack
21 #define yy_flex_debug matcher_parser_flex_debug
22 #define yyin matcher_parserin
23 #define yyleng matcher_parserleng
24 #define yylex matcher_parserlex
25 #define yylineno matcher_parserlineno
26 #define yyout matcher_parserout
27 #define yyrestart matcher_parserrestart
28 #define yytext matcher_parsertext
29 #define yywrap matcher_parserwrap
30 #define yyalloc matcher_parseralloc
31 #define yyrealloc matcher_parserrealloc
32 #define yyfree matcher_parserfree
33 
34 #define FLEX_SCANNER
35 #define YY_FLEX_MAJOR_VERSION 2
36 #define YY_FLEX_MINOR_VERSION 6
37 #define YY_FLEX_SUBMINOR_VERSION 4
38 #if YY_FLEX_SUBMINOR_VERSION > 0
39 #define FLEX_BETA
40 #endif
41 
42 #ifdef yy_create_buffer
43 #define matcher_parser_create_buffer_ALREADY_DEFINED
44 #else
45 #define yy_create_buffer matcher_parser_create_buffer
46 #endif
47 
48 #ifdef yy_delete_buffer
49 #define matcher_parser_delete_buffer_ALREADY_DEFINED
50 #else
51 #define yy_delete_buffer matcher_parser_delete_buffer
52 #endif
53 
54 #ifdef yy_scan_buffer
55 #define matcher_parser_scan_buffer_ALREADY_DEFINED
56 #else
57 #define yy_scan_buffer matcher_parser_scan_buffer
58 #endif
59 
60 #ifdef yy_scan_string
61 #define matcher_parser_scan_string_ALREADY_DEFINED
62 #else
63 #define yy_scan_string matcher_parser_scan_string
64 #endif
65 
66 #ifdef yy_scan_bytes
67 #define matcher_parser_scan_bytes_ALREADY_DEFINED
68 #else
69 #define yy_scan_bytes matcher_parser_scan_bytes
70 #endif
71 
72 #ifdef yy_init_buffer
73 #define matcher_parser_init_buffer_ALREADY_DEFINED
74 #else
75 #define yy_init_buffer matcher_parser_init_buffer
76 #endif
77 
78 #ifdef yy_flush_buffer
79 #define matcher_parser_flush_buffer_ALREADY_DEFINED
80 #else
81 #define yy_flush_buffer matcher_parser_flush_buffer
82 #endif
83 
84 #ifdef yy_load_buffer_state
85 #define matcher_parser_load_buffer_state_ALREADY_DEFINED
86 #else
87 #define yy_load_buffer_state matcher_parser_load_buffer_state
88 #endif
89 
90 #ifdef yy_switch_to_buffer
91 #define matcher_parser_switch_to_buffer_ALREADY_DEFINED
92 #else
93 #define yy_switch_to_buffer matcher_parser_switch_to_buffer
94 #endif
95 
96 #ifdef yypush_buffer_state
97 #define matcher_parserpush_buffer_state_ALREADY_DEFINED
98 #else
99 #define yypush_buffer_state matcher_parserpush_buffer_state
100 #endif
101 
102 #ifdef yypop_buffer_state
103 #define matcher_parserpop_buffer_state_ALREADY_DEFINED
104 #else
105 #define yypop_buffer_state matcher_parserpop_buffer_state
106 #endif
107 
108 #ifdef yyensure_buffer_stack
109 #define matcher_parserensure_buffer_stack_ALREADY_DEFINED
110 #else
111 #define yyensure_buffer_stack matcher_parserensure_buffer_stack
112 #endif
113 
114 #ifdef yylex
115 #define matcher_parserlex_ALREADY_DEFINED
116 #else
117 #define yylex matcher_parserlex
118 #endif
119 
120 #ifdef yyrestart
121 #define matcher_parserrestart_ALREADY_DEFINED
122 #else
123 #define yyrestart matcher_parserrestart
124 #endif
125 
126 #ifdef yylex_init
127 #define matcher_parserlex_init_ALREADY_DEFINED
128 #else
129 #define yylex_init matcher_parserlex_init
130 #endif
131 
132 #ifdef yylex_init_extra
133 #define matcher_parserlex_init_extra_ALREADY_DEFINED
134 #else
135 #define yylex_init_extra matcher_parserlex_init_extra
136 #endif
137 
138 #ifdef yylex_destroy
139 #define matcher_parserlex_destroy_ALREADY_DEFINED
140 #else
141 #define yylex_destroy matcher_parserlex_destroy
142 #endif
143 
144 #ifdef yyget_debug
145 #define matcher_parserget_debug_ALREADY_DEFINED
146 #else
147 #define yyget_debug matcher_parserget_debug
148 #endif
149 
150 #ifdef yyset_debug
151 #define matcher_parserset_debug_ALREADY_DEFINED
152 #else
153 #define yyset_debug matcher_parserset_debug
154 #endif
155 
156 #ifdef yyget_extra
157 #define matcher_parserget_extra_ALREADY_DEFINED
158 #else
159 #define yyget_extra matcher_parserget_extra
160 #endif
161 
162 #ifdef yyset_extra
163 #define matcher_parserset_extra_ALREADY_DEFINED
164 #else
165 #define yyset_extra matcher_parserset_extra
166 #endif
167 
168 #ifdef yyget_in
169 #define matcher_parserget_in_ALREADY_DEFINED
170 #else
171 #define yyget_in matcher_parserget_in
172 #endif
173 
174 #ifdef yyset_in
175 #define matcher_parserset_in_ALREADY_DEFINED
176 #else
177 #define yyset_in matcher_parserset_in
178 #endif
179 
180 #ifdef yyget_out
181 #define matcher_parserget_out_ALREADY_DEFINED
182 #else
183 #define yyget_out matcher_parserget_out
184 #endif
185 
186 #ifdef yyset_out
187 #define matcher_parserset_out_ALREADY_DEFINED
188 #else
189 #define yyset_out matcher_parserset_out
190 #endif
191 
192 #ifdef yyget_leng
193 #define matcher_parserget_leng_ALREADY_DEFINED
194 #else
195 #define yyget_leng matcher_parserget_leng
196 #endif
197 
198 #ifdef yyget_text
199 #define matcher_parserget_text_ALREADY_DEFINED
200 #else
201 #define yyget_text matcher_parserget_text
202 #endif
203 
204 #ifdef yyget_lineno
205 #define matcher_parserget_lineno_ALREADY_DEFINED
206 #else
207 #define yyget_lineno matcher_parserget_lineno
208 #endif
209 
210 #ifdef yyset_lineno
211 #define matcher_parserset_lineno_ALREADY_DEFINED
212 #else
213 #define yyset_lineno matcher_parserset_lineno
214 #endif
215 
216 #ifdef yywrap
217 #define matcher_parserwrap_ALREADY_DEFINED
218 #else
219 #define yywrap matcher_parserwrap
220 #endif
221 
222 #ifdef yyalloc
223 #define matcher_parseralloc_ALREADY_DEFINED
224 #else
225 #define yyalloc matcher_parseralloc
226 #endif
227 
228 #ifdef yyrealloc
229 #define matcher_parserrealloc_ALREADY_DEFINED
230 #else
231 #define yyrealloc matcher_parserrealloc
232 #endif
233 
234 #ifdef yyfree
235 #define matcher_parserfree_ALREADY_DEFINED
236 #else
237 #define yyfree matcher_parserfree
238 #endif
239 
240 #ifdef yytext
241 #define matcher_parsertext_ALREADY_DEFINED
242 #else
243 #define yytext matcher_parsertext
244 #endif
245 
246 #ifdef yyleng
247 #define matcher_parserleng_ALREADY_DEFINED
248 #else
249 #define yyleng matcher_parserleng
250 #endif
251 
252 #ifdef yyin
253 #define matcher_parserin_ALREADY_DEFINED
254 #else
255 #define yyin matcher_parserin
256 #endif
257 
258 #ifdef yyout
259 #define matcher_parserout_ALREADY_DEFINED
260 #else
261 #define yyout matcher_parserout
262 #endif
263 
264 #ifdef yy_flex_debug
265 #define matcher_parser_flex_debug_ALREADY_DEFINED
266 #else
267 #define yy_flex_debug matcher_parser_flex_debug
268 #endif
269 
270 #ifdef yylineno
271 #define matcher_parserlineno_ALREADY_DEFINED
272 #else
273 #define yylineno matcher_parserlineno
274 #endif
275 
276 /* First, we deal with  platform-specific or compiler-specific issues. */
277 
278 /* begin standard C headers. */
279 #include <stdio.h>
280 #include <string.h>
281 #include <errno.h>
282 #include <stdlib.h>
283 
284 /* end standard C headers. */
285 
286 /* flex integer type definitions */
287 
288 #ifndef FLEXINT_H
289 #define FLEXINT_H
290 
291 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
292 
293 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
294 
295 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
296  * if you want the limit (max/min) macros for int types.
297  */
298 #ifndef __STDC_LIMIT_MACROS
299 #define __STDC_LIMIT_MACROS 1
300 #endif
301 
302 #include <inttypes.h>
303 typedef int8_t flex_int8_t;
304 typedef uint8_t flex_uint8_t;
305 typedef int16_t flex_int16_t;
306 typedef uint16_t flex_uint16_t;
307 typedef int32_t flex_int32_t;
308 typedef uint32_t flex_uint32_t;
309 #else
310 typedef signed char flex_int8_t;
311 typedef short int flex_int16_t;
312 typedef int flex_int32_t;
313 typedef unsigned char flex_uint8_t;
314 typedef unsigned short int flex_uint16_t;
315 typedef unsigned int flex_uint32_t;
316 
317 /* Limits of integral types. */
318 #ifndef INT8_MIN
319 #define INT8_MIN               (-128)
320 #endif
321 #ifndef INT16_MIN
322 #define INT16_MIN              (-32767-1)
323 #endif
324 #ifndef INT32_MIN
325 #define INT32_MIN              (-2147483647-1)
326 #endif
327 #ifndef INT8_MAX
328 #define INT8_MAX               (127)
329 #endif
330 #ifndef INT16_MAX
331 #define INT16_MAX              (32767)
332 #endif
333 #ifndef INT32_MAX
334 #define INT32_MAX              (2147483647)
335 #endif
336 #ifndef UINT8_MAX
337 #define UINT8_MAX              (255U)
338 #endif
339 #ifndef UINT16_MAX
340 #define UINT16_MAX             (65535U)
341 #endif
342 #ifndef UINT32_MAX
343 #define UINT32_MAX             (4294967295U)
344 #endif
345 
346 #ifndef SIZE_MAX
347 #define SIZE_MAX               (~(size_t)0)
348 #endif
349 
350 #endif /* ! C99 */
351 
352 #endif /* ! FLEXINT_H */
353 
354 /* begin standard C++ headers. */
355 
356 /* TODO: this is always defined, so inline it */
357 #define yyconst const
358 
359 #if defined(__GNUC__) && __GNUC__ >= 3
360 #define yynoreturn __attribute__((__noreturn__))
361 #else
362 #define yynoreturn
363 #endif
364 
365 /* Returned upon end-of-file. */
366 #define YY_NULL 0
367 
368 /* Promotes a possibly negative, possibly signed char to an
369  *   integer in range [0..255] for use as an array index.
370  */
371 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
372 
373 /* Enter a start condition.  This macro really ought to take a parameter,
374  * but we do it the disgusting crufty way forced on us by the ()-less
375  * definition of BEGIN.
376  */
377 #define BEGIN (yy_start) = 1 + 2 *
378 /* Translate the current start state into a value that can be later handed
379  * to BEGIN to return to the state.  The YYSTATE alias is for lex
380  * compatibility.
381  */
382 #define YY_START (((yy_start) - 1) / 2)
383 #define YYSTATE YY_START
384 /* Action number for EOF rule of a given start state. */
385 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
386 /* Special action meaning "start processing a new file". */
387 #define YY_NEW_FILE yyrestart( yyin  )
388 #define YY_END_OF_BUFFER_CHAR 0
389 
390 /* Size of default input buffer. */
391 #ifndef YY_BUF_SIZE
392 #ifdef __ia64__
393 /* On IA-64, the buffer size is 16k, not 8k.
394  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
395  * Ditto for the __ia64__ case accordingly.
396  */
397 #define YY_BUF_SIZE 32768
398 #else
399 #define YY_BUF_SIZE 16384
400 #endif /* __ia64__ */
401 #endif
402 
403 /* The state buf must be large enough to hold one state per character in the main buffer.
404  */
405 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
406 
407 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
408 #define YY_TYPEDEF_YY_BUFFER_STATE
409 typedef struct yy_buffer_state *YY_BUFFER_STATE;
410 #endif
411 
412 #ifndef YY_TYPEDEF_YY_SIZE_T
413 #define YY_TYPEDEF_YY_SIZE_T
414 typedef size_t yy_size_t;
415 #endif
416 
417 extern int yyleng;
418 
419 extern FILE *yyin, *yyout;
420 
421 #define EOB_ACT_CONTINUE_SCAN 0
422 #define EOB_ACT_END_OF_FILE 1
423 #define EOB_ACT_LAST_MATCH 2
424 
425     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
426      *       access to the local variable yy_act. Since yyless() is a macro, it would break
427      *       existing scanners that call yyless() from OUTSIDE yylex.
428      *       One obvious solution it to make yy_act a global. I tried that, and saw
429      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
430      *       normally declared as a register variable-- so it is not worth it.
431      */
432     #define  YY_LESS_LINENO(n) \
433             do { \
434                 int yyl;\
435                 for ( yyl = n; yyl < yyleng; ++yyl )\
436                     if ( yytext[yyl] == '\n' )\
437                         --yylineno;\
438             }while(0)
439     #define YY_LINENO_REWIND_TO(dst) \
440             do {\
441                 const char *p;\
442                 for ( p = yy_cp-1; p >= (dst); --p)\
443                     if ( *p == '\n' )\
444                         --yylineno;\
445             }while(0)
446 
447 /* Return all but the first "n" matched characters back to the input stream. */
448 #define yyless(n) \
449 	do \
450 		{ \
451 		/* Undo effects of setting up yytext. */ \
452         int yyless_macro_arg = (n); \
453         YY_LESS_LINENO(yyless_macro_arg);\
454 		*yy_cp = (yy_hold_char); \
455 		YY_RESTORE_YY_MORE_OFFSET \
456 		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
457 		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
458 		} \
459 	while ( 0 )
460 #define unput(c) yyunput( c, (yytext_ptr)  )
461 
462 #ifndef YY_STRUCT_YY_BUFFER_STATE
463 #define YY_STRUCT_YY_BUFFER_STATE
464 struct yy_buffer_state
465 	{
466 	FILE *yy_input_file;
467 
468 	char *yy_ch_buf;		/* input buffer */
469 	char *yy_buf_pos;		/* current position in input buffer */
470 
471 	/* Size of input buffer in bytes, not including room for EOB
472 	 * characters.
473 	 */
474 	int yy_buf_size;
475 
476 	/* Number of characters read into yy_ch_buf, not including EOB
477 	 * characters.
478 	 */
479 	int yy_n_chars;
480 
481 	/* Whether we "own" the buffer - i.e., we know we created it,
482 	 * and can realloc() it to grow it, and should free() it to
483 	 * delete it.
484 	 */
485 	int yy_is_our_buffer;
486 
487 	/* Whether this is an "interactive" input source; if so, and
488 	 * if we're using stdio for input, then we want to use getc()
489 	 * instead of fread(), to make sure we stop fetching input after
490 	 * each newline.
491 	 */
492 	int yy_is_interactive;
493 
494 	/* Whether we're considered to be at the beginning of a line.
495 	 * If so, '^' rules will be active on the next match, otherwise
496 	 * not.
497 	 */
498 	int yy_at_bol;
499 
500     int yy_bs_lineno; /**< The line count. */
501     int yy_bs_column; /**< The column count. */
502 
503 	/* Whether to try to fill the input buffer when we reach the
504 	 * end of it.
505 	 */
506 	int yy_fill_buffer;
507 
508 	int yy_buffer_status;
509 
510 #define YY_BUFFER_NEW 0
511 #define YY_BUFFER_NORMAL 1
512 	/* When an EOF's been seen but there's still some text to process
513 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
514 	 * shouldn't try reading from the input source any more.  We might
515 	 * still have a bunch of tokens to match, though, because of
516 	 * possible backing-up.
517 	 *
518 	 * When we actually see the EOF, we change the status to "new"
519 	 * (via yyrestart()), so that the user can continue scanning by
520 	 * just pointing yyin at a new input file.
521 	 */
522 #define YY_BUFFER_EOF_PENDING 2
523 
524 	};
525 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
526 
527 /* Stack of input buffers. */
528 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
529 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
530 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
531 
532 /* We provide macros for accessing buffer states in case in the
533  * future we want to put the buffer states in a more general
534  * "scanner state".
535  *
536  * Returns the top of the stack, or NULL.
537  */
538 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
539                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
540                           : NULL)
541 /* Same as previous macro, but useful when we know that the buffer stack is not
542  * NULL or when we need an lvalue. For internal use only.
543  */
544 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
545 
546 /* yy_hold_char holds the character lost when yytext is formed. */
547 static char yy_hold_char;
548 static int yy_n_chars;		/* number of characters read into yy_ch_buf */
549 int yyleng;
550 
551 /* Points to current character in buffer. */
552 static char *yy_c_buf_p = NULL;
553 static int yy_init = 0;		/* whether we need to initialize */
554 static int yy_start = 0;	/* start state number */
555 
556 /* Flag which is used to allow yywrap()'s to do buffer switches
557  * instead of setting up a fresh yyin.  A bit of a hack ...
558  */
559 static int yy_did_buffer_switch_on_eof;
560 
561 void yyrestart ( FILE *input_file  );
562 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
563 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
564 void yy_delete_buffer ( YY_BUFFER_STATE b  );
565 void yy_flush_buffer ( YY_BUFFER_STATE b  );
566 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
567 void yypop_buffer_state ( void );
568 
569 static void yyensure_buffer_stack ( void );
570 static void yy_load_buffer_state ( void );
571 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
572 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
573 
574 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
575 YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
576 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
577 
578 void *yyalloc ( yy_size_t  );
579 void *yyrealloc ( void *, yy_size_t  );
580 void yyfree ( void *  );
581 
582 #define yy_new_buffer yy_create_buffer
583 #define yy_set_interactive(is_interactive) \
584 	{ \
585 	if ( ! YY_CURRENT_BUFFER ){ \
586         yyensure_buffer_stack (); \
587 		YY_CURRENT_BUFFER_LVALUE =    \
588             yy_create_buffer( yyin, YY_BUF_SIZE ); \
589 	} \
590 	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
591 	}
592 #define yy_set_bol(at_bol) \
593 	{ \
594 	if ( ! YY_CURRENT_BUFFER ){\
595         yyensure_buffer_stack (); \
596 		YY_CURRENT_BUFFER_LVALUE =    \
597             yy_create_buffer( yyin, YY_BUF_SIZE ); \
598 	} \
599 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
600 	}
601 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
602 
603 /* Begin user sect3 */
604 typedef flex_uint8_t YY_CHAR;
605 
606 FILE *yyin = NULL, *yyout = NULL;
607 
608 typedef int yy_state_type;
609 
610 extern int yylineno;
611 int yylineno = 1;
612 
613 extern char *yytext;
614 #ifdef yytext_ptr
615 #undef yytext_ptr
616 #endif
617 #define yytext_ptr yytext
618 
619 static yy_state_type yy_get_previous_state ( void );
620 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
621 static int yy_get_next_buffer ( void );
622 static void yynoreturn yy_fatal_error ( const char* msg  );
623 
624 /* Done after the current pattern has been matched and before the
625  * corresponding action - sets up yytext.
626  */
627 #define YY_DO_BEFORE_ACTION \
628 	(yytext_ptr) = yy_bp; \
629 	yyleng = (int) (yy_cp - yy_bp); \
630 	(yy_hold_char) = *yy_cp; \
631 	*yy_cp = '\0'; \
632 	(yy_c_buf_p) = yy_cp;
633 #define YY_NUM_RULES 18
634 #define YY_END_OF_BUFFER 19
635 /* This struct is not used in this scanner,
636    but its presence is necessary. */
637 struct yy_trans_info
638 	{
639 	flex_int32_t yy_verify;
640 	flex_int32_t yy_nxt;
641 	};
642 static const flex_int16_t yy_acclist[88] =
643     {   0,
644        19,   17,   18,    3,   17,   18,    4,   18,    7,   17,
645        18,    5,   17,   18,   17,   18,   12,   17,   18,    2,
646        17,   18,    2,   17,   18,    2,   17,   18,    2,   17,
647        18,    2,   17,   18,    2,   17,   18,    6,   17,   18,
648        17,   18,   10,   18,   18,    8,   10,   18,   10,   18,
649         3,   12,    2,    2,    2,    2,    1,    2,    2,    9,
650         2,    2,    2,    2,   11,    2,    2,    2,    2,    2,
651         2,    2,    2,    2,    2,    2,    2,    2,   15,    2,
652         2,   16,    2,    2,   14,    2,   13
653     } ;
654 
655 static const flex_int16_t yy_accept[63] =
656     {   0,
657         1,    1,    1,    1,    1,    1,    1,    2,    4,    7,
658         9,   12,   15,   17,   20,   23,   26,   29,   32,   35,
659        38,   41,   43,   45,   46,   49,   51,   52,   53,   54,
660        55,   56,   57,   59,   60,   60,   60,   61,   62,   63,
661        64,   65,   66,   67,   68,   69,   70,   71,   72,   73,
662        74,   75,   76,   77,   78,   80,   81,   83,   84,   86,
663        88,   88
664     } ;
665 
666 static const YY_CHAR yy_ec[256] =
667     {   0,
668         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
669         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
670         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
671         1,    2,    1,    4,    1,    1,    1,    5,    1,    1,
672         1,    1,    6,    1,    6,    1,    1,    7,    7,    7,
673         7,    7,    7,    7,    7,    7,    7,    1,    1,    1,
674         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
675         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
676         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
677         8,    9,   10,    1,   11,    1,   12,   13,   14,   15,
678 
679        16,   17,   17,   17,   18,   17,   17,   19,   20,   21,
680        22,   17,   17,   23,   24,   25,   26,   17,   17,   17,
681        17,   17,    1,   27,    1,   28,    1,    1,    1,    1,
682         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
683         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
684         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
685         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
686         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
687         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
688         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
689 
690         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
691         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
692         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
693         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
694         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
695         1,    1,    1,    1,    1
696     } ;
697 
698 static const YY_CHAR yy_meta[29] =
699     {   0,
700         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
701         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
702         3,    3,    3,    3,    3,    3,    1,    1
703     } ;
704 
705 static const flex_int16_t yy_base[67] =
706     {   0,
707         0,   75,   26,   28,    0,    0,   82,   84,   79,   84,
708        84,   84,   73,   72,   64,    0,   59,   55,   54,   48,
709        84,   63,   84,   84,   84,    0,   70,   64,    0,   56,
710        45,   56,    0,   48,   56,   30,   84,   43,   52,   50,
711        46,   84,   35,   47,   40,   37,   36,   37,   39,   42,
712        28,   35,   33,   19,    0,   23,    0,   20,    0,    0,
713        84,   40,   43,   31,   46,   49
714     } ;
715 
716 static const flex_int16_t yy_def[67] =
717     {   0,
718        61,    1,   62,   62,   63,   63,   61,   61,   61,   61,
719        61,   61,   61,   61,   64,   64,   64,   64,   64,   64,
720        61,   65,   61,   61,   61,   66,   61,   61,   64,   64,
721        64,   64,   64,   64,   65,   65,   61,   64,   64,   64,
722        64,   61,   64,   64,   64,   64,   64,   64,   64,   64,
723        64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
724         0,   61,   61,   61,   61,   61
725     } ;
726 
727 static const flex_int16_t yy_nxt[113] =
728     {   0,
729         8,    9,   10,   11,   12,   13,   14,    8,    8,    8,
730         8,   15,   16,   16,   17,   18,   16,   19,   16,   16,
731        16,   16,   20,   16,   16,   16,   21,   16,   24,   25,
732        24,   25,   42,   29,   26,   60,   26,   59,   58,   36,
733        23,   23,   23,   24,   24,   24,   35,   57,   35,   37,
734        56,   37,   55,   54,   53,   52,   51,   50,   49,   48,
735        47,   46,   45,   44,   43,   36,   41,   40,   39,   38,
736        28,   27,   36,   34,   33,   32,   31,   30,   28,   28,
737        27,   61,   22,    7,   61,   61,   61,   61,   61,   61,
738        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
739 
740        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
741        61,   61
742     } ;
743 
744 static const flex_int16_t yy_chk[113] =
745     {   0,
746         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
747         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
748         1,    1,    1,    1,    1,    1,    1,    1,    3,    3,
749         4,    4,   36,   64,    3,   58,    4,   56,   54,   36,
750        62,   62,   62,   63,   63,   63,   65,   53,   65,   66,
751        52,   66,   51,   50,   49,   48,   47,   46,   45,   44,
752        43,   41,   40,   39,   38,   35,   34,   32,   31,   30,
753        28,   27,   22,   20,   19,   18,   17,   15,   14,   13,
754         9,    7,    2,   61,   61,   61,   61,   61,   61,   61,
755        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
756 
757        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
758        61,   61
759     } ;
760 
761 /* Table of booleans, true if rule could match eol. */
762 static const flex_int32_t yy_rule_can_match_eol[19] =
763     {   0,
764 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     };
765 
766 extern int yy_flex_debug;
767 int yy_flex_debug = 0;
768 
769 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
770 static char *yy_full_match;
771 static int yy_lp;
772 #define REJECT \
773 { \
774 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
775 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
776 ++(yy_lp); \
777 goto find_rule; \
778 }
779 
780 #define yymore() yymore_used_but_not_detected
781 #define YY_MORE_ADJ 0
782 #define YY_RESTORE_YY_MORE_OFFSET
783 char *yytext;
784 #line 1 "matcher_parser_lex.l"
785 #line 4 "matcher_parser_lex.l"
786 /*
787  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
788  * Copyright (c) 2001-2007 by Hiroyuki Yamamoto & The Claws Mail Team
789  *
790  * This program is free software; you can redistribute it and/or modify
791  * it under the terms of the GNU General Public License as published by
792  * the Free Software Foundation; either version 3 of the License, or
793  * (at your option) any later version.
794  *
795  * This program is distributed in the hope that it will be useful,
796  * but WITHOUT ANY WARRANTY; without even the implied warranty of
797  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
798  * GNU General Public License for more details.
799  *
800  * You should have received a copy of the GNU General Public License
801  * along with this program. If not, see <http://www.gnu.org/licenses/>.
802  *
803  */
804 
805 #include <string.h>
806 #include <glib.h>
807 
808 #include "codeconv.h"
809 #include "matcher.h"
810 #include "matcher_parser_lex.h"
811 
812 #ifndef YYSTYPE
813 #include "matcher_parser_parse.h"
814 #endif
815 
816 #define MAX_STR_CONST 8192
817 
818 static char string_buf[MAX_STR_CONST];
819 static char *string_buf_ptr;
820 
add_char(char ch)821 static void add_char(char ch)
822 {
823 	if (string_buf_ptr - string_buf < sizeof(string_buf))
824 		*string_buf_ptr++ = ch;
825 }
826 
827 
828 /* this function will reinitializes the parser */
829 
matcher_parser_init(void)830 void matcher_parser_init(void)
831 {
832         BEGIN(0);
833 }
834 #line 834 "matcher_parser_lex.c"
835 
836 #line 836 "matcher_parser_lex.c"
837 
838 #define INITIAL 0
839 #define string 1
840 #define section 2
841 
842 #ifndef YY_NO_UNISTD_H
843 /* Special case for "unistd.h", since it is non-ANSI. We include it way
844  * down here because we want the user's section 1 to have been scanned first.
845  * The user has a chance to override it with an option.
846  */
847 #include <unistd.h>
848 #endif
849 
850 #ifndef YY_EXTRA_TYPE
851 #define YY_EXTRA_TYPE void *
852 #endif
853 
854 static int yy_init_globals ( void );
855 
856 /* Accessor methods to globals.
857    These are made visible to non-reentrant scanners for convenience. */
858 
859 int yylex_destroy ( void );
860 
861 int yyget_debug ( void );
862 
863 void yyset_debug ( int debug_flag  );
864 
865 YY_EXTRA_TYPE yyget_extra ( void );
866 
867 void yyset_extra ( YY_EXTRA_TYPE user_defined  );
868 
869 FILE *yyget_in ( void );
870 
871 void yyset_in  ( FILE * _in_str  );
872 
873 FILE *yyget_out ( void );
874 
875 void yyset_out  ( FILE * _out_str  );
876 
877 			int yyget_leng ( void );
878 
879 char *yyget_text ( void );
880 
881 int yyget_lineno ( void );
882 
883 void yyset_lineno ( int _line_number  );
884 
885 /* Macros after this point can all be overridden by user definitions in
886  * section 1.
887  */
888 
889 #ifndef YY_SKIP_YYWRAP
890 #ifdef __cplusplus
891 extern "C" int yywrap ( void );
892 #else
893 extern int yywrap ( void );
894 #endif
895 #endif
896 
897 #ifndef YY_NO_UNPUT
898 
899 #endif
900 
901 #ifndef yytext_ptr
902 static void yy_flex_strncpy ( char *, const char *, int );
903 #endif
904 
905 #ifdef YY_NEED_STRLEN
906 static int yy_flex_strlen ( const char * );
907 #endif
908 
909 #ifndef YY_NO_INPUT
910 #ifdef __cplusplus
911 static int yyinput ( void );
912 #else
913 static int input ( void );
914 #endif
915 
916 #endif
917 
918 /* Amount of stuff to slurp up with each read. */
919 #ifndef YY_READ_BUF_SIZE
920 #ifdef __ia64__
921 /* On IA-64, the buffer size is 16k, not 8k */
922 #define YY_READ_BUF_SIZE 16384
923 #else
924 #define YY_READ_BUF_SIZE 8192
925 #endif /* __ia64__ */
926 #endif
927 
928 /* Copy whatever the last rule matched to the standard output. */
929 #ifndef ECHO
930 /* This used to be an fputs(), but since the string might contain NUL's,
931  * we now use fwrite().
932  */
933 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
934 #endif
935 
936 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
937  * is returned in "result".
938  */
939 #ifndef YY_INPUT
940 #define YY_INPUT(buf,result,max_size) \
941 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
942 		{ \
943 		int c = '*'; \
944 		int n; \
945 		for ( n = 0; n < max_size && \
946 			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
947 			buf[n] = (char) c; \
948 		if ( c == '\n' ) \
949 			buf[n++] = (char) c; \
950 		if ( c == EOF && ferror( yyin ) ) \
951 			YY_FATAL_ERROR( "input in flex scanner failed" ); \
952 		result = n; \
953 		} \
954 	else \
955 		{ \
956 		errno=0; \
957 		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
958 			{ \
959 			if( errno != EINTR) \
960 				{ \
961 				YY_FATAL_ERROR( "input in flex scanner failed" ); \
962 				break; \
963 				} \
964 			errno=0; \
965 			clearerr(yyin); \
966 			} \
967 		}\
968 \
969 
970 #endif
971 
972 /* No semi-colon after return; correct usage is to write "yyterminate();" -
973  * we don't want an extra ';' after the "return" because that will cause
974  * some compilers to complain about unreachable statements.
975  */
976 #ifndef yyterminate
977 #define yyterminate() return YY_NULL
978 #endif
979 
980 /* Number of entries by which start-condition stack grows. */
981 #ifndef YY_START_STACK_INCR
982 #define YY_START_STACK_INCR 25
983 #endif
984 
985 /* Report a fatal error. */
986 #ifndef YY_FATAL_ERROR
987 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
988 #endif
989 
990 /* end tables serialization structures and prototypes */
991 
992 /* Default declaration of generated scanner - a define so the user can
993  * easily add parameters.
994  */
995 #ifndef YY_DECL
996 #define YY_DECL_IS_OURS 1
997 
998 extern int yylex (void);
999 
1000 #define YY_DECL int yylex (void)
1001 #endif /* !YY_DECL */
1002 
1003 /* Code executed at the beginning of each rule, after yytext and yyleng
1004  * have been set up.
1005  */
1006 #ifndef YY_USER_ACTION
1007 #define YY_USER_ACTION
1008 #endif
1009 
1010 /* Code executed at the end of each rule. */
1011 #ifndef YY_BREAK
1012 #define YY_BREAK /*LINTED*/break;
1013 #endif
1014 
1015 #define YY_RULE_SETUP \
1016 	if ( yyleng > 0 ) \
1017 		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1018 				(yytext[yyleng - 1] == '\n'); \
1019 	YY_USER_ACTION
1020 
1021 /** The main scanner function which does all the work.
1022  */
1023 YY_DECL
1024 {
1025 	yy_state_type yy_current_state;
1026 	char *yy_cp, *yy_bp;
1027 	int yy_act;
1028 
1029 	if ( !(yy_init) )
1030 		{
1031 		(yy_init) = 1;
1032 
1033 #ifdef YY_USER_INIT
1034 		YY_USER_INIT;
1035 #endif
1036 
1037         /* Create the reject buffer large enough to save one state per allowed character. */
1038         if ( ! (yy_state_buf) )
1039             (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
1040             if ( ! (yy_state_buf) )
1041                 YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
1042 
1043 		if ( ! (yy_start) )
1044 			(yy_start) = 1;	/* first start state */
1045 
1046 		if ( ! yyin )
1047 			yyin = stdin;
1048 
1049 		if ( ! yyout )
1050 			yyout = stdout;
1051 
1052 		if ( ! YY_CURRENT_BUFFER ) {
1053 			yyensure_buffer_stack ();
1054 			YY_CURRENT_BUFFER_LVALUE =
1055 				yy_create_buffer( yyin, YY_BUF_SIZE );
1056 		}
1057 
1058 		yy_load_buffer_state(  );
1059 		}
1060 
1061 	{
1062 #line 61 "matcher_parser_lex.l"
1063 
1064 #line 63 "matcher_parser_lex.l"
1065 
1066 #line 1066 "matcher_parser_lex.c"
1067 
1068 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
1069 		{
1070 		yy_cp = (yy_c_buf_p);
1071 
1072 		/* Support of yytext. */
1073 		*yy_cp = (yy_hold_char);
1074 
1075 		/* yy_bp points to the position in yy_ch_buf of the start of
1076 		 * the current run.
1077 		 */
1078 		yy_bp = yy_cp;
1079 
1080 		yy_current_state = (yy_start);
1081 		yy_current_state += YY_AT_BOL();
1082 
1083 		(yy_state_ptr) = (yy_state_buf);
1084 		*(yy_state_ptr)++ = yy_current_state;
1085 
1086 yy_match:
1087 		do
1088 			{
1089 			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1090 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1091 				{
1092 				yy_current_state = (int) yy_def[yy_current_state];
1093 				if ( yy_current_state >= 62 )
1094 					yy_c = yy_meta[yy_c];
1095 				}
1096 			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1097 			*(yy_state_ptr)++ = yy_current_state;
1098 			++yy_cp;
1099 			}
1100 		while ( yy_current_state != 61 );
1101 
1102 yy_find_action:
1103 		yy_current_state = *--(yy_state_ptr);
1104 		(yy_lp) = yy_accept[yy_current_state];
1105 
1106 find_rule: /* we branch to this label when backing up */
1107 
1108 		for ( ; ; ) /* until we find what rule we matched */
1109 			{
1110 			if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1111 				{
1112 				yy_act = yy_acclist[(yy_lp)];
1113 					{
1114 					(yy_full_match) = yy_cp;
1115 					break;
1116 					}
1117 				}
1118 			--yy_cp;
1119 			yy_current_state = *--(yy_state_ptr);
1120 			(yy_lp) = yy_accept[yy_current_state];
1121 			}
1122 
1123 		YY_DO_BEFORE_ACTION;
1124 
1125 		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1126 			{
1127 			int yyl;
1128 			for ( yyl = 0; yyl < yyleng; ++yyl )
1129 				if ( yytext[yyl] == '\n' )
1130 
1131     yylineno++;
1132 ;
1133 			}
1134 
1135 do_action:	/* This label is used only to access EOF actions. */
1136 
1137 		switch ( yy_act )
1138 	{ /* beginning of action switch */
1139 case 1:
1140 YY_RULE_SETUP
1141 #line 64 "matcher_parser_lex.l"
1142 return MATCHER_IN;
1143 	YY_BREAK
1144 /*
1145 			 * a keyword consists of alpha and underscore
1146 			 * characters, possibly preceded by a tilde (~)
1147 			 */
1148 case 2:
1149 YY_RULE_SETUP
1150 #line 71 "matcher_parser_lex.l"
1151 {
1152 				gint id;
1153 
1154 				if (-1 == (id = get_matchparser_tab_id(yytext))) {
1155 					REJECT;
1156 				} else
1157 					return id;
1158 			}
1159 	YY_BREAK
1160 case 3:
1161 YY_RULE_SETUP
1162 #line 79 "matcher_parser_lex.l"
1163 
1164 	YY_BREAK
1165 case 4:
1166 /* rule 4 can match eol */
1167 YY_RULE_SETUP
1168 #line 80 "matcher_parser_lex.l"
1169 return MATCHER_EOL;
1170 	YY_BREAK
1171 case 5:
1172 YY_RULE_SETUP
1173 #line 81 "matcher_parser_lex.l"
1174 return MATCHER_AND;
1175 	YY_BREAK
1176 case 6:
1177 YY_RULE_SETUP
1178 #line 82 "matcher_parser_lex.l"
1179 return MATCHER_OR;
1180 	YY_BREAK
1181 case 7:
1182 YY_RULE_SETUP
1183 #line 83 "matcher_parser_lex.l"
1184 {
1185 		BEGIN(string);
1186 		string_buf_ptr = string_buf;
1187 		}
1188 	YY_BREAK
1189 case 8:
1190 YY_RULE_SETUP
1191 #line 87 "matcher_parser_lex.l"
1192 {
1193 		/* get out of the state: string ends. */
1194 		BEGIN(0);
1195 		*string_buf_ptr = '\0';
1196 		if (!g_utf8_validate(string_buf, -1, NULL)) {
1197 			gchar *tmp = conv_codeset_strdup(string_buf, conv_get_locale_charset_str(), CS_INTERNAL);
1198 			if (tmp) {
1199 				g_strlcpy(string_buf, tmp, sizeof(string_buf));
1200 				g_free(tmp);
1201 			}
1202 		}
1203 		yylval.str = string_buf;
1204 		return MATCHER_STRING;
1205 		}
1206 	YY_BREAK
1207 case 9:
1208 YY_RULE_SETUP
1209 #line 101 "matcher_parser_lex.l"
1210 {
1211                 /* take care of quoted characters */
1212 		add_char(yytext[1]);
1213 		}
1214 	YY_BREAK
1215 case 10:
1216 YY_RULE_SETUP
1217 #line 105 "matcher_parser_lex.l"
1218 {
1219 		add_char(yytext[0]);
1220 		}
1221 	YY_BREAK
1222 case 11:
1223 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
1224 (yy_c_buf_p) = yy_cp -= 1;
1225 YY_DO_BEFORE_ACTION; /* set up yytext again */
1226 YY_RULE_SETUP
1227 #line 108 "matcher_parser_lex.l"
1228 {
1229                 /* for section name in configuration file */
1230 		BEGIN(0);
1231 		yylval.str = yytext + 1;
1232 		yytext[strlen(yytext) - 1] = '\0';
1233 		return MATCHER_SECTION;
1234 		}
1235 	YY_BREAK
1236 case 12:
1237 YY_RULE_SETUP
1238 #line 115 "matcher_parser_lex.l"
1239 {
1240 		yylval.str = yytext;
1241 		return MATCHER_INTEGER;
1242 		}
1243 	YY_BREAK
1244 case 13:
1245 YY_RULE_SETUP
1246 #line 119 "matcher_parser_lex.l"
1247 {
1248 		return MATCHER_RULENAME;
1249 		}
1250 	YY_BREAK
1251 case 14:
1252 YY_RULE_SETUP
1253 #line 122 "matcher_parser_lex.l"
1254 {
1255 		return MATCHER_DISABLED;
1256 		}
1257 	YY_BREAK
1258 case 15:
1259 YY_RULE_SETUP
1260 #line 125 "matcher_parser_lex.l"
1261 {
1262 		return MATCHER_ACCOUNT;
1263 		}
1264 	YY_BREAK
1265 case 16:
1266 YY_RULE_SETUP
1267 #line 128 "matcher_parser_lex.l"
1268 {
1269 		return MATCHER_ENABLED;
1270 		}
1271 	YY_BREAK
1272 case 17:
1273 YY_RULE_SETUP
1274 #line 131 "matcher_parser_lex.l"
1275 { /* silently eat unmatched input at lexer level */ }
1276 	YY_BREAK
1277 case 18:
1278 YY_RULE_SETUP
1279 #line 132 "matcher_parser_lex.l"
1280 ECHO;
1281 	YY_BREAK
1282 #line 1282 "matcher_parser_lex.c"
1283 			case YY_STATE_EOF(INITIAL):
1284 			case YY_STATE_EOF(string):
1285 			case YY_STATE_EOF(section):
1286 				yyterminate();
1287 
1288 	case YY_END_OF_BUFFER:
1289 		{
1290 		/* Amount of text matched not including the EOB char. */
1291 		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1292 
1293 		/* Undo the effects of YY_DO_BEFORE_ACTION. */
1294 		*yy_cp = (yy_hold_char);
1295 		YY_RESTORE_YY_MORE_OFFSET
1296 
1297 		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1298 			{
1299 			/* We're scanning a new file or input source.  It's
1300 			 * possible that this happened because the user
1301 			 * just pointed yyin at a new source and called
1302 			 * yylex().  If so, then we have to assure
1303 			 * consistency between YY_CURRENT_BUFFER and our
1304 			 * globals.  Here is the right place to do so, because
1305 			 * this is the first action (other than possibly a
1306 			 * back-up) that will match for the new input source.
1307 			 */
1308 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1309 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1310 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1311 			}
1312 
1313 		/* Note that here we test for yy_c_buf_p "<=" to the position
1314 		 * of the first EOB in the buffer, since yy_c_buf_p will
1315 		 * already have been incremented past the NUL character
1316 		 * (since all states make transitions on EOB to the
1317 		 * end-of-buffer state).  Contrast this with the test
1318 		 * in input().
1319 		 */
1320 		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1321 			{ /* This was really a NUL. */
1322 			yy_state_type yy_next_state;
1323 
1324 			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1325 
1326 			yy_current_state = yy_get_previous_state(  );
1327 
1328 			/* Okay, we're now positioned to make the NUL
1329 			 * transition.  We couldn't have
1330 			 * yy_get_previous_state() go ahead and do it
1331 			 * for us because it doesn't know how to deal
1332 			 * with the possibility of jamming (and we don't
1333 			 * want to build jamming into it because then it
1334 			 * will run more slowly).
1335 			 */
1336 
1337 			yy_next_state = yy_try_NUL_trans( yy_current_state );
1338 
1339 			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1340 
1341 			if ( yy_next_state )
1342 				{
1343 				/* Consume the NUL. */
1344 				yy_cp = ++(yy_c_buf_p);
1345 				yy_current_state = yy_next_state;
1346 				goto yy_match;
1347 				}
1348 
1349 			else
1350 				{
1351 				yy_cp = (yy_c_buf_p);
1352 				goto yy_find_action;
1353 				}
1354 			}
1355 
1356 		else switch ( yy_get_next_buffer(  ) )
1357 			{
1358 			case EOB_ACT_END_OF_FILE:
1359 				{
1360 				(yy_did_buffer_switch_on_eof) = 0;
1361 
1362 				if ( yywrap(  ) )
1363 					{
1364 					/* Note: because we've taken care in
1365 					 * yy_get_next_buffer() to have set up
1366 					 * yytext, we can now set up
1367 					 * yy_c_buf_p so that if some total
1368 					 * hoser (like flex itself) wants to
1369 					 * call the scanner after we return the
1370 					 * YY_NULL, it'll still work - another
1371 					 * YY_NULL will get returned.
1372 					 */
1373 					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1374 
1375 					yy_act = YY_STATE_EOF(YY_START);
1376 					goto do_action;
1377 					}
1378 
1379 				else
1380 					{
1381 					if ( ! (yy_did_buffer_switch_on_eof) )
1382 						YY_NEW_FILE;
1383 					}
1384 				break;
1385 				}
1386 
1387 			case EOB_ACT_CONTINUE_SCAN:
1388 				(yy_c_buf_p) =
1389 					(yytext_ptr) + yy_amount_of_matched_text;
1390 
1391 				yy_current_state = yy_get_previous_state(  );
1392 
1393 				yy_cp = (yy_c_buf_p);
1394 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1395 				goto yy_match;
1396 
1397 			case EOB_ACT_LAST_MATCH:
1398 				(yy_c_buf_p) =
1399 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1400 
1401 				yy_current_state = yy_get_previous_state(  );
1402 
1403 				yy_cp = (yy_c_buf_p);
1404 				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1405 				goto yy_find_action;
1406 			}
1407 		break;
1408 		}
1409 
1410 	default:
1411 		YY_FATAL_ERROR(
1412 			"fatal flex scanner internal error--no action found" );
1413 	} /* end of action switch */
1414 		} /* end of scanning one token */
1415 	} /* end of user's declarations */
1416 } /* end of yylex */
1417 
1418 /* yy_get_next_buffer - try to read in a new buffer
1419  *
1420  * Returns a code representing an action:
1421  *	EOB_ACT_LAST_MATCH -
1422  *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1423  *	EOB_ACT_END_OF_FILE - end of file
1424  */
yy_get_next_buffer(void)1425 static int yy_get_next_buffer (void)
1426 {
1427     	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1428 	char *source = (yytext_ptr);
1429 	int number_to_move, i;
1430 	int ret_val;
1431 
1432 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1433 		YY_FATAL_ERROR(
1434 		"fatal flex scanner internal error--end of buffer missed" );
1435 
1436 	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1437 		{ /* Don't try to fill the buffer, so this is an EOF. */
1438 		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1439 			{
1440 			/* We matched a single character, the EOB, so
1441 			 * treat this as a final EOF.
1442 			 */
1443 			return EOB_ACT_END_OF_FILE;
1444 			}
1445 
1446 		else
1447 			{
1448 			/* We matched some text prior to the EOB, first
1449 			 * process it.
1450 			 */
1451 			return EOB_ACT_LAST_MATCH;
1452 			}
1453 		}
1454 
1455 	/* Try to read more data. */
1456 
1457 	/* First move last chars to start of buffer. */
1458 	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1459 
1460 	for ( i = 0; i < number_to_move; ++i )
1461 		*(dest++) = *(source++);
1462 
1463 	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1464 		/* don't do the read, it's not guaranteed to return an EOF,
1465 		 * just force an EOF
1466 		 */
1467 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1468 
1469 	else
1470 		{
1471 			int num_to_read =
1472 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1473 
1474 		while ( num_to_read <= 0 )
1475 			{ /* Not enough room in the buffer - grow it. */
1476 
1477 			YY_FATAL_ERROR(
1478 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1479 
1480 			}
1481 
1482 		if ( num_to_read > YY_READ_BUF_SIZE )
1483 			num_to_read = YY_READ_BUF_SIZE;
1484 
1485 		/* Read in more data. */
1486 		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1487 			(yy_n_chars), num_to_read );
1488 
1489 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1490 		}
1491 
1492 	if ( (yy_n_chars) == 0 )
1493 		{
1494 		if ( number_to_move == YY_MORE_ADJ )
1495 			{
1496 			ret_val = EOB_ACT_END_OF_FILE;
1497 			yyrestart( yyin  );
1498 			}
1499 
1500 		else
1501 			{
1502 			ret_val = EOB_ACT_LAST_MATCH;
1503 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1504 				YY_BUFFER_EOF_PENDING;
1505 			}
1506 		}
1507 
1508 	else
1509 		ret_val = EOB_ACT_CONTINUE_SCAN;
1510 
1511 	if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1512 		/* Extend the array by 50%, plus the number we really need. */
1513 		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1514 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1515 			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
1516 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1517 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1518 		/* "- 2" to take care of EOB's */
1519 		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1520 	}
1521 
1522 	(yy_n_chars) += number_to_move;
1523 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1524 	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1525 
1526 	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1527 
1528 	return ret_val;
1529 }
1530 
1531 /* yy_get_previous_state - get the state just before the EOB char was reached */
1532 
yy_get_previous_state(void)1533     static yy_state_type yy_get_previous_state (void)
1534 {
1535 	yy_state_type yy_current_state;
1536 	char *yy_cp;
1537 
1538 	yy_current_state = (yy_start);
1539 	yy_current_state += YY_AT_BOL();
1540 
1541 	(yy_state_ptr) = (yy_state_buf);
1542 	*(yy_state_ptr)++ = yy_current_state;
1543 
1544 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1545 		{
1546 		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1547 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1548 			{
1549 			yy_current_state = (int) yy_def[yy_current_state];
1550 			if ( yy_current_state >= 62 )
1551 				yy_c = yy_meta[yy_c];
1552 			}
1553 		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1554 		*(yy_state_ptr)++ = yy_current_state;
1555 		}
1556 
1557 	return yy_current_state;
1558 }
1559 
1560 /* yy_try_NUL_trans - try to make a transition on the NUL character
1561  *
1562  * synopsis
1563  *	next_state = yy_try_NUL_trans( current_state );
1564  */
yy_try_NUL_trans(yy_state_type yy_current_state)1565     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1566 {
1567 	int yy_is_jam;
1568 
1569 	YY_CHAR yy_c = 1;
1570 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1571 		{
1572 		yy_current_state = (int) yy_def[yy_current_state];
1573 		if ( yy_current_state >= 62 )
1574 			yy_c = yy_meta[yy_c];
1575 		}
1576 	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1577 	yy_is_jam = (yy_current_state == 61);
1578 	if ( ! yy_is_jam )
1579 		*(yy_state_ptr)++ = yy_current_state;
1580 
1581 		return yy_is_jam ? 0 : yy_current_state;
1582 }
1583 
1584 #ifndef YY_NO_UNPUT
1585 
1586 #endif
1587 
1588 #ifndef YY_NO_INPUT
1589 #ifdef __cplusplus
yyinput(void)1590     static int yyinput (void)
1591 #else
1592     static int input  (void)
1593 #endif
1594 
1595 {
1596 	int c;
1597 
1598 	*(yy_c_buf_p) = (yy_hold_char);
1599 
1600 	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1601 		{
1602 		/* yy_c_buf_p now points to the character we want to return.
1603 		 * If this occurs *before* the EOB characters, then it's a
1604 		 * valid NUL; if not, then we've hit the end of the buffer.
1605 		 */
1606 		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1607 			/* This was really a NUL. */
1608 			*(yy_c_buf_p) = '\0';
1609 
1610 		else
1611 			{ /* need more input */
1612 			int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1613 			++(yy_c_buf_p);
1614 
1615 			switch ( yy_get_next_buffer(  ) )
1616 				{
1617 				case EOB_ACT_LAST_MATCH:
1618 					/* This happens because yy_g_n_b()
1619 					 * sees that we've accumulated a
1620 					 * token and flags that we need to
1621 					 * try matching the token before
1622 					 * proceeding.  But for input(),
1623 					 * there's no matching to consider.
1624 					 * So convert the EOB_ACT_LAST_MATCH
1625 					 * to EOB_ACT_END_OF_FILE.
1626 					 */
1627 
1628 					/* Reset buffer status. */
1629 					yyrestart( yyin );
1630 
1631 					/*FALLTHROUGH*/
1632 
1633 				case EOB_ACT_END_OF_FILE:
1634 					{
1635 					if ( yywrap(  ) )
1636 						return 0;
1637 
1638 					if ( ! (yy_did_buffer_switch_on_eof) )
1639 						YY_NEW_FILE;
1640 #ifdef __cplusplus
1641 					return yyinput();
1642 #else
1643 					return input();
1644 #endif
1645 					}
1646 
1647 				case EOB_ACT_CONTINUE_SCAN:
1648 					(yy_c_buf_p) = (yytext_ptr) + offset;
1649 					break;
1650 				}
1651 			}
1652 		}
1653 
1654 	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
1655 	*(yy_c_buf_p) = '\0';	/* preserve yytext */
1656 	(yy_hold_char) = *++(yy_c_buf_p);
1657 
1658 	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1659 	if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1660 
1661     yylineno++;
1662 ;
1663 
1664 	return c;
1665 }
1666 #endif	/* ifndef YY_NO_INPUT */
1667 
1668 /** Immediately switch to a different input stream.
1669  * @param input_file A readable stream.
1670  *
1671  * @note This function does not reset the start condition to @c INITIAL .
1672  */
yyrestart(FILE * input_file)1673     void yyrestart  (FILE * input_file )
1674 {
1675 
1676 	if ( ! YY_CURRENT_BUFFER ){
1677         yyensure_buffer_stack ();
1678 		YY_CURRENT_BUFFER_LVALUE =
1679             yy_create_buffer( yyin, YY_BUF_SIZE );
1680 	}
1681 
1682 	yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1683 	yy_load_buffer_state(  );
1684 }
1685 
1686 /** Switch to a different input buffer.
1687  * @param new_buffer The new input buffer.
1688  *
1689  */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)1690     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1691 {
1692 
1693 	/* TODO. We should be able to replace this entire function body
1694 	 * with
1695 	 *		yypop_buffer_state();
1696 	 *		yypush_buffer_state(new_buffer);
1697      */
1698 	yyensure_buffer_stack ();
1699 	if ( YY_CURRENT_BUFFER == new_buffer )
1700 		return;
1701 
1702 	if ( YY_CURRENT_BUFFER )
1703 		{
1704 		/* Flush out information for old buffer. */
1705 		*(yy_c_buf_p) = (yy_hold_char);
1706 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1707 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1708 		}
1709 
1710 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1711 	yy_load_buffer_state(  );
1712 
1713 	/* We don't actually know whether we did this switch during
1714 	 * EOF (yywrap()) processing, but the only time this flag
1715 	 * is looked at is after yywrap() is called, so it's safe
1716 	 * to go ahead and always set it.
1717 	 */
1718 	(yy_did_buffer_switch_on_eof) = 1;
1719 }
1720 
yy_load_buffer_state(void)1721 static void yy_load_buffer_state  (void)
1722 {
1723     	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1724 	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1725 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1726 	(yy_hold_char) = *(yy_c_buf_p);
1727 }
1728 
1729 /** Allocate and initialize an input buffer state.
1730  * @param file A readable stream.
1731  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1732  *
1733  * @return the allocated buffer state.
1734  */
yy_create_buffer(FILE * file,int size)1735     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
1736 {
1737 	YY_BUFFER_STATE b;
1738 
1739 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
1740 	if ( ! b )
1741 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1742 
1743 	b->yy_buf_size = size;
1744 
1745 	/* yy_ch_buf has to be 2 characters longer than the size given because
1746 	 * we need to put in 2 end-of-buffer characters.
1747 	 */
1748 	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
1749 	if ( ! b->yy_ch_buf )
1750 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1751 
1752 	b->yy_is_our_buffer = 1;
1753 
1754 	yy_init_buffer( b, file );
1755 
1756 	return b;
1757 }
1758 
1759 /** Destroy the buffer.
1760  * @param b a buffer created with yy_create_buffer()
1761  *
1762  */
yy_delete_buffer(YY_BUFFER_STATE b)1763     void yy_delete_buffer (YY_BUFFER_STATE  b )
1764 {
1765 
1766 	if ( ! b )
1767 		return;
1768 
1769 	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1770 		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1771 
1772 	if ( b->yy_is_our_buffer )
1773 		yyfree( (void *) b->yy_ch_buf  );
1774 
1775 	yyfree( (void *) b  );
1776 }
1777 
1778 /* Initializes or reinitializes a buffer.
1779  * This function is sometimes called more than once on the same buffer,
1780  * such as during a yyrestart() or at EOF.
1781  */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file)1782     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1783 
1784 {
1785 	int oerrno = errno;
1786 
1787 	yy_flush_buffer( b );
1788 
1789 	b->yy_input_file = file;
1790 	b->yy_fill_buffer = 1;
1791 
1792     /* If b is the current buffer, then yy_init_buffer was _probably_
1793      * called from yyrestart() or through yy_get_next_buffer.
1794      * In that case, we don't want to reset the lineno or column.
1795      */
1796     if (b != YY_CURRENT_BUFFER){
1797         b->yy_bs_lineno = 1;
1798         b->yy_bs_column = 0;
1799     }
1800 
1801         b->yy_is_interactive = 0;
1802 
1803 	errno = oerrno;
1804 }
1805 
1806 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1807  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1808  *
1809  */
yy_flush_buffer(YY_BUFFER_STATE b)1810     void yy_flush_buffer (YY_BUFFER_STATE  b )
1811 {
1812     	if ( ! b )
1813 		return;
1814 
1815 	b->yy_n_chars = 0;
1816 
1817 	/* We always need two end-of-buffer characters.  The first causes
1818 	 * a transition to the end-of-buffer state.  The second causes
1819 	 * a jam in that state.
1820 	 */
1821 	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1822 	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1823 
1824 	b->yy_buf_pos = &b->yy_ch_buf[0];
1825 
1826 	b->yy_at_bol = 1;
1827 	b->yy_buffer_status = YY_BUFFER_NEW;
1828 
1829 	if ( b == YY_CURRENT_BUFFER )
1830 		yy_load_buffer_state(  );
1831 }
1832 
1833 /** Pushes the new state onto the stack. The new state becomes
1834  *  the current state. This function will allocate the stack
1835  *  if necessary.
1836  *  @param new_buffer The new state.
1837  *
1838  */
yypush_buffer_state(YY_BUFFER_STATE new_buffer)1839 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1840 {
1841     	if (new_buffer == NULL)
1842 		return;
1843 
1844 	yyensure_buffer_stack();
1845 
1846 	/* This block is copied from yy_switch_to_buffer. */
1847 	if ( YY_CURRENT_BUFFER )
1848 		{
1849 		/* Flush out information for old buffer. */
1850 		*(yy_c_buf_p) = (yy_hold_char);
1851 		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1852 		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1853 		}
1854 
1855 	/* Only push if top exists. Otherwise, replace top. */
1856 	if (YY_CURRENT_BUFFER)
1857 		(yy_buffer_stack_top)++;
1858 	YY_CURRENT_BUFFER_LVALUE = new_buffer;
1859 
1860 	/* copied from yy_switch_to_buffer. */
1861 	yy_load_buffer_state(  );
1862 	(yy_did_buffer_switch_on_eof) = 1;
1863 }
1864 
1865 /** Removes and deletes the top of the stack, if present.
1866  *  The next element becomes the new top.
1867  *
1868  */
yypop_buffer_state(void)1869 void yypop_buffer_state (void)
1870 {
1871     	if (!YY_CURRENT_BUFFER)
1872 		return;
1873 
1874 	yy_delete_buffer(YY_CURRENT_BUFFER );
1875 	YY_CURRENT_BUFFER_LVALUE = NULL;
1876 	if ((yy_buffer_stack_top) > 0)
1877 		--(yy_buffer_stack_top);
1878 
1879 	if (YY_CURRENT_BUFFER) {
1880 		yy_load_buffer_state(  );
1881 		(yy_did_buffer_switch_on_eof) = 1;
1882 	}
1883 }
1884 
1885 /* Allocates the stack if it does not exist.
1886  *  Guarantees space for at least one push.
1887  */
yyensure_buffer_stack(void)1888 static void yyensure_buffer_stack (void)
1889 {
1890 	yy_size_t num_to_alloc;
1891 
1892 	if (!(yy_buffer_stack)) {
1893 
1894 		/* First allocation is just for 2 elements, since we don't know if this
1895 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1896 		 * immediate realloc on the next call.
1897          */
1898       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1899 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1900 								(num_to_alloc * sizeof(struct yy_buffer_state*)
1901 								);
1902 		if ( ! (yy_buffer_stack) )
1903 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1904 
1905 		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1906 
1907 		(yy_buffer_stack_max) = num_to_alloc;
1908 		(yy_buffer_stack_top) = 0;
1909 		return;
1910 	}
1911 
1912 	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1913 
1914 		/* Increase the buffer to prepare for a possible push. */
1915 		yy_size_t grow_size = 8 /* arbitrary grow size */;
1916 
1917 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
1918 		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1919 								((yy_buffer_stack),
1920 								num_to_alloc * sizeof(struct yy_buffer_state*)
1921 								);
1922 		if ( ! (yy_buffer_stack) )
1923 			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1924 
1925 		/* zero only the new slots.*/
1926 		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1927 		(yy_buffer_stack_max) = num_to_alloc;
1928 	}
1929 }
1930 
1931 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1932  * @param base the character buffer
1933  * @param size the size in bytes of the character buffer
1934  *
1935  * @return the newly allocated buffer state object.
1936  */
yy_scan_buffer(char * base,yy_size_t size)1937 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
1938 {
1939 	YY_BUFFER_STATE b;
1940 
1941 	if ( size < 2 ||
1942 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
1943 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
1944 		/* They forgot to leave room for the EOB's. */
1945 		return NULL;
1946 
1947 	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
1948 	if ( ! b )
1949 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1950 
1951 	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
1952 	b->yy_buf_pos = b->yy_ch_buf = base;
1953 	b->yy_is_our_buffer = 0;
1954 	b->yy_input_file = NULL;
1955 	b->yy_n_chars = b->yy_buf_size;
1956 	b->yy_is_interactive = 0;
1957 	b->yy_at_bol = 1;
1958 	b->yy_fill_buffer = 0;
1959 	b->yy_buffer_status = YY_BUFFER_NEW;
1960 
1961 	yy_switch_to_buffer( b  );
1962 
1963 	return b;
1964 }
1965 
1966 /** Setup the input buffer state to scan a string. The next call to yylex() will
1967  * scan from a @e copy of @a str.
1968  * @param yystr a NUL-terminated string to scan
1969  *
1970  * @return the newly allocated buffer state object.
1971  * @note If you want to scan bytes that may contain NUL values, then use
1972  *       yy_scan_bytes() instead.
1973  */
yy_scan_string(const char * yystr)1974 YY_BUFFER_STATE yy_scan_string (const char * yystr )
1975 {
1976 
1977 	return yy_scan_bytes( yystr, (int) strlen(yystr) );
1978 }
1979 
1980 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1981  * scan from a @e copy of @a bytes.
1982  * @param yybytes the byte buffer to scan
1983  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1984  *
1985  * @return the newly allocated buffer state object.
1986  */
yy_scan_bytes(const char * yybytes,int _yybytes_len)1987 YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
1988 {
1989 	YY_BUFFER_STATE b;
1990 	char *buf;
1991 	yy_size_t n;
1992 	int i;
1993 
1994 	/* Get memory for full buffer, including space for trailing EOB's. */
1995 	n = (yy_size_t) (_yybytes_len + 2);
1996 	buf = (char *) yyalloc( n  );
1997 	if ( ! buf )
1998 		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1999 
2000 	for ( i = 0; i < _yybytes_len; ++i )
2001 		buf[i] = yybytes[i];
2002 
2003 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2004 
2005 	b = yy_scan_buffer( buf, n );
2006 	if ( ! b )
2007 		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2008 
2009 	/* It's okay to grow etc. this buffer, and we should throw it
2010 	 * away when we're done.
2011 	 */
2012 	b->yy_is_our_buffer = 1;
2013 
2014 	return b;
2015 }
2016 
2017 #ifndef YY_EXIT_FAILURE
2018 #define YY_EXIT_FAILURE 2
2019 #endif
2020 
yy_fatal_error(const char * msg)2021 static void yynoreturn yy_fatal_error (const char* msg )
2022 {
2023 			fprintf( stderr, "%s\n", msg );
2024 	exit( YY_EXIT_FAILURE );
2025 }
2026 
2027 /* Redefine yyless() so it works in section 3 code. */
2028 
2029 #undef yyless
2030 #define yyless(n) \
2031 	do \
2032 		{ \
2033 		/* Undo effects of setting up yytext. */ \
2034         int yyless_macro_arg = (n); \
2035         YY_LESS_LINENO(yyless_macro_arg);\
2036 		yytext[yyleng] = (yy_hold_char); \
2037 		(yy_c_buf_p) = yytext + yyless_macro_arg; \
2038 		(yy_hold_char) = *(yy_c_buf_p); \
2039 		*(yy_c_buf_p) = '\0'; \
2040 		yyleng = yyless_macro_arg; \
2041 		} \
2042 	while ( 0 )
2043 
2044 /* Accessor  methods (get/set functions) to struct members. */
2045 
2046 /** Get the current line number.
2047  *
2048  */
yyget_lineno(void)2049 int yyget_lineno  (void)
2050 {
2051 
2052     return yylineno;
2053 }
2054 
2055 /** Get the input stream.
2056  *
2057  */
yyget_in(void)2058 FILE *yyget_in  (void)
2059 {
2060         return yyin;
2061 }
2062 
2063 /** Get the output stream.
2064  *
2065  */
yyget_out(void)2066 FILE *yyget_out  (void)
2067 {
2068         return yyout;
2069 }
2070 
2071 /** Get the length of the current token.
2072  *
2073  */
yyget_leng(void)2074 int yyget_leng  (void)
2075 {
2076         return yyleng;
2077 }
2078 
2079 /** Get the current token.
2080  *
2081  */
2082 
yyget_text(void)2083 char *yyget_text  (void)
2084 {
2085         return yytext;
2086 }
2087 
2088 /** Set the current line number.
2089  * @param _line_number line number
2090  *
2091  */
yyset_lineno(int _line_number)2092 void yyset_lineno (int  _line_number )
2093 {
2094 
2095     yylineno = _line_number;
2096 }
2097 
2098 /** Set the input stream. This does not discard the current
2099  * input buffer.
2100  * @param _in_str A readable stream.
2101  *
2102  * @see yy_switch_to_buffer
2103  */
yyset_in(FILE * _in_str)2104 void yyset_in (FILE *  _in_str )
2105 {
2106         yyin = _in_str ;
2107 }
2108 
yyset_out(FILE * _out_str)2109 void yyset_out (FILE *  _out_str )
2110 {
2111         yyout = _out_str ;
2112 }
2113 
yyget_debug(void)2114 int yyget_debug  (void)
2115 {
2116         return yy_flex_debug;
2117 }
2118 
yyset_debug(int _bdebug)2119 void yyset_debug (int  _bdebug )
2120 {
2121         yy_flex_debug = _bdebug ;
2122 }
2123 
yy_init_globals(void)2124 static int yy_init_globals (void)
2125 {
2126         /* Initialization is the same as for the non-reentrant scanner.
2127      * This function is called from yylex_destroy(), so don't allocate here.
2128      */
2129 
2130     /* We do not touch yylineno unless the option is enabled. */
2131     yylineno =  1;
2132 
2133     (yy_buffer_stack) = NULL;
2134     (yy_buffer_stack_top) = 0;
2135     (yy_buffer_stack_max) = 0;
2136     (yy_c_buf_p) = NULL;
2137     (yy_init) = 0;
2138     (yy_start) = 0;
2139 
2140     (yy_state_buf) = 0;
2141     (yy_state_ptr) = 0;
2142     (yy_full_match) = 0;
2143     (yy_lp) = 0;
2144 
2145 /* Defined in main.c */
2146 #ifdef YY_STDINIT
2147     yyin = stdin;
2148     yyout = stdout;
2149 #else
2150     yyin = NULL;
2151     yyout = NULL;
2152 #endif
2153 
2154     /* For future reference: Set errno on error, since we are called by
2155      * yylex_init()
2156      */
2157     return 0;
2158 }
2159 
2160 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(void)2161 int yylex_destroy  (void)
2162 {
2163 
2164     /* Pop the buffer stack, destroying each element. */
2165 	while(YY_CURRENT_BUFFER){
2166 		yy_delete_buffer( YY_CURRENT_BUFFER  );
2167 		YY_CURRENT_BUFFER_LVALUE = NULL;
2168 		yypop_buffer_state();
2169 	}
2170 
2171 	/* Destroy the stack itself. */
2172 	yyfree((yy_buffer_stack) );
2173 	(yy_buffer_stack) = NULL;
2174 
2175     yyfree ( (yy_state_buf) );
2176     (yy_state_buf)  = NULL;
2177 
2178     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2179      * yylex() is called, initialization will occur. */
2180     yy_init_globals( );
2181 
2182     return 0;
2183 }
2184 
2185 /*
2186  * Internal utility routines.
2187  */
2188 
2189 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,const char * s2,int n)2190 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2191 {
2192 
2193 	int i;
2194 	for ( i = 0; i < n; ++i )
2195 		s1[i] = s2[i];
2196 }
2197 #endif
2198 
2199 #ifdef YY_NEED_STRLEN
yy_flex_strlen(const char * s)2200 static int yy_flex_strlen (const char * s )
2201 {
2202 	int n;
2203 	for ( n = 0; s[n]; ++n )
2204 		;
2205 
2206 	return n;
2207 }
2208 #endif
2209 
yyalloc(yy_size_t size)2210 void *yyalloc (yy_size_t  size )
2211 {
2212 			return malloc(size);
2213 }
2214 
yyrealloc(void * ptr,yy_size_t size)2215 void *yyrealloc  (void * ptr, yy_size_t  size )
2216 {
2217 
2218 	/* The cast to (char *) in the following accommodates both
2219 	 * implementations that use char* generic pointers, and those
2220 	 * that use void* generic pointers.  It works with the latter
2221 	 * because both ANSI C and C++ allow castless assignment from
2222 	 * any pointer type to void*, and deal with argument conversions
2223 	 * as though doing an assignment.
2224 	 */
2225 	return realloc(ptr, size);
2226 }
2227 
yyfree(void * ptr)2228 void yyfree (void * ptr )
2229 {
2230 			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
2231 }
2232 
2233 #define YYTABLES_NAME "yytables"
2234 
2235 #line 132 "matcher_parser_lex.l"
2236 
2237 
2238