windows-nt/Source/XPSP1/NT/inetsrv/query/qutil/triplish/lex.cxx
2020-09-26 16:20:57 +08:00

4207 lines
149 KiB
C++

/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
*/
#include <pch.cxx>
#pragma hdrstop
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifndef YY_CHAR
#define YY_CHAR WCHAR
#endif
#ifdef __cplusplus
#include <stdlib.h>
//class istream;
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#pragma warn -rch
#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed YY_CHAR to an unsigned
* integer for use as an array index. If the signed YY_CHAR is negative,
* we want to instead treat it as an 8-bit unsigned YY_CHAR, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (YY_CHAR) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 32767 // UNDONE: Should really just take the input from the bstr passed in
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* The funky do-while in the following #define is used to turn the definition
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
* if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the yyless() call.
*/
/* Return all but the first 'n' matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
*yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
typedef unsigned int yy_size_t;
struct yy_buffer_state
{
YY_CHAR *yy_ch_buf; /* input buffer */
YY_CHAR *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*/
#define YY_CURRENT_BUFFER yy_current_buffer
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
#define yytext_ptr yytext
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
yytext_ptr -= yy_more_len; \
yyleng = (int) (yy_cp - yytext_ptr); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 172
#define YY_END_OF_BUFFER 173
static yyconst short int yy_accept[804] =
{ 0,
0, 0, 0, 0, 0, 0, 138, 138, 151, 151,
0, 0, 0, 0, 0, 0, 173, 87, 1, 1,
20, 172, 172, 172, 18, 2, 3, 172, 24, 28,
25, 172, 87, 87, 87, 87, 172, 172, 19, 23,
90, 91, 172, 172, 97, 123, 138, 124, 132, 138,
133, 130, 134, 135, 125, 138, 138, 138, 136, 131,
151, 148, 144, 151, 152, 142, 145, 146, 151, 151,
151, 147, 143, 171, 154, 162, 171, 168, 160, 164,
165, 169, 171, 171, 171, 171, 166, 163, 161, 121,
104, 172, 113, 116, 117, 121, 121, 121, 118, 114,
115, 172, 98, 98, 172, 103, 99, 87, 86, 1,
1, 1, 29, 0, 81, 75, 0, 7, 0, 0,
0, 0, 0, 26, 0, 0, 0, 0, 27, 0,
5, 0, 87, 87, 87, 87, 87, 0, 30, 31,
0, 0, 0, 0, 0, 0, 0, 0, 0, 90,
0, 0, 122, 138, 137, 0, 124, 138, 137, 0,
126, 0, 138, 138, 138, 138, 138, 151, 150, 0,
148, 151, 150, 0, 149, 0, 151, 151, 151, 151,
151, 171, 170, 154, 171, 170, 0, 153, 171, 171,
171, 171, 171, 121, 120, 104, 0, 121, 121, 121,
0, 0, 102, 101, 98, 98, 0, 100, 0, 0,
80, 0, 0, 89, 0, 0, 0, 89, 0, 0,
32, 54, 40, 0, 0, 48, 34, 0, 87, 87,
87, 87, 14, 15, 0, 0, 0, 0, 47, 55,
49, 0, 0, 0, 33, 41, 35, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 126, 138, 138, 138, 138, 128, 138, 149,
151, 151, 151, 151, 140, 151, 153, 171, 171, 171,
171, 156, 119, 121, 121, 107, 108, 0, 56, 42,
74, 6, 0, 88, 0, 50, 36, 52, 38, 4,
12, 13, 87, 87, 16, 17, 14, 46, 57, 51,
53, 58, 59, 43, 37, 39, 44, 45, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
0, 0, 0, 138, 127, 129, 151, 139, 141, 155,
171, 171, 159, 105, 106, 121, 0, 0, 88, 12,
87, 21, 22, 16, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
171, 157, 158, 109, 110, 0, 87, 21, 0, 0,
0, 0, 0, 0, 64, 65, 0, 0, 0, 0,
0, 0, 92, 0, 0, 0, 0, 0, 171, 111,
112, 87, 0, 10, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 171, 87, 0,
0, 67, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 95, 0, 0, 171, 11, 0,
63, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
96, 94, 93, 167, 11, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 70, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 72, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 72, 0, 0, 72, 0, 0, 0,
0, 0, 0, 0, 0, 72, 0, 0, 0, 0,
0, 0, 66, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 79, 71, 0, 0, 0, 0, 0,
72, 0, 0, 0, 73, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 79, 78,
71, 0, 72, 0, 0, 73, 0, 72, 73, 0,
0, 0, 0, 0, 0, 0, 77, 0, 78, 71,
72, 71, 73, 0, 0, 0, 0, 0, 0, 0,
0, 76, 77, 0, 0, 0, 61, 0, 0, 0,
85, 0, 0, 76, 0, 0, 61, 0, 0, 85,
84, 0, 0, 0, 60, 0, 0, 83, 0, 84,
0, 0, 0, 60, 82, 83, 0, 0, 68, 82,
0, 69, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 3, 4, 5, 6, 7, 1, 8, 1, 9,
10, 11, 12, 13, 1, 14, 15, 16, 17, 18,
18, 18, 18, 18, 18, 18, 18, 1, 19, 20,
21, 22, 12, 23, 24, 1, 25, 26, 27, 28,
29, 30, 31, 1, 32, 33, 34, 35, 36, 37,
1, 38, 39, 40, 41, 42, 43, 44, 1, 1,
45, 1, 12, 46, 1, 1, 47, 1, 48, 49,
50, 51, 29, 30, 52, 1, 32, 53, 34, 54,
36, 55, 1, 56, 57, 58, 59, 42, 43, 60,
1, 1, 61, 62, 63, 64, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst int yy_meta[65] =
{ 0,
1, 1, 2, 3, 4, 5, 5, 6, 7, 8,
1, 1, 1, 1, 1, 1, 1, 1, 9, 3,
10, 3, 5, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 3, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
11, 12, 13, 6
} ;
static yyconst short int yy_base[854] =
{ 0,
0, 63, 30, 42, 2468, 2467, 125, 187, 249, 311,
373, 435, 497, 559, 134, 149, 2477, 2473, 10, 12,
2454, 2469, 2468, 2467, 2480, 13, 2480, 2480, 31, 14,
35, 2466, 24, 27, 177, 38, 33, 609, 2480, 2480,
26, 2480, 2418, 2415, 2480, 2457, 34, 2464, 2480, 663,
2480, 2480, 2480, 2480, 2480, 103, 46, 120, 2480, 219,
54, 2463, 2480, 725, 2480, 2480, 2480, 2480, 115, 104,
164, 2480, 277, 2462, 2461, 2480, 787, 2480, 2480, 2480,
2480, 2480, 170, 39, 211, 118, 2480, 2480, 2480, 2460,
2459, 0, 2480, 2480, 2480, 181, 92, 161, 4, 2480,
2480, 21, 260, 48, 2456, 2480, 2480, 2457, 2480, 100,
110, 112, 97, 2454, 2447, 2452, 0, 2451, 0, 2436,
241, 288, 117, 152, 2397, 172, 168, 175, 197, 218,
2448, 0, 242, 271, 138, 236, 216, 237, 323, 346,
299, 2416, 66, 156, 251, 299, 254, 273, 282, 234,
2394, 2398, 2480, 289, 2480, 401, 2446, 849, 2443, 2135,
299, 456, 423, 302, 327, 345, 353, 356, 2480, 464,
2111, 911, 2096, 2057, 360, 525, 477, 450, 367, 368,
385, 2053, 2480, 2052, 973, 2049, 2047, 2031, 336, 349,
401, 483, 2030, 2029, 2480, 2028, 2024, 402, 507, 263,
373, 193, 2480, 2480, 414, 384, 2007, 2480, 447, 344,
2480, 2004, 2003, 2480, 537, 387, 2002, 2001, 449, 431,
2480, 2480, 2480, 476, 437, 2480, 2480, 1999, 484, 508,
515, 488, 1984, 2480, 511, 1939, 569, 1963, 1962, 2480,
1961, 493, 581, 1960, 1958, 2480, 1954, 508, 465, 525,
493, 502, 547, 542, 551, 544, 1937, 1940, 551, 556,
1908, 1907, 2480, 0, 1913, 451, 577, 2480, 613, 2480,
0, 1912, 614, 615, 2480, 616, 2480, 1954, 590, 602,
1946, 2480, 2480, 575, 623, 2480, 2480, 585, 2480, 2480,
2480, 2480, 609, 2480, 622, 2480, 2480, 2480, 2480, 2480,
1944, 2480, 607, 589, 1940, 2480, 1937, 2480, 2480, 2480,
2480, 2480, 2480, 2480, 2480, 2480, 2480, 2480, 608, 1903,
608, 573, 632, 647, 597, 656, 644, 660, 648, 2480,
1907, 686, 687, 0, 2480, 2480, 0, 2480, 2480, 2480,
689, 639, 2480, 2480, 2480, 688, 655, 693, 2480, 1931,
691, 1927, 2480, 1924, 668, 661, 661, 689, 662, 667,
701, 682, 1923, 694, 1874, 1879, 737, 739, 738, 774,
748, 2480, 2480, 2480, 2480, 712, 747, 1903, 708, 1841,
1770, 717, 725, 729, 2480, 2480, 733, 767, 1742, 725,
726, 802, 798, 836, 1772, 756, 777, 1765, 771, 2480,
2480, 821, 788, 2480, 785, 1737, 725, 786, 1736, 816,
825, 1791, 1790, 818, 808, 808, 829, 835, 1789, 836,
1727, 2480, 840, 818, 829, 1755, 775, 878, 894, 1773,
1035, 844, 863, 851, 2480, 849, 875, 1784, 1783, 875,
2480, 1721, 1780, 874, 923, 924, 1767, 882, 900, 1766,
938, 941, 905, 640, 1096, 866, 927, 944, 913, 918,
2480, 2480, 2480, 2480, 1776, 1715, 946, 167, 893, 947,
965, 950, 933, 908, 966, 948, 955, 1762, 1771, 961,
985, 1007, 1010, 964, 968, 989, 1157, 994, 998, 1025,
1760, 1218, 985, 471, 2480, 1006, 1028, 1049, 1758, 971,
1015, 1757, 1766, 1021, 1037, 1740, 1037, 1059, 1016, 1019,
1024, 1754, 1068, 1074, 1085, 1050, 1078, 1279, 1110, 1114,
1062, 1117, 1079, 1340, 1739, 1067, 1088, 1124, 1076, 1101,
1122, 1735, 1075, 1127, 1128, 1135, 1136, 1137, 1093, 1103,
1127, 1142, 1751, 237, 1139, 1702, 1097, 1759, 1734, 1154,
1142, 1182, 1145, 1747, 1185, 1151, 1211, 1188, 1746, 1205,
1187, 1196, 1232, 1167, 1239, 1235, 1195, 1248, 1726, 1206,
1237, 1744, 1753, 1241, 1234, 1196, 1725, 1724, 1199, 1265,
1222, 1689, 2480, 1745, 1190, 1221, 1719, 1233, 1306, 1249,
1307, 1310, 1261, 1303, 1309, 1317, 1215, 1320, 1327, 1641,
1334, 1289, 1304, 1307, 1258, 1652, 1324, 1317, 1630, 1290,
1632, 1363, 1335, 1202, 2480, 1316, 1336, 1571, 1364, 1348,
1195, 1388, 1356, 1394, 1385, 1402, 1462, 1397, 1409, 1367,
1406, 1364, 1410, 1416, 1378, 1390, 1415, 1396, 1399, 1404,
1389, 1434, 1410, 1420, 1417, 1416, 1263, 1425, 1435, 1469,
1418, 1473, 1452, 1477, 2480, 1486, 1433, 1437, 1496, 1381,
1487, 1470, 1497, 1502, 1457, 1437, 1487, 1468, 1506, 1471,
1494, 1516, 1268, 2480, 1264, 1480, 1313, 1492, 1507, 1547,
1495, 1550, 1510, 1556, 1529, 1517, 1213, 1541, 1238, 1559,
1275, 1577, 2480, 1553, 1522, 1536, 1524, 1554, 1584, 1593,
1557, 1553, 1563, 1154, 2480, 1090, 1555, 1566, 1616, 1570,
1620, 1583, 1628, 1624, 2480, 1631, 1594, 1621, 1633, 1592,
1601, 1630, 1598, 1649, 1072, 1022, 998, 1614, 1204, 2480,
2480, 986, 1027, 1650, 873, 918, 1656, 1641, 1644, 1653,
1641, 1625, 1664, 1639, 747, 722, 757, 702, 756, 2480,
1668, 2480, 1695, 1704, 1711, 1655, 1682, 1670, 654, 596,
556, 2480, 593, 516, 1717, 1658, 2480, 1683, 1682, 1690,
517, 466, 411, 2480, 1722, 1728, 427, 339, 1693, 1729,
2480, 305, 248, 1732, 2480, 294, 1733, 170, 63, 92,
34, 1734, 1735, 2480, 2480, 8, 1740, 1741, 2480, 2480,
1744, 2480, 2480, 1807, 1820, 1833, 1846, 1859, 1872, 1885,
1898, 1911, 1924, 1937, 1950, 1963, 1976, 1988, 2001, 2013,
2026, 2035, 2048, 2058, 2071, 2084, 2097, 2110, 2123, 2136,
2149, 2162, 2175, 2188, 2201, 2214, 2227, 2240, 2253, 2266,
2279, 2292, 2305, 2318, 2331, 2344, 2357, 2369, 2382, 2395,
2408, 2421, 2434
} ;
static yyconst short int yy_def[854] =
{ 0,
804, 804, 805, 805, 805, 805, 806, 806, 807, 807,
808, 808, 809, 809, 810, 810, 803, 811, 811, 803,
803, 812, 813, 814, 803, 815, 803, 803, 803, 803,
803, 816, 811, 811, 811, 811, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 817, 803, 803, 818,
803, 803, 803, 803, 803, 817, 817, 817, 803, 803,
819, 803, 803, 820, 803, 803, 803, 803, 819, 819,
819, 803, 803, 821, 803, 803, 822, 803, 803, 803,
803, 803, 821, 821, 821, 821, 803, 803, 803, 823,
803, 824, 803, 803, 803, 823, 823, 823, 803, 803,
803, 825, 825, 803, 826, 803, 803, 811, 803, 811,
803, 803, 803, 812, 803, 813, 827, 814, 828, 815,
815, 829, 803, 803, 803, 803, 803, 803, 803, 803,
816, 830, 811, 811, 811, 811, 811, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 817, 803, 803, 803, 818, 831, 831,
817, 831, 817, 817, 817, 817, 817, 819, 803, 803,
803, 820, 832, 832, 819, 832, 819, 819, 819, 819,
819, 821, 803, 803, 822, 833, 833, 821, 821, 821,
821, 821, 821, 823, 803, 803, 824, 823, 823, 823,
803, 825, 803, 803, 825, 803, 826, 803, 803, 803,
803, 827, 828, 803, 829, 815, 834, 834, 803, 803,
803, 803, 803, 803, 803, 803, 803, 830, 811, 811,
811, 811, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 158, 158, 817, 817, 803, 817, 803,
172, 172, 819, 819, 803, 819, 803, 821, 821, 821,
821, 803, 803, 823, 823, 803, 803, 803, 803, 803,
803, 803, 815, 803, 803, 803, 803, 803, 803, 803,
803, 803, 811, 811, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 158, 803, 803, 172, 803, 803, 803,
821, 821, 803, 803, 803, 823, 803, 803, 803, 803,
811, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
821, 803, 803, 803, 803, 803, 811, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 821, 803,
803, 811, 803, 803, 803, 803, 803, 803, 803, 803,
835, 803, 803, 803, 803, 803, 803, 821, 811, 803,
803, 803, 803, 803, 836, 803, 835, 835, 837, 803,
835, 803, 803, 803, 803, 803, 803, 821, 803, 803,
803, 803, 803, 836, 836, 838, 803, 803, 835, 803,
837, 837, 835, 839, 837, 803, 840, 841, 803, 803,
803, 803, 803, 803, 803, 803, 842, 803, 836, 838,
838, 836, 843, 803, 803, 803, 835, 803, 839, 803,
839, 844, 845, 803, 840, 840, 840, 841, 841, 841,
803, 841, 803, 803, 803, 842, 842, 846, 803, 803,
836, 803, 843, 803, 843, 803, 803, 847, 803, 803,
803, 803, 839, 844, 844, 840, 839, 844, 845, 845,
841, 845, 839, 845, 803, 840, 841, 841, 803, 841,
841, 803, 803, 842, 846, 846, 842, 848, 803, 803,
803, 803, 803, 843, 803, 849, 847, 850, 803, 803,
803, 839, 840, 803, 839, 844, 845, 841, 803, 845,
839, 845, 845, 803, 841, 841, 803, 841, 803, 803,
842, 803, 848, 803, 848, 803, 803, 803, 803, 843,
803, 849, 803, 850, 803, 803, 803, 803, 839, 803,
839, 845, 803, 845, 839, 845, 803, 841, 841, 803,
841, 803, 803, 803, 803, 803, 848, 803, 803, 803,
803, 843, 803, 803, 803, 803, 803, 803, 839, 803,
839, 845, 803, 845, 839, 845, 803, 841, 841, 803,
841, 803, 803, 803, 803, 803, 848, 803, 803, 803,
803, 843, 803, 803, 803, 803, 839, 803, 839, 845,
803, 845, 839, 845, 803, 841, 841, 803, 841, 803,
803, 803, 803, 803, 803, 803, 848, 803, 803, 803,
803, 843, 803, 803, 803, 803, 839, 803, 839, 845,
803, 845, 839, 845, 841, 841, 803, 841, 803, 803,
803, 803, 803, 803, 803, 803, 848, 803, 803, 803,
803, 803, 843, 803, 803, 803, 803, 839, 845, 803,
845, 839, 845, 841, 803, 841, 803, 803, 803, 803,
803, 848, 803, 803, 803, 803, 803, 803, 843, 803,
803, 803, 839, 845, 803, 839, 845, 841, 841, 803,
803, 803, 848, 803, 803, 803, 803, 803, 843, 803,
845, 803, 845, 803, 851, 803, 803, 848, 803, 803,
803, 803, 803, 851, 851, 852, 803, 803, 803, 848,
803, 803, 803, 803, 852, 851, 853, 803, 803, 848,
803, 803, 803, 851, 803, 853, 803, 803, 803, 848,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 0, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803
} ;
static yyconst short int yy_nxt[2545] =
{ 0,
803, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 110, 111, 112, 112, 121, 126, 122, 800, 29,
30, 31, 32, 33, 34, 803, 109, 150, 150, 109,
203, 41, 41, 123, 35, 36, 155, 128, 201, 204,
109, 183, 42, 41, 41, 37, 33, 34, 155, 206,
206, 124, 138, 35, 42, 129, 169, 201, 133, 127,
38, 39, 134, 40, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 190, 137, 125, 133, 43, 139,
130, 164, 29, 30, 31, 32, 33, 34, 44, 140,
43, 797, 45, 137, 195, 156, 574, 35, 36, 209,
44, 110, 111, 253, 45, 155, 169, 156, 37, 33,
34, 112, 112, 112, 112, 170, 35, 169, 199, 123,
183, 253, 155, 38, 39, 796, 40, 48, 49, 50,
51, 51, 52, 53, 54, 103, 104, 163, 105, 178,
109, 199, 210, 106, 51, 55, 51, 51, 56, 177,
103, 104, 107, 105, 219, 193, 163, 165, 106, 57,
58, 231, 125, 195, 156, 170, 169, 107, 177, 468,
51, 56, 183, 193, 126, 165, 170, 128, 57, 109,
795, 156, 254, 195, 231, 59, 60, 28, 28, 48,
49, 50, 51, 51, 52, 53, 54, 220, 200, 224,
500, 179, 203, 135, 189, 254, 51, 55, 51, 51,
56, 204, 136, 183, 222, 198, 200, 127, 233, 179,
130, 57, 58, 189, 223, 170, 135, 166, 166, 166,
166, 166, 51, 56, 198, 150, 150, 191, 109, 235,
57, 504, 225, 121, 109, 122, 192, 59, 60, 28,
28, 62, 63, 64, 65, 65, 66, 67, 68, 214,
191, 205, 205, 167, 226, 286, 580, 229, 65, 203,
65, 65, 69, 109, 227, 232, 234, 255, 204, 166,
258, 166, 236, 70, 71, 180, 180, 180, 180, 180,
229, 155, 216, 232, 65, 69, 217, 217, 787, 259,
255, 155, 70, 258, 155, 230, 218, 792, 260, 72,
73, 28, 28, 62, 63, 64, 65, 65, 66, 67,
68, 181, 259, 287, 230, 237, 238, 249, 256, 268,
65, 260, 65, 65, 69, 250, 257, 180, 183, 180,
251, 267, 239, 240, 241, 70, 71, 155, 243, 244,
156, 183, 791, 250, 257, 155, 65, 69, 169, 267,
156, 278, 169, 156, 70, 245, 246, 247, 242, 275,
169, 72, 73, 28, 28, 75, 76, 77, 78, 78,
79, 80, 81, 279, 278, 206, 206, 169, 156, 293,
289, 248, 78, 82, 78, 78, 83, 84, 269, 288,
290, 788, 279, 183, 195, 294, 156, 85, 86, 166,
166, 166, 166, 166, 156, 205, 205, 170, 78, 83,
84, 170, 288, 203, 280, 155, 85, 284, 170, 170,
276, 787, 204, 87, 88, 28, 89, 75, 76, 77,
78, 78, 79, 80, 81, 167, 170, 280, 266, 209,
284, 219, 169, 335, 78, 82, 78, 78, 83, 84,
263, 166, 783, 166, 264, 264, 264, 264, 264, 85,
86, 266, 180, 180, 180, 180, 180, 296, 224, 169,
78, 83, 84, 298, 156, 183, 301, 297, 85, 274,
305, 319, 210, 299, 220, 87, 88, 28, 89, 91,
265, 92, 273, 533, 93, 94, 95, 274, 181, 195,
109, 170, 156, 235, 319, 782, 264, 109, 264, 321,
96, 225, 281, 533, 180, 273, 180, 781, 322, 270,
285, 97, 98, 271, 271, 271, 271, 271, 170, 312,
281, 216, 321, 96, 302, 217, 217, 303, 306, 313,
97, 322, 304, 285, 317, 218, 236, 99, 100, 28,
101, 91, 320, 92, 318, 303, 93, 94, 95, 272,
304, 237, 238, 323, 325, 329, 324, 344, 767, 336,
320, 326, 96, 243, 244, 271, 331, 271, 239, 240,
241, 352, 183, 97, 98, 324, 323, 325, 329, 326,
245, 246, 247, 774, 183, 96, 773, 331, 347, 109,
358, 293, 97, 330, 242, 155, 338, 339, 169, 99,
100, 28, 101, 141, 348, 195, 248, 294, 358, 341,
351, 347, 357, 142, 361, 345, 143, 144, 156, 342,
349, 372, 355, 145, 480, 146, 147, 341, 772, 353,
148, 149, 361, 351, 481, 357, 142, 342, 359, 143,
346, 355, 145, 146, 147, 159, 160, 161, 160, 160,
160, 160, 160, 360, 156, 170, 170, 170, 346, 362,
363, 359, 160, 160, 160, 160, 364, 365, 367, 369,
374, 183, 376, 109, 379, 348, 360, 380, 363, 373,
381, 383, 362, 385, 384, 365, 368, 370, 160, 364,
376, 349, 371, 382, 400, 380, 771, 379, 381, 383,
387, 377, 384, 160, 162, 160, 160, 173, 174, 175,
174, 174, 174, 174, 174, 371, 382, 389, 387, 367,
369, 392, 377, 406, 174, 403, 174, 174, 375, 109,
183, 407, 408, 389, 393, 393, 393, 368, 370, 409,
504, 386, 412, 403, 763, 413, 406, 762, 423, 388,
174, 761, 401, 183, 407, 408, 394, 449, 399, 415,
412, 402, 409, 413, 423, 174, 176, 174, 174, 186,
187, 188, 187, 187, 187, 187, 187, 760, 395, 399,
402, 410, 415, 416, 392, 418, 187, 187, 187, 187,
396, 420, 397, 393, 393, 393, 398, 393, 393, 393,
410, 395, 421, 109, 418, 424, 416, 428, 396, 429,
397, 445, 187, 446, 420, 450, 431, 183, 394, 426,
421, 434, 436, 424, 443, 435, 432, 187, 187, 187,
187, 159, 160, 161, 160, 160, 160, 160, 160, 419,
395, 436, 426, 435, 434, 433, 437, 443, 160, 160,
160, 160, 396, 438, 397, 440, 469, 419, 398, 442,
428, 459, 429, 395, 437, 430, 431, 461, 462, 447,
396, 438, 397, 440, 160, 469, 452, 442, 453, 459,
463, 466, 449, 484, 460, 461, 462, 477, 475, 160,
162, 160, 160, 173, 174, 175, 174, 174, 174, 174,
174, 484, 480, 463, 466, 445, 471, 446, 472, 486,
174, 475, 174, 174, 447, 752, 493, 504, 430, 431,
452, 494, 453, 452, 506, 453, 489, 505, 497, 471,
498, 472, 501, 447, 454, 455, 174, 477, 490, 493,
450, 431, 506, 511, 494, 478, 431, 471, 507, 472,
486, 174, 176, 174, 174, 186, 187, 188, 187, 187,
187, 187, 187, 447, 473, 509, 508, 430, 487, 480,
525, 486, 187, 187, 187, 187, 489, 540, 454, 455,
489, 454, 455, 509, 491, 492, 499, 473, 534, 515,
502, 516, 520, 525, 521, 478, 431, 501, 187, 532,
540, 512, 513, 542, 522, 473, 511, 489, 430, 487,
497, 480, 498, 187, 187, 187, 187, 449, 532, 507,
513, 504, 549, 457, 457, 457, 457, 457, 750, 430,
487, 536, 553, 537, 491, 492, 550, 508, 491, 492,
747, 547, 528, 548, 558, 549, 499, 517, 518, 486,
523, 524, 480, 544, 550, 502, 515, 746, 516, 457,
528, 543, 480, 480, 512, 491, 492, 515, 499, 516,
489, 544, 555, 561, 552, 458, 431, 457, 452, 547,
453, 548, 565, 489, 482, 482, 482, 482, 482, 538,
554, 487, 520, 567, 521, 570, 520, 552, 521, 520,
576, 521, 559, 492, 489, 745, 489, 430, 487, 534,
536, 567, 537, 570, 517, 518, 568, 536, 571, 537,
482, 574, 577, 576, 542, 517, 518, 553, 491, 492,
566, 575, 731, 515, 560, 516, 483, 455, 482, 486,
577, 491, 492, 578, 730, 526, 526, 526, 526, 526,
523, 524, 560, 566, 523, 524, 581, 523, 524, 588,
587, 578, 491, 492, 491, 492, 480, 499, 538, 480,
558, 480, 614, 597, 581, 538, 572, 588, 520, 480,
521, 526, 543, 587, 614, 554, 487, 520, 504, 521,
589, 517, 518, 520, 749, 521, 597, 527, 487, 526,
489, 600, 591, 649, 595, 592, 530, 530, 530, 530,
530, 594, 603, 608, 520, 611, 521, 489, 574, 571,
591, 489, 595, 605, 600, 613, 596, 616, 559, 492,
489, 608, 615, 611, 594, 603, 523, 524, 627, 618,
605, 607, 530, 599, 615, 523, 524, 480, 613, 504,
616, 523, 524, 717, 627, 715, 598, 691, 531, 492,
530, 515, 618, 516, 607, 601, 620, 556, 556, 556,
556, 556, 523, 524, 598, 491, 492, 572, 623, 491,
492, 606, 612, 601, 620, 520, 633, 521, 491, 492,
480, 480, 520, 480, 521, 632, 623, 480, 606, 520,
612, 521, 489, 556, 634, 677, 705, 640, 574, 489,
704, 624, 619, 621, 635, 625, 489, 693, 632, 557,
518, 556, 520, 638, 521, 640, 628, 622, 562, 562,
562, 562, 562, 629, 626, 619, 621, 635, 625, 644,
631, 637, 645, 523, 524, 622, 638, 504, 480, 628,
523, 524, 626, 643, 648, 644, 629, 523, 524, 637,
491, 492, 651, 631, 562, 645, 642, 491, 492, 480,
520, 643, 521, 658, 491, 492, 520, 648, 521, 489,
563, 524, 562, 660, 520, 651, 521, 647, 489, 642,
689, 489, 633, 653, 650, 665, 658, 666, 661, 574,
652, 660, 668, 647, 669, 656, 671, 670, 654, 662,
634, 663, 664, 665, 659, 489, 673, 650, 504, 480,
666, 667, 676, 652, 671, 668, 681, 669, 523, 524,
670, 654, 657, 678, 523, 524, 480, 491, 492, 673,
675, 679, 523, 524, 667, 676, 491, 492, 657, 491,
492, 520, 672, 521, 696, 520, 675, 521, 683, 520,
687, 521, 674, 695, 679, 690, 690, 690, 489, 661,
672, 574, 696, 491, 492, 686, 687, 680, 489, 691,
662, 683, 663, 664, 691, 684, 695, 698, 699, 701,
692, 480, 685, 697, 480, 694, 682, 702, 707, 489,
504, 710, 688, 706, 655, 698, 700, 701, 574, 523,
524, 489, 682, 523, 524, 685, 697, 523, 524, 706,
702, 707, 703, 489, 710, 688, 491, 492, 720, 520,
708, 521, 520, 712, 521, 691, 491, 492, 520, 693,
521, 691, 721, 722, 693, 703, 708, 504, 719, 712,
480, 720, 714, 709, 690, 690, 690, 491, 492, 691,
723, 722, 713, 727, 716, 721, 699, 480, 714, 491,
492, 728, 718, 718, 718, 724, 709, 724, 732, 646,
716, 491, 492, 723, 700, 713, 727, 523, 524, 728,
523, 524, 711, 735, 732, 693, 523, 524, 520, 740,
521, 693, 520, 691, 521, 729, 489, 742, 733, 735,
520, 741, 521, 489, 574, 691, 718, 718, 718, 693,
748, 744, 740, 489, 725, 736, 489, 726, 719, 741,
742, 724, 520, 724, 521, 754, 743, 744, 520, 734,
521, 641, 776, 748, 757, 639, 636, 756, 574, 630,
520, 737, 521, 755, 574, 734, 523, 524, 759, 743,
523, 524, 757, 693, 491, 492, 738, 737, 523, 524,
756, 491, 492, 739, 574, 693, 759, 520, 768, 521,
725, 491, 492, 726, 491, 492, 754, 758, 769, 770,
523, 524, 751, 765, 768, 766, 523, 524, 753, 765,
777, 766, 778, 758, 755, 779, 776, 770, 523, 524,
784, 769, 789, 574, 784, 793, 798, 793, 798, 790,
778, 779, 801, 798, 801, 798, 801, 617, 801, 585,
789, 583, 780, 610, 609, 523, 524, 574, 604, 602,
593, 590, 586, 585, 583, 579, 569, 564, 551, 545,
504, 541, 539, 767, 529, 480, 510, 495, 465, 767,
476, 474, 468, 467, 777, 465, 464, 456, 448, 441,
785, 439, 433, 432, 785, 794, 799, 794, 425, 422,
417, 414, 802, 799, 411, 405, 802, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
28, 28, 28, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 61, 61, 61, 61,
61, 61, 61, 61, 61, 61, 61, 61, 61, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 90, 90, 90, 90, 90, 90, 90, 90,
90, 90, 90, 90, 90, 102, 102, 102, 102, 102,
102, 102, 102, 102, 102, 102, 102, 102, 108, 108,
108, 108, 108, 404, 108, 378, 108, 108, 391, 390,
108, 114, 114, 114, 114, 114, 114, 114, 114, 114,
114, 114, 114, 114, 116, 388, 354, 116, 116, 378,
116, 116, 116, 350, 116, 366, 116, 118, 356, 307,
118, 118, 354, 118, 118, 118, 350, 118, 343, 118,
120, 120, 120, 120, 120, 120, 340, 337, 334, 120,
120, 120, 120, 131, 333, 332, 131, 131, 328, 131,
131, 131, 327, 131, 316, 131, 154, 154, 315, 154,
314, 311, 310, 309, 154, 308, 307, 154, 158, 158,
158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
158, 168, 168, 300, 168, 295, 295, 292, 291, 168,
168, 208, 168, 172, 172, 172, 172, 172, 172, 172,
172, 172, 172, 172, 172, 172, 182, 182, 283, 182,
196, 195, 282, 183, 182, 185, 185, 185, 185, 185,
185, 185, 185, 185, 185, 185, 185, 185, 194, 194,
194, 277, 194, 277, 184, 183, 194, 194, 197, 197,
197, 270, 197, 197, 197, 197, 197, 197, 197, 197,
197, 202, 202, 202, 202, 202, 202, 202, 202, 202,
202, 202, 202, 202, 207, 207, 207, 207, 207, 207,
207, 207, 207, 207, 207, 207, 207, 212, 212, 212,
270, 212, 212, 212, 212, 212, 212, 212, 212, 212,
213, 213, 213, 171, 213, 213, 213, 213, 213, 213,
213, 213, 213, 215, 215, 215, 215, 215, 215, 215,
215, 215, 215, 215, 215, 215, 228, 228, 228, 263,
228, 228, 228, 228, 228, 228, 228, 228, 228, 160,
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
160, 160, 174, 174, 174, 174, 174, 174, 174, 174,
174, 174, 174, 174, 174, 187, 187, 187, 187, 187,
187, 187, 187, 187, 187, 187, 187, 187, 217, 217,
217, 217, 217, 217, 217, 217, 217, 217, 217, 217,
217, 427, 427, 427, 427, 427, 427, 427, 427, 427,
427, 427, 427, 427, 444, 444, 444, 444, 444, 444,
444, 444, 444, 444, 444, 444, 444, 451, 451, 451,
451, 451, 451, 451, 451, 451, 451, 451, 451, 451,
470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
470, 470, 470, 479, 479, 479, 479, 479, 479, 479,
479, 479, 479, 479, 479, 479, 485, 485, 485, 485,
485, 485, 485, 485, 485, 485, 485, 485, 485, 488,
488, 488, 488, 488, 488, 488, 488, 488, 488, 488,
488, 488, 496, 496, 496, 496, 496, 496, 496, 496,
496, 496, 496, 496, 496, 503, 503, 503, 503, 503,
503, 503, 503, 503, 503, 503, 503, 503, 514, 514,
514, 514, 514, 514, 514, 514, 514, 514, 514, 514,
514, 519, 519, 519, 519, 519, 519, 519, 519, 519,
519, 519, 519, 519, 535, 535, 535, 535, 535, 535,
535, 535, 535, 535, 535, 535, 535, 546, 546, 546,
546, 546, 546, 546, 546, 546, 546, 546, 546, 573,
573, 573, 573, 573, 573, 573, 573, 573, 573, 573,
573, 573, 582, 582, 582, 582, 582, 582, 582, 582,
582, 582, 582, 582, 582, 584, 584, 584, 584, 584,
584, 584, 584, 584, 584, 584, 584, 584, 764, 764,
764, 764, 764, 764, 764, 764, 764, 764, 764, 764,
764, 775, 775, 775, 775, 775, 775, 775, 775, 775,
775, 775, 775, 775, 786, 786, 786, 786, 786, 786,
786, 786, 786, 786, 786, 786, 786, 263, 157, 262,
261, 252, 803, 221, 214, 803, 803, 211, 115, 109,
208, 196, 195, 184, 183, 171, 157, 153, 152, 151,
132, 119, 117, 115, 113, 109, 803, 46, 46, 17,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803
} ;
static yyconst short int yy_chk[2545] =
{ 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 19, 19, 20, 20, 26, 30, 26, 796, 1,
1, 1, 1, 1, 1, 0, 33, 41, 41, 34,
102, 3, 3, 29, 1, 1, 47, 31, 99, 102,
36, 84, 3, 4, 4, 1, 1, 1, 57, 104,
104, 29, 37, 1, 4, 31, 61, 99, 33, 30,
1, 1, 34, 1, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 84, 36, 29, 33, 3, 37,
31, 57, 2, 2, 2, 2, 2, 2, 3, 37,
4, 791, 3, 36, 97, 47, 790, 2, 2, 113,
4, 110, 110, 143, 4, 56, 70, 57, 2, 2,
2, 111, 111, 112, 112, 61, 2, 69, 97, 123,
86, 143, 58, 2, 2, 789, 2, 7, 7, 7,
7, 7, 7, 7, 7, 15, 15, 56, 15, 70,
135, 97, 113, 15, 7, 7, 7, 7, 7, 69,
16, 16, 15, 16, 124, 86, 56, 58, 16, 7,
7, 135, 123, 98, 56, 70, 71, 16, 69, 468,
7, 7, 83, 86, 126, 58, 69, 128, 7, 35,
788, 58, 144, 96, 135, 7, 7, 7, 7, 8,
8, 8, 8, 8, 8, 8, 8, 124, 98, 129,
468, 71, 202, 35, 83, 144, 8, 8, 8, 8,
8, 202, 35, 85, 127, 96, 98, 126, 137, 71,
128, 8, 8, 83, 127, 71, 35, 60, 60, 60,
60, 60, 8, 8, 96, 150, 150, 85, 136, 138,
8, 544, 129, 121, 133, 121, 85, 8, 8, 8,
8, 9, 9, 9, 9, 9, 9, 9, 9, 121,
85, 103, 103, 60, 130, 200, 544, 133, 9, 103,
9, 9, 9, 134, 130, 136, 137, 145, 103, 60,
147, 60, 138, 9, 9, 73, 73, 73, 73, 73,
133, 154, 122, 136, 9, 9, 122, 122, 786, 148,
145, 161, 9, 147, 164, 134, 122, 783, 149, 9,
9, 9, 9, 10, 10, 10, 10, 10, 10, 10,
10, 73, 148, 200, 134, 139, 139, 141, 146, 165,
10, 149, 10, 10, 10, 141, 146, 73, 189, 73,
141, 164, 139, 139, 139, 10, 10, 166, 140, 140,
154, 190, 782, 141, 146, 167, 10, 10, 168, 164,
161, 189, 175, 164, 10, 140, 140, 140, 139, 179,
180, 10, 10, 10, 10, 11, 11, 11, 11, 11,
11, 11, 11, 190, 189, 206, 206, 181, 165, 216,
210, 140, 11, 11, 11, 11, 11, 11, 167, 201,
210, 778, 190, 191, 198, 216, 166, 11, 11, 156,
156, 156, 156, 156, 167, 205, 205, 168, 11, 11,
11, 175, 201, 205, 191, 163, 11, 198, 179, 180,
181, 777, 205, 11, 11, 11, 11, 12, 12, 12,
12, 12, 12, 12, 12, 156, 181, 191, 163, 209,
198, 219, 178, 266, 12, 12, 12, 12, 12, 12,
162, 156, 773, 156, 162, 162, 162, 162, 162, 12,
12, 163, 170, 170, 170, 170, 170, 220, 224, 177,
12, 12, 12, 225, 163, 192, 229, 220, 12, 178,
232, 249, 209, 225, 219, 12, 12, 12, 12, 13,
162, 13, 177, 494, 13, 13, 13, 178, 170, 199,
230, 178, 266, 235, 249, 772, 162, 231, 162, 251,
13, 224, 192, 494, 170, 177, 170, 771, 252, 176,
199, 13, 13, 176, 176, 176, 176, 176, 177, 242,
192, 215, 251, 13, 229, 215, 215, 230, 232, 242,
13, 252, 231, 199, 248, 215, 235, 13, 13, 13,
13, 14, 250, 14, 248, 230, 14, 14, 14, 176,
231, 237, 237, 253, 255, 259, 254, 284, 764, 267,
250, 256, 14, 243, 243, 176, 260, 176, 237, 237,
237, 304, 279, 14, 14, 254, 253, 255, 259, 256,
243, 243, 243, 763, 280, 14, 761, 260, 288, 303,
322, 293, 14, 259, 237, 269, 273, 274, 276, 14,
14, 14, 14, 38, 295, 285, 243, 293, 322, 279,
303, 288, 321, 38, 325, 284, 38, 38, 267, 280,
295, 342, 319, 38, 454, 38, 38, 279, 760, 304,
38, 38, 325, 303, 454, 321, 38, 280, 323, 38,
285, 319, 38, 38, 38, 50, 50, 50, 50, 50,
50, 50, 50, 324, 269, 273, 274, 276, 285, 326,
327, 323, 50, 50, 50, 50, 328, 329, 332, 333,
346, 341, 347, 351, 355, 348, 324, 356, 327, 342,
357, 359, 326, 361, 360, 329, 332, 333, 50, 328,
347, 348, 341, 358, 376, 356, 759, 355, 357, 359,
362, 351, 360, 50, 50, 50, 50, 64, 64, 64,
64, 64, 64, 64, 64, 341, 358, 364, 362, 367,
369, 368, 351, 382, 64, 379, 64, 64, 346, 377,
371, 383, 384, 364, 368, 368, 368, 367, 369, 387,
749, 361, 390, 379, 748, 391, 382, 747, 407, 388,
64, 746, 376, 399, 383, 384, 370, 427, 371, 396,
390, 377, 387, 391, 407, 64, 64, 64, 64, 77,
77, 77, 77, 77, 77, 77, 77, 745, 370, 371,
377, 388, 396, 397, 392, 399, 77, 77, 77, 77,
370, 403, 370, 393, 393, 393, 370, 392, 392, 392,
388, 370, 405, 402, 399, 408, 397, 411, 370, 411,
370, 425, 77, 425, 403, 427, 427, 418, 394, 410,
405, 414, 416, 408, 424, 415, 432, 77, 77, 77,
77, 158, 158, 158, 158, 158, 158, 158, 158, 402,
394, 416, 410, 415, 414, 433, 417, 424, 158, 158,
158, 158, 394, 418, 394, 420, 444, 402, 394, 423,
428, 432, 428, 394, 417, 411, 411, 434, 436, 425,
394, 418, 394, 420, 158, 469, 429, 423, 429, 432,
437, 440, 449, 456, 433, 434, 436, 453, 448, 158,
158, 158, 158, 172, 172, 172, 172, 172, 172, 172,
172, 456, 736, 437, 440, 445, 446, 445, 446, 457,
172, 448, 172, 172, 444, 735, 459, 473, 428, 428,
451, 460, 451, 452, 474, 452, 458, 473, 467, 470,
467, 470, 472, 469, 429, 429, 172, 477, 458, 459,
449, 449, 474, 480, 460, 453, 453, 471, 475, 471,
485, 172, 172, 172, 172, 185, 185, 185, 185, 185,
185, 185, 185, 445, 446, 476, 475, 457, 457, 481,
484, 486, 185, 185, 185, 185, 488, 500, 451, 451,
489, 452, 452, 476, 458, 458, 467, 470, 496, 482,
472, 482, 483, 484, 483, 477, 477, 501, 185, 493,
500, 480, 481, 504, 483, 471, 511, 490, 485, 485,
497, 733, 497, 185, 185, 185, 185, 431, 493, 507,
481, 505, 509, 431, 431, 431, 431, 431, 732, 486,
486, 498, 516, 498, 488, 488, 510, 507, 489, 489,
727, 508, 490, 508, 521, 509, 496, 482, 482, 526,
483, 483, 513, 505, 510, 501, 514, 726, 514, 431,
490, 504, 517, 523, 511, 490, 490, 515, 497, 515,
527, 505, 517, 523, 513, 431, 431, 431, 455, 547,
455, 547, 527, 530, 455, 455, 455, 455, 455, 498,
516, 516, 519, 529, 519, 533, 520, 513, 520, 522,
539, 522, 521, 521, 531, 725, 528, 526, 526, 534,
535, 529, 535, 533, 514, 514, 531, 536, 537, 536,
455, 538, 540, 539, 542, 515, 515, 553, 527, 527,
528, 538, 706, 556, 522, 556, 455, 455, 455, 487,
540, 530, 530, 541, 704, 487, 487, 487, 487, 487,
519, 519, 522, 528, 520, 520, 545, 522, 522, 551,
550, 541, 531, 531, 528, 528, 552, 534, 535, 555,
558, 561, 585, 564, 545, 536, 537, 551, 562, 621,
562, 487, 542, 550, 614, 553, 553, 560, 729, 560,
552, 556, 556, 557, 729, 557, 564, 487, 487, 487,
492, 567, 555, 621, 561, 557, 492, 492, 492, 492,
492, 560, 570, 576, 563, 579, 563, 566, 575, 571,
555, 565, 561, 574, 567, 581, 563, 586, 558, 558,
568, 576, 585, 579, 560, 570, 562, 562, 597, 588,
605, 575, 492, 566, 614, 560, 560, 647, 581, 580,
586, 557, 557, 689, 597, 687, 565, 691, 492, 492,
492, 518, 588, 518, 575, 568, 590, 518, 518, 518,
518, 518, 563, 563, 565, 566, 566, 571, 593, 565,
565, 574, 580, 568, 590, 594, 603, 594, 568, 568,
589, 591, 592, 595, 592, 602, 593, 677, 605, 596,
580, 596, 598, 518, 603, 647, 675, 610, 607, 599,
673, 594, 589, 591, 604, 595, 601, 691, 602, 518,
518, 518, 524, 608, 524, 610, 598, 592, 524, 524,
524, 524, 524, 599, 596, 589, 591, 604, 595, 616,
601, 607, 617, 594, 594, 592, 608, 612, 619, 598,
592, 592, 596, 613, 620, 616, 599, 596, 596, 607,
598, 598, 623, 601, 524, 617, 612, 599, 599, 625,
622, 613, 622, 630, 601, 601, 624, 620, 624, 628,
524, 524, 524, 632, 626, 623, 626, 619, 631, 612,
660, 629, 633, 625, 622, 635, 630, 636, 634, 637,
624, 632, 638, 619, 639, 628, 641, 640, 626, 634,
633, 634, 634, 635, 631, 657, 643, 622, 642, 649,
636, 637, 646, 624, 641, 638, 651, 639, 622, 622,
640, 626, 629, 648, 624, 624, 653, 628, 628, 643,
645, 649, 626, 626, 637, 646, 631, 631, 629, 629,
629, 650, 642, 650, 666, 652, 645, 652, 653, 654,
658, 654, 644, 665, 649, 662, 662, 662, 656, 661,
642, 667, 666, 657, 657, 657, 658, 650, 659, 663,
661, 653, 661, 661, 664, 654, 665, 668, 669, 670,
663, 679, 656, 667, 683, 664, 652, 671, 678, 686,
672, 681, 659, 676, 627, 668, 669, 670, 697, 650,
650, 685, 652, 652, 652, 656, 667, 654, 654, 676,
671, 678, 672, 688, 681, 659, 656, 656, 695, 680,
679, 680, 682, 683, 682, 694, 659, 659, 684, 663,
684, 690, 696, 697, 664, 672, 679, 703, 694, 683,
708, 695, 685, 680, 690, 690, 690, 686, 686, 692,
698, 697, 684, 701, 688, 696, 699, 712, 685, 685,
685, 702, 692, 692, 692, 700, 680, 700, 707, 618,
688, 688, 688, 698, 699, 684, 701, 680, 680, 702,
682, 682, 682, 710, 707, 694, 684, 684, 709, 717,
709, 690, 711, 718, 711, 703, 714, 721, 708, 710,
713, 720, 713, 716, 722, 719, 718, 718, 718, 692,
728, 723, 717, 738, 700, 712, 739, 700, 719, 720,
721, 724, 734, 724, 734, 740, 722, 723, 737, 709,
737, 611, 766, 728, 742, 609, 606, 741, 743, 600,
751, 713, 751, 740, 758, 709, 709, 709, 744, 722,
711, 711, 742, 718, 714, 714, 714, 713, 713, 713,
741, 716, 716, 716, 770, 719, 744, 753, 756, 753,
724, 738, 738, 724, 739, 739, 754, 743, 757, 758,
734, 734, 734, 755, 756, 755, 737, 737, 737, 765,
766, 765, 768, 743, 754, 769, 775, 758, 751, 751,
776, 757, 779, 780, 784, 787, 792, 793, 792, 780,
768, 769, 797, 798, 797, 798, 801, 587, 801, 584,
779, 582, 770, 578, 577, 753, 753, 573, 572, 569,
559, 554, 549, 548, 546, 543, 532, 525, 512, 506,
503, 502, 499, 755, 491, 479, 478, 466, 465, 765,
450, 447, 443, 442, 775, 439, 438, 430, 426, 421,
776, 419, 413, 412, 784, 787, 792, 793, 409, 406,
398, 395, 797, 798, 389, 381, 801, 804, 804, 804,
804, 804, 804, 804, 804, 804, 804, 804, 804, 804,
805, 805, 805, 805, 805, 805, 805, 805, 805, 805,
805, 805, 805, 806, 806, 806, 806, 806, 806, 806,
806, 806, 806, 806, 806, 806, 807, 807, 807, 807,
807, 807, 807, 807, 807, 807, 807, 807, 807, 808,
808, 808, 808, 808, 808, 808, 808, 808, 808, 808,
808, 808, 809, 809, 809, 809, 809, 809, 809, 809,
809, 809, 809, 809, 809, 810, 810, 810, 810, 810,
810, 810, 810, 810, 810, 810, 810, 810, 811, 811,
811, 811, 811, 380, 811, 378, 811, 811, 366, 365,
811, 812, 812, 812, 812, 812, 812, 812, 812, 812,
812, 812, 812, 812, 813, 363, 354, 813, 813, 352,
813, 813, 813, 350, 813, 331, 813, 814, 320, 307,
814, 814, 305, 814, 814, 814, 301, 814, 281, 814,
815, 815, 815, 815, 815, 815, 278, 272, 265, 815,
815, 815, 815, 816, 262, 261, 816, 816, 258, 816,
816, 816, 257, 816, 247, 816, 817, 817, 245, 817,
244, 241, 239, 238, 817, 236, 233, 817, 818, 818,
818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
818, 819, 819, 228, 819, 218, 217, 213, 212, 819,
819, 207, 819, 820, 820, 820, 820, 820, 820, 820,
820, 820, 820, 820, 820, 820, 821, 821, 197, 821,
196, 194, 193, 188, 821, 822, 822, 822, 822, 822,
822, 822, 822, 822, 822, 822, 822, 822, 823, 823,
823, 187, 823, 186, 184, 182, 823, 823, 824, 824,
824, 174, 824, 824, 824, 824, 824, 824, 824, 824,
824, 825, 825, 825, 825, 825, 825, 825, 825, 825,
825, 825, 825, 825, 826, 826, 826, 826, 826, 826,
826, 826, 826, 826, 826, 826, 826, 827, 827, 827,
173, 827, 827, 827, 827, 827, 827, 827, 827, 827,
828, 828, 828, 171, 828, 828, 828, 828, 828, 828,
828, 828, 828, 829, 829, 829, 829, 829, 829, 829,
829, 829, 829, 829, 829, 829, 830, 830, 830, 160,
830, 830, 830, 830, 830, 830, 830, 830, 830, 831,
831, 831, 831, 831, 831, 831, 831, 831, 831, 831,
831, 831, 832, 832, 832, 832, 832, 832, 832, 832,
832, 832, 832, 832, 832, 833, 833, 833, 833, 833,
833, 833, 833, 833, 833, 833, 833, 833, 834, 834,
834, 834, 834, 834, 834, 834, 834, 834, 834, 834,
834, 835, 835, 835, 835, 835, 835, 835, 835, 835,
835, 835, 835, 835, 836, 836, 836, 836, 836, 836,
836, 836, 836, 836, 836, 836, 836, 837, 837, 837,
837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
838, 838, 838, 839, 839, 839, 839, 839, 839, 839,
839, 839, 839, 839, 839, 839, 840, 840, 840, 840,
840, 840, 840, 840, 840, 840, 840, 840, 840, 841,
841, 841, 841, 841, 841, 841, 841, 841, 841, 841,
841, 841, 842, 842, 842, 842, 842, 842, 842, 842,
842, 842, 842, 842, 842, 843, 843, 843, 843, 843,
843, 843, 843, 843, 843, 843, 843, 843, 844, 844,
844, 844, 844, 844, 844, 844, 844, 844, 844, 844,
844, 845, 845, 845, 845, 845, 845, 845, 845, 845,
845, 845, 845, 845, 846, 846, 846, 846, 846, 846,
846, 846, 846, 846, 846, 846, 846, 847, 847, 847,
847, 847, 847, 847, 847, 847, 847, 847, 847, 848,
848, 848, 848, 848, 848, 848, 848, 848, 848, 848,
848, 848, 849, 849, 849, 849, 849, 849, 849, 849,
849, 849, 849, 849, 849, 850, 850, 850, 850, 850,
850, 850, 850, 850, 850, 850, 850, 850, 851, 851,
851, 851, 851, 851, 851, 851, 851, 851, 851, 851,
851, 852, 852, 852, 852, 852, 852, 852, 852, 852,
852, 852, 852, 852, 853, 853, 853, 853, 853, 853,
853, 853, 853, 853, 853, 853, 853, 159, 157, 152,
151, 142, 131, 125, 120, 118, 116, 115, 114, 108,
105, 91, 90, 75, 74, 62, 48, 46, 44, 43,
32, 24, 23, 22, 21, 18, 17, 6, 5, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803, 803, 803, 803, 803, 803, 803,
803, 803, 803, 803
} ;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() (yy_more_flag = 1)
#define YY_MORE_ADJ yy_more_len
#define YY_RESTORE_YY_MORE_OFFSET
#define INITIAL 0
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1997 - 2000.
//
// File: parser.l
//
// Contents: Lex rules for parser
//
// Notes: Written for flex version 2.5.4
//
// History: 10-01-97 emilyb created
//
//----------------------------------------------------------------------------
class CValueParser;
#include "yybase.hxx"
#include "parser.h"
#include "parsepl.h"
#include "flexcpp.h"
#define TOKEN(tknNum) return (tknNum);
#define STRING_VALUE(tknNum, fLong, fQuote) \
{ \
if (!IsTokenEmpty()) \
return CreateTknValue(yylval, tknNum, fLong, fQuote); \
}
/*
** Make Lex read from a block of data
** buffer is the character buffer,
** result is a variable to store the number of chars read
** ms is the size of the buffer
*/
#undef YY_INPUT
#define YY_INPUT(b, r, ms) (r = yybufferinput(b, ms))
DECLARE_INFOLEVEL(yacc)
//+---------------------------------------------------------------------------
//
// Function: YYLEXER::IsTokenEmpty
//
// Synopsis: Determines if a token is empty. An empty token only has
// whitespace or has nothing in it.
//
// Arguments: None.
//
// Returns: Boolean value.
//
// History: 08-APR-98 KrishnaN created
//
//----------------------------------------------------------------------------
BOOL YYLEXER::IsTokenEmpty()
{
LPWSTR pwsz = yytext;
Win4Assert(pwsz);
while (*pwsz != 0)
{
if (*pwsz != L' ' && *pwsz != L'\t')
return FALSE;
pwsz++;
}
return TRUE;
}
//+---------------------------------------------------------------------------
//
// Function: YYLEXER::IsNotOperator
//
// Synopsis: Determines if we have a not operator.
//
// Arguments: None.
//
// Returns: Boolean value.
//
// History: 08-DEC-98 KrishnaN created
//
//----------------------------------------------------------------------------
BOOL YYLEXER::IsNotOperator()
{
LPWSTR pwsz = yytext;
Win4Assert(pwsz);
// skip past leading spaces
int i = 0;
while (*pwsz != 0 && (*pwsz == L' ' || *pwsz == L'\t'))
{
pwsz++;
i++;
}
// If we don't have at least four chars to consider, we don't have a
// not operator.
if (yyleng < i+4)
return FALSE;
if ( (*pwsz == L'n' || *pwsz == L'N') &&
(*(pwsz+1) == L'o' || *(pwsz+1) == L'O') &&
(*(pwsz+2) == L't' || *(pwsz+2) == L'T') &&
(*(pwsz+3) == L'@' || *(pwsz+3) == L'#' || *(pwsz+3) == L'$')
)
return TRUE;
else
return FALSE;
}
//+---------------------------------------------------------------------------
//
// Function: YYLEXER::CreateTknValue
//
// Synopsis: Allocs a WCHAR string which is passed to the YACC value stack.
//
// Arguments: [ppStg] -- set to pointer to alloc'd memory
// [tknNum] -- token id
// [fLong] -- true if token is in longhand version
// [fQuote] -- true if token is quoted
//
// Returns: Updated token id
//
// History: 10-01-97 emilyb created
//
//----------------------------------------------------------------------------
short YYLEXER::CreateTknValue(YYSTYPE *ppStg, short tknNum, BOOL fLong, BOOL fQuote )
{
HRESULT hr = S_OK;
short retTkn = tknNum;
LPWSTR pwsz = yytext;
if (!fQuote)
{
// If we see a double quote, consider the string quoted.
while (L' ' == *pwsz)
pwsz++;
if (*pwsz == L'"')
{
// strip trailing blanks and check if we see a trailing "
LPWSTR pLast = pwsz + wcslen(pwsz) - 1;
while (pLast >= pwsz && L' ' == *pLast )
{
*pLast = L'\0';
pLast--;
}
if (*pLast == L'"' && pLast > pwsz )
fQuote = TRUE;
}
}
// start parsing from the beginning of the string
pwsz = yytext;
if (_PHRASEORREGEX == tknNum)
{
// A quoted string is always a phrase.
if (fQuote)
retTkn = _PHRASE;
else
retTkn = DetermineTokenType();
}
switch (retTkn)
{
case _PHRASE:
{
LPWSTR pLast;
pLast = pwsz + wcslen(pwsz) - 1;
// if long version, find the phrase
if (fLong)
{
pwsz = pwsz + wcslen(L"{phrase}");
pLast = pLast - wcslen(L"{/phrase}"+1);
Win4Assert(*pLast == L'{');
*pLast = L'\0';
}
// strip leading and trailing blanks
while (L' ' == *pwsz)
pwsz++;
pLast = pwsz + wcslen(pwsz) - 1;
while (pLast >= pwsz && L' ' == *pLast )
{
*pLast = L'\0';
pLast--;
}
// NOTE: Don't strip double quotes here, they will be stripped later
yaccDebugOut((DEB_ITRACE, "Phrase %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
}
break;
case _PROPNAME:
{
LPWSTR pLast;
if (fLong) // looks like: { prop name = "prop name" }
{
// find =
while (L'=' != *pwsz)
pwsz++;
pwsz++;
pLast = pwsz + wcslen(pwsz) - 1;
Win4Assert( *pLast == L'}');
*pLast-- = L'\0';
}
else
{
// Strip @ or # or $ token
Win4Assert(*pwsz == L'@' || *pwsz == L'#' || *pwsz == L'$');
pwsz = pwsz + 1;
}
// strip leading and trailing blanks
while (L' ' == *pwsz)
pwsz++;
pLast = pwsz + wcslen(pwsz) - 1;
while (pLast >= pwsz && L' ' == *pLast )
{
*pLast--= L'\0';
}
if (fQuote)
{
pwsz++;
*pLast = L'\0';
}
yaccDebugOut((DEB_ITRACE, "Propname %ws in %ws format and %ws\n",
pwsz, fLong ? L"Long" : L"Short", fQuote ? L"quoted" : L"unquoted"));
}
break;
case _FREETEXT:
{
LPWSTR pLast;
// if long version, find the FREETEXT
if (fLong)
{
pwsz = pwsz + wcslen(L"{freetext}");
pLast = pwsz + wcslen(pwsz) - 1;
pLast = pLast - wcslen(L"{/freetext}")+1;
Win4Assert(*pLast == L'{');
*pLast = L'\0';
}
// strip leading and trailing blanks
while (L' ' == *pwsz)
pwsz++;
pLast = pwsz + wcslen(pwsz) - 1;
while (pLast >= pwsz && L' ' == *pLast )
{
*pLast = L'\0';
pLast--;
}
if (fQuote)
{
Win4Assert(pLast >= pwsz+1);
// Strip quotes
pwsz = pwsz + 1;
*pLast = L'\0';
}
yaccDebugOut((DEB_ITRACE, "Freetext %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
}
break;
case _REGEX:
{
LPWSTR pLast;
// if long version, find the regex
if (fLong)
{
pwsz = pwsz + wcslen(L"{regex}");
pLast = pwsz + wcslen(pwsz);
pLast = pLast - wcslen(L"{/regex}");
Win4Assert(*pLast == L'{');
*pLast = L'\0';
}
// strip leading blanks
while (L' ' == *pwsz)
pwsz++;
// If the first char is =, ignore it. We only ignore the first
// = character. This is backward compatible with Triplish1
if (L'=' == *pwsz)
pwsz++;
// strip leading and trailing blanks
while (L' ' == *pwsz)
pwsz++;
pLast = pwsz + wcslen(pwsz) - 1;
while (pLast >= pwsz && L' ' == *pLast )
{
*pLast = L'\0';
pLast--;
}
// After we strip a leading =, we might have a quoted phrase
// Check only if fQuote is false.
// We don't want to deal with an unpaired double quote.
if (!fQuote && *pwsz == L'"' && *pLast == L'"' && pLast > pwsz )
fQuote = TRUE;
if (fQuote)
{
Win4Assert(pLast >= pwsz+1);
// Strip quotes
pwsz = pwsz + 1;
*pLast = L'\0';
}
yaccDebugOut((DEB_ITRACE, "RegEx %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
}
break;
case _WEIGHT:
{
Assert (fLong);
Assert(!fQuote);
if (fLong) // looks like: {weight value = number }
{
// find =
while (L'=' != *pwsz)
pwsz++;
pwsz++;
// step past leading blanks
while (L' ' == *pwsz)
pwsz++;
// remove trailing } and blanks
LPWSTR pLast = pwsz + wcslen(pwsz) - 1;
Win4Assert(*pLast == L'}');
*(pLast--) = L'\0';
while (pLast >= pwsz && L' ' == *pLast )
{
*(pLast--) = L'\0';
}
}
}
break;
case _NEARDIST:
{
Assert (fLong);
Assert(!fQuote);
if (fLong) // looks like: dist = number
{
// find =
while (L'=' != *pwsz)
pwsz++;
pwsz++;
// step past leading blanks
while (L' ' == *pwsz)
pwsz++;
}
yaccDebugOut((DEB_ITRACE, "NearDist string: %ws in %s format\n", pwsz, fLong ? L"Long" : L"Short"));
}
break;
case _NEARUNIT:
{
Assert (fLong);
Assert(!fQuote);
if (fLong) // looks like: unit = blah
{
// find =
while (L'=' != *pwsz)
pwsz++;
pwsz++;
// step past leading blanks
while (L' ' == *pwsz)
pwsz++;
}
yaccDebugOut((DEB_ITRACE, "NearUnit string: %ws in %s format\n", pwsz, fLong ? L"Long" : L"Short"));
}
break;
case _VECTORELEMENT:
{
// strip leading and trailing blanks
while (L' ' == *pwsz)
pwsz++;
LPWSTR pTemp = pwsz + wcslen(pwsz) - 1;
if (fLong) // strip trailing ;
{
Win4Assert(L';' == *pTemp);
*pTemp--='\0';
}
while (L' ' == *pTemp && pTemp > pwsz)
*pTemp-- = L'\0';
if (fQuote)
{
// Strip quotes
pwsz = pwsz + 1;
pwsz[wcslen(pwsz)-1] = L'\0';
}
yaccDebugOut((DEB_ITRACE, "VectorElem %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
}
break;
case _VEMETHOD:
{
Assert (fLong);
LPWSTR pTemp;
if (fLong) // looks like: {vector rankmethod= blah}
{
// find =
while (L'=' != *pwsz)
pwsz++;
pwsz++;
// strip trailing }
pTemp = pwsz + wcslen(pwsz) - 1;
Win4Assert(L'}' == *pTemp);
*pTemp-- = L'\0';
}
// strip leading and trailing blanks and quotes
while (L' ' == *pwsz)
pwsz++;
pTemp = pwsz + wcslen(pwsz) - 1;
while (L' ' == *pTemp && pTemp > pwsz)
*pTemp-- = L'\0';
if (fQuote)
{
// Strip quotes
pwsz = pwsz + 1;
pwsz[wcslen(pwsz)-1] = L'\0';
}
yaccDebugOut((DEB_ITRACE, "VectorMethod %ws in %ws format\n", pwsz, fLong ? L"Long" : L"Short"));
}
break;
}
int len = wcslen(pwsz);
XPtrST<WCHAR> xwszRet(new WCHAR[len + 1]);
_allocations.Add(xwszRet.GetPointer(), _allocations.Count());
RtlCopyMemory(xwszRet.GetPointer(), pwsz, (len+1) * sizeof(WCHAR));
(*ppStg).pwszChar = xwszRet.Acquire();
return retTkn;
}
//+---------------------------------------------------------------------------
//
// Function: YYLEXER::DetermineTokenType
//
// Synopsis: Determines if we have a regular expression or a regular string.
// A regular expression is a string that contains atleast one of
// *, ?, or | characters.
//
// Returns: Token id
//
// History: Jun-05-98 KrishnaN created
//
//----------------------------------------------------------------------------
short YYLEXER::DetermineTokenType()
{
LPWSTR pwsz = yytext;
LPWSTR pLast = pwsz + wcslen(pwsz) - 1;
while (pLast >= pwsz)
{
if (L'|' == *pwsz || L'*' == *pwsz || L'?' == *pwsz)
return _REGEX;
pwsz++;
}
// None of the regular expression defining characters have been found
return _PHRASE;
}
//
//
// RULES
//
// Notes: Any characters which are not matched, cause yylexer to throw.
// We can also throw if E_OUTOFMEMORY.
// Tokens which need 2 return more than 1 value (e.g. {near}
// use start states to return each pice of the value. The start
// states also emit a "token end" token so that the parser can
// check that they are syntactically complete.
// Lex matches to the longest match in the rules. If 2 matches
// are the same, it matches to the 1st match.
#define innear 1
#define shortgen 2
#define shortregex 3
#define mayberegex 4
#define implicitphrase 5
#define infreefreetext 6
#define invector 7
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
int yywrap YY_PROTO(( void )) {return 1;}
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( YY_CHAR *, yyconst YY_CHAR *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst YY_CHAR * ));
#endif
#ifndef YY_NO_INPUT
#endif
#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif
#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif
#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines. This will fail
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
* or sizeof(void*) != sizeof(int).
*/
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE (8192 / sizeof(WCHAR))
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
#define ECHO LexerOutput( yytext, yyleng )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( (result = LexerInput( (YY_CHAR *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( L"input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) LexerError( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int YYLEXER::yylex(YYSTYPE *yylval)
#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif
#define YY_RULE_SETUP \
YY_USER_ACTION
YY_DECL
{
register yy_state_type yy_current_state;
register YY_CHAR *yy_cp, *yy_bp;
register int yy_act;
if ( yy_init )
{
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( (cInputBuffer * sizeof(YY_CHAR)) + sizeof(YY_CHAR) );
yy_load_buffer_state();
if (yyprimetoken)
{
int yysavetoken = yyprimetoken;
yyprimetoken = 0;
return yysavetoken;
}
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_more_len = 0;
if ( yy_more_flag )
{
yy_more_len = (int) (yy_c_buf_p - yytext_ptr);
yy_more_flag = 0;
}
yy_cp = yy_c_buf_p;
/* Support of yytext. */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = 1; if (256 > *yy_cp) yy_c = (YY_CHAR) yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 804 )
yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_current_state != 803 );
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_find_action:
yy_act = yy_accept[yy_current_state];
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
{ /* do nothing */ }
YY_BREAK
case 2:
YY_RULE_SETUP
{ fContinueImplicitPhrase = FALSE;
fContinueRegex = FALSE;
fContinueMaybeRegex = FALSE;
TOKEN (_OPEN);
}
YY_BREAK
case 3:
YY_RULE_SETUP
{
fContinueImplicitPhrase = FALSE;
fContinueRegex = FALSE;
fContinueMaybeRegex = FALSE;
TOKEN (_CLOSE);
}
YY_BREAK
// ************
// PROPNAME
// ************
// If something was treated as a phrase in Tripolish 1, it should
// be treated as such even now. That applies here. For e.g. @propname
// caused the following text to be treated as a phrase. The same should
// apply to {prop name = propname}
//
// shorthand, quoted
case 4:
YY_RULE_SETUP
{
// treat value as a phrase
BEGIN implicitphrase;
STRING_VALUE(_PROPNAME, FALSE, TRUE);
}
YY_BREAK
// shorthand, not quoted
case 5:
YY_RULE_SETUP
{
// treat value as a phrase
BEGIN implicitphrase;
STRING_VALUE(_PROPNAME, FALSE, FALSE);
}
YY_BREAK
// shorthand, quoted
case 6:
YY_RULE_SETUP
{
// treat value as freetext
BEGIN infreefreetext;
STRING_VALUE(_PROPNAME, FALSE, TRUE);
}
YY_BREAK
// shorthand, not quoted
case 7:
YY_RULE_SETUP
{
// treat value as freetext
BEGIN infreefreetext;
STRING_VALUE(_PROPNAME, FALSE, FALSE);
}
YY_BREAK
// longhand, quoted
case 8:
YY_RULE_SETUP
{
// treat value as a phrase
BEGIN implicitphrase;
STRING_VALUE(_PROPNAME, TRUE, TRUE);
}
YY_BREAK
// longhand, not quoted
case 9:
YY_RULE_SETUP
{
// treat value as a phrase
BEGIN implicitphrase;
STRING_VALUE(_PROPNAME, TRUE, FALSE);
}
YY_BREAK
// closing token
case 10:
YY_RULE_SETUP
{ TOKEN (_PROPEND); }
YY_BREAK
// *********
// OPERATORS
// *********
case 11:
YY_RULE_SETUP
{ if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_CONTAINS);
}
YY_BREAK
case 12:
YY_RULE_SETUP
{ if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_AND);
}
YY_BREAK
case 13:
YY_RULE_SETUP
{
yyless(yyleng-1);
if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_AND);
}
YY_BREAK
case 14:
YY_RULE_SETUP
{ if (fContinueImplicitPhrase)
{
yaccDebugOut(( DEB_ITRACE, "fContinueImplicitPhrase\n" ));
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
yaccDebugOut(( DEB_ITRACE, "fContinueRegex\n" ));
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
yaccDebugOut(( DEB_ITRACE, "fContinueMaybeRegex\n" ));
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
yaccDebugOut(( DEB_ITRACE, "OR TOKEN found !!!\n" ));
TOKEN (_OR); }
YY_BREAK
case 15:
YY_RULE_SETUP
{
yyless(yyleng-1);
if (fContinueImplicitPhrase)
{
yaccDebugOut(( DEB_ITRACE, "OR{ fContinueImplicitPhrase\n" ));
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
yaccDebugOut(( DEB_ITRACE, "OR{ fContinueRegex\n" ));
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
yaccDebugOut(( DEB_ITRACE, "OR{ fContinueMaybeRegex\n" ));
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
yaccDebugOut(( DEB_ITRACE, "OR{ TOKEN found !!!\n" ));
TOKEN (_OR); }
YY_BREAK
case 16:
YY_RULE_SETUP
{ if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_NOT);}
YY_BREAK
case 17:
YY_RULE_SETUP
{
yyless(yyleng-1);
if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_NOT);}
YY_BREAK
case 18:
YY_RULE_SETUP
{ if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_AND);}
YY_BREAK
case 19:
YY_RULE_SETUP
{ if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_OR);}
YY_BREAK
case 20:
YY_RULE_SETUP
{ if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
else if (fContinueRegex)
{
BEGIN shortregex;
fContinueRegex = FALSE;
}
else if (fContinueMaybeRegex)
{
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_NOT);}
YY_BREAK
case 21:
YY_RULE_SETUP
{ yaccDebugOut(( DEB_ITRACE, "near[ ]+ _NEAR token, begin implicitphrase\n" ));
BEGIN implicitphrase;
TOKEN (_NEAR);}
YY_BREAK
case 22:
YY_RULE_SETUP
{ yaccDebugOut(( DEB_ITRACE, "near{ _NEAR token, begin implicitphrase\n" ));
yyless(yyleng-1);
BEGIN implicitphrase;
TOKEN (_NEAR);}
YY_BREAK
case 23:
YY_RULE_SETUP
{ BEGIN implicitphrase;
TOKEN (_NEAR);}
YY_BREAK
case 24:
YY_RULE_SETUP
{ TOKEN (_LT);}
YY_BREAK
case 25:
YY_RULE_SETUP
{ TOKEN (_GT);}
YY_BREAK
case 26:
YY_RULE_SETUP
{ TOKEN (_LTE);}
YY_BREAK
case 27:
YY_RULE_SETUP
{ TOKEN (_GTE);}
YY_BREAK
case 28:
YY_RULE_SETUP
{ if (fContinueMaybeRegex)
{
// We are not sure if we are going to find a
// regular expression or a phrase.
BEGIN mayberegex;
fContinueMaybeRegex = FALSE;
}
TOKEN (_EQ);
}
YY_BREAK
case 29:
YY_RULE_SETUP
{ TOKEN (_NE); }
YY_BREAK
case 30:
YY_RULE_SETUP
{ TOKEN (_ALLOF); }
YY_BREAK
case 31:
YY_RULE_SETUP
{ TOKEN (_SOMEOF); }
YY_BREAK
case 32:
case 33:
YY_RULE_SETUP
{ TOKEN (_LTSOME); }
YY_BREAK
case 34:
case 35:
YY_RULE_SETUP
{ TOKEN (_GTSOME); }
YY_BREAK
case 36:
case 37:
YY_RULE_SETUP
{ TOKEN (_LTESOME); }
YY_BREAK
case 38:
case 39:
YY_RULE_SETUP
{ TOKEN (_GTESOME); }
YY_BREAK
case 40:
case 41:
YY_RULE_SETUP
{ TOKEN (_EQSOME); }
YY_BREAK
case 42:
case 43:
YY_RULE_SETUP
{ TOKEN (_NESOME); }
YY_BREAK
case 44:
YY_RULE_SETUP
{ TOKEN (_ALLOFSOME); }
YY_BREAK
case 45:
YY_RULE_SETUP
{ TOKEN (_SOMEOFSOME); }
YY_BREAK
case 46:
case 47:
YY_RULE_SETUP
{ TOKEN (_LTALL); }
YY_BREAK
case 48:
case 49:
YY_RULE_SETUP
{ TOKEN (_GTALL); }
YY_BREAK
case 50:
case 51:
YY_RULE_SETUP
{ TOKEN (_LTEALL); }
YY_BREAK
case 52:
case 53:
YY_RULE_SETUP
{ TOKEN (_GTEALL); }
YY_BREAK
case 54:
case 55:
YY_RULE_SETUP
{ TOKEN (_EQALL); }
YY_BREAK
case 56:
case 57:
YY_RULE_SETUP
{ TOKEN (_NEALL); }
YY_BREAK
case 58:
YY_RULE_SETUP
{ TOKEN (_ALLOFALL); }
YY_BREAK
case 59:
YY_RULE_SETUP
{ TOKEN (_SOMEOFALL); }
YY_BREAK
// *************
// VECTOR SPACE TOKENS
// *************
case 60:
YY_RULE_SETUP
{ STRING_VALUE(_VEMETHOD, TRUE, TRUE); }
YY_BREAK
case 61:
YY_RULE_SETUP
{ STRING_VALUE(_VEMETHOD, TRUE, FALSE); }
YY_BREAK
case 62:
YY_RULE_SETUP
{
// makes more sense to enter phrase mode
// rather than freetext mode.
fContinueImplicitPhrase = TRUE;
BEGIN implicitphrase;
TOKEN (_VE);
}
YY_BREAK
case 63:
YY_RULE_SETUP
{ TOKEN (_VECTOR_END); }
YY_BREAK
// *************
// longhand NEAR
// *************
// must return both unit and distance, so use start state to pull them out, and
// return _NEAR_END so parser knows we hit the closing }
case 64:
YY_RULE_SETUP
{ yaccDebugOut(( DEB_ITRACE, "Longhand _NEAR token, begin innear\n" ));
BEGIN innear; }
YY_BREAK
case 65:
YY_RULE_SETUP
{ yaccDebugOut(( DEB_ITRACE, "Longhand _NEAR{ token, begin innear\n" ));
yyless(yyleng-1);
BEGIN innear; }
YY_BREAK
// ************
// WEIGHT
// ************
case 66:
YY_RULE_SETUP
{
if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
yaccDebugOut(( DEB_ITRACE, "_WEIGHT TOKEN FOUND!!\n" ));
STRING_VALUE(_WEIGHT,TRUE,FALSE);
}
YY_BREAK
case 67:
YY_RULE_SETUP
{
if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
TOKEN (_COERCE); }
YY_BREAK
// ****************
// longhand GENERATE
// ****************
case 68:
YY_RULE_SETUP
{
if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
yaccDebugOut((DEB_ITRACE, "Prefix recognized.\n"));
TOKEN(_GENPREFIX);
}
YY_BREAK
case 69:
YY_RULE_SETUP
{
if (fContinueImplicitPhrase)
{
BEGIN implicitphrase;
fContinueImplicitPhrase = FALSE;
}
yaccDebugOut((DEB_ITRACE, "Inflect recognized.\n"));
TOKEN(_GENINFLECT);
}
YY_BREAK
case 70:
YY_RULE_SETUP
{ TOKEN (_GENNORMAL); }
YY_BREAK
// ****************
// longhand REGEX
// ****************
case 71:
YY_RULE_SETUP
{ STRING_VALUE(_REGEX,TRUE,TRUE);}
YY_BREAK
case 72:
YY_RULE_SETUP
{ STRING_VALUE(_REGEX,TRUE,FALSE);}
YY_BREAK
case 73:
YY_RULE_SETUP
{ STRING_VALUE(_REGEX,TRUE,FALSE);}
YY_BREAK
// ****************
// shorthand REGEX
// ****************
// shorthand, quoted
case 74:
YY_RULE_SETUP
{
// Get into short form of reg expression
BEGIN shortregex;
STRING_VALUE(_PROPNAME, FALSE, TRUE);
}
YY_BREAK
// shorthand, not quoted
case 75:
YY_RULE_SETUP
{
// Get into short form of reg expression
BEGIN shortregex;
STRING_VALUE(_PROPNAME, FALSE, FALSE);
}
YY_BREAK
// ***************
// longhand PHRASE
// ***************
// quoted, with trailing * or **
case 76:
YY_RULE_SETUP
{
// trailing * has to be for inflection -
// process it in shortgen on next pass.
// Grab phrase now.
yyless(yyleng-1);
BEGIN shortgen;
STRING_VALUE(_PHRASE,TRUE,TRUE);
}
YY_BREAK
// quoted, without trailing * or **
case 77:
YY_RULE_SETUP
{
// no trailing * -- phrase only
STRING_VALUE(_PHRASE,TRUE,TRUE);
}
YY_BREAK
// unquoted, with trailing * or **
case 78:
YY_RULE_SETUP
{
// trailing * has to be for inflection -
// process it in shortgen on next pass.
// Grab phrase now.
yyless(yyleng-1);
BEGIN shortgen;
STRING_VALUE(_PHRASE,TRUE,FALSE);
}
YY_BREAK
// unquoted, without trailing * or **
case 79:
YY_RULE_SETUP
{
// no trailing * -- phrase only
STRING_VALUE(_PHRASE,TRUE,FALSE);
}
YY_BREAK
// *************
// shorthand PHRASE
// *************
// with trailing * or **
case 80:
YY_RULE_SETUP
{
// trailing * has to be for inflection -
// process it in shortgen on next pass.
// Grab phrase now.
yyless(yyleng-1);
BEGIN shortgen;
STRING_VALUE(_PHRASE, FALSE, TRUE);
}
YY_BREAK
// without trailing * or **
case 81:
YY_RULE_SETUP
{
// no trailing * -- phrase only
STRING_VALUE(_PHRASE, FALSE, TRUE);
}
YY_BREAK
// *****************
// longhand FREETEXT
// *****************
// quoted, with trailing * or **
case 82:
YY_RULE_SETUP
{
// trailing * has to be for inflection -
// process it in shortgen on next pass.
// Grab freetext now.
yyless(yyleng-1);
BEGIN shortgen;
STRING_VALUE(_FREETEXT,TRUE,TRUE);
}
YY_BREAK
// quoted, without trailing * or **
case 83:
YY_RULE_SETUP
{
// no trailing * -- freetext only
STRING_VALUE(_FREETEXT,TRUE,TRUE);
}
YY_BREAK
// unquoted, with trailing * or **
case 84:
YY_RULE_SETUP
{
// trailing * has to be for inflection -
// process it in shortgen on next pass.
// Grab freetext now.
yyless(yyleng-1);
BEGIN shortgen;
STRING_VALUE(_FREETEXT,TRUE,FALSE);
}
YY_BREAK
// unquoted, without trailing * or **
case 85:
YY_RULE_SETUP
{
// no trailing * -- freetext only
STRING_VALUE(_FREETEXT,TRUE,FALSE);
}
YY_BREAK
// ******************
// shorthand FREETEXT
// ******************
case 86:
YY_RULE_SETUP
{
// For backward compatibility, we want to special
// case and recognize the "not" operator when it
// is immediately followed by a mode specifier character
// (@, $, #). For e.g. "not@size > 2" should be treated
// as if we have a "not" operator followed by "@size > 2".
// Without this special case, "not@size > 2" gets recognized
// as free text.
if (IsNotOperator())
{
yyless(3);
BEGIN INITIAL;
TOKEN(_NOT);
}
yaccDebugOut(( DEB_ITRACE, "fTreatFreetextAsPhrase is %d\n", fTreatFreetextAsPhrase ));
if (fTreatFreetextAsPhrase)
BEGIN implicitphrase;
else
BEGIN infreefreetext;
fTreatFreetextAsPhrase = FALSE;
yymore();
}
YY_BREAK
case 87:
YY_RULE_SETUP
{
// IsNotOperator is used here for the same reason as the
// use above, except that this rule covers situations where
// we have no spaces in the query. E.g. "not@size>2".
// This should be equivalent to
// "not@size > 2", which in turn should be equivalent to
// "not @size > 2"
if (IsNotOperator())
{
yyless(3);
BEGIN INITIAL;
TOKEN(_NOT);
}
if (fTreatFreetextAsPhrase)
{
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
else
{
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
fTreatFreetextAsPhrase = FALSE;
}
YY_BREAK
// *************
// VECTOR VALUES
// *************
// quoted multi-value vector - has ; separator. Singlets caught in parser
case 88:
YY_RULE_SETUP
{ BEGIN invector; yyless(1);}
YY_BREAK
// unquoted multi-value vector - has ; separator. Singlets caught in parser
case 89:
YY_RULE_SETUP
{ BEGIN invector; yyless(1);}
YY_BREAK
//
// INNEAR: longhand NEAR processing
//
case 90:
YY_RULE_SETUP
{}
YY_BREAK
case 91:
YY_RULE_SETUP
{}
YY_BREAK
case 92:
YY_RULE_SETUP
{ STRING_VALUE(_NEARDIST,TRUE,FALSE);}
YY_BREAK
case 93:
YY_RULE_SETUP
{ STRING_VALUE(_NEARUNIT,TRUE,FALSE);}
YY_BREAK
case 94:
YY_RULE_SETUP
{ STRING_VALUE(_NEARUNIT,TRUE,FALSE);}
YY_BREAK
case 95:
YY_RULE_SETUP
{ STRING_VALUE(_NEARUNIT,TRUE,FALSE);}
YY_BREAK
case 96:
YY_RULE_SETUP
{ STRING_VALUE(_NEARUNIT,TRUE,FALSE);}
YY_BREAK
case 97:
YY_RULE_SETUP
{ BEGIN implicitphrase; TOKEN (_NEAR_END);}
YY_BREAK
//
// INVECTOR: multi value vector processing
//
case 98:
YY_RULE_SETUP
{}
YY_BREAK
case 99:
YY_RULE_SETUP
{}
YY_BREAK
case 100:
YY_RULE_SETUP
{ STRING_VALUE(_VECTORELEMENT, FALSE, TRUE);}
YY_BREAK
case 101:
YY_RULE_SETUP
{ STRING_VALUE(_VECTORELEMENT, TRUE, FALSE);}
YY_BREAK
case 102:
YY_RULE_SETUP
{
// Need to emit _VECTORELEMENT and _VE_END -- so backup 1
// so we can emit _VE_END on next pass
yyless(yyleng-1);
STRING_VALUE(_VECTORELEMENT, FALSE, FALSE);
}
YY_BREAK
case 103:
YY_RULE_SETUP
{ BEGIN INITIAL; TOKEN (_VE_END); }
YY_BREAK
//
// INFREEFREETEXT: shorthand FREETEXT processing
//
// NOTE: and, or, near need to be localized
case 104:
YY_RULE_SETUP
{ yymore(); }
YY_BREAK
case 105:
YY_RULE_SETUP
{
yyless(yyleng-4);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 106:
YY_RULE_SETUP
{
yyless(yyleng-4);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 107:
YY_RULE_SETUP
{
yyless(yyleng-3);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 108:
YY_RULE_SETUP
{
yyless(yyleng-3);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 109:
YY_RULE_SETUP
{
yaccDebugOut(( DEB_ITRACE, "{infreefreetext}{near}[ ]\n" ));
yyless(yyleng-5);
fTreatFreetextAsPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 110:
YY_RULE_SETUP
{
yaccDebugOut(( DEB_ITRACE, "{infreefreetext}{near}{\n" ));
yyless(yyleng-5);
fTreatFreetextAsPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 111:
YY_RULE_SETUP
{
yaccDebugOut(( DEB_ITRACE, "{infreefreetext}{{near}\n" ));
yyless(yyleng-6);
fTreatFreetextAsPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 112:
YY_RULE_SETUP
{
yaccDebugOut(( DEB_ITRACE, "{infreefreetext}{{near}{\n" ));
yyless(yyleng-6);
fTreatFreetextAsPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 113:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 114:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 115:
YY_RULE_SETUP
{
yyless(yyleng-1);
fTreatFreetextAsPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 116:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 117:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 118:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 119:
YY_RULE_SETUP
{
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
case 120:
YY_RULE_SETUP
{ yymore(); }
YY_BREAK
case 121:
YY_RULE_SETUP
{
BEGIN INITIAL;
STRING_VALUE(_FREETEXT,FALSE,FALSE);
}
YY_BREAK
//
// SHORTGEN: * or ** processing
//
// can only get here by backing up over *,
// so we will always find a match
case 122:
YY_RULE_SETUP
{
BEGIN INITIAL;
TOKEN(_SHGENINFLECT);
}
YY_BREAK
case 123:
YY_RULE_SETUP
{
BEGIN INITIAL;
TOKEN(_SHGENPREFIX);
}
YY_BREAK
//
// SHORTREGEX: #propname processing
//
// can only get here when #"propname" or #propname
// (quoted or unquoted) version is detected.
// NOTE: and, or need to be localized
// NOTE: It doesn't make sense to have the near operator following
// a regular expression. A regex is Boolean and doesn't evaluate
// to a position value.
//
//
case 124:
YY_RULE_SETUP
{ yymore(); }
YY_BREAK
case 125:
YY_RULE_SETUP
{
// ignore equal operators...
BEGIN shortregex;
}
YY_BREAK
case 126:
YY_RULE_SETUP
{ STRING_VALUE(_REGEX, FALSE, TRUE);}
YY_BREAK
case 127:
YY_RULE_SETUP
{
fContinueRegex = TRUE;
yyless(yyleng-4);
BEGIN INITIAL;
STRING_VALUE(_REGEX,FALSE,FALSE);
}
YY_BREAK
case 128:
YY_RULE_SETUP
{
fContinueRegex = TRUE;
yyless(yyleng-3);
BEGIN INITIAL;
STRING_VALUE(_REGEX,FALSE,FALSE);
}
YY_BREAK
case 129:
YY_RULE_SETUP
{
yyless(yyleng-4);
// The only valid way to get here is to
// have had seen "and" before. Don't recognize
// a regex. Back off and let the lexer takes its
// normal course.
fContinueRegex = TRUE;
BEGIN INITIAL;
}
YY_BREAK
case 130:
YY_RULE_SETUP
{
fContinueRegex = TRUE;
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_REGEX,FALSE,FALSE);
}
YY_BREAK
case 131:
YY_RULE_SETUP
{
fContinueRegex = TRUE;
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_REGEX,FALSE,FALSE);
}
YY_BREAK
case 132:
YY_RULE_SETUP
{
yyless(yyleng-1);
// The only valid way to get here is to
// have had seen "and" before. Don't recognize
// a phrase. Back off and let the lexer takes its
// normal course.
fContinueRegex = TRUE;
BEGIN INITIAL;
}
YY_BREAK
// When we find an operator we should treat it as one.
// So backup and get out if you see one.
// Normally '^' is treated as part of an operator (e.g. ^a), but it also
// has a special meaning in regular expression syntax. So we will have to
// let it through when it is part of a regular expression. As an alternative,
// we can allow '^' in regular expression in a limited manner (i.e. only the use
// in square brackets to exclude the set of chars "[^abc]" where abc are excluded).
// This alternative will let the common case use of '^' in a regular expression
// while allowing it to be treated as part of an operator when it doesn't
// occur immediately after a '['.
// We are implementing the alternative here because our regex capability
// only allows for the "[^" construct.
case 133:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueRegex = FALSE;
BEGIN INITIAL;
}
YY_BREAK
case 134:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_REGEX,FALSE,FALSE);
}
YY_BREAK
case 135:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_REGEX,FALSE,FALSE);
}
YY_BREAK
case 136:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_REGEX,FALSE,FALSE);
}
YY_BREAK
case 137:
YY_RULE_SETUP
{ yymore(); }
YY_BREAK
case 138:
YY_RULE_SETUP
{
fContinueRegex = TRUE;
BEGIN INITIAL;
STRING_VALUE(_REGEX,FALSE,FALSE);
}
YY_BREAK
case 139:
YY_RULE_SETUP
{
yyless(yyleng-4);
fContinueMaybeRegex = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
}
YY_BREAK
case 140:
YY_RULE_SETUP
{
yyless(yyleng-3);
fContinueMaybeRegex = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
}
YY_BREAK
case 141:
YY_RULE_SETUP
{
yyless(yyleng-4);
// The only valid way to get here is to
// have had seen "and" before. Don't recognize
// a regex. Back off and let the lexer takes its
// normal course.
fContinueMaybeRegex = TRUE;
BEGIN INITIAL;
}
YY_BREAK
case 142:
YY_RULE_SETUP
{
fContinueMaybeRegex = TRUE;
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
}
YY_BREAK
case 143:
YY_RULE_SETUP
{
fContinueMaybeRegex = TRUE;
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
}
YY_BREAK
case 144:
YY_RULE_SETUP
{
yyless(yyleng-1);
// The only valid way to get here is to
// have had seen "and" before. Don't recognize
// a phrase. Back off and let the lexer takes its
// normal course.
fContinueMaybeRegex = TRUE;
BEGIN INITIAL;
}
YY_BREAK
case 145:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
}
YY_BREAK
case 146:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
}
YY_BREAK
case 147:
YY_RULE_SETUP
{
yyless(yyleng-1);
BEGIN INITIAL;
STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
}
YY_BREAK
case 148:
YY_RULE_SETUP
{ yymore(); }
YY_BREAK
case 149:
YY_RULE_SETUP
{ STRING_VALUE(_PHRASE, FALSE, TRUE);}
YY_BREAK
case 150:
YY_RULE_SETUP
{ yymore(); }
YY_BREAK
case 151:
YY_RULE_SETUP
{
fContinueMaybeRegex = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASEORREGEX,FALSE,FALSE);
}
YY_BREAK
// When we find an operator at the start of a phrase,
// we should treat it as one. So backup and get out if you see one.
case 152:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueMaybeRegex = FALSE;
BEGIN INITIAL;
}
YY_BREAK
//
// IMPLICITPHRASE: Where phrase is implied.
//
// can only get here when @propname or {prop name = propname} is detected.
// NOTE: and, or, not need to be localized when time permits.
//
// NTRAID#DB-NTBUG9-84571-2000/07/31-dlee Indexing Service tripolish2 query expressions misinterpreted as strings
// if expression has trailing blanks, we'll emit a string value
case 153:
YY_RULE_SETUP
{
fContinueImplicitPhrase = FALSE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE, FALSE, TRUE);
}
YY_BREAK
case 154:
YY_RULE_SETUP
{ yymore(); }
YY_BREAK
case 155:
YY_RULE_SETUP
{
yyless(yyleng-4);
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 156:
YY_RULE_SETUP
{
yyless(yyleng-3);
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 157:
YY_RULE_SETUP
{
yyless(yyleng-5);
// We want to treat the following token as a phrase
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 158:
YY_RULE_SETUP
{
yyless(yyleng-5);
// We want to treat the following token as a phrase
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 159:
YY_RULE_SETUP
{
yyless(yyleng-4);
// The only valid way to get here is to
// have had seen "and" before. Don't recognize
// a phrase. Back off and let the lexer takes its
// normal course.
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
}
YY_BREAK
case 160:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 161:
YY_RULE_SETUP
{
yyless(yyleng-1);
// We want to treat the following token as a phrase
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 162:
YY_RULE_SETUP
{
yyless(yyleng-1);
// The only valid way to get here is to
// have had seen "and" before. Don't recognize
// a phrase. Back off and let the lexer takes its
// normal course.
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
}
YY_BREAK
case 163:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 164:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueImplicitPhrase = FALSE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 165:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueImplicitPhrase = FALSE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 166:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 167:
YY_RULE_SETUP
{
yyless(yyleng-9);
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
// When we find an operator at the start of an implicit phrase,
// we should treat it as one. So backup and get out if you see one.
case 168:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueImplicitPhrase = FALSE;
BEGIN INITIAL;
}
YY_BREAK
// Triplish2 uses = to indicate that whatever appears after it may
// be using wildcards. Implement that here.
case 169:
YY_RULE_SETUP
{
yyless(yyleng-1);
fContinueMaybeRegex = TRUE;
BEGIN INITIAL;
}
YY_BREAK
case 170:
YY_RULE_SETUP
{ yymore(); }
YY_BREAK
case 171:
YY_RULE_SETUP
{
fContinueImplicitPhrase = TRUE;
BEGIN INITIAL;
STRING_VALUE(_PHRASE,FALSE,FALSE);
}
YY_BREAK
case 172:
YY_RULE_SETUP
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(innear):
case YY_STATE_EOF(shortgen):
case YY_STATE_EOF(shortregex):
case YY_STATE_EOF(mayberegex):
case YY_STATE_EOF(implicitphrase):
case YY_STATE_EOF(infreefreetext):
case YY_STATE_EOF(invector):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB YY_CHAR. */
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
* consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
yy_n_chars = yy_current_buffer->yy_n_chars;
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p =
yytext_ptr + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
L"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
YYLEXER::YYLEXER()
{
yy_c_buf_p = 0;
yy_init = 1;
yy_start = 0;
yyprimetoken = 0;
yy_flex_debug = 0;
yylineno = 1; // this will only get updated if %option yylineno
yy_did_buffer_switch_on_eof = 0;
yy_looking_for_trail_begin = 0;
yy_more_flag = 0;
yy_more_len = 0;
yy_more_offset = yy_prev_more_offset = 0;
yy_start_stack_ptr = yy_start_stack_depth = 0;
yy_start_stack = 0;
yy_current_buffer = 0;
#ifdef YY_USES_REJECT
yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
#else
yy_state_buf = 0;
#endif
pszInputBuffer = pCurBuffer = (YY_CHAR *)NULL;
cInputBuffer = 0;
// Initialize these flags for this lexical session. They will be
// set/reset within the lexer to control flow.
fContinueImplicitPhrase = FALSE;
fContinueMaybeRegex = FALSE;
fContinueRegex = FALSE;
fTreatFreetextAsPhrase = FALSE;
#ifdef DEBUG
tkndebug = getenv("TKNDEBUG") ? 1 : 0;
#endif
}
YYLEXER::~YYLEXER()
{
delete yy_state_buf;
yy_delete_buffer( yy_current_buffer );
yy_flex_free(pszInputBuffer);
}
#ifdef YY_INTERACTIVE
int YYLEXER::LexerInput( YY_CHAR* buf, int /* max_size */ )
#else
int YYLEXER::LexerInput( YY_CHAR* buf, int max_size )
#endif
{
return 0;
}
void YYLEXER::LexerOutput( const YY_CHAR* buf, int size )
{
// everthing should match
THROW( CException( QPARSE_E_INVALID_QUERY ) );
return;
}
#ifdef DEBUG
void YYLEXER::LexerTrace(const YY_CHAR* buf, int size, int tknNum)
{
if (tkndebug > 0)
{
cout << ">> Lexing Token : ";
for (int i=0; i<size; i++)
cout << char(buf[i]);
cout << " (" << tknNum << ")"<< endl;
}
}
#endif
void YYLEXER::ResetLexer()
{
yy_init = 1;
yy_start = 0;
#ifdef DEBUG
tkndebug = getenv("TKNTRACE") ? 1 : 0;
#endif
}
int YYLEXER::yybufferinput(YY_CHAR *pszBuffer, int cMax)
{
int n = min(cMax, cInputBuffer - (int) (pCurBuffer - pszInputBuffer));
if (n > 0)
{
memcpy(pszBuffer, pCurBuffer, n * sizeof(WCHAR));
pCurBuffer += n;
}
return n;
}
void YYLEXER::yyprimebuffer(const YY_CHAR *pszBuffer)
{
// if (NULL != pszInputBuffer)
// CoTaskMemFree(pszInputBuffer);
Win4Assert(0 == pszInputBuffer);
cInputBuffer = wcslen(pszBuffer) + 1;
pszInputBuffer = pCurBuffer = new WCHAR[cInputBuffer];
RtlCopyMemory(pszInputBuffer, pszBuffer, cInputBuffer*sizeof(WCHAR));
cInputBuffer--; // get the real length
ResetLexer();
}
/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
int YYLEXER::yy_get_next_buffer()
{
register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
register YY_CHAR *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
L"fatal flex scanner internal error--end of buffer missed" );
if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
int num_to_read =
yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
L"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
(int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (YY_CHAR *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
yy_current_buffer->yy_n_chars = yy_n_chars;
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB YY_CHAR was reached */
yy_state_type YYLEXER::yy_get_previous_state()
{
register yy_state_type yy_current_state;
register YY_CHAR *yy_cp;
yy_current_state = yy_start;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
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)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 804 )
yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
yy_state_type YYLEXER::yy_try_NUL_trans( yy_state_type yy_current_state )
{
register int yy_is_jam;
register YY_CHAR *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 804 )
yy_c = (YY_CHAR) yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 803);
return yy_is_jam ? 0 : yy_current_state;
}
void YYLEXER::yyunput( int c, register YY_CHAR* yy_bp )
{
register YY_CHAR *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register YY_CHAR *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register YY_CHAR *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( L"flex scanner push-back overflow" );
}
*--yy_cp = (YY_CHAR) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
int YYLEXER::yyinput()
{
int c;
*yy_c_buf_p = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
{ /* need more input */
int offset = (int)(yy_c_buf_p - yytext_ptr);
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart( );
/* fall through */
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
return EOF;
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
c = *(YY_CHAR *) yy_c_buf_p; /* cast for 8-bit YY_CHAR's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
void YYLEXER::yyrestart( )
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( (cInputBuffer * sizeof (YY_CHAR)) + sizeof (YY_CHAR) );
yy_init_buffer( yy_current_buffer );
yy_load_buffer_state();
}
void YYLEXER::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
void YYLEXER::yy_load_buffer_state()
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yy_hold_char = *yy_c_buf_p;
}
YY_BUFFER_STATE YYLEXER::yy_create_buffer( int size )
{
YY_BUFFER_STATE b;
XPtrST<BYTE> xBuf((BYTE *)yy_flex_alloc( sizeof( struct yy_buffer_state ) ));
((YY_BUFFER_STATE)xBuf.GetPointer())->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
((YY_BUFFER_STATE)xBuf.GetPointer())->yy_ch_buf =
(YY_CHAR *) yy_flex_alloc( ((YY_BUFFER_STATE)xBuf.GetPointer())->yy_buf_size + 2 );
// if the second alloc succeeds, we acquire into b. Else, xBuf will be automatically
// freed.
b = (YY_BUFFER_STATE) xBuf.Acquire();
b->yy_is_our_buffer = 1;
yy_init_buffer( b );
return b;
}
void YYLEXER::yy_delete_buffer( YY_BUFFER_STATE b )
{
if ( ! b )
return;
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yy_flex_free( (void *) b->yy_ch_buf );
yy_flex_free( (void *) b );
}
/* extern "C" int isatty YY_PROTO(( int )); */
void YYLEXER::yy_init_buffer( YY_BUFFER_STATE b )
{
yy_flush_buffer( b );
b->yy_fill_buffer = 1;
b->yy_is_interactive = 0;
}
void YYLEXER::yy_flush_buffer( YY_BUFFER_STATE b )
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == yy_current_buffer )
yy_load_buffer_state();
}
#ifndef YY_NO_SCAN_BUFFER
#endif
#ifndef YY_NO_SCAN_STRING
#endif
#ifndef YY_NO_SCAN_BYTES
#endif
#ifndef YY_NO_PUSH_STATE
void YYLEXER::yy_push_state( int new_state )
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size, old_size;
old_size = yy_start_stack_depth * sizeof( int );
yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yy_start_stack_depth * sizeof( int );
if ( ! yy_start_stack )
yy_start_stack = (int *) yy_flex_alloc( new_size );
else
yy_start_stack = (int *) yy_flex_realloc(
(void *) yy_start_stack, old_size, new_size );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
void YYLEXER::yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( L"start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
int YYLEXER::yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
void YYLEXER::LexerError( yyconst YY_CHAR msg[] )
{
yaccDebugOut(( DEB_WARN, "%s\n", msg ));
THROW( CException( E_UNEXPECTED ) );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
/* Internal utility routines. */
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( YY_CHAR *s1, yyconst YY_CHAR *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
YY_CHAR *s1;
yyconst YY_CHAR *s2;
int n;
#endif
{
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst YY_CHAR *s )
#else
static int yy_flex_strlen( s )
yyconst YY_CHAR *s;
#endif
{
register int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
{
void *p = (void *)new BYTE[size];
return p;
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t old_size, yy_size_t new_size )
#else
static void *yy_flex_realloc( ptr, old_size, new_size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (YY_CHAR *) in the following accommodates both
* implementations that use YY_CHAR* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
void *p = (void *) new BYTE[new_size];
RtlCopyMemory(p, ptr, min(old_size, new_size));
yy_flex_free(ptr);
return p;
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
delete[] (BYTE *)ptr;
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif