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