⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initscan.c

📁 C++版 词法分析、语法分析器
💻 C
📖 第 1 页 / 共 5 页
字号:
#define yy___fatal_error YY_lex_FATAL_ERROR
#define yy___wrap YY_lex_WRAP

#endif

/* done after the current pattern has been matched and before the
 * corresponding action - sets up yy___text
 */
#define YY_DO_BEFORE_ACTION \
	yy___text = yy_bp; \
/* % code to fiddle yy___text and yy___leng for yymore() goes here */ \
	yy___leng = yy_cp - yy_bp; \
	yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yy_c_buf_p = yy_cp;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

/* return all but the first 'n' matched characters back to the input stream */
#define yyless(n) \
	do \
		{ \
		/* undo effects of setting up yy___text */ \
		*yy_cp = yy_hold_char; \
		yy_c_buf_p = yy_cp = yy_bp + n; \
		YY_DO_BEFORE_ACTION; /* set up yy___text again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yy___text )



struct yy_buffer_state
    {
    FILE *yy_input_file;

    YY_lex_CHAR *yy_ch_buf;               /* input buffer */
    YY_lex_CHAR *yy_buf_pos;      /* current position in input buffer */

    /* size of input buffer in bytes, not including room for EOB characters */
    int yy_buf_size;    

    /* number of characters read into yy_ch_buf, not including EOB characters */
    int yy_n_chars;

    int yy_eof_status;          /* whether we've seen an EOF on this buffer */
#define EOF_NOT_SEEN 0
    /* "pending" happens when the EOF has been seen but there's still
     * some text process
     */
#define EOF_PENDING 1
#define EOF_DONE 2
    };

/* we provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state"
 */

#ifndef YY_USE_CLASS

#if YY_lex_DEBUG != 0
int YY_lex_DEBUG_FLAG=YY_lex_DEBUG_INIT;
#endif
#define YY_CURRENT_BUFFER yy_current_buffer
static YY_BUFFER_STATE yy_current_buffer;
/* yy_hold_char holds the character lost when yy___text is formed */
static YY_lex_CHAR yy_hold_char;

static int yy_n_chars;          /* number of characters read into yy_ch_buf */

/* GLOBAL */
YY_lex_CHAR *yy___text;
int yy___leng;

FILE *yy___in = (FILE *) 0, *yy___out = (FILE *) 0;

#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
/* these variables are all declared out here so that section 3 code can
 * manipulate them
 */
