1 /* A Bison parser, made by GNU Bison 2.5. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2011 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.5"
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 /* Using locations. */
62 #define YYLSP_NEEDED 0
63
64
65
66 /* Copy the first part of user declarations. */
67
68 /* Line 268 of yacc.c */
69 #line 1 "qcl.y"
70
71
72 /**********************************************************************
73
74 This file is part of the Quantum Computation Language QCL.
75
76 (c) Copyright by Bernhard Oemer <oemer@tph.tuwien.ac.at>, 1998
77
78 This program comes without any warranty; without even the implied
79 warranty of merchantability or fitness for any particular purpose.
80
81 This program is free software under the terms of the
82 GNU General Public Licence (GPL) version 2 or higher
83
84 ************************************************************************/
85
86
87 #include <stdlib.h>
88 #include "syntax.h"
89 #include "parse.h"
90
91 extern int yyerror (const char *s); /* Called by yyparse on error */
92 extern objlist *yyObjList;
93
94 extern int yylex();
95
96 #define YYERROR_VERBOSE 1
97
98
99
100 /* Line 268 of yacc.c */
101 #line 102 "yacc.cc"
102
103 /* Enabling traces. */
104 #ifndef YYDEBUG
105 # define YYDEBUG 1
106 #endif
107
108 /* Enabling verbose error messages. */
109 #ifdef YYERROR_VERBOSE
110 # undef YYERROR_VERBOSE
111 # define YYERROR_VERBOSE 1
112 #else
113 # define YYERROR_VERBOSE 0
114 #endif
115
116 /* Enabling the token table. */
117 #ifndef YYTOKEN_TABLE
118 # define YYTOKEN_TABLE 0
119 #endif
120
121
122 /* Tokens. */
123 #ifndef YYTOKENTYPE
124 # define YYTOKENTYPE
125 /* Put the tokens into the symbol table, so that GDB and other debuggers
126 know about them. */
127 enum yytokentype {
128 tokTYPE = 400,
129 tokTENSOR = 401,
130 tokID = 402,
131 tokCONS = 403,
132 tokBASEFUNCT = 404,
133 tokLISTFUNCT = 405,
134 tokINCLUDE = 406,
135 tokSET = 407,
136 tokIDCALL = 408,
137 tokCONST = 500,
138 tokCOND = 501,
139 tokEXTERN = 502,
140 tokOP = 503,
141 tokPROC = 504,
142 tokQUFUN = 505,
143 tokFOR = 506,
144 tokTO = 507,
145 tokWHILE = 508,
146 tokUNTIL = 509,
147 tokBREAK = 510,
148 tokRETURN = 511,
149 tokIF = 512,
150 tokELSE = 513,
151 tokRANGE_LENGTH = 514,
152 tokRANGE_END = 515,
153 tokSTEP = 516,
154 tokINPUT = 517,
155 tokPRINT = 518,
156 tokEXIT = 519,
157 tokMEASURE = 520,
158 tokRESET = 521,
159 tokDUMP = 601,
160 tokINSPECT = 602,
161 tokLOAD = 603,
162 tokSAVE = 604,
163 tokPLOT = 605,
164 tokSHELL = 606,
165 tokEOF = 900,
166 tokERROR = 901,
167 tokSWAP = 903,
168 tokINVTRANS = 904,
169 tokTRANS = 905,
170 tokXOR = 906,
171 tokOR = 907,
172 tokAND = 908,
173 tokNOT = 909,
174 tokNOTEQ = 910,
175 tokGREQ = 911,
176 tokLEEQ = 912,
177 tokEQ = 913,
178 tokMOD = 914,
179 tokNEG = 915
180 };
181 #endif
182
183
184
185 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
186 typedef union YYSTYPE
187 {
188
189 /* Line 293 of yacc.c */
190 #line 32 "qcl.y"
191
192 objlist* OBJLIST;
193 BaseType TYPE;
194 int TENSOR;
195 ObjType OBJTYPE;
196 tId* ID;
197 sObject* OBJ;
198 sConst* CONST;
199 sExpr* EXPR;
200 sExprList* EXPRLIST;
201 sStmt* STMT;
202 sStmtList* STMTLIST;
203 sDef* DEF;
204 sDefList* DEFLIST;
205 string* STRING;
206
207
208
209 /* Line 293 of yacc.c */
210 #line 211 "yacc.cc"
211 } YYSTYPE;
212 # define YYSTYPE_IS_TRIVIAL 1
213 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
214 # define YYSTYPE_IS_DECLARED 1
215 #endif
216
217
218 /* Copy the second part of user declarations. */
219
220
221 /* Line 343 of yacc.c */
222 #line 223 "yacc.cc"
223
224 #ifdef short
225 # undef short
226 #endif
227
228 #ifdef YYTYPE_UINT8
229 typedef YYTYPE_UINT8 yytype_uint8;
230 #else
231 typedef unsigned char yytype_uint8;
232 #endif
233
234 #ifdef YYTYPE_INT8
235 typedef YYTYPE_INT8 yytype_int8;
236 #elif (defined __STDC__ || defined __C99__FUNC__ \
237 || defined __cplusplus || defined _MSC_VER)
238 typedef signed char yytype_int8;
239 #else
240 typedef short int yytype_int8;
241 #endif
242
243 #ifdef YYTYPE_UINT16
244 typedef YYTYPE_UINT16 yytype_uint16;
245 #else
246 typedef unsigned short int yytype_uint16;
247 #endif
248
249 #ifdef YYTYPE_INT16
250 typedef YYTYPE_INT16 yytype_int16;
251 #else
252 typedef short int yytype_int16;
253 #endif
254
255 #ifndef YYSIZE_T
256 # ifdef __SIZE_TYPE__
257 # define YYSIZE_T __SIZE_TYPE__
258 # elif defined size_t
259 # define YYSIZE_T size_t
260 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
261 || defined __cplusplus || defined _MSC_VER)
262 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
263 # define YYSIZE_T size_t
264 # else
265 # define YYSIZE_T unsigned int
266 # endif
267 #endif
268
269 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
270
271 #ifndef YY_
272 # if defined YYENABLE_NLS && YYENABLE_NLS
273 # if ENABLE_NLS
274 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
275 # define YY_(msgid) dgettext ("bison-runtime", msgid)
276 # endif
277 # endif
278 # ifndef YY_
279 # define YY_(msgid) msgid
280 # endif
281 #endif
282
283 /* Suppress unused-variable warnings by "using" E. */
284 #if ! defined lint || defined __GNUC__
285 # define YYUSE(e) ((void) (e))
286 #else
287 # define YYUSE(e) /* empty */
288 #endif
289
290 /* Identity function, used to suppress warnings about constant conditions. */
291 #ifndef lint
292 # define YYID(n) (n)
293 #else
294 #if (defined __STDC__ || defined __C99__FUNC__ \
295 || defined __cplusplus || defined _MSC_VER)
296 static int
YYID(int yyi)297 YYID (int yyi)
298 #else
299 static int
300 YYID (yyi)
301 int yyi;
302 #endif
303 {
304 return yyi;
305 }
306 #endif
307
308 #if ! defined yyoverflow || YYERROR_VERBOSE
309
310 /* The parser invokes alloca or malloc; define the necessary symbols. */
311
312 # ifdef YYSTACK_USE_ALLOCA
313 # if YYSTACK_USE_ALLOCA
314 # ifdef __GNUC__
315 # define YYSTACK_ALLOC __builtin_alloca
316 # elif defined __BUILTIN_VA_ARG_INCR
317 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
318 # elif defined _AIX
319 # define YYSTACK_ALLOC __alloca
320 # elif defined _MSC_VER
321 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
322 # define alloca _alloca
323 # else
324 # define YYSTACK_ALLOC alloca
325 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
326 || defined __cplusplus || defined _MSC_VER)
327 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
328 # ifndef EXIT_SUCCESS
329 # define EXIT_SUCCESS 0
330 # endif
331 # endif
332 # endif
333 # endif
334 # endif
335
336 # ifdef YYSTACK_ALLOC
337 /* Pacify GCC's `empty if-body' warning. */
338 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
339 # ifndef YYSTACK_ALLOC_MAXIMUM
340 /* The OS might guarantee only one guard page at the bottom of the stack,
341 and a page size can be as small as 4096 bytes. So we cannot safely
342 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
343 to allow for a few compiler-allocated temporary stack slots. */
344 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
345 # endif
346 # else
347 # define YYSTACK_ALLOC YYMALLOC
348 # define YYSTACK_FREE YYFREE
349 # ifndef YYSTACK_ALLOC_MAXIMUM
350 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
351 # endif
352 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
353 && ! ((defined YYMALLOC || defined malloc) \
354 && (defined YYFREE || defined free)))
355 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
356 # ifndef EXIT_SUCCESS
357 # define EXIT_SUCCESS 0
358 # endif
359 # endif
360 # ifndef YYMALLOC
361 # define YYMALLOC malloc
362 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
363 || defined __cplusplus || defined _MSC_VER)
364 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
365 # endif
366 # endif
367 # ifndef YYFREE
368 # define YYFREE free
369 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
370 || defined __cplusplus || defined _MSC_VER)
371 void free (void *); /* INFRINGES ON USER NAME SPACE */
372 # endif
373 # endif
374 # endif
375 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
376
377
378 #if (! defined yyoverflow \
379 && (! defined __cplusplus \
380 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
381
382 /* A type that is properly aligned for any stack member. */
383 union yyalloc
384 {
385 yytype_int16 yyss_alloc;
386 YYSTYPE yyvs_alloc;
387 };
388
389 /* The size of the maximum gap between one aligned stack and the next. */
390 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
391
392 /* The size of an array large to enough to hold all stacks, each with
393 N elements. */
394 # define YYSTACK_BYTES(N) \
395 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
396 + YYSTACK_GAP_MAXIMUM)
397
398 # define YYCOPY_NEEDED 1
399
400 /* Relocate STACK from its old location to the new one. The
401 local variables YYSIZE and YYSTACKSIZE give the old and new number of
402 elements in the stack, and YYPTR gives the new location of the
403 stack. Advance YYPTR to a properly aligned location for the next
404 stack. */
405 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
406 do \
407 { \
408 YYSIZE_T yynewbytes; \
409 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
410 Stack = &yyptr->Stack_alloc; \
411 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
412 yyptr += yynewbytes / sizeof (*yyptr); \
413 } \
414 while (YYID (0))
415
416 #endif
417
418 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
419 /* Copy COUNT objects from FROM to TO. The source and destination do
420 not overlap. */
421 # ifndef YYCOPY
422 # if defined __GNUC__ && 1 < __GNUC__
423 # define YYCOPY(To, From, Count) \
424 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
425 # else
426 # define YYCOPY(To, From, Count) \
427 do \
428 { \
429 YYSIZE_T yyi; \
430 for (yyi = 0; yyi < (Count); yyi++) \
431 (To)[yyi] = (From)[yyi]; \
432 } \
433 while (YYID (0))
434 # endif
435 # endif
436 #endif /* !YYCOPY_NEEDED */
437
438 /* YYFINAL -- State number of the termination state. */
439 #define YYFINAL 112
440 /* YYLAST -- Last index in YYTABLE. */
441 #define YYLAST 1560
442
443 /* YYNTOKENS -- Number of terminals. */
444 #define YYNTOKENS 74
445 /* YYNNTS -- Number of nonterminals. */
446 #define YYNNTS 20
447 /* YYNRULES -- Number of rules. */
448 #define YYNRULES 124
449 /* YYNRULES -- Number of states. */
450 #define YYNSTATES 325
451
452 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
453 #define YYUNDEFTOK 2
454 #define YYMAXUTOK 915
455
456 #define YYTRANSLATE(YYX) \
457 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
458
459 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
460 static const yytype_uint8 yytranslate[] =
461 {
462 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 72, 2, 63, 2, 2, 57, 2,
466 73, 65, 59, 55, 71, 56, 2, 60, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 64,
468 49, 68, 50, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 66, 2, 67, 62, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
474 2, 2, 2, 69, 2, 70, 2, 2, 2, 2,
475 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
485 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487 2, 2, 2, 2, 2, 2, 1, 2, 2, 2,
488 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
491 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
492 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
493 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
494 2, 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, 2,
500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502 3, 4, 5, 6, 7, 8, 9, 10, 11, 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 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
513 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
514 32, 33, 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, 2, 2, 2, 2,
520 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 2, 34, 35, 36, 37, 38, 39, 2, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
552 40, 41, 2, 42, 43, 44, 45, 46, 47, 48,
553 51, 52, 53, 54, 58, 61
554 };
555
556 #if YYDEBUG
557 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
558 YYRHS. */
559 static const yytype_uint16 yyprhs[] =
560 {
561 0, 0, 3, 5, 7, 10, 13, 15, 18, 20,
562 22, 24, 26, 28, 30, 32, 34, 37, 40, 47,
563 55, 62, 69, 77, 85, 92, 99, 107, 115, 123,
564 132, 139, 145, 149, 156, 164, 170, 177, 183, 189,
565 193, 196, 199, 201, 204, 206, 208, 210, 213, 216,
566 219, 223, 225, 229, 231, 234, 239, 243, 249, 254,
567 262, 267, 272, 277, 285, 295, 299, 305, 309, 314,
568 317, 321, 325, 331, 334, 338, 341, 345, 349, 355,
569 358, 361, 365, 368, 372, 378, 381, 385, 388, 392,
570 395, 399, 402, 405, 409, 411, 415, 417, 419, 424,
571 431, 438, 442, 445, 448, 451, 455, 459, 463, 467,
572 471, 475, 479, 483, 487, 491, 495, 499, 503, 507,
573 511, 515, 519, 523, 527
574 };
575
576 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
577 static const yytype_int8 yyrhs[] =
578 {
579 75, 0, -1, 77, -1, 76, -1, 75, 77, -1,
580 75, 76, -1, 40, -1, 64, 76, -1, 78, -1,
581 79, -1, 80, -1, 81, -1, 82, -1, 83, -1,
582 91, -1, 84, -1, 9, 64, -1, 64, 77, -1,
583 3, 11, 89, 65, 85, 86, -1, 3, 4, 11,
584 89, 65, 85, 86, -1, 15, 11, 89, 65, 85,
585 86, -1, 14, 15, 11, 89, 65, 64, -1, 13,
586 15, 11, 89, 65, 85, 86, -1, 14, 13, 15,
587 11, 89, 65, 64, -1, 17, 11, 89, 65, 85,
588 86, -1, 14, 17, 11, 89, 65, 64, -1, 13,
589 17, 11, 89, 65, 85, 86, -1, 14, 13, 17,
590 11, 89, 65, 64, -1, 17, 15, 11, 89, 65,
591 85, 86, -1, 13, 17, 15, 11, 89, 65, 85,
592 86, -1, 16, 11, 89, 65, 85, 86, -1, 16,
593 11, 65, 85, 86, -1, 3, 5, 64, -1, 3,
594 5, 66, 93, 67, 64, -1, 3, 4, 5, 66,
595 93, 67, 64, -1, 3, 5, 68, 93, 64, -1,
596 3, 4, 5, 68, 93, 64, -1, 3, 5, 68,
597 13, 64, -1, 12, 5, 68, 93, 64, -1, 69,
598 90, 70, -1, 69, 70, -1, 69, 87, -1, 69,
599 -1, 90, 70, -1, 70, -1, 82, -1, 83, -1,
600 87, 82, -1, 87, 83, -1, 3, 5, -1, 3,
601 4, 5, -1, 88, -1, 89, 71, 88, -1, 91,
602 -1, 90, 91, -1, 11, 92, 65, 64, -1, 11,
603 65, 64, -1, 72, 11, 92, 65, 64, -1, 5,
604 68, 93, 64, -1, 5, 66, 92, 67, 68, 93,
605 64, -1, 93, 42, 93, 64, -1, 93, 44, 93,
606 64, -1, 93, 43, 93, 64, -1, 18, 5, 68,
607 93, 19, 93, 84, -1, 18, 5, 68, 93, 19,
608 93, 28, 93, 84, -1, 24, 93, 84, -1, 24,
609 93, 84, 25, 84, -1, 20, 93, 84, -1, 84,
610 21, 93, 64, -1, 22, 64, -1, 23, 93, 64,
611 -1, 29, 5, 64, -1, 29, 93, 71, 5, 64,
612 -1, 30, 64, -1, 30, 92, 64, -1, 31, 64,
613 -1, 31, 93, 64, -1, 32, 93, 64, -1, 32,
614 93, 71, 5, 64, -1, 33, 64, -1, 34, 64,
615 -1, 34, 93, 64, -1, 38, 64, -1, 38, 93,
616 64, -1, 38, 93, 71, 93, 64, -1, 35, 64,
617 -1, 35, 92, 64, -1, 36, 64, -1, 36, 93,
618 64, -1, 37, 64, -1, 37, 93, 64, -1, 39,
619 64, -1, 10, 64, -1, 10, 93, 64, -1, 93,
620 -1, 92, 71, 93, -1, 6, -1, 5, -1, 5,
621 66, 92, 67, -1, 5, 66, 93, 26, 93, 67,
622 -1, 5, 66, 93, 27, 93, 67, -1, 11, 92,
623 65, -1, 56, 93, -1, 48, 93, -1, 63, 93,
624 -1, 93, 46, 93, -1, 93, 45, 93, -1, 93,
625 47, 93, -1, 93, 54, 93, -1, 93, 53, 93,
626 -1, 93, 52, 93, -1, 93, 51, 93, -1, 93,
627 49, 93, -1, 93, 50, 93, -1, 93, 55, 93,
628 -1, 93, 56, 93, -1, 93, 57, 93, -1, 93,
629 58, 93, -1, 93, 59, 93, -1, 93, 60, 93,
630 -1, 93, 62, 93, -1, 73, 93, 65, -1, 7,
631 93, 65, -1, 8, 92, 65, -1, 8, 65, -1
632 };
633
634 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
635 static const yytype_uint16 yyrline[] =
636 {
637 0, 116, 116, 117, 118, 119, 122, 123, 126, 127,
638 128, 129, 130, 131, 132, 133, 134, 135, 138, 140,
639 144, 146, 148, 150, 154, 156, 158, 160, 162, 165,
640 170, 172, 176, 177, 178, 179, 180, 181, 187, 189,
641 190, 193, 194, 197, 198, 201, 202, 203, 204, 207,
642 208, 211, 212, 215, 216, 219, 220, 221, 222, 223,
643 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
644 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
645 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
646 254, 255, 256, 257, 260, 261, 264, 265, 266, 267,
647 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
648 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
649 288, 289, 290, 291, 292
650 };
651 #endif
652
653 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
654 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
655 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
656 static const char *const yytname[] =
657 {
658 "$end", "error", "$undefined", "tokTYPE", "tokTENSOR", "tokID",
659 "tokCONS", "tokBASEFUNCT", "tokLISTFUNCT", "tokINCLUDE", "tokSET",
660 "tokIDCALL", "tokCONST", "tokCOND", "tokEXTERN", "tokOP", "tokPROC",
661 "tokQUFUN", "tokFOR", "tokTO", "tokWHILE", "tokUNTIL", "tokBREAK",
662 "tokRETURN", "tokIF", "tokELSE", "tokRANGE_LENGTH", "tokRANGE_END",
663 "tokSTEP", "tokINPUT", "tokPRINT", "tokEXIT", "tokMEASURE", "tokRESET",
664 "tokDUMP", "tokINSPECT", "tokLOAD", "tokSAVE", "tokPLOT", "tokSHELL",
665 "tokEOF", "tokERROR", "tokSWAP", "tokINVTRANS", "tokTRANS", "tokXOR",
666 "tokOR", "tokAND", "tokNOT", "'<'", "'>'", "tokNOTEQ", "tokGREQ",
667 "tokLEEQ", "tokEQ", "'+'", "'-'", "'&'", "tokMOD", "'*'", "'/'",
668 "tokNEG", "'^'", "'#'", "';'", "')'", "'['", "']'", "'='", "'{'", "'}'",
669 "','", "'!'", "'('", "$accept", "objlist", "eof", "obj", "functdef",
670 "quopdef", "qufundef", "procdef", "vardef", "constdef", "block",
671 "bodydef", "bodystm", "deflist", "arg", "arglist", "stmtlist", "stmt",
672 "exprlist", "expr", 0
673 };
674 #endif
675
676 # ifdef YYPRINT
677 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
678 token YYLEX-NUM. */
679 static const yytype_uint16 yytoknum[] =
680 {
681 0, 256, 902, 400, 401, 402, 403, 404, 405, 406,
682 407, 408, 500, 501, 502, 503, 504, 505, 506, 507,
683 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
684 518, 519, 520, 521, 601, 602, 603, 604, 605, 606,
685 900, 901, 903, 904, 905, 906, 907, 908, 909, 60,
686 62, 910, 911, 912, 913, 43, 45, 38, 914, 42,
687 47, 915, 94, 35, 59, 41, 91, 93, 61, 123,
688 125, 44, 33, 40
689 };
690 # endif
691
692 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
693 static const yytype_uint8 yyr1[] =
694 {
695 0, 74, 75, 75, 75, 75, 76, 76, 77, 77,
696 77, 77, 77, 77, 77, 77, 77, 77, 78, 78,
697 79, 79, 79, 79, 80, 80, 80, 80, 80, 80,
698 81, 81, 82, 82, 82, 82, 82, 82, 83, 84,
699 84, 85, 85, 86, 86, 87, 87, 87, 87, 88,
700 88, 89, 89, 90, 90, 91, 91, 91, 91, 91,
701 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
702 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
703 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
704 91, 91, 91, 91, 92, 92, 93, 93, 93, 93,
705 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
706 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
707 93, 93, 93, 93, 93
708 };
709
710 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
711 static const yytype_uint8 yyr2[] =
712 {
713 0, 2, 1, 1, 2, 2, 1, 2, 1, 1,
714 1, 1, 1, 1, 1, 1, 2, 2, 6, 7,
715 6, 6, 7, 7, 6, 6, 7, 7, 7, 8,
716 6, 5, 3, 6, 7, 5, 6, 5, 5, 3,
717 2, 2, 1, 2, 1, 1, 1, 2, 2, 2,
718 3, 1, 3, 1, 2, 4, 3, 5, 4, 7,
719 4, 4, 4, 7, 9, 3, 5, 3, 4, 2,
720 3, 3, 5, 2, 3, 2, 3, 3, 5, 2,
721 2, 3, 2, 3, 5, 2, 3, 2, 3, 2,
722 3, 2, 2, 3, 1, 3, 1, 1, 4, 6,
723 6, 3, 2, 2, 2, 3, 3, 3, 3, 3,
724 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
725 3, 3, 3, 3, 2
726 };
727
728 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
729 Performed when YYTABLE doesn't specify something else to do. Zero
730 means the default is an error. */
731 static const yytype_uint8 yydefact[] =
732 {
733 0, 0, 97, 96, 0, 0, 0, 0, 0, 0,
734 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
736 0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
737 3, 2, 8, 9, 10, 11, 12, 13, 15, 14,
738 0, 0, 0, 0, 0, 0, 97, 0, 0, 124,
739 0, 94, 16, 92, 0, 0, 0, 0, 0, 0,
740 0, 0, 0, 0, 0, 0, 0, 0, 0, 69,
741 0, 0, 97, 0, 73, 0, 75, 0, 0, 79,
742 80, 0, 85, 0, 87, 0, 89, 0, 82, 0,
743 91, 103, 102, 104, 7, 17, 40, 0, 0, 53,
744 0, 0, 1, 5, 4, 0, 0, 0, 0, 0,
745 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
746 0, 0, 0, 0, 0, 0, 0, 32, 0, 0,
747 0, 51, 0, 0, 94, 0, 0, 0, 122, 123,
748 0, 93, 56, 101, 0, 0, 0, 0, 0, 0,
749 0, 0, 0, 0, 0, 0, 0, 0, 67, 70,
750 65, 71, 0, 74, 76, 77, 0, 81, 86, 88,
751 90, 83, 0, 39, 54, 0, 121, 0, 0, 0,
752 0, 106, 105, 107, 112, 113, 111, 110, 109, 108,
753 114, 115, 116, 117, 118, 119, 120, 0, 0, 0,
754 0, 0, 0, 0, 49, 0, 0, 98, 0, 0,
755 58, 0, 101, 95, 55, 0, 0, 0, 0, 0,
756 0, 0, 0, 0, 42, 0, 0, 0, 0, 0,
757 0, 0, 0, 0, 0, 68, 60, 62, 61, 0,
758 0, 0, 0, 37, 35, 50, 0, 52, 0, 0,
759 0, 98, 38, 0, 0, 0, 0, 0, 0, 0,
760 0, 0, 45, 46, 41, 44, 31, 0, 0, 0,
761 0, 0, 66, 72, 78, 84, 57, 0, 36, 0,
762 33, 18, 0, 99, 100, 0, 0, 0, 0, 0,
763 21, 25, 20, 0, 47, 48, 43, 30, 24, 0,
764 0, 34, 19, 59, 22, 26, 0, 23, 27, 28,
765 0, 63, 29, 0, 64
766 };
767
768 /* YYDEFGOTO[NTERM-NUM]. */
769 static const yytype_int16 yydefgoto[] =
770 {
771 -1, 39, 40, 41, 42, 43, 44, 45, 46, 47,
772 107, 235, 276, 274, 141, 142, 277, 109, 60, 50
773 };
774
775 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
776 STATE-NUM. */
777 #define YYPACT_NINF -225
778 static const yytype_int16 yypact[] =
779 {
780 323, 52, 141, -225, 778, 36, -63, 178, 625, 23,
781 193, 155, 29, 37, 49, 54, 778, -27, 778, 778,
782 804, 636, 659, 778, 3, 671, 697, 731, 743, 757,
783 11, -225, 778, 778, 778, 323, 383, 72, 778, 252,
784 -225, -225, -225, -225, -225, -225, -225, -225, 67, -225,
785 1090, 63, 109, 104, 778, 778, 44, 778, 1108, -225,
786 6, 1470, -225, -225, 1150, 82, 15, 70, 146, 61,
787 196, 147, 165, 104, 1, 104, 179, 128, 986, -225,
788 1170, 986, 156, 963, -225, -10, -225, 1190, 917, -225,
789 -225, 1210, -225, -6, -225, 1230, -225, 1250, -225, 940,
790 -225, 843, 159, -225, -225, -225, -225, 67, 452, -225,
791 778, 1129, -225, -225, -225, 778, 778, 778, 778, 778,
792 778, 778, 778, 778, 778, 778, 778, 778, 778, 778,
793 778, 778, 778, 778, 778, 157, 104, -225, 778, 769,
794 195, -225, 20, -22, 899, 1270, 778, 22, -225, -225,
795 778, -225, -225, 150, 778, 104, 104, 213, 216, 217,
796 104, 104, 31, 160, 32, 33, 104, 778, -225, -225,
797 205, -225, 226, -225, -225, -225, 228, -225, -225, -225,
798 -225, -225, 778, -225, -225, 40, -225, 1290, 1310, 1330,
799 1350, 1484, 1484, 843, 1498, 1498, 1498, 1498, 1498, 1498,
800 -47, -47, -47, 135, 159, 159, -225, 778, 778, 41,
801 1007, 171, 1370, 231, -225, 160, 104, 169, 778, 778,
802 -225, 107, -225, 1470, -225, 1390, 69, 74, 104, 104,
803 104, 76, 78, 160, 26, 521, 160, 160, 85, 829,
804 174, 180, 181, 1410, 182, -225, -225, -225, -225, 1026,
805 1430, 160, 183, -225, -225, -225, 521, -225, 778, 1045,
806 1064, -225, -225, 160, 160, 88, 95, 96, 184, 185,
807 521, 199, -225, -225, 26, -225, -225, 590, 521, 521,
808 160, 778, -225, -225, -225, -225, -225, 186, -225, 521,
809 -225, -225, 1450, -225, -225, 521, 521, 160, 189, 190,
810 -225, -225, -225, 233, -225, -225, -225, -225, -225, 521,
811 862, -225, -225, -225, -225, -225, 521, -225, -225, -225,
812 778, -225, -225, 986, -225
813 };
814
815 /* YYPGOTO[NTERM-NUM]. */
816 static const yytype_int16 yypgoto[] =
817 {
818 -225, -225, 152, 153, -225, -225, -225, -225, -224, -212,
819 0, -82, -77, -225, 55, -66, 237, 34, 25, -2
820 };
821
822 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
823 positive, shift that token. If negative, reduce the rule which
824 number is the opposite. If YYTABLE_NINF, syntax error. */
825 #define YYTABLE_NINF -1
826 static const yytype_int16 yytable[] =
827 {
828 48, 62, 58, 61, 140, 64, 61, 162, 164, 165,
829 272, 131, 132, 133, 78, 134, 80, 81, 83, 61,
830 87, 88, 273, 91, 61, 95, 97, 99, 67, 271,
831 101, 102, 103, 66, 49, 48, 111, 79, 9, 48,
832 73, 56, 3, 4, 5, 217, 85, 57, 74, 150,
833 304, 93, 144, 145, 173, 61, 51, 52, 178, 77,
834 75, 150, 305, 53, 76, 150, 163, 89, 135, 49,
835 209, 149, 156, 49, 136, 100, 157, 150, 168, 143,
836 153, 170, 147, 110, 32, 215, 150, 222, 115, 226,
837 227, 216, 33, 150, 231, 232, 233, 236, 237, 34,
838 238, 59, 216, 216, 216, 244, 251, 140, 61, 38,
839 146, 150, 216, 187, 188, 189, 190, 191, 192, 193,
840 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
841 204, 205, 206, 256, 263, 185, 210, 212, 154, 264,
842 216, 268, 184, 269, 144, 216, 152, 216, 223, 216,
843 280, 270, 225, 297, 278, 279, 216, 155, 160, 216,
844 298, 299, 265, 266, 267, 239, 216, 216, 70, 289,
845 71, 221, 72, 137, 261, 138, 161, 139, 150, 291,
846 243, 295, 296, 56, 3, 4, 5, 104, 105, 57,
847 166, 113, 114, 302, 132, 133, 167, 134, 309, 213,
848 214, 307, 308, 303, 52, 249, 250, 54, 68, 55,
849 69, 158, 312, 159, 224, 316, 259, 260, 314, 315,
850 171, 134, 146, 207, 228, 208, 32, 229, 230, 234,
851 240, 241, 319, 242, 33, 253, 255, 258, 135, 322,
852 282, 34, 63, 36, 283, 284, 286, 290, 300, 301,
853 311, 38, 112, 317, 318, 1, 292, 2, 3, 4,
854 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
855 15, 257, 16, 108, 17, 18, 19, 0, 0, 310,
856 0, 20, 21, 22, 23, 24, 25, 26, 27, 28,
857 29, 30, 31, 0, 0, 0, 0, 0, 0, 0,
858 32, 0, 0, 0, 0, 0, 0, 0, 33, 0,
859 321, 184, 0, 0, 0, 34, 35, 0, 323, 0,
860 0, 36, 0, 324, 37, 38, 1, 0, 2, 3,
861 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
862 14, 15, 0, 16, 0, 17, 18, 19, 0, 0,
863 0, 0, 20, 21, 22, 23, 24, 25, 26, 27,
864 28, 29, 30, 31, 0, 0, 0, 0, 0, 0,
865 0, 32, 0, 0, 0, 0, 0, 0, 0, 33,
866 0, 0, 0, 0, 0, 0, 34, 35, 2, 3,
867 4, 5, 36, 7, 8, 37, 38, 0, 0, 0,
868 0, 15, 0, 16, 0, 17, 18, 19, 0, 0,
869 0, 0, 20, 21, 22, 23, 24, 25, 26, 27,
870 28, 29, 30, 0, 0, 0, 0, 0, 0, 0,
871 0, 32, 0, 0, 0, 0, 0, 0, 0, 33,
872 0, 0, 0, 0, 0, 0, 34, 0, 0, 0,
873 0, 0, 36, 106, 0, 37, 38, 2, 3, 4,
874 5, 0, 7, 8, 0, 0, 0, 0, 0, 0,
875 15, 0, 16, 0, 17, 18, 19, 0, 0, 0,
876 0, 20, 21, 22, 23, 24, 25, 26, 27, 28,
877 29, 30, 0, 0, 0, 0, 0, 0, 0, 0,
878 32, 0, 0, 0, 0, 0, 0, 0, 33, 0,
879 0, 0, 0, 0, 0, 34, 0, 0, 0, 0,
880 0, 36, 183, 0, 37, 38, 2, 3, 4, 5,
881 0, 7, 8, 0, 0, 0, 0, 0, 0, 15,
882 0, 16, 0, 17, 18, 19, 0, 0, 0, 0,
883 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
884 30, 0, 0, 0, 0, 0, 0, 0, 0, 32,
885 0, 0, 0, 0, 0, 0, 0, 33, 0, 0,
886 0, 0, 0, 0, 34, 0, 0, 0, 0, 0,
887 36, 275, 0, 37, 38, 2, 3, 4, 5, 0,
888 7, 8, 0, 0, 0, 0, 0, 0, 15, 0,
889 16, 0, 17, 18, 19, 0, 0, 0, 0, 20,
890 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
891 56, 3, 4, 5, 0, 0, 57, 0, 32, 0,
892 0, 56, 3, 4, 5, 0, 33, 57, 0, 0,
893 0, 0, 0, 34, 0, 0, 0, 0, 0, 36,
894 306, 0, 37, 38, 56, 3, 4, 5, 0, 0,
895 57, 0, 0, 32, 0, 0, 56, 3, 4, 5,
896 0, 33, 57, 0, 32, 0, 0, 0, 34, 0,
897 65, 0, 33, 0, 0, 0, 0, 0, 38, 34,
898 84, 0, 56, 3, 4, 5, 0, 32, 57, 38,
899 0, 0, 0, 0, 0, 33, 0, 0, 0, 32,
900 0, 0, 34, 86, 0, 0, 0, 33, 0, 0,
901 0, 0, 38, 0, 34, 90, 56, 3, 4, 5,
902 0, 0, 57, 0, 38, 32, 0, 0, 56, 3,
903 4, 5, 0, 33, 57, 0, 0, 0, 0, 0,
904 34, 92, 56, 3, 4, 5, 0, 0, 57, 0,
905 38, 0, 0, 0, 56, 3, 4, 5, 0, 32,
906 57, 0, 211, 56, 3, 4, 5, 33, 0, 57,
907 0, 32, 0, 0, 34, 94, 0, 0, 0, 33,
908 0, 0, 0, 0, 38, 32, 34, 96, 0, 82,
909 3, 4, 5, 33, 0, 57, 38, 32, 0, 0,
910 34, 98, 0, 0, 0, 33, 32, 0, 0, 0,
911 38, 0, 34, 0, 33, 0, 0, 0, 0, 0,
912 0, 34, 38, 0, 0, 0, 0, 0, 281, 0,
913 0, 38, 32, 0, 0, 0, 0, 0, 0, 0,
914 33, 0, 0, 0, 0, 0, 0, 34, 0, 0,
915 0, 0, 0, 0, 119, 120, 121, 38, 122, 123,
916 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
917 320, 134, 122, 123, 124, 125, 126, 127, 128, 129,
918 130, 131, 132, 133, 0, 134, 0, 119, 120, 121,
919 0, 122, 123, 124, 125, 126, 127, 128, 129, 130,
920 131, 132, 133, 0, 134, 218, 219, 0, 0, 0,
921 0, 36, 0, 0, 0, 0, 0, 0, 0, 0,
922 0, 0, 0, 0, 119, 120, 121, 0, 122, 123,
923 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
924 0, 134, 119, 120, 121, 0, 122, 123, 124, 125,
925 126, 127, 128, 129, 130, 131, 132, 133, 0, 134,
926 0, 175, 0, 0, 0, 119, 120, 121, 176, 122,
927 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
928 133, 0, 134, 0, 181, 0, 0, 0, 119, 120,
929 121, 182, 122, 123, 124, 125, 126, 127, 128, 129,
930 130, 131, 132, 133, 0, 134, 0, 0, 0, 0,
931 0, 119, 120, 121, 172, 122, 123, 124, 125, 126,
932 127, 128, 129, 130, 131, 132, 133, 0, 134, 0,
933 0, 0, 119, 120, 121, 36, 122, 123, 124, 125,
934 126, 127, 128, 129, 130, 131, 132, 133, 0, 134,
935 0, 119, 120, 121, 252, 122, 123, 124, 125, 126,
936 127, 128, 129, 130, 131, 132, 133, 0, 134, 0,
937 119, 120, 121, 287, 122, 123, 124, 125, 126, 127,
938 128, 129, 130, 131, 132, 133, 0, 134, 0, 119,
939 120, 121, 293, 122, 123, 124, 125, 126, 127, 128,
940 129, 130, 131, 132, 133, 0, 134, 0, 0, 0,
941 0, 294, 116, 117, 118, 119, 120, 121, 0, 122,
942 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
943 133, 0, 134, 119, 120, 121, 0, 122, 123, 124,
944 125, 126, 127, 128, 129, 130, 131, 132, 133, 0,
945 134, 0, 0, 148, 119, 120, 121, 0, 122, 123,
946 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
947 0, 134, 0, 0, 186, 119, 120, 121, 0, 122,
948 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
949 133, 0, 134, 0, 151, 119, 120, 121, 0, 122,
950 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
951 133, 0, 134, 0, 169, 119, 120, 121, 0, 122,
952 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
953 133, 0, 134, 0, 174, 119, 120, 121, 0, 122,
954 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
955 133, 0, 134, 0, 177, 119, 120, 121, 0, 122,
956 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
957 133, 0, 134, 0, 179, 119, 120, 121, 0, 122,
958 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
959 133, 0, 134, 0, 180, 119, 120, 121, 0, 122,
960 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
961 133, 0, 134, 0, 220, 119, 120, 121, 0, 122,
962 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
963 133, 0, 134, 0, 245, 119, 120, 121, 0, 122,
964 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
965 133, 0, 134, 0, 246, 119, 120, 121, 0, 122,
966 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
967 133, 0, 134, 0, 247, 119, 120, 121, 0, 122,
968 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
969 133, 0, 134, 0, 248, 119, 120, 121, 0, 122,
970 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
971 133, 0, 134, 0, 254, 119, 120, 121, 0, 122,
972 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
973 133, 0, 134, 0, 262, 119, 120, 121, 0, 122,
974 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
975 133, 0, 134, 0, 285, 119, 120, 121, 0, 122,
976 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
977 133, 0, 134, 0, 288, 119, 120, 121, 0, 122,
978 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
979 133, 0, 134, 0, 313, 119, 120, 121, 0, 122,
980 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
981 133, 121, 134, 122, 123, 124, 125, 126, 127, 128,
982 129, 130, 131, 132, 133, 0, 134, -1, -1, -1,
983 -1, -1, -1, 128, 129, 130, 131, 132, 133, 0,
984 134
985 };
986
987 #define yypact_value_is_default(yystate) \
988 ((yystate) == (-225))
989
990 #define yytable_value_is_error(yytable_value) \
991 ((yytable_value) == (-1))
992
993 static const yytype_int16 yycheck[] =
994 {
995 0, 64, 4, 5, 3, 7, 8, 73, 74, 75,
996 234, 58, 59, 60, 16, 62, 18, 19, 20, 21,
997 22, 23, 234, 25, 26, 27, 28, 29, 5, 3,
998 32, 33, 34, 8, 0, 35, 38, 64, 12, 39,
999 11, 5, 6, 7, 8, 67, 21, 11, 11, 71,
1000 274, 26, 54, 55, 64, 57, 4, 5, 64, 5,
1001 11, 71, 274, 11, 15, 71, 65, 64, 5, 35,
1002 136, 65, 11, 39, 11, 64, 15, 71, 78, 54,
1003 65, 81, 57, 11, 48, 65, 71, 65, 21, 155,
1004 156, 71, 56, 71, 160, 161, 65, 65, 65, 63,
1005 166, 65, 71, 71, 71, 65, 65, 3, 110, 73,
1006 66, 71, 71, 115, 116, 117, 118, 119, 120, 121,
1007 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
1008 132, 133, 134, 215, 65, 110, 138, 139, 68, 65,
1009 71, 65, 108, 65, 146, 71, 64, 71, 150, 71,
1010 65, 233, 154, 65, 236, 237, 71, 11, 11, 71,
1011 65, 65, 228, 229, 230, 167, 71, 71, 13, 251,
1012 15, 146, 17, 64, 67, 66, 11, 68, 71, 256,
1013 182, 263, 264, 5, 6, 7, 8, 35, 35, 11,
1014 11, 39, 39, 270, 59, 60, 68, 62, 280, 4,
1015 5, 278, 279, 4, 5, 207, 208, 66, 15, 68,
1016 17, 15, 289, 17, 64, 297, 218, 219, 295, 296,
1017 64, 62, 66, 66, 11, 68, 48, 11, 11, 69,
1018 25, 5, 309, 5, 56, 64, 5, 68, 5, 316,
1019 240, 63, 64, 69, 64, 64, 64, 64, 64, 64,
1020 64, 73, 0, 64, 64, 3, 258, 5, 6, 7,
1021 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1022 18, 216, 20, 36, 22, 23, 24, -1, -1, 281,
1023 -1, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1024 38, 39, 40, -1, -1, -1, -1, -1, -1, -1,
1025 48, -1, -1, -1, -1, -1, -1, -1, 56, -1,
1026 310, 277, -1, -1, -1, 63, 64, -1, 320, -1,
1027 -1, 69, -1, 323, 72, 73, 3, -1, 5, 6,
1028 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1029 17, 18, -1, 20, -1, 22, 23, 24, -1, -1,
1030 -1, -1, 29, 30, 31, 32, 33, 34, 35, 36,
1031 37, 38, 39, 40, -1, -1, -1, -1, -1, -1,
1032 -1, 48, -1, -1, -1, -1, -1, -1, -1, 56,
1033 -1, -1, -1, -1, -1, -1, 63, 64, 5, 6,
1034 7, 8, 69, 10, 11, 72, 73, -1, -1, -1,
1035 -1, 18, -1, 20, -1, 22, 23, 24, -1, -1,
1036 -1, -1, 29, 30, 31, 32, 33, 34, 35, 36,
1037 37, 38, 39, -1, -1, -1, -1, -1, -1, -1,
1038 -1, 48, -1, -1, -1, -1, -1, -1, -1, 56,
1039 -1, -1, -1, -1, -1, -1, 63, -1, -1, -1,
1040 -1, -1, 69, 70, -1, 72, 73, 5, 6, 7,
1041 8, -1, 10, 11, -1, -1, -1, -1, -1, -1,
1042 18, -1, 20, -1, 22, 23, 24, -1, -1, -1,
1043 -1, 29, 30, 31, 32, 33, 34, 35, 36, 37,
1044 38, 39, -1, -1, -1, -1, -1, -1, -1, -1,
1045 48, -1, -1, -1, -1, -1, -1, -1, 56, -1,
1046 -1, -1, -1, -1, -1, 63, -1, -1, -1, -1,
1047 -1, 69, 70, -1, 72, 73, 5, 6, 7, 8,
1048 -1, 10, 11, -1, -1, -1, -1, -1, -1, 18,
1049 -1, 20, -1, 22, 23, 24, -1, -1, -1, -1,
1050 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1051 39, -1, -1, -1, -1, -1, -1, -1, -1, 48,
1052 -1, -1, -1, -1, -1, -1, -1, 56, -1, -1,
1053 -1, -1, -1, -1, 63, -1, -1, -1, -1, -1,
1054 69, 70, -1, 72, 73, 5, 6, 7, 8, -1,
1055 10, 11, -1, -1, -1, -1, -1, -1, 18, -1,
1056 20, -1, 22, 23, 24, -1, -1, -1, -1, 29,
1057 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1058 5, 6, 7, 8, -1, -1, 11, -1, 48, -1,
1059 -1, 5, 6, 7, 8, -1, 56, 11, -1, -1,
1060 -1, -1, -1, 63, -1, -1, -1, -1, -1, 69,
1061 70, -1, 72, 73, 5, 6, 7, 8, -1, -1,
1062 11, -1, -1, 48, -1, -1, 5, 6, 7, 8,
1063 -1, 56, 11, -1, 48, -1, -1, -1, 63, -1,
1064 65, -1, 56, -1, -1, -1, -1, -1, 73, 63,
1065 64, -1, 5, 6, 7, 8, -1, 48, 11, 73,
1066 -1, -1, -1, -1, -1, 56, -1, -1, -1, 48,
1067 -1, -1, 63, 64, -1, -1, -1, 56, -1, -1,
1068 -1, -1, 73, -1, 63, 64, 5, 6, 7, 8,
1069 -1, -1, 11, -1, 73, 48, -1, -1, 5, 6,
1070 7, 8, -1, 56, 11, -1, -1, -1, -1, -1,
1071 63, 64, 5, 6, 7, 8, -1, -1, 11, -1,
1072 73, -1, -1, -1, 5, 6, 7, 8, -1, 48,
1073 11, -1, 13, 5, 6, 7, 8, 56, -1, 11,
1074 -1, 48, -1, -1, 63, 64, -1, -1, -1, 56,
1075 -1, -1, -1, -1, 73, 48, 63, 64, -1, 5,
1076 6, 7, 8, 56, -1, 11, 73, 48, -1, -1,
1077 63, 64, -1, -1, -1, 56, 48, -1, -1, -1,
1078 73, -1, 63, -1, 56, -1, -1, -1, -1, -1,
1079 -1, 63, 73, -1, -1, -1, -1, -1, 19, -1,
1080 -1, 73, 48, -1, -1, -1, -1, -1, -1, -1,
1081 56, -1, -1, -1, -1, -1, -1, 63, -1, -1,
1082 -1, -1, -1, -1, 45, 46, 47, 73, 49, 50,
1083 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
1084 28, 62, 49, 50, 51, 52, 53, 54, 55, 56,
1085 57, 58, 59, 60, -1, 62, -1, 45, 46, 47,
1086 -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1087 58, 59, 60, -1, 62, 26, 27, -1, -1, -1,
1088 -1, 69, -1, -1, -1, -1, -1, -1, -1, -1,
1089 -1, -1, -1, -1, 45, 46, 47, -1, 49, 50,
1090 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
1091 -1, 62, 45, 46, 47, -1, 49, 50, 51, 52,
1092 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
1093 -1, 64, -1, -1, -1, 45, 46, 47, 71, 49,
1094 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1095 60, -1, 62, -1, 64, -1, -1, -1, 45, 46,
1096 47, 71, 49, 50, 51, 52, 53, 54, 55, 56,
1097 57, 58, 59, 60, -1, 62, -1, -1, -1, -1,
1098 -1, 45, 46, 47, 71, 49, 50, 51, 52, 53,
1099 54, 55, 56, 57, 58, 59, 60, -1, 62, -1,
1100 -1, -1, 45, 46, 47, 69, 49, 50, 51, 52,
1101 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
1102 -1, 45, 46, 47, 67, 49, 50, 51, 52, 53,
1103 54, 55, 56, 57, 58, 59, 60, -1, 62, -1,
1104 45, 46, 47, 67, 49, 50, 51, 52, 53, 54,
1105 55, 56, 57, 58, 59, 60, -1, 62, -1, 45,
1106 46, 47, 67, 49, 50, 51, 52, 53, 54, 55,
1107 56, 57, 58, 59, 60, -1, 62, -1, -1, -1,
1108 -1, 67, 42, 43, 44, 45, 46, 47, -1, 49,
1109 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1110 60, -1, 62, 45, 46, 47, -1, 49, 50, 51,
1111 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
1112 62, -1, -1, 65, 45, 46, 47, -1, 49, 50,
1113 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
1114 -1, 62, -1, -1, 65, 45, 46, 47, -1, 49,
1115 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1116 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1117 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1118 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1119 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1120 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1121 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1122 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1123 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1124 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1125 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1126 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1127 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1128 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1129 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1130 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1131 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1132 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1133 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1134 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1135 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1136 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1137 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1138 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1139 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1140 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1141 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1142 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1143 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1144 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1145 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1146 60, -1, 62, -1, 64, 45, 46, 47, -1, 49,
1147 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
1148 60, 47, 62, 49, 50, 51, 52, 53, 54, 55,
1149 56, 57, 58, 59, 60, -1, 62, 49, 50, 51,
1150 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
1151 62
1152 };
1153
1154 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1155 symbol of state STATE-NUM. */
1156 static const yytype_uint8 yystos[] =
1157 {
1158 0, 3, 5, 6, 7, 8, 9, 10, 11, 12,
1159 13, 14, 15, 16, 17, 18, 20, 22, 23, 24,
1160 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1161 39, 40, 48, 56, 63, 64, 69, 72, 73, 75,
1162 76, 77, 78, 79, 80, 81, 82, 83, 84, 91,
1163 93, 4, 5, 11, 66, 68, 5, 11, 93, 65,
1164 92, 93, 64, 64, 93, 65, 92, 5, 15, 17,
1165 13, 15, 17, 11, 11, 11, 15, 5, 93, 64,
1166 93, 93, 5, 93, 64, 92, 64, 93, 93, 64,
1167 64, 93, 64, 92, 64, 93, 64, 93, 64, 93,
1168 64, 93, 93, 93, 76, 77, 70, 84, 90, 91,
1169 11, 93, 0, 76, 77, 21, 42, 43, 44, 45,
1170 46, 47, 49, 50, 51, 52, 53, 54, 55, 56,
1171 57, 58, 59, 60, 62, 5, 11, 64, 66, 68,
1172 3, 88, 89, 92, 93, 93, 66, 92, 65, 65,
1173 71, 64, 64, 65, 68, 11, 11, 15, 15, 17,
1174 11, 11, 89, 65, 89, 89, 11, 68, 84, 64,
1175 84, 64, 71, 64, 64, 64, 71, 64, 64, 64,
1176 64, 64, 71, 70, 91, 92, 65, 93, 93, 93,
1177 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
1178 93, 93, 93, 93, 93, 93, 93, 66, 68, 89,
1179 93, 13, 93, 4, 5, 65, 71, 67, 26, 27,
1180 64, 92, 65, 93, 64, 93, 89, 89, 11, 11,
1181 11, 89, 89, 65, 69, 85, 65, 65, 89, 93,
1182 25, 5, 5, 93, 65, 64, 64, 64, 64, 93,
1183 93, 65, 67, 64, 64, 5, 85, 88, 68, 93,
1184 93, 67, 64, 65, 65, 89, 89, 89, 65, 65,
1185 85, 3, 82, 83, 87, 70, 86, 90, 85, 85,
1186 65, 19, 84, 64, 64, 64, 64, 67, 64, 85,
1187 64, 86, 93, 67, 67, 85, 85, 65, 65, 65,
1188 64, 64, 86, 4, 82, 83, 70, 86, 86, 85,
1189 93, 64, 86, 64, 86, 86, 85, 64, 64, 86,
1190 28, 84, 86, 93, 84
1191 };
1192
1193 #define yyerrok (yyerrstatus = 0)
1194 #define yyclearin (yychar = YYEMPTY)
1195 #define YYEMPTY (-2)
1196 #define YYEOF 0
1197
1198 #define YYACCEPT goto yyacceptlab
1199 #define YYABORT goto yyabortlab
1200 #define YYERROR goto yyerrorlab
1201
1202
1203 /* Like YYERROR except do call yyerror. This remains here temporarily
1204 to ease the transition to the new meaning of YYERROR, for GCC.
1205 Once GCC version 2 has supplanted version 1, this can go. However,
1206 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1207 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1208 discussed. */
1209
1210 #define YYFAIL goto yyerrlab
1211 #if defined YYFAIL
1212 /* This is here to suppress warnings from the GCC cpp's
1213 -Wunused-macros. Normally we don't worry about that warning, but
1214 some users do, and we want to make it easy for users to remove
1215 YYFAIL uses, which will produce warnings from Bison 2.5. */
1216 #endif
1217
1218 #define YYRECOVERING() (!!yyerrstatus)
1219
1220 #define YYBACKUP(Token, Value) \
1221 do \
1222 if (yychar == YYEMPTY && yylen == 1) \
1223 { \
1224 yychar = (Token); \
1225 yylval = (Value); \
1226 YYPOPSTACK (1); \
1227 goto yybackup; \
1228 } \
1229 else \
1230 { \
1231 yyerror (YY_("syntax error: cannot back up")); \
1232 YYERROR; \
1233 } \
1234 while (YYID (0))
1235
1236
1237 #define YYTERROR 1
1238 #define YYERRCODE 256
1239
1240
1241 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1242 If N is 0, then set CURRENT to the empty location which ends
1243 the previous symbol: RHS[0] (always defined). */
1244
1245 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1246 #ifndef YYLLOC_DEFAULT
1247 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1248 do \
1249 if (YYID (N)) \
1250 { \
1251 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1252 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1253 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1254 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1255 } \
1256 else \
1257 { \
1258 (Current).first_line = (Current).last_line = \
1259 YYRHSLOC (Rhs, 0).last_line; \
1260 (Current).first_column = (Current).last_column = \
1261 YYRHSLOC (Rhs, 0).last_column; \
1262 } \
1263 while (YYID (0))
1264 #endif
1265
1266
1267 /* This macro is provided for backward compatibility. */
1268
1269 #ifndef YY_LOCATION_PRINT
1270 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1271 #endif
1272
1273
1274 /* YYLEX -- calling `yylex' with the right arguments. */
1275
1276 #ifdef YYLEX_PARAM
1277 # define YYLEX yylex (YYLEX_PARAM)
1278 #else
1279 # define YYLEX yylex ()
1280 #endif
1281
1282 /* Enable debugging if requested. */
1283 #if YYDEBUG
1284
1285 # ifndef YYFPRINTF
1286 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1287 # define YYFPRINTF fprintf
1288 # endif
1289
1290 # define YYDPRINTF(Args) \
1291 do { \
1292 if (yydebug) \
1293 YYFPRINTF Args; \
1294 } while (YYID (0))
1295
1296 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1297 do { \
1298 if (yydebug) \
1299 { \
1300 YYFPRINTF (stderr, "%s ", Title); \
1301 yy_symbol_print (stderr, \
1302 Type, Value); \
1303 YYFPRINTF (stderr, "\n"); \
1304 } \
1305 } while (YYID (0))
1306
1307
1308 /*--------------------------------.
1309 | Print this symbol on YYOUTPUT. |
1310 `--------------------------------*/
1311
1312 /*ARGSUSED*/
1313 #if (defined __STDC__ || defined __C99__FUNC__ \
1314 || defined __cplusplus || defined _MSC_VER)
1315 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1316 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1317 #else
1318 static void
1319 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1320 FILE *yyoutput;
1321 int yytype;
1322 YYSTYPE const * const yyvaluep;
1323 #endif
1324 {
1325 if (!yyvaluep)
1326 return;
1327 # ifdef YYPRINT
1328 if (yytype < YYNTOKENS)
1329 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1330 # else
1331 YYUSE (yyoutput);
1332 # endif
1333 switch (yytype)
1334 {
1335 default:
1336 break;
1337 }
1338 }
1339
1340
1341 /*--------------------------------.
1342 | Print this symbol on YYOUTPUT. |
1343 `--------------------------------*/
1344
1345 #if (defined __STDC__ || defined __C99__FUNC__ \
1346 || defined __cplusplus || defined _MSC_VER)
1347 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1348 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1349 #else
1350 static void
1351 yy_symbol_print (yyoutput, yytype, yyvaluep)
1352 FILE *yyoutput;
1353 int yytype;
1354 YYSTYPE const * const yyvaluep;
1355 #endif
1356 {
1357 if (yytype < YYNTOKENS)
1358 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1359 else
1360 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1361
1362 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1363 YYFPRINTF (yyoutput, ")");
1364 }
1365
1366 /*------------------------------------------------------------------.
1367 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1368 | TOP (included). |
1369 `------------------------------------------------------------------*/
1370
1371 #if (defined __STDC__ || defined __C99__FUNC__ \
1372 || defined __cplusplus || defined _MSC_VER)
1373 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)1374 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1375 #else
1376 static void
1377 yy_stack_print (yybottom, yytop)
1378 yytype_int16 *yybottom;
1379 yytype_int16 *yytop;
1380 #endif
1381 {
1382 YYFPRINTF (stderr, "Stack now");
1383 for (; yybottom <= yytop; yybottom++)
1384 {
1385 int yybot = *yybottom;
1386 YYFPRINTF (stderr, " %d", yybot);
1387 }
1388 YYFPRINTF (stderr, "\n");
1389 }
1390
1391 # define YY_STACK_PRINT(Bottom, Top) \
1392 do { \
1393 if (yydebug) \
1394 yy_stack_print ((Bottom), (Top)); \
1395 } while (YYID (0))
1396
1397
1398 /*------------------------------------------------.
1399 | Report that the YYRULE is going to be reduced. |
1400 `------------------------------------------------*/
1401
1402 #if (defined __STDC__ || defined __C99__FUNC__ \
1403 || defined __cplusplus || defined _MSC_VER)
1404 static void
yy_reduce_print(YYSTYPE * yyvsp,int yyrule)1405 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1406 #else
1407 static void
1408 yy_reduce_print (yyvsp, yyrule)
1409 YYSTYPE *yyvsp;
1410 int yyrule;
1411 #endif
1412 {
1413 int yynrhs = yyr2[yyrule];
1414 int yyi;
1415 unsigned long int yylno = yyrline[yyrule];
1416 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1417 yyrule - 1, yylno);
1418 /* The symbols being reduced. */
1419 for (yyi = 0; yyi < yynrhs; yyi++)
1420 {
1421 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1422 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1423 &(yyvsp[(yyi + 1) - (yynrhs)])
1424 );
1425 YYFPRINTF (stderr, "\n");
1426 }
1427 }
1428
1429 # define YY_REDUCE_PRINT(Rule) \
1430 do { \
1431 if (yydebug) \
1432 yy_reduce_print (yyvsp, Rule); \
1433 } while (YYID (0))
1434
1435 /* Nonzero means print parse trace. It is left uninitialized so that
1436 multiple parsers can coexist. */
1437 int yydebug;
1438 #else /* !YYDEBUG */
1439 # define YYDPRINTF(Args)
1440 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1441 # define YY_STACK_PRINT(Bottom, Top)
1442 # define YY_REDUCE_PRINT(Rule)
1443 #endif /* !YYDEBUG */
1444
1445
1446 /* YYINITDEPTH -- initial size of the parser's stacks. */
1447 #ifndef YYINITDEPTH
1448 # define YYINITDEPTH 200
1449 #endif
1450
1451 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1452 if the built-in stack extension method is used).
1453
1454 Do not make this value too large; the results are undefined if
1455 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1456 evaluated with infinite-precision integer arithmetic. */
1457
1458 #ifndef YYMAXDEPTH
1459 # define YYMAXDEPTH 10000
1460 #endif
1461
1462
1463 #if YYERROR_VERBOSE
1464
1465 # ifndef yystrlen
1466 # if defined __GLIBC__ && defined _STRING_H
1467 # define yystrlen strlen
1468 # else
1469 /* Return the length of YYSTR. */
1470 #if (defined __STDC__ || defined __C99__FUNC__ \
1471 || defined __cplusplus || defined _MSC_VER)
1472 static YYSIZE_T
yystrlen(const char * yystr)1473 yystrlen (const char *yystr)
1474 #else
1475 static YYSIZE_T
1476 yystrlen (yystr)
1477 const char *yystr;
1478 #endif
1479 {
1480 YYSIZE_T yylen;
1481 for (yylen = 0; yystr[yylen]; yylen++)
1482 continue;
1483 return yylen;
1484 }
1485 # endif
1486 # endif
1487
1488 # ifndef yystpcpy
1489 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1490 # define yystpcpy stpcpy
1491 # else
1492 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1493 YYDEST. */
1494 #if (defined __STDC__ || defined __C99__FUNC__ \
1495 || defined __cplusplus || defined _MSC_VER)
1496 static char *
yystpcpy(char * yydest,const char * yysrc)1497 yystpcpy (char *yydest, const char *yysrc)
1498 #else
1499 static char *
1500 yystpcpy (yydest, yysrc)
1501 char *yydest;
1502 const char *yysrc;
1503 #endif
1504 {
1505 char *yyd = yydest;
1506 const char *yys = yysrc;
1507
1508 while ((*yyd++ = *yys++) != '\0')
1509 continue;
1510
1511 return yyd - 1;
1512 }
1513 # endif
1514 # endif
1515
1516 # ifndef yytnamerr
1517 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1518 quotes and backslashes, so that it's suitable for yyerror. The
1519 heuristic is that double-quoting is unnecessary unless the string
1520 contains an apostrophe, a comma, or backslash (other than
1521 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1522 null, do not copy; instead, return the length of what the result
1523 would have been. */
1524 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)1525 yytnamerr (char *yyres, const char *yystr)
1526 {
1527 if (*yystr == '"')
1528 {
1529 YYSIZE_T yyn = 0;
1530 char const *yyp = yystr;
1531
1532 for (;;)
1533 switch (*++yyp)
1534 {
1535 case '\'':
1536 case ',':
1537 goto do_not_strip_quotes;
1538
1539 case '\\':
1540 if (*++yyp != '\\')
1541 goto do_not_strip_quotes;
1542 /* Fall through. */
1543 default:
1544 if (yyres)
1545 yyres[yyn] = *yyp;
1546 yyn++;
1547 break;
1548
1549 case '"':
1550 if (yyres)
1551 yyres[yyn] = '\0';
1552 return yyn;
1553 }
1554 do_not_strip_quotes: ;
1555 }
1556
1557 if (! yyres)
1558 return yystrlen (yystr);
1559
1560 return yystpcpy (yyres, yystr) - yyres;
1561 }
1562 # endif
1563
1564 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1565 about the unexpected token YYTOKEN for the state stack whose top is
1566 YYSSP.
1567
1568 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1569 not large enough to hold the message. In that case, also set
1570 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1571 required number of bytes is too large to store. */
1572 static int
yysyntax_error(YYSIZE_T * yymsg_alloc,char ** yymsg,yytype_int16 * yyssp,int yytoken)1573 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1574 yytype_int16 *yyssp, int yytoken)
1575 {
1576 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1577 YYSIZE_T yysize = yysize0;
1578 YYSIZE_T yysize1;
1579 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1580 /* Internationalized format string. */
1581 const char *yyformat = 0;
1582 /* Arguments of yyformat. */
1583 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1584 /* Number of reported tokens (one for the "unexpected", one per
1585 "expected"). */
1586 int yycount = 0;
1587
1588 /* There are many possibilities here to consider:
1589 - Assume YYFAIL is not used. It's too flawed to consider. See
1590 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1591 for details. YYERROR is fine as it does not invoke this
1592 function.
1593 - If this state is a consistent state with a default action, then
1594 the only way this function was invoked is if the default action
1595 is an error action. In that case, don't check for expected
1596 tokens because there are none.
1597 - The only way there can be no lookahead present (in yychar) is if
1598 this state is a consistent state with a default action. Thus,
1599 detecting the absence of a lookahead is sufficient to determine
1600 that there is no unexpected or expected token to report. In that
1601 case, just report a simple "syntax error".
1602 - Don't assume there isn't a lookahead just because this state is a
1603 consistent state with a default action. There might have been a
1604 previous inconsistent state, consistent state with a non-default
1605 action, or user semantic action that manipulated yychar.
1606 - Of course, the expected token list depends on states to have
1607 correct lookahead information, and it depends on the parser not
1608 to perform extra reductions after fetching a lookahead from the
1609 scanner and before detecting a syntax error. Thus, state merging
1610 (from LALR or IELR) and default reductions corrupt the expected
1611 token list. However, the list is correct for canonical LR with
1612 one exception: it will still contain any token that will not be
1613 accepted due to an error action in a later state.
1614 */
1615 if (yytoken != YYEMPTY)
1616 {
1617 int yyn = yypact[*yyssp];
1618 yyarg[yycount++] = yytname[yytoken];
1619 if (!yypact_value_is_default (yyn))
1620 {
1621 /* Start YYX at -YYN if negative to avoid negative indexes in
1622 YYCHECK. In other words, skip the first -YYN actions for
1623 this state because they are default actions. */
1624 int yyxbegin = yyn < 0 ? -yyn : 0;
1625 /* Stay within bounds of both yycheck and yytname. */
1626 int yychecklim = YYLAST - yyn + 1;
1627 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1628 int yyx;
1629
1630 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1631 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1632 && !yytable_value_is_error (yytable[yyx + yyn]))
1633 {
1634 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1635 {
1636 yycount = 1;
1637 yysize = yysize0;
1638 break;
1639 }
1640 yyarg[yycount++] = yytname[yyx];
1641 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1642 if (! (yysize <= yysize1
1643 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1644 return 2;
1645 yysize = yysize1;
1646 }
1647 }
1648 }
1649
1650 switch (yycount)
1651 {
1652 # define YYCASE_(N, S) \
1653 case N: \
1654 yyformat = S; \
1655 break
1656 YYCASE_(0, YY_("syntax error"));
1657 YYCASE_(1, YY_("syntax error, unexpected %s"));
1658 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1659 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1660 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1661 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1662 # undef YYCASE_
1663 }
1664
1665 yysize1 = yysize + yystrlen (yyformat);
1666 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1667 return 2;
1668 yysize = yysize1;
1669
1670 if (*yymsg_alloc < yysize)
1671 {
1672 *yymsg_alloc = 2 * yysize;
1673 if (! (yysize <= *yymsg_alloc
1674 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1675 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1676 return 1;
1677 }
1678
1679 /* Avoid sprintf, as that infringes on the user's name space.
1680 Don't have undefined behavior even if the translation
1681 produced a string with the wrong number of "%s"s. */
1682 {
1683 char *yyp = *yymsg;
1684 int yyi = 0;
1685 while ((*yyp = *yyformat) != '\0')
1686 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1687 {
1688 yyp += yytnamerr (yyp, yyarg[yyi++]);
1689 yyformat += 2;
1690 }
1691 else
1692 {
1693 yyp++;
1694 yyformat++;
1695 }
1696 }
1697 return 0;
1698 }
1699 #endif /* YYERROR_VERBOSE */
1700
1701 /*-----------------------------------------------.
1702 | Release the memory associated to this symbol. |
1703 `-----------------------------------------------*/
1704
1705 /*ARGSUSED*/
1706 #if (defined __STDC__ || defined __C99__FUNC__ \
1707 || defined __cplusplus || defined _MSC_VER)
1708 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)1709 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1710 #else
1711 static void
1712 yydestruct (yymsg, yytype, yyvaluep)
1713 const char *yymsg;
1714 int yytype;
1715 YYSTYPE *yyvaluep;
1716 #endif
1717 {
1718 YYUSE (yyvaluep);
1719
1720 if (!yymsg)
1721 yymsg = "Deleting";
1722 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1723
1724 switch (yytype)
1725 {
1726
1727 default:
1728 break;
1729 }
1730 }
1731
1732
1733 /* Prevent warnings from -Wmissing-prototypes. */
1734 #ifdef YYPARSE_PARAM
1735 #if defined __STDC__ || defined __cplusplus
1736 int yyparse (void *YYPARSE_PARAM);
1737 #else
1738 int yyparse ();
1739 #endif
1740 #else /* ! YYPARSE_PARAM */
1741 #if defined __STDC__ || defined __cplusplus
1742 int yyparse (void);
1743 #else
1744 int yyparse ();
1745 #endif
1746 #endif /* ! YYPARSE_PARAM */
1747
1748
1749 /* The lookahead symbol. */
1750 int yychar;
1751
1752 /* The semantic value of the lookahead symbol. */
1753 YYSTYPE yylval;
1754
1755 /* Number of syntax errors so far. */
1756 int yynerrs;
1757
1758
1759 /*----------.
1760 | yyparse. |
1761 `----------*/
1762
1763 #ifdef YYPARSE_PARAM
1764 #if (defined __STDC__ || defined __C99__FUNC__ \
1765 || defined __cplusplus || defined _MSC_VER)
1766 int
yyparse(void * YYPARSE_PARAM)1767 yyparse (void *YYPARSE_PARAM)
1768 #else
1769 int
1770 yyparse (YYPARSE_PARAM)
1771 void *YYPARSE_PARAM;
1772 #endif
1773 #else /* ! YYPARSE_PARAM */
1774 #if (defined __STDC__ || defined __C99__FUNC__ \
1775 || defined __cplusplus || defined _MSC_VER)
1776 int
1777 yyparse (void)
1778 #else
1779 int
1780 yyparse ()
1781
1782 #endif
1783 #endif
1784 {
1785 int yystate;
1786 /* Number of tokens to shift before error messages enabled. */
1787 int yyerrstatus;
1788
1789 /* The stacks and their tools:
1790 `yyss': related to states.
1791 `yyvs': related to semantic values.
1792
1793 Refer to the stacks thru separate pointers, to allow yyoverflow
1794 to reallocate them elsewhere. */
1795
1796 /* The state stack. */
1797 yytype_int16 yyssa[YYINITDEPTH];
1798 yytype_int16 *yyss;
1799 yytype_int16 *yyssp;
1800
1801 /* The semantic value stack. */
1802 YYSTYPE yyvsa[YYINITDEPTH];
1803 YYSTYPE *yyvs;
1804 YYSTYPE *yyvsp;
1805
1806 YYSIZE_T yystacksize;
1807
1808 int yyn;
1809 int yyresult;
1810 /* Lookahead token as an internal (translated) token number. */
1811 int yytoken;
1812 /* The variables used to return semantic value and location from the
1813 action routines. */
1814 YYSTYPE yyval;
1815
1816 #if YYERROR_VERBOSE
1817 /* Buffer for error messages, and its allocated size. */
1818 char yymsgbuf[128];
1819 char *yymsg = yymsgbuf;
1820 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1821 #endif
1822
1823 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1824
1825 /* The number of symbols on the RHS of the reduced rule.
1826 Keep to zero when no symbol should be popped. */
1827 int yylen = 0;
1828
1829 yytoken = 0;
1830 yyss = yyssa;
1831 yyvs = yyvsa;
1832 yystacksize = YYINITDEPTH;
1833
1834 YYDPRINTF ((stderr, "Starting parse\n"));
1835
1836 yystate = 0;
1837 yyerrstatus = 0;
1838 yynerrs = 0;
1839 yychar = YYEMPTY; /* Cause a token to be read. */
1840
1841 /* Initialize stack pointers.
1842 Waste one element of value and location stack
1843 so that they stay on the same level as the state stack.
1844 The wasted elements are never initialized. */
1845 yyssp = yyss;
1846 yyvsp = yyvs;
1847
1848 goto yysetstate;
1849
1850 /*------------------------------------------------------------.
1851 | yynewstate -- Push a new state, which is found in yystate. |
1852 `------------------------------------------------------------*/
1853 yynewstate:
1854 /* In all cases, when you get here, the value and location stacks
1855 have just been pushed. So pushing a state here evens the stacks. */
1856 yyssp++;
1857
1858 yysetstate:
1859 *yyssp = yystate;
1860
1861 if (yyss + yystacksize - 1 <= yyssp)
1862 {
1863 /* Get the current used size of the three stacks, in elements. */
1864 YYSIZE_T yysize = yyssp - yyss + 1;
1865
1866 #ifdef yyoverflow
1867 {
1868 /* Give user a chance to reallocate the stack. Use copies of
1869 these so that the &'s don't force the real ones into
1870 memory. */
1871 YYSTYPE *yyvs1 = yyvs;
1872 yytype_int16 *yyss1 = yyss;
1873
1874 /* Each stack pointer address is followed by the size of the
1875 data in use in that stack, in bytes. This used to be a
1876 conditional around just the two extra args, but that might
1877 be undefined if yyoverflow is a macro. */
1878 yyoverflow (YY_("memory exhausted"),
1879 &yyss1, yysize * sizeof (*yyssp),
1880 &yyvs1, yysize * sizeof (*yyvsp),
1881 &yystacksize);
1882
1883 yyss = yyss1;
1884 yyvs = yyvs1;
1885 }
1886 #else /* no yyoverflow */
1887 # ifndef YYSTACK_RELOCATE
1888 goto yyexhaustedlab;
1889 # else
1890 /* Extend the stack our own way. */
1891 if (YYMAXDEPTH <= yystacksize)
1892 goto yyexhaustedlab;
1893 yystacksize *= 2;
1894 if (YYMAXDEPTH < yystacksize)
1895 yystacksize = YYMAXDEPTH;
1896
1897 {
1898 yytype_int16 *yyss1 = yyss;
1899 union yyalloc *yyptr =
1900 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1901 if (! yyptr)
1902 goto yyexhaustedlab;
1903 YYSTACK_RELOCATE (yyss_alloc, yyss);
1904 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1905 # undef YYSTACK_RELOCATE
1906 if (yyss1 != yyssa)
1907 YYSTACK_FREE (yyss1);
1908 }
1909 # endif
1910 #endif /* no yyoverflow */
1911
1912 yyssp = yyss + yysize - 1;
1913 yyvsp = yyvs + yysize - 1;
1914
1915 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1916 (unsigned long int) yystacksize));
1917
1918 if (yyss + yystacksize - 1 <= yyssp)
1919 YYABORT;
1920 }
1921
1922 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1923
1924 if (yystate == YYFINAL)
1925 YYACCEPT;
1926
1927 goto yybackup;
1928
1929 /*-----------.
1930 | yybackup. |
1931 `-----------*/
1932 yybackup:
1933
1934 /* Do appropriate processing given the current state. Read a
1935 lookahead token if we need one and don't already have one. */
1936
1937 /* First try to decide what to do without reference to lookahead token. */
1938 yyn = yypact[yystate];
1939 if (yypact_value_is_default (yyn))
1940 goto yydefault;
1941
1942 /* Not known => get a lookahead token if don't already have one. */
1943
1944 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1945 if (yychar == YYEMPTY)
1946 {
1947 YYDPRINTF ((stderr, "Reading a token: "));
1948 yychar = YYLEX;
1949 }
1950
1951 if (yychar <= YYEOF)
1952 {
1953 yychar = yytoken = YYEOF;
1954 YYDPRINTF ((stderr, "Now at end of input.\n"));
1955 }
1956 else
1957 {
1958 yytoken = YYTRANSLATE (yychar);
1959 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1960 }
1961
1962 /* If the proper action on seeing token YYTOKEN is to reduce or to
1963 detect an error, take that action. */
1964 yyn += yytoken;
1965 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1966 goto yydefault;
1967 yyn = yytable[yyn];
1968 if (yyn <= 0)
1969 {
1970 if (yytable_value_is_error (yyn))
1971 goto yyerrlab;
1972 yyn = -yyn;
1973 goto yyreduce;
1974 }
1975
1976 /* Count tokens shifted since error; after three, turn off error
1977 status. */
1978 if (yyerrstatus)
1979 yyerrstatus--;
1980
1981 /* Shift the lookahead token. */
1982 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1983
1984 /* Discard the shifted token. */
1985 yychar = YYEMPTY;
1986
1987 yystate = yyn;
1988 *++yyvsp = yylval;
1989
1990 goto yynewstate;
1991
1992
1993 /*-----------------------------------------------------------.
1994 | yydefault -- do the default action for the current state. |
1995 `-----------------------------------------------------------*/
1996 yydefault:
1997 yyn = yydefact[yystate];
1998 if (yyn == 0)
1999 goto yyerrlab;
2000 goto yyreduce;
2001
2002
2003 /*-----------------------------.
2004 | yyreduce -- Do a reduction. |
2005 `-----------------------------*/
2006 yyreduce:
2007 /* yyn is the number of a rule to reduce with. */
2008 yylen = yyr2[yyn];
2009
2010 /* If YYLEN is nonzero, implement the default value of the action:
2011 `$$ = $1'.
2012
2013 Otherwise, the following line sets YYVAL to garbage.
2014 This behavior is undocumented and Bison
2015 users should not rely upon it. Assigning to YYVAL
2016 unconditionally makes the parser a bit smaller, and it avoids a
2017 GCC warning that YYVAL may be used uninitialized. */
2018 yyval = yyvsp[1-yylen];
2019
2020
2021 YY_REDUCE_PRINT (yyn);
2022 switch (yyn)
2023 {
2024 case 2:
2025
2026 /* Line 1806 of yacc.c */
2027 #line 116 "qcl.y"
2028 { (yyval.OBJLIST) = YYNEW(objlist); YYTRY((yyval.OBJLIST)->push_back((yyvsp[(1) - (1)].OBJ))); }
2029 break;
2030
2031 case 3:
2032
2033 /* Line 1806 of yacc.c */
2034 #line 117 "qcl.y"
2035 { yyObjList = (yyval.OBJLIST) = YYNEW(objlist); YYACCEPT; }
2036 break;
2037
2038 case 4:
2039
2040 /* Line 1806 of yacc.c */
2041 #line 118 "qcl.y"
2042 { YYTRY((yyvsp[(1) - (2)].OBJLIST)->push_back((yyvsp[(2) - (2)].OBJ))); (yyval.OBJLIST)=(yyvsp[(1) - (2)].OBJLIST); }
2043 break;
2044
2045 case 5:
2046
2047 /* Line 1806 of yacc.c */
2048 #line 119 "qcl.y"
2049 { yyObjList = (yyval.OBJLIST) = (yyvsp[(1) - (2)].OBJLIST); YYACCEPT; }
2050 break;
2051
2052 case 6:
2053
2054 /* Line 1806 of yacc.c */
2055 #line 122 "qcl.y"
2056 { (yyval.OBJ) = 0; }
2057 break;
2058
2059 case 7:
2060
2061 /* Line 1806 of yacc.c */
2062 #line 123 "qcl.y"
2063 { (yyval.OBJ) = 0; }
2064 break;
2065
2066 case 8:
2067
2068 /* Line 1806 of yacc.c */
2069 #line 126 "qcl.y"
2070 { (yyval.OBJ) = (yyvsp[(1) - (1)].DEF); }
2071 break;
2072
2073 case 9:
2074
2075 /* Line 1806 of yacc.c */
2076 #line 127 "qcl.y"
2077 { (yyval.OBJ) = (yyvsp[(1) - (1)].DEF); }
2078 break;
2079
2080 case 10:
2081
2082 /* Line 1806 of yacc.c */
2083 #line 128 "qcl.y"
2084 { (yyval.OBJ) = (yyvsp[(1) - (1)].DEF); }
2085 break;
2086
2087 case 11:
2088
2089 /* Line 1806 of yacc.c */
2090 #line 129 "qcl.y"
2091 { (yyval.OBJ) = (yyvsp[(1) - (1)].DEF); }
2092 break;
2093
2094 case 12:
2095
2096 /* Line 1806 of yacc.c */
2097 #line 130 "qcl.y"
2098 { (yyval.OBJ) = (yyvsp[(1) - (1)].DEF); }
2099 break;
2100
2101 case 13:
2102
2103 /* Line 1806 of yacc.c */
2104 #line 131 "qcl.y"
2105 { (yyval.OBJ) = (yyvsp[(1) - (1)].DEF); }
2106 break;
2107
2108 case 14:
2109
2110 /* Line 1806 of yacc.c */
2111 #line 132 "qcl.y"
2112 { (yyval.OBJ) = (yyvsp[(1) - (1)].STMT); }
2113 break;
2114
2115 case 15:
2116
2117 /* Line 1806 of yacc.c */
2118 #line 133 "qcl.y"
2119 { (yyval.OBJ) = (yyvsp[(1) - (1)].STMTLIST); }
2120 break;
2121
2122 case 16:
2123
2124 /* Line 1806 of yacc.c */
2125 #line 134 "qcl.y"
2126 { (yyval.OBJ) = YYNEW(sInclude(*(yyvsp[(1) - (2)].STRING))); }
2127 break;
2128
2129 case 17:
2130
2131 /* Line 1806 of yacc.c */
2132 #line 135 "qcl.y"
2133 { (yyval.OBJ) = (yyvsp[(2) - (2)].OBJ); }
2134 break;
2135
2136 case 18:
2137
2138 /* Line 1806 of yacc.c */
2139 #line 138 "qcl.y"
2140 {
2141 (yyval.DEF) = YYNEW(sFunctDef(tType((yyvsp[(1) - (6)].TYPE)),(yyvsp[(2) - (6)].ID),(yyvsp[(3) - (6)].DEFLIST),(yyvsp[(5) - (6)].DEFLIST),(yyvsp[(6) - (6)].STMTLIST))); }
2142 break;
2143
2144 case 19:
2145
2146 /* Line 1806 of yacc.c */
2147 #line 140 "qcl.y"
2148 {
2149 (yyval.DEF) = YYNEW(sFunctDef(tType((yyvsp[(1) - (7)].TYPE),(yyvsp[(2) - (7)].TENSOR)),(yyvsp[(3) - (7)].ID),(yyvsp[(4) - (7)].DEFLIST),(yyvsp[(6) - (7)].DEFLIST),(yyvsp[(7) - (7)].STMTLIST))); }
2150 break;
2151
2152 case 20:
2153
2154 /* Line 1806 of yacc.c */
2155 #line 144 "qcl.y"
2156 {
2157 (yyval.DEF) = YYNEW(sQuOpDef((yyvsp[(2) - (6)].ID),(yyvsp[(3) - (6)].DEFLIST),(yyvsp[(5) - (6)].DEFLIST),(yyvsp[(6) - (6)].STMTLIST))); }
2158 break;
2159
2160 case 21:
2161
2162 /* Line 1806 of yacc.c */
2163 #line 146 "qcl.y"
2164 {
2165 (yyval.DEF) = YYNEW(sQuOpDef((yyvsp[(3) - (6)].ID),(yyvsp[(4) - (6)].DEFLIST),0,0,0,1)); }
2166 break;
2167
2168 case 22:
2169
2170 /* Line 1806 of yacc.c */
2171 #line 148 "qcl.y"
2172 {
2173 (yyval.DEF) = YYNEW(sQuOpDef((yyvsp[(3) - (7)].ID),(yyvsp[(4) - (7)].DEFLIST),(yyvsp[(6) - (7)].DEFLIST),(yyvsp[(7) - (7)].STMTLIST),1)); }
2174 break;
2175
2176 case 23:
2177
2178 /* Line 1806 of yacc.c */
2179 #line 150 "qcl.y"
2180 {
2181 (yyval.DEF) = YYNEW(sQuOpDef((yyvsp[(4) - (7)].ID),(yyvsp[(5) - (7)].DEFLIST),0,0,1,1)); }
2182 break;
2183
2184 case 24:
2185
2186 /* Line 1806 of yacc.c */
2187 #line 154 "qcl.y"
2188 {
2189 (yyval.DEF) = YYNEW(sQuFunDef((yyvsp[(2) - (6)].ID),(yyvsp[(3) - (6)].DEFLIST),(yyvsp[(5) - (6)].DEFLIST),(yyvsp[(6) - (6)].STMTLIST))); }
2190 break;
2191
2192 case 25:
2193
2194 /* Line 1806 of yacc.c */
2195 #line 156 "qcl.y"
2196 {
2197 (yyval.DEF) = YYNEW(sQuFunDef((yyvsp[(3) - (6)].ID),(yyvsp[(4) - (6)].DEFLIST),0,0,0,1)); }
2198 break;
2199
2200 case 26:
2201
2202 /* Line 1806 of yacc.c */
2203 #line 158 "qcl.y"
2204 {
2205 (yyval.DEF) = YYNEW(sQuFunDef((yyvsp[(3) - (7)].ID),(yyvsp[(4) - (7)].DEFLIST),(yyvsp[(6) - (7)].DEFLIST),(yyvsp[(7) - (7)].STMTLIST),1)); }
2206 break;
2207
2208 case 27:
2209
2210 /* Line 1806 of yacc.c */
2211 #line 160 "qcl.y"
2212 {
2213 (yyval.DEF) = YYNEW(sQuFunDef((yyvsp[(4) - (7)].ID),(yyvsp[(5) - (7)].DEFLIST),0,0,1,1)); }
2214 break;
2215
2216 case 28:
2217
2218 /* Line 1806 of yacc.c */
2219 #line 162 "qcl.y"
2220 {
2221 (yyval.DEF) = YYNEW(sQuFunDef((yyvsp[(3) - (7)].ID),(yyvsp[(4) - (7)].DEFLIST),(yyvsp[(6) - (7)].DEFLIST),(yyvsp[(7) - (7)].STMTLIST)));
2222 YYTRY((yyval.DEF)->setFlag(flagFUNOP)); }
2223 break;
2224
2225 case 29:
2226
2227 /* Line 1806 of yacc.c */
2228 #line 165 "qcl.y"
2229 {
2230 (yyval.DEF) = YYNEW(sQuFunDef((yyvsp[(4) - (8)].ID),(yyvsp[(5) - (8)].DEFLIST),(yyvsp[(7) - (8)].DEFLIST),(yyvsp[(8) - (8)].STMTLIST),1));
2231 YYTRY((yyval.DEF)->setFlag(flagFUNOP)); }
2232 break;
2233
2234 case 30:
2235
2236 /* Line 1806 of yacc.c */
2237 #line 170 "qcl.y"
2238 {
2239 (yyval.DEF) = YYNEW(sProcDef((yyvsp[(2) - (6)].ID),(yyvsp[(3) - (6)].DEFLIST),(yyvsp[(5) - (6)].DEFLIST),(yyvsp[(6) - (6)].STMTLIST))); }
2240 break;
2241
2242 case 31:
2243
2244 /* Line 1806 of yacc.c */
2245 #line 172 "qcl.y"
2246 {
2247 (yyval.DEF) = YYNEW(sProcDef((yyvsp[(2) - (5)].ID),new sDefList(),(yyvsp[(4) - (5)].DEFLIST),(yyvsp[(5) - (5)].STMTLIST))); }
2248 break;
2249
2250 case 32:
2251
2252 /* Line 1806 of yacc.c */
2253 #line 176 "qcl.y"
2254 { (yyval.DEF) = YYNEW(sVarDef(tType((yyvsp[(1) - (3)].TYPE)),(yyvsp[(2) - (3)].ID))); }
2255 break;
2256
2257 case 33:
2258
2259 /* Line 1806 of yacc.c */
2260 #line 177 "qcl.y"
2261 { (yyval.DEF) = YYNEW(sVarDef(tType((yyvsp[(1) - (6)].TYPE)),(yyvsp[(2) - (6)].ID),(yyvsp[(4) - (6)].EXPR),0)); }
2262 break;
2263
2264 case 34:
2265
2266 /* Line 1806 of yacc.c */
2267 #line 178 "qcl.y"
2268 { (yyval.DEF) = YYNEW(sVarDef(tType((yyvsp[(1) - (7)].TYPE),(yyvsp[(2) - (7)].TENSOR)),(yyvsp[(3) - (7)].ID),(yyvsp[(5) - (7)].EXPR),0)); }
2269 break;
2270
2271 case 35:
2272
2273 /* Line 1806 of yacc.c */
2274 #line 179 "qcl.y"
2275 { (yyval.DEF) = YYNEW(sVarDef(tType((yyvsp[(1) - (5)].TYPE)),(yyvsp[(2) - (5)].ID),0,(yyvsp[(4) - (5)].EXPR))); }
2276 break;
2277
2278 case 36:
2279
2280 /* Line 1806 of yacc.c */
2281 #line 180 "qcl.y"
2282 { (yyval.DEF) = YYNEW(sVarDef(tType((yyvsp[(1) - (6)].TYPE),(yyvsp[(2) - (6)].TENSOR)),(yyvsp[(3) - (6)].ID),0,(yyvsp[(5) - (6)].EXPR))); }
2283 break;
2284
2285 case 37:
2286
2287 /* Line 1806 of yacc.c */
2288 #line 181 "qcl.y"
2289 {
2290 (yyval.DEF) = YYNEW(sVarDef(tType((yyvsp[(1) - (5)].TYPE)),(yyvsp[(2) - (5)].ID),0,new sVar(new tId(CONDID))));
2291 YYTRY((yyval.DEF)->setFlag(flagCONDDEF));
2292 }
2293 break;
2294
2295 case 38:
2296
2297 /* Line 1806 of yacc.c */
2298 #line 187 "qcl.y"
2299 { (yyval.DEF) = YYNEW(sConstDef((yyvsp[(2) - (5)].ID),(yyvsp[(4) - (5)].EXPR))); }
2300 break;
2301
2302 case 39:
2303
2304 /* Line 1806 of yacc.c */
2305 #line 189 "qcl.y"
2306 { (yyval.STMTLIST) = (yyvsp[(2) - (3)].STMTLIST); }
2307 break;
2308
2309 case 40:
2310
2311 /* Line 1806 of yacc.c */
2312 #line 190 "qcl.y"
2313 { (yyval.STMTLIST) = YYNEW(sStmtList()); }
2314 break;
2315
2316 case 41:
2317
2318 /* Line 1806 of yacc.c */
2319 #line 193 "qcl.y"
2320 { (yyval.DEFLIST) = (yyvsp[(2) - (2)].DEFLIST); }
2321 break;
2322
2323 case 42:
2324
2325 /* Line 1806 of yacc.c */
2326 #line 194 "qcl.y"
2327 { (yyval.DEFLIST) = YYNEW(sDefList()); }
2328 break;
2329
2330 case 43:
2331
2332 /* Line 1806 of yacc.c */
2333 #line 197 "qcl.y"
2334 { (yyval.STMTLIST) = (yyvsp[(1) - (2)].STMTLIST); }
2335 break;
2336
2337 case 44:
2338
2339 /* Line 1806 of yacc.c */
2340 #line 198 "qcl.y"
2341 { (yyval.STMTLIST) = YYNEW(sStmtList()); }
2342 break;
2343
2344 case 45:
2345
2346 /* Line 1806 of yacc.c */
2347 #line 201 "qcl.y"
2348 { (yyval.DEFLIST) = YYNEW(sDefList()); YYTRY((yyval.DEFLIST)->append((yyvsp[(1) - (1)].DEF))); }
2349 break;
2350
2351 case 46:
2352
2353 /* Line 1806 of yacc.c */
2354 #line 202 "qcl.y"
2355 { (yyval.DEFLIST) = YYNEW(sDefList()); YYTRY((yyval.DEFLIST)->append((yyvsp[(1) - (1)].DEF))); }
2356 break;
2357
2358 case 47:
2359
2360 /* Line 1806 of yacc.c */
2361 #line 203 "qcl.y"
2362 { YYTRY((yyvsp[(1) - (2)].DEFLIST)->append((yyvsp[(2) - (2)].DEF))); (yyval.DEFLIST)=(yyvsp[(1) - (2)].DEFLIST); }
2363 break;
2364
2365 case 48:
2366
2367 /* Line 1806 of yacc.c */
2368 #line 204 "qcl.y"
2369 { YYTRY((yyvsp[(1) - (2)].DEFLIST)->append((yyvsp[(2) - (2)].DEF))); (yyval.DEFLIST)=(yyvsp[(1) - (2)].DEFLIST); }
2370 break;
2371
2372 case 49:
2373
2374 /* Line 1806 of yacc.c */
2375 #line 207 "qcl.y"
2376 { (yyval.DEF) = YYNEW(sArgDef(tType((yyvsp[(1) - (2)].TYPE)),(yyvsp[(2) - (2)].ID))); }
2377 break;
2378
2379 case 50:
2380
2381 /* Line 1806 of yacc.c */
2382 #line 208 "qcl.y"
2383 { (yyval.DEF) = YYNEW(sArgDef(tType((yyvsp[(1) - (3)].TYPE),(yyvsp[(2) - (3)].TENSOR)),(yyvsp[(3) - (3)].ID))); }
2384 break;
2385
2386 case 51:
2387
2388 /* Line 1806 of yacc.c */
2389 #line 211 "qcl.y"
2390 { (yyval.DEFLIST) = YYNEW(sDefList()); YYTRY((yyval.DEFLIST)->append((yyvsp[(1) - (1)].DEF))); }
2391 break;
2392
2393 case 52:
2394
2395 /* Line 1806 of yacc.c */
2396 #line 212 "qcl.y"
2397 { YYTRY((yyvsp[(1) - (3)].DEFLIST)->append((yyvsp[(3) - (3)].DEF))); (yyval.DEFLIST)=(yyvsp[(1) - (3)].DEFLIST); }
2398 break;
2399
2400 case 53:
2401
2402 /* Line 1806 of yacc.c */
2403 #line 215 "qcl.y"
2404 { (yyval.STMTLIST) = YYNEW(sStmtList()); YYTRY((yyval.STMTLIST)->append((yyvsp[(1) - (1)].STMT))); }
2405 break;
2406
2407 case 54:
2408
2409 /* Line 1806 of yacc.c */
2410 #line 216 "qcl.y"
2411 { YYTRY((yyvsp[(1) - (2)].STMTLIST)->append((yyvsp[(2) - (2)].STMT))); (yyval.STMTLIST)=(yyvsp[(1) - (2)].STMTLIST); }
2412 break;
2413
2414 case 55:
2415
2416 /* Line 1806 of yacc.c */
2417 #line 219 "qcl.y"
2418 { (yyval.STMT) = YYNEW(sCall((yyvsp[(1) - (4)].ID),(yyvsp[(2) - (4)].EXPRLIST))); }
2419 break;
2420
2421 case 56:
2422
2423 /* Line 1806 of yacc.c */
2424 #line 220 "qcl.y"
2425 { (yyval.STMT) = YYNEW(sCall((yyvsp[(1) - (3)].ID),new sExprList())); }
2426 break;
2427
2428 case 57:
2429
2430 /* Line 1806 of yacc.c */
2431 #line 221 "qcl.y"
2432 { (yyval.STMT) = YYNEW(sCall((yyvsp[(2) - (5)].ID),(yyvsp[(3) - (5)].EXPRLIST),1)); }
2433 break;
2434
2435 case 58:
2436
2437 /* Line 1806 of yacc.c */
2438 #line 222 "qcl.y"
2439 { (yyval.STMT) = YYNEW(sAssign(new sVar((yyvsp[(1) - (4)].ID)),(yyvsp[(3) - (4)].EXPR))); }
2440 break;
2441
2442 case 59:
2443
2444 /* Line 1806 of yacc.c */
2445 #line 223 "qcl.y"
2446 { (yyval.STMT) = YYNEW(sAssign(new sVar((yyvsp[(1) - (7)].ID)),(yyvsp[(6) - (7)].EXPR),(yyvsp[(3) - (7)].EXPRLIST))); }
2447 break;
2448
2449 case 60:
2450
2451 /* Line 1806 of yacc.c */
2452 #line 224 "qcl.y"
2453 { (yyval.STMT) = YYNEW(sCall(new tId(SWAPID),new sExprList((yyvsp[(1) - (4)].EXPR),(yyvsp[(3) - (4)].EXPR)))); }
2454 break;
2455
2456 case 61:
2457
2458 /* Line 1806 of yacc.c */
2459 #line 225 "qcl.y"
2460 { (yyval.STMT) = YYNEW(sCall(new tId(FANOUTID),new sExprList((yyvsp[(1) - (4)].EXPR),(yyvsp[(3) - (4)].EXPR)))); }
2461 break;
2462
2463 case 62:
2464
2465 /* Line 1806 of yacc.c */
2466 #line 226 "qcl.y"
2467 { (yyval.STMT) = YYNEW(sCall(new tId(FANOUTID),new sExprList((yyvsp[(1) - (4)].EXPR),(yyvsp[(3) - (4)].EXPR)),1)); }
2468 break;
2469
2470 case 63:
2471
2472 /* Line 1806 of yacc.c */
2473 #line 227 "qcl.y"
2474 { (yyval.STMT) = YYNEW(sFor(new sVar((yyvsp[(2) - (7)].ID)),(yyvsp[(4) - (7)].EXPR),(yyvsp[(6) - (7)].EXPR),(yyvsp[(7) - (7)].STMTLIST))); }
2475 break;
2476
2477 case 64:
2478
2479 /* Line 1806 of yacc.c */
2480 #line 228 "qcl.y"
2481 { (yyval.STMT) = YYNEW(sFor(new sVar((yyvsp[(2) - (9)].ID)),(yyvsp[(4) - (9)].EXPR),(yyvsp[(6) - (9)].EXPR),(yyvsp[(9) - (9)].STMTLIST),(yyvsp[(8) - (9)].EXPR))); }
2482 break;
2483
2484 case 65:
2485
2486 /* Line 1806 of yacc.c */
2487 #line 229 "qcl.y"
2488 { (yyval.STMT) = YYNEW(sIf((yyvsp[(2) - (3)].EXPR),(yyvsp[(3) - (3)].STMTLIST))); }
2489 break;
2490
2491 case 66:
2492
2493 /* Line 1806 of yacc.c */
2494 #line 230 "qcl.y"
2495 { (yyval.STMT) = YYNEW(sIf((yyvsp[(2) - (5)].EXPR),(yyvsp[(3) - (5)].STMTLIST),(yyvsp[(5) - (5)].STMTLIST))); }
2496 break;
2497
2498 case 67:
2499
2500 /* Line 1806 of yacc.c */
2501 #line 231 "qcl.y"
2502 { (yyval.STMT) = YYNEW(sWhile((yyvsp[(2) - (3)].EXPR),(yyvsp[(3) - (3)].STMTLIST))); }
2503 break;
2504
2505 case 68:
2506
2507 /* Line 1806 of yacc.c */
2508 #line 232 "qcl.y"
2509 { (yyval.STMT) = YYNEW(sUntil((yyvsp[(3) - (4)].EXPR),(yyvsp[(1) - (4)].STMTLIST))); }
2510 break;
2511
2512 case 69:
2513
2514 /* Line 1806 of yacc.c */
2515 #line 233 "qcl.y"
2516 { (yyval.STMT) = YYNEW(sBreak()); }
2517 break;
2518
2519 case 70:
2520
2521 /* Line 1806 of yacc.c */
2522 #line 234 "qcl.y"
2523 { (yyval.STMT) = YYNEW(sReturn((yyvsp[(2) - (3)].EXPR))); }
2524 break;
2525
2526 case 71:
2527
2528 /* Line 1806 of yacc.c */
2529 #line 235 "qcl.y"
2530 { (yyval.STMT) = YYNEW(sInput(new sVar((yyvsp[(2) - (3)].ID)),0)); }
2531 break;
2532
2533 case 72:
2534
2535 /* Line 1806 of yacc.c */
2536 #line 236 "qcl.y"
2537 { (yyval.STMT) = YYNEW(sInput(new sVar((yyvsp[(4) - (5)].ID)),(yyvsp[(2) - (5)].EXPR))); }
2538 break;
2539
2540 case 73:
2541
2542 /* Line 1806 of yacc.c */
2543 #line 237 "qcl.y"
2544 { (yyval.STMT) = YYNEW(sPrint(new sExprList())); }
2545 break;
2546
2547 case 74:
2548
2549 /* Line 1806 of yacc.c */
2550 #line 238 "qcl.y"
2551 { (yyval.STMT) = YYNEW(sPrint((yyvsp[(2) - (3)].EXPRLIST))); }
2552 break;
2553
2554 case 75:
2555
2556 /* Line 1806 of yacc.c */
2557 #line 239 "qcl.y"
2558 { (yyval.STMT) = YYNEW(sExit(0)); }
2559 break;
2560
2561 case 76:
2562
2563 /* Line 1806 of yacc.c */
2564 #line 240 "qcl.y"
2565 { (yyval.STMT) = YYNEW(sExit((yyvsp[(2) - (3)].EXPR))); }
2566 break;
2567
2568 case 77:
2569
2570 /* Line 1806 of yacc.c */
2571 #line 241 "qcl.y"
2572 { (yyval.STMT) = YYNEW(sMeasure((yyvsp[(2) - (3)].EXPR),0)); }
2573 break;
2574
2575 case 78:
2576
2577 /* Line 1806 of yacc.c */
2578 #line 242 "qcl.y"
2579 { (yyval.STMT) = YYNEW(sMeasure((yyvsp[(2) - (5)].EXPR),new sVar((yyvsp[(4) - (5)].ID)))); }
2580 break;
2581
2582 case 79:
2583
2584 /* Line 1806 of yacc.c */
2585 #line 243 "qcl.y"
2586 { (yyval.STMT) = YYNEW(sReset()); }
2587 break;
2588
2589 case 80:
2590
2591 /* Line 1806 of yacc.c */
2592 #line 244 "qcl.y"
2593 { (yyval.STMT) = YYNEW(sDump(0)); }
2594 break;
2595
2596 case 81:
2597
2598 /* Line 1806 of yacc.c */
2599 #line 245 "qcl.y"
2600 { (yyval.STMT) = YYNEW(sDump((yyvsp[(2) - (3)].EXPR))); }
2601 break;
2602
2603 case 82:
2604
2605 /* Line 1806 of yacc.c */
2606 #line 246 "qcl.y"
2607 { (yyval.STMT) = YYNEW(sPlot()); }
2608 break;
2609
2610 case 83:
2611
2612 /* Line 1806 of yacc.c */
2613 #line 247 "qcl.y"
2614 { (yyval.STMT) = YYNEW(sPlot((yyvsp[(2) - (3)].EXPR))); }
2615 break;
2616
2617 case 84:
2618
2619 /* Line 1806 of yacc.c */
2620 #line 248 "qcl.y"
2621 { (yyval.STMT) = YYNEW(sPlot((yyvsp[(2) - (5)].EXPR),(yyvsp[(4) - (5)].EXPR))); }
2622 break;
2623
2624 case 85:
2625
2626 /* Line 1806 of yacc.c */
2627 #line 249 "qcl.y"
2628 { (yyval.STMT) = YYNEW(sInspect(0)); }
2629 break;
2630
2631 case 86:
2632
2633 /* Line 1806 of yacc.c */
2634 #line 250 "qcl.y"
2635 { (yyval.STMT) = YYNEW(sInspect((yyvsp[(2) - (3)].EXPRLIST))); }
2636 break;
2637
2638 case 87:
2639
2640 /* Line 1806 of yacc.c */
2641 #line 251 "qcl.y"
2642 { (yyval.STMT) = YYNEW(sLoad(0)); }
2643 break;
2644
2645 case 88:
2646
2647 /* Line 1806 of yacc.c */
2648 #line 252 "qcl.y"
2649 { (yyval.STMT) = YYNEW(sLoad((yyvsp[(2) - (3)].EXPR))); }
2650 break;
2651
2652 case 89:
2653
2654 /* Line 1806 of yacc.c */
2655 #line 253 "qcl.y"
2656 { (yyval.STMT) = YYNEW(sSave(0)); }
2657 break;
2658
2659 case 90:
2660
2661 /* Line 1806 of yacc.c */
2662 #line 254 "qcl.y"
2663 { (yyval.STMT) = YYNEW(sSave((yyvsp[(2) - (3)].EXPR))); }
2664 break;
2665
2666 case 91:
2667
2668 /* Line 1806 of yacc.c */
2669 #line 255 "qcl.y"
2670 { (yyval.STMT) = YYNEW(sShell()); }
2671 break;
2672
2673 case 92:
2674
2675 /* Line 1806 of yacc.c */
2676 #line 256 "qcl.y"
2677 { (yyval.STMT) = YYNEW(sSet(*(yyvsp[(1) - (2)].STRING),0)); }
2678 break;
2679
2680 case 93:
2681
2682 /* Line 1806 of yacc.c */
2683 #line 257 "qcl.y"
2684 { (yyval.STMT) = YYNEW(sSet(*(yyvsp[(1) - (3)].STRING),(yyvsp[(2) - (3)].EXPR))); }
2685 break;
2686
2687 case 94:
2688
2689 /* Line 1806 of yacc.c */
2690 #line 260 "qcl.y"
2691 { (yyval.EXPRLIST) = YYNEW(sExprList()); YYTRY((yyval.EXPRLIST)->append((yyvsp[(1) - (1)].EXPR))); }
2692 break;
2693
2694 case 95:
2695
2696 /* Line 1806 of yacc.c */
2697 #line 261 "qcl.y"
2698 { YYTRY((yyvsp[(1) - (3)].EXPRLIST)->append((yyvsp[(3) - (3)].EXPR))); (yyval.EXPRLIST)=(yyvsp[(1) - (3)].EXPRLIST); }
2699 break;
2700
2701 case 96:
2702
2703 /* Line 1806 of yacc.c */
2704 #line 264 "qcl.y"
2705 { (yyval.EXPR) = (yyvsp[(1) - (1)].CONST); }
2706 break;
2707
2708 case 97:
2709
2710 /* Line 1806 of yacc.c */
2711 #line 265 "qcl.y"
2712 { (yyval.EXPR) = YYNEW(sVar((yyvsp[(1) - (1)].ID))); }
2713 break;
2714
2715 case 98:
2716
2717 /* Line 1806 of yacc.c */
2718 #line 266 "qcl.y"
2719 { (yyval.EXPR) = YYNEW(sSubscript(new sVar((yyvsp[(1) - (4)].ID)),(yyvsp[(3) - (4)].EXPRLIST))); }
2720 break;
2721
2722 case 99:
2723
2724 /* Line 1806 of yacc.c */
2725 #line 267 "qcl.y"
2726 { (yyval.EXPR) = YYNEW(sSubRange(new sVar((yyvsp[(1) - (6)].ID)),(yyvsp[(3) - (6)].EXPR),(yyvsp[(5) - (6)].EXPR),SUBRANGE_LENGTH)); }
2727 break;
2728
2729 case 100:
2730
2731 /* Line 1806 of yacc.c */
2732 #line 268 "qcl.y"
2733 { (yyval.EXPR) = YYNEW(sSubRange(new sVar((yyvsp[(1) - (6)].ID)),(yyvsp[(3) - (6)].EXPR),(yyvsp[(5) - (6)].EXPR),SUBRANGE_END)); }
2734 break;
2735
2736 case 101:
2737
2738 /* Line 1806 of yacc.c */
2739 #line 269 "qcl.y"
2740 { (yyval.EXPR) = YYNEW(sFunctCall((yyvsp[(1) - (3)].ID),(yyvsp[(2) - (3)].EXPRLIST))); }
2741 break;
2742
2743 case 102:
2744
2745 /* Line 1806 of yacc.c */
2746 #line 270 "qcl.y"
2747 { (yyval.EXPR) = YYNEW(sNeg((yyvsp[(2) - (2)].EXPR))); }
2748 break;
2749
2750 case 103:
2751
2752 /* Line 1806 of yacc.c */
2753 #line 271 "qcl.y"
2754 { (yyval.EXPR) = YYNEW(sNot((yyvsp[(2) - (2)].EXPR))); }
2755 break;
2756
2757 case 104:
2758
2759 /* Line 1806 of yacc.c */
2760 #line 272 "qcl.y"
2761 { (yyval.EXPR) = YYNEW(sLength((yyvsp[(2) - (2)].EXPR))); }
2762 break;
2763
2764 case 105:
2765
2766 /* Line 1806 of yacc.c */
2767 #line 273 "qcl.y"
2768 { (yyval.EXPR) = YYNEW(sOr((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2769 break;
2770
2771 case 106:
2772
2773 /* Line 1806 of yacc.c */
2774 #line 274 "qcl.y"
2775 { (yyval.EXPR) = YYNEW(sXor((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2776 break;
2777
2778 case 107:
2779
2780 /* Line 1806 of yacc.c */
2781 #line 275 "qcl.y"
2782 { (yyval.EXPR) = YYNEW(sAnd((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2783 break;
2784
2785 case 108:
2786
2787 /* Line 1806 of yacc.c */
2788 #line 276 "qcl.y"
2789 { (yyval.EXPR) = YYNEW(sEqual((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2790 break;
2791
2792 case 109:
2793
2794 /* Line 1806 of yacc.c */
2795 #line 277 "qcl.y"
2796 { (yyval.EXPR) = YYNEW(sLeEq((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2797 break;
2798
2799 case 110:
2800
2801 /* Line 1806 of yacc.c */
2802 #line 278 "qcl.y"
2803 { (yyval.EXPR) = YYNEW(sLeEq((yyvsp[(3) - (3)].EXPR),(yyvsp[(1) - (3)].EXPR))); }
2804 break;
2805
2806 case 111:
2807
2808 /* Line 1806 of yacc.c */
2809 #line 279 "qcl.y"
2810 { (yyval.EXPR) = YYNEW(sNotEq((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2811 break;
2812
2813 case 112:
2814
2815 /* Line 1806 of yacc.c */
2816 #line 280 "qcl.y"
2817 { (yyval.EXPR) = YYNEW(sLess((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2818 break;
2819
2820 case 113:
2821
2822 /* Line 1806 of yacc.c */
2823 #line 281 "qcl.y"
2824 { (yyval.EXPR) = YYNEW(sLess((yyvsp[(3) - (3)].EXPR),(yyvsp[(1) - (3)].EXPR))); }
2825 break;
2826
2827 case 114:
2828
2829 /* Line 1806 of yacc.c */
2830 #line 282 "qcl.y"
2831 { (yyval.EXPR) = YYNEW(sAdd((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2832 break;
2833
2834 case 115:
2835
2836 /* Line 1806 of yacc.c */
2837 #line 283 "qcl.y"
2838 { (yyval.EXPR) = YYNEW(sSub((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2839 break;
2840
2841 case 116:
2842
2843 /* Line 1806 of yacc.c */
2844 #line 284 "qcl.y"
2845 { (yyval.EXPR) = YYNEW(sConcat((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2846 break;
2847
2848 case 117:
2849
2850 /* Line 1806 of yacc.c */
2851 #line 285 "qcl.y"
2852 { (yyval.EXPR) = YYNEW(sMod((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2853 break;
2854
2855 case 118:
2856
2857 /* Line 1806 of yacc.c */
2858 #line 286 "qcl.y"
2859 { (yyval.EXPR) = YYNEW(sMult((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2860 break;
2861
2862 case 119:
2863
2864 /* Line 1806 of yacc.c */
2865 #line 287 "qcl.y"
2866 { (yyval.EXPR) = YYNEW(sDiv((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2867 break;
2868
2869 case 120:
2870
2871 /* Line 1806 of yacc.c */
2872 #line 288 "qcl.y"
2873 { (yyval.EXPR) = YYNEW(sPow((yyvsp[(1) - (3)].EXPR),(yyvsp[(3) - (3)].EXPR))); }
2874 break;
2875
2876 case 121:
2877
2878 /* Line 1806 of yacc.c */
2879 #line 289 "qcl.y"
2880 { (yyval.EXPR) = (yyvsp[(2) - (3)].EXPR); }
2881 break;
2882
2883 case 122:
2884
2885 /* Line 1806 of yacc.c */
2886 #line 290 "qcl.y"
2887 { (yyval.EXPR) = YYNEW(sBaseFunct((yyvsp[(1) - (3)].OBJTYPE),(yyvsp[(2) - (3)].EXPR))); }
2888 break;
2889
2890 case 123:
2891
2892 /* Line 1806 of yacc.c */
2893 #line 291 "qcl.y"
2894 { (yyval.EXPR) = YYNEW(sListFunct((yyvsp[(1) - (3)].OBJTYPE),(yyvsp[(2) - (3)].EXPRLIST))); }
2895 break;
2896
2897 case 124:
2898
2899 /* Line 1806 of yacc.c */
2900 #line 292 "qcl.y"
2901 { (yyval.EXPR) = YYNEW(sListFunct((yyvsp[(1) - (2)].OBJTYPE),new sExprList())); }
2902 break;
2903
2904
2905
2906 /* Line 1806 of yacc.c */
2907 #line 2908 "yacc.cc"
2908 default: break;
2909 }
2910 /* User semantic actions sometimes alter yychar, and that requires
2911 that yytoken be updated with the new translation. We take the
2912 approach of translating immediately before every use of yytoken.
2913 One alternative is translating here after every semantic action,
2914 but that translation would be missed if the semantic action invokes
2915 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2916 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2917 incorrect destructor might then be invoked immediately. In the
2918 case of YYERROR or YYBACKUP, subsequent parser actions might lead
2919 to an incorrect destructor call or verbose syntax error message
2920 before the lookahead is translated. */
2921 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2922
2923 YYPOPSTACK (yylen);
2924 yylen = 0;
2925 YY_STACK_PRINT (yyss, yyssp);
2926
2927 *++yyvsp = yyval;
2928
2929 /* Now `shift' the result of the reduction. Determine what state
2930 that goes to, based on the state we popped back to and the rule
2931 number reduced by. */
2932
2933 yyn = yyr1[yyn];
2934
2935 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2936 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2937 yystate = yytable[yystate];
2938 else
2939 yystate = yydefgoto[yyn - YYNTOKENS];
2940
2941 goto yynewstate;
2942
2943
2944 /*------------------------------------.
2945 | yyerrlab -- here on detecting error |
2946 `------------------------------------*/
2947 yyerrlab:
2948 /* Make sure we have latest lookahead translation. See comments at
2949 user semantic actions for why this is necessary. */
2950 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2951
2952 /* If not already recovering from an error, report this error. */
2953 if (!yyerrstatus)
2954 {
2955 ++yynerrs;
2956 #if ! YYERROR_VERBOSE
2957 yyerror (YY_("syntax error"));
2958 #else
2959 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2960 yyssp, yytoken)
2961 {
2962 char const *yymsgp = YY_("syntax error");
2963 int yysyntax_error_status;
2964 yysyntax_error_status = YYSYNTAX_ERROR;
2965 if (yysyntax_error_status == 0)
2966 yymsgp = yymsg;
2967 else if (yysyntax_error_status == 1)
2968 {
2969 if (yymsg != yymsgbuf)
2970 YYSTACK_FREE (yymsg);
2971 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2972 if (!yymsg)
2973 {
2974 yymsg = yymsgbuf;
2975 yymsg_alloc = sizeof yymsgbuf;
2976 yysyntax_error_status = 2;
2977 }
2978 else
2979 {
2980 yysyntax_error_status = YYSYNTAX_ERROR;
2981 yymsgp = yymsg;
2982 }
2983 }
2984 yyerror (yymsgp);
2985 if (yysyntax_error_status == 2)
2986 goto yyexhaustedlab;
2987 }
2988 # undef YYSYNTAX_ERROR
2989 #endif
2990 }
2991
2992
2993
2994 if (yyerrstatus == 3)
2995 {
2996 /* If just tried and failed to reuse lookahead token after an
2997 error, discard it. */
2998
2999 if (yychar <= YYEOF)
3000 {
3001 /* Return failure if at end of input. */
3002 if (yychar == YYEOF)
3003 YYABORT;
3004 }
3005 else
3006 {
3007 yydestruct ("Error: discarding",
3008 yytoken, &yylval);
3009 yychar = YYEMPTY;
3010 }
3011 }
3012
3013 /* Else will try to reuse lookahead token after shifting the error
3014 token. */
3015 goto yyerrlab1;
3016
3017
3018 /*---------------------------------------------------.
3019 | yyerrorlab -- error raised explicitly by YYERROR. |
3020 `---------------------------------------------------*/
3021 yyerrorlab:
3022
3023 /* Pacify compilers like GCC when the user code never invokes
3024 YYERROR and the label yyerrorlab therefore never appears in user
3025 code. */
3026 if (/*CONSTCOND*/ 0)
3027 goto yyerrorlab;
3028
3029 /* Do not reclaim the symbols of the rule which action triggered
3030 this YYERROR. */
3031 YYPOPSTACK (yylen);
3032 yylen = 0;
3033 YY_STACK_PRINT (yyss, yyssp);
3034 yystate = *yyssp;
3035 goto yyerrlab1;
3036
3037
3038 /*-------------------------------------------------------------.
3039 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3040 `-------------------------------------------------------------*/
3041 yyerrlab1:
3042 yyerrstatus = 3; /* Each real token shifted decrements this. */
3043
3044 for (;;)
3045 {
3046 yyn = yypact[yystate];
3047 if (!yypact_value_is_default (yyn))
3048 {
3049 yyn += YYTERROR;
3050 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3051 {
3052 yyn = yytable[yyn];
3053 if (0 < yyn)
3054 break;
3055 }
3056 }
3057
3058 /* Pop the current state because it cannot handle the error token. */
3059 if (yyssp == yyss)
3060 YYABORT;
3061
3062
3063 yydestruct ("Error: popping",
3064 yystos[yystate], yyvsp);
3065 YYPOPSTACK (1);
3066 yystate = *yyssp;
3067 YY_STACK_PRINT (yyss, yyssp);
3068 }
3069
3070 *++yyvsp = yylval;
3071
3072
3073 /* Shift the error token. */
3074 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3075
3076 yystate = yyn;
3077 goto yynewstate;
3078
3079
3080 /*-------------------------------------.
3081 | yyacceptlab -- YYACCEPT comes here. |
3082 `-------------------------------------*/
3083 yyacceptlab:
3084 yyresult = 0;
3085 goto yyreturn;
3086
3087 /*-----------------------------------.
3088 | yyabortlab -- YYABORT comes here. |
3089 `-----------------------------------*/
3090 yyabortlab:
3091 yyresult = 1;
3092 goto yyreturn;
3093
3094 #if !defined(yyoverflow) || YYERROR_VERBOSE
3095 /*-------------------------------------------------.
3096 | yyexhaustedlab -- memory exhaustion comes here. |
3097 `-------------------------------------------------*/
3098 yyexhaustedlab:
3099 yyerror (YY_("memory exhausted"));
3100 yyresult = 2;
3101 /* Fall through. */
3102 #endif
3103
3104 yyreturn:
3105 if (yychar != YYEMPTY)
3106 {
3107 /* Make sure we have latest lookahead translation. See comments at
3108 user semantic actions for why this is necessary. */
3109 yytoken = YYTRANSLATE (yychar);
3110 yydestruct ("Cleanup: discarding lookahead",
3111 yytoken, &yylval);
3112 }
3113 /* Do not reclaim the symbols of the rule which action triggered
3114 this YYABORT or YYACCEPT. */
3115 YYPOPSTACK (yylen);
3116 YY_STACK_PRINT (yyss, yyssp);
3117 while (yyssp != yyss)
3118 {
3119 yydestruct ("Cleanup: popping",
3120 yystos[*yyssp], yyvsp);
3121 YYPOPSTACK (1);
3122 }
3123 #ifndef yyoverflow
3124 if (yyss != yyssa)
3125 YYSTACK_FREE (yyss);
3126 #endif
3127 #if YYERROR_VERBOSE
3128 if (yymsg != yymsgbuf)
3129 YYSTACK_FREE (yymsg);
3130 #endif
3131 /* Make sure YYID is used. */
3132 return YYID (yyresult);
3133 }
3134
3135
3136
3137