lg.tab.cpp

来自「FreeFem++可以生成高质量的有限元网格。可以用于流体力学」· C++ 代码 · 共 1,626 行 · 第 1/5 页

CPP
1,626
字号
/* A Bison parser, made by GNU Bison 2.3.  *//* Skeleton implementation for Bison's Yacc-like parsers in C   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006   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., 51 Franklin Street, Fifth Floor,   Boston, MA 02110-1301, USA.  *//* As a special exception, you may create a larger work that contains   part or all of the Bison parser skeleton and distribute that work   under terms of your choice, so long as that work isn't itself a   parser generator using the skeleton or a modified version thereof   as a parser skeleton.  Alternatively, if you modify or redistribute   the parser skeleton itself, you may (at your option) remove this   special exception, which will cause the skeleton and the resulting   Bison output files to be licensed under the GNU General Public   License without this special exception.   This special exception was added by the Free Software Foundation in   version 2.2 of Bison.  *//* C LALR(1) parser skeleton 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/* Bison version.  */#define YYBISON_VERSION "2.3"/* Skeleton name.  */#define YYSKELETON_NAME "yacc.c"/* Pure parsers.  */#define YYPURE 0/* Using locations.  */#define YYLSP_NEEDED 0/* Substitute the variable and function names.  */#define yyparse lgparse#define yylex   lglex#define yyerror lgerror#define yylval  lglval#define yychar  lgchar#define yydebug lgdebug#define yynerrs lgnerrs/* Tokens.  */#ifndef YYTOKENTYPE# define YYTOKENTYPE   /* Put the tokens into the symbol table, so that GDB and other debuggers      know about them.  */   enum yytokentype {     IF = 258,     ELSE = 259,     SET = 260,     GTGT = 261,     LTLT = 262,     OR = 263,     AND = 264,     NE = 265,     EQ = 266,     GE = 267,     LE = 268,     DOTSLASH = 269,     DOTSTAR = 270,     MOINSMOINS = 271,     PLUSPLUS = 272,     UNARY = 273,     LNUM = 274,     DNUM = 275,     CNUM = 276,     ID = 277,     FESPACEID = 278,     IDPARAM = 279,     STRING = 280,     ENDOFFILE = 281,     INCLUDE = 282,     LOAD = 283,     BIDON = 284,     FOR = 285,     WHILE = 286,     BREAK = 287,     CONTINUE = 288,     RETURN = 289,     TRY = 290,     CATCH = 291,     THROW = 292,     TYPE = 293,     FUNCTION = 294,     FESPACE = 295,     FESPACE1 = 296,     FESPACE3 = 297,     PLUSEQ = 298,     MOINSEQ = 299,     MULEQ = 300,     DIVEQ = 301,     ARROW = 302,     BORDER = 303,     CURVE = 304,     SOLVE = 305   };#endif/* Tokens.  */#define IF 258#define ELSE 259#define SET 260#define GTGT 261#define LTLT 262#define OR 263#define AND 264#define NE 265#define EQ 266#define GE 267#define LE 268#define DOTSLASH 269#define DOTSTAR 270#define MOINSMOINS 271#define PLUSPLUS 272#define UNARY 273#define LNUM 274#define DNUM 275#define CNUM 276#define ID 277#define FESPACEID 278#define IDPARAM 279#define STRING 280#define ENDOFFILE 281#define INCLUDE 282#define LOAD 283#define BIDON 284#define FOR 285#define WHILE 286#define BREAK 287#define CONTINUE 288#define RETURN 289#define TRY 290#define CATCH 291#define THROW 292#define TYPE 293#define FUNCTION 294#define FESPACE 295#define FESPACE1 296#define FESPACE3 297#define PLUSEQ 298#define MOINSEQ 299#define MULEQ 300#define DIVEQ 301#define ARROW 302#define BORDER 303#define CURVE 304#define SOLVE 305/* Copy the first part of user declarations.  */#line 1 "lg.y"     // -*- Mode : c++ -*-    //    // SUMMARY  :          // USAGE    :            // ORG      :     // AUTHOR   : Frederic Hecht    // E-MAIL   : hecht@ann.jussieu.fr    //        /*          This file is part of Freefem++          Freefem++ is free software; you can redistribute it and/or modify     it under the terms of the GNU Lesser General Public License as published by     the Free Software Foundation; either version 2.1 of the License, or     (at your option) any later version.          Freefem++  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 Lesser General Public License for more details.          You should have received a copy of the GNU Lesser General Public License     along with Freefem++; if not, write to the Free Software     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA     */    #include "config-wrapper.h"#define eflval yylval #include <iostream>#include  <complex>#include <string>  // for reset cout,cin  in windows  dll#ifdef _WIN32#include <ext/stdio_filebuf.h>#include <iostream>#include <cstdio>#endif#include "error.hpp"class Iden;#include "strversionnumber.hpp"#ifdef __MWERKS__#ifdef __INTEL__#include <malloc.h>#else#include <alloca.h>#endif#endif#include "AFunction.hpp"//  to reserve space to graphical pointer function#include "rgraph.hpp"#include "RNM.hpp"#include "fem.hpp"#include "FESpacen.hpp" #include "FESpace.hpp" #include "MeshPoint.hpp"#include "lgfem.hpp" #include "lex.hpp"#include "environment.hpp"    extern FILE *ThePlotStream;    class Routine;bool load(string s); template <class R,int d> class FE; template <class R,int d,int i> class FE_;extern mylex *zzzfff;#ifdef PARALLELE  void initparallele(int &, char **&);  void init_lgparallele();  void end_parallele();#endif#ifdef HAVE_LIBARPACK  void init_eigenvalue();#endif     aType dcltype;const int nbembtype=10;aType rettype[nbembtype];Block * routineinblock[nbembtype]; // Add FH july 2005 pb clean on return int kkembtype=-1;int inloopcount=0;Block *currentblock;// Add FH july 2005 //  problem clean variable after break,continue and return.const int sizeStackOfLoop=100; Block * StackOfLoop[sizeStackOfLoop];// end ADDdouble CPUcompileInit =0;//class pfes;C_F0  fespacetype;bool fespacecomplex;int fespacedim;int ShowAlloc(const char *s,size_t &);inline int yylex()  {return zzzfff->scan();}inline int lineno() {return zzzfff->lineno();}extern bool withrgraphique;inline void fingraphique() { if(withrgraphique)    { withrgraphique=false;    rattente(1);    closegraphique();  }}void lgerror (const char* s) ;/* Enabling traces.  */#ifndef YYDEBUG# define YYDEBUG 1#endif/* Enabling verbose error messages.  */#ifdef YYERROR_VERBOSE# undef YYERROR_VERBOSE# define YYERROR_VERBOSE 1#else# define YYERROR_VERBOSE 0#endif/* Enabling the token table.  */#ifndef YYTOKEN_TABLE# define YYTOKEN_TABLE 0#endif#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLAREDtypedef union YYSTYPE#line 118 "lg.y"{  double dnum; long lnum; char * str; char oper[8]; CC_F0 cexp; Routine   *routine;

⌨️ 快捷键说明

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