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

📄 test.c

📁 一个使用Lex编写的C语言词法加亮的小程序。能将指定的C源程序进行词法加亮
💻 C
📖 第 1 页 / 共 4 页
字号:
       81,   81,   81,   81,   81,   81,   81,   81,   81,  103,

      507,  493,  493,  493,  493,  493,  493,  493,  493,  508,
      503,  493,  496,  496,  496,  496,  496,  496,  496,  496,
      496,  496,  496,  496,  496,  496,  496,  496,  496,  496,
      496,  496,  496,  496,  496,  496,  496,  497,  497,  497,
      497,  497,  497,  497,  497,  497,  180,  497,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,  300,  507,  493,  493,  493,  493,  493,
      493,  493,  493,  509,  496,  496,  496,  496,  496,  496,
      496,  496,  496,  496,  496,  496,  496,  496,  496,  496,

      496,  496,  497,  497,  497,  497,  497,  497,  497,  497,
      346,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,  493,
      494,  493,  493,  493,  493,  493,  493,  493,  496,  496,
      496,  496,  496,  496,  496,  496,  496,  496,  496,  496,
      497,  497,  497,  497,  497,  497,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,  493,  493,
      493,  496,  496,  496,  496,  496,  497,  497,  497,   81,
       81,   81,   81,   81,  493,  496,  496,  496,  497,   81,
       81,   81,    0,  493,  493,  493,  493,  493,  493,  493,

      493,  493,  493,  493,  493,  493,  493,  493,  493
    } ;

