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

📄 parse.c

📁 生成C++的词法/语法分析的Flex语法分析器
💻 C
📖 第 1 页 / 共 4 页
字号:
#define YY_parse_h_included/*  A Bison++ parser, made from parse.y  */ /* with Bison++ version bison++ Version 1.21-7, adapted from GNU bison by coetmeur@icdc.fr  */#line 1 "/u/icdc/rdt/tools/lib/bison.cc"/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  *//* Skeleton output parser for bison,   Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman   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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA.  *//* HEADER SECTION */#ifndef _MSDOS#ifdef MSDOS#define _MSDOS#endif#endif/* turboc */#ifdef __MSDOS__#ifndef _MSDOS#define _MSDOS#endif#endif#ifndef alloca#if defined( __GNUC__)#define alloca __builtin_alloca#elif (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc)  || defined (__sgi)#include <alloca.h>#elif defined (_MSDOS)#include <malloc.h>#ifndef __TURBOC__/* MS C runtime lib */#define alloca _alloca#endif#elif defined(_AIX)#include <malloc.h>#pragma alloca#elif defined(__hpux)#ifdef __cplusplusextern "C" {void *alloca (unsigned int);};#else /* not __cplusplus */void *alloca ();#endif /* not __cplusplus */#endif /* not _AIX  not MSDOS, or __TURBOC__ or _AIX, not sparc.  */#endif /* alloca not defined.  */#ifdef c_plusplus#ifndef __cplusplus#define __cplusplus#endif#endif#ifdef __cplusplus#ifndef YY_USE_CLASS#define YY_USE_CLASS#endif#else#ifndef __STDC__#define const#endif#endif#include <stdio.h>#define YYBISON 1  /* #line 77 "/u/icdc/rdt/tools/lib/bison.cc" */#line 89 "y.tab.c"#line 6 "parse.y"/*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Vern Paxson. *  * The United States Government has rights in this work pursuant * to contract no. DE-AC03-76SF00098 between the United States * Department of Energy and the University of California. * * Redistribution and use in source and binary forms are permitted provided * that: (1) source distributions retain this entire copyright notice and * comment, and (2) distributions including binaries display the following * acknowledgement:  ``This product includes software developed by the * University of California, Berkeley and its contributors'' in the * documentation or other materials provided with the distribution and in * all advertising materials mentioning features or use of this software. * Neither the name of the University nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */#ifndef lintstatic char rcsid[] =    "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/parse.y,v 2.7 90/06/27 23:48:31 vern Exp $ (LBL)";#endif#include "flexdef.h"void yyerror();void build_eof_action();int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, actvp, rulelen;int trlcontxt, xcluflg, cclsorted, varlength, variable_trail_rule;Char clower();static int madeany = false;  /* whether we've made the '.' character class */int previous_continued_action;	/* whether the previous rule's action was '|' */#line 77 "/u/icdc/rdt/tools/lib/bison.cc"/* %{ and %header{ and %union, during decl */#define YY_parse_BISON 1#ifndef YY_parse_COMPATIBILITY#ifndef YY_USE_CLASS#define  YY_parse_COMPATIBILITY 1#else#define  YY_parse_COMPATIBILITY 0#endif#endif#if YY_parse_COMPATIBILITY != 0/* backward compatibility */#ifdef YYLTYPE#ifndef YY_parse_LTYPE#define YY_parse_LTYPE YYLTYPE#endif#endif#ifdef YYSTYPE#ifndef YY_parse_STYPE #define YY_parse_STYPE YYSTYPE#endif#endif#ifdef YYDEBUG#ifndef YY_parse_DEBUG#define  YY_parse_DEBUG YYDEBUG#endif#endif#ifdef YY_parse_STYPE#ifndef yystype#define yystype YY_parse_STYPE#endif#endif/* use goto to be compatible */#ifndef YY_parse_USE_GOTO#define YY_parse_USE_GOTO 1#endif#endif/* use no goto to be clean in C++ */#ifndef YY_parse_USE_GOTO#define YY_parse_USE_GOTO 0#endif#ifndef YY_parse_PURE/* #line 121 "/u/icdc/rdt/tools/lib/bison.cc" */#line 182 "y.tab.c"#line 121 "/u/icdc/rdt/tools/lib/bison.cc"/*  YY_parse_PURE */#endif/* section apres lecture def, avant lecture grammaire S2 *//* #line 125 "/u/icdc/rdt/tools/lib/bison.cc" */#line 191 "y.tab.c"#line 125 "/u/icdc/rdt/tools/lib/bison.cc"/* prefix */#ifndef YY_parse_DEBUG/* #line 127 "/u/icdc/rdt/tools/lib/bison.cc" */#line 198 "y.tab.c"#line 127 "/u/icdc/rdt/tools/lib/bison.cc"/* YY_parse_DEBUG */#endif#ifndef YY_parse_LSP_NEEDED/* #line 132 "/u/icdc/rdt/tools/lib/bison.cc" */#line 208 "y.tab.c"#line 132 "/u/icdc/rdt/tools/lib/bison.cc" /* YY_parse_LSP_NEEDED*/#endif/* DEFAULT LTYPE*/#ifdef YY_parse_LSP_NEEDED#ifndef YY_parse_LTYPEtypedef  struct yyltype    {      int timestamp;      int first_line;      int first_column;      int last_line;      int last_column;      char *text;   }  yyltype;#define YY_parse_LTYPE yyltype#endif#endif/* DEFAULT STYPE*/      /* We used to use `unsigned long' as YY_parse_STYPE on MSDOS,	 but it seems better to be consistent.	 Most programs should declare their own type anyway.  */#ifndef YY_parse_STYPE#define YY_parse_STYPE int#endif/* DEFAULT MISCELANEOUS */#ifndef YY_parse_PARSE#define YY_parse_PARSE yyparse#endif#ifndef YY_parse_LEX#define YY_parse_LEX yylex#endif#ifndef YY_parse_LVAL#define YY_parse_LVAL yylval#endif#ifndef YY_parse_LLOC#define YY_parse_LLOC yylloc#endif#ifndef YY_parse_CHAR#define YY_parse_CHAR yychar#endif#ifndef YY_parse_NERRS#define YY_parse_NERRS yynerrs#endif#ifndef YY_parse_DEBUG_FLAG#define YY_parse_DEBUG_FLAG yydebug#endif#ifndef YY_parse_ERROR#define YY_parse_ERROR yyerror#endif#ifndef YY_parse_PARSE_PARAM#ifndef __STDC__#ifndef __cplusplus#ifndef YY_USE_CLASS#define YY_parse_PARSE_PARAM#ifndef YY_parse_PARSE_PARAM_DEF#define YY_parse_PARSE_PARAM_DEF#endif#endif#endif#endif#ifndef YY_parse_PARSE_PARAM#define YY_parse_PARSE_PARAM void#endif#endif#if YY_parse_COMPATIBILITY != 0/* backward compatibility */#ifdef YY_parse_LTYPE#ifndef YYLTYPE#define YYLTYPE YY_parse_LTYPE#else/* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */#endif#endif#ifndef YYSTYPE#define YYSTYPE YY_parse_STYPE#else/* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */#endif#ifdef YY_parse_PURE#ifndef YYPURE#define YYPURE YY_parse_PURE#endif#endif#ifdef YY_parse_DEBUG#ifndef YYDEBUG#define YYDEBUG YY_parse_DEBUG #endif#endif#ifndef YY_parse_ERROR_VERBOSE#ifdef YYERROR_VERBOSE#define YY_parse_ERROR_VERBOSE YYERROR_VERBOSE#endif#endif#ifndef YY_parse_LSP_NEEDED#ifdef YYLSP_NEEDED#define YY_parse_LSP_NEEDED YYLSP_NEEDED#endif#endif#endif#ifndef YY_USE_CLASS/* TOKEN C *//* #line 240 "/u/icdc/rdt/tools/lib/bison.cc" */#line 321 "y.tab.c"#define	CHAR	258#define	NUMBER	259#define	SECTEND	260#define	SCDECL	261#define	XSCDECL	262#define	WHITESPACE	263#define	NAME	264#define	PREVCCL	265#define	EOF_OP	266#line 240 "/u/icdc/rdt/tools/lib/bison.cc" /* #defines tokens */#else/* CLASS */#ifndef YY_parse_CLASS#define YY_parse_CLASS parse#endif#ifndef YY_parse_INHERIT#define YY_parse_INHERIT#endif#ifndef YY_parse_MEMBERS#define YY_parse_MEMBERS #endif#ifndef YY_parse_LEX_BODY#define YY_parse_LEX_BODY  #endif#ifndef YY_parse_ERROR_BODY#define YY_parse_ERROR_BODY  #endif#ifndef YY_parse_CONSTRUCTOR_PARAM#define YY_parse_CONSTRUCTOR_PARAM#endif#ifndef YY_parse_CONSTRUCTOR_CODE#define YY_parse_CONSTRUCTOR_CODE#endif#ifndef YY_parse_CONSTRUCTOR_INIT#define YY_parse_CONSTRUCTOR_INIT#endif/* choose between enum and const */#ifndef YY_parse_USE_CONST_TOKEN#define YY_parse_USE_CONST_TOKEN 0/* yes enum is more compatible with flex,  *//* so by default we use it */ #endif#if YY_parse_USE_CONST_TOKEN != 0#ifndef YY_parse_ENUM_TOKEN#define YY_parse_ENUM_TOKEN yy_parse_enum_token#endif#endifclass YY_parse_CLASS YY_parse_INHERIT{public: #if YY_parse_USE_CONST_TOKEN != 0/* static const int token ... *//* #line 284 "/u/icdc/rdt/tools/lib/bison.cc" */#line 380 "y.tab.c"static const int CHAR;static const int NUMBER;static const int SECTEND;static const int SCDECL;static const int XSCDECL;static const int WHITESPACE;static const int NAME;static const int PREVCCL;static const int EOF_OP;#line 284 "/u/icdc/rdt/tools/lib/bison.cc" /* decl const */#elseenum YY_parse_ENUM_TOKEN { YY_parse_NULL_TOKEN=0/* #line 287 "/u/icdc/rdt/tools/lib/bison.cc" */#line 398 "y.tab.c"	,CHAR=258	,NUMBER=259	,SECTEND=260	,SCDECL=261	,XSCDECL=262	,WHITESPACE=263	,NAME=264	,PREVCCL=265	,EOF_OP=266#line 287 "/u/icdc/rdt/tools/lib/bison.cc" /* enum token */     }; /* end of enum declaration */#endifpublic: int YY_parse_PARSE (YY_parse_PARSE_PARAM); virtual void YY_parse_ERROR(char *msg) YY_parse_ERROR_BODY;#ifdef YY_parse_PURE#ifdef YY_parse_LSP_NEEDED virtual int  YY_parse_LEX (YY_parse_STYPE *YY_parse_LVAL,YY_parse_LTYPE *YY_parse_LLOC) YY_parse_LEX_BODY;#else virtual int  YY_parse_LEX (YY_parse_STYPE *YY_parse_LVAL) YY_parse_LEX_BODY;#endif#else virtual int YY_parse_LEX() YY_parse_LEX_BODY; YY_parse_STYPE YY_parse_LVAL;#ifdef YY_parse_LSP_NEEDED YY_parse_LTYPE YY_parse_LLOC;#endif int   YY_parse_NERRS; int    YY_parse_CHAR;#endif#if YY_parse_DEBUG != 0 int YY_parse_DEBUG_FLAG;   /*  nonzero means print parse trace     */#endifpublic: YY_parse_CLASS(YY_parse_CONSTRUCTOR_PARAM);public: YY_parse_MEMBERS };/* other declare folow */#if YY_parse_USE_CONST_TOKEN != 0/* #line 318 "/u/icdc/rdt/tools/lib/bison.cc" */#line 444 "y.tab.c"const int YY_parse_CLASS::CHAR=258;const int YY_parse_CLASS::NUMBER=259;const int YY_parse_CLASS::SECTEND=260;const int YY_parse_CLASS::SCDECL=261;const int YY_parse_CLASS::XSCDECL=262;const int YY_parse_CLASS::WHITESPACE=263;const int YY_parse_CLASS::NAME=264;const int YY_parse_CLASS::PREVCCL=265;const int YY_parse_CLASS::EOF_OP=266;#line 318 "/u/icdc/rdt/tools/lib/bison.cc" /* const YY_parse_CLASS::token */#endif/*apres const  */YY_parse_CLASS::YY_parse_CLASS(YY_parse_CONSTRUCTOR_PARAM) YY_parse_CONSTRUCTOR_INIT{#if YY_parse_DEBUG != 0YY_parse_DEBUG_FLAG=0;#endifYY_parse_CONSTRUCTOR_CODE;};#endif/* #line 329 "/u/icdc/rdt/tools/lib/bison.cc" */#line 470 "y.tab.c"#define	YYFINAL		81#define	YYFLAG		-32768#define	YYNTBASE	32#define YYTRANSLATE(x) ((unsigned)(x) <= 266 ? yytranslate[x] : 51)static const char yytranslate[] = {     0,     2,     2,     2,     2,     2,     2,     2,     2,     2,    12,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,    26,     2,    17,     2,     2,     2,    27,    28,    20,    21,    16,    31,    25,    19,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,    14,     2,    15,    22,     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,    29,     2,    30,    13,     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,    23,    18,    24,     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,

⌨️ 快捷键说明

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