005-flex-generated.patch 44 KB

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