/home/cern/BDSIM_new/parser/parser.tab.c

00001 #define YY_parse_h_included
00002 /*#define YY_USE_CLASS 
00003 */
00004 /*  A Bison++ parser, made from parser.y  */
00005 
00006  /* with Bison++ version bison++ Version 1.21.9-1, adapted from GNU bison by coetmeur@icdc.fr
00007 Maintained by Magnus Ekdahl <magnus@debian.org>
00008   */
00009 
00010 
00011 #line 1 "/usr/share/bison++/bison.cc"
00012 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
00013 /* Skeleton output parser for bison,
00014    Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
00015 
00016    This program is free software; you can redistribute it and/or modify
00017    it under the terms of the GNU General Public License as published by
00018    the Free Software Foundation; either version 1, or (at your option)
00019    any later version.
00020 
00021    This program is distributed in the hope that it will be useful,
00022    but WITHOUT ANY WARRANTY; without even the implied warranty of
00023    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024    GNU General Public License for more details.
00025 
00026    You should have received a copy of the GNU General Public License
00027    along with this program; if not, write to the Free Software
00028    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
00029 
00030    As a special exception, when this file is copied by Bison++ into a
00031    Bison++ output file, you may use that output file without restriction.
00032    This special exception was added by the Free Software Foundation
00033    in version 1.24 of Bison, and has been in Bison++ since 1.21.9.  
00034 
00035 */
00036 
00037 /* HEADER SECTION */
00038 #if defined( _MSDOS ) || defined(MSDOS) || defined(__MSDOS__) 
00039  #define __MSDOS_AND_ALIKE
00040 #endif
00041 
00042 #if defined(_WINDOWS) && defined(_MSC_VER)
00043  #define __HAVE_NO_ALLOCA
00044  #define __MSDOS_AND_ALIKE
00045 #endif
00046 
00047 #ifndef alloca
00048  #if defined( __GNUC__)
00049   #define alloca __builtin_alloca
00050 
00051  #elif (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc)  || defined (__sgi)
00052   #include <alloca.h>
00053 
00054  #elif defined (__MSDOS_AND_ALIKE)
00055   #include <malloc.h>
00056   #ifndef __TURBOC__
00057    /* MS C runtime lib */
00058    #define alloca _alloca
00059   #endif
00060 
00061  #elif defined(_AIX)
00062   /* pragma must be put before any C/C++ instruction !! */
00063   #pragma alloca
00064   #include <malloc.h>
00065 
00066  #elif defined(__hpux)
00067   #ifdef __cplusplus
00068    extern "C" {
00069      void *alloca (unsigned int);
00070    };
00071   #else /* not __cplusplus */
00072    void *alloca ();
00073   #endif /* not __cplusplus */
00074 
00075  #endif /* not _AIX  not MSDOS, or __TURBOC__ or _AIX, not sparc.  */
00076 #endif /* alloca not defined.  */
00077 
00078 #ifdef c_plusplus
00079  #ifndef __cplusplus
00080   #define __cplusplus
00081  #endif
00082 #endif
00083 
00084 #ifdef __cplusplus
00085  #ifndef YY_USE_CLASS
00086 /*#warning "For C++ its recomended to use bison++, otherwise classes won't be generated"*/
00087  #endif
00088 #else
00089  #ifndef __STDC__
00090   #define const
00091  #endif
00092  #ifdef YY_USE_CLASS
00093   #error "This is a C++ header generated by bison++, please use a C++ compiler!"
00094  #endif
00095 #endif
00096 
00097 #include <stdio.h>
00098 #define YYBISON 1  
00099 
00100  #line 88 "/usr/share/bison++/bison.cc"
00101 #line 7 "parser.y"
00102 
00103 
00104   extern int line_num;
00105   extern char* yyfilename;
00106 
00107   const int DEBUG = 0; // print debug info like parsing output etc.
00108   const int ECHO_GRAMMAR = 0; // print grammar rule expansion (for debugging)
00109   const int VERBOSE = 0; // print warnings and errors
00110   const int VERBOSE_EXPAND = 0; // print the process of line expansion 
00111   const int INTERACTIVE = 0; // print output of commands (like in interactive mode)
00112 
00113 #include "parser.h"
00114 
00115   int execute = 1;
00116   int element_count = 1; // for samplers , ranges etc.
00117 #ifdef __cplusplus
00118   using namespace std;
00119 #endif
00120 
00121 
00122 #line 29 "parser.y"
00123 typedef union{
00124   double dval;
00125   int ival;
00126   struct symtab *symp;
00127   char *str;
00128   struct Array *array;
00129 } yy_parse_stype;
00130 #define YY_parse_STYPE yy_parse_stype
00131 #ifndef YY_USE_CLASS
00132 #define YYSTYPE yy_parse_stype
00133 #endif
00134 
00135 #line 88 "/usr/share/bison++/bison.cc"
00136 /* %{ and %header{ and %union, during decl */
00137 #define YY_parse_BISON 1
00138 
00139 #ifndef YY_parse_COMPATIBILITY
00140  #ifndef YY_USE_CLASS
00141   #define  YY_parse_COMPATIBILITY 1
00142  #else
00143   #define  YY_parse_COMPATIBILITY 0
00144  #endif
00145 #endif
00146 
00147 #if YY_parse_COMPATIBILITY != 0
00148  /* backward compatibility */
00149  #ifdef YYLTYPE
00150   #ifndef YY_parse_LTYPE
00151    #define YY_parse_LTYPE YYLTYPE
00152   #endif
00153  #endif
00154 /* Testing alternative bison solution
00155    /#ifdef YYSTYPE*/
00156 #ifndef YY_parse_STYPE 
00157    #define YY_parse_STYPE YYSTYPE
00158 #endif
00159 /*#endif*/
00160  #ifdef YYDEBUG
00161   #ifndef YY_parse_DEBUG
00162    #define  YY_parse_DEBUG YYDEBUG
00163   #endif
00164  #endif
00165  
00166  /* use goto to be compatible */
00167  #ifndef YY_parse_USE_GOTO
00168   #define YY_parse_USE_GOTO 1
00169  #endif
00170 #endif
00171 
00172 /* use no goto to be clean in C++ */
00173 #ifndef YY_parse_USE_GOTO
00174  #define YY_parse_USE_GOTO 0
00175 #endif
00176 
00177 #ifndef YY_parse_PURE
00178 
00179  #line 130 "/usr/share/bison++/bison.cc"
00180 
00181 #line 130 "/usr/share/bison++/bison.cc"
00182 /*  YY_parse_PURE */
00183 #endif
00184 
00185 /* section apres lecture def, avant lecture grammaire S2 */
00186 
00187  #line 134 "/usr/share/bison++/bison.cc"
00188 
00189 #line 134 "/usr/share/bison++/bison.cc"
00190 /* prefix */
00191 #ifndef YY_parse_DEBUG
00192 
00193  #line 136 "/usr/share/bison++/bison.cc"
00194 
00195 #line 136 "/usr/share/bison++/bison.cc"
00196 /* YY_parse_DEBUG */
00197 #endif
00198 
00199 
00200 #ifndef YY_parse_LSP_NEEDED
00201 
00202  #line 141 "/usr/share/bison++/bison.cc"
00203 
00204 #line 141 "/usr/share/bison++/bison.cc"
00205  /* YY_parse_LSP_NEEDED*/
00206 #endif
00207 
00208 
00209 
00210 /* DEFAULT LTYPE*/
00211 #ifdef YY_parse_LSP_NEEDED
00212 #ifndef YY_parse_LTYPE
00213 #ifndef BISON_YYLTYPE_ISDECLARED
00214 #define BISON_YYLTYPE_ISDECLARED
00215 typedef
00216   struct yyltype
00217     {
00218       int timestamp;
00219       int first_line;
00220       int first_column;
00221       int last_line;
00222       int last_column;
00223       char *text;
00224    }
00225   yyltype;
00226 
00227 #endif
00228 #define YY_parse_LTYPE yyltype
00229 #endif
00230 #endif
00231 /* DEFAULT STYPE*/
00232       /* We used to use `unsigned long' as YY_parse_STYPE on MSDOS,
00233          but it seems better to be consistent.
00234          Most programs should declare their own type anyway.  */
00235 
00236 #ifndef YY_parse_STYPE
00237 #define YY_parse_STYPE int
00238 #endif
00239 /* DEFAULT MISCELANEOUS */
00240 #ifndef YY_parse_PARSE
00241 #define YY_parse_PARSE yyparse
00242 #endif
00243 #ifndef YY_parse_LEX
00244 #define YY_parse_LEX yylex
00245 #endif
00246 #ifndef YY_parse_LVAL
00247 #define YY_parse_LVAL yylval
00248 #endif
00249 #ifndef YY_parse_LLOC
00250 #define YY_parse_LLOC yylloc
00251 #endif
00252 #ifndef YY_parse_CHAR
00253 #define YY_parse_CHAR yychar
00254 #endif
00255 #ifndef YY_parse_NERRS
00256 #define YY_parse_NERRS yynerrs
00257 #endif
00258 #ifndef YY_parse_DEBUG_FLAG
00259 #define YY_parse_DEBUG_FLAG yydebug
00260 #endif
00261 #ifndef YY_parse_ERROR
00262 #define YY_parse_ERROR yyerror
00263 #endif
00264 
00265 #ifndef YY_parse_PARSE_PARAM
00266  #ifndef YY_USE_CLASS
00267   #ifdef YYPARSE_PARAM
00268    #define YY_parse_PARSE_PARAM void* YYPARSE_PARAM 
00269   #else
00270    #ifndef __STDC__
00271     #ifndef __cplusplus
00272      #define YY_parse_PARSE_PARAM
00273     #endif
00274    #endif
00275   #endif
00276  #endif
00277  #ifndef YY_parse_PARSE_PARAM
00278   #define YY_parse_PARSE_PARAM void
00279  #endif
00280 #endif
00281 
00282 #if YY_parse_COMPATIBILITY != 0
00283 /* backward compatibility */
00284 #ifdef YY_parse_LTYPE
00285 #ifndef YYLTYPE
00286 #define YYLTYPE YY_parse_LTYPE
00287 #else
00288 /* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */
00289 #endif
00290 #endif
00291 
00292 /* Removed due to bison compabilityproblems
00293 /#ifndef YYSTYPE
00294 /#define YYSTYPE YY_parse_STYPE
00295 /#else*/
00296 /* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */
00297 /*#endif*/
00298 
00299 #ifdef YY_parse_PURE
00300 #  ifndef YYPURE
00301 #    define YYPURE YY_parse_PURE
00302 #  endif
00303 #endif
00304 
00305 #ifdef YY_parse_DEBUG
00306 #  ifndef YYDEBUG
00307 #    define YYDEBUG YY_parse_DEBUG 
00308 #  endif
00309 #endif
00310 
00311 #ifndef YY_parse_ERROR_VERBOSE
00312  #ifdef YYERROR_VERBOSE
00313   #define YY_parse_ERROR_VERBOSE YYERROR_VERBOSE
00314  #endif
00315 #endif
00316 
00317 #ifndef YY_parse_LSP_NEEDED
00318 #  ifdef YYLSP_NEEDED
00319 #    define YY_parse_LSP_NEEDED YYLSP_NEEDED
00320 #  endif
00321 #endif
00322 
00323 #endif
00324 
00325 #ifndef YY_USE_CLASS
00326 /* TOKEN C */
00327 
00328  #line 263 "/usr/share/bison++/bison.cc"
00329 #define NE      258
00330 #define LE      259
00331 #define GE      260
00332 #define EQ      261
00333 #define UMINUS  262
00334 #define UPLUS   263
00335 #define NUMBER  264
00336 #define VARIABLE        265
00337 #define VECVAR  266
00338 #define FUNC    267
00339 #define STR     268
00340 #define MARKER  269
00341 #define ELEMENT 270
00342 #define DRIFT   271
00343 #define RF      272
00344 #define DIPOLE  273
00345 #define RBEND   274
00346 #define SBEND   275
00347 #define QUADRUPOLE      276
00348 #define SEXTUPOLE       277
00349 #define OCTUPOLE        278
00350 #define MULTIPOLE       279
00351 #define SOLENOID        280
00352 #define COLLIMATOR      281
00353 #define RCOL    282
00354 #define ECOL    283
00355 #define LINE    284
00356 #define SEQUENCE        285
00357 #define SPOILER 286
00358 #define ABSORBER        287
00359 #define LASER   288
00360 #define TRANSFORM3D     289
00361 #define VKICK   290
00362 #define HKICK   291
00363 #define KICK    292
00364 #define PERIOD  293
00365 #define APERTURE        294
00366 #define FILENAME        295
00367 #define GAS     296
00368 #define PIPE    297
00369 #define TUNNEL  298
00370 #define MATERIAL        299
00371 #define ATOM    300
00372 #define BEAM    301
00373 #define OPTION  302
00374 #define PRINT   303
00375 #define RANGE   304
00376 #define STOP    305
00377 #define USE     306
00378 #define VALUE   307
00379 #define ECHO    308
00380 #define PRINTF  309
00381 #define SAMPLE  310
00382 #define CSAMPLE 311
00383 #define BETA0   312
00384 #define TWISS   313
00385 #define DUMP    314
00386 #define IF      315
00387 #define ELSE    316
00388 #define BEGN    317
00389 #define END     318
00390 #define FOR     319
00391 #define CUT     320
00392 
00393 
00394 #line 263 "/usr/share/bison++/bison.cc"
00395  /* #defines tokens */
00396 #else
00397 /* CLASS */
00398 #ifndef YY_parse_CLASS
00399 #define YY_parse_CLASS parse
00400 #endif
00401 #ifndef YY_parse_INHERIT
00402 #define YY_parse_INHERIT
00403 #endif
00404 #ifndef YY_parse_MEMBERS
00405 #define YY_parse_MEMBERS 
00406 #endif
00407 #ifndef YY_parse_LEX_BODY
00408 #define YY_parse_LEX_BODY  
00409 #endif
00410 #ifndef YY_parse_ERROR_BODY
00411 #define YY_parse_ERROR_BODY  
00412 #endif
00413 #ifndef YY_parse_CONSTRUCTOR_PARAM
00414 #define YY_parse_CONSTRUCTOR_PARAM
00415 #endif
00416 #ifndef YY_parse_CONSTRUCTOR_CODE
00417 #define YY_parse_CONSTRUCTOR_CODE
00418 #endif
00419 #ifndef YY_parse_CONSTRUCTOR_INIT
00420 #define YY_parse_CONSTRUCTOR_INIT
00421 #endif
00422 /* choose between enum and const */
00423 #ifndef YY_parse_USE_CONST_TOKEN
00424 #define YY_parse_USE_CONST_TOKEN 0
00425 /* yes enum is more compatible with flex,  */
00426 /* so by default we use it */ 
00427 #endif
00428 #if YY_parse_USE_CONST_TOKEN != 0
00429 #ifndef YY_parse_ENUM_TOKEN
00430 #define YY_parse_ENUM_TOKEN yy_parse_enum_token
00431 #endif
00432 #endif
00433 
00434 class YY_parse_CLASS YY_parse_INHERIT
00435 {
00436 public: 
00437 #if YY_parse_USE_CONST_TOKEN != 0
00438 /* static const int token ... */
00439 
00440  #line 307 "/usr/share/bison++/bison.cc"
00441 static const int NE;
00442 static const int LE;
00443 static const int GE;
00444 static const int EQ;
00445 static const int UMINUS;
00446 static const int UPLUS;
00447 static const int NUMBER;
00448 static const int VARIABLE;
00449 static const int VECVAR;
00450 static const int FUNC;
00451 static const int STR;
00452 static const int MARKER;
00453 static const int ELEMENT;
00454 static const int DRIFT;
00455 static const int RF;
00456 static const int DIPOLE;
00457 static const int RBEND;
00458 static const int SBEND;
00459 static const int QUADRUPOLE;
00460 static const int SEXTUPOLE;
00461 static const int OCTUPOLE;
00462 static const int MULTIPOLE;
00463 static const int SOLENOID;
00464 static const int COLLIMATOR;
00465 static const int RCOL;
00466 static const int ECOL;
00467 static const int LINE;
00468 static const int SEQUENCE;
00469 static const int SPOILER;
00470 static const int ABSORBER;
00471 static const int LASER;
00472 static const int TRANSFORM3D;
00473 static const int VKICK;
00474 static const int HKICK;
00475 static const int KICK;
00476 static const int PERIOD;
00477 static const int APERTURE;
00478 static const int FILENAME;
00479 static const int GAS;
00480 static const int PIPE;
00481 static const int TUNNEL;
00482 static const int MATERIAL;
00483 static const int ATOM;
00484 static const int BEAM;
00485 static const int OPTION;
00486 static const int PRINT;
00487 static const int RANGE;
00488 static const int STOP;
00489 static const int USE;
00490 static const int VALUE;
00491 static const int ECHO;
00492 static const int PRINTF;
00493 static const int SAMPLE;
00494 static const int CSAMPLE;
00495 static const int BETA0;
00496 static const int TWISS;
00497 static const int DUMP;
00498 static const int IF;
00499 static const int ELSE;
00500 static const int BEGN;
00501 static const int END;
00502 static const int FOR;
00503 static const int CUT;
00504 
00505 
00506 #line 307 "/usr/share/bison++/bison.cc"
00507  /* decl const */
00508 #else
00509 enum YY_parse_ENUM_TOKEN { YY_parse_NULL_TOKEN=0
00510 
00511  #line 310 "/usr/share/bison++/bison.cc"
00512         ,NE=258
00513         ,LE=259
00514         ,GE=260
00515         ,EQ=261
00516         ,UMINUS=262
00517         ,UPLUS=263
00518         ,NUMBER=264
00519         ,VARIABLE=265
00520         ,VECVAR=266
00521         ,FUNC=267
00522         ,STR=268
00523         ,MARKER=269
00524         ,ELEMENT=270
00525         ,DRIFT=271
00526         ,RF=272
00527         ,DIPOLE=273
00528         ,RBEND=274
00529         ,SBEND=275
00530         ,QUADRUPOLE=276
00531         ,SEXTUPOLE=277
00532         ,OCTUPOLE=278
00533         ,MULTIPOLE=279
00534         ,SOLENOID=280
00535         ,COLLIMATOR=281
00536         ,RCOL=282
00537         ,ECOL=283
00538         ,LINE=284
00539         ,SEQUENCE=285
00540         ,SPOILER=286
00541         ,ABSORBER=287
00542         ,LASER=288
00543         ,TRANSFORM3D=289
00544         ,VKICK=290
00545         ,HKICK=291
00546         ,KICK=292
00547         ,PERIOD=293
00548         ,APERTURE=294
00549         ,FILENAME=295
00550         ,GAS=296
00551         ,PIPE=297
00552         ,TUNNEL=298
00553         ,MATERIAL=299
00554         ,ATOM=300
00555         ,BEAM=301
00556         ,OPTION=302
00557         ,PRINT=303
00558         ,RANGE=304
00559         ,STOP=305
00560         ,USE=306
00561         ,VALUE=307
00562         ,ECHO=308
00563         ,PRINTF=309
00564         ,SAMPLE=310
00565         ,CSAMPLE=311
00566         ,BETA0=312
00567         ,TWISS=313
00568         ,DUMP=314
00569         ,IF=315
00570         ,ELSE=316
00571         ,BEGN=317
00572         ,END=318
00573         ,FOR=319
00574         ,CUT=320
00575 
00576 
00577 #line 310 "/usr/share/bison++/bison.cc"
00578  /* enum token */
00579      }; /* end of enum declaration */
00580 #endif
00581 public:
00582  int YY_parse_PARSE (YY_parse_PARSE_PARAM);
00583  virtual void YY_parse_ERROR(char *msg) YY_parse_ERROR_BODY;
00584 #ifdef YY_parse_PURE
00585 #ifdef YY_parse_LSP_NEEDED
00586  virtual int  YY_parse_LEX (YY_parse_STYPE *YY_parse_LVAL,YY_parse_LTYPE *YY_parse_LLOC) YY_parse_LEX_BODY;
00587 #else
00588  virtual int  YY_parse_LEX (YY_parse_STYPE *YY_parse_LVAL) YY_parse_LEX_BODY;
00589 #endif
00590 #else
00591  virtual int YY_parse_LEX() YY_parse_LEX_BODY;
00592  YY_parse_STYPE YY_parse_LVAL;
00593 #ifdef YY_parse_LSP_NEEDED
00594  YY_parse_LTYPE YY_parse_LLOC;
00595 #endif
00596  int   YY_parse_NERRS;
00597  int    YY_parse_CHAR;
00598 #endif
00599 #if YY_parse_DEBUG != 0
00600  int YY_parse_DEBUG_FLAG;   /*  nonzero means print parse trace     */
00601 #endif
00602 public:
00603  YY_parse_CLASS(YY_parse_CONSTRUCTOR_PARAM);
00604 public:
00605  YY_parse_MEMBERS 
00606 };
00607 /* other declare folow */
00608 #if YY_parse_USE_CONST_TOKEN != 0
00609 
00610  #line 341 "/usr/share/bison++/bison.cc"
00611 const int YY_parse_CLASS::NE=258;
00612 const int YY_parse_CLASS::LE=259;
00613 const int YY_parse_CLASS::GE=260;
00614 const int YY_parse_CLASS::EQ=261;
00615 const int YY_parse_CLASS::UMINUS=262;
00616 const int YY_parse_CLASS::UPLUS=263;
00617 const int YY_parse_CLASS::NUMBER=264;
00618 const int YY_parse_CLASS::VARIABLE=265;
00619 const int YY_parse_CLASS::VECVAR=266;
00620 const int YY_parse_CLASS::FUNC=267;
00621 const int YY_parse_CLASS::STR=268;
00622 const int YY_parse_CLASS::MARKER=269;
00623 const int YY_parse_CLASS::ELEMENT=270;
00624 const int YY_parse_CLASS::DRIFT=271;
00625 const int YY_parse_CLASS::RF=272;
00626 const int YY_parse_CLASS::DIPOLE=273;
00627 const int YY_parse_CLASS::RBEND=274;
00628 const int YY_parse_CLASS::SBEND=275;
00629 const int YY_parse_CLASS::QUADRUPOLE=276;
00630 const int YY_parse_CLASS::SEXTUPOLE=277;
00631 const int YY_parse_CLASS::OCTUPOLE=278;
00632 const int YY_parse_CLASS::MULTIPOLE=279;
00633 const int YY_parse_CLASS::SOLENOID=280;
00634 const int YY_parse_CLASS::COLLIMATOR=281;
00635 const int YY_parse_CLASS::RCOL=282;
00636 const int YY_parse_CLASS::ECOL=283;
00637 const int YY_parse_CLASS::LINE=284;
00638 const int YY_parse_CLASS::SEQUENCE=285;
00639 const int YY_parse_CLASS::SPOILER=286;
00640 const int YY_parse_CLASS::ABSORBER=287;
00641 const int YY_parse_CLASS::LASER=288;
00642 const int YY_parse_CLASS::TRANSFORM3D=289;
00643 const int YY_parse_CLASS::VKICK=290;
00644 const int YY_parse_CLASS::HKICK=291;
00645 const int YY_parse_CLASS::KICK=292;
00646 const int YY_parse_CLASS::PERIOD=293;
00647 const int YY_parse_CLASS::APERTURE=294;
00648 const int YY_parse_CLASS::FILENAME=295;
00649 const int YY_parse_CLASS::GAS=296;
00650 const int YY_parse_CLASS::PIPE=297;
00651 const int YY_parse_CLASS::TUNNEL=298;
00652 const int YY_parse_CLASS::MATERIAL=299;
00653 const int YY_parse_CLASS::ATOM=300;
00654 const int YY_parse_CLASS::BEAM=301;
00655 const int YY_parse_CLASS::OPTION=302;
00656 const int YY_parse_CLASS::PRINT=303;
00657 const int YY_parse_CLASS::RANGE=304;
00658 const int YY_parse_CLASS::STOP=305;
00659 const int YY_parse_CLASS::USE=306;
00660 const int YY_parse_CLASS::VALUE=307;
00661 const int YY_parse_CLASS::ECHO=308;
00662 const int YY_parse_CLASS::PRINTF=309;
00663 const int YY_parse_CLASS::SAMPLE=310;
00664 const int YY_parse_CLASS::CSAMPLE=311;
00665 const int YY_parse_CLASS::BETA0=312;
00666 const int YY_parse_CLASS::TWISS=313;
00667 const int YY_parse_CLASS::DUMP=314;
00668 const int YY_parse_CLASS::IF=315;
00669 const int YY_parse_CLASS::ELSE=316;
00670 const int YY_parse_CLASS::BEGN=317;
00671 const int YY_parse_CLASS::END=318;
00672 const int YY_parse_CLASS::FOR=319;
00673 const int YY_parse_CLASS::CUT=320;
00674 
00675 
00676 #line 341 "/usr/share/bison++/bison.cc"
00677  /* const YY_parse_CLASS::token */
00678 #endif
00679 /*apres const  */
00680 YY_parse_CLASS::YY_parse_CLASS(YY_parse_CONSTRUCTOR_PARAM) YY_parse_CONSTRUCTOR_INIT
00681 {
00682 #if YY_parse_DEBUG != 0
00683 YY_parse_DEBUG_FLAG=0;
00684 #endif
00685 YY_parse_CONSTRUCTOR_CODE;
00686 };
00687 #endif
00688 
00689  #line 352 "/usr/share/bison++/bison.cc"
00690 
00691 
00692 #define YYFINAL         345
00693 #define YYFLAG          -32768
00694 #define YYNTBASE        83
00695 
00696 #define YYTRANSLATE(x) ((unsigned)(x) <= 320 ? yytranslate[x] : 128)
00697 
00698 static const char yytranslate[] = {     0,
00699      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00700      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00701      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00702      2,     2,     2,     2,     2,     2,     2,     2,     2,    76,
00703     77,     5,     3,    79,     4,     2,     6,     2,     2,     2,
00704      2,     2,     2,     2,     2,     2,     2,    78,    73,     8,
00705     80,     9,     2,     2,     2,     2,     2,     2,     2,     2,
00706      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00707      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00708     81,     2,    82,     7,     2,     2,     2,     2,     2,     2,
00709      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00710      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00711      2,     2,    74,     2,    75,     2,     2,     2,     2,     2,
00712      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00713      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00714      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00715      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00716      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00717      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00718      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00719      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00720      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00721      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00722      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00723      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00724      2,     2,     2,     2,     2,     1,     2,    10,    11,    12,
00725     13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
00726     23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
00727     33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
00728     43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
00729     53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
00730     63,    64,    65,    66,    67,    68,    69,    70,    71,    72
00731 };
00732 
00733 #if YY_parse_DEBUG != 0
00734 static const short yyprhs[] = {     0,
00735      0,     1,     5,    10,    19,    21,    25,    30,    31,    33,
00736     35,    37,    39,    43,    47,    51,    55,    59,    63,    67,
00737     71,    75,    79,    83,    87,    91,    95,    99,   103,   107,
00738    111,   115,   119,   123,   127,   129,   133,   137,   141,   145,
00739    149,   153,   157,   161,   165,   169,   173,   177,   181,   185,
00740    189,   193,   197,   201,   205,   206,   212,   218,   222,   226,
00741    232,   236,   242,   249,   251,   252,   256,   262,   268,   270,
00742    274,   278,   283,   286,   287,   291,   297,   303,   305,   309,
00743    313,   318,   321,   323,   325,   327,   329,   331,   336,   340,
00744    344,   348,   352,   356,   359,   362,   366,   372,   376,   380,
00745    384,   388,   392,   396,   401,   405,   409,   413,   415,   417,
00746    419,   423,   427,   431,   435,   439,   443,   447,   451,   455,
00747    459,   460,   464,   466,   467,   471,   473,   475,   479,   481,
00748    485,   489,   493,   497,   501,   505,   508,   512,   516,   520,
00749    524,   528,   532,   536,   538,   542,   552,   556,   563,   567,
00750    571,   577,   583,   587,   589,   593,   597,   603,   609,   617,
00751    623,   629,   633,   634,   640,   644,   650,   654,   655,   661,
00752    665,   671
00753 };
00754 
00755 static const short yyrhs[] = {    -1,
00756     83,    84,    73,     0,    85,    74,    84,    75,     0,    85,
00757     74,    84,    75,    68,    74,    84,    75,     0,    86,     0,
00758     69,    83,    70,     0,    67,    76,   114,    77,     0,     0,
00759    113,     0,   121,     0,    87,     0,     1,     0,    17,    78,
00760     88,     0,    17,    78,    89,     0,    17,    78,    90,     0,
00761     17,    78,    91,     0,    17,    78,    92,     0,    17,    78,
00762     93,     0,    17,    78,    94,     0,    17,    78,    95,     0,
00763     17,    78,    96,     0,    17,    78,    97,     0,    17,    78,
00764     98,     0,    17,    78,    99,     0,    17,    78,   101,     0,
00765     17,    78,   100,     0,    17,    78,   104,     0,    17,    78,
00766    102,     0,    17,    78,   103,     0,    17,    78,   109,     0,
00767     17,    78,   110,     0,    17,    78,   107,     0,    17,    78,
00768    105,     0,    17,    78,   106,     0,    21,     0,    23,    79,
00769    108,     0,    24,    79,   108,     0,    27,    79,   108,     0,
00770     26,    79,   108,     0,    42,    79,   108,     0,    43,    79,
00771    108,     0,    28,    79,   108,     0,    29,    79,   108,     0,
00772     30,    79,   108,     0,    31,    79,   108,     0,    32,    79,
00773    108,     0,    35,    79,   108,     0,    34,    79,   108,     0,
00774     40,    79,   108,     0,    41,    79,   108,     0,    22,    79,
00775    108,     0,    51,    79,   108,     0,    52,    79,   108,     0,
00776     17,    79,   108,     0,     0,    17,    80,   114,    79,   108,
00777      0,    17,    80,   116,    79,   108,     0,    17,    80,   116,
00778      0,    17,    80,   114,     0,    17,    80,    20,    79,   108,
00779      0,    17,    80,    20,     0,    36,    80,    76,   111,    77,
00780      0,    36,    80,     4,    76,   112,    77,     0,    37,     0,
00781      0,    17,    79,   111,     0,    17,     5,    16,    79,   111,
00782      0,    16,     5,    17,    79,   111,     0,    17,     0,    17,
00783      5,    16,     0,    16,     5,    17,     0,     4,    17,    79,
00784    111,     0,     4,    17,     0,     0,    17,    79,   112,     0,
00785     17,     5,    16,    79,   112,     0,    16,     5,    17,    79,
00786    112,     0,    17,     0,    17,     5,    16,     0,    16,     5,
00787     17,     0,     4,    17,    79,   111,     0,     4,    17,     0,
00788    114,     0,   116,     0,   115,     0,    16,     0,    17,     0,
00789     19,    76,   114,    77,     0,   114,     3,   114,     0,   114,
00790      4,   114,     0,   114,     5,   114,     0,   114,     6,   114,
00791      0,   114,     7,   114,     0,     4,   114,     0,     3,   114,
00792      0,    76,   114,    77,     0,     8,   116,    79,   116,     9,
00793      0,   114,     8,   114,     0,   114,    11,   114,     0,   114,
00794      9,   114,     0,   114,    12,   114,     0,   114,    10,   114,
00795      0,   114,    13,   114,     0,    17,    81,    17,    82,     0,
00796     17,    80,   114,     0,    17,    80,   116,     0,    18,    80,
00797    116,     0,    18,     0,   117,     0,   118,     0,   116,     3,
00798    116,     0,   116,     4,   116,     0,   116,     3,   114,     0,
00799    116,     5,   114,     0,   116,     6,   114,     0,   114,     3,
00800    116,     0,   114,     4,   116,     0,   114,     5,   116,     0,
00801     74,   119,    75,     0,    81,   120,    82,     0,     0,   114,
00802     79,   119,     0,   114,     0,     0,    20,    79,   120,     0,
00803     20,     0,    57,     0,    53,    79,   127,     0,    55,     0,
00804     55,    79,    36,     0,    55,    79,    54,     0,    55,    79,
00805     17,     0,    55,    79,    18,     0,    58,    79,   122,     0,
00806     54,    79,   126,     0,    60,    20,     0,    62,    79,   123,
00807      0,    63,    79,   124,     0,    48,    79,   125,     0,    50,
00808     79,   108,     0,    64,    79,   126,     0,    65,    79,   126,
00809      0,    66,    79,   123,     0,    17,     0,    45,    80,    17,
00810      0,    45,    80,    17,    79,    56,    80,    17,     6,    17,
00811      0,    56,    80,    17,     0,    56,    80,    17,    81,    16,
00812     82,     0,    17,    80,   114,     0,    17,    80,    20,     0,
00813     17,    80,   114,    79,   124,     0,    17,    80,    20,    79,
00814    124,     0,   123,    79,   124,     0,   123,     0,    17,    80,
00815    114,     0,    17,    80,    20,     0,    17,    80,   114,    79,
00816    125,     0,    17,    80,    20,    79,   125,     0,    56,    80,
00817     17,     6,    17,    79,   125,     0,    56,    80,    17,     6,
00818     17,     0,    56,    80,    17,    79,   125,     0,    56,    80,
00819     17,     0,     0,    17,    80,   114,    79,   126,     0,    17,
00820     80,   114,     0,    17,    80,    20,    79,   126,     0,    17,
00821     80,    20,     0,     0,    17,    80,   114,    79,   127,     0,
00822     17,    80,   114,     0,    17,    80,    20,    79,   127,     0,
00823     17,    80,    20,     0
00824 };
00825 
00826 #endif
00827 
00828 #if (YY_parse_DEBUG != 0) || defined(YY_parse_ERROR_VERBOSE) 
00829 static const short yyrline[] = { 0,
00830     67,    68,    79,    80,    82,    83,    87,    90,    91,    92,
00831     93,    94,   103,   112,   121,   130,   139,   149,   158,   167,
00832    177,   187,   197,   207,   217,   227,   237,   247,   257,   267,
00833    277,   283,   295,   304,   315,   317,   320,   323,   326,   329,
00834    332,   335,   338,   341,   344,   347,   350,   353,   356,   359,
00835    362,   365,   368,   371,   394,   395,   468,   512,   555,   629,
00836    678,   727,   730,   733,   736,   737,   752,   768,   784,   799,
00837    815,   831,   846,   863,   864,   879,   895,   911,   926,   942,
00838    958,   973,   991,   999,  1012,  1033,  1034,  1039,  1040,  1041,
00839   1042,  1043,  1044,  1045,  1046,  1047,  1048,  1063,  1064,  1065,
00840   1066,  1067,  1068,  1069,  1076,  1089,  1103,  1117,  1133,  1153,
00841   1166,  1189,  1212,  1233,  1253,  1273,  1293,  1313,  1336,  1364,
00842   1380,  1381,  1386,  1393,  1394,  1399,  1406,  1407,  1408,  1409,
00843   1410,  1411,  1419,  1434,  1435,  1436,  1437,  1447,  1458,  1468,
00844   1477,  1484,  1492,  1506,  1516,  1526,  1540,  1546,  1557,  1569,
00845   1577,  1590,  1596,  1601,  1608,  1620,  1633,  1646,  1658,  1663,
00846   1668,  1673,  1680,  1681,  1686,  1691,  1696,  1703,  1704,  1709,
00847   1714,  1719
00848 };
00849 
00850 static const char * const yytname[] = {   "$","error","$illegal.","'+'","'-'",
00851 "'*'","'/'","'^'","'<'","'>'","NE","LE","GE","EQ","UMINUS","UPLUS","NUMBER",
00852 "VARIABLE","VECVAR","FUNC","STR","MARKER","ELEMENT","DRIFT","RF","DIPOLE","RBEND",
00853 "SBEND","QUADRUPOLE","SEXTUPOLE","OCTUPOLE","MULTIPOLE","SOLENOID","COLLIMATOR",
00854 "RCOL","ECOL","LINE","SEQUENCE","SPOILER","ABSORBER","LASER","TRANSFORM3D","VKICK",
00855 "HKICK","KICK","PERIOD","APERTURE","FILENAME","GAS","PIPE","TUNNEL","MATERIAL",
00856 "ATOM","BEAM","OPTION","PRINT","RANGE","STOP","USE","VALUE","ECHO","PRINTF",
00857 "SAMPLE","CSAMPLE","BETA0","TWISS","DUMP","IF","ELSE","BEGN","END","FOR","CUT",
00858 "';'","'{'","'}'","'('","')'","':'","','","'='","'['","']'","input","stmt","if_clause",
00859 "atomic_stmt","decl","marker","drift","rf","sbend","rbend","vkick","hkick","quad",
00860 "sextupole","octupole","multipole","solenoid","ecol","rcol","laser","transform3d",
00861 "element","matdef","atom","extension","parameters","line","sequence","element_seq",
00862 "rev_element_seq","expr","aexpr","assignment","vecexpr","vectnum","vectstr",
00863 "numbers","letters","command","use_parameters","sample_options","csample_options",
00864 "gas_options","option_parameters","beam_parameters",""
00865 };
00866 #endif
00867 
00868 static const short yyr1[] = {     0,
00869     83,    83,    84,    84,    84,    84,    85,    86,    86,    86,
00870     86,    86,    87,    87,    87,    87,    87,    87,    87,    87,
00871     87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
00872     87,    87,    87,    87,    88,    89,    90,    91,    92,    93,
00873     94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
00874    104,   105,   106,   107,   108,   108,   108,   108,   108,   108,
00875    108,   109,   109,   110,   111,   111,   111,   111,   111,   111,
00876    111,   111,   111,   112,   112,   112,   112,   112,   112,   112,
00877    112,   112,   113,   113,   113,   114,   114,   114,   114,   114,
00878    114,   114,   114,   114,   114,   114,   114,   114,   114,   114,
00879    114,   114,   114,   114,   115,   115,   115,   116,   116,   116,
00880    116,   116,   116,   116,   116,   116,   116,   116,   117,   118,
00881    119,   119,   119,   120,   120,   120,   121,   121,   121,   121,
00882    121,   121,   121,   121,   121,   121,   121,   121,   121,   121,
00883    121,   121,   121,   122,   122,   122,   123,   123,   124,   124,
00884    124,   124,   124,   124,   125,   125,   125,   125,   125,   125,
00885    125,   125,   126,   126,   126,   126,   126,   127,   127,   127,
00886    127,   127
00887 };
00888 
00889 static const short yyr2[] = {     0,
00890      0,     3,     4,     8,     1,     3,     4,     0,     1,     1,
00891      1,     1,     3,     3,     3,     3,     3,     3,     3,     3,
00892      3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
00893      3,     3,     3,     3,     1,     3,     3,     3,     3,     3,
00894      3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
00895      3,     3,     3,     3,     0,     5,     5,     3,     3,     5,
00896      3,     5,     6,     1,     0,     3,     5,     5,     1,     3,
00897      3,     4,     2,     0,     3,     5,     5,     1,     3,     3,
00898      4,     2,     1,     1,     1,     1,     1,     4,     3,     3,
00899      3,     3,     3,     2,     2,     3,     5,     3,     3,     3,
00900      3,     3,     3,     4,     3,     3,     3,     1,     1,     1,
00901      3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
00902      0,     3,     1,     0,     3,     1,     1,     3,     1,     3,
00903      3,     3,     3,     3,     3,     2,     3,     3,     3,     3,
00904      3,     3,     3,     1,     3,     9,     3,     6,     3,     3,
00905      5,     5,     3,     1,     3,     3,     5,     5,     7,     5,
00906      5,     3,     0,     5,     3,     5,     3,     0,     5,     3,
00907      5,     3
00908 };
00909 
00910 static const short yydefact[] = {     1,
00911      0,    12,     0,     0,     0,    86,    87,   108,     0,     0,
00912      0,     0,     0,   129,   127,     0,     0,     0,     0,     0,
00913      0,     0,     0,     1,   121,     0,   124,     0,     0,     5,
00914     11,     9,    83,    85,    84,   109,   110,    10,    87,    95,
00915     94,   108,     0,     0,     0,     0,     0,     0,     0,     0,
00916     55,   168,   163,     0,     0,   136,     0,     0,   163,   163,
00917      0,     0,     0,   123,     0,     0,   126,     0,     2,     0,
00918      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
00919      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
00920     35,     0,     0,     0,     0,     0,     0,     0,     0,     0,
00921      0,     0,     0,     0,    64,     0,     0,     0,     0,     0,
00922      0,    13,    14,    15,    16,    17,    18,    19,    20,    21,
00923     22,    23,    24,    26,    25,    28,    29,    27,    33,    34,
00924     32,    30,    31,   105,   106,     0,   107,     0,     0,     0,
00925    139,     0,   140,     0,   128,     0,   135,   132,   133,   130,
00926    131,   144,     0,   134,     0,   137,     0,   154,   138,   141,
00927    142,   143,     0,     6,   121,   119,    96,   124,   120,     0,
00928     89,   116,    90,   117,    91,   118,    92,    93,    98,   100,
00929    102,    99,   101,   103,   113,   111,   112,   114,   115,    89,
00930     90,    91,     0,    55,    55,    55,    55,    55,    55,    55,
00931     55,    55,    55,    55,    55,    55,     0,    55,    55,    55,
00932     55,    55,    55,   104,    88,     0,     0,     0,     0,     0,
00933      0,     0,     0,     0,     7,   122,   125,     3,    97,    54,
00934     51,    36,    37,    39,    38,    42,    43,    44,    45,    46,
00935     48,    47,     0,    65,    49,    50,    40,    41,    52,    53,
00936    156,   155,   162,    61,    59,    58,   172,   170,   167,   165,
00937    145,   147,   150,   149,   153,     0,    74,     0,     0,    69,
00938      0,     0,     0,     0,     0,    55,    55,    55,   168,   168,
00939    163,   163,     0,     0,     0,     0,     0,     0,     0,    78,
00940      0,    73,     0,     0,    65,    62,   158,   157,   160,   161,
00941     60,    56,    57,   171,   169,   166,   164,     0,     0,   152,
00942    151,     0,    82,     0,     0,    74,    63,    65,    71,    70,
00943     66,     0,     0,   148,     4,    65,    80,    79,    75,    72,
00944     65,    65,   159,     0,    81,    74,    74,    68,    67,     0,
00945     77,    76,   146,     0,     0
00946 };
00947 
00948 static const short yydefgoto[] = {     1,
00949     28,    29,    30,    31,   112,   113,   114,   115,   116,   117,
00950    118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
00951    128,   129,   130,   131,   143,   132,   133,   271,   291,    32,
00952     33,    34,    35,    36,    37,    65,    68,    38,   154,   158,
00953    159,   141,   147,   145
00954 };
00955 
00956 static const short yypact[] = {-32768,
00957    179,-32768,   159,   159,   127,-32768,   -27,   -68,   -52,   -65,
00958    -48,   -40,   -24,   -12,-32768,    16,    51,    19,    21,    29,
00959     44,    54,    28,-32768,   159,   159,   114,    68,    73,-32768,
00960 -32768,-32768,   569,-32768,   134,-32768,-32768,-32768,    61,-32768,
00961 -32768,-32768,   569,    15,   519,   127,   148,   127,   159,   -10,
00962    152,   153,   154,    -2,   -15,-32768,   108,    -8,   154,   154,
00963    108,   159,   246,   147,    97,   428,    98,    99,-32768,   320,
00964    127,   127,   127,   159,   159,   159,   159,   159,   159,   159,
00965    159,   127,   127,   159,   159,   159,   159,   159,   127,   105,
00966 -32768,   106,   107,   109,   110,   111,   121,   123,   128,   137,
00967    139,   149,   151,   126,-32768,   161,   172,   177,   178,   180,
00968    182,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00969 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00970 -32768,-32768,-32768,   569,   134,   176,   134,   439,   208,   213,
00971 -32768,   217,-32768,   218,-32768,   222,-32768,-32768,-32768,-32768,
00972 -32768,-32768,   225,-32768,   227,-32768,   234,   238,-32768,-32768,
00973 -32768,-32768,   450,-32768,   159,-32768,-32768,   114,-32768,   156,
00974    338,    56,   338,    56,   202,-32768,   202,-32768,-32768,-32768,
00975 -32768,-32768,-32768,-32768,   338,    56,    56,   202,   202,   586,
00976    586,   202,   286,   152,   152,   152,   152,   152,   152,   152,
00977    152,   152,   152,   152,   152,   152,    31,   152,   152,   152,
00978    152,   152,   152,-32768,-32768,   463,   301,    25,   482,   492,
00979    308,   309,   514,    -8,-32768,-32768,-32768,   261,-32768,-32768,
00980 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00981 -32768,-32768,   254,   132,-32768,-32768,-32768,-32768,-32768,-32768,
00982    252,   263,    26,   253,   274,    53,   255,   351,   256,   399,
00983    262,   259,   273,   410,-32768,   291,   157,   316,   361,    17,
00984    290,   -10,   -10,   352,   -10,   152,   152,   152,   153,   153,
00985    154,   154,   315,   356,    -8,    -8,   320,   359,   374,    18,
00986    304,   311,   371,   375,   132,-32768,-32768,-32768,   313,-32768,
00987 -32768,-32768,-32768,-32768,-32768,-32768,-32768,   317,   318,-32768,
00988 -32768,   323,   314,   382,   408,   157,-32768,   132,   346,   347,
00989 -32768,   -10,   411,-32768,-32768,   132,   348,   350,-32768,-32768,
00990    132,   132,-32768,   458,-32768,   157,   157,-32768,-32768,   448,
00991 -32768,-32768,-32768,   468,-32768
00992 };
00993 
00994 static const short yypgoto[] = {   445,
00995    -62,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00996 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00997 -32768,-32768,-32768,-32768,   -84,-32768,-32768,  -127,  -299,-32768,
00998      1,-32768,    20,-32768,-32768,   305,   306,-32768,-32768,   -21,
00999   -221,  -262,   -59,  -210
01000 };
01001 
01002 
01003 #define YYLAST          599
01004 
01005 
01006 static const short yytable[] = {   160,
01007    161,   152,   265,    40,    41,    43,   139,   170,   157,   297,
01008    298,    48,   300,    50,   148,   149,   329,    82,    83,    84,
01009     85,   294,   315,    49,    44,    64,    66,     3,     4,   153,
01010     51,   274,     5,   150,   243,   156,   341,   342,    52,   162,
01011      6,    39,    42,     9,   254,   140,   134,   155,    43,   138,
01012     45,   151,    46,    47,    53,    82,    83,    84,    85,   333,
01013     84,    85,   163,   310,   311,   135,    54,   137,   304,   305,
01014     56,   171,   173,   175,   177,   178,   179,   180,   181,   182,
01015    183,   184,   185,    43,   188,   189,   190,   191,   192,    43,
01016    172,   174,   176,    89,    55,   295,   316,    57,    25,    58,
01017     26,   186,   187,    62,   275,    27,   244,    59,   193,   230,
01018    231,   232,   233,   234,   235,   236,   237,   238,   239,   240,
01019    241,   242,    60,   245,   246,   247,   248,   249,   250,     3,
01020      4,   278,    61,    67,     5,   268,    82,    83,    84,    85,
01021     69,    47,     6,    39,    42,     9,    70,   269,   270,    86,
01022     87,    88,    74,    75,    76,    77,    78,    79,    80,    81,
01023    288,     3,     4,   155,   136,    64,     5,   321,   142,   144,
01024    146,   166,   289,   290,     6,    39,   168,     9,   344,     2,
01025    169,     3,     4,   194,   195,   196,     5,   197,   198,   199,
01026    330,   301,   302,   303,     6,     7,     8,     9,   335,   200,
01027     25,   201,    26,   338,   339,   207,   202,    27,    75,    76,
01028     77,    78,    79,    80,    81,   203,   252,   204,   255,   258,
01029    260,   306,   307,   264,   312,   165,    10,   205,    11,   206,
01030    228,    12,    13,    14,    26,    15,    16,   256,    17,   208,
01031     18,    19,    20,    21,    22,    23,     2,    24,     3,     4,
01032    209,    -8,    25,     5,    26,   210,   211,   214,   212,    27,
01033    213,     6,     7,     8,     9,    86,    87,    88,    74,    75,
01034     76,    77,    78,    79,    80,    81,    71,    72,    73,    74,
01035     75,    76,    77,    78,    79,    80,    81,   216,    82,    83,
01036     84,    85,   217,    10,   229,    11,   218,   219,    12,    13,
01037     14,   220,    15,    16,   221,    17,   222,    18,    19,    20,
01038     21,    22,    23,   223,    24,   164,   224,   253,    -8,    25,
01039      2,    26,     3,     4,   261,   262,    27,     5,   266,   267,
01040    272,   276,   292,   279,   281,     6,     7,     8,     9,   284,
01041    283,   273,    73,    74,    75,    76,    77,    78,    79,    80,
01042     81,   285,   277,    86,    87,    88,    74,    75,    76,    77,
01043     78,    79,    80,    81,   287,   293,   296,    10,   299,    11,
01044    308,   309,    12,    13,    14,   313,    15,    16,   314,    17,
01045    317,    18,    19,    20,    21,    22,    23,   319,    24,   318,
01046    320,   322,   326,    25,    -8,    26,   323,   325,   327,   324,
01047     27,    86,    87,    88,    74,    75,    76,    77,    78,    79,
01048     80,    81,    86,    87,    88,    74,    75,    76,    77,    78,
01049     79,    80,    81,   328,   331,   332,   336,   334,   337,   280,
01050     86,    87,    88,    74,    75,    76,    77,    78,    79,    80,
01051     81,    86,    87,    88,    74,    75,    76,    77,    78,    79,
01052     80,    81,    86,    87,    88,    74,    75,    76,    77,    78,
01053     79,    80,    81,   340,   343,     3,     4,   345,    63,   226,
01054      5,     0,     0,   227,     0,     0,     0,   282,     6,    39,
01055      0,     9,   251,     0,     3,     4,     0,     0,   286,     5,
01056      0,     0,     0,     0,     3,     4,     0,     6,    39,     5,
01057      9,   257,     0,     0,   167,     0,     0,     6,    39,     0,
01058      9,   259,     0,     0,     0,   215,     3,     4,     0,     0,
01059      0,     5,     0,     0,     0,     0,   225,     0,     0,     6,
01060     39,     0,     9,   263,     0,    90,     0,     0,    26,    91,
01061     92,    93,    94,     0,    95,    96,    97,    98,    99,   100,
01062    101,     0,   102,   103,   104,   105,     0,    26,   106,   107,
01063    108,   109,     0,     0,     0,     0,     0,    26,     0,   110,
01064    111,    71,    72,    73,    74,    75,    76,    77,    78,    79,
01065     80,    81,     0,     0,     0,     0,     0,     0,     0,    26,
01066     88,    74,    75,    76,    77,    78,    79,    80,    81
01067 };
01068 
01069 static const short yycheck[] = {    59,
01070     60,    17,   224,     3,     4,     5,    17,    70,    17,   272,
01071    273,    80,   275,    79,    17,    18,   316,     3,     4,     5,
01072      6,     5,     5,    76,     5,    25,    26,     3,     4,    45,
01073     79,     6,     8,    36,     4,    57,   336,   337,    79,    61,
01074     16,    17,    18,    19,    20,    56,    46,    56,    48,    49,
01075     78,    54,    80,    81,    79,     3,     4,     5,     6,   322,
01076      5,     6,    62,   285,   286,    46,    79,    48,   279,   280,
01077     20,    71,    72,    73,    74,    75,    76,    77,    78,    79,
01078     80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
01079     71,    72,    73,    79,    79,    79,    79,    79,    74,    79,
01080     76,    82,    83,    76,    79,    81,    76,    79,    89,   194,
01081    195,   196,   197,   198,   199,   200,   201,   202,   203,   204,
01082    205,   206,    79,   208,   209,   210,   211,   212,   213,     3,
01083      4,    79,    79,    20,     8,     4,     3,     4,     5,     6,
01084     73,    81,    16,    17,    18,    19,    74,    16,    17,     3,
01085      4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
01086      4,     3,     4,    56,    17,   165,     8,   295,    17,    17,
01087     17,    75,    16,    17,    16,    17,    79,    19,     0,     1,
01088     82,     3,     4,    79,    79,    79,     8,    79,    79,    79,
01089    318,   276,   277,   278,    16,    17,    18,    19,   326,    79,
01090     74,    79,    76,   331,   332,    80,    79,    81,     7,     8,
01091      9,    10,    11,    12,    13,    79,   216,    79,   218,   219,
01092    220,   281,   282,   223,   287,    79,    48,    79,    50,    79,
01093     75,    53,    54,    55,    76,    57,    58,   218,    60,    79,
01094     62,    63,    64,    65,    66,    67,     1,    69,     3,     4,
01095     79,    73,    74,     8,    76,    79,    79,    82,    79,    81,
01096     79,    16,    17,    18,    19,     3,     4,     5,     6,     7,
01097      8,     9,    10,    11,    12,    13,     3,     4,     5,     6,
01098      7,     8,     9,    10,    11,    12,    13,    80,     3,     4,
01099      5,     6,    80,    48,     9,    50,    80,    80,    53,    54,
01100     55,    80,    57,    58,    80,    60,    80,    62,    63,    64,
01101     65,    66,    67,    80,    69,    70,    79,    17,    73,    74,
01102      1,    76,     3,     4,    17,    17,    81,     8,    68,    76,
01103     79,    79,    17,    79,    79,    16,    17,    18,    19,    81,
01104     79,    79,     5,     6,     7,     8,     9,    10,    11,    12,
01105     13,    79,    79,     3,     4,     5,     6,     7,     8,     9,
01106     10,    11,    12,    13,    74,     5,    77,    48,    17,    50,
01107     56,    16,    53,    54,    55,    17,    57,    58,     5,    60,
01108     77,    62,    63,    64,    65,    66,    67,    17,    69,    79,
01109     16,    79,    79,    74,    75,    76,    80,    75,    17,    82,
01110     81,     3,     4,     5,     6,     7,     8,     9,    10,    11,
01111     12,    13,     3,     4,     5,     6,     7,     8,     9,    10,
01112     11,    12,    13,    16,    79,    79,    79,    17,    79,    79,
01113      3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
01114     13,     3,     4,     5,     6,     7,     8,     9,    10,    11,
01115     12,    13,     3,     4,     5,     6,     7,     8,     9,    10,
01116     11,    12,    13,     6,    17,     3,     4,     0,    24,   165,
01117      8,    -1,    -1,   168,    -1,    -1,    -1,    79,    16,    17,
01118     -1,    19,    20,    -1,     3,     4,    -1,    -1,    79,     8,
01119     -1,    -1,    -1,    -1,     3,     4,    -1,    16,    17,     8,
01120     19,    20,    -1,    -1,    77,    -1,    -1,    16,    17,    -1,
01121     19,    20,    -1,    -1,    -1,    77,     3,     4,    -1,    -1,
01122     -1,     8,    -1,    -1,    -1,    -1,    77,    -1,    -1,    16,
01123     17,    -1,    19,    20,    -1,    17,    -1,    -1,    76,    21,
01124     22,    23,    24,    -1,    26,    27,    28,    29,    30,    31,
01125     32,    -1,    34,    35,    36,    37,    -1,    76,    40,    41,
01126     42,    43,    -1,    -1,    -1,    -1,    -1,    76,    -1,    51,
01127     52,     3,     4,     5,     6,     7,     8,     9,    10,    11,
01128     12,    13,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    76,
01129      5,     6,     7,     8,     9,    10,    11,    12,    13
01130 };
01131 
01132 #line 352 "/usr/share/bison++/bison.cc"
01133  /* fattrs + tables */
01134 
01135 /* parser code folow  */
01136 
01137 
01138 /* This is the parser code that is written into each bison parser
01139   when the %semantic_parser declaration is not specified in the grammar.
01140   It was written by Richard Stallman by simplifying the hairy parser
01141   used when %semantic_parser is specified.  */
01142 
01143 /* Note: dollar marks section change
01144    the next  is replaced by the list of actions, each action
01145    as one case of the switch.  */ 
01146 
01147 #if YY_parse_USE_GOTO != 0
01148 /* 
01149  SUPRESSION OF GOTO : on some C++ compiler (sun c++)
01150   the goto is strictly forbidden if any constructor/destructor
01151   is used in the whole function (very stupid isn't it ?)
01152  so goto are to be replaced with a 'while/switch/case construct'
01153  here are the macro to keep some apparent compatibility
01154 */
01155 #define YYGOTO(lb) {yy_gotostate=lb;continue;}
01156 #define YYBEGINGOTO  enum yy_labels yy_gotostate=yygotostart; \
01157                      for(;;) switch(yy_gotostate) { case yygotostart: {
01158 #define YYLABEL(lb) } case lb: {
01159 #define YYENDGOTO } } 
01160 #define YYBEGINDECLARELABEL enum yy_labels {yygotostart
01161 #define YYDECLARELABEL(lb) ,lb
01162 #define YYENDDECLARELABEL  };
01163 #else
01164 /* macro to keep goto */
01165 #define YYGOTO(lb) goto lb
01166 #define YYBEGINGOTO 
01167 #define YYLABEL(lb) lb:
01168 #define YYENDGOTO
01169 #define YYBEGINDECLARELABEL 
01170 #define YYDECLARELABEL(lb)
01171 #define YYENDDECLARELABEL 
01172 #endif
01173 /* LABEL DECLARATION */
01174 YYBEGINDECLARELABEL
01175   YYDECLARELABEL(yynewstate)
01176   YYDECLARELABEL(yybackup)
01177 /* YYDECLARELABEL(yyresume) */
01178   YYDECLARELABEL(yydefault)
01179   YYDECLARELABEL(yyreduce)
01180   YYDECLARELABEL(yyerrlab)   /* here on detecting error */
01181   YYDECLARELABEL(yyerrlab1)   /* here on error raised explicitly by an action */
01182   YYDECLARELABEL(yyerrdefault)  /* current state does not do anything special for the error token. */
01183   YYDECLARELABEL(yyerrpop)   /* pop the current state because it cannot handle the error token */
01184   YYDECLARELABEL(yyerrhandle)  
01185 YYENDDECLARELABEL
01186 /* ALLOCA SIMULATION */
01187 /* __HAVE_NO_ALLOCA */
01188 #ifdef __HAVE_NO_ALLOCA
01189 int __alloca_free_ptr(char *ptr,char *ref)
01190 {if(ptr!=ref) free(ptr);
01191  return 0;}
01192 
01193 #define __ALLOCA_alloca(size) malloc(size)
01194 #define __ALLOCA_free(ptr,ref) __alloca_free_ptr((char *)ptr,(char *)ref)
01195 
01196 #ifdef YY_parse_LSP_NEEDED
01197 #define __ALLOCA_return(num) \
01198             do { return( __ALLOCA_free(yyss,yyssa)+\
01199                     __ALLOCA_free(yyvs,yyvsa)+\
01200                     __ALLOCA_free(yyls,yylsa)+\
01201                    (num)); } while(0)
01202 #else
01203 #define __ALLOCA_return(num) \
01204             do { return( __ALLOCA_free(yyss,yyssa)+\
01205                     __ALLOCA_free(yyvs,yyvsa)+\
01206                    (num)); } while(0)
01207 #endif
01208 #else
01209 #define __ALLOCA_return(num) do { return(num); } while(0)
01210 #define __ALLOCA_alloca(size) alloca(size)
01211 #define __ALLOCA_free(ptr,ref) 
01212 #endif
01213 
01214 /* ENDALLOCA SIMULATION */
01215 
01216 #define yyerrok         (yyerrstatus = 0)
01217 #define yyclearin       (YY_parse_CHAR = YYEMPTY)
01218 #define YYEMPTY         -2
01219 #define YYEOF           0
01220 #define YYACCEPT        __ALLOCA_return(0)
01221 #define YYABORT         __ALLOCA_return(1)
01222 #define YYERROR         YYGOTO(yyerrlab1)
01223 /* Like YYERROR except do call yyerror.
01224    This remains here temporarily to ease the
01225    transition to the new meaning of YYERROR, for GCC.
01226    Once GCC version 2 has supplanted version 1, this can go.  */
01227 #define YYFAIL          YYGOTO(yyerrlab)
01228 #define YYRECOVERING()  (!!yyerrstatus)
01229 #define YYBACKUP(token, value) \
01230 do                                                              \
01231   if (YY_parse_CHAR == YYEMPTY && yylen == 1)                               \
01232     { YY_parse_CHAR = (token), YY_parse_LVAL = (value);                 \
01233       yychar1 = YYTRANSLATE (YY_parse_CHAR);                                \
01234       YYPOPSTACK;                                               \
01235       YYGOTO(yybackup);                                            \
01236     }                                                           \
01237   else                                                          \
01238     { YY_parse_ERROR ("syntax error: cannot back up"); YYERROR; }   \
01239 while (0)
01240 
01241 #define YYTERROR        1
01242 #define YYERRCODE       256
01243 
01244 #ifndef YY_parse_PURE
01245 /* UNPURE */
01246 #define YYLEX           YY_parse_LEX()
01247 #ifndef YY_USE_CLASS
01248 /* If nonreentrant, and not class , generate the variables here */
01249 int     YY_parse_CHAR;                      /*  the lookahead symbol        */
01250 YY_parse_STYPE      YY_parse_LVAL;              /*  the semantic value of the */
01251                                 /*  lookahead symbol    */
01252 int YY_parse_NERRS;                 /*  number of parse errors so far */
01253 #ifdef YY_parse_LSP_NEEDED
01254 YY_parse_LTYPE YY_parse_LLOC;   /*  location data for the lookahead     */
01255                         /*  symbol                              */
01256 #endif
01257 #endif
01258 
01259 
01260 #else
01261 /* PURE */
01262 #ifdef YY_parse_LSP_NEEDED
01263 #define YYLEX           YY_parse_LEX(&YY_parse_LVAL, &YY_parse_LLOC)
01264 #else
01265 #define YYLEX           YY_parse_LEX(&YY_parse_LVAL)
01266 #endif
01267 #endif
01268 #ifndef YY_USE_CLASS
01269 #if YY_parse_DEBUG != 0
01270 int YY_parse_DEBUG_FLAG;                    /*  nonzero means print parse trace     */
01271 /* Since this is uninitialized, it does not stop multiple parsers
01272    from coexisting.  */
01273 #endif
01274 #endif
01275 
01276 
01277 
01278 /*  YYINITDEPTH indicates the initial size of the parser's stacks       */
01279 
01280 #ifndef YYINITDEPTH
01281 #define YYINITDEPTH 200
01282 #endif
01283 
01284 /*  YYMAXDEPTH is the maximum size the stacks can grow to
01285     (effective only if the built-in stack extension method is used).  */
01286 
01287 #if YYMAXDEPTH == 0
01288 #undef YYMAXDEPTH
01289 #endif
01290 
01291 #ifndef YYMAXDEPTH
01292 #define YYMAXDEPTH 10000
01293 #endif
01294 
01295 
01296 #if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
01297 #define __yy_bcopy(FROM,TO,COUNT)       __builtin_memcpy(TO,FROM,COUNT)
01298 #else                           /* not GNU C or C++ */
01299 
01300 /* This is the most reliable way to avoid incompatibilities
01301    in available built-in functions on various systems.  */
01302 
01303 #ifdef __cplusplus
01304 static void __yy_bcopy (char *from, char *to, int count)
01305 #else
01306 #ifdef __STDC__
01307 static void __yy_bcopy (char *from, char *to, int count)
01308 #else
01309 static void __yy_bcopy (from, to, count)
01310      char *from;
01311      char *to;
01312      int count;
01313 #endif
01314 #endif
01315 {
01316   register char *f = from;
01317   register char *t = to;
01318   register int i = count;
01319 
01320   while (i-- > 0)
01321     *t++ = *f++;
01322 }
01323 #endif
01324 
01325 
01326 int
01327 #ifdef YY_USE_CLASS
01328  YY_parse_CLASS::
01329 #endif
01330      YY_parse_PARSE(YY_parse_PARSE_PARAM)
01331 #ifndef __STDC__
01332 #ifndef __cplusplus
01333 #ifndef YY_USE_CLASS
01334 /* parameter definition without protypes */
01335 YY_parse_PARSE_PARAM_DEF
01336 #endif
01337 #endif
01338 #endif
01339 {
01340   register int yystate;
01341   register int yyn;
01342   register short *yyssp;
01343   register YY_parse_STYPE *yyvsp;
01344   int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
01345   int yychar1=0;          /*  lookahead token as an internal (translated) token number */
01346 
01347   short yyssa[YYINITDEPTH];     /*  the state stack                     */
01348   YY_parse_STYPE yyvsa[YYINITDEPTH];        /*  the semantic value stack            */
01349 
01350   short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
01351   YY_parse_STYPE *yyvs = yyvsa;     /*  to allow yyoverflow to reallocate them elsewhere */
01352 
01353 #ifdef YY_parse_LSP_NEEDED
01354   YY_parse_LTYPE yylsa[YYINITDEPTH];        /*  the location stack                  */
01355   YY_parse_LTYPE *yyls = yylsa;
01356   YY_parse_LTYPE *yylsp;
01357 
01358 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
01359 #else
01360 #define YYPOPSTACK   (yyvsp--, yyssp--)
01361 #endif
01362 
01363   int yystacksize = YYINITDEPTH;
01364 
01365 #ifdef YY_parse_PURE
01366   int YY_parse_CHAR;
01367   YY_parse_STYPE YY_parse_LVAL;
01368   int YY_parse_NERRS;
01369 #ifdef YY_parse_LSP_NEEDED
01370   YY_parse_LTYPE YY_parse_LLOC;
01371 #endif
01372 #endif
01373 
01374   YY_parse_STYPE yyval;             /*  the variable used to return         */
01375                                 /*  semantic values from the action     */
01376                                 /*  routines                            */
01377 
01378   int yylen;
01379 /* start loop, in which YYGOTO may be used. */
01380 YYBEGINGOTO
01381 
01382 #if YY_parse_DEBUG != 0
01383   if (YY_parse_DEBUG_FLAG)
01384     fprintf(stderr, "Starting parse\n");
01385 #endif
01386   yystate = 0;
01387   yyerrstatus = 0;
01388   YY_parse_NERRS = 0;
01389   YY_parse_CHAR = YYEMPTY;          /* Cause a token to be read.  */
01390 
01391   /* Initialize stack pointers.
01392      Waste one element of value and location stack
01393      so that they stay on the same level as the state stack.
01394      The wasted elements are never initialized.  */
01395 
01396   yyssp = yyss - 1;
01397   yyvsp = yyvs;
01398 #ifdef YY_parse_LSP_NEEDED
01399   yylsp = yyls;
01400 #endif
01401 
01402 /* Push a new state, which is found in  yystate  .  */
01403 /* In all cases, when you get here, the value and location stacks
01404    have just been pushed. so pushing a state here evens the stacks.  */
01405 YYLABEL(yynewstate)
01406 
01407   *++yyssp = yystate;
01408 
01409   if (yyssp >= yyss + yystacksize - 1)
01410     {
01411       /* Give user a chance to reallocate the stack */
01412       /* Use copies of these so that the &'s don't force the real ones into memory. */
01413       YY_parse_STYPE *yyvs1 = yyvs;
01414       short *yyss1 = yyss;
01415 #ifdef YY_parse_LSP_NEEDED
01416       YY_parse_LTYPE *yyls1 = yyls;
01417 #endif
01418 
01419       /* Get the current used size of the three stacks, in elements.  */
01420       int size = yyssp - yyss + 1;
01421 
01422 #ifdef yyoverflow
01423       /* Each stack pointer address is followed by the size of
01424          the data in use in that stack, in bytes.  */
01425 #ifdef YY_parse_LSP_NEEDED
01426       /* This used to be a conditional around just the two extra args,
01427          but that might be undefined if yyoverflow is a macro.  */
01428       yyoverflow("parser stack overflow",
01429                  &yyss1, size * sizeof (*yyssp),
01430                  &yyvs1, size * sizeof (*yyvsp),
01431                  &yyls1, size * sizeof (*yylsp),
01432                  &yystacksize);
01433 #else
01434       yyoverflow("parser stack overflow",
01435                  &yyss1, size * sizeof (*yyssp),
01436                  &yyvs1, size * sizeof (*yyvsp),
01437                  &yystacksize);
01438 #endif
01439 
01440       yyss = yyss1; yyvs = yyvs1;
01441 #ifdef YY_parse_LSP_NEEDED
01442       yyls = yyls1;
01443 #endif
01444 #else /* no yyoverflow */
01445       /* Extend the stack our own way.  */
01446       if (yystacksize >= YYMAXDEPTH)
01447         {
01448           YY_parse_ERROR("parser stack overflow");
01449           __ALLOCA_return(2);
01450         }
01451       yystacksize *= 2;
01452       if (yystacksize > YYMAXDEPTH)
01453         yystacksize = YYMAXDEPTH;
01454       yyss = (short *) __ALLOCA_alloca (yystacksize * sizeof (*yyssp));
01455       __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
01456       __ALLOCA_free(yyss1,yyssa);
01457       yyvs = (YY_parse_STYPE *) __ALLOCA_alloca (yystacksize * sizeof (*yyvsp));
01458       __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
01459       __ALLOCA_free(yyvs1,yyvsa);
01460 #ifdef YY_parse_LSP_NEEDED
01461       yyls = (YY_parse_LTYPE *) __ALLOCA_alloca (yystacksize * sizeof (*yylsp));
01462       __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
01463       __ALLOCA_free(yyls1,yylsa);
01464 #endif
01465 #endif /* no yyoverflow */
01466 
01467       yyssp = yyss + size - 1;
01468       yyvsp = yyvs + size - 1;
01469 #ifdef YY_parse_LSP_NEEDED
01470       yylsp = yyls + size - 1;
01471 #endif
01472 
01473 #if YY_parse_DEBUG != 0
01474       if (YY_parse_DEBUG_FLAG)
01475         fprintf(stderr, "Stack size increased to %d\n", yystacksize);
01476 #endif
01477 
01478       if (yyssp >= yyss + yystacksize - 1)
01479         YYABORT;
01480     }
01481 
01482 #if YY_parse_DEBUG != 0
01483   if (YY_parse_DEBUG_FLAG)
01484     fprintf(stderr, "Entering state %d\n", yystate);
01485 #endif
01486 
01487   YYGOTO(yybackup);
01488 YYLABEL(yybackup)
01489 
01490 /* Do appropriate processing given the current state.  */
01491 /* Read a lookahead token if we need one and don't already have one.  */
01492 /* YYLABEL(yyresume) */
01493 
01494   /* First try to decide what to do without reference to lookahead token.  */
01495 
01496   yyn = yypact[yystate];
01497   if (yyn == YYFLAG)
01498     YYGOTO(yydefault);
01499 
01500   /* Not known => get a lookahead token if don't already have one.  */
01501 
01502   /* yychar is either YYEMPTY or YYEOF
01503      or a valid token in external form.  */
01504 
01505   if (YY_parse_CHAR == YYEMPTY)
01506     {
01507 #if YY_parse_DEBUG != 0
01508       if (YY_parse_DEBUG_FLAG)
01509         fprintf(stderr, "Reading a token: ");
01510 #endif
01511       YY_parse_CHAR = YYLEX;
01512     }
01513 
01514   /* Convert token to internal form (in yychar1) for indexing tables with */
01515 
01516   if (YY_parse_CHAR <= 0)           /* This means end of input. */
01517     {
01518       yychar1 = 0;
01519       YY_parse_CHAR = YYEOF;                /* Don't call YYLEX any more */
01520 
01521 #if YY_parse_DEBUG != 0
01522       if (YY_parse_DEBUG_FLAG)
01523         fprintf(stderr, "Now at end of input.\n");
01524 #endif
01525     }
01526   else
01527     {
01528       yychar1 = YYTRANSLATE(YY_parse_CHAR);
01529 
01530 #if YY_parse_DEBUG != 0
01531       if (YY_parse_DEBUG_FLAG)
01532         {
01533           fprintf (stderr, "Next token is %d (%s", YY_parse_CHAR, yytname[yychar1]);
01534           /* Give the individual parser a way to print the precise meaning
01535              of a token, for further debugging info.  */
01536 #ifdef YYPRINT
01537           YYPRINT (stderr, YY_parse_CHAR, YY_parse_LVAL);
01538 #endif
01539           fprintf (stderr, ")\n");
01540         }
01541 #endif
01542     }
01543 
01544   yyn += yychar1;
01545   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
01546     YYGOTO(yydefault);
01547 
01548   yyn = yytable[yyn];
01549 
01550   /* yyn is what to do for this token type in this state.
01551      Negative => reduce, -yyn is rule number.
01552      Positive => shift, yyn is new state.
01553        New state is final state => don't bother to shift,
01554        just return success.
01555      0, or most negative number => error.  */
01556 
01557   if (yyn < 0)
01558     {
01559       if (yyn == YYFLAG)
01560         YYGOTO(yyerrlab);
01561       yyn = -yyn;
01562       YYGOTO(yyreduce);
01563     }
01564   else if (yyn == 0)
01565     YYGOTO(yyerrlab);
01566 
01567   if (yyn == YYFINAL)
01568     YYACCEPT;
01569 
01570   /* Shift the lookahead token.  */
01571 
01572 #if YY_parse_DEBUG != 0
01573   if (YY_parse_DEBUG_FLAG)
01574     fprintf(stderr, "Shifting token %d (%s), ", YY_parse_CHAR, yytname[yychar1]);
01575 #endif
01576 
01577   /* Discard the token being shifted unless it is eof.  */
01578   if (YY_parse_CHAR != YYEOF)
01579     YY_parse_CHAR = YYEMPTY;
01580 
01581   *++yyvsp = YY_parse_LVAL;
01582 #ifdef YY_parse_LSP_NEEDED
01583   *++yylsp = YY_parse_LLOC;
01584 #endif
01585 
01586   /* count tokens shifted since error; after three, turn off error status.  */
01587   if (yyerrstatus) yyerrstatus--;
01588 
01589   yystate = yyn;
01590   YYGOTO(yynewstate);
01591 
01592 /* Do the default action for the current state.  */
01593 YYLABEL(yydefault)
01594 
01595   yyn = yydefact[yystate];
01596   if (yyn == 0)
01597     YYGOTO(yyerrlab);
01598 
01599 /* Do a reduction.  yyn is the number of a rule to reduce with.  */
01600 YYLABEL(yyreduce)
01601   yylen = yyr2[yyn];
01602   if (yylen > 0)
01603     yyval = yyvsp[1-yylen]; /* implement default value of the action */
01604 
01605 #if YY_parse_DEBUG != 0
01606   if (YY_parse_DEBUG_FLAG)
01607     {
01608       int i;
01609 
01610       fprintf (stderr, "Reducing via rule %d (line %d), ",
01611                yyn, yyrline[yyn]);
01612 
01613       /* Print the symbols being reduced, and their result.  */
01614       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
01615         fprintf (stderr, "%s ", yytname[yyrhs[i]]);
01616       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
01617     }
01618 #endif
01619 
01620 
01621  #line 839 "/usr/share/bison++/bison.cc"
01622 
01623   switch (yyn) {
01624 
01625 case 2:
01626 #line 69 "parser.y"
01627 { 
01628          if(ECHO_GRAMMAR) printf("input -> input stmt ';' \n");
01629        ;
01630     break;}
01631 case 3:
01632 #line 79 "parser.y"
01633 { if(ECHO_GRAMMAR) printf("stmt -> IF '(' aexpr ')' stmt\n" ); execute = 1;;
01634     break;}
01635 case 4:
01636 #line 81 "parser.y"
01637 { if(ECHO_GRAMMAR) printf("stmt -> IF '(' bool_expr ')' ELSE stmt \n" ); ;
01638     break;}
01639 case 5:
01640 #line 82 "parser.y"
01641 { if(ECHO_GRAMMAR) printf("stmt -> atomic_stmt \n"); ;
01642     break;}
01643 case 6:
01644 #line 83 "parser.y"
01645 { if(ECHO_GRAMMAR) printf("stmt -> '{' stmt ';' atomic_stmt '}' \n"); ;
01646     break;}
01647 case 7:
01648 #line 87 "parser.y"
01649 {if( (yyvsp[-1].dval > 0) && (execute > 0) ) execute = 1; else execute = 0;;
01650     break;}
01651 case 9:
01652 #line 91 "parser.y"
01653 { if(ECHO_GRAMMAR) printf("atomic_stmt -> expr\n"); ;
01654     break;}
01655 case 10:
01656 #line 92 "parser.y"
01657 { if(ECHO_GRAMMAR) printf("atomic_stmt -> command\n"); ;
01658     break;}
01659 case 11:
01660 #line 93 "parser.y"
01661 { if(ECHO_GRAMMAR) printf("atomic_stmt -> decl\n"); ;
01662     break;}
01663 case 12:
01664 #line 95 "parser.y"
01665 {
01666                 //yyerror(" : some error message\n"); 
01667                 if(ECHO_GRAMMAR) printf("\natomic_stmt -> error\n");
01668               ;
01669     break;}
01670 case 13:
01671 #line 104 "parser.y"
01672 {
01673          if(execute)  {
01674            if(ECHO_GRAMMAR) printf("decl -> VARIABLE (%s) : marker\n",yyvsp[-2].symp->name);
01675            // check parameters and write into element table
01676            write_table(params,yyvsp[-2].symp->name,_MARKER);
01677            params.flush();
01678          }
01679        ;
01680     break;}
01681 case 14:
01682 #line 113 "parser.y"
01683 {
01684          if(execute) {
01685            if(ECHO_GRAMMAR) printf("decl -> VARIABLE (%s) : drift\n",yyvsp[-2].symp->name);
01686            // check parameters and write into element table
01687            write_table(params,yyvsp[-2].symp->name,_DRIFT);
01688            params.flush();
01689          }
01690        ;
01691     break;}
01692 case 15:
01693 #line 122 "parser.y"
01694 {
01695          if(execute) {
01696            if(ECHO_GRAMMAR) printf("decl -> VARIABLE (%s) : rf\n",yyvsp[-2].symp->name);
01697            // check parameters and write into element table
01698            write_table(params,yyvsp[-2].symp->name,_RF);
01699            params.flush();
01700          }
01701        ;
01702     break;}
01703 case 16:
01704 #line 131 "parser.y"
01705 {  
01706          if(execute) {
01707            if(ECHO_GRAMMAR) printf("decl -> VARIABLE (%s) : sbend\n",yyvsp[-2].symp->name);
01708            // check parameters and write into element table
01709            write_table(params,yyvsp[-2].symp->name,_SBEND);
01710            params.flush();
01711          }
01712        ;
01713     break;}
01714 case 17:
01715 #line 140 "parser.y"
01716 {
01717          if(execute) {
01718            if(ECHO_GRAMMAR) printf("decl -> VARIABLE (%s) : rbend\n",yyvsp[-2].symp->name);
01719            // check parameters and write into element table
01720            write_table(params,yyvsp[-2].symp->name,_RBEND);
01721            params.flush();
01722          }
01723        ;
01724     break;}
01725 case 18:
01726 #line 150 "parser.y"
01727 {  
01728          if(execute) {
01729            if(ECHO_GRAMMAR) printf("decl -> VARIABLE (%s) : vkick\n",yyvsp[-2].symp->name);
01730            // check parameters and write into element table
01731            write_table(params,yyvsp[-2].symp->name,_VKICK);
01732            params.flush();
01733          }
01734        ;
01735     break;}
01736 case 19:
01737 #line 159 "parser.y"
01738 {  
01739          if(execute) {
01740            if(ECHO_GRAMMAR) printf("decl -> VARIABLE (%s) : hkick\n",yyvsp[-2].symp->name);
01741            // check parameters and write into element table
01742            write_table(params,yyvsp[-2].symp->name,_HKICK);
01743            params.flush();
01744          }
01745        ;
01746     break;}
01747 case 20:
01748 #line 168 "parser.y"
01749 {
01750          if(execute)       
01751            {
01752              if(ECHO_GRAMMAR) printf("decl -> VARIABLE : quad %s \n",yyvsp[-2].symp->name);
01753              // check parameters and write into element table
01754              write_table(params,yyvsp[-2].symp->name,_QUAD);
01755              params.flush();
01756            }
01757        ;
01758     break;}
01759 case 21:
01760 #line 178 "parser.y"
01761 {
01762          if(execute)
01763            {
01764              if(ECHO_GRAMMAR) printf("decl -> VARIABLE : sext %s \n",yyvsp[-2].symp->name);
01765              // check parameters and write into element table
01766              write_table(params,yyvsp[-2].symp->name,_SEXTUPOLE);
01767              params.flush();
01768            }
01769        ;
01770     break;}
01771 case 22:
01772 #line 188 "parser.y"
01773 {
01774          if(execute)
01775            {
01776              if(ECHO_GRAMMAR) printf("VARIABLE : octupole %s \n",yyvsp[-2].symp->name);
01777              // check parameters and write into element table
01778              write_table(params,yyvsp[-2].symp->name,_OCTUPOLE);
01779              params.flush();
01780            }
01781        ;
01782     break;}
01783 case 23:
01784 #line 198 "parser.y"
01785 {
01786          if(execute)
01787            {     
01788              if(ECHO_GRAMMAR) printf("VARIABLE : multipole %s \n",yyvsp[-2].symp->name);
01789              // check parameters and write into element table
01790              write_table(params,yyvsp[-2].symp->name,_MULT);
01791              params.flush();     
01792            }
01793        ;
01794     break;}
01795 case 24:
01796 #line 208 "parser.y"
01797 {
01798          if(execute)       
01799            {
01800              if(ECHO_GRAMMAR) printf("decl -> VARIABLE : solenoid %s \n",yyvsp[-2].symp->name);
01801              // check parameters and write into element table
01802              write_table(params,yyvsp[-2].symp->name,_SOLENOID);
01803              params.flush();
01804            }
01805        ;
01806     break;}
01807 case 25:
01808 #line 218 "parser.y"
01809 {
01810          if(execute)
01811            {
01812              if(ECHO_GRAMMAR) printf("VARIABLE : rcol %s \n",yyvsp[-2].symp->name);
01813              // check parameters and write into element table
01814              write_table(params,yyvsp[-2].symp->name,_RCOL);
01815              params.flush();
01816            }
01817        ;
01818     break;}
01819 case 26:
01820 #line 228 "parser.y"
01821 {
01822          if(execute)
01823            {
01824              if(ECHO_GRAMMAR) printf("VARIABLE : ecol %s \n",yyvsp[-2].symp->name);
01825              // check parameters and write into element table
01826              write_table(params,yyvsp[-2].symp->name,_ECOL);
01827              params.flush();
01828            }
01829        ;
01830     break;}
01831 case 27:
01832 #line 238 "parser.y"
01833 {
01834          if(execute)
01835            {     
01836              if(ECHO_GRAMMAR) printf("VARIABLE : element %s \n",yyvsp[-2].symp->name);
01837              // check parameters and write into element table
01838              write_table(params,yyvsp[-2].symp->name,_ELEMENT);
01839              params.flush();     
01840            }
01841        ;
01842     break;}
01843 case 28:
01844 #line 248 "parser.y"
01845 {
01846          if(execute)
01847            {     
01848              if(ECHO_GRAMMAR) printf("VARIABLE : laser %s \n",yyvsp[-2].symp->name);
01849              // check parameters and write into element table
01850              write_table(params,yyvsp[-2].symp->name,_LASER);
01851              params.flush();     
01852            }
01853        ;
01854     break;}
01855 case 29:
01856 #line 258 "parser.y"
01857 {
01858          if(execute)
01859            {     
01860              if(ECHO_GRAMMAR) printf("VARIABLE : transform3d %s \n",yyvsp[-2].symp->name);
01861              // check parameters and write into element table
01862              write_table(params,yyvsp[-2].symp->name,_TRANSFORM3D);
01863              params.flush();     
01864            }
01865        ;
01866     break;}
01867 case 30:
01868 #line 268 "parser.y"
01869 {
01870          if(execute)
01871            {
01872              // create entry in the main table and add pointer to the parsed sequence
01873              if(ECHO_GRAMMAR) printf("VARIABLE : LINE %s\n",yyvsp[-2].symp->name);
01874              write_table(params,yyvsp[-2].symp->name,_LINE,new list<struct Element>(tmp_list));
01875              tmp_list.erase(tmp_list.begin(), tmp_list.end());
01876            }
01877        ;
01878     break;}
01879 case 31:
01880 #line 278 "parser.y"
01881 {
01882          if(execute)
01883            {
01884            }
01885        ;
01886     break;}
01887 case 32:
01888 #line 284 "parser.y"
01889 {
01890          if(execute)
01891            {
01892              if(ECHO_GRAMMAR) printf("decl -> VARIABLE : VARIABLE, %s  :  %s\n",yyvsp[-2].symp->name, typestr(yyvsp[0].ival));
01893              if(yyvsp[0].ival != _NONE)
01894                {
01895                  write_table(params,yyvsp[-2].symp->name,yyvsp[0].ival);
01896                }
01897              params.flush();
01898            }
01899        ;
01900     break;}
01901 case 33:
01902 #line 296 "parser.y"
01903 {
01904          if(execute)
01905            {
01906              if(ECHO_GRAMMAR) printf("decl -> VARIABLE : Material, %s \n",yyvsp[-2].symp->name);
01907              write_table(params,yyvsp[-2].symp->name,_MATERIAL);
01908              params.flush();
01909            }
01910        ;
01911     break;}
01912 case 34:
01913 #line 305 "parser.y"
01914 {
01915          if(execute)
01916            {
01917              if(ECHO_GRAMMAR) printf("decl -> VARIABLE : Atom, %s \n",yyvsp[-2].symp->name);
01918              write_table(params,yyvsp[-2].symp->name,_ATOM);
01919              params.flush();
01920            }
01921        ;
01922     break;}
01923 case 54:
01924 #line 372 "parser.y"
01925 {
01926               if(execute)
01927                 {        
01928                   if(ECHO_GRAMMAR) printf("extension : VARIABLE parameters   -- %s \n",yyvsp[-2].symp->name);
01929                   list<struct Element>::iterator it = element_lookup(yyvsp[-2].symp->name);
01930                   list<struct Element>::iterator iterNULL = element_list.end();
01931                   if(it == iterNULL)
01932                     {
01933                       if(VERBOSE) printf("type %s has not been defined\n",yyvsp[-2].symp->name);
01934                       yyval.ival = _NONE;
01935                     }
01936                   else
01937                     {
01938                       // inherit properties from the base type
01939                       yyval.ival = (*it).type;
01940                       inherit_properties(*it);
01941                     }
01942                   
01943                 }
01944             ;
01945     break;}
01946 case 56:
01947 #line 396 "parser.y"
01948 {
01949               if(execute)
01950                 {
01951                   if(DEBUG) printf("parameters, VARIABLE(%s) = aexpr(%.10g)\n",yyvsp[-4].symp->name,yyvsp[-2].dval);
01952                   if(!strcmp(yyvsp[-4].symp->name,"l")) { params.l = yyvsp[-2].dval; params.lset = 1;} // length
01953                     else
01954                   if(!strcmp(yyvsp[-4].symp->name,"B")) { params.B = yyvsp[-2].dval; params.Bset = 1;} // dipole field
01955                     else 
01956                   if(!strcmp(yyvsp[-4].symp->name,"ks")) { params.ks = yyvsp[-2].dval; params.ksset = 1;} // solenoid strength
01957                     else
01958                   if(!strcmp(yyvsp[-4].symp->name,"k0")) { params.k0 = yyvsp[-2].dval; params.k0set = 1;} // dipole coef.
01959                     else 
01960                   if(!strcmp(yyvsp[-4].symp->name,"k1")) { params.k1 = yyvsp[-2].dval; params.k1set = 1;} // quadrupole coef. 
01961                     else
01962                   if(!strcmp(yyvsp[-4].symp->name,"k2")) { params.k2 = yyvsp[-2].dval; params.k2set = 1;} // sextupole coef.
01963                     else 
01964                   if(!strcmp(yyvsp[-4].symp->name,"k3")) { params.k3 = yyvsp[-2].dval; params.k3set = 1;} // octupole coef.
01965                     else 
01966                   if(!strcmp(yyvsp[-4].symp->name,"angle")) { params.angle = yyvsp[-2].dval; params.angleset = 1;} // dipole bending angle
01967                     else
01968                   if(!strcmp(yyvsp[-4].symp->name,"aper") ||!strcmp(yyvsp[-4].symp->name,"aperture") ) 
01969                               { params.aper = yyvsp[-2].dval; params.aperset = 1;}
01970                     else
01971                   if(!strcmp(yyvsp[-4].symp->name,"outR") ) { params.outR = yyvsp[-2].dval; params.outRset = 1;}
01972                     else
01973                   if(!strcmp(yyvsp[-4].symp->name,"xsize") ) { params.xsize = yyvsp[-2].dval; params.xsizeset = 1;}
01974                     else
01975                   if(!strcmp(yyvsp[-4].symp->name,"ysize") ) { params.ysize = yyvsp[-2].dval; params.ysizeset = 1;}
01976                     else
01977                   if(!strcmp(yyvsp[-4].symp->name,"tilt")) { params.tilt = yyvsp[-2].dval; params.tiltset = 1;}
01978                     else
01979                   if(!strcmp(yyvsp[-4].symp->name,"x")) {params.xdir = yyvsp[-2].dval; params.xdirset = 1;} // x direction
01980                     else
01981                   if(!strcmp(yyvsp[-4].symp->name,"y")) {params.ydir = yyvsp[-2].dval; params.ydirset = 1;} // y direction 
01982                     else
01983                   if(!strcmp(yyvsp[-4].symp->name,"z")) {params.zdir = yyvsp[-2].dval; params.zdirset = 1;} // z direction 
01984                     else
01985                   if(!strcmp(yyvsp[-4].symp->name,"phi")) {params.phi = yyvsp[-2].dval; params.phiset = 1;}  // polar angle
01986                     else
01987                   if(!strcmp(yyvsp[-4].symp->name,"theta"))  {params.theta = yyvsp[-2].dval; params.thetaset = 1;} 
01988                   // azimuthal angle
01989                     else
01990                   if(!strcmp(yyvsp[-4].symp->name,"psi"))  {params.psi = yyvsp[-2].dval; params.psiset = 1;} // 3rd  angle
01991                   else
01992                   if(!strcmp(yyvsp[-4].symp->name,"gradient"))  {params.gradient = yyvsp[-2].dval; params.gradientset = 1;} // rf voltage
01993                     else
01994                   if(!strcmp(yyvsp[-4].symp->name,"fint")) {;} // fringe field parameters
01995                     else
01996                   if(!strcmp(yyvsp[-4].symp->name,"fintx")) {;}  //
01997                     else
01998                   if(!strcmp(yyvsp[-4].symp->name,"e1")) {;}  //
01999                     else
02000                   if(!strcmp(yyvsp[-4].symp->name,"e2")) {;}  //
02001                     else
02002                   if(!strcmp(yyvsp[-4].symp->name,"hgap")) {params.hgap = yyvsp[-2].dval; params.hgapset=1;}  //
02003                     else
02004                   if(!strcmp(yyvsp[-4].symp->name,"A")) {params.A = yyvsp[-2].dval; params.Aset = 1;}  // mass number
02005                     else
02006                   if(!strcmp(yyvsp[-4].symp->name,"Z")) {params.Z = yyvsp[-2].dval; params.Zset = 1;}  // atomic number
02007                     else
02008                   if(!strcmp(yyvsp[-4].symp->name,"density")) {params.density = yyvsp[-2].dval; params.densityset = 1;}  // density
02009                     else
02010                   if(!strcmp(yyvsp[-4].symp->name,"T")) {params.temper = yyvsp[-2].dval; params.temperset = 1;}  // temperature
02011                     else
02012                   if(!strcmp(yyvsp[-4].symp->name,"P")) {params.pressure = yyvsp[-2].dval; params.pressureset = 1;}  // pressure
02013                     else
02014                   if(!strcmp(yyvsp[-4].symp->name,"waveLength")) {params.waveLength = yyvsp[-2].dval; params.waveLengthset = 1;}
02015                     else
02016                   if(VERBOSE) printf("Warning : unknown parameter %s\n",yyvsp[-4].symp->name);
02017                   
02018                 }
02019             ;
02020     break;}
02021 case 57:
02022 #line 469 "parser.y"
02023 {
02024                if(execute) 
02025                  {
02026                    if(DEBUG) printf("params,VARIABLE (%s) = vecexpr (%d)\n",yyvsp[-4].symp->name,yyvsp[-2].array->size);
02027                    if(!strcmp(yyvsp[-4].symp->name,"knl")) 
02028                      {
02029                        params.knlset = 1;
02030                        set_vector(params.knl,yyvsp[-2].array);
02031                        delete[] yyvsp[-2].array->data;
02032                      } 
02033                    else
02034                      if(!strcmp(yyvsp[-4].symp->name,"ksl")) 
02035                        {
02036                          params.kslset = 1;
02037                          set_vector(params.ksl,yyvsp[-2].array);
02038                          delete[] yyvsp[-2].array->data;
02039                        }
02040 
02041                    else
02042                      if(!strcmp(yyvsp[-4].symp->name,"components"))
02043                        {
02044                          params.componentsset = 1;
02045                          set_vector(params.components,yyvsp[-2].array);
02046                          yyvsp[-2].array->symbols.clear();
02047                        } 
02048                    else
02049                      if(!strcmp(yyvsp[-4].symp->name,"componentsWeights"))
02050                        {
02051                          params.componentsWeightsset = 1;
02052                          set_vector(params.componentsWeights,yyvsp[-2].array);
02053                          delete[] yyvsp[-2].array->data;
02054                        }
02055                    else
02056                      if(!strcmp(yyvsp[-4].symp->name,"componentsFractions"))
02057                        {
02058                          params.componentsFractionsset = 1;
02059                          set_vector(params.componentsFractions,yyvsp[-2].array);
02060                          delete[] yyvsp[-2].array->data;
02061                        }
02062                      else         
02063                        if(VERBOSE) printf("unknown parameter %s\n",yyvsp[-4].symp->name);
02064                  }
02065              ;
02066     break;}
02067 case 58:
02068 #line 513 "parser.y"
02069 {
02070                if(execute) 
02071                  {
02072                    if(DEBUG) printf("VARIABLE (%s) = vecexpr\n",yyvsp[-2].symp->name);
02073                    if(!strcmp(yyvsp[-2].symp->name,"knl")) 
02074                      {
02075                        params.knlset = 1;
02076                        set_vector(params.knl,yyvsp[0].array);
02077                        delete[] yyvsp[0].array->data;
02078                      } 
02079                    else
02080                      if(!strcmp(yyvsp[-2].symp->name,"ksl")) 
02081                        {
02082                          params.kslset = 1;
02083                          set_vector(params.ksl,yyvsp[0].array);
02084                          delete[] yyvsp[0].array->data;
02085                        }
02086                    else
02087                      if(!strcmp(yyvsp[-2].symp->name,"components"))
02088                        {
02089                          params.componentsset = 1;
02090                          set_vector(params.components,yyvsp[0].array);
02091                          delete[] yyvsp[0].array->data;
02092                        }
02093                    else
02094                      if(!strcmp(yyvsp[-2].symp->name,"componentsWeights"))
02095                        {
02096                          params.componentsWeightsset = 1;
02097                          set_vector(params.componentsWeights,yyvsp[0].array);
02098                          delete[] yyvsp[0].array->data;
02099                        }
02100                    else
02101                      if(!strcmp(yyvsp[-2].symp->name,"componentsFractions"))
02102                        {
02103                          params.componentsFractionsset = 1;
02104                          set_vector(params.componentsFractions,yyvsp[0].array);
02105                          delete[] yyvsp[0].array->data;
02106                        }
02107                    else           
02108                      if(VERBOSE) printf("unknown parameter %s\n",yyvsp[-2].symp->name);
02109                  }         
02110              ;
02111     break;}
02112 case 59:
02113 #line 556 "parser.y"
02114 {
02115               if(execute)
02116                 {
02117                   if(DEBUG) printf("VARIABLE (%s) = aexpr(%.10g)\n",yyvsp[-2].symp->name,yyvsp[0].dval);
02118                   if(!strcmp(yyvsp[-2].symp->name,"l")) { params.l = yyvsp[0].dval; params.lset = 1;} // length
02119                     else
02120                   if(!strcmp(yyvsp[-2].symp->name,"B")) { params.B = yyvsp[0].dval; params.Bset = 1;} // dipole field 
02121                     else 
02122                   if(!strcmp(yyvsp[-2].symp->name,"ks")) { params.ks = yyvsp[0].dval; params.ksset = 1;} // solenoid strength
02123                     else
02124                   if(!strcmp(yyvsp[-2].symp->name,"k0")) { params.k0 = yyvsp[0].dval; params.k0set = 1;} // dipole coef.
02125                     else 
02126                   if(!strcmp(yyvsp[-2].symp->name,"k1")) { params.k1 = yyvsp[0].dval; params.k1set = 1;} // quadrupole coef.
02127                     else
02128                   if(!strcmp(yyvsp[-2].symp->name,"k2")) { params.k2 = yyvsp[0].dval; params.k2set = 1;} // sextupole coef.
02129                     else 
02130                   if(!strcmp(yyvsp[-2].symp->name,"k3")) { params.k3 = yyvsp[0].dval; params.k3set = 1;} // octupole coef.
02131                     else 
02132                   if(!strcmp(yyvsp[-2].symp->name,"angle")) { params.angle = yyvsp[0].dval; params.angleset = 1;} // dipole bending angle
02133                     else
02134                   if(!strcmp(yyvsp[-2].symp->name,"aper") ||!strcmp(yyvsp[-2].symp->name,"aperture") ) 
02135                               { params.aper = yyvsp[0].dval; params.aperset = 1;}
02136                     else
02137                   if(!strcmp(yyvsp[-2].symp->name,"outR") ) { params.outR = yyvsp[0].dval; params.outRset = 1;}
02138                     else
02139                   if(!strcmp(yyvsp[-2].symp->name,"xsize") ) { params.xsize = yyvsp[0].dval; params.xsizeset = 1;}
02140                     else
02141                   if(!strcmp(yyvsp[-2].symp->name,"ysize") ) { params.ysize = yyvsp[0].dval; params.ysizeset = 1;}
02142                     else
02143                   if(!strcmp(yyvsp[-2].symp->name,"tilt")) { params.tilt = yyvsp[0].dval; params.tiltset = 1;}
02144                     else
02145                   if(!strcmp(yyvsp[-2].symp->name,"x")) {params.xdir = yyvsp[0].dval; params.xdirset = 1;} // x direction
02146                     else
02147                   if(!strcmp(yyvsp[-2].symp->name,"y")) {params.ydir = yyvsp[0].dval; params.ydirset = 1;} // y direction 
02148                     else
02149                   if(!strcmp(yyvsp[-2].symp->name,"z")) {params.zdir = yyvsp[0].dval; params.zdirset = 1;} // z direction 
02150                     else
02151                   if(!strcmp(yyvsp[-2].symp->name,"phi")) {params.phi = yyvsp[0].dval; params.phiset = 1;}  // polar angle
02152                     else
02153                   if(!strcmp(yyvsp[-2].symp->name,"theta"))  {params.theta = yyvsp[0].dval; params.thetaset = 1;} // azimuthal angle
02154                     else
02155                   if(!strcmp(yyvsp[-2].symp->name,"psi"))  {params.psi = yyvsp[0].dval; params.psiset = 1;} // 3rd angle
02156                     else
02157                   if(!strcmp(yyvsp[-2].symp->name,"gradient"))  {params.gradient = yyvsp[0].dval; params.gradientset = 1;} // rf voltage
02158                     else
02159                   if(!strcmp(yyvsp[-2].symp->name,"fint")) {;} // fringe field parameters
02160                     else
02161                   if(!strcmp(yyvsp[-2].symp->name,"fintx")) {;}  //
02162                     else
02163                   if(!strcmp(yyvsp[-2].symp->name,"e1")) {;}  //
02164                     else
02165                   if(!strcmp(yyvsp[-2].symp->name,"e2")) {;}  //
02166                     else
02167                   if(!strcmp(yyvsp[-2].symp->name,"hgap")) {params.hgap = yyvsp[0].dval; params.hgapset=1;}  //
02168                     else
02169                   if(!strcmp(yyvsp[-2].symp->name,"A")) {params.A = yyvsp[0].dval; params.Aset = 1;}  // mass number
02170                     else
02171                   if(!strcmp(yyvsp[-2].symp->name,"Z")) {params.Z = yyvsp[0].dval; params.Zset = 1;}  // atomic number
02172                     else
02173                   if(!strcmp(yyvsp[-2].symp->name,"density")) {params.density = yyvsp[0].dval; params.densityset = 1;}  // density
02174                     else
02175                   if(!strcmp(yyvsp[-2].symp->name,"T")) {params.temper = yyvsp[0].dval; params.temperset = 1;}  // temperature
02176                     else
02177                   if(!strcmp(yyvsp[-2].symp->name,"P")) {params.pressure = yyvsp[0].dval; params.pressureset = 1;}  // pressure
02178                   //else
02179                   //  if(!strcmp($1->name,"state")) {params.state = $3; params.stateset = 1;}  // state
02180                     else
02181                   if(!strcmp(yyvsp[-2].symp->name,"waveLength")) {params.waveLength = yyvsp[0].dval; params.waveLengthset = 1;}
02182                     else
02183                   if(VERBOSE) printf("Warning : unknown parameter %s\n",yyvsp[-2].symp->name);
02184                   
02185                 }
02186             ;
02187     break;}
02188 case 60:
02189 #line 630 "parser.y"
02190 {
02191                if(execute) 
02192                  {
02193                    if(DEBUG) printf("params,VARIABLE (%s) = str (%s)\n",yyvsp[-4].symp->name,yyvsp[-2].str);
02194                    if(!strcmp(yyvsp[-4].symp->name,"geometry")) 
02195                      {
02196                        params.geomset = 1;
02197                        strcpy(params.geometry, yyvsp[-2].str);
02198                      } 
02199                    else
02200                      if(!strcmp(yyvsp[-4].symp->name,"bmap")) 
02201                        {
02202                          params.geomset = 1;
02203                          strcpy(params.bmap, yyvsp[-2].str);
02204                        }
02205                    else 
02206                      if(!strcmp(yyvsp[-4].symp->name,"type")) 
02207                        {
02208                          //ignore the "type attribute for the moment"
02209                        }
02210                    else
02211                    if(!strcmp(yyvsp[-4].symp->name,"material")) 
02212                        {
02213                          params.materialset = 1;
02214                          strcpy(params.material, yyvsp[-2].str);
02215                        }
02216                    else 
02217                    if(!strcmp(yyvsp[-4].symp->name,"spec")) 
02218                        {
02219                          params.specset = 1;
02220                          strcpy(params.spec, yyvsp[-2].str);
02221                        }
02222                    else 
02223                    if(!strcmp(yyvsp[-4].symp->name,"symbol"))
02224                        {
02225                          params.symbolset = 1;
02226                          strcpy(params.symbol, yyvsp[-2].str);
02227                        }
02228                    else 
02229                    if(!strcmp(yyvsp[-4].symp->name,"state"))
02230                        {
02231                          params.stateset = 1;
02232                          strcpy(params.state, yyvsp[-2].str);
02233                        }
02234                    else 
02235                    if(VERBOSE) printf("unknown parameter %s\n",yyvsp[-4].symp->name);
02236                  }
02237              ;
02238     break;}
02239 case 61:
02240 #line 679 "parser.y"
02241 {
02242                if(execute) 
02243                  {
02244                    if(DEBUG) printf("VARIABLE (%s) = str\n",yyvsp[-2].symp->name);
02245                    if(!strcmp(yyvsp[-2].symp->name,"geometry")) 
02246                      {
02247                        params.geomset = 1;
02248                        strcpy(params.geometry, yyvsp[0].str);
02249                      } 
02250                    else
02251                      if(!strcmp(yyvsp[-2].symp->name,"bmap")) 
02252                        {
02253                          params.geomset = 1;
02254                          strcpy(params.bmap, yyvsp[0].str);
02255                        }
02256                      else 
02257                      if(!strcmp(yyvsp[-2].symp->name,"type")) 
02258                        {
02259                          //ignore the "type attribute for the moment"
02260                        }
02261                    else
02262                      if(!strcmp(yyvsp[-2].symp->name,"material")) 
02263                        {         
02264                          params.materialset = 1;
02265                          strcpy(params.material, yyvsp[0].str);
02266                        }
02267                    if(!strcmp(yyvsp[-2].symp->name,"spec")) 
02268                        {
02269                          params.specset = 1;
02270                          strcpy(params.spec, yyvsp[0].str);
02271                        }
02272                    else 
02273                    if(!strcmp(yyvsp[-2].symp->name,"symbol"))
02274                        {
02275                          params.symbolset = 1;
02276                          strcpy(params.symbol, yyvsp[0].str);
02277                        }
02278                    else 
02279                    if(!strcmp(yyvsp[-2].symp->name,"state"))
02280                        {
02281                          params.stateset = 1;
02282                          strcpy(params.state, yyvsp[0].str);
02283                        }
02284                    else 
02285                    if(VERBOSE) printf("unknown parameter %s\n",yyvsp[-2].symp->name);
02286                  }         
02287              ;
02288     break;}
02289 case 66:
02290 #line 738 "parser.y"
02291 {
02292                 if(execute)
02293                   {
02294                     if(DEBUG) printf("matched sequence element, %s\n",yyvsp[-2].symp->name);
02295                     // add to temporary element sequence
02296                     {
02297                       struct Element e;
02298                       e.name = yyvsp[-2].symp->name;
02299                       e.type = _LINE;
02300                       e.lst = NULL;
02301                       tmp_list.push_front(e);
02302                     }
02303                   }
02304               ;
02305     break;}
02306 case 67:
02307 #line 753 "parser.y"
02308 {
02309                 if(execute)
02310                   {
02311                     if(DEBUG) printf("matched sequence element, %s * %d \n",yyvsp[-4].symp->name,(int)yyvsp[-2].dval);
02312                     // add to temporary element sequence
02313                     {
02314                       struct Element e;
02315                       e.name = yyvsp[-4].symp->name;
02316                       e.type = _LINE;
02317                       e.lst = NULL;
02318                       for(int i=0;i<(int)yyvsp[-2].dval;i++)
02319                         tmp_list.push_front(e);
02320                     }
02321                   }
02322               ;
02323     break;}
02324 case 68:
02325 #line 769 "parser.y"
02326 {
02327                 if(execute)
02328                   {
02329                     if(DEBUG) printf("matched sequence element, %s * %d \n",yyvsp[-2].symp->name,(int)yyvsp[-4].dval);
02330                     // add to temporary element sequence
02331                     {
02332                       struct Element e;
02333                       e.name = yyvsp[-2].symp->name;
02334                       e.type = _LINE;
02335                       e.lst = NULL;
02336                       for(int i=0;i<(int)yyvsp[-4].dval;i++)
02337                         tmp_list.push_front(e);
02338                     }
02339                   }
02340               ;
02341     break;}
02342 case 69:
02343 #line 785 "parser.y"
02344 {
02345                 if(execute)
02346                   {
02347                     if(DEBUG) printf("matched last sequence element, %s\n",yyvsp[0].symp->name);
02348                     // add to temporary element sequence
02349                     {
02350                       struct Element e;
02351                       e.name = yyvsp[0].symp->name;
02352                       e.type = _LINE;
02353                       e.lst = NULL;
02354                       tmp_list.push_front(e);
02355                     }
02356                   }
02357               ;
02358     break;}
02359 case 70:
02360 #line 800 "parser.y"
02361 {
02362                 if(execute)
02363                   {
02364                     if(DEBUG) printf("matched last sequence element, %s * %d\n",yyvsp[-2].symp->name,(int)yyvsp[0].dval);
02365                     // add to temporary element sequence
02366                     {
02367                       struct Element e;
02368                       e.name = yyvsp[-2].symp->name;
02369                       e.type = _LINE;
02370                       e.lst = NULL;
02371                       for(int i=0;i<(int)yyvsp[0].dval;i++)
02372                         tmp_list.push_front(e);
02373                     }
02374                   }
02375               ;
02376     break;}
02377 case 71:
02378 #line 816 "parser.y"
02379 {
02380                 if(execute)
02381                   {
02382                     if(DEBUG) printf("matched last sequence element, %s * %d\n",yyvsp[0].symp->name,(int)yyvsp[-2].dval);
02383                     // add to temporary element sequence
02384                     {
02385                       struct Element e;
02386                       e.name = yyvsp[0].symp->name;
02387                       e.type = _LINE;
02388                       e.lst = NULL;
02389                       for(int i=0;i<(int)yyvsp[-2].dval;i++)
02390                         tmp_list.push_front(e);
02391                     }
02392                   }
02393               ;
02394     break;}
02395 case 72:
02396 #line 832 "parser.y"
02397 {
02398                 if(execute)
02399                   {
02400                     if(DEBUG) printf("matched last sequence element, %s\n",yyvsp[-2].symp->name);
02401                     // add to temporary element sequence
02402                     {
02403                       struct Element e;
02404                       e.name = yyvsp[-2].symp->name;
02405                       e.type = _REV_LINE;
02406                       e.lst = NULL;
02407                       tmp_list.push_front(e);
02408                     }
02409                   }
02410               ;
02411     break;}
02412 case 73:
02413 #line 847 "parser.y"
02414 {
02415                 if(execute)
02416                   {
02417                     if(DEBUG) printf("matched last sequence element, %s\n",yyvsp[0].symp->name);
02418                     // add to temporary element sequence
02419                     {
02420                       struct Element e;
02421                       e.name = yyvsp[0].symp->name;
02422                       e.type = _REV_LINE;
02423                       e.lst = NULL;
02424                       tmp_list.push_front(e);
02425                     }
02426                   }
02427               ;
02428     break;}
02429 case 75:
02430 #line 865 "parser.y"
02431 {
02432                 if(execute)
02433                   {
02434                     if(DEBUG) printf("matched sequence element, %s\n",yyvsp[-2].symp->name);
02435                     // add to temporary element sequence
02436                     {
02437                       struct Element e;
02438                       e.name = yyvsp[-2].symp->name;
02439                       e.type = _REV_LINE;
02440                       e.lst = NULL;
02441                       tmp_list.push_back(e);
02442                     }
02443                   }
02444               ;
02445     break;}
02446 case 76:
02447 #line 880 "parser.y"
02448 {
02449                 if(execute)
02450                   {
02451                     if(DEBUG) printf("matched sequence element, %s * %d \n",yyvsp[-4].symp->name,(int)yyvsp[-2].dval);
02452                     // add to temporary element sequence
02453                     {
02454                       struct Element e;
02455                       e.name = yyvsp[-4].symp->name;
02456                       e.type = _REV_LINE;
02457                       e.lst = NULL;
02458                       for(int i=0;i<(int)yyvsp[-2].dval;i++)
02459                         tmp_list.push_back(e);
02460                     }
02461                   }
02462               ;
02463     break;}
02464 case 77:
02465 #line 896 "parser.y"
02466 {
02467                 if(execute)
02468                   {
02469                     if(DEBUG) printf("matched sequence element, %s * %d \n",yyvsp[-2].symp->name,(int)yyvsp[-4].dval);
02470                     // add to temporary element sequence
02471                     {
02472                       struct Element e;
02473                       e.name = yyvsp[-2].symp->name;
02474                       e.type = _REV_LINE;
02475                       e.lst = NULL;
02476                       for(int i=0;i<(int)yyvsp[-4].dval;i++)
02477                         tmp_list.push_back(e);
02478                     }
02479                   }
02480               ;
02481     break;}
02482 case 78:
02483 #line 912 "parser.y"
02484 {
02485                 if(execute)
02486                   {
02487                     if(DEBUG) printf("matched last sequence element, %s\n",yyvsp[0].symp->name);
02488                     // add to temporary element sequence
02489                     {
02490                       struct Element e;
02491                       e.name = yyvsp[0].symp->name;
02492                       e.type = _REV_LINE;
02493                       e.lst = NULL;
02494                       tmp_list.push_back(e);
02495                     }
02496                   }
02497               ;
02498     break;}
02499 case 79:
02500 #line 927 "parser.y"
02501 {
02502                 if(execute)
02503                   {
02504                     if(DEBUG) printf("matched last sequence element, %s * %d\n",yyvsp[-2].symp->name,(int)yyvsp[0].dval);
02505                     // add to temporary element sequence
02506                     {
02507                       struct Element e;
02508                       e.name = yyvsp[-2].symp->name;
02509                       e.type = _REV_LINE;
02510                       e.lst = NULL;
02511                       for(int i=0;i<(int)yyvsp[0].dval;i++)
02512                         tmp_list.push_back(e);
02513                     }
02514                   }
02515               ;
02516     break;}
02517 case 80:
02518 #line 943 "parser.y"
02519 {
02520                 if(execute)
02521                   {
02522                     if(DEBUG) printf("matched last sequence element, %s * %d\n",yyvsp[0].symp->name,(int)yyvsp[-2].dval);
02523                     // add to temporary element sequence
02524                     {
02525                       struct Element e;
02526                       e.name = yyvsp[0].symp->name;
02527                       e.type = _REV_LINE;
02528                       e.lst = NULL;
02529                       for(int i=0;i<(int)yyvsp[-2].dval;i++)
02530                         tmp_list.push_back(e);
02531                     }
02532                   }
02533               ;
02534     break;}
02535 case 81:
02536 #line 959 "parser.y"
02537 {
02538                 if(execute)
02539                   {
02540                     if(DEBUG) printf("matched last sequence element, %s\n",yyvsp[-2].symp->name);
02541                     // add to temporary element sequence
02542                     {
02543                       struct Element e;
02544                       e.name = yyvsp[-2].symp->name;
02545                       e.type = _LINE;
02546                       e.lst = NULL;
02547                       tmp_list.push_back(e);
02548                     }
02549                   }
02550               ;
02551     break;}
02552 case 82:
02553 #line 974 "parser.y"
02554 {
02555                 if(execute)
02556                   {
02557                     if(DEBUG) printf("matched last sequence element, %s\n",yyvsp[0].symp->name);
02558                     // add to temporary element sequence
02559                     {
02560                       struct Element e;
02561                       e.name = yyvsp[0].symp->name;
02562                       e.type = _LINE;
02563                       e.lst = NULL;
02564                       tmp_list.push_back(e);
02565                     }
02566                   }
02567               ;
02568     break;}
02569 case 83:
02570 #line 992 "parser.y"
02571 { // check type ??
02572          if(ECHO_GRAMMAR) printf("expr -> aexpr\n");
02573          if(execute) 
02574            {
02575              if(INTERACTIVE) printf ("\t%.10g\n", yyvsp[0].dval); yyval.dval=yyvsp[0].dval;
02576            }
02577        ;
02578     break;}
02579 case 84:
02580 #line 1000 "parser.y"
02581 {
02582          if(ECHO_GRAMMAR) printf("expr -> vecexpr\n");
02583          if(execute)
02584            {
02585              if(INTERACTIVE)
02586                for(int i=0;i<yyvsp[0].array->size;i++)
02587                  {
02588                    printf(" %.10g ",yyvsp[0].array->data[i]);
02589                  }
02590              yyval.dval = 0;
02591            } 
02592        ;
02593     break;}
02594 case 85:
02595 #line 1013 "parser.y"
02596 { // check type
02597          if(ECHO_GRAMMAR) printf("expr -> assignment\n");
02598          if(execute)
02599            {
02600              if(INTERACTIVE) {
02601                if(yyvsp[0].symp->type == _ARRAY)
02602                  {
02603                    for(list<double>::iterator it = yyvsp[0].symp->array.begin();
02604                        it!=yyvsp[0].symp->array.end();it++)
02605                      printf ("\t%.10g", (*it));
02606                    printf("\n");
02607                  }
02608                else
02609                  printf ("\t%.10g\n", yyvsp[0].symp->value);
02610              } 
02611              yyval.dval=0;
02612            }
02613        ;
02614     break;}
02615 case 86:
02616 #line 1033 "parser.y"
02617 { yyval.dval = yyvsp[0].dval;                         ;
02618     break;}
02619 case 87:
02620 #line 1035 "parser.y"
02621 { 
02622            //check type ??
02623            yyval.dval = yyvsp[0].symp->value;        
02624           ;
02625     break;}
02626 case 88:
02627 #line 1039 "parser.y"
02628 { yyval.dval = (*(yyvsp[-3].symp->funcptr))(yyvsp[-1].dval);       ;
02629     break;}
02630 case 89:
02631 #line 1040 "parser.y"
02632 { yyval.dval = yyvsp[-2].dval + yyvsp[0].dval;                    ;
02633     break;}
02634 case 90:
02635 #line 1041 "parser.y"
02636 { yyval.dval = yyvsp[-2].dval - yyvsp[0].dval;                    ;
02637     break;}
02638 case 91:
02639 #line 1042 "parser.y"
02640 { yyval.dval = yyvsp[-2].dval * yyvsp[0].dval;                    ;
02641     break;}
02642 case 92:
02643 #line 1043 "parser.y"
02644 { yyval.dval = yyvsp[-2].dval / yyvsp[0].dval;                    ;
02645     break;}
02646 case 93:
02647 #line 1044 "parser.y"
02648 { yyval.dval = pow(yyvsp[-2].dval,yyvsp[0].dval);                 ;
02649     break;}
02650 case 94:
02651 #line 1045 "parser.y"
02652 { yyval.dval = -yyvsp[0].dval; ;
02653     break;}
02654 case 95:
02655 #line 1046 "parser.y"
02656 { yyval.dval = yyvsp[0].dval; ;
02657     break;}
02658 case 96:
02659 #line 1047 "parser.y"
02660 { yyval.dval = yyvsp[-1].dval;                         ;
02661     break;}
02662 case 97:
02663 #line 1049 "parser.y"
02664 {
02665            if(yyvsp[-3].array->size == yyvsp[-1].array->size)
02666              {
02667                yyval.dval = 0;
02668                for(int i=0;i<yyvsp[-3].array->size;i++)
02669                  yyval.dval += yyvsp[-3].array->data[i] * yyvsp[-1].array->data[i];
02670              }
02671            else
02672              {
02673                if(VERBOSE) printf("vector dimensions do not match");
02674                yyval.dval = _undefined;
02675              }
02676          ;
02677     break;}
02678 case 98:
02679 #line 1063 "parser.y"
02680 { yyval.dval = (yyvsp[-2].dval < yyvsp[0].dval )? 1 : 0; ;
02681     break;}
02682 case 99:
02683 #line 1064 "parser.y"
02684 { yyval.dval = (yyvsp[-2].dval <= yyvsp[0].dval )? 1 : 0; ;
02685     break;}
02686 case 100:
02687 #line 1065 "parser.y"
02688 { yyval.dval = (yyvsp[-2].dval > yyvsp[0].dval )? 1 : 0; ;
02689     break;}
02690 case 101:
02691 #line 1066 "parser.y"
02692 { yyval.dval = (yyvsp[-2].dval >= yyvsp[0].dval )? 1 : 0; ;
02693     break;}
02694 case 102:
02695 #line 1067 "parser.y"
02696 { yyval.dval = (yyvsp[-2].dval != yyvsp[0].dval )? 1 : 0; ;
02697     break;}
02698 case 103:
02699 #line 1068 "parser.y"
02700 { yyval.dval = (yyvsp[-2].dval == yyvsp[0].dval )? 1 : 0; ;
02701     break;}
02702 case 104:
02703 #line 1070 "parser.y"
02704 { 
02705             if(ECHO_GRAMMAR) printf("aexpr-> %s [ %s ]\n ",yyvsp[-3].symp->name, yyvsp[-1].symp->name); 
02706             yyval.dval = property_lookup(yyvsp[-3].symp->name,yyvsp[-1].symp->name);
02707           ;
02708     break;}
02709 case 105:
02710 #line 1077 "parser.y"
02711 {
02712                 if(ECHO_GRAMMAR) printf("%s \n",yyvsp[-2].symp->name);
02713                 if(execute)
02714                   {
02715                     if(yyvsp[-2].symp->is_reserved)
02716                       printf("%s is reserved",yyvsp[-2].symp->name);
02717                     else
02718                       {
02719                         yyvsp[-2].symp->value = yyvsp[0].dval; yyval.symp=yyvsp[-2].symp;       
02720                       }
02721                   }
02722               ;
02723     break;}
02724 case 106:
02725 #line 1090 "parser.y"
02726 {
02727                 if(execute)
02728                   {
02729                     yyvsp[-2].symp->array.erase(yyvsp[-2].symp->array.begin(),yyvsp[-2].symp->array.end());
02730                     for(int i=0;i<yyvsp[0].array->size;i++)
02731                       yyvsp[-2].symp->array.push_back(yyvsp[0].array->data[i]);
02732                     yyvsp[-2].symp->type = _ARRAY;
02733                     yyval.symp = yyvsp[-2].symp;
02734                     delete[] yyvsp[0].array->data;
02735                     yyvsp[0].array->size = 0;
02736                   }
02737               ;
02738     break;}
02739 case 107:
02740 #line 1104 "parser.y"
02741 {
02742                 if(execute)
02743                   {
02744                     yyvsp[-2].symp->array.erase(yyvsp[-2].symp->array.begin(),yyvsp[-2].symp->array.end());
02745                     for(int i=0;i<yyvsp[0].array->size;i++)
02746                       yyvsp[-2].symp->array.push_back(yyvsp[0].array->data[i]);
02747                     yyval.symp = yyvsp[-2].symp;
02748                     delete[] yyvsp[0].array->data;
02749                     yyvsp[0].array->size = 0;
02750                   }
02751               ;
02752     break;}
02753 case 108:
02754 #line 1118 "parser.y"
02755 {
02756           if(execute)
02757             {
02758               yyval.array = new struct Array;
02759               yyval.array->data = new double[yyvsp[0].symp->array.size()];
02760               yyval.array->size = yyvsp[0].symp->array.size();
02761               //array_list.push_back($$);
02762               list<double>::iterator it;
02763               int i = 0;
02764               for(it=yyvsp[0].symp->array.begin();it!=yyvsp[0].symp->array.end();it++)
02765                 {
02766                   yyval.array->data[i++] = (*it);
02767                 }
02768             }
02769         ;
02770     break;}
02771 case 109:
02772 #line 1134 "parser.y"
02773 {
02774           if(execute)
02775             {
02776               yyval.array = new struct Array;
02777               yyval.array->data = new double[yyvsp[0].array->size];
02778               yyval.array->size = yyvsp[0].array->size;
02779               //array_list.push_back($$);
02780               
02781               for(int i=0;i<yyvsp[0].array->size;i++)
02782                 {
02783                   yyval.array->data[i] = yyvsp[0].array->data[i];
02784                 }
02785               
02786               // erase data in vect
02787               
02788               delete[] yyvsp[0].array->data;
02789               yyvsp[0].array->size = 0;
02790             }
02791         ;
02792     break;}
02793 case 110:
02794 #line 1154 "parser.y"
02795 {
02796           if(execute)
02797           {
02798             yyval.array = new struct Array;
02799             yyval.array->size = yyvsp[0].array->size;
02800             yyval.array->symbols = yyvsp[0].array->symbols;
02801 
02802             yyvsp[0].array->symbols.clear();
02803             yyvsp[0].array->size = 0;
02804           }
02805         ;
02806     break;}
02807 case 111:
02808 #line 1167 "parser.y"
02809 {
02810           if(execute)
02811             {
02812               yyval.array = new struct Array;
02813               yyval.array->size = (yyvsp[-2].array->size < yyvsp[0].array->size )? yyvsp[-2].array->size : yyvsp[0].array->size;
02814               yyval.array->data = new double[yyval.array->size];
02815               //array_list.push_back($$);
02816               
02817               for(int i=0;i<yyval.array->size;i++)
02818                 {
02819                   yyval.array->data[i] = yyvsp[-2].array->data[i] + yyvsp[0].array->data[i];
02820                 }
02821               
02822               
02823               // erase data in vect
02824               
02825               delete[] yyvsp[-2].array->data;
02826               delete[] yyvsp[0].array->data;
02827               yyvsp[-2].array->size = 0;
02828               yyvsp[0].array->size = 0;
02829             }
02830         ;
02831     break;}
02832 case 112:
02833 #line 1190 "parser.y"
02834 {
02835           if(execute)
02836             {
02837               yyval.array = new struct Array;
02838               yyval.array->size = (yyvsp[-2].array->size < yyvsp[0].array->size )? yyvsp[-2].array->size : yyvsp[0].array->size;
02839               yyval.array->data = new double[yyval.array->size];
02840               //array_list.push_back($$);
02841               
02842               for(int i=0;i<yyval.array->size;i++)
02843                 {
02844                   yyval.array->data[i] = yyvsp[-2].array->data[i] - yyvsp[0].array->data[i];
02845                 }
02846               
02847               
02848               // erase data in vect
02849               
02850               delete[] yyvsp[-2].array->data;
02851               delete[] yyvsp[0].array->data;
02852               yyvsp[-2].array->size = 0;
02853               yyvsp[0].array->size = 0;
02854             }
02855         ;
02856     break;}
02857 case 113:
02858 #line 1213 "parser.y"
02859 {
02860           if(execute)
02861             {
02862               yyval.array = new struct Array;
02863               yyval.array->size = yyvsp[-2].array->size;
02864               yyval.array->data = new double[yyval.array->size];
02865               //array_list.push_back($$);
02866               
02867               for(int i=0;i<yyval.array->size;i++)
02868                 {
02869                   yyval.array->data[i] = yyvsp[-2].array->data[i] + yyvsp[0].dval;
02870                 }
02871               
02872               // erase data in vect
02873               
02874               delete[] yyvsp[-2].array->data;
02875               yyvsp[-2].array->size = 0;
02876             }
02877         ;
02878     break;}
02879 case 114:
02880 #line 1234 "parser.y"
02881 {
02882           if(execute)
02883             {
02884               yyval.array = new struct Array;
02885               yyval.array->size = yyvsp[-2].array->size;
02886               yyval.array->data = new double[yyval.array->size];
02887               //array_list.push_back($$);
02888               
02889               for(int i=0;i<yyval.array->size;i++)
02890                 {
02891                   yyval.array->data[i] = yyvsp[-2].array->data[i] * yyvsp[0].dval;
02892                 }
02893               
02894               // erase data in vect
02895               
02896               delete[] yyvsp[-2].array->data;
02897               yyvsp[-2].array->size = 0;
02898             }
02899         ;
02900     break;}
02901 case 115:
02902 #line 1254 "parser.y"
02903 {
02904           if(execute)
02905             {
02906               yyval.array = new struct Array;
02907               yyval.array->size = yyvsp[-2].array->size;
02908               yyval.array->data = new double[yyval.array->size];
02909               //array_list.push_back($$);
02910               
02911               for(int i=0;i<yyval.array->size;i++)
02912                 {
02913                   yyval.array->data[i] = yyvsp[-2].array->data[i] / yyvsp[0].dval;
02914                 }
02915               
02916               // erase data in vect
02917               
02918               delete[] yyvsp[-2].array->data;
02919               yyvsp[-2].array->size = 0;
02920             }
02921         ;
02922     break;}
02923 case 116:
02924 #line 1274 "parser.y"
02925 {
02926           if(execute)
02927             {
02928               yyval.array = new struct Array;
02929               yyval.array->size = yyvsp[0].array->size;
02930               yyval.array->data = new double[yyval.array->size];
02931               //array_list.push_back($$);
02932               
02933               for(int i=0;i<yyval.array->size;i++)
02934                 {
02935                   yyval.array->data[i] = yyvsp[0].array->data[i] + yyvsp[-2].dval;
02936                 }
02937               
02938               // erase data in vect
02939               
02940               delete[] yyvsp[0].array->data;
02941               yyvsp[0].array->size = 0;
02942             }
02943         ;
02944     break;}
02945 case 117:
02946 #line 1294 "parser.y"
02947 {
02948           if(execute)
02949             {
02950               yyval.array = new struct Array;
02951               yyval.array->size = yyvsp[0].array->size;
02952               yyval.array->data = new double[yyval.array->size];
02953               //array_list.push_back($$);
02954               
02955               for(int i=0;i<yyval.array->size;i++)
02956                 {
02957                   yyval.array->data[i] = yyvsp[-2].dval - yyvsp[0].array->data[i];
02958                 }
02959               
02960               // erase data in vect
02961               
02962               delete[] yyvsp[0].array->data;
02963               yyvsp[0].array->size = 0;
02964             }
02965         ;
02966     break;}
02967 case 118:
02968 #line 1314 "parser.y"
02969 {
02970           if(execute)
02971             {
02972               yyval.array = new struct Array;
02973               yyval.array->size = yyvsp[0].array->size;
02974               yyval.array->data = new double[yyval.array->size];
02975               //array_list.push_back($$);
02976               
02977               for(int i=0;i<yyval.array->size;i++)
02978                 {
02979                   yyval.array->data[i] = yyvsp[-2].dval * yyvsp[0].array->data[i];
02980                 }
02981               
02982               // erase data in vect
02983               
02984               delete[] yyvsp[0].array->data;
02985               yyvsp[0].array->size = 0;
02986             }
02987         ;
02988     break;}
02989 case 119:
02990 #line 1337 "parser.y"
02991 {
02992             if(execute)
02993               {
02994                 //printf("matched vector of size %d\n",_tmparray.size());
02995                 yyval.array = new struct Array;
02996                 yyval.array->data = new double[_tmparray.size()];
02997                 yyval.array->size = _tmparray.size();
02998       
02999                 //array_list.push_back(a);
03000       
03001                 list<double>::iterator it;
03002                 int i=0;      
03003                 for(it=_tmparray.begin();it!=_tmparray.end();it++)
03004                 {
03005                  yyval.array->data[i++] = (*it);
03006                 }
03007                 _tmparray.erase(_tmparray.begin(),_tmparray.end());
03008 
03009                 list<char*>::iterator lIter;
03010                 for(lIter = _tmpstring.begin(); lIter != _tmpstring.end(); lIter++)
03011                   yyval.array->symbols.push_back(*lIter);
03012 
03013                 _tmpstring.clear();
03014               }
03015         ;
03016     break;}
03017 case 120:
03018 #line 1365 "parser.y"
03019 {
03020           if(execute)
03021           {
03022             yyval.array = new struct Array;
03023             yyval.array->size = _tmpstring.size();
03024 
03025             list<char*>::iterator iter;
03026             for(iter = _tmpstring.begin(); iter != _tmpstring.end(); iter++)
03027               yyval.array->symbols.push_back(*iter);
03028 
03029             _tmpstring.clear();
03030           }
03031         ;
03032     break;}
03033 case 122:
03034 #line 1382 "parser.y"
03035 {
03036             if(execute)
03037               _tmparray.push_front(yyvsp[-2].dval);
03038           ;
03039     break;}
03040 case 123:
03041 #line 1387 "parser.y"
03042 {
03043            if(execute)
03044              _tmparray.push_front(yyvsp[0].dval);
03045         ;
03046     break;}
03047 case 125:
03048 #line 1395 "parser.y"
03049 {
03050             if(execute)
03051               _tmpstring.push_front(yyvsp[-2].str);
03052           ;
03053     break;}
03054 case 126:
03055 #line 1400 "parser.y"
03056 {
03057            if(execute)
03058              _tmpstring.push_front(yyvsp[0].str);
03059          ;
03060     break;}
03061 case 127:
03062 #line 1406 "parser.y"
03063 { if(execute) quit(); ;
03064     break;}
03065 case 129:
03066 #line 1408 "parser.y"
03067 { if(execute) print( element_list ); ;
03068     break;}
03069 case 130:
03070 #line 1409 "parser.y"
03071 { if(execute) print( beamline_list); ;
03072     break;}
03073 case 131:
03074 #line 1410 "parser.y"
03075 { if(execute) print(options); ;
03076     break;}
03077 case 132:
03078 #line 1412 "parser.y"
03079 {
03080             if(execute)
03081               {
03082                 printf("\t");
03083                 printf("\t%.10g\n",yyvsp[0].symp->value);
03084               }
03085           ;
03086     break;}
03087 case 133:
03088 #line 1420 "parser.y"
03089 {
03090             if(execute)
03091               {
03092                 printf("\t");
03093                 
03094                 list<double>::iterator it;
03095                 for(it=yyvsp[0].symp->array.begin();it!=yyvsp[0].symp->array.end();it++)
03096                   {
03097                     printf("  %.10g ",(*it));
03098                   }
03099                 
03100                 printf("\n");
03101               } 
03102           ;
03103     break;}
03104 case 134:
03105 #line 1434 "parser.y"
03106 { if(execute) expand_line(current_line,current_start, current_end);;
03107     break;}
03108 case 136:
03109 #line 1436 "parser.y"
03110 { if(execute) printf("%s\n",yyvsp[0].str); ;
03111     break;}
03112 case 137:
03113 #line 1438 "parser.y"
03114 {
03115             if(execute)
03116               {  
03117                 if(ECHO_GRAMMAR) printf("command -> SAMPLE\n");
03118                 add_sampler(yyvsp[0].symp->name,yyvsp[0].symp->name, element_count);
03119                 element_count = 1;
03120                 params.flush();
03121               }
03122           ;
03123     break;}
03124 case 138:
03125 #line 1448 "parser.y"
03126 {
03127             if(execute)
03128               {  
03129                 if(ECHO_GRAMMAR) printf("command -> CSAMPLE\n");
03130 //SPM           add_csampler("sampler",$3->name, element_count,params.l, params.r);
03131                 add_csampler(yyvsp[0].symp->name,yyvsp[0].symp->name, element_count,params.l, params.r);
03132                 element_count = 1;
03133                 params.flush();
03134               }
03135           ;
03136     break;}
03137 case 139:
03138 #line 1459 "parser.y"
03139 {
03140             if(execute)
03141               {  
03142                 if(ECHO_GRAMMAR) printf("command -> GAS\n");
03143                 add_gas("gas",yyvsp[0].symp->name, element_count, params.material);
03144                 element_count = 1;
03145                 params.flush();
03146               }
03147           ;
03148     break;}
03149 case 140:
03150 #line 1469 "parser.y"
03151 {
03152             if(execute)
03153               {  
03154                 if(ECHO_GRAMMAR) printf("command -> TUNNEL\n");
03155                 write_table(params,"tunnel",_TUNNEL);
03156                 params.flush();
03157               }
03158           ;
03159     break;}
03160 case 141:
03161 #line 1478 "parser.y"
03162 {
03163             if(execute)
03164               {  
03165                 if(ECHO_GRAMMAR) printf("command -> BETA0\n");
03166               }
03167           ;
03168     break;}
03169 case 142:
03170 #line 1485 "parser.y"
03171 {
03172             if(execute)
03173               {
03174                 set_value("doTwiss",1);
03175                 if(ECHO_GRAMMAR) printf("command -> TWISS\n");
03176               }
03177           ;
03178     break;}
03179 case 143:
03180 #line 1493 "parser.y"
03181 {                                                   
03182             if(execute)                                       
03183               {                                               
03184                 if(ECHO_GRAMMAR) printf("command -> DUMP\n"); 
03185                 add_dump("dump",yyvsp[0].symp->name, element_count);     
03186                 element_count = 1;                            
03187                 params.flush();                               
03188               }                                               
03189           ;
03190     break;}
03191 case 144:
03192 #line 1507 "parser.y"
03193 {
03194                     if(execute)
03195                       {
03196                         yyval.str = yyvsp[0].symp->name;
03197                         current_line = yyvsp[0].symp->name;
03198                         current_start = NULL;
03199                         current_end = NULL;
03200                       }
03201                   ;
03202     break;}
03203 case 145:
03204 #line 1517 "parser.y"
03205 {
03206                     if(execute)
03207                       {
03208                         yyval.str = yyvsp[0].symp->name;
03209                         current_line = yyvsp[0].symp->name;
03210                         current_start = NULL;
03211                         current_end = NULL;
03212                       }
03213                   ;
03214     break;}
03215 case 146:
03216 #line 1527 "parser.y"
03217 {
03218                     if(execute)
03219                       {
03220                         yyval.str = yyvsp[-6].symp->name;
03221                         current_line = yyvsp[-6].symp->name;
03222                         current_start = yyvsp[-2].symp->name;
03223                         current_end = yyvsp[0].symp->name;
03224                       }
03225                   ;
03226     break;}
03227 case 147:
03228 #line 1541 "parser.y"
03229 { if(ECHO_GRAMMAR)  printf("sample_opt : RANGE =  %s \n",yyvsp[0].symp->name);
03230                   {
03231                     if(execute) yyval.symp = yyvsp[0].symp;
03232                   }
03233                 ;
03234     break;}
03235 case 148:
03236 #line 1547 "parser.y"
03237 {
03238                   if(ECHO_GRAMMAR) printf("sample_opt : RANGE =  %s [%.10g] \n",yyvsp[-3].symp->name,yyvsp[-1].dval);
03239                     {
03240                       if(execute) { yyval.symp = yyvsp[-3].symp; element_count = (int)yyvsp[-1].dval; }
03241                     }
03242                 ;
03243     break;}
03244 case 149:
03245 #line 1558 "parser.y"
03246 {
03247                     if(ECHO_GRAMMAR) printf("csample_opt ->csopt , %s =  %.10g \n",yyvsp[-2].symp->name,yyvsp[0].dval);
03248                     
03249                     if(execute)
03250                       {
03251                         if( !strcmp(yyvsp[-2].symp->name,"r") ) params.r = yyvsp[0].dval;
03252                         else if (!strcmp(yyvsp[-2].symp->name,"l") ) params.l = yyvsp[0].dval;
03253                         else if(VERBOSE) 
03254                           printf("Warning : CSAMPLER: unknown parameter %s \n",yyvsp[-2].symp->name);
03255                       }
03256                   ;
03257     break;}
03258 case 150:
03259 #line 1570 "parser.y"
03260 {
03261                     if(ECHO_GRAMMAR) printf("csample_opt -> %s =  %s \n",yyvsp[-2].symp->name,yyvsp[0].str);
03262                     if(execute)
03263                       {
03264                         ;//set_value($1->name,string($3));
03265                       }
03266                   ;
03267     break;}
03268 case 151:
03269 #line 1578 "parser.y"
03270 {
03271                     if(ECHO_GRAMMAR) printf("csample_opt ->csopt , %s =  %.10g \n",yyvsp[-4].symp->name,yyvsp[-2].dval);
03272                     
03273                     if(execute)
03274                       {
03275                         if( !strcmp(yyvsp[-4].symp->name,"r") ) params.r = yyvsp[-2].dval;
03276                         else if (!strcmp(yyvsp[-4].symp->name,"l") ) params.l = yyvsp[-2].dval;
03277                         else if(VERBOSE) 
03278                           printf("Warning : CSAMPLER: unknown parameter %s at line\n",yyvsp[-4].symp->name);
03279                       }
03280 
03281                   ;
03282     break;}
03283 case 152:
03284 #line 1591 "parser.y"
03285 {
03286                     if(ECHO_GRAMMAR) printf("csample_opt -> %s =  %s \n",yyvsp[-4].symp->name,yyvsp[-2].str);
03287                     if(execute)
03288                       ;//set_value($1->name,string($3));
03289                   ;
03290     break;}
03291 case 153:
03292 #line 1597 "parser.y"
03293 {
03294                     if(ECHO_GRAMMAR) printf("csample_opt -> sopt, csopt\n");
03295                     yyval.symp = yyvsp[-2].symp;
03296                   ;
03297     break;}
03298 case 154:
03299 #line 1602 "parser.y"
03300 {
03301                     if(ECHO_GRAMMAR) printf("csample_opt -> sopt\n");
03302                     yyval.symp = yyvsp[0].symp;
03303                   ;
03304     break;}
03305 case 155:
03306 #line 1609 "parser.y"
03307 {
03308                     if(ECHO_GRAMMAR) printf("gas_opt -> , %s =  %.10g \n",yyvsp[-2].symp->name,yyvsp[0].dval);
03309                     
03310                     if(execute)
03311                       {
03312                         if( !strcmp(yyvsp[-2].symp->name,"r") ) params.r = yyvsp[0].dval;
03313                         else if (!strcmp(yyvsp[-2].symp->name,"l") ) params.l = yyvsp[0].dval;
03314                         else if(VERBOSE) 
03315                           printf("Warning : GAS: unknown parameter %s \n",yyvsp[-2].symp->name);
03316                       }
03317                   ;
03318     break;}
03319 case 156:
03320 #line 1621 "parser.y"
03321 {
03322                     if(ECHO_GRAMMAR) printf("gas_opt -> %s =  %s \n",yyvsp[-2].symp->name,yyvsp[0].str);
03323                     if(execute)
03324                       {
03325                         if( !strcmp(yyvsp[-2].symp->name,"material") ) 
03326                           {
03327                             strcpy(params.material ,yyvsp[0].str);
03328                             params.materialset = 1;
03329                           }
03330                         //set_value($1->name,string($3));
03331                       }
03332                   ;
03333     break;}
03334 case 157:
03335 #line 1634 "parser.y"
03336 {
03337                     if(ECHO_GRAMMAR) printf("gas_opt -> , %s =  %.10g \n",yyvsp[-4].symp->name,yyvsp[-2].dval);
03338                     
03339                     if(execute)
03340                       {
03341                         if( !strcmp(yyvsp[-4].symp->name,"r") ) params.r = yyvsp[-2].dval;
03342                         else if (!strcmp(yyvsp[-4].symp->name,"l") ) params.l = yyvsp[-2].dval;
03343                         else if(VERBOSE) 
03344                           printf("Warning : GAS: unknown parameter %s at line\n",yyvsp[-4].symp->name);
03345                       }
03346 
03347                   ;
03348     break;}
03349 case 158:
03350 #line 1647 "parser.y"
03351 {
03352                     if(ECHO_GRAMMAR) printf("csample_opt -> %s =  %s \n",yyvsp[-4].symp->name,yyvsp[-2].str);
03353                     if(execute)
03354                       {
03355                           if( !strcmp(yyvsp[-4].symp->name,"material") ) 
03356                             {
03357                               strcpy(params.material ,yyvsp[-2].str);
03358                               params.materialset = 1;
03359                             }
03360                       }
03361                   ;
03362     break;}
03363 case 159:
03364 #line 1659 "parser.y"
03365 {
03366                     if(ECHO_GRAMMAR) printf("gas_opt -> range, csopt\n");
03367 
03368                   ;
03369     break;}
03370 case 160:
03371 #line 1664 "parser.y"
03372 {
03373                     if(ECHO_GRAMMAR) printf("gas_opt -> range\n");
03374 
03375                   ;
03376     break;}
03377 case 161:
03378 #line 1669 "parser.y"
03379 {
03380                     if(ECHO_GRAMMAR) printf("gas_opt -> range\n");
03381                     yyval.symp = yyvsp[-2].symp;
03382                   ;
03383     break;}
03384 case 162:
03385 #line 1674 "parser.y"
03386 {
03387                     if(ECHO_GRAMMAR) printf("gas_opt -> range\n");
03388                     yyval.symp = yyvsp[0].symp;
03389                   ;
03390     break;}
03391 case 164:
03392 #line 1682 "parser.y"
03393 {
03394                       if(execute)
03395                         set_value(yyvsp[-4].symp->name,yyvsp[-2].dval);
03396                     ;
03397     break;}
03398 case 165:
03399 #line 1687 "parser.y"
03400 {
03401                       if(execute)
03402                         set_value(yyvsp[-2].symp->name,yyvsp[0].dval);
03403                     ;
03404     break;}
03405 case 166:
03406 #line 1692 "parser.y"
03407 {
03408                       if(execute)
03409                         set_value(yyvsp[-4].symp->name,std::string(yyvsp[-2].str));
03410                     ;
03411     break;}
03412 case 167:
03413 #line 1697 "parser.y"
03414 {
03415                       if(execute)
03416                         set_value(yyvsp[-2].symp->name,std::string(yyvsp[0].str));
03417                     ;
03418     break;}
03419 case 169:
03420 #line 1705 "parser.y"
03421 {
03422                     if(execute)
03423                       set_value(yyvsp[-4].symp->name,yyvsp[-2].dval);
03424                   ;
03425     break;}
03426 case 170:
03427 #line 1710 "parser.y"
03428 {
03429                     if(execute)
03430                       set_value(yyvsp[-2].symp->name,yyvsp[0].dval);
03431                   ;
03432     break;}
03433 case 171:
03434 #line 1715 "parser.y"
03435 {
03436                     if(execute)
03437                       set_value(yyvsp[-4].symp->name,string(yyvsp[-2].str));
03438                   ;
03439     break;}
03440 case 172:
03441 #line 1720 "parser.y"
03442 {
03443                     if(execute)
03444                       set_value(yyvsp[-2].symp->name,string(yyvsp[0].str));
03445                   ;
03446     break;}
03447 }
03448 
03449 #line 839 "/usr/share/bison++/bison.cc"
03450    /* the action file gets copied in in place of this dollarsign  */
03451   yyvsp -= yylen;
03452   yyssp -= yylen;
03453 #ifdef YY_parse_LSP_NEEDED
03454   yylsp -= yylen;
03455 #endif
03456 
03457 #if YY_parse_DEBUG != 0
03458   if (YY_parse_DEBUG_FLAG)
03459     {
03460       short *ssp1 = yyss - 1;
03461       fprintf (stderr, "state stack now");
03462       while (ssp1 != yyssp)
03463         fprintf (stderr, " %d", *++ssp1);
03464       fprintf (stderr, "\n");
03465     }
03466 #endif
03467 
03468   *++yyvsp = yyval;
03469 
03470 #ifdef YY_parse_LSP_NEEDED
03471   yylsp++;
03472   if (yylen == 0)
03473     {
03474       yylsp->first_line = YY_parse_LLOC.first_line;
03475       yylsp->first_column = YY_parse_LLOC.first_column;
03476       yylsp->last_line = (yylsp-1)->last_line;
03477       yylsp->last_column = (yylsp-1)->last_column;
03478       yylsp->text = 0;
03479     }
03480   else
03481     {
03482       yylsp->last_line = (yylsp+yylen-1)->last_line;
03483       yylsp->last_column = (yylsp+yylen-1)->last_column;
03484     }
03485 #endif
03486 
03487   /* Now "shift" the result of the reduction.
03488      Determine what state that goes to,
03489      based on the state we popped back to
03490      and the rule number reduced by.  */
03491 
03492   yyn = yyr1[yyn];
03493 
03494   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
03495   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
03496     yystate = yytable[yystate];
03497   else
03498     yystate = yydefgoto[yyn - YYNTBASE];
03499 
03500   YYGOTO(yynewstate);
03501 
03502 YYLABEL(yyerrlab)   /* here on detecting error */
03503 
03504   if (! yyerrstatus)
03505     /* If not already recovering from an error, report this error.  */
03506     {
03507       ++YY_parse_NERRS;
03508 
03509 #ifdef YY_parse_ERROR_VERBOSE
03510       yyn = yypact[yystate];
03511 
03512       if (yyn > YYFLAG && yyn < YYLAST)
03513         {
03514           int size = 0;
03515           char *msg;
03516           int x, count;
03517 
03518           count = 0;
03519           /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
03520           for (x = (yyn < 0 ? -yyn : 0);
03521                x < (sizeof(yytname) / sizeof(char *)); x++)
03522             if (yycheck[x + yyn] == x)
03523               size += strlen(yytname[x]) + 15, count++;
03524           msg = (char *) malloc(size + 15);
03525           if (msg != 0)
03526             {
03527               strcpy(msg, "parse error");
03528 
03529               if (count < 5)
03530                 {
03531                   count = 0;
03532                   for (x = (yyn < 0 ? -yyn : 0);
03533                        x < (sizeof(yytname) / sizeof(char *)); x++)
03534                     if (yycheck[x + yyn] == x)
03535                       {
03536                         strcat(msg, count == 0 ? ", expecting `" : " or `");
03537                         strcat(msg, yytname[x]);
03538                         strcat(msg, "'");
03539                         count++;
03540                       }
03541                 }
03542               YY_parse_ERROR(msg);
03543               free(msg);
03544             }
03545           else
03546             YY_parse_ERROR ("parse error; also virtual memory exceeded");
03547         }
03548       else
03549 #endif /* YY_parse_ERROR_VERBOSE */
03550         YY_parse_ERROR("parse error");
03551     }
03552 
03553   YYGOTO(yyerrlab1);
03554 YYLABEL(yyerrlab1)   /* here on error raised explicitly by an action */
03555 
03556   if (yyerrstatus == 3)
03557     {
03558       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
03559 
03560       /* return failure if at end of input */
03561       if (YY_parse_CHAR == YYEOF)
03562         YYABORT;
03563 
03564 #if YY_parse_DEBUG != 0
03565       if (YY_parse_DEBUG_FLAG)
03566         fprintf(stderr, "Discarding token %d (%s).\n", YY_parse_CHAR, yytname[yychar1]);
03567 #endif
03568 
03569       YY_parse_CHAR = YYEMPTY;
03570     }
03571 
03572   /* Else will try to reuse lookahead token
03573      after shifting the error token.  */
03574 
03575   yyerrstatus = 3;              /* Each real token shifted decrements this */
03576 
03577   YYGOTO(yyerrhandle);
03578 
03579 YYLABEL(yyerrdefault)  /* current state does not do anything special for the error token. */
03580 
03581 #if 0
03582   /* This is wrong; only states that explicitly want error tokens
03583      should shift them.  */
03584   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
03585   if (yyn) YYGOTO(yydefault);
03586 #endif
03587 
03588 YYLABEL(yyerrpop)   /* pop the current state because it cannot handle the error token */
03589 
03590   if (yyssp == yyss) YYABORT;
03591   yyvsp--;
03592   yystate = *--yyssp;
03593 #ifdef YY_parse_LSP_NEEDED
03594   yylsp--;
03595 #endif
03596 
03597 #if YY_parse_DEBUG != 0
03598   if (YY_parse_DEBUG_FLAG)
03599     {
03600       short *ssp1 = yyss - 1;
03601       fprintf (stderr, "Error: state stack now");
03602       while (ssp1 != yyssp)
03603         fprintf (stderr, " %d", *++ssp1);
03604       fprintf (stderr, "\n");
03605     }
03606 #endif
03607 
03608 YYLABEL(yyerrhandle)
03609 
03610   yyn = yypact[yystate];
03611   if (yyn == YYFLAG)
03612     YYGOTO(yyerrdefault);
03613 
03614   yyn += YYTERROR;
03615   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
03616     YYGOTO(yyerrdefault);
03617 
03618   yyn = yytable[yyn];
03619   if (yyn < 0)
03620     {
03621       if (yyn == YYFLAG)
03622         YYGOTO(yyerrpop);
03623       yyn = -yyn;
03624       YYGOTO(yyreduce);
03625     }
03626   else if (yyn == 0)
03627     YYGOTO(yyerrpop);
03628 
03629   if (yyn == YYFINAL)
03630     YYACCEPT;
03631 
03632 #if YY_parse_DEBUG != 0
03633   if (YY_parse_DEBUG_FLAG)
03634     fprintf(stderr, "Shifting error token, ");
03635 #endif
03636 
03637   *++yyvsp = YY_parse_LVAL;
03638 #ifdef YY_parse_LSP_NEEDED
03639   *++yylsp = YY_parse_LLOC;
03640 #endif
03641 
03642   yystate = yyn;
03643   YYGOTO(yynewstate);
03644 /* end loop, in which YYGOTO may be used. */
03645   YYENDGOTO
03646 }
03647 
03648 /* END */
03649 
03650  #line 1038 "/usr/share/bison++/bison.cc"
03651 #line 1726 "parser.y"
03652 
03653 
03654 
03655 
03656 int yyerror(char *s)
03657 {
03658   printf("%s at line %d , file %s\n",s, line_num, yyfilename);
03659   exit(1);
03660 }
03661 
03662 #ifdef __cplusplus
03663 extern "C" {
03664 #endif
03665 int yywrap()
03666 {
03667         return 1;
03668 }
03669 #ifdef __cplusplus
03670 }
03671 #endif

Generated on Wed Mar 5 17:25:22 2008 for BDSIM by  doxygen 1.5.3