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

📄 grammar.tab.c

📁 含有BACKTARACKING的編譯軟體
💻 C
📖 第 1 页 / 共 4 页
字号:
#ifndef lintstatic const char yysccsid[] = "@(#)yaccpar	1.9 (Berkeley) 02/21/93";#endif#define YYBYACC 1#define YYMAJOR 1#define YYMINOR 9#define yyclearin (yychar=(-1))#define yyerrok (yyerrflag=0)#define YYRECOVERING (yyerrflag!=0)extern int yyparse(void);#define YYPREFIX "yy"#line 69 "grammar.y"#include <stdio.h>#include <ctype.h>#include "cproto.h"#include "symbol.h"#include "semantic.h"#define YYMAXDEPTH 150extern	int	yylex (void);/* declaration specifier attributes for the typedef statement currently being * scanned */static int cur_decl_spec_flags;/* pointer to parameter list for the current function definition */static ParameterList *func_params;/* A parser semantic action sets this pointer to the current declarator in * a function parameter declaration in order to catch any comments following * the parameter declaration on the same line.  If the lexer scans a comment * and <cur_declarator> is not NULL, then the comment is attached to the * declarator.  To ignore subsequent comments, the lexer sets this to NULL * after scanning a comment or end of line. */static Declarator *cur_declarator;/* temporary string buffer */static char buf[MAX_TEXT_SIZE];/* table of typedef names */static SymbolTable *typedef_names;/* table of define names */static SymbolTable *define_names;/* table of type qualifiers */static SymbolTable *type_qualifiers;/* information about the current input file */typedef struct {    char *base_name;		/* base input file name */    char *file_name;		/* current file name */    FILE *file; 		/* input file */    unsigned line_num;		/* current line number in input file */    FILE *tmp_file;		/* temporary file */    long begin_comment; 	/* tmp file offset after last written ) or ; */    long end_comment;		/* tmp file offset after last comment */    boolean convert;		/* if TRUE, convert function definitions */    boolean changed;		/* TRUE if conversion done in this file */} IncludeStack;static IncludeStack *cur_file;	/* current input file */#include "yyerror.c"static int haveAnsiParam (void);/* Flags to enable us to find if a procedure returns a value. */static int return_val,	/* nonzero on BRACES iff return-expression found */	   returned_at;	/* marker for token-number to set 'return_val' */#if OPT_LINTLIBRARYstatic char *dft_decl_spec (void);static char *dft_decl_spec (void){    return (lintLibrary() && !return_val) ? "void" : "int";}#else#define dft_decl_spec() "int"#endifstatic inthaveAnsiParam (void){    Parameter *p;    if (func_params != 0) {	for (p = func_params->first; p != 0; p = p->next) {	    if (p->declarator->func_def == FUNC_ANSI) {		return TRUE;	    }	}    }    return FALSE;}#line 104 "grammar.tab.c"#define T_IDENTIFIER 257#define T_TYPEDEF_NAME 258#define T_DEFINE_NAME 259#define T_AUTO 260#define T_EXTERN 261#define T_REGISTER 262#define T_STATIC 263#define T_TYPEDEF 264#define T_INLINE 265#define T_EXTENSION 266#define T_CHAR 267#define T_DOUBLE 268#define T_FLOAT 269#define T_INT 270#define T_VOID 271#define T_LONG 272#define T_SHORT 273#define T_SIGNED 274#define T_UNSIGNED 275#define T_ENUM 276#define T_STRUCT 277#define T_UNION 278#define T_Bool 279#define T_Complex 280#define T_Imaginary 281#define T_TYPE_QUALIFIER 282#define T_BRACKETS 283#define T_LBRACE 284#define T_MATCHRBRACE 285#define T_ELLIPSIS 286#define T_INITIALIZER 287#define T_STRING_LITERAL 288#define T_ASM 289#define T_ASMARG 290#define T_VA_DCL 291#define YYERRCODE 256short yylhs[] = {                                        -1,    0,    0,   26,   26,   27,   27,   27,   27,   27,   27,   27,   31,   30,   30,   28,   28,   34,   28,   32,   32,   33,   33,   35,   35,   37,   38,   29,   39,   29,   36,   36,   36,   40,   40,    1,    1,    2,    2,    2,    3,    3,    3,    3,    3,    3,    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,    4,    5,    5,    6,    6,    6,   19,   19,    8,    8,    9,   41,    9,    7,    7,    7,   25,   23,   23,   10,   10,   11,   11,   11,   11,   11,   20,   20,   21,   21,   22,   22,   14,   14,   15,   15,   16,   16,   16,   17,   17,   18,   18,   24,   24,   12,   12,   12,   13,   13,   13,   13,   13,   13,   13,};short yylen[] = {                                         2,    0,    1,    1,    2,    1,    1,    1,    1,    3,    2,    2,    2,    3,    3,    2,    3,    0,    5,    2,    1,    0,    1,    1,    3,    0,    0,    7,    0,    5,    0,    1,    1,    1,    2,    1,    2,    1,    1,    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,    2,    2,    1,    1,    1,    3,    1,    0,    4,    3,    2,    2,    1,    1,    1,    2,    1,    1,    3,    2,    4,    4,    2,    3,    0,    1,    1,    2,    1,    3,    1,    3,    2,    2,    1,    0,    1,    1,    3,    1,    2,    1,    2,    1,    3,    2,    1,    4,    3,    3,    2,};short yydefred[] = {                                      0,    0,    0,    0,    0,   77,    0,   62,   40,    0,   42,   43,   20,   44,    0,   46,   47,   48,   49,   54,   50,   51,   52,   53,   76,   66,   67,   55,   56,   57,   61,    0,    7,    0,    0,   35,   37,   38,   39,   59,   60,   28,    0,    0,    0,  103,   81,    0,    0,    3,    5,    6,    8,    0,   10,   11,   78,    0,   90,    0,    0,  104,    0,   19,    0,   41,   45,   15,   36,    0,   68,    0,    0,    0,   83,    0,    0,   64,    0,    0,   74,    4,   58,    0,   82,   87,   91,    0,   14,   13,    9,   16,    0,   71,    0,   31,   33,    0,    0,    0,    0,    0,   94,    0,    0,  101,   12,   63,   73,    0,    0,   69,    0,    0,    0,   34,    0,  110,   96,   97,    0,    0,   84,    0,   85,    0,   23,    0,    0,   72,   26,   29,  114,    0,    0,    0,  109,    0,   93,   95,  102,   18,    0,    0,  108,  113,  112,    0,   24,   27,  111,};short yydgoto[] = {                                      33,   87,   35,   36,   37,   38,   39,   40,   69,   70,   41,   42,  119,  120,  100,  101,  102,  103,  104,   43,   44,   59,   60,   45,   46,   47,   48,   49,   50,   51,   52,   77,   53,  127,  109,  128,   97,   94,  143,   72,   98,  112,};short yysindex[] = {                                     -2,   -3,   27, -239, -177,    0,    0,    0,    0, -274,    0,    0,    0,    0, -246,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0, -266,    0,    0,  455,    0,    0,    0,    0,    0,    0,    0,  -35, -245,  128,    0,    0, -245,   -2,    0,    0,    0,    0,  642,    0,    0,    0,  -15,    0,  -12, -239,    0,  590,    0,  -27,    0,    0,    0,    0,  -10,    0,  -11,  534,  -72,    0, -237, -232,    0,  -35, -232,    0,    0,    0,  642,    0,    0,    0,  455,    0,    0,    0,    0,   27,    0,  534,    0,    0, -222,  617,  209,   34,   39,    0,   44,   42,    0,    0,    0,    0,   27,  -11,    0, -200, -196, -195,    0,  174,    0,    0,    0,  -33,  243,    0,  561,    0, -177,    0,   33,   49,    0,    0,    0,    0,   53,   55,  417,    0,  -33,    0,    0,    0,    0,   27, -188,    0,    0,    0,   57,    0,    0,    0,};short yyrindex[] = {                                     99,    0,    0,  275,    0,    0,  -38,    0,    0,  481,    0,    0,    0,    0,  509,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   30,    0,    0,    0,    0,    0,  101,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,  343,  309,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   98, -182,   62,    0,    0,  133,    0,   64,  379,    0,    0,    0,   -5,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0, -182,    0,    0,    0, -180,  -19,    0,   65,    0,    0,   68,    0,    0,    0,    0,   51,    9,    0,    0,    0,    0,    0,    0,    0,    0,    0,  -13,   19,    0,    0,    0,    0,    0,    0,   52,    0,    0,    0,    0,    0,    0,    0,    0,   35,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,};short yygindex[] = {                                      0,   11,  -17,    0,    0,   13,    0,    0,    0,   20,    8,  -43,   -1,   -8,  -89,    0,   -9,    0,    0,    0,  -44,    0,    0,    4,    0,    0,    0,   70,  -53,    0,    0,  -18,    0,    0,    0,    0,   22,    0,    0,    0,    0,    0,};#define YYTABLESIZE 924short yytable[] = {                                      58,   78,   58,   58,   58,   73,   58,  135,   61,   88,   57,   34,    5,   56,   62,   85,   58,   68,   63,   96,    7,   58,   98,   78,   64,   98,   84,  134,  107,   80,    3,  107,   90,   17,   92,   17,    4,   17,    2,   75,    3,   96,   71,   30,   89,  115,  147,   76,  106,   91,   93,   79,   75,   70,   17,  121,   55,   32,  107,   34,  105,  108,  114,  105,   83,    4,   68,    2,   70,    3,   68,   80,  121,   86,   80,  122,  106,  105,   78,  106,    5,   56,   68,  123,   99,  124,  125,  129,  130,   80,  131,   80,  141,  142,  144,  110,  145,  149,  150,    1,  110,    2,   30,   99,   32,   79,   92,  118,   79,  100,   21,   22,  111,  137,  139,  133,  113,  126,   81,    0,    0,    0,    0,   79,   57,   79,    0,   99,    0,  140,    0,    0,    0,    0,   99,    0,    0,    0,    0,    0,    0,    0,   70,    0,    0,    0,   99,    0,    0,    0,  148,    0,    0,    0,    0,    0,    0,   70,    0,    0,    0,    0,    0,    0,    0,    0,    4,    0,    2,    0,    0,   65,    0,   65,   65,   65,    0,   65,    0,    0,    0,    0,    0,    0,    0,    5,    6,    7,    8,   65,   10,   11,   65,   13,   66,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,    0,    4,    0,  116,  132,    3,    0,    0,   58,   58,   58,   58,   58,   58,   58,   78,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   58,   78,    4,   74,  116,  136,    3,   17,   78,    1,    5,    6,    7,    8,    9,   10,   11,   12,   13,   14,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,    4,   54,  116,    5,   56,    0,   31,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   80,   88,   80,   88,   88,   88,    0,   88,    0,   80,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   79,   89,   79,   89,   89,   89,    0,   89,    0,   79,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   25,   86,   25,   86,   86,    5,   56,   86,    0,   25,   65,   65,   65,   65,   65,   65,   65,    0,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   65,   75,    0,   75,   75,   75,    0,   75,    0,    0,    0,    0,    0,    0,    0,    5,    6,    7,    8,   65,   10,   11,   75,   13,   66,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,  117,  146,    0,    0,    0,    0,    0,    0,    0,    5,    6,    7,    8,   65,   10,   11,    0,   13,   66,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,  117,    4,    0,    2,    0,    3,    0,    0,    5,   56,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   67,    0,    0,    0,    0,   41,    0,   41,    0,   41,    0,    0,  117,    0,    0,    0,    0,    0,   88,   88,    0,    0,    0,    0,    0,    0,   41,    0,    0,    0,    0,    0,    0,   45,    0,   45,    0,   45,    0,    0,    0,    0,    0,    0,   88,    0,    0,    0,    0,    0,    0,    0,   89,   89,   45,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   89,    0,    0,    0,    0,    0,    0,    0,   86,   86,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   86,    0,    0,    0,    0,    0,    0,    0,    0,    0,   75,   75,   75,   75,   75,   75,   75,    0,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,   75,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,   82,    7,    8,   65,   10,   11,    0,   13,   66,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    5,    6,    7,    8,   65,   10,   11,    0,   13,   66,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,   41,   41,   41,   41,   41,   41,   41,    0,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,   41,    0,    0,   45,   45,   45,   45,   45,   45,   45,    0,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   45,   82,    7,    8,   65,   10,   11,   12,   13,   14,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,    0,    0,   82,    7,    8,   65,   10,   11,   95,   13,   66,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,    0,    0,    0,  138,   82,    7,    8,   65,   10,   11,   12,   13,   14,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,    0,   75,   82,    7,    8,   65,   10,   11,   12,   13,   14,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,   82,    7,    8,   65,   10,   11,    0,   13,   66,   15,   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,};short yycheck[] = {                                      38,   44,   40,   41,   42,   40,   44,   40,    4,   62,    2,    0,  257,  258,  288,   59,    3,   34,  264,   72,  259,   59,   41,   61,  290,   44,   41,  116,   41,   47,   42,   44,   59,   38,   44,   40,   38,   42,   40,  284,   42,   94,   34,  282,   62,   98,  135,   43,  285,   59,   61,   47,  284,   44,   59,   99,   59,   59,   76,   48,   41,   79,  284,   44,   53,   38,   83,   40,   59,   42,   87,   41,  116,   60,   44,   41,   41,   73,  121,   44,  257,  258,   99,   44,   73,   41,   44,  287,  284,   59,  285,   61,   59,   44,   41,   87,   41,  285,   41,    0,   92,    0,  284,   41,  284,   41,   41,   99,   44,   41,   59,   59,   92,  121,  123,  116,   94,  109,   48,   -1,   -1,   -1,   -1,   59,  116,   61,   -1,  116,   -1,  125,   -1,   -1,   -1,   -1,  123,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   44,   -1,   -1,   -1,  135,   -1,   -1,   -1,  142,   -1,   -1,   -1,   -1,   -1,   -1,   59,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   38,   -1,   40,   -1,   -1,   38,   -1,   40,   41,   42,   -1,   44,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,  263,   59,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,   -1,   38,   -1,   40,   41,   42,   -1,   -1,  257,  258,  259,  260,  261,  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,  283,  284,   38,  283,   40,  283,   42,  257,  291,  256,  257,  258,  259,  260,  261,  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,   38,  285,   40,  257,  258,   -1,  289,  258,  259,  260,  261,  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,   38,  284,   40,   41,   42,   -1,   44,   -1,  291,  258,  259,  260,  261,  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,   38,  284,   40,   41,   42,   -1,   44,   -1,  291,  258,  259,  260,  261,  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,   38,  284,   40,   41,  257,  258,   44,   -1,  291,  257,  258,  259,  260,  261,  262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,  283,   38,   -1,   40,   41,   42,   -1,   44,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,  263,   59,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,  283,   41,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,  283,   38,   -1,   40,   -1,   42,   -1,   -1,  257,  258,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   59,   -1,   -1,   -1,   -1,   38,   -1,   40,   -1,   42,   -1,   -1,  283,   -1,   -1,   -1,   -1,   -1,  257,  258,   -1,   -1,   -1,   -1,   -1,   -1,   59,   -1,   -1,   -1,   -1,   -1,   -1,   38,   -1,   40,   -1,   42,   -1,   -1,   -1,   -1,   -1,   -1,  283,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,   59,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  283,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  283,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,  283,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  258,  259,  260,  261,  262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,  263,   -1,  265,  266,  267,  268,  269,  270,  271,  272,  273,  274,  275,  276,  277,  278,  279,  280,  281,  282,  257,  258,  259,  260,  261,  262,  263,   -1,  265,  266,  267,  268,  269,

⌨️ 快捷键说明

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