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

📄 mql.tab.cpp

📁 件主要用于帮助计算机爱好者学习蚁群算法时做有关蚁群算法的试验。蚁群算法作为一种优秀的新兴的算法
💻 CPP
📖 第 1 页 / 共 5 页
字号:
/* A Bison parser, made by GNU Bison 2.0.  *//* Skeleton parser for Yacc-like parsing with Bison,   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.   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, 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.  *//* As a special exception, when this file is copied by Bison into a   Bison output file, you may use that output file without restriction.   This special exception was added by the Free Software Foundation   in version 1.24 of Bison.  *//* Written by Richard Stallman by simplifying the original so called   ``semantic'' parser.  *//* All symbols defined below should begin with yy or YY, to avoid   infringing on user name space.  This should be done even for local   variables, as they might otherwise be expanded by user macros.   There are some unavoidable exceptions within include files to   define necessary library symbols; they are noted "INFRINGES ON   USER NAME SPACE" below.  *//* Identify Bison output.  */#define YYBISON 1/* Skeleton name.  */#define YYSKELETON_NAME "yacc.c"/* Pure parsers.  */#define YYPURE 1/* Using locations.  */#define YYLSP_NEEDED 0/* Tokens.  */#ifndef YYTOKENTYPE# define YYTOKENTYPE   /* Put the tokens into the symbol table, so that GDB and other debuggers      know about them.  */   enum yytokentype {     IDENTIFIER = 258,     STRING_LITERAL = 259,     INT_CONSTANT = 260,     DOUBLE_CONSTANT = 261,     INT = 262,     DOUBLE = 263,     STRING = 264,     IF = 265,     ELSE = 266,     AND_OP = 267,     OR_OP = 268,     LEFT_OP = 269,     RIGHT_OP = 270,     LE_OP = 271,     GE_OP = 272,     SIN = 273,     COS = 274,     POW = 275,     PRINT = 276,     ROUND = 277,     CEIL = 278,     FLOOR = 279,     EQ_OP = 280,     NE_OP = 281,     WHILE = 282,     VOID = 283,     DBL = 284,     TAN = 285,     ASIN = 286,     ACOS = 287,     ATAN = 288,     CONTINUE = 289,     BREAK = 290,     RETURN = 291,     STRUCT = 292,     RPC = 293,     ARRAY_SIZE = 294,     LOG_OP = 295,     EXP = 296,     DNS_LOOKUP = 297,     DNS_ADDR = 298,     GET_SELF = 299,     RING_GT = 300,     RING_GE = 301,     RING_LT = 302,     RING_LE = 303,     GET_DISTANCE_TCP = 304,     GET_DISTANCE_DNS = 305,     GET_DISTANCE_PING = 306,     PUSH_BACK = 307,     POP_BACK = 308,     ARRAY_INTERSECT = 309,     FOR = 310,     PRINTLN = 311,     ARRAY_AVG = 312,     ARRAY_MAX = 313,     ARRAY_MIN = 314,     ARRAY_MAX_OFFSET = 315,     ARRAY_MIN_OFFSET = 316,     ARRAY_UNION = 317,     GET_DISTANCE_ICMP = 318   };#endif#define IDENTIFIER 258#define STRING_LITERAL 259#define INT_CONSTANT 260#define DOUBLE_CONSTANT 261#define INT 262#define DOUBLE 263#define STRING 264#define IF 265#define ELSE 266#define AND_OP 267#define OR_OP 268#define LEFT_OP 269#define RIGHT_OP 270#define LE_OP 271#define GE_OP 272#define SIN 273#define COS 274#define POW 275#define PRINT 276#define ROUND 277#define CEIL 278#define FLOOR 279#define EQ_OP 280#define NE_OP 281#define WHILE 282#define VOID 283#define DBL 284#define TAN 285#define ASIN 286#define ACOS 287#define ATAN 288#define CONTINUE 289#define BREAK 290#define RETURN 291#define STRUCT 292#define RPC 293#define ARRAY_SIZE 294#define LOG_OP 295#define EXP 296#define DNS_LOOKUP 297#define DNS_ADDR 298#define GET_SELF 299#define RING_GT 300#define RING_GE 301#define RING_LT 302#define RING_LE 303#define GET_DISTANCE_TCP 304#define GET_DISTANCE_DNS 305#define GET_DISTANCE_PING 306#define PUSH_BACK 307#define POP_BACK 308#define ARRAY_INTERSECT 309#define FOR 310#define PRINTLN 311#define ARRAY_AVG 312#define ARRAY_MAX 313#define ARRAY_MIN 314#define ARRAY_MAX_OFFSET 315#define ARRAY_MIN_OFFSET 316#define ARRAY_UNION 317#define GET_DISTANCE_ICMP 318/* Copy the first part of user declarations.  */#line 1 "MQL.ypp"/******************************************************************************Meridian prototype distributionCopyright (C) 2005 Bernard WongThis program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.The copyright owner can be contacted by e-mail at bwong@cs.cornell.edu*******************************************************************************/using namespace std;#include <stdio.h>#include <stdlib.h>#include <signal.h>//#include <setjmp.h>#include <unistd.h>#include <fcntl.h>#include <sys/socket.h>#include <ucontext.h>#include "Marshal.h"#include "MQLState.h"#include "MeridianDSL.h"#define YYPARSE_PARAM param#define YYLEX_PARAM paramucontext_t global_env_thread;	// For ending an intepreter immediately//jmp_buf global_env_pc;		// For switching between threads//ucontext_t* global_env_pc = NULL;void yyerror(const char *str) {	DSL_ERROR( "%s: line %d\n", str, g_parser_line);}int yylex(YYSTYPE* next_token, void* in_parser) {	if (in_parser == NULL) {		return 0;	}		ParserState* cur_parser = static_cast<ParserState*>(in_parser);	cur_parser->set_parse_result(next_token);	return cur_parser->get_lex()->scan(cur_parser);}/* Enabling traces.  */#ifndef YYDEBUG# define YYDEBUG 0#endif/* Enabling verbose error messages.  */#ifdef YYERROR_VERBOSE# undef YYERROR_VERBOSE# define YYERROR_VERBOSE 1#else# define YYERROR_VERBOSE 0#endif#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)#line 60 "MQL.ypp"typedef union YYSTYPE {	double 	 	d_val;	int		 	i_val;	string*  	s_val;	ASTType		v_val;	ASTNode*	n_val;} YYSTYPE;/* Line 190 of yacc.c.  */#line 269 "MQL.tab.cpp"

⌨️ 快捷键说明

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