parse-events-flex.c 65 KB

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