1 | /* A Bison parser, made by GNU Bison 2.7. */ |
---|
2 | |
---|
3 | /* Bison implementation for Yacc-like parsers in C |
---|
4 | |
---|
5 | Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. |
---|
6 | |
---|
7 | This program is free software: you can redistribute it and/or modify |
---|
8 | it under the terms of the GNU General Public License as published by |
---|
9 | the Free Software Foundation, either version 3 of the License, or |
---|
10 | (at your option) any later version. |
---|
11 | |
---|
12 | This program is distributed in the hope that it will be useful, |
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | GNU General Public License for more details. |
---|
16 | |
---|
17 | You should have received a copy of the GNU General Public License |
---|
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
---|
19 | |
---|
20 | /* As a special exception, you may create a larger work that contains |
---|
21 | part or all of the Bison parser skeleton and distribute that work |
---|
22 | under terms of your choice, so long as that work isn't itself a |
---|
23 | parser generator using the skeleton or a modified version thereof |
---|
24 | as a parser skeleton. Alternatively, if you modify or redistribute |
---|
25 | the parser skeleton itself, you may (at your option) remove this |
---|
26 | special exception, which will cause the skeleton and the resulting |
---|
27 | Bison output files to be licensed under the GNU General Public |
---|
28 | License without this special exception. |
---|
29 | |
---|
30 | This special exception was added by the Free Software Foundation in |
---|
31 | version 2.2 of Bison. */ |
---|
32 | |
---|
33 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
---|
34 | simplifying the original so-called "semantic" parser. */ |
---|
35 | |
---|
36 | /* All symbols defined below should begin with yy or YY, to avoid |
---|
37 | infringing on user name space. This should be done even for local |
---|
38 | variables, as they might otherwise be expanded by user macros. |
---|
39 | There are some unavoidable exceptions within include files to |
---|
40 | define necessary library symbols; they are noted "INFRINGES ON |
---|
41 | USER NAME SPACE" below. */ |
---|
42 | |
---|
43 | /* Identify Bison output. */ |
---|
44 | #define YYBISON 1 |
---|
45 | |
---|
46 | /* Bison version. */ |
---|
47 | #define YYBISON_VERSION "2.7" |
---|
48 | |
---|
49 | /* Skeleton name. */ |
---|
50 | #define YYSKELETON_NAME "yacc.c" |
---|
51 | |
---|
52 | /* Pure parsers. */ |
---|
53 | #define YYPURE 0 |
---|
54 | |
---|
55 | /* Push parsers. */ |
---|
56 | #define YYPUSH 0 |
---|
57 | |
---|
58 | /* Pull parsers. */ |
---|
59 | #define YYPULL 1 |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | /* Copy the first part of user declarations. */ |
---|
65 | /* Line 371 of yacc.c */ |
---|
66 | #line 37 "scan.y" |
---|
67 | |
---|
68 | #include <stdio.h> |
---|
69 | #include <stdlib.h> |
---|
70 | #include <malloc.h> |
---|
71 | #include <string.h> |
---|
72 | #include <unistd.h> |
---|
73 | #include "scan.h" |
---|
74 | |
---|
75 | #define __YYSCLASS |
---|
76 | |
---|
77 | #define YYDEBUG 1 |
---|
78 | extern char yytext[]; |
---|
79 | extern FILE * yyin; |
---|
80 | |
---|
81 | int nError = 0; |
---|
82 | int nWarning = 0; |
---|
83 | |
---|
84 | int crt_section; |
---|
85 | int eqState; |
---|
86 | int isPhoto = 0; |
---|
87 | |
---|
88 | char crt_term[ 30 ]; |
---|
89 | char crt_coef[ 30 ]; |
---|
90 | |
---|
91 | char * InlineBuf; |
---|
92 | int InlineLen; |
---|
93 | |
---|
94 | void SemicolonError(); |
---|
95 | int yyerrflag=0; |
---|
96 | |
---|
97 | void ParserErrorMessage(); |
---|
98 | void yyerror(char *); |
---|
99 | |
---|
100 | |
---|
101 | /* Line 371 of yacc.c */ |
---|
102 | #line 103 "y.tab.c" |
---|
103 | |
---|
104 | # ifndef YY_NULL |
---|
105 | # if defined __cplusplus && 201103L <= __cplusplus |
---|
106 | # define YY_NULL nullptr |
---|
107 | # else |
---|
108 | # define YY_NULL 0 |
---|
109 | # endif |
---|
110 | # endif |
---|
111 | |
---|
112 | /* Enabling verbose error messages. */ |
---|
113 | #ifdef YYERROR_VERBOSE |
---|
114 | # undef YYERROR_VERBOSE |
---|
115 | # define YYERROR_VERBOSE 1 |
---|
116 | #else |
---|
117 | # define YYERROR_VERBOSE 0 |
---|
118 | #endif |
---|
119 | |
---|
120 | /* In a future release of Bison, this section will be replaced |
---|
121 | by #include "y.tab.h". */ |
---|
122 | #ifndef YY_YY_Y_TAB_H_INCLUDED |
---|
123 | # define YY_YY_Y_TAB_H_INCLUDED |
---|
124 | /* Enabling traces. */ |
---|
125 | #ifndef YYDEBUG |
---|
126 | # define YYDEBUG 0 |
---|
127 | #endif |
---|
128 | #if YYDEBUG |
---|
129 | extern int yydebug; |
---|
130 | #endif |
---|
131 | |
---|
132 | /* Tokens. */ |
---|
133 | #ifndef YYTOKENTYPE |
---|
134 | # define YYTOKENTYPE |
---|
135 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
---|
136 | know about them. */ |
---|
137 | enum yytokentype { |
---|
138 | JACOBIAN = 258, |
---|
139 | DOUBLE = 259, |
---|
140 | FUNCTION = 260, |
---|
141 | DEFVAR = 261, |
---|
142 | DEFRAD = 262, |
---|
143 | DEFFIX = 263, |
---|
144 | SETVAR = 264, |
---|
145 | SETRAD = 265, |
---|
146 | SETFIX = 266, |
---|
147 | HESSIAN = 267, |
---|
148 | STOICMAT = 268, |
---|
149 | STOCHASTIC = 269, |
---|
150 | DECLARE = 270, |
---|
151 | INITVALUES = 271, |
---|
152 | EQUATIONS = 272, |
---|
153 | LUMP = 273, |
---|
154 | INIEQUAL = 274, |
---|
155 | EQNEQUAL = 275, |
---|
156 | EQNCOLON = 276, |
---|
157 | LMPCOLON = 277, |
---|
158 | LMPPLUS = 278, |
---|
159 | SPCPLUS = 279, |
---|
160 | SPCEQUAL = 280, |
---|
161 | ATOMDECL = 281, |
---|
162 | CHECK = 282, |
---|
163 | CHECKALL = 283, |
---|
164 | REORDER = 284, |
---|
165 | MEX = 285, |
---|
166 | DUMMYINDEX = 286, |
---|
167 | EQNTAGS = 287, |
---|
168 | LOOKAT = 288, |
---|
169 | LOOKATALL = 289, |
---|
170 | TRANSPORT = 290, |
---|
171 | TRANSPORTALL = 291, |
---|
172 | MONITOR = 292, |
---|
173 | USES = 293, |
---|
174 | SPARSEDATA = 294, |
---|
175 | WRITE_ATM = 295, |
---|
176 | WRITE_SPC = 296, |
---|
177 | WRITE_MAT = 297, |
---|
178 | WRITE_OPT = 298, |
---|
179 | INITIALIZE = 299, |
---|
180 | XGRID = 300, |
---|
181 | YGRID = 301, |
---|
182 | ZGRID = 302, |
---|
183 | USE = 303, |
---|
184 | LANGUAGE = 304, |
---|
185 | INTFILE = 305, |
---|
186 | DRIVER = 306, |
---|
187 | RUN = 307, |
---|
188 | INLINE = 308, |
---|
189 | ENDINLINE = 309, |
---|
190 | PARAMETER = 310, |
---|
191 | SPCSPC = 311, |
---|
192 | INISPC = 312, |
---|
193 | INIVALUE = 313, |
---|
194 | EQNSPC = 314, |
---|
195 | EQNSIGN = 315, |
---|
196 | EQNCOEF = 316, |
---|
197 | RATE = 317, |
---|
198 | LMPSPC = 318, |
---|
199 | SPCNR = 319, |
---|
200 | ATOMID = 320, |
---|
201 | LKTID = 321, |
---|
202 | MNIID = 322, |
---|
203 | INLCTX = 323, |
---|
204 | INCODE = 324, |
---|
205 | SSPID = 325, |
---|
206 | EQNLESS = 326, |
---|
207 | EQNTAG = 327, |
---|
208 | EQNGREATER = 328, |
---|
209 | TPTID = 329, |
---|
210 | USEID = 330 |
---|
211 | }; |
---|
212 | #endif |
---|
213 | |
---|
214 | |
---|
215 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
---|
216 | typedef union YYSTYPE |
---|
217 | { |
---|
218 | /* Line 387 of yacc.c */ |
---|
219 | #line 72 "scan.y" |
---|
220 | |
---|
221 | char str[80]; |
---|
222 | |
---|
223 | |
---|
224 | /* Line 387 of yacc.c */ |
---|
225 | #line 226 "y.tab.c" |
---|
226 | } YYSTYPE; |
---|
227 | # define YYSTYPE_IS_TRIVIAL 1 |
---|
228 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
---|
229 | # define YYSTYPE_IS_DECLARED 1 |
---|
230 | #endif |
---|
231 | |
---|
232 | extern YYSTYPE yylval; |
---|
233 | |
---|
234 | #ifdef YYPARSE_PARAM |
---|
235 | #if defined __STDC__ || defined __cplusplus |
---|
236 | int yyparse (void *YYPARSE_PARAM); |
---|
237 | #else |
---|
238 | int yyparse (); |
---|
239 | #endif |
---|
240 | #else /* ! YYPARSE_PARAM */ |
---|
241 | #if defined __STDC__ || defined __cplusplus |
---|
242 | int yyparse (void); |
---|
243 | #else |
---|
244 | int yyparse (); |
---|
245 | #endif |
---|
246 | #endif /* ! YYPARSE_PARAM */ |
---|
247 | |
---|
248 | #endif /* !YY_YY_Y_TAB_H_INCLUDED */ |
---|
249 | |
---|
250 | /* Copy the second part of user declarations. */ |
---|
251 | |
---|
252 | /* Line 390 of yacc.c */ |
---|
253 | #line 254 "y.tab.c" |
---|
254 | |
---|
255 | #ifdef short |
---|
256 | # undef short |
---|
257 | #endif |
---|
258 | |
---|
259 | #ifdef YYTYPE_UINT8 |
---|
260 | typedef YYTYPE_UINT8 yytype_uint8; |
---|
261 | #else |
---|
262 | typedef unsigned char yytype_uint8; |
---|
263 | #endif |
---|
264 | |
---|
265 | #ifdef YYTYPE_INT8 |
---|
266 | typedef YYTYPE_INT8 yytype_int8; |
---|
267 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
---|
268 | || defined __cplusplus || defined _MSC_VER) |
---|
269 | typedef signed char yytype_int8; |
---|
270 | #else |
---|
271 | typedef short int yytype_int8; |
---|
272 | #endif |
---|
273 | |
---|
274 | #ifdef YYTYPE_UINT16 |
---|
275 | typedef YYTYPE_UINT16 yytype_uint16; |
---|
276 | #else |
---|
277 | typedef unsigned short int yytype_uint16; |
---|
278 | #endif |
---|
279 | |
---|
280 | #ifdef YYTYPE_INT16 |
---|
281 | typedef YYTYPE_INT16 yytype_int16; |
---|
282 | #else |
---|
283 | typedef short int yytype_int16; |
---|
284 | #endif |
---|
285 | |
---|
286 | #ifndef YYSIZE_T |
---|
287 | # ifdef __SIZE_TYPE__ |
---|
288 | # define YYSIZE_T __SIZE_TYPE__ |
---|
289 | # elif defined size_t |
---|
290 | # define YYSIZE_T size_t |
---|
291 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
292 | || defined __cplusplus || defined _MSC_VER) |
---|
293 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
---|
294 | # define YYSIZE_T size_t |
---|
295 | # else |
---|
296 | # define YYSIZE_T unsigned int |
---|
297 | # endif |
---|
298 | #endif |
---|
299 | |
---|
300 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
---|
301 | |
---|
302 | #ifndef YY_ |
---|
303 | # if defined YYENABLE_NLS && YYENABLE_NLS |
---|
304 | # if ENABLE_NLS |
---|
305 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
---|
306 | # define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
---|
307 | # endif |
---|
308 | # endif |
---|
309 | # ifndef YY_ |
---|
310 | # define YY_(Msgid) Msgid |
---|
311 | # endif |
---|
312 | #endif |
---|
313 | |
---|
314 | /* Suppress unused-variable warnings by "using" E. */ |
---|
315 | #if ! defined lint || defined __GNUC__ |
---|
316 | # define YYUSE(E) ((void) (E)) |
---|
317 | #else |
---|
318 | # define YYUSE(E) /* empty */ |
---|
319 | #endif |
---|
320 | |
---|
321 | /* Identity function, used to suppress warnings about constant conditions. */ |
---|
322 | #ifndef lint |
---|
323 | # define YYID(N) (N) |
---|
324 | #else |
---|
325 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
326 | || defined __cplusplus || defined _MSC_VER) |
---|
327 | static int |
---|
328 | YYID (int yyi) |
---|
329 | #else |
---|
330 | static int |
---|
331 | YYID (yyi) |
---|
332 | int yyi; |
---|
333 | #endif |
---|
334 | { |
---|
335 | return yyi; |
---|
336 | } |
---|
337 | #endif |
---|
338 | |
---|
339 | #if ! defined yyoverflow || YYERROR_VERBOSE |
---|
340 | |
---|
341 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
---|
342 | |
---|
343 | # ifdef YYSTACK_USE_ALLOCA |
---|
344 | # if YYSTACK_USE_ALLOCA |
---|
345 | # ifdef __GNUC__ |
---|
346 | # define YYSTACK_ALLOC __builtin_alloca |
---|
347 | # elif defined __BUILTIN_VA_ARG_INCR |
---|
348 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
---|
349 | # elif defined _AIX |
---|
350 | # define YYSTACK_ALLOC __alloca |
---|
351 | # elif defined _MSC_VER |
---|
352 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
---|
353 | # define alloca _alloca |
---|
354 | # else |
---|
355 | # define YYSTACK_ALLOC alloca |
---|
356 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
357 | || defined __cplusplus || defined _MSC_VER) |
---|
358 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
---|
359 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
---|
360 | # ifndef EXIT_SUCCESS |
---|
361 | # define EXIT_SUCCESS 0 |
---|
362 | # endif |
---|
363 | # endif |
---|
364 | # endif |
---|
365 | # endif |
---|
366 | # endif |
---|
367 | |
---|
368 | # ifdef YYSTACK_ALLOC |
---|
369 | /* Pacify GCC's `empty if-body' warning. */ |
---|
370 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
---|
371 | # ifndef YYSTACK_ALLOC_MAXIMUM |
---|
372 | /* The OS might guarantee only one guard page at the bottom of the stack, |
---|
373 | and a page size can be as small as 4096 bytes. So we cannot safely |
---|
374 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
---|
375 | to allow for a few compiler-allocated temporary stack slots. */ |
---|
376 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
---|
377 | # endif |
---|
378 | # else |
---|
379 | # define YYSTACK_ALLOC YYMALLOC |
---|
380 | # define YYSTACK_FREE YYFREE |
---|
381 | # ifndef YYSTACK_ALLOC_MAXIMUM |
---|
382 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
---|
383 | # endif |
---|
384 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
---|
385 | && ! ((defined YYMALLOC || defined malloc) \ |
---|
386 | && (defined YYFREE || defined free))) |
---|
387 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
---|
388 | # ifndef EXIT_SUCCESS |
---|
389 | # define EXIT_SUCCESS 0 |
---|
390 | # endif |
---|
391 | # endif |
---|
392 | # ifndef YYMALLOC |
---|
393 | # define YYMALLOC malloc |
---|
394 | # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
395 | || defined __cplusplus || defined _MSC_VER) |
---|
396 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
---|
397 | # endif |
---|
398 | # endif |
---|
399 | # ifndef YYFREE |
---|
400 | # define YYFREE free |
---|
401 | # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
402 | || defined __cplusplus || defined _MSC_VER) |
---|
403 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
---|
404 | # endif |
---|
405 | # endif |
---|
406 | # endif |
---|
407 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
---|
408 | |
---|
409 | |
---|
410 | #if (! defined yyoverflow \ |
---|
411 | && (! defined __cplusplus \ |
---|
412 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
---|
413 | |
---|
414 | /* A type that is properly aligned for any stack member. */ |
---|
415 | union yyalloc |
---|
416 | { |
---|
417 | yytype_int16 yyss_alloc; |
---|
418 | YYSTYPE yyvs_alloc; |
---|
419 | }; |
---|
420 | |
---|
421 | /* The size of the maximum gap between one aligned stack and the next. */ |
---|
422 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
---|
423 | |
---|
424 | /* The size of an array large to enough to hold all stacks, each with |
---|
425 | N elements. */ |
---|
426 | # define YYSTACK_BYTES(N) \ |
---|
427 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
---|
428 | + YYSTACK_GAP_MAXIMUM) |
---|
429 | |
---|
430 | # define YYCOPY_NEEDED 1 |
---|
431 | |
---|
432 | /* Relocate STACK from its old location to the new one. The |
---|
433 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
---|
434 | elements in the stack, and YYPTR gives the new location of the |
---|
435 | stack. Advance YYPTR to a properly aligned location for the next |
---|
436 | stack. */ |
---|
437 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
---|
438 | do \ |
---|
439 | { \ |
---|
440 | YYSIZE_T yynewbytes; \ |
---|
441 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
---|
442 | Stack = &yyptr->Stack_alloc; \ |
---|
443 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
---|
444 | yyptr += yynewbytes / sizeof (*yyptr); \ |
---|
445 | } \ |
---|
446 | while (YYID (0)) |
---|
447 | |
---|
448 | #endif |
---|
449 | |
---|
450 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
---|
451 | /* Copy COUNT objects from SRC to DST. The source and destination do |
---|
452 | not overlap. */ |
---|
453 | # ifndef YYCOPY |
---|
454 | # if defined __GNUC__ && 1 < __GNUC__ |
---|
455 | # define YYCOPY(Dst, Src, Count) \ |
---|
456 | __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
---|
457 | # else |
---|
458 | # define YYCOPY(Dst, Src, Count) \ |
---|
459 | do \ |
---|
460 | { \ |
---|
461 | YYSIZE_T yyi; \ |
---|
462 | for (yyi = 0; yyi < (Count); yyi++) \ |
---|
463 | (Dst)[yyi] = (Src)[yyi]; \ |
---|
464 | } \ |
---|
465 | while (YYID (0)) |
---|
466 | # endif |
---|
467 | # endif |
---|
468 | #endif /* !YYCOPY_NEEDED */ |
---|
469 | |
---|
470 | /* YYFINAL -- State number of the termination state. */ |
---|
471 | #define YYFINAL 124 |
---|
472 | /* YYLAST -- Last index in YYTABLE. */ |
---|
473 | #define YYLAST 192 |
---|
474 | |
---|
475 | /* YYNTOKENS -- Number of terminals. */ |
---|
476 | #define YYNTOKENS 77 |
---|
477 | /* YYNNTS -- Number of nonterminals. */ |
---|
478 | #define YYNNTS 35 |
---|
479 | /* YYNRULES -- Number of rules. */ |
---|
480 | #define YYNRULES 111 |
---|
481 | /* YYNRULES -- Number of states. */ |
---|
482 | #define YYNSTATES 202 |
---|
483 | |
---|
484 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
---|
485 | #define YYUNDEFTOK 2 |
---|
486 | #define YYMAXUTOK 330 |
---|
487 | |
---|
488 | #define YYTRANSLATE(YYX) \ |
---|
489 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
---|
490 | |
---|
491 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
---|
492 | static const yytype_uint8 yytranslate[] = |
---|
493 | { |
---|
494 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
495 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
496 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
497 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
498 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
499 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 76, |
---|
500 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
501 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
502 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
503 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
504 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
505 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
506 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
507 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
508 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
509 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
510 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
511 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
512 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
513 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
514 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
515 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
516 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
517 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
518 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
519 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
---|
520 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
---|
521 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
---|
522 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
---|
523 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
---|
524 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
---|
525 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
---|
526 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
---|
527 | 75 |
---|
528 | }; |
---|
529 | |
---|
530 | #if YYDEBUG |
---|
531 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
---|
532 | YYRHS. */ |
---|
533 | static const yytype_uint16 yyprhs[] = |
---|
534 | { |
---|
535 | 0, 0, 3, 5, 8, 11, 14, 17, 20, 23, |
---|
536 | 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, |
---|
537 | 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, |
---|
538 | 85, 87, 89, 91, 93, 95, 97, 100, 103, 106, |
---|
539 | 109, 112, 115, 120, 123, 126, 129, 132, 135, 138, |
---|
540 | 141, 143, 147, 150, 153, 155, 159, 162, 165, 167, |
---|
541 | 171, 174, 177, 179, 183, 186, 189, 191, 195, 198, |
---|
542 | 201, 203, 207, 210, 213, 215, 219, 222, 225, 227, |
---|
543 | 229, 233, 235, 239, 241, 244, 246, 250, 253, 256, |
---|
544 | 260, 264, 267, 270, 275, 279, 282, 284, 288, 291, |
---|
545 | 294, 298, 301, 303, 306, 308, 312, 315, 318, 322, |
---|
546 | 326, 329 |
---|
547 | }; |
---|
548 | |
---|
549 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
---|
550 | static const yytype_int8 yyrhs[] = |
---|
551 | { |
---|
552 | 78, 0, -1, 79, -1, 79, 78, -1, 3, 55, |
---|
553 | -1, 12, 55, -1, 15, 55, -1, 13, 55, -1, |
---|
554 | 4, 55, -1, 29, 55, -1, 30, 55, -1, 31, |
---|
555 | 55, -1, 32, 55, -1, 5, 55, -1, 14, 55, |
---|
556 | -1, 26, 81, -1, 27, 81, -1, 6, 93, -1, |
---|
557 | 7, 93, -1, 8, 93, -1, 9, 91, -1, 10, |
---|
558 | 91, -1, 11, 91, -1, 16, 99, -1, 17, 101, |
---|
559 | -1, 18, 109, -1, 33, 83, -1, 37, 85, -1, |
---|
560 | 35, 87, -1, 28, -1, 34, -1, 36, -1, 40, |
---|
561 | -1, 41, -1, 42, -1, 43, -1, 48, 55, -1, |
---|
562 | 49, 55, -1, 44, 55, -1, 45, 55, -1, 46, |
---|
563 | 55, -1, 47, 55, -1, 53, 68, 111, 54, -1, |
---|
564 | 53, 1, -1, 50, 55, -1, 51, 55, -1, 52, |
---|
565 | 55, -1, 38, 89, -1, 39, 55, -1, 80, 76, |
---|
566 | -1, 76, -1, 81, 82, 80, -1, 82, 80, -1, |
---|
567 | 1, 80, -1, 65, -1, 83, 84, 80, -1, 84, |
---|
568 | 80, -1, 1, 80, -1, 66, -1, 85, 86, 80, |
---|
569 | -1, 86, 80, -1, 1, 80, -1, 67, -1, 87, |
---|
570 | 88, 80, -1, 88, 80, -1, 1, 80, -1, 74, |
---|
571 | -1, 89, 90, 80, -1, 90, 80, -1, 1, 80, |
---|
572 | -1, 75, -1, 91, 92, 80, -1, 92, 80, -1, |
---|
573 | 1, 80, -1, 70, -1, 93, 94, 80, -1, 94, |
---|
574 | 80, -1, 1, 80, -1, 95, -1, 96, -1, 56, |
---|
575 | 25, 97, -1, 56, -1, 97, 24, 98, -1, 98, |
---|
576 | -1, 64, 56, -1, 56, -1, 99, 100, 80, -1, |
---|
577 | 100, 80, -1, 1, 80, -1, 57, 19, 58, -1, |
---|
578 | 101, 102, 80, -1, 102, 80, -1, 1, 80, -1, |
---|
579 | 104, 105, 106, 103, -1, 105, 106, 103, -1, 62, |
---|
580 | 103, -1, 62, -1, 71, 72, 73, -1, 107, 20, |
---|
581 | -1, 107, 21, -1, 107, 60, 108, -1, 60, 108, |
---|
582 | -1, 108, -1, 61, 59, -1, 59, -1, 109, 110, |
---|
583 | 80, -1, 110, 80, -1, 1, 80, -1, 63, 23, |
---|
584 | 110, -1, 63, 22, 63, -1, 111, 69, -1, 69, |
---|
585 | -1 |
---|
586 | }; |
---|
587 | |
---|
588 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
---|
589 | static const yytype_uint16 yyrline[] = |
---|
590 | { |
---|
591 | 0, 96, 96, 97, 99, 102, 105, 108, 111, 114, |
---|
592 | 117, 120, 123, 126, 129, 132, 134, 136, 138, 140, |
---|
593 | 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, |
---|
594 | 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, |
---|
595 | 182, 184, 186, 191, 193, 195, 197, 199, 201, 205, |
---|
596 | 208, 210, 211, 212, 215, 222, 223, 224, 227, 231, |
---|
597 | 232, 233, 236, 240, 241, 242, 245, 249, 250, 251, |
---|
598 | 254, 258, 259, 260, 263, 271, 272, 273, 276, 277, |
---|
599 | 279, 287, 295, 296, 298, 301, 305, 306, 307, 310, |
---|
600 | 313, 314, 315, 320, 325, 330, 334, 338, 342, 345, |
---|
601 | 348, 351, 354, 358, 362, 367, 368, 369, 372, 375, |
---|
602 | 380, 384 |
---|
603 | }; |
---|
604 | #endif |
---|
605 | |
---|
606 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
---|
607 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
---|
608 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
---|
609 | static const char *const yytname[] = |
---|
610 | { |
---|
611 | "$end", "error", "$undefined", "JACOBIAN", "DOUBLE", "FUNCTION", |
---|
612 | "DEFVAR", "DEFRAD", "DEFFIX", "SETVAR", "SETRAD", "SETFIX", "HESSIAN", |
---|
613 | "STOICMAT", "STOCHASTIC", "DECLARE", "INITVALUES", "EQUATIONS", "LUMP", |
---|
614 | "INIEQUAL", "EQNEQUAL", "EQNCOLON", "LMPCOLON", "LMPPLUS", "SPCPLUS", |
---|
615 | "SPCEQUAL", "ATOMDECL", "CHECK", "CHECKALL", "REORDER", "MEX", |
---|
616 | "DUMMYINDEX", "EQNTAGS", "LOOKAT", "LOOKATALL", "TRANSPORT", |
---|
617 | "TRANSPORTALL", "MONITOR", "USES", "SPARSEDATA", "WRITE_ATM", |
---|
618 | "WRITE_SPC", "WRITE_MAT", "WRITE_OPT", "INITIALIZE", "XGRID", "YGRID", |
---|
619 | "ZGRID", "USE", "LANGUAGE", "INTFILE", "DRIVER", "RUN", "INLINE", |
---|
620 | "ENDINLINE", "PARAMETER", "SPCSPC", "INISPC", "INIVALUE", "EQNSPC", |
---|
621 | "EQNSIGN", "EQNCOEF", "RATE", "LMPSPC", "SPCNR", "ATOMID", "LKTID", |
---|
622 | "MNIID", "INLCTX", "INCODE", "SSPID", "EQNLESS", "EQNTAG", "EQNGREATER", |
---|
623 | "TPTID", "USEID", "';'", "$accept", "program", "section", "semicolon", |
---|
624 | "atomlist", "atomdef", "lookatlist", "lookatspc", "monitorlist", |
---|
625 | "monitorspc", "translist", "transspc", "uselist", "usefile", |
---|
626 | "setspclist", "setspcspc", "species", "spc", "spcname", "spcdef", |
---|
627 | "atoms", "atom", "initvalues", "assignment", "equations", "equation", |
---|
628 | "rate", "eqntag", "lefths", "righths", "expresion", "term", "lumps", |
---|
629 | "lump", "inlinecode", YY_NULL |
---|
630 | }; |
---|
631 | #endif |
---|
632 | |
---|
633 | # ifdef YYPRINT |
---|
634 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
---|
635 | token YYLEX-NUM. */ |
---|
636 | static const yytype_uint16 yytoknum[] = |
---|
637 | { |
---|
638 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
---|
639 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
---|
640 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
---|
641 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
---|
642 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
---|
643 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
---|
644 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
---|
645 | 325, 326, 327, 328, 329, 330, 59 |
---|
646 | }; |
---|
647 | # endif |
---|
648 | |
---|
649 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
---|
650 | static const yytype_uint8 yyr1[] = |
---|
651 | { |
---|
652 | 0, 77, 78, 78, 79, 79, 79, 79, 79, 79, |
---|
653 | 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, |
---|
654 | 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, |
---|
655 | 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, |
---|
656 | 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, |
---|
657 | 80, 81, 81, 81, 82, 83, 83, 83, 84, 85, |
---|
658 | 85, 85, 86, 87, 87, 87, 88, 89, 89, 89, |
---|
659 | 90, 91, 91, 91, 92, 93, 93, 93, 94, 94, |
---|
660 | 95, 96, 97, 97, 98, 98, 99, 99, 99, 100, |
---|
661 | 101, 101, 101, 102, 102, 103, 103, 104, 105, 106, |
---|
662 | 107, 107, 107, 108, 108, 109, 109, 109, 110, 110, |
---|
663 | 111, 111 |
---|
664 | }; |
---|
665 | |
---|
666 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
---|
667 | static const yytype_uint8 yyr2[] = |
---|
668 | { |
---|
669 | 0, 2, 1, 2, 2, 2, 2, 2, 2, 2, |
---|
670 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
671 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, |
---|
672 | 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, |
---|
673 | 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, |
---|
674 | 1, 3, 2, 2, 1, 3, 2, 2, 1, 3, |
---|
675 | 2, 2, 1, 3, 2, 2, 1, 3, 2, 2, |
---|
676 | 1, 3, 2, 2, 1, 3, 2, 2, 1, 1, |
---|
677 | 3, 1, 3, 1, 2, 1, 3, 2, 2, 3, |
---|
678 | 3, 2, 2, 4, 3, 2, 1, 3, 2, 2, |
---|
679 | 3, 2, 1, 2, 1, 3, 2, 2, 3, 3, |
---|
680 | 2, 1 |
---|
681 | }; |
---|
682 | |
---|
683 | /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. |
---|
684 | Performed when YYTABLE doesn't specify something else to do. Zero |
---|
685 | means the default is an error. */ |
---|
686 | static const yytype_uint8 yydefact[] = |
---|
687 | { |
---|
688 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
689 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, |
---|
690 | 0, 0, 0, 0, 0, 30, 0, 31, 0, 0, |
---|
691 | 0, 32, 33, 34, 35, 0, 0, 0, 0, 0, |
---|
692 | 0, 0, 0, 0, 0, 0, 2, 4, 8, 13, |
---|
693 | 0, 81, 17, 0, 78, 79, 18, 19, 0, 74, |
---|
694 | 20, 0, 21, 22, 5, 7, 14, 6, 0, 0, |
---|
695 | 23, 0, 0, 104, 0, 0, 0, 24, 0, 0, |
---|
696 | 0, 0, 102, 0, 0, 25, 0, 0, 54, 15, |
---|
697 | 0, 16, 9, 10, 11, 12, 0, 58, 26, 0, |
---|
698 | 0, 66, 28, 0, 0, 62, 27, 0, 0, 70, |
---|
699 | 47, 0, 48, 38, 39, 40, 41, 36, 37, 44, |
---|
700 | 45, 46, 43, 0, 1, 3, 50, 77, 0, 0, |
---|
701 | 76, 73, 0, 72, 88, 0, 0, 87, 92, 101, |
---|
702 | 103, 0, 0, 91, 0, 0, 0, 98, 0, 107, |
---|
703 | 0, 0, 0, 106, 53, 0, 52, 57, 0, 56, |
---|
704 | 65, 0, 64, 61, 0, 60, 69, 0, 68, 111, |
---|
705 | 0, 49, 85, 0, 80, 83, 75, 71, 89, 86, |
---|
706 | 97, 90, 0, 96, 94, 99, 100, 109, 108, 105, |
---|
707 | 51, 55, 63, 59, 67, 42, 110, 84, 0, 93, |
---|
708 | 95, 82 |
---|
709 | }; |
---|
710 | |
---|
711 | /* YYDEFGOTO[NTERM-NUM]. */ |
---|
712 | static const yytype_int16 yydefgoto[] = |
---|
713 | { |
---|
714 | -1, 45, 46, 127, 89, 90, 98, 99, 106, 107, |
---|
715 | 102, 103, 110, 111, 60, 61, 52, 53, 54, 55, |
---|
716 | 174, 175, 70, 71, 77, 78, 184, 79, 80, 145, |
---|
717 | 81, 82, 85, 86, 170 |
---|
718 | }; |
---|
719 | |
---|
720 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
---|
721 | STATE-NUM. */ |
---|
722 | #define YYPACT_NINF -91 |
---|
723 | static const yytype_int16 yypact[] = |
---|
724 | { |
---|
725 | 112, -6, -3, 4, 11, 11, 11, 3, 3, 3, |
---|
726 | 30, 33, 39, 40, 8, 1, 21, 9, 9, -91, |
---|
727 | 41, 42, 43, 45, 5, -91, 6, -91, 15, 0, |
---|
728 | 46, -91, -91, -91, -91, 48, 49, 51, 52, 54, |
---|
729 | 55, 57, 58, 76, 10, 63, 112, -91, -91, -91, |
---|
730 | 56, 108, 14, 56, -91, -91, 14, 14, 56, -91, |
---|
731 | 64, 56, 64, 64, -91, -91, -91, -91, 56, 116, |
---|
732 | 79, 56, 56, -91, -38, 78, 94, -33, 56, -20, |
---|
733 | -20, -7, -91, 56, 34, 104, 56, 56, -91, 103, |
---|
734 | 56, 103, -91, -91, -91, -91, 56, -91, 105, 56, |
---|
735 | 56, -91, 95, 56, 56, -91, 106, 56, 56, -91, |
---|
736 | 97, 56, -91, -91, -91, -91, -91, -91, -91, -91, |
---|
737 | -91, -91, -91, 101, -91, -91, -91, 98, -32, 56, |
---|
738 | 98, 98, 56, 98, 98, 117, 56, 98, 98, -91, |
---|
739 | -91, 107, 56, 98, -20, 114, 27, -91, -38, 98, |
---|
740 | 115, 104, 56, 98, 98, 56, 98, 98, 56, 98, |
---|
741 | 98, 56, 98, 98, 56, 98, 98, 56, 98, -91, |
---|
742 | -40, -91, -91, 121, 155, -91, 98, 98, -91, 98, |
---|
743 | -91, 98, 114, 114, -91, -91, -91, -91, -91, 98, |
---|
744 | 98, 98, 98, 98, 98, -91, -91, -91, -32, -91, |
---|
745 | -91, -91 |
---|
746 | }; |
---|
747 | |
---|
748 | /* YYPGOTO[NTERM-NUM]. */ |
---|
749 | static const yytype_int16 yypgoto[] = |
---|
750 | { |
---|
751 | -91, 135, -91, -53, 164, -25, -91, 86, -91, 77, |
---|
752 | -91, 83, -91, 80, 60, -18, 85, -21, -91, -91, |
---|
753 | -91, -12, -91, 118, -91, 110, -90, -91, 113, 47, |
---|
754 | -63, -71, -91, -65, -91 |
---|
755 | }; |
---|
756 | |
---|
757 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
---|
758 | positive, shift that token. If negative, reduce the rule which |
---|
759 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
---|
760 | #define YYTABLE_NINF -1 |
---|
761 | static const yytype_uint8 yytable[] = |
---|
762 | { |
---|
763 | 130, 108, 72, 139, 58, 131, 96, 100, 133, 68, |
---|
764 | 87, 122, 50, 147, 195, 134, 104, 146, 137, 138, |
---|
765 | 152, 73, 83, 75, 172, 143, 73, 74, 75, 196, |
---|
766 | 149, 129, 173, 153, 154, 129, 129, 156, 76, 73, |
---|
767 | 74, 75, 132, 157, 132, 132, 159, 160, 185, 47, |
---|
768 | 162, 163, 48, 148, 165, 166, 150, 151, 168, 49, |
---|
769 | 73, 74, 75, 124, 155, 69, 155, 51, 62, 63, |
---|
770 | 51, 97, 76, 59, 88, 109, 176, 186, 123, 177, |
---|
771 | 101, 146, 105, 179, 84, 64, 188, 148, 65, 181, |
---|
772 | 56, 57, 199, 200, 66, 67, 92, 93, 94, 189, |
---|
773 | 95, 112, 190, 113, 114, 191, 115, 116, 192, 117, |
---|
774 | 118, 193, 119, 120, 194, 1, 2, 3, 4, 5, |
---|
775 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
---|
776 | 16, 121, 126, 128, 59, 135, 69, 140, 17, 18, |
---|
777 | 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, |
---|
778 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
---|
779 | 39, 40, 41, 42, 43, 44, 141, 84, 88, 101, |
---|
780 | 169, 97, 109, 105, 171, 178, 183, 197, 187, 198, |
---|
781 | 180, 125, 91, 164, 158, 161, 201, 142, 136, 0, |
---|
782 | 167, 182, 144 |
---|
783 | }; |
---|
784 | |
---|
785 | #define yypact_value_is_default(Yystate) \ |
---|
786 | (!!((Yystate) == (-91))) |
---|
787 | |
---|
788 | #define yytable_value_is_error(Yytable_value) \ |
---|
789 | YYID (0) |
---|
790 | |
---|
791 | static const yytype_int16 yycheck[] = |
---|
792 | { |
---|
793 | 53, 1, 1, 74, 1, 58, 1, 1, 61, 1, |
---|
794 | 1, 1, 1, 20, 54, 68, 1, 80, 71, 72, |
---|
795 | 85, 59, 1, 61, 56, 78, 59, 60, 61, 69, |
---|
796 | 83, 52, 64, 86, 87, 56, 57, 90, 71, 59, |
---|
797 | 60, 61, 60, 96, 62, 63, 99, 100, 21, 55, |
---|
798 | 103, 104, 55, 60, 107, 108, 22, 23, 111, 55, |
---|
799 | 59, 60, 61, 0, 89, 57, 91, 56, 8, 9, |
---|
800 | 56, 66, 71, 70, 65, 75, 129, 148, 68, 132, |
---|
801 | 74, 144, 67, 136, 63, 55, 151, 60, 55, 142, |
---|
802 | 5, 6, 182, 183, 55, 55, 55, 55, 55, 152, |
---|
803 | 55, 55, 155, 55, 55, 158, 55, 55, 161, 55, |
---|
804 | 55, 164, 55, 55, 167, 3, 4, 5, 6, 7, |
---|
805 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, |
---|
806 | 18, 55, 76, 25, 70, 19, 57, 59, 26, 27, |
---|
807 | 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, |
---|
808 | 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, |
---|
809 | 48, 49, 50, 51, 52, 53, 72, 63, 65, 74, |
---|
810 | 69, 66, 75, 67, 76, 58, 62, 56, 63, 24, |
---|
811 | 73, 46, 18, 106, 98, 102, 198, 77, 70, -1, |
---|
812 | 110, 144, 79 |
---|
813 | }; |
---|
814 | |
---|
815 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
---|
816 | symbol of state STATE-NUM. */ |
---|
817 | static const yytype_uint8 yystos[] = |
---|
818 | { |
---|
819 | 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
---|
820 | 12, 13, 14, 15, 16, 17, 18, 26, 27, 28, |
---|
821 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, |
---|
822 | 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, |
---|
823 | 49, 50, 51, 52, 53, 78, 79, 55, 55, 55, |
---|
824 | 1, 56, 93, 94, 95, 96, 93, 93, 1, 70, |
---|
825 | 91, 92, 91, 91, 55, 55, 55, 55, 1, 57, |
---|
826 | 99, 100, 1, 59, 60, 61, 71, 101, 102, 104, |
---|
827 | 105, 107, 108, 1, 63, 109, 110, 1, 65, 81, |
---|
828 | 82, 81, 55, 55, 55, 55, 1, 66, 83, 84, |
---|
829 | 1, 74, 87, 88, 1, 67, 85, 86, 1, 75, |
---|
830 | 89, 90, 55, 55, 55, 55, 55, 55, 55, 55, |
---|
831 | 55, 55, 1, 68, 0, 78, 76, 80, 25, 94, |
---|
832 | 80, 80, 92, 80, 80, 19, 100, 80, 80, 108, |
---|
833 | 59, 72, 102, 80, 105, 106, 107, 20, 60, 80, |
---|
834 | 22, 23, 110, 80, 80, 82, 80, 80, 84, 80, |
---|
835 | 80, 88, 80, 80, 86, 80, 80, 90, 80, 69, |
---|
836 | 111, 76, 56, 64, 97, 98, 80, 80, 58, 80, |
---|
837 | 73, 80, 106, 62, 103, 21, 108, 63, 110, 80, |
---|
838 | 80, 80, 80, 80, 80, 54, 69, 56, 24, 103, |
---|
839 | 103, 98 |
---|
840 | }; |
---|
841 | |
---|
842 | #define yyerrok (yyerrstatus = 0) |
---|
843 | #define yyclearin (yychar = YYEMPTY) |
---|
844 | #define YYEMPTY (-2) |
---|
845 | #define YYEOF 0 |
---|
846 | |
---|
847 | #define YYACCEPT goto yyacceptlab |
---|
848 | #define YYABORT goto yyabortlab |
---|
849 | #define YYERROR goto yyerrorlab |
---|
850 | |
---|
851 | |
---|
852 | /* Like YYERROR except do call yyerror. This remains here temporarily |
---|
853 | to ease the transition to the new meaning of YYERROR, for GCC. |
---|
854 | Once GCC version 2 has supplanted version 1, this can go. However, |
---|
855 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
---|
856 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
---|
857 | discussed. */ |
---|
858 | |
---|
859 | #define YYFAIL goto yyerrlab |
---|
860 | #if defined YYFAIL |
---|
861 | /* This is here to suppress warnings from the GCC cpp's |
---|
862 | -Wunused-macros. Normally we don't worry about that warning, but |
---|
863 | some users do, and we want to make it easy for users to remove |
---|
864 | YYFAIL uses, which will produce warnings from Bison 2.5. */ |
---|
865 | #endif |
---|
866 | |
---|
867 | #define YYRECOVERING() (!!yyerrstatus) |
---|
868 | |
---|
869 | #define YYBACKUP(Token, Value) \ |
---|
870 | do \ |
---|
871 | if (yychar == YYEMPTY) \ |
---|
872 | { \ |
---|
873 | yychar = (Token); \ |
---|
874 | yylval = (Value); \ |
---|
875 | YYPOPSTACK (yylen); \ |
---|
876 | yystate = *yyssp; \ |
---|
877 | goto yybackup; \ |
---|
878 | } \ |
---|
879 | else \ |
---|
880 | { \ |
---|
881 | yyerror (YY_("syntax error: cannot back up")); \ |
---|
882 | YYERROR; \ |
---|
883 | } \ |
---|
884 | while (YYID (0)) |
---|
885 | |
---|
886 | /* Error token number */ |
---|
887 | #define YYTERROR 1 |
---|
888 | #define YYERRCODE 256 |
---|
889 | |
---|
890 | |
---|
891 | /* This macro is provided for backward compatibility. */ |
---|
892 | #ifndef YY_LOCATION_PRINT |
---|
893 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
---|
894 | #endif |
---|
895 | |
---|
896 | |
---|
897 | /* YYLEX -- calling `yylex' with the right arguments. */ |
---|
898 | #ifdef YYLEX_PARAM |
---|
899 | # define YYLEX yylex (YYLEX_PARAM) |
---|
900 | #else |
---|
901 | # define YYLEX yylex () |
---|
902 | #endif |
---|
903 | |
---|
904 | /* Enable debugging if requested. */ |
---|
905 | #if YYDEBUG |
---|
906 | |
---|
907 | # ifndef YYFPRINTF |
---|
908 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
---|
909 | # define YYFPRINTF fprintf |
---|
910 | # endif |
---|
911 | |
---|
912 | # define YYDPRINTF(Args) \ |
---|
913 | do { \ |
---|
914 | if (yydebug) \ |
---|
915 | YYFPRINTF Args; \ |
---|
916 | } while (YYID (0)) |
---|
917 | |
---|
918 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
---|
919 | do { \ |
---|
920 | if (yydebug) \ |
---|
921 | { \ |
---|
922 | YYFPRINTF (stderr, "%s ", Title); \ |
---|
923 | yy_symbol_print (stderr, \ |
---|
924 | Type, Value); \ |
---|
925 | YYFPRINTF (stderr, "\n"); \ |
---|
926 | } \ |
---|
927 | } while (YYID (0)) |
---|
928 | |
---|
929 | |
---|
930 | /*--------------------------------. |
---|
931 | | Print this symbol on YYOUTPUT. | |
---|
932 | `--------------------------------*/ |
---|
933 | |
---|
934 | /*ARGSUSED*/ |
---|
935 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
936 | || defined __cplusplus || defined _MSC_VER) |
---|
937 | static void |
---|
938 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
---|
939 | #else |
---|
940 | static void |
---|
941 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
---|
942 | FILE *yyoutput; |
---|
943 | int yytype; |
---|
944 | YYSTYPE const * const yyvaluep; |
---|
945 | #endif |
---|
946 | { |
---|
947 | FILE *yyo = yyoutput; |
---|
948 | YYUSE (yyo); |
---|
949 | if (!yyvaluep) |
---|
950 | return; |
---|
951 | # ifdef YYPRINT |
---|
952 | if (yytype < YYNTOKENS) |
---|
953 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
---|
954 | # else |
---|
955 | YYUSE (yyoutput); |
---|
956 | # endif |
---|
957 | switch (yytype) |
---|
958 | { |
---|
959 | default: |
---|
960 | break; |
---|
961 | } |
---|
962 | } |
---|
963 | |
---|
964 | |
---|
965 | /*--------------------------------. |
---|
966 | | Print this symbol on YYOUTPUT. | |
---|
967 | `--------------------------------*/ |
---|
968 | |
---|
969 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
970 | || defined __cplusplus || defined _MSC_VER) |
---|
971 | static void |
---|
972 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
---|
973 | #else |
---|
974 | static void |
---|
975 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
---|
976 | FILE *yyoutput; |
---|
977 | int yytype; |
---|
978 | YYSTYPE const * const yyvaluep; |
---|
979 | #endif |
---|
980 | { |
---|
981 | if (yytype < YYNTOKENS) |
---|
982 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
---|
983 | else |
---|
984 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
---|
985 | |
---|
986 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
---|
987 | YYFPRINTF (yyoutput, ")"); |
---|
988 | } |
---|
989 | |
---|
990 | /*------------------------------------------------------------------. |
---|
991 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
---|
992 | | TOP (included). | |
---|
993 | `------------------------------------------------------------------*/ |
---|
994 | |
---|
995 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
996 | || defined __cplusplus || defined _MSC_VER) |
---|
997 | static void |
---|
998 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
---|
999 | #else |
---|
1000 | static void |
---|
1001 | yy_stack_print (yybottom, yytop) |
---|
1002 | yytype_int16 *yybottom; |
---|
1003 | yytype_int16 *yytop; |
---|
1004 | #endif |
---|
1005 | { |
---|
1006 | YYFPRINTF (stderr, "Stack now"); |
---|
1007 | for (; yybottom <= yytop; yybottom++) |
---|
1008 | { |
---|
1009 | int yybot = *yybottom; |
---|
1010 | YYFPRINTF (stderr, " %d", yybot); |
---|
1011 | } |
---|
1012 | YYFPRINTF (stderr, "\n"); |
---|
1013 | } |
---|
1014 | |
---|
1015 | # define YY_STACK_PRINT(Bottom, Top) \ |
---|
1016 | do { \ |
---|
1017 | if (yydebug) \ |
---|
1018 | yy_stack_print ((Bottom), (Top)); \ |
---|
1019 | } while (YYID (0)) |
---|
1020 | |
---|
1021 | |
---|
1022 | /*------------------------------------------------. |
---|
1023 | | Report that the YYRULE is going to be reduced. | |
---|
1024 | `------------------------------------------------*/ |
---|
1025 | |
---|
1026 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1027 | || defined __cplusplus || defined _MSC_VER) |
---|
1028 | static void |
---|
1029 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
---|
1030 | #else |
---|
1031 | static void |
---|
1032 | yy_reduce_print (yyvsp, yyrule) |
---|
1033 | YYSTYPE *yyvsp; |
---|
1034 | int yyrule; |
---|
1035 | #endif |
---|
1036 | { |
---|
1037 | int yynrhs = yyr2[yyrule]; |
---|
1038 | int yyi; |
---|
1039 | unsigned long int yylno = yyrline[yyrule]; |
---|
1040 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
---|
1041 | yyrule - 1, yylno); |
---|
1042 | /* The symbols being reduced. */ |
---|
1043 | for (yyi = 0; yyi < yynrhs; yyi++) |
---|
1044 | { |
---|
1045 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
---|
1046 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
---|
1047 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
---|
1048 | ); |
---|
1049 | YYFPRINTF (stderr, "\n"); |
---|
1050 | } |
---|
1051 | } |
---|
1052 | |
---|
1053 | # define YY_REDUCE_PRINT(Rule) \ |
---|
1054 | do { \ |
---|
1055 | if (yydebug) \ |
---|
1056 | yy_reduce_print (yyvsp, Rule); \ |
---|
1057 | } while (YYID (0)) |
---|
1058 | |
---|
1059 | /* Nonzero means print parse trace. It is left uninitialized so that |
---|
1060 | multiple parsers can coexist. */ |
---|
1061 | int yydebug; |
---|
1062 | #else /* !YYDEBUG */ |
---|
1063 | # define YYDPRINTF(Args) |
---|
1064 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
---|
1065 | # define YY_STACK_PRINT(Bottom, Top) |
---|
1066 | # define YY_REDUCE_PRINT(Rule) |
---|
1067 | #endif /* !YYDEBUG */ |
---|
1068 | |
---|
1069 | |
---|
1070 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
---|
1071 | #ifndef YYINITDEPTH |
---|
1072 | # define YYINITDEPTH 200 |
---|
1073 | #endif |
---|
1074 | |
---|
1075 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
---|
1076 | if the built-in stack extension method is used). |
---|
1077 | |
---|
1078 | Do not make this value too large; the results are undefined if |
---|
1079 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
---|
1080 | evaluated with infinite-precision integer arithmetic. */ |
---|
1081 | |
---|
1082 | #ifndef YYMAXDEPTH |
---|
1083 | # define YYMAXDEPTH 10000 |
---|
1084 | #endif |
---|
1085 | |
---|
1086 | |
---|
1087 | #if YYERROR_VERBOSE |
---|
1088 | |
---|
1089 | # ifndef yystrlen |
---|
1090 | # if defined __GLIBC__ && defined _STRING_H |
---|
1091 | # define yystrlen strlen |
---|
1092 | # else |
---|
1093 | /* Return the length of YYSTR. */ |
---|
1094 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1095 | || defined __cplusplus || defined _MSC_VER) |
---|
1096 | static YYSIZE_T |
---|
1097 | yystrlen (const char *yystr) |
---|
1098 | #else |
---|
1099 | static YYSIZE_T |
---|
1100 | yystrlen (yystr) |
---|
1101 | const char *yystr; |
---|
1102 | #endif |
---|
1103 | { |
---|
1104 | YYSIZE_T yylen; |
---|
1105 | for (yylen = 0; yystr[yylen]; yylen++) |
---|
1106 | continue; |
---|
1107 | return yylen; |
---|
1108 | } |
---|
1109 | # endif |
---|
1110 | # endif |
---|
1111 | |
---|
1112 | # ifndef yystpcpy |
---|
1113 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
---|
1114 | # define yystpcpy stpcpy |
---|
1115 | # else |
---|
1116 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
---|
1117 | YYDEST. */ |
---|
1118 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1119 | || defined __cplusplus || defined _MSC_VER) |
---|
1120 | static char * |
---|
1121 | yystpcpy (char *yydest, const char *yysrc) |
---|
1122 | #else |
---|
1123 | static char * |
---|
1124 | yystpcpy (yydest, yysrc) |
---|
1125 | char *yydest; |
---|
1126 | const char *yysrc; |
---|
1127 | #endif |
---|
1128 | { |
---|
1129 | char *yyd = yydest; |
---|
1130 | const char *yys = yysrc; |
---|
1131 | |
---|
1132 | while ((*yyd++ = *yys++) != '\0') |
---|
1133 | continue; |
---|
1134 | |
---|
1135 | return yyd - 1; |
---|
1136 | } |
---|
1137 | # endif |
---|
1138 | # endif |
---|
1139 | |
---|
1140 | # ifndef yytnamerr |
---|
1141 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
---|
1142 | quotes and backslashes, so that it's suitable for yyerror. The |
---|
1143 | heuristic is that double-quoting is unnecessary unless the string |
---|
1144 | contains an apostrophe, a comma, or backslash (other than |
---|
1145 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
---|
1146 | null, do not copy; instead, return the length of what the result |
---|
1147 | would have been. */ |
---|
1148 | static YYSIZE_T |
---|
1149 | yytnamerr (char *yyres, const char *yystr) |
---|
1150 | { |
---|
1151 | if (*yystr == '"') |
---|
1152 | { |
---|
1153 | YYSIZE_T yyn = 0; |
---|
1154 | char const *yyp = yystr; |
---|
1155 | |
---|
1156 | for (;;) |
---|
1157 | switch (*++yyp) |
---|
1158 | { |
---|
1159 | case '\'': |
---|
1160 | case ',': |
---|
1161 | goto do_not_strip_quotes; |
---|
1162 | |
---|
1163 | case '\\': |
---|
1164 | if (*++yyp != '\\') |
---|
1165 | goto do_not_strip_quotes; |
---|
1166 | /* Fall through. */ |
---|
1167 | default: |
---|
1168 | if (yyres) |
---|
1169 | yyres[yyn] = *yyp; |
---|
1170 | yyn++; |
---|
1171 | break; |
---|
1172 | |
---|
1173 | case '"': |
---|
1174 | if (yyres) |
---|
1175 | yyres[yyn] = '\0'; |
---|
1176 | return yyn; |
---|
1177 | } |
---|
1178 | do_not_strip_quotes: ; |
---|
1179 | } |
---|
1180 | |
---|
1181 | if (! yyres) |
---|
1182 | return yystrlen (yystr); |
---|
1183 | |
---|
1184 | return yystpcpy (yyres, yystr) - yyres; |
---|
1185 | } |
---|
1186 | # endif |
---|
1187 | |
---|
1188 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
---|
1189 | about the unexpected token YYTOKEN for the state stack whose top is |
---|
1190 | YYSSP. |
---|
1191 | |
---|
1192 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
---|
1193 | not large enough to hold the message. In that case, also set |
---|
1194 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
---|
1195 | required number of bytes is too large to store. */ |
---|
1196 | static int |
---|
1197 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
---|
1198 | yytype_int16 *yyssp, int yytoken) |
---|
1199 | { |
---|
1200 | YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); |
---|
1201 | YYSIZE_T yysize = yysize0; |
---|
1202 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
---|
1203 | /* Internationalized format string. */ |
---|
1204 | const char *yyformat = YY_NULL; |
---|
1205 | /* Arguments of yyformat. */ |
---|
1206 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
---|
1207 | /* Number of reported tokens (one for the "unexpected", one per |
---|
1208 | "expected"). */ |
---|
1209 | int yycount = 0; |
---|
1210 | |
---|
1211 | /* There are many possibilities here to consider: |
---|
1212 | - Assume YYFAIL is not used. It's too flawed to consider. See |
---|
1213 | <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> |
---|
1214 | for details. YYERROR is fine as it does not invoke this |
---|
1215 | function. |
---|
1216 | - If this state is a consistent state with a default action, then |
---|
1217 | the only way this function was invoked is if the default action |
---|
1218 | is an error action. In that case, don't check for expected |
---|
1219 | tokens because there are none. |
---|
1220 | - The only way there can be no lookahead present (in yychar) is if |
---|
1221 | this state is a consistent state with a default action. Thus, |
---|
1222 | detecting the absence of a lookahead is sufficient to determine |
---|
1223 | that there is no unexpected or expected token to report. In that |
---|
1224 | case, just report a simple "syntax error". |
---|
1225 | - Don't assume there isn't a lookahead just because this state is a |
---|
1226 | consistent state with a default action. There might have been a |
---|
1227 | previous inconsistent state, consistent state with a non-default |
---|
1228 | action, or user semantic action that manipulated yychar. |
---|
1229 | - Of course, the expected token list depends on states to have |
---|
1230 | correct lookahead information, and it depends on the parser not |
---|
1231 | to perform extra reductions after fetching a lookahead from the |
---|
1232 | scanner and before detecting a syntax error. Thus, state merging |
---|
1233 | (from LALR or IELR) and default reductions corrupt the expected |
---|
1234 | token list. However, the list is correct for canonical LR with |
---|
1235 | one exception: it will still contain any token that will not be |
---|
1236 | accepted due to an error action in a later state. |
---|
1237 | */ |
---|
1238 | if (yytoken != YYEMPTY) |
---|
1239 | { |
---|
1240 | int yyn = yypact[*yyssp]; |
---|
1241 | yyarg[yycount++] = yytname[yytoken]; |
---|
1242 | if (!yypact_value_is_default (yyn)) |
---|
1243 | { |
---|
1244 | /* Start YYX at -YYN if negative to avoid negative indexes in |
---|
1245 | YYCHECK. In other words, skip the first -YYN actions for |
---|
1246 | this state because they are default actions. */ |
---|
1247 | int yyxbegin = yyn < 0 ? -yyn : 0; |
---|
1248 | /* Stay within bounds of both yycheck and yytname. */ |
---|
1249 | int yychecklim = YYLAST - yyn + 1; |
---|
1250 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
---|
1251 | int yyx; |
---|
1252 | |
---|
1253 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
---|
1254 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
---|
1255 | && !yytable_value_is_error (yytable[yyx + yyn])) |
---|
1256 | { |
---|
1257 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
---|
1258 | { |
---|
1259 | yycount = 1; |
---|
1260 | yysize = yysize0; |
---|
1261 | break; |
---|
1262 | } |
---|
1263 | yyarg[yycount++] = yytname[yyx]; |
---|
1264 | { |
---|
1265 | YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); |
---|
1266 | if (! (yysize <= yysize1 |
---|
1267 | && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
---|
1268 | return 2; |
---|
1269 | yysize = yysize1; |
---|
1270 | } |
---|
1271 | } |
---|
1272 | } |
---|
1273 | } |
---|
1274 | |
---|
1275 | switch (yycount) |
---|
1276 | { |
---|
1277 | # define YYCASE_(N, S) \ |
---|
1278 | case N: \ |
---|
1279 | yyformat = S; \ |
---|
1280 | break |
---|
1281 | YYCASE_(0, YY_("syntax error")); |
---|
1282 | YYCASE_(1, YY_("syntax error, unexpected %s")); |
---|
1283 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
---|
1284 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
---|
1285 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
---|
1286 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
---|
1287 | # undef YYCASE_ |
---|
1288 | } |
---|
1289 | |
---|
1290 | { |
---|
1291 | YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
---|
1292 | if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
---|
1293 | return 2; |
---|
1294 | yysize = yysize1; |
---|
1295 | } |
---|
1296 | |
---|
1297 | if (*yymsg_alloc < yysize) |
---|
1298 | { |
---|
1299 | *yymsg_alloc = 2 * yysize; |
---|
1300 | if (! (yysize <= *yymsg_alloc |
---|
1301 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
---|
1302 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
---|
1303 | return 1; |
---|
1304 | } |
---|
1305 | |
---|
1306 | /* Avoid sprintf, as that infringes on the user's name space. |
---|
1307 | Don't have undefined behavior even if the translation |
---|
1308 | produced a string with the wrong number of "%s"s. */ |
---|
1309 | { |
---|
1310 | char *yyp = *yymsg; |
---|
1311 | int yyi = 0; |
---|
1312 | while ((*yyp = *yyformat) != '\0') |
---|
1313 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
---|
1314 | { |
---|
1315 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
---|
1316 | yyformat += 2; |
---|
1317 | } |
---|
1318 | else |
---|
1319 | { |
---|
1320 | yyp++; |
---|
1321 | yyformat++; |
---|
1322 | } |
---|
1323 | } |
---|
1324 | return 0; |
---|
1325 | } |
---|
1326 | #endif /* YYERROR_VERBOSE */ |
---|
1327 | |
---|
1328 | /*-----------------------------------------------. |
---|
1329 | | Release the memory associated to this symbol. | |
---|
1330 | `-----------------------------------------------*/ |
---|
1331 | |
---|
1332 | /*ARGSUSED*/ |
---|
1333 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1334 | || defined __cplusplus || defined _MSC_VER) |
---|
1335 | static void |
---|
1336 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
---|
1337 | #else |
---|
1338 | static void |
---|
1339 | yydestruct (yymsg, yytype, yyvaluep) |
---|
1340 | const char *yymsg; |
---|
1341 | int yytype; |
---|
1342 | YYSTYPE *yyvaluep; |
---|
1343 | #endif |
---|
1344 | { |
---|
1345 | YYUSE (yyvaluep); |
---|
1346 | |
---|
1347 | if (!yymsg) |
---|
1348 | yymsg = "Deleting"; |
---|
1349 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
---|
1350 | |
---|
1351 | switch (yytype) |
---|
1352 | { |
---|
1353 | |
---|
1354 | default: |
---|
1355 | break; |
---|
1356 | } |
---|
1357 | } |
---|
1358 | |
---|
1359 | |
---|
1360 | |
---|
1361 | |
---|
1362 | /* The lookahead symbol. */ |
---|
1363 | int yychar; |
---|
1364 | |
---|
1365 | |
---|
1366 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
---|
1367 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
---|
1368 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END |
---|
1369 | #endif |
---|
1370 | #ifndef YY_INITIAL_VALUE |
---|
1371 | # define YY_INITIAL_VALUE(Value) /* Nothing. */ |
---|
1372 | #endif |
---|
1373 | |
---|
1374 | /* The semantic value of the lookahead symbol. */ |
---|
1375 | YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); |
---|
1376 | |
---|
1377 | /* Number of syntax errors so far. */ |
---|
1378 | int yynerrs; |
---|
1379 | |
---|
1380 | |
---|
1381 | /*----------. |
---|
1382 | | yyparse. | |
---|
1383 | `----------*/ |
---|
1384 | |
---|
1385 | #ifdef YYPARSE_PARAM |
---|
1386 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1387 | || defined __cplusplus || defined _MSC_VER) |
---|
1388 | int |
---|
1389 | yyparse (void *YYPARSE_PARAM) |
---|
1390 | #else |
---|
1391 | int |
---|
1392 | yyparse (YYPARSE_PARAM) |
---|
1393 | void *YYPARSE_PARAM; |
---|
1394 | #endif |
---|
1395 | #else /* ! YYPARSE_PARAM */ |
---|
1396 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1397 | || defined __cplusplus || defined _MSC_VER) |
---|
1398 | int |
---|
1399 | yyparse (void) |
---|
1400 | #else |
---|
1401 | int |
---|
1402 | yyparse () |
---|
1403 | |
---|
1404 | #endif |
---|
1405 | #endif |
---|
1406 | { |
---|
1407 | int yystate; |
---|
1408 | /* Number of tokens to shift before error messages enabled. */ |
---|
1409 | int yyerrstatus; |
---|
1410 | |
---|
1411 | /* The stacks and their tools: |
---|
1412 | `yyss': related to states. |
---|
1413 | `yyvs': related to semantic values. |
---|
1414 | |
---|
1415 | Refer to the stacks through separate pointers, to allow yyoverflow |
---|
1416 | to reallocate them elsewhere. */ |
---|
1417 | |
---|
1418 | /* The state stack. */ |
---|
1419 | yytype_int16 yyssa[YYINITDEPTH]; |
---|
1420 | yytype_int16 *yyss; |
---|
1421 | yytype_int16 *yyssp; |
---|
1422 | |
---|
1423 | /* The semantic value stack. */ |
---|
1424 | YYSTYPE yyvsa[YYINITDEPTH]; |
---|
1425 | YYSTYPE *yyvs; |
---|
1426 | YYSTYPE *yyvsp; |
---|
1427 | |
---|
1428 | YYSIZE_T yystacksize; |
---|
1429 | |
---|
1430 | int yyn; |
---|
1431 | int yyresult; |
---|
1432 | /* Lookahead token as an internal (translated) token number. */ |
---|
1433 | int yytoken = 0; |
---|
1434 | /* The variables used to return semantic value and location from the |
---|
1435 | action routines. */ |
---|
1436 | YYSTYPE yyval; |
---|
1437 | |
---|
1438 | #if YYERROR_VERBOSE |
---|
1439 | /* Buffer for error messages, and its allocated size. */ |
---|
1440 | char yymsgbuf[128]; |
---|
1441 | char *yymsg = yymsgbuf; |
---|
1442 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
---|
1443 | #endif |
---|
1444 | |
---|
1445 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
---|
1446 | |
---|
1447 | /* The number of symbols on the RHS of the reduced rule. |
---|
1448 | Keep to zero when no symbol should be popped. */ |
---|
1449 | int yylen = 0; |
---|
1450 | |
---|
1451 | yyssp = yyss = yyssa; |
---|
1452 | yyvsp = yyvs = yyvsa; |
---|
1453 | yystacksize = YYINITDEPTH; |
---|
1454 | |
---|
1455 | YYDPRINTF ((stderr, "Starting parse\n")); |
---|
1456 | |
---|
1457 | yystate = 0; |
---|
1458 | yyerrstatus = 0; |
---|
1459 | yynerrs = 0; |
---|
1460 | yychar = YYEMPTY; /* Cause a token to be read. */ |
---|
1461 | goto yysetstate; |
---|
1462 | |
---|
1463 | /*------------------------------------------------------------. |
---|
1464 | | yynewstate -- Push a new state, which is found in yystate. | |
---|
1465 | `------------------------------------------------------------*/ |
---|
1466 | yynewstate: |
---|
1467 | /* In all cases, when you get here, the value and location stacks |
---|
1468 | have just been pushed. So pushing a state here evens the stacks. */ |
---|
1469 | yyssp++; |
---|
1470 | |
---|
1471 | yysetstate: |
---|
1472 | *yyssp = yystate; |
---|
1473 | |
---|
1474 | if (yyss + yystacksize - 1 <= yyssp) |
---|
1475 | { |
---|
1476 | /* Get the current used size of the three stacks, in elements. */ |
---|
1477 | YYSIZE_T yysize = yyssp - yyss + 1; |
---|
1478 | |
---|
1479 | #ifdef yyoverflow |
---|
1480 | { |
---|
1481 | /* Give user a chance to reallocate the stack. Use copies of |
---|
1482 | these so that the &'s don't force the real ones into |
---|
1483 | memory. */ |
---|
1484 | YYSTYPE *yyvs1 = yyvs; |
---|
1485 | yytype_int16 *yyss1 = yyss; |
---|
1486 | |
---|
1487 | /* Each stack pointer address is followed by the size of the |
---|
1488 | data in use in that stack, in bytes. This used to be a |
---|
1489 | conditional around just the two extra args, but that might |
---|
1490 | be undefined if yyoverflow is a macro. */ |
---|
1491 | yyoverflow (YY_("memory exhausted"), |
---|
1492 | &yyss1, yysize * sizeof (*yyssp), |
---|
1493 | &yyvs1, yysize * sizeof (*yyvsp), |
---|
1494 | &yystacksize); |
---|
1495 | |
---|
1496 | yyss = yyss1; |
---|
1497 | yyvs = yyvs1; |
---|
1498 | } |
---|
1499 | #else /* no yyoverflow */ |
---|
1500 | # ifndef YYSTACK_RELOCATE |
---|
1501 | goto yyexhaustedlab; |
---|
1502 | # else |
---|
1503 | /* Extend the stack our own way. */ |
---|
1504 | if (YYMAXDEPTH <= yystacksize) |
---|
1505 | goto yyexhaustedlab; |
---|
1506 | yystacksize *= 2; |
---|
1507 | if (YYMAXDEPTH < yystacksize) |
---|
1508 | yystacksize = YYMAXDEPTH; |
---|
1509 | |
---|
1510 | { |
---|
1511 | yytype_int16 *yyss1 = yyss; |
---|
1512 | union yyalloc *yyptr = |
---|
1513 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
---|
1514 | if (! yyptr) |
---|
1515 | goto yyexhaustedlab; |
---|
1516 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
---|
1517 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
---|
1518 | # undef YYSTACK_RELOCATE |
---|
1519 | if (yyss1 != yyssa) |
---|
1520 | YYSTACK_FREE (yyss1); |
---|
1521 | } |
---|
1522 | # endif |
---|
1523 | #endif /* no yyoverflow */ |
---|
1524 | |
---|
1525 | yyssp = yyss + yysize - 1; |
---|
1526 | yyvsp = yyvs + yysize - 1; |
---|
1527 | |
---|
1528 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
---|
1529 | (unsigned long int) yystacksize)); |
---|
1530 | |
---|
1531 | if (yyss + yystacksize - 1 <= yyssp) |
---|
1532 | YYABORT; |
---|
1533 | } |
---|
1534 | |
---|
1535 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
---|
1536 | |
---|
1537 | if (yystate == YYFINAL) |
---|
1538 | YYACCEPT; |
---|
1539 | |
---|
1540 | goto yybackup; |
---|
1541 | |
---|
1542 | /*-----------. |
---|
1543 | | yybackup. | |
---|
1544 | `-----------*/ |
---|
1545 | yybackup: |
---|
1546 | |
---|
1547 | /* Do appropriate processing given the current state. Read a |
---|
1548 | lookahead token if we need one and don't already have one. */ |
---|
1549 | |
---|
1550 | /* First try to decide what to do without reference to lookahead token. */ |
---|
1551 | yyn = yypact[yystate]; |
---|
1552 | if (yypact_value_is_default (yyn)) |
---|
1553 | goto yydefault; |
---|
1554 | |
---|
1555 | /* Not known => get a lookahead token if don't already have one. */ |
---|
1556 | |
---|
1557 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
---|
1558 | if (yychar == YYEMPTY) |
---|
1559 | { |
---|
1560 | YYDPRINTF ((stderr, "Reading a token: ")); |
---|
1561 | yychar = YYLEX; |
---|
1562 | } |
---|
1563 | |
---|
1564 | if (yychar <= YYEOF) |
---|
1565 | { |
---|
1566 | yychar = yytoken = YYEOF; |
---|
1567 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
---|
1568 | } |
---|
1569 | else |
---|
1570 | { |
---|
1571 | yytoken = YYTRANSLATE (yychar); |
---|
1572 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
---|
1573 | } |
---|
1574 | |
---|
1575 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
---|
1576 | detect an error, take that action. */ |
---|
1577 | yyn += yytoken; |
---|
1578 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
---|
1579 | goto yydefault; |
---|
1580 | yyn = yytable[yyn]; |
---|
1581 | if (yyn <= 0) |
---|
1582 | { |
---|
1583 | if (yytable_value_is_error (yyn)) |
---|
1584 | goto yyerrlab; |
---|
1585 | yyn = -yyn; |
---|
1586 | goto yyreduce; |
---|
1587 | } |
---|
1588 | |
---|
1589 | /* Count tokens shifted since error; after three, turn off error |
---|
1590 | status. */ |
---|
1591 | if (yyerrstatus) |
---|
1592 | yyerrstatus--; |
---|
1593 | |
---|
1594 | /* Shift the lookahead token. */ |
---|
1595 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
---|
1596 | |
---|
1597 | /* Discard the shifted token. */ |
---|
1598 | yychar = YYEMPTY; |
---|
1599 | |
---|
1600 | yystate = yyn; |
---|
1601 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
---|
1602 | *++yyvsp = yylval; |
---|
1603 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
---|
1604 | |
---|
1605 | goto yynewstate; |
---|
1606 | |
---|
1607 | |
---|
1608 | /*-----------------------------------------------------------. |
---|
1609 | | yydefault -- do the default action for the current state. | |
---|
1610 | `-----------------------------------------------------------*/ |
---|
1611 | yydefault: |
---|
1612 | yyn = yydefact[yystate]; |
---|
1613 | if (yyn == 0) |
---|
1614 | goto yyerrlab; |
---|
1615 | goto yyreduce; |
---|
1616 | |
---|
1617 | |
---|
1618 | /*-----------------------------. |
---|
1619 | | yyreduce -- Do a reduction. | |
---|
1620 | `-----------------------------*/ |
---|
1621 | yyreduce: |
---|
1622 | /* yyn is the number of a rule to reduce with. */ |
---|
1623 | yylen = yyr2[yyn]; |
---|
1624 | |
---|
1625 | /* If YYLEN is nonzero, implement the default value of the action: |
---|
1626 | `$$ = $1'. |
---|
1627 | |
---|
1628 | Otherwise, the following line sets YYVAL to garbage. |
---|
1629 | This behavior is undocumented and Bison |
---|
1630 | users should not rely upon it. Assigning to YYVAL |
---|
1631 | unconditionally makes the parser a bit smaller, and it avoids a |
---|
1632 | GCC warning that YYVAL may be used uninitialized. */ |
---|
1633 | yyval = yyvsp[1-yylen]; |
---|
1634 | |
---|
1635 | |
---|
1636 | YY_REDUCE_PRINT (yyn); |
---|
1637 | switch (yyn) |
---|
1638 | { |
---|
1639 | case 4: |
---|
1640 | /* Line 1792 of yacc.c */ |
---|
1641 | #line 100 "scan.y" |
---|
1642 | { CmdJacobian( (yyvsp[(2) - (2)].str) ); |
---|
1643 | } |
---|
1644 | break; |
---|
1645 | |
---|
1646 | case 5: |
---|
1647 | /* Line 1792 of yacc.c */ |
---|
1648 | #line 103 "scan.y" |
---|
1649 | { CmdHessian( (yyvsp[(2) - (2)].str) ); |
---|
1650 | } |
---|
1651 | break; |
---|
1652 | |
---|
1653 | case 6: |
---|
1654 | /* Line 1792 of yacc.c */ |
---|
1655 | #line 106 "scan.y" |
---|
1656 | { CmdDeclareValues( (yyvsp[(2) - (2)].str) ); |
---|
1657 | } |
---|
1658 | break; |
---|
1659 | |
---|
1660 | case 7: |
---|
1661 | /* Line 1792 of yacc.c */ |
---|
1662 | #line 109 "scan.y" |
---|
1663 | { CmdStoicmat( (yyvsp[(2) - (2)].str) ); |
---|
1664 | } |
---|
1665 | break; |
---|
1666 | |
---|
1667 | case 8: |
---|
1668 | /* Line 1792 of yacc.c */ |
---|
1669 | #line 112 "scan.y" |
---|
1670 | { CmdDouble( (yyvsp[(2) - (2)].str) ); |
---|
1671 | } |
---|
1672 | break; |
---|
1673 | |
---|
1674 | case 9: |
---|
1675 | /* Line 1792 of yacc.c */ |
---|
1676 | #line 115 "scan.y" |
---|
1677 | { CmdReorder( (yyvsp[(2) - (2)].str) ); |
---|
1678 | } |
---|
1679 | break; |
---|
1680 | |
---|
1681 | case 10: |
---|
1682 | /* Line 1792 of yacc.c */ |
---|
1683 | #line 118 "scan.y" |
---|
1684 | { CmdMex( (yyvsp[(2) - (2)].str) ); |
---|
1685 | } |
---|
1686 | break; |
---|
1687 | |
---|
1688 | case 11: |
---|
1689 | /* Line 1792 of yacc.c */ |
---|
1690 | #line 121 "scan.y" |
---|
1691 | { CmdDummyindex( (yyvsp[(2) - (2)].str) ); |
---|
1692 | } |
---|
1693 | break; |
---|
1694 | |
---|
1695 | case 12: |
---|
1696 | /* Line 1792 of yacc.c */ |
---|
1697 | #line 124 "scan.y" |
---|
1698 | { CmdEqntags( (yyvsp[(2) - (2)].str) ); |
---|
1699 | } |
---|
1700 | break; |
---|
1701 | |
---|
1702 | case 13: |
---|
1703 | /* Line 1792 of yacc.c */ |
---|
1704 | #line 127 "scan.y" |
---|
1705 | { CmdFunction( (yyvsp[(2) - (2)].str) ); |
---|
1706 | } |
---|
1707 | break; |
---|
1708 | |
---|
1709 | case 14: |
---|
1710 | /* Line 1792 of yacc.c */ |
---|
1711 | #line 130 "scan.y" |
---|
1712 | { CmdStochastic( (yyvsp[(2) - (2)].str) ); |
---|
1713 | } |
---|
1714 | break; |
---|
1715 | |
---|
1716 | case 15: |
---|
1717 | /* Line 1792 of yacc.c */ |
---|
1718 | #line 133 "scan.y" |
---|
1719 | {} |
---|
1720 | break; |
---|
1721 | |
---|
1722 | case 16: |
---|
1723 | /* Line 1792 of yacc.c */ |
---|
1724 | #line 135 "scan.y" |
---|
1725 | {} |
---|
1726 | break; |
---|
1727 | |
---|
1728 | case 17: |
---|
1729 | /* Line 1792 of yacc.c */ |
---|
1730 | #line 137 "scan.y" |
---|
1731 | {} |
---|
1732 | break; |
---|
1733 | |
---|
1734 | case 18: |
---|
1735 | /* Line 1792 of yacc.c */ |
---|
1736 | #line 139 "scan.y" |
---|
1737 | {} |
---|
1738 | break; |
---|
1739 | |
---|
1740 | case 19: |
---|
1741 | /* Line 1792 of yacc.c */ |
---|
1742 | #line 141 "scan.y" |
---|
1743 | {} |
---|
1744 | break; |
---|
1745 | |
---|
1746 | case 20: |
---|
1747 | /* Line 1792 of yacc.c */ |
---|
1748 | #line 143 "scan.y" |
---|
1749 | {} |
---|
1750 | break; |
---|
1751 | |
---|
1752 | case 21: |
---|
1753 | /* Line 1792 of yacc.c */ |
---|
1754 | #line 145 "scan.y" |
---|
1755 | {} |
---|
1756 | break; |
---|
1757 | |
---|
1758 | case 22: |
---|
1759 | /* Line 1792 of yacc.c */ |
---|
1760 | #line 147 "scan.y" |
---|
1761 | {} |
---|
1762 | break; |
---|
1763 | |
---|
1764 | case 23: |
---|
1765 | /* Line 1792 of yacc.c */ |
---|
1766 | #line 149 "scan.y" |
---|
1767 | {} |
---|
1768 | break; |
---|
1769 | |
---|
1770 | case 24: |
---|
1771 | /* Line 1792 of yacc.c */ |
---|
1772 | #line 151 "scan.y" |
---|
1773 | {} |
---|
1774 | break; |
---|
1775 | |
---|
1776 | case 25: |
---|
1777 | /* Line 1792 of yacc.c */ |
---|
1778 | #line 153 "scan.y" |
---|
1779 | {} |
---|
1780 | break; |
---|
1781 | |
---|
1782 | case 26: |
---|
1783 | /* Line 1792 of yacc.c */ |
---|
1784 | #line 155 "scan.y" |
---|
1785 | {} |
---|
1786 | break; |
---|
1787 | |
---|
1788 | case 27: |
---|
1789 | /* Line 1792 of yacc.c */ |
---|
1790 | #line 157 "scan.y" |
---|
1791 | {} |
---|
1792 | break; |
---|
1793 | |
---|
1794 | case 28: |
---|
1795 | /* Line 1792 of yacc.c */ |
---|
1796 | #line 159 "scan.y" |
---|
1797 | {} |
---|
1798 | break; |
---|
1799 | |
---|
1800 | case 29: |
---|
1801 | /* Line 1792 of yacc.c */ |
---|
1802 | #line 161 "scan.y" |
---|
1803 | { CheckAll(); } |
---|
1804 | break; |
---|
1805 | |
---|
1806 | case 30: |
---|
1807 | /* Line 1792 of yacc.c */ |
---|
1808 | #line 163 "scan.y" |
---|
1809 | { LookAtAll(); } |
---|
1810 | break; |
---|
1811 | |
---|
1812 | case 31: |
---|
1813 | /* Line 1792 of yacc.c */ |
---|
1814 | #line 165 "scan.y" |
---|
1815 | { TransportAll(); } |
---|
1816 | break; |
---|
1817 | |
---|
1818 | case 32: |
---|
1819 | /* Line 1792 of yacc.c */ |
---|
1820 | #line 167 "scan.y" |
---|
1821 | { WriteAtoms(); } |
---|
1822 | break; |
---|
1823 | |
---|
1824 | case 33: |
---|
1825 | /* Line 1792 of yacc.c */ |
---|
1826 | #line 169 "scan.y" |
---|
1827 | { WriteSpecies(); } |
---|
1828 | break; |
---|
1829 | |
---|
1830 | case 34: |
---|
1831 | /* Line 1792 of yacc.c */ |
---|
1832 | #line 171 "scan.y" |
---|
1833 | { WriteMatrices(); } |
---|
1834 | break; |
---|
1835 | |
---|
1836 | case 35: |
---|
1837 | /* Line 1792 of yacc.c */ |
---|
1838 | #line 173 "scan.y" |
---|
1839 | { WriteOptions(); } |
---|
1840 | break; |
---|
1841 | |
---|
1842 | case 36: |
---|
1843 | /* Line 1792 of yacc.c */ |
---|
1844 | #line 175 "scan.y" |
---|
1845 | { CmdUse( (yyvsp[(2) - (2)].str) ); } |
---|
1846 | break; |
---|
1847 | |
---|
1848 | case 37: |
---|
1849 | /* Line 1792 of yacc.c */ |
---|
1850 | #line 177 "scan.y" |
---|
1851 | { CmdLanguage( (yyvsp[(2) - (2)].str) ); } |
---|
1852 | break; |
---|
1853 | |
---|
1854 | case 38: |
---|
1855 | /* Line 1792 of yacc.c */ |
---|
1856 | #line 179 "scan.y" |
---|
1857 | { DefineInitializeNbr( (yyvsp[(2) - (2)].str) ); } |
---|
1858 | break; |
---|
1859 | |
---|
1860 | case 39: |
---|
1861 | /* Line 1792 of yacc.c */ |
---|
1862 | #line 181 "scan.y" |
---|
1863 | { DefineXGrid( (yyvsp[(2) - (2)].str) ); } |
---|
1864 | break; |
---|
1865 | |
---|
1866 | case 40: |
---|
1867 | /* Line 1792 of yacc.c */ |
---|
1868 | #line 183 "scan.y" |
---|
1869 | { DefineYGrid( (yyvsp[(2) - (2)].str) ); } |
---|
1870 | break; |
---|
1871 | |
---|
1872 | case 41: |
---|
1873 | /* Line 1792 of yacc.c */ |
---|
1874 | #line 185 "scan.y" |
---|
1875 | { DefineZGrid( (yyvsp[(2) - (2)].str) ); } |
---|
1876 | break; |
---|
1877 | |
---|
1878 | case 42: |
---|
1879 | /* Line 1792 of yacc.c */ |
---|
1880 | #line 187 "scan.y" |
---|
1881 | { |
---|
1882 | AddInlineCode( (yyvsp[(2) - (4)].str), InlineBuf ); |
---|
1883 | free( InlineBuf ); |
---|
1884 | } |
---|
1885 | break; |
---|
1886 | |
---|
1887 | case 43: |
---|
1888 | /* Line 1792 of yacc.c */ |
---|
1889 | #line 192 "scan.y" |
---|
1890 | { ParserErrorMessage(); } |
---|
1891 | break; |
---|
1892 | |
---|
1893 | case 44: |
---|
1894 | /* Line 1792 of yacc.c */ |
---|
1895 | #line 194 "scan.y" |
---|
1896 | { CmdIntegrator( (yyvsp[(2) - (2)].str) ); } |
---|
1897 | break; |
---|
1898 | |
---|
1899 | case 45: |
---|
1900 | /* Line 1792 of yacc.c */ |
---|
1901 | #line 196 "scan.y" |
---|
1902 | { CmdDriver( (yyvsp[(2) - (2)].str) ); } |
---|
1903 | break; |
---|
1904 | |
---|
1905 | case 46: |
---|
1906 | /* Line 1792 of yacc.c */ |
---|
1907 | #line 198 "scan.y" |
---|
1908 | { CmdRun( (yyvsp[(2) - (2)].str) ); } |
---|
1909 | break; |
---|
1910 | |
---|
1911 | case 47: |
---|
1912 | /* Line 1792 of yacc.c */ |
---|
1913 | #line 200 "scan.y" |
---|
1914 | {} |
---|
1915 | break; |
---|
1916 | |
---|
1917 | case 48: |
---|
1918 | /* Line 1792 of yacc.c */ |
---|
1919 | #line 202 "scan.y" |
---|
1920 | { SparseData( (yyvsp[(2) - (2)].str) ); |
---|
1921 | } |
---|
1922 | break; |
---|
1923 | |
---|
1924 | case 49: |
---|
1925 | /* Line 1792 of yacc.c */ |
---|
1926 | #line 206 "scan.y" |
---|
1927 | { ScanWarning("Unnecessary ';'"); |
---|
1928 | } |
---|
1929 | break; |
---|
1930 | |
---|
1931 | case 53: |
---|
1932 | /* Line 1792 of yacc.c */ |
---|
1933 | #line 213 "scan.y" |
---|
1934 | { ParserErrorMessage(); } |
---|
1935 | break; |
---|
1936 | |
---|
1937 | case 54: |
---|
1938 | /* Line 1792 of yacc.c */ |
---|
1939 | #line 216 "scan.y" |
---|
1940 | { switch( crt_section ) { |
---|
1941 | case ATOMDECL: DeclareAtom( (yyvsp[(1) - (1)].str) ); break; |
---|
1942 | case CHECK: SetAtomType( (yyvsp[(1) - (1)].str), DO_CHECK ); break; |
---|
1943 | } |
---|
1944 | } |
---|
1945 | break; |
---|
1946 | |
---|
1947 | case 57: |
---|
1948 | /* Line 1792 of yacc.c */ |
---|
1949 | #line 225 "scan.y" |
---|
1950 | { ParserErrorMessage(); } |
---|
1951 | break; |
---|
1952 | |
---|
1953 | case 58: |
---|
1954 | /* Line 1792 of yacc.c */ |
---|
1955 | #line 228 "scan.y" |
---|
1956 | { AddLookAt( (yyvsp[(1) - (1)].str) ); |
---|
1957 | } |
---|
1958 | break; |
---|
1959 | |
---|
1960 | case 61: |
---|
1961 | /* Line 1792 of yacc.c */ |
---|
1962 | #line 234 "scan.y" |
---|
1963 | { ParserErrorMessage(); } |
---|
1964 | break; |
---|
1965 | |
---|
1966 | case 62: |
---|
1967 | /* Line 1792 of yacc.c */ |
---|
1968 | #line 237 "scan.y" |
---|
1969 | { AddMonitor( (yyvsp[(1) - (1)].str) ); |
---|
1970 | } |
---|
1971 | break; |
---|
1972 | |
---|
1973 | case 65: |
---|
1974 | /* Line 1792 of yacc.c */ |
---|
1975 | #line 243 "scan.y" |
---|
1976 | { ParserErrorMessage(); } |
---|
1977 | break; |
---|
1978 | |
---|
1979 | case 66: |
---|
1980 | /* Line 1792 of yacc.c */ |
---|
1981 | #line 246 "scan.y" |
---|
1982 | { AddTransport( (yyvsp[(1) - (1)].str) ); |
---|
1983 | } |
---|
1984 | break; |
---|
1985 | |
---|
1986 | case 69: |
---|
1987 | /* Line 1792 of yacc.c */ |
---|
1988 | #line 252 "scan.y" |
---|
1989 | { ParserErrorMessage(); } |
---|
1990 | break; |
---|
1991 | |
---|
1992 | case 70: |
---|
1993 | /* Line 1792 of yacc.c */ |
---|
1994 | #line 255 "scan.y" |
---|
1995 | { AddUseFile( (yyvsp[(1) - (1)].str) ); |
---|
1996 | } |
---|
1997 | break; |
---|
1998 | |
---|
1999 | case 73: |
---|
2000 | /* Line 1792 of yacc.c */ |
---|
2001 | #line 261 "scan.y" |
---|
2002 | { ParserErrorMessage(); } |
---|
2003 | break; |
---|
2004 | |
---|
2005 | case 74: |
---|
2006 | /* Line 1792 of yacc.c */ |
---|
2007 | #line 264 "scan.y" |
---|
2008 | { switch( crt_section ) { |
---|
2009 | case SETVAR: SetSpcType( VAR_SPC, (yyvsp[(1) - (1)].str) ); break; |
---|
2010 | case SETRAD: SetSpcType( RAD_SPC, (yyvsp[(1) - (1)].str) ); break; |
---|
2011 | case SETFIX: SetSpcType( FIX_SPC, (yyvsp[(1) - (1)].str) ); break; |
---|
2012 | } |
---|
2013 | } |
---|
2014 | break; |
---|
2015 | |
---|
2016 | case 77: |
---|
2017 | /* Line 1792 of yacc.c */ |
---|
2018 | #line 274 "scan.y" |
---|
2019 | { ParserErrorMessage(); } |
---|
2020 | break; |
---|
2021 | |
---|
2022 | case 80: |
---|
2023 | /* Line 1792 of yacc.c */ |
---|
2024 | #line 280 "scan.y" |
---|
2025 | { switch( crt_section ) { |
---|
2026 | case DEFVAR: DeclareSpecies( VAR_SPC, (yyvsp[(1) - (3)].str) ); break; |
---|
2027 | case DEFRAD: DeclareSpecies( RAD_SPC, (yyvsp[(1) - (3)].str) ); break; |
---|
2028 | case DEFFIX: DeclareSpecies( FIX_SPC, (yyvsp[(1) - (3)].str) ); break; |
---|
2029 | } |
---|
2030 | } |
---|
2031 | break; |
---|
2032 | |
---|
2033 | case 81: |
---|
2034 | /* Line 1792 of yacc.c */ |
---|
2035 | #line 288 "scan.y" |
---|
2036 | { switch( crt_section ) { |
---|
2037 | case DEFVAR: DeclareSpecies( VAR_SPC, (yyvsp[(1) - (1)].str) ); break; |
---|
2038 | case DEFRAD: DeclareSpecies( RAD_SPC, (yyvsp[(1) - (1)].str) ); break; |
---|
2039 | case DEFFIX: DeclareSpecies( FIX_SPC, (yyvsp[(1) - (1)].str) ); break; |
---|
2040 | } |
---|
2041 | } |
---|
2042 | break; |
---|
2043 | |
---|
2044 | case 84: |
---|
2045 | /* Line 1792 of yacc.c */ |
---|
2046 | #line 299 "scan.y" |
---|
2047 | { AddAtom( (yyvsp[(2) - (2)].str), (yyvsp[(1) - (2)].str) ); |
---|
2048 | } |
---|
2049 | break; |
---|
2050 | |
---|
2051 | case 85: |
---|
2052 | /* Line 1792 of yacc.c */ |
---|
2053 | #line 302 "scan.y" |
---|
2054 | { AddAtom( (yyvsp[(1) - (1)].str), "1" ); |
---|
2055 | } |
---|
2056 | break; |
---|
2057 | |
---|
2058 | case 88: |
---|
2059 | /* Line 1792 of yacc.c */ |
---|
2060 | #line 308 "scan.y" |
---|
2061 | { ParserErrorMessage(); } |
---|
2062 | break; |
---|
2063 | |
---|
2064 | case 89: |
---|
2065 | /* Line 1792 of yacc.c */ |
---|
2066 | #line 311 "scan.y" |
---|
2067 | { AssignInitialValue( (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str) ); } |
---|
2068 | break; |
---|
2069 | |
---|
2070 | case 92: |
---|
2071 | /* Line 1792 of yacc.c */ |
---|
2072 | #line 316 "scan.y" |
---|
2073 | { ParserErrorMessage(); |
---|
2074 | eqState = LHS; |
---|
2075 | } |
---|
2076 | break; |
---|
2077 | |
---|
2078 | case 93: |
---|
2079 | /* Line 1792 of yacc.c */ |
---|
2080 | #line 321 "scan.y" |
---|
2081 | { eqState = LHS; |
---|
2082 | StoreEquationRate( (yyvsp[(4) - (4)].str), (yyvsp[(1) - (4)].str) ); |
---|
2083 | CheckEquation(); |
---|
2084 | } |
---|
2085 | break; |
---|
2086 | |
---|
2087 | case 94: |
---|
2088 | /* Line 1792 of yacc.c */ |
---|
2089 | #line 326 "scan.y" |
---|
2090 | { eqState = LHS; |
---|
2091 | StoreEquationRate( (yyvsp[(3) - (3)].str), " " ); |
---|
2092 | CheckEquation(); |
---|
2093 | } |
---|
2094 | break; |
---|
2095 | |
---|
2096 | case 95: |
---|
2097 | /* Line 1792 of yacc.c */ |
---|
2098 | #line 331 "scan.y" |
---|
2099 | { strcpy( (yyval.str), (yyvsp[(1) - (2)].str) ); |
---|
2100 | strcat( (yyval.str), (yyvsp[(2) - (2)].str) ); |
---|
2101 | } |
---|
2102 | break; |
---|
2103 | |
---|
2104 | case 96: |
---|
2105 | /* Line 1792 of yacc.c */ |
---|
2106 | #line 335 "scan.y" |
---|
2107 | { strcpy( (yyval.str), (yyvsp[(1) - (1)].str) ); |
---|
2108 | } |
---|
2109 | break; |
---|
2110 | |
---|
2111 | case 97: |
---|
2112 | /* Line 1792 of yacc.c */ |
---|
2113 | #line 339 "scan.y" |
---|
2114 | { strcpy( (yyval.str), (yyvsp[(2) - (3)].str) ); |
---|
2115 | } |
---|
2116 | break; |
---|
2117 | |
---|
2118 | case 98: |
---|
2119 | /* Line 1792 of yacc.c */ |
---|
2120 | #line 343 "scan.y" |
---|
2121 | { eqState = RHS; } |
---|
2122 | break; |
---|
2123 | |
---|
2124 | case 99: |
---|
2125 | /* Line 1792 of yacc.c */ |
---|
2126 | #line 346 "scan.y" |
---|
2127 | { eqState = RAT; } |
---|
2128 | break; |
---|
2129 | |
---|
2130 | case 100: |
---|
2131 | /* Line 1792 of yacc.c */ |
---|
2132 | #line 349 "scan.y" |
---|
2133 | { ProcessTerm( eqState, (yyvsp[(2) - (3)].str), crt_coef, crt_term ); |
---|
2134 | } |
---|
2135 | break; |
---|
2136 | |
---|
2137 | case 101: |
---|
2138 | /* Line 1792 of yacc.c */ |
---|
2139 | #line 352 "scan.y" |
---|
2140 | { ProcessTerm( eqState, (yyvsp[(1) - (2)].str), crt_coef, crt_term ); |
---|
2141 | } |
---|
2142 | break; |
---|
2143 | |
---|
2144 | case 102: |
---|
2145 | /* Line 1792 of yacc.c */ |
---|
2146 | #line 355 "scan.y" |
---|
2147 | { ProcessTerm( eqState, "+", crt_coef, crt_term ); |
---|
2148 | } |
---|
2149 | break; |
---|
2150 | |
---|
2151 | case 103: |
---|
2152 | /* Line 1792 of yacc.c */ |
---|
2153 | #line 359 "scan.y" |
---|
2154 | { strcpy( crt_term, (yyvsp[(2) - (2)].str) ); |
---|
2155 | strcpy( crt_coef, (yyvsp[(1) - (2)].str) ); |
---|
2156 | } |
---|
2157 | break; |
---|
2158 | |
---|
2159 | case 104: |
---|
2160 | /* Line 1792 of yacc.c */ |
---|
2161 | #line 363 "scan.y" |
---|
2162 | { strcpy( crt_term, (yyvsp[(1) - (1)].str) ); |
---|
2163 | strcpy( crt_coef, "1" ); |
---|
2164 | } |
---|
2165 | break; |
---|
2166 | |
---|
2167 | case 107: |
---|
2168 | /* Line 1792 of yacc.c */ |
---|
2169 | #line 370 "scan.y" |
---|
2170 | { ParserErrorMessage(); } |
---|
2171 | break; |
---|
2172 | |
---|
2173 | case 108: |
---|
2174 | /* Line 1792 of yacc.c */ |
---|
2175 | #line 373 "scan.y" |
---|
2176 | { AddLumpSpecies( (yyvsp[(1) - (3)].str) ); |
---|
2177 | } |
---|
2178 | break; |
---|
2179 | |
---|
2180 | case 109: |
---|
2181 | /* Line 1792 of yacc.c */ |
---|
2182 | #line 376 "scan.y" |
---|
2183 | { |
---|
2184 | AddLumpSpecies( (yyvsp[(1) - (3)].str) ); |
---|
2185 | CheckLump( (yyvsp[(3) - (3)].str) ); |
---|
2186 | } |
---|
2187 | break; |
---|
2188 | |
---|
2189 | case 110: |
---|
2190 | /* Line 1792 of yacc.c */ |
---|
2191 | #line 381 "scan.y" |
---|
2192 | { |
---|
2193 | InlineBuf = AppendString( InlineBuf, (yyvsp[(2) - (2)].str), &InlineLen, MAX_INLINE ); |
---|
2194 | } |
---|
2195 | break; |
---|
2196 | |
---|
2197 | case 111: |
---|
2198 | /* Line 1792 of yacc.c */ |
---|
2199 | #line 385 "scan.y" |
---|
2200 | { |
---|
2201 | InlineBuf = malloc( MAX_INLINE ); |
---|
2202 | InlineLen = MAX_INLINE; |
---|
2203 | strcpy( InlineBuf, (yyvsp[(1) - (1)].str)); |
---|
2204 | } |
---|
2205 | break; |
---|
2206 | |
---|
2207 | |
---|
2208 | /* Line 1792 of yacc.c */ |
---|
2209 | #line 2210 "y.tab.c" |
---|
2210 | default: break; |
---|
2211 | } |
---|
2212 | /* User semantic actions sometimes alter yychar, and that requires |
---|
2213 | that yytoken be updated with the new translation. We take the |
---|
2214 | approach of translating immediately before every use of yytoken. |
---|
2215 | One alternative is translating here after every semantic action, |
---|
2216 | but that translation would be missed if the semantic action invokes |
---|
2217 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
---|
2218 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
---|
2219 | incorrect destructor might then be invoked immediately. In the |
---|
2220 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
---|
2221 | to an incorrect destructor call or verbose syntax error message |
---|
2222 | before the lookahead is translated. */ |
---|
2223 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
---|
2224 | |
---|
2225 | YYPOPSTACK (yylen); |
---|
2226 | yylen = 0; |
---|
2227 | YY_STACK_PRINT (yyss, yyssp); |
---|
2228 | |
---|
2229 | *++yyvsp = yyval; |
---|
2230 | |
---|
2231 | /* Now `shift' the result of the reduction. Determine what state |
---|
2232 | that goes to, based on the state we popped back to and the rule |
---|
2233 | number reduced by. */ |
---|
2234 | |
---|
2235 | yyn = yyr1[yyn]; |
---|
2236 | |
---|
2237 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
---|
2238 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
---|
2239 | yystate = yytable[yystate]; |
---|
2240 | else |
---|
2241 | yystate = yydefgoto[yyn - YYNTOKENS]; |
---|
2242 | |
---|
2243 | goto yynewstate; |
---|
2244 | |
---|
2245 | |
---|
2246 | /*------------------------------------. |
---|
2247 | | yyerrlab -- here on detecting error | |
---|
2248 | `------------------------------------*/ |
---|
2249 | yyerrlab: |
---|
2250 | /* Make sure we have latest lookahead translation. See comments at |
---|
2251 | user semantic actions for why this is necessary. */ |
---|
2252 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
---|
2253 | |
---|
2254 | /* If not already recovering from an error, report this error. */ |
---|
2255 | if (!yyerrstatus) |
---|
2256 | { |
---|
2257 | ++yynerrs; |
---|
2258 | #if ! YYERROR_VERBOSE |
---|
2259 | yyerror (YY_("syntax error")); |
---|
2260 | #else |
---|
2261 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
---|
2262 | yyssp, yytoken) |
---|
2263 | { |
---|
2264 | char const *yymsgp = YY_("syntax error"); |
---|
2265 | int yysyntax_error_status; |
---|
2266 | yysyntax_error_status = YYSYNTAX_ERROR; |
---|
2267 | if (yysyntax_error_status == 0) |
---|
2268 | yymsgp = yymsg; |
---|
2269 | else if (yysyntax_error_status == 1) |
---|
2270 | { |
---|
2271 | if (yymsg != yymsgbuf) |
---|
2272 | YYSTACK_FREE (yymsg); |
---|
2273 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
---|
2274 | if (!yymsg) |
---|
2275 | { |
---|
2276 | yymsg = yymsgbuf; |
---|
2277 | yymsg_alloc = sizeof yymsgbuf; |
---|
2278 | yysyntax_error_status = 2; |
---|
2279 | } |
---|
2280 | else |
---|
2281 | { |
---|
2282 | yysyntax_error_status = YYSYNTAX_ERROR; |
---|
2283 | yymsgp = yymsg; |
---|
2284 | } |
---|
2285 | } |
---|
2286 | yyerror (yymsgp); |
---|
2287 | if (yysyntax_error_status == 2) |
---|
2288 | goto yyexhaustedlab; |
---|
2289 | } |
---|
2290 | # undef YYSYNTAX_ERROR |
---|
2291 | #endif |
---|
2292 | } |
---|
2293 | |
---|
2294 | |
---|
2295 | |
---|
2296 | if (yyerrstatus == 3) |
---|
2297 | { |
---|
2298 | /* If just tried and failed to reuse lookahead token after an |
---|
2299 | error, discard it. */ |
---|
2300 | |
---|
2301 | if (yychar <= YYEOF) |
---|
2302 | { |
---|
2303 | /* Return failure if at end of input. */ |
---|
2304 | if (yychar == YYEOF) |
---|
2305 | YYABORT; |
---|
2306 | } |
---|
2307 | else |
---|
2308 | { |
---|
2309 | yydestruct ("Error: discarding", |
---|
2310 | yytoken, &yylval); |
---|
2311 | yychar = YYEMPTY; |
---|
2312 | } |
---|
2313 | } |
---|
2314 | |
---|
2315 | /* Else will try to reuse lookahead token after shifting the error |
---|
2316 | token. */ |
---|
2317 | goto yyerrlab1; |
---|
2318 | |
---|
2319 | |
---|
2320 | /*---------------------------------------------------. |
---|
2321 | | yyerrorlab -- error raised explicitly by YYERROR. | |
---|
2322 | `---------------------------------------------------*/ |
---|
2323 | yyerrorlab: |
---|
2324 | |
---|
2325 | /* Pacify compilers like GCC when the user code never invokes |
---|
2326 | YYERROR and the label yyerrorlab therefore never appears in user |
---|
2327 | code. */ |
---|
2328 | if (/*CONSTCOND*/ 0) |
---|
2329 | goto yyerrorlab; |
---|
2330 | |
---|
2331 | /* Do not reclaim the symbols of the rule which action triggered |
---|
2332 | this YYERROR. */ |
---|
2333 | YYPOPSTACK (yylen); |
---|
2334 | yylen = 0; |
---|
2335 | YY_STACK_PRINT (yyss, yyssp); |
---|
2336 | yystate = *yyssp; |
---|
2337 | goto yyerrlab1; |
---|
2338 | |
---|
2339 | |
---|
2340 | /*-------------------------------------------------------------. |
---|
2341 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
---|
2342 | `-------------------------------------------------------------*/ |
---|
2343 | yyerrlab1: |
---|
2344 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
---|
2345 | |
---|
2346 | for (;;) |
---|
2347 | { |
---|
2348 | yyn = yypact[yystate]; |
---|
2349 | if (!yypact_value_is_default (yyn)) |
---|
2350 | { |
---|
2351 | yyn += YYTERROR; |
---|
2352 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
---|
2353 | { |
---|
2354 | yyn = yytable[yyn]; |
---|
2355 | if (0 < yyn) |
---|
2356 | break; |
---|
2357 | } |
---|
2358 | } |
---|
2359 | |
---|
2360 | /* Pop the current state because it cannot handle the error token. */ |
---|
2361 | if (yyssp == yyss) |
---|
2362 | YYABORT; |
---|
2363 | |
---|
2364 | |
---|
2365 | yydestruct ("Error: popping", |
---|
2366 | yystos[yystate], yyvsp); |
---|
2367 | YYPOPSTACK (1); |
---|
2368 | yystate = *yyssp; |
---|
2369 | YY_STACK_PRINT (yyss, yyssp); |
---|
2370 | } |
---|
2371 | |
---|
2372 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
---|
2373 | *++yyvsp = yylval; |
---|
2374 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
---|
2375 | |
---|
2376 | |
---|
2377 | /* Shift the error token. */ |
---|
2378 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
---|
2379 | |
---|
2380 | yystate = yyn; |
---|
2381 | goto yynewstate; |
---|
2382 | |
---|
2383 | |
---|
2384 | /*-------------------------------------. |
---|
2385 | | yyacceptlab -- YYACCEPT comes here. | |
---|
2386 | `-------------------------------------*/ |
---|
2387 | yyacceptlab: |
---|
2388 | yyresult = 0; |
---|
2389 | goto yyreturn; |
---|
2390 | |
---|
2391 | /*-----------------------------------. |
---|
2392 | | yyabortlab -- YYABORT comes here. | |
---|
2393 | `-----------------------------------*/ |
---|
2394 | yyabortlab: |
---|
2395 | yyresult = 1; |
---|
2396 | goto yyreturn; |
---|
2397 | |
---|
2398 | #if !defined yyoverflow || YYERROR_VERBOSE |
---|
2399 | /*-------------------------------------------------. |
---|
2400 | | yyexhaustedlab -- memory exhaustion comes here. | |
---|
2401 | `-------------------------------------------------*/ |
---|
2402 | yyexhaustedlab: |
---|
2403 | yyerror (YY_("memory exhausted")); |
---|
2404 | yyresult = 2; |
---|
2405 | /* Fall through. */ |
---|
2406 | #endif |
---|
2407 | |
---|
2408 | yyreturn: |
---|
2409 | if (yychar != YYEMPTY) |
---|
2410 | { |
---|
2411 | /* Make sure we have latest lookahead translation. See comments at |
---|
2412 | user semantic actions for why this is necessary. */ |
---|
2413 | yytoken = YYTRANSLATE (yychar); |
---|
2414 | yydestruct ("Cleanup: discarding lookahead", |
---|
2415 | yytoken, &yylval); |
---|
2416 | } |
---|
2417 | /* Do not reclaim the symbols of the rule which action triggered |
---|
2418 | this YYABORT or YYACCEPT. */ |
---|
2419 | YYPOPSTACK (yylen); |
---|
2420 | YY_STACK_PRINT (yyss, yyssp); |
---|
2421 | while (yyssp != yyss) |
---|
2422 | { |
---|
2423 | yydestruct ("Cleanup: popping", |
---|
2424 | yystos[*yyssp], yyvsp); |
---|
2425 | YYPOPSTACK (1); |
---|
2426 | } |
---|
2427 | #ifndef yyoverflow |
---|
2428 | if (yyss != yyssa) |
---|
2429 | YYSTACK_FREE (yyss); |
---|
2430 | #endif |
---|
2431 | #if YYERROR_VERBOSE |
---|
2432 | if (yymsg != yymsgbuf) |
---|
2433 | YYSTACK_FREE (yymsg); |
---|
2434 | #endif |
---|
2435 | /* Make sure YYID is used. */ |
---|
2436 | return YYID (yyresult); |
---|
2437 | } |
---|
2438 | |
---|
2439 | |
---|
2440 | /* Line 2055 of yacc.c */ |
---|
2441 | #line 391 "scan.y" |
---|
2442 | |
---|
2443 | |
---|
2444 | void yyerror( char * str ) |
---|
2445 | { |
---|
2446 | } |
---|
2447 | |
---|
2448 | void ParserErrorMessage() |
---|
2449 | { |
---|
2450 | /* yyerrok; */ |
---|
2451 | /* |
---|
2452 | Message("[%d,%s] -> [%d,%s]", crtTokType, crtToken, nextTokType, nextToken ); |
---|
2453 | */ |
---|
2454 | if( crtToken[0] == ';' ) { |
---|
2455 | ParserError("Misplaced ';'"); |
---|
2456 | return; |
---|
2457 | } |
---|
2458 | switch( crtTokType ) { |
---|
2459 | case ATOMID: |
---|
2460 | ParserError("Missing ';' after '%s'", crtToken ); |
---|
2461 | break; |
---|
2462 | |
---|
2463 | case SPCSPC: |
---|
2464 | ParserError("Missing ';' or '+' after '%s'", crtToken ); |
---|
2465 | break; |
---|
2466 | case SPCNR: |
---|
2467 | ParserError("Missing species after '%s'", crtToken ); |
---|
2468 | break; |
---|
2469 | case SPCPLUS: |
---|
2470 | ParserError("Missing atom after '%s'", crtToken ); |
---|
2471 | break; |
---|
2472 | case SPCEQUAL: |
---|
2473 | ParserError("Invalid '=' after '%s'", crtToken ); |
---|
2474 | break; |
---|
2475 | |
---|
2476 | case INISPC: |
---|
2477 | ParserError("Missing '=' after '%s'", crtToken ); |
---|
2478 | break; |
---|
2479 | case INIEQUAL: |
---|
2480 | ParserError("Missing value after '%s'", crtToken ); |
---|
2481 | break; |
---|
2482 | case INIVALUE: |
---|
2483 | ParserError("Missing ';' after '%s'", crtToken ); |
---|
2484 | break; |
---|
2485 | |
---|
2486 | case EQNSPC: |
---|
2487 | ParserError("Missing '+' or '=' after '%s'", crtToken ); |
---|
2488 | break; |
---|
2489 | case EQNEQUAL: |
---|
2490 | ParserError("Invalid right hand side of equation"); |
---|
2491 | break; |
---|
2492 | case EQNCOLON: |
---|
2493 | ParserError("Missing rate after '%s'", crtToken ); |
---|
2494 | break; |
---|
2495 | case EQNSIGN: |
---|
2496 | ParserError("Missing coeficient after '%s'", crtToken ); |
---|
2497 | break; |
---|
2498 | case EQNCOEF: |
---|
2499 | ParserError("Missing species after '%s'", crtToken ); |
---|
2500 | break; |
---|
2501 | case RATE: |
---|
2502 | ParserError("Missing ';' after '%s'", crtToken ); |
---|
2503 | break; |
---|
2504 | |
---|
2505 | case LMPSPC: |
---|
2506 | ParserError("Missing '+' or ':' or ';' after '%s'", crtToken ); |
---|
2507 | break; |
---|
2508 | case LMPPLUS: |
---|
2509 | ParserError("Missing species after '%s'", crtToken ); |
---|
2510 | break; |
---|
2511 | case LMPCOLON: |
---|
2512 | ParserError("Missing species after '%s'", crtToken ); |
---|
2513 | break; |
---|
2514 | case INLINE: |
---|
2515 | ParserError("Missing inline option after '%s'", crtToken ); |
---|
2516 | break; |
---|
2517 | |
---|
2518 | default: |
---|
2519 | ParserError("Syntax error after '%s'", crtToken ); |
---|
2520 | } |
---|
2521 | } |
---|
2522 | |
---|
2523 | |
---|
2524 | int Parser( char * filename ) |
---|
2525 | { |
---|
2526 | extern int yydebug; |
---|
2527 | FILE *f; |
---|
2528 | |
---|
2529 | crt_filename = filename; |
---|
2530 | |
---|
2531 | f = fopen( crt_filename, "r" ); |
---|
2532 | if( f == 0 ) { |
---|
2533 | FatalError(7,"%s: File not found", crt_filename); |
---|
2534 | } |
---|
2535 | |
---|
2536 | yyin = f; |
---|
2537 | nError = 0; |
---|
2538 | nWarning = 0; |
---|
2539 | yydebug = 0; |
---|
2540 | |
---|
2541 | yyparse(); |
---|
2542 | |
---|
2543 | fclose( f ); |
---|
2544 | |
---|
2545 | return nError; |
---|
2546 | } |
---|
2547 | |
---|