You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2762 lines
67 KiB

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