Source code of Windows XP (NT5)
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.

2404 lines
77 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 TCHAR
  18. #endif
  19. #ifdef __cplusplus
  20. #include <tchar.h>
  21. #include <stdlib.h>
  22. // class istream;
  23. /* Use prototypes in function declarations. */
  24. #define YY_USE_PROTOS
  25. /* The "const" storage-class-modifier is valid. */
  26. #define YY_USE_CONST
  27. #else /* ! __cplusplus */
  28. #if __STDC__
  29. #define YY_USE_PROTOS
  30. #define YY_USE_CONST
  31. #endif /* __STDC__ */
  32. #endif /* ! __cplusplus */
  33. #ifdef __TURBOC__
  34. #pragma warn -rch
  35. #pragma warn -use
  36. #include <io.h>
  37. #include <stdlib.h>
  38. #define YY_USE_CONST
  39. #define YY_USE_PROTOS
  40. #endif
  41. #ifdef YY_USE_CONST
  42. #define yyconst const
  43. #else
  44. #define yyconst
  45. #endif
  46. #ifdef YY_USE_PROTOS
  47. #define YY_PROTO(proto) proto
  48. #else
  49. #define YY_PROTO(proto) ()
  50. #endif
  51. /* Returned upon end-of-file. */
  52. #define YY_NULL 0
  53. /* Promotes a possibly negative, possibly signed YY_CHAR to an unsigned
  54. * integer for use as an array index. If the signed YY_CHAR is negative,
  55. * we want to instead treat it as an 8-bit unsigned YY_CHAR, hence the
  56. * double cast.
  57. */
  58. #define YY_SC_TO_UI(c) ((unsigned int) (YY_CHAR) c)
  59. /* Enter a start condition. This macro really ought to take a parameter,
  60. * but we do it the disgusting crufty way forced on us by the ()-less
  61. * definition of BEGIN.
  62. */
  63. #define BEGIN yy_start = 1 + 2 *
  64. /* Translate the current start state into a value that can be later handed
  65. * to BEGIN to return to the state. The YYSTATE alias is for lex
  66. * compatibility.
  67. */
  68. #define YY_START ((yy_start - 1) / 2)
  69. #define YYSTATE YY_START
  70. /* Action number for EOF rule of a given start state. */
  71. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  72. /* Special action meaning "start processing a new file". */
  73. #define YY_NEW_FILE yyrestart( )
  74. #define YY_END_OF_BUFFER_CHAR 0
  75. /* Size of default input buffer. */
  76. #define YY_BUF_SIZE 32767 // UNDONE: Should really just take the input from the bstr passed in
  77. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  78. extern int yyleng;
  79. #define EOB_ACT_CONTINUE_SCAN 0
  80. #define EOB_ACT_END_OF_FILE 1
  81. #define EOB_ACT_LAST_MATCH 2
  82. /* The funky do-while in the following #define is used to turn the definition
  83. * int a single C statement (which needs a semi-colon terminator). This
  84. * avoids problems with code like:
  85. *
  86. * if ( condition_holds )
  87. * yyless( 5 );
  88. * else
  89. * do_something_else();
  90. *
  91. * Prior to using the do-while the compiler would get upset at the
  92. * "else" because it interpreted the "if" statement as being all
  93. * done when it reached the ';' after the yyless() call.
  94. */
  95. /* Return all but the first 'n' matched characters back to the input stream. */
  96. #define yyless(n) \
  97. do \
  98. { \
  99. /* Undo effects of setting up yytext. */ \
  100. *yy_cp = yy_hold_char; \
  101. YY_RESTORE_YY_MORE_OFFSET \
  102. yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  103. YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  104. } \
  105. while ( 0 )
  106. #define unput(c) yyunput( c, yytext_ptr )
  107. /* The following is because we cannot portably get our hands on size_t
  108. * (without autoconf's help, which isn't available because we want
  109. * flex-generated scanners to compile on their own).
  110. */
  111. typedef unsigned int yy_size_t;
  112. struct yy_buffer_state
  113. {
  114. // istream* yy_input_file;
  115. YY_CHAR *yy_ch_buf; /* input buffer */
  116. YY_CHAR *yy_buf_pos; /* current position in input buffer */
  117. /* Size of input buffer in bytes, not including room for EOB
  118. * characters.
  119. */
  120. yy_size_t yy_buf_size;
  121. /* Number of characters read into yy_ch_buf, not including EOB
  122. * characters.
  123. */
  124. int yy_n_chars;
  125. /* Whether we "own" the buffer - i.e., we know we created it,
  126. * and can realloc() it to grow it, and should free() it to
  127. * delete it.
  128. */
  129. int yy_is_our_buffer;
  130. /* Whether this is an "interactive" input source; if so, and
  131. * if we're using stdio for input, then we want to use getc()
  132. * instead of fread(), to make sure we stop fetching input after
  133. * each newline.
  134. */
  135. int yy_is_interactive;
  136. /* Whether we're considered to be at the beginning of a line.
  137. * If so, '^' rules will be active on the next match, otherwise
  138. * not.
  139. */
  140. int yy_at_bol;
  141. /* Whether to try to fill the input buffer when we reach the
  142. * end of it.
  143. */
  144. int yy_fill_buffer;
  145. int yy_buffer_status;
  146. #define YY_BUFFER_NEW 0
  147. #define YY_BUFFER_NORMAL 1
  148. /* When an EOF's been seen but there's still some text to process
  149. * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  150. * shouldn't try reading from the input source any more. We might
  151. * still have a bunch of tokens to match, though, because of
  152. * possible backing-up.
  153. *
  154. * When we actually see the EOF, we change the status to "new"
  155. * (via yyrestart()), so that the user can continue scanning by
  156. * just pointing yyin at a new input file.
  157. */
  158. #define YY_BUFFER_EOF_PENDING 2
  159. };
  160. /* We provide macros for accessing buffer states in case in the
  161. * future we want to put the buffer states in a more general
  162. * "scanner state".
  163. */
  164. #define YY_CURRENT_BUFFER yy_current_buffer
  165. static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
  166. static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
  167. static void yy_flex_free YY_PROTO(( void * ));
  168. #define yy_new_buffer yy_create_buffer
  169. #define yy_set_interactive(is_interactive) \
  170. { \
  171. if ( ! yy_current_buffer ) \
  172. yy_current_buffer = yy_create_buffer( YY_BUF_SIZE ); \
  173. yy_current_buffer->yy_is_interactive = is_interactive; \
  174. }
  175. #define yy_set_bol(at_bol) \
  176. { \
  177. if ( ! yy_current_buffer ) \
  178. yy_current_buffer = yy_create_buffer( YY_BUF_SIZE ); \
  179. yy_current_buffer->yy_at_bol = at_bol; \
  180. }
  181. #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
  182. #define yytext_ptr yytext
  183. /* Done after the current pattern has been matched and before the
  184. * corresponding action - sets up yytext.
  185. */
  186. #define YY_DO_BEFORE_ACTION \
  187. yytext_ptr = yy_bp; \
  188. yyleng = (int) (yy_cp - yy_bp); \
  189. yy_hold_char = *yy_cp; \
  190. *yy_cp = '\0'; \
  191. yy_c_buf_p = yy_cp;
  192. #define YY_NUM_RULES 97
  193. #define YY_END_OF_BUFFER 98
  194. static yyconst short int yy_accept[406] =
  195. { 0,
  196. 0, 0, 0, 0, 78, 78, 0, 0, 0, 0,
  197. 0, 0, 0, 0, 98, 57, 39, 39, 57, 57,
  198. 57, 57, 57, 57, 52, 45, 45, 57, 57, 40,
  199. 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
  200. 40, 40, 40, 40, 40, 40, 62, 61, 61, 62,
  201. 58, 59, 78, 77, 77, 79, 78, 76, 78, 78,
  202. 78, 78, 82, 81, 81, 80, 92, 89, 89, 92,
  203. 90, 91, 92, 92, 92, 92, 92, 96, 93, 93,
  204. 96, 95, 97, 97, 63, 39, 51, 0, 43, 0,
  205. 41, 0, 44, 45, 45, 47, 0, 53, 46, 46,
  206. 0, 0, 49, 50, 48, 40, 40, 40, 40, 5,
  207. 40, 40, 40, 40, 40, 40, 40, 15, 40, 40,
  208. 40, 40, 22, 40, 40, 40, 40, 40, 40, 40,
  209. 40, 40, 40, 40, 40, 61, 0, 60, 59, 78,
  210. 0, 77, 0, 0, 0, 78, 0, 75, 0, 78,
  211. 78, 78, 78, 78, 78, 81, 89, 0, 83, 0,
  212. 0, 0, 87, 0, 93, 0, 94, 0, 64, 63,
  213. 0, 42, 41, 0, 47, 54, 0, 0, 46, 0,
  214. 46, 45, 1, 2, 3, 40, 6, 40, 40, 40,
  215. 40, 40, 40, 40, 40, 0, 40, 40, 19, 40,
  216. 40, 40, 40, 40, 40, 40, 30, 40, 40, 40,
  217. 40, 40, 40, 40, 40, 0, 0, 0, 0, 0,
  218. 75, 0, 78, 78, 74, 78, 78, 78, 78, 0,
  219. 84, 0, 0, 0, 0, 65, 64, 42, 0, 0,
  220. 0, 46, 40, 7, 40, 40, 10, 11, 40, 40,
  221. 14, 0, 17, 40, 0, 21, 40, 40, 40, 40,
  222. 40, 40, 31, 40, 33, 34, 40, 40, 37, 40,
  223. 0, 0, 0, 71, 0, 74, 78, 78, 78, 78,
  224. 0, 0, 0, 65, 0, 0, 4, 40, 40, 12,
  225. 40, 0, 40, 0, 40, 40, 40, 40, 40, 28,
  226. 40, 32, 35, 40, 38, 66, 69, 70, 78, 78,
  227. 78, 78, 0, 0, 0, 0, 0, 40, 8, 40,
  228. 16, 40, 0, 0, 40, 40, 26, 40, 29, 40,
  229. 67, 78, 78, 73, 0, 0, 0, 0, 55, 40,
  230. 40, 18, 0, 0, 40, 40, 40, 36, 72, 68,
  231. 0, 0, 0, 56, 9, 13, 20, 23, 40, 40,
  232. 40, 0, 0, 0, 40, 40, 40, 0, 0, 0,
  233. 40, 40, 27, 0, 0, 0, 24, 40, 0, 0,
  234. 0, 25, 0, 0, 0, 0, 0, 0, 85, 0,
  235. 0, 0, 0, 0, 0, 0, 88, 0, 0, 0,
  236. 0, 0, 0, 86, 0
  237. } ;
  238. static yyconst int yy_ec[256] =
  239. { 0,
  240. 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  241. 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
  242. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  243. 1, 2, 4, 5, 6, 1, 1, 7, 8, 9,
  244. 10, 11, 12, 7, 13, 14, 1, 15, 16, 16,
  245. 16, 16, 16, 16, 16, 16, 16, 1, 1, 17,
  246. 18, 19, 1, 1, 21, 22, 23, 24, 25, 26,
  247. 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
  248. 30, 37, 38, 39, 40, 41, 42, 43, 44, 30,
  249. 7, 1, 7, 1, 20, 1, 21, 22, 23, 24,
  250. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  251. 35, 36, 30, 37, 38, 39, 40, 41, 42, 43,
  252. 44, 30, 1, 7, 1, 7, 1, 1, 1, 1,
  253. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  254. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  255. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  256. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  257. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  258. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  259. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  260. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  261. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  262. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  263. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  264. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  265. 1, 1, 1, 1, 1
  266. } ;
  267. static yyconst int yy_meta[45] =
  268. { 0,
  269. 1, 2, 3, 2, 1, 4, 2, 1, 2, 2,
  270. 1, 1, 1, 1, 5, 5, 1, 1, 1, 6,
  271. 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
  272. 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  273. 8, 8, 8, 8
  274. } ;
  275. static yyconst short int yy_base[431] =
  276. { 0,
  277. 0, 0, 44, 0, 87, 128, 96, 98, 169, 206,
  278. 101, 112, 244, 0, 812, 813, 106, 116, 793, 805,
  279. 803, 800, 105, 110, 125, 130, 133, 109, 789, 127,
  280. 0, 131, 125, 132, 768, 776, 783, 140, 766, 139,
  281. 781, 160, 161, 767, 771, 771, 813, 140, 184, 793,
  282. 813, 0, 789, 189, 198, 813, 287, 788, 191, 194,
  283. 159, 181, 813, 210, 215, 813, 813, 218, 232, 790,
  284. 813, 813, 762, 768, 749, 765, 762, 813, 234, 236,
  285. 784, 813, 813, 782, 0, 240, 813, 782, 781, 0,
  286. 0, 777, 776, 285, 288, 0, 290, 276, 292, 296,
  287. 303, 0, 813, 813, 813, 0, 751, 285, 745, 758,
  288. 742, 745, 753, 739, 741, 743, 77, 320, 743, 734,
  289. 733, 739, 746, 731, 733, 733, 731, 124, 732, 742,
  290. 723, 726, 295, 736, 735, 328, 754, 753, 0, 749,
  291. 748, 330, 721, 300, 717, 364, 217, 176, 329, 374,
  292. 745, 319, 188, 328, 312, 336, 340, 747, 746, 718,
  293. 724, 725, 813, 726, 343, 741, 740, 0, 0, 0,
  294. 739, 0, 0, 735, 0, 704, 718, 340, 332, 343,
  295. 345, 0, 0, 0, 0, 719, 0, 700, 699, 716,
  296. 713, 699, 696, 708, 699, 360, 706, 707, 384, 697,
  297. 703, 689, 690, 694, 688, 698, 0, 697, 689, 695,
  298. 694, 683, 683, 674, 678, 709, 689, 691, 672, 386,
  299. 705, 385, 395, 405, 362, 383, 384, 400, 403, 704,
  300. 813, 672, 675, 674, 700, 0, 0, 0, 681, 668,
  301. 403, 408, 658, 0, 680, 661, 0, 0, 674, 659,
  302. 0, 662, 0, 668, 423, 0, 658, 655, 325, 660,
  303. 667, 668, 0, 665, 0, 0, 655, 653, 0, 662,
  304. 425, 649, 429, 431, 390, 680, 180, 413, 421, 429,
  305. 433, 644, 651, 0, 647, 645, 0, 651, 654, 0,
  306. 653, 638, 651, 646, 436, 646, 636, 648, 646, 0,
  307. 631, 0, 0, 627, 0, 438, 813, 440, 436, 437,
  308. 438, 440, 447, 644, 632, 630, 640, 630, 0, 620,
  309. 813, 624, 630, 451, 623, 620, 0, 619, 0, 623,
  310. 629, 372, 444, 625, 589, 586, 568, 578, 813, 557,
  311. 548, 0, 554, 534, 532, 511, 522, 0, 541, 534,
  312. 485, 456, 460, 813, 0, 0, 813, 813, 465, 470,
  313. 467, 460, 462, 464, 472, 477, 473, 471, 470, 457,
  314. 465, 459, 0, 454, 469, 468, 0, 463, 449, 448,
  315. 443, 0, 461, 458, 455, 445, 448, 438, 813, 466,
  316. 436, 468, 439, 410, 361, 356, 813, 252, 215, 177,
  317. 139, 113, 61, 813, 813, 507, 515, 523, 531, 539,
  318. 544, 552, 556, 564, 568, 576, 584, 592, 600, 605,
  319. 609, 611, 615, 623, 627, 634, 636, 640, 644, 648
  320. } ;
  321. static yyconst short int yy_def[431] =
  322. { 0,
  323. 405, 1, 405, 3, 406, 406, 407, 407, 408, 408,
  324. 409, 409, 405, 13, 405, 405, 405, 405, 405, 410,
  325. 411, 412, 405, 405, 405, 405, 405, 405, 405, 413,
  326. 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
  327. 413, 413, 413, 413, 413, 413, 405, 405, 405, 414,
  328. 405, 415, 416, 405, 405, 405, 417, 405, 416, 416,
  329. 416, 416, 405, 405, 405, 405, 405, 405, 405, 418,
  330. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  331. 419, 405, 405, 420, 421, 405, 405, 410, 405, 422,
  332. 423, 412, 405, 405, 405, 424, 405, 405, 405, 405,
  333. 405, 425, 405, 405, 405, 413, 413, 413, 413, 413,
  334. 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
  335. 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
  336. 413, 413, 413, 413, 413, 405, 414, 405, 415, 416,
  337. 405, 405, 405, 405, 405, 417, 426, 416, 426, 417,
  338. 416, 416, 416, 416, 416, 405, 405, 418, 405, 405,
  339. 405, 405, 405, 405, 405, 419, 405, 427, 428, 421,
  340. 410, 429, 423, 412, 424, 405, 405, 405, 405, 405,
  341. 405, 425, 413, 413, 413, 413, 413, 413, 413, 413,
  342. 413, 413, 413, 413, 413, 405, 413, 413, 413, 413,
  343. 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
  344. 413, 413, 413, 413, 413, 414, 405, 405, 405, 405,
  345. 405, 426, 417, 417, 416, 416, 416, 416, 416, 418,
  346. 405, 405, 405, 405, 419, 430, 428, 429, 405, 405,
  347. 405, 405, 413, 413, 413, 413, 413, 413, 413, 413,
  348. 413, 405, 413, 413, 405, 413, 413, 413, 413, 413,
  349. 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
  350. 405, 405, 405, 405, 426, 405, 416, 416, 416, 416,
  351. 405, 405, 405, 430, 405, 405, 413, 413, 413, 413,
  352. 413, 405, 413, 405, 413, 413, 413, 413, 413, 413,
  353. 413, 413, 413, 413, 413, 405, 405, 405, 416, 416,
  354. 416, 416, 405, 405, 405, 405, 405, 413, 413, 413,
  355. 405, 413, 405, 405, 413, 413, 413, 413, 413, 413,
  356. 416, 416, 416, 416, 405, 405, 405, 405, 405, 413,
  357. 413, 413, 405, 405, 413, 413, 413, 413, 416, 416,
  358. 405, 405, 405, 405, 413, 413, 405, 405, 413, 413,
  359. 413, 405, 405, 405, 413, 413, 413, 405, 405, 405,
  360. 413, 413, 413, 405, 405, 405, 413, 413, 405, 405,
  361. 405, 413, 405, 405, 405, 405, 405, 405, 405, 405,
  362. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  363. 405, 405, 405, 405, 0, 405, 405, 405, 405, 405,
  364. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  365. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405
  366. } ;
  367. static yyconst short int yy_nxt[858] =
  368. { 0,
  369. 16, 17, 18, 19, 20, 21, 16, 22, 16, 16,
  370. 16, 23, 24, 25, 26, 27, 28, 16, 29, 16,
  371. 30, 31, 32, 33, 31, 34, 31, 31, 35, 31,
  372. 31, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  373. 45, 46, 31, 31, 47, 48, 49, 47, 50, 47,
  374. 47, 51, 47, 47, 47, 47, 47, 47, 47, 47,
  375. 47, 47, 47, 47, 52, 52, 52, 52, 52, 52,
  376. 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
  377. 52, 52, 52, 52, 52, 52, 52, 52, 54, 55,
  378. 56, 57, 404, 56, 58, 56, 56, 64, 65, 64,
  379. 65, 194, 79, 80, 66, 81, 66, 86, 86, 59,
  380. 82, 195, 60, 79, 80, 61, 81, 86, 86, 94,
  381. 95, 82, 96, 97, 94, 95, 103, 104, 62, 54,
  382. 55, 56, 57, 403, 56, 58, 56, 56, 98, 99,
  383. 99, 136, 136, 100, 95, 95, 100, 95, 95, 114,
  384. 59, 111, 116, 60, 101, 206, 61, 101, 107, 124,
  385. 108, 115, 207, 109, 110, 112, 141, 113, 117, 62,
  386. 68, 69, 102, 70, 121, 125, 402, 71, 72, 122,
  387. 223, 130, 127, 141, 128, 136, 136, 141, 141, 73,
  388. 142, 142, 74, 75, 129, 141, 154, 131, 141, 142,
  389. 142, 141, 309, 76, 132, 155, 77, 68, 69, 143,
  390. 70, 156, 156, 401, 71, 72, 156, 156, 143, 157,
  391. 157, 221, 144, 145, 227, 152, 73, 222, 153, 74,
  392. 75, 144, 145, 157, 157, 165, 165, 165, 165, 400,
  393. 76, 86, 86, 77, 83, 83, 83, 83, 83, 84,
  394. 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
  395. 83, 83, 83, 83, 85, 85, 85, 85, 85, 85,
  396. 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
  397. 85, 85, 85, 85, 85, 85, 85, 85, 147, 176,
  398. 147, 148, 399, 147, 149, 147, 147, 150, 100, 95,
  399. 95, 100, 95, 95, 99, 99, 99, 99, 184, 101,
  400. 179, 179, 101, 177, 180, 180, 178, 181, 181, 141,
  401. 101, 196, 196, 212, 218, 213, 141, 102, 185, 136,
  402. 136, 142, 142, 221, 219, 141, 224, 156, 156, 222,
  403. 229, 157, 157, 226, 165, 165, 179, 179, 228, 297,
  404. 143, 241, 241, 298, 242, 242, 101, 181, 181, 181,
  405. 181, 196, 196, 144, 145, 147, 223, 147, 148, 141,
  406. 147, 149, 147, 147, 150, 147, 398, 147, 225, 141,
  407. 147, 149, 147, 147, 150, 255, 255, 274, 274, 276,
  408. 141, 141, 397, 252, 221, 222, 147, 349, 147, 148,
  409. 222, 147, 149, 147, 147, 150, 147, 141, 147, 148,
  410. 141, 147, 149, 147, 147, 150, 278, 242, 242, 277,
  411. 141, 279, 242, 242, 255, 255, 306, 306, 141, 280,
  412. 308, 308, 274, 274, 313, 313, 141, 324, 324, 306,
  413. 306, 308, 308, 141, 141, 141, 396, 141, 313, 313,
  414. 310, 141, 324, 324, 294, 311, 312, 363, 363, 395,
  415. 331, 364, 364, 363, 363, 364, 364, 392, 392, 392,
  416. 392, 332, 344, 393, 391, 390, 389, 333, 334, 388,
  417. 387, 386, 350, 385, 384, 335, 383, 382, 381, 380,
  418. 379, 378, 377, 376, 375, 374, 373, 372, 371, 369,
  419. 368, 367, 370, 366, 365, 362, 394, 53, 53, 53,
  420. 53, 53, 53, 53, 53, 63, 63, 63, 63, 63,
  421. 63, 63, 63, 67, 67, 67, 67, 67, 67, 67,
  422. 67, 78, 78, 78, 78, 78, 78, 78, 78, 88,
  423. 88, 141, 88, 88, 88, 88, 88, 91, 141, 361,
  424. 91, 91, 92, 92, 360, 92, 92, 92, 92, 92,
  425. 106, 106, 106, 106, 137, 137, 359, 137, 137, 137,
  426. 137, 137, 139, 139, 139, 139, 140, 358, 357, 140,
  427. 140, 140, 140, 140, 146, 146, 356, 146, 146, 146,
  428. 146, 146, 158, 158, 355, 158, 158, 158, 158, 158,
  429. 166, 166, 354, 166, 166, 166, 166, 166, 169, 353,
  430. 352, 169, 169, 170, 170, 170, 170, 172, 172, 173,
  431. 173, 173, 173, 175, 175, 351, 175, 175, 175, 175,
  432. 175, 182, 141, 182, 147, 147, 141, 147, 147, 147,
  433. 147, 147, 236, 236, 237, 237, 237, 237, 238, 238,
  434. 238, 238, 284, 284, 284, 284, 348, 347, 346, 345,
  435. 343, 342, 341, 340, 339, 338, 337, 336, 330, 329,
  436. 328, 327, 326, 325, 323, 322, 321, 320, 319, 318,
  437. 317, 316, 315, 314, 275, 307, 305, 304, 303, 302,
  438. 301, 300, 299, 296, 295, 293, 292, 291, 290, 289,
  439. 288, 287, 286, 285, 167, 283, 282, 281, 159, 275,
  440. 273, 272, 271, 138, 270, 269, 268, 267, 266, 265,
  441. 264, 263, 262, 261, 260, 259, 258, 257, 256, 254,
  442. 253, 251, 250, 249, 248, 247, 246, 245, 244, 243,
  443. 240, 239, 93, 89, 235, 167, 234, 233, 232, 231,
  444. 230, 159, 141, 220, 217, 151, 141, 216, 138, 215,
  445. 214, 211, 210, 209, 208, 205, 204, 203, 202, 201,
  446. 200, 199, 198, 197, 193, 192, 191, 190, 189, 188,
  447. 187, 186, 183, 174, 93, 171, 89, 168, 167, 164,
  448. 163, 162, 161, 160, 159, 151, 141, 138, 135, 134,
  449. 133, 126, 123, 120, 119, 118, 105, 93, 90, 89,
  450. 87, 405, 15, 405, 405, 405, 405, 405, 405, 405,
  451. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  452. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  453. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  454. 405, 405, 405, 405, 405, 405, 405
  455. } ;
  456. static yyconst short int yy_chk[858] =
  457. { 0,
  458. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  459. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  460. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  461. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  462. 1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
  463. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  464. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  465. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  466. 3, 3, 3, 3, 3, 3, 3, 3, 5, 5,
  467. 5, 5, 403, 5, 5, 5, 5, 7, 7, 8,
  468. 8, 117, 11, 11, 7, 11, 8, 17, 17, 5,
  469. 11, 117, 5, 12, 12, 5, 12, 18, 18, 23,
  470. 23, 12, 24, 24, 24, 24, 28, 28, 5, 6,
  471. 6, 6, 6, 402, 6, 6, 6, 6, 25, 25,
  472. 25, 48, 48, 26, 26, 26, 27, 27, 27, 33,
  473. 6, 32, 34, 6, 26, 128, 6, 27, 30, 40,
  474. 30, 33, 128, 30, 30, 32, 61, 32, 34, 6,
  475. 9, 9, 26, 9, 38, 40, 401, 9, 9, 38,
  476. 148, 43, 42, 148, 42, 49, 49, 277, 62, 9,
  477. 54, 54, 9, 9, 42, 153, 61, 43, 59, 55,
  478. 55, 60, 277, 9, 43, 62, 9, 10, 10, 54,
  479. 10, 64, 64, 400, 10, 10, 65, 65, 55, 68,
  480. 68, 147, 54, 54, 153, 59, 10, 147, 60, 10,
  481. 10, 55, 55, 69, 69, 79, 79, 80, 80, 399,
  482. 10, 86, 86, 10, 13, 13, 13, 13, 13, 13,
  483. 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  484. 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  485. 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  486. 13, 13, 13, 13, 13, 13, 13, 13, 57, 98,
  487. 57, 57, 398, 57, 57, 57, 57, 57, 94, 94,
  488. 94, 95, 95, 95, 97, 97, 99, 99, 108, 94,
  489. 100, 100, 95, 98, 101, 101, 99, 101, 101, 155,
  490. 100, 118, 118, 133, 144, 133, 152, 94, 108, 136,
  491. 136, 142, 142, 149, 144, 154, 149, 156, 156, 149,
  492. 155, 157, 157, 152, 165, 165, 179, 179, 154, 259,
  493. 142, 178, 178, 259, 178, 178, 179, 180, 180, 181,
  494. 181, 196, 196, 142, 142, 146, 225, 146, 146, 225,
  495. 146, 146, 146, 146, 146, 150, 396, 150, 150, 332,
  496. 150, 150, 150, 150, 150, 199, 199, 220, 220, 222,
  497. 226, 227, 395, 196, 275, 222, 223, 332, 223, 223,
  498. 275, 223, 223, 223, 223, 223, 224, 228, 224, 224,
  499. 229, 224, 224, 224, 224, 224, 227, 241, 241, 226,
  500. 278, 228, 242, 242, 255, 255, 271, 271, 279, 229,
  501. 273, 273, 274, 274, 281, 281, 280, 295, 295, 306,
  502. 306, 308, 308, 309, 310, 311, 394, 312, 313, 313,
  503. 278, 333, 324, 324, 255, 279, 280, 352, 352, 393,
  504. 309, 353, 353, 363, 363, 364, 364, 390, 390, 392,
  505. 392, 310, 324, 391, 388, 387, 386, 311, 312, 385,
  506. 384, 383, 333, 381, 380, 313, 379, 378, 376, 375,
  507. 374, 372, 371, 370, 369, 368, 367, 366, 365, 363,
  508. 362, 361, 364, 360, 359, 351, 392, 406, 406, 406,
  509. 406, 406, 406, 406, 406, 407, 407, 407, 407, 407,
  510. 407, 407, 407, 408, 408, 408, 408, 408, 408, 408,
  511. 408, 409, 409, 409, 409, 409, 409, 409, 409, 410,
  512. 410, 350, 410, 410, 410, 410, 410, 411, 349, 347,
  513. 411, 411, 412, 412, 346, 412, 412, 412, 412, 412,
  514. 413, 413, 413, 413, 414, 414, 345, 414, 414, 414,
  515. 414, 414, 415, 415, 415, 415, 416, 344, 343, 416,
  516. 416, 416, 416, 416, 417, 417, 341, 417, 417, 417,
  517. 417, 417, 418, 418, 340, 418, 418, 418, 418, 418,
  518. 419, 419, 338, 419, 419, 419, 419, 419, 420, 337,
  519. 336, 420, 420, 421, 421, 421, 421, 422, 422, 423,
  520. 423, 423, 423, 424, 424, 335, 424, 424, 424, 424,
  521. 424, 425, 334, 425, 426, 426, 331, 426, 426, 426,
  522. 426, 426, 427, 427, 428, 428, 428, 428, 429, 429,
  523. 429, 429, 430, 430, 430, 430, 330, 328, 326, 325,
  524. 323, 322, 320, 318, 317, 316, 315, 314, 304, 301,
  525. 299, 298, 297, 296, 294, 293, 292, 291, 289, 288,
  526. 286, 285, 283, 282, 276, 272, 270, 268, 267, 264,
  527. 262, 261, 260, 258, 257, 254, 252, 250, 249, 246,
  528. 245, 243, 240, 239, 235, 234, 233, 232, 230, 221,
  529. 219, 218, 217, 216, 215, 214, 213, 212, 211, 210,
  530. 209, 208, 206, 205, 204, 203, 202, 201, 200, 198,
  531. 197, 195, 194, 193, 192, 191, 190, 189, 188, 186,
  532. 177, 176, 174, 171, 167, 166, 164, 162, 161, 160,
  533. 159, 158, 151, 145, 143, 141, 140, 138, 137, 135,
  534. 134, 132, 131, 130, 129, 127, 126, 125, 124, 123,
  535. 122, 121, 120, 119, 116, 115, 114, 113, 112, 111,
  536. 110, 109, 107, 93, 92, 89, 88, 84, 81, 77,
  537. 76, 75, 74, 73, 70, 58, 53, 50, 46, 45,
  538. 44, 41, 39, 37, 36, 35, 29, 22, 21, 20,
  539. 19, 15, 405, 405, 405, 405, 405, 405, 405, 405,
  540. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  541. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  542. 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
  543. 405, 405, 405, 405, 405, 405, 405
  544. } ;
  545. /* The intent behind this definition is that it'll catch
  546. * any uses of REJECT which flex missed.
  547. */
  548. #define REJECT reject_used_but_not_detected
  549. #define yymore() yymore_used_but_not_detected
  550. #define YY_MORE_ADJ 0
  551. #define YY_RESTORE_YY_MORE_OFFSET
  552. #define INITIAL 0
  553. //--------------------------------------------------------------------
  554. // Microsoft Monarch
  555. //
  556. // Copyright (c) Microsoft Corporation, 1997 - 1999.
  557. //
  558. // @doc OPTIONAL EXTRACTION CODES
  559. //
  560. // @module ms-sql.l |
  561. // LEX tokenizer script
  562. //
  563. // @devnotes none
  564. //
  565. // @rev 0 | 04-Feb-97 | v-charca | Created
  566. //
  567. /**
  568. ** NOTE : when adding a new token (XXX) modify the following:
  569. ** 1.) Add %token _XXX to sql.y
  570. ** 2.) Add lexeme pattern to sql.l stating whether the token returns a TOKEN
  571. ** or a VALUE. If the token returns a value a node will need to be created to
  572. ** contain the value information. Therefore the VALUE macro will also need to
  573. ** specify a valid VARIANT type for the value.
  574. **/
  575. #include "msidxtr.h"
  576. #ifdef DEBUG
  577. # define YYTRACE(tknNum) LexerTrace(yytext, yyleng, tknNum);
  578. #else
  579. # define YYTRACE(tknNum)
  580. #endif
  581. #define TOKEN(tknNum) YYTRACE(tknNum) return(tknNum);
  582. #define VALUE(tknNum) \
  583. { \
  584. YYTRACE(tknNum) \
  585. CreateTknValue(yylval, tknNum); \
  586. return tknNum; \
  587. }
  588. #define STRING_VALUE(tknNum, wch, fQuote) \
  589. { \
  590. YYTRACE(tknNum) \
  591. CreateTknValue(yylval, tknNum, wch, fQuote); \
  592. return tknNum; \
  593. }
  594. #define ID_VALUE(tknNum, wch) \
  595. { \
  596. YYTRACE(tknNum) \
  597. CreateTknValue(yylval, tknNum, wch); \
  598. return _ID; \
  599. }
  600. /*
  601. ** Make Lex read from a block of data
  602. ** buffer is the character buffer,
  603. ** result is a variable to store the number of chars read
  604. ** ms is the size of the buffer
  605. */
  606. #undef YY_INPUT
  607. #define YY_INPUT(b, r, ms) (r = yybufferinput(b, ms))
  608. //--------------------------------------------------------------------------------------------
  609. // @func Makes a new copy of UNICODE string. Filters out double quotes
  610. // @side Allocates enough bytes to hold string
  611. // @rdesc Pointer to new UNICODE string
  612. LPWSTR PwszDupFilter(
  613. LPWSTR pwszOrig,
  614. WCHAR wch )
  615. {
  616. LPWSTR pwszCopy = (LPWSTR)CoTaskMemAlloc( (wcslen(pwszOrig)+2)*sizeof(WCHAR) );
  617. if ( 0 != pwszCopy )
  618. {
  619. LPWSTR pwsz = pwszCopy;
  620. while ( 0 != *pwszOrig )
  621. {
  622. if ( *(pwszOrig+1) && *(pwszOrig+1) == *pwszOrig && wch == *pwszOrig )
  623. pwszOrig++;
  624. else
  625. *pwsz++ = *pwszOrig++;
  626. }
  627. *pwsz = L'\0';
  628. }
  629. return pwszCopy;
  630. }
  631. //--------------------------------------------------------------------------------------------
  632. // YYLEXER::CreateTknValue
  633. // Creates a QUERYTREE node structure which is passed to the YACC value stack.
  634. // This routines uses the TokenInfo map to determine which opids to create for
  635. // the given string.
  636. //
  637. //
  638. void YYLEXER::CreateTknValue(
  639. YYSTYPE *ppct,
  640. short tknNum,
  641. YY_CHAR wch,
  642. BOOL fQuote )
  643. {
  644. // Note that values containing variants can only be CONSTANTS or ID's
  645. // SHOULD BE DONE BY valType
  646. switch ( tknNum )
  647. {
  648. case _ID:
  649. case _TEMPVIEW:
  650. {
  651. // Assume table_name for now. Might have to correct this when I
  652. // see the context in the parser.
  653. if ( 0 == (*ppct = PctAllocNode(DBVALUEKIND_WSTR)) )
  654. throw(E_OUTOFMEMORY);
  655. (*ppct)->op = DBOP_table_name;
  656. (*ppct)->wKind = DBVALUEKIND_WSTR;
  657. (*ppct)->value.pwszValue = CoTaskStrDup(yytext_ptr);
  658. if( 0 == (*ppct)->value.pwszValue )
  659. {
  660. DeleteDBQT( *ppct );
  661. *ppct = NULL;
  662. throw(E_OUTOFMEMORY);
  663. }
  664. _wcsupr((*ppct)->value.pwszValue);
  665. break;
  666. }
  667. case _DELIMITED_ID:
  668. {
  669. if ( 0 == (*ppct = PctAllocNode(DBVALUEKIND_WSTR)) )
  670. throw(E_OUTOFMEMORY);
  671. (*ppct)->op = DBOP_table_name;
  672. (*ppct)->wKind = DBVALUEKIND_WSTR;
  673. // Strip quotes on delimited identifier
  674. yytext_ptr[wcslen(yytext_ptr)-1] = L'\0';
  675. (*ppct)->value.pwszValue = PwszDupFilter(yytext_ptr+1, wch);
  676. if( 0 == (*ppct)->value.pwszValue )
  677. {
  678. DeleteDBQT( *ppct );
  679. *ppct = NULL;
  680. throw(E_OUTOFMEMORY);
  681. }
  682. break;
  683. }
  684. case _URL:
  685. case _STRING:
  686. case _PREFIX_STRING:
  687. {
  688. // NOTE: This is really a PROPVARIANT node, but there is no DBVALUEKIND for PROPVARIANT.
  689. if ( 0 == (*ppct = PctAllocNode(DBVALUEKIND_VARIANT, DBOP_scalar_constant)) )
  690. throw(E_OUTOFMEMORY);
  691. LPWSTR pwsz = yytext_ptr;
  692. LPWSTR pwszCopy = PwszDupFilter(pwsz, wch);
  693. if ( 0 == pwszCopy )
  694. {
  695. DeleteDBQT( *ppct );
  696. *ppct = NULL;
  697. throw(E_OUTOFMEMORY);
  698. }
  699. LPWSTR pwszTemp = pwszCopy;
  700. // Strip quotes on literals or
  701. if ( fQuote && (*pwszCopy == L'\"' || *pwszCopy == L'\'') )
  702. {
  703. pwszCopy++;
  704. Assert(pwszCopy[wcslen(pwszCopy)-1] == L'\"' || pwszCopy[wcslen(pwszCopy)-1] == L'\'');
  705. pwszCopy[wcslen(pwszCopy)-1] = L'\0';
  706. }
  707. ((PROPVARIANT*)(*ppct)->value.pvValue)->bstrVal = SysAllocString( pwszCopy );
  708. CoTaskMemFree( pwszTemp ); // throw away temporary before testing for out of memory
  709. ((PROPVARIANT*)(*ppct)->value.pvValue)->vt = VT_BSTR;
  710. if( 0 == ((PROPVARIANT*)(*ppct)->value.pvValue)->bstrVal )
  711. {
  712. DeleteDBQT( *ppct );
  713. *ppct = 0;
  714. throw(E_OUTOFMEMORY);
  715. }
  716. }
  717. break;
  718. case _INTNUM:
  719. if ( 0 == (*ppct = PctAllocNode(DBVALUEKIND_VARIANT, DBOP_scalar_constant)) )
  720. throw(E_OUTOFMEMORY);
  721. ((PROPVARIANT*)(*ppct)->value.pvValue)->bstrVal = SysAllocString( yytext_ptr );
  722. ((PROPVARIANT*)(*ppct)->value.pvValue)->vt = VT_BSTR;
  723. if ( 0 == ((PROPVARIANT*)(*ppct)->value.pvValue)->bstrVal )
  724. {
  725. DeleteDBQT( *ppct );
  726. *ppct = 0;
  727. throw(E_OUTOFMEMORY);
  728. }
  729. (*ppct)->hrError = PropVariantChangeTypeI64( (PROPVARIANT*)(*ppct)->value.pvValue );
  730. if ( FAILED((*ppct)->hrError) )
  731. {
  732. HRESULT hr = (*ppct)->hrError;
  733. DeleteDBQT( *ppct );
  734. *ppct = 0;
  735. throw(hr);
  736. }
  737. break;
  738. case _REALNUM:
  739. if ( 0 == (*ppct = PctAllocNode(DBVALUEKIND_VARIANT, DBOP_scalar_constant)) )
  740. throw(E_OUTOFMEMORY);
  741. ((PROPVARIANT*)(*ppct)->value.pvValue)->bstrVal = SysAllocString( yytext_ptr );
  742. ((PROPVARIANT*)(*ppct)->value.pvValue)->vt = VT_BSTR;
  743. if ( 0 == ((PROPVARIANT*)(*ppct)->value.pvValue)->bstrVal )
  744. {
  745. DeleteDBQT( *ppct );
  746. *ppct = NULL;
  747. throw(E_OUTOFMEMORY);
  748. }
  749. (*ppct)->hrError = VariantChangeTypeEx( (*ppct)->value.pvarValue, // convert in place
  750. (*ppct)->value.pvarValue,
  751. LOCALE_SYSTEM_DEFAULT,
  752. 0,
  753. VT_R8 );
  754. if ( FAILED((*ppct)->hrError) )
  755. {
  756. HRESULT hr = (*ppct)->hrError;
  757. DeleteDBQT( *ppct );
  758. *ppct = 0;
  759. throw(hr);
  760. }
  761. break;
  762. default:
  763. Assert( !"Unkown token value" );
  764. }
  765. }
  766. #define contains 1
  767. #define cntntsrch 2
  768. #define scope0 3
  769. #define scope1 4
  770. #define scope2 5
  771. #define view 6
  772. /* Macros after this point can all be overridden by user definitions in
  773. * section 1.
  774. */
  775. #ifndef YY_SKIP_YYWRAP
  776. #ifdef __cplusplus
  777. int yyywrap YY_PROTO(( void )) {return 1;}
  778. #else
  779. extern int yyywrap YY_PROTO(( void ));
  780. #endif
  781. #endif
  782. #ifndef yytext_ptr
  783. static void yy_flex_strncpy YY_PROTO(( YY_CHAR *, yyconst YY_CHAR *, int ));
  784. #endif
  785. #ifdef YY_NEED_STRLEN
  786. static int yy_flex_strlen YY_PROTO(( yyconst YY_CHAR * ));
  787. #endif
  788. #ifndef YY_NO_INPUT
  789. #endif
  790. #if YY_STACK_USED
  791. static int yy_start_stack_ptr = 0;
  792. static int yy_start_stack_depth = 0;
  793. static int *yy_start_stack = 0;
  794. #ifndef YY_NO_PUSH_STATE
  795. static void yy_push_state YY_PROTO(( int new_state ));
  796. #endif
  797. #ifndef YY_NO_POP_STATE
  798. static void yy_pop_state YY_PROTO(( void ));
  799. #endif
  800. #ifndef YY_NO_TOP_STATE
  801. static int yy_top_state YY_PROTO(( void ));
  802. #endif
  803. #else
  804. #define YY_NO_PUSH_STATE 1
  805. #define YY_NO_POP_STATE 1
  806. #define YY_NO_TOP_STATE 1
  807. #endif
  808. #ifdef YY_MALLOC_DECL
  809. YY_MALLOC_DECL
  810. #else
  811. #if __STDC__
  812. #ifndef __cplusplus
  813. #include <stdlib.h>
  814. #endif
  815. #else
  816. /* Just try to get by without declaring the routines. This will fail
  817. * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  818. * or sizeof(void*) != sizeof(int).
  819. */
  820. #endif
  821. #endif
  822. /* Amount of stuff to slurp up with each read. */
  823. #ifndef YY_READ_BUF_SIZE
  824. #define YY_READ_BUF_SIZE (8192 / sizeof(TCHAR))
  825. #endif
  826. /* Copy whatever the last rule matched to the standard output. */
  827. #ifndef ECHO
  828. #define ECHO LexerOutput( yytext, yyleng )
  829. #endif
  830. /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  831. * is returned in "result".
  832. */
  833. #ifndef YY_INPUT
  834. #define YY_INPUT(buf,result,max_size) \
  835. if ( (result = LexerInput( (YY_CHAR *) buf, max_size )) < 0 ) \
  836. /*YY_FATAL_ERROR( L"input in flex scanner failed" );*/
  837. throw(E_FAIL);
  838. #endif
  839. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  840. * we don't want an extra ';' after the "return" because that will cause
  841. * some compilers to complain about unreachable statements.
  842. */
  843. #ifndef yyterminate
  844. #define yyterminate() return YY_NULL
  845. #endif
  846. /* Number of entries by which start-condition stack grows. */
  847. #ifndef YY_START_STACK_INCR
  848. #define YY_START_STACK_INCR 25
  849. #endif
  850. /* Report a fatal error. */
  851. #ifndef YY_FATAL_ERROR
  852. #define YY_FATAL_ERROR(msg) LexerError( msg )
  853. #endif
  854. /* Default declaration of generated scanner - a define so the user can
  855. * easily add parameters.
  856. */
  857. #ifndef YY_DECL
  858. #define YY_DECL int YYLEXER::yylex(YYSTYPE *yylval)
  859. #endif
  860. /* Code executed at the beginning of each rule, after yytext and yyleng
  861. * have been set up.
  862. */
  863. #ifndef YY_USER_ACTION
  864. #define YY_USER_ACTION
  865. #endif
  866. /* Code executed at the end of each rule. */
  867. #ifndef YY_BREAK
  868. #define YY_BREAK break;
  869. #endif
  870. #define YY_RULE_SETUP \
  871. YY_USER_ACTION
  872. YY_DECL
  873. {
  874. register yy_state_type yy_current_state;
  875. register YY_CHAR *yy_cp, *yy_bp;
  876. register int yy_act;
  877. /***
  878. *** Reserved words in every context
  879. ***/
  880. if ( yy_init )
  881. {
  882. yy_init = 0;
  883. #ifdef YY_USER_INIT
  884. YY_USER_INIT;
  885. #endif
  886. if ( ! yy_start )
  887. yy_start = 1; /* first start state */
  888. if ( ! yy_current_buffer )
  889. yy_current_buffer =
  890. yy_create_buffer( (cInputBuffer * sizeof(YY_CHAR)) + sizeof(YY_CHAR) );
  891. yy_load_buffer_state();
  892. if (yyprimetoken)
  893. {
  894. int yysavetoken = yyprimetoken;
  895. yyprimetoken = 0;
  896. return yysavetoken;
  897. }
  898. }
  899. while ( 1 ) /* loops until end-of-file is reached */
  900. {
  901. yy_cp = yy_c_buf_p;
  902. /* Support of yytext. */
  903. *yy_cp = yy_hold_char;
  904. /* yy_bp points to the position in yy_ch_buf of the start of
  905. * the current run.
  906. */
  907. yy_bp = yy_cp;
  908. yy_current_state = yy_start;
  909. yy_match:
  910. do
  911. {
  912. register YY_CHAR yy_c = 1; if (256 > *yy_cp) yy_c = (YY_CHAR) yy_ec[YY_SC_TO_UI(*yy_cp)];
  913. if ( yy_accept[yy_current_state] )
  914. {
  915. yy_last_accepting_state = yy_current_state;
  916. yy_last_accepting_cpos = yy_cp;
  917. }
  918. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  919. {
  920. yy_current_state = (int) yy_def[yy_current_state];
  921. if ( yy_current_state >= 406 )
  922. yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
  923. }
  924. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  925. ++yy_cp;
  926. }
  927. while ( yy_current_state != 405 );
  928. yy_cp = yy_last_accepting_cpos;
  929. yy_current_state = yy_last_accepting_state;
  930. yy_find_action:
  931. yy_act = yy_accept[yy_current_state];
  932. YY_DO_BEFORE_ACTION;
  933. do_action: /* This label is used only to access EOF actions. */
  934. switch ( yy_act )
  935. { /* beginning of action switch */
  936. case 0: /* must back up */
  937. /* undo the effects of YY_DO_BEFORE_ACTION */
  938. *yy_cp = yy_hold_char;
  939. yy_cp = yy_last_accepting_cpos;
  940. yy_current_state = yy_last_accepting_state;
  941. goto yy_find_action;
  942. case 1:
  943. YY_RULE_SETUP
  944. { TOKEN(_ALL); }
  945. YY_BREAK
  946. case 2:
  947. YY_RULE_SETUP
  948. { TOKEN(_AND); }
  949. YY_BREAK
  950. case 3:
  951. YY_RULE_SETUP
  952. { TOKEN(_ANY); }
  953. YY_BREAK
  954. case 4:
  955. YY_RULE_SETUP
  956. { TOKEN(_ARRAY); }
  957. YY_BREAK
  958. case 5:
  959. YY_RULE_SETUP
  960. { TOKEN(_AS); }
  961. YY_BREAK
  962. case 6:
  963. YY_RULE_SETUP
  964. { TOKEN(_ASC); }
  965. YY_BREAK
  966. case 7:
  967. YY_RULE_SETUP
  968. { TOKEN(_CAST); }
  969. YY_BREAK
  970. case 8:
  971. YY_RULE_SETUP
  972. { TOKEN(_CREATE); }
  973. YY_BREAK
  974. case 9:
  975. YY_RULE_SETUP
  976. { BEGIN contains;TOKEN(_CONTAINS); }
  977. YY_BREAK
  978. case 10:
  979. YY_RULE_SETUP
  980. { TOKEN(_DESC); }
  981. YY_BREAK
  982. case 11:
  983. YY_RULE_SETUP
  984. { TOKEN(_DROP); }
  985. YY_BREAK
  986. case 12:
  987. YY_RULE_SETUP
  988. { TOKEN(_FALSE); }
  989. YY_BREAK
  990. case 13:
  991. YY_RULE_SETUP
  992. { TOKEN(_FREETEXT); }
  993. YY_BREAK
  994. case 14:
  995. YY_RULE_SETUP
  996. { TOKEN(_FROM); }
  997. YY_BREAK
  998. case 15:
  999. YY_RULE_SETUP
  1000. { TOKEN(_IS); }
  1001. YY_BREAK
  1002. case 16:
  1003. YY_RULE_SETUP
  1004. { TOKEN(_IS_NOT); }
  1005. YY_BREAK
  1006. case 17:
  1007. YY_RULE_SETUP
  1008. { TOKEN(_LIKE); }
  1009. YY_BREAK
  1010. case 18:
  1011. YY_RULE_SETUP
  1012. { TOKEN(_MATCHES); }
  1013. YY_BREAK
  1014. case 19:
  1015. YY_RULE_SETUP
  1016. { TOKEN(_NOT); }
  1017. YY_BREAK
  1018. case 20:
  1019. YY_RULE_SETUP
  1020. { TOKEN(_NOT_LIKE); }
  1021. YY_BREAK
  1022. case 21:
  1023. YY_RULE_SETUP
  1024. { TOKEN(_NULL); }
  1025. YY_BREAK
  1026. case 22:
  1027. YY_RULE_SETUP
  1028. { TOKEN(_OR); }
  1029. YY_BREAK
  1030. case 23:
  1031. YY_RULE_SETUP
  1032. { TOKEN(_ORDER_BY); }
  1033. YY_BREAK
  1034. case 24:
  1035. YY_RULE_SETUP
  1036. { TOKEN(_PASSTHROUGH); }
  1037. YY_BREAK
  1038. case 25:
  1039. YY_RULE_SETUP
  1040. { TOKEN(_PROPERTYNAME); }
  1041. YY_BREAK
  1042. case 26:
  1043. YY_RULE_SETUP
  1044. { TOKEN(_PROPID); }
  1045. YY_BREAK
  1046. case 27:
  1047. YY_RULE_SETUP
  1048. { TOKEN(_RANKMETHOD); }
  1049. YY_BREAK
  1050. case 28:
  1051. YY_RULE_SETUP
  1052. { BEGIN scope0; TOKEN(_SCOPE); }
  1053. YY_BREAK
  1054. case 29:
  1055. YY_RULE_SETUP
  1056. { TOKEN(_SELECT); }
  1057. YY_BREAK
  1058. case 30:
  1059. YY_RULE_SETUP
  1060. { TOKEN(_SET); }
  1061. YY_BREAK
  1062. case 31:
  1063. YY_RULE_SETUP
  1064. { TOKEN(_SOME); }
  1065. YY_BREAK
  1066. case 32:
  1067. YY_RULE_SETUP
  1068. { TOKEN(_TABLE); }
  1069. YY_BREAK
  1070. case 33:
  1071. YY_RULE_SETUP
  1072. { TOKEN(_TRUE); }
  1073. YY_BREAK
  1074. case 34:
  1075. YY_RULE_SETUP
  1076. { TOKEN(_TYPE); }
  1077. YY_BREAK
  1078. case 35:
  1079. YY_RULE_SETUP
  1080. { TOKEN(_UNION); }
  1081. YY_BREAK
  1082. case 36:
  1083. YY_RULE_SETUP
  1084. { TOKEN(_UNKNOWN); }
  1085. YY_BREAK
  1086. case 37:
  1087. YY_RULE_SETUP
  1088. { TOKEN(_VIEW); }
  1089. YY_BREAK
  1090. case 38:
  1091. YY_RULE_SETUP
  1092. { TOKEN(_WHERE); }
  1093. YY_BREAK
  1094. case 39:
  1095. YY_RULE_SETUP
  1096. { /* empty lex rule */ }
  1097. YY_BREAK
  1098. case 40:
  1099. YY_RULE_SETUP
  1100. { VALUE(_ID); }
  1101. YY_BREAK
  1102. case 41:
  1103. YY_RULE_SETUP
  1104. { VALUE(_TEMPVIEW); }
  1105. YY_BREAK
  1106. case 42:
  1107. YY_RULE_SETUP
  1108. { VALUE(_TEMPVIEW); }
  1109. YY_BREAK
  1110. case 43:
  1111. YY_RULE_SETUP
  1112. { ID_VALUE(_DELIMITED_ID, L'"'); }
  1113. YY_BREAK
  1114. case 44:
  1115. YY_RULE_SETUP
  1116. { STRING_VALUE(_STRING, L'\'', TRUE);}
  1117. YY_BREAK
  1118. case 45:
  1119. YY_RULE_SETUP
  1120. { VALUE(_INTNUM); }
  1121. YY_BREAK
  1122. case 46:
  1123. YY_RULE_SETUP
  1124. { VALUE(_REALNUM); }
  1125. YY_BREAK
  1126. case 47:
  1127. YY_RULE_SETUP
  1128. { /* empty lex rule */ }
  1129. YY_BREAK
  1130. case 48:
  1131. YY_RULE_SETUP
  1132. { TOKEN(_GE); }
  1133. YY_BREAK
  1134. case 49:
  1135. YY_RULE_SETUP
  1136. { TOKEN(_LE); }
  1137. YY_BREAK
  1138. case 50:
  1139. YY_RULE_SETUP
  1140. { TOKEN(_NE); }
  1141. YY_BREAK
  1142. case 51:
  1143. YY_RULE_SETUP
  1144. { TOKEN(_NE); }
  1145. YY_BREAK
  1146. case 52:
  1147. YY_RULE_SETUP
  1148. { TOKEN(_DOT); }
  1149. YY_BREAK
  1150. case 53:
  1151. YY_RULE_SETUP
  1152. { BEGIN view; TOKEN(_DOTDOT); }
  1153. YY_BREAK
  1154. case 54:
  1155. YY_RULE_SETUP
  1156. { BEGIN view; TOKEN(_DOTDOTDOT); }
  1157. YY_BREAK
  1158. case 55:
  1159. YY_RULE_SETUP
  1160. { BEGIN scope0; TOKEN(_DOTDOT_SCOPE);}
  1161. YY_BREAK
  1162. case 56:
  1163. YY_RULE_SETUP
  1164. { BEGIN scope0; TOKEN(_DOTDOTDOT_SCOPE);}
  1165. YY_BREAK
  1166. case 57:
  1167. YY_RULE_SETUP
  1168. { YYTRACE(yytext[0]); return yytext[0]; }
  1169. YY_BREAK
  1170. /***
  1171. *** A <contains predicate> has been started. The only things we should see are:
  1172. *** ( - matched by .
  1173. *** <column reference> - matched by {id} or "{br_id}"
  1174. *** , - matched by .
  1175. *** ' - matched by \'. Also switch to content search state (cntnsrch).
  1176. ***/
  1177. case 58:
  1178. YY_RULE_SETUP
  1179. { BEGIN cntntsrch;YYTRACE(yytext[0]); return yytext[0];}
  1180. YY_BREAK
  1181. case 59:
  1182. YY_RULE_SETUP
  1183. { VALUE(_ID); }
  1184. YY_BREAK
  1185. case 60:
  1186. YY_RULE_SETUP
  1187. { ID_VALUE(_DELIMITED_ID, L'"'); }
  1188. YY_BREAK
  1189. case 61:
  1190. YY_RULE_SETUP
  1191. { /* empty lex rule */ }
  1192. YY_BREAK
  1193. case 62:
  1194. YY_RULE_SETUP
  1195. { YYTRACE(yytext[0]); return yytext[0];}
  1196. YY_BREAK
  1197. /***
  1198. *** The only things we should see are:
  1199. *** <global view name> - matched by {id}
  1200. *** _TEMPVIEW - matched by \#{id} or \#\#{id}
  1201. ***/
  1202. case 63:
  1203. YY_RULE_SETUP
  1204. { BEGIN INITIAL; VALUE(_ID); }
  1205. YY_BREAK
  1206. case 64:
  1207. YY_RULE_SETUP
  1208. { BEGIN INITIAL; VALUE(_TEMPVIEW); }
  1209. YY_BREAK
  1210. case 65:
  1211. YY_RULE_SETUP
  1212. { BEGIN INITIAL; VALUE(_TEMPVIEW); }
  1213. YY_BREAK
  1214. /***
  1215. *** A <content search condition> has been started. There are several keywords we can see here.
  1216. *** We are also looking for a quoted string, a prefix string, or a simple term. We are taken
  1217. *** back to the initial state by a single quote (').
  1218. ***/
  1219. case 66:
  1220. YY_RULE_SETUP
  1221. { unput(L' '); TOKEN(_AND); }
  1222. YY_BREAK
  1223. case 67:
  1224. YY_RULE_SETUP
  1225. { TOKEN(_COERCE); }
  1226. YY_BREAK
  1227. case 68:
  1228. YY_RULE_SETUP
  1229. { TOKEN(_ISABOUT); }
  1230. YY_BREAK
  1231. case 69:
  1232. YY_RULE_SETUP
  1233. { TOKEN(_NEAR); }
  1234. YY_BREAK
  1235. case 70:
  1236. YY_RULE_SETUP
  1237. { unput(L' '); TOKEN(_NOT); }
  1238. YY_BREAK
  1239. case 71:
  1240. YY_RULE_SETUP
  1241. { unput(L' '); TOKEN(_OR); }
  1242. YY_BREAK
  1243. case 72:
  1244. YY_RULE_SETUP
  1245. { TOKEN(_FORMSOF); }
  1246. YY_BREAK
  1247. case 73:
  1248. YY_RULE_SETUP
  1249. { TOKEN(_WEIGHT); }
  1250. YY_BREAK
  1251. case 74:
  1252. YY_RULE_SETUP
  1253. { STRING_VALUE(_PREFIX_STRING, L'\'', TRUE);}
  1254. YY_BREAK
  1255. case 75:
  1256. YY_RULE_SETUP
  1257. { STRING_VALUE(_STRING, L'\'', TRUE);}
  1258. YY_BREAK
  1259. case 76:
  1260. YY_RULE_SETUP
  1261. { BEGIN INITIAL; YYTRACE(yytext[0]); return yytext[0];}
  1262. YY_BREAK
  1263. case 77:
  1264. YY_RULE_SETUP
  1265. { /* empty lex rule */ }
  1266. YY_BREAK
  1267. case 78:
  1268. YY_RULE_SETUP
  1269. { STRING_VALUE(_STRING, L'\'', FALSE)}
  1270. YY_BREAK
  1271. case 79:
  1272. YY_RULE_SETUP
  1273. { YYTRACE(yytext[0]); return yytext[0];}
  1274. YY_BREAK
  1275. /***
  1276. *** A <from clause> has been started. We've already seen the keyword SCOPE, so this
  1277. *** is not a FROM <view name>. We're just looking for a ( now to put us into the
  1278. *** next state (scope1).
  1279. *** ( - matched by \(. Also switch to scope1 state.
  1280. ***/
  1281. case 80:
  1282. YY_RULE_SETUP
  1283. { BEGIN scope1; YYTRACE(yytext[0]); return yytext[0];}
  1284. YY_BREAK
  1285. case 81:
  1286. YY_RULE_SETUP
  1287. { /* empty lex rule */ }
  1288. YY_BREAK
  1289. case 82:
  1290. YY_RULE_SETUP
  1291. { BEGIN scope1; YYTRACE(yytext[0]); return yytext[0];}
  1292. YY_BREAK
  1293. /***
  1294. *** We're in the middle of a <from clause>. We've seen FROM SCOPE(, so now we need to recognize
  1295. *** the various scope definitions that we might see here. The two important things to recognize
  1296. *** are:
  1297. *** ( - matched by \(. Also switch to scope2 state to match parens.
  1298. *** ) - matched by \). Also switch to the initial (finished <from clause>).
  1299. ***/
  1300. case 83:
  1301. YY_RULE_SETUP
  1302. { STRING_VALUE(_URL, L'"', TRUE); }
  1303. YY_BREAK
  1304. case 84:
  1305. YY_RULE_SETUP
  1306. { TOKEN(_ALL); }
  1307. YY_BREAK
  1308. case 85:
  1309. YY_RULE_SETUP
  1310. { TOKEN(_DEEP_TRAVERSAL); }
  1311. YY_BREAK
  1312. case 86:
  1313. YY_RULE_SETUP
  1314. { TOKEN(_EXCLUDE_SEARCH_TRAVERSAL);}
  1315. YY_BREAK
  1316. case 87:
  1317. YY_RULE_SETUP
  1318. { TOKEN(_OF); }
  1319. YY_BREAK
  1320. case 88:
  1321. YY_RULE_SETUP
  1322. { TOKEN(_SHALLOW_TRAVERSAL); }
  1323. YY_BREAK
  1324. case 89:
  1325. YY_RULE_SETUP
  1326. { /* empty lex rule */ }
  1327. YY_BREAK
  1328. case 90:
  1329. YY_RULE_SETUP
  1330. { BEGIN scope2; YYTRACE(yytext[0]); return yytext[0];}
  1331. YY_BREAK
  1332. case 91:
  1333. YY_RULE_SETUP
  1334. { BEGIN INITIAL; YYTRACE(yytext[0]); return yytext[0];}
  1335. YY_BREAK
  1336. case 92:
  1337. YY_RULE_SETUP
  1338. { YYTRACE(yytext[0]); return yytext[0];}
  1339. YY_BREAK
  1340. /***
  1341. *** We're still in the middle of a <from clause>. So far we've seen:
  1342. *** FROM SCOPE( ... (
  1343. *** We need to find a ')' to finish out the element we're working on:
  1344. *** ) - matched by \). Also switch back to scope1 state.
  1345. ***/
  1346. case 93:
  1347. YY_RULE_SETUP
  1348. { /* empty lex rule */ }
  1349. YY_BREAK
  1350. case 94:
  1351. YY_RULE_SETUP
  1352. { STRING_VALUE(_URL, L'"', TRUE); }
  1353. YY_BREAK
  1354. case 95:
  1355. YY_RULE_SETUP
  1356. { BEGIN scope1; YYTRACE(yytext[0]); return yytext[0];}
  1357. YY_BREAK
  1358. case 96:
  1359. YY_RULE_SETUP
  1360. { YYTRACE(yytext[0]); return yytext[0];}
  1361. YY_BREAK
  1362. case 97:
  1363. YY_RULE_SETUP
  1364. ECHO;
  1365. YY_BREAK
  1366. case YY_STATE_EOF(INITIAL):
  1367. case YY_STATE_EOF(contains):
  1368. case YY_STATE_EOF(cntntsrch):
  1369. case YY_STATE_EOF(scope0):
  1370. case YY_STATE_EOF(scope1):
  1371. case YY_STATE_EOF(scope2):
  1372. case YY_STATE_EOF(view):
  1373. yyterminate();
  1374. case YY_END_OF_BUFFER:
  1375. {
  1376. /* Amount of text matched not including the EOB YY_CHAR. */
  1377. int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
  1378. /* Undo the effects of YY_DO_BEFORE_ACTION. */
  1379. *yy_cp = yy_hold_char;
  1380. YY_RESTORE_YY_MORE_OFFSET
  1381. if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
  1382. {
  1383. /* We're scanning a new file or input source. It's
  1384. * possible that this happened because the user
  1385. * just pointed yyin at a new source and called
  1386. * yylex(). If so, then we have to assure
  1387. * consistency between yy_current_buffer and our
  1388. * globals. Here is the right place to do so, because
  1389. * this is the first action (other than possibly a
  1390. * back-up) that will match for the new input source.
  1391. */
  1392. yy_n_chars = yy_current_buffer->yy_n_chars;
  1393. yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
  1394. }
  1395. /* Note that here we test for yy_c_buf_p "<=" to the position
  1396. * of the first EOB in the buffer, since yy_c_buf_p will
  1397. * already have been incremented past the NUL character
  1398. * (since all states make transitions on EOB to the
  1399. * end-of-buffer state). Contrast this with the test
  1400. * in input().
  1401. */
  1402. if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1403. { /* This was really a NUL. */
  1404. yy_state_type yy_next_state;
  1405. yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  1406. yy_current_state = yy_get_previous_state();
  1407. /* Okay, we're now positioned to make the NUL
  1408. * transition. We couldn't have
  1409. * yy_get_previous_state() go ahead and do it
  1410. * for us because it doesn't know how to deal
  1411. * with the possibility of jamming (and we don't
  1412. * want to build jamming into it because then it
  1413. * will run more slowly).
  1414. */
  1415. yy_next_state = yy_try_NUL_trans( yy_current_state );
  1416. yy_bp = yytext_ptr + YY_MORE_ADJ;
  1417. if ( yy_next_state )
  1418. {
  1419. /* Consume the NUL. */
  1420. yy_cp = ++yy_c_buf_p;
  1421. yy_current_state = yy_next_state;
  1422. goto yy_match;
  1423. }
  1424. else
  1425. {
  1426. yy_cp = yy_last_accepting_cpos;
  1427. yy_current_state = yy_last_accepting_state;
  1428. goto yy_find_action;
  1429. }
  1430. }
  1431. else switch ( yy_get_next_buffer() )
  1432. {
  1433. case EOB_ACT_END_OF_FILE:
  1434. {
  1435. yy_did_buffer_switch_on_eof = 0;
  1436. if ( yyywrap() )
  1437. {
  1438. /* Note: because we've taken care in
  1439. * yy_get_next_buffer() to have set up
  1440. * yytext, we can now set up
  1441. * yy_c_buf_p so that if some total
  1442. * hoser (like flex itself) wants to
  1443. * call the scanner after we return the
  1444. * YY_NULL, it'll still work - another
  1445. * YY_NULL will get returned.
  1446. */
  1447. yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  1448. yy_act = YY_STATE_EOF(YY_START);
  1449. goto do_action;
  1450. }
  1451. else
  1452. {
  1453. if ( ! yy_did_buffer_switch_on_eof )
  1454. YY_NEW_FILE;
  1455. }
  1456. break;
  1457. }
  1458. case EOB_ACT_CONTINUE_SCAN:
  1459. yy_c_buf_p =
  1460. yytext_ptr + yy_amount_of_matched_text;
  1461. yy_current_state = yy_get_previous_state();
  1462. yy_cp = yy_c_buf_p;
  1463. yy_bp = yytext_ptr + YY_MORE_ADJ;
  1464. goto yy_match;
  1465. case EOB_ACT_LAST_MATCH:
  1466. yy_c_buf_p =
  1467. &yy_current_buffer->yy_ch_buf[yy_n_chars];
  1468. yy_current_state = yy_get_previous_state();
  1469. yy_cp = yy_c_buf_p;
  1470. yy_bp = yytext_ptr + YY_MORE_ADJ;
  1471. goto yy_find_action;
  1472. }
  1473. break;
  1474. }
  1475. default:
  1476. /* YY_FATAL_ERROR(L"fatal flex scanner internal error--no action found" );*/
  1477. throw(E_FAIL);
  1478. } /* end of action switch */
  1479. } /* end of scanning one token */
  1480. } /* end of yylex */
  1481. YYLEXER::YYLEXER()
  1482. {
  1483. yy_c_buf_p = 0;
  1484. yy_init = 1;
  1485. yy_start = 0;
  1486. yyprimetoken = 0;
  1487. yy_flex_debug = 0;
  1488. yylineno = 1; // this will only get updated if %option yylineno
  1489. yy_did_buffer_switch_on_eof = 0;
  1490. yy_looking_for_trail_begin = 0;
  1491. yy_more_flag = 0;
  1492. yy_more_len = 0;
  1493. yy_more_offset = yy_prev_more_offset = 0;
  1494. yy_start_stack_ptr = yy_start_stack_depth = 0;
  1495. yy_start_stack = 0;
  1496. yy_current_buffer = 0;
  1497. #ifdef YY_USES_REJECT
  1498. yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
  1499. #else
  1500. yy_state_buf = 0;
  1501. #endif
  1502. pszInputBuffer = pCurBuffer = (YY_CHAR *)NULL;
  1503. cInputBuffer = 0;
  1504. #ifdef DEBUG
  1505. tkndebug = getenv("TKNDEBUG") ? 1 : 0;
  1506. #endif
  1507. }
  1508. YYLEXER::~YYLEXER()
  1509. {
  1510. delete yy_state_buf;
  1511. yy_delete_buffer( yy_current_buffer );
  1512. }
  1513. #ifdef YY_INTERACTIVE
  1514. int YYLEXER::LexerInput( YY_CHAR* buf, int /* max_size */ )
  1515. #else
  1516. int YYLEXER::LexerInput( YY_CHAR* buf, int max_size )
  1517. #endif
  1518. {
  1519. return 0;
  1520. }
  1521. void YYLEXER::LexerOutput( const YY_CHAR* buf, int size )
  1522. {
  1523. /*
  1524. for (int i=0; i<size; i++)
  1525. yyout->put(char(buf[i]));
  1526. (void) yyout->put('\n');
  1527. */
  1528. }
  1529. #ifdef DEBUG
  1530. void YYLEXER::LexerTrace(const YY_CHAR* buf, int size, int tknNum)
  1531. {
  1532. if (tkndebug > 0)
  1533. {
  1534. cout << ">> Lexing Token : ";
  1535. for (int i=0; i<size; i++)
  1536. cout << char(buf[i]);
  1537. cout << " (" << tknNum << ")"<< endl;
  1538. }
  1539. }
  1540. #endif
  1541. void YYLEXER::ResetLexer()
  1542. {
  1543. yy_init = 1;
  1544. yy_start = 0;
  1545. #ifdef DEBUG
  1546. tkndebug = getenv("TKNTRACE") ? 1 : 0;
  1547. #endif
  1548. }
  1549. int YYLEXER::yybufferinput(YY_CHAR *pszBuffer, int cMax)
  1550. {
  1551. int n = min(cMax, cInputBuffer - (int) (pCurBuffer - pszInputBuffer));
  1552. if (n > 0)
  1553. {
  1554. memcpy(pszBuffer, pCurBuffer, n * sizeof(TCHAR));
  1555. pCurBuffer += n;
  1556. }
  1557. return n;
  1558. }
  1559. void YYLEXER::yyprimebuffer(YY_CHAR *pszBuffer)
  1560. {
  1561. // if (NULL != pszInputBuffer)
  1562. // CoTaskMemFree(pszInputBuffer);
  1563. // pszInputBuffer = pCurBuffer = strdup(pszBuffer);
  1564. pszInputBuffer = pCurBuffer = pszBuffer;
  1565. cInputBuffer = strlen(pszInputBuffer);
  1566. ResetLexer();
  1567. }
  1568. void YYLEXER::yyprimelexer(int eToken)
  1569. {
  1570. yyprimetoken = eToken;
  1571. }
  1572. /* yy_get_next_buffer - try to read in a new buffer
  1573. *
  1574. * Returns a code representing an action:
  1575. * EOB_ACT_LAST_MATCH -
  1576. * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  1577. * EOB_ACT_END_OF_FILE - end of file
  1578. */
  1579. int YYLEXER::yy_get_next_buffer()
  1580. {
  1581. register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
  1582. register YY_CHAR *source = yytext_ptr;
  1583. register int number_to_move, i;
  1584. int ret_val;
  1585. if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  1586. /* YY_FATAL_ERROR(L"fatal flex scanner internal error--end of buffer missed" ); */
  1587. throw(E_FAIL);
  1588. if ( yy_current_buffer->yy_fill_buffer == 0 )
  1589. { /* Don't try to fill the buffer, so this is an EOF. */
  1590. if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  1591. {
  1592. /* We matched a single character, the EOB, so
  1593. * treat this as a final EOF.
  1594. */
  1595. return EOB_ACT_END_OF_FILE;
  1596. }
  1597. else
  1598. {
  1599. /* We matched some text prior to the EOB, first
  1600. * process it.
  1601. */
  1602. return EOB_ACT_LAST_MATCH;
  1603. }
  1604. }
  1605. /* Try to read more data. */
  1606. /* First move last chars to start of buffer. */
  1607. number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
  1608. for ( i = 0; i < number_to_move; ++i )
  1609. *(dest++) = *(source++);
  1610. if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  1611. /* don't do the read, it's not guaranteed to return an EOF,
  1612. * just force an EOF
  1613. */
  1614. yy_current_buffer->yy_n_chars = yy_n_chars = 0;
  1615. else
  1616. {
  1617. int num_to_read =
  1618. yy_current_buffer->yy_buf_size - number_to_move - 1;
  1619. while ( num_to_read <= 0 )
  1620. { /* Not enough room in the buffer - grow it. */
  1621. #ifdef YY_USES_REJECT
  1622. /*YY_FATAL_ERROR(L"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );*/
  1623. throw(E_OUTOFMEMORY);
  1624. #else
  1625. /* just a shorter name for the current buffer */
  1626. YY_BUFFER_STATE b = yy_current_buffer;
  1627. int yy_c_buf_p_offset =
  1628. (int) (yy_c_buf_p - b->yy_ch_buf);
  1629. if ( b->yy_is_our_buffer )
  1630. {
  1631. int new_size = b->yy_buf_size * 2;
  1632. if ( new_size <= 0 )
  1633. b->yy_buf_size += b->yy_buf_size / 8;
  1634. else
  1635. b->yy_buf_size *= 2;
  1636. b->yy_ch_buf = (YY_CHAR *)
  1637. /* Include room in for 2 EOB chars. */
  1638. yy_flex_realloc( (void *) b->yy_ch_buf,
  1639. b->yy_buf_size + 2 );
  1640. }
  1641. else
  1642. /* Can't grow it, we don't own it. */
  1643. b->yy_ch_buf = 0;
  1644. if ( ! b->yy_ch_buf )
  1645. /*YY_FATAL_ERROR(L"fatal error - scanner input buffer overflow");*/
  1646. throw(E_FAIL);
  1647. yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  1648. num_to_read = yy_current_buffer->yy_buf_size -
  1649. number_to_move - 1;
  1650. #endif
  1651. }
  1652. if ( num_to_read > YY_READ_BUF_SIZE )
  1653. num_to_read = YY_READ_BUF_SIZE;
  1654. /* Read in more data. */
  1655. YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1656. yy_n_chars, num_to_read );
  1657. yy_current_buffer->yy_n_chars = yy_n_chars;
  1658. }
  1659. if ( yy_n_chars == 0 )
  1660. {
  1661. if ( number_to_move == YY_MORE_ADJ )
  1662. {
  1663. ret_val = EOB_ACT_END_OF_FILE;
  1664. yyrestart( );
  1665. }
  1666. else
  1667. {
  1668. ret_val = EOB_ACT_LAST_MATCH;
  1669. yy_current_buffer->yy_buffer_status =
  1670. YY_BUFFER_EOF_PENDING;
  1671. }
  1672. }
  1673. else
  1674. ret_val = EOB_ACT_CONTINUE_SCAN;
  1675. yy_n_chars += number_to_move;
  1676. yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1677. yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1678. yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
  1679. return ret_val;
  1680. }
  1681. /* yy_get_previous_state - get the state just before the EOB YY_CHAR was reached */
  1682. yy_state_type YYLEXER::yy_get_previous_state()
  1683. {
  1684. register yy_state_type yy_current_state;
  1685. register YY_CHAR *yy_cp;
  1686. yy_current_state = yy_start;
  1687. for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1688. {
  1689. 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)];
  1690. if ( yy_accept[yy_current_state] )
  1691. {
  1692. yy_last_accepting_state = yy_current_state;
  1693. yy_last_accepting_cpos = yy_cp;
  1694. }
  1695. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1696. {
  1697. yy_current_state = (int) yy_def[yy_current_state];
  1698. if ( yy_current_state >= 406 )
  1699. yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
  1700. }
  1701. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1702. }
  1703. return yy_current_state;
  1704. }
  1705. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1706. *
  1707. * synopsis
  1708. * next_state = yy_try_NUL_trans( current_state );
  1709. */
  1710. yy_state_type YYLEXER::yy_try_NUL_trans( yy_state_type yy_current_state )
  1711. {
  1712. register int yy_is_jam;
  1713. register YY_CHAR *yy_cp = yy_c_buf_p;
  1714. register YY_CHAR yy_c = 1;
  1715. if ( yy_accept[yy_current_state] )
  1716. {
  1717. yy_last_accepting_state = yy_current_state;
  1718. yy_last_accepting_cpos = yy_cp;
  1719. }
  1720. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1721. {
  1722. yy_current_state = (int) yy_def[yy_current_state];
  1723. if ( yy_current_state >= 406 )
  1724. yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
  1725. }
  1726. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  1727. yy_is_jam = (yy_current_state == 405);
  1728. return yy_is_jam ? 0 : yy_current_state;
  1729. }
  1730. void YYLEXER::yyunput( int c, register YY_CHAR* yy_bp )
  1731. {
  1732. register YY_CHAR *yy_cp = yy_c_buf_p;
  1733. /* undo effects of setting up yytext */
  1734. *yy_cp = yy_hold_char;
  1735. if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1736. { /* need to shift things up to make room */
  1737. /* +2 for EOB chars. */
  1738. register int number_to_move = yy_n_chars + 2;
  1739. register YY_CHAR *dest = &yy_current_buffer->yy_ch_buf[
  1740. yy_current_buffer->yy_buf_size + 2];
  1741. register YY_CHAR *source =
  1742. &yy_current_buffer->yy_ch_buf[number_to_move];
  1743. while ( source > yy_current_buffer->yy_ch_buf )
  1744. *--dest = *--source;
  1745. yy_cp += (int) (dest - source);
  1746. yy_bp += (int) (dest - source);
  1747. yy_current_buffer->yy_n_chars =
  1748. yy_n_chars = yy_current_buffer->yy_buf_size;
  1749. if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1750. /*YY_FATAL_ERROR( L"flex scanner push-back overflow" );*/
  1751. throw(E_FAIL);
  1752. }
  1753. *--yy_cp = (YY_CHAR) c;
  1754. yytext_ptr = yy_bp;
  1755. yy_hold_char = *yy_cp;
  1756. yy_c_buf_p = yy_cp;
  1757. }
  1758. int YYLEXER::yyinput()
  1759. {
  1760. int c;
  1761. *yy_c_buf_p = yy_hold_char;
  1762. if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1763. {
  1764. /* yy_c_buf_p now points to the character we want to return.
  1765. * If this occurs *before* the EOB characters, then it's a
  1766. * valid NUL; if not, then we've hit the end of the buffer.
  1767. */
  1768. if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1769. /* This was really a NUL. */
  1770. *yy_c_buf_p = '\0';
  1771. else
  1772. { /* need more input */
  1773. int offset = (int)(yy_c_buf_p - yytext_ptr);
  1774. ++yy_c_buf_p;
  1775. switch ( yy_get_next_buffer() )
  1776. {
  1777. case EOB_ACT_LAST_MATCH:
  1778. /* This happens because yy_g_n_b()
  1779. * sees that we've accumulated a
  1780. * token and flags that we need to
  1781. * try matching the token before
  1782. * proceeding. But for input(),
  1783. * there's no matching to consider.
  1784. * So convert the EOB_ACT_LAST_MATCH
  1785. * to EOB_ACT_END_OF_FILE.
  1786. */
  1787. /* Reset buffer status. */
  1788. yyrestart( );
  1789. /* fall through */
  1790. case EOB_ACT_END_OF_FILE:
  1791. {
  1792. if ( yyywrap() )
  1793. return EOF;
  1794. if ( ! yy_did_buffer_switch_on_eof )
  1795. YY_NEW_FILE;
  1796. #ifdef __cplusplus
  1797. return yyinput();
  1798. #else
  1799. return input();
  1800. #endif
  1801. }
  1802. case EOB_ACT_CONTINUE_SCAN:
  1803. yy_c_buf_p = yytext_ptr + offset;
  1804. break;
  1805. }
  1806. }
  1807. }
  1808. c = *(YY_CHAR *) yy_c_buf_p; /* cast for 8-bit YY_CHAR's */
  1809. *yy_c_buf_p = '\0'; /* preserve yytext */
  1810. yy_hold_char = *++yy_c_buf_p;
  1811. return c;
  1812. }
  1813. void YYLEXER::yyrestart( )
  1814. {
  1815. if ( ! yy_current_buffer )
  1816. yy_current_buffer = yy_create_buffer( (cInputBuffer * sizeof(YY_CHAR)) + sizeof(YY_CHAR) );
  1817. yy_init_buffer( yy_current_buffer );
  1818. yy_load_buffer_state();
  1819. }
  1820. void YYLEXER::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1821. {
  1822. if ( yy_current_buffer == new_buffer )
  1823. return;
  1824. if ( yy_current_buffer )
  1825. {
  1826. /* Flush out information for old buffer. */
  1827. *yy_c_buf_p = yy_hold_char;
  1828. yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  1829. yy_current_buffer->yy_n_chars = yy_n_chars;
  1830. }
  1831. yy_current_buffer = new_buffer;
  1832. yy_load_buffer_state();
  1833. /* We don't actually know whether we did this switch during
  1834. * EOF (yyywrap()) processing, but the only time this flag
  1835. * is looked at is after yyywrap() is called, so it's safe
  1836. * to go ahead and always set it.
  1837. */
  1838. yy_did_buffer_switch_on_eof = 1;
  1839. }
  1840. void YYLEXER::yy_load_buffer_state()
  1841. {
  1842. yy_n_chars = yy_current_buffer->yy_n_chars;
  1843. yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  1844. yy_hold_char = *yy_c_buf_p;
  1845. }
  1846. YY_BUFFER_STATE YYLEXER::yy_create_buffer( int size )
  1847. {
  1848. YY_BUFFER_STATE b;
  1849. b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1850. if ( ! b )
  1851. /*YY_FATAL_ERROR( L"out of dynamic memory in yy_create_buffer()" );*/
  1852. throw(E_OUTOFMEMORY);
  1853. b->yy_buf_size = size;
  1854. /* yy_ch_buf has to be 2 characters longer than the size given because
  1855. * we need to put in 2 end-of-buffer characters.
  1856. */
  1857. b->yy_ch_buf = (YY_CHAR *) yy_flex_alloc( b->yy_buf_size + 2 );
  1858. if ( ! b->yy_ch_buf )
  1859. /*YY_FATAL_ERROR( L"out of dynamic memory in yy_create_buffer()" );*/
  1860. throw(E_OUTOFMEMORY);
  1861. b->yy_is_our_buffer = 1;
  1862. yy_init_buffer( b );
  1863. return b;
  1864. }
  1865. void YYLEXER::yy_delete_buffer( YY_BUFFER_STATE b )
  1866. {
  1867. if ( ! b )
  1868. return;
  1869. if ( b == yy_current_buffer )
  1870. yy_current_buffer = (YY_BUFFER_STATE) 0;
  1871. if ( b->yy_is_our_buffer )
  1872. yy_flex_free( (void *) b->yy_ch_buf );
  1873. yy_flex_free( (void *) b );
  1874. }
  1875. extern "C" int isatty YY_PROTO(( int ));
  1876. void YYLEXER::yy_init_buffer( YY_BUFFER_STATE b )
  1877. {
  1878. yy_flush_buffer( b );
  1879. b->yy_fill_buffer = 1;
  1880. b->yy_is_interactive = 0;
  1881. }
  1882. void YYLEXER::yy_flush_buffer( YY_BUFFER_STATE b )
  1883. {
  1884. if ( ! b )
  1885. return;
  1886. b->yy_n_chars = 0;
  1887. /* We always need two end-of-buffer characters. The first causes
  1888. * a transition to the end-of-buffer state. The second causes
  1889. * a jam in that state.
  1890. */
  1891. b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  1892. b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1893. b->yy_buf_pos = &b->yy_ch_buf[0];
  1894. b->yy_at_bol = 1;
  1895. b->yy_buffer_status = YY_BUFFER_NEW;
  1896. if ( b == yy_current_buffer )
  1897. yy_load_buffer_state();
  1898. }
  1899. #ifndef YY_NO_SCAN_BUFFER
  1900. #endif
  1901. #ifndef YY_NO_SCAN_STRING
  1902. #endif
  1903. #ifndef YY_NO_SCAN_BYTES
  1904. #endif
  1905. #ifndef YY_NO_PUSH_STATE
  1906. void YYLEXER::yy_push_state( int new_state )
  1907. {
  1908. if ( yy_start_stack_ptr >= yy_start_stack_depth )
  1909. {
  1910. yy_size_t new_size;
  1911. yy_start_stack_depth += YY_START_STACK_INCR;
  1912. new_size = yy_start_stack_depth * sizeof( int );
  1913. if ( ! yy_start_stack )
  1914. yy_start_stack = (int *) yy_flex_alloc( new_size );
  1915. else
  1916. yy_start_stack = (int *) yy_flex_realloc(
  1917. (void *) yy_start_stack, new_size );
  1918. if ( ! yy_start_stack )
  1919. /*YY_FATAL_ERROR(L"out of memory expanding start-condition stack" );*/
  1920. throw(E_OUTOFMEMORY);
  1921. }
  1922. yy_start_stack[yy_start_stack_ptr++] = YY_START;
  1923. BEGIN(new_state);
  1924. }
  1925. #endif
  1926. #ifndef YY_NO_POP_STATE
  1927. void YYLEXER::yy_pop_state()
  1928. {
  1929. if ( --yy_start_stack_ptr < 0 )
  1930. /*YY_FATAL_ERROR( L"start-condition stack underflow" );*/
  1931. throw(E_FAIL);
  1932. BEGIN(yy_start_stack[yy_start_stack_ptr]);
  1933. }
  1934. #endif
  1935. #ifndef YY_NO_TOP_STATE
  1936. int YYLEXER::yy_top_state()
  1937. {
  1938. return yy_start_stack[yy_start_stack_ptr - 1];
  1939. }
  1940. #endif
  1941. #ifndef YY_EXIT_FAILURE
  1942. #define YY_EXIT_FAILURE 2
  1943. #endif
  1944. void YYLEXER::LexerError( yyconst YY_CHAR msg[] )
  1945. {
  1946. /* ******************************** Don't really want to do this ************************************
  1947. // UNDONE: 3/28/97 This needs to pass the error message back to yacc (or
  1948. // store it in the error area itself!
  1949. for (unsigned int i=0; i<wcslen(msg); i++)
  1950. cerr << char(msg[i]);
  1951. cerr << endl;
  1952. exit( YY_EXIT_FAILURE );
  1953. ******************************** Don't really want to do this ************************************ */
  1954. }
  1955. /* Redefine yyless() so it works in section 3 code. */
  1956. #undef yyless
  1957. #define yyless(n) \
  1958. do \
  1959. { \
  1960. /* Undo effects of setting up yytext. */ \
  1961. yytext[yyleng] = yy_hold_char; \
  1962. yy_c_buf_p = yytext + n; \
  1963. yy_hold_char = *yy_c_buf_p; \
  1964. *yy_c_buf_p = '\0'; \
  1965. yyleng = n; \
  1966. } \
  1967. while ( 0 )
  1968. /* Internal utility routines. */
  1969. #ifndef yytext_ptr
  1970. #ifdef YY_USE_PROTOS
  1971. static void yy_flex_strncpy( YY_CHAR *s1, yyconst YY_CHAR *s2, int n )
  1972. #else
  1973. static void yy_flex_strncpy( s1, s2, n )
  1974. YY_CHAR *s1;
  1975. yyconst YY_CHAR *s2;
  1976. int n;
  1977. #endif
  1978. {
  1979. register int i;
  1980. for ( i = 0; i < n; ++i )
  1981. s1[i] = s2[i];
  1982. }
  1983. #endif
  1984. #ifdef YY_NEED_STRLEN
  1985. #ifdef YY_USE_PROTOS
  1986. static int yy_flex_strlen( yyconst YY_CHAR *s )
  1987. #else
  1988. static int yy_flex_strlen( s )
  1989. yyconst YY_CHAR *s;
  1990. #endif
  1991. {
  1992. register int n;
  1993. for ( n = 0; s[n]; ++n )
  1994. ;
  1995. return n;
  1996. }
  1997. #endif
  1998. #ifdef YY_USE_PROTOS
  1999. static void *yy_flex_alloc( yy_size_t size )
  2000. #else
  2001. static void *yy_flex_alloc( size )
  2002. yy_size_t size;
  2003. #endif
  2004. {
  2005. return (void *) malloc( size );
  2006. }
  2007. #ifdef YY_USE_PROTOS
  2008. static void *yy_flex_realloc( void *ptr, yy_size_t size )
  2009. #else
  2010. static void *yy_flex_realloc( ptr, size )
  2011. void *ptr;
  2012. yy_size_t size;
  2013. #endif
  2014. {
  2015. /* The cast to (YY_CHAR *) in the following accommodates both
  2016. * implementations that use YY_CHAR* generic pointers, and those
  2017. * that use void* generic pointers. It works with the latter
  2018. * because both ANSI C and C++ allow castless assignment from
  2019. * any pointer type to void*, and deal with argument conversions
  2020. * as though doing an assignment.
  2021. */
  2022. return (void *) realloc( (YY_CHAR *) ptr, size );
  2023. }
  2024. #ifdef YY_USE_PROTOS
  2025. static void yy_flex_free( void *ptr )
  2026. #else
  2027. static void yy_flex_free( ptr )
  2028. void *ptr;
  2029. #endif
  2030. {
  2031. free( ptr );
  2032. }
  2033. #if YY_MAIN
  2034. int main()
  2035. {
  2036. yylex();
  2037. return 0;
  2038. }
  2039. #endif