/* 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 $ */ #define FLEX_SCANNER #define VRD_Y__FLEX_MAJOR_VERSION 2 #define VRD_Y__FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include /* Use prototypes in function declarations. */ #define VRD_Y__USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define VRD_Y__USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define VRD_Y__USE_PROTOS #define VRD_Y__USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define VRD_Y__USE_CONST #define VRD_Y__USE_PROTOS #endif #ifdef VRD_Y__USE_CONST #define vrd_y_const const #else #define vrd_y_const #endif #ifdef VRD_Y__USE_PROTOS #define VRD_Y__PROTO(proto) proto #else #define VRD_Y__PROTO(proto) () #endif /* Returned upon end-of-file. */ #define VRD_Y__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 VRD_Y__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 vrd_y__start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The VRD_Y_STATE alias is for lex * compatibility. */ #define VRD_Y__START ((vrd_y__start - 1) / 2) #define VRD_Y_STATE VRD_Y__START /* Action number for EOF rule of a given start state. */ #define VRD_Y__STATE_EOF(state) (VRD_Y__END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define VRD_Y__NEW_FILE vrd_y_restart( vrd_y_in ) #define VRD_Y__END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define VRD_Y__BUF_SIZE 16384 typedef struct vrd_y__buffer_state *VRD_Y__BUFFER_STATE; extern int vrd_y_leng; extern FILE *vrd_y_in, *vrd_y_out; #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 ) * vrd_y_less( 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 vrd_y_less() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define vrd_y_less(n) \ do \ { \ /* Undo effects of setting up vrd_y_text. */ \ *vrd_y__cp = vrd_y__hold_char; \ VRD_Y__RESTORE_VRD_Y__MORE_OFFSET \ vrd_y__c_buf_p = vrd_y__cp = vrd_y__bp + n - VRD_Y__MORE_ADJ; \ VRD_Y__DO_BEFORE_ACTION; /* set up vrd_y_text again */ \ } \ while ( 0 ) #define unput(c) vrd_y_unput( c, vrd_y_text_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 vrd_y__size_t; struct vrd_y__buffer_state { FILE *vrd_y__input_file; char *vrd_y__ch_buf; /* input buffer */ char *vrd_y__buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ vrd_y__size_t vrd_y__buf_size; /* Number of characters read into vrd_y__ch_buf, not including EOB * characters. */ int vrd_y__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 vrd_y__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 vrd_y__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 vrd_y__at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int vrd_y__fill_buffer; int vrd_y__buffer_status; #define VRD_Y__BUFFER_NEW 0 #define VRD_Y__BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as VRD_Y__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 vrd_y_restart()), so that the user can continue scanning by * just pointing vrd_y_in at a new input file. */ #define VRD_Y__BUFFER_EOF_PENDING 2 }; static VRD_Y__BUFFER_STATE vrd_y__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 VRD_Y__CURRENT_BUFFER vrd_y__current_buffer /* vrd_y__hold_char holds the character lost when vrd_y_text is formed. */ static char vrd_y__hold_char; static int vrd_y__n_chars; /* number of characters read into vrd_y__ch_buf */ int vrd_y_leng; /* Points to current character in buffer. */ static char *vrd_y__c_buf_p = (char *) 0; static int vrd_y__init = 1; /* whether we need to initialize */ static int vrd_y__start = 0; /* start state number */ /* Flag which is used to allow vrd_y_wrap()'s to do buffer switches * instead of setting up a fresh vrd_y_in. A bit of a hack ... */ static int vrd_y__did_buffer_switch_on_eof; void vrd_y_restart VRD_Y__PROTO(( FILE *input_file )); void vrd_y__switch_to_buffer VRD_Y__PROTO(( VRD_Y__BUFFER_STATE new_buffer )); void vrd_y__load_buffer_state VRD_Y__PROTO(( void )); VRD_Y__BUFFER_STATE vrd_y__create_buffer VRD_Y__PROTO(( FILE *file, int size )); void vrd_y__delete_buffer VRD_Y__PROTO(( VRD_Y__BUFFER_STATE b )); void vrd_y__init_buffer VRD_Y__PROTO(( VRD_Y__BUFFER_STATE b, FILE *file )); void vrd_y__flush_buffer VRD_Y__PROTO(( VRD_Y__BUFFER_STATE b )); #define VRD_Y__FLUSH_BUFFER vrd_y__flush_buffer( vrd_y__current_buffer ) VRD_Y__BUFFER_STATE vrd_y__scan_buffer VRD_Y__PROTO(( char *base, vrd_y__size_t size )); VRD_Y__BUFFER_STATE vrd_y__scan_string VRD_Y__PROTO(( vrd_y_const char *vrd_y__str )); VRD_Y__BUFFER_STATE vrd_y__scan_bytes VRD_Y__PROTO(( vrd_y_const char *bytes, int len )); static void *vrd_y__flex_alloc VRD_Y__PROTO(( vrd_y__size_t )); static void *vrd_y__flex_realloc VRD_Y__PROTO(( void *, vrd_y__size_t )); static void vrd_y__flex_free VRD_Y__PROTO(( void * )); #define vrd_y__new_buffer vrd_y__create_buffer #define vrd_y__set_interactive(is_interactive) \ { \ if ( ! vrd_y__current_buffer ) \ vrd_y__current_buffer = vrd_y__create_buffer( vrd_y_in, VRD_Y__BUF_SIZE ); \ vrd_y__current_buffer->vrd_y__is_interactive = is_interactive; \ } #define vrd_y__set_bol(at_bol) \ { \ if ( ! vrd_y__current_buffer ) \ vrd_y__current_buffer = vrd_y__create_buffer( vrd_y_in, VRD_Y__BUF_SIZE ); \ vrd_y__current_buffer->vrd_y__at_bol = at_bol; \ } #define VRD_Y__AT_BOL() (vrd_y__current_buffer->vrd_y__at_bol) #define VRD_Y__USES_REJECT typedef unsigned char VRD_Y__CHAR; FILE *vrd_y_in = (FILE *) 0, *vrd_y_out = (FILE *) 0; typedef int vrd_y__state_type; extern int vrd_y_lineno; int vrd_y_lineno = 1; extern char *vrd_y_text; #define vrd_y_text_ptr vrd_y_text static vrd_y__state_type vrd_y__get_previous_state VRD_Y__PROTO(( void )); static vrd_y__state_type vrd_y__try_NUL_trans VRD_Y__PROTO(( vrd_y__state_type current_state )); static int vrd_y__get_next_buffer VRD_Y__PROTO(( void )); static void vrd_y__fatal_error VRD_Y__PROTO(( vrd_y_const char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up vrd_y_text. */ #define VRD_Y__DO_BEFORE_ACTION \ vrd_y_text_ptr = vrd_y__bp; \ vrd_y_leng = (int) (vrd_y__cp - vrd_y__bp); \ vrd_y__hold_char = *vrd_y__cp; \ *vrd_y__cp = '\0'; \ vrd_y__c_buf_p = vrd_y__cp; #define VRD_Y__NUM_RULES 52 #define VRD_Y__END_OF_BUFFER 53 static vrd_y_const short int vrd_y__acclist[371] = { 0, 53, 51, 52, 1, 51, 52, 1, 52, 51, 52, 51, 52, 47, 51, 52, 46, 51, 52, 51, 52, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 49, 51, 52, 1, 50, 48, 45, 47, 47, 46, 43, 44, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 49, 49, 49, 49, 49, 49, 49, 49, 5, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 42, 49, 41, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 15, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 2, 49, 49, 14, 49, 40, 49, 49, 49, 49, 3, 49, 49, 49, 49, 49, 49, 12, 49, 26, 49, 49, 6, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 4, 49, 49, 10, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 39, 49, 49, 49, 49, 49, 49, 49, 49, 37, 49, 49, 49, 19, 49, 49, 49, 49, 28, 49, 49, 49, 49, 49, 49, 49, 38, 49, 49, 49, 49, 9, 49, 49, 49, 7, 49, 49, 13, 49, 11, 49, 17, 49, 49, 18, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 27, 49, 36, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 35, 49, 49, 8, 49, 49, 49, 34, 49, 33, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 16, 49, 49, 30, 49, 29, 49, 49, 32, 49, 31, 49, 49, 49, 49, 49, 22, 49, 49, 49, 23, 49, 49, 20, 49, 21, 49, 49, 49, 24, 49, 49, 49, 49, 49, 49, 49, 25, 49 } ; static vrd_y_const short int vrd_y__accept[297] = { 0, 1, 1, 1, 2, 4, 7, 9, 11, 13, 16, 19, 21, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 69, 69, 70, 70, 70, 70, 71, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 184, 185, 187, 189, 190, 191, 192, 194, 195, 196, 197, 198, 199, 201, 203, 204, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 223, 224, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 241, 242, 243, 244, 245, 246, 247, 248, 250, 251, 252, 254, 255, 256, 257, 259, 260, 261, 262, 263, 264, 265, 267, 268, 269, 270, 272, 273, 274, 276, 277, 279, 281, 283, 284, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 300, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 314, 315, 317, 318, 319, 321, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 334, 335, 337, 339, 340, 342, 344, 345, 346, 347, 348, 350, 351, 352, 354, 355, 357, 359, 360, 361, 363, 364, 365, 366, 367, 368, 369, 371, 371 } ; static vrd_y_const int vrd_y__ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 7, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 9, 10, 11, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 4, 4, 4, 13, 4, 14, 12, 15, 16, 17, 18, 19, 20, 21, 12, 12, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 12, 33, 34, 35, 4, 4, 4, 4, 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 vrd_y_const int vrd_y__meta[36] = { 0, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 } ; static vrd_y_const short int vrd_y__base[298] = { 0, 0, 0, 90, 965, 34, 36, 38, 45, 80, 47, 68, 65, 49, 50, 51, 53, 60, 59, 68, 78, 81, 84, 88, 95, 102, 69, 103, 115, 126, 965, 0, 0, 0, 63, 113, 965, 61, 52, 115, 965, 965, 91, 118, 130, 132, 133, 134, 136, 142, 143, 149, 150, 152, 159, 165, 168, 177, 178, 179, 180, 181, 191, 199, 209, 192, 42, 212, 216, 219, 223, 225, 226, 234, 233, 240, 241, 244, 250, 251, 253, 254, 261, 263, 269, 271, 273, 279, 281, 285, 287, 289, 295, 293, 297, 303, 301, 313, 314, 315, 316, 325, 327, 328, 335, 336, 337, 339, 346, 347, 357, 358, 360, 366, 367, 368, 374, 376, 375, 385, 392, 393, 394, 395, 403, 404, 414, 412, 406, 413, 420, 421, 427, 429, 431, 433, 439, 437, 448, 450, 451, 457, 459, 461, 468, 470, 471, 474, 478, 481, 482, 489, 490, 491, 500, 501, 508, 510, 511, 512, 518, 519, 521, 522, 528, 531, 538, 540, 541, 547, 548, 554, 555, 556, 558, 568, 569, 570, 571, 578, 579, 585, 588, 589, 591, 598, 601, 599, 609, 611, 612, 620, 622, 623, 624, 630, 632, 636, 639, 642, 646, 648, 649, 658, 659, 660, 666, 668, 669, 672, 678, 681, 679, 682, 688, 690, 699, 702, 705, 708, 709, 711, 712, 715, 718, 719, 722, 726, 729, 733, 739, 736, 743, 750, 754, 757, 760, 761, 763, 771, 773, 774, 781, 782, 783, 784, 793, 795, 805, 806, 812, 814, 815, 816, 822, 824, 825, 831, 834, 835, 841, 842, 844, 845, 843, 864, 853, 866, 868, 872, 874, 875, 876, 878, 882, 885, 886, 889, 892, 893, 901, 895, 902, 903, 911, 912, 914, 915, 921, 924, 925, 928, 931, 934, 938, 965, 961, 40 } ; static vrd_y_const short int vrd_y__def[298] = { 0, 295, 1, 295, 295, 295, 295, 296, 295, 295, 295, 295, 295, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 295, 296, 295, 29, 29, 29, 295, 295, 295, 295, 295, 295, 295, 295, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 295, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 0, 295, 295 } ; static vrd_y_const short int vrd_y__nxt[1001] = { 0, 4, 5, 6, 4, 7, 8, 9, 10, 11, 4, 12, 13, 4, 14, 15, 16, 17, 18, 19, 13, 20, 21, 22, 23, 13, 24, 13, 25, 26, 13, 27, 13, 13, 13, 13, 28, 28, 28, 28, 29, 30, 31, 43, 31, 31, 32, 31, 31, 31, 66, 31, 34, 35, 38, 39, 36, 42, 42, 42, 37, 42, 44, 44, 44, 46, 44, 42, 42, 37, 48, 66, 44, 44, 49, 41, 42, 42, 40, 47, 52, 44, 44, 45, 50, 54, 42, 53, 37, 42, 295, 44, 42, 51, 44, 56, 42, 44, 58, 42, 64, 44, 55, 42, 44, 59, 57, 295, 44, 61, 42, 42, 62, 60, 295, 44, 44, 28, 28, 63, 34, 35, 38, 39, 295, 295, 42, 65, 29, 30, 31, 44, 31, 31, 32, 31, 31, 31, 42, 31, 42, 42, 42, 44, 42, 44, 44, 44, 295, 44, 42, 42, 295, 67, 70, 44, 44, 42, 42, 69, 42, 68, 44, 44, 73, 44, 295, 42, 295, 295, 295, 71, 44, 42, 75, 72, 42, 76, 44, 74, 78, 44, 295, 79, 77, 42, 42, 42, 42, 42, 44, 44, 44, 44, 44, 80, 81, 295, 82, 42, 42, 84, 83, 87, 44, 44, 85, 42, 97, 89, 88, 86, 44, 98, 295, 90, 295, 42, 92, 91, 42, 93, 44, 295, 42, 44, 99, 42, 94, 44, 100, 42, 44, 42, 42, 95, 44, 96, 44, 44, 101, 42, 42, 104, 102, 295, 44, 44, 42, 42, 106, 295, 42, 44, 44, 103, 105, 44, 42, 42, 108, 42, 42, 44, 44, 107, 44, 44, 110, 42, 111, 42, 109, 112, 44, 295, 44, 42, 113, 42, 114, 42, 44, 295, 44, 295, 44, 42, 115, 42, 116, 295, 44, 42, 44, 42, 117, 42, 44, 118, 44, 42, 44, 42, 119, 42, 44, 122, 44, 42, 44, 42, 295, 295, 44, 120, 44, 121, 123, 125, 124, 42, 42, 42, 42, 295, 44, 44, 44, 44, 126, 129, 295, 42, 295, 42, 42, 128, 44, 127, 44, 44, 132, 42, 42, 42, 295, 42, 44, 44, 44, 131, 44, 295, 42, 42, 295, 133, 130, 44, 44, 135, 295, 137, 295, 42, 42, 134, 42, 136, 44, 44, 295, 44, 42, 42, 42, 141, 138, 44, 44, 44, 42, 42, 42, 139, 140, 44, 44, 44, 295, 145, 295, 42, 142, 143, 146, 147, 44, 144, 42, 42, 42, 42, 295, 44, 44, 44, 44, 149, 150, 42, 42, 295, 42, 148, 44, 44, 154, 44, 42, 42, 42, 157, 151, 44, 44, 44, 42, 42, 152, 153, 155, 44, 44, 42, 156, 42, 159, 42, 44, 42, 44, 158, 44, 42, 44, 42, 295, 295, 44, 160, 44, 164, 161, 295, 42, 295, 42, 42, 162, 44, 163, 44, 44, 42, 165, 42, 295, 42, 44, 167, 44, 170, 44, 295, 42, 166, 42, 42, 168, 44, 42, 44, 44, 171, 42, 44, 169, 42, 42, 44, 295, 295, 44, 44, 172, 42, 42, 42, 295, 295, 44, 44, 44, 174, 173, 177, 42, 42, 176, 175, 178, 44, 44, 179, 42, 295, 42, 42, 42, 44, 180, 44, 44, 44, 42, 42, 181, 42, 42, 44, 44, 182, 44, 44, 42, 295, 295, 42, 295, 44, 184, 185, 44, 183, 42, 295, 42, 42, 186, 44, 187, 44, 44, 42, 42, 189, 190, 188, 44, 44, 42, 42, 42, 295, 42, 44, 44, 44, 192, 44, 194, 195, 196, 191, 42, 42, 42, 42, 295, 44, 44, 44, 44, 193, 42, 42, 198, 295, 295, 44, 44, 42, 197, 199, 42, 42, 44, 42, 295, 44, 44, 200, 44, 202, 42, 42, 295, 42, 295, 44, 44, 201, 44, 203, 204, 42, 206, 42, 42, 295, 44, 205, 44, 44, 207, 210, 42, 295, 42, 42, 42, 211, 208, 44, 44, 44, 42, 212, 42, 295, 209, 215, 42, 44, 214, 42, 295, 44, 42, 213, 44, 216, 42, 219, 42, 42, 295, 44, 217, 44, 44, 220, 295, 295, 42, 42, 42, 221, 218, 44, 44, 44, 42, 222, 42, 42, 295, 44, 42, 44, 44, 223, 224, 44, 42, 42, 295, 42, 42, 44, 231, 226, 44, 232, 42, 295, 42, 225, 227, 44, 229, 44, 230, 233, 295, 42, 228, 295, 42, 234, 44, 42, 235, 44, 42, 42, 44, 42, 42, 44, 44, 42, 44, 44, 42, 42, 44, 237, 42, 44, 44, 236, 42, 44, 239, 42, 295, 44, 238, 42, 44, 240, 42, 295, 44, 42, 295, 44, 241, 42, 44, 243, 295, 295, 44, 242, 42, 245, 244, 295, 42, 248, 246, 42, 247, 44, 42, 42, 44, 42, 295, 44, 44, 295, 44, 251, 249, 42, 253, 42, 42, 295, 44, 252, 44, 44, 250, 42, 42, 42, 42, 295, 44, 44, 44, 44, 258, 254, 295, 42, 295, 42, 295, 259, 44, 257, 44, 261, 295, 255, 295, 42, 42, 256, 262, 260, 44, 44, 42, 295, 42, 42, 42, 44, 263, 44, 44, 44, 42, 295, 42, 42, 265, 44, 264, 44, 44, 42, 295, 268, 42, 42, 44, 266, 267, 44, 44, 42, 42, 42, 42, 42, 44, 44, 44, 44, 44, 270, 275, 42, 295, 295, 295, 295, 44, 269, 273, 274, 277, 271, 42, 295, 42, 272, 42, 44, 276, 44, 42, 44, 42, 42, 42, 44, 42, 44, 44, 44, 42, 44, 279, 42, 42, 44, 278, 42, 44, 44, 42, 42, 44, 42, 295, 44, 44, 282, 44, 42, 42, 42, 280, 281, 44, 44, 44, 283, 285, 42, 42, 284, 42, 42, 44, 44, 295, 44, 44, 42, 286, 288, 42, 42, 289, 295, 42, 44, 44, 42, 287, 44, 42, 295, 44, 290, 42, 44, 293, 291, 295, 44, 295, 295, 295, 295, 295, 295, 292, 295, 295, 295, 294, 33, 33, 3, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295 } ; static vrd_y_const short int vrd_y__chk[1001] = { 0, 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, 5, 5, 6, 6, 7, 7, 7, 297, 7, 7, 7, 7, 7, 7, 66, 7, 8, 8, 10, 10, 8, 13, 14, 15, 38, 16, 13, 14, 15, 15, 16, 18, 17, 37, 16, 34, 18, 17, 16, 12, 19, 26, 11, 15, 18, 19, 26, 14, 17, 19, 20, 18, 9, 21, 3, 20, 22, 17, 21, 21, 23, 22, 22, 42, 26, 23, 20, 24, 42, 22, 21, 0, 24, 24, 25, 27, 24, 23, 0, 25, 27, 28, 28, 25, 35, 35, 39, 39, 0, 0, 43, 27, 29, 29, 29, 43, 29, 29, 29, 29, 29, 29, 44, 29, 45, 46, 47, 44, 48, 45, 46, 47, 0, 48, 49, 50, 0, 45, 48, 49, 50, 51, 52, 47, 53, 46, 51, 52, 51, 53, 0, 54, 0, 0, 0, 49, 54, 55, 52, 50, 56, 53, 55, 51, 55, 56, 0, 55, 54, 57, 58, 59, 60, 61, 57, 58, 59, 60, 61, 55, 56, 0, 56, 62, 65, 57, 56, 59, 62, 65, 58, 63, 65, 61, 60, 58, 63, 65, 0, 62, 0, 64, 63, 62, 67, 63, 64, 0, 68, 67, 67, 69, 63, 68, 68, 70, 69, 71, 72, 64, 70, 64, 71, 72, 69, 74, 73, 72, 70, 0, 74, 73, 75, 76, 74, 0, 77, 75, 76, 71, 73, 77, 78, 79, 77, 80, 81, 78, 79, 76, 80, 81, 79, 82, 80, 83, 78, 81, 82, 0, 83, 84, 82, 85, 83, 86, 84, 0, 85, 0, 86, 87, 84, 88, 85, 0, 87, 89, 88, 90, 88, 91, 89, 89, 90, 93, 91, 92, 90, 94, 93, 93, 92, 96, 94, 95, 0, 0, 96, 91, 95, 92, 94, 96, 95, 97, 98, 99, 100, 0, 97, 98, 99, 100, 97, 100, 0, 101, 0, 102, 103, 99, 101, 98, 102, 103, 103, 104, 105, 106, 0, 107, 104, 105, 106, 102, 107, 0, 108, 109, 0, 104, 101, 108, 109, 106, 0, 108, 0, 110, 111, 105, 112, 107, 110, 111, 0, 112, 113, 114, 115, 112, 109, 113, 114, 115, 116, 118, 117, 110, 111, 116, 118, 117, 0, 116, 0, 119, 113, 114, 117, 118, 119, 115, 120, 121, 122, 123, 0, 120, 121, 122, 123, 120, 121, 124, 125, 0, 128, 119, 124, 125, 125, 128, 127, 129, 126, 128, 122, 127, 129, 126, 130, 131, 123, 124, 126, 130, 131, 132, 127, 133, 131, 134, 132, 135, 133, 129, 134, 137, 135, 136, 0, 0, 137, 132, 136, 136, 133, 0, 138, 0, 139, 140, 134, 138, 135, 139, 140, 141, 137, 142, 0, 143, 141, 139, 142, 142, 143, 0, 144, 138, 145, 146, 140, 144, 147, 145, 146, 144, 148, 147, 141, 149, 150, 148, 0, 0, 149, 150, 147, 151, 152, 153, 0, 0, 151, 152, 153, 149, 148, 152, 154, 155, 151, 150, 153, 154, 155, 154, 156, 0, 157, 158, 159, 156, 155, 157, 158, 159, 160, 161, 158, 162, 163, 160, 161, 160, 162, 163, 164, 0, 0, 165, 0, 164, 162, 163, 165, 161, 166, 0, 167, 168, 164, 166, 165, 167, 168, 169, 170, 167, 168, 166, 169, 170, 171, 172, 173, 0, 174, 171, 172, 173, 170, 174, 172, 173, 174, 169, 175, 176, 177, 178, 0, 175, 176, 177, 178, 171, 179, 180, 178, 0, 0, 179, 180, 181, 176, 179, 182, 183, 181, 184, 0, 182, 183, 180, 184, 182, 185, 187, 0, 186, 0, 185, 187, 181, 186, 183, 184, 188, 186, 189, 190, 0, 188, 185, 189, 190, 187, 190, 191, 0, 192, 193, 194, 191, 188, 192, 193, 194, 195, 192, 196, 0, 189, 195, 197, 196, 194, 198, 0, 197, 199, 193, 198, 196, 200, 199, 201, 202, 0, 200, 197, 201, 202, 200, 0, 0, 203, 204, 205, 201, 198, 203, 204, 205, 206, 203, 207, 208, 0, 206, 209, 207, 208, 204, 205, 209, 210, 212, 0, 211, 213, 210, 212, 208, 211, 213, 214, 0, 215, 207, 209, 214, 211, 215, 211, 214, 0, 216, 210, 0, 217, 215, 216, 218, 216, 217, 219, 220, 218, 221, 222, 219, 220, 223, 221, 222, 224, 225, 223, 219, 226, 224, 225, 218, 227, 226, 225, 228, 0, 227, 221, 229, 228, 227, 231, 0, 229, 230, 0, 231, 228, 232, 230, 230, 0, 0, 232, 229, 233, 231, 230, 0, 234, 233, 232, 235, 232, 234, 236, 237, 235, 238, 0, 236, 237, 0, 238, 236, 234, 239, 238, 240, 241, 0, 239, 237, 240, 241, 235, 242, 243, 244, 245, 0, 242, 243, 244, 245, 245, 241, 0, 246, 0, 247, 0, 245, 246, 244, 247, 247, 0, 242, 0, 248, 249, 243, 247, 246, 248, 249, 250, 0, 251, 252, 253, 250, 248, 251, 252, 253, 254, 0, 255, 256, 250, 254, 249, 255, 256, 257, 0, 255, 258, 259, 257, 252, 254, 258, 259, 260, 261, 264, 262, 263, 260, 261, 264, 262, 263, 259, 264, 266, 0, 0, 0, 0, 266, 258, 262, 263, 266, 260, 265, 0, 267, 261, 268, 265, 265, 267, 269, 268, 270, 271, 272, 269, 273, 270, 271, 272, 274, 273, 271, 275, 276, 274, 268, 277, 275, 276, 278, 279, 277, 281, 0, 278, 279, 276, 281, 280, 282, 283, 274, 275, 280, 282, 283, 277, 280, 284, 285, 279, 286, 287, 284, 285, 0, 286, 287, 288, 282, 286, 289, 290, 288, 0, 291, 289, 290, 292, 285, 291, 293, 0, 292, 289, 294, 293, 292, 290, 0, 294, 0, 0, 0, 0, 0, 0, 291, 0, 0, 0, 293, 296, 296, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 295 } ; static vrd_y__state_type vrd_y__state_buf[VRD_Y__BUF_SIZE + 2], *vrd_y__state_ptr; static char *vrd_y__full_match; static int vrd_y__lp; #define REJECT \ { \ *vrd_y__cp = vrd_y__hold_char; /* undo effects of setting up vrd_y_text */ \ vrd_y__cp = vrd_y__full_match; /* restore poss. backed-over text */ \ ++vrd_y__lp; \ goto find_rule; \ } #define vrd_y_more() vrd_y_more_used_but_not_detected #define VRD_Y__MORE_ADJ 0 #define VRD_Y__RESTORE_VRD_Y__MORE_OFFSET char *vrd_y_text; #line 1 "../../../src/druc/src/drucompi_l.l" #define INITIAL 0 #line 2 "../../../src/druc/src/drucompi_l.l" #include "mut.h" #include "drucompi_y.h" #include "drucutil.h" #include "drucompi.h" #ifdef FLEX_SCANNER #ifdef VRD_Y__INPUT #undef VRD_Y__INPUT #endif #define VRD_Y__INPUT(buf,result,max_size) \ do { \ int c = getc(vrd_y_in); \ result = (c == EOF) ? VRD_Y__NULL \ : (buf[0] = isupper(c) ? toupper(c) : c, 1); \ } while(0) int vrd_y_lineno; #else /* using lex, for sure */ #ifdef input #undef input #endif #define input() (((vrd_y_tchar = vrd_y_sptr > vrd_y_sbuf ? U(*--vrd_y_sptr) \ : getc(vrd_y_in)) == 10 ?(vrd_y_lineno++,vrd_y_tchar) \ : vrd_y_tchar) == EOF ? 0 \ : isupper(vrd_y_tchar) ? toupper(vrd_y_tchar) \ : vrd_y_tchar) #endif /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef VRD_Y__SKIP_VRD_Y_WRAP #ifdef __cplusplus extern "C" int vrd_y_wrap VRD_Y__PROTO(( void )); #else extern int vrd_y_wrap VRD_Y__PROTO(( void )); #endif #endif #ifndef VRD_Y__NO_UNPUT static void vrd_y_unput VRD_Y__PROTO(( int c, char *buf_ptr )); #endif #ifndef vrd_y_text_ptr static void vrd_y__flex_strncpy VRD_Y__PROTO(( char *, vrd_y_const char *, int )); #endif #ifdef VRD_Y__NEED_STRLEN static int vrd_y__flex_strlen VRD_Y__PROTO(( vrd_y_const char * )); #endif #ifndef VRD_Y__NO_INPUT #ifdef __cplusplus static int vrd_y_input VRD_Y__PROTO(( void )); #else static int input VRD_Y__PROTO(( void )); #endif #endif #if VRD_Y__STACK_USED static int vrd_y__start_stack_ptr = 0; static int vrd_y__start_stack_depth = 0; static int *vrd_y__start_stack = 0; #ifndef VRD_Y__NO_PUSH_STATE static void vrd_y__push_state VRD_Y__PROTO(( int new_state )); #endif #ifndef VRD_Y__NO_POP_STATE static void vrd_y__pop_state VRD_Y__PROTO(( void )); #endif #ifndef VRD_Y__NO_TOP_STATE static int vrd_y__top_state VRD_Y__PROTO(( void )); #endif #else #define VRD_Y__NO_PUSH_STATE 1 #define VRD_Y__NO_POP_STATE 1 #define VRD_Y__NO_TOP_STATE 1 #endif #ifdef VRD_Y__MALLOC_DECL VRD_Y__MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include #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 VRD_Y__READ_BUF_SIZE #define VRD_Y__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( vrd_y_text, vrd_y_leng, 1, vrd_y_out ) #endif /* Gets input and stuffs it into "buf". number of characters read, or VRD_Y__NULL, * is returned in "result". */ #ifndef VRD_Y__INPUT #define VRD_Y__INPUT(buf,result,max_size) \ if ( vrd_y__current_buffer->vrd_y__is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( vrd_y_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( vrd_y_in ) ) \ VRD_Y__FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, vrd_y_in )) == 0) \ && ferror( vrd_y_in ) ) \ VRD_Y__FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "vrd_y_terminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef vrd_y_terminate #define vrd_y_terminate() return VRD_Y__NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef VRD_Y__START_STACK_INCR #define VRD_Y__START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef VRD_Y__FATAL_ERROR #define VRD_Y__FATAL_ERROR(msg) vrd_y__fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef VRD_Y__DECL #define VRD_Y__DECL int vrd_y_lex VRD_Y__PROTO(( void )) #endif /* Code executed at the beginning of each rule, after vrd_y_text and vrd_y_leng * have been set up. */ #ifndef VRD_Y__USER_ACTION #define VRD_Y__USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef VRD_Y__BREAK #define VRD_Y__BREAK break; #endif #define VRD_Y__RULE_SETUP \ VRD_Y__USER_ACTION VRD_Y__DECL { register vrd_y__state_type vrd_y__current_state; register char *vrd_y__cp = NULL, *vrd_y__bp = NULL; register int vrd_y__act; #line 54 "../../../src/druc/src/drucompi_l.l" if ( vrd_y__init ) { vrd_y__init = 0; #ifdef VRD_Y__USER_INIT VRD_Y__USER_INIT; #endif if ( ! vrd_y__start ) vrd_y__start = 1; /* first start state */ if ( ! vrd_y_in ) vrd_y_in = stdin; if ( ! vrd_y_out ) vrd_y_out = stdout; if ( ! vrd_y__current_buffer ) vrd_y__current_buffer = vrd_y__create_buffer( vrd_y_in, VRD_Y__BUF_SIZE ); vrd_y__load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { vrd_y__cp = vrd_y__c_buf_p; /* Support of vrd_y_text. */ *vrd_y__cp = vrd_y__hold_char; /* vrd_y__bp points to the position in vrd_y__ch_buf of the start of * the current run. */ vrd_y__bp = vrd_y__cp; vrd_y__current_state = vrd_y__start; vrd_y__state_ptr = vrd_y__state_buf; *vrd_y__state_ptr++ = vrd_y__current_state; vrd_y__match: do { register VRD_Y__CHAR vrd_y__c = vrd_y__ec[VRD_Y__SC_TO_UI(*vrd_y__cp)]; while ( vrd_y__chk[vrd_y__base[vrd_y__current_state] + vrd_y__c] != vrd_y__current_state ) { vrd_y__current_state = (int) vrd_y__def[vrd_y__current_state]; if ( vrd_y__current_state >= 296 ) vrd_y__c = vrd_y__meta[(unsigned int) vrd_y__c]; } vrd_y__current_state = vrd_y__nxt[vrd_y__base[vrd_y__current_state] + (unsigned int) vrd_y__c]; *vrd_y__state_ptr++ = vrd_y__current_state; ++vrd_y__cp; } while ( vrd_y__base[vrd_y__current_state] != 965 ); vrd_y__find_action: vrd_y__current_state = *--vrd_y__state_ptr; vrd_y__lp = vrd_y__accept[vrd_y__current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( vrd_y__lp && vrd_y__lp < vrd_y__accept[vrd_y__current_state + 1] ) { vrd_y__act = vrd_y__acclist[vrd_y__lp]; { vrd_y__full_match = vrd_y__cp; break; } } --vrd_y__cp; vrd_y__current_state = *--vrd_y__state_ptr; vrd_y__lp = vrd_y__accept[vrd_y__current_state]; } VRD_Y__DO_BEFORE_ACTION; if ( vrd_y__act != VRD_Y__END_OF_BUFFER ) { int vrd_y_l; for ( vrd_y_l = 0; vrd_y_l < vrd_y_leng; ++vrd_y_l ) if ( vrd_y_text[vrd_y_l] == '\n' ) ++vrd_y_lineno; } do_action: /* This label is used only to access EOF actions. */ switch ( vrd_y__act ) { /* beginning of action switch */ case 1: VRD_Y__RULE_SETUP #line 57 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); } VRD_Y__BREAK case 2: VRD_Y__RULE_SETUP #line 59 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LAYER);} VRD_Y__BREAK case 3: VRD_Y__RULE_SETUP #line 61 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_REGLE);} VRD_Y__BREAK case 4: VRD_Y__RULE_SETUP #line 63 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_REGLES);} VRD_Y__BREAK case 5: VRD_Y__RULE_SETUP #line 65 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_FIN);} VRD_Y__BREAK case 6: VRD_Y__RULE_SETUP #line 68 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_DEFINE);} VRD_Y__BREAK case 7: VRD_Y__RULE_SETUP #line 70 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_UNDEFINE);} VRD_Y__BREAK case 8: VRD_Y__RULE_SETUP #line 72 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_CARACTERISE);} VRD_Y__BREAK case 9: VRD_Y__RULE_SETUP #line 74 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_RELATION);} VRD_Y__BREAK case 10: VRD_Y__RULE_SETUP #line 77 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_RESIZE);} VRD_Y__BREAK case 11: VRD_Y__RULE_SETUP #line 79 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_EXCLUSION);} VRD_Y__BREAK case 12: VRD_Y__RULE_SETUP #line 81 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_UNION);} VRD_Y__BREAK case 13: VRD_Y__RULE_SETUP #line 83 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_ENVELOPPE);} VRD_Y__BREAK case 14: VRD_Y__RULE_SETUP #line 85 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_MARGE);} VRD_Y__BREAK case 15: VRD_Y__RULE_SETUP #line 87 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_CROIX);} VRD_Y__BREAK case 16: VRD_Y__RULE_SETUP #line 89 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_INTERSECT);} VRD_Y__BREAK case 17: VRD_Y__RULE_SETUP #line 91 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_EXTENSION);} VRD_Y__BREAK case 18: VRD_Y__RULE_SETUP #line 93 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_INCLUSION);} VRD_Y__BREAK case 19: VRD_Y__RULE_SETUP #line 95 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_DISTANCE);} VRD_Y__BREAK case 20: VRD_Y__RULE_SETUP #line 98 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_SURFACE_INTER);} VRD_Y__BREAK case 21: VRD_Y__RULE_SETUP #line 100 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LONG_INTER);} VRD_Y__BREAK case 22: VRD_Y__RULE_SETUP #line 102 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LARGE_INTER);} VRD_Y__BREAK case 23: VRD_Y__RULE_SETUP #line 104 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_PENET_INTER);} VRD_Y__BREAK case 24: VRD_Y__RULE_SETUP #line 106 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_PARAL_INTER);} VRD_Y__BREAK case 25: VRD_Y__RULE_SETUP #line 108 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_PERPEN_INTER);} VRD_Y__BREAK case 26: VRD_Y__RULE_SETUP #line 111 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_AXIALE);} VRD_Y__BREAK case 27: VRD_Y__RULE_SETUP #line 113 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_GEODESIQUE);} VRD_Y__BREAK case 28: VRD_Y__RULE_SETUP #line 115 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_FRONTALE);} VRD_Y__BREAK case 29: VRD_Y__RULE_SETUP #line 117 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LATERALE_MIN);} VRD_Y__BREAK case 30: VRD_Y__RULE_SETUP #line 119 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LATERALE_MAX);} VRD_Y__BREAK case 31: VRD_Y__RULE_SETUP #line 122 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LONGUEUR_MIN);} VRD_Y__BREAK case 32: VRD_Y__RULE_SETUP #line 124 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LONGUEUR_MAX);} VRD_Y__BREAK case 33: VRD_Y__RULE_SETUP #line 126 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LARGEUR_MIN);} VRD_Y__BREAK case 34: VRD_Y__RULE_SETUP #line 128 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LARGEUR_MAX);} VRD_Y__BREAK case 35: VRD_Y__RULE_SETUP #line 130 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_SUP);} VRD_Y__BREAK case 36: VRD_Y__RULE_SETUP #line 132 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_INF);} VRD_Y__BREAK case 37: VRD_Y__RULE_SETUP #line 135 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_SURFACE);} VRD_Y__BREAK case 38: VRD_Y__RULE_SETUP #line 137 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LONGUEUR);} VRD_Y__BREAK case 39: VRD_Y__RULE_SETUP #line 139 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_LARGEUR);} VRD_Y__BREAK case 40: VRD_Y__RULE_SETUP #line 142 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_NOTCH);} VRD_Y__BREAK case 41: VRD_Y__RULE_SETUP #line 144 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_MIN);} VRD_Y__BREAK case 42: VRD_Y__RULE_SETUP #line 146 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_MAX);} VRD_Y__BREAK case 43: VRD_Y__RULE_SETUP #line 148 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_INFEQ);} VRD_Y__BREAK case 44: VRD_Y__RULE_SETUP #line 150 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_SUPEQ);} VRD_Y__BREAK case 45: VRD_Y__RULE_SETUP #line 153 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return(DRUC_DESTINATION);} VRD_Y__BREAK case 46: VRD_Y__RULE_SETUP #line 156 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); sscanf(vrd_y_text,"%d",&DrucInputEntier); return(DRUC_ENTIER); } VRD_Y__BREAK case 47: VRD_Y__RULE_SETUP #line 160 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); sscanf( vrd_y_text,"%f",& DrucInputFloat); return(DRUC_FLOAT); } VRD_Y__BREAK case 48: VRD_Y__RULE_SETUP #line 164 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); sscanf( vrd_y_text,"%f",& DrucInputFloat); return(DRUC_NEG_FLOAT); } VRD_Y__BREAK case 49: VRD_Y__RULE_SETUP #line 168 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); sscanf(vrd_y_text,"%s",DrucInputChaine); return(DRUC_NOM); } VRD_Y__BREAK case 50: VRD_Y__RULE_SETUP #line 172 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); } VRD_Y__BREAK case 51: VRD_Y__RULE_SETUP #line 174 "../../../src/druc/src/drucompi_l.l" { DrucEcho ( vrd_y_text ); return (*vrd_y_text);} VRD_Y__BREAK case 52: VRD_Y__RULE_SETUP #line 177 "../../../src/druc/src/drucompi_l.l" ECHO; VRD_Y__BREAK case VRD_Y__STATE_EOF(INITIAL): vrd_y_terminate(); case VRD_Y__END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int vrd_y__amount_of_matched_text = (int) (vrd_y__cp - vrd_y_text_ptr) - 1; /* Undo the effects of VRD_Y__DO_BEFORE_ACTION. */ *vrd_y__cp = vrd_y__hold_char; VRD_Y__RESTORE_VRD_Y__MORE_OFFSET if ( vrd_y__current_buffer->vrd_y__buffer_status == VRD_Y__BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed vrd_y_in at a new source and called * vrd_y_lex(). If so, then we have to assure * consistency between vrd_y__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. */ vrd_y__n_chars = vrd_y__current_buffer->vrd_y__n_chars; vrd_y__current_buffer->vrd_y__input_file = vrd_y_in; vrd_y__current_buffer->vrd_y__buffer_status = VRD_Y__BUFFER_NORMAL; } /* Note that here we test for vrd_y__c_buf_p "<=" to the position * of the first EOB in the buffer, since vrd_y__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 ( vrd_y__c_buf_p <= &vrd_y__current_buffer->vrd_y__ch_buf[vrd_y__n_chars] ) { /* This was really a NUL. */ vrd_y__state_type vrd_y__next_state; vrd_y__c_buf_p = vrd_y_text_ptr + vrd_y__amount_of_matched_text; vrd_y__current_state = vrd_y__get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * vrd_y__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). */ vrd_y__next_state = vrd_y__try_NUL_trans( vrd_y__current_state ); vrd_y__bp = vrd_y_text_ptr + VRD_Y__MORE_ADJ; if ( vrd_y__next_state ) { /* Consume the NUL. */ vrd_y__cp = ++vrd_y__c_buf_p; vrd_y__current_state = vrd_y__next_state; goto vrd_y__match; } else { vrd_y__cp = vrd_y__c_buf_p; goto vrd_y__find_action; } } else switch ( vrd_y__get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { vrd_y__did_buffer_switch_on_eof = 0; if ( vrd_y_wrap() ) { /* Note: because we've taken care in * vrd_y__get_next_buffer() to have set up * vrd_y_text, we can now set up * vrd_y__c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * VRD_Y__NULL, it'll still work - another * VRD_Y__NULL will get returned. */ vrd_y__c_buf_p = vrd_y_text_ptr + VRD_Y__MORE_ADJ; vrd_y__act = VRD_Y__STATE_EOF(VRD_Y__START); goto do_action; } else { if ( ! vrd_y__did_buffer_switch_on_eof ) VRD_Y__NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: vrd_y__c_buf_p = vrd_y_text_ptr + vrd_y__amount_of_matched_text; vrd_y__current_state = vrd_y__get_previous_state(); vrd_y__cp = vrd_y__c_buf_p; vrd_y__bp = vrd_y_text_ptr + VRD_Y__MORE_ADJ; goto vrd_y__match; case EOB_ACT_LAST_MATCH: vrd_y__c_buf_p = &vrd_y__current_buffer->vrd_y__ch_buf[vrd_y__n_chars]; vrd_y__current_state = vrd_y__get_previous_state(); vrd_y__cp = vrd_y__c_buf_p; vrd_y__bp = vrd_y_text_ptr + VRD_Y__MORE_ADJ; goto vrd_y__find_action; } break; } default: VRD_Y__FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of vrd_y_lex */ /* vrd_y__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 vrd_y__get_next_buffer() { register char *dest = vrd_y__current_buffer->vrd_y__ch_buf; register char *source = vrd_y_text_ptr; register int number_to_move, i; int ret_val; if ( vrd_y__c_buf_p > &vrd_y__current_buffer->vrd_y__ch_buf[vrd_y__n_chars + 1] ) VRD_Y__FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( vrd_y__current_buffer->vrd_y__fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( vrd_y__c_buf_p - vrd_y_text_ptr - VRD_Y__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) (vrd_y__c_buf_p - vrd_y_text_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( vrd_y__current_buffer->vrd_y__buffer_status == VRD_Y__BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ vrd_y__current_buffer->vrd_y__n_chars = vrd_y__n_chars = 0; else { int num_to_read = vrd_y__current_buffer->vrd_y__buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef VRD_Y__USES_REJECT VRD_Y__FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ VRD_Y__BUFFER_STATE b = vrd_y__current_buffer; int vrd_y__c_buf_p_offset = (int) (vrd_y__c_buf_p - b->vrd_y__ch_buf); if ( b->vrd_y__is_our_buffer ) { int new_size = b->vrd_y__buf_size * 2; if ( new_size <= 0 ) b->vrd_y__buf_size += b->vrd_y__buf_size / 8; else b->vrd_y__buf_size *= 2; b->vrd_y__ch_buf = (char *) /* Include room in for 2 EOB chars. */ vrd_y__flex_realloc( (void *) b->vrd_y__ch_buf, b->vrd_y__buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->vrd_y__ch_buf = 0; if ( ! b->vrd_y__ch_buf ) VRD_Y__FATAL_ERROR( "fatal error - scanner input buffer overflow" ); vrd_y__c_buf_p = &b->vrd_y__ch_buf[vrd_y__c_buf_p_offset]; num_to_read = vrd_y__current_buffer->vrd_y__buf_size - number_to_move - 1; #endif } if ( num_to_read > VRD_Y__READ_BUF_SIZE ) num_to_read = VRD_Y__READ_BUF_SIZE; /* Read in more data. */ VRD_Y__INPUT( (&vrd_y__current_buffer->vrd_y__ch_buf[number_to_move]), vrd_y__n_chars, num_to_read ); vrd_y__current_buffer->vrd_y__n_chars = vrd_y__n_chars; } if ( vrd_y__n_chars == 0 ) { if ( number_to_move == VRD_Y__MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; vrd_y_restart( vrd_y_in ); } else { ret_val = EOB_ACT_LAST_MATCH; vrd_y__current_buffer->vrd_y__buffer_status = VRD_Y__BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; vrd_y__n_chars += number_to_move; vrd_y__current_buffer->vrd_y__ch_buf[vrd_y__n_chars] = VRD_Y__END_OF_BUFFER_CHAR; vrd_y__current_buffer->vrd_y__ch_buf[vrd_y__n_chars + 1] = VRD_Y__END_OF_BUFFER_CHAR; vrd_y_text_ptr = &vrd_y__current_buffer->vrd_y__ch_buf[0]; return ret_val; } /* vrd_y__get_previous_state - get the state just before the EOB char was reached */ static vrd_y__state_type vrd_y__get_previous_state() { register vrd_y__state_type vrd_y__current_state; register char *vrd_y__cp; vrd_y__current_state = vrd_y__start; vrd_y__state_ptr = vrd_y__state_buf; *vrd_y__state_ptr++ = vrd_y__current_state; for ( vrd_y__cp = vrd_y_text_ptr + VRD_Y__MORE_ADJ; vrd_y__cp < vrd_y__c_buf_p; ++vrd_y__cp ) { register VRD_Y__CHAR vrd_y__c = (*vrd_y__cp ? vrd_y__ec[VRD_Y__SC_TO_UI(*vrd_y__cp)] : 1); while ( vrd_y__chk[vrd_y__base[vrd_y__current_state] + vrd_y__c] != vrd_y__current_state ) { vrd_y__current_state = (int) vrd_y__def[vrd_y__current_state]; if ( vrd_y__current_state >= 296 ) vrd_y__c = vrd_y__meta[(unsigned int) vrd_y__c]; } vrd_y__current_state = vrd_y__nxt[vrd_y__base[vrd_y__current_state] + (unsigned int) vrd_y__c]; *vrd_y__state_ptr++ = vrd_y__current_state; } return vrd_y__current_state; } /* vrd_y__try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = vrd_y__try_NUL_trans( current_state ); */ #ifdef VRD_Y__USE_PROTOS static vrd_y__state_type vrd_y__try_NUL_trans( vrd_y__state_type vrd_y__current_state ) #else static vrd_y__state_type vrd_y__try_NUL_trans( vrd_y__current_state ) vrd_y__state_type vrd_y__current_state; #endif { register int vrd_y__is_jam; register VRD_Y__CHAR vrd_y__c = 1; while ( vrd_y__chk[vrd_y__base[vrd_y__current_state] + vrd_y__c] != vrd_y__current_state ) { vrd_y__current_state = (int) vrd_y__def[vrd_y__current_state]; if ( vrd_y__current_state >= 296 ) vrd_y__c = vrd_y__meta[(unsigned int) vrd_y__c]; } vrd_y__current_state = vrd_y__nxt[vrd_y__base[vrd_y__current_state] + (unsigned int) vrd_y__c]; vrd_y__is_jam = (vrd_y__current_state == 295); if ( ! vrd_y__is_jam ) *vrd_y__state_ptr++ = vrd_y__current_state; return vrd_y__is_jam ? 0 : vrd_y__current_state; } #ifndef VRD_Y__NO_UNPUT #ifdef VRD_Y__USE_PROTOS static void vrd_y_unput( int c, register char *vrd_y__bp ) #else static void vrd_y_unput( c, vrd_y__bp ) int c; register char *vrd_y__bp; #endif { register char *vrd_y__cp = vrd_y__c_buf_p; /* undo effects of setting up vrd_y_text */ *vrd_y__cp = vrd_y__hold_char; if ( vrd_y__cp < vrd_y__current_buffer->vrd_y__ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = vrd_y__n_chars + 2; register char *dest = &vrd_y__current_buffer->vrd_y__ch_buf[ vrd_y__current_buffer->vrd_y__buf_size + 2]; register char *source = &vrd_y__current_buffer->vrd_y__ch_buf[number_to_move]; while ( source > vrd_y__current_buffer->vrd_y__ch_buf ) *--dest = *--source; vrd_y__cp += (int) (dest - source); vrd_y__bp += (int) (dest - source); vrd_y__current_buffer->vrd_y__n_chars = vrd_y__n_chars = vrd_y__current_buffer->vrd_y__buf_size; if ( vrd_y__cp < vrd_y__current_buffer->vrd_y__ch_buf + 2 ) VRD_Y__FATAL_ERROR( "flex scanner push-back overflow" ); } *--vrd_y__cp = (char) c; if ( c == '\n' ) --vrd_y_lineno; vrd_y_text_ptr = vrd_y__bp; vrd_y__hold_char = *vrd_y__cp; vrd_y__c_buf_p = vrd_y__cp; } #endif /* ifndef VRD_Y__NO_UNPUT */ #ifndef VRD_Y__NO_INPUT #ifdef __cplusplus static int vrd_y_input() #else static int input() #endif { int c; *vrd_y__c_buf_p = vrd_y__hold_char; if ( *vrd_y__c_buf_p == VRD_Y__END_OF_BUFFER_CHAR ) { /* vrd_y__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 ( vrd_y__c_buf_p < &vrd_y__current_buffer->vrd_y__ch_buf[vrd_y__n_chars] ) /* This was really a NUL. */ *vrd_y__c_buf_p = '\0'; else { /* need more input */ int offset = vrd_y__c_buf_p - vrd_y_text_ptr; ++vrd_y__c_buf_p; switch ( vrd_y__get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because vrd_y__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. */ vrd_y_restart( vrd_y_in ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( vrd_y_wrap() ) return EOF; if ( ! vrd_y__did_buffer_switch_on_eof ) VRD_Y__NEW_FILE; #ifdef __cplusplus return vrd_y_input(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: vrd_y__c_buf_p = vrd_y_text_ptr + offset; break; } } } c = *(unsigned char *) vrd_y__c_buf_p; /* cast for 8-bit char's */ *vrd_y__c_buf_p = '\0'; /* preserve vrd_y_text */ vrd_y__hold_char = *++vrd_y__c_buf_p; if ( c == '\n' ) ++vrd_y_lineno; return c; } #endif /* VRD_Y__NO_INPUT */ #ifdef VRD_Y__USE_PROTOS void vrd_y_restart( FILE *input_file ) #else void vrd_y_restart( input_file ) FILE *input_file; #endif { if ( ! vrd_y__current_buffer ) vrd_y__current_buffer = vrd_y__create_buffer( vrd_y_in, VRD_Y__BUF_SIZE ); vrd_y__init_buffer( vrd_y__current_buffer, input_file ); vrd_y__load_buffer_state(); } #ifdef VRD_Y__USE_PROTOS void vrd_y__switch_to_buffer( VRD_Y__BUFFER_STATE new_buffer ) #else void vrd_y__switch_to_buffer( new_buffer ) VRD_Y__BUFFER_STATE new_buffer; #endif { if ( vrd_y__current_buffer == new_buffer ) return; if ( vrd_y__current_buffer ) { /* Flush out information for old buffer. */ *vrd_y__c_buf_p = vrd_y__hold_char; vrd_y__current_buffer->vrd_y__buf_pos = vrd_y__c_buf_p; vrd_y__current_buffer->vrd_y__n_chars = vrd_y__n_chars; } vrd_y__current_buffer = new_buffer; vrd_y__load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (vrd_y_wrap()) processing, but the only time this flag * is looked at is after vrd_y_wrap() is called, so it's safe * to go ahead and always set it. */ vrd_y__did_buffer_switch_on_eof = 1; } #ifdef VRD_Y__USE_PROTOS void vrd_y__load_buffer_state( void ) #else void vrd_y__load_buffer_state() #endif { vrd_y__n_chars = vrd_y__current_buffer->vrd_y__n_chars; vrd_y_text_ptr = vrd_y__c_buf_p = vrd_y__current_buffer->vrd_y__buf_pos; vrd_y_in = vrd_y__current_buffer->vrd_y__input_file; vrd_y__hold_char = *vrd_y__c_buf_p; } #ifdef VRD_Y__USE_PROTOS VRD_Y__BUFFER_STATE vrd_y__create_buffer( FILE *file, int size ) #else VRD_Y__BUFFER_STATE vrd_y__create_buffer( file, size ) FILE *file; int size; #endif { VRD_Y__BUFFER_STATE b; b = (VRD_Y__BUFFER_STATE) vrd_y__flex_alloc( sizeof( struct vrd_y__buffer_state ) ); if ( ! b ) VRD_Y__FATAL_ERROR( "out of dynamic memory in vrd_y__create_buffer()" ); b->vrd_y__buf_size = size; /* vrd_y__ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->vrd_y__ch_buf = (char *) vrd_y__flex_alloc( b->vrd_y__buf_size + 2 ); if ( ! b->vrd_y__ch_buf ) VRD_Y__FATAL_ERROR( "out of dynamic memory in vrd_y__create_buffer()" ); b->vrd_y__is_our_buffer = 1; vrd_y__init_buffer( b, file ); return b; } #ifdef VRD_Y__USE_PROTOS void vrd_y__delete_buffer( VRD_Y__BUFFER_STATE b ) #else void vrd_y__delete_buffer( b ) VRD_Y__BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == vrd_y__current_buffer ) vrd_y__current_buffer = (VRD_Y__BUFFER_STATE) 0; if ( b->vrd_y__is_our_buffer ) vrd_y__flex_free( (void *) b->vrd_y__ch_buf ); vrd_y__flex_free( (void *) b ); } #ifdef VRD_Y__USE_PROTOS void vrd_y__init_buffer( VRD_Y__BUFFER_STATE b, FILE *file ) #else void vrd_y__init_buffer( b, file ) VRD_Y__BUFFER_STATE b; FILE *file; #endif { vrd_y__flush_buffer( b ); b->vrd_y__input_file = file; b->vrd_y__fill_buffer = 1; #if VRD_Y__ALWAYS_INTERACTIVE b->vrd_y__is_interactive = 1; #else #if VRD_Y__NEVER_INTERACTIVE b->vrd_y__is_interactive = 0; #else b->vrd_y__is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef VRD_Y__USE_PROTOS void vrd_y__flush_buffer( VRD_Y__BUFFER_STATE b ) #else void vrd_y__flush_buffer( b ) VRD_Y__BUFFER_STATE b; #endif { if ( ! b ) return; b->vrd_y__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->vrd_y__ch_buf[0] = VRD_Y__END_OF_BUFFER_CHAR; b->vrd_y__ch_buf[1] = VRD_Y__END_OF_BUFFER_CHAR; b->vrd_y__buf_pos = &b->vrd_y__ch_buf[0]; b->vrd_y__at_bol = 1; b->vrd_y__buffer_status = VRD_Y__BUFFER_NEW; if ( b == vrd_y__current_buffer ) vrd_y__load_buffer_state(); } #ifndef VRD_Y__NO_SCAN_BUFFER #ifdef VRD_Y__USE_PROTOS VRD_Y__BUFFER_STATE vrd_y__scan_buffer( char *base, vrd_y__size_t size ) #else VRD_Y__BUFFER_STATE vrd_y__scan_buffer( base, size ) char *base; vrd_y__size_t size; #endif { VRD_Y__BUFFER_STATE b; if ( size < 2 || base[size-2] != VRD_Y__END_OF_BUFFER_CHAR || base[size-1] != VRD_Y__END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (VRD_Y__BUFFER_STATE) vrd_y__flex_alloc( sizeof( struct vrd_y__buffer_state ) ); if ( ! b ) VRD_Y__FATAL_ERROR( "out of dynamic memory in vrd_y__scan_buffer()" ); b->vrd_y__buf_size = size - 2; /* "- 2" to take care of EOB's */ b->vrd_y__buf_pos = b->vrd_y__ch_buf = base; b->vrd_y__is_our_buffer = 0; b->vrd_y__input_file = 0; b->vrd_y__n_chars = b->vrd_y__buf_size; b->vrd_y__is_interactive = 0; b->vrd_y__at_bol = 1; b->vrd_y__fill_buffer = 0; b->vrd_y__buffer_status = VRD_Y__BUFFER_NEW; vrd_y__switch_to_buffer( b ); return b; } #endif #ifndef VRD_Y__NO_SCAN_STRING #ifdef VRD_Y__USE_PROTOS VRD_Y__BUFFER_STATE vrd_y__scan_string( vrd_y_const char *vrd_y__str ) #else VRD_Y__BUFFER_STATE vrd_y__scan_string( vrd_y__str ) vrd_y_const char *vrd_y__str; #endif { int len; for ( len = 0; vrd_y__str[len]; ++len ) ; return vrd_y__scan_bytes( vrd_y__str, len ); } #endif #ifndef VRD_Y__NO_SCAN_BYTES #ifdef VRD_Y__USE_PROTOS VRD_Y__BUFFER_STATE vrd_y__scan_bytes( vrd_y_const char *bytes, int len ) #else VRD_Y__BUFFER_STATE vrd_y__scan_bytes( bytes, len ) vrd_y_const char *bytes; int len; #endif { VRD_Y__BUFFER_STATE b; char *buf; vrd_y__size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) vrd_y__flex_alloc( n ); if ( ! buf ) VRD_Y__FATAL_ERROR( "out of dynamic memory in vrd_y__scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = VRD_Y__END_OF_BUFFER_CHAR; b = vrd_y__scan_buffer( buf, n ); if ( ! b ) VRD_Y__FATAL_ERROR( "bad buffer in vrd_y__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->vrd_y__is_our_buffer = 1; return b; } #endif #ifndef VRD_Y__NO_PUSH_STATE #ifdef VRD_Y__USE_PROTOS static void vrd_y__push_state( int new_state ) #else static void vrd_y__push_state( new_state ) int new_state; #endif { if ( vrd_y__start_stack_ptr >= vrd_y__start_stack_depth ) { vrd_y__size_t new_size; vrd_y__start_stack_depth += VRD_Y__START_STACK_INCR; new_size = vrd_y__start_stack_depth * sizeof( int ); if ( ! vrd_y__start_stack ) vrd_y__start_stack = (int *) vrd_y__flex_alloc( new_size ); else vrd_y__start_stack = (int *) vrd_y__flex_realloc( (void *) vrd_y__start_stack, new_size ); if ( ! vrd_y__start_stack ) VRD_Y__FATAL_ERROR( "out of memory expanding start-condition stack" ); } vrd_y__start_stack[vrd_y__start_stack_ptr++] = VRD_Y__START; BEGIN(new_state); } #endif #ifndef VRD_Y__NO_POP_STATE static void vrd_y__pop_state() { if ( --vrd_y__start_stack_ptr < 0 ) VRD_Y__FATAL_ERROR( "start-condition stack underflow" ); BEGIN(vrd_y__start_stack[vrd_y__start_stack_ptr]); } #endif #ifndef VRD_Y__NO_TOP_STATE static int vrd_y__top_state() { return vrd_y__start_stack[vrd_y__start_stack_ptr - 1]; } #endif #ifndef VRD_Y__EXIT_FAILURE #define VRD_Y__EXIT_FAILURE 2 #endif #ifdef VRD_Y__USE_PROTOS static void vrd_y__fatal_error( vrd_y_const char msg[] ) #else static void vrd_y__fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( VRD_Y__EXIT_FAILURE ); } /* Redefine vrd_y_less() so it works in section 3 code. */ #undef vrd_y_less #define vrd_y_less(n) \ do \ { \ /* Undo effects of setting up vrd_y_text. */ \ vrd_y_text[vrd_y_leng] = vrd_y__hold_char; \ vrd_y__c_buf_p = vrd_y_text + n; \ vrd_y__hold_char = *vrd_y__c_buf_p; \ *vrd_y__c_buf_p = '\0'; \ vrd_y_leng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef vrd_y_text_ptr #ifdef VRD_Y__USE_PROTOS static void vrd_y__flex_strncpy( char *s1, vrd_y_const char *s2, int n ) #else static void vrd_y__flex_strncpy( s1, s2, n ) char *s1; vrd_y_const char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef VRD_Y__NEED_STRLEN #ifdef VRD_Y__USE_PROTOS static int vrd_y__flex_strlen( vrd_y_const char *s ) #else static int vrd_y__flex_strlen( s ) vrd_y_const char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef VRD_Y__USE_PROTOS static void *vrd_y__flex_alloc( vrd_y__size_t size ) #else static void *vrd_y__flex_alloc( size ) vrd_y__size_t size; #endif { return (void *) malloc( size ); } #ifdef VRD_Y__USE_PROTOS static void *vrd_y__flex_realloc( void *ptr, vrd_y__size_t size ) #else static void *vrd_y__flex_realloc( ptr, size ) void *ptr; vrd_y__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 VRD_Y__USE_PROTOS static void vrd_y__flex_free( void *ptr ) #else static void vrd_y__flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if VRD_Y__MAIN int main() { vrd_y_lex(); return 0; } #endif #line 177 "../../../src/druc/src/drucompi_l.l" void DrucEcho ( text ) { if ( DrucStructStat.FLAG_VIEW_RULE_MODE == DRUC_VERBOSE ) { DrucViewString ( text ); } } #ifndef vrd_y_wrap int vrd_y_wrap() { return(1) ; } #endif