|
funkalicious 0.1
|
00001 00002 /* A Bison parser, made by GNU Bison 2.4.1. */ 00003 00004 /* Skeleton implementation for Bison's Yacc-like parsers in C 00005 00006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 00007 Free Software Foundation, Inc. 00008 00009 This program is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00021 00022 /* As a special exception, you may create a larger work that contains 00023 part or all of the Bison parser skeleton and distribute that work 00024 under terms of your choice, so long as that work isn't itself a 00025 parser generator using the skeleton or a modified version thereof 00026 as a parser skeleton. Alternatively, if you modify or redistribute 00027 the parser skeleton itself, you may (at your option) remove this 00028 special exception, which will cause the skeleton and the resulting 00029 Bison output files to be licensed under the GNU General Public 00030 License without this special exception. 00031 00032 This special exception was added by the Free Software Foundation in 00033 version 2.2 of Bison. */ 00034 00035 /* C LALR(1) parser skeleton written by Richard Stallman, by 00036 simplifying the original so-called "semantic" parser. */ 00037 00038 /* All symbols defined below should begin with yy or YY, to avoid 00039 infringing on user name space. This should be done even for local 00040 variables, as they might otherwise be expanded by user macros. 00041 There are some unavoidable exceptions within include files to 00042 define necessary library symbols; they are noted "INFRINGES ON 00043 USER NAME SPACE" below. */ 00044 00045 /* Identify Bison output. */ 00046 #define YYBISON 1 00047 00048 /* Bison version. */ 00049 #define YYBISON_VERSION "2.4.1" 00050 00051 /* Skeleton name. */ 00052 #define YYSKELETON_NAME "yacc.c" 00053 00054 /* Pure parsers. */ 00055 #define YYPURE 0 00056 00057 /* Push parsers. */ 00058 #define YYPUSH 0 00059 00060 /* Pull parsers. */ 00061 #define YYPULL 1 00062 00063 /* Using locations. */ 00064 #define YYLSP_NEEDED 0 00065 00066 00067 00068 /* Copy the first part of user declarations. */ 00069 00070 /* Line 189 of yacc.c */ 00071 #line 1 "getChainPotential_parser.y" 00072 00073 00074 /* 00075 Copyright (C) 2009 Joseph Pingenot 00076 00077 This program is free software: you can redistribute it and/or modify 00078 it under the terms of the GNU Affero General Public License as published by 00079 the Free Software Foundation, either version 3 of the License, or 00080 (at your option) any later version. 00081 00082 This program is distributed in the hope that it will be useful, 00083 but WITHOUT ANY WARRANTY; without even the implied warranty of 00084 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00085 GNU Affero General Public License for more details. 00086 00087 You should have received a copy of the GNU Affero General Public License 00088 along with this program. If not, see <http://www.gnu.org/licenses/>. 00089 */ 00090 00091 #include <stdlib.h> 00092 #include <stdio.h> 00093 #include "getChainPotential_lexer.h" 00094 00095 int yylex(void); 00096 void yyerror(const char *s); 00097 00098 00099 00100 /* Line 189 of yacc.c */ 00101 #line 102 "src/getChainPotential_parser.c" 00102 00103 /* Enabling traces. */ 00104 #ifndef YYDEBUG 00105 # define YYDEBUG 0 00106 #endif 00107 00108 /* Enabling verbose error messages. */ 00109 #ifdef YYERROR_VERBOSE 00110 # undef YYERROR_VERBOSE 00111 # define YYERROR_VERBOSE 1 00112 #else 00113 # define YYERROR_VERBOSE 0 00114 #endif 00115 00116 /* Enabling the token table. */ 00117 #ifndef YYTOKEN_TABLE 00118 # define YYTOKEN_TABLE 0 00119 #endif 00120 00121 00122 /* Tokens. */ 00123 #ifndef YYTOKENTYPE 00124 # define YYTOKENTYPE 00125 /* Put the tokens into the symbol table, so that GDB and other debuggers 00126 know about them. */ 00127 enum yytokentype { 00128 NUMBER = 258, 00129 WAVEFUNC = 259 00130 }; 00131 #endif 00132 /* Tokens. */ 00133 #define NUMBER 258 00134 #define WAVEFUNC 259 00135 00136 00137 00138 00139 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00140 typedef union YYSTYPE 00141 { 00142 00143 /* Line 214 of yacc.c */ 00144 #line 28 "getChainPotential_parser.y" 00145 00146 char* s; 00147 double d; 00148 00149 00150 00151 /* Line 214 of yacc.c */ 00152 #line 153 "src/getChainPotential_parser.c" 00153 } YYSTYPE; 00154 # define YYSTYPE_IS_TRIVIAL 1 00155 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00156 # define YYSTYPE_IS_DECLARED 1 00157 #endif 00158 00159 00160 /* Copy the second part of user declarations. */ 00161 00162 00163 /* Line 264 of yacc.c */ 00164 #line 165 "src/getChainPotential_parser.c" 00165 00166 #ifdef short 00167 # undef short 00168 #endif 00169 00170 #ifdef YYTYPE_UINT8 00171 typedef YYTYPE_UINT8 yytype_uint8; 00172 #else 00173 typedef unsigned char yytype_uint8; 00174 #endif 00175 00176 #ifdef YYTYPE_INT8 00177 typedef YYTYPE_INT8 yytype_int8; 00178 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00179 || defined __cplusplus || defined _MSC_VER) 00180 typedef signed char yytype_int8; 00181 #else 00182 typedef short int yytype_int8; 00183 #endif 00184 00185 #ifdef YYTYPE_UINT16 00186 typedef YYTYPE_UINT16 yytype_uint16; 00187 #else 00188 typedef unsigned short int yytype_uint16; 00189 #endif 00190 00191 #ifdef YYTYPE_INT16 00192 typedef YYTYPE_INT16 yytype_int16; 00193 #else 00194 typedef short int yytype_int16; 00195 #endif 00196 00197 #ifndef YYSIZE_T 00198 # ifdef __SIZE_TYPE__ 00199 # define YYSIZE_T __SIZE_TYPE__ 00200 # elif defined size_t 00201 # define YYSIZE_T size_t 00202 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00203 || defined __cplusplus || defined _MSC_VER) 00204 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00205 # define YYSIZE_T size_t 00206 # else 00207 # define YYSIZE_T unsigned int 00208 # endif 00209 #endif 00210 00211 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00212 00213 #ifndef YY_ 00214 # if YYENABLE_NLS 00215 # if ENABLE_NLS 00216 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00217 # define YY_(msgid) dgettext ("bison-runtime", msgid) 00218 # endif 00219 # endif 00220 # ifndef YY_ 00221 # define YY_(msgid) msgid 00222 # endif 00223 #endif 00224 00225 /* Suppress unused-variable warnings by "using" E. */ 00226 #if ! defined lint || defined __GNUC__ 00227 # define YYUSE(e) ((void) (e)) 00228 #else 00229 # define YYUSE(e) /* empty */ 00230 #endif 00231 00232 /* Identity function, used to suppress warnings about constant conditions. */ 00233 #ifndef lint 00234 # define YYID(n) (n) 00235 #else 00236 #if (defined __STDC__ || defined __C99__FUNC__ \ 00237 || defined __cplusplus || defined _MSC_VER) 00238 static int 00239 YYID (int yyi) 00240 #else 00241 static int 00242 YYID (yyi) 00243 int yyi; 00244 #endif 00245 { 00246 return yyi; 00247 } 00248 #endif 00249 00250 #if ! defined yyoverflow || YYERROR_VERBOSE 00251 00252 /* The parser invokes alloca or malloc; define the necessary symbols. */ 00253 00254 # ifdef YYSTACK_USE_ALLOCA 00255 # if YYSTACK_USE_ALLOCA 00256 # ifdef __GNUC__ 00257 # define YYSTACK_ALLOC __builtin_alloca 00258 # elif defined __BUILTIN_VA_ARG_INCR 00259 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 00260 # elif defined _AIX 00261 # define YYSTACK_ALLOC __alloca 00262 # elif defined _MSC_VER 00263 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 00264 # define alloca _alloca 00265 # else 00266 # define YYSTACK_ALLOC alloca 00267 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00268 || defined __cplusplus || defined _MSC_VER) 00269 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00270 # ifndef _STDLIB_H 00271 # define _STDLIB_H 1 00272 # endif 00273 # endif 00274 # endif 00275 # endif 00276 # endif 00277 00278 # ifdef YYSTACK_ALLOC 00279 /* Pacify GCC's `empty if-body' warning. */ 00280 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 00281 # ifndef YYSTACK_ALLOC_MAXIMUM 00282 /* The OS might guarantee only one guard page at the bottom of the stack, 00283 and a page size can be as small as 4096 bytes. So we cannot safely 00284 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 00285 to allow for a few compiler-allocated temporary stack slots. */ 00286 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 00287 # endif 00288 # else 00289 # define YYSTACK_ALLOC YYMALLOC 00290 # define YYSTACK_FREE YYFREE 00291 # ifndef YYSTACK_ALLOC_MAXIMUM 00292 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 00293 # endif 00294 # if (defined __cplusplus && ! defined _STDLIB_H \ 00295 && ! ((defined YYMALLOC || defined malloc) \ 00296 && (defined YYFREE || defined free))) 00297 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00298 # ifndef _STDLIB_H 00299 # define _STDLIB_H 1 00300 # endif 00301 # endif 00302 # ifndef YYMALLOC 00303 # define YYMALLOC malloc 00304 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00305 || defined __cplusplus || defined _MSC_VER) 00306 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 00307 # endif 00308 # endif 00309 # ifndef YYFREE 00310 # define YYFREE free 00311 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00312 || defined __cplusplus || defined _MSC_VER) 00313 void free (void *); /* INFRINGES ON USER NAME SPACE */ 00314 # endif 00315 # endif 00316 # endif 00317 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 00318 00319 00320 #if (! defined yyoverflow \ 00321 && (! defined __cplusplus \ 00322 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 00323 00324 /* A type that is properly aligned for any stack member. */ 00325 union yyalloc 00326 { 00327 yytype_int16 yyss_alloc; 00328 YYSTYPE yyvs_alloc; 00329 }; 00330 00331 /* The size of the maximum gap between one aligned stack and the next. */ 00332 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 00333 00334 /* The size of an array large to enough to hold all stacks, each with 00335 N elements. */ 00336 # define YYSTACK_BYTES(N) \ 00337 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 00338 + YYSTACK_GAP_MAXIMUM) 00339 00340 /* Copy COUNT objects from FROM to TO. The source and destination do 00341 not overlap. */ 00342 # ifndef YYCOPY 00343 # if defined __GNUC__ && 1 < __GNUC__ 00344 # define YYCOPY(To, From, Count) \ 00345 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 00346 # else 00347 # define YYCOPY(To, From, Count) \ 00348 do \ 00349 { \ 00350 YYSIZE_T yyi; \ 00351 for (yyi = 0; yyi < (Count); yyi++) \ 00352 (To)[yyi] = (From)[yyi]; \ 00353 } \ 00354 while (YYID (0)) 00355 # endif 00356 # endif 00357 00358 /* Relocate STACK from its old location to the new one. The 00359 local variables YYSIZE and YYSTACKSIZE give the old and new number of 00360 elements in the stack, and YYPTR gives the new location of the 00361 stack. Advance YYPTR to a properly aligned location for the next 00362 stack. */ 00363 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 00364 do \ 00365 { \ 00366 YYSIZE_T yynewbytes; \ 00367 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 00368 Stack = &yyptr->Stack_alloc; \ 00369 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 00370 yyptr += yynewbytes / sizeof (*yyptr); \ 00371 } \ 00372 while (YYID (0)) 00373 00374 #endif 00375 00376 /* YYFINAL -- State number of the termination state. */ 00377 #define YYFINAL 4 00378 /* YYLAST -- Last index in YYTABLE. */ 00379 #define YYLAST 2 00380 00381 /* YYNTOKENS -- Number of terminals. */ 00382 #define YYNTOKENS 5 00383 /* YYNNTS -- Number of nonterminals. */ 00384 #define YYNNTS 2 00385 /* YYNRULES -- Number of rules. */ 00386 #define YYNRULES 4 00387 /* YYNRULES -- Number of states. */ 00388 #define YYNSTATES 5 00389 00390 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 00391 #define YYUNDEFTOK 2 00392 #define YYMAXUTOK 259 00393 00394 #define YYTRANSLATE(YYX) \ 00395 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 00396 00397 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 00398 static const yytype_uint8 yytranslate[] = 00399 { 00400 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00401 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00402 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00404 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00416 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00417 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00420 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00422 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00425 2, 2, 2, 2, 2, 2, 1, 2, 3, 4 00426 }; 00427 00428 #if YYDEBUG 00429 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 00430 YYRHS. */ 00431 static const yytype_uint8 yyprhs[] = 00432 { 00433 0, 0, 3, 4, 6 00434 }; 00435 00436 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 00437 static const yytype_int8 yyrhs[] = 00438 { 00439 6, 0, -1, -1, 3, -1, 4, -1 00440 }; 00441 00442 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 00443 static const yytype_uint8 yyrline[] = 00444 { 00445 0, 38, 38, 39, 40 00446 }; 00447 #endif 00448 00449 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 00450 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 00451 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 00452 static const char *const yytname[] = 00453 { 00454 "$end", "error", "$undefined", "NUMBER", "WAVEFUNC", "$accept", "exp", 0 00455 }; 00456 #endif 00457 00458 # ifdef YYPRINT 00459 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 00460 token YYLEX-NUM. */ 00461 static const yytype_uint16 yytoknum[] = 00462 { 00463 0, 256, 257, 258, 259 00464 }; 00465 # endif 00466 00467 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 00468 static const yytype_uint8 yyr1[] = 00469 { 00470 0, 5, 6, 6, 6 00471 }; 00472 00473 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 00474 static const yytype_uint8 yyr2[] = 00475 { 00476 0, 2, 0, 1, 1 00477 }; 00478 00479 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 00480 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 00481 means the default is an error. */ 00482 static const yytype_uint8 yydefact[] = 00483 { 00484 2, 3, 4, 0, 1 00485 }; 00486 00487 /* YYDEFGOTO[NTERM-NUM]. */ 00488 static const yytype_int8 yydefgoto[] = 00489 { 00490 -1, 3 00491 }; 00492 00493 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 00494 STATE-NUM. */ 00495 #define YYPACT_NINF -4 00496 static const yytype_int8 yypact[] = 00497 { 00498 -3, -4, -4, 2, -4 00499 }; 00500 00501 /* YYPGOTO[NTERM-NUM]. */ 00502 static const yytype_int8 yypgoto[] = 00503 { 00504 -4, -4 00505 }; 00506 00507 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 00508 positive, shift that token. If negative, reduce the rule which 00509 number is the opposite. If zero, do what YYDEFACT says. 00510 If YYTABLE_NINF, syntax error. */ 00511 #define YYTABLE_NINF -1 00512 static const yytype_uint8 yytable[] = 00513 { 00514 1, 2, 4 00515 }; 00516 00517 static const yytype_uint8 yycheck[] = 00518 { 00519 3, 4, 0 00520 }; 00521 00522 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 00523 symbol of state STATE-NUM. */ 00524 static const yytype_uint8 yystos[] = 00525 { 00526 0, 3, 4, 6, 0 00527 }; 00528 00529 #define yyerrok (yyerrstatus = 0) 00530 #define yyclearin (yychar = YYEMPTY) 00531 #define YYEMPTY (-2) 00532 #define YYEOF 0 00533 00534 #define YYACCEPT goto yyacceptlab 00535 #define YYABORT goto yyabortlab 00536 #define YYERROR goto yyerrorlab 00537 00538 00539 /* Like YYERROR except do call yyerror. This remains here temporarily 00540 to ease the transition to the new meaning of YYERROR, for GCC. 00541 Once GCC version 2 has supplanted version 1, this can go. */ 00542 00543 #define YYFAIL goto yyerrlab 00544 00545 #define YYRECOVERING() (!!yyerrstatus) 00546 00547 #define YYBACKUP(Token, Value) \ 00548 do \ 00549 if (yychar == YYEMPTY && yylen == 1) \ 00550 { \ 00551 yychar = (Token); \ 00552 yylval = (Value); \ 00553 yytoken = YYTRANSLATE (yychar); \ 00554 YYPOPSTACK (1); \ 00555 goto yybackup; \ 00556 } \ 00557 else \ 00558 { \ 00559 yyerror (YY_("syntax error: cannot back up")); \ 00560 YYERROR; \ 00561 } \ 00562 while (YYID (0)) 00563 00564 00565 #define YYTERROR 1 00566 #define YYERRCODE 256 00567 00568 00569 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 00570 If N is 0, then set CURRENT to the empty location which ends 00571 the previous symbol: RHS[0] (always defined). */ 00572 00573 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 00574 #ifndef YYLLOC_DEFAULT 00575 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 00576 do \ 00577 if (YYID (N)) \ 00578 { \ 00579 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 00580 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 00581 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 00582 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 00583 } \ 00584 else \ 00585 { \ 00586 (Current).first_line = (Current).last_line = \ 00587 YYRHSLOC (Rhs, 0).last_line; \ 00588 (Current).first_column = (Current).last_column = \ 00589 YYRHSLOC (Rhs, 0).last_column; \ 00590 } \ 00591 while (YYID (0)) 00592 #endif 00593 00594 00595 /* YY_LOCATION_PRINT -- Print the location on the stream. 00596 This macro was not mandated originally: define only if we know 00597 we won't break user code: when these are the locations we know. */ 00598 00599 #ifndef YY_LOCATION_PRINT 00600 # if YYLTYPE_IS_TRIVIAL 00601 # define YY_LOCATION_PRINT(File, Loc) \ 00602 fprintf (File, "%d.%d-%d.%d", \ 00603 (Loc).first_line, (Loc).first_column, \ 00604 (Loc).last_line, (Loc).last_column) 00605 # else 00606 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 00607 # endif 00608 #endif 00609 00610 00611 /* YYLEX -- calling `yylex' with the right arguments. */ 00612 00613 #ifdef YYLEX_PARAM 00614 # define YYLEX yylex (YYLEX_PARAM) 00615 #else 00616 # define YYLEX yylex () 00617 #endif 00618 00619 /* Enable debugging if requested. */ 00620 #if YYDEBUG 00621 00622 # ifndef YYFPRINTF 00623 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 00624 # define YYFPRINTF fprintf 00625 # endif 00626 00627 # define YYDPRINTF(Args) \ 00628 do { \ 00629 if (yydebug) \ 00630 YYFPRINTF Args; \ 00631 } while (YYID (0)) 00632 00633 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 00634 do { \ 00635 if (yydebug) \ 00636 { \ 00637 YYFPRINTF (stderr, "%s ", Title); \ 00638 yy_symbol_print (stderr, \ 00639 Type, Value); \ 00640 YYFPRINTF (stderr, "\n"); \ 00641 } \ 00642 } while (YYID (0)) 00643 00644 00645 /*--------------------------------. 00646 | Print this symbol on YYOUTPUT. | 00647 `--------------------------------*/ 00648 00649 /*ARGSUSED*/ 00650 #if (defined __STDC__ || defined __C99__FUNC__ \ 00651 || defined __cplusplus || defined _MSC_VER) 00652 static void 00653 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 00654 #else 00655 static void 00656 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 00657 FILE *yyoutput; 00658 int yytype; 00659 YYSTYPE const * const yyvaluep; 00660 #endif 00661 { 00662 if (!yyvaluep) 00663 return; 00664 # ifdef YYPRINT 00665 if (yytype < YYNTOKENS) 00666 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 00667 # else 00668 YYUSE (yyoutput); 00669 # endif 00670 switch (yytype) 00671 { 00672 default: 00673 break; 00674 } 00675 } 00676 00677 00678 /*--------------------------------. 00679 | Print this symbol on YYOUTPUT. | 00680 `--------------------------------*/ 00681 00682 #if (defined __STDC__ || defined __C99__FUNC__ \ 00683 || defined __cplusplus || defined _MSC_VER) 00684 static void 00685 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 00686 #else 00687 static void 00688 yy_symbol_print (yyoutput, yytype, yyvaluep) 00689 FILE *yyoutput; 00690 int yytype; 00691 YYSTYPE const * const yyvaluep; 00692 #endif 00693 { 00694 if (yytype < YYNTOKENS) 00695 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 00696 else 00697 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 00698 00699 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 00700 YYFPRINTF (yyoutput, ")"); 00701 } 00702 00703 /*------------------------------------------------------------------. 00704 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 00705 | TOP (included). | 00706 `------------------------------------------------------------------*/ 00707 00708 #if (defined __STDC__ || defined __C99__FUNC__ \ 00709 || defined __cplusplus || defined _MSC_VER) 00710 static void 00711 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 00712 #else 00713 static void 00714 yy_stack_print (yybottom, yytop) 00715 yytype_int16 *yybottom; 00716 yytype_int16 *yytop; 00717 #endif 00718 { 00719 YYFPRINTF (stderr, "Stack now"); 00720 for (; yybottom <= yytop; yybottom++) 00721 { 00722 int yybot = *yybottom; 00723 YYFPRINTF (stderr, " %d", yybot); 00724 } 00725 YYFPRINTF (stderr, "\n"); 00726 } 00727 00728 # define YY_STACK_PRINT(Bottom, Top) \ 00729 do { \ 00730 if (yydebug) \ 00731 yy_stack_print ((Bottom), (Top)); \ 00732 } while (YYID (0)) 00733 00734 00735 /*------------------------------------------------. 00736 | Report that the YYRULE is going to be reduced. | 00737 `------------------------------------------------*/ 00738 00739 #if (defined __STDC__ || defined __C99__FUNC__ \ 00740 || defined __cplusplus || defined _MSC_VER) 00741 static void 00742 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 00743 #else 00744 static void 00745 yy_reduce_print (yyvsp, yyrule) 00746 YYSTYPE *yyvsp; 00747 int yyrule; 00748 #endif 00749 { 00750 int yynrhs = yyr2[yyrule]; 00751 int yyi; 00752 unsigned long int yylno = yyrline[yyrule]; 00753 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 00754 yyrule - 1, yylno); 00755 /* The symbols being reduced. */ 00756 for (yyi = 0; yyi < yynrhs; yyi++) 00757 { 00758 YYFPRINTF (stderr, " $%d = ", yyi + 1); 00759 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 00760 &(yyvsp[(yyi + 1) - (yynrhs)]) 00761 ); 00762 YYFPRINTF (stderr, "\n"); 00763 } 00764 } 00765 00766 # define YY_REDUCE_PRINT(Rule) \ 00767 do { \ 00768 if (yydebug) \ 00769 yy_reduce_print (yyvsp, Rule); \ 00770 } while (YYID (0)) 00771 00772 /* Nonzero means print parse trace. It is left uninitialized so that 00773 multiple parsers can coexist. */ 00774 int yydebug; 00775 #else /* !YYDEBUG */ 00776 # define YYDPRINTF(Args) 00777 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 00778 # define YY_STACK_PRINT(Bottom, Top) 00779 # define YY_REDUCE_PRINT(Rule) 00780 #endif /* !YYDEBUG */ 00781 00782 00783 /* YYINITDEPTH -- initial size of the parser's stacks. */ 00784 #ifndef YYINITDEPTH 00785 # define YYINITDEPTH 200 00786 #endif 00787 00788 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 00789 if the built-in stack extension method is used). 00790 00791 Do not make this value too large; the results are undefined if 00792 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 00793 evaluated with infinite-precision integer arithmetic. */ 00794 00795 #ifndef YYMAXDEPTH 00796 # define YYMAXDEPTH 10000 00797 #endif 00798 00799 00800 00801 #if YYERROR_VERBOSE 00802 00803 # ifndef yystrlen 00804 # if defined __GLIBC__ && defined _STRING_H 00805 # define yystrlen strlen 00806 # else 00807 /* Return the length of YYSTR. */ 00808 #if (defined __STDC__ || defined __C99__FUNC__ \ 00809 || defined __cplusplus || defined _MSC_VER) 00810 static YYSIZE_T 00811 yystrlen (const char *yystr) 00812 #else 00813 static YYSIZE_T 00814 yystrlen (yystr) 00815 const char *yystr; 00816 #endif 00817 { 00818 YYSIZE_T yylen; 00819 for (yylen = 0; yystr[yylen]; yylen++) 00820 continue; 00821 return yylen; 00822 } 00823 # endif 00824 # endif 00825 00826 # ifndef yystpcpy 00827 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 00828 # define yystpcpy stpcpy 00829 # else 00830 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 00831 YYDEST. */ 00832 #if (defined __STDC__ || defined __C99__FUNC__ \ 00833 || defined __cplusplus || defined _MSC_VER) 00834 static char * 00835 yystpcpy (char *yydest, const char *yysrc) 00836 #else 00837 static char * 00838 yystpcpy (yydest, yysrc) 00839 char *yydest; 00840 const char *yysrc; 00841 #endif 00842 { 00843 char *yyd = yydest; 00844 const char *yys = yysrc; 00845 00846 while ((*yyd++ = *yys++) != '\0') 00847 continue; 00848 00849 return yyd - 1; 00850 } 00851 # endif 00852 # endif 00853 00854 # ifndef yytnamerr 00855 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 00856 quotes and backslashes, so that it's suitable for yyerror. The 00857 heuristic is that double-quoting is unnecessary unless the string 00858 contains an apostrophe, a comma, or backslash (other than 00859 backslash-backslash). YYSTR is taken from yytname. If YYRES is 00860 null, do not copy; instead, return the length of what the result 00861 would have been. */ 00862 static YYSIZE_T 00863 yytnamerr (char *yyres, const char *yystr) 00864 { 00865 if (*yystr == '"') 00866 { 00867 YYSIZE_T yyn = 0; 00868 char const *yyp = yystr; 00869 00870 for (;;) 00871 switch (*++yyp) 00872 { 00873 case '\'': 00874 case ',': 00875 goto do_not_strip_quotes; 00876 00877 case '\\': 00878 if (*++yyp != '\\') 00879 goto do_not_strip_quotes; 00880 /* Fall through. */ 00881 default: 00882 if (yyres) 00883 yyres[yyn] = *yyp; 00884 yyn++; 00885 break; 00886 00887 case '"': 00888 if (yyres) 00889 yyres[yyn] = '\0'; 00890 return yyn; 00891 } 00892 do_not_strip_quotes: ; 00893 } 00894 00895 if (! yyres) 00896 return yystrlen (yystr); 00897 00898 return yystpcpy (yyres, yystr) - yyres; 00899 } 00900 # endif 00901 00902 /* Copy into YYRESULT an error message about the unexpected token 00903 YYCHAR while in state YYSTATE. Return the number of bytes copied, 00904 including the terminating null byte. If YYRESULT is null, do not 00905 copy anything; just return the number of bytes that would be 00906 copied. As a special case, return 0 if an ordinary "syntax error" 00907 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 00908 size calculation. */ 00909 static YYSIZE_T 00910 yysyntax_error (char *yyresult, int yystate, int yychar) 00911 { 00912 int yyn = yypact[yystate]; 00913 00914 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 00915 return 0; 00916 else 00917 { 00918 int yytype = YYTRANSLATE (yychar); 00919 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 00920 YYSIZE_T yysize = yysize0; 00921 YYSIZE_T yysize1; 00922 int yysize_overflow = 0; 00923 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 00924 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 00925 int yyx; 00926 00927 # if 0 00928 /* This is so xgettext sees the translatable formats that are 00929 constructed on the fly. */ 00930 YY_("syntax error, unexpected %s"); 00931 YY_("syntax error, unexpected %s, expecting %s"); 00932 YY_("syntax error, unexpected %s, expecting %s or %s"); 00933 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 00934 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 00935 # endif 00936 char *yyfmt; 00937 char const *yyf; 00938 static char const yyunexpected[] = "syntax error, unexpected %s"; 00939 static char const yyexpecting[] = ", expecting %s"; 00940 static char const yyor[] = " or %s"; 00941 char yyformat[sizeof yyunexpected 00942 + sizeof yyexpecting - 1 00943 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 00944 * (sizeof yyor - 1))]; 00945 char const *yyprefix = yyexpecting; 00946 00947 /* Start YYX at -YYN if negative to avoid negative indexes in 00948 YYCHECK. */ 00949 int yyxbegin = yyn < 0 ? -yyn : 0; 00950 00951 /* Stay within bounds of both yycheck and yytname. */ 00952 int yychecklim = YYLAST - yyn + 1; 00953 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 00954 int yycount = 1; 00955 00956 yyarg[0] = yytname[yytype]; 00957 yyfmt = yystpcpy (yyformat, yyunexpected); 00958 00959 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 00960 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 00961 { 00962 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 00963 { 00964 yycount = 1; 00965 yysize = yysize0; 00966 yyformat[sizeof yyunexpected - 1] = '\0'; 00967 break; 00968 } 00969 yyarg[yycount++] = yytname[yyx]; 00970 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 00971 yysize_overflow |= (yysize1 < yysize); 00972 yysize = yysize1; 00973 yyfmt = yystpcpy (yyfmt, yyprefix); 00974 yyprefix = yyor; 00975 } 00976 00977 yyf = YY_(yyformat); 00978 yysize1 = yysize + yystrlen (yyf); 00979 yysize_overflow |= (yysize1 < yysize); 00980 yysize = yysize1; 00981 00982 if (yysize_overflow) 00983 return YYSIZE_MAXIMUM; 00984 00985 if (yyresult) 00986 { 00987 /* Avoid sprintf, as that infringes on the user's name space. 00988 Don't have undefined behavior even if the translation 00989 produced a string with the wrong number of "%s"s. */ 00990 char *yyp = yyresult; 00991 int yyi = 0; 00992 while ((*yyp = *yyf) != '\0') 00993 { 00994 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 00995 { 00996 yyp += yytnamerr (yyp, yyarg[yyi++]); 00997 yyf += 2; 00998 } 00999 else 01000 { 01001 yyp++; 01002 yyf++; 01003 } 01004 } 01005 } 01006 return yysize; 01007 } 01008 } 01009 #endif /* YYERROR_VERBOSE */ 01010 01011 01012 /*-----------------------------------------------. 01013 | Release the memory associated to this symbol. | 01014 `-----------------------------------------------*/ 01015 01016 /*ARGSUSED*/ 01017 #if (defined __STDC__ || defined __C99__FUNC__ \ 01018 || defined __cplusplus || defined _MSC_VER) 01019 static void 01020 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 01021 #else 01022 static void 01023 yydestruct (yymsg, yytype, yyvaluep) 01024 const char *yymsg; 01025 int yytype; 01026 YYSTYPE *yyvaluep; 01027 #endif 01028 { 01029 YYUSE (yyvaluep); 01030 01031 if (!yymsg) 01032 yymsg = "Deleting"; 01033 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 01034 01035 switch (yytype) 01036 { 01037 01038 default: 01039 break; 01040 } 01041 } 01042 01043 /* Prevent warnings from -Wmissing-prototypes. */ 01044 #ifdef YYPARSE_PARAM 01045 #if defined __STDC__ || defined __cplusplus 01046 int yyparse (void *YYPARSE_PARAM); 01047 #else 01048 int yyparse (); 01049 #endif 01050 #else /* ! YYPARSE_PARAM */ 01051 #if defined __STDC__ || defined __cplusplus 01052 int yyparse (void); 01053 #else 01054 int yyparse (); 01055 #endif 01056 #endif /* ! YYPARSE_PARAM */ 01057 01058 01059 /* The lookahead symbol. */ 01060 int yychar; 01061 01062 /* The semantic value of the lookahead symbol. */ 01063 YYSTYPE yylval; 01064 01065 /* Number of syntax errors so far. */ 01066 int yynerrs; 01067 01068 01069 01070 /*-------------------------. 01071 | yyparse or yypush_parse. | 01072 `-------------------------*/ 01073 01074 #ifdef YYPARSE_PARAM 01075 #if (defined __STDC__ || defined __C99__FUNC__ \ 01076 || defined __cplusplus || defined _MSC_VER) 01077 int 01078 yyparse (void *YYPARSE_PARAM) 01079 #else 01080 int 01081 yyparse (YYPARSE_PARAM) 01082 void *YYPARSE_PARAM; 01083 #endif 01084 #else /* ! YYPARSE_PARAM */ 01085 #if (defined __STDC__ || defined __C99__FUNC__ \ 01086 || defined __cplusplus || defined _MSC_VER) 01087 int 01088 yyparse (void) 01089 #else 01090 int 01091 yyparse () 01092 01093 #endif 01094 #endif 01095 { 01096 01097 01098 int yystate; 01099 /* Number of tokens to shift before error messages enabled. */ 01100 int yyerrstatus; 01101 01102 /* The stacks and their tools: 01103 `yyss': related to states. 01104 `yyvs': related to semantic values. 01105 01106 Refer to the stacks thru separate pointers, to allow yyoverflow 01107 to reallocate them elsewhere. */ 01108 01109 /* The state stack. */ 01110 yytype_int16 yyssa[YYINITDEPTH]; 01111 yytype_int16 *yyss; 01112 yytype_int16 *yyssp; 01113 01114 /* The semantic value stack. */ 01115 YYSTYPE yyvsa[YYINITDEPTH]; 01116 YYSTYPE *yyvs; 01117 YYSTYPE *yyvsp; 01118 01119 YYSIZE_T yystacksize; 01120 01121 int yyn; 01122 int yyresult; 01123 /* Lookahead token as an internal (translated) token number. */ 01124 int yytoken; 01125 /* The variables used to return semantic value and location from the 01126 action routines. */ 01127 YYSTYPE yyval; 01128 01129 #if YYERROR_VERBOSE 01130 /* Buffer for error messages, and its allocated size. */ 01131 char yymsgbuf[128]; 01132 char *yymsg = yymsgbuf; 01133 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 01134 #endif 01135 01136 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 01137 01138 /* The number of symbols on the RHS of the reduced rule. 01139 Keep to zero when no symbol should be popped. */ 01140 int yylen = 0; 01141 01142 yytoken = 0; 01143 yyss = yyssa; 01144 yyvs = yyvsa; 01145 yystacksize = YYINITDEPTH; 01146 01147 YYDPRINTF ((stderr, "Starting parse\n")); 01148 01149 yystate = 0; 01150 yyerrstatus = 0; 01151 yynerrs = 0; 01152 yychar = YYEMPTY; /* Cause a token to be read. */ 01153 01154 /* Initialize stack pointers. 01155 Waste one element of value and location stack 01156 so that they stay on the same level as the state stack. 01157 The wasted elements are never initialized. */ 01158 yyssp = yyss; 01159 yyvsp = yyvs; 01160 01161 goto yysetstate; 01162 01163 /*------------------------------------------------------------. 01164 | yynewstate -- Push a new state, which is found in yystate. | 01165 `------------------------------------------------------------*/ 01166 yynewstate: 01167 /* In all cases, when you get here, the value and location stacks 01168 have just been pushed. So pushing a state here evens the stacks. */ 01169 yyssp++; 01170 01171 yysetstate: 01172 *yyssp = yystate; 01173 01174 if (yyss + yystacksize - 1 <= yyssp) 01175 { 01176 /* Get the current used size of the three stacks, in elements. */ 01177 YYSIZE_T yysize = yyssp - yyss + 1; 01178 01179 #ifdef yyoverflow 01180 { 01181 /* Give user a chance to reallocate the stack. Use copies of 01182 these so that the &'s don't force the real ones into 01183 memory. */ 01184 YYSTYPE *yyvs1 = yyvs; 01185 yytype_int16 *yyss1 = yyss; 01186 01187 /* Each stack pointer address is followed by the size of the 01188 data in use in that stack, in bytes. This used to be a 01189 conditional around just the two extra args, but that might 01190 be undefined if yyoverflow is a macro. */ 01191 yyoverflow (YY_("memory exhausted"), 01192 &yyss1, yysize * sizeof (*yyssp), 01193 &yyvs1, yysize * sizeof (*yyvsp), 01194 &yystacksize); 01195 01196 yyss = yyss1; 01197 yyvs = yyvs1; 01198 } 01199 #else /* no yyoverflow */ 01200 # ifndef YYSTACK_RELOCATE 01201 goto yyexhaustedlab; 01202 # else 01203 /* Extend the stack our own way. */ 01204 if (YYMAXDEPTH <= yystacksize) 01205 goto yyexhaustedlab; 01206 yystacksize *= 2; 01207 if (YYMAXDEPTH < yystacksize) 01208 yystacksize = YYMAXDEPTH; 01209 01210 { 01211 yytype_int16 *yyss1 = yyss; 01212 union yyalloc *yyptr = 01213 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 01214 if (! yyptr) 01215 goto yyexhaustedlab; 01216 YYSTACK_RELOCATE (yyss_alloc, yyss); 01217 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 01218 # undef YYSTACK_RELOCATE 01219 if (yyss1 != yyssa) 01220 YYSTACK_FREE (yyss1); 01221 } 01222 # endif 01223 #endif /* no yyoverflow */ 01224 01225 yyssp = yyss + yysize - 1; 01226 yyvsp = yyvs + yysize - 1; 01227 01228 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 01229 (unsigned long int) yystacksize)); 01230 01231 if (yyss + yystacksize - 1 <= yyssp) 01232 YYABORT; 01233 } 01234 01235 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 01236 01237 if (yystate == YYFINAL) 01238 YYACCEPT; 01239 01240 goto yybackup; 01241 01242 /*-----------. 01243 | yybackup. | 01244 `-----------*/ 01245 yybackup: 01246 01247 /* Do appropriate processing given the current state. Read a 01248 lookahead token if we need one and don't already have one. */ 01249 01250 /* First try to decide what to do without reference to lookahead token. */ 01251 yyn = yypact[yystate]; 01252 if (yyn == YYPACT_NINF) 01253 goto yydefault; 01254 01255 /* Not known => get a lookahead token if don't already have one. */ 01256 01257 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 01258 if (yychar == YYEMPTY) 01259 { 01260 YYDPRINTF ((stderr, "Reading a token: ")); 01261 yychar = YYLEX; 01262 } 01263 01264 if (yychar <= YYEOF) 01265 { 01266 yychar = yytoken = YYEOF; 01267 YYDPRINTF ((stderr, "Now at end of input.\n")); 01268 } 01269 else 01270 { 01271 yytoken = YYTRANSLATE (yychar); 01272 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 01273 } 01274 01275 /* If the proper action on seeing token YYTOKEN is to reduce or to 01276 detect an error, take that action. */ 01277 yyn += yytoken; 01278 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 01279 goto yydefault; 01280 yyn = yytable[yyn]; 01281 if (yyn <= 0) 01282 { 01283 if (yyn == 0 || yyn == YYTABLE_NINF) 01284 goto yyerrlab; 01285 yyn = -yyn; 01286 goto yyreduce; 01287 } 01288 01289 /* Count tokens shifted since error; after three, turn off error 01290 status. */ 01291 if (yyerrstatus) 01292 yyerrstatus--; 01293 01294 /* Shift the lookahead token. */ 01295 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 01296 01297 /* Discard the shifted token. */ 01298 yychar = YYEMPTY; 01299 01300 yystate = yyn; 01301 *++yyvsp = yylval; 01302 01303 goto yynewstate; 01304 01305 01306 /*-----------------------------------------------------------. 01307 | yydefault -- do the default action for the current state. | 01308 `-----------------------------------------------------------*/ 01309 yydefault: 01310 yyn = yydefact[yystate]; 01311 if (yyn == 0) 01312 goto yyerrlab; 01313 goto yyreduce; 01314 01315 01316 /*-----------------------------. 01317 | yyreduce -- Do a reduction. | 01318 `-----------------------------*/ 01319 yyreduce: 01320 /* yyn is the number of a rule to reduce with. */ 01321 yylen = yyr2[yyn]; 01322 01323 /* If YYLEN is nonzero, implement the default value of the action: 01324 `$$ = $1'. 01325 01326 Otherwise, the following line sets YYVAL to garbage. 01327 This behavior is undocumented and Bison 01328 users should not rely upon it. Assigning to YYVAL 01329 unconditionally makes the parser a bit smaller, and it avoids a 01330 GCC warning that YYVAL may be used uninitialized. */ 01331 yyval = yyvsp[1-yylen]; 01332 01333 01334 YY_REDUCE_PRINT (yyn); 01335 switch (yyn) 01336 { 01337 case 2: 01338 01339 /* Line 1455 of yacc.c */ 01340 #line 38 "getChainPotential_parser.y" 01341 {} 01342 break; 01343 01344 case 3: 01345 01346 /* Line 1455 of yacc.c */ 01347 #line 39 "getChainPotential_parser.y" 01348 {(yyval.d) = (yyvsp[(1) - (1)].d);} 01349 break; 01350 01351 case 4: 01352 01353 /* Line 1455 of yacc.c */ 01354 #line 40 "getChainPotential_parser.y" 01355 {(yyval.d) = 0;} 01356 break; 01357 01358 01359 01360 /* Line 1455 of yacc.c */ 01361 #line 1362 "src/getChainPotential_parser.c" 01362 default: break; 01363 } 01364 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 01365 01366 YYPOPSTACK (yylen); 01367 yylen = 0; 01368 YY_STACK_PRINT (yyss, yyssp); 01369 01370 *++yyvsp = yyval; 01371 01372 /* Now `shift' the result of the reduction. Determine what state 01373 that goes to, based on the state we popped back to and the rule 01374 number reduced by. */ 01375 01376 yyn = yyr1[yyn]; 01377 01378 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 01379 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 01380 yystate = yytable[yystate]; 01381 else 01382 yystate = yydefgoto[yyn - YYNTOKENS]; 01383 01384 goto yynewstate; 01385 01386 01387 /*------------------------------------. 01388 | yyerrlab -- here on detecting error | 01389 `------------------------------------*/ 01390 yyerrlab: 01391 /* If not already recovering from an error, report this error. */ 01392 if (!yyerrstatus) 01393 { 01394 ++yynerrs; 01395 #if ! YYERROR_VERBOSE 01396 yyerror (YY_("syntax error")); 01397 #else 01398 { 01399 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 01400 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 01401 { 01402 YYSIZE_T yyalloc = 2 * yysize; 01403 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 01404 yyalloc = YYSTACK_ALLOC_MAXIMUM; 01405 if (yymsg != yymsgbuf) 01406 YYSTACK_FREE (yymsg); 01407 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 01408 if (yymsg) 01409 yymsg_alloc = yyalloc; 01410 else 01411 { 01412 yymsg = yymsgbuf; 01413 yymsg_alloc = sizeof yymsgbuf; 01414 } 01415 } 01416 01417 if (0 < yysize && yysize <= yymsg_alloc) 01418 { 01419 (void) yysyntax_error (yymsg, yystate, yychar); 01420 yyerror (yymsg); 01421 } 01422 else 01423 { 01424 yyerror (YY_("syntax error")); 01425 if (yysize != 0) 01426 goto yyexhaustedlab; 01427 } 01428 } 01429 #endif 01430 } 01431 01432 01433 01434 if (yyerrstatus == 3) 01435 { 01436 /* If just tried and failed to reuse lookahead token after an 01437 error, discard it. */ 01438 01439 if (yychar <= YYEOF) 01440 { 01441 /* Return failure if at end of input. */ 01442 if (yychar == YYEOF) 01443 YYABORT; 01444 } 01445 else 01446 { 01447 yydestruct ("Error: discarding", 01448 yytoken, &yylval); 01449 yychar = YYEMPTY; 01450 } 01451 } 01452 01453 /* Else will try to reuse lookahead token after shifting the error 01454 token. */ 01455 goto yyerrlab1; 01456 01457 01458 /*---------------------------------------------------. 01459 | yyerrorlab -- error raised explicitly by YYERROR. | 01460 `---------------------------------------------------*/ 01461 yyerrorlab: 01462 01463 /* Pacify compilers like GCC when the user code never invokes 01464 YYERROR and the label yyerrorlab therefore never appears in user 01465 code. */ 01466 if (/*CONSTCOND*/ 0) 01467 goto yyerrorlab; 01468 01469 /* Do not reclaim the symbols of the rule which action triggered 01470 this YYERROR. */ 01471 YYPOPSTACK (yylen); 01472 yylen = 0; 01473 YY_STACK_PRINT (yyss, yyssp); 01474 yystate = *yyssp; 01475 goto yyerrlab1; 01476 01477 01478 /*-------------------------------------------------------------. 01479 | yyerrlab1 -- common code for both syntax error and YYERROR. | 01480 `-------------------------------------------------------------*/ 01481 yyerrlab1: 01482 yyerrstatus = 3; /* Each real token shifted decrements this. */ 01483 01484 for (;;) 01485 { 01486 yyn = yypact[yystate]; 01487 if (yyn != YYPACT_NINF) 01488 { 01489 yyn += YYTERROR; 01490 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 01491 { 01492 yyn = yytable[yyn]; 01493 if (0 < yyn) 01494 break; 01495 } 01496 } 01497 01498 /* Pop the current state because it cannot handle the error token. */ 01499 if (yyssp == yyss) 01500 YYABORT; 01501 01502 01503 yydestruct ("Error: popping", 01504 yystos[yystate], yyvsp); 01505 YYPOPSTACK (1); 01506 yystate = *yyssp; 01507 YY_STACK_PRINT (yyss, yyssp); 01508 } 01509 01510 *++yyvsp = yylval; 01511 01512 01513 /* Shift the error token. */ 01514 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 01515 01516 yystate = yyn; 01517 goto yynewstate; 01518 01519 01520 /*-------------------------------------. 01521 | yyacceptlab -- YYACCEPT comes here. | 01522 `-------------------------------------*/ 01523 yyacceptlab: 01524 yyresult = 0; 01525 goto yyreturn; 01526 01527 /*-----------------------------------. 01528 | yyabortlab -- YYABORT comes here. | 01529 `-----------------------------------*/ 01530 yyabortlab: 01531 yyresult = 1; 01532 goto yyreturn; 01533 01534 #if !defined(yyoverflow) || YYERROR_VERBOSE 01535 /*-------------------------------------------------. 01536 | yyexhaustedlab -- memory exhaustion comes here. | 01537 `-------------------------------------------------*/ 01538 yyexhaustedlab: 01539 yyerror (YY_("memory exhausted")); 01540 yyresult = 2; 01541 /* Fall through. */ 01542 #endif 01543 01544 yyreturn: 01545 if (yychar != YYEMPTY) 01546 yydestruct ("Cleanup: discarding lookahead", 01547 yytoken, &yylval); 01548 /* Do not reclaim the symbols of the rule which action triggered 01549 this YYABORT or YYACCEPT. */ 01550 YYPOPSTACK (yylen); 01551 YY_STACK_PRINT (yyss, yyssp); 01552 while (yyssp != yyss) 01553 { 01554 yydestruct ("Cleanup: popping", 01555 yystos[*yyssp], yyvsp); 01556 YYPOPSTACK (1); 01557 } 01558 #ifndef yyoverflow 01559 if (yyss != yyssa) 01560 YYSTACK_FREE (yyss); 01561 #endif 01562 #if YYERROR_VERBOSE 01563 if (yymsg != yymsgbuf) 01564 YYSTACK_FREE (yymsg); 01565 #endif 01566 /* Make sure YYID is used. */ 01567 return YYID (yyresult); 01568 } 01569 01570 01571 01572 /* Line 1675 of yacc.c */ 01573 #line 41 "getChainPotential_parser.y" 01574 01575 void yyerror(const char* c) { 01576 fprintf(stderr, "Error in parser: %s\n", c); 01577 exit(15); 01578 } 01579