Skip to content
Snippets Groups Projects
Gmsh.tab.cpp 426 KiB
Newer Older
/* A Bison parser, made by GNU Bison 2.3.  */
Christophe Geuzaine's avatar
Christophe Geuzaine committed
/* 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
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
   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.

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
   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.
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
   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.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/* 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.
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
   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"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Using locations.  */
#define YYLSP_NEEDED 0
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* Substitute the variable and function names.  */
#define yyparse gmsh_yyparse
#define yylex   gmsh_yylex
#define yyerror gmsh_yyerror
#define yylval  gmsh_yylval
#define yychar  gmsh_yychar
#define yydebug gmsh_yydebug
#define yynerrs gmsh_yynerrs


/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     tDOUBLE = 258,
     tSTRING = 259,
     tBIGSTR = 260,
     tEND = 261,
     tAFFECT = 262,
     tDOTS = 263,
     tPi = 264,
     tMPI_Rank = 265,
     tMPI_Size = 266,
     tEuclidian = 267,
     tCoordinates = 268,
     tExp = 269,
     tLog = 270,
     tLog10 = 271,
     tSqrt = 272,
     tSin = 273,
     tAsin = 274,
     tCos = 275,
     tAcos = 276,
     tTan = 277,
     tRand = 278,
     tAtan = 279,
     tAtan2 = 280,
     tSinh = 281,
     tCosh = 282,
     tTanh = 283,
     tFabs = 284,
     tFloor = 285,
     tCeil = 286,
     tRound = 287,
     tFmod = 288,
     tModulo = 289,
     tHypot = 290,
     tList = 291,
     tPrintf = 292,
     tError = 293,
     tStr = 294,
     tSprintf = 295,
     tStrCat = 296,
     tStrPrefix = 297,
     tStrRelative = 298,
     tStrReplace = 299,
     tStrFind = 300,
     tStrCmp = 301,
     tTextAttributes = 302,
     tBoundingBox = 303,
     tDraw = 304,
     tSetChanged = 305,
     tToday = 306,
     tCpu = 307,
     tMemory = 308,
     tSyncModel = 309,
     tCreateTopology = 310,
     tCreateTopologyNoHoles = 311,
     tDistanceFunction = 312,
     tDefineConstant = 313,
     tUndefineConstant = 314,
     tPoint = 315,
     tCircle = 316,
     tEllipse = 317,
     tLine = 318,
     tSphere = 319,
     tPolarSphere = 320,
     tSurface = 321,
     tSpline = 322,
     tVolume = 323,
     tCharacteristic = 324,
     tLength = 325,
     tParametric = 326,
     tElliptic = 327,
     tRefineMesh = 328,
     tAdaptMesh = 329,
     tRelocateMesh = 330,
     tPlane = 331,
     tRuled = 332,
     tTransfinite = 333,
     tComplex = 334,
     tPhysical = 335,
     tCompound = 336,
     tPeriodic = 337,
     tUsing = 338,
     tPlugin = 339,
     tDegenerated = 340,
     tRecursive = 341,
     tRotate = 342,
     tTranslate = 343,
     tSymmetry = 344,
     tDilate = 345,
     tExtrude = 346,
     tLevelset = 347,
     tRecombine = 348,
     tSmoother = 349,
     tSplit = 350,
     tDelete = 351,
     tCoherence = 352,
     tIntersect = 353,
     tMeshAlgorithm = 354,
     tReverse = 355,
     tLayers = 356,
     tScaleLast = 357,
     tHole = 358,
     tAlias = 359,
     tAliasWithOptions = 360,
     tCopyOptions = 361,
     tQuadTriAddVerts = 362,
     tQuadTriNoNewVerts = 363,
     tQuadTriSngl = 364,
     tQuadTriDbl = 365,
     tRecombLaterals = 366,
     tTransfQuadTri = 367,
     tText2D = 368,
     tText3D = 369,
     tInterpolationScheme = 370,
     tTime = 371,
     tCombine = 372,
     tBSpline = 373,
     tBezier = 374,
     tNurbs = 375,
     tNurbsOrder = 376,
     tNurbsKnots = 377,
     tColor = 378,
     tColorTable = 379,
     tFor = 380,
     tIn = 381,
     tEndFor = 382,
     tIf = 383,
     tEndIf = 384,
     tExit = 385,
     tAbort = 386,
     tField = 387,
     tReturn = 388,
     tCall = 389,
     tFunction = 390,
     tShow = 391,
     tHide = 392,
     tGetValue = 393,
     tGetEnv = 394,
     tGetString = 395,
     tHomology = 396,
     tCohomology = 397,
     tBetti = 398,
     tSetOrder = 399,
     tGMSH_MAJOR_VERSION = 400,
     tGMSH_MINOR_VERSION = 401,
     tGMSH_PATCH_VERSION = 402,
     tAFFECTDIVIDE = 403,
     tAFFECTTIMES = 404,
     tAFFECTMINUS = 405,
     tAFFECTPLUS = 406,
     tOR = 407,
     tAND = 408,
     tNOTEQUAL = 409,
     tEQUAL = 410,
     tGREATEROREQUAL = 411,
     tLESSOREQUAL = 412,
     UNARYPREC = 413,
     tMINUSMINUS = 414,
     tPLUSPLUS = 415
   };
