📄 lexer.c
字号:
/* A lexical scanner generated by flex *//* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ */#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 __IDL_const const#else#define __IDL_const#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 __IDL__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 ((__IDL__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 __IDL_restart( __IDL_in )#define YY_END_OF_BUFFER_CHAR 0/* Size of default input buffer. */#define YY_BUF_SIZE 16384typedef struct __IDL__buffer_state *YY_BUFFER_STATE;extern int __IDL_leng;extern FILE *__IDL_in, *__IDL_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 ) * __IDL_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 __IDL_less() call. *//* Return all but the first 'n' matched characters back to the input stream. */#define __IDL_less(n) \ do \ { \ /* Undo effects of setting up __IDL_text. */ \ *__IDL__cp = __IDL__hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ __IDL__c_buf_p = __IDL__cp = __IDL__bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up __IDL_text again */ \ } \ while ( 0 )#define unput(c) __IDL_unput( c, __IDL_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 __IDL__size_t;struct __IDL__buffer_state { FILE *__IDL__input_file; char *__IDL__ch_buf; /* input buffer */ char *__IDL__buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ __IDL__size_t __IDL__buf_size; /* Number of characters read into __IDL__ch_buf, not including EOB * characters. */ int __IDL__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 __IDL__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 __IDL__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 __IDL__at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int __IDL__fill_buffer; int __IDL__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 __IDL_restart()), so that the user can continue scanning by * just pointing __IDL_in at a new input file. */#define YY_BUFFER_EOF_PENDING 2 };static YY_BUFFER_STATE __IDL__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 __IDL__current_buffer/* __IDL__hold_char holds the character lost when __IDL_text is formed. */static char __IDL__hold_char;static int __IDL__n_chars; /* number of characters read into __IDL__ch_buf */int __IDL_leng;/* Points to current character in buffer. */static char *__IDL__c_buf_p = (char *) 0;static int __IDL__init = 1; /* whether we need to initialize */static int __IDL__start = 0; /* start state number *//* Flag which is used to allow __IDL_wrap()'s to do buffer switches * instead of setting up a fresh __IDL_in. A bit of a hack ... */static int __IDL__did_buffer_switch_on_eof;void __IDL_restart YY_PROTO(( FILE *input_file ));void __IDL__switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));void __IDL__load_buffer_state YY_PROTO(( void ));YY_BUFFER_STATE __IDL__create_buffer YY_PROTO(( FILE *file, int size ));void __IDL__delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));void __IDL__init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));void __IDL__flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));#define YY_FLUSH_BUFFER __IDL__flush_buffer( __IDL__current_buffer )YY_BUFFER_STATE __IDL__scan_buffer YY_PROTO(( char *base, __IDL__size_t size ));YY_BUFFER_STATE __IDL__scan_string YY_PROTO(( __IDL_const char *__IDL__str ));YY_BUFFER_STATE __IDL__scan_bytes YY_PROTO(( __IDL_const char *bytes, int len ));static void *__IDL__flex_alloc YY_PROTO(( __IDL__size_t ));static void *__IDL__flex_realloc YY_PROTO(( void *, __IDL__size_t ));static void __IDL__flex_free YY_PROTO(( void * ));#define __IDL__new_buffer __IDL__create_buffer#define __IDL__set_interactive(is_interactive) \ { \ if ( ! __IDL__current_buffer ) \ __IDL__current_buffer = __IDL__create_buffer( __IDL_in, YY_BUF_SIZE ); \ __IDL__current_buffer->__IDL__is_interactive = is_interactive; \ }#define __IDL__set_bol(at_bol) \ { \ if ( ! __IDL__current_buffer ) \ __IDL__current_buffer = __IDL__create_buffer( __IDL_in, YY_BUF_SIZE ); \ __IDL__current_buffer->__IDL__at_bol = at_bol; \ }#define YY_AT_BOL() (__IDL__current_buffer->__IDL__at_bol)typedef unsigned char YY_CHAR;FILE *__IDL_in = (FILE *) 0, *__IDL_out = (FILE *) 0;typedef int __IDL__state_type;extern char *__IDL_text;#define __IDL_text_ptr __IDL_textstatic __IDL__state_type __IDL__get_previous_state YY_PROTO(( void ));static __IDL__state_type __IDL__try_NUL_trans YY_PROTO(( __IDL__state_type current_state ));static int __IDL__get_next_buffer YY_PROTO(( void ));static void __IDL__fatal_error YY_PROTO(( __IDL_const char msg[] ));/* Done after the current pattern has been matched and before the * corresponding action - sets up __IDL_text. */#define YY_DO_BEFORE_ACTION \ __IDL_text_ptr = __IDL__bp; \ __IDL_leng = (int) (__IDL__cp - __IDL__bp); \ __IDL__hold_char = *__IDL__cp; \ *__IDL__cp = '\0'; \ __IDL__c_buf_p = __IDL__cp;#define YY_NUM_RULES 69#define YY_END_OF_BUFFER 70static __IDL_const short int __IDL__accept[348] = { 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 70, 68, 6, 65, 68, 68, 68, 68, 68, 7, 9, 68, 68, 68, 56, 56, 56, 56, 68, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 6, 5, 68, 68, 68, 60, 59, 68, 6, 65, 68, 6, 5, 3, 3, 3, 3, 3, 3, 6, 0, 64, 0, 63, 0, 12, 8, 12, 67, 66, 12, 7, 11, 0, 0, 9, 52, 54, 53, 56, 58, 56, 56, 56, 57, 57, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 29, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 6, 5, 5, 5, 5, 1, 0, 0, 60, 0, 62, 6, 67, 66, 6, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 12, 8, 0, 66, 12, 0, 12, 10, 56, 56, 56, 57, 16, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 37, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 5, 1, 48, 61, 66, 62, 5, 3, 3, 2, 0, 12, 56, 56, 15, 57, 56, 56, 19, 20, 56, 56, 56, 56, 25, 56, 56, 56, 56, 56, 32, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 49, 56, 56, 5, 5, 3, 13, 56, 57, 56, 56, 21, 56, 56, 56, 56, 27, 28, 30, 56, 56, 56, 35, 56, 56, 56, 56, 41, 56, 56, 56, 56, 46, 56, 50, 56, 5, 5, 3, 14, 57, 56, 56, 56, 56, 24, 56, 56, 33, 34, 36, 38, 56, 56, 42, 43, 44, 56, 56, 56, 5, 5, 3, 57, 56, 18, 22, 23, 56, 56, 56, 56, 45, 56, 51, 4, 4, 3, 57, 56, 56, 56, 39, 40, 47, 4, 4, 4, 4, 4, 3, 3, 57, 17, 26, 31, 57, 0, 0, 0, 55, 0, 0, 0 } ;static __IDL_const int __IDL__ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 5, 1, 6, 1, 7, 8, 9, 10, 1, 1, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 1, 17, 1, 18, 1, 1, 19, 20, 20, 21, 22, 23, 24, 24, 24, 24, 24, 25, 24, 24, 26, 24, 24, 27, 28, 29, 30, 24, 24, 31, 24, 24, 1, 1, 32, 1, 33, 1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 24, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 24, 58, 1, 59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 __IDL_const int __IDL__meta[60] = { 0, 1, 2, 3, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 5, 5, 1, 1, 1, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 1, 8, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1 } ;static __IDL_const short int __IDL__base[373] = { 0, 0, 58, 893, 60, 72, 131, 89, 94, 0, 65, 98, 107, 904, 906, 901, 906, 65, 111, 107, 79, 113, 179, 138, 886, 884, 882, 866, 96, 73, 124, 865, 121, 122, 137, 139, 141, 83, 133, 135, 148, 128, 152, 169, 171, 123, 150, 159, 178, 213, 197, 839, 207, 0, 0, 906, 887, 115, 886, 215, 225, 229, 0, 892, 223, 235, 206, 834, 890, 238, 906, 236, 906, 232, 236, 241, 245, 906, 0, 250, 277, 906, 270, 0, 281, 906, 906, 906, 858, 0, 219, 237, 264, 0, 853, 243, 216, 228, 253, 272, 274, 277, 268, 275, 276, 257, 278, 284, 289, 290, 291, 293, 296, 297, 299, 304, 306, 300, 307, 309, 311, 319, 320, 313, 315, 358, 348, 0, 354, 839, 0, 876, 878, 0, 877, 906, 156, 876, 355, 363, 371, 366, 374, 0, 375, 0, 882, 0, 0, 377, 364, 0, 369, 833, 0, 373, 377, 386, 0, 406, 389, 391, 0, 353, 375, 385, 844, 848, 376, 390, 391, 383, 397, 398, 402, 405, 403, 407, 413, 406, 418, 180, 409, 419, 420, 421, 847, 422, 427, 424, 430, 432, 434, 433, 435, 436, 442, 450, 437, 845, 0, 906, 906, 485, 0, 486, 0, 844, 0, 476, 478, 474, 357, 844, 840, 439, 464, 842, 841, 465, 466, 468, 467, 840, 470, 472, 473, 475, 479, 839, 480, 477, 481, 482, 490, 489, 497, 486, 493, 501, 507, 508, 509, 511, 838, 499, 514, 830, 543, 829, 835, 515, 823, 524, 520, 833, 517, 525, 527, 528, 832, 831, 830, 529, 533, 537, 829, 530, 531, 539, 543, 828, 541, 544, 545, 546, 827, 555, 826, 557, 813, 588, 810, 813, 779, 559, 560, 561, 562, 789, 565, 566, 781, 765, 751, 743, 571, 569, 735, 708, 699, 577, 584, 578, 646, 616, 645, 630, 575, 644, 643, 639, 576, 588, 587, 593, 637, 595, 635, 658, 627, 655, 611, 601, 602, 604, 614, 612, 610, 0, 639, 637, 649, 0, 0, 636, 233, 95, 62, 28, 651, 653, 660, 662, 906, 664, 672, 906, 681, 689, 697, 705, 713, 717, 721, 729, 737, 741, 749, 757, 765, 773, 781, 785, 787, 795, 803, 811, 819, 827, 835, 843, 850 } ;static __IDL_const short int __IDL__def[373] = { 0, 347, 1, 1, 1, 348, 348, 349, 349, 1, 1, 350, 350, 347, 347, 347, 347, 351, 352, 347, 347, 347, 347, 347, 347, 347, 347, 353, 353, 353, 353, 354, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 347, 355, 347, 347, 356, 357, 347, 358, 358, 358, 358, 358, 359, 360, 360, 360, 360, 361, 360, 347, 351, 347, 352, 347, 347, 347, 347, 347, 347, 362, 347, 347, 347, 347, 363, 347, 347, 347, 347, 353, 364, 353, 353, 353, 354, 354, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 347, 355, 355, 355, 355, 365, 347, 356, 357, 358, 347, 358, 358, 366, 358, 359, 359, 359, 355, 359, 360, 360, 360, 367, 360, 361, 361, 361, 361, 368, 347, 347, 347, 362, 347, 347, 347, 363, 353, 353, 353, 354, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 355, 365, 347, 347, 366, 362, 359, 367, 361, 368, 347, 347, 353, 353, 353, 354, 353, 353, 353, 353, 353, 353,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -