c-parse.c

来自「GCC编译器源代码」· C语言 代码 · 共 1,068 行 · 第 1/5 页

C
1,068
字号
/*  A Bison parser, made from c-parse.y by  Bison version A2.5 (Andrew Consortium)  */#define YYBISON 1  /* Identify Bison output.  */#define	IDENTIFIER	258#define	TYPENAME	259#define	SCSPEC	260#define	TYPESPEC	261#define	TYPE_QUAL	262#define	CONSTANT	263#define	STRING	264#define	ELLIPSIS	265#define	SIZEOF	266#define	ENUM	267#define	STRUCT	268#define	UNION	269#define	IF	270#define	ELSE	271#define	WHILE	272#define	DO	273#define	FOR	274#define	SWITCH	275#define	CASE	276#define	DEFAULT	277#define	BREAK	278#define	CONTINUE	279#define	RETURN	280#define	GOTO	281#define	ASM_KEYWORD	282#define	TYPEOF	283#define	ALIGNOF	284#define	ATTRIBUTE	285#define	EXTENSION	286#define	LABEL	287#define	REALPART	288#define	IMAGPART	289#define	ASSIGN	290#define	OROR	291#define	ANDAND	292#define	EQCOMPARE	293#define	ARITHCOMPARE	294#define	LSHIFT	295#define	RSHIFT	296#define	UNARY	297#define	PLUSPLUS	298#define	MINUSMINUS	299#define	HYPERUNARY	300#define	POINTSAT	301#define	INTERFACE	302#define	IMPLEMENTATION	303#define	END	304#define	SELECTOR	305#define	DEFS	306#define	ENCODE	307#define	CLASSNAME	308#define	PUBLIC	309#define	PRIVATE	310#define	PROTECTED	311#define	PROTOCOL	312#define	OBJECTNAME	313#define	CLASS	314#define	ALIAS	315#define	OBJC_STRING	316#line 56 "c-parse.y"#include "config.h"#include <stdio.h>#include <errno.h>#include <setjmp.h>#include "tree.h"#include "input.h"#include "c-lex.h"#include "c-tree.h"#include "flags.h"#ifdef MULTIBYTE_CHARS#include <stdlib.h>#include <locale.h>#endif/* Since parsers are distinct for each language, put the language string   definition here.  */char *language_string = "GNU C";#ifndef errnoextern int errno;#endifvoid yyerror ();/* Like YYERROR but do call yyerror.  */#define YYERROR1 { yyerror ("syntax error"); YYERROR; }/* Cause the `yydebug' variable to be defined.  */#define YYDEBUG 1#line 94 "c-parse.y"typedef union {long itype; tree ttype; enum tree_code code;	char *filename; int lineno; int ends_in_label; } YYSTYPE;#line 210 "c-parse.y"/* Number of statements (loosely speaking) and compound statements    seen so far.  */static int stmt_count;static int compstmt_count;  /* Input file and line number of the end of the body of last simple_if;   used by the stmt-rule immediately after simple_if returns.  */static char *if_stmt_file;static int if_stmt_line;/* List of types and structure classes of the current declaration.  */static tree current_declspecs = NULL_TREE;static tree prefix_attributes = NULL_TREE;/* Stack of saved values of current_declspecs and prefix_attributes.  */static tree declspec_stack;/* 1 if we explained undeclared var errors.  */static int undeclared_variable_notice;/* Tell yyparse how to print a token's value, if yydebug is set.  */#define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL)extern void yyprint ();#include <stdio.h>#ifndef __cplusplus#ifndef __STDC__#define const#endif#endif#define	YYFINAL		682#define	YYFLAG		-32768#define	YYNTBASE	84#define YYTRANSLATE(x) ((unsigned)(x) <= 316 ? yytranslate[x] : 239)static const char yytranslate[] = {     0,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,    80,     2,     2,     2,    52,    43,     2,    59,    76,    50,    48,    81,    49,    58,    51,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,    38,    77,     2,    36,     2,    37,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,    60,     2,    83,    42,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,    82,    41,    78,    79,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     1,     2,     3,     4,     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,    31,    32,    33,    34,    35,    39,    40,    44,    45,    46,    47,    53,    54,    55,    56,    57,    61,    62,    63,    64,    65,    66,    67,    68,    69,    70,    71,    72,    73,    74,    75};#if YYDEBUG != 0static const short yyprhs[] = {     0,     0,     1,     3,     4,     7,     8,    12,    14,    16,    22,    25,    29,    34,    39,    42,    45,    48,    51,    53,    54,    55,    63,    68,    69,    70,    78,    83,    84,    85,    92,    96,    98,   100,   102,   104,   106,   108,   110,   112,   114,   116,   117,   119,   121,   125,   127,   130,   133,   136,   139,   142,   147,   150,   155,   158,   161,   163,   165,   167,   172,   173,   181,   183,   187,   191,   195,   199,   203,   207,   211,   215,   219,   223,   227,   231,   232,   237,   238,   243,   244,   245,   253,   254,   260,   264,   268,   270,   272,   274,   278,   282,   283,   288,   293,   298,   302,   306,   309,   312,   314,   317,   318,   320,   323,   327,   329,   331,   334,   337,   342,   347,   350,   353,   357,   359,   361,   364,   367,   368,   369,   374,   379,   383,   387,   390,   393,   396,   399,   403,   404,   407,   410,   413,   416,   420,   421,   424,   427,   429,   431,   434,   437,   439,   441,   444,   447,   450,   454,   455,   458,   460,   462,   464,   469,   474,   476,   478,   480,   482,   486,   488,   492,   493,   498,   499,   506,   510,   511,   518,   522,   523,   525,   527,   530,   537,   539,   543,   544,   546,   551,   558,   563,   565,   567,   569,   571,   573,   574,   579,   581,   582,   585,   587,   591,   593,   594,   599,   601,   602,   611,   612,   619,   620,   626,   627,   632,   633,   639,   640,   641,   647,   648,   649,   655,   657,   659,   663,   667,   672,   676,   680,   684,   686,   690,   695,   699,   703,   707,   709,   713,   717,   721,   726,   730,   734,   736,   737,   745,   751,   754,   755,   763,   769,   772,   773,   782,   783,   791,   794,   795,   797,   798,   800,   802,   805,   806,   810,   813,   817,   819,   823,   825,   827,   830,   832,   836,   841,   848,   854,   856,   860,   862,   864,   868,   871,   874,   875,   877,   879,   882,

⌨️ 快捷键说明

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