static const short int yy_nxt[1056] =
    {   0,
        8,    9,   10,   11,   12,   13,   14,   15,   16,   17,
       18,   19,   20,   21,   22,   23,   24,   25,   26,   27,
       27,   28,   29,   30,   31,   32,   33,   34,   34,   34,
       34,   34,   35,    8,   36,   37,    8,   38,   39,   40,
       41,   42,   43,   44,   34,   45,   34,   34,   46,   34,
       34,   34,   47,   48,   49,   50,   51,   52,   34,   34,
       34,   53,   54,   55,   56,   57,   58,   59,   60,   61,
       62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
       72,   73,   74,   74,   75,   76,   77,   78,   79,   80,
       81,   81,   81,   81,   81,   82,   55,   83,   84,   55,

       85,   86,   87,   88,   89,   90,   91,   81,   92,   81,
       81,   93,   81,   81,   81,   94,   95,   96,   97,   98,
       99,   81,   81,   81,  100,  101,  102,  102,  107,  103,
      103,  109,  117,  109,  119,  119,  119,  121,  246,  122,
      122,  123,  118,  317,  318,  139,  136,  104,  104,  247,
      141,  124,  125,  137,  140,  143,  108,  144,  146,  138,
      142,  162,  173,  196,  164,  147,  164,  201,  106,  124,
      110,  111,  174,  197,  202,  112,  124,  150,  151,  125,
      121,  492,  126,  126,  126,  159,  198,  152,  199,  163,
      153,  194,  127,  128,  129,  114,  175,  175,  175,  106,

      195,  107,  217,  165,  166,  127,  128,  176,  167,  177,
      177,  178,  129,  191,  205,  206,  170,  250,  221,  129,
      192,  179,  180,  254,  207,  222,  193,  208,  491,  108,
      218,  255,  251,  109,  225,  109,  288,  107,  121,  179,
      123,  123,  123,  226,  226,  292,  179,  289,  263,  180,
      176,  107,  181,  181,  181,  264,  227,  119,  119,  119,
      293,  296,  182,  183,  184,  108,  301,  127,  128,  297,
      353,  354,  110,  111,  493,  182,  183,  112,  490,  108,
      127,  128,  184,  227,  176,  489,  178,  178,  178,  184,
      159,  159,  159,  159,  159,  159,  159,  159,  159,  159,

      159,  159,  488,  159,  159,  159,  159,  159,  188,  188,
      188,  159,  159,  159,  159,  159,  159,  188,  188,  188,
      188,  188,  159,  159,  159,  159,  159,  188,  188,  188,
      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
      188,  188,  188,  188,  188,  188,  188,  188,  188,  188,
      188,  159,  159,  107,  430,  304,  162,  487,  340,  228,
      228,  228,  486,  106,  305,  485,  230,  341,  230,  127,
      128,  231,  231,  231,  431,  214,  214,  214,  214,  214,
      484,  108,  127,  128,  163,  214,  214,  214,  214,  214,
      214,  214,  214,  214,  214,  214,  214,  214,  214,  214,

      214,  214,  214,  214,  214,  214,  214,  214,  214,  121,
      483,  122,  122,  123,  161,  159,  164,  259,  164,  175,
      175,  175,  267,  124,  216,  224,  270,  270,  270,  182,
      183,  268,  268,  272,  482,  272,  182,  183,  273,  273,
      273,  124,  182,  183,  269,  260,  162,  311,  124,  182,
      183,  106,  481,  106,  217,  165,  166,  308,  432,  176,
      167,  177,  177,  178,  107,  312,  309,  309,  231,  231,
      231,  269,  312,  179,  163,  480,  410,  344,  432,  228,
      228,  228,  218,  231,  231,  231,  345,  345,  479,  127,
      128,  179,  108,  478,  128,  477,  381,  162,  179,  271,

      271,  271,  127,  128,  106,  382,  382,  128,  271,  271,
      271,  271,  271,  271,  271,  271,  271,  271,  271,  271,
      271,  271,  271,  271,  176,  163,  181,  181,  181,  161,
      347,  408,  259,  273,  273,  273,  182,  183,  184,  216,
      409,  409,  270,  270,  270,  476,  475,  474,  348,  182,
      183,  311,  182,  183,  347,  348,  184,  273,  273,  273,
      260,  473,  472,  184,  343,  182,  183,  383,  183,  312,
      471,  470,  348,  346,  346,  346,  312,  469,  468,  348,
      467,  183,  346,  346,  346,  346,  346,  346,  346,  346,
      346,  346,  346,  346,  346,  346,  346,  346,  374,  374,

      374,  374,  374,  466,  465,  464,  463,  462,  374,  374,
      374,  374,  374,  374,  374,  374,  374,  374,  374,  374,
      374,  374,  374,  374,  374,  374,  374,  374,  374,  374,
      374,  374,  410,  461,  460,  459,  458,  457,  408,  455,
      454,  411,  411,  411,  453,  452,  451,  450,  449,  448,
      411,  411,  411,  411,  411,  411,  411,  411,  411,  411,
      411,  411,  411,  411,  411,  411,  456,  456,  456,  447,
      446,  445,  444,  443,  442,  456,  456,  456,  456,  456,
      456,  456,  456,  456,  456,  456,  456,  456,  456,  456,
      456,  106,  106,  106,  106,  106,  106,  106,  106,  106,

      114,  441,  114,  114,  114,  114,  114,  114,  114,  133,
      440,  133,  439,  133,  159,  159,  159,  383,  159,  159,
      159,  159,  159,  161,  161,  161,  161,  161,  161,  161,
      161,  161,  169,  169,  169,  169,  169,  169,  169,  169,
      169,  215,  215,  381,  215,  216,  216,  216,  216,  216,
      216,  216,  216,  216,  224,  437,  224,  224,  224,  224,
      224,  224,  224,  229,  436,  229,  229,  258,  258,  258,
      258,  258,  258,  258,  258,  258,  266,  266,  266,  266,
      266,  266,  266,  266,  266,  310,  435,  310,  434,  310,
      310,  375,  433,  375,  384,  429,  384,  428,  384,  384,

      438,  427,  438,  426,  438,  438,  425,  424,  423,  422,
      421,  420,  419,  418,  417,  416,  415,  414,  413,  412,
      407,  406,  405,  404,  403,  402,  401,  400,  399,  398,
      397,  396,  395,  394,  393,  392,  391,  390,  389,  388,
      387,  386,  385,  383,  380,  379,  378,  377,  376,  373,
      372,  371,  370,  369,  368,  367,  366,  365,  364,  363,
      362,  361,  360,  359,  358,  357,  356,  355,  352,  351,
      350,  349,  343,  343,  342,  339,  338,  337,  336,  335,
      334,  333,  332,  331,  330,  329,  328,  327,  326,  325,
      324,  323,  322,  321,  320,  319,  316,  315,  314,  313,

      307,  307,  307,  306,  303,  302,  300,  299,  298,  295,
      294,  291,  290,  287,  286,  285,  284,  283,  282,  281,
      280,  279,  278,  277,  276,  275,  274,  265,  262,  261,
      257,  256,  253,  252,  249,  248,  245,  244,  243,  242,
      241,  240,  239,  238,  237,  236,  235,  234,  233,  232,
      223,  220,  219,  130,  213,  212,  211,  210,  209,  204,
      203,  200,  190,  189,  187,  186,  185,  120,  172,  171,
      168,  160,  158,  157,  156,  155,  154,  149,  148,  145,
      135,  134,  132,  131,  130,  120,  116,  115,  113,  105,
      493,    7,  493,  493,  493,  493,  493,  493,  493,  493,

      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493
    } ;

static const short int yy_chk[1056] =
    {   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,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,

        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    5,    6,   13,    5,
        6,   14,   23,   14,   24,   24,   24,   26,  149,   26,
       26,   26,   23,  236,  236,   41,   40,    5,    6,  149,
       42,   26,   26,   40,   41,   43,   13,   43,   45,   40,
       42,   60,   70,   89,   61,   45,   61,   92,   60,   26,
       14,   14,   70,   89,   92,   14,   26,   48,   48,   26,
       27,  484,   27,   27,   27,   64,   90,   48,   90,   60,
       48,   88,   27,   27,   27,   64,   71,   71,   71,  108,

       88,  106,  108,   61,   61,   27,   27,   73,   61,   73,
       73,   73,   27,   87,   95,   95,   64,  152,  112,   27,
       87,   73,   73,  155,   95,  112,   87,   95,  482,  106,
      108,  155,  152,  109,  115,  109,  204,  216,  123,   73,
      123,  123,  123,  115,  115,  207,   73,  204,  167,   73,
       74,  217,   74,   74,   74,  167,  115,  119,  119,  119,
      207,  210,   74,   74,   74,  216,  215,  119,  119,  210,
      278,  278,  109,  109,  215,   74,   74,  109,  480,  217,
      119,  119,   74,  115,  178,  479,  178,  178,  178,   74,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,

       81,   81,  476,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,  103,  374,  221,  161,  474,  263,  121,
      121,  121,  472,  161,  221,  471,  127,  263,  127,  121,
      121,  127,  127,  127,  374,  103,  103,  103,  103,  103,
      468,  103,  121,  121,  161,  103,  103,  103,  103,  103,
      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,

      103,  103,  103,  103,  103,  103,  103,  103,  103,  122,
      467,  122,  122,  122,  163,  170,  164,  163,  164,  175,
      175,  175,  170,  122,  163,  170,  176,  176,  176,  175,
      175,  170,  170,  182,  461,  182,  176,  176,  182,  182,
      182,  122,  175,  175,  170,  163,  258,  229,  122,  176,
      176,  218,  458,  258,  218,  164,  164,  226,  375,  177,
      164,  177,  177,  177,  431,  229,  226,  226,  230,  230,
      230,  170,  229,  177,  258,  457,  456,  268,  375,  228,
      228,  228,  218,  231,  231,  231,  268,  268,  455,  228,
      228,  177,  431,  454,  231,  451,  309,  259,  177,  180,

      180,  180,  228,  228,  259,  309,  309,  231,  180,  180,
      180,  180,  180,  180,  180,  180,  180,  180,  180,  180,
      180,  180,  180,  180,  181,  259,  181,  181,  181,  260,
      271,  345,  260,  272,  272,  272,  181,  181,  181,  260,
      345,  345,  270,  270,  270,  450,  449,  443,  271,  181,
      181,  311,  270,  270,  347,  271,  181,  273,  273,  273,
      260,  440,  439,  181,  269,  270,  270,  438,  273,  311,
      437,  436,  347,  269,  269,  269,  311,  433,  428,  347,
      426,  273,  269,  269,  269,  269,  269,  269,  269,  269,
      269,  269,  269,  269,  269,  269,  269,  269,  300,  300,

      300,  300,  300,  425,  424,  423,  422,  420,  300,  300,
      300,  300,  300,  300,  300,  300,  300,  300,  300,  300,
      300,  300,  300,  300,  300,  300,  300,  300,  300,  300,
      300,  300,  346,  419,  417,  416,  415,  414,  409,  407,
      406,  346,  346,  346,  405,  404,  403,  401,  399,  398,
      346,  346,  346,  346,  346,  346,  346,  346,  346,  346,
      346,  346,  346,  346,  346,  346,  411,  411,  411,  397,
      396,  395,  393,  392,  390,  411,  411,  411,  411,  411,
      411,  411,  411,  411,  411,  411,  411,  411,  411,  411,
      411,  494,  494,  494,  494,  494,  494,  494,  494,  494,

      495,  389,  495,  495,  495,  495,  495,  495,  495,  496,
      388,  496,  387,  496,  497,  497,  497,  384,  497,  497,
      497,  497,  497,  498,  498,  498,  498,  498,  498,  498,
      498,  498,  499,  499,  499,  499,  499,  499,  499,  499,
      499,  500,  500,  382,  500,  501,  501,  501,  501,  501,
      501,  501,  501,  501,  502,  380,  502,  502,  502,  502,
      502,  502,  502,  503,  379,  503,  503,  504,  504,  504,
      504,  504,  504,  504,  504,  504,  505,  505,  505,  505,
      505,  505,  505,  505,  505,  506,  378,  506,  377,  506,
      506,  507,  376,  507,  508,  373,  508,  371,  508,  508,

      509,  370,  509,  369,  509,  509,  368,  367,  366,  365,
      364,  363,  362,  359,  358,  356,  355,  354,  353,  350,
      342,  341,  340,  339,  338,  337,  335,  334,  333,  332,
      331,  330,  329,  328,  327,  326,  323,  322,  320,  319,
      318,  317,  314,  310,  306,  305,  304,  303,  302,  299,
      298,  297,  296,  295,  294,  293,  292,  291,  290,  289,
      288,  287,  285,  283,  282,  281,  280,  279,  277,  276,
      275,  274,  267,  266,  264,  262,  261,  257,  256,  255,
      254,  253,  252,  251,  250,  249,  248,  247,  246,  245,
      243,  241,  240,  239,  238,  237,  235,  234,  233,  232,

      227,  225,  224,  222,  220,  219,  214,  212,  211,  209,
      208,  206,  205,  203,  202,  200,  199,  198,  197,  196,
      195,  194,  193,  192,  191,  190,  189,  169,  166,  165,
      157,  156,  154,  153,  151,  150,  148,  147,  145,  144,
      143,  142,  141,  140,  139,  138,  137,  136,  135,  134,
      114,  111,  110,  104,  100,   99,   98,   97,   96,   94,
       93,   91,   86,   85,   79,   78,   77,   72,   68,   67,
       63,   59,   53,   52,   51,   50,   49,   47,   46,   44,
       39,   38,   32,   31,   30,   25,   21,   17,   16,   12,
        7,  493,  493,  493,  493,  493,  493,  493,  493,  493,

      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493
    } ;

/* 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

/* these variables are all declared out here so that section 3 code can
 * manipulate them
 */
static unsigned char  *yy_c_buf_p;	/* points to current character in buffer */
static int yy_init = 1;		/* whether we need to initialize */
static int yy_start = 0;	/* start state number */

/* true when we've seen an EOF for the current input file */
static int yy_eof_has_been_seen;

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

/* yy_ch_buf has to be 2 characters longer than YY_BUF_SIZE because we need
 * to put in 2 end-of-buffer characters (this is explained where it is
 * done) at the end of yy_ch_buf
 */
static unsigned char  yy_ch_buf[YY_BUF_SIZE + 2];

/* yy_hold_char holds the character lost when yytext is formed */
static unsigned char  yy_hold_char;

static yy_state_type yy_last_accepting_state;
static unsigned char  *yy_last_accepting_cpos;

static yy_state_type yy_get_previous_state( void );
static int yy_get_next_buffer( void );
static void yyunput( int c, unsigned char  *buf_ptr );
static int input( void );
static void yyrestart( FILE *input_file );

YY_DECL
    {
    register yy_state_type yy_current_state;
	register unsigned char  *yy_cp, *yy_bp;
    register int yy_act;


                 /*以下是识别规则部分*/
                 /*识别注释*/

    if ( yy_init )
	{
	if ( ! yy_start )
	    yy_start = 1;	/* first start state */

	if ( ! yyin )
	    yyin = stdin;

	if ( ! yyout )
	    yyout = stdout;

new_file:
	/* this is where we enter upon encountering an end-of-file and
	 * yywrap() indicating that we should continue processing
	 */

	/* we put in the '\n' and start reading from [1] so that an
	 * initial match-at-newline will be true.
	 */

	yy_ch_buf[0] = '\n';
	yy_n_chars = 1;

	/* 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.
	 */
	yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	yy_eof_has_been_seen = 0;

	yytext = yy_c_buf_p = &yy_ch_buf[1];
	yy_hold_char = *yy_c_buf_p;
	yy_init = 0;
	}

    while ( 1 )		/* loops until end-of-file is reached */
	{
	yy_cp = yy_c_buf_p;

	/* support of yytext */

⌨️ 快捷键说明

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