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

📄 scan-gram.c

📁 bison 2.0 主要可以用来做语法分析用的
💻 C
📖 第 1 页 / 共 5 页
字号:
      641,  664,  626,  625,  661,  640,  633,  634,  359,  297,      622,  622,  619,  632,  621,  628,  624,  620,  614,  617,      623,  622,  612,  623,  621,  618,  732,    0,    0,  396,      606,  614,  601,  606,  602,  614,  600,  612,  633,  609,      597,  602,    0,  595,  591,  603,  319,  602,  597,  588,      599,  591,  583,  596,    0,  582,  365,  581,  593,  579,        0,  583,    0,  582,  580,    0,  620,    0,    0,  570,        0,  580,  585,  570,    0,  385,  570,  572,  386,  585,      584,  583,  574,    0,  567,  575,  567,  562,  560,    0,      559,  595,  570,  559,    0,  555,    0,  387,    0,  555,      404,    0,  732,    0,  553,  553,  566,  548,  392,  551,      552,  549,  553,  547,  548,  545,  559,  554,  544,  552,        0,  541,  539,  553,  539,  534,  546,  411,  394,    0,      532,  544,  532,  542,  527,  528,  563,  542,  529,  536,      521,  522,  535,  521,  535,    0,  519,  521,  532,    0,      558,  516,  516,  513,  512,  521,  508,  520,  523,  511,      505,  515,  509,    0,    0,  507,  502,  500,    0,  514,      541,  498,  497,  510,    0,  502,  495,  493,  505,    0,        0,  498,  488,  496,  503,  498,  491,  527,  188,  495,        0,  485,  477,  478,    0,  478,  474,  398,  481,  481,      476,  486,  732,  487,  472,    0,  470,  478,    0,  471,      476,    0,    0,    0,    0,  479,  410,  464,  456,  448,        0,  443,  429,  404,  390,  398,    0,  403,  396,  393,        0,  400,  397,  420,  383,  384,    0,  392,  362,  354,      364,  348,    0,  732,  441,  448,  455,  462,  465,  471,      477,  484,  488,  494,  346,  343,  328,  260,  501,  243,      233,  203,  197,  138,   69,  507    } ;static yyconst short int yy_def[477] =    {   0,      454,    1,  455,  455,  455,  455,  456,  456,  455,  455,      455,  455,  457,  457,  455,  455,  455,  455,  458,  458,      455,   21,   21,   21,   21,   21,  454,  454,  454,  454,      454,  454,  454,  454,  459,  454,  454,  454,  454,  460,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  461,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  462,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  454,  459,  454,  464,      454,  465,  460,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  466,  454,  454,  454,      454,  454,  454,  467,  454,  468,  454,  454,  454,  469,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      464,  465,  454,  454,  454,  454,  454,  454,  454,  454,      461,  454,  470,  471,  468,  469,  454,  454,  454,  454,      454,  454,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  454,  454,  472,  473,  454,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  454,  474,  475,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      454,  467,  454,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  454,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      454,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      476,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  476,  476,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  454,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,  463,  463,  463,  463,  463,  463,  463,      463,  463,  463,    0,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454    } ;static yyconst short int yy_nxt[790] =    {   0,       28,   29,   30,   29,   31,   28,   28,   32,   33,   28,       34,   28,   35,   36,   37,   38,   38,   28,   39,   40,       41,   28,   28,   28,   35,   35,   35,   28,   28,   28,       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,       35,   35,   35,   42,   43,   28,   28,   46,   46,   47,       87,   47,   47,  109,   48,   48,   52,  110,  141,   52,       47,  115,   45,   47,  313,  142,   49,  109,   49,   49,      162,  110,   50,   50,   51,   51,  116,   49,  155,  163,       49,   50,   53,   51,   50,   53,   51,   56,  156,   57,       56,   47,   57,   67,   47,   68,   45,   59,   45,  210,       59,   47,  173,   60,   47,   67,   60,   68,   49,  211,      174,   49,   50,   58,   51,   50,   58,   51,   49,   69,      146,   49,   50,   58,   51,   50,   58,   51,   62,   30,       62,   69,  147,  312,   62,   30,   62,   63,   66,   71,       64,  148,   71,   63,   65,   72,   64,   70,   72,  214,       65,   74,   30,   74,  111,  111,  111,  109,  143,   70,       75,  110,  144,   76,  215,   69,   47,   87,   69,   74,       30,   74,  224,   77,   47,   45,  225,  145,   75,   45,      413,   76,  399,   49,  117,  118,  117,   45,  111,  111,      111,   49,  279,   70,   47,   45,   70,   46,  278,   78,      112,   79,   80,   81,  121,  122,  121,   45,   82,  192,      192,   49,  157,   45,   83,   45,  165,  158,   84,  115,      454,   45,   50,   45,   51,  112,  219,  137,  239,  166,      175,  123,  138,  167,  116,  139,  139,  139,  238,  176,      140,   45,  169,   45,  149,  219,  123,  177,   85,  150,       86,   88,  151,  151,  151,  195,   89,  170,  220,  243,      171,  111,  111,  111,  185,  186,  185,  244,   89,   89,       89,  117,  118,  117,   89,   89,   90,   89,   91,   92,       93,   94,   89,   95,   89,   96,   97,   98,   99,  100,      101,  102,  103,  104,  105,   89,  106,  107,  125,  188,      122,  188,  125,  190,  191,  190,  237,  237,  126,  126,      139,  139,  139,  139,  139,  139,  125,  141,  260,  127,      295,  261,  125,  194,  142,  128,  129,  197,  198,  197,      130,  199,  200,  199,  201,  202,  201,  131,  193,  295,      132,  182,  133,  134,  135,  136,  151,  151,  151,  151,      151,  151,  204,  185,  186,  185,  205,  117,  118,  117,      188,  122,  188,  188,  122,  188,  304,  206,  190,  191,      190,  197,  198,  197,  199,  200,  199,  143,  201,  202,      201,  144,  146,  258,  453,  304,  318,  321,  336,  452,      259,  451,  137,  343,  147,  362,  145,  138,  450,  420,      139,  139,  139,  148,  361,  318,  321,  336,  338,  338,      338,  432,  343,  449,  362,  338,  338,  338,  420,  448,      447,  446,  445,  444,  443,  442,  441,  440,  439,  438,      432,   45,   45,   45,   45,   45,   45,   45,   54,   54,       54,   54,   54,   54,   54,   61,   61,   61,   61,   61,       61,   61,   73,   73,   73,   73,   73,   73,   73,  108,      108,  113,  437,  113,  113,  113,  113,  120,  120,  436,      120,  120,  120,  120,  124,  124,  124,  124,  124,  124,      124,  153,  153,  153,  181,  435,  181,  181,  181,  181,      181,  196,  434,  196,  196,  196,  196,  398,  433,  398,      398,  398,  398,  398,  431,  430,  429,  428,  427,  426,      425,  424,  423,  422,  421,  419,  418,  417,  416,  415,      414,  399,  412,  411,  410,  409,  408,  407,  406,  405,      404,  403,  402,  401,  400,  399,  397,  396,  395,  394,      393,  392,  391,  390,  389,  388,  387,  386,  385,  384,      383,  382,  381,  380,  379,  378,  377,  376,  375,  374,      373,  372,  371,  370,  369,  368,  367,  366,  365,  364,      363,  360,  359,  358,  357,  356,  355,  354,  353,  352,      351,  350,  349,  348,  347,  346,  345,  344,  342,  341,      340,  339,  337,  335,  334,  333,  332,  331,  330,  329,      328,  327,  326,  325,  324,  323,  322,  320,  319,  317,      316,  315,  314,  311,  310,  309,  308,  307,  306,  305,      303,  302,  301,  300,  299,  298,  297,  296,  294,  293,      292,  291,  290,  289,  288,  287,  286,  285,  284,  283,      282,  281,  280,  277,  276,  275,  274,  273,  272,  271,      270,  269,  268,  267,  266,  265,  264,  263,  262,  257,      256,  255,  254,  253,  252,  251,  250,  249,  248,  247,      246,  245,  242,  241,  240,  236,  235,  234,  233,  232,      231,  230,  229,  228,  227,  226,  223,  222,  221,  218,      217,  216,  213,  212,  209,  208,  207,  203,  189,  187,      184,  183,  180,  179,  178,  172,  168,  164,  161,  160,      159,  154,  152,  114,  114,  119,  114,  454,   55,   55,       44,   27,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454    } ;static yyconst short int yy_chk[790] =    {   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,    3,    4,   23,       23,    3,    4,   36,    3,    4,    5,   36,   80,    6,        5,   48,   23,    6,  475,   80,   23,   64,    3,    4,       96,   64,    3,    4,    3,    4,   48,    5,   91,   96,        6,    5,    5,    5,    6,    6,    6,    9,   91,    9,       10,    9,   10,   15,   10,   15,   23,   11,   23,  159,       12,   11,  102,   11,   12,   16,   12,   16,    9,  159,      102,   10,    9,    9,    9,   10,   10,   10,   11,   15,       83,   12,   11,   11,   11,   12,   12,   12,   13,   13,       13,   16,   83,  474,   14,   14,   14,   13,   14,   17,       13,   83,   18,   14,   13,   17,   14,   15,   18,  162,       14,   19,   19,   19,   38,   38,   38,   76,   82,   16,       19,   76,   82,   19,  162,   17,   24,   24,   18,   20,       20,   20,  170,   20,   25,   25,  170,   82,   20,   24,      399,   20,  399,   24,   53,   53,   53,   25,   37,   37,       37,   25,  473,   17,   26,   26,   18,   21,  472,   21,       37,   21,   21,   21,   58,   58,   58,   26,   21,  126,      126,   26,   92,   24,   21,   24,   98,   92,   21,  186,      191,   25,   21,   25,   21,   37,  166,   79,  471,   98,      103,   58,   79,   98,  186,   79,   79,   79,  470,  103,       79,   26,  100,   26,   84,  166,  191,  103,   21,   84,       21,   32,   84,   84,   84,  468,   32,  100,  166,  205,      100,  111,  111,  111,  116,  116,  116,  205,   32,   32,       32,  117,  117,  117,   32,   32,   32,   32,   32,   32,       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,       32,   32,   32,   32,   32,   32,   32,   32,   69,  121,      121,  121,   69,  123,  123,  123,  192,  192,   69,   69,      138,  138,  138,  139,  139,  139,   69,  198,  220,   69,      257,  220,   69,  467,  198,   69,   69,  142,  142,  142,       69,  145,  145,  145,  148,  148,  148,   69,  466,  257,       69,  465,   69,   69,   69,   69,  150,  150,  150,  151,      151,  151,  155,  185,  185,  185,  155,  187,  187,  187,      188,  188,  188,  189,  189,  189,  267,  155,  190,  190,      190,  197,  197,  197,  199,  199,  199,  200,  201,  201,      201,  200,  202,  219,  452,  267,  286,  289,  308,  451,      219,  450,  240,  319,  202,  339,  200,  240,  449,  408,      240,  240,  240,  202,  338,  286,  289,  308,  311,  311,      311,  427,  319,  448,  339,  338,  338,  338,  408,  446,      445,  444,  443,  442,  440,  439,  438,  436,  435,  434,      427,  455,  455,  455,  455,  455,  455,  455,  456,  456,      456,  456,  456,  456,  456,  457,  457,  457,  457,  457,      457,  457,  458,  458,  458,  458,  458,  458,  458,  459,      459,  460,  433,  460,  460,  460,  460,  461,  461,  432,      461,  461,  461,  461,  462,  462,  462,  462,  462,  462,      462,  463,  463,  463,  464,  430,  464,  464,  464,  464,      464,  469,  429,  469,  469,  469,  469,  476,  428,  476,      476,  476,  476,  476,  426,  421,  420,  418,  417,  415,      414,  412,  411,  410,  409,  407,  406,  404,  403,  402,      400,  398,  397,  396,  395,  394,  393,  392,  389,  388,      387,  386,  384,  383,  382,  381,  380,  378,  377,  376,      373,  372,  371,  370,  369,  368,  367,  366,  365,  364,      363,  362,  361,  359,  358,  357,  355,  354,  353,  352,      351,  350,  349,  348,  347,  346,  345,  344,  343,  342,      341,  337,  336,  335,  334,  333,  332,  330,  329,  328,      327,  326,  325,  324,  323,  322,  321,  320,  318,  317,      316,  315,  310,  306,  304,  303,  302,  301,  299,  298,      297,  296,  295,  293,  292,  291,  290,  288,  287,  284,      283,  282,  280,  277,  275,  274,  272,  270,  269,  268,      266,  264,  263,  262,  261,  260,  259,  258,  256,  255,      254,  252,  251,  250,  249,  248,  247,  246,  245,  244,      243,  242,  241,  236,  235,  234,  233,  232,  231,  230,      229,  228,  227,  226,  225,  224,  223,  222,  221,  218,      217,  216,  215,  214,  213,  212,  211,  210,  209,  208,      207,  206,  204,  203,  196,  184,  180,  179,  178,  177,      176,  175,  174,  173,  172,  171,  169,  168,  167,  165,      164,  163,  161,  160,  158,  157,  156,  154,  122,  118,      114,  113,  106,  105,  104,  101,   99,   97,   95,   94,       93,   90,   87,   77,   66,   55,   44,   27,    8,    7,        2,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454    } ;static yy_state_type yy_last_accepting_state;static char *yy_last_accepting_cpos;extern int yy_flex_debug;int yy_flex_debug = 1;static yyconst short int yy_rule_linenum[106] =    {   0,      162,  163,  164,  165,  173,  184,  185,  186,  187,  188,      189,  190,  191,  192,  193,  194,  195,  196,  197,  198,      199,  200,  201,  202,  203,  204,  205,  206,  207,  208,      209,  210,  211,  212,  213,  214,  215,  216,  217,  218,      219,  220,  221,  222,  224,  228,  229,  230,  232,  239,      243,  249,  252,  255,  258,  267,  275,  282,  299,  305,      326,  327,  338,  349,  350,  362,  371,  382,  396,  402,      412,  422,  434,  435,  436,  437,  438,  439,  440,  443,      445,  454,  466,  471,  472,  478,  479,  490,  496,  502,      508,  524,  558,  559,  560,  595,  597,  598,  610,  645,      646,  647,  648,  656,  657    } ;/* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */#define REJECT reject_used_but_not_detected#define yymore() yymore_used_but_not_detected#define YY_MORE_ADJ 0#define YY_RESTORE_YY_MORE_OFFSETchar *yytext;#line 1 "scan-gram.l"#define INITIAL 0/* Bison Grammar Scanner                             -*- C -*-   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.   This file is part of Bison, the GNU Compiler Compiler.   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA   02111-1307  USA*/#define YY_NO_UNPUT 1#define YY_NEVER_INTERACTIVE 1#line 27 "scan-gram.l"#include "system.h"#include <mbswidth.h>#include <get-errno.h>#include <quote.h>#include "complain.h"#include "files.h"#include "getargs.h"#include "gram.h"#include "reader.h"#include "uniqstr.h"#define YY_USER_INIT					\  do							\    {							\      scanner_cursor.file = current_file;		\      scanner_cursor.line = 1;				\      scanner_cursor.column = 1;			\      code_start = scanner_cursor;			\    }							\  while (0)/* Location of scanner cursor.  */boundary scanner_cursor;static void adjust_location (location *, char const *, size_t);#define YY_USER_ACTION  adjust_location (loc, yytext, yyleng);static size_t no_cr_read (FILE *, char *, size_t);#define YY_INPUT(buf, result, size) ((result) = no_cr_read (yyin, buf, size))/* OBSTACK_FOR_STRING -- Used to store all the characters that we need to   keep (to construct ID, STRINGS etc.).  Use the following macros to   use it.   Use STRING_GROW to append what has just been matched, and   STRING_FINISH to end the string (it puts the ending 0).   STRING_FINISH also stores this string in LAST_STRING, which can be   used, and which is used by STRING_FREE to free the last string.  */static struct obstack obstack_for_string;/* A string representing the most recently saved token.  */static char *last_string;#define STRING_GROW   \  obstack_grow (&obstack_for_string, yytext, yyleng)#define STRING_FINISH					\  do {							\    obstack_1grow (&obstack_for_string, '\0');		\    last_string = obstack_finish (&obstack_for_string);	\  } while (0)#define STRING_FREE \  obstack_free (&obstack_for_string, last_string)voidscanner_last_string_free (void){  STRING_FREE;}/* Within well-formed rules, RULE_LENGTH is the number of values in   the current rule so far, which says where to find `$0' with respect   to the top of the stack.  It is not the same as the rule->length in   the case of mid rule actions.   Outside of well-formed rules, RULE_LENGTH has an undefined value.  */static int rule_length;static void handle_dollar (int token_type, char *cp, location loc);static void handle_at (int token_type, char *cp, location loc);static void handle_syncline (char *args);static unsigned long int scan_integer (char const *p, int base, location loc);static int convert_ucn_to_byte (char const *hex_text);static void unexpected_eof (boundary, char const *);static void unexpected_newline (boundary, char const *);#define SC_COMMENT 1#define SC_LINE_COMMENT 2#define SC_YACC_COMMENT 3#define SC_STRING 4#define SC_CHARACTER 5#define SC_AFTER_IDENTIFIER 6#define SC_ESCAPED_STRING 7#define SC_ESCAPED_CHARACTER 8#define SC_PRE_CODE 9#define SC_BRACED_CODE 10#define SC_PROLOGUE 11#define SC_EPILOGUE 12/* POSIX says that a tag must be both an id and a C union member, but   historically almost any character is allowed in a tag.  We disallow   NUL and newline, as this simplifies our implementation.  *//* Zero or more instances of backslash-newline.  Following GCC, allow   white space between the backslash and the newline.  */#line 869 "scan-gram.c"/* Macros after this point can all be overridden by user definitions in * section 1. */#ifndef YY_SKIP_YYWRAP#ifdef __cplusplusextern "C" int yywrap YY_PROTO(( void ));#elseextern int yywrap YY_PROTO(( void ));#endif#endif

⌨️ 快捷键说明

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