#endif
/* Tokens.  */
#define tDOUBLE 258
#define tSTRING 259
#define tBIGSTR 260
#define tEND 261
#define tAFFECT 262
#define tDOTS 263
#define tPi 264
#define tMPI_Rank 265
#define tMPI_Size 266
#define tEuclidian 267
#define tCoordinates 268
#define tExp 269
#define tLog 270
#define tLog10 271
#define tSqrt 272
#define tSin 273
#define tAsin 274
#define tCos 275
#define tAcos 276
#define tTan 277
#define tRand 278
#define tAtan 279
#define tAtan2 280
#define tSinh 281
#define tCosh 282
#define tTanh 283
#define tFabs 284
#define tFloor 285
#define tCeil 286
#define tRound 287
#define tFmod 288
#define tModulo 289
#define tHypot 290
#define tList 291
#define tPrintf 292
#define tError 293
#define tStr 294
#define tSprintf 295
#define tStrCat 296
#define tStrPrefix 297
#define tStrRelative 298
#define tStrReplace 299
#define tStrFind 300
#define tStrCmp 301
#define tTextAttributes 302
#define tBoundingBox 303
#define tDraw 304
#define tSetChanged 305
#define tToday 306
#define tCpu 307
#define tMemory 308
#define tSyncModel 309
#define tCreateTopology 310
#define tCreateTopologyNoHoles 311
#define tDistanceFunction 312
#define tDefineConstant 313
#define tUndefineConstant 314
#define tPoint 315
#define tCircle 316
#define tEllipse 317
#define tLine 318
#define tSphere 319
#define tPolarSphere 320
#define tSurface 321
#define tSpline 322
#define tVolume 323
#define tCharacteristic 324
#define tLength 325
#define tParametric 326
#define tElliptic 327
#define tRefineMesh 328
#define tAdaptMesh 329
#define tRelocateMesh 330
#define tPlane 331
#define tRuled 332
#define tTransfinite 333
#define tComplex 334
#define tPhysical 335
#define tCompound 336
#define tPeriodic 337
#define tUsing 338
#define tPlugin 339
#define tDegenerated 340
#define tRecursive 341
#define tRotate 342
#define tTranslate 343
#define tSymmetry 344
#define tDilate 345
#define tExtrude 346
#define tLevelset 347
#define tRecombine 348
#define tSmoother 349
#define tSplit 350
#define tDelete 351
#define tCoherence 352
#define tIntersect 353
#define tMeshAlgorithm 354
#define tReverse 355
#define tLayers 356
#define tScaleLast 357
#define tHole 358
#define tAlias 359
#define tAliasWithOptions 360
#define tCopyOptions 361
#define tQuadTriAddVerts 362
#define tQuadTriNoNewVerts 363
#define tQuadTriSngl 364
#define tQuadTriDbl 365
#define tRecombLaterals 366
#define tTransfQuadTri 367
#define tText2D 368
#define tText3D 369
#define tInterpolationScheme 370
#define tTime 371
#define tCombine 372
#define tBSpline 373
#define tBezier 374
#define tNurbs 375
#define tNurbsOrder 376
#define tNurbsKnots 377
#define tColor 378
#define tColorTable 379
#define tFor 380
#define tIn 381
#define tEndFor 382
#define tIf 383
#define tEndIf 384
#define tExit 385
#define tAbort 386
#define tField 387
#define tReturn 388
#define tCall 389
#define tFunction 390
#define tShow 391
#define tHide 392
#define tGetValue 393
#define tGetEnv 394
#define tGetString 395
#define tHomology 396
#define tCohomology 397
#define tBetti 398
#define tSetOrder 399
#define tGMSH_MAJOR_VERSION 400
#define tGMSH_MINOR_VERSION 401
#define tGMSH_PATCH_VERSION 402
#define tAFFECTDIVIDE 403
#define tAFFECTTIMES 404
#define tAFFECTMINUS 405
#define tAFFECTPLUS 406
#define tOR 407
#define tAND 408
#define tNOTEQUAL 409
#define tEQUAL 410
#define tGREATEROREQUAL 411
#define tLESSOREQUAL 412
#define UNARYPREC 413
#define tMINUSMINUS 414
#define tPLUSPLUS 415