/* points to current character in buffer */
static YY_lex_CHAR *yy_c_buf_p = (YY_lex_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 yy___in.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;

static int yy_get_next_buffer YY_PROTO(( void ));
static void yyunput YY_PROTO(( YY_lex_CHAR c, YY_lex_CHAR *buf_ptr ));

#else
/* c++ */
#ifndef YY_lex_ECHO_NOCODE
void YY_lex_CLASS::yy___echo()
{YY_lex_ECHO_CODE
}
#endif
#ifndef YY_lex_INPUT_NOCODE
int  YY_lex_CLASS::yy___input(char * buffer,int &result,int max_size)
{YY_lex_INPUT_CODE
}
#endif
#ifndef YY_lex_FATAL_ERROR_NOCODE
void YY_lex_CLASS::yy___fatal_error(char *msg)
{YY_lex_FATAL_ERROR_CODE
}
#endif
#ifndef YY_lex_WRAP_NOCODE
int  YY_lex_CLASS::yy___wrap()
{YY_lex_WRAP_CODE
}
#endif
void YY_lex_CLASS::yy_initialize()
{
 yy___in=0;yy___out=0;yy_init = 1;
 yy_start=0;
 yy___text=0;yy___leng=0;
 yy_current_buffer=0;
 yy_did_buffer_switch_on_eof=0;
 yy_c_buf_p=0;yy_hold_char=0;yy_n_chars=0;
#if YY_lex_DEBUG != 0
 YY_lex_DEBUG_FLAG=YY_lex_DEBUG_INIT;
#endif
}

YY_lex_CLASS::YY_lex_CLASS(YY_lex_CONSTRUCTOR_PARAM) YY_lex_CONSTRUCTOR_INIT
{yy_initialize();
 YY_lex_CONSTRUCTOR_CODE;
}

#endif


#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

#ifndef YY_USER_INIT
#define YY_USER_INIT
#endif

/* % data tables for the DFA go here */ 
#define YY_END_OF_BUFFER 147
typedef int yy_state_type;
static const short int yy_acclist[679] =
    {   0,
    16469,16469,  145,  145,  147,   23,  146,   11,   23,  146,
       22,  146,   22,   23,  146,   23,  146,   20,   23,  146,
        1,   11,   23,  146,   21,   22,  146,   21,   22,   23,
      146,   23,  146,   23,  146,   23,  146,   19,   20,   23,
      146,   92,  146,   84,   92,  146,16469, 8277,   93,  146,
     8277,   92,   93,  146,   78,   92,  146,   92,  146,   91,
       92,  146,   76,   92,  146,   92,  146,   92,  146,   92,
      146,   75,   84,   92,  146,16469,   73, 8277,   86,   93,
      146,   73, 8277,   86,   92,   93,  146,   92,  146,   77,
       92,  146,  146,   71,  146,   71,  146,  145,  146,  145,

      146,  145,  146,   52,  146,   53,  146,   52,   53,  146,
       52,  146,   52,  146,   52,  146,   52,  146,   55,  146,
       54,  146,   56,  146,   56,  146,   98,  146,  146,   94,
       98,  146,   95,   98,  146,   97,   98,  146,   99,  146,
      113,  146,  114,  146,  113,  114,  146,  111,  113,  146,
      110,  113,  146,  112,  113,  146,  100,  146,  102,  146,
      102,  146,  101,  146,  100,  146,  106,  146,  105,  106,
      146,  106,  146,  106,  146,  108,  146,  108,  146,  108,
      146,  109,  146,  124,  131,  146,  130,  146,  130,  131,
      146,  129,  131,  146,  131,  146,  131,  146,  125,  131,

      146,  125,  131,  146,  125,  131,  146,  122,  131,  146,
      123,  131,  146,  146,   57,  146,   57,  146,  116,  146,
      116,  146,  115,  146,   36,  146,   38,  146,   38,  146,
       37,  146,  133,  136,  146,  135,  146,  135,  136,  146,
      134,  136,  146,  137,  141,  146,  139,  146,  139,  141,
      146,  140,  141,  146,  141,  146,  120,  146,  120,  146,
      121,  146,  120,  121,  146,  120,  146,  120,  146,  120,
      146,  120,  146,   62,  146,   59,  146,   58,  146,   58,
      146,   62,  146,   62,  146,   68,  146,   66,   68,  146,
       69,  146,   68,   69,  146,   68,  146,   68,  146,   65,

       68,  146,   65,   66,   68,  146,   65,   68,   69,  146,
       65,   68,  146,   64,   65,   68,  146,   65,   68,  146,
       42,  146,   43,  146,   42,   43,  146,   42,  146,   42,
      146,   42,  146,   42,  146,   47,  146,   48,  146,   47,
       48,  146,   47,  146,   47,  146,   47,  146,   47,  146,
       27,  146,   25,   27,  146,   26,  146,   26,   27,  146,
       24,   27,  146,   29,  146,   30,  146,   29,   30,  146,
       28,   29,  146,   33,  146,   32,  146,   32,   33,  146,
       33,  146,   11,   22,   22,   20,    1,   11,   21,   22,
       21,   22,    2,    2,   18,   12,   18,   16,   18,   18,

        5,    6,    4,   19,   20,   84,16469, 8277, 8277, 8277,
       93,   81,  143,  143,  143,   80,   79,   80,   75,   84,
    16469,   73, 8277,   86,   73, 8277,   86,   73, 8277,   86,
       93,   88,   75,   71,   71,   70,   70,   71,   71,  145,
      145,  145,  145,  145,   52,   53,   52,   52,   52,   52,
       55,   54,   56,   96,   97,  114,  110,  102,  144,  144,
      144,  103,  104,  107,  124,  130,  128,  127,  125,  125,
      125,   57,   57,   57,   57,  116,   36,   38,   34,  133,
      135,  132,  137,  139,  138,  120,  120,  120,  121,  117,
      120,  120,  120,  120,   62,   59,   58,   62,   62,   66,

       69,   67,   67,   67,   66,   64,   42,   43,   42,   42,
       42,   42,   47,   48,   47,   47,   47,   47,   25,   26,
       24,   30,   28,   32,   31,   31,   17,   17,    2,    2,
       18,   12,   12,   18,   16,    5,    6,    9,    9,    3,
        3,   82,   83,   83,   89,  143,  143,   80,   80,   90,
       88,   52,   52,   52,   49,   49,  144,  144,  126,  126,
      125,  125,   35,   35,  117,  120,  117,  120,  120,   62,
       62,   63,   63,   67,   67,   42,   42,   42,   39,   39,
       47,   47,   47,   44,   44,   15,   15,    5,   15,   17,
       15,   17,    6,    9,    9,    3,    3,   83,   83,  143,

       52,   52,   49,   49,  144,  126,  126,  125,  125,   35,
       35,  120,  120,   62,   62,   67,   42,   42,   39,   39,
       47,   47,   44,   44,   15,   15,   15,   15,   17,   13,
       52,   52,  125,  125,  120,  120,   62,   62,   42,   42,
       47,   47,    7,   50,   52,   51,   52,  118,  125,  119,
      125,  118,  120,  119,  120,   60,   62,   61,   62,   40,
       42,   41,   42,   45,   47,   46,   47,   14,   87,    8,
       10,   10,   74,   74,   10,   10,   74,   74
    } ;

static const short int yy_accept[531] =
    {   0,
        1,    1,    1,    2,    3,    3,    3,    4,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    6,    8,   11,   13,   16,
       18,   21,   25,   28,   32,   34,   36,   38,   42,   44,
       48,   51,   55,   58,   60,   63,   66,   68,   70,   72,
       77,   82,   88,   90,   93,   94,   96,   98,  100,  102,
      104,  106,  108,  111,  113,  115,  117,  119,  121,  123,

      125,  127,  129,  130,  133,  136,  139,  141,  143,  145,
      148,  151,  154,  157,  159,  161,  163,  165,  167,  169,
      172,  174,  176,  178,  180,  182,  184,  187,  189,  192,
      195,  197,  199,  202,  205,  208,  211,  214,  215,  217,
      219,  221,  223,  225,  227,  229,  231,  233,  236,  238,
      241,  244,  247,  249,  252,  255,  257,  259,  261,  263,
      266,  268,  270,  272,  274,  276,  278,  280,  282,  284,
      286,  288,  291,  293,  296,  298,  300,  303,  307,  311,
      314,  318,  321,  323,  325,  328,  330,  332,  334,  336,
      338,  340,  343,  345,  347,  349,  351,  353,  356,  358,

      361,  364,  366,  368,  371,  374,  376,  378,  381,  383,
      384,  385,  386,  386,  387,  389,  391,  393,  393,  394,
      395,  396,  398,  398,  399,  400,  401,  401,  402,  402,
      402,  403,  403,  404,  404,  406,  408,  409,  410,  410,
      410,  412,  413,  413,  413,  413,  414,  415,  416,  417,
      418,  419,  422,  425,  428,  432,  433,  433,  434,  434,
      435,  436,  437,  438,  440,  441,  442,  443,  445,  446,
      447,  448,  449,  450,  451,  452,  453,  454,  455,  456,
      457,  458,  459,  460,  461,  462,  463,  464,  465,  466,
      467,  467,  468,  468,  469,  469,  470,  471,  472,  472,

      473,  474,  476,  477,  478,  479,  480,  481,  482,  483,
      484,  485,  486,  487,  488,  489,  490,  492,  493,  494,
      495,  496,  497,  498,  499,  500,  501,  502,  502,  503,
      504,  505,  506,  507,  508,  509,  510,  511,  512,  513,
      514,  515,  516,  517,  518,  519,  520,  521,  522,  523,
      524,  525,  526,  527,  527,  528,  529,  531,  532,  533,
      535,  535,  536,  536,  536,  536,  537,  537,  537,  537,
      538,  538,  539,  540,  540,  541,  542,  543,  543,  544,
      545,  545,  546,  546,  546,  547,  548,  549,  550,  551,
      552,  552,  553,  554,  555,  556,  557,  557,  558,  559,

      559,  560,  561,  562,  563,  563,  564,  565,  567,  568,
      569,  570,  571,  572,  572,  573,  574,  575,  576,  577,
      578,  579,  580,  581,  581,  582,  583,  584,  585,  586,
      586,  586,  586,  587,  588,  588,  588,  588,  589,  589,
      591,  593,  593,  593,  594,  596,  598,  600,  600,  600,
      600,  601,  601,  602,  603,  605,  606,  608,  609,  610,
      612,  613,  614,  615,  616,  617,  618,  619,  621,  622,
      623,  625,  627,  627,  627,  627,  630,  630,  631,  631,
      631,  631,  631,  632,  633,  634,  635,  636,  637,  638,
      639,  640,  641,  642,  643,  643,  643,  644,  644,  644,

      644,  646,  648,  650,  652,  654,  656,  658,  660,  662,
      664,  666,  668,  668,  668,  669,  670,  670,  671,  671,
      671,  671,  672,  673,  673,  674,  675,  677,  679,  679
    } ;

static const YY_CHAR yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    4,    5,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    1,    6,    7,    8,    9,    1,   10,   11,
       11,   12,   11,   13,   14,   11,   15,   16,   16,   16,
       16,   16,   16,   16,   16,   16,   16,    1,    1,   17,
        1,   18,   11,    1,   24,   25,   26,   27,   28,   29,
       23,   30,   31,   32,   33,   23,   34,   35,   36,   33,
       23,   37,   38,   39,   40,   23,   23,   41,   42,   23,
       19,   20,   21,   22,   23,    1,   24,   25,   26,   27,

       28,   29,   23,   30,   31,   32,   33,   23,   34,   35,
       36,   33,   23,   37,   38,   39,   40,   23,   23,   41,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -