4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer parse_events__create_buffer
9 #define yy_delete_buffer parse_events__delete_buffer
10 #define yy_flex_debug parse_events__flex_debug
11 #define yy_init_buffer parse_events__init_buffer
12 #define yy_flush_buffer parse_events__flush_buffer
13 #define yy_load_buffer_state parse_events__load_buffer_state
14 #define yy_switch_to_buffer parse_events__switch_to_buffer
15 #define yyin parse_events_in
16 #define yyleng parse_events_leng
17 #define yylex parse_events_lex
18 #define yylineno parse_events_lineno
19 #define yyout parse_events_out
20 #define yyrestart parse_events_restart
21 #define yytext parse_events_text
22 #define yywrap parse_events_wrap
23 #define yyalloc parse_events_alloc
24 #define yyrealloc parse_events_realloc
25 #define yyfree parse_events_free
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
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t;
63 typedef uint8_t flex_uint8_t;
64 typedef int16_t flex_int16_t;
65 typedef uint16_t flex_uint16_t;
66 typedef int32_t flex_int32_t;
67 typedef uint32_t flex_uint32_t;
69 typedef signed char flex_int8_t;
70 typedef short int flex_int16_t;
71 typedef int flex_int32_t;
72 typedef unsigned char flex_uint8_t;
73 typedef unsigned short int flex_uint16_t;
74 typedef unsigned int flex_uint32_t;
77 /* Limits of integral types. */
79 #define INT8_MIN (-128)
82 #define INT16_MIN (-32767-1)
85 #define INT32_MIN (-2147483647-1)
88 #define INT8_MAX (127)
91 #define INT16_MAX (32767)
94 #define INT32_MAX (2147483647)
97 #define UINT8_MAX (255U)
100 #define UINT16_MAX (65535U)
103 #define UINT32_MAX (4294967295U)
106 #endif /* ! FLEXINT_H */
110 /* The "const" storage-class-modifier is valid. */
113 #else /* ! __cplusplus */
115 /* C99 requires __STDC__ to be defined as 1. */
116 #if defined (__STDC__)
120 #endif /* defined (__STDC__) */
121 #endif /* ! __cplusplus */
124 #define yyconst const
129 /* Returned upon end-of-file. */
132 /* Promotes a possibly negative, possibly signed char to an unsigned
133 * integer for use as an array index. If the signed char is negative,
134 * we want to instead treat it as an 8-bit unsigned char, hence the
137 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
139 /* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
143 #define BEGIN (yy_start) = 1 + 2 *
145 /* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
149 #define YY_START (((yy_start) - 1) / 2)
150 #define YYSTATE YY_START
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE parse_events_restart(parse_events_in )
158 #define YY_END_OF_BUFFER_CHAR 0
160 /* Size of default input buffer. */
162 #define YY_BUF_SIZE 16384
165 /* The state buf must be large enough to hold one state per character in the main buffer.
167 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
170 #define YY_TYPEDEF_YY_BUFFER_STATE
171 typedef struct yy_buffer_state *YY_BUFFER_STATE;
174 extern int parse_events_leng;
176 extern FILE *parse_events_in, *parse_events_out;
178 #define EOB_ACT_CONTINUE_SCAN 0
179 #define EOB_ACT_END_OF_FILE 1
180 #define EOB_ACT_LAST_MATCH 2
182 #define YY_LESS_LINENO(n)
184 /* Return all but the first "n" matched characters back to the input stream. */
188 /* Undo effects of setting up parse_events_text. */ \
189 int yyless_macro_arg = (n); \
190 YY_LESS_LINENO(yyless_macro_arg);\
191 *yy_cp = (yy_hold_char); \
192 YY_RESTORE_YY_MORE_OFFSET \
193 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
194 YY_DO_BEFORE_ACTION; /* set up parse_events_text again */ \
198 #define unput(c) yyunput( c, (yytext_ptr) )
200 #ifndef YY_TYPEDEF_YY_SIZE_T
201 #define YY_TYPEDEF_YY_SIZE_T
202 typedef size_t yy_size_t;
205 #ifndef YY_STRUCT_YY_BUFFER_STATE
206 #define YY_STRUCT_YY_BUFFER_STATE
207 struct yy_buffer_state
211 char *yy_ch_buf; /* input buffer */
212 char *yy_buf_pos; /* current position in input buffer */
214 /* Size of input buffer in bytes, not including room for EOB
217 yy_size_t yy_buf_size;
219 /* Number of characters read into yy_ch_buf, not including EOB
224 /* Whether we "own" the buffer - i.e., we know we created it,
225 * and can realloc() it to grow it, and should free() it to
228 int yy_is_our_buffer;
230 /* Whether this is an "interactive" input source; if so, and
231 * if we're using stdio for input, then we want to use getc()
232 * instead of fread(), to make sure we stop fetching input after
235 int yy_is_interactive;
237 /* Whether we're considered to be at the beginning of a line.
238 * If so, '^' rules will be active on the next match, otherwise
243 int yy_bs_lineno; /**< The line count. */
244 int yy_bs_column; /**< The column count. */
246 /* Whether to try to fill the input buffer when we reach the
251 int yy_buffer_status;
253 #define YY_BUFFER_NEW 0
254 #define YY_BUFFER_NORMAL 1
255 /* When an EOF's been seen but there's still some text to process
256 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
257 * shouldn't try reading from the input source any more. We might
258 * still have a bunch of tokens to match, though, because of
259 * possible backing-up.
261 * When we actually see the EOF, we change the status to "new"
262 * (via parse_events_restart()), so that the user can continue scanning by
263 * just pointing parse_events_in at a new input file.
265 #define YY_BUFFER_EOF_PENDING 2
268 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
270 /* Stack of input buffers. */
271 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
272 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
273 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
275 /* We provide macros for accessing buffer states in case in the
276 * future we want to put the buffer states in a more general
279 * Returns the top of the stack, or NULL.
281 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
282 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
285 /* Same as previous macro, but useful when we know that the buffer stack is not
286 * NULL or when we need an lvalue. For internal use only.
288 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
290 /* yy_hold_char holds the character lost when parse_events_text is formed. */
291 static char yy_hold_char;
292 static int yy_n_chars; /* number of characters read into yy_ch_buf */
293 int parse_events_leng;
295 /* Points to current character in buffer. */
296 static char *yy_c_buf_p = (char *) 0;
297 static int yy_init = 0; /* whether we need to initialize */
298 static int yy_start = 0; /* start state number */
300 /* Flag which is used to allow parse_events_wrap()'s to do buffer switches
301 * instead of setting up a fresh parse_events_in. A bit of a hack ...
303 static int yy_did_buffer_switch_on_eof;
305 void parse_events_restart (FILE *input_file );
306 void parse_events__switch_to_buffer (YY_BUFFER_STATE new_buffer );
307 YY_BUFFER_STATE parse_events__create_buffer (FILE *file,int size );
308 void parse_events__delete_buffer (YY_BUFFER_STATE b );
309 void parse_events__flush_buffer (YY_BUFFER_STATE b );
310 void parse_events_push_buffer_state (YY_BUFFER_STATE new_buffer );
311 void parse_events_pop_buffer_state (void );
313 static void parse_events_ensure_buffer_stack (void );
314 static void parse_events__load_buffer_state (void );
315 static void parse_events__init_buffer (YY_BUFFER_STATE b,FILE *file );
317 #define YY_FLUSH_BUFFER parse_events__flush_buffer(YY_CURRENT_BUFFER )
319 YY_BUFFER_STATE parse_events__scan_buffer (char *base,yy_size_t size );
320 YY_BUFFER_STATE parse_events__scan_string (yyconst char *yy_str );
321 YY_BUFFER_STATE parse_events__scan_bytes (yyconst char *bytes,int len );
323 void *parse_events_alloc (yy_size_t );
324 void *parse_events_realloc (void *,yy_size_t );
325 void parse_events_free (void * );
327 #define yy_new_buffer parse_events__create_buffer
329 #define yy_set_interactive(is_interactive) \
331 if ( ! YY_CURRENT_BUFFER ){ \
332 parse_events_ensure_buffer_stack (); \
333 YY_CURRENT_BUFFER_LVALUE = \
334 parse_events__create_buffer(parse_events_in,YY_BUF_SIZE ); \
336 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
339 #define yy_set_bol(at_bol) \
341 if ( ! YY_CURRENT_BUFFER ){\
342 parse_events_ensure_buffer_stack (); \
343 YY_CURRENT_BUFFER_LVALUE = \
344 parse_events__create_buffer(parse_events_in,YY_BUF_SIZE ); \
346 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
349 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
351 /* Begin user sect3 */
353 typedef unsigned char YY_CHAR;
355 FILE *parse_events_in = (FILE *) 0, *parse_events_out = (FILE *) 0;
357 typedef int yy_state_type;
359 extern int parse_events_lineno;
361 int parse_events_lineno = 1;
363 extern char *parse_events_text;
364 #define yytext_ptr parse_events_text
366 static yy_state_type yy_get_previous_state (void );
367 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
368 static int yy_get_next_buffer (void );
369 static void yy_fatal_error (yyconst char msg[] );
371 /* Done after the current pattern has been matched and before the
372 * corresponding action - sets up parse_events_text.
374 #define YY_DO_BEFORE_ACTION \
375 (yytext_ptr) = yy_bp; \
376 parse_events_leng = (size_t) (yy_cp - yy_bp); \
377 (yy_hold_char) = *yy_cp; \
379 (yy_c_buf_p) = yy_cp;
381 #define YY_NUM_RULES 49
382 #define YY_END_OF_BUFFER 50
383 /* This struct is not used in this scanner,
384 but its presence is necessary. */
387 flex_int32_t yy_verify;
390 static yyconst flex_int16_t yy_accept[440] =
392 0, 0, 50, 49, 43, 46, 45, 44, 39, 39,
393 47, 48, 43, 43, 43, 43, 43, 43, 43, 43,
394 43, 43, 41, 43, 43, 43, 43, 43, 41, 42,
395 43, 43, 42, 42, 43, 39, 0, 43, 43, 43,
396 21, 43, 43, 43, 43, 43, 43, 43, 43, 43,
397 43, 43, 15, 43, 0, 43, 43, 43, 41, 0,
398 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
399 43, 43, 43, 38, 38, 43, 43, 43, 43, 40,
400 43, 43, 0, 43, 43, 43, 24, 43, 43, 43,
401 43, 43, 43, 0, 43, 43, 43, 41, 0, 43,
403 43, 43, 0, 19, 20, 43, 43, 43, 43, 43,
404 43, 43, 30, 43, 43, 43, 38, 38, 43, 43,
405 43, 43, 43, 43, 43, 0, 0, 43, 43, 43,
406 43, 0, 43, 43, 43, 0, 43, 0, 22, 43,
407 43, 41, 0, 23, 43, 43, 19, 20, 26, 43,
408 37, 43, 43, 31, 25, 43, 43, 43, 26, 43,
409 43, 43, 43, 43, 0, 43, 0, 0, 0, 0,
410 43, 43, 43, 43, 0, 43, 43, 43, 0, 0,
411 43, 22, 43, 43, 41, 23, 0, 43, 26, 43,
412 43, 43, 43, 0, 43, 43, 43, 43, 27, 0,
414 27, 0, 43, 0, 0, 0, 0, 43, 43, 24,
415 0, 0, 32, 43, 0, 0, 0, 1, 43, 12,
416 0, 43, 0, 43, 0, 31, 0, 35, 43, 43,
417 43, 0, 0, 43, 0, 0, 0, 43, 43, 0,
418 43, 43, 0, 0, 0, 33, 34, 43, 0, 0,
419 0, 43, 0, 43, 0, 43, 0, 0, 43, 43,
420 43, 0, 43, 0, 0, 0, 43, 43, 0, 0,
421 43, 7, 0, 0, 0, 0, 0, 0, 0, 43,
422 0, 43, 0, 43, 0, 0, 28, 43, 0, 0,
423 43, 0, 43, 0, 0, 43, 0, 0, 0, 0,
425 10, 0, 0, 43, 0, 43, 0, 43, 0, 0,
426 43, 43, 0, 0, 43, 0, 0, 0, 0, 43,
427 9, 0, 0, 0, 1, 0, 0, 0, 43, 0,
428 16, 0, 0, 28, 43, 0, 11, 43, 0, 0,
429 0, 0, 36, 0, 0, 0, 0, 0, 0, 43,
430 0, 0, 12, 43, 0, 0, 0, 0, 0, 0,
431 6, 0, 0, 0, 0, 0, 4, 14, 13, 0,
432 0, 0, 0, 0, 0, 8, 0, 0, 0, 0,
433 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
434 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
436 0, 0, 0, 0, 0, 0, 0, 17, 0, 5,
437 15, 18, 0, 0, 29, 0, 0, 0, 0, 0,
438 0, 0, 0, 0, 0, 0, 0, 7, 3, 0,
439 0, 0, 2, 0, 0, 0, 0, 0, 0
442 static yyconst flex_int32_t yy_ec[256] =
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 2, 1, 3, 4, 1, 5, 6, 7, 8,
449 9, 9, 9, 9, 9, 9, 9, 10, 1, 1,
450 11, 1, 2, 1, 12, 13, 14, 15, 12, 12,
451 2, 2, 16, 2, 2, 17, 2, 2, 2, 2,
452 2, 18, 2, 19, 2, 2, 2, 2, 2, 2,
453 1, 1, 1, 1, 20, 1, 21, 22, 23, 24,
455 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
456 35, 36, 2, 37, 38, 39, 40, 41, 42, 43,
457 44, 2, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 static yyconst flex_int32_t yy_meta[45] =
476 1, 2, 1, 1, 1, 3, 3, 3, 3, 1,
477 1, 3, 3, 3, 3, 2, 2, 2, 2, 2,
478 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 static yyconst flex_int16_t yy_base[442] =
485 0, 0, 510, 511, 0, 511, 511, 511, 39, 43,
486 511, 511, 488, 474, 46, 482, 32, 20, 37, 57,
487 473, 484, 34, 64, 59, 64, 469, 467, 78, 113,
488 41, 481, 464, 0, 0, 104, 0, 461, 461, 494,
489 0, 483, 470, 472, 465, 44, 472, 470, 453, 467,
490 455, 448, 0, 464, 447, 468, 444, 443, 64, 443,
491 464, 448, 441, 67, 457, 447, 443, 52, 451, 436,
492 446, 435, 446, 445, 76, 444, 95, 430, 438, 0,
493 445, 426, 100, 439, 438, 435, 0, 427, 456, 431,
494 105, 454, 425, 424, 442, 422, 421, 112, 420, 438,
496 425, 410, 117, 0, 0, 424, 412, 436, 408, 409,
497 405, 417, 0, 416, 411, 413, 83, 107, 415, 405,
498 399, 404, 395, 429, 395, 126, 119, 394, 392, 395,
499 405, 404, 401, 396, 399, 100, 398, 400, 0, 400,
500 381, 123, 397, 0, 414, 380, 511, 511, 378, 378,
501 511, 393, 376, 387, 0, 407, 375, 384, 383, 367,
502 374, 380, 400, 378, 383, 361, 361, 378, 377, 359,
503 371, 357, 361, 365, 348, 387, 363, 346, 73, 359,
504 349, 511, 347, 347, 0, 511, 361, 343, 0, 378,
505 342, 376, 341, 352, 353, 337, 343, 349, 335, 349,
507 0, 354, 347, 348, 345, 344, 327, 331, 339, 146,
508 340, 123, 150, 323, 326, 337, 332, 0, 329, 0,
509 313, 333, 329, 325, 327, 0, 331, 0, 328, 329,
510 325, 316, 334, 307, 317, 316, 306, 319, 307, 132,
511 301, 301, 306, 308, 311, 0, 0, 331, 311, 301,
512 295, 296, 307, 290, 307, 292, 305, 285, 296, 284,
513 318, 286, 291, 294, 293, 277, 291, 276, 280, 284,
514 268, 0, 286, 272, 283, 270, 276, 281, 284, 270,
515 271, 273, 261, 266, 259, 266, 272, 267, 272, 271,
516 258, 269, 287, 252, 251, 252, 249, 248, 260, 242,
518 511, 245, 243, 277, 255, 244, 246, 239, 244, 236,
519 236, 232, 228, 240, 236, 230, 242, 228, 228, 240,
520 511, 239, 226, 233, 511, 232, 234, 221, 224, 218,
521 0, 217, 217, 0, 229, 230, 511, 248, 222, 229,
522 212, 223, 0, 209, 221, 206, 209, 222, 238, 203,
523 202, 201, 511, 234, 205, 217, 200, 194, 193, 194,
524 511, 197, 207, 195, 188, 142, 0, 511, 511, 130,
525 202, 209, 191, 192, 200, 511, 199, 193, 182, 187,
526 197, 180, 181, 190, 176, 200, 173, 172, 185, 184,
527 511, 169, 184, 171, 184, 183, 199, 164, 172, 162,
529 161, 160, 166, 162, 171, 170, 147, 511, 158, 511,
530 511, 511, 167, 152, 511, 169, 152, 154, 153, 161,
531 162, 149, 145, 158, 147, 149, 145, 511, 511, 154,
532 152, 137, 511, 138, 145, 131, 53, 54, 511, 172,
536 static yyconst flex_int16_t yy_def[442] =
538 439, 1, 439, 439, 440, 439, 439, 439, 439, 439,
539 439, 439, 440, 440, 440, 440, 440, 440, 440, 440,
540 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
541 440, 440, 440, 440, 440, 439, 441, 440, 440, 440,
542 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
543 440, 440, 440, 440, 439, 440, 440, 440, 440, 439,
544 440, 440, 440, 440, 440, 440, 440, 440, 440, 440,
545 440, 440, 440, 30, 30, 440, 440, 440, 440, 441,
546 440, 440, 439, 440, 440, 440, 440, 440, 440, 440,
547 440, 440, 440, 439, 440, 440, 440, 440, 439, 440,
549 440, 440, 439, 440, 440, 440, 440, 440, 440, 440,
550 440, 440, 440, 440, 440, 440, 30, 30, 440, 440,
551 440, 440, 440, 440, 440, 439, 439, 440, 440, 440,
552 440, 439, 440, 440, 440, 439, 440, 439, 440, 440,
553 440, 440, 439, 440, 440, 440, 439, 439, 440, 440,
554 439, 440, 440, 440, 440, 440, 440, 440, 30, 440,
555 440, 440, 440, 440, 439, 440, 439, 439, 439, 439,
556 440, 440, 440, 440, 439, 440, 440, 440, 439, 439,
557 440, 439, 440, 440, 440, 439, 439, 440, 440, 440,
558 440, 440, 440, 439, 440, 440, 440, 440, 440, 439,
560 440, 439, 440, 439, 439, 439, 439, 440, 440, 440,
561 439, 439, 440, 440, 439, 439, 439, 440, 440, 440,
562 439, 440, 439, 440, 439, 440, 439, 440, 440, 440,
563 440, 439, 439, 440, 439, 439, 439, 440, 440, 439,
564 440, 440, 439, 439, 439, 440, 440, 440, 439, 439,
565 439, 440, 439, 440, 439, 440, 439, 439, 440, 440,
566 440, 439, 440, 439, 439, 439, 440, 440, 439, 439,
567 440, 440, 439, 439, 439, 439, 439, 439, 439, 440,
568 439, 440, 439, 440, 439, 439, 440, 440, 439, 439,
569 440, 439, 440, 439, 439, 440, 439, 439, 439, 439,
571 439, 439, 439, 440, 439, 440, 439, 440, 439, 439,
572 440, 440, 439, 439, 440, 439, 439, 439, 439, 440,
573 439, 439, 439, 439, 439, 439, 439, 439, 440, 439,
574 440, 439, 439, 440, 440, 439, 439, 440, 439, 439,
575 439, 439, 440, 439, 439, 439, 439, 439, 439, 440,
576 439, 439, 439, 440, 439, 439, 439, 439, 439, 439,
577 439, 439, 439, 439, 439, 439, 440, 439, 439, 439,
578 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
579 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
580 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
582 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
583 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
584 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
585 439, 439, 439, 439, 439, 439, 439, 439, 0, 439,
589 static yyconst flex_int16_t yy_nxt[556] =
591 4, 5, 6, 7, 8, 9, 10, 10, 10, 11,
592 12, 5, 5, 5, 13, 14, 15, 16, 5, 5,
593 17, 18, 19, 20, 21, 22, 5, 23, 24, 5,
594 23, 25, 26, 27, 28, 29, 30, 31, 32, 23,
595 5, 33, 34, 5, 36, 36, 36, 36, 36, 36,
596 36, 36, 40, 41, 44, 46, 47, 50, 48, 49,
597 55, 59, 42, 45, 59, 64, 87, 60, 80, 59,
598 103, 51, 52, 59, 53, 56, 76, 433, 109, 77,
599 54, 37, 61, 87, 66, 110, 438, 62, 67, 111,
600 104, 98, 68, 65, 98, 105, 117, 63, 71, 98,
602 74, 118, 72, 98, 215, 59, 159, 74, 59, 36,
603 36, 36, 36, 59, 73, 120, 216, 59, 74, 74,
604 74, 74, 179, 126, 74, 74, 74, 74, 127, 121,
605 134, 74, 180, 74, 74, 74, 74, 75, 74, 142,
606 147, 169, 142, 135, 113, 148, 167, 142, 168, 240,
607 185, 142, 170, 185, 429, 244, 246, 247, 185, 245,
608 269, 383, 185, 381, 270, 241, 384, 382, 416, 437,
609 242, 436, 417, 35, 35, 435, 434, 433, 432, 431,
610 430, 429, 428, 427, 426, 425, 424, 423, 422, 421,
611 420, 419, 418, 415, 415, 414, 413, 412, 411, 410,
613 409, 408, 407, 406, 405, 404, 403, 402, 401, 400,
614 399, 398, 186, 397, 396, 395, 394, 393, 392, 391,
615 390, 389, 388, 387, 148, 386, 385, 380, 379, 378,
616 377, 376, 375, 374, 373, 372, 371, 370, 369, 368,
617 367, 366, 365, 364, 363, 362, 361, 360, 359, 358,
618 357, 356, 355, 354, 353, 352, 351, 350, 349, 348,
619 347, 346, 345, 344, 343, 342, 341, 340, 339, 338,
620 337, 336, 335, 334, 333, 332, 331, 330, 329, 328,
621 327, 326, 325, 324, 323, 322, 321, 320, 319, 318,
622 317, 316, 315, 314, 313, 312, 311, 310, 309, 308,
624 307, 306, 305, 304, 303, 302, 301, 300, 299, 298,
625 297, 296, 295, 294, 293, 113, 292, 148, 147, 291,
626 290, 289, 288, 287, 286, 285, 284, 283, 282, 281,
627 280, 279, 278, 277, 276, 275, 274, 273, 272, 271,
628 268, 267, 266, 265, 264, 263, 182, 262, 261, 260,
629 259, 258, 257, 256, 255, 254, 253, 252, 251, 250,
630 249, 248, 243, 239, 238, 237, 236, 235, 147, 234,
631 233, 232, 201, 231, 230, 229, 228, 227, 226, 225,
632 224, 223, 222, 221, 220, 219, 218, 217, 214, 213,
633 212, 211, 210, 209, 113, 208, 207, 206, 205, 204,
635 203, 202, 201, 200, 199, 198, 197, 74, 196, 195,
636 194, 193, 192, 191, 190, 189, 188, 187, 186, 184,
637 183, 182, 181, 178, 177, 176, 175, 174, 173, 172,
638 171, 166, 165, 164, 163, 162, 161, 160, 158, 157,
639 156, 155, 154, 153, 152, 151, 150, 149, 146, 145,
640 144, 143, 141, 140, 139, 138, 137, 136, 133, 132,
641 131, 130, 129, 128, 125, 124, 123, 122, 119, 74,
642 116, 115, 114, 113, 112, 108, 107, 106, 102, 101,
643 100, 99, 97, 96, 95, 94, 93, 92, 91, 90,
644 89, 87, 88, 86, 85, 84, 41, 83, 82, 81,
646 79, 78, 70, 69, 58, 57, 43, 39, 38, 439,
647 3, 439, 439, 439, 439, 439, 439, 439, 439, 439,
648 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
649 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
650 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
651 439, 439, 439, 439, 439
654 static yyconst flex_int16_t yy_chk[556] =
656 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
657 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
658 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
659 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
660 1, 1, 1, 1, 9, 9, 9, 9, 10, 10,
661 10, 10, 15, 15, 17, 18, 18, 19, 18, 18,
662 20, 23, 15, 17, 23, 25, 46, 24, 441, 23,
663 64, 19, 19, 23, 19, 20, 31, 438, 68, 31,
664 19, 9, 24, 46, 26, 68, 437, 24, 26, 68,
665 64, 59, 26, 25, 59, 64, 75, 24, 29, 59,
667 75, 75, 29, 59, 179, 29, 117, 117, 29, 36,
668 36, 36, 36, 29, 29, 77, 179, 29, 30, 30,
669 30, 30, 136, 83, 30, 30, 30, 30, 83, 77,
670 91, 118, 136, 30, 30, 30, 30, 30, 30, 98,
671 103, 127, 98, 91, 118, 103, 126, 98, 126, 210,
672 142, 98, 127, 142, 436, 212, 213, 213, 142, 212,
673 240, 370, 142, 366, 240, 210, 370, 366, 407, 435,
674 210, 434, 407, 440, 440, 432, 431, 430, 427, 426,
675 425, 424, 423, 422, 421, 420, 419, 418, 417, 416,
676 414, 413, 409, 406, 405, 404, 403, 402, 401, 400,
678 399, 398, 397, 396, 395, 394, 393, 392, 390, 389,
679 388, 387, 386, 385, 384, 383, 382, 381, 380, 379,
680 378, 377, 375, 374, 373, 372, 371, 365, 364, 363,
681 362, 360, 359, 358, 357, 356, 355, 354, 352, 351,
682 350, 349, 348, 347, 346, 345, 344, 342, 341, 340,
683 339, 338, 336, 335, 333, 332, 330, 329, 328, 327,
684 326, 324, 323, 322, 320, 319, 318, 317, 316, 315,
685 314, 313, 312, 311, 310, 309, 308, 307, 306, 305,
686 304, 303, 302, 300, 299, 298, 297, 296, 295, 294,
687 293, 292, 291, 290, 289, 288, 287, 286, 285, 284,
689 283, 282, 281, 280, 279, 278, 277, 276, 275, 274,
690 273, 271, 270, 269, 268, 267, 266, 265, 264, 263,
691 262, 261, 260, 259, 258, 257, 256, 255, 254, 253,
692 252, 251, 250, 249, 248, 245, 244, 243, 242, 241,
693 239, 238, 237, 236, 235, 234, 233, 232, 231, 230,
694 229, 227, 225, 224, 223, 222, 221, 219, 217, 216,
695 215, 214, 211, 209, 208, 207, 206, 205, 204, 203,
696 202, 200, 199, 198, 197, 196, 195, 194, 193, 192,
697 191, 190, 188, 187, 184, 183, 181, 180, 178, 177,
698 176, 175, 174, 173, 172, 171, 170, 169, 168, 167,
700 166, 165, 164, 163, 162, 161, 160, 159, 158, 157,
701 156, 154, 153, 152, 150, 149, 146, 145, 143, 141,
702 140, 138, 137, 135, 134, 133, 132, 131, 130, 129,
703 128, 125, 124, 123, 122, 121, 120, 119, 116, 115,
704 114, 112, 111, 110, 109, 108, 107, 106, 102, 101,
705 100, 99, 97, 96, 95, 94, 93, 92, 90, 89,
706 88, 86, 85, 84, 82, 81, 79, 78, 76, 74,
707 73, 72, 71, 70, 69, 67, 66, 65, 63, 62,
708 61, 60, 58, 57, 56, 55, 54, 52, 51, 50,
709 49, 48, 47, 45, 44, 43, 42, 40, 39, 38,
711 33, 32, 28, 27, 22, 21, 16, 14, 13, 3,
712 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
713 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
714 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
715 439, 439, 439, 439, 439, 439, 439, 439, 439, 439,
716 439, 439, 439, 439, 439
719 static yy_state_type yy_last_accepting_state;
720 static char *yy_last_accepting_cpos;
722 extern int parse_events__flex_debug;
723 int parse_events__flex_debug = 0;
725 /* The intent behind this definition is that it'll catch
726 * any uses of REJECT which flex missed.
728 #define REJECT reject_used_but_not_detected
729 #define yymore() yymore_used_but_not_detected
730 #define YY_MORE_ADJ 0
731 #define YY_RESTORE_YY_MORE_OFFSET
732 char *parse_events_text;
733 #line 1 "util/parse-events.l"
734 #line 5 "util/parse-events.l"
737 #include "parse-events-bison.h"
738 #include "parse-events.h"
740 static int __value(char *str, int base, int token)
745 num = strtoul(str, NULL, base);
749 parse_events_lval.num = num;
753 static int value(int base)
755 return __value(parse_events_text, base, PE_VALUE);
760 return __value(parse_events_text + 1, 16, PE_RAW);
763 static int str(int token)
765 parse_events_lval.str = strdup(parse_events_text);
769 static int sym(int type, int config)
771 parse_events_lval.num = (type << 16) + config;
775 static int term(int type)
777 parse_events_lval.num = type;
785 #ifndef YY_NO_UNISTD_H
786 /* Special case for "unistd.h", since it is non-ANSI. We include it way
787 * down here because we want the user's section 1 to have been scanned first.
788 * The user has a chance to override it with an option.
793 #ifndef YY_EXTRA_TYPE
794 #define YY_EXTRA_TYPE void *
797 static int yy_init_globals (void );
799 /* Accessor methods to globals.
800 These are made visible to non-reentrant scanners for convenience. */
802 int parse_events_lex_destroy (void );
804 int parse_events_get_debug (void );
806 void parse_events_set_debug (int debug_flag );
808 YY_EXTRA_TYPE parse_events_get_extra (void );
810 void parse_events_set_extra (YY_EXTRA_TYPE user_defined );
812 FILE *parse_events_get_in (void );
814 void parse_events_set_in (FILE * in_str );
816 FILE *parse_events_get_out (void );
818 void parse_events_set_out (FILE * out_str );
820 int parse_events_get_leng (void );
822 char *parse_events_get_text (void );
824 int parse_events_get_lineno (void );
826 void parse_events_set_lineno (int line_number );
828 /* Macros after this point can all be overridden by user definitions in
832 #ifndef YY_SKIP_YYWRAP
834 extern "C" int parse_events_wrap (void );
836 extern int parse_events_wrap (void );
840 static void yyunput (int c,char *buf_ptr );
843 static void yy_flex_strncpy (char *,yyconst char *,int );
846 #ifdef YY_NEED_STRLEN
847 static int yy_flex_strlen (yyconst char * );
853 static int yyinput (void );
855 static int input (void );
860 /* Amount of stuff to slurp up with each read. */
861 #ifndef YY_READ_BUF_SIZE
862 #define YY_READ_BUF_SIZE 8192
865 /* Copy whatever the last rule matched to the standard output. */
867 /* This used to be an fputs(), but since the string might contain NUL's,
868 * we now use fwrite().
870 #define ECHO do { if (fwrite( parse_events_text, parse_events_leng, 1, parse_events_out )) {} } while (0)
873 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
874 * is returned in "result".
877 #define YY_INPUT(buf,result,max_size) \
878 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
882 for ( n = 0; n < max_size && \
883 (c = getc( parse_events_in )) != EOF && c != '\n'; ++n ) \
886 buf[n++] = (char) c; \
887 if ( c == EOF && ferror( parse_events_in ) ) \
888 YY_FATAL_ERROR( "input in flex scanner failed" ); \
894 while ( (result = fread(buf, 1, max_size, parse_events_in))==0 && ferror(parse_events_in)) \
896 if( errno != EINTR) \
898 YY_FATAL_ERROR( "input in flex scanner failed" ); \
902 clearerr(parse_events_in); \
909 /* No semi-colon after return; correct usage is to write "yyterminate();" -
910 * we don't want an extra ';' after the "return" because that will cause
911 * some compilers to complain about unreachable statements.
914 #define yyterminate() return YY_NULL
917 /* Number of entries by which start-condition stack grows. */
918 #ifndef YY_START_STACK_INCR
919 #define YY_START_STACK_INCR 25
922 /* Report a fatal error. */
923 #ifndef YY_FATAL_ERROR
924 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
927 /* end tables serialization structures and prototypes */
929 /* Default declaration of generated scanner - a define so the user can
930 * easily add parameters.
933 #define YY_DECL_IS_OURS 1
935 extern int parse_events_lex (void);
937 #define YY_DECL int parse_events_lex (void)
938 #endif /* !YY_DECL */
940 /* Code executed at the beginning of each rule, after parse_events_text and parse_events_leng
943 #ifndef YY_USER_ACTION
944 #define YY_USER_ACTION
947 /* Code executed at the end of each rule. */
949 #define YY_BREAK break;
952 #define YY_RULE_SETUP \
955 /** The main scanner function which does all the work.
959 register yy_state_type yy_current_state;
960 register char *yy_cp, *yy_bp;
963 #line 60 "util/parse-events.l"
976 (yy_start) = 1; /* first start state */
978 if ( ! parse_events_in )
979 parse_events_in = stdin;
981 if ( ! parse_events_out )
982 parse_events_out = stdout;
984 if ( ! YY_CURRENT_BUFFER ) {
985 parse_events_ensure_buffer_stack ();
986 YY_CURRENT_BUFFER_LVALUE =
987 parse_events__create_buffer(parse_events_in,YY_BUF_SIZE );
990 parse_events__load_buffer_state( );
993 while ( 1 ) /* loops until end-of-file is reached */
995 yy_cp = (yy_c_buf_p);
997 /* Support of parse_events_text. */
998 *yy_cp = (yy_hold_char);
1000 /* yy_bp points to the position in yy_ch_buf of the start of
1005 yy_current_state = (yy_start);
1009 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1010 if ( yy_accept[yy_current_state] )
1012 (yy_last_accepting_state) = yy_current_state;
1013 (yy_last_accepting_cpos) = yy_cp;
1015 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1017 yy_current_state = (int) yy_def[yy_current_state];
1018 if ( yy_current_state >= 440 )
1019 yy_c = yy_meta[(unsigned int) yy_c];
1021 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1024 while ( yy_base[yy_current_state] != 511 );
1027 yy_act = yy_accept[yy_current_state];
1029 { /* have to back up */
1030 yy_cp = (yy_last_accepting_cpos);
1031 yy_current_state = (yy_last_accepting_state);
1032 yy_act = yy_accept[yy_current_state];
1035 YY_DO_BEFORE_ACTION;
1037 do_action: /* This label is used only to access EOF actions. */
1040 { /* beginning of action switch */
1041 case 0: /* must back up */
1042 /* undo the effects of YY_DO_BEFORE_ACTION */
1043 *yy_cp = (yy_hold_char);
1044 yy_cp = (yy_last_accepting_cpos);
1045 yy_current_state = (yy_last_accepting_state);
1046 goto yy_find_action;
1050 #line 61 "util/parse-events.l"
1051 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES); }
1055 #line 62 "util/parse-events.l"
1056 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_FRONTEND); }
1060 #line 63 "util/parse-events.l"
1061 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_BACKEND); }
1065 #line 64 "util/parse-events.l"
1066 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS); }
1070 #line 65 "util/parse-events.l"
1071 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_REFERENCES); }
1075 #line 66 "util/parse-events.l"
1076 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_MISSES); }
1080 #line 67 "util/parse-events.l"
1081 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_INSTRUCTIONS); }
1085 #line 68 "util/parse-events.l"
1086 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_BRANCH_MISSES); }
1090 #line 69 "util/parse-events.l"
1091 { return sym(PERF_TYPE_HARDWARE, PERF_COUNT_HW_BUS_CYCLES); }
1095 #line 70 "util/parse-events.l"
1096 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_CLOCK); }
1100 #line 71 "util/parse-events.l"
1101 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_TASK_CLOCK); }
1105 #line 72 "util/parse-events.l"
1106 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_PAGE_FAULTS); }
1110 #line 73 "util/parse-events.l"
1111 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_PAGE_FAULTS_MIN); }
1115 #line 74 "util/parse-events.l"
1116 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_PAGE_FAULTS_MAJ); }
1120 #line 75 "util/parse-events.l"
1121 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CONTEXT_SWITCHES); }
1125 #line 76 "util/parse-events.l"
1126 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_MIGRATIONS); }
1130 #line 77 "util/parse-events.l"
1131 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_ALIGNMENT_FAULTS); }
1135 #line 78 "util/parse-events.l"
1136 { return sym(PERF_TYPE_SOFTWARE, PERF_COUNT_SW_EMULATION_FAULTS); }
1139 #line 81 "util/parse-events.l"
1141 #line 82 "util/parse-events.l"
1143 #line 83 "util/parse-events.l"
1145 #line 84 "util/parse-events.l"
1147 #line 85 "util/parse-events.l"
1149 #line 86 "util/parse-events.l"
1152 #line 86 "util/parse-events.l"
1153 { return str(PE_NAME_CACHE_TYPE); }
1156 #line 89 "util/parse-events.l"
1158 #line 90 "util/parse-events.l"
1160 #line 91 "util/parse-events.l"
1162 #line 92 "util/parse-events.l"
1164 #line 93 "util/parse-events.l"
1167 #line 93 "util/parse-events.l"
1168 { return str(PE_NAME_CACHE_OP_RESULT); }
1171 * These are event config hardcoded term names to be specified
1172 * within xxx/.../ syntax. So far we dont clash with other names,
1173 * so we can put them here directly. In case the we have a conflict
1174 * in future, this needs to go into '//' condition block.
1178 #line 101 "util/parse-events.l"
1179 { return term(PARSE_EVENTS__TERM_TYPE_CONFIG); }
1183 #line 102 "util/parse-events.l"
1184 { return term(PARSE_EVENTS__TERM_TYPE_CONFIG1); }
1188 #line 103 "util/parse-events.l"
1189 { return term(PARSE_EVENTS__TERM_TYPE_CONFIG2); }
1193 #line 104 "util/parse-events.l"
1194 { return term(PARSE_EVENTS__TERM_TYPE_SAMPLE_PERIOD); }
1198 #line 105 "util/parse-events.l"
1199 { return term(PARSE_EVENTS__TERM_TYPE_BRANCH_SAMPLE_TYPE); }
1203 #line 107 "util/parse-events.l"
1204 { return PE_PREFIX_MEM; }
1208 #line 108 "util/parse-events.l"
1213 #line 109 "util/parse-events.l"
1214 { return value(10); }
1218 #line 110 "util/parse-events.l"
1219 { return value(16); }
1223 #line 112 "util/parse-events.l"
1224 { return str(PE_MODIFIER_EVENT); }
1228 #line 113 "util/parse-events.l"
1229 { return str(PE_MODIFIER_BP); }
1233 #line 114 "util/parse-events.l"
1234 { return str(PE_NAME); }
1238 #line 115 "util/parse-events.l"
1243 #line 116 "util/parse-events.l"
1248 #line 117 "util/parse-events.l"
1253 #line 118 "util/parse-events.l"
1258 #line 119 "util/parse-events.l"
1263 #line 121 "util/parse-events.l"
1266 #line 1267 "<stdout>"
1267 case YY_STATE_EOF(INITIAL):
1270 case YY_END_OF_BUFFER:
1272 /* Amount of text matched not including the EOB char. */
1273 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1275 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1276 *yy_cp = (yy_hold_char);
1277 YY_RESTORE_YY_MORE_OFFSET
1279 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1281 /* We're scanning a new file or input source. It's
1282 * possible that this happened because the user
1283 * just pointed parse_events_in at a new source and called
1284 * parse_events_lex(). If so, then we have to assure
1285 * consistency between YY_CURRENT_BUFFER and our
1286 * globals. Here is the right place to do so, because
1287 * this is the first action (other than possibly a
1288 * back-up) that will match for the new input source.
1290 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1291 YY_CURRENT_BUFFER_LVALUE->yy_input_file = parse_events_in;
1292 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1295 /* Note that here we test for yy_c_buf_p "<=" to the position
1296 * of the first EOB in the buffer, since yy_c_buf_p will
1297 * already have been incremented past the NUL character
1298 * (since all states make transitions on EOB to the
1299 * end-of-buffer state). Contrast this with the test
1302 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1303 { /* This was really a NUL. */
1304 yy_state_type yy_next_state;
1306 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1308 yy_current_state = yy_get_previous_state( );
1310 /* Okay, we're now positioned to make the NUL
1311 * transition. We couldn't have
1312 * yy_get_previous_state() go ahead and do it
1313 * for us because it doesn't know how to deal
1314 * with the possibility of jamming (and we don't
1315 * want to build jamming into it because then it
1316 * will run more slowly).
1319 yy_next_state = yy_try_NUL_trans( yy_current_state );
1321 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1323 if ( yy_next_state )
1325 /* Consume the NUL. */
1326 yy_cp = ++(yy_c_buf_p);
1327 yy_current_state = yy_next_state;
1333 yy_cp = (yy_c_buf_p);
1334 goto yy_find_action;
1338 else switch ( yy_get_next_buffer( ) )
1340 case EOB_ACT_END_OF_FILE:
1342 (yy_did_buffer_switch_on_eof) = 0;
1344 if ( parse_events_wrap( ) )
1346 /* Note: because we've taken care in
1347 * yy_get_next_buffer() to have set up
1348 * parse_events_text, we can now set up
1349 * yy_c_buf_p so that if some total
1350 * hoser (like flex itself) wants to
1351 * call the scanner after we return the
1352 * YY_NULL, it'll still work - another
1353 * YY_NULL will get returned.
1355 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1357 yy_act = YY_STATE_EOF(YY_START);
1363 if ( ! (yy_did_buffer_switch_on_eof) )
1369 case EOB_ACT_CONTINUE_SCAN:
1371 (yytext_ptr) + yy_amount_of_matched_text;
1373 yy_current_state = yy_get_previous_state( );
1375 yy_cp = (yy_c_buf_p);
1376 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1379 case EOB_ACT_LAST_MATCH:
1381 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1383 yy_current_state = yy_get_previous_state( );
1385 yy_cp = (yy_c_buf_p);
1386 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1387 goto yy_find_action;
1394 "fatal flex scanner internal error--no action found" );
1395 } /* end of action switch */
1396 } /* end of scanning one token */
1397 } /* end of parse_events_lex */
1399 /* yy_get_next_buffer - try to read in a new buffer
1401 * Returns a code representing an action:
1402 * EOB_ACT_LAST_MATCH -
1403 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1404 * EOB_ACT_END_OF_FILE - end of file
1406 static int yy_get_next_buffer (void)
1408 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1409 register char *source = (yytext_ptr);
1410 register int number_to_move, i;
1413 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1415 "fatal flex scanner internal error--end of buffer missed" );
1417 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1418 { /* Don't try to fill the buffer, so this is an EOF. */
1419 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1421 /* We matched a single character, the EOB, so
1422 * treat this as a final EOF.
1424 return EOB_ACT_END_OF_FILE;
1429 /* We matched some text prior to the EOB, first
1432 return EOB_ACT_LAST_MATCH;
1436 /* Try to read more data. */
1438 /* First move last chars to start of buffer. */
1439 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1441 for ( i = 0; i < number_to_move; ++i )
1442 *(dest++) = *(source++);
1444 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1445 /* don't do the read, it's not guaranteed to return an EOF,
1448 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1453 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1455 while ( num_to_read <= 0 )
1456 { /* Not enough room in the buffer - grow it. */
1458 /* just a shorter name for the current buffer */
1459 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1461 int yy_c_buf_p_offset =
1462 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1464 if ( b->yy_is_our_buffer )
1466 int new_size = b->yy_buf_size * 2;
1468 if ( new_size <= 0 )
1469 b->yy_buf_size += b->yy_buf_size / 8;
1471 b->yy_buf_size *= 2;
1473 b->yy_ch_buf = (char *)
1474 /* Include room in for 2 EOB chars. */
1475 parse_events_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1478 /* Can't grow it, we don't own it. */
1481 if ( ! b->yy_ch_buf )
1483 "fatal error - scanner input buffer overflow" );
1485 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1487 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1492 if ( num_to_read > YY_READ_BUF_SIZE )
1493 num_to_read = YY_READ_BUF_SIZE;
1495 /* Read in more data. */
1496 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1497 (yy_n_chars), (size_t) num_to_read );
1499 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1502 if ( (yy_n_chars) == 0 )
1504 if ( number_to_move == YY_MORE_ADJ )
1506 ret_val = EOB_ACT_END_OF_FILE;
1507 parse_events_restart(parse_events_in );
1512 ret_val = EOB_ACT_LAST_MATCH;
1513 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1514 YY_BUFFER_EOF_PENDING;
1519 ret_val = EOB_ACT_CONTINUE_SCAN;
1521 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1522 /* Extend the array by 50%, plus the number we really need. */
1523 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1524 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) parse_events_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1525 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1526 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1529 (yy_n_chars) += number_to_move;
1530 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1531 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1533 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1538 /* yy_get_previous_state - get the state just before the EOB char was reached */
1540 static yy_state_type yy_get_previous_state (void)
1542 register yy_state_type yy_current_state;
1543 register char *yy_cp;
1545 yy_current_state = (yy_start);
1547 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1549 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1550 if ( yy_accept[yy_current_state] )
1552 (yy_last_accepting_state) = yy_current_state;
1553 (yy_last_accepting_cpos) = yy_cp;
1555 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1557 yy_current_state = (int) yy_def[yy_current_state];
1558 if ( yy_current_state >= 440 )
1559 yy_c = yy_meta[(unsigned int) yy_c];
1561 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1564 return yy_current_state;
1567 /* yy_try_NUL_trans - try to make a transition on the NUL character
1570 * next_state = yy_try_NUL_trans( current_state );
1572 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1574 register int yy_is_jam;
1575 register char *yy_cp = (yy_c_buf_p);
1577 register YY_CHAR yy_c = 1;
1578 if ( yy_accept[yy_current_state] )
1580 (yy_last_accepting_state) = yy_current_state;
1581 (yy_last_accepting_cpos) = yy_cp;
1583 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1585 yy_current_state = (int) yy_def[yy_current_state];
1586 if ( yy_current_state >= 440 )
1587 yy_c = yy_meta[(unsigned int) yy_c];
1589 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1590 yy_is_jam = (yy_current_state == 439);
1592 return yy_is_jam ? 0 : yy_current_state;
1595 static void yyunput (int c, register char * yy_bp )
1597 register char *yy_cp;
1599 yy_cp = (yy_c_buf_p);
1601 /* undo effects of setting up parse_events_text */
1602 *yy_cp = (yy_hold_char);
1604 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1605 { /* need to shift things up to make room */
1606 /* +2 for EOB chars. */
1607 register int number_to_move = (yy_n_chars) + 2;
1608 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1609 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1610 register char *source =
1611 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1613 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1614 *--dest = *--source;
1616 yy_cp += (int) (dest - source);
1617 yy_bp += (int) (dest - source);
1618 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1619 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1621 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1622 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1625 *--yy_cp = (char) c;
1627 (yytext_ptr) = yy_bp;
1628 (yy_hold_char) = *yy_cp;
1629 (yy_c_buf_p) = yy_cp;
1634 static int yyinput (void)
1636 static int input (void)
1642 *(yy_c_buf_p) = (yy_hold_char);
1644 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1646 /* yy_c_buf_p now points to the character we want to return.
1647 * If this occurs *before* the EOB characters, then it's a
1648 * valid NUL; if not, then we've hit the end of the buffer.
1650 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1651 /* This was really a NUL. */
1652 *(yy_c_buf_p) = '\0';
1655 { /* need more input */
1656 int offset = (yy_c_buf_p) - (yytext_ptr);
1659 switch ( yy_get_next_buffer( ) )
1661 case EOB_ACT_LAST_MATCH:
1662 /* This happens because yy_g_n_b()
1663 * sees that we've accumulated a
1664 * token and flags that we need to
1665 * try matching the token before
1666 * proceeding. But for input(),
1667 * there's no matching to consider.
1668 * So convert the EOB_ACT_LAST_MATCH
1669 * to EOB_ACT_END_OF_FILE.
1672 /* Reset buffer status. */
1673 parse_events_restart(parse_events_in );
1677 case EOB_ACT_END_OF_FILE:
1679 if ( parse_events_wrap( ) )
1682 if ( ! (yy_did_buffer_switch_on_eof) )
1691 case EOB_ACT_CONTINUE_SCAN:
1692 (yy_c_buf_p) = (yytext_ptr) + offset;
1698 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1699 *(yy_c_buf_p) = '\0'; /* preserve parse_events_text */
1700 (yy_hold_char) = *++(yy_c_buf_p);
1704 #endif /* ifndef YY_NO_INPUT */
1706 /** Immediately switch to a different input stream.
1707 * @param input_file A readable stream.
1709 * @note This function does not reset the start condition to @c INITIAL .
1711 void parse_events_restart (FILE * input_file )
1714 if ( ! YY_CURRENT_BUFFER ){
1715 parse_events_ensure_buffer_stack ();
1716 YY_CURRENT_BUFFER_LVALUE =
1717 parse_events__create_buffer(parse_events_in,YY_BUF_SIZE );
1720 parse_events__init_buffer(YY_CURRENT_BUFFER,input_file );
1721 parse_events__load_buffer_state( );
1724 /** Switch to a different input buffer.
1725 * @param new_buffer The new input buffer.
1728 void parse_events__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1731 /* TODO. We should be able to replace this entire function body
1733 * parse_events_pop_buffer_state();
1734 * parse_events_push_buffer_state(new_buffer);
1736 parse_events_ensure_buffer_stack ();
1737 if ( YY_CURRENT_BUFFER == new_buffer )
1740 if ( YY_CURRENT_BUFFER )
1742 /* Flush out information for old buffer. */
1743 *(yy_c_buf_p) = (yy_hold_char);
1744 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1745 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1748 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1749 parse_events__load_buffer_state( );
1751 /* We don't actually know whether we did this switch during
1752 * EOF (parse_events_wrap()) processing, but the only time this flag
1753 * is looked at is after parse_events_wrap() is called, so it's safe
1754 * to go ahead and always set it.
1756 (yy_did_buffer_switch_on_eof) = 1;
1759 static void parse_events__load_buffer_state (void)
1761 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1762 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1763 parse_events_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1764 (yy_hold_char) = *(yy_c_buf_p);
1767 /** Allocate and initialize an input buffer state.
1768 * @param file A readable stream.
1769 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1771 * @return the allocated buffer state.
1773 YY_BUFFER_STATE parse_events__create_buffer (FILE * file, int size )
1777 b = (YY_BUFFER_STATE) parse_events_alloc(sizeof( struct yy_buffer_state ) );
1779 YY_FATAL_ERROR( "out of dynamic memory in parse_events__create_buffer()" );
1781 b->yy_buf_size = size;
1783 /* yy_ch_buf has to be 2 characters longer than the size given because
1784 * we need to put in 2 end-of-buffer characters.
1786 b->yy_ch_buf = (char *) parse_events_alloc(b->yy_buf_size + 2 );
1787 if ( ! b->yy_ch_buf )
1788 YY_FATAL_ERROR( "out of dynamic memory in parse_events__create_buffer()" );
1790 b->yy_is_our_buffer = 1;
1792 parse_events__init_buffer(b,file );
1797 /** Destroy the buffer.
1798 * @param b a buffer created with parse_events__create_buffer()
1801 void parse_events__delete_buffer (YY_BUFFER_STATE b )
1807 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1808 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1810 if ( b->yy_is_our_buffer )
1811 parse_events_free((void *) b->yy_ch_buf );
1813 parse_events_free((void *) b );
1817 extern int isatty (int );
1818 #endif /* __cplusplus */
1820 /* Initializes or reinitializes a buffer.
1821 * This function is sometimes called more than once on the same buffer,
1822 * such as during a parse_events_restart() or at EOF.
1824 static void parse_events__init_buffer (YY_BUFFER_STATE b, FILE * file )
1829 parse_events__flush_buffer(b );
1831 b->yy_input_file = file;
1832 b->yy_fill_buffer = 1;
1834 /* If b is the current buffer, then parse_events__init_buffer was _probably_
1835 * called from parse_events_restart() or through yy_get_next_buffer.
1836 * In that case, we don't want to reset the lineno or column.
1838 if (b != YY_CURRENT_BUFFER){
1839 b->yy_bs_lineno = 1;
1840 b->yy_bs_column = 0;
1843 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1848 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1849 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1852 void parse_events__flush_buffer (YY_BUFFER_STATE b )
1859 /* We always need two end-of-buffer characters. The first causes
1860 * a transition to the end-of-buffer state. The second causes
1861 * a jam in that state.
1863 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1864 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1866 b->yy_buf_pos = &b->yy_ch_buf[0];
1869 b->yy_buffer_status = YY_BUFFER_NEW;
1871 if ( b == YY_CURRENT_BUFFER )
1872 parse_events__load_buffer_state( );
1875 /** Pushes the new state onto the stack. The new state becomes
1876 * the current state. This function will allocate the stack
1878 * @param new_buffer The new state.
1881 void parse_events_push_buffer_state (YY_BUFFER_STATE new_buffer )
1883 if (new_buffer == NULL)
1886 parse_events_ensure_buffer_stack();
1888 /* This block is copied from parse_events__switch_to_buffer. */
1889 if ( YY_CURRENT_BUFFER )
1891 /* Flush out information for old buffer. */
1892 *(yy_c_buf_p) = (yy_hold_char);
1893 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1894 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1897 /* Only push if top exists. Otherwise, replace top. */
1898 if (YY_CURRENT_BUFFER)
1899 (yy_buffer_stack_top)++;
1900 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1902 /* copied from parse_events__switch_to_buffer. */
1903 parse_events__load_buffer_state( );
1904 (yy_did_buffer_switch_on_eof) = 1;
1907 /** Removes and deletes the top of the stack, if present.
1908 * The next element becomes the new top.
1911 void parse_events_pop_buffer_state (void)
1913 if (!YY_CURRENT_BUFFER)
1916 parse_events__delete_buffer(YY_CURRENT_BUFFER );
1917 YY_CURRENT_BUFFER_LVALUE = NULL;
1918 if ((yy_buffer_stack_top) > 0)
1919 --(yy_buffer_stack_top);
1921 if (YY_CURRENT_BUFFER) {
1922 parse_events__load_buffer_state( );
1923 (yy_did_buffer_switch_on_eof) = 1;
1927 /* Allocates the stack if it does not exist.
1928 * Guarantees space for at least one push.
1930 static void parse_events_ensure_buffer_stack (void)
1934 if (!(yy_buffer_stack)) {
1936 /* First allocation is just for 2 elements, since we don't know if this
1937 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1938 * immediate realloc on the next call.
1941 (yy_buffer_stack) = (struct yy_buffer_state**)parse_events_alloc
1942 (num_to_alloc * sizeof(struct yy_buffer_state*)
1944 if ( ! (yy_buffer_stack) )
1945 YY_FATAL_ERROR( "out of dynamic memory in parse_events_ensure_buffer_stack()" );
1947 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1949 (yy_buffer_stack_max) = num_to_alloc;
1950 (yy_buffer_stack_top) = 0;
1954 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1956 /* Increase the buffer to prepare for a possible push. */
1957 int grow_size = 8 /* arbitrary grow size */;
1959 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1960 (yy_buffer_stack) = (struct yy_buffer_state**)parse_events_realloc
1962 num_to_alloc * sizeof(struct yy_buffer_state*)
1964 if ( ! (yy_buffer_stack) )
1965 YY_FATAL_ERROR( "out of dynamic memory in parse_events_ensure_buffer_stack()" );
1967 /* zero only the new slots.*/
1968 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1969 (yy_buffer_stack_max) = num_to_alloc;
1973 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1974 * @param base the character buffer
1975 * @param size the size in bytes of the character buffer
1977 * @return the newly allocated buffer state object.
1979 YY_BUFFER_STATE parse_events__scan_buffer (char * base, yy_size_t size )
1984 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1985 base[size-1] != YY_END_OF_BUFFER_CHAR )
1986 /* They forgot to leave room for the EOB's. */
1989 b = (YY_BUFFER_STATE) parse_events_alloc(sizeof( struct yy_buffer_state ) );
1991 YY_FATAL_ERROR( "out of dynamic memory in parse_events__scan_buffer()" );
1993 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1994 b->yy_buf_pos = b->yy_ch_buf = base;
1995 b->yy_is_our_buffer = 0;
1996 b->yy_input_file = 0;
1997 b->yy_n_chars = b->yy_buf_size;
1998 b->yy_is_interactive = 0;
2000 b->yy_fill_buffer = 0;
2001 b->yy_buffer_status = YY_BUFFER_NEW;
2003 parse_events__switch_to_buffer(b );
2008 /** Setup the input buffer state to scan a string. The next call to parse_events_lex() will
2009 * scan from a @e copy of @a str.
2010 * @param yystr a NUL-terminated string to scan
2012 * @return the newly allocated buffer state object.
2013 * @note If you want to scan bytes that may contain NUL values, then use
2014 * parse_events__scan_bytes() instead.
2016 YY_BUFFER_STATE parse_events__scan_string (yyconst char * yystr )
2019 return parse_events__scan_bytes(yystr,strlen(yystr) );
2022 /** Setup the input buffer state to scan the given bytes. The next call to parse_events_lex() will
2023 * scan from a @e copy of @a bytes.
2024 * @param bytes the byte buffer to scan
2025 * @param len the number of bytes in the buffer pointed to by @a bytes.
2027 * @return the newly allocated buffer state object.
2029 YY_BUFFER_STATE parse_events__scan_bytes (yyconst char * yybytes, int _yybytes_len )
2036 /* Get memory for full buffer, including space for trailing EOB's. */
2037 n = _yybytes_len + 2;
2038 buf = (char *) parse_events_alloc(n );
2040 YY_FATAL_ERROR( "out of dynamic memory in parse_events__scan_bytes()" );
2042 for ( i = 0; i < _yybytes_len; ++i )
2043 buf[i] = yybytes[i];
2045 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2047 b = parse_events__scan_buffer(buf,n );
2049 YY_FATAL_ERROR( "bad buffer in parse_events__scan_bytes()" );
2051 /* It's okay to grow etc. this buffer, and we should throw it
2052 * away when we're done.
2054 b->yy_is_our_buffer = 1;
2059 #ifndef YY_EXIT_FAILURE
2060 #define YY_EXIT_FAILURE 2
2063 static void yy_fatal_error (yyconst char* msg )
2065 (void) fprintf( stderr, "%s\n", msg );
2066 exit( YY_EXIT_FAILURE );
2069 /* Redefine yyless() so it works in section 3 code. */
2075 /* Undo effects of setting up parse_events_text. */ \
2076 int yyless_macro_arg = (n); \
2077 YY_LESS_LINENO(yyless_macro_arg);\
2078 parse_events_text[parse_events_leng] = (yy_hold_char); \
2079 (yy_c_buf_p) = parse_events_text + yyless_macro_arg; \
2080 (yy_hold_char) = *(yy_c_buf_p); \
2081 *(yy_c_buf_p) = '\0'; \
2082 parse_events_leng = yyless_macro_arg; \
2086 /* Accessor methods (get/set functions) to struct members. */
2088 /** Get the current line number.
2091 int parse_events_get_lineno (void)
2094 return parse_events_lineno;
2097 /** Get the input stream.
2100 FILE *parse_events_get_in (void)
2102 return parse_events_in;
2105 /** Get the output stream.
2108 FILE *parse_events_get_out (void)
2110 return parse_events_out;
2113 /** Get the length of the current token.
2116 int parse_events_get_leng (void)
2118 return parse_events_leng;
2121 /** Get the current token.
2125 char *parse_events_get_text (void)
2127 return parse_events_text;
2130 /** Set the current line number.
2131 * @param line_number
2134 void parse_events_set_lineno (int line_number )
2137 parse_events_lineno = line_number;
2140 /** Set the input stream. This does not discard the current
2142 * @param in_str A readable stream.
2144 * @see parse_events__switch_to_buffer
2146 void parse_events_set_in (FILE * in_str )
2148 parse_events_in = in_str ;
2151 void parse_events_set_out (FILE * out_str )
2153 parse_events_out = out_str ;
2156 int parse_events_get_debug (void)
2158 return parse_events__flex_debug;
2161 void parse_events_set_debug (int bdebug )
2163 parse_events__flex_debug = bdebug ;
2166 static int yy_init_globals (void)
2168 /* Initialization is the same as for the non-reentrant scanner.
2169 * This function is called from parse_events_lex_destroy(), so don't allocate here.
2172 (yy_buffer_stack) = 0;
2173 (yy_buffer_stack_top) = 0;
2174 (yy_buffer_stack_max) = 0;
2175 (yy_c_buf_p) = (char *) 0;
2179 /* Defined in main.c */
2181 parse_events_in = stdin;
2182 parse_events_out = stdout;
2184 parse_events_in = (FILE *) 0;
2185 parse_events_out = (FILE *) 0;
2188 /* For future reference: Set errno on error, since we are called by
2189 * parse_events_lex_init()
2194 /* parse_events_lex_destroy is for both reentrant and non-reentrant scanners. */
2195 int parse_events_lex_destroy (void)
2198 /* Pop the buffer stack, destroying each element. */
2199 while(YY_CURRENT_BUFFER){
2200 parse_events__delete_buffer(YY_CURRENT_BUFFER );
2201 YY_CURRENT_BUFFER_LVALUE = NULL;
2202 parse_events_pop_buffer_state();
2205 /* Destroy the stack itself. */
2206 parse_events_free((yy_buffer_stack) );
2207 (yy_buffer_stack) = NULL;
2209 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2210 * parse_events_lex() is called, initialization will occur. */
2217 * Internal utility routines.
2221 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2224 for ( i = 0; i < n; ++i )
2229 #ifdef YY_NEED_STRLEN
2230 static int yy_flex_strlen (yyconst char * s )
2233 for ( n = 0; s[n]; ++n )
2240 void *parse_events_alloc (yy_size_t size )
2242 return (void *) malloc( size );
2245 void *parse_events_realloc (void * ptr, yy_size_t size )
2247 /* The cast to (char *) in the following accommodates both
2248 * implementations that use char* generic pointers, and those
2249 * that use void* generic pointers. It works with the latter
2250 * because both ANSI C and C++ allow castless assignment from
2251 * any pointer type to void*, and deal with argument conversions
2252 * as though doing an assignment.
2254 return (void *) realloc( (char *) ptr, size );
2257 void parse_events_free (void * ptr )
2259 free( (char *) ptr ); /* see parse_events_realloc() for (char *) cast */
2262 #define YYTABLES_NAME "yytables"
2264 #line 121 "util/parse-events.l"
2268 int parse_events_wrap(void)