/* Copy the first part of user declarations.  */
Christophe Geuzaine's avatar
Christophe Geuzaine committed
// Gmsh - Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
Christophe Geuzaine's avatar
Christophe Geuzaine committed
// bugs and problems to the public mailing list <gmsh@geuz.org>.

#include <string.h>
#include <stdarg.h>
#include <time.h>
#include "GmshConfig.h"
#include "GmshMessage.h"
#include "fullMatrix.h"
#include "MallocUtils.h"
#include "ListUtils.h"
#include "TreeUtils.h"
#include "StringUtils.h"
#include "Numeric.h"
#include "Context.h"
#include "GModel.h"
#include "Geo.h"
#include "GeoInterpolation.h"
#include "Options.h"
#include "Parser.h"
#include "OpenFile.h"
#include "CommandLine.h"
#include "FunctionManager.h"
#include "ColorTable.h"
#include "OS.h"
#include "CreateFile.h"
#include "gmshSurface.h"
#include "gmshLevelset.h"

#if defined(HAVE_MESH)
#include "Generator.h"
#include "Field.h"
#include "BackgroundMesh.h"
#include "HighOrder.h"
#endif

#if defined(HAVE_POST)
#include "PView.h"
#include "PViewDataList.h"
#endif

#if defined(HAVE_PLUGINS)
#include "PluginManager.h"
#endif

#if defined(HAVE_OPENGL)
#include "drawContext.h"
#endif

// Global parser variables
std::string gmsh_yyname;
int gmsh_yyerrorstate = 0;
int gmsh_yyviewindex = 0;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
std::map<std::string, gmsh_yysymbol> gmsh_yysymbols;
std::map<std::string, std::string> gmsh_yystringsymbols;

// Static parser variables (accessible only in this file)
#if defined(HAVE_POST)
static PViewDataList *ViewData;
#endif
static std::vector<double> ViewCoord;
static std::vector<double> *ViewValueList = 0;
static int *ViewNumList = 0;
static ExtrudeParams extr;
static int curPhysDim = 0;
static gmshSurface *myGmshSurface = 0;
#define MAX_RECUR_LOOPS 100
static int ImbricatedLoop = 0;
static fpos_t yyposImbricatedLoopsTab[MAX_RECUR_LOOPS];
static int yylinenoImbricatedLoopsTab[MAX_RECUR_LOOPS];
static double LoopControlVariablesTab[MAX_RECUR_LOOPS][3];
static const char *LoopControlVariablesNameTab[MAX_RECUR_LOOPS];
static std::map<std::string, std::vector<double> > floatOptions;
static std::map<std::string, std::vector<std::string> > charOptions;

void yyerror(const char *s);
void yymsg(int level, const char *fmt, ...);
void skip_until(const char *skip, const char *until);
int PrintListOfDouble(char *format, List_T *list, char *buffer);
fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list);

/* 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

/* Enabling the token table.  */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 93 "Gmsh.y"
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  char *c;
  int i;
  unsigned int u;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  double d;
  double v[5];
  Shape s;
  List_T *l;
}
/* Line 193 of yacc.c.  */
	YYSTYPE;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* Copy the second part of user declarations.  */

/* Line 216 of yacc.c.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

#ifdef short
# undef short
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned int
# endif
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)

#ifndef YY_
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#  endif
# endif
# ifndef YY_
#  define YY_(msgid) msgid
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
# endif
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#else
# define YYUSE(e) /* empty */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* Identity function, used to suppress warnings about constant conditions.  */
#ifndef lint
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static int
YYID (int i)
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#else
static int
YYID (i)
    int i;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif
{
  return i;
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
}
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#if ! defined yyoverflow || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
     || defined __cplusplus || defined _MSC_VER)
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#     ifndef _STDLIB_H
#      define _STDLIB_H 1
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#  if (defined __cplusplus && ! defined _STDLIB_H \
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
       && ! ((defined YYMALLOC || defined malloc) \
	     && (defined YYFREE || defined free)))
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#   ifndef _STDLIB_H
#    define _STDLIB_H 1
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
     || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
Christophe Geuzaine's avatar
Christophe Geuzaine committed
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
     || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */


#if (! defined yyoverflow \
     && (! defined __cplusplus \
	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yytype_int16 yyss;
  YYSTYPE yyvs;
  };
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

Christophe Geuzaine's avatar
Christophe Geuzaine committed
/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  YYSIZE_T yyi;				\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (YYID (0))
#  endif
# endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack)					\
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
	YYCOPY (&yyptr->Stack, Stack, yysize);				\
	Stack = &yyptr->Stack;						\
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
    while (YYID (0))
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

#endif
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  5
/* YYLAST -- Last index in YYTABLE.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/* YYNTOKENS -- Number of terminals.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* YYNNTS -- Number of nonterminals.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* YYNRULES -- Number of rules.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* YYNRULES -- Number of states.  */
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

#define YYTRANSLATE(YYX)						\
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const yytype_uint8 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,   166,     2,   176,     2,   165,     2,     2,
     171,   172,   163,   161,   177,   162,   175,   164,     2,     2,
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
       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,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
Christophe Geuzaine's avatar
Christophe Geuzaine committed
     125,   126,   127,   128,   129,   130,   131,   132,   133,   134,
     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
     145,   146,   147,   148,   149,   150,   151,   153,   154,   155,
     156,   159,   160,   167,   168,   169
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const yytype_uint16 yyprhs[] =
{
       0,     0,     3,     5,     8,     9,    12,    14,    16,    18,
      20,    22,    24,    26,    28,    30,    32,    34,    36,    38,
     100,   107,   114,   123,   124,   127,   130,   133,   136,   139,
     141,   145,   147,   151,   152,   153,   164,   166,   170,   171,
     185,   187,   191,   192,   208,   217,   232,   233,   240,   242,
     244,   246,   248,   250,   252,   254,   260,   266,   271,   278,
     286,   294,   304,   314,   318,   325,   330,   337,   347,   354,
     364,   370,   379,   388,   400,   407,   417,   423,   431,   441,
     451,   463,   471,   481,   491,   492,   494,   495,   499,   505,
     506,   516,   522,   523,   533,   534,   538,   542,   548,   549,
     552,   556,   562,   566,   567,   570,   574,   578,   584,   586,
     588,   589,   595,   596,   599,   607,   608,   618,   625,   633,
     638,   646,   655,   664,   672,   680,   692,   701,   710,   711,
     721,   730,   740,   744,   749,   760,   768,   776,   785,   794,
     807,   808,   818,   827,   835,   844,   845,   855,   861,   873,
     879,   889,   899,   904,   914,   924,   926,   928,   929,   932,
     939,   946,   953,   960,   969,   980,   995,  1012,  1025,  1034,
    1043,  1050,  1065,  1070,  1077,  1084,  1088,  1093,  1099,  1106,
    1110,  1114,  1119,  1125,  1130,  1136,  1140,  1148,  1156,  1160,
    1168,  1172,  1175,  1178,  1181,  1184,  1200,  1203,  1206,  1209,
    1212,  1215,  1232,  1236,  1243,  1252,  1261,  1272,  1274,  1277,
    1279,  1283,  1288,  1290,  1296,  1308,  1322,  1323,  1331,  1332,
    1346,  1347,  1363,  1364,  1371,  1380,  1389,  1398,  1411,  1424,
    1437,  1452,  1467,  1482,  1483,  1496,  1497,  1510,  1511,  1524,
    1525,  1542,  1543,  1560,  1561,  1578,  1579,  1598,  1599,  1618,
    1619,  1638,  1640,  1643,  1649,  1657,  1667,  1670,  1673,  1676,
    1680,  1683,  1687,  1690,  1694,  1697,  1701,  1711,  1718,  1719,
    1723,  1724,  1726,  1727,  1730,  1731,  1734,  1742,  1749,  1758,
    1764,  1768,  1776,  1782,  1787,  1794,  1801,  1814,  1825,  1836,
    1847,  1858,  1869,  1874,  1879,  1884,  1889,  1894,  1897,  1901,
    1908,  1910,  1912,  1914,  1917,  1923,  1931,  1942,  1944,  1948,
    1951,  1954,  1957,  1961,  1965,  1969,  1973,  1977,  1981,  1985,
    1989,  1993,  1997,  2001,  2005,  2009,  2013,  2019,  2024,  2029,
    2034,  2039,  2044,  2049,  2054,  2059,  2064,  2069,  2076,  2081,
    2086,  2091,  2096,  2101,  2106,  2111,  2118,  2125,  2132,  2137,
    2142,  2147,  2152,  2157,  2162,  2167,  2172,  2177,  2182,  2187,
    2194,  2199,  2204,  2209,  2214,  2219,  2224,  2229,  2236,  2243,
    2250,  2255,  2257,  2259,  2261,  2263,  2265,  2267,  2269,  2271,
    2273,  2275,  2280,  2285,  2288,  2294,  2298,  2305,  2310,  2318,
    2325,  2332,  2339,  2344,  2346,  2349,  2352,  2356,  2360,  2372,
    2382,  2390,  2398,  2400,  2404,  2406,  2408,  2411,  2415,  2420,
    2426,  2428,  2430,  2433,  2437,  2441,  2447,  2452,  2455,  2458,
    2461,  2464,  2470,  2476,  2482,  2488,  2490,  2492,  2496,  2500,
    2505,  2512,  2519,  2521,  2523,  2527,  2531,  2541,  2549,  2551,
    2557,  2561,  2568,  2570,  2574,  2576,  2578,  2582,  2589,  2591,
    2593,  2598,  2605,  2612,  2619,  2624,  2629,  2638,  2643,  2648,
    2653,  2658,  2665,  2672,  2674,  2678,  2684,  2690,  2692
Christophe Geuzaine's avatar
 
Christophe Geuzaine committed

Christophe Geuzaine's avatar
 
Christophe Geuzaine committed
/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
static const yytype_int16 yyrhs[] =
{
     182,     0,    -1,   183,    -1,     1,     6,    -1,    -1,   183,
     184,    -1,   187,    -1,   186,    -1,   205,    -1,   219,    -1,
     224,    -1,   228,    -1,   229,    -1,   230,    -1,   233,    -1,
     253,    -1,   254,    -1,   232,    -1,   231,    -1,   227,    -1,
     256,    -1,   158,    -1,   158,   158,    -1,    37,   171,   269,
     172,     6,    -1,    38,   171,   269,   172,     6,    -1,    37,
     171,   269,   172,   185,   269,     6,    -1,    37,   171,   269,
     177,   265,   172,     6,    -1,    38,   171,   269,   177,   265,
     172,     6,    -1,    37,   171,   269,   177,   265,   172,   185,
     269,     6,    -1,     4,   269,   178,   188,   179,     6,    -1,
     104,     4,   173,   257,   174,     6,    -1,   105,     4,   173,
     257,   174,     6,    -1,   106,     4,   173,   257,   177,   257,
     174,     6,    -1,    -1,   188,   191,    -1,   188,   195,    -1,
     188,   198,    -1,   188,   200,    -1,   188,   201,    -1,   257,
      -1,   189,   177,   257,    -1,   257,    -1,   190,   177,   257,
      -1,    -1,    -1,     4,   192,   171,   189,   172,   193,   178,
     190,   179,     6,    -1,   269,    -1,   194,   177,   269,    -1,
      -1,   113,   171,   257,   177,   257,   177,   257,   172,   196,
     178,   194,   179,     6,    -1,   269,    -1,   197,   177,   269,
      -1,    -1,   114,   171,   257,   177,   257,   177,   257,   177,
     257,   172,   199,   178,   197,   179,     6,    -1,   115,   178,
     261,   179,   178,   261,   179,     6,    -1,   115,   178,   261,
     179,   178,   261,   179,   178,   261,   179,   178,   261,   179,
       6,    -1,    -1,   116,   202,   178,   190,   179,     6,    -1,
       7,    -1,   151,    -1,   150,    -1,   149,    -1,   148,    -1,
     169,    -1,   168,    -1,    58,   173,   207,   174,     6,    -1,
      59,   173,   210,   174,     6,    -1,   273,   203,   262,     6,
      -1,     4,   173,   174,   203,   262,     6,    -1,     4,   173,
     257,   174,   203,   257,     6,    -1,     4,   171,   257,   172,
     203,   257,     6,    -1,     4,   173,   178,   265,   179,   174,
     203,   262,     6,    -1,     4,   171,   178,   265,   179,   172,
     203,   262,     6,    -1,   273,   204,     6,    -1,     4,   173,
     257,   174,   204,     6,    -1,   273,     7,   270,     6,    -1,
       4,   175,     4,     7,   270,     6,    -1,     4,   173,   257,
     174,   175,     4,     7,   270,     6,    -1,     4,   175,     4,
     203,   257,     6,    -1,     4,   173,   257,   174,   175,     4,
     203,   257,     6,    -1,     4,   175,     4,   204,     6,    -1,
       4,   173,   257,   174,   175,     4,   204,     6,    -1,     4,
     175,   123,   175,     4,     7,   266,     6,    -1,     4,   173,
     257,   174,   175,   123,   175,     4,     7,   266,     6,    -1,
       4,   175,   124,     7,   267,     6,    -1,     4,   173,   257,
     174,   175,   124,     7,   267,     6,    -1,     4,   132,     7,
     257,     6,    -1,   132,   173,   257,   174,     7,     4,     6,
      -1,   132,   173,   257,   174,   175,     4,     7,   257,     6,
      -1,   132,   173,   257,   174,   175,     4,     7,   270,     6,
      -1,   132,   173,   257,   174,   175,     4,     7,   178,   265,
     179,     6,    -1,   132,   173,   257,   174,   175,     4,     6,
      -1,    84,   171,     4,   172,   175,     4,     7,   257,     6,
      -1,    84,   171,     4,   172,   175,     4,     7,   270,     6,
      -1,    -1,   177,    -1,    -1,   207,   206,   273,    -1,   207,
     206,   273,     7,   257,    -1,    -1,   207,   206,   273,     7,
     178,   257,   208,   212,   179,    -1,   207,   206,   273,     7,
     270,    -1,    -1,   207,   206,   273,     7,   178,   270,   209,
     214,   179,    -1,    -1,   210,   206,   269,    -1,   257,     7,
     270,    -1,   211,   177,   257,     7,   270,    -1,    -1,   212,
     213,    -1,   177,     4,   262,    -1,   177,     4,   178,   211,
     179,    -1,   177,     4,   270,    -1,    -1,   214,   215,    -1,
     177,     4,   257,    -1,   177,     4,   270,    -1,   177,     4,
     178,   271,   179,    -1,   257,    -1,   270,    -1,    -1,   126,
      64,   178,   257,   179,    -1,    -1,    76,   259,    -1,    60,
     171,   257,   172,     7,   259,     6,    -1,    -1,    80,    60,
     220,   171,   216,   172,     7,   262,     6,    -1,    69,    70,
     262,     7,   257,     6,    -1,    63,   171,   257,   172,     7,
     262,     6,    -1,    85,    63,   262,     6,    -1,    67,   171,
     257,   172,     7,   262,     6,    -1,    61,   171,   257,   172,
       7,   262,   218,     6,    -1,    62,   171,   257,   172,     7,
     262,   218,     6,    -1,   118,   171,   257,   172,     7,   262,
       6,    -1,   119,   171,   257,   172,     7,   262,     6,    -1,
     120,   171,   257,   172,     7,   262,   122,   262,   121,   257,
       6,    -1,    63,     4,   171,   257,   172,     7,   262,     6,
      -1,    81,    63,   171,   257,   172,     7,   262,     6,    -1,
      -1,    80,    63,   221,   171,   216,   172,     7,   262,     6,
      -1,    76,    66,   171,   257,   172,     7,   262,     6,    -1,
      77,    66,   171,   257,   172,     7,   262,   217,     6,    -1,
      12,    13,     6,    -1,    13,    66,   257,     6,    -1,    71,
      66,   171,   257,   172,     7,     5,     5,     5,     6,    -1,
      64,   171,   257,   172,     7,   262,     6,    -1,    65,   171,
     257,   172,     7,   262,     6,    -1,    66,     4,   171,   257,
     172,     7,   262,     6,    -1,    81,    66,   171,   257,   172,
       7,   262,     6,    -1,    81,    66,   171,   257,   172,     7,
     262,     4,   178,   261,   179,     6,    -1,    -1,    80,    66,
     222,   171,   216,   172,     7,   262,     6,    -1,    79,    68,
     171,   257,   172,     7,   262,     6,    -1,    68,   171,   257,
     172,     7,   262,     6,    -1,    81,    68,   171,   257,   172,
       7,   262,     6,    -1,    -1,    80,    68,   223,   171,   216,
     172,     7,   262,     6,    -1,    88,   259,   178,   225,   179,
      -1,    87,   178,   259,   177,   259,   177,   257,   179,   178,
     225,   179,    -1,    89,   259,   178,   225,   179,    -1,    90,
     178,   259,   177,   257,   179,   178,   225,   179,    -1,    90,
     178,   259,   177,   259,   179,   178,   225,   179,    -1,     4,
     178,   225,   179,    -1,    98,    63,   178,   265,   179,    66,
     178,   257,   179,    -1,    95,    63,   171,   257,   172,   178,
     265,   179,     6,    -1,   226,    -1,   224,    -1,    -1,   226,
     219,    -1,   226,    60,   178,   265,   179,     6,    -1,   226,
      63,   178,   265,   179,     6,    -1,   226,    66,   178,   265,
     179,     6,    -1,   226,    68,   178,   265,   179,     6,    -1,
      92,    76,   171,   257,   172,     7,   262,     6,    -1,    92,
      60,   171,   257,   172,     7,   178,   261,   179,     6,    -1,
      92,    76,   171,   257,   172,     7,   178,   259,   177,   259,
     177,   265,   179,     6,    -1,    92,    76,   171,   257,   172,
       7,   178,   259,   177,   259,   177,   259,   177,   265,   179,
       6,    -1,    92,    64,   171,   257,   172,     7,   178,   259,
     177,   265,   179,     6,    -1,    92,     4,   171,   257,   172,
       7,   262,     6,    -1,    92,     4,   171,   257,   172,     7,
       5,     6,    -1,    92,     4,   178,   257,   179,     6,    -1,
      92,     4,   171,   257,   172,     7,   178,   259,   177,   259,
     177,   265,   179,     6,    -1,    96,   178,   226,   179,    -1,
      96,   132,   173,   257,   174,     6,    -1,    96,     4,   173,
     257,   174,     6,    -1,    96,     4,     6,    -1,    96,     4,
       4,     6,    -1,   123,   266,   178,   226,   179,    -1,    86,
     123,   266,   178,   226,   179,    -1,   136,     5,     6,    -1,
     137,     5,     6,    -1,   136,   178,   226,   179,    -1,    86,
     136,   178,   226,   179,    -1,   137,   178,   226,   179,    -1,
      86,   137,   178,   226,   179,    -1,     4,   270,     6,    -1,
       4,     4,   173,   257,   174,   269,     6,    -1,     4,     4,
       4,   173,   257,   174,     6,    -1,     4,   257,     6,    -1,
      84,   171,     4,   172,   175,     4,     6,    -1,   117,     4,
       6,    -1,   130,     6,    -1,   131,     6,    -1,    54,     6,
      -1,    48,     6,    -1,    48,   178,   257,   177,   257,   177,
     257,   177,   257,   177,   257,   177,   257,   179,     6,    -1,
      49,     6,    -1,    50,     6,    -1,    55,     6,    -1,    56,
       6,    -1,    73,     6,    -1,    74,   178,   265,   179,   178,
     265,   179,   178,   261,   179,   178,   257,   177,   257,   179,
       6,    -1,   144,   257,     6,    -1,   125,   171,   257,     8,
     257,   172,    -1,   125,   171,   257,     8,   257,     8,   257,