Leaked source code of windows server 2003
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.

4206 lines
153 KiB

  1. /* A lexical scanner generated by flex */
  2. /* Scanner skeleton version:
  3. * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
  4. */
  5. #include <pch.cxx>
  6. #pragma hdrstop
  7. #define FLEX_SCANNER
  8. #define YY_FLEX_MAJOR_VERSION 2
  9. #define YY_FLEX_MINOR_VERSION 5
  10. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  11. #ifdef c_plusplus
  12. #ifndef __cplusplus
  13. #define __cplusplus
  14. #endif
  15. #endif
  16. #ifndef YY_CHAR
  17. #define YY_CHAR WCHAR
  18. #endif
  19. #ifdef __cplusplus
  20. #include <stdlib.h>
  21. //class istream;
  22. /* Use prototypes in function declarations. */
  23. #define YY_USE_PROTOS
  24. /* The "const" storage-class-modifier is valid. */
  25. #define YY_USE_CONST
  26. #else /* ! __cplusplus */
  27. #if __STDC__
  28. #define YY_USE_PROTOS
  29. #define YY_USE_CONST
  30. #endif /* __STDC__ */
  31. #endif /* ! __cplusplus */
  32. #ifdef __TURBOC__
  33. #pragma warn -rch
  34. #pragma warn -use
  35. #include <io.h>
  36. #include <stdlib.h>
  37. #define YY_USE_CONST
  38. #define YY_USE_PROTOS
  39. #endif
  40. #ifdef YY_USE_CONST
  41. #define yyconst const
  42. #else
  43. #define yyconst
  44. #endif
  45. #ifdef YY_USE_PROTOS
  46. #define YY_PROTO(proto) proto
  47. #else
  48. #define YY_PROTO(proto) ()
  49. #endif
  50. /* Returned upon end-of-file. */
  51. #define YY_NULL 0
  52. /* Promotes a possibly negative, possibly signed YY_CHAR to an unsigned
  53. * integer for use as an array index. If the signed YY_CHAR is negative,
  54. * we want to instead treat it as an 8-bit unsigned YY_CHAR, hence the
  55. * double cast.
  56. */
  57. #define YY_SC_TO_UI(c) ((unsigned int) (YY_CHAR) c)
  58. /* Enter a start condition. This macro really ought to take a parameter,
  59. * but we do it the disgusting crufty way forced on us by the ()-less
  60. * definition of BEGIN.
  61. */
  62. #define BEGIN yy_start = 1 + 2 *
  63. /* Translate the current start state into a value that can be later handed
  64. * to BEGIN to return to the state. The YYSTATE alias is for lex
  65. * compatibility.
  66. */
  67. #define YY_START ((yy_start - 1) / 2)
  68. #define YYSTATE YY_START
  69. /* Action number for EOF rule of a given start state. */
  70. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  71. /* Special action meaning "start processing a new file". */
  72. #define YY_NEW_FILE yyrestart( )
  73. #define YY_END_OF_BUFFER_CHAR 0
  74. /* Size of default input buffer. */
  75. #define YY_BUF_SIZE 32767 // UNDONE: Should really just take the input from the bstr passed in
  76. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  77. extern int yyleng;
  78. #define EOB_ACT_CONTINUE_SCAN 0
  79. #define EOB_ACT_END_OF_FILE 1
  80. #define EOB_ACT_LAST_MATCH 2
  81. /* The funky do-while in the following #define is used to turn the definition
  82. * int a single C statement (which needs a semi-colon terminator). This
  83. * avoids problems with code like:
  84. *
  85. * if ( condition_holds )
  86. * yyless( 5 );
  87. * else
  88. * do_something_else();
  89. *
  90. * Prior to using the do-while the compiler would get upset at the
  91. * "else" because it interpreted the "if" statement as being all
  92. * done when it reached the ';' after the yyless() call.
  93. */
  94. /* Return all but the first 'n' matched characters back to the input stream. */
  95. #define yyless(n) \
  96. do \
  97. { \
  98. /* Undo effects of setting up yytext. */ \
  99. *yy_cp = yy_hold_char; \
  100. YY_RESTORE_YY_MORE_OFFSET \
  101. yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  102. YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  103. } \
  104. while ( 0 )
  105. #define unput(c) yyunput( c, yytext_ptr )
  106. /* The following is because we cannot portably get our hands on size_t
  107. * (without autoconf's help, which isn't available because we want
  108. * flex-generated scanners to compile on their own).
  109. */
  110. typedef unsigned int yy_size_t;
  111. struct yy_buffer_state
  112. {
  113. YY_CHAR *yy_ch_buf; /* input buffer */
  114. YY_CHAR *yy_buf_pos; /* current position in input buffer */
  115. /* Size of input buffer in bytes, not including room for EOB
  116. * characters.
  117. */
  118. yy_size_t yy_buf_size;
  119. /* Number of characters read into yy_ch_buf, not including EOB
  120. * characters.
  121. */
  122. int yy_n_chars;
  123. /* Whether we "own" the buffer - i.e., we know we created it,
  124. * and can realloc() it to grow it, and should free() it to
  125. * delete it.
  126. */
  127. int yy_is_our_buffer;
  128. /* Whether this is an "interactive" input source; if so, and
  129. * if we're using stdio for input, then we want to use getc()
  130. * instead of fread(), to make sure we stop fetching input after
  131. * each newline.
  132. */
  133. int yy_is_interactive;
  134. /* Whether we're considered to be at the beginning of a line.
  135. * If so, '^' rules will be active on the next match, otherwise
  136. * not.
  137. */
  138. int yy_at_bol;
  139. /* Whether to try to fill the input buffer when we reach the
  140. * end of it.
  141. */
  142. int yy_fill_buffer;
  143. int yy_buffer_status;
  144. #define YY_BUFFER_NEW 0
  145. #define YY_BUFFER_NORMAL 1
  146. /* When an EOF's been seen but there's still some text to process
  147. * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  148. * shouldn't try reading from the input source any more. We might
  149. * still have a bunch of tokens to match, though, because of
  150. * possible backing-up.
  151. *
  152. * When we actually see the EOF, we change the status to "new"
  153. * (via yyrestart()), so that the user can continue scanning by
  154. * just pointing yyin at a new input file.
  155. */
  156. #define YY_BUFFER_EOF_PENDING 2
  157. };
  158. /* We provide macros for accessing buffer states in case in the
  159. * future we want to put the buffer states in a more general
  160. * "scanner state".
  161. */
  162. #define YY_CURRENT_BUFFER yy_current_buffer
  163. static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
  164. static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t, yy_size_t ));
  165. static void yy_flex_free YY_PROTO(( void * ));
  166. #define yy_new_buffer yy_create_buffer
  167. #define yy_set_interactive(is_interactive) \
  168. { \
  169. if ( ! yy_current_buffer ) \
  170. yy_current_buffer = yy_create_buffer( YY_BUF_SIZE ); \
  171. yy_current_buffer->yy_is_interactive = is_interactive; \
  172. }
  173. #define yy_set_bol(at_bol) \
  174. { \
  175. if ( ! yy_current_buffer ) \
  176. yy_current_buffer = yy_create_buffer( YY_BUF_SIZE ); \
  177. yy_current_buffer->yy_at_bol = at_bol; \
  178. }
  179. #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
  180. #define yytext_ptr yytext
  181. /* Done after the current pattern has been matched and before the
  182. * corresponding action - sets up yytext.
  183. */
  184. #define YY_DO_BEFORE_ACTION \
  185. yytext_ptr = yy_bp; \
  186. yytext_ptr -= yy_more_len; \
  187. yyleng = (int) (yy_cp - yytext_ptr); \
  188. yy_hold_char = *yy_cp; \
  189. *yy_cp = '\0'; \
  190. yy_c_buf_p = yy_cp;
  191. #define YY_NUM_RULES 172
  192. #define YY_END_OF_BUFFER 173
  193. static yyconst short int yy_accept[804] =
  194. { 0,
  195. 0, 0, 0, 0, 0, 0, 138, 138, 151, 151,
  196. 0, 0, 0, 0, 0, 0, 173, 87, 1, 1,
  197. 20, 172, 172, 172, 18, 2, 3, 172, 24, 28,
  198. 25, 172, 87, 87, 87, 87, 172, 172, 19, 23,
  199. 90, 91, 172, 172, 97, 123, 138, 124, 132, 138,
  200. 133, 130, 134, 135, 125, 138, 138, 138, 136, 131,
  201. 151, 148, 144, 151, 152, 142, 145, 146, 151, 151,
  202. 151, 147, 143, 171, 154, 162, 171, 168, 160, 164,
  203. 165, 169, 171, 171, 171, 171, 166, 163, 161, 121,
  204. 104, 172, 113, 116, 117, 121, 121, 121, 118, 114,
  205. 115, 172, 98, 98, 172, 103, 99, 87, 86, 1,
  206. 1, 1, 29, 0, 81, 75, 0, 7, 0, 0,
  207. 0, 0, 0, 26, 0, 0, 0, 0, 27, 0,
  208. 5, 0, 87, 87, 87, 87, 87, 0, 30, 31,
  209. 0, 0, 0, 0, 0, 0, 0, 0, 0, 90,
  210. 0, 0, 122, 138, 137, 0, 124, 138, 137, 0,
  211. 126, 0, 138, 138, 138, 138, 138, 151, 150, 0,
  212. 148, 151, 150, 0, 149, 0, 151, 151, 151, 151,
  213. 151, 171, 170, 154, 171, 170, 0, 153, 171, 171,
  214. 171, 171, 171, 121, 120, 104, 0, 121, 121, 121,
  215. 0, 0, 102, 101, 98, 98, 0, 100, 0, 0,
  216. 80, 0, 0, 89, 0, 0, 0, 89, 0, 0,
  217. 32, 54, 40, 0, 0, 48, 34, 0, 87, 87,
  218. 87, 87, 14, 15, 0, 0, 0, 0, 47, 55,
  219. 49, 0, 0, 0, 33, 41, 35, 0, 0, 0,
  220. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  221. 0, 0, 126, 138, 138, 138, 138, 128, 138, 149,
  222. 151, 151, 151, 151, 140, 151, 153, 171, 171, 171,
  223. 171, 156, 119, 121, 121, 107, 108, 0, 56, 42,
  224. 74, 6, 0, 88, 0, 50, 36, 52, 38, 4,
  225. 12, 13, 87, 87, 16, 17, 14, 46, 57, 51,
  226. 53, 58, 59, 43, 37, 39, 44, 45, 0, 0,
  227. 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
  228. 0, 0, 0, 138, 127, 129, 151, 139, 141, 155,
  229. 171, 171, 159, 105, 106, 121, 0, 0, 88, 12,
  230. 87, 21, 22, 16, 0, 0, 0, 0, 0, 0,
  231. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  232. 171, 157, 158, 109, 110, 0, 87, 21, 0, 0,
  233. 0, 0, 0, 0, 64, 65, 0, 0, 0, 0,
  234. 0, 0, 92, 0, 0, 0, 0, 0, 171, 111,
  235. 112, 87, 0, 10, 0, 0, 0, 0, 0, 0,
  236. 0, 0, 0, 0, 0, 0, 0, 171, 87, 0,
  237. 0, 67, 0, 0, 0, 0, 0, 0, 0, 0,
  238. 0, 0, 0, 0, 95, 0, 0, 171, 11, 0,
  239. 63, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  240. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  241. 96, 94, 93, 167, 11, 0, 0, 0, 0, 0,
  242. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  243. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  244. 0, 0, 0, 0, 70, 0, 0, 0, 0, 0,
  245. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  246. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  247. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  248. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  249. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  250. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  251. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  252. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  253. 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
  254. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  255. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  256. 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
  257. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  258. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  259. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  260. 0, 0, 0, 0, 72, 0, 0, 0, 0, 0,
  261. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  262. 0, 0, 0, 72, 0, 0, 72, 0, 0, 0,
  263. 0, 0, 0, 0, 0, 72, 0, 0, 0, 0,
  264. 0, 0, 66, 0, 0, 0, 0, 0, 0, 0,
  265. 0, 0, 0, 79, 71, 0, 0, 0, 0, 0,
  266. 72, 0, 0, 0, 73, 0, 0, 0, 0, 0,
  267. 0, 0, 0, 0, 0, 0, 0, 0, 79, 78,
  268. 71, 0, 72, 0, 0, 73, 0, 72, 73, 0,
  269. 0, 0, 0, 0, 0, 0, 77, 0, 78, 71,
  270. 72, 71, 73, 0, 0, 0, 0, 0, 0, 0,
  271. 0, 76, 77, 0, 0, 0, 61, 0, 0, 0,
  272. 85, 0, 0, 76, 0, 0, 61, 0, 0, 85,
  273. 84, 0, 0, 0, 60, 0, 0, 83, 0, 84,
  274. 0, 0, 0, 60, 82, 83, 0, 0, 68, 82,
  275. 0, 69, 0
  276. } ;
  277. static yyconst int yy_ec[256] =
  278. { 0,
  279. 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
  280. 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
  281. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  282. 1, 3, 4, 5, 6, 7, 1, 8, 1, 9,
  283. 10, 11, 12, 13, 1, 14, 15, 16, 17, 18,
  284. 18, 18, 18, 18, 18, 18, 18, 1, 19, 20,
  285. 21, 22, 12, 23, 24, 1, 25, 26, 27, 28,
  286. 29, 30, 31, 1, 32, 33, 34, 35, 36, 37,
  287. 1, 38, 39, 40, 41, 42, 43, 44, 1, 1,
  288. 45, 1, 12, 46, 1, 1, 47, 1, 48, 49,
  289. 50, 51, 29, 30, 52, 1, 32, 53, 34, 54,
  290. 36, 55, 1, 56, 57, 58, 59, 42, 43, 60,
  291. 1, 1, 61, 62, 63, 64, 1, 1, 1, 1,
  292. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  293. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  294. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  295. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  296. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  297. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  298. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  299. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  300. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  301. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  302. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  303. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  304. 1, 1, 1, 1, 1
  305. } ;
  306. static yyconst int yy_meta[65] =
  307. { 0,
  308. 1, 1, 2, 3, 4, 5, 5, 6, 7, 8,
  309. 1, 1, 1, 1, 1, 1, 1, 1, 9, 3,
  310. 10, 3, 5, 1, 1, 1, 1, 1, 1, 1,
  311. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  312. 1, 1, 1, 1, 1, 3, 1, 1, 1, 1,
  313. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  314. 11, 12, 13, 6
  315. } ;
  316. static yyconst short int yy_base[854] =
  317. { 0,
  318. 0, 63, 30, 42, 2468, 2467, 125, 187, 249, 311,
  319. 373, 435, 497, 559, 134, 149, 2477, 2473, 10, 12,
  320. 2454, 2469, 2468, 2467, 2480, 13, 2480, 2480, 31, 14,
  321. 35, 2466, 24, 27, 177, 38, 33, 609, 2480, 2480,
  322. 26, 2480, 2418, 2415, 2480, 2457, 34, 2464, 2480, 663,
  323. 2480, 2480, 2480, 2480, 2480, 103, 46, 120, 2480, 219,
  324. 54, 2463, 2480, 725, 2480, 2480, 2480, 2480, 115, 104,
  325. 164, 2480, 277, 2462, 2461, 2480, 787, 2480, 2480, 2480,
  326. 2480, 2480, 170, 39, 211, 118, 2480, 2480, 2480, 2460,
  327. 2459, 0, 2480, 2480, 2480, 181, 92, 161, 4, 2480,
  328. 2480, 21, 260, 48, 2456, 2480, 2480, 2457, 2480, 100,
  329. 110, 112, 97, 2454, 2447, 2452, 0, 2451, 0, 2436,
  330. 241, 288, 117, 152, 2397, 172, 168, 175, 197, 218,
  331. 2448, 0, 242, 271, 138, 236, 216, 237, 323, 346,
  332. 299, 2416, 66, 156, 251, 299, 254, 273, 282, 234,
  333. 2394, 2398, 2480, 289, 2480, 401, 2446, 849, 2443, 2135,
  334. 299, 456, 423, 302, 327, 345, 353, 356, 2480, 464,
  335. 2111, 911, 2096, 2057, 360, 525, 477, 450, 367, 368,
  336. 385, 2053, 2480, 2052, 973, 2049, 2047, 2031, 336, 349,
  337. 401, 483, 2030, 2029, 2480, 2028, 2024, 402, 507, 263,
  338. 373, 193, 2480, 2480, 414, 384, 2007, 2480, 447, 344,
  339. 2480, 2004, 2003, 2480, 537, 387, 2002, 2001, 449, 431,
  340. 2480, 2480, 2480, 476, 437, 2480, 2480, 1999, 484, 508,
  341. 515, 488, 1984, 2480, 511, 1939, 569, 1963, 1962, 2480,
  342. 1961, 493, 581, 1960, 1958, 2480, 1954, 508, 465, 525,
  343. 493, 502, 547, 542, 551, 544, 1937, 1940, 551, 556,
  344. 1908, 1907, 2480, 0, 1913, 451, 577, 2480, 613, 2480,
  345. 0, 1912, 614, 615, 2480, 616, 2480, 1954, 590, 602,
  346. 1946, 2480, 2480, 575, 623, 2480, 2480, 585, 2480, 2480,
  347. 2480, 2480, 609, 2480, 622, 2480, 2480, 2480, 2480, 2480,
  348. 1944, 2480, 607, 589, 1940, 2480, 1937, 2480, 2480, 2480,
  349. 2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 608, 1903,
  350. 608, 573, 632, 647, 597, 656, 644, 660, 648, 2480,
  351. 1907, 686, 687, 0, 2480, 2480, 0, 2480, 2480, 2480,
  352. 689, 639, 2480, 2480, 2480, 688, 655, 693, 2480, 1931,
  353. 691, 1927, 2480, 1924, 668, 661, 661, 689, 662, 667,
  354. 701, 682, 1923, 694, 1874, 1879, 737, 739, 738, 774,
  355. 748, 2480, 2480, 2480, 2480, 712, 747, 1903, 708, 1841,
  356. 1770, 717, 725, 729, 2480, 2480, 733, 767, 1742, 725,
  357. 726, 802, 798, 836, 1772, 756, 777, 1765, 771, 2480,
  358. 2480, 821, 788, 2480, 785, 1737, 725, 786, 1736, 816,
  359. 825, 1791, 1790, 818, 808, 808, 829, 835, 1789, 836,
  360. 1727, 2480, 840, 818, 829, 1755, 775, 878, 894, 1773,
  361. 1035, 844, 863, 851, 2480, 849, 875, 1784, 1783, 875,
  362. 2480, 1721, 1780, 874, 923, 924, 1767, 882, 900, 1766,
  363. 938, 941, 905, 640, 1096, 866, 927, 944, 913, 918,
  364. 2480, 2480, 2480, 2480, 1776, 1715, 946, 167, 893, 947,
  365. 965, 950, 933, 908, 966, 948, 955, 1762, 1771, 961,
  366. 985, 1007, 1010, 964, 968, 989, 1157, 994, 998, 1025,
  367. 1760, 1218, 985, 471, 2480, 1006, 1028, 1049, 1758, 971,
  368. 1015, 1757, 1766, 1021, 1037, 1740, 1037, 1059, 1016, 1019,
  369. 1024, 1754, 1068, 1074, 1085, 1050, 1078, 1279, 1110, 1114,
  370. 1062, 1117, 1079, 1340, 1739, 1067, 1088, 1124, 1076, 1101,
  371. 1122, 1735, 1075, 1127, 1128, 1135, 1136, 1137, 1093, 1103,
  372. 1127, 1142, 1751, 237, 1139, 1702, 1097, 1759, 1734, 1154,
  373. 1142, 1182, 1145, 1747, 1185, 1151, 1211, 1188, 1746, 1205,
  374. 1187, 1196, 1232, 1167, 1239, 1235, 1195, 1248, 1726, 1206,
  375. 1237, 1744, 1753, 1241, 1234, 1196, 1725, 1724, 1199, 1265,
  376. 1222, 1689, 2480, 1745, 1190, 1221, 1719, 1233, 1306, 1249,
  377. 1307, 1310, 1261, 1303, 1309, 1317, 1215, 1320, 1327, 1641,
  378. 1334, 1289, 1304, 1307, 1258, 1652, 1324, 1317, 1630, 1290,
  379. 1632, 1363, 1335, 1202, 2480, 1316, 1336, 1571, 1364, 1348,
  380. 1195, 1388, 1356, 1394, 1385, 1402, 1462, 1397, 1409, 1367,
  381. 1406, 1364, 1410, 1416, 1378, 1390, 1415, 1396, 1399, 1404,
  382. 1389, 1434, 1410, 1420, 1417, 1416, 1263, 1425, 1435, 1469,
  383. 1418, 1473, 1452, 1477, 2480, 1486, 1433, 1437, 1496, 1381,
  384. 1487, 1470, 1497, 1502, 1457, 1437, 1487, 1468, 1506, 1471,
  385. 1494, 1516, 1268, 2480, 1264, 1480, 1313, 1492, 1507, 1547,
  386. 1495, 1550, 1510, 1556, 1529, 1517, 1213, 1541, 1238, 1559,
  387. 1275, 1577, 2480, 1553, 1522, 1536, 1524, 1554, 1584, 1593,
  388. 1557, 1553, 1563, 1154, 2480, 1090, 1555, 1566, 1616, 1570,
  389. 1620, 1583, 1628, 1624, 2480, 1631, 1594, 1621, 1633, 1592,
  390. 1601, 1630, 1598, 1649, 1072, 1022, 998, 1614, 1204, 2480,
  391. 2480, 986, 1027, 1650, 873, 918, 1656, 1641, 1644, 1653,
  392. 1641, 1625, 1664, 1639, 747, 722, 757, 702, 756, 2480,
  393. 1668, 2480, 1695, 1704, 1711, 1655, 1682, 1670, 654, 596,
  394. 556, 2480, 593, 516, 1717, 1658, 2480, 1683, 1682, 1690,
  395. 517, 466, 411, 2480, 1722, 1728, 427, 339, 1693, 1729,
  396. 2480, 305, 248, 1732, 2480, 294, 1733, 170, 63, 92,
  397. 34, 1734, 1735, 2480, 2480, 8, 1740, 1741, 2480, 2480,
  398. 1744, 2480, 2480, 1807, 1820, 1833, 1846, 1859, 1872, 1885,
  399. 1898, 1911, 1924, 1937, 1950, 1963, 1976, 1988, 2001, 2013,
  400. 2026, 2035, 2048, 2058, 2071, 2084, 2097, 2110, 2123, 2136,
  401. 2149, 2162, 2175, 2188, 2201, 2214, 2227, 2240, 2253, 2266,
  402. 2279, 2292, 2305, 2318, 2331, 2344, 2357, 2369, 2382, 2395,
  403. 2408, 2421, 2434
  404. } ;
  405. static yyconst short int yy_def[854] =
  406. { 0,
  407. 804, 804, 805, 805, 805, 805, 806, 806, 807, 807,
  408. 808, 808, 809, 809, 810, 810, 803, 811, 811, 803,
  409. 803, 812, 813, 814, 803, 815, 803, 803, 803, 803,
  410. 803, 816, 811, 811, 811, 811, 803, 803, 803, 803,
  411. 803, 803, 803, 803, 803, 803, 817, 803, 803, 818,
  412. 803, 803, 803, 803, 803, 817, 817, 817, 803, 803,
  413. 819, 803, 803, 820, 803, 803, 803, 803, 819, 819,
  414. 819, 803, 803, 821, 803, 803, 822, 803, 803, 803,
  415. 803, 803, 821, 821, 821, 821, 803, 803, 803, 823,
  416. 803, 824, 803, 803, 803, 823, 823, 823, 803, 803,
  417. 803, 825, 825, 803, 826, 803, 803, 811, 803, 811,
  418. 803, 803, 803, 812, 803, 813, 827, 814, 828, 815,
  419. 815, 829, 803, 803, 803, 803, 803, 803, 803, 803,
  420. 816, 830, 811, 811, 811, 811, 811, 803, 803, 803,
  421. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  422. 803, 803, 803, 817, 803, 803, 803, 818, 831, 831,
  423. 817, 831, 817, 817, 817, 817, 817, 819, 803, 803,
  424. 803, 820, 832, 832, 819, 832, 819, 819, 819, 819,
  425. 819, 821, 803, 803, 822, 833, 833, 821, 821, 821,
  426. 821, 821, 821, 823, 803, 803, 824, 823, 823, 823,
  427. 803, 825, 803, 803, 825, 803, 826, 803, 803, 803,
  428. 803, 827, 828, 803, 829, 815, 834, 834, 803, 803,
  429. 803, 803, 803, 803, 803, 803, 803, 830, 811, 811,
  430. 811, 811, 803, 803, 803, 803, 803, 803, 803, 803,
  431. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  432. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  433. 803, 803, 803, 158, 158, 817, 817, 803, 817, 803,
  434. 172, 172, 819, 819, 803, 819, 803, 821, 821, 821,
  435. 821, 803, 803, 823, 823, 803, 803, 803, 803, 803,
  436. 803, 803, 815, 803, 803, 803, 803, 803, 803, 803,
  437. 803, 803, 811, 811, 803, 803, 803, 803, 803, 803,
  438. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  439. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  440. 803, 803, 803, 158, 803, 803, 172, 803, 803, 803,
  441. 821, 821, 803, 803, 803, 823, 803, 803, 803, 803,
  442. 811, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  443. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  444. 821, 803, 803, 803, 803, 803, 811, 803, 803, 803,
  445. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  446. 803, 803, 803, 803, 803, 803, 803, 803, 821, 803,
  447. 803, 811, 803, 803, 803, 803, 803, 803, 803, 803,
  448. 835, 803, 803, 803, 803, 803, 803, 821, 811, 803,
  449. 803, 803, 803, 803, 836, 803, 835, 835, 837, 803,
  450. 835, 803, 803, 803, 803, 803, 803, 821, 803, 803,
  451. 803, 803, 803, 836, 836, 838, 803, 803, 835, 803,
  452. 837, 837, 835, 839, 837, 803, 840, 841, 803, 803,
  453. 803, 803, 803, 803, 803, 803, 842, 803, 836, 838,
  454. 838, 836, 843, 803, 803, 803, 835, 803, 839, 803,
  455. 839, 844, 845, 803, 840, 840, 840, 841, 841, 841,
  456. 803, 841, 803, 803, 803, 842, 842, 846, 803, 803,
  457. 836, 803, 843, 803, 843, 803, 803, 847, 803, 803,
  458. 803, 803, 839, 844, 844, 840, 839, 844, 845, 845,
  459. 841, 845, 839, 845, 803, 840, 841, 841, 803, 841,
  460. 841, 803, 803, 842, 846, 846, 842, 848, 803, 803,
  461. 803, 803, 803, 843, 803, 849, 847, 850, 803, 803,
  462. 803, 839, 840, 803, 839, 844, 845, 841, 803, 845,
  463. 839, 845, 845, 803, 841, 841, 803, 841, 803, 803,
  464. 842, 803, 848, 803, 848, 803, 803, 803, 803, 843,
  465. 803, 849, 803, 850, 803, 803, 803, 803, 839, 803,
  466. 839, 845, 803, 845, 839, 845, 803, 841, 841, 803,
  467. 841, 803, 803, 803, 803, 803, 848, 803, 803, 803,
  468. 803, 843, 803, 803, 803, 803, 803, 803, 839, 803,
  469. 839, 845, 803, 845, 839, 845, 803, 841, 841, 803,
  470. 841, 803, 803, 803, 803, 803, 848, 803, 803, 803,
  471. 803, 843, 803, 803, 803, 803, 839, 803, 839, 845,
  472. 803, 845, 839, 845, 803, 841, 841, 803, 841, 803,
  473. 803, 803, 803, 803, 803, 803, 848, 803, 803, 803,
  474. 803, 843, 803, 803, 803, 803, 839, 803, 839, 845,
  475. 803, 845, 839, 845, 841, 841, 803, 841, 803, 803,
  476. 803, 803, 803, 803, 803, 803, 848, 803, 803, 803,
  477. 803, 803, 843, 803, 803, 803, 803, 839, 845, 803,
  478. 845, 839, 845, 841, 803, 841, 803, 803, 803, 803,
  479. 803, 848, 803, 803, 803, 803, 803, 803, 843, 803,
  480. 803, 803, 839, 845, 803, 839, 845, 841, 841, 803,
  481. 803, 803, 848, 803, 803, 803, 803, 803, 843, 803,
  482. 845, 803, 845, 803, 851, 803, 803, 848, 803, 803,
  483. 803, 803, 803, 851, 851, 852, 803, 803, 803, 848,
  484. 803, 803, 803, 803, 852, 851, 853, 803, 803, 848,
  485. 803, 803, 803, 851, 803, 853, 803, 803, 803, 848,
  486. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  487. 803, 803, 0, 803, 803, 803, 803, 803, 803, 803,
  488. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  489. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  490. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  491. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  492. 803, 803, 803
  493. } ;
  494. static yyconst short int yy_nxt[2545] =
  495. { 0,
  496. 803, 19, 20, 21, 22, 23, 24, 25, 26, 27,
  497. 28, 110, 111, 112, 112, 121, 126, 122, 800, 29,
  498. 30, 31, 32, 33, 34, 803, 109, 150, 150, 109,
  499. 203, 41, 41, 123, 35, 36, 155, 128, 201, 204,
  500. 109, 183, 42, 41, 41, 37, 33, 34, 155, 206,
  501. 206, 124, 138, 35, 42, 129, 169, 201, 133, 127,
  502. 38, 39, 134, 40, 19, 20, 21, 22, 23, 24,
  503. 25, 26, 27, 28, 190, 137, 125, 133, 43, 139,
  504. 130, 164, 29, 30, 31, 32, 33, 34, 44, 140,
  505. 43, 797, 45, 137, 195, 156, 574, 35, 36, 209,
  506. 44, 110, 111, 253, 45, 155, 169, 156, 37, 33,
  507. 34, 112, 112, 112, 112, 170, 35, 169, 199, 123,
  508. 183, 253, 155, 38, 39, 796, 40, 48, 49, 50,
  509. 51, 51, 52, 53, 54, 103, 104, 163, 105, 178,
  510. 109, 199, 210, 106, 51, 55, 51, 51, 56, 177,
  511. 103, 104, 107, 105, 219, 193, 163, 165, 106, 57,
  512. 58, 231, 125, 195, 156, 170, 169, 107, 177, 468,
  513. 51, 56, 183, 193, 126, 165, 170, 128, 57, 109,
  514. 795, 156, 254, 195, 231, 59, 60, 28, 28, 48,
  515. 49, 50, 51, 51, 52, 53, 54, 220, 200, 224,
  516. 500, 179, 203, 135, 189, 254, 51, 55, 51, 51,
  517. 56, 204, 136, 183, 222, 198, 200, 127, 233, 179,
  518. 130, 57, 58, 189, 223, 170, 135, 166, 166, 166,
  519. 166, 166, 51, 56, 198, 150, 150, 191, 109, 235,
  520. 57, 504, 225, 121, 109, 122, 192, 59, 60, 28,
  521. 28, 62, 63, 64, 65, 65, 66, 67, 68, 214,
  522. 191, 205, 205, 167, 226, 286, 580, 229, 65, 203,
  523. 65, 65, 69, 109, 227, 232, 234, 255, 204, 166,
  524. 258, 166, 236, 70, 71, 180, 180, 180, 180, 180,
  525. 229, 155, 216, 232, 65, 69, 217, 217, 787, 259,
  526. 255, 155, 70, 258, 155, 230, 218, 792, 260, 72,
  527. 73, 28, 28, 62, 63, 64, 65, 65, 66, 67,
  528. 68, 181, 259, 287, 230, 237, 238, 249, 256, 268,
  529. 65, 260, 65, 65, 69, 250, 257, 180, 183, 180,
  530. 251, 267, 239, 240, 241, 70, 71, 155, 243, 244,
  531. 156, 183, 791, 250, 257, 155, 65, 69, 169, 267,
  532. 156, 278, 169, 156, 70, 245, 246, 247, 242, 275,
  533. 169, 72, 73, 28, 28, 75, 76, 77, 78, 78,
  534. 79, 80, 81, 279, 278, 206, 206, 169, 156, 293,
  535. 289, 248, 78, 82, 78, 78, 83, 84, 269, 288,
  536. 290, 788, 279, 183, 195, 294, 156, 85, 86, 166,
  537. 166, 166, 166, 166, 156, 205, 205, 170, 78, 83,
  538. 84, 170, 288, 203, 280, 155, 85, 284, 170, 170,
  539. 276, 787, 204, 87, 88, 28, 89, 75, 76, 77,
  540. 78, 78, 79, 80, 81, 167, 170, 280, 266, 209,
  541. 284, 219, 169, 335, 78, 82, 78, 78, 83, 84,
  542. 263, 166, 783, 166, 264, 264, 264, 264, 264, 85,
  543. 86, 266, 180, 180, 180, 180, 180, 296, 224, 169,
  544. 78, 83, 84, 298, 156, 183, 301, 297, 85, 274,
  545. 305, 319, 210, 299, 220, 87, 88, 28, 89, 91,
  546. 265, 92, 273, 533, 93, 94, 95, 274, 181, 195,
  547. 109, 170, 156, 235, 319, 782, 264, 109, 264, 321,
  548. 96, 225, 281, 533, 180, 273, 180, 781, 322, 270,
  549. 285, 97, 98, 271, 271, 271, 271, 271, 170, 312,
  550. 281, 216, 321, 96, 302, 217, 217, 303, 306, 313,
  551. 97, 322, 304, 285, 317, 218, 236, 99, 100, 28,
  552. 101, 91, 320, 92, 318, 303, 93, 94, 95, 272,
  553. 304, 237, 238, 323, 325, 329, 324, 344, 767, 336,
  554. 320, 326, 96, 243, 244, 271, 331, 271, 239, 240,
  555. 241, 352, 183, 97, 98, 324, 323, 325, 329, 326,
  556. 245, 246, 247, 774, 183, 96, 773, 331, 347, 109,
  557. 358, 293, 97, 330, 242, 155, 338, 339, 169, 99,
  558. 100, 28, 101, 141, 348, 195, 248, 294, 358, 341,
  559. 351, 347, 357, 142, 361, 345, 143, 144, 156, 342,
  560. 349, 372, 355, 145, 480, 146, 147, 341, 772, 353,
  561. 148, 149, 361, 351, 481, 357, 142, 342, 359, 143,
  562. 346, 355, 145, 146, 147, 159, 160, 161, 160, 160,
  563. 160, 160, 160, 360, 156, 170, 170, 170, 346, 362,
  564. 363, 359, 160, 160, 160, 160, 364, 365, 367, 369,
  565. 374, 183, 376, 109, 379, 348, 360, 380, 363, 373,
  566. 381, 383, 362, 385, 384, 365, 368, 370, 160, 364,
  567. 376, 349, 371, 382, 400, 380, 771, 379, 381, 383,
  568. 387, 377, 384, 160, 162, 160, 160, 173, 174, 175,
  569. 174, 174, 174, 174, 174, 371, 382, 389, 387, 367,
  570. 369, 392, 377, 406, 174, 403, 174, 174, 375, 109,
  571. 183, 407, 408, 389, 393, 393, 393, 368, 370, 409,
  572. 504, 386, 412, 403, 763, 413, 406, 762, 423, 388,
  573. 174, 761, 401, 183, 407, 408, 394, 449, 399, 415,
  574. 412, 402, 409, 413, 423, 174, 176, 174, 174, 186,
  575. 187, 188, 187, 187, 187, 187, 187, 760, 395, 399,
  576. 402, 410, 415, 416, 392, 418, 187, 187, 187, 187,
  577. 396, 420, 397, 393, 393, 393, 398, 393, 393, 393,
  578. 410, 395, 421, 109, 418, 424, 416, 428, 396, 429,
  579. 397, 445, 187, 446, 420, 450, 431, 183, 394, 426,
  580. 421, 434, 436, 424, 443, 435, 432, 187, 187, 187,
  581. 187, 159, 160, 161, 160, 160, 160, 160, 160, 419,
  582. 395, 436, 426, 435, 434, 433, 437, 443, 160, 160,
  583. 160, 160, 396, 438, 397, 440, 469, 419, 398, 442,
  584. 428, 459, 429, 395, 437, 430, 431, 461, 462, 447,
  585. 396, 438, 397, 440, 160, 469, 452, 442, 453, 459,
  586. 463, 466, 449, 484, 460, 461, 462, 477, 475, 160,
  587. 162, 160, 160, 173, 174, 175, 174, 174, 174, 174,
  588. 174, 484, 480, 463, 466, 445, 471, 446, 472, 486,
  589. 174, 475, 174, 174, 447, 752, 493, 504, 430, 431,
  590. 452, 494, 453, 452, 506, 453, 489, 505, 497, 471,
  591. 498, 472, 501, 447, 454, 455, 174, 477, 490, 493,
  592. 450, 431, 506, 511, 494, 478, 431, 471, 507, 472,
  593. 486, 174, 176, 174, 174, 186, 187, 188, 187, 187,
  594. 187, 187, 187, 447, 473, 509, 508, 430, 487, 480,
  595. 525, 486, 187, 187, 187, 187, 489, 540, 454, 455,
  596. 489, 454, 455, 509, 491, 492, 499, 473, 534, 515,
  597. 502, 516, 520, 525, 521, 478, 431, 501, 187, 532,
  598. 540, 512, 513, 542, 522, 473, 511, 489, 430, 487,
  599. 497, 480, 498, 187, 187, 187, 187, 449, 532, 507,
  600. 513, 504, 549, 457, 457, 457, 457, 457, 750, 430,
  601. 487, 536, 553, 537, 491, 492, 550, 508, 491, 492,
  602. 747, 547, 528, 548, 558, 549, 499, 517, 518, 486,
  603. 523, 524, 480, 544, 550, 502, 515, 746, 516, 457,
  604. 528, 543, 480, 480, 512, 491, 492, 515, 499, 516,
  605. 489, 544, 555, 561, 552, 458, 431, 457, 452, 547,
  606. 453, 548, 565, 489, 482, 482, 482, 482, 482, 538,
  607. 554, 487, 520, 567, 521, 570, 520, 552, 521, 520,
  608. 576, 521, 559, 492, 489, 745, 489, 430, 487, 534,
  609. 536, 567, 537, 570, 517, 518, 568, 536, 571, 537,
  610. 482, 574, 577, 576, 542, 517, 518, 553, 491, 492,
  611. 566, 575, 731, 515, 560, 516, 483, 455, 482, 486,
  612. 577, 491, 492, 578, 730, 526, 526, 526, 526, 526,
  613. 523, 524, 560, 566, 523, 524, 581, 523, 524, 588,
  614. 587, 578, 491, 492, 491, 492, 480, 499, 538, 480,
  615. 558, 480, 614, 597, 581, 538, 572, 588, 520, 480,
  616. 521, 526, 543, 587, 614, 554, 487, 520, 504, 521,
  617. 589, 517, 518, 520, 749, 521, 597, 527, 487, 526,
  618. 489, 600, 591, 649, 595, 592, 530, 530, 530, 530,
  619. 530, 594, 603, 608, 520, 611, 521, 489, 574, 571,
  620. 591, 489, 595, 605, 600, 613, 596, 616, 559, 492,
  621. 489, 608, 615, 611, 594, 603, 523, 524, 627, 618,
  622. 605, 607, 530, 599, 615, 523, 524, 480, 613, 504,
  623. 616, 523, 524, 717, 627, 715, 598, 691, 531, 492,
  624. 530, 515, 618, 516, 607, 601, 620, 556, 556, 556,
  625. 556, 556, 523, 524, 598, 491, 492, 572, 623, 491,
  626. 492, 606, 612, 601, 620, 520, 633, 521, 491, 492,
  627. 480, 480, 520, 480, 521, 632, 623, 480, 606, 520,
  628. 612, 521, 489, 556, 634, 677, 705, 640, 574, 489,
  629. 704, 624, 619, 621, 635, 625, 489, 693, 632, 557,
  630. 518, 556, 520, 638, 521, 640, 628, 622, 562, 562,
  631. 562, 562, 562, 629, 626, 619, 621, 635, 625, 644,
  632. 631, 637, 645, 523, 524, 622, 638, 504, 480, 628,
  633. 523, 524, 626, 643, 648, 644, 629, 523, 524, 637,
  634. 491, 492, 651, 631, 562, 645, 642, 491, 492, 480,
  635. 520, 643, 521, 658, 491, 492, 520, 648, 521, 489,
  636. 563, 524, 562, 660, 520, 651, 521, 647, 489, 642,
  637. 689, 489, 633, 653, 650, 665, 658, 666, 661, 574,
  638. 652, 660, 668, 647, 669, 656, 671, 670, 654, 662,
  639. 634, 663, 664, 665, 659, 489, 673, 650, 504, 480,
  640. 666, 667, 676, 652, 671, 668, 681, 669, 523, 524,
  641. 670, 654, 657, 678, 523, 524, 480, 491, 492, 673,
  642. 675, 679, 523, 524, 667, 676, 491, 492, 657, 491,
  643. 492, 520, 672, 521, 696, 520, 675, 521, 683, 520,
  644. 687, 521, 674, 695, 679, 690, 690, 690, 489, 661,
  645. 672, 574, 696, 491, 492, 686, 687, 680, 489, 691,
  646. 662, 683, 663, 664, 691, 684, 695, 698, 699, 701,
  647. 692, 480, 685, 697, 480, 694, 682, 702, 707, 489,
  648. 504, 710, 688, 706, 655, 698, 700, 701, 574, 523,
  649. 524, 489, 682, 523, 524, 685, 697, 523, 524, 706,
  650. 702, 707, 703, 489, 710, 688, 491, 492, 720, 520,
  651. 708, 521, 520, 712, 521, 691, 491, 492, 520, 693,
  652. 521, 691, 721, 722, 693, 703, 708, 504, 719, 712,
  653. 480, 720, 714, 709, 690, 690, 690, 491, 492, 691,
  654. 723, 722, 713, 727, 716, 721, 699, 480, 714, 491,
  655. 492, 728, 718, 718, 718, 724, 709, 724, 732, 646,
  656. 716, 491, 492, 723, 700, 713, 727, 523, 524, 728,
  657. 523, 524, 711, 735, 732, 693, 523, 524, 520, 740,
  658. 521, 693, 520, 691, 521, 729, 489, 742, 733, 735,
  659. 520, 741, 521, 489, 574, 691, 718, 718, 718, 693,
  660. 748, 744, 740, 489, 725, 736, 489, 726, 719, 741,
  661. 742, 724, 520, 724, 521, 754, 743, 744, 520, 734,
  662. 521, 641, 776, 748, 757, 639, 636, 756, 574, 630,
  663. 520, 737, 521, 755, 574, 734, 523, 524, 759, 743,
  664. 523, 524, 757, 693, 491, 492, 738, 737, 523, 524,
  665. 756, 491, 492, 739, 574, 693, 759, 520, 768, 521,
  666. 725, 491, 492, 726, 491, 492, 754, 758, 769, 770,
  667. 523, 524, 751, 765, 768, 766, 523, 524, 753, 765,
  668. 777, 766, 778, 758, 755, 779, 776, 770, 523, 524,
  669. 784, 769, 789, 574, 784, 793, 798, 793, 798, 790,
  670. 778, 779, 801, 798, 801, 798, 801, 617, 801, 585,
  671. 789, 583, 780, 610, 609, 523, 524, 574, 604, 602,
  672. 593, 590, 586, 585, 583, 579, 569, 564, 551, 545,
  673. 504, 541, 539, 767, 529, 480, 510, 495, 465, 767,
  674. 476, 474, 468, 467, 777, 465, 464, 456, 448, 441,
  675. 785, 439, 433, 432, 785, 794, 799, 794, 425, 422,
  676. 417, 414, 802, 799, 411, 405, 802, 18, 18, 18,
  677. 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
  678. 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
  679. 28, 28, 28, 47, 47, 47, 47, 47, 47, 47,
  680. 47, 47, 47, 47, 47, 47, 61, 61, 61, 61,
  681. 61, 61, 61, 61, 61, 61, 61, 61, 61, 74,
  682. 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
  683. 74, 74, 90, 90, 90, 90, 90, 90, 90, 90,
  684. 90, 90, 90, 90, 90, 102, 102, 102, 102, 102,
  685. 102, 102, 102, 102, 102, 102, 102, 102, 108, 108,
  686. 108, 108, 108, 404, 108, 378, 108, 108, 391, 390,
  687. 108, 114, 114, 114, 114, 114, 114, 114, 114, 114,
  688. 114, 114, 114, 114, 116, 388, 354, 116, 116, 378,
  689. 116, 116, 116, 350, 116, 366, 116, 118, 356, 307,
  690. 118, 118, 354, 118, 118, 118, 350, 118, 343, 118,
  691. 120, 120, 120, 120, 120, 120, 340, 337, 334, 120,
  692. 120, 120, 120, 131, 333, 332, 131, 131, 328, 131,
  693. 131, 131, 327, 131, 316, 131, 154, 154, 315, 154,
  694. 314, 311, 310, 309, 154, 308, 307, 154, 158, 158,
  695. 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  696. 158, 168, 168, 300, 168, 295, 295, 292, 291, 168,
  697. 168, 208, 168, 172, 172, 172, 172, 172, 172, 172,
  698. 172, 172, 172, 172, 172, 172, 182, 182, 283, 182,
  699. 196, 195, 282, 183, 182, 185, 185, 185, 185, 185,
  700. 185, 185, 185, 185, 185, 185, 185, 185, 194, 194,
  701. 194, 277, 194, 277, 184, 183, 194, 194, 197, 197,
  702. 197, 270, 197, 197, 197, 197, 197, 197, 197, 197,
  703. 197, 202, 202, 202, 202, 202, 202, 202, 202, 202,
  704. 202, 202, 202, 202, 207, 207, 207, 207, 207, 207,
  705. 207, 207, 207, 207, 207, 207, 207, 212, 212, 212,
  706. 270, 212, 212, 212, 212, 212, 212, 212, 212, 212,
  707. 213, 213, 213, 171, 213, 213, 213, 213, 213, 213,
  708. 213, 213, 213, 215, 215, 215, 215, 215, 215, 215,
  709. 215, 215, 215, 215, 215, 215, 228, 228, 228, 263,
  710. 228, 228, 228, 228, 228, 228, 228, 228, 228, 160,
  711. 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
  712. 160, 160, 174, 174, 174, 174, 174, 174, 174, 174,
  713. 174, 174, 174, 174, 174, 187, 187, 187, 187, 187,
  714. 187, 187, 187, 187, 187, 187, 187, 187, 217, 217,
  715. 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,
  716. 217, 427, 427, 427, 427, 427, 427, 427, 427, 427,
  717. 427, 427, 427, 427, 444, 444, 444, 444, 444, 444,
  718. 444, 444, 444, 444, 444, 444, 444, 451, 451, 451,
  719. 451, 451, 451, 451, 451, 451, 451, 451, 451, 451,
  720. 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
  721. 470, 470, 470, 479, 479, 479, 479, 479, 479, 479,
  722. 479, 479, 479, 479, 479, 479, 485, 485, 485, 485,
  723. 485, 485, 485, 485, 485, 485, 485, 485, 485, 488,
  724. 488, 488, 488, 488, 488, 488, 488, 488, 488, 488,
  725. 488, 488, 496, 496, 496, 496, 496, 496, 496, 496,
  726. 496, 496, 496, 496, 496, 503, 503, 503, 503, 503,
  727. 503, 503, 503, 503, 503, 503, 503, 503, 514, 514,
  728. 514, 514, 514, 514, 514, 514, 514, 514, 514, 514,
  729. 514, 519, 519, 519, 519, 519, 519, 519, 519, 519,
  730. 519, 519, 519, 519, 535, 535, 535, 535, 535, 535,
  731. 535, 535, 535, 535, 535, 535, 535, 546, 546, 546,
  732. 546, 546, 546, 546, 546, 546, 546, 546, 546, 573,
  733. 573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
  734. 573, 573, 582, 582, 582, 582, 582, 582, 582, 582,
  735. 582, 582, 582, 582, 582, 584, 584, 584, 584, 584,
  736. 584, 584, 584, 584, 584, 584, 584, 584, 764, 764,
  737. 764, 764, 764, 764, 764, 764, 764, 764, 764, 764,
  738. 764, 775, 775, 775, 775, 775, 775, 775, 775, 775,
  739. 775, 775, 775, 775, 786, 786, 786, 786, 786, 786,
  740. 786, 786, 786, 786, 786, 786, 786, 263, 157, 262,
  741. 261, 252, 803, 221, 214, 803, 803, 211, 115, 109,
  742. 208, 196, 195, 184, 183, 171, 157, 153, 152, 151,
  743. 132, 119, 117, 115, 113, 109, 803, 46, 46, 17,
  744. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  745. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  746. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  747. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  748. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  749. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  750. 803, 803, 803, 803
  751. } ;
  752. static yyconst short int yy_chk[2545] =
  753. { 0,
  754. 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  755. 1, 19, 19, 20, 20, 26, 30, 26, 796, 1,
  756. 1, 1, 1, 1, 1, 0, 33, 41, 41, 34,
  757. 102, 3, 3, 29, 1, 1, 47, 31, 99, 102,
  758. 36, 84, 3, 4, 4, 1, 1, 1, 57, 104,
  759. 104, 29, 37, 1, 4, 31, 61, 99, 33, 30,
  760. 1, 1, 34, 1, 2, 2, 2, 2, 2, 2,
  761. 2, 2, 2, 2, 84, 36, 29, 33, 3, 37,
  762. 31, 57, 2, 2, 2, 2, 2, 2, 3, 37,
  763. 4, 791, 3, 36, 97, 47, 790, 2, 2, 113,
  764. 4, 110, 110, 143, 4, 56, 70, 57, 2, 2,
  765. 2, 111, 111, 112, 112, 61, 2, 69, 97, 123,
  766. 86, 143, 58, 2, 2, 789, 2, 7, 7, 7,
  767. 7, 7, 7, 7, 7, 15, 15, 56, 15, 70,
  768. 135, 97, 113, 15, 7, 7, 7, 7, 7, 69,
  769. 16, 16, 15, 16, 124, 86, 56, 58, 16, 7,
  770. 7, 135, 123, 98, 56, 70, 71, 16, 69, 468,
  771. 7, 7, 83, 86, 126, 58, 69, 128, 7, 35,
  772. 788, 58, 144, 96, 135, 7, 7, 7, 7, 8,
  773. 8, 8, 8, 8, 8, 8, 8, 124, 98, 129,
  774. 468, 71, 202, 35, 83, 144, 8, 8, 8, 8,
  775. 8, 202, 35, 85, 127, 96, 98, 126, 137, 71,
  776. 128, 8, 8, 83, 127, 71, 35, 60, 60, 60,
  777. 60, 60, 8, 8, 96, 150, 150, 85, 136, 138,
  778. 8, 544, 129, 121, 133, 121, 85, 8, 8, 8,
  779. 8, 9, 9, 9, 9, 9, 9, 9, 9, 121,
  780. 85, 103, 103, 60, 130, 200, 544, 133, 9, 103,
  781. 9, 9, 9, 134, 130, 136, 137, 145, 103, 60,
  782. 147, 60, 138, 9, 9, 73, 73, 73, 73, 73,
  783. 133, 154, 122, 136, 9, 9, 122, 122, 786, 148,
  784. 145, 161, 9, 147, 164, 134, 122, 783, 149, 9,
  785. 9, 9, 9, 10, 10, 10, 10, 10, 10, 10,
  786. 10, 73, 148, 200, 134, 139, 139, 141, 146, 165,
  787. 10, 149, 10, 10, 10, 141, 146, 73, 189, 73,
  788. 141, 164, 139, 139, 139, 10, 10, 166, 140, 140,
  789. 154, 190, 782, 141, 146, 167, 10, 10, 168, 164,
  790. 161, 189, 175, 164, 10, 140, 140, 140, 139, 179,
  791. 180, 10, 10, 10, 10, 11, 11, 11, 11, 11,
  792. 11, 11, 11, 190, 189, 206, 206, 181, 165, 216,
  793. 210, 140, 11, 11, 11, 11, 11, 11, 167, 201,
  794. 210, 778, 190, 191, 198, 216, 166, 11, 11, 156,
  795. 156, 156, 156, 156, 167, 205, 205, 168, 11, 11,
  796. 11, 175, 201, 205, 191, 163, 11, 198, 179, 180,
  797. 181, 777, 205, 11, 11, 11, 11, 12, 12, 12,
  798. 12, 12, 12, 12, 12, 156, 181, 191, 163, 209,
  799. 198, 219, 178, 266, 12, 12, 12, 12, 12, 12,
  800. 162, 156, 773, 156, 162, 162, 162, 162, 162, 12,
  801. 12, 163, 170, 170, 170, 170, 170, 220, 224, 177,
  802. 12, 12, 12, 225, 163, 192, 229, 220, 12, 178,
  803. 232, 249, 209, 225, 219, 12, 12, 12, 12, 13,
  804. 162, 13, 177, 494, 13, 13, 13, 178, 170, 199,
  805. 230, 178, 266, 235, 249, 772, 162, 231, 162, 251,
  806. 13, 224, 192, 494, 170, 177, 170, 771, 252, 176,
  807. 199, 13, 13, 176, 176, 176, 176, 176, 177, 242,
  808. 192, 215, 251, 13, 229, 215, 215, 230, 232, 242,
  809. 13, 252, 231, 199, 248, 215, 235, 13, 13, 13,
  810. 13, 14, 250, 14, 248, 230, 14, 14, 14, 176,
  811. 231, 237, 237, 253, 255, 259, 254, 284, 764, 267,
  812. 250, 256, 14, 243, 243, 176, 260, 176, 237, 237,
  813. 237, 304, 279, 14, 14, 254, 253, 255, 259, 256,
  814. 243, 243, 243, 763, 280, 14, 761, 260, 288, 303,
  815. 322, 293, 14, 259, 237, 269, 273, 274, 276, 14,
  816. 14, 14, 14, 38, 295, 285, 243, 293, 322, 279,
  817. 303, 288, 321, 38, 325, 284, 38, 38, 267, 280,
  818. 295, 342, 319, 38, 454, 38, 38, 279, 760, 304,
  819. 38, 38, 325, 303, 454, 321, 38, 280, 323, 38,
  820. 285, 319, 38, 38, 38, 50, 50, 50, 50, 50,
  821. 50, 50, 50, 324, 269, 273, 274, 276, 285, 326,
  822. 327, 323, 50, 50, 50, 50, 328, 329, 332, 333,
  823. 346, 341, 347, 351, 355, 348, 324, 356, 327, 342,
  824. 357, 359, 326, 361, 360, 329, 332, 333, 50, 328,
  825. 347, 348, 341, 358, 376, 356, 759, 355, 357, 359,
  826. 362, 351, 360, 50, 50, 50, 50, 64, 64, 64,
  827. 64, 64, 64, 64, 64, 341, 358, 364, 362, 367,
  828. 369, 368, 351, 382, 64, 379, 64, 64, 346, 377,
  829. 371, 383, 384, 364, 368, 368, 368, 367, 369, 387,
  830. 749, 361, 390, 379, 748, 391, 382, 747, 407, 388,
  831. 64, 746, 376, 399, 383, 384, 370, 427, 371, 396,
  832. 390, 377, 387, 391, 407, 64, 64, 64, 64, 77,
  833. 77, 77, 77, 77, 77, 77, 77, 745, 370, 371,
  834. 377, 388, 396, 397, 392, 399, 77, 77, 77, 77,
  835. 370, 403, 370, 393, 393, 393, 370, 392, 392, 392,
  836. 388, 370, 405, 402, 399, 408, 397, 411, 370, 411,
  837. 370, 425, 77, 425, 403, 427, 427, 418, 394, 410,
  838. 405, 414, 416, 408, 424, 415, 432, 77, 77, 77,
  839. 77, 158, 158, 158, 158, 158, 158, 158, 158, 402,
  840. 394, 416, 410, 415, 414, 433, 417, 424, 158, 158,
  841. 158, 158, 394, 418, 394, 420, 444, 402, 394, 423,
  842. 428, 432, 428, 394, 417, 411, 411, 434, 436, 425,
  843. 394, 418, 394, 420, 158, 469, 429, 423, 429, 432,
  844. 437, 440, 449, 456, 433, 434, 436, 453, 448, 158,
  845. 158, 158, 158, 172, 172, 172, 172, 172, 172, 172,
  846. 172, 456, 736, 437, 440, 445, 446, 445, 446, 457,
  847. 172, 448, 172, 172, 444, 735, 459, 473, 428, 428,
  848. 451, 460, 451, 452, 474, 452, 458, 473, 467, 470,
  849. 467, 470, 472, 469, 429, 429, 172, 477, 458, 459,
  850. 449, 449, 474, 480, 460, 453, 453, 471, 475, 471,
  851. 485, 172, 172, 172, 172, 185, 185, 185, 185, 185,
  852. 185, 185, 185, 445, 446, 476, 475, 457, 457, 481,
  853. 484, 486, 185, 185, 185, 185, 488, 500, 451, 451,
  854. 489, 452, 452, 476, 458, 458, 467, 470, 496, 482,
  855. 472, 482, 483, 484, 483, 477, 477, 501, 185, 493,
  856. 500, 480, 481, 504, 483, 471, 511, 490, 485, 485,
  857. 497, 733, 497, 185, 185, 185, 185, 431, 493, 507,
  858. 481, 505, 509, 431, 431, 431, 431, 431, 732, 486,
  859. 486, 498, 516, 498, 488, 488, 510, 507, 489, 489,
  860. 727, 508, 490, 508, 521, 509, 496, 482, 482, 526,
  861. 483, 483, 513, 505, 510, 501, 514, 726, 514, 431,
  862. 490, 504, 517, 523, 511, 490, 490, 515, 497, 515,
  863. 527, 505, 517, 523, 513, 431, 431, 431, 455, 547,
  864. 455, 547, 527, 530, 455, 455, 455, 455, 455, 498,
  865. 516, 516, 519, 529, 519, 533, 520, 513, 520, 522,
  866. 539, 522, 521, 521, 531, 725, 528, 526, 526, 534,
  867. 535, 529, 535, 533, 514, 514, 531, 536, 537, 536,
  868. 455, 538, 540, 539, 542, 515, 515, 553, 527, 527,
  869. 528, 538, 706, 556, 522, 556, 455, 455, 455, 487,
  870. 540, 530, 530, 541, 704, 487, 487, 487, 487, 487,
  871. 519, 519, 522, 528, 520, 520, 545, 522, 522, 551,
  872. 550, 541, 531, 531, 528, 528, 552, 534, 535, 555,
  873. 558, 561, 585, 564, 545, 536, 537, 551, 562, 621,
  874. 562, 487, 542, 550, 614, 553, 553, 560, 729, 560,
  875. 552, 556, 556, 557, 729, 557, 564, 487, 487, 487,
  876. 492, 567, 555, 621, 561, 557, 492, 492, 492, 492,
  877. 492, 560, 570, 576, 563, 579, 563, 566, 575, 571,
  878. 555, 565, 561, 574, 567, 581, 563, 586, 558, 558,
  879. 568, 576, 585, 579, 560, 570, 562, 562, 597, 588,
  880. 605, 575, 492, 566, 614, 560, 560, 647, 581, 580,
  881. 586, 557, 557, 689, 597, 687, 565, 691, 492, 492,
  882. 492, 518, 588, 518, 575, 568, 590, 518, 518, 518,
  883. 518, 518, 563, 563, 565, 566, 566, 571, 593, 565,
  884. 565, 574, 580, 568, 590, 594, 603, 594, 568, 568,
  885. 589, 591, 592, 595, 592, 602, 593, 677, 605, 596,
  886. 580, 596, 598, 518, 603, 647, 675, 610, 607, 599,
  887. 673, 594, 589, 591, 604, 595, 601, 691, 602, 518,
  888. 518, 518, 524, 608, 524, 610, 598, 592, 524, 524,
  889. 524, 524, 524, 599, 596, 589, 591, 604, 595, 616,
  890. 601, 607, 617, 594, 594, 592, 608, 612, 619, 598,
  891. 592, 592, 596, 613, 620, 616, 599, 596, 596, 607,
  892. 598, 598, 623, 601, 524, 617, 612, 599, 599, 625,
  893. 622, 613, 622, 630, 601, 601, 624, 620, 624, 628,
  894. 524, 524, 524, 632, 626, 623, 626, 619, 631, 612,
  895. 660, 629, 633, 625, 622, 635, 630, 636, 634, 637,
  896. 624, 632, 638, 619, 639, 628, 641, 640, 626, 634,
  897. 633, 634, 634, 635, 631, 657, 643, 622, 642, 649,
  898. 636, 637, 646, 624, 641, 638, 651, 639, 622, 622,
  899. 640, 626, 629, 648, 624, 624, 653, 628, 628, 643,
  900. 645, 649, 626, 626, 637, 646, 631, 631, 629, 629,
  901. 629, 650, 642, 650, 666, 652, 645, 652, 653, 654,
  902. 658, 654, 644, 665, 649, 662, 662, 662, 656, 661,
  903. 642, 667, 666, 657, 657, 657, 658, 650, 659, 663,
  904. 661, 653, 661, 661, 664, 654, 665, 668, 669, 670,
  905. 663, 679, 656, 667, 683, 664, 652, 671, 678, 686,
  906. 672, 681, 659, 676, 627, 668, 669, 670, 697, 650,
  907. 650, 685, 652, 652, 652, 656, 667, 654, 654, 676,
  908. 671, 678, 672, 688, 681, 659, 656, 656, 695, 680,
  909. 679, 680, 682, 683, 682, 694, 659, 659, 684, 663,
  910. 684, 690, 696, 697, 664, 672, 679, 703, 694, 683,
  911. 708, 695, 685, 680, 690, 690, 690, 686, 686, 692,
  912. 698, 697, 684, 701, 688, 696, 699, 712, 685, 685,
  913. 685, 702, 692, 692, 692, 700, 680, 700, 707, 618,
  914. 688, 688, 688, 698, 699, 684, 701, 680, 680, 702,
  915. 682, 682, 682, 710, 707, 694, 684, 684, 709, 717,
  916. 709, 690, 711, 718, 711, 703, 714, 721, 708, 710,
  917. 713, 720, 713, 716, 722, 719, 718, 718, 718, 692,
  918. 728, 723, 717, 738, 700, 712, 739, 700, 719, 720,
  919. 721, 724, 734, 724, 734, 740, 722, 723, 737, 709,
  920. 737, 611, 766, 728, 742, 609, 606, 741, 743, 600,
  921. 751, 713, 751, 740, 758, 709, 709, 709, 744, 722,
  922. 711, 711, 742, 718, 714, 714, 714, 713, 713, 713,
  923. 741, 716, 716, 716, 770, 719, 744, 753, 756, 753,
  924. 724, 738, 738, 724, 739, 739, 754, 743, 757, 758,
  925. 734, 734, 734, 755, 756, 755, 737, 737, 737, 765,
  926. 766, 765, 768, 743, 754, 769, 775, 758, 751, 751,
  927. 776, 757, 779, 780, 784, 787, 792, 793, 792, 780,
  928. 768, 769, 797, 798, 797, 798, 801, 587, 801, 584,
  929. 779, 582, 770, 578, 577, 753, 753, 573, 572, 569,
  930. 559, 554, 549, 548, 546, 543, 532, 525, 512, 506,
  931. 503, 502, 499, 755, 491, 479, 478, 466, 465, 765,
  932. 450, 447, 443, 442, 775, 439, 438, 430, 426, 421,
  933. 776, 419, 413, 412, 784, 787, 792, 793, 409, 406,
  934. 398, 395, 797, 798, 389, 381, 801, 804, 804, 804,
  935. 804, 804, 804, 804, 804, 804, 804, 804, 804, 804,
  936. 805, 805, 805, 805, 805, 805, 805, 805, 805, 805,
  937. 805, 805, 805, 806, 806, 806, 806, 806, 806, 806,
  938. 806, 806, 806, 806, 806, 806, 807, 807, 807, 807,
  939. 807, 807, 807, 807, 807, 807, 807, 807, 807, 808,
  940. 808, 808, 808, 808, 808, 808, 808, 808, 808, 808,
  941. 808, 808, 809, 809, 809, 809, 809, 809, 809, 809,
  942. 809, 809, 809, 809, 809, 810, 810, 810, 810, 810,
  943. 810, 810, 810, 810, 810, 810, 810, 810, 811, 811,
  944. 811, 811, 811, 380, 811, 378, 811, 811, 366, 365,
  945. 811, 812, 812, 812, 812, 812, 812, 812, 812, 812,
  946. 812, 812, 812, 812, 813, 363, 354, 813, 813, 352,
  947. 813, 813, 813, 350, 813, 331, 813, 814, 320, 307,
  948. 814, 814, 305, 814, 814, 814, 301, 814, 281, 814,
  949. 815, 815, 815, 815, 815, 815, 278, 272, 265, 815,
  950. 815, 815, 815, 816, 262, 261, 816, 816, 258, 816,
  951. 816, 816, 257, 816, 247, 816, 817, 817, 245, 817,
  952. 244, 241, 239, 238, 817, 236, 233, 817, 818, 818,
  953. 818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
  954. 818, 819, 819, 228, 819, 218, 217, 213, 212, 819,
  955. 819, 207, 819, 820, 820, 820, 820, 820, 820, 820,
  956. 820, 820, 820, 820, 820, 820, 821, 821, 197, 821,
  957. 196, 194, 193, 188, 821, 822, 822, 822, 822, 822,
  958. 822, 822, 822, 822, 822, 822, 822, 822, 823, 823,
  959. 823, 187, 823, 186, 184, 182, 823, 823, 824, 824,
  960. 824, 174, 824, 824, 824, 824, 824, 824, 824, 824,
  961. 824, 825, 825, 825, 825, 825, 825, 825, 825, 825,
  962. 825, 825, 825, 825, 826, 826, 826, 826, 826, 826,
  963. 826, 826, 826, 826, 826, 826, 826, 827, 827, 827,
  964. 173, 827, 827, 827, 827, 827, 827, 827, 827, 827,
  965. 828, 828, 828, 171, 828, 828, 828, 828, 828, 828,
  966. 828, 828, 828, 829, 829, 829, 829, 829, 829, 829,
  967. 829, 829, 829, 829, 829, 829, 830, 830, 830, 160,
  968. 830, 830, 830, 830, 830, 830, 830, 830, 830, 831,
  969. 831, 831, 831, 831, 831, 831, 831, 831, 831, 831,
  970. 831, 831, 832, 832, 832, 832, 832, 832, 832, 832,
  971. 832, 832, 832, 832, 832, 833, 833, 833, 833, 833,
  972. 833, 833, 833, 833, 833, 833, 833, 833, 834, 834,
  973. 834, 834, 834, 834, 834, 834, 834, 834, 834, 834,
  974. 834, 835, 835, 835, 835, 835, 835, 835, 835, 835,
  975. 835, 835, 835, 835, 836, 836, 836, 836, 836, 836,
  976. 836, 836, 836, 836, 836, 836, 836, 837, 837, 837,
  977. 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
  978. 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
  979. 838, 838, 838, 839, 839, 839, 839, 839, 839, 839,
  980. 839, 839, 839, 839, 839, 839, 840, 840, 840, 840,
  981. 840, 840, 840, 840, 840, 840, 840, 840, 840, 841,
  982. 841, 841, 841, 841, 841, 841, 841, 841, 841, 841,
  983. 841, 841, 842, 842, 842, 842, 842, 842, 842, 842,
  984. 842, 842, 842, 842, 842, 843, 843, 843, 843, 843,
  985. 843, 843, 843, 843, 843, 843, 843, 843, 844, 844,
  986. 844, 844, 844, 844, 844, 844, 844, 844, 844, 844,
  987. 844, 845, 845, 845, 845, 845, 845, 845, 845, 845,
  988. 845, 845, 845, 845, 846, 846, 846, 846, 846, 846,
  989. 846, 846, 846, 846, 846, 846, 846, 847, 847, 847,
  990. 847, 847, 847, 847, 847, 847, 847, 847, 847, 848,
  991. 848, 848, 848, 848, 848, 848, 848, 848, 848, 848,
  992. 848, 848, 849, 849, 849, 849, 849, 849, 849, 849,
  993. 849, 849, 849, 849, 849, 850, 850, 850, 850, 850,
  994. 850, 850, 850, 850, 850, 850, 850, 850, 851, 851,
  995. 851, 851, 851, 851, 851, 851, 851, 851, 851, 851,
  996. 851, 852, 852, 852, 852, 852, 852, 852, 852, 852,
  997. 852, 852, 852, 852, 853, 853, 853, 853, 853, 853,
  998. 853, 853, 853, 853, 853, 853, 853, 159, 157, 152,
  999. 151, 142, 131, 125, 120, 118, 116, 115, 114, 108,
  1000. 105, 91, 90, 75, 74, 62, 48, 46, 44, 43,
  1001. 32, 24, 23, 22, 21, 18, 17, 6, 5, 803,
  1002. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  1003. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  1004. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  1005. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  1006. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  1007. 803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
  1008. 803, 803, 803, 803
  1009. } ;
  1010. /* The intent behind this definition is that it'll catch
  1011. * any uses of REJECT which flex missed.
  1012. */
  1013. #define REJECT reject_used_but_not_detected
  1014. #define yymore() (yy_more_flag = 1)
  1015. #define YY_MORE_ADJ yy_more_len
  1016. #define YY_RESTORE_YY_MORE_OFFSET
  1017. #define INITIAL 0
  1018. //+---------------------------------------------------------------------------
  1019. //
  1020. // Microsoft Windows
  1021. // Copyright (C) Microsoft Corporation, 1997 - 2000.
  1022. //
  1023. // File: parser.l
  1024. //
  1025. // Contents: Lex rules for parser
  1026. //
  1027. // Notes: Written for flex version 2.5.4
  1028. //
  1029. // History: 10-01-97 emilyb created
  1030. //
  1031. //----------------------------------------------------------------------------
  1032. class CValueParser;
  1033. #include "yybase.hxx"
  1034. #include "parser.h"
  1035. #include "parsepl.h"
  1036. #include "flexcpp.h"
  1037. #define TOKEN(tknNum) return (tknNum);
  1038. #define STRING_VALUE(tknNum, fLong, fQuote) \
  1039. { \
  1040. if (!IsTokenEmpty()) \
  1041. return CreateTknValue(yylval, tknNum, fLong, fQuote); \
  1042. }
  1043. /*
  1044. ** Make Lex read from a block of data
  1045. ** buffer is the character buffer,
  1046. ** result is a variable to store the number of chars read
  1047. ** ms is the size of the buffer
  1048. */
  1049. #undef YY_INPUT
  1050. #define YY_INPUT(b, r, ms) (r = yybufferinput(b, ms))
  1051. DECLARE_INFOLEVEL(yacc)
  1052. //+---------------------------------------------------------------------------
  1053. //
  1054. // Function: YYLEXER::IsTokenEmpty
  1055. //
  1056. // Synopsis: Determines if a token is empty. An empty token only has
  1057. // whitespace or has nothing in it.
  1058. //
  1059. // Arguments: None.
  1060. //
  1061. // Returns: Boolean value.
  1062. //
  1063. // History: 08-APR-98 KrishnaN created
  1064. //
  1065. //----------------------------------------------------------------------------
  1066. BOOL YYLEXER::IsTokenEmpty()
  1067. {
  1068. LPWSTR pwsz = yytext;
  1069. Win4Assert(pwsz);
  1070. while (*pwsz != 0)
  1071. {
  1072. if (*pwsz != L' ' && *pwsz != L'\t')
  1073. return FALSE;
  1074. pwsz++;
  1075. }
  1076. return TRUE;
  1077. }
  1078. //+---------------------------------------------------------------------------
  1079. //
  1080. // Function: YYLEXER::IsNotOperator
  1081. //
  1082. // Synopsis: Determines if we have a not operator.
  1083. //
  1084. // Arguments: None.
  1085. //
  1086. // Returns: Boolean value.
  1087. //
  1088. // History: 08-DEC-98 KrishnaN created
  1089. //
  1090. //----------------------------------------------------------------------------
  1091. BOOL YYLEXER::IsNotOperator()
  1092. {
  1093. LPWSTR pwsz = yytext;
  1094. Win4Assert(pwsz);
  1095. // skip past leading spaces
  1096. int i = 0;
  1097. while (*pwsz != 0 && (*pwsz == L' ' || *pwsz == L'\t'))
  1098. {
  1099. pwsz++;
  1100. i++;
  1101. }
  1102. // If we don't have at least four chars to consider, we don't have a
  1103. // not operator.
  1104. if (yyleng < i+4)
  1105. return FALSE;
  1106. if ( (*pwsz == L'n' || *pwsz == L'N') &&
  1107. (*(pwsz+1) == L'o' || *(pwsz+1) == L'O') &&
  1108. (*(pwsz+2) == L't' || *(pwsz+2) == L'T') &&
  1109. (*(pwsz+3) == L'@' || *(pwsz+3) == L'#' || *(pwsz+3) == L'$')
  1110. )
  1111. return TRUE;
  1112. else
  1113. return FALSE;
  1114. }
  1115. //+---------------------------------------------------------------------------
  1116. //
  1117. // Function: YYLEXER::CreateTknValue
  1118. //
  1119. // Synopsis: Allocs a WCHAR string which is passed to the YACC value stack.
  1120. //
  1121. // Arguments: [ppStg] -- set to pointer to alloc'd memory
  1122. // [tknNum] -- token id
  1123. // [fLong] -- true if token is in longhand version
  1124. // [fQuote] -- true if token is quoted
  1125. //
  1126. // Returns: Updated token id
  1127. //
  1128. // History: 10-01-97 emilyb created
  1129. //
  1130. //----------------------------------------------------------------------------
  1131. short YYLEXER::CreateTknValue(YYSTYPE *ppStg, short tknNum, BOOL fLong, BOOL fQuote )
  1132. {
  1133. HRESULT hr = S_OK;
  1134. short retTkn = tknNum;
  1135. LPWSTR pwsz = yytext;
  1136. if (!fQuote)
  1137. {
  1138. // If we see a double quote, consider the string quoted.
  1139. while (L' ' == *pwsz)
  1140. pwsz++;
  1141. if (*pwsz == L'"')
  1142. {
  1143. // strip trailing blanks and check if we see a trailing "
  1144. LPWSTR pLast = pwsz + wcslen(pwsz) - 1;
  1145. while (pLast >= pwsz && L' ' == *pLast )
  1146. {
  1147. *pLast = L'\0';
  1148. pLast--;
  1149. }
  1150. if (*pLast == L'"' && pLast > pwsz )
  1151. fQuote = TRUE;
  1152. }
  1153. }
  1154. // start parsing from the beginning of the string
  1155. pwsz = yytext;
  1156. if (_PHRASEORREGEX == tknNum)
  1157. {
  1158. // A quoted string is always a phrase.
  1159. if (fQuote)
  1160. retTkn = _PHRASE;
  1161. else
  1162. retTkn = DetermineTokenType();
  1163. }
  1164. switch (retTkn)
  1165. {
  1166. case _PHRASE:
  1167. {
  1168. LPWSTR pLast;
  1169. pLast = pwsz + wcslen(pwsz) - 1;
  1170. // if long version, find the phrase
  1171. if (fLong)
  1172. {
  1173. pwsz = pwsz + wcslen(L"{phrase}");
  1174. pLast = pLast - wcslen(L"{/phrase}"+1);
  1175. Win4Assert(*pLast == L'{');
  1176. *pLast = L'\0';
  1177. }
  1178. // strip leading and trailing blanks
  1179. while (L' ' == *pwsz)
  1180. pwsz++;
  1181. pLast = pwsz + wcslen(pwsz) - 1;
  1182. while (pLast >= pwsz && L' ' == *pLast )
  1183. {
  1184. *pLast = L'\0';
  1185. pLast--;
  1186. }
  1187. // NOTE: Don't strip double quotes here, they will be stripped later
  1188. yaccDebugOut((DEB_ITRACE, "Phrase %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
  1189. }
  1190. break;
  1191. case _PROPNAME:
  1192. {
  1193. LPWSTR pLast;
  1194. if (fLong) // looks like: { prop name = "prop name" }
  1195. {
  1196. // find =
  1197. while (L'=' != *pwsz)
  1198. pwsz++;
  1199. pwsz++;
  1200. pLast = pwsz + wcslen(pwsz) - 1;
  1201. Win4Assert( *pLast == L'}');
  1202. *pLast-- = L'\0';
  1203. }
  1204. else
  1205. {
  1206. // Strip @ or # or $ token
  1207. Win4Assert(*pwsz == L'@' || *pwsz == L'#' || *pwsz == L'$');
  1208. pwsz = pwsz + 1;
  1209. }
  1210. // strip leading and trailing blanks
  1211. while (L' ' == *pwsz)
  1212. pwsz++;
  1213. pLast = pwsz + wcslen(pwsz) - 1;
  1214. while (pLast >= pwsz && L' ' == *pLast )
  1215. {
  1216. *pLast--= L'\0';
  1217. }
  1218. if (fQuote)
  1219. {
  1220. pwsz++;
  1221. *pLast = L'\0';
  1222. }
  1223. yaccDebugOut((DEB_ITRACE, "Propname %ws in %ws format and %ws\n",
  1224. pwsz, fLong ? L"Long" : L"Short", fQuote ? L"quoted" : L"unquoted"));
  1225. }
  1226. break;
  1227. case _FREETEXT:
  1228. {
  1229. LPWSTR pLast;
  1230. // if long version, find the FREETEXT
  1231. if (fLong)
  1232. {
  1233. pwsz = pwsz + wcslen(L"{freetext}");
  1234. pLast = pwsz + wcslen(pwsz) - 1;
  1235. pLast = pLast - wcslen(L"{/freetext}")+1;
  1236. Win4Assert(*pLast == L'{');
  1237. *pLast = L'\0';
  1238. }
  1239. // strip leading and trailing blanks
  1240. while (L' ' == *pwsz)
  1241. pwsz++;
  1242. pLast = pwsz + wcslen(pwsz) - 1;
  1243. while (pLast >= pwsz && L' ' == *pLast )
  1244. {
  1245. *pLast = L'\0';
  1246. pLast--;
  1247. }
  1248. if (fQuote)
  1249. {
  1250. Win4Assert(pLast >= pwsz+1);
  1251. // Strip quotes
  1252. pwsz = pwsz + 1;
  1253. *pLast = L'\0';
  1254. }
  1255. yaccDebugOut((DEB_ITRACE, "Freetext %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
  1256. }
  1257. break;
  1258. case _REGEX:
  1259. {
  1260. LPWSTR pLast;
  1261. // if long version, find the regex
  1262. if (fLong)
  1263. {
  1264. pwsz = pwsz + wcslen(L"{regex}");
  1265. pLast = pwsz + wcslen(pwsz);
  1266. pLast = pLast - wcslen(L"{/regex}");
  1267. Win4Assert(*pLast == L'{');
  1268. *pLast = L'\0';
  1269. }
  1270. // strip leading blanks
  1271. while (L' ' == *pwsz)
  1272. pwsz++;
  1273. // If the first char is =, ignore it. We only ignore the first
  1274. // = character. This is backward compatible with Triplish1
  1275. if (L'=' == *pwsz)
  1276. pwsz++;
  1277. // strip leading and trailing blanks
  1278. while (L' ' == *pwsz)
  1279. pwsz++;
  1280. pLast = pwsz + wcslen(pwsz) - 1;
  1281. while (pLast >= pwsz && L' ' == *pLast )
  1282. {
  1283. *pLast = L'\0';
  1284. pLast--;
  1285. }
  1286. // After we strip a leading =, we might have a quoted phrase
  1287. // Check only if fQuote is false.
  1288. // We don't want to deal with an unpaired double quote.
  1289. if (!fQuote && *pwsz == L'"' && *pLast == L'"' && pLast > pwsz )
  1290. fQuote = TRUE;
  1291. if (fQuote)
  1292. {
  1293. Win4Assert(pLast >= pwsz+1);
  1294. // Strip quotes
  1295. pwsz = pwsz + 1;
  1296. *pLast = L'\0';
  1297. }
  1298. yaccDebugOut((DEB_ITRACE, "RegEx %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
  1299. }
  1300. break;
  1301. case _WEIGHT:
  1302. {
  1303. Assert (fLong);
  1304. Assert(!fQuote);
  1305. if (fLong) // looks like: {weight value = number }
  1306. {
  1307. // find =
  1308. while (L'=' != *pwsz)
  1309. pwsz++;
  1310. pwsz++;
  1311. // step past leading blanks
  1312. while (L' ' == *pwsz)
  1313. pwsz++;
  1314. // remove trailing } and blanks
  1315. LPWSTR pLast = pwsz + wcslen(pwsz) - 1;
  1316. Win4Assert(*pLast == L'}');
  1317. *(pLast--) = L'\0';
  1318. while (pLast >= pwsz && L' ' == *pLast )
  1319. {
  1320. *(pLast--) = L'\0';
  1321. }
  1322. }
  1323. }
  1324. break;
  1325. case _NEARDIST:
  1326. {
  1327. Assert (fLong);
  1328. Assert(!fQuote);
  1329. if (fLong) // looks like: dist = number
  1330. {
  1331. // find =
  1332. while (L'=' != *pwsz)
  1333. pwsz++;
  1334. pwsz++;
  1335. // step past leading blanks
  1336. while (L' ' == *pwsz)
  1337. pwsz++;
  1338. }
  1339. yaccDebugOut((DEB_ITRACE, "NearDist string: %ws in %s format\n", pwsz, fLong ? L"Long" : L"Short"));
  1340. }
  1341. break;
  1342. case _NEARUNIT:
  1343. {
  1344. Assert (fLong);
  1345. Assert(!fQuote);
  1346. if (fLong) // looks like: unit = blah
  1347. {
  1348. // find =
  1349. while (L'=' != *pwsz)
  1350. pwsz++;
  1351. pwsz++;
  1352. // step past leading blanks
  1353. while (L' ' == *pwsz)
  1354. pwsz++;
  1355. }
  1356. yaccDebugOut((DEB_ITRACE, "NearUnit string: %ws in %s format\n", pwsz, fLong ? L"Long" : L"Short"));
  1357. }
  1358. break;
  1359. case _VECTORELEMENT:
  1360. {
  1361. // strip leading and trailing blanks
  1362. while (L' ' == *pwsz)
  1363. pwsz++;
  1364. LPWSTR pTemp = pwsz + wcslen(pwsz) - 1;
  1365. if (fLong) // strip trailing ;
  1366. {
  1367. Win4Assert(L';' == *pTemp);
  1368. *pTemp--='\0';
  1369. }
  1370. while (L' ' == *pTemp && pTemp > pwsz)
  1371. *pTemp-- = L'\0';
  1372. if (fQuote)
  1373. {
  1374. // Strip quotes
  1375. pwsz = pwsz + 1;
  1376. pwsz[wcslen(pwsz)-1] = L'\0';
  1377. }
  1378. yaccDebugOut((DEB_ITRACE, "VectorElem %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
  1379. }
  1380. break;
  1381. case _VEMETHOD:
  1382. {
  1383. Assert (fLong);
  1384. LPWSTR pTemp;
  1385. if (fLong) // looks like: {vector rankmethod= blah}
  1386. {
  1387. // find =
  1388. while (L'=' != *pwsz)
  1389. pwsz++;
  1390. pwsz++;
  1391. // strip trailing }
  1392. pTemp = pwsz + wcslen(pwsz) - 1;
  1393. Win4Assert(L'}' == *pTemp);
  1394. *pTemp-- = L'\0';
  1395. }
  1396. // strip leading and trailing blanks and quotes
  1397. while (L' ' == *pwsz)
  1398. pwsz++;
  1399. pTemp = pwsz + wcslen(pwsz) - 1;
  1400. while (L' ' == *pTemp && pTemp > pwsz)
  1401. *pTemp-- = L'\0';
  1402. if (fQuote)
  1403. {
  1404. // Strip quotes
  1405. pwsz = pwsz + 1;
  1406. pwsz[wcslen(pwsz)-1] = L'\0';
  1407. }
  1408. yaccDebugOut((DEB_ITRACE, "VectorMethod %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
  1409. }
  1410. break;
  1411. }
  1412. int len = wcslen(pwsz);
  1413. XPtrST<WCHAR> xwszRet(new WCHAR[len + 1]);
  1414. _allocations.Add(xwszRet.GetPointer(), _allocations.Count());
  1415. RtlCopyMemory(xwszRet.GetPointer(), pwsz, (len+1) * sizeof(WCHAR));
  1416. (*ppStg).pwszChar = xwszRet.Acquire();
  1417. return retTkn;
  1418. }
  1419. //+---------------------------------------------------------------------------
  1420. //
  1421. // Function: YYLEXER::DetermineTokenType
  1422. //
  1423. // Synopsis: Determines if we have a regular expression or a regular string.
  1424. // A regular expression is a string that contains atleast one of
  1425. // *, ?, or | characters.
  1426. //
  1427. // Returns: Token id
  1428. //
  1429. // History: Jun-05-98 KrishnaN created
  1430. //
  1431. //----------------------------------------------------------------------------
  1432. short YYLEXER::DetermineTokenType()
  1433. {
  1434. LPWSTR pwsz = yytext;
  1435. LPWSTR pLast = pwsz + wcslen(pwsz) - 1;
  1436. while (pLast >= pwsz)
  1437. {
  1438. if (L'|' == *pwsz || L'*' == *pwsz || L'?' == *pwsz)
  1439. return _REGEX;
  1440. pwsz++;
  1441. }
  1442. // None of the regular expression defining characters have been found
  1443. return _PHRASE;
  1444. }
  1445. //
  1446. //
  1447. // RULES
  1448. //
  1449. // Notes: Any characters which are not matched, cause yylexer to throw.
  1450. // We can also throw if E_OUTOFMEMORY.
  1451. // Tokens which need 2 return more than 1 value (e.g. {near}
  1452. // use start states to return each pice of the value. The start
  1453. // states also emit a "token end" token so that the parser can
  1454. // check that they are syntactically complete.
  1455. // Lex matches to the longest match in the rules. If 2 matches
  1456. // are the same, it matches to the 1st match.
  1457. #define innear 1
  1458. #define shortgen 2
  1459. #define shortregex 3
  1460. #define mayberegex 4
  1461. #define implicitphrase 5
  1462. #define infreefreetext 6
  1463. #define invector 7
  1464. /* Macros after this point can all be overridden by user definitions in
  1465. * section 1.
  1466. */
  1467. #ifndef YY_SKIP_YYWRAP
  1468. #ifdef __cplusplus
  1469. int yywrap YY_PROTO(( void )) {return 1;}
  1470. #else
  1471. extern int yywrap YY_PROTO(( void ));
  1472. #endif
  1473. #endif
  1474. #ifndef yytext_ptr
  1475. static void yy_flex_strncpy YY_PROTO(( YY_CHAR *, yyconst YY_CHAR *, int ));
  1476. #endif
  1477. #ifdef YY_NEED_STRLEN
  1478. static int yy_flex_strlen YY_PROTO(( yyconst YY_CHAR * ));
  1479. #endif
  1480. #ifndef YY_NO_INPUT
  1481. #endif
  1482. #if YY_STACK_USED
  1483. static int yy_start_stack_ptr = 0;
  1484. static int yy_start_stack_depth = 0;
  1485. static int *yy_start_stack = 0;
  1486. #ifndef YY_NO_PUSH_STATE
  1487. static void yy_push_state YY_PROTO(( int new_state ));
  1488. #endif
  1489. #ifndef YY_NO_POP_STATE
  1490. static void yy_pop_state YY_PROTO(( void ));
  1491. #endif
  1492. #ifndef YY_NO_TOP_STATE
  1493. static int yy_top_state YY_PROTO(( void ));
  1494. #endif
  1495. #else
  1496. #define YY_NO_PUSH_STATE 1
  1497. #define YY_NO_POP_STATE 1
  1498. #define YY_NO_TOP_STATE 1
  1499. #endif
  1500. #ifdef YY_MALLOC_DECL
  1501. YY_MALLOC_DECL
  1502. #else
  1503. #if __STDC__
  1504. #ifndef __cplusplus
  1505. #include <stdlib.h>
  1506. #endif
  1507. #else
  1508. /* Just try to get by without declaring the routines. This will fail
  1509. * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  1510. * or sizeof(void*) != sizeof(int).
  1511. */
  1512. #endif
  1513. #endif
  1514. /* Amount of stuff to slurp up with each read. */
  1515. #ifndef YY_READ_BUF_SIZE
  1516. #define YY_READ_BUF_SIZE (8192 / sizeof(WCHAR))
  1517. #endif
  1518. /* Copy whatever the last rule matched to the standard output. */
  1519. #ifndef ECHO
  1520. #define ECHO LexerOutput( yytext, yyleng )
  1521. #endif
  1522. /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  1523. * is returned in "result".
  1524. */
  1525. #ifndef YY_INPUT
  1526. #define YY_INPUT(buf,result,max_size) \
  1527. if ( (result = LexerInput( (YY_CHAR *) buf, max_size )) < 0 ) \
  1528. YY_FATAL_ERROR( L"input in flex scanner failed" );
  1529. #endif
  1530. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  1531. * we don't want an extra ';' after the "return" because that will cause
  1532. * some compilers to complain about unreachable statements.
  1533. */
  1534. #ifndef yyterminate
  1535. #define yyterminate() return YY_NULL
  1536. #endif
  1537. /* Number of entries by which start-condition stack grows. */
  1538. #ifndef YY_START_STACK_INCR
  1539. #define YY_START_STACK_INCR 25
  1540. #endif
  1541. /* Report a fatal error. */
  1542. #ifndef YY_FATAL_ERROR
  1543. #define YY_FATAL_ERROR(msg) LexerError( msg )
  1544. #endif
  1545. /* Default declaration of generated scanner - a define so the user can
  1546. * easily add parameters.
  1547. */
  1548. #ifndef YY_DECL
  1549. #define YY_DECL int YYLEXER::yylex(YYSTYPE *yylval)
  1550. #endif
  1551. /* Code executed at the beginning of each rule, after yytext and yyleng
  1552. * have been set up.
  1553. */
  1554. #ifndef YY_USER_ACTION
  1555. #define YY_USER_ACTION
  1556. #endif
  1557. /* Code executed at the end of each rule. */
  1558. #ifndef YY_BREAK
  1559. #define YY_BREAK break;
  1560. #endif
  1561. #define YY_RULE_SETUP \
  1562. YY_USER_ACTION
  1563. YY_DECL
  1564. {
  1565. register yy_state_type yy_current_state;
  1566. register YY_CHAR *yy_cp, *yy_bp;
  1567. register int yy_act;
  1568. if ( yy_init )
  1569. {
  1570. yy_init = 0;
  1571. #ifdef YY_USER_INIT
  1572. YY_USER_INIT;
  1573. #endif
  1574. if ( ! yy_start )
  1575. yy_start = 1; /* first start state */
  1576. if ( ! yy_current_buffer )
  1577. yy_current_buffer =
  1578. yy_create_buffer( (cInputBuffer * sizeof(YY_CHAR)) + sizeof(YY_CHAR) );
  1579. yy_load_buffer_state();
  1580. if (yyprimetoken)
  1581. {
  1582. int yysavetoken = yyprimetoken;
  1583. yyprimetoken = 0;
  1584. return yysavetoken;
  1585. }
  1586. }
  1587. while ( 1 ) /* loops until end-of-file is reached */
  1588. {
  1589. yy_more_len = 0;
  1590. if ( yy_more_flag )
  1591. {
  1592. yy_more_len = (int) (yy_c_buf_p - yytext_ptr);
  1593. yy_more_flag = 0;
  1594. }
  1595. yy_cp = yy_c_buf_p;
  1596. /* Support of yytext. */
  1597. *yy_cp = yy_hold_char;
  1598. /* yy_bp points to the position in yy_ch_buf of the start of
  1599. * the current run.
  1600. */
  1601. yy_bp = yy_cp;
  1602. yy_current_state = yy_start;
  1603. yy_match:
  1604. do
  1605. {
  1606. register YY_CHAR yy_c = 1; if (256 > *yy_cp) yy_c = (YY_CHAR) yy_ec[YY_SC_TO_UI(*yy_cp)];
  1607. if ( yy_accept[yy_current_state] )
  1608. {
  1609. yy_last_accepting_state = yy_current_state;
  1610. yy_last_accepting_cpos = yy_cp;
  1611. }
  1612. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1613. {
  1614. yy_current_state = (int) yy_def[yy_current_state];
  1615. if ( yy_current_state >= 804 )
  1616. yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
  1617. }
  1618. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1619. ++yy_cp;
  1620. }
  1621. while ( yy_current_state != 803 );
  1622. yy_cp = yy_last_accepting_cpos;
  1623. yy_current_state = yy_last_accepting_state;
  1624. yy_find_action:
  1625. yy_act = yy_accept[yy_current_state];
  1626. YY_DO_BEFORE_ACTION;
  1627. do_action: /* This label is used only to access EOF actions. */
  1628. switch ( yy_act )
  1629. { /* beginning of action switch */
  1630. case 0: /* must back up */
  1631. /* undo the effects of YY_DO_BEFORE_ACTION */
  1632. *yy_cp = yy_hold_char;
  1633. yy_cp = yy_last_accepting_cpos;
  1634. yy_current_state = yy_last_accepting_state;
  1635. goto yy_find_action;
  1636. case 1:
  1637. YY_RULE_SETUP
  1638. { /* do nothing */ }
  1639. YY_BREAK
  1640. case 2:
  1641. YY_RULE_SETUP
  1642. { fContinueImplicitPhrase = FALSE;
  1643. fContinueRegex = FALSE;
  1644. fContinueMaybeRegex = FALSE;
  1645. TOKEN (_OPEN);
  1646. }
  1647. YY_BREAK
  1648. case 3:
  1649. YY_RULE_SETUP
  1650. {
  1651. fContinueImplicitPhrase = FALSE;
  1652. fContinueRegex = FALSE;
  1653. fContinueMaybeRegex = FALSE;
  1654. TOKEN (_CLOSE);
  1655. }
  1656. YY_BREAK
  1657. // ************
  1658. // PROPNAME
  1659. // ************
  1660. // If something was treated as a phrase in Tripolish 1, it should
  1661. // be treated as such even now. That applies here. For e.g. @propname
  1662. // caused the following text to be treated as a phrase. The same should
  1663. // apply to {prop name = propname}
  1664. //
  1665. // shorthand, quoted
  1666. case 4:
  1667. YY_RULE_SETUP
  1668. {
  1669. // treat value as a phrase
  1670. BEGIN implicitphrase;
  1671. STRING_VALUE(_PROPNAME, FALSE, TRUE);
  1672. }
  1673. YY_BREAK
  1674. // shorthand, not quoted
  1675. case 5:
  1676. YY_RULE_SETUP
  1677. {
  1678. // treat value as a phrase
  1679. BEGIN implicitphrase;
  1680. STRING_VALUE(_PROPNAME, FALSE, FALSE);
  1681. }
  1682. YY_BREAK
  1683. // shorthand, quoted
  1684. case 6:
  1685. YY_RULE_SETUP
  1686. {
  1687. // treat value as freetext
  1688. BEGIN infreefreetext;
  1689. STRING_VALUE(_PROPNAME, FALSE, TRUE);
  1690. }
  1691. YY_BREAK
  1692. // shorthand, not quoted
  1693. case 7:
  1694. YY_RULE_SETUP
  1695. {
  1696. // treat value as freetext
  1697. BEGIN infreefreetext;
  1698. STRING_VALUE(_PROPNAME, FALSE, FALSE);
  1699. }
  1700. YY_BREAK
  1701. // longhand, quoted
  1702. case 8:
  1703. YY_RULE_SETUP
  1704. {
  1705. // treat value as a phrase
  1706. BEGIN implicitphrase;
  1707. STRING_VALUE(_PROPNAME, TRUE, TRUE);
  1708. }
  1709. YY_BREAK
  1710. // longhand, not quoted
  1711. case 9:
  1712. YY_RULE_SETUP
  1713. {
  1714. // treat value as a phrase
  1715. BEGIN implicitphrase;
  1716. STRING_VALUE(_PROPNAME, TRUE, FALSE);
  1717. }
  1718. YY_BREAK
  1719. // closing token
  1720. case 10:
  1721. YY_RULE_SETUP
  1722. { TOKEN (_PROPEND); }
  1723. YY_BREAK
  1724. // *********
  1725. // OPERATORS
  1726. // *********
  1727. case 11:
  1728. YY_RULE_SETUP
  1729. { if (fContinueImplicitPhrase)
  1730. {
  1731. BEGIN implicitphrase;
  1732. fContinueImplicitPhrase = FALSE;
  1733. }
  1734. else if (fContinueRegex)
  1735. {
  1736. BEGIN shortregex;
  1737. fContinueRegex = FALSE;
  1738. }
  1739. else if (fContinueMaybeRegex)
  1740. {
  1741. BEGIN mayberegex;
  1742. fContinueMaybeRegex = FALSE;
  1743. }
  1744. TOKEN (_CONTAINS);
  1745. }
  1746. YY_BREAK
  1747. case 12:
  1748. YY_RULE_SETUP
  1749. { if (fContinueImplicitPhrase)
  1750. {
  1751. BEGIN implicitphrase;
  1752. fContinueImplicitPhrase = FALSE;
  1753. }
  1754. else if (fContinueRegex)
  1755. {
  1756. BEGIN shortregex;
  1757. fContinueRegex = FALSE;
  1758. }
  1759. else if (fContinueMaybeRegex)
  1760. {
  1761. BEGIN mayberegex;
  1762. fContinueMaybeRegex = FALSE;
  1763. }
  1764. TOKEN (_AND);
  1765. }
  1766. YY_BREAK
  1767. case 13:
  1768. YY_RULE_SETUP
  1769. {
  1770. yyless(yyleng-1);
  1771. if (fContinueImplicitPhrase)
  1772. {
  1773. BEGIN implicitphrase;
  1774. fContinueImplicitPhrase = FALSE;
  1775. }
  1776. else if (fContinueRegex)
  1777. {
  1778. BEGIN shortregex;
  1779. fContinueRegex = FALSE;
  1780. }
  1781. else if (fContinueMaybeRegex)
  1782. {
  1783. BEGIN mayberegex;
  1784. fContinueMaybeRegex = FALSE;
  1785. }
  1786. TOKEN (_AND);
  1787. }
  1788. YY_BREAK
  1789. case 14:
  1790. YY_RULE_SETUP
  1791. { if (fContinueImplicitPhrase)
  1792. {
  1793. yaccDebugOut(( DEB_ITRACE, "fContinueImplicitPhrase\n" ));
  1794. BEGIN implicitphrase;
  1795. fContinueImplicitPhrase = FALSE;
  1796. }
  1797. else if (fContinueRegex)
  1798. {
  1799. yaccDebugOut(( DEB_ITRACE, "fContinueRegex\n" ));
  1800. BEGIN shortregex;
  1801. fContinueRegex = FALSE;
  1802. }
  1803. else if (fContinueMaybeRegex)
  1804. {
  1805. yaccDebugOut(( DEB_ITRACE, "fContinueMaybeRegex\n" ));
  1806. BEGIN mayberegex;
  1807. fContinueMaybeRegex = FALSE;
  1808. }
  1809. yaccDebugOut(( DEB_ITRACE, "OR TOKEN found !!!\n" ));
  1810. TOKEN (_OR); }
  1811. YY_BREAK
  1812. case 15:
  1813. YY_RULE_SETUP
  1814. {
  1815. yyless(yyleng-1);
  1816. if (fContinueImplicitPhrase)
  1817. {
  1818. yaccDebugOut(( DEB_ITRACE, "OR{ fContinueImplicitPhrase\n" ));
  1819. BEGIN implicitphrase;
  1820. fContinueImplicitPhrase = FALSE;
  1821. }
  1822. else if (fContinueRegex)
  1823. {
  1824. yaccDebugOut(( DEB_ITRACE, "OR{ fContinueRegex\n" ));
  1825. BEGIN shortregex;
  1826. fContinueRegex = FALSE;
  1827. }
  1828. else if (fContinueMaybeRegex)
  1829. {
  1830. yaccDebugOut(( DEB_ITRACE, "OR{ fContinueMaybeRegex\n" ));
  1831. BEGIN mayberegex;
  1832. fContinueMaybeRegex = FALSE;
  1833. }
  1834. yaccDebugOut(( DEB_ITRACE, "OR{ TOKEN found !!!\n" ));
  1835. TOKEN (_OR); }
  1836. YY_BREAK
  1837. case 16:
  1838. YY_RULE_SETUP
  1839. { if (fContinueImplicitPhrase)
  1840. {
  1841. BEGIN implicitphrase;
  1842. fContinueImplicitPhrase = FALSE;
  1843. }
  1844. else if (fContinueRegex)
  1845. {
  1846. BEGIN shortregex;
  1847. fContinueRegex = FALSE;
  1848. }
  1849. else if (fContinueMaybeRegex)
  1850. {
  1851. BEGIN mayberegex;
  1852. fContinueMaybeRegex = FALSE;
  1853. }
  1854. TOKEN (_NOT);}
  1855. YY_BREAK
  1856. case 17:
  1857. YY_RULE_SETUP
  1858. {
  1859. yyless(yyleng-1);
  1860. if (fContinueImplicitPhrase)
  1861. {
  1862. BEGIN implicitphrase;
  1863. fContinueImplicitPhrase = FALSE;
  1864. }
  1865. else if (fContinueRegex)
  1866. {
  1867. BEGIN shortregex;
  1868. fContinueRegex = FALSE;
  1869. }
  1870. else if (fContinueMaybeRegex)
  1871. {
  1872. BEGIN mayberegex;
  1873. fContinueMaybeRegex = FALSE;
  1874. }
  1875. TOKEN (_NOT);}
  1876. YY_BREAK
  1877. case 18:
  1878. YY_RULE_SETUP
  1879. { if (fContinueImplicitPhrase)
  1880. {
  1881. BEGIN implicitphrase;
  1882. fContinueImplicitPhrase = FALSE;
  1883. }
  1884. else if (fContinueRegex)
  1885. {
  1886. BEGIN shortregex;
  1887. fContinueRegex = FALSE;
  1888. }
  1889. else if (fContinueMaybeRegex)
  1890. {
  1891. BEGIN mayberegex;
  1892. fContinueMaybeRegex = FALSE;
  1893. }
  1894. TOKEN (_AND);}
  1895. YY_BREAK
  1896. case 19:
  1897. YY_RULE_SETUP
  1898. { if (fContinueImplicitPhrase)
  1899. {
  1900. BEGIN implicitphrase;
  1901. fContinueImplicitPhrase = FALSE;
  1902. }
  1903. else if (fContinueRegex)
  1904. {
  1905. BEGIN shortregex;
  1906. fContinueRegex = FALSE;
  1907. }
  1908. else if (fContinueMaybeRegex)
  1909. {
  1910. BEGIN mayberegex;
  1911. fContinueMaybeRegex = FALSE;
  1912. }
  1913. TOKEN (_OR);}
  1914. YY_BREAK
  1915. case 20:
  1916. YY_RULE_SETUP
  1917. { if (fContinueImplicitPhrase)
  1918. {
  1919. BEGIN implicitphrase;
  1920. fContinueImplicitPhrase = FALSE;
  1921. }
  1922. else if (fContinueRegex)
  1923. {
  1924. BEGIN shortregex;
  1925. fContinueRegex = FALSE;
  1926. }
  1927. else if (fContinueMaybeRegex)
  1928. {
  1929. BEGIN mayberegex;
  1930. fContinueMaybeRegex = FALSE;
  1931. }
  1932. TOKEN (_NOT);}
  1933. YY_BREAK
  1934. case 21:
  1935. YY_RULE_SETUP
  1936. { yaccDebugOut(( DEB_ITRACE, "near[ ]+ _NEAR token, begin implicitphrase\n" ));
  1937. BEGIN implicitphrase;
  1938. TOKEN (_NEAR);}
  1939. YY_BREAK
  1940. case 22:
  1941. YY_RULE_SETUP
  1942. { yaccDebugOut(( DEB_ITRACE, "near{ _NEAR token, begin implicitphrase\n" ));
  1943. yyless(yyleng-1);
  1944. BEGIN implicitphrase;
  1945. TOKEN (_NEAR);}
  1946. YY_BREAK
  1947. case 23:
  1948. YY_RULE_SETUP
  1949. { BEGIN implicitphrase;
  1950. TOKEN (_NEAR);}
  1951. YY_BREAK
  1952. case 24:
  1953. YY_RULE_SETUP
  1954. { TOKEN (_LT);}
  1955. YY_BREAK
  1956. case 25:
  1957. YY_RULE_SETUP
  1958. { TOKEN (_GT);}
  1959. YY_BREAK
  1960. case 26:
  1961. YY_RULE_SETUP
  1962. { TOKEN (_LTE);}
  1963. YY_BREAK
  1964. case 27:
  1965. YY_RULE_SETUP
  1966. { TOKEN (_GTE);}
  1967. YY_BREAK
  1968. case 28:
  1969. YY_RULE_SETUP
  1970. { if (fContinueMaybeRegex)
  1971. {
  1972. // We are not sure if we are going to find a
  1973. // regular expression or a phrase.
  1974. BEGIN mayberegex;
  1975. fContinueMaybeRegex = FALSE;
  1976. }
  1977. TOKEN (_EQ);
  1978. }
  1979. YY_BREAK
  1980. case 29:
  1981. YY_RULE_SETUP
  1982. { TOKEN (_NE); }
  1983. YY_BREAK
  1984. case 30:
  1985. YY_RULE_SETUP
  1986. { TOKEN (_ALLOF); }
  1987. YY_BREAK
  1988. case 31:
  1989. YY_RULE_SETUP
  1990. { TOKEN (_SOMEOF); }
  1991. YY_BREAK
  1992. case 32:
  1993. case 33:
  1994. YY_RULE_SETUP
  1995. { TOKEN (_LTSOME); }
  1996. YY_BREAK
  1997. case 34:
  1998. case 35:
  1999. YY_RULE_SETUP
  2000. { TOKEN (_GTSOME); }
  2001. YY_BREAK
  2002. case 36:
  2003. case 37:
  2004. YY_RULE_SETUP
  2005. { TOKEN (_LTESOME); }
  2006. YY_BREAK
  2007. case 38:
  2008. case 39:
  2009. YY_RULE_SETUP
  2010. { TOKEN (_GTESOME); }
  2011. YY_BREAK
  2012. case 40:
  2013. case 41:
  2014. YY_RULE_SETUP
  2015. { TOKEN (_EQSOME); }
  2016. YY_BREAK
  2017. case 42:
  2018. case 43:
  2019. YY_RULE_SETUP
  2020. { TOKEN (_NESOME); }
  2021. YY_BREAK
  2022. case 44:
  2023. YY_RULE_SETUP
  2024. { TOKEN (_ALLOFSOME); }
  2025. YY_BREAK
  2026. case 45:
  2027. YY_RULE_SETUP
  2028. { TOKEN (_SOMEOFSOME); }
  2029. YY_BREAK
  2030. case 46:
  2031. case 47:
  2032. YY_RULE_SETUP
  2033. { TOKEN (_LTALL); }
  2034. YY_BREAK
  2035. case 48:
  2036. case 49:
  2037. YY_RULE_SETUP
  2038. { TOKEN (_GTALL); }
  2039. YY_BREAK
  2040. case 50:
  2041. case 51:
  2042. YY_RULE_SETUP
  2043. { TOKEN (_LTEALL); }
  2044. YY_BREAK
  2045. case 52:
  2046. case 53:
  2047. YY_RULE_SETUP
  2048. { TOKEN (_GTEALL); }
  2049. YY_BREAK
  2050. case 54:
  2051. case 55:
  2052. YY_RULE_SETUP
  2053. { TOKEN (_EQALL); }
  2054. YY_BREAK
  2055. case 56:
  2056. case 57:
  2057. YY_RULE_SETUP
  2058. { TOKEN (_NEALL); }
  2059. YY_BREAK
  2060. case 58:
  2061. YY_RULE_SETUP
  2062. { TOKEN (_ALLOFALL); }
  2063. YY_BREAK
  2064. case 59:
  2065. YY_RULE_SETUP
  2066. { TOKEN (_SOMEOFALL); }
  2067. YY_BREAK
  2068. // *************
  2069. // VECTOR SPACE TOKENS
  2070. // *************
  2071. case 60:
  2072. YY_RULE_SETUP
  2073. { STRING_VALUE(_VEMETHOD, TRUE, TRUE); }
  2074. YY_BREAK
  2075. case 61:
  2076. YY_RULE_SETUP
  2077. { STRING_VALUE(_VEMETHOD, TRUE, FALSE); }
  2078. YY_BREAK
  2079. case 62:
  2080. YY_RULE_SETUP
  2081. {
  2082. // makes more sense to enter phrase mode
  2083. // rather than freetext mode.
  2084. fContinueImplicitPhrase = TRUE;
  2085. BEGIN implicitphrase;
  2086. TOKEN (_VE);
  2087. }
  2088. YY_BREAK
  2089. case 63:
  2090. YY_RULE_SETUP
  2091. { TOKEN (_VECTOR_END); }
  2092. YY_BREAK
  2093. // *************
  2094. // longhand NEAR
  2095. // *************
  2096. // must return both unit and distance, so use start state to pull them out, and
  2097. // return _NEAR_END so parser knows we hit the closing }
  2098. case 64:
  2099. YY_RULE_SETUP
  2100. { yaccDebugOut(( DEB_ITRACE, "Longhand _NEAR token, begin innear\n" ));
  2101. BEGIN innear; }
  2102. YY_BREAK
  2103. case 65:
  2104. YY_RULE_SETUP
  2105. { yaccDebugOut(( DEB_ITRACE, "Longhand _NEAR{ token, begin innear\n" ));
  2106. yyless(yyleng-1);
  2107. BEGIN innear; }
  2108. YY_BREAK
  2109. // ************
  2110. // WEIGHT
  2111. // ************
  2112. case 66:
  2113. YY_RULE_SETUP
  2114. {
  2115. if (fContinueImplicitPhrase)
  2116. {
  2117. BEGIN implicitphrase;
  2118. fContinueImplicitPhrase = FALSE;
  2119. }
  2120. yaccDebugOut(( DEB_ITRACE, "_WEIGHT TOKEN FOUND!!\n" ));
  2121. STRING_VALUE(_WEIGHT,TRUE,FALSE);
  2122. }
  2123. YY_BREAK
  2124. case 67:
  2125. YY_RULE_SETUP
  2126. {
  2127. if (fContinueImplicitPhrase)
  2128. {
  2129. BEGIN implicitphrase;
  2130. fContinueImplicitPhrase = FALSE;
  2131. }
  2132. TOKEN (_COERCE); }
  2133. YY_BREAK
  2134. // ****************
  2135. // longhand GENERATE
  2136. // ****************
  2137. case 68:
  2138. YY_RULE_SETUP
  2139. {
  2140. if (fContinueImplicitPhrase)
  2141. {
  2142. BEGIN implicitphrase;
  2143. fContinueImplicitPhrase = FALSE;
  2144. }
  2145. yaccDebugOut((DEB_ITRACE, "Prefix recognized.\n"));
  2146. TOKEN(_GENPREFIX);
  2147. }
  2148. YY_BREAK
  2149. case 69:
  2150. YY_RULE_SETUP
  2151. {
  2152. if (fContinueImplicitPhrase)
  2153. {
  2154. BEGIN implicitphrase;
  2155. fContinueImplicitPhrase = FALSE;
  2156. }
  2157. yaccDebugOut((DEB_ITRACE, "Inflect recognized.\n"));
  2158. TOKEN(_GENINFLECT);
  2159. }
  2160. YY_BREAK
  2161. case 70:
  2162. YY_RULE_SETUP
  2163. { TOKEN (_GENNORMAL); }
  2164. YY_BREAK
  2165. // ****************
  2166. // longhand REGEX
  2167. // ****************
  2168. case 71:
  2169. YY_RULE_SETUP
  2170. { STRING_VALUE(_REGEX,TRUE,TRUE);}
  2171. YY_BREAK
  2172. case 72:
  2173. YY_RULE_SETUP
  2174. { STRING_VALUE(_REGEX,TRUE,FALSE);}
  2175. YY_BREAK
  2176. case 73:
  2177. YY_RULE_SETUP
  2178. { STRING_VALUE(_REGEX,TRUE,FALSE);}
  2179. YY_BREAK
  2180. // ****************
  2181. // shorthand REGEX
  2182. // ****************
  2183. // shorthand, quoted
  2184. case 74:
  2185. YY_RULE_SETUP
  2186. {
  2187. // Get into short form of reg expression
  2188. BEGIN shortregex;
  2189. STRING_VALUE(_PROPNAME, FALSE, TRUE);
  2190. }
  2191. YY_BREAK
  2192. // shorthand, not quoted
  2193. case 75:
  2194. YY_RULE_SETUP
  2195. {
  2196. // Get into short form of reg expression
  2197. BEGIN shortregex;
  2198. STRING_VALUE(_PROPNAME, FALSE, FALSE);
  2199. }
  2200. YY_BREAK
  2201. // ***************
  2202. // longhand PHRASE
  2203. // ***************
  2204. // quoted, with trailing * or **
  2205. case 76:
  2206. YY_RULE_SETUP
  2207. {
  2208. // trailing * has to be for inflection -
  2209. // process it in shortgen on next pass.
  2210. // Grab phrase now.
  2211. yyless(yyleng-1);
  2212. BEGIN shortgen;
  2213. STRING_VALUE(_PHRASE,TRUE,TRUE);
  2214. }
  2215. YY_BREAK
  2216. // quoted, without trailing * or **
  2217. case 77:
  2218. YY_RULE_SETUP
  2219. {
  2220. // no trailing * -- phrase only
  2221. STRING_VALUE(_PHRASE,TRUE,TRUE);
  2222. }
  2223. YY_BREAK
  2224. // unquoted, with trailing * or **
  2225. case 78:
  2226. YY_RULE_SETUP
  2227. {
  2228. // trailing * has to be for inflection -
  2229. // process it in shortgen on next pass.
  2230. // Grab phrase now.
  2231. yyless(yyleng-1);
  2232. BEGIN shortgen;
  2233. STRING_VALUE(_PHRASE,TRUE,FALSE);
  2234. }
  2235. YY_BREAK
  2236. // unquoted, without trailing * or **
  2237. case 79:
  2238. YY_RULE_SETUP
  2239. {
  2240. // no trailing * -- phrase only
  2241. STRING_VALUE(_PHRASE,TRUE,FALSE);
  2242. }
  2243. YY_BREAK
  2244. // *************
  2245. // shorthand PHRASE
  2246. // *************
  2247. // with trailing * or **
  2248. case 80:
  2249. YY_RULE_SETUP
  2250. {
  2251. // trailing * has to be for inflection -
  2252. // process it in shortgen on next pass.
  2253. // Grab phrase now.
  2254. yyless(yyleng-1);
  2255. BEGIN shortgen;
  2256. STRING_VALUE(_PHRASE, FALSE, TRUE);
  2257. }
  2258. YY_BREAK
  2259. // without trailing * or **
  2260. case 81:
  2261. YY_RULE_SETUP
  2262. {
  2263. // no trailing * -- phrase only
  2264. STRING_VALUE(_PHRASE, FALSE, TRUE);
  2265. }
  2266. YY_BREAK
  2267. // *****************
  2268. // longhand FREETEXT
  2269. // *****************
  2270. // quoted, with trailing * or **
  2271. case 82:
  2272. YY_RULE_SETUP
  2273. {
  2274. // trailing * has to be for inflection -
  2275. // process it in shortgen on next pass.
  2276. // Grab freetext now.
  2277. yyless(yyleng-1);
  2278. BEGIN shortgen;
  2279. STRING_VALUE(_FREETEXT,TRUE,TRUE);
  2280. }
  2281. YY_BREAK
  2282. // quoted, without trailing * or **
  2283. case 83:
  2284. YY_RULE_SETUP
  2285. {
  2286. // no trailing * -- freetext only
  2287. STRING_VALUE(_FREETEXT,TRUE,TRUE);
  2288. }
  2289. YY_BREAK
  2290. // unquoted, with trailing * or **
  2291. case 84:
  2292. YY_RULE_SETUP
  2293. {
  2294. // trailing * has to be for inflection -
  2295. // process it in shortgen on next pass.
  2296. // Grab freetext now.
  2297. yyless(yyleng-1);
  2298. BEGIN shortgen;
  2299. STRING_VALUE(_FREETEXT,TRUE,FALSE);
  2300. }
  2301. YY_BREAK
  2302. // unquoted, without trailing * or **
  2303. case 85:
  2304. YY_RULE_SETUP
  2305. {
  2306. // no trailing * -- freetext only
  2307. STRING_VALUE(_FREETEXT,TRUE,FALSE);
  2308. }
  2309. YY_BREAK
  2310. // ******************
  2311. // shorthand FREETEXT
  2312. // ******************
  2313. case 86:
  2314. YY_RULE_SETUP
  2315. {
  2316. // For backward compatibility, we want to special
  2317. // case and recognize the "not" operator when it
  2318. // is immediately followed by a mode specifier character
  2319. // (@, $, #). For e.g. "not@size > 2" should be treated
  2320. // as if we have a "not" operator followed by "@size > 2".
  2321. // Without this special case, "not@size > 2" gets recognized
  2322. // as free text.
  2323. if (IsNotOperator())
  2324. {
  2325. yyless(3);
  2326. BEGIN INITIAL;
  2327. TOKEN(_NOT);
  2328. }
  2329. yaccDebugOut(( DEB_ITRACE, "fTreatFreetextAsPhrase is %d\n", fTreatFreetextAsPhrase ));
  2330. if (fTreatFreetextAsPhrase)
  2331. BEGIN implicitphrase;
  2332. else
  2333. BEGIN infreefreetext;
  2334. fTreatFreetextAsPhrase = FALSE;
  2335. yymore();
  2336. }
  2337. YY_BREAK
  2338. case 87:
  2339. YY_RULE_SETUP
  2340. {
  2341. // IsNotOperator is used here for the same reason as the
  2342. // use above, except that this rule covers situations where
  2343. // we have no spaces in the query. E.g. "not@size>2".
  2344. // This should be equivalent to
  2345. // "not@size > 2", which in turn should be equivalent to
  2346. // "not @size > 2"
  2347. if (IsNotOperator())
  2348. {
  2349. yyless(3);
  2350. BEGIN INITIAL;
  2351. TOKEN(_NOT);
  2352. }
  2353. if (fTreatFreetextAsPhrase)
  2354. {
  2355. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2356. }
  2357. else
  2358. {
  2359. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2360. }
  2361. fTreatFreetextAsPhrase = FALSE;
  2362. }
  2363. YY_BREAK
  2364. // *************
  2365. // VECTOR VALUES
  2366. // *************
  2367. // quoted multi-value vector - has ; separator. Singlets caught in parser
  2368. case 88:
  2369. YY_RULE_SETUP
  2370. { BEGIN invector; yyless(1);}
  2371. YY_BREAK
  2372. // unquoted multi-value vector - has ; separator. Singlets caught in parser
  2373. case 89:
  2374. YY_RULE_SETUP
  2375. { BEGIN invector; yyless(1);}
  2376. YY_BREAK
  2377. //
  2378. // INNEAR: longhand NEAR processing
  2379. //
  2380. case 90:
  2381. YY_RULE_SETUP
  2382. {}
  2383. YY_BREAK
  2384. case 91:
  2385. YY_RULE_SETUP
  2386. {}
  2387. YY_BREAK
  2388. case 92:
  2389. YY_RULE_SETUP
  2390. { STRING_VALUE(_NEARDIST,TRUE,FALSE);}
  2391. YY_BREAK
  2392. case 93:
  2393. YY_RULE_SETUP
  2394. { STRING_VALUE(_NEARUNIT,TRUE,FALSE);}
  2395. YY_BREAK
  2396. case 94:
  2397. YY_RULE_SETUP
  2398. { STRING_VALUE(_NEARUNIT,TRUE,FALSE);}
  2399. YY_BREAK
  2400. case 95:
  2401. YY_RULE_SETUP
  2402. { STRING_VALUE(_NEARUNIT,TRUE,FALSE);}
  2403. YY_BREAK
  2404. case 96:
  2405. YY_RULE_SETUP
  2406. { STRING_VALUE(_NEARUNIT,TRUE,FALSE);}
  2407. YY_BREAK
  2408. case 97:
  2409. YY_RULE_SETUP
  2410. { BEGIN implicitphrase; TOKEN (_NEAR_END);}
  2411. YY_BREAK
  2412. //
  2413. // INVECTOR: multi value vector processing
  2414. //
  2415. case 98:
  2416. YY_RULE_SETUP
  2417. {}
  2418. YY_BREAK
  2419. case 99:
  2420. YY_RULE_SETUP
  2421. {}
  2422. YY_BREAK
  2423. case 100:
  2424. YY_RULE_SETUP
  2425. { STRING_VALUE(_VECTORELEMENT, FALSE, TRUE);}
  2426. YY_BREAK
  2427. case 101:
  2428. YY_RULE_SETUP
  2429. { STRING_VALUE(_VECTORELEMENT, TRUE, FALSE);}
  2430. YY_BREAK
  2431. case 102:
  2432. YY_RULE_SETUP
  2433. {
  2434. // Need to emit _VECTORELEMENT and _VE_END -- so backup 1
  2435. // so we can emit _VE_END on next pass
  2436. yyless(yyleng-1);
  2437. STRING_VALUE(_VECTORELEMENT, FALSE, FALSE);
  2438. }
  2439. YY_BREAK
  2440. case 103:
  2441. YY_RULE_SETUP
  2442. { BEGIN INITIAL; TOKEN (_VE_END); }
  2443. YY_BREAK
  2444. //
  2445. // INFREEFREETEXT: shorthand FREETEXT processing
  2446. //
  2447. // NOTE: and, or, near need to be localized
  2448. case 104:
  2449. YY_RULE_SETUP
  2450. { yymore(); }
  2451. YY_BREAK
  2452. case 105:
  2453. YY_RULE_SETUP
  2454. {
  2455. yyless(yyleng-4);
  2456. BEGIN INITIAL;
  2457. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2458. }
  2459. YY_BREAK
  2460. case 106:
  2461. YY_RULE_SETUP
  2462. {
  2463. yyless(yyleng-4);
  2464. BEGIN INITIAL;
  2465. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2466. }
  2467. YY_BREAK
  2468. case 107:
  2469. YY_RULE_SETUP
  2470. {
  2471. yyless(yyleng-3);
  2472. BEGIN INITIAL;
  2473. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2474. }
  2475. YY_BREAK
  2476. case 108:
  2477. YY_RULE_SETUP
  2478. {
  2479. yyless(yyleng-3);
  2480. BEGIN INITIAL;
  2481. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2482. }
  2483. YY_BREAK
  2484. case 109:
  2485. YY_RULE_SETUP
  2486. {
  2487. yaccDebugOut(( DEB_ITRACE, "{infreefreetext}{near}[ ]\n" ));
  2488. yyless(yyleng-5);
  2489. fTreatFreetextAsPhrase = TRUE;
  2490. BEGIN INITIAL;
  2491. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2492. }
  2493. YY_BREAK
  2494. case 110:
  2495. YY_RULE_SETUP
  2496. {
  2497. yaccDebugOut(( DEB_ITRACE, "{infreefreetext}{near}{\n" ));
  2498. yyless(yyleng-5);
  2499. fTreatFreetextAsPhrase = TRUE;
  2500. BEGIN INITIAL;
  2501. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2502. }
  2503. YY_BREAK
  2504. case 111:
  2505. YY_RULE_SETUP
  2506. {
  2507. yaccDebugOut(( DEB_ITRACE, "{infreefreetext}{{near}\n" ));
  2508. yyless(yyleng-6);
  2509. fTreatFreetextAsPhrase = TRUE;
  2510. BEGIN INITIAL;
  2511. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2512. }
  2513. YY_BREAK
  2514. case 112:
  2515. YY_RULE_SETUP
  2516. {
  2517. yaccDebugOut(( DEB_ITRACE, "{infreefreetext}{{near}{\n" ));
  2518. yyless(yyleng-6);
  2519. fTreatFreetextAsPhrase = TRUE;
  2520. BEGIN INITIAL;
  2521. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2522. }
  2523. YY_BREAK
  2524. case 113:
  2525. YY_RULE_SETUP
  2526. {
  2527. yyless(yyleng-1);
  2528. BEGIN INITIAL;
  2529. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2530. }
  2531. YY_BREAK
  2532. case 114:
  2533. YY_RULE_SETUP
  2534. {
  2535. yyless(yyleng-1);
  2536. BEGIN INITIAL;
  2537. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2538. }
  2539. YY_BREAK
  2540. case 115:
  2541. YY_RULE_SETUP
  2542. {
  2543. yyless(yyleng-1);
  2544. fTreatFreetextAsPhrase = TRUE;
  2545. BEGIN INITIAL;
  2546. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2547. }
  2548. YY_BREAK
  2549. case 116:
  2550. YY_RULE_SETUP
  2551. {
  2552. yyless(yyleng-1);
  2553. BEGIN INITIAL;
  2554. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2555. }
  2556. YY_BREAK
  2557. case 117:
  2558. YY_RULE_SETUP
  2559. {
  2560. yyless(yyleng-1);
  2561. BEGIN INITIAL;
  2562. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2563. }
  2564. YY_BREAK
  2565. case 118:
  2566. YY_RULE_SETUP
  2567. {
  2568. yyless(yyleng-1);
  2569. BEGIN INITIAL;
  2570. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2571. }
  2572. YY_BREAK
  2573. case 119:
  2574. YY_RULE_SETUP
  2575. {
  2576. BEGIN INITIAL;
  2577. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2578. }
  2579. YY_BREAK
  2580. case 120:
  2581. YY_RULE_SETUP
  2582. { yymore(); }
  2583. YY_BREAK
  2584. case 121:
  2585. YY_RULE_SETUP
  2586. {
  2587. BEGIN INITIAL;
  2588. STRING_VALUE(_FREETEXT,FALSE,FALSE);
  2589. }
  2590. YY_BREAK
  2591. //
  2592. // SHORTGEN: * or ** processing
  2593. //
  2594. // can only get here by backing up over *,
  2595. // so we will always find a match
  2596. case 122:
  2597. YY_RULE_SETUP
  2598. {
  2599. BEGIN INITIAL;
  2600. TOKEN(_SHGENINFLECT);
  2601. }
  2602. YY_BREAK
  2603. case 123:
  2604. YY_RULE_SETUP
  2605. {
  2606. BEGIN INITIAL;
  2607. TOKEN(_SHGENPREFIX);
  2608. }
  2609. YY_BREAK
  2610. //
  2611. // SHORTREGEX: #propname processing
  2612. //
  2613. // can only get here when #"propname" or #propname
  2614. // (quoted or unquoted) version is detected.
  2615. // NOTE: and, or need to be localized
  2616. // NOTE: It doesn't make sense to have the near operator following
  2617. // a regular expression. A regex is Boolean and doesn't evaluate
  2618. // to a position value.
  2619. //
  2620. //
  2621. case 124:
  2622. YY_RULE_SETUP
  2623. { yymore(); }
  2624. YY_BREAK
  2625. case 125:
  2626. YY_RULE_SETUP
  2627. {
  2628. // ignore equal operators...
  2629. BEGIN shortregex;
  2630. }
  2631. YY_BREAK
  2632. case 126:
  2633. YY_RULE_SETUP
  2634. { STRING_VALUE(_REGEX, FALSE, TRUE);}
  2635. YY_BREAK
  2636. case 127:
  2637. YY_RULE_SETUP
  2638. {
  2639. fContinueRegex = TRUE;
  2640. yyless(yyleng-4);
  2641. BEGIN INITIAL;
  2642. STRING_VALUE(_REGEX,FALSE,FALSE);
  2643. }
  2644. YY_BREAK
  2645. case 128:
  2646. YY_RULE_SETUP
  2647. {
  2648. fContinueRegex = TRUE;
  2649. yyless(yyleng-3);
  2650. BEGIN INITIAL;
  2651. STRING_VALUE(_REGEX,FALSE,FALSE);
  2652. }
  2653. YY_BREAK
  2654. case 129:
  2655. YY_RULE_SETUP
  2656. {
  2657. yyless(yyleng-4);
  2658. // The only valid way to get here is to
  2659. // have had seen "and" before. Don't recognize
  2660. // a regex. Back off and let the lexer takes its
  2661. // normal course.
  2662. fContinueRegex = TRUE;
  2663. BEGIN INITIAL;
  2664. }
  2665. YY_BREAK
  2666. case 130:
  2667. YY_RULE_SETUP
  2668. {
  2669. fContinueRegex = TRUE;
  2670. yyless(yyleng-1);
  2671. BEGIN INITIAL;
  2672. STRING_VALUE(_REGEX,FALSE,FALSE);
  2673. }
  2674. YY_BREAK
  2675. case 131:
  2676. YY_RULE_SETUP
  2677. {
  2678. fContinueRegex = TRUE;
  2679. yyless(yyleng-1);
  2680. BEGIN INITIAL;
  2681. STRING_VALUE(_REGEX,FALSE,FALSE);
  2682. }
  2683. YY_BREAK
  2684. case 132:
  2685. YY_RULE_SETUP
  2686. {
  2687. yyless(yyleng-1);
  2688. // The only valid way to get here is to
  2689. // have had seen "and" before. Don't recognize
  2690. // a phrase. Back off and let the lexer takes its
  2691. // normal course.
  2692. fContinueRegex = TRUE;
  2693. BEGIN INITIAL;
  2694. }
  2695. YY_BREAK
  2696. // When we find an operator we should treat it as one.
  2697. // So backup and get out if you see one.
  2698. // Normally '^' is treated as part of an operator (e.g. ^a), but it also
  2699. // has a special meaning in regular expression syntax. So we will have to
  2700. // let it through when it is part of a regular expression. As an alternative,
  2701. // we can allow '^' in regular expression in a limited manner (i.e. only the use
  2702. // in square brackets to exclude the set of chars "[^abc]" where abc are excluded).
  2703. // This alternative will let the common case use of '^' in a regular expression
  2704. // while allowing it to be treated as part of an operator when it doesn't
  2705. // occur immediately after a '['.
  2706. // We are implementing the alternative here because our regex capability
  2707. // only allows for the "[^" construct.
  2708. case 133:
  2709. YY_RULE_SETUP
  2710. {
  2711. yyless(yyleng-1);
  2712. fContinueRegex = FALSE;
  2713. BEGIN INITIAL;
  2714. }
  2715. YY_BREAK
  2716. case 134:
  2717. YY_RULE_SETUP
  2718. {
  2719. yyless(yyleng-1);
  2720. BEGIN INITIAL;
  2721. STRING_VALUE(_REGEX,FALSE,FALSE);
  2722. }
  2723. YY_BREAK
  2724. case 135:
  2725. YY_RULE_SETUP
  2726. {
  2727. yyless(yyleng-1);
  2728. BEGIN INITIAL;
  2729. STRING_VALUE(_REGEX,FALSE,FALSE);
  2730. }
  2731. YY_BREAK
  2732. case 136:
  2733. YY_RULE_SETUP
  2734. {
  2735. yyless(yyleng-1);
  2736. BEGIN INITIAL;
  2737. STRING_VALUE(_REGEX,FALSE,FALSE);
  2738. }
  2739. YY_BREAK
  2740. case 137:
  2741. YY_RULE_SETUP
  2742. { yymore(); }
  2743. YY_BREAK
  2744. case 138:
  2745. YY_RULE_SETUP
  2746. {
  2747. fContinueRegex = TRUE;
  2748. BEGIN INITIAL;
  2749. STRING_VALUE(_REGEX,FALSE,FALSE);
  2750. }
  2751. YY_BREAK
  2752. case 139:
  2753. YY_RULE_SETUP
  2754. {
  2755. yyless(yyleng-4);
  2756. fContinueMaybeRegex = TRUE;
  2757. BEGIN INITIAL;
  2758. STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
  2759. }
  2760. YY_BREAK
  2761. case 140:
  2762. YY_RULE_SETUP
  2763. {
  2764. yyless(yyleng-3);
  2765. fContinueMaybeRegex = TRUE;
  2766. BEGIN INITIAL;
  2767. STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
  2768. }
  2769. YY_BREAK
  2770. case 141:
  2771. YY_RULE_SETUP
  2772. {
  2773. yyless(yyleng-4);
  2774. // The only valid way to get here is to
  2775. // have had seen "and" before. Don't recognize
  2776. // a regex. Back off and let the lexer takes its
  2777. // normal course.
  2778. fContinueMaybeRegex = TRUE;
  2779. BEGIN INITIAL;
  2780. }
  2781. YY_BREAK
  2782. case 142:
  2783. YY_RULE_SETUP
  2784. {
  2785. fContinueMaybeRegex = TRUE;
  2786. yyless(yyleng-1);
  2787. BEGIN INITIAL;
  2788. STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
  2789. }
  2790. YY_BREAK
  2791. case 143:
  2792. YY_RULE_SETUP
  2793. {
  2794. fContinueMaybeRegex = TRUE;
  2795. yyless(yyleng-1);
  2796. BEGIN INITIAL;
  2797. STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
  2798. }
  2799. YY_BREAK
  2800. case 144:
  2801. YY_RULE_SETUP
  2802. {
  2803. yyless(yyleng-1);
  2804. // The only valid way to get here is to
  2805. // have had seen "and" before. Don't recognize
  2806. // a phrase. Back off and let the lexer takes its
  2807. // normal course.
  2808. fContinueMaybeRegex = TRUE;
  2809. BEGIN INITIAL;
  2810. }
  2811. YY_BREAK
  2812. case 145:
  2813. YY_RULE_SETUP
  2814. {
  2815. yyless(yyleng-1);
  2816. BEGIN INITIAL;
  2817. STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
  2818. }
  2819. YY_BREAK
  2820. case 146:
  2821. YY_RULE_SETUP
  2822. {
  2823. yyless(yyleng-1);
  2824. BEGIN INITIAL;
  2825. STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
  2826. }
  2827. YY_BREAK
  2828. case 147:
  2829. YY_RULE_SETUP
  2830. {
  2831. yyless(yyleng-1);
  2832. BEGIN INITIAL;
  2833. STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
  2834. }
  2835. YY_BREAK
  2836. case 148:
  2837. YY_RULE_SETUP
  2838. { yymore(); }
  2839. YY_BREAK
  2840. case 149:
  2841. YY_RULE_SETUP
  2842. { STRING_VALUE(_PHRASE, FALSE, TRUE);}
  2843. YY_BREAK
  2844. case 150:
  2845. YY_RULE_SETUP
  2846. { yymore(); }
  2847. YY_BREAK
  2848. case 151:
  2849. YY_RULE_SETUP
  2850. {
  2851. fContinueMaybeRegex = TRUE;
  2852. BEGIN INITIAL;
  2853. STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
  2854. }
  2855. YY_BREAK
  2856. // When we find an operator at the start of a phrase,
  2857. // we should treat it as one. So backup and get out if you see one.
  2858. case 152:
  2859. YY_RULE_SETUP
  2860. {
  2861. yyless(yyleng-1);
  2862. fContinueMaybeRegex = FALSE;
  2863. BEGIN INITIAL;
  2864. }
  2865. YY_BREAK
  2866. //
  2867. // IMPLICITPHRASE: Where phrase is implied.
  2868. //
  2869. // can only get here when @propname or {prop name = propname} is detected.
  2870. // NOTE: and, or, not need to be localized when time permits.
  2871. //
  2872. // NTRAID#DB-NTBUG9-84571-2000/07/31-dlee Indexing Service tripolish2 query expressions misinterpreted as strings
  2873. // if expression has trailing blanks, we'll emit a string value
  2874. case 153:
  2875. YY_RULE_SETUP
  2876. {
  2877. fContinueImplicitPhrase = FALSE;
  2878. BEGIN INITIAL;
  2879. STRING_VALUE(_PHRASE, FALSE, TRUE);
  2880. }
  2881. YY_BREAK
  2882. case 154:
  2883. YY_RULE_SETUP
  2884. { yymore(); }
  2885. YY_BREAK
  2886. case 155:
  2887. YY_RULE_SETUP
  2888. {
  2889. yyless(yyleng-4);
  2890. fContinueImplicitPhrase = TRUE;
  2891. BEGIN INITIAL;
  2892. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2893. }
  2894. YY_BREAK
  2895. case 156:
  2896. YY_RULE_SETUP
  2897. {
  2898. yyless(yyleng-3);
  2899. fContinueImplicitPhrase = TRUE;
  2900. BEGIN INITIAL;
  2901. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2902. }
  2903. YY_BREAK
  2904. case 157:
  2905. YY_RULE_SETUP
  2906. {
  2907. yyless(yyleng-5);
  2908. // We want to treat the following token as a phrase
  2909. fContinueImplicitPhrase = TRUE;
  2910. BEGIN INITIAL;
  2911. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2912. }
  2913. YY_BREAK
  2914. case 158:
  2915. YY_RULE_SETUP
  2916. {
  2917. yyless(yyleng-5);
  2918. // We want to treat the following token as a phrase
  2919. fContinueImplicitPhrase = TRUE;
  2920. BEGIN INITIAL;
  2921. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2922. }
  2923. YY_BREAK
  2924. case 159:
  2925. YY_RULE_SETUP
  2926. {
  2927. yyless(yyleng-4);
  2928. // The only valid way to get here is to
  2929. // have had seen "and" before. Don't recognize
  2930. // a phrase. Back off and let the lexer takes its
  2931. // normal course.
  2932. fContinueImplicitPhrase = TRUE;
  2933. BEGIN INITIAL;
  2934. }
  2935. YY_BREAK
  2936. case 160:
  2937. YY_RULE_SETUP
  2938. {
  2939. yyless(yyleng-1);
  2940. fContinueImplicitPhrase = TRUE;
  2941. BEGIN INITIAL;
  2942. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2943. }
  2944. YY_BREAK
  2945. case 161:
  2946. YY_RULE_SETUP
  2947. {
  2948. yyless(yyleng-1);
  2949. // We want to treat the following token as a phrase
  2950. fContinueImplicitPhrase = TRUE;
  2951. BEGIN INITIAL;
  2952. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2953. }
  2954. YY_BREAK
  2955. case 162:
  2956. YY_RULE_SETUP
  2957. {
  2958. yyless(yyleng-1);
  2959. // The only valid way to get here is to
  2960. // have had seen "and" before. Don't recognize
  2961. // a phrase. Back off and let the lexer takes its
  2962. // normal course.
  2963. fContinueImplicitPhrase = TRUE;
  2964. BEGIN INITIAL;
  2965. }
  2966. YY_BREAK
  2967. case 163:
  2968. YY_RULE_SETUP
  2969. {
  2970. yyless(yyleng-1);
  2971. fContinueImplicitPhrase = TRUE;
  2972. BEGIN INITIAL;
  2973. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2974. }
  2975. YY_BREAK
  2976. case 164:
  2977. YY_RULE_SETUP
  2978. {
  2979. yyless(yyleng-1);
  2980. fContinueImplicitPhrase = FALSE;
  2981. BEGIN INITIAL;
  2982. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2983. }
  2984. YY_BREAK
  2985. case 165:
  2986. YY_RULE_SETUP
  2987. {
  2988. yyless(yyleng-1);
  2989. fContinueImplicitPhrase = FALSE;
  2990. BEGIN INITIAL;
  2991. STRING_VALUE(_PHRASE,FALSE,FALSE);
  2992. }
  2993. YY_BREAK
  2994. case 166:
  2995. YY_RULE_SETUP
  2996. {
  2997. yyless(yyleng-1);
  2998. fContinueImplicitPhrase = TRUE;
  2999. BEGIN INITIAL;
  3000. STRING_VALUE(_PHRASE,FALSE,FALSE);
  3001. }
  3002. YY_BREAK
  3003. case 167:
  3004. YY_RULE_SETUP
  3005. {
  3006. yyless(yyleng-9);
  3007. fContinueImplicitPhrase = TRUE;
  3008. BEGIN INITIAL;
  3009. STRING_VALUE(_PHRASE,FALSE,FALSE);
  3010. }
  3011. YY_BREAK
  3012. // When we find an operator at the start of an implicit phrase,
  3013. // we should treat it as one. So backup and get out if you see one.
  3014. case 168:
  3015. YY_RULE_SETUP
  3016. {
  3017. yyless(yyleng-1);
  3018. fContinueImplicitPhrase = FALSE;
  3019. BEGIN INITIAL;
  3020. }
  3021. YY_BREAK
  3022. // Triplish2 uses = to indicate that whatever appears after it may
  3023. // be using wildcards. Implement that here.
  3024. case 169:
  3025. YY_RULE_SETUP
  3026. {
  3027. yyless(yyleng-1);
  3028. fContinueMaybeRegex = TRUE;
  3029. BEGIN INITIAL;
  3030. }
  3031. YY_BREAK
  3032. case 170:
  3033. YY_RULE_SETUP
  3034. { yymore(); }
  3035. YY_BREAK
  3036. case 171:
  3037. YY_RULE_SETUP
  3038. {
  3039. fContinueImplicitPhrase = TRUE;
  3040. BEGIN INITIAL;
  3041. STRING_VALUE(_PHRASE,FALSE,FALSE);
  3042. }
  3043. YY_BREAK
  3044. case 172:
  3045. YY_RULE_SETUP
  3046. ECHO;
  3047. YY_BREAK
  3048. case YY_STATE_EOF(INITIAL):
  3049. case YY_STATE_EOF(innear):
  3050. case YY_STATE_EOF(shortgen):
  3051. case YY_STATE_EOF(shortregex):
  3052. case YY_STATE_EOF(mayberegex):
  3053. case YY_STATE_EOF(implicitphrase):
  3054. case YY_STATE_EOF(infreefreetext):
  3055. case YY_STATE_EOF(invector):
  3056. yyterminate();
  3057. case YY_END_OF_BUFFER:
  3058. {
  3059. /* Amount of text matched not including the EOB YY_CHAR. */
  3060. int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
  3061. /* Undo the effects of YY_DO_BEFORE_ACTION. */
  3062. *yy_cp = yy_hold_char;
  3063. YY_RESTORE_YY_MORE_OFFSET
  3064. if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
  3065. {
  3066. /* We're scanning a new file or input source. It's
  3067. * possible that this happened because the user
  3068. * just pointed yyin at a new source and called
  3069. * yylex(). If so, then we have to assure
  3070. * consistency between yy_current_buffer and our
  3071. * globals. Here is the right place to do so, because
  3072. * this is the first action (other than possibly a
  3073. * back-up) that will match for the new input source.
  3074. */
  3075. yy_n_chars = yy_current_buffer->yy_n_chars;
  3076. yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
  3077. }
  3078. /* Note that here we test for yy_c_buf_p "<=" to the position
  3079. * of the first EOB in the buffer, since yy_c_buf_p will
  3080. * already have been incremented past the NUL character
  3081. * (since all states make transitions on EOB to the
  3082. * end-of-buffer state). Contrast this with the test
  3083. * in input().
  3084. */
  3085. if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  3086. { /* This was really a NUL. */
  3087. yy_state_type yy_next_state;
  3088. yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  3089. yy_current_state = yy_get_previous_state();
  3090. /* Okay, we're now positioned to make the NUL
  3091. * transition. We couldn't have
  3092. * yy_get_previous_state() go ahead and do it
  3093. * for us because it doesn't know how to deal
  3094. * with the possibility of jamming (and we don't
  3095. * want to build jamming into it because then it
  3096. * will run more slowly).
  3097. */
  3098. yy_next_state = yy_try_NUL_trans( yy_current_state );
  3099. yy_bp = yytext_ptr + YY_MORE_ADJ;
  3100. if ( yy_next_state )
  3101. {
  3102. /* Consume the NUL. */
  3103. yy_cp = ++yy_c_buf_p;
  3104. yy_current_state = yy_next_state;
  3105. goto yy_match;
  3106. }
  3107. else
  3108. {
  3109. yy_cp = yy_last_accepting_cpos;
  3110. yy_current_state = yy_last_accepting_state;
  3111. goto yy_find_action;
  3112. }
  3113. }
  3114. else switch ( yy_get_next_buffer() )
  3115. {
  3116. case EOB_ACT_END_OF_FILE:
  3117. {
  3118. yy_did_buffer_switch_on_eof = 0;
  3119. if ( yywrap() )
  3120. {
  3121. /* Note: because we've taken care in
  3122. * yy_get_next_buffer() to have set up
  3123. * yytext, we can now set up
  3124. * yy_c_buf_p so that if some total
  3125. * hoser (like flex itself) wants to
  3126. * call the scanner after we return the
  3127. * YY_NULL, it'll still work - another
  3128. * YY_NULL will get returned.
  3129. */
  3130. yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  3131. yy_act = YY_STATE_EOF(YY_START);
  3132. goto do_action;
  3133. }
  3134. else
  3135. {
  3136. if ( ! yy_did_buffer_switch_on_eof )
  3137. YY_NEW_FILE;
  3138. }
  3139. break;
  3140. }
  3141. case EOB_ACT_CONTINUE_SCAN:
  3142. yy_c_buf_p =
  3143. yytext_ptr + yy_amount_of_matched_text;
  3144. yy_current_state = yy_get_previous_state();
  3145. yy_cp = yy_c_buf_p;
  3146. yy_bp = yytext_ptr + YY_MORE_ADJ;
  3147. goto yy_match;
  3148. case EOB_ACT_LAST_MATCH:
  3149. yy_c_buf_p =
  3150. &yy_current_buffer->yy_ch_buf[yy_n_chars];
  3151. yy_current_state = yy_get_previous_state();
  3152. yy_cp = yy_c_buf_p;
  3153. yy_bp = yytext_ptr + YY_MORE_ADJ;
  3154. goto yy_find_action;
  3155. }
  3156. break;
  3157. }
  3158. default:
  3159. YY_FATAL_ERROR(
  3160. L"fatal flex scanner internal error--no action found" );
  3161. } /* end of action switch */
  3162. } /* end of scanning one token */
  3163. } /* end of yylex */
  3164. YYLEXER::YYLEXER()
  3165. {
  3166. yy_c_buf_p = 0;
  3167. yy_init = 1;
  3168. yy_start = 0;
  3169. yyprimetoken = 0;
  3170. yy_flex_debug = 0;
  3171. yylineno = 1; // this will only get updated if %option yylineno
  3172. yy_did_buffer_switch_on_eof = 0;
  3173. yy_looking_for_trail_begin = 0;
  3174. yy_more_flag = 0;
  3175. yy_more_len = 0;
  3176. yy_more_offset = yy_prev_more_offset = 0;
  3177. yy_start_stack_ptr = yy_start_stack_depth = 0;
  3178. yy_start_stack = 0;
  3179. yy_current_buffer = 0;
  3180. #ifdef YY_USES_REJECT
  3181. yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
  3182. #else
  3183. yy_state_buf = 0;
  3184. #endif
  3185. pszInputBuffer = pCurBuffer = (YY_CHAR *)NULL;
  3186. cInputBuffer = 0;
  3187. // Initialize these flags for this lexical session. They will be
  3188. // set/reset within the lexer to control flow.
  3189. fContinueImplicitPhrase = FALSE;
  3190. fContinueMaybeRegex = FALSE;
  3191. fContinueRegex = FALSE;
  3192. fTreatFreetextAsPhrase = FALSE;
  3193. #ifdef DEBUG
  3194. tkndebug = getenv("TKNDEBUG") ? 1 : 0;
  3195. #endif
  3196. }
  3197. YYLEXER::~YYLEXER()
  3198. {
  3199. delete yy_state_buf;
  3200. yy_delete_buffer( yy_current_buffer );
  3201. yy_flex_free(pszInputBuffer);
  3202. }
  3203. #ifdef YY_INTERACTIVE
  3204. int YYLEXER::LexerInput( YY_CHAR* buf, int /* max_size */ )
  3205. #else
  3206. int YYLEXER::LexerInput( YY_CHAR* buf, int max_size )
  3207. #endif
  3208. {
  3209. return 0;
  3210. }
  3211. void YYLEXER::LexerOutput( const YY_CHAR* buf, int size )
  3212. {
  3213. // everthing should match
  3214. THROW( CException( QPARSE_E_INVALID_QUERY ) );
  3215. return;
  3216. }
  3217. #ifdef DEBUG
  3218. void YYLEXER::LexerTrace(const YY_CHAR* buf, int size, int tknNum)
  3219. {
  3220. if (tkndebug > 0)
  3221. {
  3222. cout << ">> Lexing Token : ";
  3223. for (int i=0; i<size; i++)
  3224. cout << char(buf[i]);
  3225. cout << " (" << tknNum << ")"<< endl;
  3226. }
  3227. }
  3228. #endif
  3229. void YYLEXER::ResetLexer()
  3230. {
  3231. yy_init = 1;
  3232. yy_start = 0;
  3233. #ifdef DEBUG
  3234. tkndebug = getenv("TKNTRACE") ? 1 : 0;
  3235. #endif
  3236. }
  3237. int YYLEXER::yybufferinput(YY_CHAR *pszBuffer, int cMax)
  3238. {
  3239. int n = min(cMax, cInputBuffer - (int) (pCurBuffer - pszInputBuffer));
  3240. if (n > 0)
  3241. {
  3242. memcpy(pszBuffer, pCurBuffer, n * sizeof(WCHAR));
  3243. pCurBuffer += n;
  3244. }
  3245. return n;
  3246. }
  3247. void YYLEXER::yyprimebuffer(const YY_CHAR *pszBuffer)
  3248. {
  3249. // if (NULL != pszInputBuffer)
  3250. // CoTaskMemFree(pszInputBuffer);
  3251. Win4Assert(0 == pszInputBuffer);
  3252. cInputBuffer = wcslen(pszBuffer) + 1;
  3253. pszInputBuffer = pCurBuffer = new WCHAR[cInputBuffer];
  3254. RtlCopyMemory(pszInputBuffer, pszBuffer, cInputBuffer*sizeof(WCHAR));
  3255. cInputBuffer--; // get the real length
  3256. ResetLexer();
  3257. }
  3258. /* yy_get_next_buffer - try to read in a new buffer
  3259. *
  3260. * Returns a code representing an action:
  3261. * EOB_ACT_LAST_MATCH -
  3262. * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  3263. * EOB_ACT_END_OF_FILE - end of file
  3264. */
  3265. int YYLEXER::yy_get_next_buffer()
  3266. {
  3267. register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
  3268. register YY_CHAR *source = yytext_ptr;
  3269. register int number_to_move, i;
  3270. int ret_val;
  3271. if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  3272. YY_FATAL_ERROR(
  3273. L"fatal flex scanner internal error--end of buffer missed" );
  3274. if ( yy_current_buffer->yy_fill_buffer == 0 )
  3275. { /* Don't try to fill the buffer, so this is an EOF. */
  3276. if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  3277. {
  3278. /* We matched a single character, the EOB, so
  3279. * treat this as a final EOF.
  3280. */
  3281. return EOB_ACT_END_OF_FILE;
  3282. }
  3283. else
  3284. {
  3285. /* We matched some text prior to the EOB, first
  3286. * process it.
  3287. */
  3288. return EOB_ACT_LAST_MATCH;
  3289. }
  3290. }
  3291. /* Try to read more data. */
  3292. /* First move last chars to start of buffer. */
  3293. number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
  3294. for ( i = 0; i < number_to_move; ++i )
  3295. *(dest++) = *(source++);
  3296. if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  3297. /* don't do the read, it's not guaranteed to return an EOF,
  3298. * just force an EOF
  3299. */
  3300. yy_current_buffer->yy_n_chars = yy_n_chars = 0;
  3301. else
  3302. {
  3303. int num_to_read =
  3304. yy_current_buffer->yy_buf_size - number_to_move - 1;
  3305. while ( num_to_read <= 0 )
  3306. { /* Not enough room in the buffer - grow it. */
  3307. #ifdef YY_USES_REJECT
  3308. YY_FATAL_ERROR(
  3309. L"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
  3310. #else
  3311. /* just a shorter name for the current buffer */
  3312. YY_BUFFER_STATE b = yy_current_buffer;
  3313. int yy_c_buf_p_offset =
  3314. (int) (yy_c_buf_p - b->yy_ch_buf);
  3315. if ( b->yy_is_our_buffer )
  3316. {
  3317. int new_size = b->yy_buf_size * 2;
  3318. if ( new_size <= 0 )
  3319. b->yy_buf_size += b->yy_buf_size / 8;
  3320. else
  3321. b->yy_buf_size *= 2;
  3322. b->yy_ch_buf = (YY_CHAR *)
  3323. /* Include room in for 2 EOB chars. */
  3324. yy_flex_realloc( (void *) b->yy_ch_buf,
  3325. b->yy_buf_size,
  3326. b->yy_buf_size + 2 );
  3327. }
  3328. else
  3329. /* Can't grow it, we don't own it. */
  3330. b->yy_ch_buf = 0;
  3331. yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  3332. num_to_read = yy_current_buffer->yy_buf_size -
  3333. number_to_move - 1;
  3334. #endif
  3335. }
  3336. if ( num_to_read > YY_READ_BUF_SIZE )
  3337. num_to_read = YY_READ_BUF_SIZE;
  3338. /* Read in more data. */
  3339. YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  3340. yy_n_chars, num_to_read );
  3341. yy_current_buffer->yy_n_chars = yy_n_chars;
  3342. }
  3343. if ( yy_n_chars == 0 )
  3344. {
  3345. if ( number_to_move == YY_MORE_ADJ )
  3346. {
  3347. ret_val = EOB_ACT_END_OF_FILE;
  3348. yyrestart( );
  3349. }
  3350. else
  3351. {
  3352. ret_val = EOB_ACT_LAST_MATCH;
  3353. yy_current_buffer->yy_buffer_status =
  3354. YY_BUFFER_EOF_PENDING;
  3355. }
  3356. }
  3357. else
  3358. ret_val = EOB_ACT_CONTINUE_SCAN;
  3359. yy_n_chars += number_to_move;
  3360. yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  3361. yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  3362. yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
  3363. return ret_val;
  3364. }
  3365. /* yy_get_previous_state - get the state just before the EOB YY_CHAR was reached */
  3366. yy_state_type YYLEXER::yy_get_previous_state()
  3367. {
  3368. register yy_state_type yy_current_state;
  3369. register YY_CHAR *yy_cp;
  3370. yy_current_state = yy_start;
  3371. for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  3372. {
  3373. register YY_CHAR yy_c = 1; if (0!= *yy_cp && 256 > *yy_cp) yy_c = (YY_CHAR) yy_ec[YY_SC_TO_UI(*yy_cp)];
  3374. if ( yy_accept[yy_current_state] )
  3375. {
  3376. yy_last_accepting_state = yy_current_state;
  3377. yy_last_accepting_cpos = yy_cp;
  3378. }
  3379. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  3380. {
  3381. yy_current_state = (int) yy_def[yy_current_state];
  3382. if ( yy_current_state >= 804 )
  3383. yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
  3384. }
  3385. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  3386. }
  3387. return yy_current_state;
  3388. }
  3389. /* yy_try_NUL_trans - try to make a transition on the NUL character
  3390. *
  3391. * synopsis
  3392. * next_state = yy_try_NUL_trans( current_state );
  3393. */
  3394. yy_state_type YYLEXER::yy_try_NUL_trans( yy_state_type yy_current_state )
  3395. {
  3396. register int yy_is_jam;
  3397. register YY_CHAR *yy_cp = yy_c_buf_p;
  3398. register YY_CHAR yy_c = 1;
  3399. if ( yy_accept[yy_current_state] )
  3400. {
  3401. yy_last_accepting_state = yy_current_state;
  3402. yy_last_accepting_cpos = yy_cp;
  3403. }
  3404. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  3405. {
  3406. yy_current_state = (int) yy_def[yy_current_state];
  3407. if ( yy_current_state >= 804 )
  3408. yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
  3409. }
  3410. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  3411. yy_is_jam = (yy_current_state == 803);
  3412. return yy_is_jam ? 0 : yy_current_state;
  3413. }
  3414. void YYLEXER::yyunput( int c, register YY_CHAR* yy_bp )
  3415. {
  3416. register YY_CHAR *yy_cp = yy_c_buf_p;
  3417. /* undo effects of setting up yytext */
  3418. *yy_cp = yy_hold_char;
  3419. if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  3420. { /* need to shift things up to make room */
  3421. /* +2 for EOB chars. */
  3422. register int number_to_move = yy_n_chars + 2;
  3423. register YY_CHAR *dest = &yy_current_buffer->yy_ch_buf[
  3424. yy_current_buffer->yy_buf_size + 2];
  3425. register YY_CHAR *source =
  3426. &yy_current_buffer->yy_ch_buf[number_to_move];
  3427. while ( source > yy_current_buffer->yy_ch_buf )
  3428. *--dest = *--source;
  3429. yy_cp += (int) (dest - source);
  3430. yy_bp += (int) (dest - source);
  3431. yy_current_buffer->yy_n_chars =
  3432. yy_n_chars = yy_current_buffer->yy_buf_size;
  3433. if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  3434. YY_FATAL_ERROR( L"flex scanner push-back overflow" );
  3435. }
  3436. *--yy_cp = (YY_CHAR) c;
  3437. yytext_ptr = yy_bp;
  3438. yy_hold_char = *yy_cp;
  3439. yy_c_buf_p = yy_cp;
  3440. }
  3441. int YYLEXER::yyinput()
  3442. {
  3443. int c;
  3444. *yy_c_buf_p = yy_hold_char;
  3445. if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  3446. {
  3447. /* yy_c_buf_p now points to the character we want to return.
  3448. * If this occurs *before* the EOB characters, then it's a
  3449. * valid NUL; if not, then we've hit the end of the buffer.
  3450. */
  3451. if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  3452. /* This was really a NUL. */
  3453. *yy_c_buf_p = '\0';
  3454. else
  3455. { /* need more input */
  3456. int offset = (int)(yy_c_buf_p - yytext_ptr);
  3457. ++yy_c_buf_p;
  3458. switch ( yy_get_next_buffer() )
  3459. {
  3460. case EOB_ACT_LAST_MATCH:
  3461. /* This happens because yy_g_n_b()
  3462. * sees that we've accumulated a
  3463. * token and flags that we need to
  3464. * try matching the token before
  3465. * proceeding. But for input(),
  3466. * there's no matching to consider.
  3467. * So convert the EOB_ACT_LAST_MATCH
  3468. * to EOB_ACT_END_OF_FILE.
  3469. */
  3470. /* Reset buffer status. */
  3471. yyrestart( );
  3472. /* fall through */
  3473. case EOB_ACT_END_OF_FILE:
  3474. {
  3475. if ( yywrap() )
  3476. return EOF;
  3477. if ( ! yy_did_buffer_switch_on_eof )
  3478. YY_NEW_FILE;
  3479. #ifdef __cplusplus
  3480. return yyinput();
  3481. #else
  3482. return input();
  3483. #endif
  3484. }
  3485. case EOB_ACT_CONTINUE_SCAN:
  3486. yy_c_buf_p = yytext_ptr + offset;
  3487. break;
  3488. }
  3489. }
  3490. }
  3491. c = *(YY_CHAR *) yy_c_buf_p; /* cast for 8-bit YY_CHAR's */
  3492. *yy_c_buf_p = '\0'; /* preserve yytext */
  3493. yy_hold_char = *++yy_c_buf_p;
  3494. return c;
  3495. }
  3496. void YYLEXER::yyrestart( )
  3497. {
  3498. if ( ! yy_current_buffer )
  3499. yy_current_buffer = yy_create_buffer( (cInputBuffer * sizeof (YY_CHAR)) + sizeof (YY_CHAR) );
  3500. yy_init_buffer( yy_current_buffer );
  3501. yy_load_buffer_state();
  3502. }
  3503. void YYLEXER::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  3504. {
  3505. if ( yy_current_buffer == new_buffer )
  3506. return;
  3507. if ( yy_current_buffer )
  3508. {
  3509. /* Flush out information for old buffer. */
  3510. *yy_c_buf_p = yy_hold_char;
  3511. yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  3512. yy_current_buffer->yy_n_chars = yy_n_chars;
  3513. }
  3514. yy_current_buffer = new_buffer;
  3515. yy_load_buffer_state();
  3516. /* We don't actually know whether we did this switch during
  3517. * EOF (yywrap()) processing, but the only time this flag
  3518. * is looked at is after yywrap() is called, so it's safe
  3519. * to go ahead and always set it.
  3520. */
  3521. yy_did_buffer_switch_on_eof = 1;
  3522. }
  3523. void YYLEXER::yy_load_buffer_state()
  3524. {
  3525. yy_n_chars = yy_current_buffer->yy_n_chars;
  3526. yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  3527. yy_hold_char = *yy_c_buf_p;
  3528. }
  3529. YY_BUFFER_STATE YYLEXER::yy_create_buffer( int size )
  3530. {
  3531. YY_BUFFER_STATE b;
  3532. XPtrST<BYTE> xBuf((BYTE *)yy_flex_alloc( sizeof( struct yy_buffer_state ) ));
  3533. ((YY_BUFFER_STATE)xBuf.GetPointer())->yy_buf_size = size;
  3534. /* yy_ch_buf has to be 2 characters longer than the size given because
  3535. * we need to put in 2 end-of-buffer characters.
  3536. */
  3537. ((YY_BUFFER_STATE)xBuf.GetPointer())->yy_ch_buf =
  3538. (YY_CHAR *) yy_flex_alloc( ((YY_BUFFER_STATE)xBuf.GetPointer())->yy_buf_size + 2 );
  3539. // if the second alloc succeeds, we acquire into b. Else, xBuf will be automatically
  3540. // freed.
  3541. b = (YY_BUFFER_STATE) xBuf.Acquire();
  3542. b->yy_is_our_buffer = 1;
  3543. yy_init_buffer( b );
  3544. return b;
  3545. }
  3546. void YYLEXER::yy_delete_buffer( YY_BUFFER_STATE b )
  3547. {
  3548. if ( ! b )
  3549. return;
  3550. if ( b == yy_current_buffer )
  3551. yy_current_buffer = (YY_BUFFER_STATE) 0;
  3552. if ( b->yy_is_our_buffer )
  3553. yy_flex_free( (void *) b->yy_ch_buf );
  3554. yy_flex_free( (void *) b );
  3555. }
  3556. /* extern "C" int isatty YY_PROTO(( int )); */
  3557. void YYLEXER::yy_init_buffer( YY_BUFFER_STATE b )
  3558. {
  3559. yy_flush_buffer( b );
  3560. b->yy_fill_buffer = 1;
  3561. b->yy_is_interactive = 0;
  3562. }
  3563. void YYLEXER::yy_flush_buffer( YY_BUFFER_STATE b )
  3564. {
  3565. if ( ! b )
  3566. return;
  3567. b->yy_n_chars = 0;
  3568. /* We always need two end-of-buffer characters. The first causes
  3569. * a transition to the end-of-buffer state. The second causes
  3570. * a jam in that state.
  3571. */
  3572. b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  3573. b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  3574. b->yy_buf_pos = &b->yy_ch_buf[0];
  3575. b->yy_at_bol = 1;
  3576. b->yy_buffer_status = YY_BUFFER_NEW;
  3577. if ( b == yy_current_buffer )
  3578. yy_load_buffer_state();
  3579. }
  3580. #ifndef YY_NO_SCAN_BUFFER
  3581. #endif
  3582. #ifndef YY_NO_SCAN_STRING
  3583. #endif
  3584. #ifndef YY_NO_SCAN_BYTES
  3585. #endif
  3586. #ifndef YY_NO_PUSH_STATE
  3587. void YYLEXER::yy_push_state( int new_state )
  3588. {
  3589. if ( yy_start_stack_ptr >= yy_start_stack_depth )
  3590. {
  3591. yy_size_t new_size, old_size;
  3592. old_size = yy_start_stack_depth * sizeof( int );
  3593. yy_start_stack_depth += YY_START_STACK_INCR;
  3594. new_size = yy_start_stack_depth * sizeof( int );
  3595. if ( ! yy_start_stack )
  3596. yy_start_stack = (int *) yy_flex_alloc( new_size );
  3597. else
  3598. yy_start_stack = (int *) yy_flex_realloc(
  3599. (void *) yy_start_stack, old_size, new_size );
  3600. }
  3601. yy_start_stack[yy_start_stack_ptr++] = YY_START;
  3602. BEGIN(new_state);
  3603. }
  3604. #endif
  3605. #ifndef YY_NO_POP_STATE
  3606. void YYLEXER::yy_pop_state()
  3607. {
  3608. if ( --yy_start_stack_ptr < 0 )
  3609. YY_FATAL_ERROR( L"start-condition stack underflow" );
  3610. BEGIN(yy_start_stack[yy_start_stack_ptr]);
  3611. }
  3612. #endif
  3613. #ifndef YY_NO_TOP_STATE
  3614. int YYLEXER::yy_top_state()
  3615. {
  3616. return yy_start_stack[yy_start_stack_ptr - 1];
  3617. }
  3618. #endif
  3619. #ifndef YY_EXIT_FAILURE
  3620. #define YY_EXIT_FAILURE 2
  3621. #endif
  3622. void YYLEXER::LexerError( yyconst YY_CHAR msg[] )
  3623. {
  3624. yaccDebugOut(( DEB_WARN, "%s\n", msg ));
  3625. THROW( CException( E_UNEXPECTED ) );
  3626. }
  3627. /* Redefine yyless() so it works in section 3 code. */
  3628. #undef yyless
  3629. #define yyless(n) \
  3630. do \
  3631. { \
  3632. /* Undo effects of setting up yytext. */ \
  3633. yytext[yyleng] = yy_hold_char; \
  3634. yy_c_buf_p = yytext + n; \
  3635. yy_hold_char = *yy_c_buf_p; \
  3636. *yy_c_buf_p = '\0'; \
  3637. yyleng = n; \
  3638. } \
  3639. while ( 0 )
  3640. /* Internal utility routines. */
  3641. #ifndef yytext_ptr
  3642. #ifdef YY_USE_PROTOS
  3643. static void yy_flex_strncpy( YY_CHAR *s1, yyconst YY_CHAR *s2, int n )
  3644. #else
  3645. static void yy_flex_strncpy( s1, s2, n )
  3646. YY_CHAR *s1;
  3647. yyconst YY_CHAR *s2;
  3648. int n;
  3649. #endif
  3650. {
  3651. register int i;
  3652. for ( i = 0; i < n; ++i )
  3653. s1[i] = s2[i];
  3654. }
  3655. #endif
  3656. #ifdef YY_NEED_STRLEN
  3657. #ifdef YY_USE_PROTOS
  3658. static int yy_flex_strlen( yyconst YY_CHAR *s )
  3659. #else
  3660. static int yy_flex_strlen( s )
  3661. yyconst YY_CHAR *s;
  3662. #endif
  3663. {
  3664. register int n;
  3665. for ( n = 0; s[n]; ++n )
  3666. ;
  3667. return n;
  3668. }
  3669. #endif
  3670. #ifdef YY_USE_PROTOS
  3671. static void *yy_flex_alloc( yy_size_t size )
  3672. #else
  3673. static void *yy_flex_alloc( size )
  3674. yy_size_t size;
  3675. #endif
  3676. {
  3677. void *p = (void *)new BYTE[size];
  3678. return p;
  3679. }
  3680. #ifdef YY_USE_PROTOS
  3681. static void *yy_flex_realloc( void *ptr, yy_size_t old_size, yy_size_t new_size )
  3682. #else
  3683. static void *yy_flex_realloc( ptr, old_size, new_size )
  3684. void *ptr;
  3685. yy_size_t size;
  3686. #endif
  3687. {
  3688. /* The cast to (YY_CHAR *) in the following accommodates both
  3689. * implementations that use YY_CHAR* generic pointers, and those
  3690. * that use void* generic pointers. It works with the latter
  3691. * because both ANSI C and C++ allow castless assignment from
  3692. * any pointer type to void*, and deal with argument conversions
  3693. * as though doing an assignment.
  3694. */
  3695. void *p = (void *) new BYTE[new_size];
  3696. RtlCopyMemory(p, ptr, min(old_size, new_size));
  3697. yy_flex_free(ptr);
  3698. return p;
  3699. }
  3700. #ifdef YY_USE_PROTOS
  3701. static void yy_flex_free( void *ptr )
  3702. #else
  3703. static void yy_flex_free( ptr )
  3704. void *ptr;
  3705. #endif
  3706. {
  3707. delete[] (BYTE *)ptr;
  3708. }
  3709. #if YY_MAIN
  3710. int main()
  3711. {
  3712. yylex();
  3713. return 0;
  3714. }
  3715. #endif