home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
pstoedit.zip
/
source.zip
/
pstoedit.2.50
/
src
/
lexyy.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-28
|
77KB
|
2,430 lines
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.89 96/05/25 21:02:21 vern Exp $
*/
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <unistd.h>
/* 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 char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned 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( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#define YY_BUF_SIZE 16384
typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yyleng;
extern FILE *yyin, *yyout;
#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
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
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
};
static YY_BUFFER_STATE yy_current_buffer = 0;
/* 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
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, 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( yyin, 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( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* 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; \
yyleng = (int) (yy_cp - yy_bp); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 35
#define YY_END_OF_BUFFER 36
static yyconst short int yy_accept[610] =
{ 0,
0, 0, 0, 0, 36, 26, 26, 26, 26, 26,
26, 1, 26, 26, 34, 34, 34, 34, 34, 1,
34, 34, 34, 34, 34, 34, 0, 0, 0, 0,
0, 0, 0, 0, 0, 14, 0, 0, 0, 0,
1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 1, 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, 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, 32, 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, 13,
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, 33, 28, 27, 0, 0, 0,
0, 31, 0, 0, 0, 23, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 29, 0, 0,
0, 0, 0, 0, 0, 0, 17, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 2, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0, 0, 0, 0, 7,
0, 0, 0, 0, 0, 14, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 30, 0, 0, 0,
0, 0, 0, 0, 24, 0, 0, 0, 0, 0,
0, 0, 4, 0, 0, 4, 0, 0, 0, 0,
18, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 25, 0, 4,
0, 0, 6, 0, 0, 0, 0, 0, 0, 0,
0, 20, 0, 16, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11, 0, 0, 0, 0, 0, 19, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 5, 0,
0, 0, 12, 0, 22, 0, 21, 0, 0, 0,
0, 0, 0, 0, 0, 10, 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, 15, 0,
0, 0, 0, 0, 8, 0, 0, 9, 0
} ;
static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
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, 4, 1, 1, 5,
6, 1, 1, 1, 7, 8, 1, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 10,
11, 1, 1, 1, 1, 1, 12, 13, 1, 14,
1, 1, 15, 1, 1, 1, 16, 1, 1, 1,
1, 1, 1, 1, 1, 1, 17, 18, 19, 20,
21, 22, 23, 24, 25, 1, 26, 27, 28, 29,
30, 31, 1, 32, 33, 34, 35, 36, 37, 1,
38, 39, 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, 1, 1, 1, 1
} ;
static yyconst int yy_meta[40] =
{ 0,
1, 2, 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 short int yy_base[619] =
{ 0,
0, 32, 64, 96, 476, 466, 1594, 127, 8, 9,
10, 17, 11, 24, 464, 1594, 13, 19, 44, 48,
27, 20, 3, 39, 28, 56, 395, 79, 71, 46,
60, 57, 67, 75, 73, 1594, 160, 78, 103, 105,
119, 130, 76, 99, 86, 91, 387, 111, 132, 129,
143, 192, 145, 164, 138, 144, 152, 92, 128, 161,
166, 167, 172, 174, 175, 176, 177, 181, 185, 187,
224, 200, 217, 202, 226, 218, 235, 242, 266, 219,
205, 248, 180, 230, 236, 256, 263, 298, 274, 271,
276, 282, 228, 246, 212, 264, 290, 291, 292, 241,
287, 315, 283, 317, 295, 183, 319, 333, 335, 337,
340, 343, 345, 347, 350, 356, 358, 360, 365, 371,
299, 373, 377, 320, 348, 372, 378, 366, 379, 381,
383, 385, 386, 394, 398, 406, 410, 414, 418, 426,
428, 430, 434, 436, 440, 389, 401, 314, 442, 415,
421, 423, 431, 443, 449, 448, 455, 450, 457, 451,
458, 456, 461, 478, 480, 485, 489, 491, 493, 495,
497, 502, 504, 508, 506, 517, 519, 526, 527, 532,
459, 483, 512, 500, 522, 536, 537, 538, 539, 541,
545, 559, 561, 563, 566, 569, 571, 573, 578, 580,
582, 584, 547, 567, 585, 1594, 588, 589, 592, 593,
603, 594, 596, 600, 468, 605, 606, 601, 604, 626,
630, 633, 636, 638, 640, 645, 642, 647, 649, 654,
652, 660, 656, 661, 663, 620, 675, 668, 669, 676,
677, 540, 682, 683, 684, 685, 687, 691, 698, 700,
705, 707, 710, 712, 719, 723, 729, 726, 688, 717,
731, 733, 735, 721, 738, 742, 713, 746, 748, 751,
750, 753, 755, 754, 760, 762, 764, 766, 771, 1594,
783, 785, 787, 789, 792, 795, 797, 799, 802, 807,
800, 815, 809, 767, 757, 820, 801, 813, 814, 821,
823, 834, 826, 838, 848, 850, 856, 860, 864, 866,
868, 870, 822, 873, 1594, 1594, 1594, 839, 845, 874,
857, 1594, 875, 876, 877, 1594, 892, 878, 894, 896,
900, 903, 905, 911, 915, 917, 923, 926, 928, 932,
937, 886, 940, 944, 945, 1594, 918, 924, 920, 933,
939, 956, 958, 941, 960, 968, 974, 976, 978, 981,
983, 987, 989, 991, 994, 999, 979, 1594, 984, 995,
996, 1001, 1007, 251, 971, 608, 1594, 1008, 1020, 1023,
1028, 1030, 1032, 1034, 1036, 1038, 1042, 1044, 1048, 1051,
1053, 1058, 1060, 1065, 1066, 249, 253, 1039, 880, 1059,
1054, 1594, 964, 1071, 1073, 1077, 1085, 1098, 1100, 1102,
1104, 1106, 1108, 1112, 1114, 1080, 1092, 1078, 1082, 1088,
1115, 1121, 1122, 1124, 1128, 1130, 1132, 1136, 1142, 1594,
1147, 1152, 1154, 1156, 1158, 1594, 1167, 327, 1165, 1169,
1173, 1144, 1175, 1171, 1149, 1010, 1179, 1177, 1183, 1195,
1188, 1197, 1199, 1211, 1213, 1216, 1594, 1186, 1220, 1191,
1200, 1193, 1224, 1217, 1594, 1226, 1232, 1234, 1239, 1241,
1244, 1246, 0, 1248, 1250, 1254, 1253, 1260, 1251, 1262,
1594, 1264, 1266, 882, 1252, 1272, 1276, 1289, 1291, 1293,
1295, 1297, 1299, 1303, 1283, 1309, 1286, 1594, 1278, 1314,
1319, 1321, 1594, 1325, 1327, 1329, 1332, 1335, 1337, 1338,
1315, 1594, 1348, 1594, 1280, 1317, 1353, 1360, 1362, 1364,
1366, 1368, 1371, 1374, 1306, 1357, 1381, 1383, 1385, 1388,
1594, 1390, 1394, 1397, 1404, 1396, 1594, 1406, 1398, 1411,
1419, 1421, 1423, 1426, 1428, 1433, 1322, 1435, 1594, 1437,
1440, 1442, 1594, 1443, 1594, 1430, 1594, 1445, 1448, 1450,
1452, 1454, 1343, 1456, 174, 1594, 1459, 1463, 1375, 1465,
1468, 170, 1471, 1377, 1477, 1479, 1481, 1485, 1464, 1474,
1493, 1497, 1484, 1500, 1503, 1509, 1513, 1514, 1516, 1519,
1522, 1526, 1528, 1594, 1531, 1533, 1537, 1539, 1594, 1541,
1547, 1550, 1554, 1556, 1594, 1558, 1561, 1594, 1594, 1581,
1583, 142, 1585, 16, 0, 1587, 1589, 1591
} ;
static yyconst short int yy_def[619] =
{ 0,
610, 610, 611, 611, 609, 612, 609, 612, 613, 614,
612, 612, 612, 612, 615, 609, 615, 616, 615, 615,
615, 615, 615, 615, 615, 615, 612, 612, 612, 612,
612, 612, 612, 612, 613, 609, 617, 614, 614, 614,
612, 612, 612, 612, 612, 612, 615, 615, 615, 615,
616, 618, 615, 615, 615, 615, 615, 615, 615, 615,
615, 615, 612, 612, 612, 612, 612, 612, 613, 617,
617, 617, 617, 617, 617, 614, 614, 614, 614, 612,
612, 612, 612, 615, 615, 616, 618, 618, 618, 618,
618, 618, 615, 615, 615, 615, 615, 615, 615, 615,
612, 612, 612, 612, 612, 612, 613, 613, 613, 617,
617, 617, 617, 617, 617, 617, 617, 617, 617, 617,
614, 614, 614, 614, 612, 612, 612, 612, 612, 612,
612, 615, 615, 616, 616, 618, 618, 618, 618, 618,
618, 618, 618, 618, 618, 615, 615, 615, 615, 615,
615, 615, 615, 615, 615, 615, 612, 612, 612, 612,
612, 612, 613, 613, 613, 617, 617, 617, 617, 617,
617, 617, 617, 617, 617, 617, 617, 614, 614, 614,
614, 612, 612, 612, 612, 612, 612, 612, 615, 615,
616, 616, 618, 618, 618, 618, 618, 618, 618, 618,
618, 618, 615, 615, 615, 609, 615, 615, 615, 615,
615, 615, 615, 612, 612, 612, 612, 612, 612, 613,
613, 613, 617, 617, 617, 617, 617, 617, 617, 617,
617, 617, 617, 614, 614, 614, 614, 612, 612, 612,
612, 612, 612, 612, 615, 615, 616, 616, 618, 618,
618, 618, 618, 618, 618, 618, 618, 618, 615, 615,
615, 615, 615, 615, 615, 615, 615, 615, 612, 612,
612, 612, 612, 612, 613, 613, 613, 617, 617, 609,
617, 617, 617, 617, 617, 617, 617, 617, 614, 614,
614, 614, 612, 612, 612, 612, 612, 612, 612, 615,
615, 616, 616, 618, 618, 618, 618, 618, 618, 618,
618, 618, 615, 615, 609, 609, 609, 615, 615, 615,
615, 609, 612, 612, 612, 609, 612, 612, 613, 613,
613, 617, 617, 617, 617, 617, 617, 617, 617, 617,
617, 614, 614, 614, 614, 609, 612, 612, 612, 612,
612, 612, 612, 615, 615, 616, 616, 618, 618, 618,
618, 618, 618, 618, 618, 618, 615, 609, 615, 615,
615, 615, 615, 612, 612, 612, 609, 612, 613, 613,
613, 617, 617, 617, 617, 617, 617, 617, 617, 617,
617, 614, 614, 614, 614, 612, 612, 612, 612, 612,
612, 609, 615, 616, 616, 618, 618, 618, 618, 618,
618, 618, 618, 618, 615, 615, 615, 615, 615, 615,
612, 612, 612, 612, 613, 613, 613, 617, 617, 609,
617, 617, 617, 617, 617, 609, 617, 614, 614, 614,
612, 612, 612, 612, 612, 612, 615, 616, 616, 618,
618, 618, 618, 618, 618, 618, 609, 615, 615, 615,
615, 615, 612, 612, 609, 613, 613, 617, 617, 617,
617, 617, 71, 617, 617, 614, 614, 614, 612, 612,
609, 612, 612, 612, 615, 616, 618, 618, 618, 618,
618, 618, 618, 615, 615, 615, 615, 609, 612, 613,
613, 617, 609, 617, 617, 617, 617, 617, 614, 614,
612, 609, 612, 609, 612, 615, 616, 618, 618, 618,
618, 618, 618, 615, 615, 612, 613, 617, 617, 617,
609, 617, 617, 614, 614, 612, 609, 612, 615, 616,
618, 618, 618, 618, 618, 615, 612, 613, 609, 617,
617, 617, 609, 614, 609, 612, 609, 615, 616, 618,
618, 618, 612, 613, 71, 609, 617, 614, 612, 615,
616, 88, 618, 612, 613, 617, 617, 614, 612, 615,
616, 618, 618, 612, 613, 617, 617, 614, 612, 615,
616, 618, 618, 609, 613, 617, 617, 614, 609, 616,
618, 618, 613, 617, 609, 616, 618, 609, 0, 609,
609, 609, 609, 609, 609, 609, 609, 609
} ;
static yyconst short int yy_nxt[1634] =
{ 0,
47, 7, 8, 9, 10, 48, 11, 12, 12, 36,
37, 39, 28, 28, 40, 48, 38, 41, 41, 28,
36, 52, 48, 42, 42, 42, 28, 58, 13, 48,
48, 43, 14, 7, 8, 9, 10, 42, 11, 12,
12, 48, 44, 49, 45, 50, 48, 46, 28, 57,
48, 53, 53, 55, 54, 54, 54, 60, 48, 28,
13, 56, 28, 59, 14, 16, 17, 18, 54, 28,
19, 20, 20, 28, 36, 69, 61, 28, 28, 64,
39, 28, 21, 40, 22, 23, 66, 67, 28, 62,
24, 25, 65, 28, 48, 63, 26, 16, 17, 18,
29, 28, 19, 20, 20, 39, 68, 79, 40, 31,
40, 33, 80, 48, 21, 81, 22, 23, 96, 82,
83, 28, 24, 25, 76, 42, 42, 42, 26, 28,
48, 48, 28, 77, 48, 78, 42, 42, 42, 42,
48, 49, 27, 50, 36, 86, 48, 48, 29, 85,
42, 54, 54, 54, 48, 30, 97, 31, 32, 33,
34, 36, 71, 48, 84, 54, 48, 93, 48, 48,
54, 54, 54, 95, 28, 94, 28, 28, 28, 28,
72, 73, 28, 28, 54, 28, 36, 69, 36, 71,
74, 582, 75, 36, 88, 576, 98, 106, 100, 99,
101, 36, 71, 36, 71, 102, 107, 28, 103, 104,
105, 162, 89, 90, 48, 108, 131, 109, 36, 71,
39, 28, 91, 40, 92, 36, 71, 36, 71, 116,
48, 126, 48, 110, 118, 111, 148, 39, 48, 112,
40, 117, 121, 48, 39, 113, 119, 40, 48, 125,
28, 441, 114, 421, 74, 28, 115, 36, 86, 120,
146, 127, 123, 132, 36, 88, 48, 122, 39, 133,
156, 40, 36, 88, 128, 36, 88, 36, 88, 129,
130, 147, 124, 36, 88, 28, 134, 76, 135, 28,
149, 442, 48, 48, 48, 142, 77, 28, 78, 36,
88, 39, 144, 141, 40, 152, 157, 136, 143, 137,
150, 151, 159, 138, 161, 145, 48, 28, 153, 28,
36, 69, 39, 154, 155, 40, 139, 178, 91, 476,
140, 158, 40, 160, 36, 69, 36, 69, 36, 71,
205, 36, 71, 163, 36, 71, 36, 71, 36, 71,
28, 36, 71, 166, 168, 165, 181, 36, 71, 36,
71, 36, 71, 169, 182, 164, 36, 71, 28, 170,
119, 167, 36, 71, 28, 39, 171, 172, 40, 39,
28, 28, 40, 28, 173, 28, 174, 48, 48, 48,
185, 48, 183, 175, 184, 36, 86, 28, 176, 36,
86, 186, 177, 48, 187, 190, 179, 36, 88, 203,
180, 36, 88, 188, 189, 36, 88, 48, 192, 36,
88, 204, 193, 48, 195, 48, 191, 36, 88, 36,
88, 36, 88, 48, 196, 36, 88, 36, 88, 209,
194, 36, 88, 206, 48, 48, 144, 197, 207, 198,
48, 48, 28, 28, 208, 210, 199, 28, 28, 28,
28, 39, 36, 69, 40, 211, 48, 200, 28, 201,
28, 202, 212, 213, 218, 609, 214, 216, 215, 36,
69, 36, 69, 237, 217, 28, 36, 71, 219, 220,
36, 71, 36, 71, 36, 71, 36, 71, 36, 71,
270, 225, 28, 36, 71, 36, 71, 36, 71, 36,
71, 221, 223, 222, 28, 224, 238, 226, 36, 71,
36, 71, 240, 174, 28, 227, 228, 230, 39, 39,
229, 40, 40, 239, 39, 231, 232, 40, 28, 28,
28, 48, 28, 48, 609, 234, 36, 86, 233, 48,
241, 236, 609, 242, 244, 609, 235, 246, 297, 245,
36, 86, 36, 88, 36, 88, 243, 36, 88, 48,
36, 88, 36, 88, 36, 88, 251, 259, 247, 36,
88, 36, 88, 36, 88, 36, 88, 48, 249, 250,
48, 48, 248, 252, 48, 48, 48, 254, 48, 253,
260, 257, 28, 28, 255, 48, 28, 28, 28, 256,
28, 261, 609, 258, 264, 423, 268, 262, 263, 609,
266, 265, 39, 267, 271, 40, 272, 36, 69, 269,
274, 36, 69, 273, 36, 69, 291, 36, 71, 36,
71, 280, 71, 36, 71, 275, 36, 71, 36, 71,
36, 71, 277, 36, 71, 36, 71, 36, 71, 276,
278, 36, 71, 39, 279, 39, 40, 281, 40, 284,
28, 28, 286, 283, 282, 285, 287, 39, 28, 28,
40, 288, 289, 290, 28, 28, 48, 48, 36, 86,
48, 293, 36, 86, 292, 609, 295, 296, 294, 36,
88, 36, 88, 300, 313, 299, 280, 88, 36, 88,
303, 36, 88, 36, 88, 48, 302, 301, 298, 48,
36, 88, 304, 48, 36, 88, 305, 36, 88, 306,
36, 88, 315, 48, 316, 48, 317, 48, 308, 309,
48, 318, 307, 310, 48, 311, 314, 322, 48, 321,
28, 312, 28, 28, 326, 28, 28, 28, 319, 28,
320, 36, 69, 36, 69, 36, 69, 36, 71, 28,
328, 348, 36, 71, 325, 609, 323, 324, 327, 609,
331, 329, 330, 333, 36, 71, 36, 71, 36, 71,
36, 71, 332, 36, 71, 347, 36, 71, 36, 71,
36, 71, 39, 28, 39, 40, 334, 40, 337, 39,
346, 28, 40, 336, 339, 28, 28, 39, 335, 341,
40, 338, 28, 48, 48, 48, 343, 36, 86, 340,
351, 342, 344, 609, 353, 36, 86, 609, 349, 36,
88, 48, 357, 352, 609, 354, 355, 48, 345, 36,
88, 36, 88, 369, 356, 367, 350, 36, 88, 48,
359, 36, 88, 370, 358, 36, 88, 36, 88, 36,
88, 36, 88, 360, 368, 48, 48, 28, 28, 28,
28, 371, 28, 363, 28, 364, 362, 373, 39, 361,
366, 40, 375, 377, 28, 36, 69, 36, 69, 444,
365, 36, 69, 372, 36, 71, 36, 71, 374, 515,
376, 378, 36, 71, 392, 380, 36, 71, 36, 71,
28, 383, 28, 379, 36, 71, 28, 36, 71, 36,
71, 385, 381, 36, 71, 28, 398, 386, 36, 71,
382, 28, 39, 48, 384, 40, 39, 39, 397, 40,
40, 396, 389, 387, 388, 390, 391, 399, 28, 402,
28, 377, 48, 609, 393, 400, 48, 394, 395, 36,
86, 447, 401, 28, 403, 36, 86, 36, 88, 36,
88, 48, 36, 88, 36, 88, 48, 404, 36, 88,
36, 88, 36, 88, 407, 36, 88, 48, 48, 409,
36, 88, 415, 48, 422, 609, 405, 410, 416, 48,
28, 417, 28, 406, 408, 412, 609, 413, 414, 411,
418, 36, 69, 420, 36, 69, 484, 419, 424, 36,
69, 36, 71, 36, 71, 430, 71, 36, 71, 36,
71, 28, 428, 36, 71, 36, 71, 426, 425, 36,
71, 427, 436, 71, 36, 71, 28, 432, 433, 429,
39, 28, 39, 40, 431, 40, 377, 39, 39, 443,
40, 40, 36, 86, 36, 86, 609, 434, 36, 88,
48, 435, 48, 437, 48, 446, 36, 88, 445, 450,
48, 438, 609, 439, 48, 448, 449, 460, 440, 430,
88, 36, 88, 36, 88, 36, 88, 36, 88, 436,
88, 461, 451, 36, 88, 457, 48, 28, 458, 462,
454, 453, 459, 28, 28, 465, 28, 609, 452, 36,
69, 36, 69, 436, 69, 609, 29, 36, 71, 455,
609, 463, 456, 36, 71, 31, 28, 33, 36, 71,
464, 28, 468, 36, 71, 36, 71, 36, 473, 36,
71, 466, 469, 467, 480, 474, 470, 39, 36, 71,
40, 39, 477, 28, 40, 28, 481, 28, 36, 86,
483, 48, 471, 475, 436, 86, 609, 472, 48, 36,
88, 609, 478, 48, 29, 48, 36, 88, 36, 88,
36, 88, 48, 31, 482, 479, 494, 485, 488, 497,
486, 487, 36, 88, 36, 88, 489, 36, 88, 28,
492, 481, 48, 609, 495, 498, 28, 36, 500, 490,
609, 496, 493, 36, 69, 36, 71, 499, 609, 501,
503, 71, 36, 71, 491, 36, 71, 36, 71, 36,
71, 36, 71, 28, 48, 39, 39, 504, 40, 40,
505, 502, 39, 512, 28, 40, 28, 514, 28, 506,
609, 511, 516, 36, 86, 76, 507, 36, 88, 517,
28, 509, 28, 508, 77, 48, 78, 513, 48, 510,
503, 88, 36, 88, 36, 88, 36, 88, 36, 88,
36, 88, 609, 518, 512, 48, 524, 519, 48, 520,
514, 48, 538, 525, 526, 36, 69, 28, 521, 48,
36, 69, 36, 71, 28, 522, 36, 71, 36, 71,
531, 71, 523, 36, 71, 107, 36, 71, 546, 39,
39, 528, 40, 40, 108, 28, 109, 527, 536, 537,
28, 563, 532, 539, 36, 86, 529, 534, 533, 28,
530, 36, 88, 36, 88, 36, 88, 531, 88, 36,
88, 574, 36, 88, 535, 537, 48, 28, 547, 28,
541, 540, 36, 69, 549, 71, 36, 71, 544, 36,
71, 36, 71, 542, 545, 553, 71, 543, 28, 39,
48, 548, 40, 579, 550, 555, 39, 557, 28, 40,
584, 551, 36, 86, 609, 161, 609, 556, 609, 558,
549, 88, 36, 88, 36, 88, 552, 36, 88, 553,
88, 559, 28, 554, 557, 48, 36, 69, 36, 565,
560, 566, 71, 36, 71, 39, 561, 48, 40, 36,
86, 36, 572, 566, 88, 36, 88, 36, 69, 569,
36, 71, 562, 567, 568, 39, 28, 48, 40, 36,
86, 564, 36, 88, 570, 573, 48, 575, 36, 69,
36, 71, 36, 71, 571, 36, 88, 39, 577, 581,
40, 609, 578, 580, 36, 86, 609, 589, 36, 88,
583, 594, 28, 170, 36, 69, 585, 590, 586, 587,
36, 71, 593, 588, 36, 71, 39, 599, 28, 40,
594, 48, 591, 36, 86, 609, 592, 36, 88, 36,
88, 595, 36, 69, 36, 71, 609, 596, 605, 71,
594, 39, 36, 86, 40, 609, 597, 598, 36, 88,
600, 605, 88, 609, 601, 605, 69, 608, 71, 605,
86, 602, 608, 88, 603, 609, 604, 609, 609, 609,
609, 609, 609, 609, 606, 609, 609, 609, 609, 609,
607, 6, 6, 15, 15, 35, 35, 51, 51, 70,
70, 87, 87, 5, 609, 609, 609, 609, 609, 609,
609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
609, 609, 609
} ;
static yyconst short int yy_chk[1634] =
{ 0,
615, 1, 1, 1, 1, 23, 1, 1, 1, 9,
9, 10, 11, 13, 10, 17, 614, 11, 11, 12,
18, 18, 22, 12, 12, 12, 14, 23, 1, 21,
25, 13, 1, 2, 2, 2, 2, 12, 2, 2,
2, 24, 14, 17, 14, 17, 19, 14, 30, 22,
20, 19, 19, 21, 20, 20, 20, 25, 26, 32,
2, 21, 31, 24, 2, 3, 3, 3, 20, 33,
3, 3, 3, 29, 35, 35, 26, 34, 43, 30,
38, 28, 3, 38, 3, 3, 32, 33, 45, 26,
3, 3, 31, 46, 58, 29, 3, 4, 4, 4,
28, 44, 4, 4, 4, 39, 34, 40, 39, 28,
40, 28, 43, 48, 4, 44, 4, 4, 58, 45,
46, 41, 4, 4, 39, 41, 41, 41, 4, 8,
59, 50, 42, 39, 49, 39, 42, 42, 42, 41,
55, 48, 612, 48, 51, 51, 56, 53, 8, 50,
42, 53, 53, 53, 57, 8, 59, 8, 8, 8,
8, 37, 37, 60, 49, 53, 54, 55, 61, 62,
54, 54, 54, 57, 63, 56, 64, 65, 66, 67,
37, 37, 83, 68, 54, 106, 69, 69, 70, 70,
37, 572, 37, 52, 52, 565, 60, 68, 62, 61,
63, 72, 72, 74, 74, 64, 69, 81, 65, 66,
67, 106, 52, 52, 95, 69, 83, 69, 73, 73,
76, 80, 52, 76, 52, 71, 71, 75, 75, 72,
93, 81, 84, 71, 74, 71, 95, 77, 85, 71,
77, 73, 76, 100, 78, 71, 75, 78, 94, 80,
82, 396, 71, 374, 71, 397, 71, 86, 86, 75,
93, 82, 78, 84, 87, 87, 96, 77, 79, 85,
100, 79, 90, 90, 82, 89, 89, 91, 91, 82,
82, 94, 79, 92, 92, 103, 86, 79, 86, 101,
96, 397, 97, 98, 99, 90, 79, 105, 79, 88,
88, 121, 92, 89, 121, 99, 101, 88, 91, 88,
97, 98, 103, 88, 105, 92, 148, 102, 99, 104,
107, 107, 124, 99, 99, 124, 88, 121, 88, 438,
88, 102, 438, 104, 108, 108, 109, 109, 110, 110,
148, 111, 111, 107, 112, 112, 113, 113, 114, 114,
125, 115, 115, 110, 111, 109, 124, 116, 116, 117,
117, 118, 118, 112, 125, 108, 119, 119, 128, 113,
115, 110, 120, 120, 126, 122, 114, 116, 122, 123,
127, 129, 123, 130, 117, 131, 117, 132, 133, 47,
128, 146, 126, 118, 127, 134, 134, 27, 119, 135,
135, 129, 120, 147, 130, 133, 122, 136, 136, 146,
123, 137, 137, 131, 132, 138, 138, 150, 135, 139,
139, 147, 136, 151, 137, 152, 134, 140, 140, 141,
141, 142, 142, 153, 138, 143, 143, 144, 144, 152,
136, 145, 145, 149, 149, 154, 140, 139, 150, 141,
156, 155, 158, 160, 151, 153, 142, 157, 162, 159,
161, 181, 163, 163, 181, 154, 15, 143, 6, 144,
215, 145, 155, 156, 161, 5, 157, 159, 158, 164,
164, 165, 165, 181, 160, 182, 166, 166, 162, 163,
167, 167, 168, 168, 169, 169, 170, 170, 171, 171,
215, 168, 184, 172, 172, 173, 173, 175, 175, 174,
174, 164, 166, 165, 183, 167, 182, 169, 176, 176,
177, 177, 184, 170, 185, 171, 172, 174, 178, 179,
173, 178, 179, 183, 180, 175, 176, 180, 186, 187,
188, 189, 242, 190, 0, 178, 191, 191, 177, 203,
185, 180, 0, 186, 188, 0, 179, 190, 242, 189,
192, 192, 193, 193, 194, 194, 187, 195, 195, 204,
196, 196, 197, 197, 198, 198, 195, 203, 191, 199,
199, 200, 200, 201, 201, 202, 202, 205, 193, 194,
207, 208, 192, 196, 209, 210, 212, 198, 213, 197,
204, 201, 214, 218, 199, 211, 219, 216, 217, 200,
376, 205, 0, 202, 209, 376, 213, 207, 208, 0,
211, 210, 236, 212, 216, 236, 217, 220, 220, 214,
219, 221, 221, 218, 222, 222, 236, 223, 223, 224,
224, 225, 225, 227, 227, 220, 226, 226, 228, 228,
229, 229, 222, 231, 231, 230, 230, 233, 233, 221,
223, 232, 232, 234, 224, 235, 234, 226, 235, 229,
238, 239, 231, 228, 227, 230, 232, 237, 240, 241,
237, 233, 234, 235, 243, 244, 245, 246, 247, 247,
259, 238, 248, 248, 237, 0, 240, 241, 239, 249,
249, 250, 250, 245, 259, 244, 251, 251, 252, 252,
248, 253, 253, 254, 254, 267, 247, 246, 243, 260,
255, 255, 249, 264, 256, 256, 250, 258, 258, 252,
257, 257, 261, 261, 262, 262, 263, 263, 254, 255,
265, 264, 253, 256, 266, 257, 260, 268, 268, 267,
269, 258, 271, 270, 272, 272, 274, 273, 265, 295,
266, 275, 275, 276, 276, 277, 277, 278, 278, 294,
274, 295, 279, 279, 271, 0, 269, 270, 273, 0,
277, 275, 276, 279, 281, 281, 282, 282, 283, 283,
284, 284, 278, 285, 285, 294, 286, 286, 287, 287,
288, 288, 291, 297, 289, 291, 281, 289, 284, 290,
293, 293, 290, 283, 286, 298, 299, 292, 282, 288,
292, 285, 296, 300, 313, 301, 290, 303, 303, 287,
297, 289, 291, 0, 299, 302, 302, 0, 296, 304,
304, 318, 303, 298, 0, 300, 301, 319, 292, 305,
305, 306, 306, 318, 302, 313, 296, 307, 307, 321,
305, 308, 308, 319, 304, 309, 309, 310, 310, 311,
311, 312, 312, 306, 314, 314, 320, 323, 324, 325,
328, 319, 399, 309, 484, 310, 308, 321, 342, 307,
312, 342, 324, 327, 327, 329, 329, 330, 330, 399,
311, 331, 331, 320, 332, 332, 333, 333, 323, 484,
325, 328, 334, 334, 342, 330, 335, 335, 336, 336,
347, 333, 349, 329, 337, 337, 348, 338, 338, 339,
339, 335, 331, 340, 340, 350, 349, 336, 341, 341,
332, 351, 343, 354, 334, 343, 344, 345, 348, 344,
345, 347, 339, 337, 338, 340, 341, 350, 352, 353,
353, 355, 355, 0, 343, 351, 403, 344, 345, 356,
356, 403, 352, 375, 354, 357, 357, 358, 358, 359,
359, 367, 360, 360, 361, 361, 369, 356, 362, 362,
363, 363, 364, 364, 359, 365, 365, 370, 371, 361,
366, 366, 367, 372, 375, 0, 357, 362, 369, 373,
378, 370, 446, 358, 360, 364, 0, 365, 366, 363,
371, 379, 379, 373, 380, 380, 446, 372, 378, 381,
381, 382, 382, 383, 383, 384, 384, 385, 385, 386,
386, 398, 382, 387, 387, 388, 388, 380, 379, 389,
389, 381, 390, 390, 391, 391, 401, 386, 387, 383,
392, 400, 393, 392, 385, 393, 394, 394, 395, 398,
394, 395, 404, 404, 405, 405, 0, 388, 406, 406,
418, 389, 416, 391, 419, 401, 407, 407, 400, 406,
420, 392, 0, 393, 417, 404, 405, 418, 395, 408,
408, 409, 409, 410, 410, 411, 411, 412, 412, 413,
413, 419, 407, 414, 414, 415, 415, 421, 416, 420,
411, 410, 417, 422, 423, 424, 424, 0, 409, 425,
425, 426, 426, 427, 427, 0, 421, 428, 428, 412,
0, 422, 414, 429, 429, 421, 442, 421, 431, 431,
423, 445, 428, 432, 432, 433, 433, 434, 434, 435,
435, 425, 429, 426, 442, 435, 431, 439, 437, 437,
439, 440, 439, 444, 440, 441, 443, 443, 448, 448,
445, 447, 432, 437, 449, 449, 0, 433, 458, 451,
451, 0, 440, 460, 441, 462, 450, 450, 452, 452,
453, 453, 461, 441, 444, 441, 458, 447, 451, 462,
448, 450, 454, 454, 455, 455, 452, 456, 456, 464,
455, 459, 459, 0, 460, 463, 463, 466, 466, 453,
0, 461, 456, 467, 467, 468, 468, 464, 0, 467,
469, 469, 470, 470, 454, 471, 471, 472, 472, 474,
474, 475, 475, 479, 485, 477, 476, 470, 477, 476,
471, 468, 478, 480, 480, 478, 482, 483, 483, 472,
0, 479, 485, 486, 486, 476, 474, 487, 487, 486,
499, 477, 515, 475, 476, 495, 476, 482, 497, 478,
488, 488, 489, 489, 490, 490, 491, 491, 492, 492,
493, 493, 0, 487, 494, 494, 495, 489, 525, 490,
496, 496, 515, 497, 499, 500, 500, 511, 491, 516,
501, 501, 502, 502, 547, 492, 504, 504, 505, 505,
506, 506, 493, 507, 507, 500, 508, 508, 525, 509,
510, 502, 509, 510, 500, 563, 500, 501, 511, 513,
513, 547, 507, 516, 517, 517, 504, 509, 508, 526,
505, 518, 518, 519, 519, 520, 520, 521, 521, 522,
522, 563, 523, 523, 510, 524, 524, 569, 526, 574,
518, 517, 527, 527, 528, 528, 529, 529, 522, 530,
530, 532, 532, 519, 523, 533, 533, 520, 536, 534,
539, 527, 534, 569, 529, 535, 535, 538, 538, 535,
574, 530, 540, 540, 0, 536, 0, 536, 0, 539,
541, 541, 542, 542, 543, 543, 532, 544, 544, 545,
545, 540, 556, 534, 546, 546, 548, 548, 550, 550,
542, 551, 551, 552, 552, 554, 543, 558, 554, 559,
559, 560, 560, 561, 561, 562, 562, 564, 564, 556,
567, 567, 544, 552, 554, 568, 579, 570, 568, 571,
571, 548, 573, 573, 558, 562, 580, 564, 575, 575,
576, 576, 577, 577, 559, 583, 583, 578, 567, 571,
578, 0, 568, 570, 581, 581, 0, 579, 582, 582,
573, 584, 584, 576, 585, 585, 575, 580, 576, 577,
586, 586, 583, 578, 587, 587, 588, 589, 589, 588,
590, 590, 581, 591, 591, 0, 582, 592, 592, 593,
593, 585, 595, 595, 596, 596, 0, 586, 597, 597,
598, 598, 600, 600, 598, 0, 587, 588, 601, 601,
591, 602, 602, 0, 592, 603, 603, 604, 604, 606,
606, 593, 607, 607, 595, 0, 596, 0, 0, 0,
0, 0, 0, 0, 600, 0, 0, 0, 0, 0,
601, 610, 610, 611, 611, 613, 613, 616, 616, 617,
617, 618, 618, 609, 609, 609, 609, 609, 609, 609,
609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
609, 609, 609
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
/* 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() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#define INITIAL 0
/*
makeedit.l : This file is part of pstoedit
Simple parser to parse the intermediate flat PostScript and call the backend
output routines.
Copyright (C) 1993,1994,1995,1996 Wolfgang Glunz, Wolfgang.Glunz@zfe.siemens.de
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// #include <stdio.h>
#include <iostream.h>
//#if !defined(unix) && !defined(__unix__) && !defined(__unix)
//#include <strstrea.h>
//#else
//#include <strstream.h>
//#endif
#include <fstream.h>
#include <string.h>
#include "drvbase.h"
static float origx, origy;
static char *start_of_text;
static char *end_of_text;
static float number;
#define YY_SKIP_YYWRAP
static int yywrap() { return 1;}
#define YY_NEVER_INTERACTIVE 1
// to avoid usage of isatty
#define YY_NO_UNPUT
// to avoid compiler warning
// define YY_DECL int yylex YY_PROTO(( *outputdriver ))
#define YY_DECL int drvbase::yylex()
static non_standard_font = 0;
#define READPATH 1
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif
#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#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
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#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 ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "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) yy_fatal_error( msg )
#endif
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#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 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 ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! yy_current_buffer )
yy_current_buffer =
yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
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 = 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 >= 610 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 1594 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
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
{
// Work around for Linux libg++ bug
number = (float) atof(yytext);
// Original
// istrstream s(yytext);
// s >> number;
addNumber(number * get_scale());
}
YY_BREAK
case 2:
YY_RULE_SETUP
{
dumpPath(); // dump last path
if (!page_empty) {
close_page();
}
page_empty = 1;
}
YY_BREAK
case 3:
YY_RULE_SETUP
{
if (numberOfElementsInPath() != 0) {
errf << "Error, path number " << pathnumber << " was not cleared correctly" << endl;
}
pathnumber++;
BEGIN(READPATH);
currentPath->isPolygon=false;
currentPath->nr=pathnumber;
}
YY_BREAK
case 4:
YY_RULE_SETUP
{
/* /Helvetica findfont 14 scalefont setfont */
if (!non_standard_font) {
// in the case of a non standard font, the setCurrentFontName was
// done during handling of nonstandard font
start_of_text = strchr (yytext,(int)'/') + 1 ;
end_of_text = strchr (yytext,(int)' ') ;
if (end_of_text) *end_of_text = (char) 0;
setCurrentFontName(start_of_text,0);
}
non_standard_font = 0; // reset
}
YY_BREAK
case 5:
YY_RULE_SETUP
{
/* fprintf(stderr,"%s\n",yytext); */
start_of_text = yytext+2;
end_of_text = strrchr (yytext,(int)' ') ;
if (end_of_text) *end_of_text = (char) 0;
setCurrentFontFamilyName(start_of_text);
}
YY_BREAK
case 6:
YY_RULE_SETUP
{
/* fprintf(stderr,"%s\n",yytext); */
start_of_text = yytext+2;
end_of_text = strrchr (yytext,(int)' ') ;
if (end_of_text) *end_of_text = (char) 0;
setCurrentFontFullName(start_of_text);
}
YY_BREAK
case 7:
YY_RULE_SETUP
{
/* fprintf(stderr,"%s\n",yytext); */
start_of_text = yytext+2;
end_of_text = strrchr (yytext,(int)' ') ;
if (end_of_text) *end_of_text = (char) 0;
setCurrentFontWeight(start_of_text);
}
YY_BREAK
case 8:
YY_RULE_SETUP
{
}
YY_BREAK
case 9:
YY_RULE_SETUP
{
/* % Times-Roman Times-Roman@0 nonstandard font */
/* % Bla Bla nonstandard font */ /* if it is not derived from a standard font */
start_of_text = yytext+2;
end_of_text = strchr (start_of_text,(int)' ') ;
if (end_of_text) *end_of_text = (char) 0;
char *start_of_secondname = end_of_text +1;
char *end_of_secondname = strchr (start_of_secondname,(int)' ') ;
if (end_of_secondname) *end_of_secondname = (char) 0;
non_standard_font = 1; // this avoids a further setting of CurrentFontName
if (strcmp(start_of_text,start_of_secondname) == 0 ) {
// both names are equal, so it's not a derived font
setCurrentFontName(start_of_text,1);
} else {
// it's a derived font, so use the base name
setCurrentFontName(start_of_text,0);
}
}
YY_BREAK
case 10:
YY_RULE_SETUP
{
setCurrentShowType(drvbase::eofill);
}
YY_BREAK
case 11:
YY_RULE_SETUP
{
setCurrentShowType(drvbase::fill);
}
YY_BREAK
case 12:
YY_RULE_SETUP
{
setCurrentShowType(drvbase::stroke);
}
YY_BREAK
case 13:
YY_RULE_SETUP
{
errf << yytext;
}
YY_BREAK
case 14:
YY_RULE_SETUP
{ }
YY_BREAK
case 15:
YY_RULE_SETUP
{
// setCurrentFontSize(number * get_scale());
setCurrentFontSize(pop());
// pop();
}
YY_BREAK
case 16:
YY_RULE_SETUP
{
float B = pop() / get_scale();
float G = pop() / get_scale();
float R = pop() / get_scale();
/* printf("%s %f %f %f\n","setting RGB to ",R,G,B); */
setRGB(R,G,B);
}
YY_BREAK
case 17:
YY_RULE_SETUP
{
yytext[strlen(yytext) -9] = '\0'; // strip of trailing setdash
setDash(yytext+1); // don't copy leading space
}
YY_BREAK
case 18:
YY_RULE_SETUP
{
setCurrentLineCap((int) (number +0.5));
pop();
}
YY_BREAK
case 19:
YY_RULE_SETUP
{
setCurrentLineWidth(pop() );
// setCurrentLineWidth(number * get_scale() );
// pop();
}
YY_BREAK
case 20:
YY_RULE_SETUP
{
float height = pop();
if (height < 1.0 ) { height = 792 * get_scale() ; }
setCurrentDeviceHeight(height);
float width = pop();
if (width < 1.0 ) { width = 612 * get_scale() ; }
setCurrentDeviceWidth(width);
}
YY_BREAK
case 21:
YY_RULE_SETUP
{
const float ay = pop();
const float ax = pop();
const int Char = (int) (pop() / get_scale() +0.5);
const float cy = pop();
const float cx = pop();
setCurrentWidthParams(ax,ay,Char,cx,cy);
}
YY_BREAK
case 22:
YY_RULE_SETUP
{
start_of_text = strchr (yytext,(int)'(') + 1 ;
end_of_text = strrchr (yytext,(int)')') ;
if (end_of_text) *end_of_text = (char) 0;
dumpText(start_of_text);
}
YY_BREAK
case 23:
YY_RULE_SETUP
{
setCurrentFontAngle(number);
pop();
}
YY_BREAK
case 24:
YY_RULE_SETUP
{
/* Because this is in the preamble, only pop
this has put something on the stack. */
if (nextFreeNumber >= 2)
{ pop(); pop(); }
}
YY_BREAK
case 25:
YY_RULE_SETUP
{
/* Because this is in the preamble, only pop
this has put something on the stack. */
if (nextFreeNumber >= 2)
{ pop(); pop(); }
}
YY_BREAK
case 26:
YY_RULE_SETUP
{ /* ignore any other stuff */ }
YY_BREAK
case 27:
YY_RULE_SETUP
{
// save coordinates for possible closepath
origy = pop();
origx = pop();
if (numberOfElementsInPath() > 1) {
// this is an intermediate moveto
// if backend supports subpaths add it
// else dump last path and start a new one
if (backendSupportsSubPathes) {
Point p(origx,origy);
addtopath(new Moveto(&p)); // pass p as array
} else {
// dumppath
dumpPath();
// start new path
Point p(origx,origy);
addtopath(new Moveto(&p)); // pass p as array
}
} else {
// it is a starting moveto
Point p(origx,origy);
addtopath(new Moveto(&p)); // pass p as array
}
}
YY_BREAK
case 28:
YY_RULE_SETUP
{
float y = pop();
float x = pop();
Point p(x,y);
addtopath(new Lineto(&p)); // pass p as array
}
YY_BREAK
case 29:
YY_RULE_SETUP
{
if (!backendSupportsCurveto) {
errf << "illegal input received. curveto not expected by this backend\n";
exit(1);
}
Point p[3];
for (int i = 0; i < 3; i++) {
float y = pop();
float x = pop();
p[i] = Point(x,y);
}
addtopath(new Curveto(p)); // pass p as array
}
YY_BREAK
case 30:
YY_RULE_SETUP
{
Point startPoint(origx,origy);
const basedrawingelement & lastelem = pathElement(numberOfElementsInPath() -1 );
// check for last == first. Then no additional
// lineto is needed. and isPolygon can be set to true
if ( (lastelem.getType() == lineto) && (lastelem.getPoint(0) == startPoint) ) {
// no need to close the path, it's already closed
} else {
if (backendSupportsSubPathes) {
addtopath(new Closepath(0));
} else {
addtopath(new Lineto(&startPoint)); // pass p as array
}
}
currentPath->isPolygon=true;
/* show is done by next stroke, fill or moveto */
}
YY_BREAK
case 31:
YY_RULE_SETUP
{
BEGIN(INITIAL);
dumpPath();
};
YY_BREAK
case 32:
YY_RULE_SETUP
{
BEGIN(INITIAL);
dumpPath();
};
YY_BREAK
case 33:
YY_RULE_SETUP
{
BEGIN(INITIAL);
dumpPath();
};
YY_BREAK
case 34:
YY_RULE_SETUP
{}
YY_BREAK
case 35:
YY_RULE_SETUP
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(READPATH):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB 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_input_file = yyin;
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_c_buf_p;
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(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of yylex */
/* 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
*/
static int yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register 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(
"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_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(
"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 = (char *)
/* Include room in for 2 EOB chars. */
yy_flex_realloc( (void *) b->yy_ch_buf,
b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
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 );
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart( yyin );
}
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 char was reached */
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register 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 = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 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 >= 610 )
yy_c = 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 );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register 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 >= 610 )
yy_c = 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 == 609);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
{
register 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 char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register 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_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
}
#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
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 = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
{
yy_c_buf_p = yytext_ptr + offset;
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;
case EOB_ACT_LAST_MATCH:
#ifdef __cplusplus
YY_FATAL_ERROR(
"unexpected last match in yyinput()" );
#else
YY_FATAL_ERROR(
"unexpected last match in input()" );
#endif
}
}
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
*yy_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
if ( ! yy_current_buffer )
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
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;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->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.
*/
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer( b, file );
return b;
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
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 );
}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
#if YY_ALWAYS_INTERACTIVE
b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
}
#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif
{
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
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = 0;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer( b );
return b;
}
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *str )
#else
YY_BUFFER_STATE yy_scan_string( str )
yyconst char *str;
#endif
{
int len;
for ( len = 0; str[len]; ++len )
;
return yy_scan_bytes( str, len );
}
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < len; ++i )
buf[i] = bytes[i];
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
{
if ( yy_start_stack_ptr >= yy_start_stack_depth )
{
yy_size_t new_size;
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, new_size );
if ( ! yy_start_stack )
YY_FATAL_ERROR(
"out of memory expanding start-condition stack" );
}
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yy_start_stack[yy_start_stack_ptr]);
}
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
#endif
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* 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( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst 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 char *s )
#else
static int yy_flex_strlen( s )
yyconst 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
{
return (void *) malloc( size );
}
#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
{
/* The cast to (char *) in the following accommodates both
* implementations that use 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.
*/
return (void *) realloc( (char *) ptr, size );
}
#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
{
free( (char *) ptr );
/* see above note in yy_flex_realloc regarding cast */
}
#if YY_MAIN
int main()
{
yylex();
return 0;
}
#endif
void drvbase::yylexcleanup()
{
// if (yy_state_buf) yy_flex_free(yy_state_buf);
yy_delete_buffer( yy_current_buffer );
}