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