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