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