ReactOS  0.4.14-dev-608-gd495a4f
parser.tab.c
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 1
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 parser_parse
68 #define yylex parser_lex
69 #define yyerror parser_error
70 #define yydebug parser_debug
71 #define yynerrs parser_nerrs
72 
73 
74 /* First part of user prologue. */
75 #line 19 "parser.y"
76 
77 
78 #include "jscript.h"
79 #include "engine.h"
80 #include "parser.h"
81 
82 #include "wine/debug.h"
83 
85 
86 static int parser_error(parser_ctx_t*,const char*);
87 static void set_error(parser_ctx_t*,UINT);
88 static BOOL explicit_error(parser_ctx_t*,void*,WCHAR);
91 
92 typedef struct _statement_list_t {
96 
99 
100 typedef struct _property_list_t {
104 
109 
110 typedef struct _element_list_t {
114 
117 
118 typedef struct _argument_list_t {
122 
125 
126 typedef struct _case_list_t {
129 } case_list_t;
130 
136 
137 typedef struct _variable_list_t {
141 
145 
146 static void *new_statement(parser_ctx_t*,statement_type_t,size_t);
163 
167 };
168 
171 
172 typedef struct _parameter_list_t {
176 
179 
180 static void *new_expression(parser_ctx_t *ctx,expression_type_t,size_t);
182  source_elements_t*,const WCHAR*,const WCHAR*,DWORD);
193 
196 
197 
198 #line 199 "parser.tab.c"
199 
200 # ifndef YY_NULLPTR
201 # if defined __cplusplus
202 # if 201103L <= __cplusplus
203 # define YY_NULLPTR nullptr
204 # else
205 # define YY_NULLPTR 0
206 # endif
207 # else
208 # define YY_NULLPTR ((void*)0)
209 # endif
210 # endif
211 
212 /* Enabling verbose error messages. */
213 #ifdef YYERROR_VERBOSE
214 # undef YYERROR_VERBOSE
215 # define YYERROR_VERBOSE 1
216 #else
217 # define YYERROR_VERBOSE 0
218 #endif
219 
220 /* Use api.header.include to #include this header
221  instead of duplicating it here. */
222 #ifndef YY_PARSER_E_REACTOSSYNC_GCC_DLL_WIN32_JSCRIPT_PARSER_TAB_H_INCLUDED
223 # define YY_PARSER_E_REACTOSSYNC_GCC_DLL_WIN32_JSCRIPT_PARSER_TAB_H_INCLUDED
224 /* Debug traces. */
225 #ifndef YYDEBUG
226 # define YYDEBUG 0
227 #endif
228 #if YYDEBUG
229 extern int parser_debug;
230 #endif
231 
232 /* Token type. */
233 #ifndef YYTOKENTYPE
234 # define YYTOKENTYPE
236  {
237  kBREAK = 258,
238  kCASE = 259,
239  kCATCH = 260,
240  kCONTINUE = 261,
241  kDEFAULT = 262,
242  kDELETE = 263,
243  kDO = 264,
244  kELSE = 265,
245  kFUNCTION = 266,
246  kIF = 267,
247  kFINALLY = 268,
248  kFOR = 269,
249  kGET = 270,
250  kIN = 271,
251  kSET = 272,
252  kINSTANCEOF = 273,
253  kNEW = 274,
254  kNULL = 275,
255  kRETURN = 276,
256  kSWITCH = 277,
257  kTHIS = 278,
258  kTHROW = 279,
259  kTRUE = 280,
260  kFALSE = 281,
261  kTRY = 282,
262  kTYPEOF = 283,
263  kVAR = 284,
264  kVOID = 285,
265  kWHILE = 286,
266  kWITH = 287,
267  tANDAND = 288,
268  tOROR = 289,
269  tINC = 290,
270  tDEC = 291,
272  kDIVEQ = 293,
273  kDCOL = 294,
274  tIdentifier = 295,
275  tAssignOper = 296,
276  tEqOper = 297,
277  tShiftOper = 298,
278  tRelOper = 299,
282  tEOF = 303,
284  };
285 #endif
286 
287 /* Value type. */
288 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
289 union YYSTYPE
290 {
291 #line 147 "parser.y"
292 
293  int ival;
294  const WCHAR *srcptr;
312 
313 #line 314 "parser.tab.c"
314 
315 };
316 typedef union YYSTYPE YYSTYPE;
317 # define YYSTYPE_IS_TRIVIAL 1
318 # define YYSTYPE_IS_DECLARED 1
319 #endif
320 
321 
322 
323 int parser_parse (parser_ctx_t *ctx);
324 
325 #endif /* !YY_PARSER_E_REACTOSSYNC_GCC_DLL_WIN32_JSCRIPT_PARSER_TAB_H_INCLUDED */
326 
327 
328 
329 #ifdef short
330 # undef short
331 #endif
332 
333 #ifdef YYTYPE_UINT8
334 typedef YYTYPE_UINT8 yytype_uint8;
335 #else
336 typedef unsigned char yytype_uint8;
337 #endif
338 
339 #ifdef YYTYPE_INT8
340 typedef YYTYPE_INT8 yytype_int8;
341 #else
342 typedef signed char yytype_int8;
343 #endif
344 
345 #ifdef YYTYPE_UINT16
346 typedef YYTYPE_UINT16 yytype_uint16;
347 #else
348 typedef unsigned short yytype_uint16;
349 #endif
350 
351 #ifdef YYTYPE_INT16
352 typedef YYTYPE_INT16 yytype_int16;
353 #else
354 typedef short yytype_int16;
355 #endif
356 
357 #ifndef YYSIZE_T
358 # ifdef __SIZE_TYPE__
359 # define YYSIZE_T __SIZE_TYPE__
360 # elif defined size_t
361 # define YYSIZE_T size_t
362 # elif ! defined YYSIZE_T
363 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
364 # define YYSIZE_T size_t
365 # else
366 # define YYSIZE_T unsigned
367 # endif
368 #endif
369 
370 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
371 
372 #ifndef YY_
373 # if defined YYENABLE_NLS && YYENABLE_NLS
374 # if ENABLE_NLS
375 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
376 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
377 # endif
378 # endif
379 # ifndef YY_
380 # define YY_(Msgid) Msgid
381 # endif
382 #endif
383 
384 #ifndef YY_ATTRIBUTE
385 # if (defined __GNUC__ \
386  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
387  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
388 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
389 # else
390 # define YY_ATTRIBUTE(Spec) /* empty */
391 # endif
392 #endif
393 
394 #ifndef YY_ATTRIBUTE_PURE
395 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
396 #endif
397 
398 #ifndef YY_ATTRIBUTE_UNUSED
399 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
400 #endif
401 
402 /* Suppress unused-variable warnings by "using" E. */
403 #if ! defined lint || defined __GNUC__
404 # define YYUSE(E) ((void) (E))
405 #else
406 # define YYUSE(E) /* empty */
407 #endif
408 
409 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
410 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
411 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
412  _Pragma ("GCC diagnostic push") \
413  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
414  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
415 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
416  _Pragma ("GCC diagnostic pop")
417 #else
418 # define YY_INITIAL_VALUE(Value) Value
419 #endif
420 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
421 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
422 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
423 #endif
424 #ifndef YY_INITIAL_VALUE
425 # define YY_INITIAL_VALUE(Value) /* Nothing. */
426 #endif
427 
428 
429 #define YY_ASSERT(E) ((void) (0 && (E)))
430 
431 #if ! defined yyoverflow || YYERROR_VERBOSE
432 
433 /* The parser invokes alloca or malloc; define the necessary symbols. */
434 
435 # ifdef YYSTACK_USE_ALLOCA
436 # if YYSTACK_USE_ALLOCA
437 # ifdef __GNUC__
438 # define YYSTACK_ALLOC __builtin_alloca
439 # elif defined __BUILTIN_VA_ARG_INCR
440 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
441 # elif defined _AIX
442 # define YYSTACK_ALLOC __alloca
443 # elif defined _MSC_VER
444 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
445 # define alloca _alloca
446 # else
447 # define YYSTACK_ALLOC alloca
448 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
449 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
450  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
451 # ifndef EXIT_SUCCESS
452 # define EXIT_SUCCESS 0
453 # endif
454 # endif
455 # endif
456 # endif
457 # endif
458 
459 # ifdef YYSTACK_ALLOC
460  /* Pacify GCC's 'empty if-body' warning. */
461 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
462 # ifndef YYSTACK_ALLOC_MAXIMUM
463  /* The OS might guarantee only one guard page at the bottom of the stack,
464  and a page size can be as small as 4096 bytes. So we cannot safely
465  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
466  to allow for a few compiler-allocated temporary stack slots. */
467 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
468 # endif
469 # else
470 # define YYSTACK_ALLOC YYMALLOC
471 # define YYSTACK_FREE YYFREE
472 # ifndef YYSTACK_ALLOC_MAXIMUM
473 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
474 # endif
475 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
476  && ! ((defined YYMALLOC || defined malloc) \
477  && (defined YYFREE || defined free)))
478 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
479 # ifndef EXIT_SUCCESS
480 # define EXIT_SUCCESS 0
481 # endif
482 # endif
483 # ifndef YYMALLOC
484 # define YYMALLOC malloc
485 # if ! defined malloc && ! defined EXIT_SUCCESS
486 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
487 # endif
488 # endif
489 # ifndef YYFREE
490 # define YYFREE free
491 # if ! defined free && ! defined EXIT_SUCCESS
492 void free (void *); /* INFRINGES ON USER NAME SPACE */
493 # endif
494 # endif
495 # endif
496 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
497 
498 
499 #if (! defined yyoverflow \
500  && (! defined __cplusplus \
501  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
502 
503 /* A type that is properly aligned for any stack member. */
504 union yyalloc
505 {
508 };
509 
510 /* The size of the maximum gap between one aligned stack and the next. */
511 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
512 
513 /* The size of an array large to enough to hold all stacks, each with
514  N elements. */
515 # define YYSTACK_BYTES(N) \
516  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
517  + YYSTACK_GAP_MAXIMUM)
518 
519 # define YYCOPY_NEEDED 1
520 
521 /* Relocate STACK from its old location to the new one. The
522  local variables YYSIZE and YYSTACKSIZE give the old and new number of
523  elements in the stack, and YYPTR gives the new location of the
524  stack. Advance YYPTR to a properly aligned location for the next
525  stack. */
526 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
527  do \
528  { \
529  YYSIZE_T yynewbytes; \
530  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
531  Stack = &yyptr->Stack_alloc; \
532  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
533  yyptr += yynewbytes / sizeof (*yyptr); \
534  } \
535  while (0)
536 
537 #endif
538 
539 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
540 /* Copy COUNT objects from SRC to DST. The source and destination do
541  not overlap. */
542 # ifndef YYCOPY
543 # if defined __GNUC__ && 1 < __GNUC__
544 # define YYCOPY(Dst, Src, Count) \
545  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
546 # else
547 # define YYCOPY(Dst, Src, Count) \
548  do \
549  { \
550  YYSIZE_T yyi; \
551  for (yyi = 0; yyi < (Count); yyi++) \
552  (Dst)[yyi] = (Src)[yyi]; \
553  } \
554  while (0)
555 # endif
556 # endif
557 #endif /* !YYCOPY_NEEDED */
558 
559 /* YYFINAL -- State number of the termination state. */
560 #define YYFINAL 3
561 /* YYLAST -- Last index in YYTABLE. */
562 #define YYLAST 1393
563 
564 /* YYNTOKENS -- Number of terminals. */
565 #define YYNTOKENS 72
566 /* YYNNTS -- Number of nonterminals. */
567 #define YYNNTS 99
568 /* YYNRULES -- Number of rules. */
569 #define YYNRULES 254
570 /* YYNSTATES -- Number of states. */
571 #define YYNSTATES 454
572 
573 #define YYUNDEFTOK 2
574 #define YYMAXUTOK 304
575 
576 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
577  as returned by yylex, with out-of-bounds checking. */
578 #define YYTRANSLATE(YYX) \
579  ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
580 
581 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
582  as returned by yylex. */
583 static const yytype_uint8 yytranslate[] =
584 {
585  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588  2, 2, 2, 66, 2, 2, 2, 64, 59, 2,
589  70, 71, 62, 60, 52, 61, 69, 63, 2, 2,
590  2, 2, 2, 2, 2, 2, 2, 2, 55, 54,
591  2, 53, 2, 56, 2, 2, 2, 2, 2, 2,
592  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
593  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
594  2, 67, 2, 68, 58, 2, 2, 2, 2, 2,
595  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
596  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
597  2, 2, 2, 51, 57, 40, 65, 2, 2, 2,
598  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
601  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
602  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
603  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
604  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
605  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
606  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
607  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
608  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
609  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
611  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
612  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
613  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
614  35, 36, 37, 38, 39, 41, 42, 43, 44, 45,
615  46, 47, 48, 49, 50
616 };
617 
618 #if YYDEBUG
619  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
620 static const yytype_uint16 yyrline[] =
621 {
622  0, 258, 258, 262, 263, 267, 268, 273, 275, 277,
623  281, 285, 289, 290, 295, 296, 300, 301, 302, 303,
624  304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
625  314, 318, 319, 324, 325, 329, 330, 334, 339, 340,
626  345, 347, 352, 357, 362, 363, 367, 372, 373, 377,
627  382, 386, 391, 393, 398, 400, 403, 405, 402, 409,
628  411, 408, 414, 416, 421, 426, 431, 436, 441, 446,
629  451, 453, 458, 459, 463, 464, 469, 474, 479, 484,
630  485, 486, 491, 496, 500, 501, 504, 505, 509, 510,
631  515, 516, 520, 522, 526, 527, 531, 532, 534, 539,
632  541, 543, 548, 549, 554, 556, 561, 562, 567, 569,
633  574, 575, 580, 582, 587, 588, 593, 595, 600, 601,
634  606, 608, 613, 614, 619, 621, 626, 627, 632, 633,
635  638, 639, 641, 643, 648, 649, 651, 656, 657, 662,
636  664, 666, 671, 672, 674, 676, 681, 682, 684, 685,
637  687, 688, 689, 690, 691, 692, 696, 698, 700, 706,
638  707, 711, 712, 716, 717, 718, 720, 722, 727, 729,
639  731, 733, 738, 739, 743, 744, 749, 750, 751, 752,
640  753, 754, 758, 759, 760, 761, 766, 768, 773, 774,
641  778, 779, 783, 784, 786, 797, 798, 803, 805, 807,
642  811, 816, 817, 818, 822, 823, 827, 828, 839, 840,
643  841, 842, 843, 844, 845, 846, 847, 848, 849, 850,
644  851, 852, 853, 854, 855, 856, 857, 858, 859, 860,
645  861, 862, 863, 864, 865, 866, 867, 868, 872, 873,
646  874, 875, 876, 878, 883, 884, 885, 888, 889, 892,
647  893, 896, 897, 900, 901
648 };
649 #endif
650 
651 #if YYDEBUG || YYERROR_VERBOSE || 0
652 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
653  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
654 static const char *const yytname[] =
655 {
656  "$end", "error", "$undefined", "kBREAK", "kCASE", "kCATCH", "kCONTINUE",
657  "kDEFAULT", "kDELETE", "kDO", "kELSE", "kFUNCTION", "kIF", "kFINALLY",
658  "kFOR", "kGET", "kIN", "kSET", "kINSTANCEOF", "kNEW", "kNULL", "kRETURN",
659  "kSWITCH", "kTHIS", "kTHROW", "kTRUE", "kFALSE", "kTRY", "kTYPEOF",
660  "kVAR", "kVOID", "kWHILE", "kWITH", "tANDAND", "tOROR", "tINC", "tDEC",
661  "tHTMLCOMMENT", "kDIVEQ", "kDCOL", "'}'", "tIdentifier", "tAssignOper",
662  "tEqOper", "tShiftOper", "tRelOper", "tNumericLiteral",
663  "tBooleanLiteral", "tStringLiteral", "tEOF", "LOWER_THAN_ELSE", "'{'",
664  "','", "'='", "';'", "':'", "'?'", "'|'", "'^'", "'&'", "'+'", "'-'",
665  "'*'", "'/'", "'%'", "'~'", "'!'", "'['", "']'", "'.'", "'('", "')'",
666  "$accept", "Program", "HtmlComment", "SourceElements",
667  "FunctionExpression", "KFunction", "FunctionBody", "FormalParameterList",
668  "FormalParameterList_opt", "Statement", "StatementList",
669  "StatementList_opt", "Block", "VariableStatement",
670  "VariableDeclarationList", "VariableDeclarationListNoIn",
671  "VariableDeclaration", "VariableDeclarationNoIn", "Initialiser_opt",
672  "Initialiser", "InitialiserNoIn_opt", "InitialiserNoIn",
673  "EmptyStatement", "ExpressionStatement", "IfStatement",
674  "IterationStatement", "$@1", "$@2", "$@3", "$@4", "ContinueStatement",
675  "BreakStatement", "ReturnStatement", "WithStatement",
676  "LabelledStatement", "SwitchStatement", "CaseBlock", "CaseClausules_opt",
677  "CaseClausules", "CaseClausule", "DefaultClausule", "ThrowStatement",
678  "TryStatement", "Catch", "Finally", "Expression_opt", "Expression_err",
679  "Expression", "ExpressionNoIn_opt", "ExpressionNoIn", "AssignOper",
680  "AssignmentExpression", "AssignmentExpressionNoIn",
681  "ConditionalExpression", "ConditionalExpressionNoIn",
682  "LogicalORExpression", "LogicalORExpressionNoIn", "LogicalANDExpression",
683  "LogicalANDExpressionNoIn", "BitwiseORExpression",
684  "BitwiseORExpressionNoIn", "BitwiseXORExpression",
685  "BitwiseXORExpressionNoIn", "BitwiseANDExpression",
686  "BitwiseANDExpressionNoIn", "EqualityExpression",
687  "EqualityExpressionNoIn", "RelationalExpression",
688  "RelationalExpressionNoIn", "ShiftExpression", "AdditiveExpression",
689  "MultiplicativeExpression", "UnaryExpression", "PostfixExpression",
690  "LeftHandSideExpression", "NewExpression", "MemberExpression",
691  "CallExpression", "Arguments", "ArgumentList", "PrimaryExpression",
692  "ArrayLiteral", "ElementList", "Elision", "Elision_opt", "ObjectLiteral",
693  "PropertyNameAndValueList", "PropertyDefinition", "GetterSetterMethod",
694  "PropertyName", "Identifier_opt", "IdentifierName",
695  "ReservedAsIdentifier", "Literal", "BooleanLiteral", "semicolon_opt",
696  "left_bracket", "right_bracket", "semicolon", YY_NULLPTR
697 };
698 #endif
699 
700 # ifdef YYPRINT
701 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
702  (internal) symbol number NUM (which must be that of a token). */
703 static const yytype_uint16 yytoknum[] =
704 {
705  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
706  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
707  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
708  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
709  125, 295, 296, 297, 298, 299, 300, 301, 302, 303,
710  304, 123, 44, 61, 59, 58, 63, 124, 94, 38,
711  43, 45, 42, 47, 37, 126, 33, 91, 93, 46,
712  40, 41
713 };
714 # endif
715 
716 #define YYPACT_NINF -361
717 
718 #define yypact_value_is_default(Yystate) \
719  (!!((Yystate) == (-361)))
720 
721 #define YYTABLE_NINF -238
722 
723 #define yytable_value_is_error(Yytable_value) \
724  0
725 
726  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
727  STATE-NUM. */
728 static const yytype_int16 yypact[] =
729 {
730  -361, 82, 649, -361, -15, -15, 1146, 844, -361, 60,
731  60, 236, -361, 1146, 60, -361, 1146, -361, -361, 14,
732  1146, 73, 1146, 60, 60, 1146, 1146, -361, -361, 72,
733  -361, -361, -361, 584, -361, 1146, 1146, -361, 1146, 1146,
734  94, 1146, 88, 472, 36, -361, -361, -361, -361, -361,
735  -361, -361, -361, -361, -361, -361, -361, -361, -361, -361,
736  51, -361, -361, 86, 123, 124, 130, 145, 163, 22,
737  183, -5, 182, -361, -361, 155, -361, 219, 224, -361,
738  -361, -361, -361, -361, -361, 31, 31, -361, 1214, -361,
739  -361, 230, 217, -361, -361, 434, 965, -361, 219, 31,
740  205, 1146, 51, 714, 198, -361, 197, 59, -361, -361,
741  434, 1146, -361, -361, 844, 9, -361, -361, 114, -361,
742  1146, 844, -361, 212, 38, -361, 79, 1306, -361, 1306,
743  -361, 236, 221, 1025, 83, 223, 1146, 226, 246, 14,
744  1146, 73, 1146, 95, 103, 517, 72, 249, 250, -361,
745  779, 149, -361, 252, -361, -361, -361, -361, -361, -361,
746  -361, -361, 102, 107, 1146, 17, -361, 93, 244, -361,
747  1146, -361, -361, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
748  1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, -361,
749  -361, -361, -361, 1146, 1146, 1146, 1352, 904, -361, 1146,
750  1352, -361, -361, -361, -361, -361, -361, -361, -361, -361,
751  -361, -361, -361, -361, -361, -361, -361, -361, -361, -361,
752  -361, -361, -361, -361, -361, -361, -361, -361, -361, 60,
753  -361, 24, 205, 251, -361, 256, -361, -361, 111, 276,
754  253, 255, 258, 272, 98, 183, 237, -361, -361, 16,
755  -361, -361, 60, 14, 305, -361, 1146, -361, -361, 73,
756  -361, 24, 16, -361, -361, -361, 60, 60, -361, -361,
757  -361, 1260, 1146, 267, -361, -361, -361, -361, -361, 279,
758  244, -361, 269, 24, -361, 123, 270, 124, 130, 145,
759  163, 22, 183, 183, 183, -5, 182, 182, -361, -361,
760  -361, -361, -361, 108, -361, -361, -361, 26, 116, -361,
761  434, -361, -361, 844, 271, 274, 306, 48, 1146, 1146,
762  1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 434, 1146,
763  1146, 277, 286, -361, -361, -361, -361, 844, 844, -361,
764  244, -361, -361, -361, -361, 278, 1085, 60, 24, 288,
765  280, 1146, -361, 1146, -361, -361, 24, 322, 1146, -361,
766  -361, 251, 48, 434, -361, -361, 1146, -361, 216, 276,
767  282, 253, 255, 258, 272, 98, 183, 183, 24, -361,
768  -361, 329, -361, 24, -361, -361, 24, -361, -361, 244,
769  283, -361, -361, -361, -361, 31, 844, -361, -361, 1146,
770  24, -361, 1146, 844, 1146, 46, 329, -361, 14, 289,
771  24, -361, 844, 301, -361, -361, -361, 844, 48, -361,
772  -361, 186, 287, -361, 329, -361, -361, -361, 292, 309,
773  -361, 48, -361, 1146, 844, 844, 310, 312, -361, -361,
774  1146, 24, 844, -361, -361, -361, -361, 313, 24, 844,
775  -361, 844, -361, -361
776 };
777 
778  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
779  Performed when YYTABLE does not specify something else to do. Zero
780  means the default is an error. */
781 static const yytype_uint8 yydefact[] =
782 {
783  5, 0, 4, 1, 204, 204, 0, 0, 10, 0,
784  0, 0, 238, 84, 0, 176, 0, 244, 245, 0,
785  0, 0, 0, 0, 0, 0, 0, 3, 243, 177,
786  240, 246, 241, 0, 50, 0, 0, 242, 0, 0,
787  190, 0, 0, 19, 0, 6, 16, 17, 18, 20,
788  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
789  0, 88, 96, 102, 106, 110, 114, 118, 122, 126,
790  130, 137, 139, 142, 146, 156, 159, 161, 160, 163,
791  179, 180, 178, 239, 205, 0, 0, 177, 0, 164,
792  147, 156, 0, 250, 249, 0, 90, 162, 161, 0,
793  85, 0, 0, 0, 0, 149, 44, 0, 38, 148,
794  0, 0, 150, 151, 0, 204, 209, 210, 204, 212,
795  213, 214, 215, 10, 0, 217, 0, 220, 222, 227,
796  223, 224, 238, 84, 0, 176, 230, 244, 245, 232,
797  233, 234, 235, 0, 0, 36, 177, 240, 241, 31,
798  0, 0, 195, 0, 201, 207, 152, 153, 154, 155,
799  188, 182, 0, 191, 0, 0, 2, 0, 14, 248,
800  0, 247, 51, 0, 0, 0, 0, 0, 0, 0,
801  0, 0, 0, 0, 0, 0, 0, 0, 0, 157,
802  158, 95, 94, 0, 0, 0, 0, 0, 168, 0,
803  0, 169, 65, 64, 208, 211, 213, 214, 219, 221,
804  218, 224, 225, 226, 228, 229, 230, 231, 216, 232,
805  233, 234, 235, 236, 237, 192, 206, 203, 202, 0,
806  87, 0, 86, 0, 56, 91, 92, 99, 104, 108,
807  112, 116, 120, 124, 128, 134, 156, 167, 66, 0,
808  78, 36, 0, 0, 79, 80, 0, 42, 45, 0,
809  37, 0, 0, 68, 220, 227, 0, 0, 35, 32,
810  193, 0, 0, 190, 184, 189, 183, 186, 181, 0,
811  14, 12, 15, 0, 89, 107, 0, 111, 115, 119,
812  123, 127, 133, 132, 131, 138, 140, 141, 143, 144,
813  145, 97, 98, 0, 166, 172, 174, 0, 0, 171,
814  0, 252, 251, 0, 47, 59, 40, 0, 0, 0,
815  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
816  0, 0, 0, 83, 81, 46, 39, 0, 0, 198,
817  14, 199, 194, 196, 197, 191, 0, 0, 0, 0,
818  0, 0, 165, 0, 173, 170, 0, 53, 0, 43,
819  48, 0, 0, 0, 254, 253, 84, 93, 156, 109,
820  0, 113, 117, 121, 125, 129, 136, 135, 0, 100,
821  101, 72, 69, 0, 55, 67, 0, 185, 187, 14,
822  0, 13, 5, 103, 175, 0, 0, 49, 41, 84,
823  0, 57, 0, 0, 0, 0, 73, 74, 0, 0,
824  0, 5, 11, 0, 54, 52, 60, 0, 0, 105,
825  62, 0, 0, 70, 72, 75, 82, 5, 0, 0,
826  7, 0, 63, 84, 33, 33, 0, 0, 5, 8,
827  84, 0, 34, 76, 77, 71, 200, 0, 0, 0,
828  9, 0, 58, 61
829 };
830 
831  /* YYPGOTO[NTERM-NUM]. */
832 static const yytype_int16 yypgoto[] =
833 {
834  -361, -361, -361, 345, -2, -361, -357, -361, -261, 1,
835  -164, -70, -10, -361, -361, -361, 109, 8, -361, -361,
836  -361, -361, -361, -361, -361, -361, -361, -361, -361, -361,
837  -361, -361, -361, -361, -361, -361, -361, -54, -361, -35,
838  -361, -361, -361, -361, 118, -333, -68, -12, -361, -361,
839  298, -146, -284, -361, -361, -361, -361, 201, 56, 202,
840  55, 203, 58, 204, 61, 200, 62, 206, 57, -90,
841  207, 112, 160, -361, 37, 4, 5, -361, 74, -361,
842  -361, -361, -361, 110, 115, -361, -361, 120, 122, 65,
843  7, -22, -361, -361, -361, -72, -3, -239, -360
844 };
845 
846  /* YYDEFGOTO[NTERM-NUM]. */
847 static const yytype_int16 yydefgoto[] =
848 {
849  -1, 1, 42, 412, 89, 44, 413, 282, 283, 149,
850  150, 443, 46, 47, 107, 315, 108, 316, 257, 258,
851  359, 360, 48, 49, 50, 51, 317, 418, 362, 431,
852  52, 53, 54, 55, 56, 57, 382, 405, 406, 407,
853  424, 58, 59, 254, 255, 99, 231, 60, 234, 235,
854  330, 61, 236, 62, 237, 63, 238, 64, 239, 65,
855  240, 66, 241, 67, 242, 68, 243, 69, 244, 70,
856  71, 72, 73, 74, 75, 76, 77, 78, 198, 307,
857  79, 80, 162, 163, 164, 81, 151, 152, 339, 153,
858  85, 154, 155, 82, 83, 172, 95, 313, 366
859 };
860 
861  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
862  positive, shift that token. If negative, reduce the rule whose
863  number is the opposite. If YYTABLE_NINF, syntax error. */
864 static const yytype_int16 yytable[] =
865 {
866  43, 100, 399, 45, 102, 43, 245, 96, 92, 104,
867  331, 101, 86, 202, 203, 97, 98, 311, 277, 348,
868  110, 111, 337, 338, 284, 311, 84, 248, 286, 165,
869  250, 43, 169, 401, 367, 260, 370, 93, 180, 93,
870  181, 168, 261, 91, 350, 379, 380, 301, 302, 364,
871  84, 306, 169, 422, 429, 184, 185, 91, 433, 91,
872  169, 93, 91, 91, -208, 103, 416, 182, 170, 170,
873  437, 440, 91, 91, 397, 91, 91, 167, 353, 386,
874  93, 447, 3, 232, 93, 171, 423, 312, 278, 249,
875  292, 293, 294, -221, 93, 312, 93, 354, 232, 262,
876  441, 43, 365, 170, 93, 171, 94, 448, 94, 390,
877  335, 259, 43, 171, 106, 263, 326, 395, 419, 43,
878  173, 100, 92, 96, 102, 86, 344, 114, 410, 104,
879  94, 101, 279, 246, -218, 97, 98, 166, -228, 403,
880  110, 111, 174, 327, 408, 319, 160, 409, 43, 94,
881  -236, 269, 201, 94, 273, 84, 175, 91, -237, 275,
882  170, 417, 161, 94, 280, 94, 90, 320, 170, -211,
883  274, 428, 247, 94, 304, 276, 352, 91, 309, 91,
884  105, 176, 109, 303, 355, 112, 113, 308, 177, 270,
885  189, 190, 266, 191, 267, 156, 157, 192, 158, 159,
886  388, 271, 449, 252, 178, 393, 179, 394, 193, 451,
887  91, 253, 91, 91, 91, 91, 91, 91, 91, 91,
888  91, 91, 91, 91, 91, 91, 310, 183, 245, 245,
889  245, 245, 245, 245, 245, 245, 376, 377, 170, 245,
890  245, 434, 356, 333, 186, 187, 188, 8, 229, 332,
891  256, 189, 190, 328, 191, 11, 12, 170, 192, 15,
892  378, 17, 18, 340, 340, 189, 190, -219, 245, 329,
893  442, 442, 189, 190, 28, 191, -225, 87, -229, 192,
894  90, -231, 30, 31, 32, 281, 195, 88, 196, 197,
895  329, 199, 314, 200, 197, 400, 296, 297, 232, 37,
896  105, -216, 109, 40, -203, -202, 41, 272, 318, 321,
897  322, 43, 245, 323, 357, 325, 232, 324, 253, 160,
898  347, 349, 363, 414, 358, 351, 361, 383, 381, 391,
899  275, 392, 396, 404, 411, 43, 43, 402, 384, 385,
900  427, 430, 435, 438, 389, 2, 298, 299, 300, 439,
901  445, 232, 446, 450, 100, 368, 91, 368, 91, 91,
902  91, 91, 91, 91, 91, 444, 368, 368, 336, 398,
903  436, 425, 334, 194, 285, 369, 371, 287, 290, 288,
904  372, 289, 375, 345, 373, 291, 374, 100, 346, 341,
905  295, 343, 421, 0, 43, 368, 0, 415, 426, 0,
906  0, 43, 0, 0, 420, 0, 0, 0, 0, 0,
907  43, 0, 0, 45, 0, 43, 0, 0, 432, 0,
908  0, 100, 0, 0, 0, 0, 0, 0, 100, 0,
909  0, 0, 43, 43, 0, 230, 0, 0, 0, 368,
910  43, 0, 6, 269, 0, 8, 0, 43, 0, 43,
911  452, 0, 453, 11, 12, 0, 0, 15, 0, 17,
912  18, 0, 20, 0, 22, 0, 0, 0, 0, 25,
913  26, 0, 28, -164, 0, 87, 0, 0, 0, 0,
914  30, 31, 32, 0, 0, 88, 0, 0, -164, 0,
915  -164, 0, 0, 0, 35, 36, 0, 37, 0, 38,
916  39, 40, 0, 0, 41, -164, -164, 0, 0, 0,
917  0, 0, 0, 0, -164, -164, -164, -164, -192, 0,
918  0, 0, 0, 0, -164, -164, 0, 0, -164, -164,
919  -164, -164, 0, -192, -164, -192, -164, 0, 0, 0,
920  0, -164, 0, 0, 0, 0, 0, 0, 0, 0,
921  -192, -192, 0, 0, 0, 0, 0, 0, 0, -192,
922  -192, -192, -192, 0, 0, 0, 0, 0, 0, -192,
923  -192, 0, 0, -192, -192, -192, -192, 0, 0, -192,
924  0, -192, 0, 0, 0, 0, -192, 115, 116, 117,
925  118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
926  128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
927  138, 139, 140, 141, 142, 143, 144, 0, 0, 25,
928  26, 0, 28, 0, 145, 146, 0, 0, 0, 0,
929  147, 31, 148, 0, 0, 33, 0, 0, 34, 0,
930  0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
931  39, 40, 4, 0, 41, 5, 0, 6, 7, 0,
932  8, 9, 0, 10, 0, 0, 0, 0, 11, 12,
933  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
934  23, 24, 0, 0, 25, 26, 27, 28, 0, 0,
935  29, 0, 0, 0, 0, 30, 31, 32, 0, 0,
936  33, 0, 0, 34, 0, 0, 0, 0, 0, 35,
937  36, 0, 37, 0, 38, 39, 40, 4, 0, 41,
938  5, 0, 6, 7, 0, 8, 9, 0, 10, 0,
939  0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
940  18, 19, 20, 21, 22, 23, 24, 0, 0, 25,
941  26, 0, 28, 0, 251, 29, 0, 0, 0, 0,
942  30, 31, 32, 0, 0, 33, 0, 0, 34, 0,
943  0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
944  39, 40, 4, 0, 41, 5, 0, 6, 7, 0,
945  8, 9, 0, 10, 0, 0, 0, 0, 11, 12,
946  13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
947  23, 24, 0, 0, 25, 26, 0, 28, 0, 268,
948  29, 0, 0, 0, 0, 30, 31, 32, 0, 0,
949  33, 0, 0, 34, 0, 0, 0, 0, 0, 35,
950  36, 0, 37, 0, 38, 39, 40, 4, 0, 41,
951  5, 0, 6, 7, 0, 8, 9, 0, 10, 0,
952  0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
953  18, 19, 20, 21, 22, 23, 24, 0, 0, 25,
954  26, 0, 28, 0, 0, 29, 0, 0, 0, 0,
955  30, 31, 32, 0, 0, 33, 0, 0, 34, 0,
956  0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
957  39, 40, 6, 0, 41, 8, 0, 0, 0, 0,
958  0, 0, 0, 11, 12, 0, 0, 15, 0, 17,
959  18, 0, 20, 0, 22, 0, 0, 0, 0, 25,
960  26, 0, 28, 0, 0, 87, 0, 0, 0, 0,
961  30, 31, 32, 0, 0, 88, 0, 0, 0, 0,
962  0, 0, 0, 0, 35, 36, 0, 37, 0, 38,
963  39, 40, 0, 6, 41, 305, 8, 0, 0, 0,
964  0, 0, 0, 0, 11, 12, 0, 0, 15, 0,
965  17, 18, 0, 20, 233, 22, 0, 0, 0, 0,
966  25, 26, 0, 28, 0, 0, 87, 0, 0, 0,
967  0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
968  0, 0, 0, 0, 0, 35, 36, 0, 37, 0,
969  38, 39, 40, 6, 0, 41, 8, 0, 0, 0,
970  0, 0, 0, 0, 11, 12, 0, 0, 15, 0,
971  17, 18, 0, 20, 0, 22, 0, 0, 0, 0,
972  25, 26, 0, 28, 0, 0, 87, 0, 0, 0,
973  0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
974  -226, 0, 0, 0, 0, 35, 36, 0, 37, 0,
975  38, 39, 40, 6, 0, 41, 8, 0, 0, 0,
976  0, 0, 0, 0, 11, 12, 0, 0, 15, 0,
977  17, 18, 0, 20, 0, 22, 0, 0, 0, 0,
978  25, 26, 0, 28, 0, 0, 87, 0, 0, 0,
979  0, 30, 31, 32, 0, 0, 88, 0, 0, 0,
980  0, 0, 0, 0, 0, 35, 36, 0, 37, 0,
981  38, 39, 40, 387, 6, 41, 0, 8, 0, 0,
982  0, 0, 0, 0, 0, 11, 12, 0, 0, 15,
983  0, 17, 18, 0, 20, 0, 22, 0, 0, 0,
984  0, 25, 26, 0, 28, 0, 0, 87, 0, 0,
985  0, 0, 30, 31, 32, 0, 0, 88, 0, 0,
986  0, 0, 0, 0, 0, 0, 35, 36, 0, 37,
987  0, 38, 39, 40, 0, 0, 41, 204, 116, 117,
988  205, 119, 206, 207, 122, 208, 209, 125, 210, 127,
989  128, 129, 130, 211, 212, 213, 214, 215, 216, 217,
990  218, 219, 220, 221, 222, 223, 224, 0, 0, 0,
991  0, 0, 0, 0, 225, 226, 0, 0, 0, 0,
992  227, 0, 228, 204, 116, 117, 205, 119, 206, 207,
993  122, 208, 209, 125, 210, 127, 128, 129, 130, 211,
994  212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
995  222, 223, 224, 0, 0, 0, 0, 0, 0, 0,
996  342, 226, 0, 0, 0, 0, 227, 0, 228, 204,
997  116, 117, 205, 119, 206, 207, 122, 208, 209, 125,
998  210, 264, 128, 265, 130, 211, 212, 213, 214, 215,
999  216, 217, 218, 219, 220, 221, 222, 223, 224, 0,
1000  0, 0, 0, 0, 0, 0, 0, 226, 0, 0,
1001  0, 0, 227, 0, 228, 204, 116, 117, 205, 119,
1002  206, 207, 122, 208, 209, 125, 210, 264, 128, 265,
1003  130, 211, 212, 213, 214, 215, 216, 217, 218, 219,
1004  220, 221, 222, 223, 224, 0, 0, 0, 0, 0,
1005  0, 0, 0, 226
1006 };
1007 
1008 static const yytype_int16 yycheck[] =
1009 {
1010  2, 13, 362, 2, 16, 7, 96, 10, 7, 19,
1011  249, 14, 5, 85, 86, 11, 11, 1, 164, 280,
1012  23, 24, 261, 262, 170, 1, 41, 99, 174, 41,
1013  102, 33, 1, 366, 318, 107, 320, 1, 16, 1,
1014  18, 44, 110, 6, 283, 329, 330, 193, 194, 1,
1015  41, 197, 1, 7, 411, 60, 61, 20, 418, 22,
1016  1, 1, 25, 26, 55, 51, 399, 45, 52, 52,
1017  427, 431, 35, 36, 358, 38, 39, 41, 52, 340,
1018  1, 438, 0, 95, 1, 54, 40, 71, 71, 101,
1019  180, 181, 182, 55, 1, 71, 1, 71, 110, 111,
1020  433, 103, 54, 52, 1, 54, 70, 440, 70, 348,
1021  256, 52, 114, 54, 41, 114, 18, 356, 402, 121,
1022  34, 133, 121, 126, 136, 118, 272, 55, 389, 139,
1023  70, 134, 39, 96, 55, 131, 131, 49, 55, 378,
1024  143, 144, 56, 45, 383, 34, 52, 386, 150, 70,
1025  55, 150, 78, 70, 52, 41, 33, 120, 55, 52,
1026  52, 400, 68, 70, 167, 70, 6, 56, 52, 55,
1027  68, 410, 98, 70, 196, 68, 68, 140, 200, 142,
1028  20, 57, 22, 195, 68, 25, 26, 199, 58, 40,
1029  35, 36, 127, 38, 129, 35, 36, 42, 38, 39,
1030  346, 52, 441, 5, 59, 351, 43, 353, 53, 448,
1031  173, 13, 175, 176, 177, 178, 179, 180, 181, 182,
1032  183, 184, 185, 186, 187, 188, 229, 44, 318, 319,
1033  320, 321, 322, 323, 324, 325, 326, 327, 52, 329,
1034  330, 55, 310, 253, 62, 63, 64, 11, 31, 252,
1035  53, 35, 36, 16, 38, 19, 20, 52, 42, 23,
1036  328, 25, 26, 266, 267, 35, 36, 55, 358, 53,
1037  434, 435, 35, 36, 38, 38, 55, 41, 55, 42,
1038  120, 55, 46, 47, 48, 41, 67, 51, 69, 70,
1039  53, 67, 41, 69, 70, 363, 184, 185, 310, 63,
1040  140, 55, 142, 67, 55, 55, 70, 55, 52, 33,
1041  57, 313, 402, 58, 313, 43, 328, 59, 13, 52,
1042  41, 52, 16, 395, 53, 55, 52, 41, 51, 41,
1043  52, 51, 10, 4, 51, 337, 338, 55, 337, 338,
1044  51, 40, 55, 51, 347, 0, 186, 187, 188, 40,
1045  40, 363, 40, 40, 366, 318, 319, 320, 321, 322,
1046  323, 324, 325, 326, 327, 435, 329, 330, 259, 361,
1047  424, 406, 254, 75, 173, 319, 321, 175, 178, 176,
1048  322, 177, 325, 273, 323, 179, 324, 399, 273, 267,
1049  183, 271, 404, -1, 396, 358, -1, 396, 408, -1,
1050  -1, 403, -1, -1, 403, -1, -1, -1, -1, -1,
1051  412, -1, -1, 412, -1, 417, -1, -1, 417, -1,
1052  -1, 433, -1, -1, -1, -1, -1, -1, 440, -1,
1053  -1, -1, 434, 435, -1, 1, -1, -1, -1, 402,
1054  442, -1, 8, 442, -1, 11, -1, 449, -1, 451,
1055  449, -1, 451, 19, 20, -1, -1, 23, -1, 25,
1056  26, -1, 28, -1, 30, -1, -1, -1, -1, 35,
1057  36, -1, 38, 1, -1, 41, -1, -1, -1, -1,
1058  46, 47, 48, -1, -1, 51, -1, -1, 16, -1,
1059  18, -1, -1, -1, 60, 61, -1, 63, -1, 65,
1060  66, 67, -1, -1, 70, 33, 34, -1, -1, -1,
1061  -1, -1, -1, -1, 42, 43, 44, 45, 1, -1,
1062  -1, -1, -1, -1, 52, 53, -1, -1, 56, 57,
1063  58, 59, -1, 16, 62, 18, 64, -1, -1, -1,
1064  -1, 69, -1, -1, -1, -1, -1, -1, -1, -1,
1065  33, 34, -1, -1, -1, -1, -1, -1, -1, 42,
1066  43, 44, 45, -1, -1, -1, -1, -1, -1, 52,
1067  53, -1, -1, 56, 57, 58, 59, -1, -1, 62,
1068  -1, 64, -1, -1, -1, -1, 69, 3, 4, 5,
1069  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1070  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1071  26, 27, 28, 29, 30, 31, 32, -1, -1, 35,
1072  36, -1, 38, -1, 40, 41, -1, -1, -1, -1,
1073  46, 47, 48, -1, -1, 51, -1, -1, 54, -1,
1074  -1, -1, -1, -1, 60, 61, -1, 63, -1, 65,
1075  66, 67, 3, -1, 70, 6, -1, 8, 9, -1,
1076  11, 12, -1, 14, -1, -1, -1, -1, 19, 20,
1077  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1078  31, 32, -1, -1, 35, 36, 37, 38, -1, -1,
1079  41, -1, -1, -1, -1, 46, 47, 48, -1, -1,
1080  51, -1, -1, 54, -1, -1, -1, -1, -1, 60,
1081  61, -1, 63, -1, 65, 66, 67, 3, -1, 70,
1082  6, -1, 8, 9, -1, 11, 12, -1, 14, -1,
1083  -1, -1, -1, 19, 20, 21, 22, 23, 24, 25,
1084  26, 27, 28, 29, 30, 31, 32, -1, -1, 35,
1085  36, -1, 38, -1, 40, 41, -1, -1, -1, -1,
1086  46, 47, 48, -1, -1, 51, -1, -1, 54, -1,
1087  -1, -1, -1, -1, 60, 61, -1, 63, -1, 65,
1088  66, 67, 3, -1, 70, 6, -1, 8, 9, -1,
1089  11, 12, -1, 14, -1, -1, -1, -1, 19, 20,
1090  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1091  31, 32, -1, -1, 35, 36, -1, 38, -1, 40,
1092  41, -1, -1, -1, -1, 46, 47, 48, -1, -1,
1093  51, -1, -1, 54, -1, -1, -1, -1, -1, 60,
1094  61, -1, 63, -1, 65, 66, 67, 3, -1, 70,
1095  6, -1, 8, 9, -1, 11, 12, -1, 14, -1,
1096  -1, -1, -1, 19, 20, 21, 22, 23, 24, 25,
1097  26, 27, 28, 29, 30, 31, 32, -1, -1, 35,
1098  36, -1, 38, -1, -1, 41, -1, -1, -1, -1,
1099  46, 47, 48, -1, -1, 51, -1, -1, 54, -1,
1100  -1, -1, -1, -1, 60, 61, -1, 63, -1, 65,
1101  66, 67, 8, -1, 70, 11, -1, -1, -1, -1,
1102  -1, -1, -1, 19, 20, -1, -1, 23, -1, 25,
1103  26, -1, 28, -1, 30, -1, -1, -1, -1, 35,
1104  36, -1, 38, -1, -1, 41, -1, -1, -1, -1,
1105  46, 47, 48, -1, -1, 51, -1, -1, -1, -1,
1106  -1, -1, -1, -1, 60, 61, -1, 63, -1, 65,
1107  66, 67, -1, 8, 70, 71, 11, -1, -1, -1,
1108  -1, -1, -1, -1, 19, 20, -1, -1, 23, -1,
1109  25, 26, -1, 28, 29, 30, -1, -1, -1, -1,
1110  35, 36, -1, 38, -1, -1, 41, -1, -1, -1,
1111  -1, 46, 47, 48, -1, -1, 51, -1, -1, -1,
1112  -1, -1, -1, -1, -1, 60, 61, -1, 63, -1,
1113  65, 66, 67, 8, -1, 70, 11, -1, -1, -1,
1114  -1, -1, -1, -1, 19, 20, -1, -1, 23, -1,
1115  25, 26, -1, 28, -1, 30, -1, -1, -1, -1,
1116  35, 36, -1, 38, -1, -1, 41, -1, -1, -1,
1117  -1, 46, 47, 48, -1, -1, 51, -1, -1, -1,
1118  55, -1, -1, -1, -1, 60, 61, -1, 63, -1,
1119  65, 66, 67, 8, -1, 70, 11, -1, -1, -1,
1120  -1, -1, -1, -1, 19, 20, -1, -1, 23, -1,
1121  25, 26, -1, 28, -1, 30, -1, -1, -1, -1,
1122  35, 36, -1, 38, -1, -1, 41, -1, -1, -1,
1123  -1, 46, 47, 48, -1, -1, 51, -1, -1, -1,
1124  -1, -1, -1, -1, -1, 60, 61, -1, 63, -1,
1125  65, 66, 67, 68, 8, 70, -1, 11, -1, -1,
1126  -1, -1, -1, -1, -1, 19, 20, -1, -1, 23,
1127  -1, 25, 26, -1, 28, -1, 30, -1, -1, -1,
1128  -1, 35, 36, -1, 38, -1, -1, 41, -1, -1,
1129  -1, -1, 46, 47, 48, -1, -1, 51, -1, -1,
1130  -1, -1, -1, -1, -1, -1, 60, 61, -1, 63,
1131  -1, 65, 66, 67, -1, -1, 70, 3, 4, 5,
1132  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1133  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1134  26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
1135  -1, -1, -1, -1, 40, 41, -1, -1, -1, -1,
1136  46, -1, 48, 3, 4, 5, 6, 7, 8, 9,
1137  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1138  20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1139  30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
1140  40, 41, -1, -1, -1, -1, 46, -1, 48, 3,
1141  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1142  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1143  24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
1144  -1, -1, -1, -1, -1, -1, -1, 41, -1, -1,
1145  -1, -1, 46, -1, 48, 3, 4, 5, 6, 7,
1146  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1147  18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1148  28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
1149  -1, -1, -1, 41
1150 };
1151 
1152  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1153  symbol of state STATE-NUM. */
1154 static const yytype_uint8 yystos[] =
1155 {
1156  0, 73, 75, 0, 3, 6, 8, 9, 11, 12,
1157  14, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1158  28, 29, 30, 31, 32, 35, 36, 37, 38, 41,
1159  46, 47, 48, 51, 54, 60, 61, 63, 65, 66,
1160  67, 70, 74, 76, 77, 81, 84, 85, 94, 95,
1161  96, 97, 102, 103, 104, 105, 106, 107, 113, 114,
1162  119, 123, 125, 127, 129, 131, 133, 135, 137, 139,
1163  141, 142, 143, 144, 145, 146, 147, 148, 149, 152,
1164  153, 157, 165, 166, 41, 162, 162, 41, 51, 76,
1165  144, 146, 81, 1, 70, 168, 168, 147, 148, 117,
1166  119, 168, 119, 51, 84, 144, 41, 86, 88, 144,
1167  168, 168, 144, 144, 55, 3, 4, 5, 6, 7,
1168  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1169  18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1170  28, 29, 30, 31, 32, 40, 41, 46, 48, 81,
1171  82, 158, 159, 161, 163, 164, 144, 144, 144, 144,
1172  52, 68, 154, 155, 156, 119, 49, 41, 168, 1,
1173  52, 54, 167, 34, 56, 33, 57, 58, 59, 43,
1174  16, 18, 45, 44, 60, 61, 62, 63, 64, 35,
1175  36, 38, 42, 53, 122, 67, 69, 70, 150, 67,
1176  69, 150, 167, 167, 3, 6, 8, 9, 11, 12,
1177  14, 19, 20, 21, 22, 23, 24, 25, 26, 27,
1178  28, 29, 30, 31, 32, 40, 41, 46, 48, 31,
1179  1, 118, 119, 29, 120, 121, 124, 126, 128, 130,
1180  132, 134, 136, 138, 140, 141, 146, 150, 167, 119,
1181  167, 40, 5, 13, 115, 116, 53, 90, 91, 52,
1182  167, 118, 119, 81, 15, 17, 161, 161, 40, 81,
1183  40, 52, 55, 52, 68, 52, 68, 123, 71, 39,
1184  168, 41, 79, 80, 123, 129, 123, 131, 133, 135,
1185  137, 139, 141, 141, 141, 142, 143, 143, 144, 144,
1186  144, 123, 123, 119, 163, 71, 123, 151, 119, 163,
1187  168, 1, 71, 169, 41, 87, 89, 98, 52, 34,
1188  56, 33, 57, 58, 59, 43, 18, 45, 16, 53,
1189  122, 169, 168, 84, 116, 123, 88, 169, 169, 160,
1190  168, 160, 40, 159, 123, 155, 156, 41, 80, 52,
1191  169, 55, 68, 52, 71, 68, 118, 81, 53, 92,
1192  93, 52, 100, 16, 1, 54, 170, 124, 146, 130,
1193  124, 132, 134, 136, 138, 140, 141, 141, 118, 124,
1194  124, 51, 108, 41, 81, 81, 80, 68, 123, 168,
1195  169, 41, 51, 123, 123, 169, 10, 124, 89, 170,
1196  118, 117, 55, 169, 4, 109, 110, 111, 169, 169,
1197  80, 51, 75, 78, 167, 81, 117, 169, 99, 124,
1198  81, 119, 7, 40, 112, 111, 84, 51, 169, 78,
1199  40, 101, 81, 170, 55, 55, 109, 78, 51, 40,
1200  170, 117, 82, 83, 83, 40, 40, 78, 117, 169,
1201  40, 169, 81, 81
1202 };
1203 
1204  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1205 static const yytype_uint8 yyr1[] =
1206 {
1207  0, 72, 73, 74, 74, 75, 75, 76, 76, 76,
1208  77, 78, 79, 79, 80, 80, 81, 81, 81, 81,
1209  81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
1210  81, 82, 82, 83, 83, 84, 84, 85, 86, 86,
1211  87, 87, 88, 89, 90, 90, 91, 92, 92, 93,
1212  94, 95, 96, 96, 97, 97, 98, 99, 97, 100,
1213  101, 97, 97, 97, 102, 103, 104, 105, 106, 107,
1214  108, 108, 109, 109, 110, 110, 111, 112, 113, 114,
1215  114, 114, 115, 116, 117, 117, 118, 118, 119, 119,
1216  120, 120, 121, 121, 122, 122, 123, 123, 123, 124,
1217  124, 124, 125, 125, 126, 126, 127, 127, 128, 128,
1218  129, 129, 130, 130, 131, 131, 132, 132, 133, 133,
1219  134, 134, 135, 135, 136, 136, 137, 137, 138, 138,
1220  139, 139, 139, 139, 140, 140, 140, 141, 141, 142,
1221  142, 142, 143, 143, 143, 143, 144, 144, 144, 144,
1222  144, 144, 144, 144, 144, 144, 145, 145, 145, 146,
1223  146, 147, 147, 148, 148, 148, 148, 148, 149, 149,
1224  149, 149, 150, 150, 151, 151, 152, 152, 152, 152,
1225  152, 152, 153, 153, 153, 153, 154, 154, 155, 155,
1226  156, 156, 157, 157, 157, 158, 158, 159, 159, 159,
1227  160, 161, 161, 161, 162, 162, 163, 163, 164, 164,
1228  164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1229  164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
1230  164, 164, 164, 164, 164, 164, 164, 164, 165, 165,
1231  165, 165, 165, 165, 166, 166, 166, 167, 167, 168,
1232  168, 169, 169, 170, 170
1233 };
1234 
1235  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1236 static const yytype_uint8 yyr2[] =
1237 {
1238  0, 2, 3, 1, 0, 0, 2, 7, 8, 10,
1239  1, 1, 1, 3, 0, 1, 1, 1, 1, 1,
1240  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1241  1, 1, 2, 0, 1, 3, 2, 3, 1, 3,
1242  1, 3, 2, 2, 0, 1, 2, 0, 1, 2,
1243  1, 2, 7, 5, 7, 5, 0, 0, 11, 0,
1244  0, 12, 7, 8, 3, 3, 3, 5, 3, 5,
1245  3, 5, 0, 1, 1, 2, 4, 3, 3, 3,
1246  3, 4, 5, 2, 0, 1, 1, 1, 1, 3,
1247  0, 1, 1, 3, 1, 1, 1, 3, 3, 1,
1248  3, 3, 1, 5, 1, 5, 1, 3, 1, 3,
1249  1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
1250  1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
1251  1, 3, 3, 3, 1, 3, 3, 1, 3, 1,
1252  3, 3, 1, 3, 3, 3, 1, 2, 2, 2,
1253  2, 2, 2, 2, 2, 2, 1, 2, 2, 1,
1254  1, 1, 2, 1, 1, 4, 3, 3, 2, 2,
1255  4, 3, 2, 3, 1, 3, 1, 1, 1, 1,
1256  1, 3, 2, 3, 3, 5, 2, 4, 1, 2,
1257  0, 1, 2, 3, 4, 1, 3, 3, 3, 3,
1258  6, 1, 1, 1, 0, 1, 1, 1, 1, 1,
1259  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1260  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1261  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1262  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1263  1, 1, 1, 1, 1
1264 };
1265 
1266 
1267 #define yyerrok (yyerrstatus = 0)
1268 #define yyclearin (yychar = YYEMPTY)
1269 #define YYEMPTY (-2)
1270 #define YYEOF 0
1271 
1272 #define YYACCEPT goto yyacceptlab
1273 #define YYABORT goto yyabortlab
1274 #define YYERROR goto yyerrorlab
1275 
1276 
1277 #define YYRECOVERING() (!!yyerrstatus)
1278 
1279 #define YYBACKUP(Token, Value) \
1280  do \
1281  if (yychar == YYEMPTY) \
1282  { \
1283  yychar = (Token); \
1284  yylval = (Value); \
1285  YYPOPSTACK (yylen); \
1286  yystate = *yyssp; \
1287  goto yybackup; \
1288  } \
1289  else \
1290  { \
1291  yyerror (ctx, YY_("syntax error: cannot back up")); \
1292  YYERROR; \
1293  } \
1294  while (0)
1295 
1296 /* Error token number */
1297 #define YYTERROR 1
1298 #define YYERRCODE 256
1299 
1300 
1301 
1302 /* Enable debugging if requested. */
1303 #if YYDEBUG
1304 
1305 # ifndef YYFPRINTF
1306 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1307 # define YYFPRINTF fprintf
1308 # endif
1309 
1310 # define YYDPRINTF(Args) \
1311 do { \
1312  if (yydebug) \
1313  YYFPRINTF Args; \
1314 } while (0)
1315 
1316 /* This macro is provided for backward compatibility. */
1317 #ifndef YY_LOCATION_PRINT
1318 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1319 #endif
1320 
1321 
1322 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1323 do { \
1324  if (yydebug) \
1325  { \
1326  YYFPRINTF (stderr, "%s ", Title); \
1327  yy_symbol_print (stderr, \
1328  Type, Value, ctx); \
1329  YYFPRINTF (stderr, "\n"); \
1330  } \
1331 } while (0)
1332 
1333 
1334 /*-----------------------------------.
1335 | Print this symbol's value on YYO. |
1336 `-----------------------------------*/
1337 
1338 static void
1339 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, parser_ctx_t *ctx)
1340 {
1341  FILE *yyoutput = yyo;
1342  YYUSE (yyoutput);
1343  YYUSE (ctx);
1344  if (!yyvaluep)
1345  return;
1346 # ifdef YYPRINT
1347  if (yytype < YYNTOKENS)
1348  YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1349 # endif
1350  YYUSE (yytype);
1351 }
1352 
1353 
1354 /*---------------------------.
1355 | Print this symbol on YYO. |
1356 `---------------------------*/
1357 
1358 static void
1359 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, parser_ctx_t *ctx)
1360 {
1361  YYFPRINTF (yyo, "%s %s (",
1362  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1363 
1364  yy_symbol_value_print (yyo, yytype, yyvaluep, ctx);
1365  YYFPRINTF (yyo, ")");
1366 }
1367 
1368 /*------------------------------------------------------------------.
1369 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1370 | TOP (included). |
1371 `------------------------------------------------------------------*/
1372 
1373 static void
1374 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1375 {
1376  YYFPRINTF (stderr, "Stack now");
1377  for (; yybottom <= yytop; yybottom++)
1378  {
1379  int yybot = *yybottom;
1380  YYFPRINTF (stderr, " %d", yybot);
1381  }
1382  YYFPRINTF (stderr, "\n");
1383 }
1384 
1385 # define YY_STACK_PRINT(Bottom, Top) \
1386 do { \
1387  if (yydebug) \
1388  yy_stack_print ((Bottom), (Top)); \
1389 } while (0)
1390 
1391 
1392 /*------------------------------------------------.
1393 | Report that the YYRULE is going to be reduced. |
1394 `------------------------------------------------*/
1395 
1396 static void
1397 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, parser_ctx_t *ctx)
1398 {
1399  unsigned long yylno = yyrline[yyrule];
1400  int yynrhs = yyr2[yyrule];
1401  int yyi;
1402  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1403  yyrule - 1, yylno);
1404  /* The symbols being reduced. */
1405  for (yyi = 0; yyi < yynrhs; yyi++)
1406  {
1407  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1408  yy_symbol_print (stderr,
1409  yystos[yyssp[yyi + 1 - yynrhs]],
1410  &yyvsp[(yyi + 1) - (yynrhs)]
1411  , ctx);
1412  YYFPRINTF (stderr, "\n");
1413  }
1414 }
1415 
1416 # define YY_REDUCE_PRINT(Rule) \
1417 do { \
1418  if (yydebug) \
1419  yy_reduce_print (yyssp, yyvsp, Rule, ctx); \
1420 } while (0)
1421 
1422 /* Nonzero means print parse trace. It is left uninitialized so that
1423  multiple parsers can coexist. */
1424 int yydebug;
1425 #else /* !YYDEBUG */
1426 # define YYDPRINTF(Args)
1427 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1428 # define YY_STACK_PRINT(Bottom, Top)
1429 # define YY_REDUCE_PRINT(Rule)
1430 #endif /* !YYDEBUG */
1431 
1432 
1433 /* YYINITDEPTH -- initial size of the parser's stacks. */
1434 #ifndef YYINITDEPTH
1435 # define YYINITDEPTH 200
1436 #endif
1437 
1438 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1439  if the built-in stack extension method is used).
1440 
1441  Do not make this value too large; the results are undefined if
1442  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1443  evaluated with infinite-precision integer arithmetic. */
1444 
1445 #ifndef YYMAXDEPTH
1446 # define YYMAXDEPTH 10000
1447 #endif
1448 
1449 
1450 #if YYERROR_VERBOSE
1451 
1452 # ifndef yystrlen
1453 # if defined __GLIBC__ && defined _STRING_H
1454 # define yystrlen strlen
1455 # else
1456 /* Return the length of YYSTR. */
1457 static YYSIZE_T
1458 yystrlen (const char *yystr)
1459 {
1460  YYSIZE_T yylen;
1461  for (yylen = 0; yystr[yylen]; yylen++)
1462  continue;
1463  return yylen;
1464 }
1465 # endif
1466 # endif
1467 
1468 # ifndef yystpcpy
1469 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1470 # define yystpcpy stpcpy
1471 # else
1472 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1473  YYDEST. */
1474 static char *
1475 yystpcpy (char *yydest, const char *yysrc)
1476 {
1477  char *yyd = yydest;
1478  const char *yys = yysrc;
1479 
1480  while ((*yyd++ = *yys++) != '\0')
1481  continue;
1482 
1483  return yyd - 1;
1484 }
1485 # endif
1486 # endif
1487 
1488 # ifndef yytnamerr
1489 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1490  quotes and backslashes, so that it's suitable for yyerror. The
1491  heuristic is that double-quoting is unnecessary unless the string
1492  contains an apostrophe, a comma, or backslash (other than
1493  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1494  null, do not copy; instead, return the length of what the result
1495  would have been. */
1496 static YYSIZE_T
1497 yytnamerr (char *yyres, const char *yystr)
1498 {
1499  if (*yystr == '"')
1500  {
1501  YYSIZE_T yyn = 0;
1502  char const *yyp = yystr;
1503 
1504  for (;;)
1505  switch (*++yyp)
1506  {
1507  case '\'':
1508  case ',':
1509  goto do_not_strip_quotes;
1510 
1511  case '\\':
1512  if (*++yyp != '\\')
1513  goto do_not_strip_quotes;
1514  else
1515  goto append;
1516 
1517  append:
1518  default:
1519  if (yyres)
1520  yyres[yyn] = *yyp;
1521  yyn++;
1522  break;
1523 
1524  case '"':
1525  if (yyres)
1526  yyres[yyn] = '\0';
1527  return yyn;
1528  }
1529  do_not_strip_quotes: ;
1530  }
1531 
1532  if (! yyres)
1533  return yystrlen (yystr);
1534 
1535  return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
1536 }
1537 # endif
1538 
1539 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1540  about the unexpected token YYTOKEN for the state stack whose top is
1541  YYSSP.
1542 
1543  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1544  not large enough to hold the message. In that case, also set
1545  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1546  required number of bytes is too large to store. */
1547 static int
1548 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1549  yytype_int16 *yyssp, int yytoken)
1550 {
1551  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1552  YYSIZE_T yysize = yysize0;
1553  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1554  /* Internationalized format string. */
1555  const char *yyformat = YY_NULLPTR;
1556  /* Arguments of yyformat. */
1557  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1558  /* Number of reported tokens (one for the "unexpected", one per
1559  "expected"). */
1560  int yycount = 0;
1561 
1562  /* There are many possibilities here to consider:
1563  - If this state is a consistent state with a default action, then
1564  the only way this function was invoked is if the default action
1565  is an error action. In that case, don't check for expected
1566  tokens because there are none.
1567  - The only way there can be no lookahead present (in yychar) is if
1568  this state is a consistent state with a default action. Thus,
1569  detecting the absence of a lookahead is sufficient to determine
1570  that there is no unexpected or expected token to report. In that
1571  case, just report a simple "syntax error".
1572  - Don't assume there isn't a lookahead just because this state is a
1573  consistent state with a default action. There might have been a
1574  previous inconsistent state, consistent state with a non-default
1575  action, or user semantic action that manipulated yychar.
1576  - Of course, the expected token list depends on states to have
1577  correct lookahead information, and it depends on the parser not
1578  to perform extra reductions after fetching a lookahead from the
1579  scanner and before detecting a syntax error. Thus, state merging
1580  (from LALR or IELR) and default reductions corrupt the expected
1581  token list. However, the list is correct for canonical LR with
1582  one exception: it will still contain any token that will not be
1583  accepted due to an error action in a later state.
1584  */
1585  if (yytoken != YYEMPTY)
1586  {
1587  int yyn = yypact[*yyssp];
1588  yyarg[yycount++] = yytname[yytoken];
1589  if (!yypact_value_is_default (yyn))
1590  {
1591  /* Start YYX at -YYN if negative to avoid negative indexes in
1592  YYCHECK. In other words, skip the first -YYN actions for
1593  this state because they are default actions. */
1594  int yyxbegin = yyn < 0 ? -yyn : 0;
1595  /* Stay within bounds of both yycheck and yytname. */
1596  int yychecklim = YYLAST - yyn + 1;
1597  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1598  int yyx;
1599 
1600  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1601  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1602  && !yytable_value_is_error (yytable[yyx + yyn]))
1603  {
1604  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1605  {
1606  yycount = 1;
1607  yysize = yysize0;
1608  break;
1609  }
1610  yyarg[yycount++] = yytname[yyx];
1611  {
1612  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1613  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1614  yysize = yysize1;
1615  else
1616  return 2;
1617  }
1618  }
1619  }
1620  }
1621 
1622  switch (yycount)
1623  {
1624 # define YYCASE_(N, S) \
1625  case N: \
1626  yyformat = S; \
1627  break
1628  default: /* Avoid compiler warnings. */
1629  YYCASE_(0, YY_("syntax error"));
1630  YYCASE_(1, YY_("syntax error, unexpected %s"));
1631  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1632  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1633  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1634  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1635 # undef YYCASE_
1636  }
1637 
1638  {
1639  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1640  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1641  yysize = yysize1;
1642  else
1643  return 2;
1644  }
1645 
1646  if (*yymsg_alloc < yysize)
1647  {
1648  *yymsg_alloc = 2 * yysize;
1649  if (! (yysize <= *yymsg_alloc
1650  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1651  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1652  return 1;
1653  }
1654 
1655  /* Avoid sprintf, as that infringes on the user's name space.
1656  Don't have undefined behavior even if the translation
1657  produced a string with the wrong number of "%s"s. */
1658  {
1659  char *yyp = *yymsg;
1660  int yyi = 0;
1661  while ((*yyp = *yyformat) != '\0')
1662  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1663  {
1664  yyp += yytnamerr (yyp, yyarg[yyi++]);
1665  yyformat += 2;
1666  }
1667  else
1668  {
1669  yyp++;
1670  yyformat++;
1671  }
1672  }
1673  return 0;
1674 }
1675 #endif /* YYERROR_VERBOSE */
1676 
1677 /*-----------------------------------------------.
1678 | Release the memory associated to this symbol. |
1679 `-----------------------------------------------*/
1680 
1681 static void
1682 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_ctx_t *ctx)
1683 {
1684  YYUSE (yyvaluep);
1685  YYUSE (ctx);
1686  if (!yymsg)
1687  yymsg = "Deleting";
1688  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1689 
1691  YYUSE (yytype);
1693 }
1694 
1695 
1696 
1697 
1698 /*----------.
1699 | yyparse. |
1700 `----------*/
1701 
1702 int
1704 {
1705 /* The lookahead symbol. */
1706 int yychar;
1707 
1708 
1709 /* The semantic value of the lookahead symbol. */
1710 /* Default value used for initialization, for pacifying older GCCs
1711  or non-GCC compilers. */
1712 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1713 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1714 
1715  /* Number of syntax errors so far. */
1716  int yynerrs;
1717 
1718  int yystate;
1719  /* Number of tokens to shift before error messages enabled. */
1720  int yyerrstatus;
1721 
1722  /* The stacks and their tools:
1723  'yyss': related to states.
1724  'yyvs': related to semantic values.
1725 
1726  Refer to the stacks through separate pointers, to allow yyoverflow
1727  to reallocate them elsewhere. */
1728 
1729  /* The state stack. */
1730  yytype_int16 yyssa[YYINITDEPTH];
1731  yytype_int16 *yyss;
1732  yytype_int16 *yyssp;
1733 
1734  /* The semantic value stack. */
1735  YYSTYPE yyvsa[YYINITDEPTH];
1736  YYSTYPE *yyvs;
1737  YYSTYPE *yyvsp;
1738 
1739  YYSIZE_T yystacksize;
1740 
1741  int yyn;
1742  int yyresult;
1743  /* Lookahead token as an internal (translated) token number. */
1744  int yytoken = 0;
1745  /* The variables used to return semantic value and location from the
1746  action routines. */
1747  YYSTYPE yyval;
1748 
1749 #if YYERROR_VERBOSE
1750  /* Buffer for error messages, and its allocated size. */
1751  char yymsgbuf[128];
1752  char *yymsg = yymsgbuf;
1753  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1754 #endif
1755 
1756 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1757 
1758  /* The number of symbols on the RHS of the reduced rule.
1759  Keep to zero when no symbol should be popped. */
1760  int yylen = 0;
1761 
1762  yyssp = yyss = yyssa;
1763  yyvsp = yyvs = yyvsa;
1764  yystacksize = YYINITDEPTH;
1765 
1766  YYDPRINTF ((stderr, "Starting parse\n"));
1767 
1768  yystate = 0;
1769  yyerrstatus = 0;
1770  yynerrs = 0;
1771  yychar = YYEMPTY; /* Cause a token to be read. */
1772  goto yysetstate;
1773 
1774 
1775 /*------------------------------------------------------------.
1776 | yynewstate -- push a new state, which is found in yystate. |
1777 `------------------------------------------------------------*/
1778 yynewstate:
1779  /* In all cases, when you get here, the value and location stacks
1780  have just been pushed. So pushing a state here evens the stacks. */
1781  yyssp++;
1782 
1783 
1784 /*--------------------------------------------------------------------.
1785 | yynewstate -- set current state (the top of the stack) to yystate. |
1786 `--------------------------------------------------------------------*/
1787 yysetstate:
1788  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1789  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1790  *yyssp = (yytype_int16) yystate;
1791 
1792  if (yyss + yystacksize - 1 <= yyssp)
1793 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1794  goto yyexhaustedlab;
1795 #else
1796  {
1797  /* Get the current used size of the three stacks, in elements. */
1798  YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1799 
1800 # if defined yyoverflow
1801  {
1802  /* Give user a chance to reallocate the stack. Use copies of
1803  these so that the &'s don't force the real ones into
1804  memory. */
1805  YYSTYPE *yyvs1 = yyvs;
1806  yytype_int16 *yyss1 = yyss;
1807 
1808  /* Each stack pointer address is followed by the size of the
1809  data in use in that stack, in bytes. This used to be a
1810  conditional around just the two extra args, but that might
1811  be undefined if yyoverflow is a macro. */
1812  yyoverflow (YY_("memory exhausted"),
1813  &yyss1, yysize * sizeof (*yyssp),
1814  &yyvs1, yysize * sizeof (*yyvsp),
1815  &yystacksize);
1816  yyss = yyss1;
1817  yyvs = yyvs1;
1818  }
1819 # else /* defined YYSTACK_RELOCATE */
1820  /* Extend the stack our own way. */
1821  if (YYMAXDEPTH <= yystacksize)
1822  goto yyexhaustedlab;
1823  yystacksize *= 2;
1824  if (YYMAXDEPTH < yystacksize)
1825  yystacksize = YYMAXDEPTH;
1826 
1827  {
1828  yytype_int16 *yyss1 = yyss;
1829  union yyalloc *yyptr =
1830  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1831  if (! yyptr)
1832  goto yyexhaustedlab;
1833  YYSTACK_RELOCATE (yyss_alloc, yyss);
1834  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1835 # undef YYSTACK_RELOCATE
1836  if (yyss1 != yyssa)
1837  YYSTACK_FREE (yyss1);
1838  }
1839 # endif
1840 
1841  yyssp = yyss + yysize - 1;
1842  yyvsp = yyvs + yysize - 1;
1843 
1844  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1845  (unsigned long) yystacksize));
1846 
1847  if (yyss + yystacksize - 1 <= yyssp)
1848  YYABORT;
1849  }
1850 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1851 
1852  if (yystate == YYFINAL)
1853  YYACCEPT;
1854 
1855  goto yybackup;
1856 
1857 
1858 /*-----------.
1859 | yybackup. |
1860 `-----------*/
1861 yybackup:
1862  /* Do appropriate processing given the current state. Read a
1863  lookahead token if we need one and don't already have one. */
1864 
1865  /* First try to decide what to do without reference to lookahead token. */
1866  yyn = yypact[yystate];
1867  if (yypact_value_is_default (yyn))
1868  goto yydefault;
1869 
1870  /* Not known => get a lookahead token if don't already have one. */
1871 
1872  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1873  if (yychar == YYEMPTY)
1874  {
1875  YYDPRINTF ((stderr, "Reading a token: "));
1876  yychar = yylex (&yylval, ctx);
1877  }
1878 
1879  if (yychar <= YYEOF)
1880  {
1881  yychar = yytoken = YYEOF;
1882  YYDPRINTF ((stderr, "Now at end of input.\n"));
1883  }
1884  else
1885  {
1886  yytoken = YYTRANSLATE (yychar);
1887  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1888  }
1889 
1890  /* If the proper action on seeing token YYTOKEN is to reduce or to
1891  detect an error, take that action. */
1892  yyn += yytoken;
1893  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1894  goto yydefault;
1895  yyn = yytable[yyn];
1896  if (yyn <= 0)
1897  {
1898  if (yytable_value_is_error (yyn))
1899  goto yyerrlab;
1900  yyn = -yyn;
1901  goto yyreduce;
1902  }
1903 
1904  /* Count tokens shifted since error; after three, turn off error
1905  status. */
1906  if (yyerrstatus)
1907  yyerrstatus--;
1908 
1909  /* Shift the lookahead token. */
1910  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1911 
1912  /* Discard the shifted token. */
1913  yychar = YYEMPTY;
1914 
1915  yystate = yyn;
1917  *++yyvsp = yylval;
1919  goto yynewstate;
1920 
1921 
1922 /*-----------------------------------------------------------.
1923 | yydefault -- do the default action for the current state. |
1924 `-----------------------------------------------------------*/
1925 yydefault:
1926  yyn = yydefact[yystate];
1927  if (yyn == 0)
1928  goto yyerrlab;
1929  goto yyreduce;
1930 
1931 
1932 /*-----------------------------.
1933 | yyreduce -- do a reduction. |
1934 `-----------------------------*/
1935 yyreduce:
1936  /* yyn is the number of a rule to reduce with. */
1937  yylen = yyr2[yyn];
1938 
1939  /* If YYLEN is nonzero, implement the default value of the action:
1940  '$$ = $1'.
1941 
1942  Otherwise, the following line sets YYVAL to garbage.
1943  This behavior is undocumented and Bison
1944  users should not rely upon it. Assigning to YYVAL
1945  unconditionally makes the parser a bit smaller, and it avoids a
1946  GCC warning that YYVAL may be used uninitialized. */
1947  yyval = yyvsp[1-yylen];
1948 
1949 
1950  YY_REDUCE_PRINT (yyn);
1951  switch (yyn)
1952  {
1953  case 2:
1954 #line 259 "parser.y"
1955  { program_parsed(ctx, (yyvsp[-2].source_elements)); }
1956 #line 1957 "parser.tab.c"
1957  break;
1958 
1959  case 3:
1960 #line 262 "parser.y"
1961  {}
1962 #line 1963 "parser.tab.c"
1963  break;
1964 
1965  case 4:
1966 #line 263 "parser.y"
1967  {}
1968 #line 1969 "parser.tab.c"
1969  break;
1970 
1971  case 5:
1972 #line 267 "parser.y"
1973  { (yyval.source_elements) = new_source_elements(ctx); }
1974 #line 1975 "parser.tab.c"
1975  break;
1976 
1977  case 6:
1978 #line 269 "parser.y"
1979  { (yyval.source_elements) = source_elements_add_statement((yyvsp[-1].source_elements), (yyvsp[0].statement)); }
1980 #line 1981 "parser.tab.c"
1981  break;
1982 
1983  case 7:
1984 #line 274 "parser.y"
1985  { (yyval.expr) = new_function_expression(ctx, NULL, (yyvsp[-4].parameter_list), (yyvsp[-1].source_elements), NULL, (yyvsp[-6].srcptr), (yyvsp[0].srcptr)-(yyvsp[-6].srcptr)+1); }
1986 #line 1987 "parser.tab.c"
1987  break;
1988 
1989  case 8:
1990 #line 276 "parser.y"
1991  { (yyval.expr) = new_function_expression(ctx, (yyvsp[-6].identifier), (yyvsp[-4].parameter_list), (yyvsp[-1].source_elements), NULL, (yyvsp[-7].srcptr), (yyvsp[0].srcptr)-(yyvsp[-7].srcptr)+1); }
1992 #line 1993 "parser.tab.c"
1993  break;
1994 
1995  case 9:
1996 #line 278 "parser.y"
1997  { (yyval.expr) = new_function_expression(ctx, (yyvsp[-6].identifier), (yyvsp[-4].parameter_list), (yyvsp[-1].source_elements), (yyvsp[-8].identifier), (yyvsp[-9].srcptr), (yyvsp[0].srcptr)-(yyvsp[-9].srcptr)+1); }
1998 #line 1999 "parser.tab.c"
1999  break;
2000 
2001  case 10:
2002 #line 281 "parser.y"
2003  { (yyval.srcptr) = ctx->ptr - 8; }
2004 #line 2005 "parser.tab.c"
2005  break;
2006 
2007  case 11:
2008 #line 285 "parser.y"
2009  { (yyval.source_elements) = (yyvsp[0].source_elements); }
2010 #line 2011 "parser.tab.c"
2011  break;
2012 
2013  case 12:
2014 #line 289 "parser.y"
2015  { (yyval.parameter_list) = new_parameter_list(ctx, (yyvsp[0].identifier)); }
2016 #line 2017 "parser.tab.c"
2017  break;
2018 
2019  case 13:
2020 #line 291 "parser.y"
2021  { (yyval.parameter_list) = parameter_list_add(ctx, (yyvsp[-2].parameter_list), (yyvsp[0].identifier)); }
2022 #line 2023 "parser.tab.c"
2023  break;
2024 
2025  case 14:
2026 #line 295 "parser.y"
2027  { (yyval.parameter_list) = NULL; }
2028 #line 2029 "parser.tab.c"
2029  break;
2030 
2031  case 15:
2032 #line 296 "parser.y"
2033  { (yyval.parameter_list) = (yyvsp[0].parameter_list); }
2034 #line 2035 "parser.tab.c"
2035  break;
2036 
2037  case 16:
2038 #line 300 "parser.y"
2039  { (yyval.statement) = (yyvsp[0].statement); }
2040 #line 2041 "parser.tab.c"
2041  break;
2042 
2043  case 17:
2044 #line 301 "parser.y"
2045  { (yyval.statement) = (yyvsp[0].statement); }
2046 #line 2047 "parser.tab.c"
2047  break;
2048 
2049  case 18:
2050 #line 302 "parser.y"
2051  { (yyval.statement) = (yyvsp[0].statement); }
2052 #line 2053 "parser.tab.c"
2053  break;
2054 
2055  case 19:
2056 #line 303 "parser.y"
2057  { (yyval.statement) = new_expression_statement(ctx, (yyvsp[0].expr)); }
2058 #line 2059 "parser.tab.c"
2059  break;
2060 
2061  case 20:
2062 #line 304 "parser.y"
2063  { (yyval.statement) = (yyvsp[0].statement); }
2064 #line 2065 "parser.tab.c"
2065  break;
2066 
2067  case 21:
2068 #line 305 "parser.y"
2069  { (yyval.statement) = (yyvsp[0].statement); }
2070 #line 2071 "parser.tab.c"
2071  break;
2072 
2073  case 22:
2074 #line 306 "parser.y"
2075  { (yyval.statement) = (yyvsp[0].statement); }
2076 #line 2077 "parser.tab.c"
2077  break;
2078 
2079  case 23:
2080 #line 307 "parser.y"
2081  { (yyval.statement) = (yyvsp[0].statement); }
2082 #line 2083 "parser.tab.c"
2083  break;
2084 
2085  case 24:
2086 #line 308 "parser.y"
2087  { (yyval.statement) = (yyvsp[0].statement); }
2088 #line 2089 "parser.tab.c"
2089  break;
2090 
2091  case 25:
2092 #line 309 "parser.y"
2093  { (yyval.statement) = (yyvsp[0].statement); }
2094 #line 2095 "parser.tab.c"
2095  break;
2096 
2097  case 26:
2098 #line 310 "parser.y"
2099  { (yyval.statement) = (yyvsp[0].statement); }
2100 #line 2101 "parser.tab.c"
2101  break;
2102 
2103  case 27:
2104 #line 311 "parser.y"
2105  { (yyval.statement) = (yyvsp[0].statement); }
2106 #line 2107 "parser.tab.c"
2107  break;
2108 
2109  case 28:
2110 #line 312 "parser.y"
2111  { (yyval.statement) = (yyvsp[0].statement); }
2112 #line 2113 "parser.tab.c"
2113  break;
2114 
2115  case 29:
2116 #line 313 "parser.y"
2117  { (yyval.statement) = (yyvsp[0].statement); }
2118 #line 2119 "parser.tab.c"
2119  break;
2120 
2121  case 30:
2122 #line 314 "parser.y"
2123  { (yyval.statement) = (yyvsp[0].statement); }
2124 #line 2125 "parser.tab.c"
2125  break;
2126 
2127  case 31:
2128 #line 318 "parser.y"
2129  { (yyval.statement_list) = new_statement_list(ctx, (yyvsp[0].statement)); }
2130 #line 2131 "parser.tab.c"
2131  break;
2132 
2133  case 32:
2134 #line 320 "parser.y"
2135  { (yyval.statement_list) = statement_list_add((yyvsp[-1].statement_list), (yyvsp[0].statement)); }
2136 #line 2137 "parser.tab.c"
2137  break;
2138 
2139  case 33:
2140 #line 324 "parser.y"
2141  { (yyval.statement_list) = NULL; }
2142 #line 2143 "parser.tab.c"
2143  break;
2144 
2145  case 34:
2146 #line 325 "parser.y"
2147  { (yyval.statement_list) = (yyvsp[0].statement_list); }
2148 #line 2149 "parser.tab.c"
2149  break;
2150 
2151  case 35:
2152 #line 329 "parser.y"
2153  { (yyval.statement) = new_block_statement(ctx, (yyvsp[-1].statement_list)); }
2154 #line 2155 "parser.tab.c"
2155  break;
2156 
2157  case 36:
2158 #line 330 "parser.y"
2159  { (yyval.statement) = new_block_statement(ctx, NULL); }
2160 #line 2161 "parser.tab.c"
2161  break;
2162 
2163  case 37:
2164 #line 335 "parser.y"
2165  { (yyval.statement) = new_var_statement(ctx, (yyvsp[-1].variable_list)); }
2166 #line 2167 "parser.tab.c"
2167  break;
2168 
2169  case 38:
2170 #line 339 "parser.y"
2171  { (yyval.variable_list) = new_variable_list(ctx, (yyvsp[0].variable_declaration)); }
2172 #line 2173 "parser.tab.c"
2173  break;
2174 
2175  case 39:
2176 #line 341 "parser.y"
2177  { (yyval.variable_list) = variable_list_add(ctx, (yyvsp[-2].variable_list), (yyvsp[0].variable_declaration)); }
2178 #line 2179 "parser.tab.c"
2179  break;
2180 
2181  case 40:
2182 #line 346 "parser.y"
2183  { (yyval.variable_list) = new_variable_list(ctx, (yyvsp[0].variable_declaration)); }
2184 #line 2185 "parser.tab.c"
2185  break;
2186 
2187  case 41:
2188 #line 348 "parser.y"
2189  { (yyval.variable_list) = variable_list_add(ctx, (yyvsp[-2].variable_list), (yyvsp[0].variable_declaration)); }
2190 #line 2191 "parser.tab.c"
2191  break;
2192 
2193  case 42:
2194 #line 353 "parser.y"
2195  { (yyval.variable_declaration) = new_variable_declaration(ctx, (yyvsp[-1].identifier), (yyvsp[0].expr)); }
2196 #line 2197 "parser.tab.c"
2197  break;
2198 
2199  case 43:
2200 #line 358 "parser.y"
2201  { (yyval.variable_declaration) = new_variable_declaration(ctx, (yyvsp[-1].identifier), (yyvsp[0].expr)); }
2202 #line 2203 "parser.tab.c"
2203  break;
2204 
2205  case 44:
2206 #line 362 "parser.y"
2207  { (yyval.expr) = NULL; }
2208 #line 2209 "parser.tab.c"
2209  break;
2210 
2211  case 45:
2212 #line 363 "parser.y"
2213  { (yyval.expr) = (yyvsp[0].expr); }
2214 #line 2215 "parser.tab.c"
2215  break;
2216 
2217  case 46:
2218 #line 368 "parser.y"
2219  { (yyval.expr) = (yyvsp[0].expr); }
2220 #line 2221 "parser.tab.c"
2221  break;
2222 
2223  case 47:
2224 #line 372 "parser.y"
2225  { (yyval.expr) = NULL; }
2226 #line 2227 "parser.tab.c"
2227  break;
2228 
2229  case 48:
2230 #line 373 "parser.y"
2231  { (yyval.expr) = (yyvsp[0].expr); }
2232 #line 2233 "parser.tab.c"
2233  break;
2234 
2235  case 49:
2236 #line 378 "parser.y"
2237  { (yyval.expr) = (yyvsp[0].expr); }
2238 #line 2239 "parser.tab.c"
2239  break;
2240 
2241  case 50:
2242 #line 382 "parser.y"
2243  { (yyval.statement) = new_statement(ctx, STAT_EMPTY, 0); }
2244 #line 2245 "parser.tab.c"
2245  break;
2246 
2247  case 51:
2248 #line 387 "parser.y"
2249  { (yyval.statement) = new_expression_statement(ctx, (yyvsp[-1].expr)); }
2250 #line 2251 "parser.tab.c"
2251  break;
2252 
2253  case 52:
2254 #line 392 "parser.y"
2255  { (yyval.statement) = new_if_statement(ctx, (yyvsp[-4].expr), (yyvsp[-2].statement), (yyvsp[0].statement)); }
2256 #line 2257 "parser.tab.c"
2257  break;
2258 
2259  case 53:
2260 #line 394 "parser.y"
2261  { (yyval.statement) = new_if_statement(ctx, (yyvsp[-2].expr), (yyvsp[0].statement), NULL); }
2262 #line 2263 "parser.tab.c"
2263  break;
2264 
2265  case 54:
2266 #line 399 "parser.y"
2267  { (yyval.statement) = new_while_statement(ctx, TRUE, (yyvsp[-2].expr), (yyvsp[-5].statement)); }
2268 #line 2269 "parser.tab.c"
2269  break;
2270 
2271  case 55:
2272 #line 401 "parser.y"
2273  { (yyval.statement) = new_while_statement(ctx, FALSE, (yyvsp[-2].expr), (yyvsp[0].statement)); }
2274 #line 2275 "parser.tab.c"
2275  break;
2276 
2277  case 56:
2278 #line 403 "parser.y"
2279  { if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
2280 #line 2281 "parser.tab.c"
2281  break;
2282 
2283  case 57:
2284 #line 405 "parser.y"
2285  { if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
2286 #line 2287 "parser.tab.c"
2287  break;
2288 
2289  case 58:
2290 #line 407 "parser.y"
2291  { (yyval.statement) = new_for_statement(ctx, NULL, (yyvsp[-8].expr), (yyvsp[-5].expr), (yyvsp[-2].expr), (yyvsp[0].statement)); }
2292 #line 2293 "parser.tab.c"
2293  break;
2294 
2295  case 59:
2296 #line 409 "parser.y"
2297  { if(!explicit_error(ctx, (yyvsp[0].variable_list), ';')) YYABORT; }
2298 #line 2299 "parser.tab.c"
2299  break;
2300 
2301  case 60:
2302 #line 411 "parser.y"
2303  { if(!explicit_error(ctx, (yyvsp[0].expr), ';')) YYABORT; }
2304 #line 2305 "parser.tab.c"
2305  break;
2306 
2307  case 61:
2308 #line 413 "parser.y"
2309  { (yyval.statement) = new_for_statement(ctx, (yyvsp[-8].variable_list), NULL, (yyvsp[-5].expr), (yyvsp[-2].expr), (yyvsp[0].statement)); }
2310 #line 2311 "parser.tab.c"
2311  break;
2312 
2313  case 62:
2314 #line 415 "parser.y"
2315  { (yyval.statement) = new_forin_statement(ctx, NULL, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].statement)); }
2316 #line 2317 "parser.tab.c"
2317  break;
2318 
2319  case 63:
2320 #line 417 "parser.y"
2321  { (yyval.statement) = new_forin_statement(ctx, (yyvsp[-4].variable_declaration), NULL, (yyvsp[-2].expr), (yyvsp[0].statement)); }
2322 #line 2323 "parser.tab.c"
2323  break;
2324 
2325  case 64:
2326 #line 422 "parser.y"
2327  { (yyval.statement) = new_continue_statement(ctx, (yyvsp[-1].identifier)); }
2328 #line 2329 "parser.tab.c"
2329  break;
2330 
2331  case 65:
2332 #line 427 "parser.y"
2333  { (yyval.statement) = new_break_statement(ctx, (yyvsp[-1].identifier)); }
2334 #line 2335 "parser.tab.c"
2335  break;
2336 
2337  case 66:
2338 #line 432 "parser.y"
2339  { (yyval.statement) = new_return_statement(ctx, (yyvsp[-1].expr)); }
2340 #line 2341 "parser.tab.c"
2341  break;
2342 
2343  case 67:
2344 #line 437 "parser.y"
2345  { (yyval.statement) = new_with_statement(ctx, (yyvsp[-2].expr), (yyvsp[0].statement)); }
2346 #line 2347 "parser.tab.c"
2347  break;
2348 
2349  case 68:
2350 #line 442 "parser.y"
2351  { (yyval.statement) = new_labelled_statement(ctx, (yyvsp[-2].identifier), (yyvsp[0].statement)); }
2352 #line 2353 "parser.tab.c"
2353  break;
2354 
2355  case 69:
2356 #line 447 "parser.y"
2357  { (yyval.statement) = new_switch_statement(ctx, (yyvsp[-2].expr), (yyvsp[0].case_clausule)); }
2358 #line 2359 "parser.tab.c"
2359  break;
2360 
2361  case 70:
2362 #line 452 "parser.y"
2363  { (yyval.case_clausule) = new_case_block(ctx, (yyvsp[-1].case_list), NULL, NULL); }
2364 #line 2365 "parser.tab.c"
2365  break;
2366 
2367  case 71:
2368 #line 454 "parser.y"
2369  { (yyval.case_clausule) = new_case_block(ctx, (yyvsp[-3].case_list), (yyvsp[-2].case_clausule), (yyvsp[-1].case_list)); }
2370 #line 2371 "parser.tab.c"
2371  break;
2372 
2373  case 72:
2374 #line 458 "parser.y"
2375  { (yyval.case_list) = NULL; }
2376 #line 2377 "parser.tab.c"
2377  break;
2378 
2379  case 73:
2380 #line 459 "parser.y"
2381  { (yyval.case_list) = (yyvsp[0].case_list); }
2382 #line 2383 "parser.tab.c"
2383  break;
2384 
2385  case 74:
2386 #line 463 "parser.y"
2387  { (yyval.case_list) = new_case_list(ctx, (yyvsp[0].case_clausule)); }
2388 #line 2389 "parser.tab.c"
2389  break;
2390 
2391  case 75:
2392 #line 465 "parser.y"
2393  { (yyval.case_list) = case_list_add(ctx, (yyvsp[-1].case_list), (yyvsp[0].case_clausule)); }
2394 #line 2395 "parser.tab.c"
2395  break;
2396 
2397  case 76:
2398 #line 470 "parser.y"
2399  { (yyval.case_clausule) = new_case_clausule(ctx, (yyvsp[-2].expr), (yyvsp[0].statement_list)); }
2400 #line 2401 "parser.tab.c"
2401  break;
2402 
2403  case 77:
2404 #line 475 "parser.y"
2405  { (yyval.case_clausule) = new_case_clausule(ctx, NULL, (yyvsp[0].statement_list)); }
2406 #line 2407 "parser.tab.c"
2407  break;
2408 
2409  case 78:
2410 #line 480 "parser.y"
2411  { (yyval.statement) = new_throw_statement(ctx, (yyvsp[-1].expr)); }
2412 #line 2413 "parser.tab.c"
2413  break;
2414 
2415  case 79:
2416 #line 484 "parser.y"
2417  { (yyval.statement) = new_try_statement(ctx, (yyvsp[-1].statement), (yyvsp[0].catch_block), NULL); }
2418 #line 2419 "parser.tab.c"
2419  break;
2420 
2421  case 80:
2422 #line 485 "parser.y"
2423  { (yyval.statement) = new_try_statement(ctx, (yyvsp[-1].statement), NULL, (yyvsp[0].statement)); }
2424 #line 2425 "parser.tab.c"
2425  break;
2426 
2427  case 81:
2428 #line 487 "parser.y"
2429  { (yyval.statement) = new_try_statement(ctx, (yyvsp[-2].statement), (yyvsp[-1].catch_block), (yyvsp[0].statement)); }
2430 #line 2431 "parser.tab.c"
2431  break;
2432 
2433  case 82:
2434 #line 492 "parser.y"
2435  { (yyval.catch_block) = new_catch_block(ctx, (yyvsp[-2].identifier), (yyvsp[0].statement)); }
2436 #line 2437 "parser.tab.c"
2437  break;
2438 
2439  case 83:
2440 #line 496 "parser.y"
2441  { (yyval.statement) = (yyvsp[0].statement); }
2442 #line 2443 "parser.tab.c"
2443  break;
2444 
2445  case 84:
2446 #line 500 "parser.y"
2447  { (yyval.expr) = NULL; }
2448 #line 2449 "parser.tab.c"
2449  break;
2450 
2451  case 85:
2452 #line 501 "parser.y"
2453  { (yyval.expr) = (yyvsp[0].expr); }
2454 #line 2455 "parser.tab.c"
2455  break;
2456 
2457  case 86:
2458 #line 504 "parser.y"
2459  { (yyval.expr) = (yyvsp[0].expr); }
2460 #line 2461 "parser.tab.c"
2461  break;
2462 
2463  case 87:
2464 #line 505 "parser.y"
2465  { set_error(ctx, JS_E_SYNTAX); YYABORT; }
2466 #line 2467 "parser.tab.c"
2467  break;
2468 
2469  case 88:
2470 #line 509 "parser.y"
2471  { (yyval.expr) = (yyvsp[0].expr); }
2472 #line 2473 "parser.tab.c"
2473  break;
2474 
2475  case 89:
2476 #line 511 "parser.y"
2477  { (yyval.expr) = new_binary_expression(ctx, EXPR_COMMA, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2478 #line 2479 "parser.tab.c"
2479  break;
2480 
2481  case 90:
2482 #line 515 "parser.y"
2483  { (yyval.expr) = NULL; }
2484 #line 2485 "parser.tab.c"
2485  break;
2486 
2487  case 91:
2488 #line 516 "parser.y"
2489  { (yyval.expr) = (yyvsp[0].expr); }
2490 #line 2491 "parser.tab.c"
2491  break;
2492 
2493  case 92:
2494 #line 521 "parser.y"
2495  { (yyval.expr) = (yyvsp[0].expr); }
2496 #line 2497 "parser.tab.c"
2497  break;
2498 
2499  case 93:
2500 #line 523 "parser.y"
2501  { (yyval.expr) = new_binary_expression(ctx, EXPR_COMMA, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2502 #line 2503 "parser.tab.c"
2503  break;
2504 
2505  case 94:
2506 #line 526 "parser.y"
2507  { (yyval.ival) = (yyvsp[0].ival); }
2508 #line 2509 "parser.tab.c"
2509  break;
2510 
2511  case 95:
2512 #line 527 "parser.y"
2513  { (yyval.ival) = EXPR_ASSIGNDIV; }
2514 #line 2515 "parser.tab.c"
2515  break;
2516 
2517  case 96:
2518 #line 531 "parser.y"
2519  { (yyval.expr) = (yyvsp[0].expr); }
2520 #line 2521 "parser.tab.c"
2521  break;
2522 
2523  case 97:
2524 #line 533 "parser.y"
2525  { (yyval.expr) = new_binary_expression(ctx, EXPR_ASSIGN, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2526 #line 2527 "parser.tab.c"
2527  break;
2528 
2529  case 98:
2530 #line 535 "parser.y"
2531  { (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2532 #line 2533 "parser.tab.c"
2533  break;
2534 
2535  case 99:
2536 #line 540 "parser.y"
2537  { (yyval.expr) = (yyvsp[0].expr); }
2538 #line 2539 "parser.tab.c"
2539  break;
2540 
2541  case 100:
2542 #line 542 "parser.y"
2543  { (yyval.expr) = new_binary_expression(ctx, EXPR_ASSIGN, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2544 #line 2545 "parser.tab.c"
2545  break;
2546 
2547  case 101:
2548 #line 544 "parser.y"
2549  { (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2550 #line 2551 "parser.tab.c"
2551  break;
2552 
2553  case 102:
2554 #line 548 "parser.y"
2555  { (yyval.expr) = (yyvsp[0].expr); }
2556 #line 2557 "parser.tab.c"
2557  break;
2558 
2559  case 103:
2560 #line 550 "parser.y"
2561  { (yyval.expr) = new_conditional_expression(ctx, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2562 #line 2563 "parser.tab.c"
2563  break;
2564 
2565  case 104:
2566 #line 555 "parser.y"
2567  { (yyval.expr) = (yyvsp[0].expr); }
2568 #line 2569 "parser.tab.c"
2569  break;
2570 
2571  case 105:
2572 #line 557 "parser.y"
2573  { (yyval.expr) = new_conditional_expression(ctx, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2574 #line 2575 "parser.tab.c"
2575  break;
2576 
2577  case 106:
2578 #line 561 "parser.y"
2579  { (yyval.expr) = (yyvsp[0].expr); }
2580 #line 2581 "parser.tab.c"
2581  break;
2582 
2583  case 107:
2584 #line 563 "parser.y"
2585  { (yyval.expr) = new_binary_expression(ctx, EXPR_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2586 #line 2587 "parser.tab.c"
2587  break;
2588 
2589  case 108:
2590 #line 568 "parser.y"
2591  { (yyval.expr) = (yyvsp[0].expr); }
2592 #line 2593 "parser.tab.c"
2593  break;
2594 
2595  case 109:
2596 #line 570 "parser.y"
2597  { (yyval.expr) = new_binary_expression(ctx, EXPR_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2598 #line 2599 "parser.tab.c"
2599  break;
2600 
2601  case 110:
2602 #line 574 "parser.y"
2603  { (yyval.expr) = (yyvsp[0].expr); }
2604 #line 2605 "parser.tab.c"
2605  break;
2606 
2607  case 111:
2608 #line 576 "parser.y"
2609  { (yyval.expr) = new_binary_expression(ctx, EXPR_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2610 #line 2611 "parser.tab.c"
2611  break;
2612 
2613  case 112:
2614 #line 581 "parser.y"
2615  { (yyval.expr) = (yyvsp[0].expr); }
2616 #line 2617 "parser.tab.c"
2617  break;
2618 
2619  case 113:
2620 #line 583 "parser.y"
2621  { (yyval.expr) = new_binary_expression(ctx, EXPR_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2622 #line 2623 "parser.tab.c"
2623  break;
2624 
2625  case 114:
2626 #line 587 "parser.y"
2627  { (yyval.expr) = (yyvsp[0].expr); }
2628 #line 2629 "parser.tab.c"
2629  break;
2630 
2631  case 115:
2632 #line 589 "parser.y"
2633  { (yyval.expr) = new_binary_expression(ctx, EXPR_BOR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2634 #line 2635 "parser.tab.c"
2635  break;
2636 
2637  case 116:
2638 #line 594 "parser.y"
2639  { (yyval.expr) = (yyvsp[0].expr); }
2640 #line 2641 "parser.tab.c"
2641  break;
2642 
2643  case 117:
2644 #line 596 "parser.y"
2645  { (yyval.expr) = new_binary_expression(ctx, EXPR_BOR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2646 #line 2647 "parser.tab.c"
2647  break;
2648 
2649  case 118:
2650 #line 600 "parser.y"
2651  { (yyval.expr) = (yyvsp[0].expr); }
2652 #line 2653 "parser.tab.c"
2653  break;
2654 
2655  case 119:
2656 #line 602 "parser.y"
2657  { (yyval.expr) = new_binary_expression(ctx, EXPR_BXOR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2658 #line 2659 "parser.tab.c"
2659  break;
2660 
2661  case 120:
2662 #line 607 "parser.y"
2663  { (yyval.expr) = (yyvsp[0].expr); }
2664 #line 2665 "parser.tab.c"
2665  break;
2666 
2667  case 121:
2668 #line 609 "parser.y"
2669  { (yyval.expr) = new_binary_expression(ctx, EXPR_BXOR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2670 #line 2671 "parser.tab.c"
2671  break;
2672 
2673  case 122:
2674 #line 613 "parser.y"
2675  { (yyval.expr) = (yyvsp[0].expr); }
2676 #line 2677 "parser.tab.c"
2677  break;
2678 
2679  case 123:
2680 #line 615 "parser.y"
2681  { (yyval.expr) = new_binary_expression(ctx, EXPR_BAND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2682 #line 2683 "parser.tab.c"
2683  break;
2684 
2685  case 124:
2686 #line 620 "parser.y"
2687  { (yyval.expr) = (yyvsp[0].expr); }
2688 #line 2689 "parser.tab.c"
2689  break;
2690 
2691  case 125:
2692 #line 622 "parser.y"
2693  { (yyval.expr) = new_binary_expression(ctx, EXPR_BAND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2694 #line 2695 "parser.tab.c"
2695  break;
2696 
2697  case 126:
2698 #line 626 "parser.y"
2699  { (yyval.expr) = (yyvsp[0].expr); }
2700 #line 2701 "parser.tab.c"
2701  break;
2702 
2703  case 127:
2704 #line 628 "parser.y"
2705  { (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2706 #line 2707 "parser.tab.c"
2707  break;
2708 
2709  case 128:
2710 #line 632 "parser.y"
2711  { (yyval.expr) = (yyvsp[0].expr); }
2712 #line 2713 "parser.tab.c"
2713  break;
2714 
2715  case 129:
2716 #line 634 "parser.y"
2717  { (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2718 #line 2719 "parser.tab.c"
2719  break;
2720 
2721  case 130:
2722 #line 638 "parser.y"
2723  { (yyval.expr) = (yyvsp[0].expr); }
2724 #line 2725 "parser.tab.c"
2725  break;
2726 
2727  case 131:
2728 #line 640 "parser.y"
2729  { (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2730 #line 2731 "parser.tab.c"
2731  break;
2732 
2733  case 132:
2734 #line 642 "parser.y"
2735  { (yyval.expr) = new_binary_expression(ctx, EXPR_INSTANCEOF, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2736 #line 2737 "parser.tab.c"
2737  break;
2738 
2739  case 133:
2740 #line 644 "parser.y"
2741  { (yyval.expr) = new_binary_expression(ctx, EXPR_IN, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2742 #line 2743 "parser.tab.c"
2743  break;
2744 
2745  case 134:
2746 #line 648 "parser.y"
2747  { (yyval.expr) = (yyvsp[0].expr); }
2748 #line 2749 "parser.tab.c"
2749  break;
2750 
2751  case 135:
2752 #line 650 "parser.y"
2753  { (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2754 #line 2755 "parser.tab.c"
2755  break;
2756 
2757  case 136:
2758 #line 652 "parser.y"
2759  { (yyval.expr) = new_binary_expression(ctx, EXPR_INSTANCEOF, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2760 #line 2761 "parser.tab.c"
2761  break;
2762 
2763  case 137:
2764 #line 656 "parser.y"
2765  { (yyval.expr) = (yyvsp[0].expr); }
2766 #line 2767 "parser.tab.c"
2767  break;
2768 
2769  case 138:
2770 #line 658 "parser.y"
2771  { (yyval.expr) = new_binary_expression(ctx, (yyvsp[-1].ival), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2772 #line 2773 "parser.tab.c"
2773  break;
2774 
2775  case 139:
2776 #line 663 "parser.y"
2777  { (yyval.expr) = (yyvsp[0].expr); }
2778 #line 2779 "parser.tab.c"
2779  break;
2780 
2781  case 140:
2782 #line 665 "parser.y"
2783  { (yyval.expr) = new_binary_expression(ctx, EXPR_ADD, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2784 #line 2785 "parser.tab.c"
2785  break;
2786 
2787  case 141:
2788 #line 667 "parser.y"
2789  { (yyval.expr) = new_binary_expression(ctx, EXPR_SUB, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2790 #line 2791 "parser.tab.c"
2791  break;
2792 
2793  case 142:
2794 #line 671 "parser.y"
2795  { (yyval.expr) = (yyvsp[0].expr); }
2796 #line 2797 "parser.tab.c"
2797  break;
2798 
2799  case 143:
2800 #line 673 "parser.y"
2801  { (yyval.expr) = new_binary_expression(ctx, EXPR_MUL, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2802 #line 2803 "parser.tab.c"
2803  break;
2804 
2805  case 144:
2806 #line 675 "parser.y"
2807  { (yyval.expr) = new_binary_expression(ctx, EXPR_DIV, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2808 #line 2809 "parser.tab.c"
2809  break;
2810 
2811  case 145:
2812 #line 677 "parser.y"
2813  { (yyval.expr) = new_binary_expression(ctx, EXPR_MOD, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2814 #line 2815 "parser.tab.c"
2815  break;
2816 
2817  case 146:
2818 #line 681 "parser.y"
2819  { (yyval.expr) = (yyvsp[0].expr); }
2820 #line 2821 "parser.tab.c"
2821  break;
2822 
2823  case 147:
2824 #line 683 "parser.y"
2825  { (yyval.expr) = new_unary_expression(ctx, EXPR_DELETE, (yyvsp[0].expr)); }
2826 #line 2827 "parser.tab.c"
2827  break;
2828 
2829  case 148:
2830 #line 684 "parser.y"
2831  { (yyval.expr) = new_unary_expression(ctx, EXPR_VOID, (yyvsp[0].expr)); }
2832 #line 2833 "parser.tab.c"
2833  break;
2834 
2835  case 149:
2836 #line 686 "parser.y"
2837  { (yyval.expr) = new_unary_expression(ctx, EXPR_TYPEOF, (yyvsp[0].expr)); }
2838 #line 2839 "parser.tab.c"
2839  break;
2840 
2841  case 150:
2842 #line 687 "parser.y"
2843  { (yyval.expr) = new_unary_expression(ctx, EXPR_PREINC, (yyvsp[0].expr)); }
2844 #line 2845 "parser.tab.c"
2845  break;
2846 
2847  case 151:
2848 #line 688 "parser.y"
2849  { (yyval.expr) = new_unary_expression(ctx, EXPR_PREDEC, (yyvsp[0].expr)); }
2850 #line 2851 "parser.tab.c"
2851  break;
2852 
2853  case 152:
2854 #line 689 "parser.y"
2855  { (yyval.expr) = new_unary_expression(ctx, EXPR_PLUS, (yyvsp[0].expr)); }
2856 #line 2857 "parser.tab.c"
2857  break;
2858 
2859  case 153:
2860 #line 690 "parser.y"
2861  { (yyval.expr) = new_unary_expression(ctx, EXPR_MINUS, (yyvsp[0].expr)); }
2862 #line 2863 "parser.tab.c"
2863  break;
2864 
2865  case 154:
2866 #line 691 "parser.y"
2867  { (yyval.expr) = new_unary_expression(ctx, EXPR_BITNEG, (yyvsp[0].expr)); }
2868 #line 2869 "parser.tab.c"
2869  break;
2870 
2871  case 155:
2872 #line 692 "parser.y"
2873  { (yyval.expr) = new_unary_expression(ctx, EXPR_LOGNEG, (yyvsp[0].expr)); }
2874 #line 2875 "parser.tab.c"
2875  break;
2876 
2877  case 156:
2878 #line 697 "parser.y"
2879  { (yyval.expr) = (yyvsp[0].expr); }
2880 #line 2881 "parser.tab.c"
2881  break;
2882 
2883  case 157:
2884 #line 699 "parser.y"
2885  { (yyval.expr) = new_unary_expression(ctx, EXPR_POSTINC, (yyvsp[-1].expr)); }
2886 #line 2887 "parser.tab.c"
2887  break;
2888 
2889  case 158:
2890 #line 701 "parser.y"
2891  { (yyval.expr) = new_unary_expression(ctx, EXPR_POSTDEC, (yyvsp[-1].expr)); }
2892 #line 2893 "parser.tab.c"
2893  break;
2894 
2895  case 159:
2896 #line 706 "parser.y"
2897  { (yyval.expr) = (yyvsp[0].expr); }
2898 #line 2899 "parser.tab.c"
2899  break;
2900 
2901  case 160:
2902 #line 707 "parser.y"
2903  { (yyval.expr) = (yyvsp[0].expr); }
2904 #line 2905 "parser.tab.c"
2905  break;
2906 
2907  case 161:
2908 #line 711 "parser.y"
2909  { (yyval.expr) = (yyvsp[0].expr); }
2910 #line 2911 "parser.tab.c"
2911  break;
2912 
2913  case 162:
2914 #line 712 "parser.y"
2915  { (yyval.expr) = new_new_expression(ctx, (yyvsp[0].expr), NULL); }
2916 #line 2917 "parser.tab.c"
2917  break;
2918 
2919  case 163:
2920 #line 716 "parser.y"
2921  { (yyval.expr) = (yyvsp[0].expr); }
2922 #line 2923 "parser.tab.c"
2923  break;
2924 
2925  case 164:
2926 #line 717 "parser.y"
2927  { (yyval.expr) = (yyvsp[0].expr); }
2928 #line 2929 "parser.tab.c"
2929  break;
2930 
2931  case 165:
2932 #line 719 "parser.y"
2933  { (yyval.expr) = new_binary_expression(ctx, EXPR_ARRAY, (yyvsp[-3].expr), (yyvsp[-1].expr)); }
2934 #line 2935 "parser.tab.c"
2935  break;
2936 
2937  case 166:
2938 #line 721 "parser.y"
2939  { (yyval.expr) = new_member_expression(ctx, (yyvsp[-2].expr), (yyvsp[0].identifier)); }
2940 #line 2941 "parser.tab.c"
2941  break;
2942 
2943  case 167:
2944 #line 723 "parser.y"
2945  { (yyval.expr) = new_new_expression(ctx, (yyvsp[-1].expr), (yyvsp[0].argument_list)); }
2946 #line 2947 "parser.tab.c"
2947  break;
2948 
2949  case 168:
2950 #line 728 "parser.y"
2951  { (yyval.expr) = new_call_expression(ctx, (yyvsp[-1].expr), (yyvsp[0].argument_list)); }
2952 #line 2953 "parser.tab.c"
2953  break;
2954 
2955  case 169:
2956 #line 730 "parser.y"
2957  { (yyval.expr) = new_call_expression(ctx, (yyvsp[-1].expr), (yyvsp[0].argument_list)); }
2958 #line 2959 "parser.tab.c"
2959  break;
2960 
2961  case 170:
2962 #line 732 "parser.y"
2963  { (yyval.expr) = new_binary_expression(ctx, EXPR_ARRAY, (yyvsp[-3].expr), (yyvsp[-1].expr)); }
2964 #line 2965 "parser.tab.c"
2965  break;
2966 
2967  case 171:
2968 #line 734 "parser.y"
2969  { (yyval.expr) = new_member_expression(ctx, (yyvsp[-2].expr), (yyvsp[0].identifier)); }
2970 #line 2971 "parser.tab.c"
2971  break;
2972 
2973  case 172:
2974 #line 738 "parser.y"
2975  { (yyval.argument_list) = NULL; }
2976 #line 2977 "parser.tab.c"
2977  break;
2978 
2979  case 173:
2980 #line 739 "parser.y"
2981  { (yyval.argument_list) = (yyvsp[-1].argument_list); }
2982 #line 2983 "parser.tab.c"
2983  break;
2984 
2985  case 174:
2986 #line 743 "parser.y"
2987  { (yyval.argument_list) = new_argument_list(ctx, (yyvsp[0].expr)); }
2988 #line 2989 "parser.tab.c"
2989  break;
2990 
2991  case 175:
2992 #line 745 "parser.y"
2993  { (yyval.argument_list) = argument_list_add(ctx, (yyvsp[-2].argument_list), (yyvsp[0].expr)); }
2994 #line 2995 "parser.tab.c"
2995  break;
2996 
2997  case 176:
2998 #line 749 "parser.y"
2999  { (yyval.expr) = new_expression(ctx, EXPR_THIS, 0); }
3000 #line 3001 "parser.tab.c"
3001  break;
3002 
3003  case 177:
3004 #line 750 "parser.y"
3005  { (yyval.expr) = new_identifier_expression(ctx, (yyvsp[0].identifier)); }
3006 #line 3007 "parser.tab.c"
3007  break;
3008 
3009  case 178:
3010 #line 751 "parser.y"
3011  { (yyval.expr) = new_literal_expression(ctx, (yyvsp[0].literal)); }
3012 #line 3013 "parser.tab.c"
3013  break;
3014 
3015  case 179:
3016 #line 752 "parser.y"
3017  { (yyval.expr) = (yyvsp[0].expr); }
3018 #line 3019 "parser.tab.c"
3019  break;
3020 
3021  case 180:
3022 #line 753 "parser.y"
3023  { (yyval.expr) = (yyvsp[0].expr); }
3024 #line 3025 "parser.tab.c"
3025  break;
3026 
3027  case 181:
3028 #line 754 "parser.y"
3029  { (yyval.expr) = (yyvsp[-1].expr); }
3030 #line 3031 "parser.tab.c"
3031  break;
3032 
3033  case 182:
3034 #line 758 "parser.y"
3035  { (yyval.expr) = new_array_literal_expression(ctx, NULL, 0); }
3036 #line 3037 "parser.tab.c"
3037  break;
3038 
3039  case 183:
3040 #line 759 "parser.y"
3041  { (yyval.expr) = new_array_literal_expression(ctx, NULL, (yyvsp[-1].ival)+1); }
3042 #line 3043 "parser.tab.c"
3043  break;
3044 
3045  case 184:
3046 #line 760 "parser.y"
3047  { (yyval.expr) = new_array_literal_expression(ctx, (yyvsp[-1].element_list), 0); }
3048 #line 3049 "parser.tab.c"
3049  break;
3050 
3051  case 185:
3052 #line 762 "parser.y"
3053  { (yyval.expr) = new_array_literal_expression(ctx, (yyvsp[-3].element_list), (yyvsp[-1].ival)+1); }
3054 #line 3055 "parser.tab.c"
3055  break;
3056 
3057  case 186:
3058 #line 767 "parser.y"
3059  { (yyval.element_list) = new_element_list(ctx, (yyvsp[-1].ival), (yyvsp[0].expr)); }
3060 #line 3061 "parser.tab.c"
3061  break;
3062 
3063  case 187:
3064 #line 769 "parser.y"
3065  { (yyval.element_list) = element_list_add(ctx, (yyvsp[-3].element_list), (yyvsp[-1].ival), (yyvsp[0].expr)); }
3066 #line 3067 "parser.tab.c"
3067  break;
3068 
3069  case 188:
3070 #line 773 "parser.y"
3071  { (yyval.ival) = 1; }
3072 #line 3073 "parser.tab.c"
3073  break;
3074 
3075  case 189:
3076 #line 774 "parser.y"
3077  { (yyval.ival) = (yyvsp[-1].ival) + 1; }
3078 #line 3079 "parser.tab.c"
3079  break;
3080 
3081  case 190:
3082 #line 778 "parser.y"
3083  { (yyval.ival) = 0; }
3084 #line 3085 "parser.tab.c"
3085  break;
3086 
3087  case 191:
3088 #line 779 "parser.y"
3089  { (yyval.ival) = (yyvsp[0].ival); }
3090 #line 3091 "parser.tab.c"
3091  break;
3092 
3093  case 192:
3094 #line 783 "parser.y"
3095  { (yyval.expr) = new_prop_and_value_expression(ctx, NULL); }
3096 #line 3097 "parser.tab.c"
3097  break;
3098 
3099  case 193:
3100 #line 785 "parser.y"
3101  { (yyval.expr) = new_prop_and_value_expression(ctx, (yyvsp[-1].property_list)); }
3102 #line 3103 "parser.tab.c"
3103  break;
3104 
3105  case 194:
3106 #line 787 "parser.y"
3107  {
3108  if(ctx->script->version < 2) {
3109  WARN("Trailing comma in object literal is illegal in legacy mode.\n");
3110  YYABORT;
3111  }
3112  (yyval.expr) = new_prop_and_value_expression(ctx, (yyvsp[-2].property_list));
3113  }
3114 #line 3115 "parser.tab.c"
3115  break;
3116 
3117  case 195:
3118 #line 797 "parser.y"
3119  { (yyval.property_list) = new_property_list(ctx, (yyvsp[0].property_definition)); }
3120 #line 3121 "parser.tab.c"
3121  break;
3122 
3123  case 196:
3124 #line 799 "parser.y"
3125  { (yyval.property_list) = property_list_add(ctx, (yyvsp[-2].property_list), (yyvsp[0].property_definition)); }
3126 #line 3127 "parser.tab.c"
3127  break;
3128 
3129  case 197:
3130 #line 804 "parser.y"
3131  { (yyval.property_definition) = new_property_definition(ctx, PROPERTY_DEFINITION_VALUE, (yyvsp[-2].literal), (yyvsp[0].expr)); }
3132 #line 3133 "parser.tab.c"
3133  break;
3134 
3135  case 198:
3136 #line 806 "parser.y"
3137  { (yyval.property_definition) = new_property_definition(ctx, PROPERTY_DEFINITION_GETTER, (yyvsp[-1].literal), (yyvsp[0].expr)); }
3138 #line 3139 "parser.tab.c"
3139  break;
3140 
3141  case 199:
3142 #line 808 "parser.y"
3143  { (yyval.property_definition) = new_property_definition(ctx, PROPERTY_DEFINITION_SETTER, (yyvsp[-1].literal), (yyvsp[0].expr)); }
3144 #line 3145 "parser.tab.c"
3145  break;
3146 
3147  case 200:
3148 #line 812 "parser.y"
3149  { (yyval.expr) = new_function_expression(ctx, NULL, (yyvsp[-4].parameter_list), (yyvsp[-1].source_elements), NULL, (yyvsp[-5].srcptr), (yyvsp[0].srcptr)-(yyvsp[-5].srcptr)); }
3150 #line 3151 "parser.tab.c"
3151  break;
3152 
3153  case 201:
3154 #line 816 "parser.y"
3155  { (yyval.literal) = new_string_literal(ctx, compiler_alloc_string_len(ctx->compiler, (yyvsp[0].identifier), lstrlenW((yyvsp[0].identifier)))); }
3156 #line 3157 "parser.tab.c"
3157  break;
3158 
3159  case 202:
3160 #line 817 "parser.y"
3161  { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].str)); }
3162 #line 3163 "parser.tab.c"
3163  break;
3164 
3165  case 203:
3166 #line 818 "parser.y"
3167  { (yyval.literal) = (yyvsp[0].literal); }
3168 #line 3169 "parser.tab.c"
3169  break;
3170 
3171  case 204:
3172 #line 822 "parser.y"
3173  { (yyval.identifier) = NULL; }
3174 #line 3175 "parser.tab.c"
3175  break;
3176 
3177  case 205:
3178 #line 823 "parser.y"
3179  { (yyval.identifier) = (yyvsp[0].identifier); }
3180 #line 3181 "parser.tab.c"
3181  break;
3182 
3183  case 206:
3184 #line 827 "parser.y"
3185  { (yyval.identifier) = (yyvsp[0].identifier); }
3186 #line 3187 "parser.tab.c"
3187  break;
3188 
3189  case 207:
3190 #line 829 "parser.y"
3191  {
3192  if(ctx->script->version < SCRIPTLANGUAGEVERSION_ES5) {
3193  WARN("%s keyword used as an identifier in legacy mode.\n",
3194  debugstr_w((yyvsp[0].identifier)));
3195  YYABORT;
3196  }
3197  (yyval.identifier) = (yyvsp[0].identifier);
3198  }
3199 #line 3200 "parser.tab.c"
3200  break;
3201 
3202  case 208:
3203 #line 839 "parser.y"
3204  { (yyval.identifier) = (yyvsp[0].identifier); }
3205 #line 3206 "parser.tab.c"
3206  break;
3207 
3208  case 209:
3209 #line 840 "parser.y"
3210  { (yyval.identifier) = (yyvsp[0].identifier); }
3211 #line 3212 "parser.tab.c"
3212  break;
3213 
3214  case 210:
3215 #line 841 "parser.y"
3216  { (yyval.identifier) = (yyvsp[0].identifier); }
3217 #line 3218 "parser.tab.c"
3218  break;
3219 
3220  case 211:
3221 #line 842 "parser.y"
3222  { (yyval.identifier) = (yyvsp[0].identifier); }
3223 #line 3224 "parser.tab.c"
3224  break;
3225 
3226  case 212:
3227 #line 843 "parser.y"
3228  { (yyval.identifier) = (yyvsp[0].identifier); }
3229 #line 3230 "parser.tab.c"
3230  break;
3231 
3232  case 213:
3233 #line 844 "parser.y"
3234  { (yyval.identifier) = (yyvsp[0].identifier); }
3235 #line 3236 "parser.tab.c"
3236  break;
3237 
3238  case 214:
3239 #line 845 "parser.y"
3240  { (yyval.identifier) = (yyvsp[0].identifier); }
3241 #line 3242 "parser.tab.c"
3242  break;
3243 
3244  case 215:
3245 #line 846 "parser.y"
3246  { (yyval.identifier) = (yyvsp[0].identifier); }
3247 #line 3248 "parser.tab.c"
3248  break;
3249 
3250  case 216:
3251 #line 847 "parser.y"
3252  { (yyval.identifier) = (yyvsp[0].identifier); }
3253 #line 3254 "parser.tab.c"
3254  break;
3255 
3256  case 217:
3257 #line 848 "parser.y"
3258  { (yyval.identifier) = (yyvsp[0].identifier); }
3259 #line 3260 "parser.tab.c"
3260  break;
3261 
3262  case 218:
3263 #line 849 "parser.y"
3264  { (yyval.identifier) = (yyvsp[0].identifier); }
3265 #line 3266 "parser.tab.c"
3266  break;
3267 
3268  case 219:
3269 #line 850 "parser.y"
3270  { (yyval.identifier) = (yyvsp[0].identifier); }
3271 #line 3272 "parser.tab.c"
3272  break;
3273 
3274  case 220:
3275 #line 851 "parser.y"
3276  { (yyval.identifier) = (yyvsp[0].identifier); }
3277 #line 3278 "parser.tab.c"
3278  break;
3279 
3280  case 221:
3281 #line 852 "parser.y"
3282  { (yyval.identifier) = (yyvsp[0].identifier); }
3283 #line 3284 "parser.tab.c"
3284  break;
3285 
3286  case 222:
3287 #line 853 "parser.y"
3288  { (yyval.identifier) = (yyvsp[0].identifier); }
3289 #line 3290 "parser.tab.c"
3290  break;
3291 
3292  case 223:
3293 #line 854 "parser.y"
3294  { (yyval.identifier) = (yyvsp[0].identifier); }
3295 #line 3296 "parser.tab.c"
3296  break;
3297 
3298  case 224:
3299 #line 855 "parser.y"
3300  { (yyval.identifier) = (yyvsp[0].identifier); }
3301 #line 3302 "parser.tab.c"
3302  break;
3303 
3304  case 225:
3305 #line 856 "parser.y"
3306  { (yyval.identifier) = (yyvsp[0].identifier); }
3307 #line 3308 "parser.tab.c"
3308  break;
3309 
3310  case 226:
3311 #line 857 "parser.y"
3312  { (yyval.identifier) = (yyvsp[0].identifier); }
3313 #line 3314 "parser.tab.c"
3314  break;
3315 
3316  case 227:
3317 #line 858 "parser.y"
3318  { (yyval.identifier) = (yyvsp[0].identifier); }
3319 #line 3320 "parser.tab.c"
3320  break;
3321 
3322  case 228:
3323 #line 859 "parser.y"
3324  { (yyval.identifier) = (yyvsp[0].identifier); }
3325 #line 3326 "parser.tab.c"
3326  break;
3327 
3328  case 229:
3329 #line 860 "parser.y"
3330  { (yyval.identifier) = (yyvsp[0].identifier); }
3331 #line 3332 "parser.tab.c"
3332  break;
3333 
3334  case 230:
3335 #line 861 "parser.y"
3336  { (yyval.identifier) = (yyvsp[0].identifier); }
3337 #line 3338 "parser.tab.c"
3338  break;
3339 
3340  case 231:
3341 #line 862 "parser.y"
3342  { (yyval.identifier) = (yyvsp[0].identifier); }
3343 #line 3344 "parser.tab.c"
3344  break;
3345 
3346  case 232:
3347 #line 863 "parser.y"
3348  { (yyval.identifier) = (yyvsp[0].identifier); }
3349 #line 3350 "parser.tab.c"
3350  break;
3351 
3352  case 233:
3353 #line 864 "parser.y"
3354  { (yyval.identifier) = (yyvsp[0].identifier); }
3355 #line 3356 "parser.tab.c"
3356  break;
3357 
3358  case 234:
3359 #line 865 "parser.y"
3360  { (yyval.identifier) = (yyvsp[0].identifier); }
3361 #line 3362 "parser.tab.c"
3362  break;
3363 
3364  case 235:
3365 #line 866 "parser.y"
3366  { (yyval.identifier) = (yyvsp[0].identifier); }
3367 #line 3368 "parser.tab.c"
3368  break;
3369 
3370  case 236:
3371 #line 867 "parser.y"
3372  { (yyval.identifier) = (yyvsp[0].identifier); }
3373 #line 3374 "parser.tab.c"
3374  break;
3375 
3376  case 237:
3377 #line 868 "parser.y"
3378  { (yyval.identifier) = (yyvsp[0].identifier); }
3379 #line 3380 "parser.tab.c"
3380  break;
3381 
3382  case 238:
3383 #line 872 "parser.y"
3384  { (yyval.literal) = new_null_literal(ctx); }
3385 #line 3386 "parser.tab.c"
3386  break;
3387 
3388  case 239:
3389 #line 873 "parser.y"
3390  { (yyval.literal) = (yyvsp[0].literal); }
3391 #line 3392 "parser.tab.c"
3392  break;
3393 
3394  case 240:
3395 #line 874 "parser.y"
3396  { (yyval.literal) = (yyvsp[0].literal); }
3397 #line 3398 "parser.tab.c"
3398  break;
3399 
3400  case 241:
3401 #line 875 "parser.y"
3402  { (yyval.literal) = new_string_literal(ctx, (yyvsp[0].str)); }
3403 #line 3404 "parser.tab.c"
3404  break;
3405 
3406  case 242:
3407 #line 876 "parser.y"
3408  { (yyval.literal) = parse_regexp(ctx);
3409  if(!(yyval.literal)) YYABORT; }
3410 #line 3411 "parser.tab.c"
3411  break;
3412 
3413  case 243:
3414 #line 878 "parser.y"
3415  { (yyval.literal) = parse_regexp(ctx);
3416  if(!(yyval.literal)) YYABORT; }
3417 #line 3418 "parser.tab.c"
3418  break;
3419 
3420  case 244:
3421 #line 883 "parser.y"
3422  { (yyval.literal) = new_boolean_literal(ctx, VARIANT_TRUE); }
3423 #line 3424 "parser.tab.c"
3424  break;
3425 
3426  case 245:
3427 #line 884 "parser.y"
3428  { (yyval.literal) = new_boolean_literal(ctx, VARIANT_FALSE); }
3429 #line 3430 "parser.tab.c"
3430  break;
3431 
3432  case 246:
3433 #line 885 "parser.y"
3434  { (yyval.literal) = (yyvsp[0].literal); }
3435 #line 3436 "parser.tab.c"
3436  break;
3437 
3438  case 248:
3439 #line 889 "parser.y"
3440  { if(!allow_auto_semicolon(ctx)) {YYABORT;} }
3441 #line 3442 "parser.tab.c"
3442  break;
3443 
3444  case 249:
3445 #line 892 "parser.y"
3446  { (yyval.srcptr) = ctx->ptr; }
3447 #line 3448 "parser.tab.c"
3448  break;
3449 
3450  case 250:
3451 #line 893 "parser.y"
3453 #line 3454 "parser.tab.c"
3454  break;
3455 
3456  case 252:
3457 #line 897 "parser.y"
3459 #line 3460 "parser.tab.c"
3460  break;
3461 
3462  case 254:
3463 #line 901 "parser.y"
3465 #line 3466 "parser.tab.c"
3466  break;
3467 
3468 
3469 #line 3470 "parser.tab.c"
3470 
3471  default: break;
3472  }
3473  /* User semantic actions sometimes alter yychar, and that requires
3474  that yytoken be updated with the new translation. We take the
3475  approach of translating immediately before every use of yytoken.
3476  One alternative is translating here after every semantic action,
3477  but that translation would be missed if the semantic action invokes
3478  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3479  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3480  incorrect destructor might then be invoked immediately. In the
3481  case of YYERROR or YYBACKUP, subsequent parser actions might lead
3482  to an incorrect destructor call or verbose syntax error message
3483  before the lookahead is translated. */
3484  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3485 
3486  YYPOPSTACK (yylen);
3487  yylen = 0;
3488  YY_STACK_PRINT (yyss, yyssp);
3489 
3490  *++yyvsp = yyval;
3491 
3492  /* Now 'shift' the result of the reduction. Determine what state
3493  that goes to, based on the state we popped back to and the rule
3494  number reduced by. */
3495  {
3496  const int yylhs = yyr1[yyn] - YYNTOKENS;
3497  const int yyi = yypgoto[yylhs] + *yyssp;
3498  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
3499  ? yytable[yyi]
3500  : yydefgoto[yylhs]);
3501  }
3502 
3503  goto yynewstate;
3504 
3505 
3506 /*--------------------------------------.
3507 | yyerrlab -- here on detecting error. |
3508 `--------------------------------------*/
3509 yyerrlab:
3510  /* Make sure we have latest lookahead translation. See comments at
3511  user semantic actions for why this is necessary. */
3512  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3513 
3514  /* If not already recovering from an error, report this error. */
3515  if (!yyerrstatus)
3516  {
3517  ++yynerrs;
3518 #if ! YYERROR_VERBOSE
3519  yyerror (ctx, YY_("syntax error"));
3520 #else
3521 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3522  yyssp, yytoken)
3523  {
3524  char const *yymsgp = YY_("syntax error");
3525  int yysyntax_error_status;
3526  yysyntax_error_status = YYSYNTAX_ERROR;
3527  if (yysyntax_error_status == 0)
3528  yymsgp = yymsg;
3529  else if (yysyntax_error_status == 1)
3530  {
3531  if (yymsg != yymsgbuf)
3532  YYSTACK_FREE (yymsg);
3533  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3534  if (!yymsg)
3535  {
3536  yymsg = yymsgbuf;
3537  yymsg_alloc = sizeof yymsgbuf;
3538  yysyntax_error_status = 2;
3539  }
3540  else
3541  {
3542  yysyntax_error_status = YYSYNTAX_ERROR;
3543  yymsgp = yymsg;
3544  }
3545  }
3546  yyerror (ctx, yymsgp);
3547  if (yysyntax_error_status == 2)
3548  goto yyexhaustedlab;
3549  }
3550 # undef YYSYNTAX_ERROR
3551 #endif
3552  }
3553 
3554 
3555 
3556  if (yyerrstatus == 3)
3557  {
3558  /* If just tried and failed to reuse lookahead token after an
3559  error, discard it. */
3560 
3561  if (yychar <= YYEOF)
3562  {
3563  /* Return failure if at end of input. */
3564  if (yychar == YYEOF)
3565  YYABORT;
3566  }
3567  else
3568  {
3569  yydestruct ("Error: discarding",
3570  yytoken, &yylval, ctx);
3571  yychar = YYEMPTY;
3572  }
3573  }
3574 
3575  /* Else will try to reuse lookahead token after shifting the error
3576  token. */
3577  goto yyerrlab1;
3578 
3579 
3580 /*---------------------------------------------------.
3581 | yyerrorlab -- error raised explicitly by YYERROR. |
3582 `---------------------------------------------------*/
3583 yyerrorlab:
3584  /* Pacify compilers when the user code never invokes YYERROR and the
3585  label yyerrorlab therefore never appears in user code. */
3586  if (0)
3587  YYERROR;
3588 
3589  /* Do not reclaim the symbols of the rule whose action triggered
3590  this YYERROR. */
3591  YYPOPSTACK (yylen);
3592  yylen = 0;
3593  YY_STACK_PRINT (yyss, yyssp);
3594  yystate = *yyssp;
3595  goto yyerrlab1;
3596 
3597 
3598 /*-------------------------------------------------------------.
3599 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3600 `-------------------------------------------------------------*/
3601 yyerrlab1:
3602  yyerrstatus = 3; /* Each real token shifted decrements this. */
3603 
3604  for (;;)
3605  {
3606  yyn = yypact[yystate];
3607  if (!yypact_value_is_default (yyn))
3608  {
3609  yyn += YYTERROR;
3610  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3611  {
3612  yyn = yytable[yyn];
3613  if (0 < yyn)
3614  break;
3615  }
3616  }
3617 
3618  /* Pop the current state because it cannot handle the error token. */
3619  if (yyssp == yyss)
3620  YYABORT;
3621 
3622 
3623  yydestruct ("Error: popping",
3624  yystos[yystate], yyvsp, ctx);
3625  YYPOPSTACK (1);
3626  yystate = *yyssp;
3627  YY_STACK_PRINT (yyss, yyssp);
3628  }
3629 
3631  *++yyvsp = yylval;
3633 
3634 
3635  /* Shift the error token. */
3636  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3637 
3638  yystate = yyn;
3639  goto yynewstate;
3640 
3641 
3642 /*-------------------------------------.
3643 | yyacceptlab -- YYACCEPT comes here. |
3644 `-------------------------------------*/
3645 yyacceptlab:
3646  yyresult = 0;
3647  goto yyreturn;
3648 
3649 
3650 /*-----------------------------------.
3651 | yyabortlab -- YYABORT comes here. |
3652 `-----------------------------------*/
3653 yyabortlab:
3654  yyresult = 1;
3655  goto yyreturn;
3656 
3657 
3658 #if !defined yyoverflow || YYERROR_VERBOSE
3659 /*-------------------------------------------------.
3660 | yyexhaustedlab -- memory exhaustion comes here. |
3661 `-------------------------------------------------*/
3662 yyexhaustedlab:
3663  yyerror (ctx, YY_("memory exhausted"));
3664  yyresult = 2;
3665  /* Fall through. */
3666 #endif
3667 
3668 
3669 /*-----------------------------------------------------.
3670 | yyreturn -- parsing is finished, return the result. |
3671 `-----------------------------------------------------*/
3672 yyreturn:
3673  if (yychar != YYEMPTY)
3674  {
3675  /* Make sure we have latest lookahead translation. See comments at
3676  user semantic actions for why this is necessary. */
3677  yytoken = YYTRANSLATE (yychar);
3678  yydestruct ("Cleanup: discarding lookahead",
3679  yytoken, &yylval, ctx);
3680  }
3681  /* Do not reclaim the symbols of the rule whose action triggered
3682  this YYABORT or YYACCEPT. */
3683  YYPOPSTACK (yylen);
3684  YY_STACK_PRINT (yyss, yyssp);
3685  while (yyssp != yyss)
3686  {
3687  yydestruct ("Cleanup: popping",
3688  yystos[*yyssp], yyvsp, ctx);
3689  YYPOPSTACK (1);
3690  }
3691 #ifndef yyoverflow
3692  if (yyss != yyssa)
3693  YYSTACK_FREE (yyss);
3694 #endif
3695 #if YYERROR_VERBOSE
3696  if (yymsg != yymsgbuf)
3697  YYSTACK_FREE (yymsg);
3698 #endif
3699  return yyresult;
3700 }
3701 #line 903 "parser.y"
3702 
3703 
3705 {
3706  return ctx->nl || ctx->ptr == ctx->end || *(ctx->ptr-1) == '}';
3707 }
3708 
3710 {
3711  statement_t *stat;
3712 
3713  stat = parser_alloc(ctx, size ? size : sizeof(*stat));
3714  if(!stat)
3715  return NULL;
3716 
3717  stat->type = type;
3718  stat->next = NULL;
3719 
3720  return stat;
3721 }
3722 
3724 {
3725  literal_t *ret = parser_alloc(ctx, sizeof(literal_t));
3726 
3727  ret->type = LT_STRING;
3728  ret->u.str = str;
3729 
3730  return ret;
3731 }
3732 
3734 {
3735  literal_t *ret = parser_alloc(ctx, sizeof(literal_t));
3736 
3737  ret->type = LT_NULL;
3738 
3739  return ret;
3740 }
3741 
3744 {
3746 
3747  ret->type = type;
3748  ret->name = name;
3749  ret->value = value;
3750  ret->next = NULL;
3751 
3752  return ret;
3753 }
3754 
3756 {
3758  ret->head = ret->tail = prop;
3759  return ret;
3760 }
3761 
3763 {
3764  list->tail = list->tail->next = prop;
3765  return list;
3766 }
3767 
3769 {
3771 
3772  ret->elision = elision;
3773  ret->expr = expr;
3774  ret->next = NULL;
3775 
3776  return ret;
3777 }
3778 
3780 {
3782 
3783  ret->head = ret->tail = new_array_element(ctx, elision, expr);
3784 
3785  return ret;
3786 }
3787 
3789 {
3790  list->tail = list->tail->next = new_array_element(ctx, elision, expr);
3791 
3792  return list;
3793 }
3794 
3796 {
3797  argument_t *ret = parser_alloc(ctx, sizeof(argument_t));
3798 
3799  ret->expr = expr;
3800  ret->next = NULL;
3801 
3802  return ret;
3803 }
3804 
3806 {
3808 
3809  ret->head = ret->tail = new_argument(ctx, expr);
3810 
3811  return ret;
3812 }
3813 
3815 {
3816  list->tail = list->tail->next = new_argument(ctx, expr);
3817 
3818  return list;
3819 }
3820 
3821 static catch_block_t *new_catch_block(parser_ctx_t *ctx, const WCHAR *identifier, statement_t *statement)
3822 {
3823  catch_block_t *ret = parser_alloc(ctx, sizeof(catch_block_t));
3824 
3825  ret->identifier = identifier;
3826  ret->statement = statement;
3827 
3828  return ret;
3829 }
3830 
3832 {
3834 
3835  ret->expr = expr;
3836  ret->stat = stat_list ? stat_list->head : NULL;
3837  ret->next = NULL;
3838 
3839  return ret;
3840 }
3841 
3843 {
3844  case_list_t *ret = parser_alloc_tmp(ctx, sizeof(case_list_t));
3845 
3846  ret->head = ret->tail = case_clausule;
3847 
3848  return ret;
3849 }
3850 
3852 {
3853  list->tail = list->tail->next = case_clausule;
3854 
3855  return list;
3856 }
3857 
3859  case_clausule_t *default_clausule, case_list_t *case_list2)
3860 {
3861  case_clausule_t *ret = NULL, *iter = NULL, *iter2;
3862  statement_t *stat = NULL;
3863 
3864  if(case_list1) {
3865  ret = case_list1->head;
3866  iter = case_list1->tail;
3867  }
3868 
3869  if(default_clausule) {
3870  if(ret)
3871  iter = iter->next = default_clausule;
3872  else
3873  ret = iter = default_clausule;
3874  }
3875 
3876  if(case_list2) {
3877  if(ret)
3878  iter->next = case_list2->head;
3879  else
3880  ret = case_list2->head;
3881  }
3882 
3883  if(!ret)
3884  return NULL;
3885 
3886  for(iter = ret; iter; iter = iter->next) {
3887  for(iter2 = iter; iter2 && !iter2->stat; iter2 = iter2->next);
3888  if(!iter2)
3889  break;
3890 
3891  while(iter != iter2) {
3892  iter->stat = iter2->stat;
3893  iter = iter->next;
3894  }
3895 
3896  if(stat) {
3897  while(stat->next)
3898  stat = stat->next;
3899  stat->next = iter->stat;
3900  }else {
3901  stat = iter->stat;
3902  }
3903  }
3904 
3905  return ret;
3906 }
3907 
3909 {
3911 
3912  ret = new_statement(ctx, STAT_BLOCK, sizeof(*ret));
3913  if(!ret)
3914  return NULL;
3915 
3916  ret->stat_list = list ? list->head : NULL;
3917 
3918  return &ret->stat;
3919 }
3920 
3922 {
3924 
3925  ret->identifier = identifier;
3926  ret->expr = expr;
3927  ret->next = NULL;
3928  ret->global_next = NULL;
3929 
3930  return ret;
3931 }
3932 
3934 {
3936 
3937  ret->head = ret->tail = decl;
3938 
3939  return ret;
3940 }
3941 
3943 {
3944  list->tail = list->tail->next = decl;
3945 
3946  return list;
3947 }
3948 
3950 {
3952 
3953  ret = new_statement(ctx, STAT_VAR, sizeof(*ret));
3954  if(!ret)
3955  return NULL;
3956 
3957  ret->variable_list = variable_list->head;
3958 
3959  return &ret->stat;
3960 }
3961 
3963 {
3965 
3966  ret = new_statement(ctx, STAT_EXPR, sizeof(*ret));
3967  if(!ret)
3968  return NULL;
3969 
3970  ret->expr = expr;
3971 
3972  return &ret->stat;
3973 }
3974 
3976 {
3978 
3979  ret = new_statement(ctx, STAT_IF, sizeof(*ret));
3980  if(!ret)
3981  return NULL;
3982 
3983  ret->expr = expr;
3984  ret->if_stat = if_stat;
3985  ret->else_stat = else_stat;
3986 
3987  return &ret->stat;
3988 }
3989 
3991 {
3993 
3994  ret = new_statement(ctx, STAT_WHILE, sizeof(*ret));
3995  if(!ret)
3996  return NULL;
3997 
3998  ret->do_while = dowhile;
3999  ret->expr = expr;
4000  ret->statement = stat;
4001 
4002  return &ret->stat;
4003 }
4004 
4005 static statement_t *new_for_statement(parser_ctx_t *ctx, variable_list_t *variable_list, expression_t *begin_expr,
4006  expression_t *expr, expression_t *end_expr, statement_t *statement)
4007 {
4009 
4010  ret = new_statement(ctx, STAT_FOR, sizeof(*ret));
4011  if(!ret)
4012  return NULL;
4013 
4014  ret->variable_list = variable_list ? variable_list->head : NULL;
4015  ret->begin_expr = begin_expr;
4016  ret->expr = expr;
4017  ret->end_expr = end_expr;
4018  ret->statement = statement;
4019 
4020  return &ret->stat;
4021 }
4022 
4024  expression_t *in_expr, statement_t *statement)
4025 {
4027 
4028  ret = new_statement(ctx, STAT_FORIN, sizeof(*ret));
4029  if(!ret)
4030  return NULL;
4031 
4032  ret->variable = variable;
4033  ret->expr = expr;
4034  ret->in_expr = in_expr;
4035  ret->statement = statement;
4036 
4037  return &ret->stat;
4038 }
4039 
4040 static statement_t *new_continue_statement(parser_ctx_t *ctx, const WCHAR *identifier)
4041 {
4043 
4044  ret = new_statement(ctx, STAT_CONTINUE, sizeof(*ret));
4045  if(!ret)
4046  return NULL;
4047 
4048  ret->identifier = identifier;
4049 
4050  return &ret->stat;
4051 }
4052 
4053 static statement_t *new_break_statement(parser_ctx_t *ctx, const WCHAR *identifier)
4054 {
4056 
4057  ret = new_statement(ctx, STAT_BREAK, sizeof(*ret));
4058  if(!ret)
4059  return NULL;
4060 
4061  ret->identifier = identifier;
4062 
4063  return &ret->stat;
4064 }
4065 
4067 {
4069 
4070  ret = new_statement(ctx, STAT_RETURN, sizeof(*ret));
4071  if(!ret)
4072  return NULL;
4073 
4074  ret->expr = expr;
4075 
4076  return &ret->stat;
4077 }
4078 
4080 {
4082 
4083  ret = new_statement(ctx, STAT_WITH, sizeof(*ret));
4084  if(!ret)
4085  return NULL;
4086 
4087  ret->expr = expr;
4088  ret->statement = statement;
4089 
4090  return &ret->stat;
4091 }
4092 
4093 static statement_t *new_labelled_statement(parser_ctx_t *ctx, const WCHAR *identifier, statement_t *statement)
4094 {
4096 
4097  ret = new_statement(ctx, STAT_LABEL, sizeof(*ret));
4098  if(!ret)
4099  return NULL;
4100 
4101  ret->identifier = identifier;
4102  ret->statement = statement;
4103 
4104  return &ret->stat;
4105 }
4106 
4108 {
4110 
4111  ret = new_statement(ctx, STAT_SWITCH, sizeof(*ret));
4112  if(!ret)
4113  return NULL;
4114 
4115  ret->expr = expr;
4116  ret->case_list = case_list;
4117 
4118  return &ret->stat;
4119 }
4120 
4122 {
4124 
4125  ret = new_statement(ctx, STAT_THROW, sizeof(*ret));
4126  if(!ret)
4127  return NULL;
4128 
4129  ret->expr = expr;
4130 
4131  return &ret->stat;
4132 }
4133 
4135  catch_block_t *catch_block, statement_t *finally_statement)
4136 {
4138 
4139  ret = new_statement(ctx, STAT_TRY, sizeof(*ret));
4140  if(!ret)
4141  return NULL;
4142 
4143  ret->try_statement = try_statement;
4144  ret->catch_block = catch_block;
4145  ret->finally_statement = finally_statement;
4146 
4147  return &ret->stat;
4148 }
4149 
4150 static parameter_t *new_parameter(parser_ctx_t *ctx, const WCHAR *identifier)
4151 {
4152  parameter_t *ret = parser_alloc(ctx, sizeof(parameter_t));
4153 
4154  ret->identifier = identifier;
4155  ret->next = NULL;
4156 
4157  return ret;
4158 }
4159 
4160 static parameter_list_t *new_parameter_list(parser_ctx_t *ctx, const WCHAR *identifier)
4161 {
4163 
4164  ret->head = ret->tail = new_parameter(ctx, identifier);
4165 
4166  return ret;
4167 }
4168 
4170 {
4171  list->tail = list->tail->next = new_parameter(ctx, identifier);
4172 
4173  return list;
4174 }
4175 
4176 static expression_t *new_function_expression(parser_ctx_t *ctx, const WCHAR *identifier, parameter_list_t *parameter_list,
4177  source_elements_t *source_elements, const WCHAR *event_target, const WCHAR *src_str, DWORD src_len)
4178 {
4180 
4181  ret->identifier = identifier;
4182  ret->parameter_list = parameter_list ? parameter_list->head : NULL;
4183  ret->source_elements = source_elements;
4184  ret->event_target = event_target;
4185  ret->src_str = src_str;
4186  ret->src_len = src_len;
4187  ret->next = NULL;
4188 
4189  return &ret->expr;
4190 }
4191 
4193 {
4194  expression_t *ret = parser_alloc(ctx, size ? size : sizeof(*ret));
4195 
4196  ret->type = type;
4197 
4198  return ret;
4199 }
4200 
4202  expression_t *expression1, expression_t *expression2)
4203 {
4204  binary_expression_t *ret = new_expression(ctx, type, sizeof(*ret));
4205 
4206  ret->expression1 = expression1;
4207  ret->expression2 = expression2;
4208 
4209  return &ret->expr;
4210 }
4211 
4213 {
4214  unary_expression_t *ret = new_expression(ctx, type, sizeof(*ret));
4215 
4216  ret->expression = expression;
4217 
4218  return &ret->expr;
4219 }
4220 
4222  expression_t *true_expression, expression_t *false_expression)
4223 {
4225 
4226  ret->expression = expression;
4227  ret->true_expression = true_expression;
4228  ret->false_expression = false_expression;
4229 
4230  return &ret->expr;
4231 }
4232 
4233 static expression_t *new_member_expression(parser_ctx_t *ctx, expression_t *expression, const WCHAR *identifier)
4234 {
4236 
4237  ret->expression = expression;
4238  ret->identifier = identifier;
4239 
4240  return &ret->expr;
4241 }
4242 
4244 {
4245  call_expression_t *ret = new_expression(ctx, EXPR_NEW, sizeof(*ret));
4246 
4247  ret->expression = expression;
4248  ret->argument_list = argument_list ? argument_list->head : NULL;
4249 
4250  return &ret->expr;
4251 }
4252 
4254 {
4255  call_expression_t *ret = new_expression(ctx, EXPR_CALL, sizeof(*ret));
4256 
4257  ret->expression = expression;
4258  ret->argument_list = argument_list ? argument_list->head : NULL;
4259 
4260  return &ret->expr;
4261 }
4262 
4263 static int parser_error(parser_ctx_t *ctx, const char *str)
4264 {
4265  return 0;
4266 }
4267 
4268 static void set_error(parser_ctx_t *ctx, UINT error)
4269 {
4270  ctx->hres = error;
4271 }
4272 
4274 {
4275  if(obj || *(ctx->ptr-1)==next) return TRUE;
4276 
4277  set_error(ctx, JS_E_SYNTAX);
4278  return FALSE;
4279 }
4280 
4281 
4283 {
4285 
4286  ret->identifier = identifier;
4287 
4288  return &ret->expr;
4289 }
4290 
4292 {
4294 
4295  ret->element_list = element_list ? element_list->head : NULL;
4296  ret->length = length;
4297 
4298  return &ret->expr;
4299 }
4300 
4302 {
4304 
4305  ret->property_list = property_list ? property_list->head : NULL;
4306 
4307  return &ret->expr;
4308 }
4309 
4311 {
4313 
4314  ret->literal = literal;
4315 
4316  return &ret->expr;
4317 }
4318 
4320 {
4322 
4323  memset(ret, 0, sizeof(*ret));
4324 
4325  return ret;
4326 }
4327 
4329 {
4330  if(source_elements->statement_tail)
4331  source_elements->statement_tail = source_elements->statement_tail->next = statement;
4332  else
4333  source_elements->statement = source_elements->statement_tail = statement;
4334 
4335  return source_elements;
4336 }
4337 
4339 {
4341 
4342  ret->head = ret->tail = statement;
4343 
4344  return ret;
4345 }
4346 
4348 {
4349  list->tail = list->tail->next = statement;
4350 
4351  return list;
4352 }
4353 
4355 {
4356  ctx->source = source;
4357  if(!ctx->lexer_error)
4358  ctx->hres = S_OK;
4359 }
4360 
4362 {
4363  script_release(ctx->script);
4364  heap_pool_free(&ctx->heap);
4365  heap_free(ctx);
4366 }
4367 
4368 HRESULT script_parse(script_ctx_t *ctx, struct _compiler_ctx_t *compiler, const WCHAR *code, const WCHAR *delimiter, BOOL from_eval,
4369  parser_ctx_t **ret)
4370 {
4371  parser_ctx_t *parser_ctx;
4372  heap_pool_t *mark;
4373  HRESULT hres;
4374 
4375  const WCHAR html_tagW[] = {'<','/','s','c','r','i','p','t','>',0};
4376 
4377  parser_ctx = heap_alloc_zero(sizeof(parser_ctx_t));
4378  if(!parser_ctx)
4379  return E_OUTOFMEMORY;
4380 
4381  parser_ctx->hres = JS_E_SYNTAX;
4382  parser_ctx->is_html = delimiter && !wcsicmp(delimiter, html_tagW);
4383 
4384  parser_ctx->begin = parser_ctx->ptr = code;
4385  parser_ctx->end = parser_ctx->begin + lstrlenW(parser_ctx->begin);
4386 
4387  script_addref(ctx);
4388  parser_ctx->script = ctx;
4389 
4390  mark = heap_pool_mark(&ctx->tmp_heap);
4391  heap_pool_init(&parser_ctx->heap);
4392 
4393  parser_ctx->compiler = compiler;
4394  parser_parse(parser_ctx);
4395  parser_ctx->compiler = NULL;
4396 
4397  heap_pool_clear(mark);
4398  hres = parser_ctx->hres;
4399  if(FAILED(hres)) {
4400  WARN("parser failed around %s\n",
4401  debugstr_w(parser_ctx->begin+20 > parser_ctx->ptr ? parser_ctx->begin : parser_ctx->ptr-20));
4402  parser_release(parser_ctx);
4403  return hres;
4404  }
4405 
4406  *ret = parser_ctx;
4407  return S_OK;
4408 }
#define YYSIZE_T
Definition: parser.tab.c:364
property_definition_t * property_definition
Definition: parser.tab.c:306
literal_t * literal
Definition: parser.tab.c:296
static case_list_t * case_list_add(parser_ctx_t *, case_list_t *, case_clausule_t *)
Definition: parser.tab.c:3851
property_definition_type_t
Definition: engine.h:134
array_element_t * tail
Definition: parser.tab.c:112
static statement_t * new_labelled_statement(parser_ctx_t *, const WCHAR *, statement_t *)
Definition: parser.tab.c:4093
static statement_t * new_continue_statement(parser_ctx_t *, const WCHAR *)
Definition: parser.tab.c:4040
#define yyparse
Definition: parser.tab.c:67
static parameter_list_t * parameter_list_add(parser_ctx_t *, parameter_list_t *, const WCHAR *)
Definition: parser.tab.c:4169
expression_type_t
Definition: parser.h:216
struct _property_list_t property_list_t
static expression_t * new_unary_expression(parser_ctx_t *, expression_type_t, expression_t *)
Definition: parser.tab.c:4212
property_definition_t * tail
Definition: parser.tab.c:102
#define TRUE
Definition: types.h:120
static variable_list_t * new_variable_list(parser_ctx_t *, variable_declaration_t *)
Definition: parser.tab.c:3933
static int parser_error(parser_ctx_t *, const char *)
Definition: parser.tab.c:4263
#define YYSTACK_BYTES(N)
Definition: parser.tab.c:515
LOCAL int expr(arg_t *ap, int *altp)
Definition: match.c:512
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_ctx_t *ctx)
Definition: parser.tab.c:1682
#define yynerrs
Definition: parser.tab.c:71
#define error(str)
Definition: mkdosfs.c:1605
static argument_list_t * argument_list_add(parser_ctx_t *, argument_list_t *, expression_t *)
Definition: parser.tab.c:3814
void * malloc(YYSIZE_T)
#define YYEMPTY
Definition: parser.tab.c:1269
static expression_t * new_prop_and_value_expression(parser_ctx_t *, property_list_t *)
Definition: parser.tab.c:4301
Definition: jsstr.h:39
static const yytype_int16 yypact[]
Definition: parser.tab.c:728
YYLTYPE yylloc
Definition: hlsl.tab.c:2413
#define yyerror
Definition: parser.tab.c:69
#define YYMAXDEPTH
Definition: parser.tab.c:1446
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: parser.tab.c:526
static statement_t * new_break_statement(parser_ctx_t *, const WCHAR *)
Definition: parser.tab.c:4053
static statement_t * new_throw_statement(parser_ctx_t *, expression_t *)
Definition: parser.tab.c:4121
#define WARN(fmt,...)
Definition: debug.h:111
static void * new_expression(parser_ctx_t *ctx, expression_type_t, size_t)
Definition: parser.tab.c:4192
#define yylex
Definition: parser.tab.c:68
static const char *const yytname[]
Definition: parser.tab.c:834
statement_t * statement
Definition: parser.h:287
static statement_list_t * new_statement_list(parser_ctx_t *, statement_t *)
Definition: parser.tab.c:4338
statement_t * statement_tail
Definition: parser.h:288
YYSTYPE yylval
Definition: parser.tab.c:2356
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
struct _parameter_list_t * parameter_list
Definition: parser.tab.c:304
#define JS_E_MISSING_RBRACKET
Definition: jscript.h:539
void parser_release(parser_ctx_t *ctx)
Definition: parser.tab.c:4361
static char * yystpcpy(char *yydest, const char *yysrc)
Definition: parser.tab.c:2135
static const yytype_uint8 yyr2[]
Definition: parser.tab.c:1236
literal_t * new_boolean_literal(parser_ctx_t *ctx, BOOL bval)
Definition: lex.c:387
void free(void *)
Definition: cabinet.c:147
static void * new_statement(parser_ctx_t *, statement_type_t, size_t)
Definition: parser.tab.c:3709
#define YYSYNTAX_ERROR
static property_definition_t * new_property_definition(parser_ctx_t *ctx, property_definition_type_t, literal_t *name, expression_t *value)
Definition: parser.tab.c:3742
short yytype_int16
static argument_t * new_argument(parser_ctx_t *ctx, expression_t *expr)
Definition: parser.tab.c:3795
static void append(struct dump_context *dc, const void *data, unsigned size)
Definition: minidump.c:380
static expression_t * new_call_expression(parser_ctx_t *, expression_t *, argument_list_t *)
Definition: parser.tab.c:4253
source_elements_t * source_elements
Definition: parser.tab.c:307
#define yypact_value_is_default(Yystate)
Definition: parser.tab.c:718
static literal_t * new_string_literal(parser_ctx_t *, jsstr_t *)
Definition: parser.tab.c:3723
static case_clausule_t * new_case_clausule(parser_ctx_t *, expression_t *, statement_list_t *)
Definition: parser.tab.c:3831
#define lstrlenW
Definition: compat.h:415
static YYSIZE_T yystrlen(const char *yystr)
Definition: parser.tab.c:2118
static const yytype_int16 yycheck[]
Definition: parser.tab.c:1008
static source_elements_t * new_source_elements(parser_ctx_t *)
Definition: parser.tab.c:4319
static statement_t * new_with_statement(parser_ctx_t *, expression_t *, statement_t *)
Definition: parser.tab.c:4079
Definition: query.h:86
#define yytable_value_is_error(Yytable_value)
Definition: parser.tab.c:723
static const yytype_int16 yypgoto[]
Definition: parser.tab.c:832
#define YYSTACK_ALLOC
Definition: parser.tab.c:470
HRESULT script_parse(script_ctx_t *ctx, struct _compiler_ctx_t *compiler, const WCHAR *code, const WCHAR *delimiter, BOOL from_eval, parser_ctx_t **ret)
Definition: parser.tab.c:4368
statement_t * next
Definition: parser.h:125
static statement_list_t * statement_list_add(statement_list_t *, statement_t *)
Definition: parser.tab.c:4347
static expression_t * new_array_literal_expression(parser_ctx_t *, element_list_t *, int)
Definition: parser.tab.c:4291
Definition: parser.h:76
#define YYTERROR
Definition: parser.tab.c:1297
static expression_t * new_conditional_expression(parser_ctx_t *, expression_t *, expression_t *, expression_t *)
Definition: parser.tab.c:4221
case_clausule_t * head
Definition: parser.tab.c:127
case_clausule_t * case_clausule
Definition: parser.tab.c:298
static const yytype_int16 yytable[]
Definition: parser.tab.c:864
#define YYERROR
Definition: parser.tab.c:1274
static catch_block_t * new_catch_block(parser_ctx_t *, const WCHAR *, statement_t *)
Definition: parser.tab.c:3821
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
int parser_parse(parser_ctx_t *ctx)
static element_list_t * new_element_list(parser_ctx_t *, int, expression_t *)
Definition: parser.tab.c:3779
jsstr_t * str
Definition: parser.tab.c:295
static parameter_t * new_parameter(parser_ctx_t *ctx, const WCHAR *identifier)
Definition: parser.tab.c:4150
static BOOL explicit_error(parser_ctx_t *, void *, WCHAR)
Definition: parser.tab.c:4273
#define YY_STACK_PRINT(Bottom, Top)
Definition: parser.tab.c:1428
unsigned int BOOL
Definition: ntddk_ex.h:94
catch_block_t * catch_block
Definition: parser.tab.c:300
static property_list_t * new_property_list(parser_ctx_t *, property_definition_t *)
Definition: parser.tab.c:3755
#define debugstr_w
Definition: kernel32.h:32
static const yytype_uint8 yystos[]
Definition: parser.tab.c:1154
statement_t * head
Definition: parser.tab.c:165
parameter_t * tail
Definition: parser.tab.c:174
#define YY_(Msgid)
Definition: parser.tab.c:380
struct _element_list_t * element_list
Definition: parser.tab.c:301
#define YYINITDEPTH
Definition: parser.tab.c:1435
WINE_DEFAULT_DEBUG_CHANNEL(jscript)
parameter_t * head
Definition: parser.tab.c:173
const WCHAR * str
const WCHAR * ptr
Definition: parse.h:261
static case_list_t * new_case_list(parser_ctx_t *, case_clausule_t *)
Definition: parser.tab.c:3842
smooth NULL
Definition: ftsmooth.c:416
const char * delimiter
Definition: string.c:1566
property_definition_t * head
Definition: parser.tab.c:101
struct _case_clausule_t * next
Definition: parser.h:195
unsigned short yytype_uint16
Definition: parser.tab.c:348
void script_release(script_ctx_t *ctx)
Definition: jscript.c:67
#define YYABORT
Definition: parser.tab.c:1273
#define JS_E_MISSING_LBRACKET
Definition: jscript.h:538
#define YYUSE(E)
Definition: parser.tab.c:404
literal_t * parse_regexp(parser_ctx_t *ctx)
Definition: lex.c:1115
case_clausule_t * tail
Definition: parser.tab.c:128
static literal_t * new_null_literal(parser_ctx_t *)
Definition: parser.tab.c:3733
void * parser_alloc(parser_ctx_t *ctx, size_t size)
Definition: parser.tab.c:3914
static element_list_t * element_list_add(parser_ctx_t *, element_list_t *, int, expression_t *)
Definition: parser.tab.c:3788
static parameter_list_t * new_parameter_list(parser_ctx_t *, const WCHAR *)
Definition: parser.tab.c:4160
static argument_list_t * new_argument_list(parser_ctx_t *, expression_t *)
Definition: parser.tab.c:3805
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: parser.tab.c:422
static array_element_t * new_array_element(parser_ctx_t *ctx, int elision, expression_t *expr)
Definition: parser.tab.c:3768
#define YY_INITIAL_VALUE(Value)
Definition: parser.tab.c:418
static statement_t * new_try_statement(parser_ctx_t *, statement_t *, catch_block_t *, statement_t *)
Definition: parser.tab.c:4134
static expression_t * new_member_expression(parser_ctx_t *, expression_t *, const WCHAR *)
Definition: parser.tab.c:4233
variable_declaration_t * tail
Definition: parser.tab.c:139
yytype_int16 yyss_alloc
static expression_t * new_identifier_expression(parser_ctx_t *, const WCHAR *)
Definition: parser.tab.c:4282
struct _case_list_t * case_list
Definition: parser.tab.c:299
GLenum GLenum variable
Definition: glext.h:9031
heap_pool_t heap
Definition: parse.h:276
signed char yytype_int8
Definition: parser.tab.c:342
static const yytype_uint8 yydefact[]
Definition: parser.tab.c:781
yytokentype
#define YYPOPSTACK(N)
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
struct _case_list_t case_list_t
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned short yytype_uint16
statement_t * statement
Definition: parser.tab.c:308
LONG HRESULT
Definition: typedefs.h:77
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
YYSTYPE yyvs_alloc
#define yydebug
Definition: parser.tab.c:70
static case_clausule_t * new_case_block(parser_ctx_t *, case_list_t *, case_clausule_t *, case_list_t *)
Definition: parser.tab.c:3858
#define YYSTACK_ALLOC_MAXIMUM
Definition: parser.tab.c:473
struct list * next
Definition: list.h:38
unsigned char yytype_uint8
Definition: parser.tab.c:336
unsigned long DWORD
Definition: ntddk_ex.h:95
static const yytype_uint8 yytranslate[]
Definition: parser.tab.c:583
static source_elements_t * source_elements_add_statement(source_elements_t *, statement_t *)
Definition: parser.tab.c:4328
struct _variable_list_t * variable_list
Definition: parser.tab.c:310
static void program_parsed(parser_ctx_t *, source_elements_t *)
Definition: parser.tab.c:4354
struct _property_list_t * property_list
Definition: parser.tab.c:305
statement_type_t
Definition: parser.h:104
#define SCRIPTLANGUAGEVERSION_ES5
Definition: jscript.h:52
#define JS_E_MISSING_SEMICOLON
Definition: jscript.h:537
struct _argument_list_t argument_list_t
#define YYNTOKENS
Definition: parser.tab.c:565
int ret
const WCHAR * identifier
Definition: parser.tab.c:303
static void * parser_alloc_tmp(parser_ctx_t *ctx, DWORD size)
Definition: parser.h:63
static variable_list_t * variable_list_add(parser_ctx_t *, variable_list_t *, variable_declaration_t *)
Definition: parser.tab.c:3942
Definition: stat.h:55
int parser_debug
Definition: widl.c:111
jsstr_t * compiler_alloc_string_len(compiler_ctx_t *ctx, const WCHAR *str, unsigned len)
Definition: compile.c:133
static statement_t * new_expression_statement(parser_ctx_t *, expression_t *)
Definition: parser.tab.c:3962
Definition: _list.h:228
static statement_t * new_switch_statement(parser_ctx_t *, expression_t *, case_clausule_t *)
Definition: parser.tab.c:4107
const WCHAR * end
Definition: parse.h:262
#define YYNSTATES
Definition: parser.tab.c:571
heap_pool_t tmp_heap
Definition: jscript.h:427
#define YY_ASSERT(E)
Definition: parser.tab.c:429
struct _element_list_t element_list_t
int code
Definition: i386-dis.c:3591
GLsizei const GLfloat * value
Definition: glext.h:6069
void heap_pool_init(heap_pool_t *) DECLSPEC_HIDDEN
Definition: jsutils.c:71
#define wcsicmp
Definition: string.h:1152
statement_t * tail
Definition: parser.tab.c:166
static statement_t * new_var_statement(parser_ctx_t *, variable_list_t *)
Definition: parser.tab.c:3949
static BOOL allow_auto_semicolon(parser_ctx_t *)
Definition: parser.tab.c:3704
#define YY_NULLPTR
Definition: parser.tab.c:208
static expression_t * new_new_expression(parser_ctx_t *, expression_t *, argument_list_t *)
Definition: parser.tab.c:4243
static expression_t * new_function_expression(parser_ctx_t *, const WCHAR *, parameter_list_t *, source_elements_t *, const WCHAR *, const WCHAR *, DWORD)
Definition: parser.tab.c:4176
const WCHAR * srcptr
Definition: parser.tab.c:294
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
Definition: stat.h:345
static property_list_t * property_list_add(parser_ctx_t *, property_list_t *, property_definition_t *)
Definition: parser.tab.c:3762
#define S_OK
Definition: intsafe.h:59
struct _statement_list_t statement_list_t
static statement_t * new_block_statement(parser_ctx_t *, statement_list_t *)
Definition: parser.tab.c:3908
static unsigned __int64 next
Definition: rand_nt.c:6
static expression_t * new_literal_expression(parser_ctx_t *, literal_t *)
Definition: parser.tab.c:4310
int yychar
Definition: parser.tab.c:2353
static const yytype_int16 yydefgoto[]
Definition: parser.tab.c:847
static statement_t * new_while_statement(parser_ctx_t *, BOOL, expression_t *, statement_t *)
Definition: parser.tab.c:3990
GLsizei GLsizei GLchar * source
Definition: glext.h:6048
variable_declaration_t * variable_declaration
Definition: parser.tab.c:311
#define YYLAST
Definition: parser.tab.c:562
struct _variable_list_t variable_list_t
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: parser.tab.c:2205
argument_t * head
Definition: parser.tab.c:119
#define list
Definition: rosglue.h:35
unsigned int UINT
Definition: ndis.h:50
static statement_t * new_if_statement(parser_ctx_t *, expression_t *, statement_t *, statement_t *)
Definition: parser.tab.c:3975
#define YYTRANSLATE(YYX)
Definition: parser.tab.c:578
variable_declaration_t * head
Definition: parser.tab.c:138
static void script_addref(script_ctx_t *ctx)
Definition: jscript.h:465
expression_t * expr
Definition: parser.tab.c:302
#define YYFINAL
Definition: parser.tab.c:560
statement_t * head
Definition: parser.tab.c:93
short yytype_int16
Definition: parser.tab.c:354
void heap_pool_free(heap_pool_t *) DECLSPEC_HIDDEN
Definition: jsutils.c:169
struct _statement_list_t * statement_list
Definition: parser.tab.c:309
static statement_t * new_forin_statement(parser_ctx_t *, variable_declaration_t *, expression_t *, expression_t *, statement_t *)
Definition: parser.tab.c:4023
#define JS_E_SYNTAX
Definition: jscript.h:536
Definition: name.c:38
static statement_t * new_return_statement(parser_ctx_t *, expression_t *)
Definition: parser.tab.c:4066
#define YYDPRINTF(Args)
Definition: parser.tab.c:1426
#define YYSTACK_FREE
Definition: parser.tab.c:471
int ival
Definition: parser.tab.c:293
FILE * stderr
array_element_t * head
Definition: parser.tab.c:111
#define YYCASE_(N, S)
#define YYACCEPT
Definition: parser.tab.c:1272
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: parser.tab.c:1427
struct _parameter_list_t parameter_list_t
statement_t * tail
Definition: parser.tab.c:94
HRESULT hres
Definition: parse.h:267
BOOL is_html
Definition: parse.h:266
heap_pool_t * heap_pool_mark(heap_pool_t *) DECLSPEC_HIDDEN
Definition: jsutils.c:182
struct _argument_list_t * argument_list
Definition: parser.tab.c:297
static const yytype_uint8 yyr1[]
Definition: parser.tab.c:1205
static statement_t * new_for_statement(parser_ctx_t *, variable_list_t *, expression_t *, expression_t *, expression_t *, statement_t *)
Definition: parser.tab.c:4005
#define memset(x, y, z)
Definition: compat.h:39
static variable_declaration_t * new_variable_declaration(parser_ctx_t *, const WCHAR *, expression_t *)
Definition: parser.tab.c:3921
argument_t * tail
Definition: parser.tab.c:120
#define YY_REDUCE_PRINT(Rule)
Definition: parser.tab.c:1429
static expression_t * new_binary_expression(parser_ctx_t *, expression_type_t, expression_t *, expression_t *)
Definition: parser.tab.c:4201
static void set_error(parser_ctx_t *, UINT)
Definition: parser.tab.c:4268
#define YYEOF
Definition: parser.tab.c:1270
unsigned char yytype_uint8
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: parser.tab.c:421
static YYSIZE_T yytnamerr(char *yyres, const char *yystr)
Definition: parser.tab.c:2157
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
void heap_pool_clear(heap_pool_t *) DECLSPEC_HIDDEN
Definition: jsutils.c:146
GLuint const GLchar * name
Definition: glext.h:6031