/scanner.c

http://github.com/fizx/parsley · C · 2491 lines · 1770 code · 357 blank · 364 comment · 117 complexity · cf46637a87474cf6d651e2943057f5d9 MD5 · raw file

Large files are truncated click here to view the full file

  1. #line 3 "scanner.c"
  2. #define YY_INT_ALIGNED short int
  3. /* A lexical scanner generated by flex */
  4. #define FLEX_SCANNER
  5. #define YY_FLEX_MAJOR_VERSION 2
  6. #define YY_FLEX_MINOR_VERSION 5
  7. #define YY_FLEX_SUBMINOR_VERSION 33
  8. #if YY_FLEX_SUBMINOR_VERSION > 0
  9. #define FLEX_BETA
  10. #endif
  11. /* First, we deal with platform-specific or compiler-specific issues. */
  12. /* begin standard C headers. */
  13. #include <stdio.h>
  14. #include <string.h>
  15. #include <errno.h>
  16. #include <stdlib.h>
  17. /* end standard C headers. */
  18. /* flex integer type definitions */
  19. #ifndef FLEXINT_H
  20. #define FLEXINT_H
  21. /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  22. #if __STDC_VERSION__ >= 199901L
  23. /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  24. * if you want the limit (max/min) macros for int types.
  25. */
  26. #ifndef __STDC_LIMIT_MACROS
  27. #define __STDC_LIMIT_MACROS 1
  28. #endif
  29. #include <inttypes.h>
  30. typedef int8_t flex_int8_t;
  31. typedef uint8_t flex_uint8_t;
  32. typedef int16_t flex_int16_t;
  33. typedef uint16_t flex_uint16_t;
  34. typedef int32_t flex_int32_t;
  35. typedef uint32_t flex_uint32_t;
  36. #else
  37. typedef signed char flex_int8_t;
  38. typedef short int flex_int16_t;
  39. typedef int flex_int32_t;
  40. typedef unsigned char flex_uint8_t;
  41. typedef unsigned short int flex_uint16_t;
  42. typedef unsigned int flex_uint32_t;
  43. #endif /* ! C99 */
  44. /* Limits of integral types. */
  45. #ifndef INT8_MIN
  46. #define INT8_MIN (-128)
  47. #endif
  48. #ifndef INT16_MIN
  49. #define INT16_MIN (-32767-1)
  50. #endif
  51. #ifndef INT32_MIN
  52. #define INT32_MIN (-2147483647-1)
  53. #endif
  54. #ifndef INT8_MAX
  55. #define INT8_MAX (127)
  56. #endif
  57. #ifndef INT16_MAX
  58. #define INT16_MAX (32767)
  59. #endif
  60. #ifndef INT32_MAX
  61. #define INT32_MAX (2147483647)
  62. #endif
  63. #ifndef UINT8_MAX
  64. #define UINT8_MAX (255U)
  65. #endif
  66. #ifndef UINT16_MAX
  67. #define UINT16_MAX (65535U)
  68. #endif
  69. #ifndef UINT32_MAX
  70. #define UINT32_MAX (4294967295U)
  71. #endif
  72. #endif /* ! FLEXINT_H */
  73. #ifdef __cplusplus
  74. /* The "const" storage-class-modifier is valid. */
  75. #define YY_USE_CONST
  76. #else /* ! __cplusplus */
  77. #if __STDC__
  78. #define YY_USE_CONST
  79. #endif /* __STDC__ */
  80. #endif /* ! __cplusplus */
  81. #ifdef YY_USE_CONST
  82. #define yyconst const
  83. #else
  84. #define yyconst
  85. #endif
  86. /* Returned upon end-of-file. */
  87. #define YY_NULL 0
  88. /* Promotes a possibly negative, possibly signed char to an unsigned
  89. * integer for use as an array index. If the signed char is negative,
  90. * we want to instead treat it as an 8-bit unsigned char, hence the
  91. * double cast.
  92. */
  93. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  94. /* Enter a start condition. This macro really ought to take a parameter,
  95. * but we do it the disgusting crufty way forced on us by the ()-less
  96. * definition of BEGIN.
  97. */
  98. #define BEGIN (yy_start) = 1 + 2 *
  99. /* Translate the current start state into a value that can be later handed
  100. * to BEGIN to return to the state. The YYSTATE alias is for lex
  101. * compatibility.
  102. */
  103. #define YY_START (((yy_start) - 1) / 2)
  104. #define YYSTATE YY_START
  105. /* Action number for EOF rule of a given start state. */
  106. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  107. /* Special action meaning "start processing a new file". */
  108. #define YY_NEW_FILE yyrestart(yyin )
  109. #define YY_END_OF_BUFFER_CHAR 0
  110. /* Size of default input buffer. */
  111. #ifndef YY_BUF_SIZE
  112. #define YY_BUF_SIZE 16384
  113. #endif
  114. /* The state buf must be large enough to hold one state per character in the main buffer.
  115. */
  116. #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  117. #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  118. #define YY_TYPEDEF_YY_BUFFER_STATE
  119. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  120. #endif
  121. extern int yyleng;
  122. extern FILE *yyin, *yyout;
  123. #define EOB_ACT_CONTINUE_SCAN 0
  124. #define EOB_ACT_END_OF_FILE 1
  125. #define EOB_ACT_LAST_MATCH 2
  126. #define YY_LESS_LINENO(n)
  127. /* Return all but the first "n" matched characters back to the input stream. */
  128. #define yyless(n) \
  129. do \
  130. { \
  131. /* Undo effects of setting up yytext. */ \
  132. int yyless_macro_arg = (n); \
  133. YY_LESS_LINENO(yyless_macro_arg);\
  134. *yy_cp = (yy_hold_char); \
  135. YY_RESTORE_YY_MORE_OFFSET \
  136. (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  137. YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  138. } \
  139. while ( 0 )
  140. #define unput(c) yyunput( c, (yytext_ptr) )
  141. /* The following is because we cannot portably get our hands on size_t
  142. * (without autoconf's help, which isn't available because we want
  143. * flex-generated scanners to compile on their own).
  144. */
  145. #ifndef YY_TYPEDEF_YY_SIZE_T
  146. #define YY_TYPEDEF_YY_SIZE_T
  147. typedef unsigned int yy_size_t;
  148. #endif
  149. #ifndef YY_STRUCT_YY_BUFFER_STATE
  150. #define YY_STRUCT_YY_BUFFER_STATE
  151. struct yy_buffer_state
  152. {
  153. FILE *yy_input_file;
  154. char *yy_ch_buf; /* input buffer */
  155. char *yy_buf_pos; /* current position in input buffer */
  156. /* Size of input buffer in bytes, not including room for EOB
  157. * characters.
  158. */
  159. yy_size_t yy_buf_size;
  160. /* Number of characters read into yy_ch_buf, not including EOB
  161. * characters.
  162. */
  163. int yy_n_chars;
  164. /* Whether we "own" the buffer - i.e., we know we created it,
  165. * and can realloc() it to grow it, and should free() it to
  166. * delete it.
  167. */
  168. int yy_is_our_buffer;
  169. /* Whether this is an "interactive" input source; if so, and
  170. * if we're using stdio for input, then we want to use getc()
  171. * instead of fread(), to make sure we stop fetching input after
  172. * each newline.
  173. */
  174. int yy_is_interactive;
  175. /* Whether we're considered to be at the beginning of a line.
  176. * If so, '^' rules will be active on the next match, otherwise
  177. * not.
  178. */
  179. int yy_at_bol;
  180. int yy_bs_lineno; /**< The line count. */
  181. int yy_bs_column; /**< The column count. */
  182. /* Whether to try to fill the input buffer when we reach the
  183. * end of it.
  184. */
  185. int yy_fill_buffer;
  186. int yy_buffer_status;
  187. #define YY_BUFFER_NEW 0
  188. #define YY_BUFFER_NORMAL 1
  189. /* When an EOF's been seen but there's still some text to process
  190. * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  191. * shouldn't try reading from the input source any more. We might
  192. * still have a bunch of tokens to match, though, because of
  193. * possible backing-up.
  194. *
  195. * When we actually see the EOF, we change the status to "new"
  196. * (via yyrestart()), so that the user can continue scanning by
  197. * just pointing yyin at a new input file.
  198. */
  199. #define YY_BUFFER_EOF_PENDING 2
  200. };
  201. #endif /* !YY_STRUCT_YY_BUFFER_STATE */
  202. /* Stack of input buffers. */
  203. static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
  204. static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
  205. static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  206. /* We provide macros for accessing buffer states in case in the
  207. * future we want to put the buffer states in a more general
  208. * "scanner state".
  209. *
  210. * Returns the top of the stack, or NULL.
  211. */
  212. #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
  213. ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
  214. : NULL)
  215. /* Same as previous macro, but useful when we know that the buffer stack is not
  216. * NULL or when we need an lvalue. For internal use only.
  217. */
  218. #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  219. /* yy_hold_char holds the character lost when yytext is formed. */
  220. static char yy_hold_char;
  221. static int yy_n_chars; /* number of characters read into yy_ch_buf */
  222. int yyleng;
  223. /* Points to current character in buffer. */
  224. static char *yy_c_buf_p = (char *) 0;
  225. static int yy_init = 0; /* whether we need to initialize */
  226. static int yy_start = 0; /* start state number */
  227. /* Flag which is used to allow yywrap()'s to do buffer switches
  228. * instead of setting up a fresh yyin. A bit of a hack ...
  229. */
  230. static int yy_did_buffer_switch_on_eof;
  231. void yyrestart (FILE *input_file );
  232. void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
  233. YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
  234. void yy_delete_buffer (YY_BUFFER_STATE b );
  235. void yy_flush_buffer (YY_BUFFER_STATE b );
  236. void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
  237. void yypop_buffer_state (void );
  238. static void yyensure_buffer_stack (void );
  239. static void yy_load_buffer_state (void );
  240. static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
  241. #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
  242. YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
  243. YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
  244. YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
  245. void *yyalloc (yy_size_t );
  246. void *yyrealloc (void *,yy_size_t );
  247. void yyfree (void * );
  248. #define yy_new_buffer yy_create_buffer
  249. #define yy_set_interactive(is_interactive) \
  250. { \
  251. if ( ! YY_CURRENT_BUFFER ){ \
  252. yyensure_buffer_stack (); \
  253. YY_CURRENT_BUFFER_LVALUE = \
  254. yy_create_buffer(yyin,YY_BUF_SIZE ); \
  255. } \
  256. YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  257. }
  258. #define yy_set_bol(at_bol) \
  259. { \
  260. if ( ! YY_CURRENT_BUFFER ){\
  261. yyensure_buffer_stack (); \
  262. YY_CURRENT_BUFFER_LVALUE = \
  263. yy_create_buffer(yyin,YY_BUF_SIZE ); \
  264. } \
  265. YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  266. }
  267. #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  268. typedef unsigned char YY_CHAR;
  269. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  270. typedef int yy_state_type;
  271. extern int yylineno;
  272. int yylineno = 1;
  273. extern char *yytext;
  274. #define yytext_ptr yytext
  275. static yy_state_type yy_get_previous_state (void );
  276. static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
  277. static int yy_get_next_buffer (void );
  278. static void yy_fatal_error (yyconst char msg[] );
  279. /* Done after the current pattern has been matched and before the
  280. * corresponding action - sets up yytext.
  281. */
  282. #define YY_DO_BEFORE_ACTION \
  283. (yytext_ptr) = yy_bp; \
  284. yyleng = (size_t) (yy_cp - yy_bp); \
  285. (yy_hold_char) = *yy_cp; \
  286. *yy_cp = '\0'; \
  287. (yy_c_buf_p) = yy_cp;
  288. #define YY_NUM_RULES 99
  289. #define YY_END_OF_BUFFER 100
  290. /* This struct is not used in this scanner,
  291. but its presence is necessary. */
  292. struct yy_trans_info
  293. {
  294. flex_int32_t yy_verify;
  295. flex_int32_t yy_nxt;
  296. };
  297. static yyconst flex_int16_t yy_accept[400] =
  298. { 0,
  299. 0, 0, 0, 0, 0, 0, 100, 98, 2, 10,
  300. 98, 14, 28, 98, 4, 5, 22, 23, 15, 24,
  301. 16, 8, 1, 11, 7, 25, 18, 13, 3, 96,
  302. 19, 98, 20, 98, 96, 96, 96, 96, 96, 96,
  303. 96, 96, 96, 96, 6, 21, 99, 2, 23, 15,
  304. 18, 21, 53, 0, 97, 55, 0, 56, 17, 9,
  305. 1, 51, 12, 0, 0, 0, 0, 0, 0, 0,
  306. 0, 0, 0, 0, 0, 0, 0, 0, 26, 27,
  307. 96, 29, 54, 96, 96, 96, 96, 96, 96, 96,
  308. 96, 96, 96, 43, 96, 96, 96, 96, 52, 57,
  309. 0, 0, 0, 0, 0, 0, 63, 0, 0, 64,
  310. 0, 0, 0, 0, 0, 65, 0, 0, 0, 0,
  311. 0, 0, 0, 0, 0, 0, 96, 44, 96, 96,
  312. 96, 96, 45, 96, 46, 96, 96, 96, 96, 96,
  313. 96, 96, 0, 0, 0, 0, 0, 0, 0, 0,
  314. 0, 70, 0, 0, 0, 0, 60, 0, 62, 0,
  315. 0, 0, 0, 0, 0, 0, 0, 96, 96, 96,
  316. 96, 96, 96, 96, 50, 96, 96, 96, 42, 48,
  317. 0, 0, 0, 0, 0, 0, 61, 91, 0, 0,
  318. 0, 0, 59, 0, 0, 0, 0, 0, 0, 0,
  319. 0, 83, 96, 96, 33, 96, 96, 96, 96, 96,
  320. 96, 96, 0, 0, 0, 0, 0, 69, 0, 58,
  321. 0, 88, 82, 0, 0, 0, 0, 0, 0, 0,
  322. 85, 89, 0, 0, 96, 96, 96, 96, 96, 96,
  323. 39, 96, 96, 90, 0, 0, 0, 0, 0, 0,
  324. 0, 67, 0, 0, 0, 0, 0, 0, 0, 71,
  325. 0, 0, 87, 96, 96, 47, 96, 96, 96, 96,
  326. 96, 0, 94, 0, 66, 0, 92, 0, 0, 0,
  327. 0, 0, 0, 0, 0, 0, 0, 0, 30, 96,
  328. 96, 96, 96, 96, 96, 86, 68, 93, 0, 0,
  329. 0, 0, 0, 0, 0, 0, 0, 84, 95, 96,
  330. 32, 96, 36, 38, 40, 96, 0, 0, 0, 0,
  331. 72, 0, 0, 0, 0, 96, 34, 96, 96, 96,
  332. 0, 0, 77, 0, 0, 0, 0, 80, 0, 96,
  333. 96, 96, 96, 96, 76, 0, 0, 0, 0, 74,
  334. 0, 96, 96, 96, 96, 96, 0, 79, 0, 0,
  335. 81, 96, 96, 96, 96, 96, 78, 0, 0, 96,
  336. 96, 96, 96, 96, 73, 0, 96, 96, 96, 96,
  337. 96, 0, 31, 96, 96, 96, 96, 75, 96, 37,
  338. 41, 96, 35, 96, 96, 96, 96, 49, 0
  339. } ;
  340. static yyconst flex_int32_t yy_ec[256] =
  341. { 0,
  342. 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  343. 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
  344. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  345. 1, 2, 4, 5, 6, 7, 1, 1, 8, 9,
  346. 10, 11, 12, 13, 14, 15, 16, 17, 17, 17,
  347. 17, 17, 17, 17, 17, 17, 17, 18, 1, 19,
  348. 20, 21, 22, 23, 24, 24, 24, 24, 24, 24,
  349. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  350. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  351. 25, 26, 27, 28, 24, 1, 29, 30, 31, 32,
  352. 33, 34, 35, 36, 37, 24, 38, 39, 40, 41,
  353. 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
  354. 52, 24, 1, 53, 1, 54, 1, 1, 1, 1,
  355. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  356. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  357. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  358. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  359. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  360. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  361. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  362. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  363. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  364. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  365. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  366. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  367. 1, 1, 1, 1, 1
  368. } ;
  369. static yyconst flex_int32_t yy_meta[55] =
  370. { 0,
  371. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  372. 1, 1, 1, 2, 1, 1, 2, 1, 1, 1,
  373. 1, 1, 1, 2, 1, 1, 1, 1, 2, 2,
  374. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  375. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  376. 2, 2, 1, 1
  377. } ;
  378. static yyconst flex_int16_t yy_base[405] =
  379. { 0,
  380. 0, 0, 0, 0, 0, 0, 423, 424, 53, 402,
  381. 416, 424, 400, 411, 424, 424, 398, 424, 424, 424,
  382. 402, 400, 40, 90, 395, 424, 394, 424, 424, 0,
  383. 424, 0, 424, 393, 17, 25, 26, 370, 369, 31,
  384. 365, 33, 376, 375, 387, 386, 424, 74, 424, 424,
  385. 424, 424, 424, 400, 424, 424, 396, 424, 424, 424,
  386. 51, 424, 424, 355, 33, 365, 39, 364, 353, 56,
  387. 30, 43, 49, 52, 370, 65, 49, 365, 424, 424,
  388. 0, 424, 424, 68, 350, 359, 355, 348, 344, 353,
  389. 359, 350, 357, 0, 343, 68, 348, 335, 424, 424,
  390. 338, 351, 342, 336, 338, 351, 424, 346, 64, 424,
  391. 332, 348, 347, 332, 328, 424, 326, 336, 339, 331,
  392. 59, 337, 322, 328, 336, 314, 331, 0, 318, 323,
  393. 321, 329, 0, 320, 0, 325, 324, 323, 324, 323,
  394. 319, 305, 304, 319, 302, 319, 300, 316, 304, 311,
  395. 297, 424, 310, 306, 292, 292, 424, 324, 424, 285,
  396. 303, 289, 297, 300, 299, 291, 283, 283, 291, 295,
  397. 293, 292, 282, 277, 0, 281, 288, 287, 0, 0,
  398. 277, 280, 73, 287, 264, 276, 424, 424, 267, 280,
  399. 279, 264, 296, 99, 295, 267, 257, 264, 258, 273,
  400. 266, 424, 255, 271, 0, 259, 258, 248, 254, 249,
  401. 263, 248, 252, 81, 255, 250, 251, 424, 256, 274,
  402. 242, 424, 424, 103, 250, 256, 250, 108, 236, 240,
  403. 424, 424, 234, 233, 237, 230, 230, 244, 238, 245,
  404. 0, 236, 226, 424, 229, 238, 228, 221, 234, 234,
  405. 109, 424, 229, 230, 226, 216, 247, 224, 225, 424,
  406. 213, 224, 424, 211, 208, 0, 225, 212, 221, 210,
  407. 213, 198, 424, 202, 424, 215, 424, 210, 211, 207,
  408. 229, 203, 194, 193, 202, 224, 205, 204, 221, 201,
  409. 192, 197, 198, 195, 188, 424, 424, 424, 191, 213,
  410. 187, 178, 192, 209, 170, 182, 173, 424, 424, 177,
  411. 0, 171, 203, 0, 202, 180, 175, 166, 180, 159,
  412. 424, 111, 167, 177, 156, 162, 192, 159, 158, 189,
  413. 170, 149, 424, 157, 163, 164, 164, 424, 153, 181,
  414. 152, 156, 155, 154, 424, 147, 156, 151, 173, 424,
  415. 153, 139, 139, 153, 152, 140, 147, 424, 140, 131,
  416. 424, 144, 162, 136, 135, 127, 424, 140, 119, 131,
  417. 123, 131, 130, 119, 424, 122, 130, 130, 121, 111,
  418. 104, 115, 0, 108, 111, 109, 95, 424, 85, 0,
  419. 0, 87, 0, 70, 79, 73, 72, 0, 424, 153,
  420. 155, 157, 110, 159
  421. } ;
  422. static yyconst flex_int16_t yy_def[405] =
  423. { 0,
  424. 399, 1, 400, 400, 400, 400, 399, 399, 399, 399,
  425. 401, 399, 399, 402, 399, 399, 399, 399, 399, 399,
  426. 399, 399, 399, 399, 399, 399, 399, 399, 399, 403,
  427. 399, 404, 399, 399, 403, 403, 403, 403, 403, 403,
  428. 403, 403, 403, 403, 399, 399, 399, 399, 399, 399,
  429. 399, 399, 399, 401, 399, 399, 402, 399, 399, 399,
  430. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  431. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  432. 403, 399, 399, 403, 403, 403, 403, 403, 403, 403,
  433. 403, 403, 403, 403, 403, 403, 403, 403, 399, 399,
  434. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  435. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  436. 399, 399, 399, 399, 399, 399, 403, 403, 403, 403,
  437. 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
  438. 403, 403, 399, 399, 399, 399, 399, 399, 399, 399,
  439. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  440. 399, 399, 399, 399, 399, 399, 399, 403, 403, 403,
  441. 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
  442. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  443. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  444. 399, 399, 403, 403, 403, 403, 403, 403, 403, 403,
  445. 403, 403, 399, 399, 399, 399, 399, 399, 399, 399,
  446. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  447. 399, 399, 399, 399, 403, 403, 403, 403, 403, 403,
  448. 403, 403, 403, 399, 399, 399, 399, 399, 399, 399,
  449. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  450. 399, 399, 399, 403, 403, 403, 403, 403, 403, 403,
  451. 403, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  452. 399, 399, 399, 399, 399, 399, 399, 399, 403, 403,
  453. 403, 403, 403, 403, 403, 399, 399, 399, 399, 399,
  454. 399, 399, 399, 399, 399, 399, 399, 399, 399, 403,
  455. 403, 403, 403, 403, 403, 403, 399, 399, 399, 399,
  456. 399, 399, 399, 399, 399, 403, 403, 403, 403, 403,
  457. 399, 399, 399, 399, 399, 399, 399, 399, 399, 403,
  458. 403, 403, 403, 403, 399, 399, 399, 399, 399, 399,
  459. 399, 403, 403, 403, 403, 403, 399, 399, 399, 399,
  460. 399, 403, 403, 403, 403, 403, 399, 399, 399, 403,
  461. 403, 403, 403, 403, 399, 399, 403, 403, 403, 403,
  462. 403, 399, 403, 403, 403, 403, 403, 399, 403, 403,
  463. 403, 403, 403, 403, 403, 403, 403, 403, 0, 399,
  464. 399, 399, 399, 399
  465. } ;
  466. static yyconst flex_int16_t yy_nxt[479] =
  467. { 0,
  468. 8, 9, 9, 10, 11, 12, 13, 14, 15, 16,
  469. 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
  470. 27, 28, 29, 30, 31, 32, 33, 34, 35, 30,
  471. 36, 37, 30, 38, 30, 30, 30, 30, 30, 39,
  472. 40, 41, 42, 30, 30, 43, 44, 30, 30, 30,
  473. 30, 30, 45, 46, 48, 48, 61, 84, 88, 92,
  474. 86, 95, 89, 85, 49, 50, 87, 61, 102, 113,
  475. 114, 115, 93, 51, 103, 48, 48, 96, 105, 106,
  476. 62, 124, 107, 119, 111, 49, 50, 108, 112, 116,
  477. 117, 62, 120, 122, 51, 118, 125, 123, 127, 128,
  478. 139, 215, 150, 161, 162, 216, 52, 63, 151, 140,
  479. 245, 81, 398, 246, 397, 396, 395, 394, 393, 64,
  480. 65, 66, 67, 68, 69, 70, 71, 52, 72, 225,
  481. 73, 74, 75, 253, 76, 77, 78, 226, 258, 278,
  482. 227, 335, 392, 391, 254, 390, 389, 388, 387, 259,
  483. 279, 386, 336, 47, 47, 54, 54, 57, 57, 82,
  484. 82, 385, 384, 383, 382, 381, 380, 379, 378, 377,
  485. 376, 375, 374, 373, 372, 371, 370, 369, 368, 367,
  486. 366, 365, 364, 363, 362, 361, 360, 359, 358, 357,
  487. 356, 355, 354, 353, 352, 351, 350, 349, 348, 347,
  488. 346, 345, 344, 343, 342, 341, 340, 339, 338, 337,
  489. 334, 333, 332, 331, 330, 329, 328, 327, 326, 325,
  490. 324, 323, 322, 321, 320, 319, 318, 317, 316, 315,
  491. 314, 313, 312, 311, 310, 309, 308, 307, 306, 305,
  492. 304, 303, 302, 301, 300, 299, 298, 297, 296, 295,
  493. 294, 293, 292, 291, 290, 289, 288, 287, 286, 285,
  494. 284, 283, 282, 281, 280, 277, 276, 275, 274, 273,
  495. 272, 271, 270, 269, 268, 267, 266, 265, 264, 263,
  496. 262, 261, 260, 257, 256, 255, 252, 251, 250, 249,
  497. 248, 247, 244, 243, 242, 241, 240, 239, 238, 237,
  498. 236, 235, 234, 233, 232, 231, 230, 229, 228, 224,
  499. 223, 222, 221, 220, 219, 218, 217, 214, 213, 212,
  500. 211, 210, 209, 208, 207, 206, 205, 204, 203, 202,
  501. 201, 200, 199, 198, 197, 196, 195, 194, 193, 192,
  502. 191, 190, 189, 188, 187, 186, 185, 184, 183, 182,
  503. 181, 180, 179, 178, 177, 176, 175, 174, 173, 172,
  504. 171, 170, 169, 168, 167, 166, 165, 164, 163, 160,
  505. 159, 158, 157, 156, 155, 154, 153, 152, 149, 148,
  506. 147, 146, 145, 144, 143, 142, 141, 138, 137, 136,
  507. 135, 134, 133, 132, 131, 130, 129, 126, 121, 110,
  508. 109, 104, 101, 55, 55, 100, 99, 98, 97, 94,
  509. 91, 90, 83, 80, 79, 60, 59, 58, 55, 56,
  510. 55, 53, 399, 7, 399, 399, 399, 399, 399, 399,
  511. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  512. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  513. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  514. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  515. 399, 399, 399, 399, 399, 399, 399, 399
  516. } ;
  517. static yyconst flex_int16_t yy_chk[479] =
  518. { 0,
  519. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  520. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  521. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  522. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  523. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  524. 1, 1, 1, 1, 9, 9, 23, 35, 37, 40,
  525. 36, 42, 37, 35, 9, 9, 36, 61, 65, 71,
  526. 71, 72, 40, 9, 65, 48, 48, 42, 67, 67,
  527. 23, 77, 67, 74, 70, 48, 48, 67, 70, 72,
  528. 73, 61, 74, 76, 48, 73, 77, 76, 84, 84,
  529. 96, 183, 109, 121, 121, 183, 9, 24, 109, 96,
  530. 214, 403, 397, 214, 396, 395, 394, 392, 389, 24,
  531. 24, 24, 24, 24, 24, 24, 24, 48, 24, 194,
  532. 24, 24, 24, 224, 24, 24, 24, 194, 228, 251,
  533. 194, 322, 387, 386, 224, 385, 384, 382, 381, 228,
  534. 251, 380, 322, 400, 400, 401, 401, 402, 402, 404,
  535. 404, 379, 378, 377, 376, 374, 373, 372, 371, 370,
  536. 369, 368, 366, 365, 364, 363, 362, 360, 359, 357,
  537. 356, 355, 354, 353, 352, 351, 349, 348, 347, 346,
  538. 344, 343, 342, 341, 340, 339, 337, 336, 335, 334,
  539. 332, 331, 330, 329, 328, 327, 326, 325, 324, 323,
  540. 320, 319, 318, 317, 316, 315, 313, 312, 310, 307,
  541. 306, 305, 304, 303, 302, 301, 300, 299, 295, 294,
  542. 293, 292, 291, 290, 289, 288, 287, 286, 285, 284,
  543. 283, 282, 281, 280, 279, 278, 276, 274, 272, 271,
  544. 270, 269, 268, 267, 265, 264, 262, 261, 259, 258,
  545. 257, 256, 255, 254, 253, 250, 249, 248, 247, 246,
  546. 245, 243, 242, 240, 239, 238, 237, 236, 235, 234,
  547. 233, 230, 229, 227, 226, 225, 221, 220, 219, 217,
  548. 216, 215, 213, 212, 211, 210, 209, 208, 207, 206,
  549. 204, 203, 201, 200, 199, 198, 197, 196, 195, 193,
  550. 192, 191, 190, 189, 186, 185, 184, 182, 181, 178,
  551. 177, 176, 174, 173, 172, 171, 170, 169, 168, 167,
  552. 166, 165, 164, 163, 162, 161, 160, 158, 156, 155,
  553. 154, 153, 151, 150, 149, 148, 147, 146, 145, 144,
  554. 143, 142, 141, 140, 139, 138, 137, 136, 134, 132,
  555. 131, 130, 129, 127, 126, 125, 124, 123, 122, 120,
  556. 119, 118, 117, 115, 114, 113, 112, 111, 108, 106,
  557. 105, 104, 103, 102, 101, 98, 97, 95, 93, 92,
  558. 91, 90, 89, 88, 87, 86, 85, 78, 75, 69,
  559. 68, 66, 64, 57, 54, 46, 45, 44, 43, 41,
  560. 39, 38, 34, 27, 25, 22, 21, 17, 14, 13,
  561. 11, 10, 7, 399, 399, 399, 399, 399, 399, 399,
  562. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  563. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  564. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  565. 399, 399, 399, 399, 399, 399, 399, 399, 399, 399,
  566. 399, 399, 399, 399, 399, 399, 399, 399
  567. } ;
  568. static yy_state_type yy_last_accepting_state;
  569. static char *yy_last_accepting_cpos;
  570. extern int yy_flex_debug;
  571. int yy_flex_debug = 0;
  572. /* The intent behind this definition is that it'll catch
  573. * any uses of REJECT which flex missed.
  574. */
  575. #define REJECT reject_used_but_not_detected
  576. #define yymore() yymore_used_but_not_detected
  577. #define YY_MORE_ADJ 0
  578. #define YY_RESTORE_YY_MORE_OFFSET
  579. char *yytext;
  580. #line 1 "scanner.l"
  581. #line 2 "scanner.l"
  582. #include <stdio.h>
  583. #include "parser.h"
  584. YY_BUFFER_STATE mybuffer;
  585. void prepare_parse(char* msg) {
  586. mybuffer = yy_scan_string(msg);
  587. }
  588. void cleanup_parse() {
  589. yy_delete_buffer(mybuffer);
  590. }
  591. #line 705 "scanner.c"
  592. #define INITIAL 0
  593. #define DSTR 1
  594. #define SSTR 2
  595. #ifndef YY_NO_UNISTD_H
  596. /* Special case for "unistd.h", since it is non-ANSI. We include it way
  597. * down here because we want the user's section 1 to have been scanned first.
  598. * The user has a chance to override it with an option.
  599. */
  600. #include <unistd.h>
  601. #endif
  602. #ifndef YY_EXTRA_TYPE
  603. #define YY_EXTRA_TYPE void *
  604. #endif
  605. static int yy_init_globals (void );
  606. /* Macros after this point can all be overridden by user definitions in
  607. * section 1.
  608. */
  609. #ifndef YY_SKIP_YYWRAP
  610. #ifdef __cplusplus
  611. extern "C" int yywrap (void );
  612. #else
  613. extern int yywrap (void );
  614. #endif
  615. #endif
  616. static void yyunput (int c,char *buf_ptr );
  617. #ifndef yytext_ptr
  618. static void yy_flex_strncpy (char *,yyconst char *,int );
  619. #endif
  620. #ifdef YY_NEED_STRLEN
  621. static int yy_flex_strlen (yyconst char * );
  622. #endif
  623. #ifndef YY_NO_INPUT
  624. #ifdef __cplusplus
  625. static int yyinput (void );
  626. #else
  627. static int input (void );
  628. #endif
  629. #endif
  630. static int yy_start_stack_ptr = 0;
  631. static int yy_start_stack_depth = 0;
  632. static int *yy_start_stack = NULL;
  633. static void yy_push_state (int new_state );
  634. static void yy_pop_state (void );
  635. static int yy_top_state (void );
  636. /* Amount of stuff to slurp up with each read. */
  637. #ifndef YY_READ_BUF_SIZE
  638. #define YY_READ_BUF_SIZE 8192
  639. #endif
  640. /* Copy whatever the last rule matched to the standard output. */
  641. #ifndef ECHO
  642. /* This used to be an fputs(), but since the string might contain NUL's,
  643. * we now use fwrite().
  644. */
  645. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
  646. #endif
  647. /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  648. * is returned in "result".
  649. */
  650. #ifndef YY_INPUT
  651. #define YY_INPUT(buf,result,max_size) \
  652. if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
  653. { \
  654. int c = '*'; \
  655. size_t n; \
  656. for ( n = 0; n < max_size && \
  657. (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
  658. buf[n] = (char) c; \
  659. if ( c == '\n' ) \
  660. buf[n++] = (char) c; \
  661. if ( c == EOF && ferror( yyin ) ) \
  662. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  663. result = n; \
  664. } \
  665. else \
  666. { \
  667. errno=0; \
  668. while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
  669. { \
  670. if( errno != EINTR) \
  671. { \
  672. YY_FATAL_ERROR( "input in flex scanner failed" ); \
  673. break; \
  674. } \
  675. errno=0; \
  676. clearerr(yyin); \
  677. } \
  678. }\
  679. \
  680. #endif
  681. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  682. * we don't want an extra ';' after the "return" because that will cause
  683. * some compilers to complain about unreachable statements.
  684. */
  685. #ifndef yyterminate
  686. #define yyterminate() return YY_NULL
  687. #endif
  688. /* Number of entries by which start-condition stack grows. */
  689. #ifndef YY_START_STACK_INCR
  690. #define YY_START_STACK_INCR 25
  691. #endif
  692. /* Report a fatal error. */
  693. #ifndef YY_FATAL_ERROR
  694. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  695. #endif
  696. /* end tables serialization structures and prototypes */
  697. /* Default declaration of generated scanner - a define so the user can
  698. * easily add parameters.
  699. */
  700. #ifndef YY_DECL
  701. #define YY_DECL_IS_OURS 1
  702. extern int yylex (void);
  703. #define YY_DECL int yylex (void)
  704. #endif /* !YY_DECL */
  705. /* Code executed at the beginning of each rule, after yytext and yyleng
  706. * have been set up.
  707. */
  708. #ifndef YY_USER_ACTION
  709. #define YY_USER_ACTION
  710. #endif
  711. /* Code executed at the end of each rule. */
  712. #ifndef YY_BREAK
  713. #define YY_BREAK break;
  714. #endif
  715. #define YY_RULE_SETUP \
  716. YY_USER_ACTION
  717. /** The main scanner function which does all the work.
  718. */
  719. YY_DECL
  720. {
  721. register yy_state_type yy_current_state;
  722. register char *yy_cp, *yy_bp;
  723. register int yy_act;
  724. #line 123 "scanner.l"
  725. #line 872 "scanner.c"
  726. if ( !(yy_init) )
  727. {
  728. (yy_init) = 1;
  729. #ifdef YY_USER_INIT
  730. YY_USER_INIT;
  731. #endif
  732. if ( ! (yy_start) )
  733. (yy_start) = 1; /* first start state */
  734. if ( ! yyin )
  735. yyin = stdin;
  736. if ( ! yyout )
  737. yyout = stdout;
  738. if ( ! YY_CURRENT_BUFFER ) {
  739. yyensure_buffer_stack ();
  740. YY_CURRENT_BUFFER_LVALUE =
  741. yy_create_buffer(yyin,YY_BUF_SIZE );
  742. }
  743. yy_load_buffer_state( );
  744. }
  745. while ( 1 ) /* loops until end-of-file is reached */
  746. {
  747. yy_cp = (yy_c_buf_p);
  748. /* Support of yytext. */
  749. *yy_cp = (yy_hold_char);
  750. /* yy_bp points to the position in yy_ch_buf of the start of
  751. * the current run.
  752. */
  753. yy_bp = yy_cp;
  754. yy_current_state = (yy_start);
  755. yy_match:
  756. do
  757. {
  758. register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  759. if ( yy_accept[yy_current_state] )
  760. {
  761. (yy_last_accepting_state) = yy_current_state;
  762. (yy_last_accepting_cpos) = yy_cp;
  763. }
  764. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  765. {
  766. yy_current_state = (int) yy_def[yy_current_state];
  767. if ( yy_current_state >= 400 )
  768. yy_c = yy_meta[(unsigned int) yy_c];
  769. }
  770. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  771. ++yy_cp;
  772. }
  773. while ( yy_base[yy_current_state] != 424 );
  774. yy_find_action:
  775. yy_act = yy_accept[yy_current_state];
  776. if ( yy_act == 0 )
  777. { /* have to back up */
  778. yy_cp = (yy_last_accepting_cpos);
  779. yy_current_state = (yy_last_accepting_state);
  780. yy_act = yy_accept[yy_current_state];
  781. }
  782. YY_DO_BEFORE_ACTION;
  783. do_action: /* This label is used only to access EOF actions. */
  784. switch ( yy_act )
  785. { /* beginning of action switch */
  786. case 0: /* must back up */
  787. /* undo the effects of YY_DO_BEFORE_ACTION */
  788. *yy_cp = (yy_hold_char);
  789. yy_cp = (yy_last_accepting_cpos);
  790. yy_current_state = (yy_last_accepting_state);
  791. goto yy_find_action;
  792. case 1:
  793. YY_RULE_SETUP
  794. #line 124 "scanner.l"
  795. yylval.string = strdup(yytext); return NUMBER;
  796. YY_BREAK
  797. case 2:
  798. /* rule 2 can match eol */
  799. YY_RULE_SETUP
  800. #line 125 "scanner.l"
  801. yylval.string = strdup(yytext); return S;
  802. YY_BREAK
  803. case 3:
  804. YY_RULE_SETUP
  805. #line 126 "scanner.l"
  806. yylval.string = strdup(yytext); return AT;
  807. YY_BREAK
  808. case 4:
  809. YY_RULE_SETUP
  810. #line 127 "scanner.l"
  811. yylval.string = strdup(yytext); return LPAREN;
  812. YY_BREAK
  813. case 5:
  814. YY_RULE_SETUP
  815. #line 128 "scanner.l"
  816. yylval.string = strdup(yytext); return RPAREN;
  817. YY_BREAK
  818. case 6:
  819. YY_RULE_SETUP
  820. #line 129 "scanner.l"
  821. yylval.string = strdup(yytext); return PIPE;
  822. YY_BREAK
  823. case 7:
  824. YY_RULE_SETUP
  825. #line 130 "scanner.l"
  826. yylval.string = strdup(yytext); return LT;
  827. YY_BREAK
  828. case 8:
  829. YY_RULE_SETUP
  830. #line 131 "scanner.l"
  831. yylval.string = strdup(yytext); return SLASH;
  832. YY_BREAK
  833. case 9:
  834. YY_RULE_SETUP
  835. #line 132 "scanner.l"
  836. yylval.string = strdup(yytext); return DBLSLASH;
  837. YY_BREAK
  838. case 10:
  839. YY_RULE_SETUP
  840. #line 133 "scanner.l"
  841. yylval.string = strdup(yytext); return BANG;
  842. YY_BREAK
  843. case 11:
  844. YY_RULE_SETUP
  845. #line 134 "scanner.l"
  846. yylval.string = strdup(yytext); return COLON;
  847. YY_BREAK
  848. case 12:
  849. YY_RULE_SETUP
  850. #line 135 "scanner.l"
  851. yylval.string = strdup(yytext); return DBLCOLON;
  852. YY_BREAK
  853. case 13:
  854. YY_RULE_SETUP
  855. #line 136 "scanner.l"
  856. yylval.string = strdup(yytext); return QUERY;
  857. YY_BREAK
  858. case 14:
  859. YY_RULE_SETUP
  860. #line 137 "scanner.l"
  861. yylval.string = strdup(yytext); return HASH;
  862. YY_BREAK
  863. case 15:
  864. /* rule 15 can match eol */
  865. YY_RULE_SETUP
  866. #line 138 "scanner.l"
  867. yylval.string = strdup(yytext); return COMMA;
  868. YY_BREAK
  869. case 16:
  870. YY_RULE_SETUP
  871. #line 139 "scanner.l"
  872. yylval.string = strdup(yytext); return DOT;
  873. YY_BREAK
  874. case 17:
  875. YY_RULE_SETUP
  876. #line 140 "scanner.l"
  877. yylval.string = strdup(yytext); return DBLDOT;
  878. YY_BREAK
  879. case 18:
  880. /* rule 18 can match eol */
  881. YY_RULE_SETUP
  882. #line 141 "scanner.l"
  883. yylval.string = strdup(yytext); return GT;
  884. YY_BREAK
  885. case 19:
  886. YY_RULE_SETUP
  887. #line 142 "scanner.l"
  888. yylval.string = strdup(yytext); return LBRA;
  889. YY_BREAK
  890. case 20:
  891. YY_RULE_SETUP
  892. #line 143 "scanner.l"
  893. yylval.string = strdup(yytext); return RBRA;
  894. YY_BREAK
  895. case 21:
  896. /* rule 21 can match eol */
  897. YY_RULE_SETUP
  898. #line 144 "scanner.l"
  899. yylval.string = strdup(yytext); return TILDE;
  900. YY_BREAK
  901. case 22:
  902. YY_RULE_SETUP
  903. #line 145 "scanner.l"
  904. yylval.string = strdup(yytext); return SPLAT;
  905. YY_BREAK
  906. case 23:
  907. /* rule 23 can match eol */
  908. YY_RULE_SETUP
  909. #line 146 "scanner.l"
  910. yylval.string = strdup(yytext); return PLUS;
  911. YY_BREAK
  912. case 24:
  913. YY_RULE_SETUP
  914. #line 147 "scanner.l"
  915. yylval.string = strdup(yytext); return DASH;
  916. YY_BREAK
  917. case 25:
  918. YY_RULE_SETUP
  919. #line 148 "scanner.l"
  920. yylval.string = strdup(yytext); return EQ;
  921. YY_BREAK
  922. case 26:
  923. YY_RULE_SETUP
  924. #line 149 "scanner.l"
  925. yylval.string = strdup(yytext); return LTE;
  926. YY_BREAK
  927. case 27:
  928. YY_RULE_SETUP
  929. #line 150 "scanner.l"
  930. yylval.string = strdup(yytext); return GTE;
  931. YY_BREAK
  932. case 28:
  933. YY_RULE_SETUP
  934. #line 151 "scanner.l"
  935. yylval.string = strdup(yytext); return DOLLAR;
  936. YY_BREAK
  937. case 29:
  938. /* rule 29 can match eol */
  939. YY_RULE_SETUP
  940. #line 152 "scanner.l"
  941. yylval.string = strdup(yytext); return BSLASHLIT;
  942. YY_BREAK
  943. case 30:
  944. YY_RULE_SETUP
  945. #line 153 "scanner.l"
  946. yylval.string = strdup(yytext); return XANCESTOR;
  947. YY_BREAK
  948. case 31:
  949. YY_RULE_SETUP
  950. #line 154 "scanner.l"
  951. yylval.string = strdup(yytext); return XANCESTORSELF;
  952. YY_BREAK
  953. case 32:
  954. YY_RULE_SETUP
  955. #line 155 "scanner.l"
  956. yylval.string = strdup(yytext); return XATTR;
  957. YY_BREAK
  958. case 33:
  959. YY_RULE_SETUP
  960. #line 156 "scanner.l"
  961. yylval.string = strdup(yytext); return XCHILD;
  962. YY_BREAK
  963. case 34:
  964. YY_RULE_SETUP
  965. #line 157 "scanner.l"
  966. yylval.string = strdup(yytext); return XDESC;
  967. YY_BREAK
  968. case 35:
  969. YY_RULE_SETUP
  970. #line 158 "scanner.l"
  971. yylval.string = strdup(yytext); return XDESCSELF;
  972. YY_BREAK
  973. case 36:
  974. YY_RULE_SETUP
  975. #line 159 "scanner.l"
  976. yylval.string = strdup(yytext); return XFOLLOW;
  977. YY_BREAK
  978. case 37:
  979. YY_RULE_SETUP
  980. #line 160 "scanner.l"
  981. yylval.string = strdup(yytext); return XFOLLOWSIB;
  982. YY_BREAK
  983. case 38:
  984. YY_RULE_SETUP
  985. #line 161 "scanner.l"
  986. yylval.string = strdup(yytext); return XNS;
  987. YY_BREAK
  988. case 39:
  989. YY_RULE_SETUP
  990. #line 162 "scanner.l"
  991. yylval.string = strdup(yytext); return XPARENT;
  992. YY_BREAK
  993. case 40:
  994. YY_RULE_SETUP
  995. #line 163 "scanner.l"
  996. yylval.string = strdup(yytext); return XPRE;
  997. YY_BREAK
  998. case 41:
  999. YY_RULE_SETUP
  1000. #line 164 "scanner.l"
  1001. yylval.string = strdup(yytext); return XPRESIB;
  1002. YY_BREAK
  1003. case 42:
  1004. YY_RULE_SETUP
  1005. #line 165 "scanner.l"
  1006. yylval.string = strdup(yytext); return XSELF;
  1007. YY_BREAK
  1008. case 43:
  1009. YY_RULE_SETUP
  1010. #line 166 "scanner.l"
  1011. yylval.string = strdup(yytext); return XOR;
  1012. YY_BREAK
  1013. case 44:
  1014. YY_RULE_SETUP
  1015. #line 167 "scanner.l"
  1016. yylval.string = strdup(yytext); return XAND;
  1017. YY_BREAK
  1018. case 45:
  1019. YY_RULE_SETUP
  1020. #line 168 "scanner.l"
  1021. yylval.string = strdup(yytext); return XDIV;
  1022. YY_BREAK
  1023. case 46:
  1024. YY_RULE_SETUP
  1025. #line 169 "scanner.l"
  1026. yylval.string = strdup(yytext); return XMOD;
  1027. YY_BREAK
  1028. case 47:
  1029. YY_RULE_SETUP
  1030. #line 170 "scanner.l"
  1031. yylval.string = strdup(yytext); return XCOMMENT;
  1032. YY_BREAK
  1033. case 48:
  1034. YY_RULE_SETUP
  1035. #line 171 "scanner.l"
  1036. yylval.string = strdup(yytext); return XTEXT;
  1037. YY_BREAK
  1038. case 49:
  1039. YY_RULE_SETUP
  1040. #line 172 "scanner.l"
  1041. yylval.string = strdup(yytext); return XPI;
  1042. YY_BREAK
  1043. case 50:
  1044. YY_RULE_SETUP
  1045. #line 173 "scanner.l"
  1046. yylval.string = strdup(yytext); return XNODE;
  1047. YY_BREAK
  1048. case 51:
  1049. YY_RULE_SETUP
  1050. #line 174 "scanner.l"
  1051. yylval.string = strdup(yytext); return CXEQUATION;
  1052. YY_BREAK
  1053. case 52:
  1054. YY_RULE_SETUP
  1055. #line 175 "scanner.l"
  1056. yylval.string = strdup(yytext); return CXOPHE;
  1057. YY_BREAK
  1058. case 53:
  1059. YY_RULE_SETUP
  1060. #line 176 "scanner.l"
  1061. yylval.string = strdup(yytext); return CXOPNE;
  1062. YY_BREAK
  1063. case 54:
  1064. YY_RULE_SETUP
  1065. #line 177 "scanner.l"
  1066. yylval.string = strdup(yytext); return CXOPSTARTEQ;
  1067. YY_BREAK
  1068. case 55:
  1069. YY_RULE_SETUP
  1070. #line 178 "scanner.l"
  1071. yylval.string = strdup(yytext); return CXOPENDEQ;
  1072. YY_BREAK
  1073. case 56:
  1074. YY_RULE_SETUP
  1075. #line 179 "scanner.l"
  1076. yylval.string = strdup(yytext); return CXOPCONTAINS;
  1077. YY_BREAK
  1078. case 57:
  1079. YY_RULE_SETUP
  1080. #line 180 "scanner.l"
  1081. yylval.string = strdup(yytext); return CXOPCONTAINS2;
  1082. YY_BREAK
  1083. case 58:
  1084. YY_RULE_SETUP
  1085. #line 181 "scanner.l"
  1086. yylval.string = strdup(yytext); return CXFIRST;
  1087. YY_BREAK
  1088. case 59:
  1089. YY_RULE_SETUP
  1090. #line 182 "scanner.l"
  1091. yylval.string = strdup(yytext); return CXLAST;
  1092. YY_BREAK
  1093. case 60:
  1094. YY_RULE_SETUP
  1095. #line 183 "scanner.l"
  1096. yylval.string = strdup(yytext); return CXNOT;
  1097. YY_BREAK
  1098. case 61:
  1099. YY_RULE_SETUP
  1100. #line 184 "scanner.l"
  1101. yylval.string = strdup(yytext); return CXEVEN;
  1102. YY_BREAK
  1103. case 62:
  1104. YY_RULE_SETUP
  1105. #line 185 "scanner.l"
  1106. yylval.string = strdup(yytext); return CXODD;
  1107. YY_BREAK
  1108. case 63:
  1109. YY_RULE_SETUP
  1110. #line 186 "scanner.l"
  1111. yylval.string = strdup(yytext); return CXEQ;
  1112. YY_BREAK
  1113. case 64:
  1114. YY_RULE_SETUP
  1115. #line 187 "scanner.l"
  1116. yylval.string = strdup(yytext); return CXGT;
  1117. YY_BREAK
  1118. case 65:
  1119. YY_RULE_SETUP
  1120. #line 188 "scanner.l"
  1121. yylval.string = strdup(yytext); return CXLT;
  1122. YY_BREAK
  1123. case 66:
  1124. YY_RULE_SETUP
  1125. #line 189 "scanner.l"
  1126. yylval.string = strdup(yytext); return CXCONTENT;
  1127. YY_BREAK
  1128. case 67:
  1129. YY_RULE_SETUP
  1130. #line 190 "scanner.l"
  1131. yylval.string = strdup(yytext); return CXHEADER;
  1132. YY_BREAK
  1133. case 68:
  1134. YY_RULE_SETUP
  1135. #line 191 "scanner.l"
  1136. yylval.string = strdup(yytext); return CXCONTAINS;
  1137. YY_BREAK
  1138. case 69:
  1139. YY_RULE_SETUP
  1140. #line 192 "scanner.l"
  1141. yylval.string = strdup(yytext); return CXEMPTY;
  1142. YY_BREAK
  1143. case 70:
  1144. YY_RULE_SETUP
  1145. #line 193 "scanner.l"
  1146. yylval.string = strdup(yytext); return CXHAS;
  1147. YY_BREAK
  1148. case 71:
  1149. YY_RULE_SETUP
  1150. #line 194 "scanner.l"
  1151. yylval.string = strdup(yytext); return CXPARENT;
  1152. YY_BREAK
  1153. case 72:
  1154. YY_RULE_SETUP
  1155. #line 195 "scanner.l"
  1156. yylval.string = strdup(yytext); return CXNTHCH;
  1157. YY_BREAK
  1158. case 73:
  1159. YY_RULE_SETUP
  1160. #line 196 "scanner.l"
  1161. yylval.string = strdup(yytext); return CXNTHLASTCH;
  1162. YY_BREAK
  1163. case 74:
  1164. YY_RULE_SETUP
  1165. #line 197 "scanner.l"
  1166. yylval.string = strdup(yytext); return CXNTHTYPE;
  1167. YY_BREAK
  1168. case 75:
  1169. YY_RULE_SETUP
  1170. #line 198 "scanner.l"
  1171. yylval.string = strdup(yytext); return CXNTHLASTTYPE;
  1172. YY_BREAK
  1173. case 76:
  1174. YY_RULE_SETUP
  1175. #line 199 "scanner.l"
  1176. yylval.string = strdup(yytext); return CXFIRSTCH;
  1177. YY_BREAK
  1178. case 77:
  1179. YY_RULE_SETUP
  1180. #line 200 "scanner.l"
  1181. yylval.string = strdup(yytext); return CXLASTCH;
  1182. YY_BREAK
  1183. case 78:
  1184. YY_RULE_SETUP
  1185. #line 201 "scanner.l"
  1186. yylval.string = strdup(yytext); return CXFIRSTTYPE;
  1187. YY_BREAK
  1188. case 79:
  1189. YY_RULE_SETUP
  1190. #line 202 "scanner.l"
  1191. yylval.string = strdup(yytext); return CXLASTTYPE;
  1192. YY_BREAK
  1193. case 80:
  1194. YY_RULE_SETUP
  1195. #line 203 "scanner.l"
  1196. yylval.string = strdup(yytext); return CXONLYCH;
  1197. YY_BREAK
  1198. case 81:
  1199. YY_RULE_SETUP
  1200. #line 204 "scanner.l"
  1201. yylval.string = strdup(yytext); return CXONLYTYPE;
  1202. YY_BREAK
  1203. case 82:
  1204. YY_RULE_SETUP
  1205. #line 205 "scanner.l"
  1206. yylval.string = strdup(yytext); return CXINPUT;
  1207. YY_BREAK
  1208. case 83:
  1209. YY_RULE_SETUP
  1210. #line 206 "scanner.l"
  1211. yylval.string = strdup(yytext); return CXTEXT;
  1212. YY_BREAK
  1213. case 84:
  1214. YY_RULE_SETUP
  1215. #line 207 "scanner.l"
  1216. yylval.string = strdup(yytext); return CXPASSWORD;
  1217. YY_BREAK
  1218. case 85:
  1219. YY_RULE_SETUP
  1220. #line 208 "scanner.l"
  1221. yylval.string = strdup(yytext); return CXRADIO;
  1222. YY_BREAK
  1223. case 86:
  1224. YY_RULE_SETUP
  1225. #line 209 "scanner.l"
  1226. yylval.string = strdup(yytext); return CXCHECKBOX;
  1227. YY_BREAK
  1228. case 87:
  1229. YY_RULE_SETUP
  1230. #line 210 "scanner.l"
  1231. yylval.string = strdup(yytext); return CXSUBMIT;
  1232. YY_BREAK
  1233. case 88:
  1234. YY_RULE_SETUP
  1235. #line 211 "scanner.l"
  1236. yylval.string = strdup(yytext); return CXIMAGE;
  1237. YY_BREAK
  1238. case 89:
  1239. YY_RULE_SETUP
  1240. #line 212 "scanner.l"
  1241. yylval.string = strdup(yytext); return CXRESET;
  1242. YY_BREAK
  1243. case 90:
  1244. YY_RULE_SETUP
  1245. #line 213 "scanner.l"
  1246. yylval.string = strdup(yytext); return CXBUTTON;
  1247. YY_BREAK
  1248. case 91:
  1249. YY_RULE_SETUP
  1250. #line 214 "scanner.l"
  1251. yylval.string = strdup(yytext); return CXFILE;
  1252. YY_BREAK
  1253. case 92:
  1254. YY_RULE_SETUP
  1255. #line 215 "scanner.l"
  1256. yylval.string = strdup(yytext); return CXENABLED;
  1257. YY_BREAK
  1258. case 93:
  1259. YY_RULE_SETUP
  1260. #line 216 "scanner.l"
  1261. yylval.string = strdup(yytext); return CXDISABLED;
  1262. YY_BREAK
  1263. case 94:
  1264. YY_RULE_SETUP
  1265. #line 217 "scanner.l"
  1266. yylval.string = strdup(yytext); return CXCHECKED;
  1267. YY_BREAK
  1268. case 95:
  1269. YY_RULE_SETUP
  1270. #line 218 "scanner.l"
  1271. yylval.string = strdup(yytext); return CXSELECTED;
  1272. YY_BREAK
  1273. case 96:
  1274. YY_RULE_SETUP
  1275. #line 219 "scanner.l"
  1276. yylval.string = strdup(yytext); return NAME;
  1277. YY_BREAK
  1278. case 97:
  1279. /* rule 97 can match eol */
  1280. YY_RULE_SETUP
  1281. #line 220 "scanner.l"
  1282. yylval.string = strdup(yytext); return STRING;
  1283. YY_BREAK
  1284. case 98:
  1285. /* rule 98 can match eol */
  1286. YY_RULE_SETUP
  1287. #line 221 "scanner.l"
  1288. yylval.string = strdup(yytext); return OTHER;
  1289. YY_BREAK
  1290. case 99:
  1291. YY_RULE_SETUP
  1292. #line 222 "scanner.l"
  1293. ECHO;
  1294. YY_BREAK
  1295. #line 1458 "scanner.c"
  1296. case YY_STATE_EOF(INITIAL):
  1297. case YY_STATE_EOF(DSTR):
  1298. case YY_STATE_EOF(SSTR):
  1299. yyterminate();
  1300. case YY_END_OF_BUFFER:
  1301. {
  1302. /* Amount of text matched not including the EOB char. */
  1303. int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
  1304. /* Undo the effects of YY_DO_BEFORE_ACTION. */
  1305. *yy_cp = (yy_hold_char);
  1306. YY_RESTORE_YY_MORE_OFFSET
  1307. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  1308. {
  1309. /* We're scanning a new file or input source. It's
  1310. * possible that this happened because the user
  1311. * just pointed yyin at a new source and called
  1312. * yylex(). If so, then we have to assure
  1313. * consistency between YY_CURRENT_BUFFER and our
  1314. * globals. Here is the right place to do so, because
  1315. * this is the first action (other than possibly a
  1316. * back-up) that will match for the new input source.
  1317. */
  1318. (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  1319. YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
  1320. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  1321. }
  1322. /* Note that here we test for yy_c_buf_p "<=" to the position
  1323. * of the first EOB in the buffer, since yy_c_buf_p will
  1324. * already have been incremented past the NUL character
  1325. * (since all states make transitions on EOB to the
  1326. * end-of-buffer state). Contrast this with the test
  1327. * in input().
  1328. */
  1329. if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  1330. { /* This was really a NUL. */
  1331. yy_state_type yy_next_state;
  1332. (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
  1333. yy_current_state = yy_get_previous_state( );
  1334. /* Okay, we're now positioned to make the NUL
  1335. * transition. We couldn't have
  1336. * yy_get_previous_state() go ahead and do it
  1337. * for us because it doesn't know how to deal
  1338. * with the possibility of jamming (and we don't
  1339. * want to build jamming into it because then it
  1340. * will run more slowly).
  1341. */
  1342. yy_next_state = yy_try_NUL_trans( yy_current_state );
  1343. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  1344. if ( yy_next_state )
  1345. {
  1346. /* Consume the NUL. */
  1347. yy_cp = ++(yy_c_buf_p);
  1348. yy_current_state = yy_next_state;
  1349. goto yy_match;
  1350. }
  1351. else
  1352. {
  1353. yy_cp = (yy_c_buf_p);
  1354. goto yy_find_action;
  1355. }
  1356. }
  1357. else switch ( yy_get_next_buffer( ) )
  1358. {
  1359. case EOB_ACT_END_OF_FILE:
  1360. {
  1361. (yy_did_buffer_switch_on_eof) = 0;
  1362. if ( yywrap( ) )
  1363. {
  1364. /* Note: because we've taken care in
  1365. * yy_get_next_buffer() to have set up
  1366. * yytext, we can now set up
  1367. * yy_c_buf_p so that if some total
  1368. * hoser (like flex itself) wants to
  1369. * call the scanner after we return the
  1370. * YY_NULL, it'll still work - another
  1371. * YY_NULL will get returned.
  1372. */
  1373. (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
  1374. yy_act = YY_STATE_EOF(YY_START);
  1375. goto do_action;
  1376. }
  1377. else
  1378. {
  1379. if ( ! (yy_did_buffer_switch_on_eof) )
  1380. YY_NEW_FILE;
  1381. }
  1382. break;
  1383. }
  1384. case EOB_ACT_CONTINUE_SCAN:
  1385. (yy_c_buf_p) =
  1386. (yytext_ptr) + yy_amount_of_matched_text;
  1387. yy_current_state = yy_get_previous_state( );
  1388. yy_cp = (yy_c_buf_p);
  1389. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  1390. goto yy_match;
  1391. case EOB_ACT_LAST_MATCH:
  1392. (yy_c_buf_p) =
  1393. &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
  1394. yy_current_state = yy_get_previous_state( );
  1395. yy_cp = (yy_c_buf_p);
  1396. yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  1397. goto yy_find_action;
  1398. }
  1399. break;
  1400. }
  1401. default:
  1402. YY_FATAL_ERROR(
  1403. "fatal flex scanner internal error--no action found" );
  1404. } /* end of action switch */
  1405. } /* end of scanning one token */
  1406. } /* end of yylex */
  1407. /* yy_get_next_buffer - try to read in a new buffer
  1408. *
  1409. * Returns a code representing an action:
  1410. * EOB_ACT_LAST_MATCH -
  1411. * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1412. * EOB_ACT_END_OF_FILE - end of file
  1413. */
  1414. static int yy_get_next_buffer (void)
  1415. {
  1416. register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  1417. register char *source = (yytext_ptr);
  1418. register int number_to_move, i;
  1419. int ret_val;
  1420. if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
  1421. YY_FATAL_ERROR(
  1422. "fatal flex scanner internal error--end of buffer missed" );
  1423. if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  1424. { /* Don't try to fill the buffer, so this is an EOF. */
  1425. if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
  1426. {
  1427. /* We matched a single character, the EOB, so
  1428. * treat this as a final EOF.
  1429. */
  1430. return EOB_ACT_END_OF_FILE;
  1431. }
  1432. else
  1433. {
  1434. /* We matched some text prior to the EOB, first
  1435. * process it.
  1436. */
  1437. return EOB_ACT_LAST_MATCH;
  1438. }
  1439. }
  1440. /* Try to read more data. */
  1441. /* First move last chars to start of buffer. */
  1442. number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
  1443. for ( i = 0; i < number_to_move; ++i )
  1444. *(dest++) = *(source++);
  1445. if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1446. /* don't do the read, it's not guaranteed to return an EOF,
  1447. * just force an EOF
  1448. */
  1449. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
  1450. else
  1451. {
  1452. int num_to_read =
  1453. YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  1454. while ( num_to_read <= 0 )
  1455. { /* Not enough room in the buffer - grow it. */
  1456. /* just a shorter name for the current buffer */
  1457. YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
  1458. int yy_c_buf_p_offset =
  1459. (int) ((yy_c_buf_p) - b->yy_ch_buf);
  1460. if ( b->yy_is_our_buffer )
  1461. {
  1462. int new_size = b->yy_buf_size * 2;
  1463. if ( new_size <= 0 )
  1464. b->yy_buf_size += b->yy_buf_size / 8;
  1465. else
  1466. b->yy_buf_size *= 2;
  1467. b->yy_ch_buf = (char *)
  1468. /* Include room in for 2 EOB chars. */
  1469. yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
  1470. }
  1471. else
  1472. /* Can't grow it, we don't own it. */
  1473. b->yy_ch_buf = 0;
  1474. if ( ! b->yy_ch_buf )
  1475. YY_FATAL_ERROR(
  1476. "fatal error - scanner input buffer overflow" );
  1477. (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
  1478. num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  1479. number_to_move - 1;
  1480. }
  1481. if ( num_to_read > YY_READ_BUF_SIZE )
  1482. num_to_read = YY_READ_BUF_SIZE;
  1483. /* Read in more data. */
  1484. YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  1485. (yy_n_chars), num_to_read );
  1486. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  1487. }
  1488. if ( (yy_n_chars) == 0 )
  1489. {
  1490. if ( number_to_move == YY_MORE_ADJ )
  1491. {
  1492. ret_val = EOB_ACT_END_OF_FILE;
  1493. yyrestart(yyin );
  1494. }
  1495. else
  1496. {
  1497. ret_val = EOB_ACT_LAST_MATCH;
  1498. YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  1499. YY_BUFFER_EOF_PENDING;
  1500. }
  1501. }
  1502. else
  1503. ret_val = EOB_ACT_CONTINUE_SCAN;
  1504. (yy_n_chars) += number_to_move;
  1505. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
  1506. YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
  1507. (yytext_ptr) = &YY_CURRENT_