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, 242, 246, 251, 259, 260,
579  275, 280, 288, 293, 301, 309, 320, 323, 330, 333,
580  336, 341, 348, 349, 357, 358, 363, 367, 376, 383,
581  390, 399, 400, 404, 408, 412, 416, 420, 421, 427,
582  428, 429, 432, 436, 440, 444, 448, 452, 456, 462,
583  463, 464, 465, 468, 472, 476, 482, 486, 490, 494,
584  498, 504, 508, 512, 516, 522, 526, 530, 534, 538,
585  542, 548, 552, 556, 560, 564, 568, 572, 578, 582,
586  586, 590, 594, 598, 602, 606, 610, 611, 618, 622
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(stack((yyvsp[-4])), std::move(lt), std::move(lf));
1794 
1795  newstack((yyval)).swap(ite);
1796  }
1797 #line 1798 "jsil_y.tab.cpp" /* yacc.c:1648 */
1798  break;
1799 
1800  case 25:
1801 #line 243 "parser.y" /* yacc.c:1648 */
1802  {
1803  newstack((yyval))=code_skipt();
1804  }
1805 #line 1806 "jsil_y.tab.cpp" /* yacc.c:1648 */
1806  break;
1807 
1808  case 26:
1809 #line 247 "parser.y" /* yacc.c:1648 */
1810  {
1811  code_assignt a(stack((yyvsp[-2])), stack((yyvsp[0])));
1812  newstack((yyval)).swap(a);
1813  }
1814 #line 1815 "jsil_y.tab.cpp" /* yacc.c:1648 */
1815  break;
1816 
1817  case 27:
1818 #line 252 "parser.y" /* yacc.c:1648 */
1819  {
1820  index_exprt i(stack((yyvsp[-5])), stack((yyvsp[-3])));
1821  code_assignt a(i, stack((yyvsp[0])));
1822  newstack((yyval)).swap(a);
1823  }
1824 #line 1825 "jsil_y.tab.cpp" /* yacc.c:1648 */
1825  break;
1826 
1827  case 29:
1828 #line 261 "parser.y" /* yacc.c:1648 */
1829  {
1831  f.function().swap(stack((yyvsp[-4])));
1832  if(stack((yyvsp[-2])).is_not_nil())
1833  f.arguments().swap(stack((yyvsp[-2])).operands());
1834 
1835  newstack((yyval)).swap(f);
1836 
1837  if(stack((yyvsp[0])).is_not_nil())
1838  {
1839  with_exprt w(stack((yyval)), stack((yyvsp[0])), nil_exprt());
1840  stack((yyval)).swap(w);
1841  }
1842  }
1843 #line 1844 "jsil_y.tab.cpp" /* yacc.c:1648 */
1844  break;
1845 
1846  case 30:
1847 #line 276 "parser.y" /* yacc.c:1648 */
1848  {
1849  exprt n("new");
1850  newstack((yyval)).swap(n);
1851  }
1852 #line 1853 "jsil_y.tab.cpp" /* yacc.c:1648 */
1853  break;
1854 
1855  case 31:
1856 #line 281 "parser.y" /* yacc.c:1648 */
1857  {
1858  exprt has_field("hasField");
1859  has_field.move_to_operands(stack((yyvsp[-3])));
1860  has_field.move_to_operands(stack((yyvsp[-1])));
1861 
1862  newstack((yyval)).swap(has_field);
1863  }
1864 #line 1865 "jsil_y.tab.cpp" /* yacc.c:1648 */
1865  break;
1866 
1867  case 32:
1868 #line 289 "parser.y" /* yacc.c:1648 */
1869  {
1870  index_exprt i(stack((yyvsp[-3])), stack((yyvsp[-1])));
1871  newstack((yyval)).swap(i);
1872  }
1873 #line 1874 "jsil_y.tab.cpp" /* yacc.c:1648 */
1874  break;
1875 
1876  case 33:
1877 #line 294 "parser.y" /* yacc.c:1648 */
1878  {
1879  exprt d("delete");
1880  d.move_to_operands(stack((yyvsp[-3])));
1881  d.move_to_operands(stack((yyvsp[-1])));
1882 
1883  newstack((yyval)).swap(d);
1884  }
1885 #line 1886 "jsil_y.tab.cpp" /* yacc.c:1648 */
1886  break;
1887 
1888  case 34:
1889 #line 302 "parser.y" /* yacc.c:1648 */
1890  {
1891  exprt proto_field("protoField");
1892  proto_field.move_to_operands(stack((yyvsp[-3])));
1893  proto_field.move_to_operands(stack((yyvsp[-1])));
1894 
1895  newstack((yyval)).swap(proto_field);
1896  }
1897 #line 1898 "jsil_y.tab.cpp" /* yacc.c:1648 */
1898  break;
1899 
1900  case 35:
1901 #line 310 "parser.y" /* yacc.c:1648 */
1902  {
1903  exprt proto_obj("protoObj");
1904  proto_obj.move_to_operands(stack((yyvsp[-3])));
1905  proto_obj.move_to_operands(stack((yyvsp[-1])));
1906 
1907  newstack((yyval)).swap(proto_obj);
1908  }
1909 #line 1910 "jsil_y.tab.cpp" /* yacc.c:1648 */
1910  break;
1911 
1912  case 36:
1913 #line 320 "parser.y" /* yacc.c:1648 */
1914  {
1915  newstack((yyval));
1916  }
1917 #line 1918 "jsil_y.tab.cpp" /* yacc.c:1648 */
1918  break;
1919 
1920  case 37:
1921 #line 324 "parser.y" /* yacc.c:1648 */
1922  {
1923  (yyval)=(yyvsp[0]);
1924  }
1925 #line 1926 "jsil_y.tab.cpp" /* yacc.c:1648 */
1926  break;
1927 
1928  case 38:
1929 #line 330 "parser.y" /* yacc.c:1648 */
1930  {
1931  newstack((yyval));
1932  }
1933 #line 1934 "jsil_y.tab.cpp" /* yacc.c:1648 */
1934  break;
1935 
1936  case 40:
1937 #line 337 "parser.y" /* yacc.c:1648 */
1938  {
1939  newstack((yyval)).id(ID_expression_list);
1940  stack((yyval)).move_to_operands(stack((yyvsp[0])));
1941  }
1942 #line 1943 "jsil_y.tab.cpp" /* yacc.c:1648 */
1943  break;
1944 
1945  case 41:
1946 #line 342 "parser.y" /* yacc.c:1648 */
1947  {
1948  (yyval)=(yyvsp[-2]);
1949  stack((yyval)).move_to_operands(stack((yyvsp[0])));
1950  }
1951 #line 1952 "jsil_y.tab.cpp" /* yacc.c:1648 */
1952  break;
1953 
1954  case 43:
1955 #line 350 "parser.y" /* yacc.c:1648 */
1956  {
1957  (yyval)=(yyvsp[-1]);
1958  stack((yyval)).move_to_operands(stack((yyvsp[-2])));
1959  stack((yyval)).move_to_operands(stack((yyvsp[0])));
1960  }
1961 #line 1962 "jsil_y.tab.cpp" /* yacc.c:1648 */
1962  break;
1963 
1964  case 45:
1965 #line 359 "parser.y" /* yacc.c:1648 */
1966  {
1967  (yyval)=(yyvsp[-1]);
1968  stack((yyval)).move_to_operands(stack((yyvsp[0])));
1969  }
1970 #line 1971 "jsil_y.tab.cpp" /* yacc.c:1648 */
1971  break;
1972 
1973  case 46:
1974 #line 364 "parser.y" /* yacc.c:1648 */
1975  {
1976  (yyval)=(yyvsp[-1]);
1977  }
1978 #line 1979 "jsil_y.tab.cpp" /* yacc.c:1648 */
1979  break;
1980 
1981  case 47:
1982 #line 368 "parser.y" /* yacc.c:1648 */
1983  {
1984  exprt ref("ref");
1985  ref.move_to_operands(stack((yyvsp[-5])));
1986  ref.move_to_operands(stack((yyvsp[-3])));
1987  ref.move_to_operands(stack((yyvsp[-1])));
1988 
1989  newstack((yyval)).swap(ref);
1990  }
1991 #line 1992 "jsil_y.tab.cpp" /* yacc.c:1648 */
1992  break;
1993 
1994  case 48:
1995 #line 377 "parser.y" /* yacc.c:1648 */
1996  {
1997  exprt field("field");
1998  field.move_to_operands(stack((yyvsp[-1])));
1999 
2000  newstack((yyval)).swap(field);
2001  }
2002 #line 2003 "jsil_y.tab.cpp" /* yacc.c:1648 */
2003  break;
2004 
2005  case 49:
2006 #line 384 "parser.y" /* yacc.c:1648 */
2007  {
2008  exprt base(ID_base);
2009  base.move_to_operands(stack((yyvsp[-1])));
2010 
2011  newstack((yyval)).swap(base);
2012  }
2013 #line 2014 "jsil_y.tab.cpp" /* yacc.c:1648 */
2014  break;
2015 
2016  case 50:
2017 #line 391 "parser.y" /* yacc.c:1648 */
2018  {
2019  exprt typeof_expr(ID_typeof);
2020  typeof_expr.move_to_operands(stack((yyvsp[-1])));
2021 
2022  newstack((yyval)).swap(typeof_expr);
2023  }
2024 #line 2025 "jsil_y.tab.cpp" /* yacc.c:1648 */
2025  break;
2026 
2027  case 52:
2028 #line 401 "parser.y" /* yacc.c:1648 */
2029  {
2030  newstack((yyval)).id(ID_null);
2031  }
2032 #line 2033 "jsil_y.tab.cpp" /* yacc.c:1648 */
2033  break;
2034 
2035  case 53:
2036 #line 405 "parser.y" /* yacc.c:1648 */
2037  {
2038  newstack((yyval)).id("undefined");
2039  }
2040 #line 2041 "jsil_y.tab.cpp" /* yacc.c:1648 */
2041  break;
2042 
2043  case 54:
2044 #line 409 "parser.y" /* yacc.c:1648 */
2045  {
2046  newstack((yyval)).id(ID_empty);
2047  }
2048 #line 2049 "jsil_y.tab.cpp" /* yacc.c:1648 */
2049  break;
2050 
2051  case 55:
2052 #line 413 "parser.y" /* yacc.c:1648 */
2053  {
2054  newstack((yyval)) = true_exprt();
2055  }
2056 #line 2057 "jsil_y.tab.cpp" /* yacc.c:1648 */
2057  break;
2058 
2059  case 56:
2060 #line 417 "parser.y" /* yacc.c:1648 */
2061  {
2062  newstack((yyval)) = false_exprt();
2063  }
2064 #line 2065 "jsil_y.tab.cpp" /* yacc.c:1648 */
2065  break;
2066 
2067  case 58:
2068 #line 422 "parser.y" /* yacc.c:1648 */
2069  {
2071  .get_value(), string_typet());
2072  stack((yyval)).swap(c);
2073  }
2074 #line 2075 "jsil_y.tab.cpp" /* yacc.c:1648 */
2075  break;
2076 
2077  case 62:
2078 #line 433 "parser.y" /* yacc.c:1648 */
2079  {
2080  newstack((yyval)).id("proto");
2081  }
2082 #line 2083 "jsil_y.tab.cpp" /* yacc.c:1648 */
2083  break;
2084 
2085  case 63:
2086 #line 437 "parser.y" /* yacc.c:1648 */
2087  {
2088  newstack((yyval)).id("fid");
2089  }
2090 #line 2091 "jsil_y.tab.cpp" /* yacc.c:1648 */
2091  break;
2092 
2093  case 64:
2094 #line 441 "parser.y" /* yacc.c:1648 */
2095  {
2096  newstack((yyval)).id("scope");
2097  }
2098 #line 2099 "jsil_y.tab.cpp" /* yacc.c:1648 */
2099  break;
2100 
2101  case 65:
2102 #line 445 "parser.y" /* yacc.c:1648 */
2103  {
2104  newstack((yyval)).id("constructid");
2105  }
2106 #line 2107 "jsil_y.tab.cpp" /* yacc.c:1648 */
2107  break;
2108 
2109  case 66:
2110 #line 449 "parser.y" /* yacc.c:1648 */
2111  {
2112  newstack((yyval)).id("primvalue");
2113  }
2114 #line 2115 "jsil_y.tab.cpp" /* yacc.c:1648 */
2115  break;
2116 
2117  case 67:
2118 #line 453 "parser.y" /* yacc.c:1648 */
2119  {
2120  newstack((yyval)).id("targetfunction");
2121  }
2122 #line 2123 "jsil_y.tab.cpp" /* yacc.c:1648 */
2123  break;
2124 
2125  case 68:
2126 #line 457 "parser.y" /* yacc.c:1648 */
2127  {
2128  newstack((yyval)).id(ID_class);
2129  }
2130 #line 2131 "jsil_y.tab.cpp" /* yacc.c:1648 */
2131  break;
2132 
2133  case 73:
2134 #line 469 "parser.y" /* yacc.c:1648 */
2135  {
2136  newstack((yyval)).id(ID_equal);
2137  }
2138 #line 2139 "jsil_y.tab.cpp" /* yacc.c:1648 */
2139  break;
2140 
2141  case 74:
2142 #line 473 "parser.y" /* yacc.c:1648 */
2143  {
2144  newstack((yyval)).id(ID_lt);
2145  }
2146 #line 2147 "jsil_y.tab.cpp" /* yacc.c:1648 */
2147  break;
2148 
2149  case 75:
2150 #line 477 "parser.y" /* yacc.c:1648 */
2151  {
2152  newstack((yyval)).id(ID_le);
2153  }
2154 #line 2155 "jsil_y.tab.cpp" /* yacc.c:1648 */
2155  break;
2156 
2157  case 76:
2158 #line 483 "parser.y" /* yacc.c:1648 */
2159  {
2160  newstack((yyval)).id(ID_plus);
2161  }
2162 #line 2163 "jsil_y.tab.cpp" /* yacc.c:1648 */
2163  break;
2164 
2165  case 77:
2166 #line 487 "parser.y" /* yacc.c:1648 */
2167  {
2168  newstack((yyval)).id(ID_minus);
2169  }
2170 #line 2171 "jsil_y.tab.cpp" /* yacc.c:1648 */
2171  break;
2172 
2173  case 78:
2174 #line 491 "parser.y" /* yacc.c:1648 */
2175  {
2176  newstack((yyval)).id(ID_mult);
2177  }
2178 #line 2179 "jsil_y.tab.cpp" /* yacc.c:1648 */
2179  break;
2180 
2181  case 79:
2182 #line 495 "parser.y" /* yacc.c:1648 */
2183  {
2184  newstack((yyval)).id(ID_div);
2185  }
2186 #line 2187 "jsil_y.tab.cpp" /* yacc.c:1648 */
2187  break;
2188 
2189  case 80:
2190 #line 499 "parser.y" /* yacc.c:1648 */
2191  {
2192  newstack((yyval)).id(ID_mod);
2193  }
2194 #line 2195 "jsil_y.tab.cpp" /* yacc.c:1648 */
2195  break;
2196 
2197  case 81:
2198 #line 505 "parser.y" /* yacc.c:1648 */
2199  {
2200  newstack((yyval)).id(ID_and);
2201  }
2202 #line 2203 "jsil_y.tab.cpp" /* yacc.c:1648 */
2203  break;
2204 
2205  case 82:
2206 #line 509 "parser.y" /* yacc.c:1648 */
2207  {
2208  newstack((yyval)).id(ID_or);
2209  }
2210 #line 2211 "jsil_y.tab.cpp" /* yacc.c:1648 */
2211  break;
2212 
2213  case 83:
2214 #line 513 "parser.y" /* yacc.c:1648 */
2215  {
2216  newstack((yyval)).id("subtype_of");
2217  }
2218 #line 2219 "jsil_y.tab.cpp" /* yacc.c:1648 */
2219  break;
2220 
2221  case 84:
2222 #line 517 "parser.y" /* yacc.c:1648 */
2223  {
2224  newstack((yyval)).id(ID_concatenation);
2225  }
2226 #line 2227 "jsil_y.tab.cpp" /* yacc.c:1648 */
2227  break;
2228 
2229  case 85:
2230 #line 523 "parser.y" /* yacc.c:1648 */
2231  {
2232  newstack((yyval)).id(ID_bitand);
2233  }
2234 #line 2235 "jsil_y.tab.cpp" /* yacc.c:1648 */
2235  break;
2236 
2237  case 86:
2238 #line 527 "parser.y" /* yacc.c:1648 */
2239  {
2240  newstack((yyval)).id(ID_bitor);
2241  }
2242 #line 2243 "jsil_y.tab.cpp" /* yacc.c:1648 */
2243  break;
2244 
2245  case 87:
2246 #line 531 "parser.y" /* yacc.c:1648 */
2247  {
2248  newstack((yyval)).id(ID_bitxor);
2249  }
2250 #line 2251 "jsil_y.tab.cpp" /* yacc.c:1648 */
2251  break;
2252 
2253  case 88:
2254 #line 535 "parser.y" /* yacc.c:1648 */
2255  {
2256  newstack((yyval)).id(ID_shl);
2257  }
2258 #line 2259 "jsil_y.tab.cpp" /* yacc.c:1648 */
2259  break;
2260 
2261  case 89:
2262 #line 539 "parser.y" /* yacc.c:1648 */
2263  {
2264  newstack((yyval)).id(ID_shr);
2265  }
2266 #line 2267 "jsil_y.tab.cpp" /* yacc.c:1648 */
2267  break;
2268 
2269  case 90:
2270 #line 543 "parser.y" /* yacc.c:1648 */
2271  {
2272  newstack((yyval)).id(ID_lshr);
2273  }
2274 #line 2275 "jsil_y.tab.cpp" /* yacc.c:1648 */
2275  break;
2276 
2277  case 91:
2278 #line 549 "parser.y" /* yacc.c:1648 */
2279  {
2280  newstack((yyval)).id(ID_not);
2281  }
2282 #line 2283 "jsil_y.tab.cpp" /* yacc.c:1648 */
2283  break;
2284 
2285  case 92:
2286 #line 553 "parser.y" /* yacc.c:1648 */
2287  {
2288  newstack((yyval)).id(ID_unary_minus);
2289  }
2290 #line 2291 "jsil_y.tab.cpp" /* yacc.c:1648 */
2291  break;
2292 
2293  case 93:
2294 #line 557 "parser.y" /* yacc.c:1648 */
2295  {
2296  newstack((yyval)).id("num_to_string");
2297  }
2298 #line 2299 "jsil_y.tab.cpp" /* yacc.c:1648 */
2299  break;
2300 
2301  case 94:
2302 #line 561 "parser.y" /* yacc.c:1648 */
2303  {
2304  newstack((yyval)).id("string_to_num");
2305  }
2306 #line 2307 "jsil_y.tab.cpp" /* yacc.c:1648 */
2307  break;
2308 
2309  case 95:
2310 #line 565 "parser.y" /* yacc.c:1648 */
2311  {
2312  newstack((yyval)).id("num_to_int32");
2313  }
2314 #line 2315 "jsil_y.tab.cpp" /* yacc.c:1648 */
2315  break;
2316 
2317  case 96:
2318 #line 569 "parser.y" /* yacc.c:1648 */
2319  {
2320  newstack((yyval)).id("num_to_uint32");
2321  }
2322 #line 2323 "jsil_y.tab.cpp" /* yacc.c:1648 */
2323  break;
2324 
2325  case 97:
2326 #line 573 "parser.y" /* yacc.c:1648 */
2327  {
2328  newstack((yyval)).id(ID_bitnot);
2329  }
2330 #line 2331 "jsil_y.tab.cpp" /* yacc.c:1648 */
2331  break;
2332 
2333  case 98:
2334 #line 579 "parser.y" /* yacc.c:1648 */
2335  {
2336  newstack((yyval)).id("null_type");
2337  }
2338 #line 2339 "jsil_y.tab.cpp" /* yacc.c:1648 */
2339  break;
2340 
2341  case 99:
2342 #line 583 "parser.y" /* yacc.c:1648 */
2343  {
2344  newstack((yyval)).id("undefined_type");
2345  }
2346 #line 2347 "jsil_y.tab.cpp" /* yacc.c:1648 */
2347  break;
2348 
2349  case 100:
2350 #line 587 "parser.y" /* yacc.c:1648 */
2351  {
2352  newstack((yyval)).id(ID_boolean);
2353  }
2354 #line 2355 "jsil_y.tab.cpp" /* yacc.c:1648 */
2355  break;
2356 
2357  case 101:
2358 #line 591 "parser.y" /* yacc.c:1648 */
2359  {
2360  newstack((yyval)).id(ID_string);
2361  }
2362 #line 2363 "jsil_y.tab.cpp" /* yacc.c:1648 */
2363  break;
2364 
2365  case 102:
2366 #line 595 "parser.y" /* yacc.c:1648 */
2367  {
2368  newstack((yyval)).id("number");
2369  }
2370 #line 2371 "jsil_y.tab.cpp" /* yacc.c:1648 */
2371  break;
2372 
2373  case 103:
2374 #line 599 "parser.y" /* yacc.c:1648 */
2375  {
2376  newstack((yyval)).id("builtin_object");
2377  }
2378 #line 2379 "jsil_y.tab.cpp" /* yacc.c:1648 */
2379  break;
2380 
2381  case 104:
2382 #line 603 "parser.y" /* yacc.c:1648 */
2383  {
2384  newstack((yyval)).id("user_object");
2385  }
2386 #line 2387 "jsil_y.tab.cpp" /* yacc.c:1648 */
2387  break;
2388 
2389  case 105:
2390 #line 607 "parser.y" /* yacc.c:1648 */
2391  {
2392  newstack((yyval)).id("object");
2393  }
2394 #line 2395 "jsil_y.tab.cpp" /* yacc.c:1648 */
2395  break;
2396 
2397  case 107:
2398 #line 612 "parser.y" /* yacc.c:1648 */
2399  {
2400  newstack((yyval)).id(ID_pointer);
2401  newstack((yyval)).set(ID_C_reference, true);
2402  }
2403 #line 2404 "jsil_y.tab.cpp" /* yacc.c:1648 */
2404  break;
2405 
2406  case 108:
2407 #line 619 "parser.y" /* yacc.c:1648 */
2408  {
2409  newstack((yyval)).id(ID_member);
2410  }
2411 #line 2412 "jsil_y.tab.cpp" /* yacc.c:1648 */
2412  break;
2413 
2414  case 109:
2415 #line 623 "parser.y" /* yacc.c:1648 */
2416  {
2417  newstack((yyval)).id("variable");
2418  }
2419 #line 2420 "jsil_y.tab.cpp" /* yacc.c:1648 */
2420  break;
2421 
2422 
2423 #line 2424 "jsil_y.tab.cpp" /* yacc.c:1648 */
2424  default: break;
2425  }
2426  /* User semantic actions sometimes alter yychar, and that requires
2427  that yytoken be updated with the new translation. We take the
2428  approach of translating immediately before every use of yytoken.
2429  One alternative is translating here after every semantic action,
2430  but that translation would be missed if the semantic action invokes
2431  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2432  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2433  incorrect destructor might then be invoked immediately. In the
2434  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2435  to an incorrect destructor call or verbose syntax error message
2436  before the lookahead is translated. */
2437  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2438 
2439  YYPOPSTACK (yylen);
2440  yylen = 0;
2441  YY_STACK_PRINT (yyss, yyssp);
2442 
2443  *++yyvsp = yyval;
2444 
2445  /* Now 'shift' the result of the reduction. Determine what state
2446  that goes to, based on the state we popped back to and the rule
2447  number reduced by. */
2448 
2449  yyn = yyr1[yyn];
2450 
2451  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2452  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2453  yystate = yytable[yystate];
2454  else
2455  yystate = yydefgoto[yyn - YYNTOKENS];
2456 
2457  goto yynewstate;
2458 
2459 
2460 /*--------------------------------------.
2461 | yyerrlab -- here on detecting error. |
2462 `--------------------------------------*/
2463 yyerrlab:
2464  /* Make sure we have latest lookahead translation. See comments at
2465  user semantic actions for why this is necessary. */
2466  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2467 
2468  /* If not already recovering from an error, report this error. */
2469  if (!yyerrstatus)
2470  {
2471  ++yynerrs;
2472 #if ! YYERROR_VERBOSE
2473  yyerror (YY_("syntax error"));
2474 #else
2475 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2476  yyssp, yytoken)
2477  {
2478  char const *yymsgp = YY_("syntax error");
2479  int yysyntax_error_status;
2480  yysyntax_error_status = YYSYNTAX_ERROR;
2481  if (yysyntax_error_status == 0)
2482  yymsgp = yymsg;
2483  else if (yysyntax_error_status == 1)
2484  {
2485  if (yymsg != yymsgbuf)
2486  YYSTACK_FREE (yymsg);
2487  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2488  if (!yymsg)
2489  {
2490  yymsg = yymsgbuf;
2491  yymsg_alloc = sizeof yymsgbuf;
2492  yysyntax_error_status = 2;
2493  }
2494  else
2495  {
2496  yysyntax_error_status = YYSYNTAX_ERROR;
2497  yymsgp = yymsg;
2498  }
2499  }
2500  yyerror (yymsgp);
2501  if (yysyntax_error_status == 2)
2502  goto yyexhaustedlab;
2503  }
2504 # undef YYSYNTAX_ERROR
2505 #endif
2506  }
2507 
2508 
2509 
2510  if (yyerrstatus == 3)
2511  {
2512  /* If just tried and failed to reuse lookahead token after an
2513  error, discard it. */
2514 
2515  if (yychar <= YYEOF)
2516  {
2517  /* Return failure if at end of input. */
2518  if (yychar == YYEOF)
2519  YYABORT;
2520  }
2521  else
2522  {
2523  yydestruct ("Error: discarding",
2524  yytoken, &yylval);
2525  yychar = YYEMPTY;
2526  }
2527  }
2528 
2529  /* Else will try to reuse lookahead token after shifting the error
2530  token. */
2531  goto yyerrlab1;
2532 
2533 
2534 /*---------------------------------------------------.
2535 | yyerrorlab -- error raised explicitly by YYERROR. |
2536 `---------------------------------------------------*/
2537 yyerrorlab:
2538 
2539  /* Pacify compilers like GCC when the user code never invokes
2540  YYERROR and the label yyerrorlab therefore never appears in user
2541  code. */
2542  if (/*CONSTCOND*/ 0)
2543  goto yyerrorlab;
2544 
2545  /* Do not reclaim the symbols of the rule whose action triggered
2546  this YYERROR. */
2547  YYPOPSTACK (yylen);
2548  yylen = 0;
2549  YY_STACK_PRINT (yyss, yyssp);
2550  yystate = *yyssp;
2551  goto yyerrlab1;
2552 
2553 
2554 /*-------------------------------------------------------------.
2555 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2556 `-------------------------------------------------------------*/
2557 yyerrlab1:
2558  yyerrstatus = 3; /* Each real token shifted decrements this. */
2559 
2560  for (;;)
2561  {
2562  yyn = yypact[yystate];
2563  if (!yypact_value_is_default (yyn))
2564  {
2565  yyn += YYTERROR;
2566  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2567  {
2568  yyn = yytable[yyn];
2569  if (0 < yyn)
2570  break;
2571  }
2572  }
2573 
2574  /* Pop the current state because it cannot handle the error token. */
2575  if (yyssp == yyss)
2576  YYABORT;
2577 
2578 
2579  yydestruct ("Error: popping",
2580  yystos[yystate], yyvsp);
2581  YYPOPSTACK (1);
2582  yystate = *yyssp;
2583  YY_STACK_PRINT (yyss, yyssp);
2584  }
2585 
2587  *++yyvsp = yylval;
2589 
2590 
2591  /* Shift the error token. */
2592  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2593 
2594  yystate = yyn;
2595  goto yynewstate;
2596 
2597 
2598 /*-------------------------------------.
2599 | yyacceptlab -- YYACCEPT comes here. |
2600 `-------------------------------------*/
2601 yyacceptlab:
2602  yyresult = 0;
2603  goto yyreturn;
2604 
2605 /*-----------------------------------.
2606 | yyabortlab -- YYABORT comes here. |
2607 `-----------------------------------*/
2608 yyabortlab:
2609  yyresult = 1;
2610  goto yyreturn;
2611 
2612 #if !defined yyoverflow || YYERROR_VERBOSE
2613 /*-------------------------------------------------.
2614 | yyexhaustedlab -- memory exhaustion comes here. |
2615 `-------------------------------------------------*/
2616 yyexhaustedlab:
2617  yyerror (YY_("memory exhausted"));
2618  yyresult = 2;
2619  /* Fall through. */
2620 #endif
2621 
2622 yyreturn:
2623  if (yychar != YYEMPTY)
2624  {
2625  /* Make sure we have latest lookahead translation. See comments at
2626  user semantic actions for why this is necessary. */
2627  yytoken = YYTRANSLATE (yychar);
2628  yydestruct ("Cleanup: discarding lookahead",
2629  yytoken, &yylval);
2630  }
2631  /* Do not reclaim the symbols of the rule whose action triggered
2632  this YYABORT or YYACCEPT. */
2633  YYPOPSTACK (yylen);
2634  YY_STACK_PRINT (yyss, yyssp);
2635  while (yyssp != yyss)
2636  {
2637  yydestruct ("Cleanup: popping",
2638  yystos[*yyssp], yyvsp);
2639  YYPOPSTACK (1);
2640  }
2641 #ifndef yyoverflow
2642  if (yyss != yyssa)
2643  YYSTACK_FREE (yyss);
2644 #endif
2645 #if YYERROR_VERBOSE
2646  if (yymsg != yymsgbuf)
2647  YYSTACK_FREE (yymsg);
2648 #endif
2649  return yyresult;
2650 }
2651 #line 628 "parser.y" /* yacc.c:1907 */
2652 
Jsil Language.
#define PARSER
Definition: jsil_y.tab.cpp:77
#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:751
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
#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:176
#define TOK_T_UNDEFINED
Definition: jsil_y.tab.cpp:233
#define yylex
Definition: jsil_y.tab.cpp:64
void move_to_operands(exprt &expr)
Move the given argument to the end of exprt's operands.
Definition: expr.cpp:29
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
codet representation of a goto statement.
Definition: std_code.h:983
#define TOK_WITH
Definition: jsil_y.tab.cpp:204
typet & type()
Return the type of the expression.
Definition: expr.h:68
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:4384
#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
String type.
Definition: std_types.h:1662
#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
The Boolean constant true.
Definition: std_expr.h:4443
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:4461
#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
codet representation of a label for branch targets.
Definition: std_code.h:1256
#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:20
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 an exprt to a symbol_exprt.
Definition: std_expr.h:251
#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
The Boolean constant false.
Definition: std_expr.h:4452
#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 side_effect_exprt representation of a function call side effect.
Definition: std_code.h:1691
#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:818
#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:51
#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:54
const parameterst & parameters() const
Definition: std_types.h:893
#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:3514
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:1754
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:136
A codet representing a skip statement.
Definition: std_code.h:237
codet representation of an if-then-else statement.
Definition: std_code.h:614
#define newstack(x)
Definition: parser.h:142
Expression to hold a symbol (variable)
Definition: std_expr.h:143
#define TOK_T_OBJECT
Definition: jsil_y.tab.cpp:239
const code_blockt & to_code_block(const codet &code)
Definition: std_code.h:224
#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
#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
A codet representing an assignment in the program.
Definition: std_code.h:256
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:1595