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