Kannel: Open Source WAP and SMS gateway  svn-r5262
wsgram.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.5. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.5"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 1
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 
62 /* Substitute the variable and function names. */
63 #define yyparse ws_yy_parse
64 #define yylex ws_yy_lex
65 #define yyerror ws_yy_error
66 #define yydebug ws_yy_debug
67 #define yynerrs ws_yy_nerrs
68 
69 
70 /* Copy the first part of user declarations. */
71 #line 1 "wmlscript/wsgram.y" /* yacc.c:339 */
72 
73 /*
74  *
75  * wsgram.y
76  *
77  * Author: Markku Rossi <mtr@iki.fi>
78  *
79  * Copyright (c) 1999-2000 WAPIT OY LTD.
80  * All rights reserved.
81  *
82  * Bison grammar for the WMLScript compiler.
83  *
84  */
85 
86 #include "wmlscript/wsint.h"
87 
88 
89 #line 90 "y.tab.c" /* yacc.c:339 */
90 
91 # ifndef YY_NULLPTR
92 # if defined __cplusplus && 201103L <= __cplusplus
93 # define YY_NULLPTR nullptr
94 # else
95 # define YY_NULLPTR 0
96 # endif
97 # endif
98 
99 /* Enabling verbose error messages. */
100 #ifdef YYERROR_VERBOSE
101 # undef YYERROR_VERBOSE
102 # define YYERROR_VERBOSE 1
103 #else
104 # define YYERROR_VERBOSE 0
105 #endif
106 
107 /* In a future release of Bison, this section will be replaced
108  by #include "y.tab.h". */
109 #ifndef YY_WS_YY_Y_TAB_H_INCLUDED
110 # define YY_WS_YY_Y_TAB_H_INCLUDED
111 /* Debug traces. */
112 #ifndef YYDEBUG
113 # define YYDEBUG 0
114 #endif
115 #if YYDEBUG
116 extern int ws_yy_debug;
117 #endif
118 
119 /* Token type. */
120 #ifndef YYTOKENTYPE
121 # define YYTOKENTYPE
123  {
124  tINVALID = 258,
125  tTRUE = 259,
126  tFALSE = 260,
127  tINTEGER = 261,
128  tFLOAT = 262,
129  tSTRING = 263,
130  tIDENTIFIER = 264,
131  tACCESS = 265,
132  tAGENT = 266,
133  tBREAK = 267,
134  tCONTINUE = 268,
135  tIDIV = 269,
136  tIDIVA = 270,
137  tDOMAIN = 271,
138  tELSE = 272,
139  tEQUIV = 273,
140  tEXTERN = 274,
141  tFOR = 275,
142  tFUNCTION = 276,
143  tHEADER = 277,
144  tHTTP = 278,
145  tIF = 279,
146  tISVALID = 280,
147  tMETA = 281,
148  tNAME = 282,
149  tPATH = 283,
150  tRETURN = 284,
151  tTYPEOF = 285,
152  tUSE = 286,
153  tUSER = 287,
154  tVAR = 288,
155  tWHILE = 289,
156  tURL = 290,
157  tDELETE = 291,
158  tIN = 292,
159  tLIB = 293,
160  tNEW = 294,
161  tNULL = 295,
162  tTHIS = 296,
163  tVOID = 297,
164  tWITH = 298,
165  tCASE = 299,
166  tCATCH = 300,
167  tCLASS = 301,
168  tCONST = 302,
169  tDEBUGGER = 303,
170  tDEFAULT = 304,
171  tDO = 305,
172  tENUM = 306,
173  tEXPORT = 307,
174  tEXTENDS = 308,
175  tFINALLY = 309,
176  tIMPORT = 310,
177  tPRIVATE = 311,
178  tPUBLIC = 312,
179  tSIZEOF = 313,
180  tSTRUCT = 314,
181  tSUPER = 315,
182  tSWITCH = 316,
183  tTHROW = 317,
184  tTRY = 318,
185  tEQ = 319,
186  tLE = 320,
187  tGE = 321,
188  tNE = 322,
189  tAND = 323,
190  tOR = 324,
191  tPLUSPLUS = 325,
192  tMINUSMINUS = 326,
193  tLSHIFT = 327,
194  tRSSHIFT = 328,
195  tRSZSHIFT = 329,
196  tADDA = 330,
197  tSUBA = 331,
198  tMULA = 332,
199  tDIVA = 333,
200  tANDA = 334,
201  tORA = 335,
202  tXORA = 336,
203  tREMA = 337,
204  tLSHIFTA = 338,
205  tRSSHIFTA = 339,
207  };
208 #endif
209 /* Tokens. */
210 #define tINVALID 258
211 #define tTRUE 259
212 #define tFALSE 260
213 #define tINTEGER 261
214 #define tFLOAT 262
215 #define tSTRING 263
216 #define tIDENTIFIER 264
217 #define tACCESS 265
218 #define tAGENT 266
219 #define tBREAK 267
220 #define tCONTINUE 268
221 #define tIDIV 269
222 #define tIDIVA 270
223 #define tDOMAIN 271
224 #define tELSE 272
225 #define tEQUIV 273
226 #define tEXTERN 274
227 #define tFOR 275
228 #define tFUNCTION 276
229 #define tHEADER 277
230 #define tHTTP 278
231 #define tIF 279
232 #define tISVALID 280
233 #define tMETA 281
234 #define tNAME 282
235 #define tPATH 283
236 #define tRETURN 284
237 #define tTYPEOF 285
238 #define tUSE 286
239 #define tUSER 287
240 #define tVAR 288
241 #define tWHILE 289
242 #define tURL 290
243 #define tDELETE 291
244 #define tIN 292
245 #define tLIB 293
246 #define tNEW 294
247 #define tNULL 295
248 #define tTHIS 296
249 #define tVOID 297
250 #define tWITH 298
251 #define tCASE 299
252 #define tCATCH 300
253 #define tCLASS 301
254 #define tCONST 302
255 #define tDEBUGGER 303
256 #define tDEFAULT 304
257 #define tDO 305
258 #define tENUM 306
259 #define tEXPORT 307
260 #define tEXTENDS 308
261 #define tFINALLY 309
262 #define tIMPORT 310
263 #define tPRIVATE 311
264 #define tPUBLIC 312
265 #define tSIZEOF 313
266 #define tSTRUCT 314
267 #define tSUPER 315
268 #define tSWITCH 316
269 #define tTHROW 317
270 #define tTRY 318
271 #define tEQ 319
272 #define tLE 320
273 #define tGE 321
274 #define tNE 322
275 #define tAND 323
276 #define tOR 324
277 #define tPLUSPLUS 325
278 #define tMINUSMINUS 326
279 #define tLSHIFT 327
280 #define tRSSHIFT 328
281 #define tRSZSHIFT 329
282 #define tADDA 330
283 #define tSUBA 331
284 #define tMULA 332
285 #define tDIVA 333
286 #define tANDA 334
287 #define tORA 335
288 #define tXORA 336
289 #define tREMA 337
290 #define tLSHIFTA 338
291 #define tRSSHIFTA 339
292 #define tRSZSHIFTA 340
293 
294 /* Value type. */
295 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
296 
297 union YYSTYPE
298 {
299 #line 22 "wmlscript/wsgram.y" /* yacc.c:355 */
300 
303  char *identifier;
305 
310 
312 
315 
316 #line 317 "y.tab.c" /* yacc.c:355 */
317 };
318 
319 typedef union YYSTYPE YYSTYPE;
320 # define YYSTYPE_IS_TRIVIAL 1
321 # define YYSTYPE_IS_DECLARED 1
322 #endif
323 
324 /* Location type. */
325 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
326 typedef struct YYLTYPE YYLTYPE;
327 struct YYLTYPE
328 {
333 };
334 # define YYLTYPE_IS_DECLARED 1
335 # define YYLTYPE_IS_TRIVIAL 1
336 #endif
337 
338 
339 
340 int ws_yy_parse (WsCompiler* compiler);
341 
342 #endif /* !YY_WS_YY_Y_TAB_H_INCLUDED */
343 
344 /* Copy the second part of user declarations. */
345 #line 39 "wmlscript/wsgram.y" /* yacc.c:358 */
346 
347 /* The required yyerror() function. This is actually not used but to
348  report the internal parser errors. All other errors are reported
349  by using the `wserror.h' functions. */
350 extern void yyerror(YYLTYPE* locp, WsCompiler* compiler, const char* msg);
351 
352 #if WS_DEBUG
353 /* Just for debugging purposes. */
354 WsCompilerPtr global_compiler = NULL;
355 #endif /* WS_DEBUG */
356 
357 
358 #line 359 "y.tab.c" /* yacc.c:358 */
359 
360 #ifdef short
361 # undef short
362 #endif
363 
364 #ifdef YYTYPE_UINT8
365 typedef YYTYPE_UINT8 yytype_uint8;
366 #else
367 typedef unsigned char yytype_uint8;
368 #endif
369 
370 #ifdef YYTYPE_INT8
371 typedef YYTYPE_INT8 yytype_int8;
372 #else
373 typedef signed char yytype_int8;
374 #endif
375 
376 #ifdef YYTYPE_UINT16
377 typedef YYTYPE_UINT16 yytype_uint16;
378 #else
379 typedef unsigned short int yytype_uint16;
380 #endif
381 
382 #ifdef YYTYPE_INT16
383 typedef YYTYPE_INT16 yytype_int16;
384 #else
385 typedef short int yytype_int16;
386 #endif
387 
388 #ifndef YYSIZE_T
389 # ifdef __SIZE_TYPE__
390 # define YYSIZE_T __SIZE_TYPE__
391 # elif defined size_t
392 # define YYSIZE_T size_t
393 # elif ! defined YYSIZE_T
394 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
395 # define YYSIZE_T size_t
396 # else
397 # define YYSIZE_T unsigned int
398 # endif
399 #endif
400 
401 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
402 
403 #ifndef YY_
404 # if defined YYENABLE_NLS && YYENABLE_NLS
405 # if ENABLE_NLS
406 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
407 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
408 # endif
409 # endif
410 # ifndef YY_
411 # define YY_(Msgid) Msgid
412 # endif
413 #endif
414 
415 #ifndef YY_ATTRIBUTE
416 # if (defined __GNUC__ \
417  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
418  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
419 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
420 # else
421 # define YY_ATTRIBUTE(Spec) /* empty */
422 # endif
423 #endif
424 
425 #ifndef YY_ATTRIBUTE_PURE
426 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
427 #endif
428 
429 #ifndef YY_ATTRIBUTE_UNUSED
430 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
431 #endif
432 
433 #if !defined _Noreturn \
434  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
435 # if defined _MSC_VER && 1200 <= _MSC_VER
436 # define _Noreturn __declspec (noreturn)
437 # else
438 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
439 # endif
440 #endif
441 
442 /* Suppress unused-variable warnings by "using" E. */
443 #if ! defined lint || defined __GNUC__
444 # define YYUSE(E) ((void) (E))
445 #else
446 # define YYUSE(E) /* empty */
447 #endif
448 
449 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
450 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
451 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
452  _Pragma ("GCC diagnostic push") \
453  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
454  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
455 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
456  _Pragma ("GCC diagnostic pop")
457 #else
458 # define YY_INITIAL_VALUE(Value) Value
459 #endif
460 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
461 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
462 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
463 #endif
464 #ifndef YY_INITIAL_VALUE
465 # define YY_INITIAL_VALUE(Value) /* Nothing. */
466 #endif
467 
468 
469 #if ! defined yyoverflow || YYERROR_VERBOSE
470 
471 /* The parser invokes alloca or malloc; define the necessary symbols. */
472 
473 # ifdef YYSTACK_USE_ALLOCA
474 # if YYSTACK_USE_ALLOCA
475 # ifdef __GNUC__
476 # define YYSTACK_ALLOC __builtin_alloca
477 # elif defined __BUILTIN_VA_ARG_INCR
478 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
479 # elif defined _AIX
480 # define YYSTACK_ALLOC __alloca
481 # elif defined _MSC_VER
482 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
483 # define alloca _alloca
484 # else
485 # define YYSTACK_ALLOC alloca
486 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
487 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
488  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
489 # ifndef EXIT_SUCCESS
490 # define EXIT_SUCCESS 0
491 # endif
492 # endif
493 # endif
494 # endif
495 # endif
496 
497 # ifdef YYSTACK_ALLOC
498  /* Pacify GCC's 'empty if-body' warning. */
499 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
500 # ifndef YYSTACK_ALLOC_MAXIMUM
501  /* The OS might guarantee only one guard page at the bottom of the stack,
502  and a page size can be as small as 4096 bytes. So we cannot safely
503  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
504  to allow for a few compiler-allocated temporary stack slots. */
505 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
506 # endif
507 # else
508 # define YYSTACK_ALLOC YYMALLOC
509 # define YYSTACK_FREE YYFREE
510 # ifndef YYSTACK_ALLOC_MAXIMUM
511 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
512 # endif
513 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
514  && ! ((defined YYMALLOC || defined malloc) \
515  && (defined YYFREE || defined free)))
516 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
517 # ifndef EXIT_SUCCESS
518 # define EXIT_SUCCESS 0
519 # endif
520 # endif
521 # ifndef YYMALLOC
522 # define YYMALLOC malloc
523 # if ! defined malloc && ! defined EXIT_SUCCESS
524 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
525 # endif
526 # endif
527 # ifndef YYFREE
528 # define YYFREE free
529 # if ! defined free && ! defined EXIT_SUCCESS
530 void free (void *); /* INFRINGES ON USER NAME SPACE */
531 # endif
532 # endif
533 # endif
534 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
535 
536 
537 #if (! defined yyoverflow \
538  && (! defined __cplusplus \
539  || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
540  && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
541 
542 /* A type that is properly aligned for any stack member. */
543 union yyalloc
544 {
548 };
549 
550 /* The size of the maximum gap between one aligned stack and the next. */
551 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
552 
553 /* The size of an array large to enough to hold all stacks, each with
554  N elements. */
555 # define YYSTACK_BYTES(N) \
556  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
557  + 2 * YYSTACK_GAP_MAXIMUM)
558 
559 # define YYCOPY_NEEDED 1
560 
561 /* Relocate STACK from its old location to the new one. The
562  local variables YYSIZE and YYSTACKSIZE give the old and new number of
563  elements in the stack, and YYPTR gives the new location of the
564  stack. Advance YYPTR to a properly aligned location for the next
565  stack. */
566 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
567  do \
568  { \
569  YYSIZE_T yynewbytes; \
570  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
571  Stack = &yyptr->Stack_alloc; \
572  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
573  yyptr += yynewbytes / sizeof (*yyptr); \
574  } \
575  while (0)
576 
577 #endif
578 
579 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
580 /* Copy COUNT objects from SRC to DST. The source and destination do
581  not overlap. */
582 # ifndef YYCOPY
583 # if defined __GNUC__ && 1 < __GNUC__
584 # define YYCOPY(Dst, Src, Count) \
585  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
586 # else
587 # define YYCOPY(Dst, Src, Count) \
588  do \
589  { \
590  YYSIZE_T yyi; \
591  for (yyi = 0; yyi < (Count); yyi++) \
592  (Dst)[yyi] = (Src)[yyi]; \
593  } \
594  while (0)
595 # endif
596 # endif
597 #endif /* !YYCOPY_NEEDED */
598 
599 /* YYFINAL -- State number of the termination state. */
600 #define YYFINAL 17
601 /* YYLAST -- Last index in YYTABLE. */
602 #define YYLAST 448
603 
604 /* YYNTOKENS -- Number of terminals. */
605 #define YYNTOKENS 109
606 /* YYNNTS -- Number of nonterminals. */
607 #define YYNNTS 55
608 /* YYNRULES -- Number of rules. */
609 #define YYNRULES 146
610 /* YYNSTATES -- Number of states. */
611 #define YYNSTATES 257
612 
613 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
614  by yylex, with out-of-bounds checking. */
615 #define YYUNDEFTOK 2
616 #define YYMAXUTOK 340
617 
618 #define YYTRANSLATE(YYX) \
619  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
620 
621 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
622  as returned by yylex, without out-of-bounds checking. */
623 static const yytype_uint8 yytranslate[] =
624 {
625  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628  2, 2, 2, 106, 2, 107, 2, 104, 97, 2,
629  87, 88, 102, 100, 89, 101, 108, 103, 2, 2,
630  2, 2, 2, 2, 2, 2, 2, 2, 94, 86,
631  98, 92, 99, 93, 2, 2, 2, 2, 2, 2,
632  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634  2, 2, 2, 2, 96, 2, 2, 2, 2, 2,
635  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
636  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
637  2, 2, 2, 90, 95, 91, 105, 2, 2, 2,
638  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
639  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
642  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
644  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
645  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
646  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
647  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
648  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
649  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
650  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
651  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
652  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
653  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
654  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
655  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
656  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
657  65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
658  75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
659  85
660 };
661 
662 #if YYDEBUG
663  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
664 static const yytype_uint16 yyrline[] =
665 {
666  0, 125, 125, 126, 127, 134, 135, 139, 140, 145,
667  146, 147, 151, 156, 160, 168, 177, 199, 203, 204,
668  205, 209, 225, 243, 277, 279, 283, 284, 285, 290,
669  291, 295, 310, 311, 316, 317, 320, 322, 326, 344,
670  365, 373, 374, 376, 378, 379, 380, 382, 384, 387,
671  395, 404, 405, 409, 414, 419, 421, 426, 431, 436,
672  452, 453, 458, 460, 465, 467, 471, 474, 480, 487,
673  488, 493, 494, 499, 500, 502, 504, 506, 508, 510,
674  512, 514, 516, 518, 520, 522, 524, 529, 530, 535,
675  536, 541, 542, 547, 548, 553, 554, 559, 560, 565,
676  566, 568, 573, 574, 576, 578, 580, 585, 586, 588,
677  590, 595, 596, 598, 603, 604, 606, 608, 610, 615,
678  616, 618, 620, 622, 624, 640, 642, 644, 649, 650,
679  652, 657, 658, 668, 670, 675, 677, 679, 681, 683,
680  685, 687, 689, 694, 696, 701, 706
681 };
682 #endif
683 
684 #if YYDEBUG || YYERROR_VERBOSE || 0
685 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
686  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
687 static const char *const yytname[] =
688 {
689  "$end", "error", "$undefined", "tINVALID", "tTRUE", "tFALSE",
690  "tINTEGER", "tFLOAT", "tSTRING", "tIDENTIFIER", "tACCESS", "tAGENT",
691  "tBREAK", "tCONTINUE", "tIDIV", "tIDIVA", "tDOMAIN", "tELSE", "tEQUIV",
692  "tEXTERN", "tFOR", "tFUNCTION", "tHEADER", "tHTTP", "tIF", "tISVALID",
693  "tMETA", "tNAME", "tPATH", "tRETURN", "tTYPEOF", "tUSE", "tUSER", "tVAR",
694  "tWHILE", "tURL", "tDELETE", "tIN", "tLIB", "tNEW", "tNULL", "tTHIS",
695  "tVOID", "tWITH", "tCASE", "tCATCH", "tCLASS", "tCONST", "tDEBUGGER",
696  "tDEFAULT", "tDO", "tENUM", "tEXPORT", "tEXTENDS", "tFINALLY", "tIMPORT",
697  "tPRIVATE", "tPUBLIC", "tSIZEOF", "tSTRUCT", "tSUPER", "tSWITCH",
698  "tTHROW", "tTRY", "tEQ", "tLE", "tGE", "tNE", "tAND", "tOR", "tPLUSPLUS",
699  "tMINUSMINUS", "tLSHIFT", "tRSSHIFT", "tRSZSHIFT", "tADDA", "tSUBA",
700  "tMULA", "tDIVA", "tANDA", "tORA", "tXORA", "tREMA", "tLSHIFTA",
701  "tRSSHIFTA", "tRSZSHIFTA", "';'", "'('", "')'", "','", "'{'", "'}'",
702  "'='", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "'+'", "'-'",
703  "'*'", "'/'", "'%'", "'~'", "'!'", "'#'", "'.'", "$accept",
704  "CompilationUnit", "Pragmas", "Pragma", "PragmaDeclaration",
705  "ExternalCompilationUnitPragma", "AccessControlPragma",
706  "AccessControlSpecifier", "MetaPragma", "MetaSpecifier", "MetaName",
707  "MetaHttpEquiv", "MetaUserAgent", "MetaBody", "MetaPropertyName",
708  "MetaContent", "MetaScheme", "FunctionDeclarations",
709  "FunctionDeclaration", "ExternOpt", "FormalParameterListOpt",
710  "SemicolonOpt", "FormalParameterList", "Statement", "Block",
711  "StatementListOpt", "StatementList", "VariableStatement",
712  "VariableDeclarationList", "VariableDeclaration",
713  "VariableInitializedOpt", "IfStatement", "IterationStatement",
714  "ForStatement", "ReturnStatement", "ExpressionOpt", "Expression",
715  "AssignmentExpression", "ConditionalExpression", "LogicalORExpression",
716  "LogicalANDExpression", "BitwiseORExpression", "BitwiseXORExpression",
717  "BitwiseANDExpression", "EqualityExpression", "RelationalExpression",
718  "ShiftExpression", "AdditiveExpression", "MultiplicativeExpression",
719  "UnaryExpression", "PostfixExpression", "CallExpression",
720  "PrimaryExpression", "Arguments", "ArgumentList", YY_NULLPTR
721 };
722 #endif
723 
724 # ifdef YYPRINT
725 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
726  (internal) symbol number NUM (which must be that of a token). */
727 static const yytype_uint16 yytoknum[] =
728 {
729  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
730  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
731  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
732  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
733  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
734  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
735  315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
736  325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
737  335, 336, 337, 338, 339, 340, 59, 40, 41, 44,
738  123, 125, 61, 63, 58, 124, 94, 38, 60, 62,
739  43, 45, 42, 47, 37, 126, 33, 35, 46
740 };
741 # endif
742 
743 #define YYPACT_NINF -135
744 
745 #define yypact_value_is_default(Yystate) \
746  (!!((Yystate) == (-135)))
747 
748 #define YYTABLE_NINF -53
749 
750 #define yytable_value_is_error(Yytable_value) \
751  0
752 
753  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
754  STATE-NUM. */
755 static const yytype_int16 yypact[] =
756 {
757  59, 39, -135, 28, 68, 63, -135, 38, -135, 62,
758  37, 54, 13, -43, -135, -135, -135, -135, -135, -135,
759  38, -135, 57, 67, 87, -135, 92, 108, 109, -135,
760  -135, -135, -135, 121, -135, 47, 123, -135, 108, -135,
761  -135, 141, 108, -135, 155, 164, -135, -135, 166, -135,
762  -135, 89, 107, -135, -135, -135, 1, 188, -135, 132,
763  112, -135, -135, -135, -135, -135, -135, -135, 340, 115,
764  120, 124, 125, 296, 308, 296, 35, 126, 198, 201,
765  -135, 308, 296, 296, 296, 296, -135, -135, 129, 175,
766  -135, -135, -135, -135, -135, -83, -135, -135, -48, 146,
767  122, 119, 127, 12, -25, 45, 5, 44, -135, -135,
768  -135, -135, -135, -135, 308, -135, -135, 308, 308, 308,
769  308, 308, 308, 308, 308, 308, 308, 308, 222, 308,
770  207, 212, -135, -135, -135, 264, 308, -38, -135, 148,
771  147, -135, -135, 143, -1, -135, 308, -135, -135, 43,
772  -135, -135, -135, -135, -135, -135, -135, 308, 296, 308,
773  296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
774  296, 296, 296, 296, 296, 296, 296, 296, 296, -135,
775  -135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
776  -135, -135, -135, 66, -135, 152, 152, 231, 156, 70,
777  -135, 296, -135, -135, 231, 82, -135, -135, 146, 149,
778  122, 119, 127, 12, -25, -25, 45, 45, 45, 45,
779  5, 5, 5, 44, 44, -135, -135, -135, -135, -135,
780  308, -135, -135, 25, 308, 22, -135, -135, 22, 308,
781  -135, 308, 158, 224, -135, -135, 162, 308, 22, 308,
782  161, -135, 163, 22, 22, -135, -135
783 };
784 
785  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
786  Performed when YYTABLE does not specify something else to do. Zero
787  means the default is an error. */
788 static const yytype_uint8 yydefact[] =
789 {
790  0, 8, 33, 0, 0, 0, 5, 3, 29, 0,
791  0, 0, 0, 0, 9, 10, 11, 1, 8, 6,
792  2, 30, 0, 0, 0, 13, 0, 0, 0, 17,
793  18, 19, 20, 0, 7, 0, 14, 15, 0, 26,
794  21, 0, 0, 12, 34, 0, 22, 27, 24, 23,
795  38, 0, 35, 16, 28, 25, 0, 0, 50, 0,
796  36, 39, 136, 137, 138, 139, 140, 141, 135, 0,
797  0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
798  42, 0, 0, 0, 0, 0, 53, 40, 0, 0,
799  41, 44, 45, 65, 48, 0, 71, 73, 87, 89,
800  91, 93, 95, 97, 99, 102, 107, 111, 114, 119,
801  128, 131, 37, 31, 0, 129, 130, 0, 0, 0,
802  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
803  0, 0, 132, 47, 46, 69, 0, 135, 121, 0,
804  70, 120, 56, 60, 0, 57, 0, 122, 123, 0,
805  124, 125, 126, 127, 49, 54, 43, 0, 0, 0,
806  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
807  0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
808  78, 79, 75, 76, 83, 85, 84, 77, 80, 81,
809  82, 143, 145, 0, 74, 0, 0, 0, 0, 0,
810  68, 0, 59, 55, 0, 0, 142, 72, 90, 0,
811  92, 94, 96, 98, 100, 101, 105, 106, 103, 104,
812  108, 109, 110, 112, 113, 117, 115, 116, 118, 144,
813  0, 133, 134, 0, 69, 0, 61, 58, 0, 0,
814  146, 69, 0, 63, 64, 88, 0, 69, 0, 69,
815  0, 62, 0, 0, 0, 66, 67
816 };
817 
818  /* YYPGOTO[NTERM-NUM]. */
819 static const yytype_int16 yypgoto[] =
820 {
821  -135, -135, -135, 245, -135, -135, -135, -135, -135, -135,
822  -135, -135, -135, 29, -135, -135, -135, 248, 17, -135,
823  -135, -135, -135, -85, 199, -135, -135, -135, 60, 50,
824  -135, -135, -135, -135, -135, -134, -74, -109, 55, -135,
825  100, 99, 102, 98, 101, -22, -65, -46, 20, 14,
826  -135, -135, -135, -10, -135
827 };
828 
829  /* YYDEFGOTO[NTERM-NUM]. */
830 static const yytype_int16 yydefgoto[] =
831 {
832  -1, 4, 5, 6, 13, 14, 15, 25, 16, 29,
833  30, 31, 32, 40, 41, 48, 55, 7, 8, 9,
834  51, 113, 52, 86, 87, 88, 89, 90, 144, 145,
835  202, 91, 92, 93, 94, 139, 95, 96, 97, 98,
836  99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
837  109, 110, 111, 132, 193
838 };
839 
840  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
841  positive, shift that token. If negative, reduce the rule whose
842  number is the opposite. If YYTABLE_NINF, syntax error. */
843 static const yytype_int16 yytable[] =
844 {
845  140, 198, 58, 156, 155, 179, 157, 149, 180, 181,
846  182, 183, 184, 185, 186, 187, 188, 189, 190, 192,
847  194, 158, 33, 58, 21, 62, 63, 64, 65, 66,
848  67, 68, 115, 116, 69, 70, 142, 21, 10, -4,
849  166, 167, 71, 34, 143, 159, 72, 73, 207, 128,
850  209, 74, 75, 23, 11, 76, 77, 2, 175, -32,
851  1, 140, 199, 12, 18, 24, 35, 46, 17, 130,
852  131, 49, 205, 168, 169, 36, 164, 26, 2, 165,
853  -32, 27, 2, 22, -32, 203, 28, 138, 204, 141,
854  3, 59, 78, 79, 3, 37, 150, 151, 152, 153,
855  242, 216, 217, 218, 219, 173, 174, 246, 80, 81,
856  38, 241, 59, 250, 204, 252, 39, 170, 171, 172,
857  42, 240, 82, 83, 220, 221, 222, 84, 85, 43,
858  245, 206, 157, 58, 44, 62, 63, 64, 65, 66,
859  67, 68, 214, 215, 69, 70, 176, 177, 178, 47,
860  243, 45, 71, 244, 229, 230, 72, 73, 235, 157,
861  140, 74, 75, 251, 50, 76, 77, 140, 255, 256,
862  238, 157, 53, 140, 54, 140, 58, 56, 62, 63,
863  64, 65, 66, 67, 68, 231, 232, 69, 70, 225,
864  226, 227, 228, 223, 224, 71, 57, 61, 112, 72,
865  73, 133, 78, 79, 74, 75, 134, 147, 76, 77,
866  148, 135, 136, 146, 160, 162, 195, 161, 80, 81,
867  154, 196, 59, -51, 163, 62, 63, 64, 65, 66,
868  67, 68, 82, 83, 200, 201, 157, 84, 85, 128,
869  143, 248, 234, 239, 247, 78, 79, 73, 249, 253,
870  19, 254, 75, 20, 237, 60, 236, 233, 208, 210,
871  212, 80, 81, 211, 213, 59, -52, 62, 63, 64,
872  65, 66, 67, 68, 0, 82, 83, 0, 0, 0,
873  84, 85, 0, 0, 0, 0, 0, 0, 0, 73,
874  0, 0, 78, 79, 75, 0, 0, 197, 0, 62,
875  63, 64, 65, 66, 67, 137, 0, 0, 0, 81,
876  191, 62, 63, 64, 65, 66, 67, 68, 0, 0,
877  0, 73, 82, 83, 0, 0, 75, 84, 85, 0,
878  0, 0, 0, 73, 78, 79, 0, 0, 75, 0,
879  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
880  0, 81, 0, 0, 0, 114, 0, 0, 0, 0,
881  0, 0, 0, 0, 82, 83, 78, 79, 0, 84,
882  85, 0, 0, 0, 0, 0, 0, 0, 78, 79,
883  0, 0, 0, 81, 0, 0, 0, 0, 0, 0,
884  0, 0, 0, 0, 0, 81, 82, 83, 0, 0,
885  0, 84, 85, 0, 0, 0, 0, 0, 82, 83,
886  115, 116, 0, 84, 85, 117, 118, 119, 120, 121,
887  122, 123, 124, 125, 126, 127, 0, 128, 0, 0,
888  0, 0, 129, 0, 0, 0, 0, 0, 0, 0,
889  0, 0, 0, 0, 0, 0, 0, 130, 131
890 };
891 
892 static const yytype_int16 yycheck[] =
893 {
894  74, 135, 1, 86, 89, 114, 89, 81, 117, 118,
895  119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
896  129, 69, 9, 1, 7, 3, 4, 5, 6, 7,
897  8, 9, 70, 71, 12, 13, 1, 20, 10, 0,
898  65, 66, 20, 86, 9, 93, 24, 25, 157, 87,
899  159, 29, 30, 16, 26, 33, 34, 19, 14, 21,
900  1, 135, 136, 35, 1, 28, 9, 38, 0, 107,
901  108, 42, 146, 98, 99, 8, 64, 23, 19, 67,
902  21, 27, 19, 21, 21, 86, 32, 73, 89, 75,
903  31, 90, 70, 71, 31, 8, 82, 83, 84, 85,
904  234, 166, 167, 168, 169, 100, 101, 241, 86, 87,
905  18, 86, 90, 247, 89, 249, 8, 72, 73, 74,
906  11, 230, 100, 101, 170, 171, 172, 105, 106, 8,
907  239, 88, 89, 1, 87, 3, 4, 5, 6, 7,
908  8, 9, 164, 165, 12, 13, 102, 103, 104, 8,
909  235, 28, 20, 238, 88, 89, 24, 25, 88, 89,
910  234, 29, 30, 248, 9, 33, 34, 241, 253, 254,
911  88, 89, 8, 247, 8, 249, 1, 88, 3, 4,
912  5, 6, 7, 8, 9, 195, 196, 12, 13, 175,
913  176, 177, 178, 173, 174, 20, 89, 9, 86, 24,
914  25, 86, 70, 71, 29, 30, 86, 9, 33, 34,
915  9, 87, 87, 87, 68, 96, 9, 95, 86, 87,
916  91, 9, 90, 91, 97, 3, 4, 5, 6, 7,
917  8, 9, 100, 101, 86, 92, 89, 105, 106, 87,
918  9, 17, 86, 94, 86, 70, 71, 25, 86, 88,
919  5, 88, 30, 5, 204, 56, 201, 197, 158, 160,
920  162, 86, 87, 161, 163, 90, 91, 3, 4, 5,
921  6, 7, 8, 9, -1, 100, 101, -1, -1, -1,
922  105, 106, -1, -1, -1, -1, -1, -1, -1, 25,
923  -1, -1, 70, 71, 30, -1, -1, 33, -1, 3,
924  4, 5, 6, 7, 8, 9, -1, -1, -1, 87,
925  88, 3, 4, 5, 6, 7, 8, 9, -1, -1,
926  -1, 25, 100, 101, -1, -1, 30, 105, 106, -1,
927  -1, -1, -1, 25, 70, 71, -1, -1, 30, -1,
928  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
929  -1, 87, -1, -1, -1, 15, -1, -1, -1, -1,
930  -1, -1, -1, -1, 100, 101, 70, 71, -1, 105,
931  106, -1, -1, -1, -1, -1, -1, -1, 70, 71,
932  -1, -1, -1, 87, -1, -1, -1, -1, -1, -1,
933  -1, -1, -1, -1, -1, 87, 100, 101, -1, -1,
934  -1, 105, 106, -1, -1, -1, -1, -1, 100, 101,
935  70, 71, -1, 105, 106, 75, 76, 77, 78, 79,
936  80, 81, 82, 83, 84, 85, -1, 87, -1, -1,
937  -1, -1, 92, -1, -1, -1, -1, -1, -1, -1,
938  -1, -1, -1, -1, -1, -1, -1, 107, 108
939 };
940 
941  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
942  symbol of state STATE-NUM. */
943 static const yytype_uint8 yystos[] =
944 {
945  0, 1, 19, 31, 110, 111, 112, 126, 127, 128,
946  10, 26, 35, 113, 114, 115, 117, 0, 1, 112,
947  126, 127, 21, 16, 28, 116, 23, 27, 32, 118,
948  119, 120, 121, 9, 86, 9, 8, 8, 18, 8,
949  122, 123, 11, 8, 87, 28, 122, 8, 124, 122,
950  9, 129, 131, 8, 8, 125, 88, 89, 1, 90,
951  133, 9, 3, 4, 5, 6, 7, 8, 9, 12,
952  13, 20, 24, 25, 29, 30, 33, 34, 70, 71,
953  86, 87, 100, 101, 105, 106, 132, 133, 134, 135,
954  136, 140, 141, 142, 143, 145, 146, 147, 148, 149,
955  150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
956  160, 161, 86, 130, 15, 70, 71, 75, 76, 77,
957  78, 79, 80, 81, 82, 83, 84, 85, 87, 92,
958  107, 108, 162, 86, 86, 87, 87, 9, 158, 144,
959  145, 158, 1, 9, 137, 138, 87, 9, 9, 145,
960  158, 158, 158, 158, 91, 132, 86, 89, 69, 93,
961  68, 95, 96, 97, 64, 67, 65, 66, 98, 99,
962  72, 73, 74, 100, 101, 14, 102, 103, 104, 146,
963  146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
964  146, 88, 146, 163, 146, 9, 9, 33, 144, 145,
965  86, 92, 139, 86, 89, 145, 88, 146, 149, 146,
966  150, 151, 152, 153, 154, 154, 155, 155, 155, 155,
967  156, 156, 156, 157, 157, 158, 158, 158, 158, 88,
968  89, 162, 162, 137, 86, 88, 147, 138, 88, 94,
969  146, 86, 144, 132, 132, 146, 144, 86, 17, 86,
970  144, 132, 144, 88, 88, 132, 132
971 };
972 
973  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
974 static const yytype_uint8 yyr1[] =
975 {
976  0, 109, 110, 110, 110, 111, 111, 112, 112, 113,
977  113, 113, 114, 115, 116, 116, 116, 117, 118, 118,
978  118, 119, 120, 121, 122, 122, 123, 124, 125, 126,
979  126, 127, 128, 128, 129, 129, 130, 130, 131, 131,
980  132, 132, 132, 132, 132, 132, 132, 132, 132, 133,
981  133, 134, 134, 135, 135, 136, 136, 137, 137, 138,
982  139, 139, 140, 140, 141, 141, 142, 142, 143, 144,
983  144, 145, 145, 146, 146, 146, 146, 146, 146, 146,
984  146, 146, 146, 146, 146, 146, 146, 147, 147, 148,
985  148, 149, 149, 150, 150, 151, 151, 152, 152, 153,
986  153, 153, 154, 154, 154, 154, 154, 155, 155, 155,
987  155, 156, 156, 156, 157, 157, 157, 157, 157, 158,
988  158, 158, 158, 158, 158, 158, 158, 158, 159, 159,
989  159, 160, 160, 160, 160, 161, 161, 161, 161, 161,
990  161, 161, 161, 162, 162, 163, 163
991 };
992 
993  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
994 static const yytype_uint8 yyr2[] =
995 {
996  0, 2, 2, 1, 1, 1, 2, 3, 1, 1,
997  1, 1, 3, 2, 2, 2, 4, 2, 1, 1,
998  1, 2, 3, 3, 2, 3, 1, 1, 1, 1,
999  2, 8, 0, 1, 0, 1, 0, 1, 1, 3,
1000  1, 1, 1, 2, 1, 1, 2, 2, 1, 3,
1001  1, 0, 1, 1, 2, 3, 2, 1, 3, 2,
1002  0, 2, 7, 5, 5, 1, 9, 10, 3, 0,
1003  1, 1, 3, 1, 3, 3, 3, 3, 3, 3,
1004  3, 3, 3, 3, 3, 3, 3, 1, 5, 1,
1005  3, 1, 3, 1, 3, 1, 3, 1, 3, 1,
1006  3, 3, 1, 3, 3, 3, 3, 1, 3, 3,
1007  3, 1, 3, 3, 1, 3, 3, 3, 3, 1,
1008  2, 2, 2, 2, 2, 2, 2, 2, 1, 2,
1009  2, 1, 2, 4, 4, 1, 1, 1, 1, 1,
1010  1, 1, 3, 2, 3, 1, 3
1011 };
1012 
1013 
1014 #define yyerrok (yyerrstatus = 0)
1015 #define yyclearin (yychar = YYEMPTY)
1016 #define YYEMPTY (-2)
1017 #define YYEOF 0
1018 
1019 #define YYACCEPT goto yyacceptlab
1020 #define YYABORT goto yyabortlab
1021 #define YYERROR goto yyerrorlab
1022 
1023 
1024 #define YYRECOVERING() (!!yyerrstatus)
1025 
1026 #define YYBACKUP(Token, Value) \
1027 do \
1028  if (yychar == YYEMPTY) \
1029  { \
1030  yychar = (Token); \
1031  yylval = (Value); \
1032  YYPOPSTACK (yylen); \
1033  yystate = *yyssp; \
1034  goto yybackup; \
1035  } \
1036  else \
1037  { \
1038  yyerror (&yylloc, compiler, YY_("syntax error: cannot back up")); \
1039  YYERROR; \
1040  } \
1041 while (0)
1042 
1043 /* Error token number */
1044 #define YYTERROR 1
1045 #define YYERRCODE 256
1046 
1047 
1048 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1049  If N is 0, then set CURRENT to the empty location which ends
1050  the previous symbol: RHS[0] (always defined). */
1051 
1052 #ifndef YYLLOC_DEFAULT
1053 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1054  do \
1055  if (N) \
1056  { \
1057  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1058  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1059  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1060  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1061  } \
1062  else \
1063  { \
1064  (Current).first_line = (Current).last_line = \
1065  YYRHSLOC (Rhs, 0).last_line; \
1066  (Current).first_column = (Current).last_column = \
1067  YYRHSLOC (Rhs, 0).last_column; \
1068  } \
1069  while (0)
1070 #endif
1071 
1072 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1073 
1074 
1075 /* Enable debugging if requested. */
1076 #if YYDEBUG
1077 
1078 # ifndef YYFPRINTF
1079 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1080 # define YYFPRINTF fprintf
1081 # endif
1082 
1083 # define YYDPRINTF(Args) \
1084 do { \
1085  if (yydebug) \
1086  YYFPRINTF Args; \
1087 } while (0)
1088 
1089 
1090 /* YY_LOCATION_PRINT -- Print the location on the stream.
1091  This macro was not mandated originally: define only if we know
1092  we won't break user code: when these are the locations we know. */
1093 
1094 #ifndef YY_LOCATION_PRINT
1095 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1096 
1097 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
1098 
1100 static unsigned
1101 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
1102 {
1103  unsigned res = 0;
1104  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
1105  if (0 <= yylocp->first_line)
1106  {
1107  res += YYFPRINTF (yyo, "%d", yylocp->first_line);
1108  if (0 <= yylocp->first_column)
1109  res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
1110  }
1111  if (0 <= yylocp->last_line)
1112  {
1113  if (yylocp->first_line < yylocp->last_line)
1114  {
1115  res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
1116  if (0 <= end_col)
1117  res += YYFPRINTF (yyo, ".%d", end_col);
1118  }
1119  else if (0 <= end_col && yylocp->first_column < end_col)
1120  res += YYFPRINTF (yyo, "-%d", end_col);
1121  }
1122  return res;
1123  }
1124 
1125 # define YY_LOCATION_PRINT(File, Loc) \
1126  yy_location_print_ (File, &(Loc))
1127 
1128 # else
1129 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1130 # endif
1131 #endif
1132 
1133 
1134 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1135 do { \
1136  if (yydebug) \
1137  { \
1138  YYFPRINTF (stderr, "%s ", Title); \
1139  yy_symbol_print (stderr, \
1140  Type, Value, Location, compiler); \
1141  YYFPRINTF (stderr, "\n"); \
1142  } \
1143 } while (0)
1144 
1145 
1146 /*----------------------------------------.
1147 | Print this symbol's value on YYOUTPUT. |
1148 `----------------------------------------*/
1149 
1150 static void
1151 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, WsCompiler* compiler)
1152 {
1153  FILE *yyo = yyoutput;
1154  YYUSE (yyo);
1155  YYUSE (yylocationp);
1156  YYUSE (compiler);
1157  if (!yyvaluep)
1158  return;
1159 # ifdef YYPRINT
1160  if (yytype < YYNTOKENS)
1161  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1162 # endif
1163  YYUSE (yytype);
1164 }
1165 
1166 
1167 /*--------------------------------.
1168 | Print this symbol on YYOUTPUT. |
1169 `--------------------------------*/
1170 
1171 static void
1172 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, WsCompiler* compiler)
1173 {
1174  YYFPRINTF (yyoutput, "%s %s (",
1175  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1176 
1177  YY_LOCATION_PRINT (yyoutput, *yylocationp);
1178  YYFPRINTF (yyoutput, ": ");
1179  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, compiler);
1180  YYFPRINTF (yyoutput, ")");
1181 }
1182 
1183 /*------------------------------------------------------------------.
1184 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1185 | TOP (included). |
1186 `------------------------------------------------------------------*/
1187 
1188 static void
1189 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1190 {
1191  YYFPRINTF (stderr, "Stack now");
1192  for (; yybottom <= yytop; yybottom++)
1193  {
1194  int yybot = *yybottom;
1195  YYFPRINTF (stderr, " %d", yybot);
1196  }
1197  YYFPRINTF (stderr, "\n");
1198 }
1199 
1200 # define YY_STACK_PRINT(Bottom, Top) \
1201 do { \
1202  if (yydebug) \
1203  yy_stack_print ((Bottom), (Top)); \
1204 } while (0)
1205 
1206 
1207 /*------------------------------------------------.
1208 | Report that the YYRULE is going to be reduced. |
1209 `------------------------------------------------*/
1210 
1211 static void
1212 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, WsCompiler* compiler)
1213 {
1214  unsigned long int yylno = yyrline[yyrule];
1215  int yynrhs = yyr2[yyrule];
1216  int yyi;
1217  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1218  yyrule - 1, yylno);
1219  /* The symbols being reduced. */
1220  for (yyi = 0; yyi < yynrhs; yyi++)
1221  {
1222  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1223  yy_symbol_print (stderr,
1224  yystos[yyssp[yyi + 1 - yynrhs]],
1225  &(yyvsp[(yyi + 1) - (yynrhs)])
1226  , &(yylsp[(yyi + 1) - (yynrhs)]) , compiler);
1227  YYFPRINTF (stderr, "\n");
1228  }
1229 }
1230 
1231 # define YY_REDUCE_PRINT(Rule) \
1232 do { \
1233  if (yydebug) \
1234  yy_reduce_print (yyssp, yyvsp, yylsp, Rule, compiler); \
1235 } while (0)
1236 
1237 /* Nonzero means print parse trace. It is left uninitialized so that
1238  multiple parsers can coexist. */
1239 int yydebug;
1240 #else /* !YYDEBUG */
1241 # define YYDPRINTF(Args)
1242 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1243 # define YY_STACK_PRINT(Bottom, Top)
1244 # define YY_REDUCE_PRINT(Rule)
1245 #endif /* !YYDEBUG */
1246 
1247 
1248 /* YYINITDEPTH -- initial size of the parser's stacks. */
1249 #ifndef YYINITDEPTH
1250 # define YYINITDEPTH 200
1251 #endif
1252 
1253 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1254  if the built-in stack extension method is used).
1255 
1256  Do not make this value too large; the results are undefined if
1257  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1258  evaluated with infinite-precision integer arithmetic. */
1259 
1260 #ifndef YYMAXDEPTH
1261 # define YYMAXDEPTH 10000
1262 #endif
1263 
1264 
1265 #if YYERROR_VERBOSE
1266 
1267 # ifndef yystrlen
1268 # if defined __GLIBC__ && defined _STRING_H
1269 # define yystrlen strlen
1270 # else
1271 /* Return the length of YYSTR. */
1272 static YYSIZE_T
1273 yystrlen (const char *yystr)
1274 {
1275  YYSIZE_T yylen;
1276  for (yylen = 0; yystr[yylen]; yylen++)
1277  continue;
1278  return yylen;
1279 }
1280 # endif
1281 # endif
1282 
1283 # ifndef yystpcpy
1284 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1285 # define yystpcpy stpcpy
1286 # else
1287 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1288  YYDEST. */
1289 static char *
1290 yystpcpy (char *yydest, const char *yysrc)
1291 {
1292  char *yyd = yydest;
1293  const char *yys = yysrc;
1294 
1295  while ((*yyd++ = *yys++) != '\0')
1296  continue;
1297 
1298  return yyd - 1;
1299 }
1300 # endif
1301 # endif
1302 
1303 # ifndef yytnamerr
1304 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1305  quotes and backslashes, so that it's suitable for yyerror. The
1306  heuristic is that double-quoting is unnecessary unless the string
1307  contains an apostrophe, a comma, or backslash (other than
1308  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1309  null, do not copy; instead, return the length of what the result
1310  would have been. */
1311 static YYSIZE_T
1312 yytnamerr (char *yyres, const char *yystr)
1313 {
1314  if (*yystr == '"')
1315  {
1316  YYSIZE_T yyn = 0;
1317  char const *yyp = yystr;
1318 
1319  for (;;)
1320  switch (*++yyp)
1321  {
1322  case '\'':
1323  case ',':
1324  goto do_not_strip_quotes;
1325 
1326  case '\\':
1327  if (*++yyp != '\\')
1328  goto do_not_strip_quotes;
1329  /* Fall through. */
1330  default:
1331  if (yyres)
1332  yyres[yyn] = *yyp;
1333  yyn++;
1334  break;
1335 
1336  case '"':
1337  if (yyres)
1338  yyres[yyn] = '\0';
1339  return yyn;
1340  }
1341  do_not_strip_quotes: ;
1342  }
1343 
1344  if (! yyres)
1345  return yystrlen (yystr);
1346 
1347  return yystpcpy (yyres, yystr) - yyres;
1348 }
1349 # endif
1350 
1351 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1352  about the unexpected token YYTOKEN for the state stack whose top is
1353  YYSSP.
1354 
1355  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1356  not large enough to hold the message. In that case, also set
1357  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1358  required number of bytes is too large to store. */
1359 static int
1360 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1361  yytype_int16 *yyssp, int yytoken)
1362 {
1363  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1364  YYSIZE_T yysize = yysize0;
1365  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1366  /* Internationalized format string. */
1367  const char *yyformat = YY_NULLPTR;
1368  /* Arguments of yyformat. */
1369  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1370  /* Number of reported tokens (one for the "unexpected", one per
1371  "expected"). */
1372  int yycount = 0;
1373 
1374  /* There are many possibilities here to consider:
1375  - If this state is a consistent state with a default action, then
1376  the only way this function was invoked is if the default action
1377  is an error action. In that case, don't check for expected
1378  tokens because there are none.
1379  - The only way there can be no lookahead present (in yychar) is if
1380  this state is a consistent state with a default action. Thus,
1381  detecting the absence of a lookahead is sufficient to determine
1382  that there is no unexpected or expected token to report. In that
1383  case, just report a simple "syntax error".
1384  - Don't assume there isn't a lookahead just because this state is a
1385  consistent state with a default action. There might have been a
1386  previous inconsistent state, consistent state with a non-default
1387  action, or user semantic action that manipulated yychar.
1388  - Of course, the expected token list depends on states to have
1389  correct lookahead information, and it depends on the parser not
1390  to perform extra reductions after fetching a lookahead from the
1391  scanner and before detecting a syntax error. Thus, state merging
1392  (from LALR or IELR) and default reductions corrupt the expected
1393  token list. However, the list is correct for canonical LR with
1394  one exception: it will still contain any token that will not be
1395  accepted due to an error action in a later state.
1396  */
1397  if (yytoken != YYEMPTY)
1398  {
1399  int yyn = yypact[*yyssp];
1400  yyarg[yycount++] = yytname[yytoken];
1401  if (!yypact_value_is_default (yyn))
1402  {
1403  /* Start YYX at -YYN if negative to avoid negative indexes in
1404  YYCHECK. In other words, skip the first -YYN actions for
1405  this state because they are default actions. */
1406  int yyxbegin = yyn < 0 ? -yyn : 0;
1407  /* Stay within bounds of both yycheck and yytname. */
1408  int yychecklim = YYLAST - yyn + 1;
1409  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1410  int yyx;
1411 
1412  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1413  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1414  && !yytable_value_is_error (yytable[yyx + yyn]))
1415  {
1416  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1417  {
1418  yycount = 1;
1419  yysize = yysize0;
1420  break;
1421  }
1422  yyarg[yycount++] = yytname[yyx];
1423  {
1424  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1425  if (! (yysize <= yysize1
1426  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1427  return 2;
1428  yysize = yysize1;
1429  }
1430  }
1431  }
1432  }
1433 
1434  switch (yycount)
1435  {
1436 # define YYCASE_(N, S) \
1437  case N: \
1438  yyformat = S; \
1439  break
1440  default: /* Avoid compiler warnings. */
1441  YYCASE_(0, YY_("syntax error"));
1442  YYCASE_(1, YY_("syntax error, unexpected %s"));
1443  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1444  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1445  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1446  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1447 # undef YYCASE_
1448  }
1449 
1450  {
1451  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1452  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1453  return 2;
1454  yysize = yysize1;
1455  }
1456 
1457  if (*yymsg_alloc < yysize)
1458  {
1459  *yymsg_alloc = 2 * yysize;
1460  if (! (yysize <= *yymsg_alloc
1461  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1462  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1463  return 1;
1464  }
1465 
1466  /* Avoid sprintf, as that infringes on the user's name space.
1467  Don't have undefined behavior even if the translation
1468  produced a string with the wrong number of "%s"s. */
1469  {
1470  char *yyp = *yymsg;
1471  int yyi = 0;
1472  while ((*yyp = *yyformat) != '\0')
1473  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1474  {
1475  yyp += yytnamerr (yyp, yyarg[yyi++]);
1476  yyformat += 2;
1477  }
1478  else
1479  {
1480  yyp++;
1481  yyformat++;
1482  }
1483  }
1484  return 0;
1485 }
1486 #endif /* YYERROR_VERBOSE */
1487 
1488 /*-----------------------------------------------.
1489 | Release the memory associated to this symbol. |
1490 `-----------------------------------------------*/
1491 
1492 static void
1493 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, WsCompiler* compiler)
1494 {
1495  YYUSE (yyvaluep);
1496  YYUSE (yylocationp);
1497  YYUSE (compiler);
1498  if (!yymsg)
1499  yymsg = "Deleting";
1500  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1501 
1503  YYUSE (yytype);
1505 }
1506 
1507 
1508 
1509 
1510 /*----------.
1511 | yyparse. |
1512 `----------*/
1513 
1514 int
1515 yyparse (WsCompiler* compiler)
1516 {
1517 /* The lookahead symbol. */
1518 int yychar;
1519 
1520 
1521 /* The semantic value of the lookahead symbol. */
1522 /* Default value used for initialization, for pacifying older GCCs
1523  or non-GCC compilers. */
1524 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1525 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1526 
1527 /* Location data for the lookahead symbol. */
1528 static YYLTYPE yyloc_default
1529 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1530  = { 1, 1, 1, 1 }
1531 # endif
1532 ;
1533 YYLTYPE yylloc = yyloc_default;
1534 
1535  /* Number of syntax errors so far. */
1536  int yynerrs;
1537 
1538  int yystate;
1539  /* Number of tokens to shift before error messages enabled. */
1540  int yyerrstatus;
1541 
1542  /* The stacks and their tools:
1543  'yyss': related to states.
1544  'yyvs': related to semantic values.
1545  'yyls': related to locations.
1546 
1547  Refer to the stacks through separate pointers, to allow yyoverflow
1548  to reallocate them elsewhere. */
1549 
1550  /* The state stack. */
1551  yytype_int16 yyssa[YYINITDEPTH];
1552  yytype_int16 *yyss;
1553  yytype_int16 *yyssp;
1554 
1555  /* The semantic value stack. */
1556  YYSTYPE yyvsa[YYINITDEPTH];
1557  YYSTYPE *yyvs;
1558  YYSTYPE *yyvsp;
1559 
1560  /* The location stack. */
1561  YYLTYPE yylsa[YYINITDEPTH];
1562  YYLTYPE *yyls;
1563  YYLTYPE *yylsp;
1564 
1565  /* The locations where the error started and ended. */
1566  YYLTYPE yyerror_range[3];
1567 
1568  YYSIZE_T yystacksize;
1569 
1570  int yyn;
1571  int yyresult;
1572  /* Lookahead token as an internal (translated) token number. */
1573  int yytoken = 0;
1574  /* The variables used to return semantic value and location from the
1575  action routines. */
1576  YYSTYPE yyval;
1577  YYLTYPE yyloc;
1578 
1579 #if YYERROR_VERBOSE
1580  /* Buffer for error messages, and its allocated size. */
1581  char yymsgbuf[128];
1582  char *yymsg = yymsgbuf;
1583  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1584 #endif
1585 
1586 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1587 
1588  /* The number of symbols on the RHS of the reduced rule.
1589  Keep to zero when no symbol should be popped. */
1590  int yylen = 0;
1591 
1592  yyssp = yyss = yyssa;
1593  yyvsp = yyvs = yyvsa;
1594  yylsp = yyls = yylsa;
1595  yystacksize = YYINITDEPTH;
1596 
1597  YYDPRINTF ((stderr, "Starting parse\n"));
1598 
1599  yystate = 0;
1600  yyerrstatus = 0;
1601  yynerrs = 0;
1602  yychar = YYEMPTY; /* Cause a token to be read. */
1603  yylsp[0] = yylloc;
1604  goto yysetstate;
1605 
1606 /*------------------------------------------------------------.
1607 | yynewstate -- Push a new state, which is found in yystate. |
1608 `------------------------------------------------------------*/
1609  yynewstate:
1610  /* In all cases, when you get here, the value and location stacks
1611  have just been pushed. So pushing a state here evens the stacks. */
1612  yyssp++;
1613 
1614  yysetstate:
1615  *yyssp = yystate;
1616 
1617  if (yyss + yystacksize - 1 <= yyssp)
1618  {
1619  /* Get the current used size of the three stacks, in elements. */
1620  YYSIZE_T yysize = yyssp - yyss + 1;
1621 
1622 #ifdef yyoverflow
1623  {
1624  /* Give user a chance to reallocate the stack. Use copies of
1625  these so that the &'s don't force the real ones into
1626  memory. */
1627  YYSTYPE *yyvs1 = yyvs;
1628  yytype_int16 *yyss1 = yyss;
1629  YYLTYPE *yyls1 = yyls;
1630 
1631  /* Each stack pointer address is followed by the size of the
1632  data in use in that stack, in bytes. This used to be a
1633  conditional around just the two extra args, but that might
1634  be undefined if yyoverflow is a macro. */
1635  yyoverflow (YY_("memory exhausted"),
1636  &yyss1, yysize * sizeof (*yyssp),
1637  &yyvs1, yysize * sizeof (*yyvsp),
1638  &yyls1, yysize * sizeof (*yylsp),
1639  &yystacksize);
1640 
1641  yyls = yyls1;
1642  yyss = yyss1;
1643  yyvs = yyvs1;
1644  }
1645 #else /* no yyoverflow */
1646 # ifndef YYSTACK_RELOCATE
1647  goto yyexhaustedlab;
1648 # else
1649  /* Extend the stack our own way. */
1650  if (YYMAXDEPTH <= yystacksize)
1651  goto yyexhaustedlab;
1652  yystacksize *= 2;
1653  if (YYMAXDEPTH < yystacksize)
1654  yystacksize = YYMAXDEPTH;
1655 
1656  {
1657  yytype_int16 *yyss1 = yyss;
1658  union yyalloc *yyptr =
1659  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1660  if (! yyptr)
1661  goto yyexhaustedlab;
1662  YYSTACK_RELOCATE (yyss_alloc, yyss);
1663  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1664  YYSTACK_RELOCATE (yyls_alloc, yyls);
1665 # undef YYSTACK_RELOCATE
1666  if (yyss1 != yyssa)
1667  YYSTACK_FREE (yyss1);
1668  }
1669 # endif
1670 #endif /* no yyoverflow */
1671 
1672  yyssp = yyss + yysize - 1;
1673  yyvsp = yyvs + yysize - 1;
1674  yylsp = yyls + yysize - 1;
1675 
1676  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1677  (unsigned long int) yystacksize));
1678 
1679  if (yyss + yystacksize - 1 <= yyssp)
1680  YYABORT;
1681  }
1682 
1683  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1684 
1685  if (yystate == YYFINAL)
1686  YYACCEPT;
1687 
1688  goto yybackup;
1689 
1690 /*-----------.
1691 | yybackup. |
1692 `-----------*/
1693 yybackup:
1694 
1695  /* Do appropriate processing given the current state. Read a
1696  lookahead token if we need one and don't already have one. */
1697 
1698  /* First try to decide what to do without reference to lookahead token. */
1699  yyn = yypact[yystate];
1700  if (yypact_value_is_default (yyn))
1701  goto yydefault;
1702 
1703  /* Not known => get a lookahead token if don't already have one. */
1704 
1705  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1706  if (yychar == YYEMPTY)
1707  {
1708  YYDPRINTF ((stderr, "Reading a token: "));
1709  yychar = yylex (&yylval, &yylloc, compiler);
1710  }
1711 
1712  if (yychar <= YYEOF)
1713  {
1714  yychar = yytoken = YYEOF;
1715  YYDPRINTF ((stderr, "Now at end of input.\n"));
1716  }
1717  else
1718  {
1719  yytoken = YYTRANSLATE (yychar);
1720  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1721  }
1722 
1723  /* If the proper action on seeing token YYTOKEN is to reduce or to
1724  detect an error, take that action. */
1725  yyn += yytoken;
1726  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1727  goto yydefault;
1728  yyn = yytable[yyn];
1729  if (yyn <= 0)
1730  {
1731  if (yytable_value_is_error (yyn))
1732  goto yyerrlab;
1733  yyn = -yyn;
1734  goto yyreduce;
1735  }
1736 
1737  /* Count tokens shifted since error; after three, turn off error
1738  status. */
1739  if (yyerrstatus)
1740  yyerrstatus--;
1741 
1742  /* Shift the lookahead token. */
1743  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1744 
1745  /* Discard the shifted token. */
1746  yychar = YYEMPTY;
1747 
1748  yystate = yyn;
1750  *++yyvsp = yylval;
1752  *++yylsp = yylloc;
1753  goto yynewstate;
1754 
1755 
1756 /*-----------------------------------------------------------.
1757 | yydefault -- do the default action for the current state. |
1758 `-----------------------------------------------------------*/
1759 yydefault:
1760  yyn = yydefact[yystate];
1761  if (yyn == 0)
1762  goto yyerrlab;
1763  goto yyreduce;
1764 
1765 
1766 /*-----------------------------.
1767 | yyreduce -- Do a reduction. |
1768 `-----------------------------*/
1769 yyreduce:
1770  /* yyn is the number of a rule to reduce with. */
1771  yylen = yyr2[yyn];
1772 
1773  /* If YYLEN is nonzero, implement the default value of the action:
1774  '$$ = $1'.
1775 
1776  Otherwise, the following line sets YYVAL to garbage.
1777  This behavior is undocumented and Bison
1778  users should not rely upon it. Assigning to YYVAL
1779  unconditionally makes the parser a bit smaller, and it avoids a
1780  GCC warning that YYVAL may be used uninitialized. */
1781  yyval = yyvsp[1-yylen];
1782 
1783  /* Default location. */
1784  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1785  yyerror_range[1] = yyloc;
1786  YY_REDUCE_PRINT (yyn);
1787  switch (yyn)
1788  {
1789  case 4:
1790 #line 128 "wmlscript/wsgram.y" /* yacc.c:1648 */
1791  { ws_error_syntax(compiler, (yylsp[0]).first_line); }
1792 #line 1793 "y.tab.c" /* yacc.c:1648 */
1793  break;
1794 
1795  case 8:
1796 #line 141 "wmlscript/wsgram.y" /* yacc.c:1648 */
1797  { ws_error_syntax(compiler, (yylsp[0]).first_line); }
1798 #line 1799 "y.tab.c" /* yacc.c:1648 */
1799  break;
1800 
1801  case 12:
1802 #line 152 "wmlscript/wsgram.y" /* yacc.c:1648 */
1803  { ws_pragma_use(compiler, (yylsp[-1]).first_line, (yyvsp[-1].identifier), (yyvsp[0].string)); }
1804 #line 1805 "y.tab.c" /* yacc.c:1648 */
1805  break;
1806 
1807  case 14:
1808 #line 161 "wmlscript/wsgram.y" /* yacc.c:1648 */
1809  {
1810  /* Pass this to the byte-code */
1811  if (!ws_bc_add_pragma_access_domain(compiler->bc, (yyvsp[0].string)->data,
1812  (yyvsp[0].string)->len))
1813  ws_error_memory(compiler);
1814  ws_lexer_free_utf8(compiler, (yyvsp[0].string));
1815  }
1816 #line 1817 "y.tab.c" /* yacc.c:1648 */
1817  break;
1818 
1819  case 15:
1820 #line 169 "wmlscript/wsgram.y" /* yacc.c:1648 */
1821  {
1822  /* Pass this to the byte-code */
1823  if (!ws_bc_add_pragma_access_path(compiler->bc, (yyvsp[0].string)->data,
1824  (yyvsp[0].string)->len))
1825  ws_error_memory(compiler);
1826 
1827  ws_lexer_free_utf8(compiler, (yyvsp[0].string));
1828  }
1829 #line 1830 "y.tab.c" /* yacc.c:1648 */
1830  break;
1831 
1832  case 16:
1833 #line 178 "wmlscript/wsgram.y" /* yacc.c:1648 */
1834  {
1835  WsBool success = WS_TRUE;
1836 
1837  /* Pass these to the byte-code */
1838  if (!ws_bc_add_pragma_access_domain(compiler->bc, (yyvsp[-2].string)->data,
1839  (yyvsp[-2].string)->len))
1840  success = WS_FALSE;
1841 
1842  if (!ws_bc_add_pragma_access_path(compiler->bc, (yyvsp[0].string)->data,
1843  (yyvsp[0].string)->len))
1844  success = WS_FALSE;
1845 
1846  if (!success)
1847  ws_error_memory(compiler);
1848 
1849  ws_lexer_free_utf8(compiler, (yyvsp[-2].string));
1850  ws_lexer_free_utf8(compiler, (yyvsp[0].string));
1851  }
1852 #line 1853 "y.tab.c" /* yacc.c:1648 */
1853  break;
1854 
1855  case 21:
1856 #line 210 "wmlscript/wsgram.y" /* yacc.c:1648 */
1857  {
1858  /* Meta information for the origin servers. Show it
1859  * to the user if requested. */
1860  if (compiler->params.meta_name_cb)
1861  (*compiler->params.meta_name_cb)(
1862  (yyvsp[0].meta_body)->property_name, (yyvsp[0].meta_body)->content,
1863  (yyvsp[0].meta_body)->scheme,
1864  compiler->params.meta_name_cb_context);
1865 
1866  /* We do not need the MetaBody anymore. */
1867  ws_pragma_meta_body_free(compiler, (yyvsp[0].meta_body));
1868  }
1869 #line 1870 "y.tab.c" /* yacc.c:1648 */
1870  break;
1871 
1872  case 22:
1873 #line 226 "wmlscript/wsgram.y" /* yacc.c:1648 */
1874  {
1875  /* Meta information HTTP header that should be
1876  * included to an HTTP response header. Show it to
1877  * the user if requested. */
1878  if (compiler->params.meta_http_equiv_cb)
1879  (*compiler->params.meta_http_equiv_cb)(
1880  (yyvsp[0].meta_body)->property_name,
1881  (yyvsp[0].meta_body)->content,
1882  (yyvsp[0].meta_body)->scheme,
1884 
1885  /* We do not need the MetaBody anymore. */
1886  ws_pragma_meta_body_free(compiler, (yyvsp[0].meta_body));
1887  }
1888 #line 1889 "y.tab.c" /* yacc.c:1648 */
1889  break;
1890 
1891  case 23:
1892 #line 244 "wmlscript/wsgram.y" /* yacc.c:1648 */
1893  {
1894  WsBool success;
1895 
1896  /* Pass this pragma to the byte-code */
1897  if ((yyvsp[0].meta_body)) {
1898  if ((yyvsp[0].meta_body)->scheme)
1899  success
1901  compiler->bc,
1902  (yyvsp[0].meta_body)->property_name->data,
1903  (yyvsp[0].meta_body)->property_name->len,
1904  (yyvsp[0].meta_body)->content->data,
1905  (yyvsp[0].meta_body)->content->len,
1906  (yyvsp[0].meta_body)->scheme->data,
1907  (yyvsp[0].meta_body)->scheme->len);
1908  else
1910  compiler->bc,
1911  (yyvsp[0].meta_body)->property_name->data,
1912  (yyvsp[0].meta_body)->property_name->len,
1913  (yyvsp[0].meta_body)->content->data,
1914  (yyvsp[0].meta_body)->content->len);
1915 
1916  /* Free the MetaBody. */
1917  ws_pragma_meta_body_free(compiler, (yyvsp[0].meta_body));
1918 
1919  if (!success)
1920  ws_error_memory(compiler);
1921  }
1922  }
1923 #line 1924 "y.tab.c" /* yacc.c:1648 */
1924  break;
1925 
1926  case 24:
1927 #line 278 "wmlscript/wsgram.y" /* yacc.c:1648 */
1928  { (yyval.meta_body) = ws_pragma_meta_body(compiler, (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1929 #line 1930 "y.tab.c" /* yacc.c:1648 */
1930  break;
1931 
1932  case 25:
1933 #line 280 "wmlscript/wsgram.y" /* yacc.c:1648 */
1934  { (yyval.meta_body) = ws_pragma_meta_body(compiler, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1935 #line 1936 "y.tab.c" /* yacc.c:1648 */
1936  break;
1937 
1938  case 31:
1939 #line 297 "wmlscript/wsgram.y" /* yacc.c:1648 */
1940  {
1941  char *name = ws_strdup((yyvsp[-5].identifier));
1942 
1943  ws_lexer_free_block(compiler, (yyvsp[-5].identifier));
1944 
1945  if (name)
1946  ws_function(compiler, (yyvsp[-7].boolean), name, (yylsp[-5]).first_line, (yyvsp[-3].list), (yyvsp[-1].list));
1947  else
1948  ws_error_memory(compiler);
1949  }
1950 #line 1951 "y.tab.c" /* yacc.c:1648 */
1951  break;
1952 
1953  case 32:
1954 #line 310 "wmlscript/wsgram.y" /* yacc.c:1648 */
1955  { (yyval.boolean) = WS_FALSE; }
1956 #line 1957 "y.tab.c" /* yacc.c:1648 */
1957  break;
1958 
1959  case 33:
1960 #line 311 "wmlscript/wsgram.y" /* yacc.c:1648 */
1961  { (yyval.boolean) = WS_TRUE; }
1962 #line 1963 "y.tab.c" /* yacc.c:1648 */
1963  break;
1964 
1965  case 34:
1966 #line 316 "wmlscript/wsgram.y" /* yacc.c:1648 */
1967  { (yyval.list) = ws_list_new(compiler); }
1968 #line 1969 "y.tab.c" /* yacc.c:1648 */
1969  break;
1970 
1971  case 38:
1972 #line 327 "wmlscript/wsgram.y" /* yacc.c:1648 */
1973  {
1974  char *id;
1975  WsFormalParm *parm;
1976 
1977  id = ws_f_strdup((compiler)->pool_stree, (yyvsp[0].identifier));
1978  parm = ws_formal_parameter(compiler, (yylsp[0]).first_line, id);
1979 
1980  ws_lexer_free_block(compiler, (yyvsp[0].identifier));
1981 
1982  if (id == NULL || parm == NULL) {
1983  ws_error_memory(compiler);
1984  (yyval.list) = NULL;
1985  } else {
1986  (yyval.list) = ws_list_new(compiler);
1987  ws_list_append(compiler, (yyval.list), parm);
1988  }
1989  }
1990 #line 1991 "y.tab.c" /* yacc.c:1648 */
1991  break;
1992 
1993  case 39:
1994 #line 345 "wmlscript/wsgram.y" /* yacc.c:1648 */
1995  {
1996  char *id;
1997  WsFormalParm *parm;
1998 
1999  id = ws_f_strdup(compiler->pool_stree, (yyvsp[0].identifier));
2000  parm = ws_formal_parameter(compiler, (yylsp[-2]).first_line, id);
2001 
2002  ws_lexer_free_block(compiler, (yyvsp[0].identifier));
2003 
2004  if (id == NULL || parm == NULL) {
2005  ws_error_memory(compiler);
2006  (yyval.list) = NULL;
2007  } else
2008  ws_list_append(compiler, (yyvsp[-2].list), parm);
2009  }
2010 #line 2011 "y.tab.c" /* yacc.c:1648 */
2011  break;
2012 
2013  case 40:
2014 #line 366 "wmlscript/wsgram.y" /* yacc.c:1648 */
2015  {
2016  if ((yyvsp[0].list))
2017  (yyval.stmt) = ws_stmt_block(compiler, (yyvsp[0].list)->first_line, (yyvsp[0].list)->last_line,
2018  (yyvsp[0].list));
2019  else
2020  (yyval.stmt) = NULL;
2021  }
2022 #line 2023 "y.tab.c" /* yacc.c:1648 */
2023  break;
2024 
2025  case 42:
2026 #line 375 "wmlscript/wsgram.y" /* yacc.c:1648 */
2027  { (yyval.stmt) = ws_stmt_empty(compiler, (yylsp[0]).first_line); }
2028 #line 2029 "y.tab.c" /* yacc.c:1648 */
2029  break;
2030 
2031  case 43:
2032 #line 377 "wmlscript/wsgram.y" /* yacc.c:1648 */
2033  { (yyval.stmt) = ws_stmt_expr(compiler, (yyvsp[-1].expr)->line, (yyvsp[-1].expr)); }
2034 #line 2035 "y.tab.c" /* yacc.c:1648 */
2035  break;
2036 
2037  case 46:
2038 #line 381 "wmlscript/wsgram.y" /* yacc.c:1648 */
2039  { (yyval.stmt) = ws_stmt_continue(compiler, (yylsp[-1]).first_line); }
2040 #line 2041 "y.tab.c" /* yacc.c:1648 */
2041  break;
2042 
2043  case 47:
2044 #line 383 "wmlscript/wsgram.y" /* yacc.c:1648 */
2045  { (yyval.stmt) = ws_stmt_break(compiler, (yylsp[-1]).first_line); }
2046 #line 2047 "y.tab.c" /* yacc.c:1648 */
2047  break;
2048 
2049  case 49:
2050 #line 388 "wmlscript/wsgram.y" /* yacc.c:1648 */
2051  {
2052  (yyval.list) = (yyvsp[-1].list);
2053  if ((yyval.list)) {
2054  (yyval.list)->first_line = (yylsp[-2]).first_line;
2055  (yyval.list)->last_line = (yylsp[0]).first_line;
2056  }
2057  }
2058 #line 2059 "y.tab.c" /* yacc.c:1648 */
2059  break;
2060 
2061  case 50:
2062 #line 396 "wmlscript/wsgram.y" /* yacc.c:1648 */
2063  {
2064  ws_error_syntax(compiler, (yylsp[0]).first_line);
2065  (yyval.list) = NULL;
2066  }
2067 #line 2068 "y.tab.c" /* yacc.c:1648 */
2068  break;
2069 
2070  case 51:
2071 #line 404 "wmlscript/wsgram.y" /* yacc.c:1648 */
2072  { (yyval.list) = ws_list_new(compiler); }
2073 #line 2074 "y.tab.c" /* yacc.c:1648 */
2074  break;
2075 
2076  case 53:
2077 #line 410 "wmlscript/wsgram.y" /* yacc.c:1648 */
2078  {
2079  (yyval.list) = ws_list_new(compiler);
2080  ws_list_append(compiler, (yyval.list), (yyvsp[0].stmt));
2081  }
2082 #line 2083 "y.tab.c" /* yacc.c:1648 */
2083  break;
2084 
2085  case 54:
2086 #line 415 "wmlscript/wsgram.y" /* yacc.c:1648 */
2087  { ws_list_append(compiler, (yyvsp[-1].list), (yyvsp[0].stmt)); }
2088 #line 2089 "y.tab.c" /* yacc.c:1648 */
2089  break;
2090 
2091  case 55:
2092 #line 420 "wmlscript/wsgram.y" /* yacc.c:1648 */
2093  { (yyval.stmt) = ws_stmt_variable(compiler, (yylsp[-2]).first_line, (yyvsp[-1].list)); }
2094 #line 2095 "y.tab.c" /* yacc.c:1648 */
2095  break;
2096 
2097  case 56:
2098 #line 422 "wmlscript/wsgram.y" /* yacc.c:1648 */
2099  { ws_error_syntax(compiler, (yylsp[0]).first_line); }
2100 #line 2101 "y.tab.c" /* yacc.c:1648 */
2101  break;
2102 
2103  case 57:
2104 #line 427 "wmlscript/wsgram.y" /* yacc.c:1648 */
2105  {
2106  (yyval.list) = ws_list_new(compiler);
2107  ws_list_append(compiler, (yyval.list), (yyvsp[0].vardec));
2108  }
2109 #line 2110 "y.tab.c" /* yacc.c:1648 */
2110  break;
2111 
2112  case 58:
2113 #line 432 "wmlscript/wsgram.y" /* yacc.c:1648 */
2114  { ws_list_append(compiler, (yyvsp[-2].list), (yyvsp[0].vardec)); }
2115 #line 2116 "y.tab.c" /* yacc.c:1648 */
2116  break;
2117 
2118  case 59:
2119 #line 437 "wmlscript/wsgram.y" /* yacc.c:1648 */
2120  {
2121  char *id = ws_f_strdup(compiler->pool_stree,
2122  (yyvsp[-1].identifier));
2123 
2124  ws_lexer_free_block(compiler, (yyvsp[-1].identifier));
2125  if (id == NULL) {
2126  ws_error_memory(compiler);
2127  (yyval.vardec) = NULL;
2128  } else
2129  (yyval.vardec) = ws_variable_declaration(compiler, id, (yyvsp[0].expr));
2130  }
2131 #line 2132 "y.tab.c" /* yacc.c:1648 */
2132  break;
2133 
2134  case 60:
2135 #line 452 "wmlscript/wsgram.y" /* yacc.c:1648 */
2136  { (yyval.expr) = NULL; }
2137 #line 2138 "y.tab.c" /* yacc.c:1648 */
2138  break;
2139 
2140  case 61:
2141 #line 454 "wmlscript/wsgram.y" /* yacc.c:1648 */
2142  { (yyval.expr) = (yyvsp[0].expr); }
2143 #line 2144 "y.tab.c" /* yacc.c:1648 */
2144  break;
2145 
2146  case 62:
2147 #line 459 "wmlscript/wsgram.y" /* yacc.c:1648 */
2148  { (yyval.stmt) = ws_stmt_if(compiler, (yylsp[-6]).first_line, (yyvsp[-4].expr), (yyvsp[-2].stmt), (yyvsp[0].stmt)); }
2149 #line 2150 "y.tab.c" /* yacc.c:1648 */
2150  break;
2151 
2152  case 63:
2153 #line 461 "wmlscript/wsgram.y" /* yacc.c:1648 */
2154  { (yyval.stmt) = ws_stmt_if(compiler, (yylsp[-4]).first_line, (yyvsp[-2].expr), (yyvsp[0].stmt), NULL); }
2155 #line 2156 "y.tab.c" /* yacc.c:1648 */
2156  break;
2157 
2158  case 64:
2159 #line 466 "wmlscript/wsgram.y" /* yacc.c:1648 */
2160  { (yyval.stmt) = ws_stmt_while(compiler, (yylsp[-4]).first_line, (yyvsp[-2].expr), (yyvsp[0].stmt)); }
2161 #line 2162 "y.tab.c" /* yacc.c:1648 */
2162  break;
2163 
2164  case 66:
2165 #line 473 "wmlscript/wsgram.y" /* yacc.c:1648 */
2166  { (yyval.stmt) = ws_stmt_for(compiler, (yylsp[-8]).first_line, NULL, (yyvsp[-6].expr), (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].stmt)); }
2167 #line 2168 "y.tab.c" /* yacc.c:1648 */
2168  break;
2169 
2170  case 67:
2171 #line 476 "wmlscript/wsgram.y" /* yacc.c:1648 */
2172  { (yyval.stmt) = ws_stmt_for(compiler, (yylsp[-9]).first_line, (yyvsp[-6].list), NULL, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].stmt)); }
2173 #line 2174 "y.tab.c" /* yacc.c:1648 */
2174  break;
2175 
2176  case 68:
2177 #line 481 "wmlscript/wsgram.y" /* yacc.c:1648 */
2178  { (yyval.stmt) = ws_stmt_return(compiler, (yylsp[-2]).first_line, (yyvsp[-1].expr)); }
2179 #line 2180 "y.tab.c" /* yacc.c:1648 */
2180  break;
2181 
2182  case 69:
2183 #line 487 "wmlscript/wsgram.y" /* yacc.c:1648 */
2184  { (yyval.expr) = NULL; }
2185 #line 2186 "y.tab.c" /* yacc.c:1648 */
2186  break;
2187 
2188  case 72:
2189 #line 495 "wmlscript/wsgram.y" /* yacc.c:1648 */
2190  { (yyval.expr) = ws_expr_comma(compiler, (yylsp[-1]).first_line, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2191 #line 2192 "y.tab.c" /* yacc.c:1648 */
2192  break;
2193 
2194  case 74:
2195 #line 501 "wmlscript/wsgram.y" /* yacc.c:1648 */
2196  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), '=', (yyvsp[0].expr)); }
2197 #line 2198 "y.tab.c" /* yacc.c:1648 */
2198  break;
2199 
2200  case 75:
2201 #line 503 "wmlscript/wsgram.y" /* yacc.c:1648 */
2202  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tMULA, (yyvsp[0].expr)); }
2203 #line 2204 "y.tab.c" /* yacc.c:1648 */
2204  break;
2205 
2206  case 76:
2207 #line 505 "wmlscript/wsgram.y" /* yacc.c:1648 */
2208  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tDIVA, (yyvsp[0].expr)); }
2209 #line 2210 "y.tab.c" /* yacc.c:1648 */
2210  break;
2211 
2212  case 77:
2213 #line 507 "wmlscript/wsgram.y" /* yacc.c:1648 */
2214  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tREMA, (yyvsp[0].expr)); }
2215 #line 2216 "y.tab.c" /* yacc.c:1648 */
2216  break;
2217 
2218  case 78:
2219 #line 509 "wmlscript/wsgram.y" /* yacc.c:1648 */
2220  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tADDA, (yyvsp[0].expr)); }
2221 #line 2222 "y.tab.c" /* yacc.c:1648 */
2222  break;
2223 
2224  case 79:
2225 #line 511 "wmlscript/wsgram.y" /* yacc.c:1648 */
2226  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tSUBA, (yyvsp[0].expr)); }
2227 #line 2228 "y.tab.c" /* yacc.c:1648 */
2228  break;
2229 
2230  case 80:
2231 #line 513 "wmlscript/wsgram.y" /* yacc.c:1648 */
2232  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tLSHIFTA, (yyvsp[0].expr)); }
2233 #line 2234 "y.tab.c" /* yacc.c:1648 */
2234  break;
2235 
2236  case 81:
2237 #line 515 "wmlscript/wsgram.y" /* yacc.c:1648 */
2238  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tRSSHIFTA, (yyvsp[0].expr)); }
2239 #line 2240 "y.tab.c" /* yacc.c:1648 */
2240  break;
2241 
2242  case 82:
2243 #line 517 "wmlscript/wsgram.y" /* yacc.c:1648 */
2244  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tRSZSHIFTA, (yyvsp[0].expr)); }
2245 #line 2246 "y.tab.c" /* yacc.c:1648 */
2246  break;
2247 
2248  case 83:
2249 #line 519 "wmlscript/wsgram.y" /* yacc.c:1648 */
2250  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tANDA, (yyvsp[0].expr)); }
2251 #line 2252 "y.tab.c" /* yacc.c:1648 */
2252  break;
2253 
2254  case 84:
2255 #line 521 "wmlscript/wsgram.y" /* yacc.c:1648 */
2256  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tXORA, (yyvsp[0].expr)); }
2257 #line 2258 "y.tab.c" /* yacc.c:1648 */
2258  break;
2259 
2260  case 85:
2261 #line 523 "wmlscript/wsgram.y" /* yacc.c:1648 */
2262  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tORA, (yyvsp[0].expr)); }
2263 #line 2264 "y.tab.c" /* yacc.c:1648 */
2264  break;
2265 
2266  case 86:
2267 #line 525 "wmlscript/wsgram.y" /* yacc.c:1648 */
2268  { (yyval.expr) = ws_expr_assign(compiler, (yylsp[-2]).first_line, (yyvsp[-2].identifier), tIDIVA, (yyvsp[0].expr)); }
2269 #line 2270 "y.tab.c" /* yacc.c:1648 */
2270  break;
2271 
2272  case 88:
2273 #line 531 "wmlscript/wsgram.y" /* yacc.c:1648 */
2274  { (yyval.expr) = ws_expr_conditional(compiler, (yylsp[-3]).first_line, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
2275 #line 2276 "y.tab.c" /* yacc.c:1648 */
2276  break;
2277 
2278  case 90:
2279 #line 537 "wmlscript/wsgram.y" /* yacc.c:1648 */
2280  { (yyval.expr) = ws_expr_logical(compiler, (yylsp[-1]).first_line, WS_ASM_SCOR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2281 #line 2282 "y.tab.c" /* yacc.c:1648 */
2282  break;
2283 
2284  case 92:
2285 #line 543 "wmlscript/wsgram.y" /* yacc.c:1648 */
2286  { (yyval.expr) = ws_expr_logical(compiler, (yylsp[-1]).first_line, WS_ASM_SCAND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2287 #line 2288 "y.tab.c" /* yacc.c:1648 */
2288  break;
2289 
2290  case 94:
2291 #line 549 "wmlscript/wsgram.y" /* yacc.c:1648 */
2292  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_B_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2293 #line 2294 "y.tab.c" /* yacc.c:1648 */
2294  break;
2295 
2296  case 96:
2297 #line 555 "wmlscript/wsgram.y" /* yacc.c:1648 */
2298  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_B_XOR, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2299 #line 2300 "y.tab.c" /* yacc.c:1648 */
2300  break;
2301 
2302  case 98:
2303 #line 561 "wmlscript/wsgram.y" /* yacc.c:1648 */
2304  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_B_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2305 #line 2306 "y.tab.c" /* yacc.c:1648 */
2306  break;
2307 
2308  case 100:
2309 #line 567 "wmlscript/wsgram.y" /* yacc.c:1648 */
2310  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_EQ, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2311 #line 2312 "y.tab.c" /* yacc.c:1648 */
2312  break;
2313 
2314  case 101:
2315 #line 569 "wmlscript/wsgram.y" /* yacc.c:1648 */
2316  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_NE, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2317 #line 2318 "y.tab.c" /* yacc.c:1648 */
2318  break;
2319 
2320  case 103:
2321 #line 575 "wmlscript/wsgram.y" /* yacc.c:1648 */
2322  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_LT, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2323 #line 2324 "y.tab.c" /* yacc.c:1648 */
2324  break;
2325 
2326  case 104:
2327 #line 577 "wmlscript/wsgram.y" /* yacc.c:1648 */
2328  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_GT, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2329 #line 2330 "y.tab.c" /* yacc.c:1648 */
2330  break;
2331 
2332  case 105:
2333 #line 579 "wmlscript/wsgram.y" /* yacc.c:1648 */
2334  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_LE, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2335 #line 2336 "y.tab.c" /* yacc.c:1648 */
2336  break;
2337 
2338  case 106:
2339 #line 581 "wmlscript/wsgram.y" /* yacc.c:1648 */
2340  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_GE, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2341 #line 2342 "y.tab.c" /* yacc.c:1648 */
2342  break;
2343 
2344  case 108:
2345 #line 587 "wmlscript/wsgram.y" /* yacc.c:1648 */
2346  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_B_LSHIFT, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2347 #line 2348 "y.tab.c" /* yacc.c:1648 */
2348  break;
2349 
2350  case 109:
2351 #line 589 "wmlscript/wsgram.y" /* yacc.c:1648 */
2352  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_B_RSSHIFT, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2353 #line 2354 "y.tab.c" /* yacc.c:1648 */
2354  break;
2355 
2356  case 110:
2357 #line 591 "wmlscript/wsgram.y" /* yacc.c:1648 */
2358  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_B_RSZSHIFT, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2359 #line 2360 "y.tab.c" /* yacc.c:1648 */
2360  break;
2361 
2362  case 112:
2363 #line 597 "wmlscript/wsgram.y" /* yacc.c:1648 */
2364  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_ADD, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2365 #line 2366 "y.tab.c" /* yacc.c:1648 */
2366  break;
2367 
2368  case 113:
2369 #line 599 "wmlscript/wsgram.y" /* yacc.c:1648 */
2370  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_SUB, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2371 #line 2372 "y.tab.c" /* yacc.c:1648 */
2372  break;
2373 
2374  case 115:
2375 #line 605 "wmlscript/wsgram.y" /* yacc.c:1648 */
2376  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_MUL, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2377 #line 2378 "y.tab.c" /* yacc.c:1648 */
2378  break;
2379 
2380  case 116:
2381 #line 607 "wmlscript/wsgram.y" /* yacc.c:1648 */
2382  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_DIV, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2383 #line 2384 "y.tab.c" /* yacc.c:1648 */
2384  break;
2385 
2386  case 117:
2387 #line 609 "wmlscript/wsgram.y" /* yacc.c:1648 */
2388  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_IDIV, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2389 #line 2390 "y.tab.c" /* yacc.c:1648 */
2390  break;
2391 
2392  case 118:
2393 #line 611 "wmlscript/wsgram.y" /* yacc.c:1648 */
2394  { (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_REM, (yyvsp[-2].expr), (yyvsp[0].expr)); }
2395 #line 2396 "y.tab.c" /* yacc.c:1648 */
2396  break;
2397 
2398  case 120:
2399 #line 617 "wmlscript/wsgram.y" /* yacc.c:1648 */
2400  { (yyval.expr) = ws_expr_unary(compiler, (yylsp[-1]).first_line, WS_ASM_TYPEOF, (yyvsp[0].expr)); }
2401 #line 2402 "y.tab.c" /* yacc.c:1648 */
2402  break;
2403 
2404  case 121:
2405 #line 619 "wmlscript/wsgram.y" /* yacc.c:1648 */
2406  { (yyval.expr) = ws_expr_unary(compiler, (yylsp[-1]).first_line, WS_ASM_ISVALID, (yyvsp[0].expr)); }
2407 #line 2408 "y.tab.c" /* yacc.c:1648 */
2408  break;
2409 
2410  case 122:
2411 #line 621 "wmlscript/wsgram.y" /* yacc.c:1648 */
2412  { (yyval.expr) = ws_expr_unary_var(compiler, (yylsp[-1]).first_line, WS_TRUE, (yyvsp[0].identifier)); }
2413 #line 2414 "y.tab.c" /* yacc.c:1648 */
2414  break;
2415 
2416  case 123:
2417 #line 623 "wmlscript/wsgram.y" /* yacc.c:1648 */
2418  { (yyval.expr) = ws_expr_unary_var(compiler, (yylsp[-1]).first_line, WS_FALSE, (yyvsp[0].identifier)); }
2419 #line 2420 "y.tab.c" /* yacc.c:1648 */
2420  break;
2421 
2422  case 124:
2423 #line 625 "wmlscript/wsgram.y" /* yacc.c:1648 */
2424  {
2425  /* There is no direct way to compile unary `+'.
2426  * It doesn't do anything except require type conversion
2427  * (section 7.2, 7.3.2), and we do that by converting
2428  * it to a binary expression: `UnaryExpression - 0'.
2429  * Using `--UnaryExpression' would not be correct because
2430  * it might overflow if UnaryExpression is the smallest
2431  * possible integer value (see 6.2.7.1).
2432  * Using `UnaryExpression + 0' would not be correct
2433  * because binary `+' accepts strings, which makes the
2434  * type conversion different.
2435  */
2436  (yyval.expr) = ws_expr_binary(compiler, (yylsp[-1]).first_line, WS_ASM_SUB, (yyvsp[0].expr),
2437  ws_expr_const_integer(compiler, (yylsp[-1]).first_line, 0));
2438  }
2439 #line 2440 "y.tab.c" /* yacc.c:1648 */
2440  break;
2441 
2442  case 125:
2443 #line 641 "wmlscript/wsgram.y" /* yacc.c:1648 */
2444  { (yyval.expr) = ws_expr_unary(compiler, (yylsp[-1]).first_line, WS_ASM_UMINUS, (yyvsp[0].expr)); }
2445 #line 2446 "y.tab.c" /* yacc.c:1648 */
2446  break;
2447 
2448  case 126:
2449 #line 643 "wmlscript/wsgram.y" /* yacc.c:1648 */
2450  { (yyval.expr) = ws_expr_unary(compiler, (yylsp[-1]).first_line, WS_ASM_B_NOT, (yyvsp[0].expr)); }
2451 #line 2452 "y.tab.c" /* yacc.c:1648 */
2452  break;
2453 
2454  case 127:
2455 #line 645 "wmlscript/wsgram.y" /* yacc.c:1648 */
2456  { (yyval.expr) = ws_expr_unary(compiler, (yylsp[-1]).first_line, WS_ASM_NOT, (yyvsp[0].expr)); }
2457 #line 2458 "y.tab.c" /* yacc.c:1648 */
2458  break;
2459 
2460  case 129:
2461 #line 651 "wmlscript/wsgram.y" /* yacc.c:1648 */
2462  { (yyval.expr) = ws_expr_postfix_var(compiler, (yylsp[-1]).first_line, WS_TRUE, (yyvsp[-1].identifier)); }
2463 #line 2464 "y.tab.c" /* yacc.c:1648 */
2464  break;
2465 
2466  case 130:
2467 #line 653 "wmlscript/wsgram.y" /* yacc.c:1648 */
2468  { (yyval.expr) = ws_expr_postfix_var(compiler, (yylsp[-1]).first_line, WS_FALSE, (yyvsp[-1].identifier)); }
2469 #line 2470 "y.tab.c" /* yacc.c:1648 */
2470  break;
2471 
2472  case 132:
2473 #line 659 "wmlscript/wsgram.y" /* yacc.c:1648 */
2474  {
2475  WsFunctionHash *f = ws_function_hash(compiler, (yyvsp[-1].identifier));
2476 
2477  /* Add an usage count for the local script function. */
2478  if (f)
2479  f->usage_count++;
2480 
2481  (yyval.expr) = ws_expr_call(compiler, (yylsp[-1]).first_line, ' ', NULL, (yyvsp[-1].identifier), (yyvsp[0].list));
2482  }
2483 #line 2484 "y.tab.c" /* yacc.c:1648 */
2484  break;
2485 
2486  case 133:
2487 #line 669 "wmlscript/wsgram.y" /* yacc.c:1648 */
2488  { (yyval.expr) = ws_expr_call(compiler, (yylsp[-1]).first_line, '#', (yyvsp[-3].identifier), (yyvsp[-1].identifier), (yyvsp[0].list)); }
2489 #line 2490 "y.tab.c" /* yacc.c:1648 */
2490  break;
2491 
2492  case 134:
2493 #line 671 "wmlscript/wsgram.y" /* yacc.c:1648 */
2494  { (yyval.expr) = ws_expr_call(compiler, (yylsp[-1]).first_line, '.', (yyvsp[-3].identifier), (yyvsp[-1].identifier), (yyvsp[0].list)); }
2495 #line 2496 "y.tab.c" /* yacc.c:1648 */
2496  break;
2497 
2498  case 135:
2499 #line 676 "wmlscript/wsgram.y" /* yacc.c:1648 */
2500  { (yyval.expr) = ws_expr_symbol(compiler, (yylsp[0]).first_line, (yyvsp[0].identifier)); }
2501 #line 2502 "y.tab.c" /* yacc.c:1648 */
2502  break;
2503 
2504  case 136:
2505 #line 678 "wmlscript/wsgram.y" /* yacc.c:1648 */
2506  { (yyval.expr) = ws_expr_const_invalid(compiler, (yylsp[0]).first_line); }
2507 #line 2508 "y.tab.c" /* yacc.c:1648 */
2508  break;
2509 
2510  case 137:
2511 #line 680 "wmlscript/wsgram.y" /* yacc.c:1648 */
2512  { (yyval.expr) = ws_expr_const_true(compiler, (yylsp[0]).first_line); }
2513 #line 2514 "y.tab.c" /* yacc.c:1648 */
2514  break;
2515 
2516  case 138:
2517 #line 682 "wmlscript/wsgram.y" /* yacc.c:1648 */
2518  { (yyval.expr) = ws_expr_const_false(compiler, (yylsp[0]).first_line); }
2519 #line 2520 "y.tab.c" /* yacc.c:1648 */
2520  break;
2521 
2522  case 139:
2523 #line 684 "wmlscript/wsgram.y" /* yacc.c:1648 */
2524  { (yyval.expr) = ws_expr_const_integer(compiler, (yylsp[0]).first_line, (yyvsp[0].integer)); }
2525 #line 2526 "y.tab.c" /* yacc.c:1648 */
2526  break;
2527 
2528  case 140:
2529 #line 686 "wmlscript/wsgram.y" /* yacc.c:1648 */
2530  { (yyval.expr) = ws_expr_const_float(compiler, (yylsp[0]).first_line, (yyvsp[0].vfloat)); }
2531 #line 2532 "y.tab.c" /* yacc.c:1648 */
2532  break;
2533 
2534  case 141:
2535 #line 688 "wmlscript/wsgram.y" /* yacc.c:1648 */
2536  { (yyval.expr) = ws_expr_const_string(compiler, (yylsp[0]).first_line, (yyvsp[0].string)); }
2537 #line 2538 "y.tab.c" /* yacc.c:1648 */
2538  break;
2539 
2540  case 142:
2541 #line 690 "wmlscript/wsgram.y" /* yacc.c:1648 */
2542  { (yyval.expr) = (yyvsp[-1].expr); }
2543 #line 2544 "y.tab.c" /* yacc.c:1648 */
2544  break;
2545 
2546  case 143:
2547 #line 695 "wmlscript/wsgram.y" /* yacc.c:1648 */
2548  { (yyval.list) = ws_list_new(compiler); }
2549 #line 2550 "y.tab.c" /* yacc.c:1648 */
2550  break;
2551 
2552  case 144:
2553 #line 697 "wmlscript/wsgram.y" /* yacc.c:1648 */
2554  { (yyval.list) = (yyvsp[-1].list); }
2555 #line 2556 "y.tab.c" /* yacc.c:1648 */
2556  break;
2557 
2558  case 145:
2559 #line 702 "wmlscript/wsgram.y" /* yacc.c:1648 */
2560  {
2561  (yyval.list) = ws_list_new(compiler);
2562  ws_list_append(compiler, (yyval.list), (yyvsp[0].expr));
2563  }
2564 #line 2565 "y.tab.c" /* yacc.c:1648 */
2565  break;
2566 
2567  case 146:
2568 #line 707 "wmlscript/wsgram.y" /* yacc.c:1648 */
2569  { ws_list_append(compiler, (yyvsp[-2].list), (yyvsp[0].expr)); }
2570 #line 2571 "y.tab.c" /* yacc.c:1648 */
2571  break;
2572 
2573 
2574 #line 2575 "y.tab.c" /* yacc.c:1648 */
2575  default: break;
2576  }
2577  /* User semantic actions sometimes alter yychar, and that requires
2578  that yytoken be updated with the new translation. We take the
2579  approach of translating immediately before every use of yytoken.
2580  One alternative is translating here after every semantic action,
2581  but that translation would be missed if the semantic action invokes
2582  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2583  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2584  incorrect destructor might then be invoked immediately. In the
2585  case of YYERROR or YYBACKUP, subsequent parser actions might lead
2586  to an incorrect destructor call or verbose syntax error message
2587  before the lookahead is translated. */
2588  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2589 
2590  YYPOPSTACK (yylen);
2591  yylen = 0;
2592  YY_STACK_PRINT (yyss, yyssp);
2593 
2594  *++yyvsp = yyval;
2595  *++yylsp = yyloc;
2596 
2597  /* Now 'shift' the result of the reduction. Determine what state
2598  that goes to, based on the state we popped back to and the rule
2599  number reduced by. */
2600 
2601  yyn = yyr1[yyn];
2602 
2603  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2604  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2605  yystate = yytable[yystate];
2606  else
2607  yystate = yydefgoto[yyn - YYNTOKENS];
2608 
2609  goto yynewstate;
2610 
2611 
2612 /*--------------------------------------.
2613 | yyerrlab -- here on detecting error. |
2614 `--------------------------------------*/
2615 yyerrlab:
2616  /* Make sure we have latest lookahead translation. See comments at
2617  user semantic actions for why this is necessary. */
2618  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2619 
2620  /* If not already recovering from an error, report this error. */
2621  if (!yyerrstatus)
2622  {
2623  ++yynerrs;
2624 #if ! YYERROR_VERBOSE
2625  yyerror (&yylloc, compiler, YY_("syntax error"));
2626 #else
2627 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2628  yyssp, yytoken)
2629  {
2630  char const *yymsgp = YY_("syntax error");
2631  int yysyntax_error_status;
2632  yysyntax_error_status = YYSYNTAX_ERROR;
2633  if (yysyntax_error_status == 0)
2634  yymsgp = yymsg;
2635  else if (yysyntax_error_status == 1)
2636  {
2637  if (yymsg != yymsgbuf)
2638  YYSTACK_FREE (yymsg);
2639  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2640  if (!yymsg)
2641  {
2642  yymsg = yymsgbuf;
2643  yymsg_alloc = sizeof yymsgbuf;
2644  yysyntax_error_status = 2;
2645  }
2646  else
2647  {
2648  yysyntax_error_status = YYSYNTAX_ERROR;
2649  yymsgp = yymsg;
2650  }
2651  }
2652  yyerror (&yylloc, compiler, yymsgp);
2653  if (yysyntax_error_status == 2)
2654  goto yyexhaustedlab;
2655  }
2656 # undef YYSYNTAX_ERROR
2657 #endif
2658  }
2659 
2660  yyerror_range[1] = yylloc;
2661 
2662  if (yyerrstatus == 3)
2663  {
2664  /* If just tried and failed to reuse lookahead token after an
2665  error, discard it. */
2666 
2667  if (yychar <= YYEOF)
2668  {
2669  /* Return failure if at end of input. */
2670  if (yychar == YYEOF)
2671  YYABORT;
2672  }
2673  else
2674  {
2675  yydestruct ("Error: discarding",
2676  yytoken, &yylval, &yylloc, compiler);
2677  yychar = YYEMPTY;
2678  }
2679  }
2680 
2681  /* Else will try to reuse lookahead token after shifting the error
2682  token. */
2683  goto yyerrlab1;
2684 
2685 
2686 /*---------------------------------------------------.
2687 | yyerrorlab -- error raised explicitly by YYERROR. |
2688 `---------------------------------------------------*/
2689 yyerrorlab:
2690 
2691  /* Pacify compilers like GCC when the user code never invokes
2692  YYERROR and the label yyerrorlab therefore never appears in user
2693  code. */
2694  if (/*CONSTCOND*/ 0)
2695  goto yyerrorlab;
2696 
2697  /* Do not reclaim the symbols of the rule whose action triggered
2698  this YYERROR. */
2699  YYPOPSTACK (yylen);
2700  yylen = 0;
2701  YY_STACK_PRINT (yyss, yyssp);
2702  yystate = *yyssp;
2703  goto yyerrlab1;
2704 
2705 
2706 /*-------------------------------------------------------------.
2707 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2708 `-------------------------------------------------------------*/
2709 yyerrlab1:
2710  yyerrstatus = 3; /* Each real token shifted decrements this. */
2711 
2712  for (;;)
2713  {
2714  yyn = yypact[yystate];
2715  if (!yypact_value_is_default (yyn))
2716  {
2717  yyn += YYTERROR;
2718  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2719  {
2720  yyn = yytable[yyn];
2721  if (0 < yyn)
2722  break;
2723  }
2724  }
2725 
2726  /* Pop the current state because it cannot handle the error token. */
2727  if (yyssp == yyss)
2728  YYABORT;
2729 
2730  yyerror_range[1] = *yylsp;
2731  yydestruct ("Error: popping",
2732  yystos[yystate], yyvsp, yylsp, compiler);
2733  YYPOPSTACK (1);
2734  yystate = *yyssp;
2735  YY_STACK_PRINT (yyss, yyssp);
2736  }
2737 
2739  *++yyvsp = yylval;
2741 
2742  yyerror_range[2] = yylloc;
2743  /* Using YYLLOC is tempting, but would change the location of
2744  the lookahead. YYLOC is available though. */
2745  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
2746  *++yylsp = yyloc;
2747 
2748  /* Shift the error token. */
2749  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2750 
2751  yystate = yyn;
2752  goto yynewstate;
2753 
2754 
2755 /*-------------------------------------.
2756 | yyacceptlab -- YYACCEPT comes here. |
2757 `-------------------------------------*/
2758 yyacceptlab:
2759  yyresult = 0;
2760  goto yyreturn;
2761 
2762 /*-----------------------------------.
2763 | yyabortlab -- YYABORT comes here. |
2764 `-----------------------------------*/
2765 yyabortlab:
2766  yyresult = 1;
2767  goto yyreturn;
2768 
2769 #if !defined yyoverflow || YYERROR_VERBOSE
2770 /*-------------------------------------------------.
2771 | yyexhaustedlab -- memory exhaustion comes here. |
2772 `-------------------------------------------------*/
2773 yyexhaustedlab:
2774  yyerror (&yylloc, compiler, YY_("memory exhausted"));
2775  yyresult = 2;
2776  /* Fall through. */
2777 #endif
2778 
2779 yyreturn:
2780  if (yychar != YYEMPTY)
2781  {
2782  /* Make sure we have latest lookahead translation. See comments at
2783  user semantic actions for why this is necessary. */
2784  yytoken = YYTRANSLATE (yychar);
2785  yydestruct ("Cleanup: discarding lookahead",
2786  yytoken, &yylval, &yylloc, compiler);
2787  }
2788  /* Do not reclaim the symbols of the rule whose action triggered
2789  this YYABORT or YYACCEPT. */
2790  YYPOPSTACK (yylen);
2791  YY_STACK_PRINT (yyss, yyssp);
2792  while (yyssp != yyss)
2793  {
2794  yydestruct ("Cleanup: popping",
2795  yystos[*yyssp], yyvsp, yylsp, compiler);
2796  YYPOPSTACK (1);
2797  }
2798 #ifndef yyoverflow
2799  if (yyss != yyssa)
2800  YYSTACK_FREE (yyss);
2801 #endif
2802 #if YYERROR_VERBOSE
2803  if (yymsg != yymsgbuf)
2804  YYSTACK_FREE (yymsg);
2805 #endif
2806  return yyresult;
2807 }
2808 #line 710 "wmlscript/wsgram.y" /* yacc.c:1907 */
2809 
2810 
2811 void
2812 yyerror(YYLTYPE* locp, WsCompiler* compiler, const char* msg)
2813 {
2814 #if WS_DEBUG
2815  fprintf(stderr, "*** %s:%ld: wsc: %s - this msg will be removed ***\n",
2816  global_compiler->input_name, global_compiler->linenum, msg);
2817 #endif /* WS_DEBUG */
2818 }
WsFormalParm * parm
Definition: wsgram.c:308
void ws_function(WsCompiler *compiler, WsBool externp, char *name, WsUInt32 line, WsList *params, WsList *block)
Definition: wsstree.c:343
WsUtf8String * string
Definition: wsgram.c:304
#define tDELETE
Definition: wsgram.c:243
int first_column
Definition: wsgram.c:330
#define tTHROW
Definition: wsgram.c:269
#define tVAR
Definition: wsgram.c:240
#define tIMPORT
Definition: wsgram.c:262
WsStatement * ws_stmt_empty(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1413
#define WS_ASM_SCOR
Definition: wsasm.h:207
#define WS_ASM_B_RSSHIFT
Definition: wsasm.h:195
#define tSWITCH
Definition: wsgram.c:268
#define tNULL
Definition: wsgram.c:247
Definition: wsint.h:131
WsStatement * ws_stmt_for(WsCompilerPtr compiler, WsUInt32 line, WsList *init, WsExpression *e1, WsExpression *e2, WsExpression *e3, WsStatement *stmt_body)
Definition: wsstree.c:1447
WsExpression * ws_expr_postfix_var(WsCompilerPtr compiler, WsUInt32 line, WsBool addp, char *variable)
Definition: wsstree.c:1010
#define tFOR
Definition: wsgram.c:227
int ws_yy_parse(WsCompiler *compiler)
#define tFALSE
Definition: wsgram.c:212
#define YYABORT
Definition: wsgram.c:1020
WsExpression * ws_expr_call(WsCompiler *compiler, WsUInt32 line, int type, char *base, char *name, WsList *arguments)
Definition: wsstree.c:1028
#define tEXTENDS
Definition: wsgram.c:260
#define tPLUSPLUS
Definition: wsgram.c:277
static const yytype_uint8 yytranslate[]
Definition: wsgram.c:623
#define yylex
Definition: wsgram.c:64
unsigned long WsUInt32
Definition: wsint.h:122
#define tDIVA
Definition: wsgram.c:285
WsVarDec * vardec
Definition: wsgram.c:309
WsStatement * ws_stmt_return(WsCompilerPtr compiler, WsUInt32 line, WsExpression *expr)
Definition: wsstree.c:1491
#define tRSSHIFT
Definition: wsgram.c:280
#define tLIB
Definition: wsgram.c:245
#define YYSTACK_BYTES(N)
Definition: wsgram.c:555
WsBool ws_bc_add_pragma_access_domain(WsBc *bc, const unsigned char *domain, size_t domain_len)
Definition: wsbc.c:981
#define tRSZSHIFTA
Definition: wsgram.c:292
void ws_pragma_meta_body_free(WsCompilerPtr compiler, WsPragmaMetaBody *mb)
Definition: wsstree.c:291
WsStatement * ws_stmt_continue(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1479
#define tUSE
Definition: wsgram.c:238
#define YYPOPSTACK(N)
double WsFloat
Definition: wsint.h:126
#define tPUBLIC
Definition: wsgram.c:264
#define tAGENT
Definition: wsgram.c:218
WsExpression * ws_expr_binary(WsCompilerPtr compiler, WsUInt32 line, int type, WsExpression *left, WsExpression *right)
Definition: wsstree.c:956
#define WS_ASM_TYPEOF
Definition: wsasm.h:212
#define tGE
Definition: wsgram.c:273
#define tAND
Definition: wsgram.c:275
#define YY_INITIAL_VALUE(Value)
Definition: wsgram.c:458
#define tDO
Definition: wsgram.c:257
int last_column
Definition: wsgram.c:332
#define tACCESS
Definition: wsgram.c:217
#define yytable_value_is_error(Yytable_value)
Definition: wsgram.c:750
static const yytype_int16 yypact[]
Definition: wsgram.c:755
int last_line
Definition: wsgram.c:331
#define WS_ASM_NOT
Definition: wsasm.h:205
#define tCATCH
Definition: wsgram.c:252
#define yyerror
Definition: wsgram.c:65
#define YY_ATTRIBUTE_UNUSED
Definition: wsgram.c:430
void * malloc(YYSIZE_T)
WsBool ws_bc_add_pragma_access_path(WsBc *bc, const unsigned char *path, size_t path_len)
Definition: wsbc.c:996
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: wsgram.c:566
#define tTYPEOF
Definition: wsgram.c:237
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: wsgram.c:1053
#define tDOMAIN
Definition: wsgram.c:223
static const yytype_int16 yydefgoto[]
Definition: wsgram.c:830
#define tPATH
Definition: wsgram.c:235
static const yytype_int16 yytable[]
Definition: wsgram.c:843
#define YYUSE(E)
Definition: wsgram.c:444
#define YYTRANSLATE(YYX)
Definition: wsgram.c:618
#define YYFINAL
Definition: wsgram.c:600
#define tWITH
Definition: wsgram.c:250
#define tRSSHIFTA
Definition: wsgram.c:291
#define tIN
Definition: wsgram.c:244
#define WS_ASM_DIV
Definition: wsasm.h:186
#define tREMA
Definition: wsgram.c:289
#define tEQUIV
Definition: wsgram.c:225
#define YYSTACK_FREE
Definition: wsgram.c:509
WsUInt32 linenum
Definition: wsint.h:201
WsVarDec * ws_variable_declaration(WsCompilerPtr compiler, char *name, WsExpression *expr)
Definition: wsstree.c:78
#define tLSHIFTA
Definition: wsgram.c:290
WsStatement * ws_stmt_expr(WsCompiler *compiler, WsUInt32 line, WsExpression *expr)
Definition: wsstree.c:1419
WsStatement * ws_stmt_while(WsCompiler *compiler, WsUInt32 line, WsExpression *expr, WsStatement *stmt_arg)
Definition: wsstree.c:1465
yytokentype
Definition: wsgram.c:122
#define YYTERROR
Definition: wsgram.c:1044
#define yynerrs
Definition: wsgram.c:67
#define tOR
Definition: wsgram.c:276
#define WS_ASM_B_LSHIFT
Definition: wsasm.h:194
WsExpression * ws_expr_const_string(WsCompiler *compiler, WsUInt32 line, WsUtf8String *string)
Definition: wsstree.c:1112
#define YY_STACK_PRINT(Bottom, Top)
Definition: wsgram.c:1243
#define tIDIVA
Definition: wsgram.c:222
WsStatement * stmt
Definition: wsgram.c:313
#define tIF
Definition: wsgram.c:231
WsPragmaMetaBody * ws_pragma_meta_body(WsCompilerPtr compiler, WsUtf8String *property_name, WsUtf8String *content, WsUtf8String *scheme)
Definition: wsstree.c:271
const char * input_name
Definition: wsint.h:200
#define WS_ASM_ISVALID
Definition: wsasm.h:213
static const yytype_uint8 yyr1[]
Definition: wsgram.c:974
void ws_lexer_free_block(WsCompiler *compiler, void *ptr)
Definition: ws.c:281
#define tNAME
Definition: wsgram.c:234
#define tMETA
Definition: wsgram.c:233
WsExpression * ws_expr_const_float(WsCompiler *compiler, WsUInt32 line, WsFloat fval)
Definition: wsstree.c:1100
#define WS_ASM_B_NOT
Definition: wsasm.h:193
#define tWHILE
Definition: wsgram.c:241
#define tISVALID
Definition: wsgram.c:232
#define WS_ASM_LE
Definition: wsasm.h:199
#define WS_ASM_REM
Definition: wsasm.h:188
#define tFLOAT
Definition: wsgram.c:214
#define tNEW
Definition: wsgram.c:246
void free(void *)
WsBc * bc
Definition: wsint.h:218
yytype_int16 yyss_alloc
Definition: wsgram.c:545
WsExpression * ws_expr_symbol(WsCompiler *compiler, WsUInt32 line, char *identifier)
Definition: wsstree.c:1051
WsExpression * ws_expr_const_integer(WsCompiler *compiler, WsUInt32 line, WsUInt32 ival)
Definition: wsstree.c:1086
static const yytype_uint8 yystos[]
Definition: wsgram.c:943
WsUInt32 integer
Definition: wsgram.c:301
#define tTRUE
Definition: wsgram.c:211
WsExpression * expr
Definition: wsgram.c:314
#define yypact_value_is_default(Yystate)
Definition: wsgram.c:745
#define tEXTERN
Definition: wsgram.c:226
WsFormalParm * ws_formal_parameter(WsCompilerPtr compiler, WsUInt32 line, char *name)
Definition: wsstree.c:93
#define tPRIVATE
Definition: wsgram.c:263
WsStatement * ws_stmt_break(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1485
int first_line
Definition: wsgram.c:329
#define tURL
Definition: wsgram.c:242
YYSTYPE yyvs_alloc
Definition: wsgram.c:546
WsStatement * ws_stmt_if(WsCompiler *compiler, WsUInt32 line, WsExpression *expr, WsStatement *s_then, WsStatement *s_else)
Definition: wsstree.c:1431
void * meta_name_cb_context
Definition: ws.h:174
#define tBREAK
Definition: wsgram.c:219
#define tEQ
Definition: wsgram.c:271
void * ws_f_strdup(WsFastMalloc *pool, const char *str)
Definition: wsfalloc.c:177
void ws_error_syntax(WsCompilerPtr compiler, WsUInt32 line)
Definition: wserror.c:120
WsPragmaMetaProc meta_name_cb
Definition: ws.h:173
char * name
Definition: smsc_cimd2.c:212
#define tMULA
Definition: wsgram.c:284
#define WS_ASM_GT
Definition: wsasm.h:202
#define tNE
Definition: wsgram.c:274
#define tSUBA
Definition: wsgram.c:283
static const yytype_int16 yypgoto[]
Definition: wsgram.c:819
WsExpression * ws_expr_const_true(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1074
#define tINVALID
Definition: wsgram.c:210
#define YYNTOKENS
Definition: wsgram.c:605
#define YY_NULLPTR
Definition: wsgram.c:95
#define WS_ASM_NE
Definition: wsasm.h:203
void ws_pragma_use(WsCompilerPtr compiler, WsUInt32 line, char *identifier, WsUtf8String *url)
Definition: wsstree.c:220
#define tHEADER
Definition: wsgram.c:229
#define tRETURN
Definition: wsgram.c:236
#define tELSE
Definition: wsgram.c:224
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: wsgram.c:1242
#define YYEMPTY
Definition: wsgram.c:1016
WsUInt32 first_line
Definition: wsstree.h:524
WsStatement * ws_stmt_variable(WsCompilerPtr compiler, WsUInt32 line, WsList *variables)
Definition: wsstree.c:1401
WsExpression * ws_expr_unary(WsCompilerPtr compiler, WsUInt32 line, int type, WsExpression *expression)
Definition: wsstree.c:971
#define tCONST
Definition: wsgram.c:254
#define YYMAXDEPTH
Definition: wsgram.c:1261
#define YYACCEPT
Definition: wsgram.c:1019
WsExpression * ws_expr_logical(WsCompilerPtr compiler, WsUInt32 line, int type, WsExpression *left, WsExpression *right)
Definition: wsstree.c:941
#define YYEOF
Definition: wsgram.c:1017
WsExpression * ws_expr_const_false(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1080
#define WS_ASM_B_OR
Definition: wsasm.h:191
WsList * ws_list_new(WsCompiler *compiler)
Definition: wsstree.c:110
#define yydebug
Definition: wsgram.c:66
short int yytype_int16
Definition: wsgram.c:385
#define tENUM
Definition: wsgram.c:258
#define tLE
Definition: wsgram.c:272
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: wsgram.c:461
unsigned char yytype_uint8
Definition: wsgram.c:367
#define tTRY
Definition: wsgram.c:270
#define WS_ASM_B_XOR
Definition: wsasm.h:192
WsList * list
Definition: wsgram.c:307
#define tMINUSMINUS
Definition: wsgram.c:278
WsFunctionHash * ws_function_hash(WsCompilerPtr compiler, char *name)
Definition: wsstree.c:318
WsBool
Definition: wsint.h:128
WsBool ws_bc_add_pragma_user_agent_property(WsBc *bc, const unsigned char *name, size_t name_len, const unsigned char *property, size_t property_len)
Definition: wsbc.c:1011
#define WS_ASM_EQ
Definition: wsasm.h:198
#define tSIZEOF
Definition: wsgram.c:265
#define tFUNCTION
Definition: wsgram.c:228
WsFloat vfloat
Definition: wsgram.c:302
#define tINTEGER
Definition: wsgram.c:213
#define tUSER
Definition: wsgram.c:239
#define tCLASS
Definition: wsgram.c:253
#define tXORA
Definition: wsgram.c:288
void * ws_strdup(const char *str)
Definition: wsalloc.c:119
#define tORA
Definition: wsgram.c:287
#define YYSTACK_ALLOC
Definition: wsgram.c:508
#define YYDPRINTF(Args)
Definition: wsgram.c:1241
#define tLSHIFT
Definition: wsgram.c:279
WsPragmaMetaProc meta_http_equiv_cb
Definition: ws.h:178
#define tHTTP
Definition: wsgram.c:230
#define tFINALLY
Definition: wsgram.c:261
YYLTYPE yyls_alloc
Definition: wsgram.c:547
WsCompilerParams params
Definition: wsint.h:193
void * meta_http_equiv_cb_context
Definition: ws.h:179
#define tIDENTIFIER
Definition: wsgram.c:216
WsExpression * ws_expr_const_invalid(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1068
WsExpression * ws_expr_conditional(WsCompilerPtr compiler, WsUInt32 line, WsExpression *e_cond, WsExpression *e_then, WsExpression *e_else)
Definition: wsstree.c:925
char * identifier
Definition: wsgram.c:303
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: wsgram.c:462
signed char yytype_int8
Definition: wsgram.c:373
WsExpression * ws_expr_comma(WsCompilerPtr compiler, WsUInt32 line, WsExpression *left, WsExpression *right)
Definition: wsstree.c:889
#define WS_ASM_B_RSZSHIFT
Definition: wsasm.h:196
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, WsCompiler *compiler)
Definition: wsgram.c:1493
#define tVOID
Definition: wsgram.c:249
WsFastMalloc * pool_stree
Definition: wsint.h:204
WsStatement * ws_stmt_block(WsCompiler *compiler, WsUInt32 fline, WsUInt32 lline, WsList *block)
Definition: wsstree.c:1389
#define WS_ASM_UMINUS
Definition: wsasm.h:182
#define YYSTACK_ALLOC_MAXIMUM
Definition: wsgram.c:511
#define tEXPORT
Definition: wsgram.c:259
#define WS_ASM_GE
Definition: wsasm.h:201
WsPragmaMetaBody * meta_body
Definition: wsgram.c:311
#define tIDIV
Definition: wsgram.c:221
#define YYLAST
Definition: wsgram.c:602
WsBool boolean
Definition: wsgram.c:306
void ws_lexer_free_utf8(WsCompiler *compiler, WsUtf8String *string)
Definition: ws.c:305
#define tRSZSHIFT
Definition: wsgram.c:281
#define YY_(Msgid)
Definition: wsgram.c:411
static const yytype_uint8 yyr2[]
Definition: wsgram.c:994
#define YY_REDUCE_PRINT(Rule)
Definition: wsgram.c:1244
#define YYINITDEPTH
Definition: wsgram.c:1250
#define tADDA
Definition: wsgram.c:282
#define WS_ASM_B_AND
Definition: wsasm.h:190
#define WS_ASM_IDIV
Definition: wsasm.h:187
WsBool ws_bc_add_pragma_user_agent_property_and_scheme(WsBc *bc, const unsigned char *name, size_t name_len, const unsigned char *property, size_t property_len, const unsigned char *scheme, size_t scheme_len)
Definition: wsbc.c:1030
#define yyparse
Definition: wsgram.c:63
#define tANDA
Definition: wsgram.c:286
#define WS_ASM_MUL
Definition: wsasm.h:185
WsExpression * ws_expr_unary_var(WsCompilerPtr compiler, WsUInt32 line, WsBool addp, char *variable)
Definition: wsstree.c:993
#define WS_ASM_ADD
Definition: wsasm.h:183
#define tDEBUGGER
Definition: wsgram.c:255
WsExpression * ws_expr_assign(WsCompilerPtr compiler, WsUInt32 line, char *identifier, int op, WsExpression *expr)
Definition: wsstree.c:903
#define tDEFAULT
Definition: wsgram.c:256
void ws_error_memory(WsCompilerPtr compiler)
Definition: wserror.c:107
#define YYSIZE_T
Definition: wsgram.c:395
#define tSTRUCT
Definition: wsgram.c:266
static XMLRPCDocument * msg
Definition: test_xmlrpc.c:86
void ws_list_append(WsCompiler *compiler, WsList *list, void *value)
Definition: wsstree.c:121
static const yytype_int16 yycheck[]
Definition: wsgram.c:892
#define tCONTINUE
Definition: wsgram.c:220
#define tTHIS
Definition: wsgram.c:248
WsUInt32 usage_count
Definition: wsstree.h:222
unsigned short int yytype_uint16
Definition: wsgram.c:379
static const yytype_uint8 yydefact[]
Definition: wsgram.c:788
#define tSUPER
Definition: wsgram.c:267
#define WS_ASM_SCAND
Definition: wsasm.h:206
#define WS_ASM_LT
Definition: wsasm.h:200
#define tCASE
Definition: wsgram.c:251
#define WS_ASM_SUB
Definition: wsasm.h:184
#define tSTRING
Definition: wsgram.c:215
See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.