Guest User

Untitled

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