1 /* A Bison parser, made by GNU Bison 3.6.2. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
41 /* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
48 /* Identify Bison output. */
49 #define YYBISON 1
50
51 /* Bison version. */
52 #define YYBISON_VERSION "3.6.2"
53
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56
57 /* Pure parsers. */
58 #define YYPURE 2
59
60 /* Push parsers. */
61 #define YYPUSH 0
62
63 /* Pull parsers. */
64 #define YYPULL 1
65
66 /* Substitute the type names. */
67 #define YYSTYPE PKL_TAB_STYPE
68 #define YYLTYPE PKL_TAB_LTYPE
69 /* Substitute the variable and function names. */
70 #define yyparse pkl_tab_parse
71 #define yylex pkl_tab_lex
72 #define yyerror pkl_tab_error
73 #define yydebug pkl_tab_debug
74 #define yynerrs pkl_tab_nerrs
75
76 /* First part of user prologue. */
77 #line 35 "pkl-tab.y"
78
79 #include <config.h>
80 #include <stdlib.h>
81 #include <stdio.h>
82 #include <xalloc.h>
83 #include <assert.h>
84 #include <string.h>
85 #include <gettext.h>
86 #define _(str) gettext (str)
87
88 #include "pk-utils.h"
89
90 #include "pkl.h"
91 #include "pkl-diag.h"
92 #include "pkl-ast.h"
93 #include "pkl-parser.h" /* For struct pkl_parser. */
94
95 #include "pvm.h"
96
97 #define PKL_TAB_LTYPE pkl_ast_loc
98 #define YYDEBUG 1
99 #include "pkl-tab.h"
100 #include "pkl-lex.h"
101
102 #ifdef PKL_DEBUG
103 # include "pkl-gen.h"
104 #endif
105
106 #define scanner (pkl_parser->scanner)
107
108 /* YYLLOC_DEFAULT -> default code for computing locations. */
109
110 #define PKL_AST_CHILDREN_STEP 12
111
112
113 /* Emit an error. */
114
115 static void
pkl_tab_error(YYLTYPE * llocp,struct pkl_parser * pkl_parser,char const * err)116 pkl_tab_error (YYLTYPE *llocp,
117 struct pkl_parser *pkl_parser,
118 char const *err)
119 {
120 pkl_error (pkl_parser->compiler, pkl_parser->ast, *llocp, "%s", err);
121 }
122
123 /* These are used in the defun_or_method rule. */
124
125 #define IS_DEFUN 0
126 #define IS_METHOD 1
127
128 /* Register an argument in the compile-time environment. This is used
129 by function specifiers and try-catch statements.
130
131 Return 0 if there was an error registering, 1 otherwise. */
132
133 static int
pkl_register_arg(struct pkl_parser * parser,pkl_ast_node arg)134 pkl_register_arg (struct pkl_parser *parser, pkl_ast_node arg)
135 {
136 pkl_ast_node arg_decl;
137 pkl_ast_node arg_identifier = PKL_AST_FUNC_ARG_IDENTIFIER (arg);
138
139 pkl_ast_node dummy
140 = pkl_ast_make_integer (parser->ast, 0);
141 PKL_AST_TYPE (dummy) = ASTREF (PKL_AST_FUNC_ARG_TYPE (arg));
142
143 arg_decl = pkl_ast_make_decl (parser->ast,
144 PKL_AST_DECL_KIND_VAR,
145 arg_identifier,
146 dummy,
147 NULL /* source */);
148 PKL_AST_LOC (arg_decl) = PKL_AST_LOC (arg);
149
150 if (!pkl_env_register (parser->env,
151 PKL_ENV_NS_MAIN,
152 PKL_AST_IDENTIFIER_POINTER (arg_identifier),
153 arg_decl))
154 {
155 pkl_error (parser->compiler, parser->ast,PKL_AST_LOC (arg_identifier),
156 "duplicated argument name `%s' in function declaration",
157 PKL_AST_IDENTIFIER_POINTER (arg_identifier));
158 /* Make sure to pop the function frame. */
159 parser->env = pkl_env_pop_frame (parser->env);
160 return 0;
161 }
162
163 return 1;
164 }
165
166 /* Assert statement is a syntatic sugar that transforms to invocation of
167 _pkl_assert function with appropriate arguments.
168
169 This function accepts AST nodes corresponding to the condition and
170 optional message of the assert statement, and also the location info
171 of the statement.
172
173 Returns NULL on failure, and expression statement AST node on success. */
174
175 static pkl_ast_node
pkl_make_assertion(struct pkl_parser * p,pkl_ast_node cond,pkl_ast_node msg,struct pkl_ast_loc stmt_loc)176 pkl_make_assertion (struct pkl_parser *p, pkl_ast_node cond, pkl_ast_node msg,
177 struct pkl_ast_loc stmt_loc)
178 {
179 pkl_ast_node vfunc, call, call_arg;
180 pkl_ast_node arg_cond, arg_msg, arg_lineinfo; /* _pkl_assert args */
181
182 /* Make variable for `_pkl_assert` function */
183 {
184 const char *name = "_pkl_assert";
185 pkl_ast_node vfunc_init;
186 int back, over;
187
188 vfunc_init = pkl_env_lookup (p->env, PKL_ENV_NS_MAIN, name, &back, &over);
189 if (!vfunc_init
190 || (PKL_AST_DECL_KIND (vfunc_init) != PKL_AST_DECL_KIND_FUNC))
191 {
192 pkl_error (p->compiler, p->ast, stmt_loc, "undefined function '%s'",
193 name);
194 return NULL;
195 }
196 vfunc = pkl_ast_make_var (p->ast, pkl_ast_make_identifier (p->ast, name),
197 vfunc_init, back, over);
198 }
199
200 /* First argument of _pkl_assert */
201 arg_cond = pkl_ast_make_funcall_arg (p->ast, cond, NULL);
202 PKL_AST_LOC (arg_cond) = PKL_AST_LOC (cond);
203
204 /* Second argument of _pkl_assert */
205 if (msg == NULL)
206 {
207 pkl_ast_node stype = pkl_ast_make_string_type (p->ast);
208
209 msg = pkl_ast_make_string (p->ast, "");
210 PKL_AST_TYPE (msg) = ASTREF (stype);
211 }
212 arg_msg = pkl_ast_make_funcall_arg (p->ast, msg, NULL);
213 arg_msg = ASTREF (arg_msg);
214 PKL_AST_LOC (arg_msg) = PKL_AST_LOC (msg);
215
216 /* Third argument of _pkl_assert to report the location of the assert
217 statement with the following format "<FILENAME>:<LINE>:<COLUMN>". */
218 {
219 char *str;
220 pkl_ast_node lineinfo, stype;
221
222 if (asprintf (&str, "%s:%d:%d", p->filename ? p->filename : "<stdin>",
223 stmt_loc.first_line, stmt_loc.first_column)
224 == -1)
225 return NULL;
226 lineinfo = pkl_ast_make_string (p->ast, str);
227 free (str);
228 stype = pkl_ast_make_string_type (p->ast);
229 PKL_AST_TYPE (lineinfo) = ASTREF (stype);
230
231 arg_lineinfo = pkl_ast_make_funcall_arg (p->ast, lineinfo, NULL);
232 arg_lineinfo = ASTREF (arg_lineinfo);
233 }
234
235 call_arg
236 = pkl_ast_chainon (arg_cond, pkl_ast_chainon (arg_msg, arg_lineinfo));
237 call = pkl_ast_make_funcall (p->ast, vfunc, call_arg);
238 return pkl_ast_make_exp_stmt (p->ast, call);
239 }
240
241 #if 0
242 /* Register a list of arguments in the compile-time environment. This
243 is used by function specifiers and try-catch statements.
244
245 Return 0 if there was an error registering, 1 otherwise. */
246
247 static int
248 pkl_register_args (struct pkl_parser *parser, pkl_ast_node arg_list)
249 {
250 pkl_ast_node arg;
251
252 for (arg = arg_list; arg; arg = PKL_AST_CHAIN (arg))
253 {
254 pkl_ast_node arg_decl;
255 pkl_ast_node arg_identifier = PKL_AST_FUNC_ARG_IDENTIFIER (arg);
256
257 pkl_ast_node dummy
258 = pkl_ast_make_integer (parser->ast, 0);
259 PKL_AST_TYPE (dummy) = ASTREF (PKL_AST_FUNC_ARG_TYPE (arg));
260
261 arg_decl = pkl_ast_make_decl (parser->ast,
262 PKL_AST_DECL_KIND_VAR,
263 arg_identifier,
264 dummy,
265 NULL /* source */);
266 PKL_AST_LOC (arg_decl) = PKL_AST_LOC (arg);
267
268 if (!pkl_env_register (parser->env,
269 PKL_ENV_NS_MAIN,
270 PKL_AST_IDENTIFIER_POINTER (arg_identifier),
271 arg_decl))
272 {
273 pkl_error (parser->compiler, parser->ast, PKL_AST_LOC (arg_identifier),
274 "duplicated argument name `%s' in function declaration",
275 PKL_AST_IDENTIFIER_POINTER (arg_identifier));
276 /* Make sure to pop the function frame. */
277 parser->env = pkl_env_pop_frame (parser->env);
278 return 0;
279 }
280 }
281
282 return 1;
283 }
284 #endif
285
286 /* Register N dummy entries in the compilation environment. */
287
288 static void
pkl_register_dummies(struct pkl_parser * parser,int n)289 pkl_register_dummies (struct pkl_parser *parser, int n)
290 {
291 int i;
292 for (i = 0; i < n; ++i)
293 {
294 char *name;
295 pkl_ast_node id;
296 pkl_ast_node decl;
297 int r;
298
299 asprintf (&name, "@*UNUSABLE_OFF_%d*@", i);
300 id = pkl_ast_make_identifier (parser->ast, name);
301 decl = pkl_ast_make_decl (parser->ast,
302 PKL_AST_DECL_KIND_VAR,
303 id, NULL /* initial */,
304 NULL /* source */);
305
306 r = pkl_env_register (parser->env, PKL_ENV_NS_MAIN, name, decl);
307 assert (r);
308 }
309 }
310
311 /* Load a module, given its name.
312 If the module file cannot be read, return 1.
313 If there is a parse error loading the module, return 2.
314 Otherwise, return 0. */
315
316 static int
load_module(struct pkl_parser * parser,const char * module,pkl_ast_node * node,int filename_p,char ** filename)317 load_module (struct pkl_parser *parser,
318 const char *module, pkl_ast_node *node,
319 int filename_p, char **filename)
320 {
321 char *module_filename = NULL;
322 pkl_ast ast;
323 FILE *fp;
324
325 module_filename = pkl_resolve_module (parser->compiler,
326 module,
327 filename_p);
328 if (module_filename == NULL)
329 /* No file found. */
330 return 1;
331
332 if (pkl_module_loaded_p (parser->compiler, module_filename))
333 {
334 /* Module already loaded. */
335 *node = NULL;
336 return 0;
337 }
338
339 fp = fopen (module_filename, "rb");
340 if (!fp)
341 {
342 free (module_filename);
343 return 1;
344 }
345
346 /* Parse the file, using the given environment. The declarations
347 found in the parsed file are appended to that environment, so
348 nothing extra should be done about that. */
349 if (pkl_parse_file (parser->compiler, &parser->env, &ast, fp,
350 module_filename)
351 != 0)
352 {
353 fclose (fp);
354 free (module_filename);
355 return 2;
356 }
357
358 /* Add the module to the compiler's list of loaded modules. */
359 pkl_add_module (parser->compiler, module_filename);
360
361 /* However, the AST nodes shall be appended explicitly, which is
362 achieved by returning them to the caller in the NODE
363 argument. */
364 *node = PKL_AST_PROGRAM_ELEMS (ast->ast);
365
366 /* Dirty hack is dirty, but it works. */
367 PKL_AST_PROGRAM_ELEMS (ast->ast) = NULL;
368 pkl_ast_free (ast);
369
370 /* Set the `filename' output argument if needed. */
371 if (filename)
372 *filename = strdup (module_filename);
373
374 fclose (fp);
375 free (module_filename);
376 return 0;
377 }
378
379
380 #line 381 "pkl-tab.c"
381
382 # ifndef YY_CAST
383 # ifdef __cplusplus
384 # define YY_CAST(Type, Val) static_cast<Type> (Val)
385 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
386 # else
387 # define YY_CAST(Type, Val) ((Type) (Val))
388 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
389 # endif
390 # endif
391 # ifndef YY_NULLPTR
392 # if defined __cplusplus
393 # if 201103L <= __cplusplus
394 # define YY_NULLPTR nullptr
395 # else
396 # define YY_NULLPTR 0
397 # endif
398 # else
399 # define YY_NULLPTR ((void*)0)
400 # endif
401 # endif
402
403 /* Use api.header.include to #include this header
404 instead of duplicating it here. */
405 #ifndef YY_PKL_TAB_PKL_TAB_TAB_H_INCLUDED
406 # define YY_PKL_TAB_PKL_TAB_TAB_H_INCLUDED
407 /* Debug traces. */
408 #ifndef PKL_TAB_DEBUG
409 # if defined YYDEBUG
410 #if YYDEBUG
411 # define PKL_TAB_DEBUG 1
412 # else
413 # define PKL_TAB_DEBUG 0
414 # endif
415 # else /* ! defined YYDEBUG */
416 # define PKL_TAB_DEBUG 1
417 # endif /* ! defined YYDEBUG */
418 #endif /* ! defined PKL_TAB_DEBUG */
419 #if PKL_TAB_DEBUG
420 extern int pkl_tab_debug;
421 #endif
422
423 /* Token kinds. */
424 #ifndef PKL_TAB_TOKENTYPE
425 # define PKL_TAB_TOKENTYPE
426 enum pkl_tab_tokentype
427 {
428 PKL_TAB_EMPTY = -2,
429 PKL_TAB_EOF = 0, /* "end of file" */
430 PKL_TAB_error = 256, /* error */
431 PKL_TAB_UNDEF = 257, /* "invalid token" */
432 INTEGER = 258, /* "integer literal" */
433 INTEGER_OVERFLOW = 259, /* INTEGER_OVERFLOW */
434 CHAR = 260, /* "character literal" */
435 STR = 261, /* "string" */
436 IDENTIFIER = 262, /* "identifier" */
437 TYPENAME = 263, /* "type name" */
438 UNIT = 264, /* "offset unit" */
439 ENUM = 265, /* "keyword `enum'" */
440 PINNED = 266, /* "keyword `pinned'" */
441 STRUCT = 267, /* "keyword `struct'" */
442 token = 268, /* token */
443 UNION = 269, /* "keyword `union'" */
444 CONST = 270, /* "keyword `const'" */
445 CONTINUE = 271, /* "keyword `continue'" */
446 ELSE = 272, /* "keyword `else'" */
447 IF = 273, /* "keyword `if'" */
448 WHILE = 274, /* "keyword `while" */
449 UNTIL = 275, /* "keyword `until'" */
450 FOR = 276, /* "keyword `for'" */
451 IN = 277, /* "keyword `in'" */
452 WHERE = 278, /* "keyword `where'" */
453 SIZEOF = 279, /* "keyword `sizeof'" */
454 ASSERT = 280, /* "keyword `assert'" */
455 ERR = 281, /* "token" */
456 ALIEN = 282, /* ALIEN */
457 INTCONSTR = 283, /* "int type constructor" */
458 UINTCONSTR = 284, /* "uint type constructor" */
459 OFFSETCONSTR = 285, /* "offset type constructor" */
460 DEFUN = 286, /* "keyword `fun'" */
461 DEFSET = 287, /* "keyword `defset'" */
462 DEFTYPE = 288, /* "keyword `type'" */
463 DEFVAR = 289, /* "keyword `var'" */
464 DEFUNIT = 290, /* "keyword `unit'" */
465 METHOD = 291, /* "keyword `method'" */
466 RETURN = 292, /* "keyword `return'" */
467 BREAK = 293, /* "keyword `break'" */
468 STRING = 294, /* "string type specifier" */
469 TRY = 295, /* "keyword `try'" */
470 CATCH = 296, /* "keyword `catch'" */
471 RAISE = 297, /* "keyword `raise'" */
472 VOID = 298, /* "void type specifier" */
473 ANY = 299, /* "any type specifier" */
474 PRINT = 300, /* "keyword `print'" */
475 PRINTF = 301, /* "keyword `printf'" */
476 LOAD = 302, /* "keyword `load'" */
477 LAMBDA = 303, /* "keyword `lambda'" */
478 BUILTIN_RAND = 304, /* BUILTIN_RAND */
479 BUILTIN_GET_ENDIAN = 305, /* BUILTIN_GET_ENDIAN */
480 BUILTIN_SET_ENDIAN = 306, /* BUILTIN_SET_ENDIAN */
481 BUILTIN_GET_IOS = 307, /* BUILTIN_GET_IOS */
482 BUILTIN_SET_IOS = 308, /* BUILTIN_SET_IOS */
483 BUILTIN_OPEN = 309, /* BUILTIN_OPEN */
484 BUILTIN_CLOSE = 310, /* BUILTIN_CLOSE */
485 BUILTIN_IOSIZE = 311, /* BUILTIN_IOSIZE */
486 BUILTIN_GETENV = 312, /* BUILTIN_GETENV */
487 BUILTIN_FORGET = 313, /* BUILTIN_FORGET */
488 BUILTIN_GET_TIME = 314, /* BUILTIN_GET_TIME */
489 BUILTIN_STRACE = 315, /* BUILTIN_STRACE */
490 BUILTIN_TERM_RGB_TO_COLOR = 316, /* BUILTIN_TERM_RGB_TO_COLOR */
491 BUILTIN_TERM_GET_COLOR = 317, /* BUILTIN_TERM_GET_COLOR */
492 BUILTIN_TERM_SET_COLOR = 318, /* BUILTIN_TERM_SET_COLOR */
493 BUILTIN_TERM_GET_BGCOLOR = 319, /* BUILTIN_TERM_GET_BGCOLOR */
494 BUILTIN_TERM_SET_BGCOLOR = 320, /* BUILTIN_TERM_SET_BGCOLOR */
495 BUILTIN_TERM_BEGIN_CLASS = 321, /* BUILTIN_TERM_BEGIN_CLASS */
496 BUILTIN_TERM_END_CLASS = 322, /* BUILTIN_TERM_END_CLASS */
497 BUILTIN_TERM_BEGIN_HYPERLINK = 323, /* BUILTIN_TERM_BEGIN_HYPERLINK */
498 BUILTIN_TERM_END_HYPERLINK = 324, /* BUILTIN_TERM_END_HYPERLINK */
499 POWA = 325, /* "power-and-assign operator" */
500 MULA = 326, /* "multiply-and-assign operator" */
501 DIVA = 327, /* "divide-and-assing operator" */
502 MODA = 328, /* "modulus-and-assign operator" */
503 ADDA = 329, /* "add-and-assing operator" */
504 SUBA = 330, /* "subtract-and-assign operator" */
505 SLA = 331, /* "shift-left-and-assign operator" */
506 SRA = 332, /* "shift-right-and-assign operator" */
507 BANDA = 333, /* "bit-and-and-assign operator" */
508 XORA = 334, /* "bit-xor-and-assign operator" */
509 IORA = 335, /* "bit-or-and-assign operator" */
510 RANGEA = 336, /* "range separator" */
511 OR = 337, /* "logical or operator" */
512 AND = 338, /* "logical and operator" */
513 EQ = 339, /* "equality operator" */
514 NE = 340, /* "inequality operator" */
515 LE = 341, /* "less-or-equal operator" */
516 GE = 342, /* "bigger-or-equal-than operator" */
517 SL = 343, /* "left shift operator" */
518 SR = 344, /* "right shift operator" */
519 CEILDIV = 345, /* "ceiling division operator" */
520 POW = 346, /* "power operator" */
521 BCONC = 347, /* "bit-concatenation operator" */
522 NSMAP = 348, /* "non-strict map operator" */
523 INC = 349, /* "increment operator" */
524 DEC = 350, /* "decrement operator" */
525 AS = 351, /* "cast operator" */
526 ISA = 352, /* "type identification operator" */
527 ATTR = 353, /* "attribute" */
528 UNMAP = 354, /* "unmap operator" */
529 BIG = 355, /* "keyword `big'" */
530 LITTLE = 356, /* "keyword `little'" */
531 SIGNED = 357, /* "keyword `signed'" */
532 UNSIGNED = 358, /* "keyword `unsigned'" */
533 THREEDOTS = 359, /* "varargs indicator" */
534 THEN = 360, /* THEN */
535 UNARY = 361, /* UNARY */
536 HYPERUNARY = 362, /* HYPERUNARY */
537 START_EXP = 363, /* START_EXP */
538 START_DECL = 364, /* START_DECL */
539 START_STMT = 365, /* START_STMT */
540 START_PROGRAM = 366 /* START_PROGRAM */
541 };
542 typedef enum pkl_tab_tokentype pkl_tab_token_kind_t;
543 #endif
544
545 /* Value type. */
546 #if ! defined PKL_TAB_STYPE && ! defined PKL_TAB_STYPE_IS_DECLARED
547 union PKL_TAB_STYPE
548 {
549 #line 338 "pkl-tab.y"
550
551 pkl_ast_node ast;
552 enum pkl_ast_op opcode;
553 int integer;
554
555 #line 556 "pkl-tab.c"
556
557 };
558 typedef union PKL_TAB_STYPE PKL_TAB_STYPE;
559 # define PKL_TAB_STYPE_IS_TRIVIAL 1
560 # define PKL_TAB_STYPE_IS_DECLARED 1
561 #endif
562
563 /* Location type. */
564 #if ! defined PKL_TAB_LTYPE && ! defined PKL_TAB_LTYPE_IS_DECLARED
565 typedef struct PKL_TAB_LTYPE PKL_TAB_LTYPE;
566 struct PKL_TAB_LTYPE
567 {
568 int first_line;
569 int first_column;
570 int last_line;
571 int last_column;
572 };
573 # define PKL_TAB_LTYPE_IS_DECLARED 1
574 # define PKL_TAB_LTYPE_IS_TRIVIAL 1
575 #endif
576
577
578
579 int pkl_tab_parse (struct pkl_parser *pkl_parser);
580
581 #endif /* !YY_PKL_TAB_PKL_TAB_TAB_H_INCLUDED */
582 /* Symbol kind. */
583 enum yysymbol_kind_t
584 {
585 YYSYMBOL_YYEMPTY = -2,
586 YYSYMBOL_YYEOF = 0, /* "end of file" */
587 YYSYMBOL_YYerror = 1, /* error */
588 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
589 YYSYMBOL_INTEGER = 3, /* "integer literal" */
590 YYSYMBOL_INTEGER_OVERFLOW = 4, /* INTEGER_OVERFLOW */
591 YYSYMBOL_CHAR = 5, /* "character literal" */
592 YYSYMBOL_STR = 6, /* "string" */
593 YYSYMBOL_IDENTIFIER = 7, /* "identifier" */
594 YYSYMBOL_TYPENAME = 8, /* "type name" */
595 YYSYMBOL_UNIT = 9, /* "offset unit" */
596 YYSYMBOL_ENUM = 10, /* "keyword `enum'" */
597 YYSYMBOL_PINNED = 11, /* "keyword `pinned'" */
598 YYSYMBOL_STRUCT = 12, /* "keyword `struct'" */
599 YYSYMBOL_token = 13, /* token */
600 YYSYMBOL_UNION = 14, /* "keyword `union'" */
601 YYSYMBOL_CONST = 15, /* "keyword `const'" */
602 YYSYMBOL_CONTINUE = 16, /* "keyword `continue'" */
603 YYSYMBOL_ELSE = 17, /* "keyword `else'" */
604 YYSYMBOL_IF = 18, /* "keyword `if'" */
605 YYSYMBOL_WHILE = 19, /* "keyword `while" */
606 YYSYMBOL_UNTIL = 20, /* "keyword `until'" */
607 YYSYMBOL_FOR = 21, /* "keyword `for'" */
608 YYSYMBOL_IN = 22, /* "keyword `in'" */
609 YYSYMBOL_WHERE = 23, /* "keyword `where'" */
610 YYSYMBOL_SIZEOF = 24, /* "keyword `sizeof'" */
611 YYSYMBOL_ASSERT = 25, /* "keyword `assert'" */
612 YYSYMBOL_ERR = 26, /* "token" */
613 YYSYMBOL_ALIEN = 27, /* ALIEN */
614 YYSYMBOL_INTCONSTR = 28, /* "int type constructor" */
615 YYSYMBOL_UINTCONSTR = 29, /* "uint type constructor" */
616 YYSYMBOL_OFFSETCONSTR = 30, /* "offset type constructor" */
617 YYSYMBOL_DEFUN = 31, /* "keyword `fun'" */
618 YYSYMBOL_DEFSET = 32, /* "keyword `defset'" */
619 YYSYMBOL_DEFTYPE = 33, /* "keyword `type'" */
620 YYSYMBOL_DEFVAR = 34, /* "keyword `var'" */
621 YYSYMBOL_DEFUNIT = 35, /* "keyword `unit'" */
622 YYSYMBOL_METHOD = 36, /* "keyword `method'" */
623 YYSYMBOL_RETURN = 37, /* "keyword `return'" */
624 YYSYMBOL_BREAK = 38, /* "keyword `break'" */
625 YYSYMBOL_STRING = 39, /* "string type specifier" */
626 YYSYMBOL_TRY = 40, /* "keyword `try'" */
627 YYSYMBOL_CATCH = 41, /* "keyword `catch'" */
628 YYSYMBOL_RAISE = 42, /* "keyword `raise'" */
629 YYSYMBOL_VOID = 43, /* "void type specifier" */
630 YYSYMBOL_ANY = 44, /* "any type specifier" */
631 YYSYMBOL_PRINT = 45, /* "keyword `print'" */
632 YYSYMBOL_PRINTF = 46, /* "keyword `printf'" */
633 YYSYMBOL_LOAD = 47, /* "keyword `load'" */
634 YYSYMBOL_LAMBDA = 48, /* "keyword `lambda'" */
635 YYSYMBOL_BUILTIN_RAND = 49, /* BUILTIN_RAND */
636 YYSYMBOL_BUILTIN_GET_ENDIAN = 50, /* BUILTIN_GET_ENDIAN */
637 YYSYMBOL_BUILTIN_SET_ENDIAN = 51, /* BUILTIN_SET_ENDIAN */
638 YYSYMBOL_BUILTIN_GET_IOS = 52, /* BUILTIN_GET_IOS */
639 YYSYMBOL_BUILTIN_SET_IOS = 53, /* BUILTIN_SET_IOS */
640 YYSYMBOL_BUILTIN_OPEN = 54, /* BUILTIN_OPEN */
641 YYSYMBOL_BUILTIN_CLOSE = 55, /* BUILTIN_CLOSE */
642 YYSYMBOL_BUILTIN_IOSIZE = 56, /* BUILTIN_IOSIZE */
643 YYSYMBOL_BUILTIN_GETENV = 57, /* BUILTIN_GETENV */
644 YYSYMBOL_BUILTIN_FORGET = 58, /* BUILTIN_FORGET */
645 YYSYMBOL_BUILTIN_GET_TIME = 59, /* BUILTIN_GET_TIME */
646 YYSYMBOL_BUILTIN_STRACE = 60, /* BUILTIN_STRACE */
647 YYSYMBOL_BUILTIN_TERM_RGB_TO_COLOR = 61, /* BUILTIN_TERM_RGB_TO_COLOR */
648 YYSYMBOL_BUILTIN_TERM_GET_COLOR = 62, /* BUILTIN_TERM_GET_COLOR */
649 YYSYMBOL_BUILTIN_TERM_SET_COLOR = 63, /* BUILTIN_TERM_SET_COLOR */
650 YYSYMBOL_BUILTIN_TERM_GET_BGCOLOR = 64, /* BUILTIN_TERM_GET_BGCOLOR */
651 YYSYMBOL_BUILTIN_TERM_SET_BGCOLOR = 65, /* BUILTIN_TERM_SET_BGCOLOR */
652 YYSYMBOL_BUILTIN_TERM_BEGIN_CLASS = 66, /* BUILTIN_TERM_BEGIN_CLASS */
653 YYSYMBOL_BUILTIN_TERM_END_CLASS = 67, /* BUILTIN_TERM_END_CLASS */
654 YYSYMBOL_BUILTIN_TERM_BEGIN_HYPERLINK = 68, /* BUILTIN_TERM_BEGIN_HYPERLINK */
655 YYSYMBOL_BUILTIN_TERM_END_HYPERLINK = 69, /* BUILTIN_TERM_END_HYPERLINK */
656 YYSYMBOL_POWA = 70, /* "power-and-assign operator" */
657 YYSYMBOL_MULA = 71, /* "multiply-and-assign operator" */
658 YYSYMBOL_DIVA = 72, /* "divide-and-assing operator" */
659 YYSYMBOL_MODA = 73, /* "modulus-and-assign operator" */
660 YYSYMBOL_ADDA = 74, /* "add-and-assing operator" */
661 YYSYMBOL_SUBA = 75, /* "subtract-and-assign operator" */
662 YYSYMBOL_SLA = 76, /* "shift-left-and-assign operator" */
663 YYSYMBOL_SRA = 77, /* "shift-right-and-assign operator" */
664 YYSYMBOL_BANDA = 78, /* "bit-and-and-assign operator" */
665 YYSYMBOL_XORA = 79, /* "bit-xor-and-assign operator" */
666 YYSYMBOL_IORA = 80, /* "bit-or-and-assign operator" */
667 YYSYMBOL_RANGEA = 81, /* "range separator" */
668 YYSYMBOL_OR = 82, /* "logical or operator" */
669 YYSYMBOL_AND = 83, /* "logical and operator" */
670 YYSYMBOL_84_bit_wise_or_operator_ = 84, /* "bit-wise or operator" */
671 YYSYMBOL_85_bit_wise_xor_operator_ = 85, /* "bit-wise xor operator" */
672 YYSYMBOL_86_bit_wise_and_operator_ = 86, /* "bit-wise and operator" */
673 YYSYMBOL_EQ = 87, /* "equality operator" */
674 YYSYMBOL_NE = 88, /* "inequality operator" */
675 YYSYMBOL_LE = 89, /* "less-or-equal operator" */
676 YYSYMBOL_GE = 90, /* "bigger-or-equal-than operator" */
677 YYSYMBOL_91_less_than_operator_ = 91, /* "less-than operator" */
678 YYSYMBOL_92_bigger_than_operator_ = 92, /* "bigger-than operator" */
679 YYSYMBOL_SL = 93, /* "left shift operator" */
680 YYSYMBOL_SR = 94, /* "right shift operator" */
681 YYSYMBOL_95_addition_operator_ = 95, /* "addition operator" */
682 YYSYMBOL_96_subtraction_operator_ = 96, /* "subtraction operator" */
683 YYSYMBOL_97_multiplication_operator_ = 97, /* "multiplication operator" */
684 YYSYMBOL_98_division_operator_ = 98, /* "division operator" */
685 YYSYMBOL_CEILDIV = 99, /* "ceiling division operator" */
686 YYSYMBOL_100_modulus_operator_ = 100, /* "modulus operator" */
687 YYSYMBOL_POW = 101, /* "power operator" */
688 YYSYMBOL_BCONC = 102, /* "bit-concatenation operator" */
689 YYSYMBOL_103_map_operator_ = 103, /* "map operator" */
690 YYSYMBOL_NSMAP = 104, /* "non-strict map operator" */
691 YYSYMBOL_INC = 105, /* "increment operator" */
692 YYSYMBOL_DEC = 106, /* "decrement operator" */
693 YYSYMBOL_AS = 107, /* "cast operator" */
694 YYSYMBOL_ISA = 108, /* "type identification operator" */
695 YYSYMBOL_109_dot_operator_ = 109, /* "dot operator" */
696 YYSYMBOL_ATTR = 110, /* "attribute" */
697 YYSYMBOL_UNMAP = 111, /* "unmap operator" */
698 YYSYMBOL_BIG = 112, /* "keyword `big'" */
699 YYSYMBOL_LITTLE = 113, /* "keyword `little'" */
700 YYSYMBOL_SIGNED = 114, /* "keyword `signed'" */
701 YYSYMBOL_UNSIGNED = 115, /* "keyword `unsigned'" */
702 YYSYMBOL_THREEDOTS = 116, /* "varargs indicator" */
703 YYSYMBOL_THEN = 117, /* THEN */
704 YYSYMBOL_118_ = 118, /* '?' */
705 YYSYMBOL_119_ = 119, /* ':' */
706 YYSYMBOL_UNARY = 120, /* UNARY */
707 YYSYMBOL_HYPERUNARY = 121, /* HYPERUNARY */
708 YYSYMBOL_START_EXP = 122, /* START_EXP */
709 YYSYMBOL_START_DECL = 123, /* START_DECL */
710 YYSYMBOL_START_STMT = 124, /* START_STMT */
711 YYSYMBOL_START_PROGRAM = 125, /* START_PROGRAM */
712 YYSYMBOL_126_ = 126, /* ',' */
713 YYSYMBOL_127_ = 127, /* ';' */
714 YYSYMBOL_128_ = 128, /* '(' */
715 YYSYMBOL_129_ = 129, /* ')' */
716 YYSYMBOL_130_ = 130, /* '{' */
717 YYSYMBOL_131_ = 131, /* '}' */
718 YYSYMBOL_132_ = 132, /* '~' */
719 YYSYMBOL_133_ = 133, /* '!' */
720 YYSYMBOL_134_ = 134, /* '[' */
721 YYSYMBOL_135_ = 135, /* ']' */
722 YYSYMBOL_136_ = 136, /* '=' */
723 YYSYMBOL_YYACCEPT = 137, /* $accept */
724 YYSYMBOL_pushlevel = 138, /* pushlevel */
725 YYSYMBOL_start = 139, /* start */
726 YYSYMBOL_program = 140, /* program */
727 YYSYMBOL_program_elem_list = 141, /* program_elem_list */
728 YYSYMBOL_program_elem = 142, /* program_elem */
729 YYSYMBOL_load = 143, /* load */
730 YYSYMBOL_identifier = 144, /* identifier */
731 YYSYMBOL_expression_list = 145, /* expression_list */
732 YYSYMBOL_expression_opt = 146, /* expression_opt */
733 YYSYMBOL_expression = 147, /* expression */
734 YYSYMBOL_bconc = 148, /* bconc */
735 YYSYMBOL_mapop = 149, /* mapop */
736 YYSYMBOL_map = 150, /* map */
737 YYSYMBOL_unary_operator = 151, /* unary_operator */
738 YYSYMBOL_primary = 152, /* primary */
739 YYSYMBOL_153_1 = 153, /* $@1 */
740 YYSYMBOL_funcall = 154, /* funcall */
741 YYSYMBOL_funcall_arg_list = 155, /* funcall_arg_list */
742 YYSYMBOL_funcall_arg = 156, /* funcall_arg */
743 YYSYMBOL_opt_comma = 157, /* opt_comma */
744 YYSYMBOL_struct_field_list = 158, /* struct_field_list */
745 YYSYMBOL_struct_field = 159, /* struct_field */
746 YYSYMBOL_array = 160, /* array */
747 YYSYMBOL_array_initializer_list = 161, /* array_initializer_list */
748 YYSYMBOL_array_initializer = 162, /* array_initializer */
749 YYSYMBOL_pushlevel_args = 163, /* pushlevel_args */
750 YYSYMBOL_function_specifier = 164, /* function_specifier */
751 YYSYMBOL_function_arg_list = 165, /* function_arg_list */
752 YYSYMBOL_function_arg = 166, /* function_arg */
753 YYSYMBOL_function_arg_initial = 167, /* function_arg_initial */
754 YYSYMBOL_type_specifier = 168, /* type_specifier */
755 YYSYMBOL_typename = 169, /* typename */
756 YYSYMBOL_string_type_specifier = 170, /* string_type_specifier */
757 YYSYMBOL_simple_type_specifier = 171, /* simple_type_specifier */
758 YYSYMBOL_cons_type_specifier = 172, /* cons_type_specifier */
759 YYSYMBOL_integral_type_specifier = 173, /* integral_type_specifier */
760 YYSYMBOL_integral_type_sign = 174, /* integral_type_sign */
761 YYSYMBOL_offset_type_specifier = 175, /* offset_type_specifier */
762 YYSYMBOL_array_type_specifier = 176, /* array_type_specifier */
763 YYSYMBOL_function_type_specifier = 177, /* function_type_specifier */
764 YYSYMBOL_function_type_arg_list = 178, /* function_type_arg_list */
765 YYSYMBOL_function_type_arg = 179, /* function_type_arg */
766 YYSYMBOL_struct_type_specifier = 180, /* struct_type_specifier */
767 YYSYMBOL_181_2 = 181, /* $@2 */
768 YYSYMBOL_struct_or_union = 182, /* struct_or_union */
769 YYSYMBOL_struct_type_pinned = 183, /* struct_type_pinned */
770 YYSYMBOL_integral_struct = 184, /* integral_struct */
771 YYSYMBOL_struct_type_elem_list = 185, /* struct_type_elem_list */
772 YYSYMBOL_endianness = 186, /* endianness */
773 YYSYMBOL_struct_type_field = 187, /* struct_type_field */
774 YYSYMBOL_188_3 = 188, /* $@3 */
775 YYSYMBOL_struct_type_field_identifier = 189, /* struct_type_field_identifier */
776 YYSYMBOL_struct_type_field_label = 190, /* struct_type_field_label */
777 YYSYMBOL_struct_type_field_constraint_or_init = 191, /* struct_type_field_constraint_or_init */
778 YYSYMBOL_struct_type_field_optcond = 192, /* struct_type_field_optcond */
779 YYSYMBOL_simple_declaration = 193, /* simple_declaration */
780 YYSYMBOL_declaration = 194, /* declaration */
781 YYSYMBOL_195_4 = 195, /* @4 */
782 YYSYMBOL_defun_or_method = 196, /* defun_or_method */
783 YYSYMBOL_defvar_list = 197, /* defvar_list */
784 YYSYMBOL_defvar = 198, /* defvar */
785 YYSYMBOL_deftype_list = 199, /* deftype_list */
786 YYSYMBOL_deftype = 200, /* deftype */
787 YYSYMBOL_defunit_list = 201, /* defunit_list */
788 YYSYMBOL_defunit = 202, /* defunit */
789 YYSYMBOL_comp_stmt = 203, /* comp_stmt */
790 YYSYMBOL_builtin = 204, /* builtin */
791 YYSYMBOL_stmt_decl_list = 205, /* stmt_decl_list */
792 YYSYMBOL_ass_exp_op = 206, /* ass_exp_op */
793 YYSYMBOL_simple_stmt_list = 207, /* simple_stmt_list */
794 YYSYMBOL_simple_stmt = 208, /* simple_stmt */
795 YYSYMBOL_stmt = 209, /* stmt */
796 YYSYMBOL_210_5 = 210, /* @5 */
797 YYSYMBOL_211_6 = 211, /* @6 */
798 YYSYMBOL_print_stmt_arg_list = 212, /* print_stmt_arg_list */
799 YYSYMBOL_funcall_stmt = 213, /* funcall_stmt */
800 YYSYMBOL_funcall_stmt_arg_list = 214, /* funcall_stmt_arg_list */
801 YYSYMBOL_funcall_stmt_arg = 215 /* funcall_stmt_arg */
802 };
803 typedef enum yysymbol_kind_t yysymbol_kind_t;
804
805
806
807
808 #ifdef short
809 # undef short
810 #endif
811
812 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
813 <limits.h> and (if available) <stdint.h> are included
814 so that the code can choose integer types of a good width. */
815
816 #ifndef __PTRDIFF_MAX__
817 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
818 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
819 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
820 # define YY_STDINT_H
821 # endif
822 #endif
823
824 /* Narrow types that promote to a signed type and that can represent a
825 signed or unsigned integer of at least N bits. In tables they can
826 save space and decrease cache pressure. Promoting to a signed type
827 helps avoid bugs in integer arithmetic. */
828
829 #ifdef __INT_LEAST8_MAX__
830 typedef __INT_LEAST8_TYPE__ yytype_int8;
831 #elif defined YY_STDINT_H
832 typedef int_least8_t yytype_int8;
833 #else
834 typedef signed char yytype_int8;
835 #endif
836
837 #ifdef __INT_LEAST16_MAX__
838 typedef __INT_LEAST16_TYPE__ yytype_int16;
839 #elif defined YY_STDINT_H
840 typedef int_least16_t yytype_int16;
841 #else
842 typedef short yytype_int16;
843 #endif
844
845 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
846 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
847 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
848 && UINT_LEAST8_MAX <= INT_MAX)
849 typedef uint_least8_t yytype_uint8;
850 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
851 typedef unsigned char yytype_uint8;
852 #else
853 typedef short yytype_uint8;
854 #endif
855
856 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
857 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
858 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
859 && UINT_LEAST16_MAX <= INT_MAX)
860 typedef uint_least16_t yytype_uint16;
861 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
862 typedef unsigned short yytype_uint16;
863 #else
864 typedef int yytype_uint16;
865 #endif
866
867 #ifndef YYPTRDIFF_T
868 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
869 # define YYPTRDIFF_T __PTRDIFF_TYPE__
870 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
871 # elif defined PTRDIFF_MAX
872 # ifndef ptrdiff_t
873 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
874 # endif
875 # define YYPTRDIFF_T ptrdiff_t
876 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
877 # else
878 # define YYPTRDIFF_T long
879 # define YYPTRDIFF_MAXIMUM LONG_MAX
880 # endif
881 #endif
882
883 #ifndef YYSIZE_T
884 # ifdef __SIZE_TYPE__
885 # define YYSIZE_T __SIZE_TYPE__
886 # elif defined size_t
887 # define YYSIZE_T size_t
888 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
889 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
890 # define YYSIZE_T size_t
891 # else
892 # define YYSIZE_T unsigned
893 # endif
894 #endif
895
896 #define YYSIZE_MAXIMUM \
897 YY_CAST (YYPTRDIFF_T, \
898 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
899 ? YYPTRDIFF_MAXIMUM \
900 : YY_CAST (YYSIZE_T, -1)))
901
902 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
903
904
905 /* Stored state numbers (used for stacks). */
906 typedef yytype_int16 yy_state_t;
907
908 /* State numbers in computations. */
909 typedef int yy_state_fast_t;
910
911 #ifndef YY_
912 # if defined YYENABLE_NLS && YYENABLE_NLS
913 # if ENABLE_NLS
914 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
915 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
916 # endif
917 # endif
918 # ifndef YY_
919 # define YY_(Msgid) Msgid
920 # endif
921 #endif
922
923 #ifndef N_
924 # define N_(Msgid) Msgid
925 #endif
926
927
928 #ifndef YY_ATTRIBUTE_PURE
929 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
930 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
931 # else
932 # define YY_ATTRIBUTE_PURE
933 # endif
934 #endif
935
936 #ifndef YY_ATTRIBUTE_UNUSED
937 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
938 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
939 # else
940 # define YY_ATTRIBUTE_UNUSED
941 # endif
942 #endif
943
944 /* Suppress unused-variable warnings by "using" E. */
945 #if ! defined lint || defined __GNUC__
946 # define YYUSE(E) ((void) (E))
947 #else
948 # define YYUSE(E) /* empty */
949 #endif
950
951 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
952 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
953 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
954 _Pragma ("GCC diagnostic push") \
955 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
956 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
957 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
958 _Pragma ("GCC diagnostic pop")
959 #else
960 # define YY_INITIAL_VALUE(Value) Value
961 #endif
962 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
963 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
964 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
965 #endif
966 #ifndef YY_INITIAL_VALUE
967 # define YY_INITIAL_VALUE(Value) /* Nothing. */
968 #endif
969
970 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
971 # define YY_IGNORE_USELESS_CAST_BEGIN \
972 _Pragma ("GCC diagnostic push") \
973 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
974 # define YY_IGNORE_USELESS_CAST_END \
975 _Pragma ("GCC diagnostic pop")
976 #endif
977 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
978 # define YY_IGNORE_USELESS_CAST_BEGIN
979 # define YY_IGNORE_USELESS_CAST_END
980 #endif
981
982
983 #define YY_ASSERT(E) ((void) (0 && (E)))
984
985 #if 1
986
987 /* The parser invokes alloca or malloc; define the necessary symbols. */
988
989 # ifdef YYSTACK_ALLOC
990 /* Pacify GCC's 'empty if-body' warning. */
991 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
992 # ifndef YYSTACK_ALLOC_MAXIMUM
993 /* The OS might guarantee only one guard page at the bottom of the stack,
994 and a page size can be as small as 4096 bytes. So we cannot safely
995 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
996 to allow for a few compiler-allocated temporary stack slots. */
997 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
998 # endif
999 # else
1000 # define YYSTACK_ALLOC YYMALLOC
1001 # define YYSTACK_FREE YYFREE
1002 # ifndef YYSTACK_ALLOC_MAXIMUM
1003 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1004 # endif
1005 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1006 && ! ((defined YYMALLOC || defined malloc) \
1007 && (defined YYFREE || defined free)))
1008 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1009 # ifndef EXIT_SUCCESS
1010 # define EXIT_SUCCESS 0
1011 # endif
1012 # endif
1013 # ifndef YYMALLOC
1014 # define YYMALLOC malloc
1015 # if ! defined malloc && ! defined EXIT_SUCCESS
1016 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1017 # endif
1018 # endif
1019 # ifndef YYFREE
1020 # define YYFREE free
1021 # if ! defined free && ! defined EXIT_SUCCESS
1022 void free (void *); /* INFRINGES ON USER NAME SPACE */
1023 # endif
1024 # endif
1025 # endif
1026 # define YYCOPY_NEEDED 1
1027 #endif /* 1 */
1028
1029 #if (! defined yyoverflow \
1030 && (! defined __cplusplus \
1031 || (defined PKL_TAB_LTYPE_IS_TRIVIAL && PKL_TAB_LTYPE_IS_TRIVIAL \
1032 && defined PKL_TAB_STYPE_IS_TRIVIAL && PKL_TAB_STYPE_IS_TRIVIAL)))
1033
1034 /* A type that is properly aligned for any stack member. */
1035 union yyalloc
1036 {
1037 yy_state_t yyss_alloc;
1038 YYSTYPE yyvs_alloc;
1039 YYLTYPE yyls_alloc;
1040 };
1041
1042 /* The size of the maximum gap between one aligned stack and the next. */
1043 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
1044
1045 /* The size of an array large to enough to hold all stacks, each with
1046 N elements. */
1047 # define YYSTACK_BYTES(N) \
1048 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
1049 + YYSIZEOF (YYLTYPE)) \
1050 + 2 * YYSTACK_GAP_MAXIMUM)
1051
1052 # define YYCOPY_NEEDED 1
1053
1054 /* Relocate STACK from its old location to the new one. The
1055 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1056 elements in the stack, and YYPTR gives the new location of the
1057 stack. Advance YYPTR to a properly aligned location for the next
1058 stack. */
1059 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1060 do \
1061 { \
1062 YYPTRDIFF_T yynewbytes; \
1063 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1064 Stack = &yyptr->Stack_alloc; \
1065 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1066 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1067 } \
1068 while (0)
1069
1070 #endif
1071
1072 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1073 /* Copy COUNT objects from SRC to DST. The source and destination do
1074 not overlap. */
1075 # ifndef YYCOPY
1076 # if defined __GNUC__ && 1 < __GNUC__
1077 # define YYCOPY(Dst, Src, Count) \
1078 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1079 # else
1080 # define YYCOPY(Dst, Src, Count) \
1081 do \
1082 { \
1083 YYPTRDIFF_T yyi; \
1084 for (yyi = 0; yyi < (Count); yyi++) \
1085 (Dst)[yyi] = (Src)[yyi]; \
1086 } \
1087 while (0)
1088 # endif
1089 # endif
1090 #endif /* !YYCOPY_NEEDED */
1091
1092 /* YYFINAL -- State number of the termination state. */
1093 #define YYFINAL 82
1094 /* YYLAST -- Last index in YYTABLE. */
1095 #define YYLAST 3145
1096
1097 /* YYNTOKENS -- Number of terminals. */
1098 #define YYNTOKENS 137
1099 /* YYNNTS -- Number of nonterminals. */
1100 #define YYNNTS 79
1101 /* YYNRULES -- Number of rules. */
1102 #define YYNRULES 272
1103 /* YYNSTATES -- Number of states. */
1104 #define YYNSTATES 474
1105
1106 #define YYMAXUTOK 366
1107
1108
1109 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1110 as returned by yylex, with out-of-bounds checking. */
1111 #define YYTRANSLATE(YYX) \
1112 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1113 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1114 : YYSYMBOL_YYUNDEF)
1115
1116 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1117 as returned by yylex. */
1118 static const yytype_uint8 yytranslate[] =
1119 {
1120 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1121 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1122 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1123 2, 2, 2, 133, 2, 2, 2, 100, 86, 2,
1124 128, 129, 97, 95, 126, 96, 109, 98, 2, 2,
1125 2, 2, 2, 2, 2, 2, 2, 2, 119, 127,
1126 91, 136, 92, 118, 103, 2, 2, 2, 2, 2,
1127 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1128 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1129 2, 134, 2, 135, 85, 2, 2, 2, 2, 2,
1130 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1131 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1132 2, 2, 2, 130, 84, 131, 132, 2, 2, 2,
1133 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1134 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1135 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1136 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1137 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1138 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1139 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1140 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1141 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1142 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1143 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1144 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1145 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1146 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1147 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1148 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1149 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1150 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1151 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1152 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1153 75, 76, 77, 78, 79, 80, 81, 82, 83, 87,
1154 88, 89, 90, 93, 94, 99, 101, 102, 104, 105,
1155 106, 107, 108, 110, 111, 112, 113, 114, 115, 116,
1156 117, 120, 121, 122, 123, 124, 125
1157 };
1158
1159 #if PKL_TAB_DEBUG
1160 /* YYRLINEYYN -- Source line where rule number YYN was defined. */
1161 static const yytype_int16 yyrline[] =
1162 {
1163 0, 548, 548, 563, 569, 576, 582, 588, 594, 604,
1164 610, 616, 625, 629, 633, 634, 644, 645, 646, 650,
1165 684, 724, 725, 733, 735, 736, 743, 744, 748, 749,
1166 755, 760, 767, 773, 779, 785, 791, 796, 801, 807,
1167 813, 819, 825, 831, 837, 843, 849, 855, 861, 867,
1168 873, 879, 885, 891, 896, 901, 907, 921, 941, 956,
1169 971, 977, 983, 984, 988, 997, 998, 1002, 1008, 1017,
1170 1018, 1019, 1020, 1021, 1025, 1054, 1060, 1067, 1073, 1079,
1171 1087, 1088, 1094, 1099, 1105, 1111, 1117, 1123, 1129, 1130,
1172 1135, 1134, 1149, 1155, 1164, 1173, 1175, 1176, 1183, 1192,
1173 1193, 1197, 1199, 1200, 1207, 1214, 1225, 1236, 1237, 1244,
1174 1250, 1263, 1277, 1287, 1300, 1301, 1308, 1318, 1344, 1345,
1175 1353, 1354, 1355, 1359, 1374, 1382, 1387, 1392, 1393, 1394,
1176 1395, 1396, 1400, 1401, 1402, 1406, 1417, 1418, 1422, 1453,
1177 1464, 1470, 1478, 1485, 1495, 1496, 1503, 1509, 1516, 1535,
1178 1555, 1553, 1615, 1616, 1620, 1621, 1625, 1626, 1630, 1631,
1179 1632, 1634, 1639, 1640, 1641, 1646, 1645, 1754, 1755, 1759,
1180 1763, 1771, 1775, 1780, 1791, 1795, 1807, 1808, 1809, 1814,
1181 1813, 1876, 1880, 1881, 1885, 1886, 1891, 1913, 1914, 1919,
1182 1943, 1944, 1949, 1988, 1996, 2004, 2015, 2016, 2017, 2018,
1183 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028,
1184 2029, 2030, 2031, 2032, 2033, 2034, 2038, 2039, 2041, 2042,
1185 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056,
1186 2057, 2061, 2062, 2063, 2068, 2074, 2085, 2091, 2097, 2103,
1187 2112, 2119, 2126, 2135, 2136, 2141, 2145, 2151, 2157, 2173,
1188 2193, 2211, 2210, 2264, 2263, 2316, 2321, 2326, 2332, 2338,
1189 2344, 2350, 2360, 2371, 2377, 2383, 2389, 2401, 2405, 2416,
1190 2425, 2426, 2433
1191 };
1192 #endif
1193
1194 /** Accessing symbol of state STATE. */
1195 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1196
1197 #if 1
1198 /* The user-facing name of the symbol whose (internal) number is
1199 YYSYMBOL. No bounds checking. */
1200 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1201
1202 static const char *
yysymbol_name(yysymbol_kind_t yysymbol)1203 yysymbol_name (yysymbol_kind_t yysymbol)
1204 {
1205 static const char *const yy_sname[] =
1206 {
1207 N_("end of file"), N_("error"), N_("invalid token"),
1208 N_("integer literal"), "INTEGER_OVERFLOW", N_("character literal"),
1209 N_("string"), N_("identifier"), N_("type name"), N_("offset unit"),
1210 N_("keyword `enum'"), N_("keyword `pinned'"), N_("keyword `struct'"),
1211 "token", N_("keyword `union'"), N_("keyword `const'"),
1212 N_("keyword `continue'"), N_("keyword `else'"), N_("keyword `if'"),
1213 N_("keyword `while"), N_("keyword `until'"), N_("keyword `for'"),
1214 N_("keyword `in'"), N_("keyword `where'"), N_("keyword `sizeof'"),
1215 N_("keyword `assert'"), N_("token"), "ALIEN", N_("int type constructor"),
1216 N_("uint type constructor"), N_("offset type constructor"),
1217 N_("keyword `fun'"), N_("keyword `defset'"), N_("keyword `type'"),
1218 N_("keyword `var'"), N_("keyword `unit'"), N_("keyword `method'"),
1219 N_("keyword `return'"), N_("keyword `break'"),
1220 N_("string type specifier"), N_("keyword `try'"), N_("keyword `catch'"),
1221 N_("keyword `raise'"), N_("void type specifier"),
1222 N_("any type specifier"), N_("keyword `print'"), N_("keyword `printf'"),
1223 N_("keyword `load'"), N_("keyword `lambda'"), "BUILTIN_RAND",
1224 "BUILTIN_GET_ENDIAN", "BUILTIN_SET_ENDIAN", "BUILTIN_GET_IOS",
1225 "BUILTIN_SET_IOS", "BUILTIN_OPEN", "BUILTIN_CLOSE", "BUILTIN_IOSIZE",
1226 "BUILTIN_GETENV", "BUILTIN_FORGET", "BUILTIN_GET_TIME", "BUILTIN_STRACE",
1227 "BUILTIN_TERM_RGB_TO_COLOR", "BUILTIN_TERM_GET_COLOR",
1228 "BUILTIN_TERM_SET_COLOR", "BUILTIN_TERM_GET_BGCOLOR",
1229 "BUILTIN_TERM_SET_BGCOLOR", "BUILTIN_TERM_BEGIN_CLASS",
1230 "BUILTIN_TERM_END_CLASS", "BUILTIN_TERM_BEGIN_HYPERLINK",
1231 "BUILTIN_TERM_END_HYPERLINK", N_("power-and-assign operator"),
1232 N_("multiply-and-assign operator"), N_("divide-and-assing operator"),
1233 N_("modulus-and-assign operator"), N_("add-and-assing operator"),
1234 N_("subtract-and-assign operator"), N_("shift-left-and-assign operator"),
1235 N_("shift-right-and-assign operator"), N_("bit-and-and-assign operator"),
1236 N_("bit-xor-and-assign operator"), N_("bit-or-and-assign operator"),
1237 N_("range separator"), N_("logical or operator"),
1238 N_("logical and operator"), N_("bit-wise or operator"),
1239 N_("bit-wise xor operator"), N_("bit-wise and operator"),
1240 N_("equality operator"), N_("inequality operator"),
1241 N_("less-or-equal operator"), N_("bigger-or-equal-than operator"),
1242 N_("less-than operator"), N_("bigger-than operator"),
1243 N_("left shift operator"), N_("right shift operator"),
1244 N_("addition operator"), N_("subtraction operator"),
1245 N_("multiplication operator"), N_("division operator"),
1246 N_("ceiling division operator"), N_("modulus operator"),
1247 N_("power operator"), N_("bit-concatenation operator"),
1248 N_("map operator"), N_("non-strict map operator"),
1249 N_("increment operator"), N_("decrement operator"), N_("cast operator"),
1250 N_("type identification operator"), N_("dot operator"), N_("attribute"),
1251 N_("unmap operator"), N_("keyword `big'"), N_("keyword `little'"),
1252 N_("keyword `signed'"), N_("keyword `unsigned'"),
1253 N_("varargs indicator"), "THEN", "'?'", "':'", "UNARY", "HYPERUNARY",
1254 "START_EXP", "START_DECL", "START_STMT", "START_PROGRAM", "','", "';'",
1255 "'('", "')'", "'{'", "'}'", "'~'", "'!'", "'['", "']'", "'='", "$accept",
1256 "pushlevel", "start", "program", "program_elem_list", "program_elem",
1257 "load", "identifier", "expression_list", "expression_opt", "expression",
1258 "bconc", "mapop", "map", "unary_operator", "primary", "$@1", "funcall",
1259 "funcall_arg_list", "funcall_arg", "opt_comma", "struct_field_list",
1260 "struct_field", "array", "array_initializer_list", "array_initializer",
1261 "pushlevel_args", "function_specifier", "function_arg_list",
1262 "function_arg", "function_arg_initial", "type_specifier", "typename",
1263 "string_type_specifier", "simple_type_specifier", "cons_type_specifier",
1264 "integral_type_specifier", "integral_type_sign", "offset_type_specifier",
1265 "array_type_specifier", "function_type_specifier",
1266 "function_type_arg_list", "function_type_arg", "struct_type_specifier",
1267 "$@2", "struct_or_union", "struct_type_pinned", "integral_struct",
1268 "struct_type_elem_list", "endianness", "struct_type_field", "$@3",
1269 "struct_type_field_identifier", "struct_type_field_label",
1270 "struct_type_field_constraint_or_init", "struct_type_field_optcond",
1271 "simple_declaration", "declaration", "@4", "defun_or_method",
1272 "defvar_list", "defvar", "deftype_list", "deftype", "defunit_list",
1273 "defunit", "comp_stmt", "builtin", "stmt_decl_list", "ass_exp_op",
1274 "simple_stmt_list", "simple_stmt", "stmt", "@5", "@6",
1275 "print_stmt_arg_list", "funcall_stmt", "funcall_stmt_arg_list",
1276 "funcall_stmt_arg", YY_NULLPTR
1277 };
1278 /* YYTRANSLATABLE[SYMBOL-NUM] -- Whether YY_SNAME[SYMBOL-NUM] is
1279 internationalizable. */
1280 static yytype_int8 yytranslatable[] =
1281 {
1282 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
1283 1, 1, 1, 0, 1, 1, 1, 1, 1, 1,
1284 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
1285 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1286 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1289 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1290 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1291 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1292 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1293 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
1294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1295 0, 0, 0, 0, 0, 0, 0
1296 };
1297 return (yysymbol < YYNTOKENS && yytranslatable[yysymbol]
1298 ? _(yy_sname[yysymbol])
1299 : yy_sname[yysymbol]);
1300 }
1301 #endif
1302
1303 #ifdef YYPRINT
1304 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1305 (internal) symbol number NUM (which must be that of a token). */
1306 static const yytype_int16 yytoknum[] =
1307 {
1308 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1309 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1310 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1311 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1312 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1313 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1314 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1315 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1316 335, 336, 337, 338, 124, 94, 38, 339, 340, 341,
1317 342, 60, 62, 343, 344, 43, 45, 42, 47, 345,
1318 37, 346, 347, 64, 348, 349, 350, 351, 352, 46,
1319 353, 354, 355, 356, 357, 358, 359, 360, 63, 58,
1320 361, 362, 363, 364, 365, 366, 44, 59, 40, 41,
1321 123, 125, 126, 33, 91, 93, 61
1322 };
1323 #endif
1324
1325 #define YYPACT_NINF (-379)
1326
1327 #define yypact_value_is_default(Yyn) \
1328 ((Yyn) == YYPACT_NINF)
1329
1330 #define YYTABLE_NINF (-254)
1331
1332 #define yytable_value_is_error(Yyn) \
1333 ((Yyn) == YYTABLE_NINF)
1334
1335 /* YYPACTSTATE-NUM -- Index in YYTABLE of the portion describing
1336 STATE-NUM. */
1337 static const yytype_int16 yypact[] =
1338 {
1339 109, 1694, 52, 1205, 659, 36, -379, -379, -379, -379,
1340 -379, -379, -379, -86, -379, -379, 345, -379, -379, -379,
1341 -379, -379, -379, 1694, 1694, -379, 1694, -379, -379, 1391,
1342 2551, -379, -379, 1694, -82, -379, -379, -6, 10, -70,
1343 21, -379, 50, -379, 24, -379, 89, 89, 89, -379,
1344 14, 29, 89, 47, 60, 61, 62, 68, 1523, 51,
1345 1337, 1531, 1694, 0, 126, -379, 3015, 70, 2693, 67,
1346 72, 1682, -379, 77, 82, -379, -379, 794, -379, -379,
1347 -379, -379, -379, 345, -379, -379, -78, -379, 37, 139,
1348 139, 2111, -99, 83, 79, 2693, 85, -379, -379, 1694,
1349 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694,
1350 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694, 1694,
1351 1694, -379, -379, 345, 345, -379, 1694, -379, 59, 89,
1352 1694, 1577, 1740, -379, -379, 840, 1694, 1694, 124, -379,
1353 -379, 81, 95, -379, 88, 96, -379, 90, 99, -379,
1354 -379, -379, -379, -379, 1694, 1694, -4, 1694, -379, 2363,
1355 -379, -11, -379, 2411, 2457, -379, 223, 115, 121, -379,
1356 -379, -379, -379, -379, -379, -379, -379, -379, -379, -379,
1357 -379, -379, -379, -379, -379, -379, -379, -379, -379, 1027,
1358 -379, -379, 1694, 1694, -379, -379, -379, -379, -379, -379,
1359 -379, -379, -379, -379, -379, 229, 1694, 1694, 131, -379,
1360 -379, -379, -379, -66, 86, -379, -379, -75, -379, -379,
1361 1694, 1391, 117, 2833, 2739, 2787, 2859, 2887, 2927, 2953,
1362 2953, 2757, 2757, 2757, 2757, 983, 983, 184, 184, 75,
1363 75, 75, 75, 133, 166, 120, 120, 2599, -379, 2693,
1364 -122, -379, 848, 627, 128, -98, 132, 2693, 130, -379,
1365 -379, 1793, 2645, 134, 2693, -379, 129, 89, 1694, 89,
1366 1694, 89, 141, 2163, 2211, 240, 1694, 127, 2063, -379,
1367 1694, 19, -379, -379, 44, -379, -379, -379, -379, -379,
1368 1159, -379, 2693, 2693, 1694, 2693, 2693, -379, -379, 173,
1369 186, 320, -379, 1847, -379, -379, 1694, 1694, -379, -379,
1370 1901, 1694, 981, -379, 1694, 1740, 149, -379, 1694, 1694,
1371 168, 11, 252, -379, 120, -379, -379, -379, 2693, -379,
1372 2693, -379, 37, 1337, 1337, 1694, 143, 2693, 180, 1694,
1373 -379, 2505, 1694, -379, -379, 1694, -379, -55, -379, -379,
1374 -379, 2693, -379, -379, 182, 170, 183, 5, -379, 179,
1375 2693, -379, -379, 1955, -379, 2009, 2693, -379, -379, 2693,
1376 2693, -379, -379, 345, -103, 187, 193, -379, 172, -379,
1377 304, -379, 2693, 1383, 1694, 2263, -379, 2693, 320, 2693,
1378 -379, -379, 345, 320, 188, -379, 1694, -379, -379, 120,
1379 -379, 345, 171, -379, -379, 345, 1337, 299, 195, -47,
1380 -379, 199, -379, -379, 200, -72, -379, 1694, -379, 2693,
1381 120, -379, 120, 203, -379, 201, 314, 1383, 1337, 1383,
1382 -379, -379, 2693, 208, 1337, 1694, -379, -379, -34, -379,
1383 -379, -379, 440, -379, 2311, 1337, -379, -379, 374, 129,
1384 -379, -379, 1337, -379, -379, -379, -379, 89, -379, -379,
1385 -379, -93, 1694, 1694, 239, 2693, 2693, 1694, 322, 2693,
1386 1694, 216, 2693, -379
1387 };
1388
1389 /* YYDEFACTSTATE-NUM -- Default reduction number in state STATE-NUM.
1390 Performed when YYTABLE does not specify something else to do. Zero
1391 means the default is an error. */
1392 static const yytype_int16 yydefact[] =
1393 {
1394 0, 0, 0, 2, 2, 0, 75, 76, 77, 78,
1395 74, 123, 58, 0, 136, 137, 0, 124, 126, 125,
1396 90, 70, 69, 0, 0, 73, 0, 71, 72, 0,
1397 3, 62, 63, 0, 28, 88, 80, 127, 131, 0,
1398 0, 128, 0, 129, 130, 182, 0, 0, 0, 183,
1399 0, 5, 0, 0, 0, 0, 0, 0, 0, 0,
1400 2, 0, 0, 0, 0, 244, 0, 9, 238, 62,
1401 63, 28, 243, 0, 7, 242, 11, 2, 14, 18,
1402 16, 17, 1, 0, 127, 131, 0, 130, 0, 60,
1403 61, 0, 28, 0, 0, 109, 99, 107, 59, 0,
1404 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1406 0, 92, 93, 0, 0, 31, 0, 4, 29, 0,
1407 95, 0, 101, 65, 66, 0, 0, 23, 0, 22,
1408 21, 0, 177, 187, 0, 176, 184, 0, 178, 190,
1409 181, 6, 179, 256, 0, 0, 2, 0, 257, 0,
1410 255, 0, 263, 0, 0, 267, 0, 0, 0, 196,
1411 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
1412 207, 208, 209, 210, 211, 212, 213, 214, 215, 2,
1413 195, 10, 0, 0, 220, 221, 222, 223, 224, 225,
1414 226, 227, 228, 230, 229, 0, 0, 0, 269, 270,
1415 245, 8, 15, 0, 0, 111, 91, 0, 79, 89,
1416 0, 100, 0, 52, 51, 50, 47, 48, 49, 41,
1417 42, 45, 46, 43, 44, 39, 40, 32, 33, 34,
1418 35, 36, 38, 37, 64, 53, 54, 0, 81, 98,
1419 0, 96, 0, 0, 74, 123, 0, 104, 99, 102,
1420 140, 0, 67, 99, 24, 135, 2, 0, 0, 0,
1421 0, 0, 0, 0, 0, 0, 26, 0, 0, 258,
1422 0, 2, 264, 265, 0, 267, 20, 19, 193, 218,
1423 2, 216, 236, 237, 0, 234, 235, 271, 30, 0,
1424 0, 0, 111, 0, 108, 106, 0, 0, 94, 85,
1425 0, 0, 0, 82, 0, 100, 0, 141, 0, 100,
1426 0, 0, 154, 189, 120, 122, 121, 188, 186, 185,
1427 192, 191, 0, 2, 2, 0, 0, 27, 0, 0,
1428 240, 0, 0, 2, 259, 0, 266, 0, 194, 219,
1429 217, 272, 139, 138, 0, 0, 114, 0, 2, 0,
1430 55, 97, 86, 0, 87, 0, 105, 103, 57, 68,
1431 25, 56, 148, 0, 146, 0, 144, 155, 0, 180,
1432 246, 248, 2, 231, 26, 0, 262, 2, 0, 268,
1433 239, 117, 0, 0, 118, 113, 0, 83, 84, 143,
1434 147, 0, 0, 152, 153, 156, 2, 251, 0, 0,
1435 232, 0, 241, 260, 0, 0, 115, 0, 116, 110,
1436 142, 145, 157, 0, 247, 0, 0, 0, 2, 231,
1437 2, 2, 119, 150, 2, 0, 233, 250, 0, 261,
1438 112, 149, 162, 252, 0, 2, 164, 163, 162, 2,
1439 158, 159, 2, 249, 151, 161, 160, 167, 254, 168,
1440 165, 171, 0, 0, 169, 172, 173, 0, 174, 170,
1441 0, 0, 175, 166
1442 };
1443
1444 /* YYPGOTONTERM-NUM. */
1445 static const yytype_int16 yypgoto[] =
1446 {
1447 -379, -145, -379, -379, -379, 268, 351, 98, -379, -29,
1448 -1, 13, -379, 66, -379, -2, -379, -379, -379, 55,
1449 -186, -379, 42, -379, -379, 137, 64, 38, -25, -17,
1450 -379, -77, 135, 178, 212, -379, -379, -379, -379, 237,
1451 -379, -26, -379, -379, -379, -379, -379, -379, -379, -379,
1452 -71, -379, -379, -379, -379, -379, 101, 6, -379, -379,
1453 -379, 110, -379, 113, -379, 111, -267, -379, -379, -379,
1454 -44, -378, 18, -379, -379, 102, 360, -379, 185
1455 };
1456
1457 /* YYDEFGOTONTERM-NUM. */
1458 static const yytype_int16 yydefgoto[] =
1459 {
1460 -1, 66, 5, 76, 77, 78, 79, 354, 263, 336,
1461 68, 31, 136, 32, 33, 34, 88, 35, 250, 251,
1462 222, 258, 259, 36, 96, 97, 301, 216, 355, 356,
1463 418, 323, 37, 38, 39, 40, 41, 42, 43, 44,
1464 325, 375, 376, 326, 442, 405, 378, 423, 448, 449,
1465 450, 461, 460, 468, 464, 471, 50, 80, 272, 52,
1466 145, 146, 142, 143, 148, 149, 72, 190, 290, 207,
1467 409, 73, 81, 425, 426, 284, 75, 208, 209
1468 };
1469
1470 /* YYTABLEYYPACT[STATE-NUM] -- What to do in state STATE-NUM. If
1471 positive, shift that token. If negative, reduce the rule whose
1472 number is the opposite. If YYTABLE_NINF, syntax error. */
1473 static const yytype_int16 yytable[] =
1474 {
1475 30, 71, 71, 275, 307, 410, 165, 308, 51, 280,
1476 129, 277, 139, 140, 344, 400, 69, 69, -21, 11,
1477 205, 74, 89, 90, 92, 91, 462, 129, 95, 130,
1478 281, 135, 128, 133, 134, 131, 82, 342, -21, 14,
1479 15, 16, 83, 463, 302, 11, 130, 431, 214, 436,
1480 17, 410, 131, 138, 18, 19, 135, 159, 71, 135,
1481 163, 164, 135, 298, 135, 14, 15, 16, 135, 70,
1482 70, 345, 316, 69, 390, 71, 17, 320, 161, 427,
1483 18, 19, 428, 45, 98, 46, 47, 48, 49, 299,
1484 69, 395, 427, 139, 140, 445, 139, 140, 223, 224,
1485 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
1486 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
1487 413, 322, -132, 276, 132, 247, 70, 372, 166, 249,
1488 253, 257, 167, 168, 261, 262, 264, 11, -134, 135,
1489 373, 150, 98, 70, 141, 144, 147, 343, -254, 137,
1490 152, 84, -133, 273, 274, 151, 278, 14, 15, 16,
1491 46, 47, 48, 439, 440, 215, 123, 124, 17, 125,
1492 345, 346, 18, 19, 153, 98, 119, 120, 160, 11,
1493 121, 122, 123, 124, 403, 125, 404, 71, 154, 155,
1494 156, 292, 293, 98, 85, 289, 157, 191, 388, 14,
1495 15, 16, 69, 192, 210, 295, 296, 291, 193, 211,
1496 17, 221, 219, 220, 18, 19, 265, 266, 84, 303,
1497 95, 267, 269, 84, 268, 271, 270, 248, 86, 285,
1498 256, 1, 2, 3, 4, 120, 294, 407, 121, 122,
1499 123, 124, 286, 125, -254, -254, 123, 124, 287, 125,
1500 205, 310, 305, 87, 135, 70, 315, 321, 84, 84,
1501 319, 85, 335, 377, -22, 352, 85, 328, 314, 330,
1502 383, 121, 122, 123, 124, 337, 125, 332, 353, 341,
1503 368, 115, 116, 117, 118, 119, 120, 372, 71, 121,
1504 122, 123, 124, 351, 125, 213, 349, 371, 391, 392,
1505 217, 85, 85, 69, 322, 360, 249, 384, 350, 393,
1506 363, 365, 300, 366, 257, 396, 401, 369, 370, 402,
1507 87, 406, -253, 166, 417, 87, 429, 139, 255, 430,
1508 434, 71, 71, 433, 382, 245, 246, 435, 385, 441,
1509 470, 387, 467, 473, 389, 212, 69, 69, 14, 15,
1510 16, 380, 381, 11, 67, 411, 70, 367, 304, 17,
1511 87, 87, 361, 18, 19, 141, 358, 144, 416, 147,
1512 379, 414, 457, 14, 15, 16, 421, 455, 338, 329,
1513 327, 71, 331, 337, 17, 438, 93, 347, 18, 19,
1514 0, 0, 0, 297, 0, 419, 69, 0, 0, 70,
1515 70, 84, 0, 0, 71, 45, 0, 46, 47, 48,
1516 49, 0, 0, 256, 0, 0, 432, 0, 0, 69,
1517 0, 0, 0, 0, 424, 71, 71, 71, 0, 0,
1518 0, 0, 71, 0, 444, 0, 84, 0, 0, 0,
1519 69, 69, 69, 71, 85, 0, 437, 69, 451, 70,
1520 71, 0, 443, 0, 456, 394, 84, 0, 69, 0,
1521 0, 465, 466, 453, 0, 69, 469, 84, 0, 472,
1522 458, 45, 70, 46, 47, 48, 49, 0, 324, 85,
1523 0, 0, 0, 0, 0, 0, 446, 447, 0, 0,
1524 0, 0, 0, 70, 70, 70, 0, 0, 0, 85,
1525 70, 0, 0, 87, 0, 454, 0, 0, 84, 0,
1526 85, 70, 0, 357, 0, 0, 0, 0, 70, 0,
1527 0, 0, 0, 84, 0, 0, 0, 84, 84, 0,
1528 0, 0, 0, 374, 0, 0, 84, 84, 87, 0,
1529 84, 0, 0, 0, 217, 0, 0, 0, 0, 0,
1530 0, 85, 446, 447, 0, 459, 0, 0, 87, 0,
1531 0, 0, 0, 0, 0, 0, 85, 0, 0, 87,
1532 85, 85, 0, 0, 0, 0, 0, 0, 0, 85,
1533 85, 0, 0, 85, 84, 399, 0, 0, 0, 0,
1534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1535 357, 0, 0, 0, 415, 357, 0, 0, 0, 0,
1536 87, 0, 0, 420, 374, 0, 0, 422, 0, 0,
1537 0, 0, 0, 0, 0, 87, 0, 85, 0, 87,
1538 87, 0, 0, 0, 0, 0, 98, 0, 87, 87,
1539 0, 0, 87, 0, 0, 0, 0, 0, 0, 99,
1540 0, 0, 0, 0, 0, 0, 0, 0, 0, -12,
1541 0, 324, 6, 7, 8, 9, 10, 11, 12, 0,
1542 0, 0, 0, 0, 0, 53, 0, 54, 55, 0,
1543 56, 0, 0, 13, 57, 0, 87, 14, 15, 16,
1544 45, 0, 46, 47, 48, 49, 58, 59, 17, 60,
1545 0, 61, 18, 19, 62, 63, 64, 20, 311, 100,
1546 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1547 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1548 0, 0, 121, 122, 123, 124, 0, 125, 0, 0,
1549 0, 0, 0, 0, 0, 126, 312, 0, 0, 0,
1550 0, 0, 0, 0, 21, 22, 0, 0, 0, 0,
1551 0, 0, 313, 0, 23, 24, 0, 0, 0, 0,
1552 25, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1553 0, 0, 0, 0, 0, 0, 65, 26, 0, 0,
1554 0, 27, 28, 29, -13, 0, 0, 6, 7, 8,
1555 9, 10, 11, 12, 0, 0, 0, 0, 0, 0,
1556 53, 0, 54, 55, 0, 56, 0, 0, 13, 57,
1557 0, 0, 14, 15, 16, 45, 0, 46, 47, 48,
1558 49, 58, 59, 17, 60, 0, 61, 18, 19, 62,
1559 63, 64, 20, 6, 7, 8, 9, 10, 11, 12,
1560 0, 6, 7, 8, 9, 10, 11, 12, 0, 0,
1561 0, 0, 0, 0, 13, 0, 0, 0, 14, 15,
1562 16, 0, 13, 0, 0, 0, 14, 15, 16, 17,
1563 0, 0, 0, 18, 19, 0, 0, 17, 20, 21,
1564 22, 18, 19, 0, 0, 0, 20, 0, 0, 23,
1565 24, 0, 0, 0, 0, 25, 0, 0, 0, 0,
1566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1567 0, 65, 26, 0, 0, 0, 27, 28, 29, 0,
1568 0, 0, 0, 0, 0, 21, 22, 0, 0, 0,
1569 0, 0, 0, 21, 22, 23, 24, 0, 0, 0,
1570 0, 25, 0, 23, 24, 0, 0, 0, 0, 25,
1571 0, 0, 0, 0, 0, 0, 0, 0, 26, 0,
1572 0, 0, 27, 28, 29, 260, 26, 0, 0, 0,
1573 27, 28, 29, 309, 6, 7, 8, 9, 10, 11,
1574 12, 0, 98, 0, 0, 0, 0, 0, 0, 0,
1575 0, 0, 0, 0, 0, 13, 0, 0, 0, 14,
1576 15, 16, 0, 0, 0, 0, 0, 0, 0, 0,
1577 17, 0, 0, 0, 18, 19, 0, 0, 0, 20,
1578 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
1579 0, 0, 0, 53, 0, 54, 55, 0, 56, 0,
1580 0, 13, 57, 0, 0, 14, 15, 16, 45, 0,
1581 46, 47, 48, 49, 58, 59, 17, 60, 0, 61,
1582 18, 19, 62, 63, 0, 20, 21, 22, 113, 114,
1583 115, 116, 117, 118, 119, 120, 23, 24, 121, 122,
1584 123, 124, 25, 125, 0, 0, 0, 0, 0, 0,
1585 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
1586 0, 0, 0, 27, 28, 29, 364, 0, 0, 0,
1587 0, 0, 21, 22, 0, 0, 0, 0, 0, 0,
1588 0, 0, 23, 24, 0, 0, 0, 0, 25, 0,
1589 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1590 0, 0, 0, 0, 65, 26, 0, 0, 288, 27,
1591 28, 29, 6, 7, 8, 9, 10, 11, 12, 0,
1592 0, 0, 0, 0, 0, 53, 0, 54, 55, 0,
1593 56, 0, 0, 13, 57, 0, 0, 14, 15, 16,
1594 45, 0, 46, 47, 48, 49, 58, 59, 17, 60,
1595 0, 61, 18, 19, 62, 63, 0, 20, 6, 7,
1596 8, 9, 10, 11, 12, 0, 0, 0, 0, 0,
1597 0, 53, 0, 54, 55, 0, 56, 0, 0, 13,
1598 57, 0, 0, 14, 15, 16, 0, 0, 0, 0,
1599 0, 0, 58, 59, 17, 60, 0, 61, 18, 19,
1600 62, 63, 64, 20, 21, 22, 0, 0, 0, 0,
1601 0, 0, 0, 0, 23, 24, 0, 0, 0, 0,
1602 25, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1603 0, 0, 0, 0, 0, 0, 65, 26, 0, 0,
1604 348, 27, 28, 29, 0, 0, 0, 0, 0, 0,
1605 21, 22, 0, 0, 0, 0, 0, 0, 0, 0,
1606 23, 24, 0, 0, 0, 0, 25, 0, 0, 0,
1607 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1608 0, 0, 65, 26, 0, 0, 0, 27, 28, 29,
1609 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
1610 0, 0, 0, 53, 0, 54, 55, 0, 56, 0,
1611 0, 13, 57, 0, 0, 14, 15, 16, 0, 0,
1612 0, 0, 0, 0, 58, 59, 17, 60, 0, 61,
1613 18, 19, 62, 63, 0, 20, 6, 7, 8, 9,
1614 10, 11, 12, 0, 6, 7, 8, 9, 10, 11,
1615 12, 0, 0, 0, 0, 0, 0, 13, 57, 0,
1616 0, 14, 15, 16, 0, 13, 0, 0, 0, 14,
1617 15, 16, 17, 0, 0, 0, 18, 19, 0, 408,
1618 17, 20, 21, 22, 18, 19, 0, 0, 0, 20,
1619 0, 0, 23, 24, 0, 0, 0, 0, 25, 0,
1620 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1621 0, 0, 0, 0, 65, 26, 0, 0, 0, 27,
1622 28, 29, 0, 0, 0, 0, 0, 0, 21, 22,
1623 0, 0, 0, 0, 0, 0, 21, 22, 23, 24,
1624 0, 0, 0, 0, 25, 0, 23, 24, 0, 0,
1625 94, 0, 25, 0, 0, 0, 0, 0, 0, 0,
1626 0, 26, 0, 0, 0, 27, 28, 29, 0, 26,
1627 0, 0, 0, 27, 28, 29, 6, 7, 8, 9,
1628 10, 11, 12, 0, 6, 7, 8, 9, 10, 11,
1629 12, 0, 0, 0, 0, 0, 0, 13, 0, 0,
1630 0, 14, 15, 16, 0, 13, 0, 0, 0, 14,
1631 15, 16, 17, 0, 0, 0, 18, 19, 0, 0,
1632 17, 20, 0, 0, 18, 19, 0, 0, 0, 20,
1633 6, 7, 8, 9, 10, 11, 12, 0, 0, 0,
1634 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1635 0, 13, 0, 0, 0, 14, 15, 16, 0, 0,
1636 0, 0, 0, 0, 0, 0, 17, 0, 21, 22,
1637 18, 19, 0, 0, 0, 20, 21, 22, 23, 24,
1638 0, 0, 0, 0, 25, 0, 23, 24, 0, 0,
1639 0, 0, 25, 0, 0, 0, 0, 0, 0, 0,
1640 158, 26, 0, 0, 0, 27, 28, 29, 162, 26,
1641 0, 0, 0, 27, 28, 29, 0, 0, 0, 0,
1642 0, 0, 21, 22, 0, 0, 0, 0, 0, 0,
1643 0, 0, 23, 24, 0, 0, 0, 0, 25, 0,
1644 0, 0, 0, 0, 0, 0, 252, 6, 7, 8,
1645 9, 10, 11, 12, 0, 26, 0, 0, 0, 27,
1646 28, 29, 0, 0, 0, 0, 0, 0, 13, 0,
1647 0, 0, 14, 15, 16, 0, 0, 0, 0, 0,
1648 0, 0, 0, 17, 0, 0, 0, 18, 19, 0,
1649 0, 0, 20, 6, 7, 8, 9, 254, 255, 12,
1650 0, 0, 194, 195, 196, 197, 198, 199, 200, 201,
1651 202, 203, 204, 0, 13, 0, 0, 0, 14, 15,
1652 16, 0, 0, 0, 0, 0, 0, 0, 0, 17,
1653 0, 0, 0, 18, 19, 0, 0, 0, 20, 21,
1654 22, 129, 0, 0, 0, 0, 0, 0, 0, 23,
1655 24, 205, 98, 0, 0, 25, 0, 0, 0, 0,
1656 130, 0, 0, 0, 0, 99, 131, 0, 206, 0,
1657 0, 0, 26, 0, 0, 0, 27, 28, 29, 0,
1658 0, 0, 0, 0, 0, 21, 22, 0, 0, 0,
1659 0, 0, 0, 0, 0, 23, 24, 0, 0, 0,
1660 0, 25, 0, 0, 0, 0, 98, 0, 0, 0,
1661 0, 0, 0, 0, 0, 0, 0, 0, 26, 99,
1662 0, 0, 27, 28, 29, 100, 101, 102, 103, 104,
1663 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1664 115, 116, 117, 118, 119, 120, 0, 0, 121, 122,
1665 123, 124, 0, 125, 0, 0, 0, 0, 0, 0,
1666 98, 126, 0, 0, 0, 0, 0, 0, 0, 0,
1667 0, 0, 0, 99, 0, 0, 0, 0, 317, 100,
1668 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1669 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1670 0, 0, 121, 122, 123, 124, 0, 125, 0, 0,
1671 0, 0, 0, 0, 98, 126, 0, 0, 0, 0,
1672 0, 0, 0, 0, 0, 0, 0, 99, 0, 0,
1673 0, 0, 359, 100, 101, 102, 103, 104, 105, 106,
1674 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1675 117, 118, 119, 120, 0, 0, 121, 122, 123, 124,
1676 0, 125, 0, 0, 0, 0, 0, 0, 98, 126,
1677 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1678 0, 99, 0, 0, 0, 0, 362, 100, 101, 102,
1679 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
1680 113, 114, 115, 116, 117, 118, 119, 120, 0, 0,
1681 121, 122, 123, 124, 0, 125, 0, 0, 0, 0,
1682 0, 0, 98, 126, 0, 0, 0, 0, 0, 0,
1683 0, 0, 0, 0, 0, 99, 0, 0, 0, 0,
1684 397, 100, 101, 102, 103, 104, 105, 106, 107, 108,
1685 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1686 119, 120, 0, 0, 121, 122, 123, 124, 0, 125,
1687 98, 0, 0, 0, 0, 0, 0, 126, 0, 0,
1688 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
1689 0, 0, 0, 0, 398, 100, 101, 102, 103, 104,
1690 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1691 115, 116, 117, 118, 119, 120, 0, 0, 121, 122,
1692 123, 124, 98, 125, 0, 0, 0, 0, 0, 0,
1693 0, 126, 0, 0, 0, 99, 0, 0, 0, 339,
1694 0, 0, 340, 100, 101, 102, 103, 104, 105, 106,
1695 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1696 117, 118, 119, 120, 0, 0, 121, 122, 123, 124,
1697 98, 125, 0, 0, 0, 0, 0, 0, 0, 126,
1698 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
1699 218, 0, 0, 0, 0, 100, 101, 102, 103, 104,
1700 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1701 115, 116, 117, 118, 119, 120, 0, 0, 121, 122,
1702 123, 124, 98, 125, 0, 0, 0, 0, 0, 0,
1703 0, 126, 0, 0, 0, 99, 0, 0, 0, 0,
1704 0, 0, 333, 100, 101, 102, 103, 104, 105, 106,
1705 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1706 117, 118, 119, 120, 0, 0, 121, 122, 123, 124,
1707 98, 125, 0, 0, 0, 0, 0, 0, 0, 126,
1708 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
1709 334, 0, 0, 0, 0, 100, 101, 102, 103, 104,
1710 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1711 115, 116, 117, 118, 119, 120, 0, 0, 121, 122,
1712 123, 124, 98, 125, 0, 0, 0, 0, 0, 0,
1713 0, 126, 0, 0, 0, 99, 0, 0, 0, 0,
1714 0, 0, 412, 100, 101, 102, 103, 104, 105, 106,
1715 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1716 117, 118, 119, 120, 0, 0, 121, 122, 123, 124,
1717 98, 125, 0, 0, 0, 0, 0, 0, 0, 126,
1718 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
1719 452, 0, 0, 0, 0, 100, 101, 102, 103, 104,
1720 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1721 115, 116, 117, 118, 119, 120, 98, 0, 121, 122,
1722 123, 124, 0, 125, 0, 0, 0, 0, 0, 99,
1723 0, 126, 0, 0, 0, 0, 0, 0, 0, 0,
1724 279, 0, 0, 100, 101, 102, 103, 104, 105, 106,
1725 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1726 117, 118, 119, 120, 98, 0, 121, 122, 123, 124,
1727 0, 125, 0, 0, 0, 0, 0, 99, 0, 126,
1728 0, 0, 0, 0, 0, 0, 0, 0, 282, 100,
1729 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1730 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1731 98, 0, 121, 122, 123, 124, 0, 125, 0, 0,
1732 0, 0, 0, 99, 0, 126, 0, 0, 0, 0,
1733 0, 0, 0, 0, 283, 0, 0, 100, 101, 102,
1734 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
1735 113, 114, 115, 116, 117, 118, 119, 120, 98, 0,
1736 121, 122, 123, 124, 0, 125, 0, 0, 0, 0,
1737 0, 99, 0, 126, 0, 0, 0, 0, 0, 0,
1738 0, 0, 386, 100, 101, 102, 103, 104, 105, 106,
1739 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1740 117, 118, 119, 120, 98, 0, 121, 122, 123, 124,
1741 0, 125, 0, 0, 0, 0, 0, 99, 0, 126,
1742 0, 0, 0, 0, 0, 0, 0, 127, 0, 0,
1743 0, 100, 101, 102, 103, 104, 105, 106, 107, 108,
1744 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1745 119, 120, 98, 0, 121, 122, 123, 124, 0, 125,
1746 0, 0, 0, 0, 0, 99, 0, 126, 306, 0,
1747 0, 0, 0, 0, 0, 0, 0, 100, 101, 102,
1748 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
1749 113, 114, 115, 116, 117, 118, 119, 120, 98, 0,
1750 121, 122, 123, 124, 0, 125, 0, 0, 0, 0,
1751 0, 99, 0, 126, 318, 0, 98, 0, 0, 0,
1752 0, 0, 0, 0, 0, 100, 101, 102, 103, 104,
1753 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1754 115, 116, 117, 118, 119, 120, 98, 0, 121, 122,
1755 123, 124, 0, 125, 0, 0, 0, 0, 0, 99,
1756 0, 126, 0, 0, 0, 0, 0, 0, 0, 0,
1757 0, 0, 101, 102, 103, 104, 105, 106, 107, 108,
1758 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1759 119, 120, 98, 0, 121, 122, 123, 124, 0, 125,
1760 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1761 0, 0, 121, 122, 123, 124, 0, 125, 98, 0,
1762 0, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1763 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1764 0, 0, 121, 122, 123, 124, 98, 125, 0, 0,
1765 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1766 0, 0, 0, 0, 0, 0, 0, 102, 103, 104,
1767 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
1768 115, 116, 117, 118, 119, 120, 98, 0, 121, 122,
1769 123, 124, 0, 125, 103, 104, 105, 106, 107, 108,
1770 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1771 119, 120, 98, 0, 121, 122, 123, 124, 0, 125,
1772 0, 0, 0, 104, 105, 106, 107, 108, 109, 110,
1773 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1774 0, 0, 121, 122, 123, 124, 0, 125, 0, 0,
1775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1776 0, 0, 0, 0, 105, 106, 107, 108, 109, 110,
1777 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1778 0, 0, 121, 122, 123, 124, 0, 125, 0, 0,
1779 0, 0, 107, 108, 109, 110, 111, 112, 113, 114,
1780 115, 116, 117, 118, 119, 120, 0, 0, 121, 122,
1781 123, 124, 0, 125, 169, 170, 171, 172, 173, 174,
1782 175, 176, 177, 178, 179, 180, 0, 181, 182, 183,
1783 184, 185, 186, 187, 188, 0, 0, 0, 0, 0,
1784 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1788 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1789 0, 0, 0, 0, 0, 189
1790 };
1791
1792 static const yytype_int16 yycheck[] =
1793 {
1794 1, 3, 4, 7, 126, 383, 6, 129, 2, 20,
1795 109, 156, 7, 8, 281, 118, 3, 4, 116, 8,
1796 119, 3, 23, 24, 26, 26, 119, 109, 29, 128,
1797 41, 134, 33, 103, 104, 134, 0, 18, 136, 28,
1798 29, 30, 128, 136, 119, 8, 128, 119, 126, 427,
1799 39, 429, 134, 3, 43, 44, 134, 58, 60, 134,
1800 61, 62, 134, 129, 134, 28, 29, 30, 134, 3,
1801 4, 126, 258, 60, 129, 77, 39, 263, 60, 126,
1802 43, 44, 129, 31, 9, 33, 34, 35, 36, 3,
1803 77, 358, 126, 7, 8, 129, 7, 8, 99, 100,
1804 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1805 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1806 387, 266, 128, 127, 130, 126, 60, 116, 128, 130,
1807 131, 132, 6, 7, 135, 136, 137, 8, 128, 134,
1808 129, 127, 9, 77, 46, 47, 48, 128, 9, 128,
1809 52, 16, 128, 154, 155, 126, 157, 28, 29, 30,
1810 33, 34, 35, 430, 431, 128, 107, 108, 39, 110,
1811 126, 127, 43, 44, 127, 9, 101, 102, 127, 8,
1812 105, 106, 107, 108, 12, 110, 14, 189, 128, 128,
1813 128, 192, 193, 9, 16, 189, 128, 127, 343, 28,
1814 29, 30, 189, 136, 127, 206, 207, 189, 136, 127,
1815 39, 126, 129, 134, 43, 44, 92, 136, 83, 220,
1816 221, 126, 126, 88, 136, 126, 136, 129, 16, 6,
1817 132, 122, 123, 124, 125, 102, 7, 382, 105, 106,
1818 107, 108, 127, 110, 105, 106, 107, 108, 127, 110,
1819 119, 252, 135, 16, 134, 189, 126, 128, 123, 124,
1820 126, 83, 22, 11, 136, 92, 88, 268, 136, 270,
1821 127, 105, 106, 107, 108, 276, 110, 136, 92, 280,
1822 131, 97, 98, 99, 100, 101, 102, 116, 290, 105,
1823 106, 107, 108, 294, 110, 83, 290, 129, 116, 129,
1824 88, 123, 124, 290, 449, 306, 307, 127, 290, 126,
1825 311, 312, 214, 314, 315, 136, 129, 318, 319, 126,
1826 83, 17, 23, 128, 136, 88, 127, 7, 8, 129,
1827 129, 333, 334, 130, 335, 123, 124, 23, 339, 131,
1828 18, 342, 103, 127, 345, 77, 333, 334, 28, 29,
1829 30, 333, 334, 8, 3, 384, 290, 315, 221, 39,
1830 123, 124, 307, 43, 44, 267, 302, 269, 393, 271,
1831 332, 388, 449, 28, 29, 30, 402, 448, 277, 269,
1832 267, 383, 271, 384, 39, 429, 26, 285, 43, 44,
1833 -1, -1, -1, 208, -1, 396, 383, -1, -1, 333,
1834 334, 266, -1, -1, 406, 31, -1, 33, 34, 35,
1835 36, -1, -1, 315, -1, -1, 417, -1, -1, 406,
1836 -1, -1, -1, -1, 406, 427, 428, 429, -1, -1,
1837 -1, -1, 434, -1, 435, -1, 301, -1, -1, -1,
1838 427, 428, 429, 445, 266, -1, 428, 434, 442, 383,
1839 452, -1, 434, -1, 448, 357, 321, -1, 445, -1,
1840 -1, 462, 463, 445, -1, 452, 467, 332, -1, 470,
1841 452, 31, 406, 33, 34, 35, 36, -1, 266, 301,
1842 -1, -1, -1, -1, -1, -1, 112, 113, -1, -1,
1843 -1, -1, -1, 427, 428, 429, -1, -1, -1, 321,
1844 434, -1, -1, 266, -1, 131, -1, -1, 373, -1,
1845 332, 445, -1, 301, -1, -1, -1, -1, 452, -1,
1846 -1, -1, -1, 388, -1, -1, -1, 392, 393, -1,
1847 -1, -1, -1, 321, -1, -1, 401, 402, 301, -1,
1848 405, -1, -1, -1, 332, -1, -1, -1, -1, -1,
1849 -1, 373, 112, 113, -1, 457, -1, -1, 321, -1,
1850 -1, -1, -1, -1, -1, -1, 388, -1, -1, 332,
1851 392, 393, -1, -1, -1, -1, -1, -1, -1, 401,
1852 402, -1, -1, 405, 449, 373, -1, -1, -1, -1,
1853 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1854 388, -1, -1, -1, 392, 393, -1, -1, -1, -1,
1855 373, -1, -1, 401, 402, -1, -1, 405, -1, -1,
1856 -1, -1, -1, -1, -1, 388, -1, 449, -1, 392,
1857 393, -1, -1, -1, -1, -1, 9, -1, 401, 402,
1858 -1, -1, 405, -1, -1, -1, -1, -1, -1, 22,
1859 -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
1860 -1, 449, 3, 4, 5, 6, 7, 8, 9, -1,
1861 -1, -1, -1, -1, -1, 16, -1, 18, 19, -1,
1862 21, -1, -1, 24, 25, -1, 449, 28, 29, 30,
1863 31, -1, 33, 34, 35, 36, 37, 38, 39, 40,
1864 -1, 42, 43, 44, 45, 46, 47, 48, 81, 82,
1865 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
1866 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1867 -1, -1, 105, 106, 107, 108, -1, 110, -1, -1,
1868 -1, -1, -1, -1, -1, 118, 119, -1, -1, -1,
1869 -1, -1, -1, -1, 95, 96, -1, -1, -1, -1,
1870 -1, -1, 135, -1, 105, 106, -1, -1, -1, -1,
1871 111, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1872 -1, -1, -1, -1, -1, -1, 127, 128, -1, -1,
1873 -1, 132, 133, 134, 0, -1, -1, 3, 4, 5,
1874 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
1875 16, -1, 18, 19, -1, 21, -1, -1, 24, 25,
1876 -1, -1, 28, 29, 30, 31, -1, 33, 34, 35,
1877 36, 37, 38, 39, 40, -1, 42, 43, 44, 45,
1878 46, 47, 48, 3, 4, 5, 6, 7, 8, 9,
1879 -1, 3, 4, 5, 6, 7, 8, 9, -1, -1,
1880 -1, -1, -1, -1, 24, -1, -1, -1, 28, 29,
1881 30, -1, 24, -1, -1, -1, 28, 29, 30, 39,
1882 -1, -1, -1, 43, 44, -1, -1, 39, 48, 95,
1883 96, 43, 44, -1, -1, -1, 48, -1, -1, 105,
1884 106, -1, -1, -1, -1, 111, -1, -1, -1, -1,
1885 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1886 -1, 127, 128, -1, -1, -1, 132, 133, 134, -1,
1887 -1, -1, -1, -1, -1, 95, 96, -1, -1, -1,
1888 -1, -1, -1, 95, 96, 105, 106, -1, -1, -1,
1889 -1, 111, -1, 105, 106, -1, -1, -1, -1, 111,
1890 -1, -1, -1, -1, -1, -1, -1, -1, 128, -1,
1891 -1, -1, 132, 133, 134, 135, 128, -1, -1, -1,
1892 132, 133, 134, 135, 3, 4, 5, 6, 7, 8,
1893 9, -1, 9, -1, -1, -1, -1, -1, -1, -1,
1894 -1, -1, -1, -1, -1, 24, -1, -1, -1, 28,
1895 29, 30, -1, -1, -1, -1, -1, -1, -1, -1,
1896 39, -1, -1, -1, 43, 44, -1, -1, -1, 48,
1897 3, 4, 5, 6, 7, 8, 9, -1, -1, -1,
1898 -1, -1, -1, 16, -1, 18, 19, -1, 21, -1,
1899 -1, 24, 25, -1, -1, 28, 29, 30, 31, -1,
1900 33, 34, 35, 36, 37, 38, 39, 40, -1, 42,
1901 43, 44, 45, 46, -1, 48, 95, 96, 95, 96,
1902 97, 98, 99, 100, 101, 102, 105, 106, 105, 106,
1903 107, 108, 111, 110, -1, -1, -1, -1, -1, -1,
1904 -1, -1, -1, -1, -1, -1, -1, -1, -1, 128,
1905 -1, -1, -1, 132, 133, 134, 135, -1, -1, -1,
1906 -1, -1, 95, 96, -1, -1, -1, -1, -1, -1,
1907 -1, -1, 105, 106, -1, -1, -1, -1, 111, -1,
1908 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1909 -1, -1, -1, -1, 127, 128, -1, -1, 131, 132,
1910 133, 134, 3, 4, 5, 6, 7, 8, 9, -1,
1911 -1, -1, -1, -1, -1, 16, -1, 18, 19, -1,
1912 21, -1, -1, 24, 25, -1, -1, 28, 29, 30,
1913 31, -1, 33, 34, 35, 36, 37, 38, 39, 40,
1914 -1, 42, 43, 44, 45, 46, -1, 48, 3, 4,
1915 5, 6, 7, 8, 9, -1, -1, -1, -1, -1,
1916 -1, 16, -1, 18, 19, -1, 21, -1, -1, 24,
1917 25, -1, -1, 28, 29, 30, -1, -1, -1, -1,
1918 -1, -1, 37, 38, 39, 40, -1, 42, 43, 44,
1919 45, 46, 47, 48, 95, 96, -1, -1, -1, -1,
1920 -1, -1, -1, -1, 105, 106, -1, -1, -1, -1,
1921 111, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1922 -1, -1, -1, -1, -1, -1, 127, 128, -1, -1,
1923 131, 132, 133, 134, -1, -1, -1, -1, -1, -1,
1924 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
1925 105, 106, -1, -1, -1, -1, 111, -1, -1, -1,
1926 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1927 -1, -1, 127, 128, -1, -1, -1, 132, 133, 134,
1928 3, 4, 5, 6, 7, 8, 9, -1, -1, -1,
1929 -1, -1, -1, 16, -1, 18, 19, -1, 21, -1,
1930 -1, 24, 25, -1, -1, 28, 29, 30, -1, -1,
1931 -1, -1, -1, -1, 37, 38, 39, 40, -1, 42,
1932 43, 44, 45, 46, -1, 48, 3, 4, 5, 6,
1933 7, 8, 9, -1, 3, 4, 5, 6, 7, 8,
1934 9, -1, -1, -1, -1, -1, -1, 24, 25, -1,
1935 -1, 28, 29, 30, -1, 24, -1, -1, -1, 28,
1936 29, 30, 39, -1, -1, -1, 43, 44, -1, 46,
1937 39, 48, 95, 96, 43, 44, -1, -1, -1, 48,
1938 -1, -1, 105, 106, -1, -1, -1, -1, 111, -1,
1939 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1940 -1, -1, -1, -1, 127, 128, -1, -1, -1, 132,
1941 133, 134, -1, -1, -1, -1, -1, -1, 95, 96,
1942 -1, -1, -1, -1, -1, -1, 95, 96, 105, 106,
1943 -1, -1, -1, -1, 111, -1, 105, 106, -1, -1,
1944 109, -1, 111, -1, -1, -1, -1, -1, -1, -1,
1945 -1, 128, -1, -1, -1, 132, 133, 134, -1, 128,
1946 -1, -1, -1, 132, 133, 134, 3, 4, 5, 6,
1947 7, 8, 9, -1, 3, 4, 5, 6, 7, 8,
1948 9, -1, -1, -1, -1, -1, -1, 24, -1, -1,
1949 -1, 28, 29, 30, -1, 24, -1, -1, -1, 28,
1950 29, 30, 39, -1, -1, -1, 43, 44, -1, -1,
1951 39, 48, -1, -1, 43, 44, -1, -1, -1, 48,
1952 3, 4, 5, 6, 7, 8, 9, -1, -1, -1,
1953 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1954 -1, 24, -1, -1, -1, 28, 29, 30, -1, -1,
1955 -1, -1, -1, -1, -1, -1, 39, -1, 95, 96,
1956 43, 44, -1, -1, -1, 48, 95, 96, 105, 106,
1957 -1, -1, -1, -1, 111, -1, 105, 106, -1, -1,
1958 -1, -1, 111, -1, -1, -1, -1, -1, -1, -1,
1959 127, 128, -1, -1, -1, 132, 133, 134, 127, 128,
1960 -1, -1, -1, 132, 133, 134, -1, -1, -1, -1,
1961 -1, -1, 95, 96, -1, -1, -1, -1, -1, -1,
1962 -1, -1, 105, 106, -1, -1, -1, -1, 111, -1,
1963 -1, -1, -1, -1, -1, -1, 119, 3, 4, 5,
1964 6, 7, 8, 9, -1, 128, -1, -1, -1, 132,
1965 133, 134, -1, -1, -1, -1, -1, -1, 24, -1,
1966 -1, -1, 28, 29, 30, -1, -1, -1, -1, -1,
1967 -1, -1, -1, 39, -1, -1, -1, 43, 44, -1,
1968 -1, -1, 48, 3, 4, 5, 6, 7, 8, 9,
1969 -1, -1, 70, 71, 72, 73, 74, 75, 76, 77,
1970 78, 79, 80, -1, 24, -1, -1, -1, 28, 29,
1971 30, -1, -1, -1, -1, -1, -1, -1, -1, 39,
1972 -1, -1, -1, 43, 44, -1, -1, -1, 48, 95,
1973 96, 109, -1, -1, -1, -1, -1, -1, -1, 105,
1974 106, 119, 9, -1, -1, 111, -1, -1, -1, -1,
1975 128, -1, -1, -1, -1, 22, 134, -1, 136, -1,
1976 -1, -1, 128, -1, -1, -1, 132, 133, 134, -1,
1977 -1, -1, -1, -1, -1, 95, 96, -1, -1, -1,
1978 -1, -1, -1, -1, -1, 105, 106, -1, -1, -1,
1979 -1, 111, -1, -1, -1, -1, 9, -1, -1, -1,
1980 -1, -1, -1, -1, -1, -1, -1, -1, 128, 22,
1981 -1, -1, 132, 133, 134, 82, 83, 84, 85, 86,
1982 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1983 97, 98, 99, 100, 101, 102, -1, -1, 105, 106,
1984 107, 108, -1, 110, -1, -1, -1, -1, -1, -1,
1985 9, 118, -1, -1, -1, -1, -1, -1, -1, -1,
1986 -1, -1, -1, 22, -1, -1, -1, -1, 135, 82,
1987 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
1988 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1989 -1, -1, 105, 106, 107, 108, -1, 110, -1, -1,
1990 -1, -1, -1, -1, 9, 118, -1, -1, -1, -1,
1991 -1, -1, -1, -1, -1, -1, -1, 22, -1, -1,
1992 -1, -1, 135, 82, 83, 84, 85, 86, 87, 88,
1993 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1994 99, 100, 101, 102, -1, -1, 105, 106, 107, 108,
1995 -1, 110, -1, -1, -1, -1, -1, -1, 9, 118,
1996 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1997 -1, 22, -1, -1, -1, -1, 135, 82, 83, 84,
1998 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1999 95, 96, 97, 98, 99, 100, 101, 102, -1, -1,
2000 105, 106, 107, 108, -1, 110, -1, -1, -1, -1,
2001 -1, -1, 9, 118, -1, -1, -1, -1, -1, -1,
2002 -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
2003 135, 82, 83, 84, 85, 86, 87, 88, 89, 90,
2004 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
2005 101, 102, -1, -1, 105, 106, 107, 108, -1, 110,
2006 9, -1, -1, -1, -1, -1, -1, 118, -1, -1,
2007 -1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
2008 -1, -1, -1, -1, 135, 82, 83, 84, 85, 86,
2009 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
2010 97, 98, 99, 100, 101, 102, -1, -1, 105, 106,
2011 107, 108, 9, 110, -1, -1, -1, -1, -1, -1,
2012 -1, 118, -1, -1, -1, 22, -1, -1, -1, 126,
2013 -1, -1, 129, 82, 83, 84, 85, 86, 87, 88,
2014 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
2015 99, 100, 101, 102, -1, -1, 105, 106, 107, 108,
2016 9, 110, -1, -1, -1, -1, -1, -1, -1, 118,
2017 -1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
2018 129, -1, -1, -1, -1, 82, 83, 84, 85, 86,
2019 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
2020 97, 98, 99, 100, 101, 102, -1, -1, 105, 106,
2021 107, 108, 9, 110, -1, -1, -1, -1, -1, -1,
2022 -1, 118, -1, -1, -1, 22, -1, -1, -1, -1,
2023 -1, -1, 129, 82, 83, 84, 85, 86, 87, 88,
2024 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
2025 99, 100, 101, 102, -1, -1, 105, 106, 107, 108,
2026 9, 110, -1, -1, -1, -1, -1, -1, -1, 118,
2027 -1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
2028 129, -1, -1, -1, -1, 82, 83, 84, 85, 86,
2029 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
2030 97, 98, 99, 100, 101, 102, -1, -1, 105, 106,
2031 107, 108, 9, 110, -1, -1, -1, -1, -1, -1,
2032 -1, 118, -1, -1, -1, 22, -1, -1, -1, -1,
2033 -1, -1, 129, 82, 83, 84, 85, 86, 87, 88,
2034 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
2035 99, 100, 101, 102, -1, -1, 105, 106, 107, 108,
2036 9, 110, -1, -1, -1, -1, -1, -1, -1, 118,
2037 -1, -1, -1, 22, -1, -1, -1, -1, -1, -1,
2038 129, -1, -1, -1, -1, 82, 83, 84, 85, 86,
2039 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
2040 97, 98, 99, 100, 101, 102, 9, -1, 105, 106,
2041 107, 108, -1, 110, -1, -1, -1, -1, -1, 22,
2042 -1, 118, -1, -1, -1, -1, -1, -1, -1, -1,
2043 127, -1, -1, 82, 83, 84, 85, 86, 87, 88,
2044 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
2045 99, 100, 101, 102, 9, -1, 105, 106, 107, 108,
2046 -1, 110, -1, -1, -1, -1, -1, 22, -1, 118,
2047 -1, -1, -1, -1, -1, -1, -1, -1, 127, 82,
2048 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
2049 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
2050 9, -1, 105, 106, 107, 108, -1, 110, -1, -1,
2051 -1, -1, -1, 22, -1, 118, -1, -1, -1, -1,
2052 -1, -1, -1, -1, 127, -1, -1, 82, 83, 84,
2053 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2054 95, 96, 97, 98, 99, 100, 101, 102, 9, -1,
2055 105, 106, 107, 108, -1, 110, -1, -1, -1, -1,
2056 -1, 22, -1, 118, -1, -1, -1, -1, -1, -1,
2057 -1, -1, 127, 82, 83, 84, 85, 86, 87, 88,
2058 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
2059 99, 100, 101, 102, 9, -1, 105, 106, 107, 108,
2060 -1, 110, -1, -1, -1, -1, -1, 22, -1, 118,
2061 -1, -1, -1, -1, -1, -1, -1, 126, -1, -1,
2062 -1, 82, 83, 84, 85, 86, 87, 88, 89, 90,
2063 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
2064 101, 102, 9, -1, 105, 106, 107, 108, -1, 110,
2065 -1, -1, -1, -1, -1, 22, -1, 118, 119, -1,
2066 -1, -1, -1, -1, -1, -1, -1, 82, 83, 84,
2067 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2068 95, 96, 97, 98, 99, 100, 101, 102, 9, -1,
2069 105, 106, 107, 108, -1, 110, -1, -1, -1, -1,
2070 -1, 22, -1, 118, 119, -1, 9, -1, -1, -1,
2071 -1, -1, -1, -1, -1, 82, 83, 84, 85, 86,
2072 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
2073 97, 98, 99, 100, 101, 102, 9, -1, 105, 106,
2074 107, 108, -1, 110, -1, -1, -1, -1, -1, 22,
2075 -1, 118, -1, -1, -1, -1, -1, -1, -1, -1,
2076 -1, -1, 83, 84, 85, 86, 87, 88, 89, 90,
2077 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
2078 101, 102, 9, -1, 105, 106, 107, 108, -1, 110,
2079 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
2080 -1, -1, 105, 106, 107, 108, -1, 110, 9, -1,
2081 -1, 84, 85, 86, 87, 88, 89, 90, 91, 92,
2082 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
2083 -1, -1, 105, 106, 107, 108, 9, 110, -1, -1,
2084 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2085 -1, -1, -1, -1, -1, -1, -1, 84, 85, 86,
2086 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
2087 97, 98, 99, 100, 101, 102, 9, -1, 105, 106,
2088 107, 108, -1, 110, 85, 86, 87, 88, 89, 90,
2089 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
2090 101, 102, 9, -1, 105, 106, 107, 108, -1, 110,
2091 -1, -1, -1, 86, 87, 88, 89, 90, 91, 92,
2092 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
2093 -1, -1, 105, 106, 107, 108, -1, 110, -1, -1,
2094 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2095 -1, -1, -1, -1, 87, 88, 89, 90, 91, 92,
2096 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
2097 -1, -1, 105, 106, 107, 108, -1, 110, -1, -1,
2098 -1, -1, 89, 90, 91, 92, 93, 94, 95, 96,
2099 97, 98, 99, 100, 101, 102, -1, -1, 105, 106,
2100 107, 108, -1, 110, 49, 50, 51, 52, 53, 54,
2101 55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
2102 65, 66, 67, 68, 69, -1, -1, -1, -1, -1,
2103 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2104 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2105 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2106 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2107 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2108 -1, -1, -1, -1, -1, 130
2109 };
2110
2111 /* YYSTOSSTATE-NUM -- The (internal number of the) accessing
2112 symbol of state STATE-NUM. */
2113 static const yytype_uint8 yystos[] =
2114 {
2115 0, 122, 123, 124, 125, 139, 3, 4, 5, 6,
2116 7, 8, 9, 24, 28, 29, 30, 39, 43, 44,
2117 48, 95, 96, 105, 106, 111, 128, 132, 133, 134,
2118 147, 148, 150, 151, 152, 154, 160, 169, 170, 171,
2119 172, 173, 174, 175, 176, 31, 33, 34, 35, 36,
2120 193, 194, 196, 16, 18, 19, 21, 25, 37, 38,
2121 40, 42, 45, 46, 47, 127, 138, 143, 147, 148,
2122 150, 152, 203, 208, 209, 213, 140, 141, 142, 143,
2123 194, 209, 0, 128, 169, 170, 171, 176, 153, 147,
2124 147, 147, 152, 213, 109, 147, 161, 162, 9, 22,
2125 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
2126 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
2127 102, 105, 106, 107, 108, 110, 118, 126, 147, 109,
2128 128, 134, 130, 103, 104, 134, 149, 128, 3, 7,
2129 8, 144, 199, 200, 144, 197, 198, 144, 201, 202,
2130 127, 126, 144, 127, 128, 128, 128, 128, 127, 147,
2131 127, 209, 127, 147, 147, 6, 128, 6, 7, 49,
2132 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
2133 60, 62, 63, 64, 65, 66, 67, 68, 69, 130,
2134 204, 127, 136, 136, 70, 71, 72, 73, 74, 75,
2135 76, 77, 78, 79, 80, 119, 136, 206, 214, 215,
2136 127, 127, 142, 171, 126, 128, 164, 171, 129, 129,
2137 134, 126, 157, 147, 147, 147, 147, 147, 147, 147,
2138 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
2139 147, 147, 147, 147, 147, 171, 171, 147, 144, 147,
2140 155, 156, 119, 147, 7, 8, 144, 147, 158, 159,
2141 135, 147, 147, 145, 147, 92, 136, 126, 136, 126,
2142 136, 126, 195, 147, 147, 7, 127, 138, 147, 127,
2143 20, 41, 127, 127, 212, 6, 127, 127, 131, 194,
2144 205, 209, 147, 147, 7, 147, 147, 215, 129, 3,
2145 144, 163, 119, 147, 162, 135, 119, 126, 129, 135,
2146 147, 81, 119, 135, 136, 126, 157, 135, 119, 126,
2147 157, 128, 138, 168, 171, 177, 180, 200, 147, 198,
2148 147, 202, 136, 129, 129, 22, 146, 147, 193, 126,
2149 129, 147, 18, 128, 203, 126, 127, 212, 131, 194,
2150 209, 147, 92, 92, 144, 165, 166, 171, 163, 135,
2151 147, 156, 135, 147, 135, 147, 147, 159, 131, 147,
2152 147, 129, 116, 129, 171, 178, 179, 11, 183, 164,
2153 209, 209, 147, 127, 127, 147, 127, 147, 138, 147,
2154 129, 116, 129, 126, 144, 203, 136, 135, 135, 171,
2155 118, 129, 126, 12, 14, 182, 17, 138, 46, 207,
2156 208, 146, 129, 203, 166, 171, 165, 136, 167, 147,
2157 171, 178, 171, 184, 209, 210, 211, 126, 129, 127,
2158 129, 119, 147, 130, 129, 23, 208, 209, 207, 203,
2159 203, 131, 181, 209, 147, 129, 112, 113, 185, 186,
2160 187, 194, 129, 209, 131, 187, 194, 168, 209, 144,
2161 189, 188, 119, 136, 191, 147, 147, 103, 190, 147,
2162 18, 192, 147, 127
2163 };
2164
2165 /* YYR1YYN -- Symbol number of symbol that rule YYN derives. */
2166 static const yytype_uint8 yyr1[] =
2167 {
2168 0, 137, 138, 139, 139, 139, 139, 139, 139, 139,
2169 139, 139, 140, 140, 141, 141, 142, 142, 142, 143,
2170 143, 144, 144, 145, 145, 145, 146, 146, 147, 147,
2171 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
2172 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
2173 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
2174 147, 147, 147, 147, 148, 149, 149, 150, 150, 151,
2175 151, 151, 151, 151, 152, 152, 152, 152, 152, 152,
2176 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
2177 153, 152, 152, 152, 154, 155, 155, 155, 156, 157,
2178 157, 158, 158, 158, 159, 159, 160, 161, 161, 162,
2179 162, 163, 164, 164, 165, 165, 166, 166, 167, 167,
2180 168, 168, 168, 169, 170, 171, 171, 171, 171, 171,
2181 171, 171, 172, 172, 172, 173, 174, 174, 175, 175,
2182 176, 176, 177, 177, 178, 178, 179, 179, 179, 180,
2183 181, 180, 182, 182, 183, 183, 184, 184, 185, 185,
2184 185, 185, 186, 186, 186, 188, 187, 189, 189, 190,
2185 190, 191, 191, 191, 192, 192, 193, 193, 193, 195,
2186 194, 194, 196, 196, 197, 197, 198, 199, 199, 200,
2187 201, 201, 202, 203, 203, 203, 204, 204, 204, 204,
2188 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
2189 204, 204, 204, 204, 204, 204, 205, 205, 205, 205,
2190 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
2191 206, 207, 207, 207, 208, 208, 208, 208, 208, 208,
2192 208, 208, 208, 209, 209, 209, 209, 209, 209, 209,
2193 209, 210, 209, 211, 209, 209, 209, 209, 209, 209,
2194 209, 209, 209, 209, 209, 209, 209, 212, 212, 213,
2195 214, 214, 215
2196 };
2197
2198 /* YYR2YYN -- Number of symbols on the right hand side of rule YYN. */
2199 static const yytype_int8 yyr2[] =
2200 {
2201 0, 2, 0, 2, 3, 2, 3, 2, 3, 2,
2202 3, 2, 0, 1, 1, 2, 1, 1, 1, 3,
2203 3, 1, 1, 0, 1, 3, 0, 1, 1, 2,
2204 4, 2, 3, 3, 3, 3, 3, 3, 3, 3,
2205 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2206 3, 3, 3, 3, 3, 5, 5, 5, 1, 2,
2207 2, 2, 1, 1, 3, 1, 1, 3, 5, 1,
2208 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
2209 1, 3, 4, 6, 6, 4, 5, 5, 1, 3,
2210 0, 3, 2, 2, 4, 0, 1, 3, 1, 0,
2211 1, 0, 1, 3, 1, 3, 4, 1, 3, 1,
2212 6, 0, 7, 4, 1, 3, 3, 2, 0, 2,
2213 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2214 1, 1, 1, 1, 1, 3, 1, 1, 5, 5,
2215 3, 4, 4, 3, 1, 3, 1, 2, 1, 6,
2216 0, 8, 1, 1, 0, 1, 0, 1, 1, 1,
2217 2, 2, 0, 1, 1, 0, 8, 0, 1, 0,
2218 2, 0, 2, 2, 0, 2, 2, 2, 2, 0,
2219 5, 2, 1, 1, 1, 3, 3, 1, 3, 3,
2220 1, 3, 3, 3, 4, 2, 1, 1, 1, 1,
2221 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2222 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
2223 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2224 1, 0, 1, 3, 3, 3, 3, 3, 1, 5,
2225 4, 6, 1, 1, 1, 2, 5, 7, 5, 10,
2226 8, 0, 9, 0, 11, 2, 2, 2, 3, 4,
2227 6, 8, 5, 2, 3, 3, 4, 0, 3, 2,
2228 1, 2, 3
2229 };
2230
2231
2232 enum { YYENOMEM = -2 };
2233
2234 #define yyerrok (yyerrstatus = 0)
2235 #define yyclearin (yychar = PKL_TAB_EMPTY)
2236
2237 #define YYACCEPT goto yyacceptlab
2238 #define YYABORT goto yyabortlab
2239 #define YYERROR goto yyerrorlab
2240
2241
2242 #define YYRECOVERING() (!!yyerrstatus)
2243
2244 #define YYBACKUP(Token, Value) \
2245 do \
2246 if (yychar == PKL_TAB_EMPTY) \
2247 { \
2248 yychar = (Token); \
2249 yylval = (Value); \
2250 YYPOPSTACK (yylen); \
2251 yystate = *yyssp; \
2252 YY_LAC_DISCARD ("YYBACKUP"); \
2253 goto yybackup; \
2254 } \
2255 else \
2256 { \
2257 yyerror (&yylloc, pkl_parser, YY_("syntax error: cannot back up")); \
2258 YYERROR; \
2259 } \
2260 while (0)
2261
2262 /* Backward compatibility with an undocumented macro.
2263 Use PKL_TAB_error or PKL_TAB_UNDEF. */
2264 #define YYERRCODE PKL_TAB_UNDEF
2265
2266 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
2267 If N is 0, then set CURRENT to the empty location which ends
2268 the previous symbol: RHS[0] (always defined). */
2269
2270 #ifndef YYLLOC_DEFAULT
2271 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2272 do \
2273 if (N) \
2274 { \
2275 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2276 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2277 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2278 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2279 } \
2280 else \
2281 { \
2282 (Current).first_line = (Current).last_line = \
2283 YYRHSLOC (Rhs, 0).last_line; \
2284 (Current).first_column = (Current).last_column = \
2285 YYRHSLOC (Rhs, 0).last_column; \
2286 } \
2287 while (0)
2288 #endif
2289
2290 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2291
2292
2293 /* Enable debugging if requested. */
2294 #if PKL_TAB_DEBUG
2295
2296 # ifndef YYFPRINTF
2297 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2298 # define YYFPRINTF fprintf
2299 # endif
2300
2301 # define YYDPRINTF(Args) \
2302 do { \
2303 if (yydebug) \
2304 YYFPRINTF Args; \
2305 } while (0)
2306
2307
2308 /* YY_LOCATION_PRINT -- Print the location on the stream.
2309 This macro was not mandated originally: define only if we know
2310 we won't break user code: when these are the locations we know. */
2311
2312 # ifndef YY_LOCATION_PRINT
2313 # if defined PKL_TAB_LTYPE_IS_TRIVIAL && PKL_TAB_LTYPE_IS_TRIVIAL
2314
2315 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
2316
2317 YY_ATTRIBUTE_UNUSED
2318 static int
yy_location_print_(FILE * yyo,YYLTYPE const * const yylocp)2319 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
2320 {
2321 int res = 0;
2322 int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
2323 if (0 <= yylocp->first_line)
2324 {
2325 res += YYFPRINTF (yyo, "%d", yylocp->first_line);
2326 if (0 <= yylocp->first_column)
2327 res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
2328 }
2329 if (0 <= yylocp->last_line)
2330 {
2331 if (yylocp->first_line < yylocp->last_line)
2332 {
2333 res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
2334 if (0 <= end_col)
2335 res += YYFPRINTF (yyo, ".%d", end_col);
2336 }
2337 else if (0 <= end_col && yylocp->first_column < end_col)
2338 res += YYFPRINTF (yyo, "-%d", end_col);
2339 }
2340 return res;
2341 }
2342
2343 # define YY_LOCATION_PRINT(File, Loc) \
2344 yy_location_print_ (File, &(Loc))
2345
2346 # else
2347 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2348 # endif
2349 # endif /* !defined YY_LOCATION_PRINT */
2350
2351
2352 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
2353 do { \
2354 if (yydebug) \
2355 { \
2356 YYFPRINTF (stderr, "%s ", Title); \
2357 yy_symbol_print (stderr, \
2358 Kind, Value, Location, pkl_parser); \
2359 YYFPRINTF (stderr, "\n"); \
2360 } \
2361 } while (0)
2362
2363
2364 /*-----------------------------------.
2365 | Print this symbol's value on YYO. |
2366 `-----------------------------------*/
2367
2368 static void
yy_symbol_value_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep,YYLTYPE const * const yylocationp,struct pkl_parser * pkl_parser)2369 yy_symbol_value_print (FILE *yyo,
2370 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct pkl_parser *pkl_parser)
2371 {
2372 FILE *yyoutput = yyo;
2373 YYUSE (yyoutput);
2374 YYUSE (yylocationp);
2375 YYUSE (pkl_parser);
2376 if (!yyvaluep)
2377 return;
2378 # ifdef YYPRINT
2379 if (yykind < YYNTOKENS)
2380 YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
2381 # endif
2382 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2383 YYUSE (yykind);
2384 YY_IGNORE_MAYBE_UNINITIALIZED_END
2385 }
2386
2387
2388 /*---------------------------.
2389 | Print this symbol on YYO. |
2390 `---------------------------*/
2391
2392 static void
yy_symbol_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep,YYLTYPE const * const yylocationp,struct pkl_parser * pkl_parser)2393 yy_symbol_print (FILE *yyo,
2394 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct pkl_parser *pkl_parser)
2395 {
2396 YYFPRINTF (yyo, "%s %s (",
2397 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
2398
2399 YY_LOCATION_PRINT (yyo, *yylocationp);
2400 YYFPRINTF (yyo, ": ");
2401 yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, pkl_parser);
2402 YYFPRINTF (yyo, ")");
2403 }
2404
2405 /*------------------------------------------------------------------.
2406 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2407 | TOP (included). |
2408 `------------------------------------------------------------------*/
2409
2410 static void
yy_stack_print(yy_state_t * yybottom,yy_state_t * yytop)2411 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
2412 {
2413 YYFPRINTF (stderr, "Stack now");
2414 for (; yybottom <= yytop; yybottom++)
2415 {
2416 int yybot = *yybottom;
2417 YYFPRINTF (stderr, " %d", yybot);
2418 }
2419 YYFPRINTF (stderr, "\n");
2420 }
2421
2422 # define YY_STACK_PRINT(Bottom, Top) \
2423 do { \
2424 if (yydebug) \
2425 yy_stack_print ((Bottom), (Top)); \
2426 } while (0)
2427
2428
2429 /*------------------------------------------------.
2430 | Report that the YYRULE is going to be reduced. |
2431 `------------------------------------------------*/
2432
2433 static void
yy_reduce_print(yy_state_t * yyssp,YYSTYPE * yyvsp,YYLTYPE * yylsp,int yyrule,struct pkl_parser * pkl_parser)2434 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
2435 int yyrule, struct pkl_parser *pkl_parser)
2436 {
2437 int yylno = yyrline[yyrule];
2438 int yynrhs = yyr2[yyrule];
2439 int yyi;
2440 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
2441 yyrule - 1, yylno);
2442 /* The symbols being reduced. */
2443 for (yyi = 0; yyi < yynrhs; yyi++)
2444 {
2445 YYFPRINTF (stderr, " $%d = ", yyi + 1);
2446 yy_symbol_print (stderr,
2447 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
2448 &yyvsp[(yyi + 1) - (yynrhs)],
2449 &(yylsp[(yyi + 1) - (yynrhs)]), pkl_parser);
2450 YYFPRINTF (stderr, "\n");
2451 }
2452 }
2453
2454 # define YY_REDUCE_PRINT(Rule) \
2455 do { \
2456 if (yydebug) \
2457 yy_reduce_print (yyssp, yyvsp, yylsp, Rule, pkl_parser); \
2458 } while (0)
2459
2460 /* Nonzero means print parse trace. It is left uninitialized so that
2461 multiple parsers can coexist. */
2462 int yydebug;
2463 #else /* !PKL_TAB_DEBUG */
2464 # define YYDPRINTF(Args) ((void) 0)
2465 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
2466 # define YY_STACK_PRINT(Bottom, Top)
2467 # define YY_REDUCE_PRINT(Rule)
2468 #endif /* !PKL_TAB_DEBUG */
2469
2470
2471 /* YYINITDEPTH -- initial size of the parser's stacks. */
2472 #ifndef YYINITDEPTH
2473 # define YYINITDEPTH 200
2474 #endif
2475
2476 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2477 if the built-in stack extension method is used).
2478
2479 Do not make this value too large; the results are undefined if
2480 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2481 evaluated with infinite-precision integer arithmetic. */
2482
2483 #ifndef YYMAXDEPTH
2484 # define YYMAXDEPTH 10000
2485 #endif
2486
2487
2488 /* Given a state stack such that *YYBOTTOM is its bottom, such that
2489 *YYTOP is either its top or is YYTOP_EMPTY to indicate an empty
2490 stack, and such that *YYCAPACITY is the maximum number of elements it
2491 can hold without a reallocation, make sure there is enough room to
2492 store YYADD more elements. If not, allocate a new stack using
2493 YYSTACK_ALLOC, copy the existing elements, and adjust *YYBOTTOM,
2494 *YYTOP, and *YYCAPACITY to reflect the new capacity and memory
2495 location. If *YYBOTTOM != YYBOTTOM_NO_FREE, then free the old stack
2496 using YYSTACK_FREE. Return 0 if successful or if no reallocation is
2497 required. Return YYENOMEM if memory is exhausted. */
2498 static int
yy_lac_stack_realloc(YYPTRDIFF_T * yycapacity,YYPTRDIFF_T yyadd,char const * yydebug_prefix,char const * yydebug_suffix,yy_state_t ** yybottom,yy_state_t * yybottom_no_free,yy_state_t ** yytop,yy_state_t * yytop_empty)2499 yy_lac_stack_realloc (YYPTRDIFF_T *yycapacity, YYPTRDIFF_T yyadd,
2500 #if PKL_TAB_DEBUG
2501 char const *yydebug_prefix,
2502 char const *yydebug_suffix,
2503 #endif
2504 yy_state_t **yybottom,
2505 yy_state_t *yybottom_no_free,
2506 yy_state_t **yytop, yy_state_t *yytop_empty)
2507 {
2508 YYPTRDIFF_T yysize_old =
2509 *yytop == yytop_empty ? 0 : *yytop - *yybottom + 1;
2510 YYPTRDIFF_T yysize_new = yysize_old + yyadd;
2511 if (*yycapacity < yysize_new)
2512 {
2513 YYPTRDIFF_T yyalloc = 2 * yysize_new;
2514 yy_state_t *yybottom_new;
2515 /* Use YYMAXDEPTH for maximum stack size given that the stack
2516 should never need to grow larger than the main state stack
2517 needs to grow without LAC. */
2518 if (YYMAXDEPTH < yysize_new)
2519 {
2520 YYDPRINTF ((stderr, "%smax size exceeded%s", yydebug_prefix,
2521 yydebug_suffix));
2522 return YYENOMEM;
2523 }
2524 if (YYMAXDEPTH < yyalloc)
2525 yyalloc = YYMAXDEPTH;
2526 yybottom_new =
2527 YY_CAST (yy_state_t *,
2528 YYSTACK_ALLOC (YY_CAST (YYSIZE_T,
2529 yyalloc * YYSIZEOF (*yybottom_new))));
2530 if (!yybottom_new)
2531 {
2532 YYDPRINTF ((stderr, "%srealloc failed%s", yydebug_prefix,
2533 yydebug_suffix));
2534 return YYENOMEM;
2535 }
2536 if (*yytop != yytop_empty)
2537 {
2538 YYCOPY (yybottom_new, *yybottom, yysize_old);
2539 *yytop = yybottom_new + (yysize_old - 1);
2540 }
2541 if (*yybottom != yybottom_no_free)
2542 YYSTACK_FREE (*yybottom);
2543 *yybottom = yybottom_new;
2544 *yycapacity = yyalloc;
2545 }
2546 return 0;
2547 }
2548
2549 /* Establish the initial context for the current lookahead if no initial
2550 context is currently established.
2551
2552 We define a context as a snapshot of the parser stacks. We define
2553 the initial context for a lookahead as the context in which the
2554 parser initially examines that lookahead in order to select a
2555 syntactic action. Thus, if the lookahead eventually proves
2556 syntactically unacceptable (possibly in a later context reached via a
2557 series of reductions), the initial context can be used to determine
2558 the exact set of tokens that would be syntactically acceptable in the
2559 lookahead's place. Moreover, it is the context after which any
2560 further semantic actions would be erroneous because they would be
2561 determined by a syntactically unacceptable token.
2562
2563 YY_LAC_ESTABLISH should be invoked when a reduction is about to be
2564 performed in an inconsistent state (which, for the purposes of LAC,
2565 includes consistent states that don't know they're consistent because
2566 their default reductions have been disabled). Iff there is a
2567 lookahead token, it should also be invoked before reporting a syntax
2568 error. This latter case is for the sake of the debugging output.
2569
2570 For parse.lac=full, the implementation of YY_LAC_ESTABLISH is as
2571 follows. If no initial context is currently established for the
2572 current lookahead, then check if that lookahead can eventually be
2573 shifted if syntactic actions continue from the current context.
2574 Report a syntax error if it cannot. */
2575 #define YY_LAC_ESTABLISH \
2576 do { \
2577 if (!yy_lac_established) \
2578 { \
2579 YYDPRINTF ((stderr, \
2580 "LAC: initial context established for %s\n", \
2581 yysymbol_name (yytoken))); \
2582 yy_lac_established = 1; \
2583 switch (yy_lac (yyesa, &yyes, &yyes_capacity, yyssp, yytoken)) \
2584 { \
2585 case YYENOMEM: \
2586 goto yyexhaustedlab; \
2587 case 1: \
2588 goto yyerrlab; \
2589 } \
2590 } \
2591 } while (0)
2592
2593 /* Discard any previous initial lookahead context because of Event,
2594 which may be a lookahead change or an invalidation of the currently
2595 established initial context for the current lookahead.
2596
2597 The most common example of a lookahead change is a shift. An example
2598 of both cases is syntax error recovery. That is, a syntax error
2599 occurs when the lookahead is syntactically erroneous for the
2600 currently established initial context, so error recovery manipulates
2601 the parser stacks to try to find a new initial context in which the
2602 current lookahead is syntactically acceptable. If it fails to find
2603 such a context, it discards the lookahead. */
2604 #if PKL_TAB_DEBUG
2605 # define YY_LAC_DISCARD(Event) \
2606 do { \
2607 if (yy_lac_established) \
2608 { \
2609 YYDPRINTF ((stderr, "LAC: initial context discarded due to " \
2610 Event "\n")); \
2611 yy_lac_established = 0; \
2612 } \
2613 } while (0)
2614 #else
2615 # define YY_LAC_DISCARD(Event) yy_lac_established = 0
2616 #endif
2617
2618 /* Given the stack whose top is *YYSSP, return 0 iff YYTOKEN can
2619 eventually (after perhaps some reductions) be shifted, return 1 if
2620 not, or return YYENOMEM if memory is exhausted. As preconditions and
2621 postconditions: *YYES_CAPACITY is the allocated size of the array to
2622 which *YYES points, and either *YYES = YYESA or *YYES points to an
2623 array allocated with YYSTACK_ALLOC. yy_lac may overwrite the
2624 contents of either array, alter *YYES and *YYES_CAPACITY, and free
2625 any old *YYES other than YYESA. */
2626 static int
yy_lac(yy_state_t * yyesa,yy_state_t ** yyes,YYPTRDIFF_T * yyes_capacity,yy_state_t * yyssp,yysymbol_kind_t yytoken)2627 yy_lac (yy_state_t *yyesa, yy_state_t **yyes,
2628 YYPTRDIFF_T *yyes_capacity, yy_state_t *yyssp, yysymbol_kind_t yytoken)
2629 {
2630 yy_state_t *yyes_prev = yyssp;
2631 yy_state_t *yyesp = yyes_prev;
2632 /* Reduce until we encounter a shift and thereby accept the token. */
2633 YYDPRINTF ((stderr, "LAC: checking lookahead %s:", yysymbol_name (yytoken)));
2634 if (yytoken == YYSYMBOL_YYUNDEF)
2635 {
2636 YYDPRINTF ((stderr, " Always Err\n"));
2637 return 1;
2638 }
2639 while (1)
2640 {
2641 int yyrule = yypact[+*yyesp];
2642 if (yypact_value_is_default (yyrule)
2643 || (yyrule += yytoken) < 0 || YYLAST < yyrule
2644 || yycheck[yyrule] != yytoken)
2645 {
2646 /* Use the default action. */
2647 yyrule = yydefact[+*yyesp];
2648 if (yyrule == 0)
2649 {
2650 YYDPRINTF ((stderr, " Err\n"));
2651 return 1;
2652 }
2653 }
2654 else
2655 {
2656 /* Use the action from yytable. */
2657 yyrule = yytable[yyrule];
2658 if (yytable_value_is_error (yyrule))
2659 {
2660 YYDPRINTF ((stderr, " Err\n"));
2661 return 1;
2662 }
2663 if (0 < yyrule)
2664 {
2665 YYDPRINTF ((stderr, " S%d\n", yyrule));
2666 return 0;
2667 }
2668 yyrule = -yyrule;
2669 }
2670 /* By now we know we have to simulate a reduce. */
2671 YYDPRINTF ((stderr, " R%d", yyrule - 1));
2672 {
2673 /* Pop the corresponding number of values from the stack. */
2674 YYPTRDIFF_T yylen = yyr2[yyrule];
2675 /* First pop from the LAC stack as many tokens as possible. */
2676 if (yyesp != yyes_prev)
2677 {
2678 YYPTRDIFF_T yysize = yyesp - *yyes + 1;
2679 if (yylen < yysize)
2680 {
2681 yyesp -= yylen;
2682 yylen = 0;
2683 }
2684 else
2685 {
2686 yyesp = yyes_prev;
2687 yylen -= yysize;
2688 }
2689 }
2690 /* Only afterwards look at the main stack. */
2691 if (yylen)
2692 yyesp = yyes_prev -= yylen;
2693 }
2694 /* Push the resulting state of the reduction. */
2695 {
2696 yy_state_fast_t yystate;
2697 {
2698 const int yylhs = yyr1[yyrule] - YYNTOKENS;
2699 const int yyi = yypgoto[yylhs] + *yyesp;
2700 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyesp
2701 ? yytable[yyi]
2702 : yydefgoto[yylhs]);
2703 }
2704 if (yyesp == yyes_prev)
2705 {
2706 yyesp = *yyes;
2707 YY_IGNORE_USELESS_CAST_BEGIN
2708 *yyesp = YY_CAST (yy_state_t, yystate);
2709 YY_IGNORE_USELESS_CAST_END
2710 }
2711 else
2712 {
2713 if (yy_lac_stack_realloc (yyes_capacity, 1,
2714 #if PKL_TAB_DEBUG
2715 " (", ")",
2716 #endif
2717 yyes, yyesa, &yyesp, yyes_prev))
2718 {
2719 YYDPRINTF ((stderr, "\n"));
2720 return YYENOMEM;
2721 }
2722 YY_IGNORE_USELESS_CAST_BEGIN
2723 *++yyesp = YY_CAST (yy_state_t, yystate);
2724 YY_IGNORE_USELESS_CAST_END
2725 }
2726 YYDPRINTF ((stderr, " G%d", yystate));
2727 }
2728 }
2729 }
2730
2731 /* Context of a parse error. */
2732 typedef struct
2733 {
2734 yy_state_t *yyssp;
2735 yy_state_t *yyesa;
2736 yy_state_t **yyes;
2737 YYPTRDIFF_T *yyes_capacity;
2738 yysymbol_kind_t yytoken;
2739 YYLTYPE *yylloc;
2740 } yypcontext_t;
2741
2742 /* Put in YYARG at most YYARGN of the expected tokens given the
2743 current YYCTX, and return the number of tokens stored in YYARG. If
2744 YYARG is null, return the number of expected tokens (guaranteed to
2745 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
2746 Return 0 if there are more than YYARGN expected tokens, yet fill
2747 YYARG up to YYARGN. */
2748 static int
yypcontext_expected_tokens(const yypcontext_t * yyctx,yysymbol_kind_t yyarg[],int yyargn)2749 yypcontext_expected_tokens (const yypcontext_t *yyctx,
2750 yysymbol_kind_t yyarg[], int yyargn)
2751 {
2752 /* Actual size of YYARG. */
2753 int yycount = 0;
2754
2755 int yyx;
2756 for (yyx = 0; yyx < YYNTOKENS; ++yyx)
2757 {
2758 yysymbol_kind_t yysym = YY_CAST (yysymbol_kind_t, yyx);
2759 if (yysym != YYSYMBOL_YYerror && yysym != YYSYMBOL_YYUNDEF)
2760 switch (yy_lac (yyctx->yyesa, yyctx->yyes, yyctx->yyes_capacity, yyctx->yyssp, yysym))
2761 {
2762 case YYENOMEM:
2763 return YYENOMEM;
2764 case 1:
2765 continue;
2766 default:
2767 if (!yyarg)
2768 ++yycount;
2769 else if (yycount == yyargn)
2770 return 0;
2771 else
2772 yyarg[yycount++] = yysym;
2773 }
2774 }
2775 if (yyarg && yycount == 0 && 0 < yyargn)
2776 yyarg[0] = YYSYMBOL_YYEMPTY;
2777 return yycount;
2778 }
2779
2780
2781
2782
2783 /* The kind of the lookahead of this context. */
2784 static yysymbol_kind_t
2785 yypcontext_token (const yypcontext_t *yyctx) YY_ATTRIBUTE_UNUSED;
2786
2787 static yysymbol_kind_t
yypcontext_token(const yypcontext_t * yyctx)2788 yypcontext_token (const yypcontext_t *yyctx)
2789 {
2790 return yyctx->yytoken;
2791 }
2792
2793 /* The location of the lookahead of this context. */
2794 static YYLTYPE *
2795 yypcontext_location (const yypcontext_t *yyctx) YY_ATTRIBUTE_UNUSED;
2796
2797 static YYLTYPE *
yypcontext_location(const yypcontext_t * yyctx)2798 yypcontext_location (const yypcontext_t *yyctx)
2799 {
2800 return yyctx->yylloc;
2801 }
2802
2803 /* User defined function to report a syntax error. */
2804 static int
2805 yyreport_syntax_error (const yypcontext_t *yyctx, struct pkl_parser *pkl_parser);
2806
2807 /*-----------------------------------------------.
2808 | Release the memory associated to this symbol. |
2809 `-----------------------------------------------*/
2810
2811 static void
yydestruct(const char * yymsg,yysymbol_kind_t yykind,YYSTYPE * yyvaluep,YYLTYPE * yylocationp,struct pkl_parser * pkl_parser)2812 yydestruct (const char *yymsg,
2813 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct pkl_parser *pkl_parser)
2814 {
2815 YYUSE (yyvaluep);
2816 YYUSE (yylocationp);
2817 YYUSE (pkl_parser);
2818 if (!yymsg)
2819 yymsg = "Deleting";
2820 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
2821
2822 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2823 switch (yykind)
2824 {
2825 case 3: /* "integer literal" */
2826 #line 344 "pkl-tab.y"
2827 {
2828 if (((*yyvaluep).ast))
2829 {
2830 switch (PKL_AST_CODE (((*yyvaluep).ast)))
2831 {
2832 case PKL_AST_COMP_STMT:
2833 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2834 break;
2835 case PKL_AST_TYPE:
2836 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
2837 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
2838 break;
2839 case PKL_AST_FUNC:
2840 /* if (PKL_AST_FUNC_ARGS ($$))
2841 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2842 break;
2843 default:
2844 break;
2845 }
2846 }
2847
2848 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
2849 }
2850 #line 2851 "pkl-tab.c"
2851 break;
2852
2853 case 5: /* "character literal" */
2854 #line 344 "pkl-tab.y"
2855 {
2856 if (((*yyvaluep).ast))
2857 {
2858 switch (PKL_AST_CODE (((*yyvaluep).ast)))
2859 {
2860 case PKL_AST_COMP_STMT:
2861 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2862 break;
2863 case PKL_AST_TYPE:
2864 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
2865 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
2866 break;
2867 case PKL_AST_FUNC:
2868 /* if (PKL_AST_FUNC_ARGS ($$))
2869 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2870 break;
2871 default:
2872 break;
2873 }
2874 }
2875
2876 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
2877 }
2878 #line 2879 "pkl-tab.c"
2879 break;
2880
2881 case 6: /* "string" */
2882 #line 344 "pkl-tab.y"
2883 {
2884 if (((*yyvaluep).ast))
2885 {
2886 switch (PKL_AST_CODE (((*yyvaluep).ast)))
2887 {
2888 case PKL_AST_COMP_STMT:
2889 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2890 break;
2891 case PKL_AST_TYPE:
2892 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
2893 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
2894 break;
2895 case PKL_AST_FUNC:
2896 /* if (PKL_AST_FUNC_ARGS ($$))
2897 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2898 break;
2899 default:
2900 break;
2901 }
2902 }
2903
2904 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
2905 }
2906 #line 2907 "pkl-tab.c"
2907 break;
2908
2909 case 7: /* "identifier" */
2910 #line 344 "pkl-tab.y"
2911 {
2912 if (((*yyvaluep).ast))
2913 {
2914 switch (PKL_AST_CODE (((*yyvaluep).ast)))
2915 {
2916 case PKL_AST_COMP_STMT:
2917 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2918 break;
2919 case PKL_AST_TYPE:
2920 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
2921 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
2922 break;
2923 case PKL_AST_FUNC:
2924 /* if (PKL_AST_FUNC_ARGS ($$))
2925 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2926 break;
2927 default:
2928 break;
2929 }
2930 }
2931
2932 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
2933 }
2934 #line 2935 "pkl-tab.c"
2935 break;
2936
2937 case 8: /* "type name" */
2938 #line 344 "pkl-tab.y"
2939 {
2940 if (((*yyvaluep).ast))
2941 {
2942 switch (PKL_AST_CODE (((*yyvaluep).ast)))
2943 {
2944 case PKL_AST_COMP_STMT:
2945 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2946 break;
2947 case PKL_AST_TYPE:
2948 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
2949 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
2950 break;
2951 case PKL_AST_FUNC:
2952 /* if (PKL_AST_FUNC_ARGS ($$))
2953 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2954 break;
2955 default:
2956 break;
2957 }
2958 }
2959
2960 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
2961 }
2962 #line 2963 "pkl-tab.c"
2963 break;
2964
2965 case 9: /* "offset unit" */
2966 #line 344 "pkl-tab.y"
2967 {
2968 if (((*yyvaluep).ast))
2969 {
2970 switch (PKL_AST_CODE (((*yyvaluep).ast)))
2971 {
2972 case PKL_AST_COMP_STMT:
2973 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2974 break;
2975 case PKL_AST_TYPE:
2976 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
2977 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
2978 break;
2979 case PKL_AST_FUNC:
2980 /* if (PKL_AST_FUNC_ARGS ($$))
2981 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
2982 break;
2983 default:
2984 break;
2985 }
2986 }
2987
2988 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
2989 }
2990 #line 2991 "pkl-tab.c"
2991 break;
2992
2993 case 110: /* "attribute" */
2994 #line 344 "pkl-tab.y"
2995 {
2996 if (((*yyvaluep).ast))
2997 {
2998 switch (PKL_AST_CODE (((*yyvaluep).ast)))
2999 {
3000 case PKL_AST_COMP_STMT:
3001 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3002 break;
3003 case PKL_AST_TYPE:
3004 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3005 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3006 break;
3007 case PKL_AST_FUNC:
3008 /* if (PKL_AST_FUNC_ARGS ($$))
3009 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3010 break;
3011 default:
3012 break;
3013 }
3014 }
3015
3016 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3017 }
3018 #line 3019 "pkl-tab.c"
3019 break;
3020
3021 case 139: /* start */
3022 #line 344 "pkl-tab.y"
3023 {
3024 if (((*yyvaluep).ast))
3025 {
3026 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3027 {
3028 case PKL_AST_COMP_STMT:
3029 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3030 break;
3031 case PKL_AST_TYPE:
3032 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3033 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3034 break;
3035 case PKL_AST_FUNC:
3036 /* if (PKL_AST_FUNC_ARGS ($$))
3037 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3038 break;
3039 default:
3040 break;
3041 }
3042 }
3043
3044 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3045 }
3046 #line 3047 "pkl-tab.c"
3047 break;
3048
3049 case 140: /* program */
3050 #line 344 "pkl-tab.y"
3051 {
3052 if (((*yyvaluep).ast))
3053 {
3054 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3055 {
3056 case PKL_AST_COMP_STMT:
3057 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3058 break;
3059 case PKL_AST_TYPE:
3060 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3061 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3062 break;
3063 case PKL_AST_FUNC:
3064 /* if (PKL_AST_FUNC_ARGS ($$))
3065 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3066 break;
3067 default:
3068 break;
3069 }
3070 }
3071
3072 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3073 }
3074 #line 3075 "pkl-tab.c"
3075 break;
3076
3077 case 141: /* program_elem_list */
3078 #line 344 "pkl-tab.y"
3079 {
3080 if (((*yyvaluep).ast))
3081 {
3082 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3083 {
3084 case PKL_AST_COMP_STMT:
3085 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3086 break;
3087 case PKL_AST_TYPE:
3088 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3089 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3090 break;
3091 case PKL_AST_FUNC:
3092 /* if (PKL_AST_FUNC_ARGS ($$))
3093 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3094 break;
3095 default:
3096 break;
3097 }
3098 }
3099
3100 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3101 }
3102 #line 3103 "pkl-tab.c"
3103 break;
3104
3105 case 142: /* program_elem */
3106 #line 344 "pkl-tab.y"
3107 {
3108 if (((*yyvaluep).ast))
3109 {
3110 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3111 {
3112 case PKL_AST_COMP_STMT:
3113 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3114 break;
3115 case PKL_AST_TYPE:
3116 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3117 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3118 break;
3119 case PKL_AST_FUNC:
3120 /* if (PKL_AST_FUNC_ARGS ($$))
3121 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3122 break;
3123 default:
3124 break;
3125 }
3126 }
3127
3128 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3129 }
3130 #line 3131 "pkl-tab.c"
3131 break;
3132
3133 case 143: /* load */
3134 #line 344 "pkl-tab.y"
3135 {
3136 if (((*yyvaluep).ast))
3137 {
3138 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3139 {
3140 case PKL_AST_COMP_STMT:
3141 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3142 break;
3143 case PKL_AST_TYPE:
3144 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3145 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3146 break;
3147 case PKL_AST_FUNC:
3148 /* if (PKL_AST_FUNC_ARGS ($$))
3149 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3150 break;
3151 default:
3152 break;
3153 }
3154 }
3155
3156 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3157 }
3158 #line 3159 "pkl-tab.c"
3159 break;
3160
3161 case 144: /* identifier */
3162 #line 344 "pkl-tab.y"
3163 {
3164 if (((*yyvaluep).ast))
3165 {
3166 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3167 {
3168 case PKL_AST_COMP_STMT:
3169 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3170 break;
3171 case PKL_AST_TYPE:
3172 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3173 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3174 break;
3175 case PKL_AST_FUNC:
3176 /* if (PKL_AST_FUNC_ARGS ($$))
3177 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3178 break;
3179 default:
3180 break;
3181 }
3182 }
3183
3184 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3185 }
3186 #line 3187 "pkl-tab.c"
3187 break;
3188
3189 case 145: /* expression_list */
3190 #line 344 "pkl-tab.y"
3191 {
3192 if (((*yyvaluep).ast))
3193 {
3194 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3195 {
3196 case PKL_AST_COMP_STMT:
3197 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3198 break;
3199 case PKL_AST_TYPE:
3200 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3201 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3202 break;
3203 case PKL_AST_FUNC:
3204 /* if (PKL_AST_FUNC_ARGS ($$))
3205 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3206 break;
3207 default:
3208 break;
3209 }
3210 }
3211
3212 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3213 }
3214 #line 3215 "pkl-tab.c"
3215 break;
3216
3217 case 146: /* expression_opt */
3218 #line 344 "pkl-tab.y"
3219 {
3220 if (((*yyvaluep).ast))
3221 {
3222 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3223 {
3224 case PKL_AST_COMP_STMT:
3225 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3226 break;
3227 case PKL_AST_TYPE:
3228 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3229 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3230 break;
3231 case PKL_AST_FUNC:
3232 /* if (PKL_AST_FUNC_ARGS ($$))
3233 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3234 break;
3235 default:
3236 break;
3237 }
3238 }
3239
3240 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3241 }
3242 #line 3243 "pkl-tab.c"
3243 break;
3244
3245 case 147: /* expression */
3246 #line 344 "pkl-tab.y"
3247 {
3248 if (((*yyvaluep).ast))
3249 {
3250 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3251 {
3252 case PKL_AST_COMP_STMT:
3253 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3254 break;
3255 case PKL_AST_TYPE:
3256 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3257 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3258 break;
3259 case PKL_AST_FUNC:
3260 /* if (PKL_AST_FUNC_ARGS ($$))
3261 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3262 break;
3263 default:
3264 break;
3265 }
3266 }
3267
3268 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3269 }
3270 #line 3271 "pkl-tab.c"
3271 break;
3272
3273 case 148: /* bconc */
3274 #line 344 "pkl-tab.y"
3275 {
3276 if (((*yyvaluep).ast))
3277 {
3278 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3279 {
3280 case PKL_AST_COMP_STMT:
3281 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3282 break;
3283 case PKL_AST_TYPE:
3284 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3285 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3286 break;
3287 case PKL_AST_FUNC:
3288 /* if (PKL_AST_FUNC_ARGS ($$))
3289 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3290 break;
3291 default:
3292 break;
3293 }
3294 }
3295
3296 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3297 }
3298 #line 3299 "pkl-tab.c"
3299 break;
3300
3301 case 150: /* map */
3302 #line 344 "pkl-tab.y"
3303 {
3304 if (((*yyvaluep).ast))
3305 {
3306 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3307 {
3308 case PKL_AST_COMP_STMT:
3309 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3310 break;
3311 case PKL_AST_TYPE:
3312 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3313 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3314 break;
3315 case PKL_AST_FUNC:
3316 /* if (PKL_AST_FUNC_ARGS ($$))
3317 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3318 break;
3319 default:
3320 break;
3321 }
3322 }
3323
3324 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3325 }
3326 #line 3327 "pkl-tab.c"
3327 break;
3328
3329 case 152: /* primary */
3330 #line 344 "pkl-tab.y"
3331 {
3332 if (((*yyvaluep).ast))
3333 {
3334 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3335 {
3336 case PKL_AST_COMP_STMT:
3337 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3338 break;
3339 case PKL_AST_TYPE:
3340 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3341 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3342 break;
3343 case PKL_AST_FUNC:
3344 /* if (PKL_AST_FUNC_ARGS ($$))
3345 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3346 break;
3347 default:
3348 break;
3349 }
3350 }
3351
3352 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3353 }
3354 #line 3355 "pkl-tab.c"
3355 break;
3356
3357 case 154: /* funcall */
3358 #line 344 "pkl-tab.y"
3359 {
3360 if (((*yyvaluep).ast))
3361 {
3362 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3363 {
3364 case PKL_AST_COMP_STMT:
3365 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3366 break;
3367 case PKL_AST_TYPE:
3368 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3369 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3370 break;
3371 case PKL_AST_FUNC:
3372 /* if (PKL_AST_FUNC_ARGS ($$))
3373 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3374 break;
3375 default:
3376 break;
3377 }
3378 }
3379
3380 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3381 }
3382 #line 3383 "pkl-tab.c"
3383 break;
3384
3385 case 155: /* funcall_arg_list */
3386 #line 344 "pkl-tab.y"
3387 {
3388 if (((*yyvaluep).ast))
3389 {
3390 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3391 {
3392 case PKL_AST_COMP_STMT:
3393 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3394 break;
3395 case PKL_AST_TYPE:
3396 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3397 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3398 break;
3399 case PKL_AST_FUNC:
3400 /* if (PKL_AST_FUNC_ARGS ($$))
3401 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3402 break;
3403 default:
3404 break;
3405 }
3406 }
3407
3408 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3409 }
3410 #line 3411 "pkl-tab.c"
3411 break;
3412
3413 case 156: /* funcall_arg */
3414 #line 344 "pkl-tab.y"
3415 {
3416 if (((*yyvaluep).ast))
3417 {
3418 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3419 {
3420 case PKL_AST_COMP_STMT:
3421 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3422 break;
3423 case PKL_AST_TYPE:
3424 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3425 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3426 break;
3427 case PKL_AST_FUNC:
3428 /* if (PKL_AST_FUNC_ARGS ($$))
3429 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3430 break;
3431 default:
3432 break;
3433 }
3434 }
3435
3436 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3437 }
3438 #line 3439 "pkl-tab.c"
3439 break;
3440
3441 case 158: /* struct_field_list */
3442 #line 344 "pkl-tab.y"
3443 {
3444 if (((*yyvaluep).ast))
3445 {
3446 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3447 {
3448 case PKL_AST_COMP_STMT:
3449 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3450 break;
3451 case PKL_AST_TYPE:
3452 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3453 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3454 break;
3455 case PKL_AST_FUNC:
3456 /* if (PKL_AST_FUNC_ARGS ($$))
3457 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3458 break;
3459 default:
3460 break;
3461 }
3462 }
3463
3464 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3465 }
3466 #line 3467 "pkl-tab.c"
3467 break;
3468
3469 case 159: /* struct_field */
3470 #line 344 "pkl-tab.y"
3471 {
3472 if (((*yyvaluep).ast))
3473 {
3474 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3475 {
3476 case PKL_AST_COMP_STMT:
3477 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3478 break;
3479 case PKL_AST_TYPE:
3480 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3481 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3482 break;
3483 case PKL_AST_FUNC:
3484 /* if (PKL_AST_FUNC_ARGS ($$))
3485 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3486 break;
3487 default:
3488 break;
3489 }
3490 }
3491
3492 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3493 }
3494 #line 3495 "pkl-tab.c"
3495 break;
3496
3497 case 160: /* array */
3498 #line 344 "pkl-tab.y"
3499 {
3500 if (((*yyvaluep).ast))
3501 {
3502 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3503 {
3504 case PKL_AST_COMP_STMT:
3505 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3506 break;
3507 case PKL_AST_TYPE:
3508 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3509 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3510 break;
3511 case PKL_AST_FUNC:
3512 /* if (PKL_AST_FUNC_ARGS ($$))
3513 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3514 break;
3515 default:
3516 break;
3517 }
3518 }
3519
3520 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3521 }
3522 #line 3523 "pkl-tab.c"
3523 break;
3524
3525 case 161: /* array_initializer_list */
3526 #line 344 "pkl-tab.y"
3527 {
3528 if (((*yyvaluep).ast))
3529 {
3530 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3531 {
3532 case PKL_AST_COMP_STMT:
3533 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3534 break;
3535 case PKL_AST_TYPE:
3536 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3537 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3538 break;
3539 case PKL_AST_FUNC:
3540 /* if (PKL_AST_FUNC_ARGS ($$))
3541 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3542 break;
3543 default:
3544 break;
3545 }
3546 }
3547
3548 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3549 }
3550 #line 3551 "pkl-tab.c"
3551 break;
3552
3553 case 162: /* array_initializer */
3554 #line 344 "pkl-tab.y"
3555 {
3556 if (((*yyvaluep).ast))
3557 {
3558 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3559 {
3560 case PKL_AST_COMP_STMT:
3561 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3562 break;
3563 case PKL_AST_TYPE:
3564 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3565 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3566 break;
3567 case PKL_AST_FUNC:
3568 /* if (PKL_AST_FUNC_ARGS ($$))
3569 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3570 break;
3571 default:
3572 break;
3573 }
3574 }
3575
3576 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3577 }
3578 #line 3579 "pkl-tab.c"
3579 break;
3580
3581 case 164: /* function_specifier */
3582 #line 344 "pkl-tab.y"
3583 {
3584 if (((*yyvaluep).ast))
3585 {
3586 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3587 {
3588 case PKL_AST_COMP_STMT:
3589 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3590 break;
3591 case PKL_AST_TYPE:
3592 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3593 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3594 break;
3595 case PKL_AST_FUNC:
3596 /* if (PKL_AST_FUNC_ARGS ($$))
3597 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3598 break;
3599 default:
3600 break;
3601 }
3602 }
3603
3604 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3605 }
3606 #line 3607 "pkl-tab.c"
3607 break;
3608
3609 case 165: /* function_arg_list */
3610 #line 344 "pkl-tab.y"
3611 {
3612 if (((*yyvaluep).ast))
3613 {
3614 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3615 {
3616 case PKL_AST_COMP_STMT:
3617 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3618 break;
3619 case PKL_AST_TYPE:
3620 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3621 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3622 break;
3623 case PKL_AST_FUNC:
3624 /* if (PKL_AST_FUNC_ARGS ($$))
3625 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3626 break;
3627 default:
3628 break;
3629 }
3630 }
3631
3632 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3633 }
3634 #line 3635 "pkl-tab.c"
3635 break;
3636
3637 case 166: /* function_arg */
3638 #line 344 "pkl-tab.y"
3639 {
3640 if (((*yyvaluep).ast))
3641 {
3642 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3643 {
3644 case PKL_AST_COMP_STMT:
3645 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3646 break;
3647 case PKL_AST_TYPE:
3648 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3649 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3650 break;
3651 case PKL_AST_FUNC:
3652 /* if (PKL_AST_FUNC_ARGS ($$))
3653 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3654 break;
3655 default:
3656 break;
3657 }
3658 }
3659
3660 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3661 }
3662 #line 3663 "pkl-tab.c"
3663 break;
3664
3665 case 167: /* function_arg_initial */
3666 #line 344 "pkl-tab.y"
3667 {
3668 if (((*yyvaluep).ast))
3669 {
3670 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3671 {
3672 case PKL_AST_COMP_STMT:
3673 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3674 break;
3675 case PKL_AST_TYPE:
3676 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3677 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3678 break;
3679 case PKL_AST_FUNC:
3680 /* if (PKL_AST_FUNC_ARGS ($$))
3681 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3682 break;
3683 default:
3684 break;
3685 }
3686 }
3687
3688 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3689 }
3690 #line 3691 "pkl-tab.c"
3691 break;
3692
3693 case 168: /* type_specifier */
3694 #line 344 "pkl-tab.y"
3695 {
3696 if (((*yyvaluep).ast))
3697 {
3698 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3699 {
3700 case PKL_AST_COMP_STMT:
3701 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3702 break;
3703 case PKL_AST_TYPE:
3704 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3705 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3706 break;
3707 case PKL_AST_FUNC:
3708 /* if (PKL_AST_FUNC_ARGS ($$))
3709 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3710 break;
3711 default:
3712 break;
3713 }
3714 }
3715
3716 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3717 }
3718 #line 3719 "pkl-tab.c"
3719 break;
3720
3721 case 169: /* typename */
3722 #line 344 "pkl-tab.y"
3723 {
3724 if (((*yyvaluep).ast))
3725 {
3726 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3727 {
3728 case PKL_AST_COMP_STMT:
3729 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3730 break;
3731 case PKL_AST_TYPE:
3732 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3733 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3734 break;
3735 case PKL_AST_FUNC:
3736 /* if (PKL_AST_FUNC_ARGS ($$))
3737 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3738 break;
3739 default:
3740 break;
3741 }
3742 }
3743
3744 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3745 }
3746 #line 3747 "pkl-tab.c"
3747 break;
3748
3749 case 170: /* string_type_specifier */
3750 #line 344 "pkl-tab.y"
3751 {
3752 if (((*yyvaluep).ast))
3753 {
3754 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3755 {
3756 case PKL_AST_COMP_STMT:
3757 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3758 break;
3759 case PKL_AST_TYPE:
3760 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3761 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3762 break;
3763 case PKL_AST_FUNC:
3764 /* if (PKL_AST_FUNC_ARGS ($$))
3765 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3766 break;
3767 default:
3768 break;
3769 }
3770 }
3771
3772 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3773 }
3774 #line 3775 "pkl-tab.c"
3775 break;
3776
3777 case 171: /* simple_type_specifier */
3778 #line 344 "pkl-tab.y"
3779 {
3780 if (((*yyvaluep).ast))
3781 {
3782 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3783 {
3784 case PKL_AST_COMP_STMT:
3785 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3786 break;
3787 case PKL_AST_TYPE:
3788 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3789 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3790 break;
3791 case PKL_AST_FUNC:
3792 /* if (PKL_AST_FUNC_ARGS ($$))
3793 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3794 break;
3795 default:
3796 break;
3797 }
3798 }
3799
3800 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3801 }
3802 #line 3803 "pkl-tab.c"
3803 break;
3804
3805 case 172: /* cons_type_specifier */
3806 #line 344 "pkl-tab.y"
3807 {
3808 if (((*yyvaluep).ast))
3809 {
3810 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3811 {
3812 case PKL_AST_COMP_STMT:
3813 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3814 break;
3815 case PKL_AST_TYPE:
3816 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3817 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3818 break;
3819 case PKL_AST_FUNC:
3820 /* if (PKL_AST_FUNC_ARGS ($$))
3821 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3822 break;
3823 default:
3824 break;
3825 }
3826 }
3827
3828 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3829 }
3830 #line 3831 "pkl-tab.c"
3831 break;
3832
3833 case 173: /* integral_type_specifier */
3834 #line 344 "pkl-tab.y"
3835 {
3836 if (((*yyvaluep).ast))
3837 {
3838 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3839 {
3840 case PKL_AST_COMP_STMT:
3841 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3842 break;
3843 case PKL_AST_TYPE:
3844 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3845 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3846 break;
3847 case PKL_AST_FUNC:
3848 /* if (PKL_AST_FUNC_ARGS ($$))
3849 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3850 break;
3851 default:
3852 break;
3853 }
3854 }
3855
3856 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3857 }
3858 #line 3859 "pkl-tab.c"
3859 break;
3860
3861 case 175: /* offset_type_specifier */
3862 #line 344 "pkl-tab.y"
3863 {
3864 if (((*yyvaluep).ast))
3865 {
3866 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3867 {
3868 case PKL_AST_COMP_STMT:
3869 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3870 break;
3871 case PKL_AST_TYPE:
3872 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3873 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3874 break;
3875 case PKL_AST_FUNC:
3876 /* if (PKL_AST_FUNC_ARGS ($$))
3877 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3878 break;
3879 default:
3880 break;
3881 }
3882 }
3883
3884 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3885 }
3886 #line 3887 "pkl-tab.c"
3887 break;
3888
3889 case 176: /* array_type_specifier */
3890 #line 344 "pkl-tab.y"
3891 {
3892 if (((*yyvaluep).ast))
3893 {
3894 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3895 {
3896 case PKL_AST_COMP_STMT:
3897 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3898 break;
3899 case PKL_AST_TYPE:
3900 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3901 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3902 break;
3903 case PKL_AST_FUNC:
3904 /* if (PKL_AST_FUNC_ARGS ($$))
3905 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3906 break;
3907 default:
3908 break;
3909 }
3910 }
3911
3912 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3913 }
3914 #line 3915 "pkl-tab.c"
3915 break;
3916
3917 case 177: /* function_type_specifier */
3918 #line 344 "pkl-tab.y"
3919 {
3920 if (((*yyvaluep).ast))
3921 {
3922 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3923 {
3924 case PKL_AST_COMP_STMT:
3925 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3926 break;
3927 case PKL_AST_TYPE:
3928 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3929 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3930 break;
3931 case PKL_AST_FUNC:
3932 /* if (PKL_AST_FUNC_ARGS ($$))
3933 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3934 break;
3935 default:
3936 break;
3937 }
3938 }
3939
3940 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3941 }
3942 #line 3943 "pkl-tab.c"
3943 break;
3944
3945 case 178: /* function_type_arg_list */
3946 #line 344 "pkl-tab.y"
3947 {
3948 if (((*yyvaluep).ast))
3949 {
3950 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3951 {
3952 case PKL_AST_COMP_STMT:
3953 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3954 break;
3955 case PKL_AST_TYPE:
3956 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3957 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3958 break;
3959 case PKL_AST_FUNC:
3960 /* if (PKL_AST_FUNC_ARGS ($$))
3961 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3962 break;
3963 default:
3964 break;
3965 }
3966 }
3967
3968 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3969 }
3970 #line 3971 "pkl-tab.c"
3971 break;
3972
3973 case 179: /* function_type_arg */
3974 #line 344 "pkl-tab.y"
3975 {
3976 if (((*yyvaluep).ast))
3977 {
3978 switch (PKL_AST_CODE (((*yyvaluep).ast)))
3979 {
3980 case PKL_AST_COMP_STMT:
3981 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3982 break;
3983 case PKL_AST_TYPE:
3984 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
3985 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
3986 break;
3987 case PKL_AST_FUNC:
3988 /* if (PKL_AST_FUNC_ARGS ($$))
3989 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
3990 break;
3991 default:
3992 break;
3993 }
3994 }
3995
3996 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
3997 }
3998 #line 3999 "pkl-tab.c"
3999 break;
4000
4001 case 180: /* struct_type_specifier */
4002 #line 344 "pkl-tab.y"
4003 {
4004 if (((*yyvaluep).ast))
4005 {
4006 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4007 {
4008 case PKL_AST_COMP_STMT:
4009 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4010 break;
4011 case PKL_AST_TYPE:
4012 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4013 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4014 break;
4015 case PKL_AST_FUNC:
4016 /* if (PKL_AST_FUNC_ARGS ($$))
4017 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4018 break;
4019 default:
4020 break;
4021 }
4022 }
4023
4024 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4025 }
4026 #line 4027 "pkl-tab.c"
4027 break;
4028
4029 case 184: /* integral_struct */
4030 #line 344 "pkl-tab.y"
4031 {
4032 if (((*yyvaluep).ast))
4033 {
4034 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4035 {
4036 case PKL_AST_COMP_STMT:
4037 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4038 break;
4039 case PKL_AST_TYPE:
4040 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4041 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4042 break;
4043 case PKL_AST_FUNC:
4044 /* if (PKL_AST_FUNC_ARGS ($$))
4045 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4046 break;
4047 default:
4048 break;
4049 }
4050 }
4051
4052 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4053 }
4054 #line 4055 "pkl-tab.c"
4055 break;
4056
4057 case 185: /* struct_type_elem_list */
4058 #line 344 "pkl-tab.y"
4059 {
4060 if (((*yyvaluep).ast))
4061 {
4062 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4063 {
4064 case PKL_AST_COMP_STMT:
4065 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4066 break;
4067 case PKL_AST_TYPE:
4068 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4069 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4070 break;
4071 case PKL_AST_FUNC:
4072 /* if (PKL_AST_FUNC_ARGS ($$))
4073 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4074 break;
4075 default:
4076 break;
4077 }
4078 }
4079
4080 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4081 }
4082 #line 4083 "pkl-tab.c"
4083 break;
4084
4085 case 187: /* struct_type_field */
4086 #line 344 "pkl-tab.y"
4087 {
4088 if (((*yyvaluep).ast))
4089 {
4090 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4091 {
4092 case PKL_AST_COMP_STMT:
4093 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4094 break;
4095 case PKL_AST_TYPE:
4096 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4097 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4098 break;
4099 case PKL_AST_FUNC:
4100 /* if (PKL_AST_FUNC_ARGS ($$))
4101 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4102 break;
4103 default:
4104 break;
4105 }
4106 }
4107
4108 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4109 }
4110 #line 4111 "pkl-tab.c"
4111 break;
4112
4113 case 189: /* struct_type_field_identifier */
4114 #line 344 "pkl-tab.y"
4115 {
4116 if (((*yyvaluep).ast))
4117 {
4118 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4119 {
4120 case PKL_AST_COMP_STMT:
4121 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4122 break;
4123 case PKL_AST_TYPE:
4124 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4125 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4126 break;
4127 case PKL_AST_FUNC:
4128 /* if (PKL_AST_FUNC_ARGS ($$))
4129 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4130 break;
4131 default:
4132 break;
4133 }
4134 }
4135
4136 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4137 }
4138 #line 4139 "pkl-tab.c"
4139 break;
4140
4141 case 190: /* struct_type_field_label */
4142 #line 344 "pkl-tab.y"
4143 {
4144 if (((*yyvaluep).ast))
4145 {
4146 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4147 {
4148 case PKL_AST_COMP_STMT:
4149 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4150 break;
4151 case PKL_AST_TYPE:
4152 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4153 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4154 break;
4155 case PKL_AST_FUNC:
4156 /* if (PKL_AST_FUNC_ARGS ($$))
4157 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4158 break;
4159 default:
4160 break;
4161 }
4162 }
4163
4164 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4165 }
4166 #line 4167 "pkl-tab.c"
4167 break;
4168
4169 case 191: /* struct_type_field_constraint_or_init */
4170 #line 344 "pkl-tab.y"
4171 {
4172 if (((*yyvaluep).ast))
4173 {
4174 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4175 {
4176 case PKL_AST_COMP_STMT:
4177 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4178 break;
4179 case PKL_AST_TYPE:
4180 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4181 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4182 break;
4183 case PKL_AST_FUNC:
4184 /* if (PKL_AST_FUNC_ARGS ($$))
4185 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4186 break;
4187 default:
4188 break;
4189 }
4190 }
4191
4192 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4193 }
4194 #line 4195 "pkl-tab.c"
4195 break;
4196
4197 case 192: /* struct_type_field_optcond */
4198 #line 344 "pkl-tab.y"
4199 {
4200 if (((*yyvaluep).ast))
4201 {
4202 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4203 {
4204 case PKL_AST_COMP_STMT:
4205 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4206 break;
4207 case PKL_AST_TYPE:
4208 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4209 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4210 break;
4211 case PKL_AST_FUNC:
4212 /* if (PKL_AST_FUNC_ARGS ($$))
4213 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4214 break;
4215 default:
4216 break;
4217 }
4218 }
4219
4220 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4221 }
4222 #line 4223 "pkl-tab.c"
4223 break;
4224
4225 case 193: /* simple_declaration */
4226 #line 344 "pkl-tab.y"
4227 {
4228 if (((*yyvaluep).ast))
4229 {
4230 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4231 {
4232 case PKL_AST_COMP_STMT:
4233 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4234 break;
4235 case PKL_AST_TYPE:
4236 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4237 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4238 break;
4239 case PKL_AST_FUNC:
4240 /* if (PKL_AST_FUNC_ARGS ($$))
4241 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4242 break;
4243 default:
4244 break;
4245 }
4246 }
4247
4248 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4249 }
4250 #line 4251 "pkl-tab.c"
4251 break;
4252
4253 case 194: /* declaration */
4254 #line 344 "pkl-tab.y"
4255 {
4256 if (((*yyvaluep).ast))
4257 {
4258 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4259 {
4260 case PKL_AST_COMP_STMT:
4261 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4262 break;
4263 case PKL_AST_TYPE:
4264 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4265 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4266 break;
4267 case PKL_AST_FUNC:
4268 /* if (PKL_AST_FUNC_ARGS ($$))
4269 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4270 break;
4271 default:
4272 break;
4273 }
4274 }
4275
4276 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4277 }
4278 #line 4279 "pkl-tab.c"
4279 break;
4280
4281 case 197: /* defvar_list */
4282 #line 344 "pkl-tab.y"
4283 {
4284 if (((*yyvaluep).ast))
4285 {
4286 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4287 {
4288 case PKL_AST_COMP_STMT:
4289 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4290 break;
4291 case PKL_AST_TYPE:
4292 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4293 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4294 break;
4295 case PKL_AST_FUNC:
4296 /* if (PKL_AST_FUNC_ARGS ($$))
4297 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4298 break;
4299 default:
4300 break;
4301 }
4302 }
4303
4304 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4305 }
4306 #line 4307 "pkl-tab.c"
4307 break;
4308
4309 case 198: /* defvar */
4310 #line 344 "pkl-tab.y"
4311 {
4312 if (((*yyvaluep).ast))
4313 {
4314 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4315 {
4316 case PKL_AST_COMP_STMT:
4317 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4318 break;
4319 case PKL_AST_TYPE:
4320 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4321 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4322 break;
4323 case PKL_AST_FUNC:
4324 /* if (PKL_AST_FUNC_ARGS ($$))
4325 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4326 break;
4327 default:
4328 break;
4329 }
4330 }
4331
4332 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4333 }
4334 #line 4335 "pkl-tab.c"
4335 break;
4336
4337 case 199: /* deftype_list */
4338 #line 344 "pkl-tab.y"
4339 {
4340 if (((*yyvaluep).ast))
4341 {
4342 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4343 {
4344 case PKL_AST_COMP_STMT:
4345 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4346 break;
4347 case PKL_AST_TYPE:
4348 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4349 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4350 break;
4351 case PKL_AST_FUNC:
4352 /* if (PKL_AST_FUNC_ARGS ($$))
4353 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4354 break;
4355 default:
4356 break;
4357 }
4358 }
4359
4360 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4361 }
4362 #line 4363 "pkl-tab.c"
4363 break;
4364
4365 case 200: /* deftype */
4366 #line 344 "pkl-tab.y"
4367 {
4368 if (((*yyvaluep).ast))
4369 {
4370 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4371 {
4372 case PKL_AST_COMP_STMT:
4373 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4374 break;
4375 case PKL_AST_TYPE:
4376 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4377 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4378 break;
4379 case PKL_AST_FUNC:
4380 /* if (PKL_AST_FUNC_ARGS ($$))
4381 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4382 break;
4383 default:
4384 break;
4385 }
4386 }
4387
4388 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4389 }
4390 #line 4391 "pkl-tab.c"
4391 break;
4392
4393 case 201: /* defunit_list */
4394 #line 344 "pkl-tab.y"
4395 {
4396 if (((*yyvaluep).ast))
4397 {
4398 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4399 {
4400 case PKL_AST_COMP_STMT:
4401 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4402 break;
4403 case PKL_AST_TYPE:
4404 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4405 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4406 break;
4407 case PKL_AST_FUNC:
4408 /* if (PKL_AST_FUNC_ARGS ($$))
4409 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4410 break;
4411 default:
4412 break;
4413 }
4414 }
4415
4416 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4417 }
4418 #line 4419 "pkl-tab.c"
4419 break;
4420
4421 case 202: /* defunit */
4422 #line 344 "pkl-tab.y"
4423 {
4424 if (((*yyvaluep).ast))
4425 {
4426 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4427 {
4428 case PKL_AST_COMP_STMT:
4429 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4430 break;
4431 case PKL_AST_TYPE:
4432 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4433 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4434 break;
4435 case PKL_AST_FUNC:
4436 /* if (PKL_AST_FUNC_ARGS ($$))
4437 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4438 break;
4439 default:
4440 break;
4441 }
4442 }
4443
4444 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4445 }
4446 #line 4447 "pkl-tab.c"
4447 break;
4448
4449 case 203: /* comp_stmt */
4450 #line 344 "pkl-tab.y"
4451 {
4452 if (((*yyvaluep).ast))
4453 {
4454 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4455 {
4456 case PKL_AST_COMP_STMT:
4457 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4458 break;
4459 case PKL_AST_TYPE:
4460 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4461 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4462 break;
4463 case PKL_AST_FUNC:
4464 /* if (PKL_AST_FUNC_ARGS ($$))
4465 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4466 break;
4467 default:
4468 break;
4469 }
4470 }
4471
4472 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4473 }
4474 #line 4475 "pkl-tab.c"
4475 break;
4476
4477 case 205: /* stmt_decl_list */
4478 #line 344 "pkl-tab.y"
4479 {
4480 if (((*yyvaluep).ast))
4481 {
4482 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4483 {
4484 case PKL_AST_COMP_STMT:
4485 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4486 break;
4487 case PKL_AST_TYPE:
4488 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4489 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4490 break;
4491 case PKL_AST_FUNC:
4492 /* if (PKL_AST_FUNC_ARGS ($$))
4493 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4494 break;
4495 default:
4496 break;
4497 }
4498 }
4499
4500 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4501 }
4502 #line 4503 "pkl-tab.c"
4503 break;
4504
4505 case 207: /* simple_stmt_list */
4506 #line 344 "pkl-tab.y"
4507 {
4508 if (((*yyvaluep).ast))
4509 {
4510 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4511 {
4512 case PKL_AST_COMP_STMT:
4513 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4514 break;
4515 case PKL_AST_TYPE:
4516 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4517 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4518 break;
4519 case PKL_AST_FUNC:
4520 /* if (PKL_AST_FUNC_ARGS ($$))
4521 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4522 break;
4523 default:
4524 break;
4525 }
4526 }
4527
4528 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4529 }
4530 #line 4531 "pkl-tab.c"
4531 break;
4532
4533 case 208: /* simple_stmt */
4534 #line 344 "pkl-tab.y"
4535 {
4536 if (((*yyvaluep).ast))
4537 {
4538 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4539 {
4540 case PKL_AST_COMP_STMT:
4541 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4542 break;
4543 case PKL_AST_TYPE:
4544 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4545 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4546 break;
4547 case PKL_AST_FUNC:
4548 /* if (PKL_AST_FUNC_ARGS ($$))
4549 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4550 break;
4551 default:
4552 break;
4553 }
4554 }
4555
4556 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4557 }
4558 #line 4559 "pkl-tab.c"
4559 break;
4560
4561 case 209: /* stmt */
4562 #line 344 "pkl-tab.y"
4563 {
4564 if (((*yyvaluep).ast))
4565 {
4566 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4567 {
4568 case PKL_AST_COMP_STMT:
4569 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4570 break;
4571 case PKL_AST_TYPE:
4572 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4573 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4574 break;
4575 case PKL_AST_FUNC:
4576 /* if (PKL_AST_FUNC_ARGS ($$))
4577 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4578 break;
4579 default:
4580 break;
4581 }
4582 }
4583
4584 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4585 }
4586 #line 4587 "pkl-tab.c"
4587 break;
4588
4589 case 212: /* print_stmt_arg_list */
4590 #line 344 "pkl-tab.y"
4591 {
4592 if (((*yyvaluep).ast))
4593 {
4594 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4595 {
4596 case PKL_AST_COMP_STMT:
4597 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4598 break;
4599 case PKL_AST_TYPE:
4600 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4601 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4602 break;
4603 case PKL_AST_FUNC:
4604 /* if (PKL_AST_FUNC_ARGS ($$))
4605 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4606 break;
4607 default:
4608 break;
4609 }
4610 }
4611
4612 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4613 }
4614 #line 4615 "pkl-tab.c"
4615 break;
4616
4617 case 213: /* funcall_stmt */
4618 #line 344 "pkl-tab.y"
4619 {
4620 if (((*yyvaluep).ast))
4621 {
4622 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4623 {
4624 case PKL_AST_COMP_STMT:
4625 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4626 break;
4627 case PKL_AST_TYPE:
4628 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4629 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4630 break;
4631 case PKL_AST_FUNC:
4632 /* if (PKL_AST_FUNC_ARGS ($$))
4633 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4634 break;
4635 default:
4636 break;
4637 }
4638 }
4639
4640 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4641 }
4642 #line 4643 "pkl-tab.c"
4643 break;
4644
4645 case 214: /* funcall_stmt_arg_list */
4646 #line 344 "pkl-tab.y"
4647 {
4648 if (((*yyvaluep).ast))
4649 {
4650 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4651 {
4652 case PKL_AST_COMP_STMT:
4653 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4654 break;
4655 case PKL_AST_TYPE:
4656 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4657 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4658 break;
4659 case PKL_AST_FUNC:
4660 /* if (PKL_AST_FUNC_ARGS ($$))
4661 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4662 break;
4663 default:
4664 break;
4665 }
4666 }
4667
4668 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4669 }
4670 #line 4671 "pkl-tab.c"
4671 break;
4672
4673 case 215: /* funcall_stmt_arg */
4674 #line 344 "pkl-tab.y"
4675 {
4676 if (((*yyvaluep).ast))
4677 {
4678 switch (PKL_AST_CODE (((*yyvaluep).ast)))
4679 {
4680 case PKL_AST_COMP_STMT:
4681 /* pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4682 break;
4683 case PKL_AST_TYPE:
4684 /* if (PKL_AST_TYPE_CODE ($$) == PKL_TYPE_STRUCT)
4685 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env); */
4686 break;
4687 case PKL_AST_FUNC:
4688 /* if (PKL_AST_FUNC_ARGS ($$))
4689 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);*/
4690 break;
4691 default:
4692 break;
4693 }
4694 }
4695
4696 ((*yyvaluep).ast) = ASTREF (((*yyvaluep).ast)); pkl_ast_node_free (((*yyvaluep).ast));
4697 }
4698 #line 4699 "pkl-tab.c"
4699 break;
4700
4701 default:
4702 break;
4703 }
4704 YY_IGNORE_MAYBE_UNINITIALIZED_END
4705 }
4706
4707
4708
4709
4710
4711
4712 /*----------.
4713 | yyparse. |
4714 `----------*/
4715
4716 int
yyparse(struct pkl_parser * pkl_parser)4717 yyparse (struct pkl_parser *pkl_parser)
4718 {
4719 /* The lookahead symbol. */
4720 int yychar;
4721
4722
4723 /* The semantic value of the lookahead symbol. */
4724 /* Default value used for initialization, for pacifying older GCCs
4725 or non-GCC compilers. */
4726 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
4727 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
4728
4729 /* Location data for the lookahead symbol. */
4730 static YYLTYPE yyloc_default
4731 # if defined PKL_TAB_LTYPE_IS_TRIVIAL && PKL_TAB_LTYPE_IS_TRIVIAL
4732 = { 1, 1, 1, 1 }
4733 # endif
4734 ;
4735 YYLTYPE yylloc = yyloc_default;
4736
4737 /* Number of syntax errors so far. */
4738 int yynerrs;
4739
4740 yy_state_fast_t yystate;
4741 /* Number of tokens to shift before error messages enabled. */
4742 int yyerrstatus;
4743
4744 /* The stacks and their tools:
4745 'yyss': related to states.
4746 'yyvs': related to semantic values.
4747 'yyls': related to locations.
4748
4749 Refer to the stacks through separate pointers, to allow yyoverflow
4750 to reallocate them elsewhere. */
4751
4752 /* Their size. */
4753 YYPTRDIFF_T yystacksize;
4754
4755 /* The state stack. */
4756 yy_state_t yyssa[YYINITDEPTH];
4757 yy_state_t *yyss;
4758 yy_state_t *yyssp;
4759
4760 /* The semantic value stack. */
4761 YYSTYPE yyvsa[YYINITDEPTH];
4762 YYSTYPE *yyvs;
4763 YYSTYPE *yyvsp;
4764
4765 /* The location stack. */
4766 YYLTYPE yylsa[YYINITDEPTH];
4767 YYLTYPE *yyls;
4768 YYLTYPE *yylsp;
4769
4770 yy_state_t yyesa[20];
4771 yy_state_t *yyes;
4772 YYPTRDIFF_T yyes_capacity;
4773
4774 /* Whether LAC context is established. A Boolean. */
4775 int yy_lac_established = 0;
4776 int yyn;
4777 /* The return value of yyparse. */
4778 int yyresult;
4779 /* Lookahead token as an internal (translated) token number. */
4780 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
4781 /* The variables used to return semantic value and location from the
4782 action routines. */
4783 YYSTYPE yyval;
4784 YYLTYPE yyloc;
4785
4786 /* The locations where the error started and ended. */
4787 YYLTYPE yyerror_range[3];
4788
4789
4790
4791 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
4792
4793 /* The number of symbols on the RHS of the reduced rule.
4794 Keep to zero when no symbol should be popped. */
4795 int yylen = 0;
4796
4797 yynerrs = 0;
4798 yystate = 0;
4799 yyerrstatus = 0;
4800
4801 yystacksize = YYINITDEPTH;
4802 yyssp = yyss = yyssa;
4803 yyvsp = yyvs = yyvsa;
4804 yylsp = yyls = yylsa;
4805
4806 yyes = yyesa;
4807 yyes_capacity = 20;
4808 if (YYMAXDEPTH < yyes_capacity)
4809 yyes_capacity = YYMAXDEPTH;
4810
4811
4812 YYDPRINTF ((stderr, "Starting parse\n"));
4813
4814 yychar = PKL_TAB_EMPTY; /* Cause a token to be read. */
4815
4816 /* User initialization code. */
4817 #line 30 "pkl-tab.y"
4818 {
4819 yylloc.first_line = yylloc.last_line = 1;
4820 yylloc.first_column = yylloc.last_column = 1;
4821 }
4822
4823 #line 4824 "pkl-tab.c"
4824
4825 yylsp[0] = yylloc;
4826 goto yysetstate;
4827
4828
4829 /*------------------------------------------------------------.
4830 | yynewstate -- push a new state, which is found in yystate. |
4831 `------------------------------------------------------------*/
4832 yynewstate:
4833 /* In all cases, when you get here, the value and location stacks
4834 have just been pushed. So pushing a state here evens the stacks. */
4835 yyssp++;
4836
4837
4838 /*--------------------------------------------------------------------.
4839 | yysetstate -- set current state (the top of the stack) to yystate. |
4840 `--------------------------------------------------------------------*/
4841 yysetstate:
4842 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4843 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
4844 YY_IGNORE_USELESS_CAST_BEGIN
4845 *yyssp = YY_CAST (yy_state_t, yystate);
4846 YY_IGNORE_USELESS_CAST_END
4847 YY_STACK_PRINT (yyss, yyssp);
4848
4849 if (yyss + yystacksize - 1 <= yyssp)
4850 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
4851 goto yyexhaustedlab;
4852 #else
4853 {
4854 /* Get the current used size of the three stacks, in elements. */
4855 YYPTRDIFF_T yysize = yyssp - yyss + 1;
4856
4857 # if defined yyoverflow
4858 {
4859 /* Give user a chance to reallocate the stack. Use copies of
4860 these so that the &'s don't force the real ones into
4861 memory. */
4862 yy_state_t *yyss1 = yyss;
4863 YYSTYPE *yyvs1 = yyvs;
4864 YYLTYPE *yyls1 = yyls;
4865
4866 /* Each stack pointer address is followed by the size of the
4867 data in use in that stack, in bytes. This used to be a
4868 conditional around just the two extra args, but that might
4869 be undefined if yyoverflow is a macro. */
4870 yyoverflow (YY_("memory exhausted"),
4871 &yyss1, yysize * YYSIZEOF (*yyssp),
4872 &yyvs1, yysize * YYSIZEOF (*yyvsp),
4873 &yyls1, yysize * YYSIZEOF (*yylsp),
4874 &yystacksize);
4875 yyss = yyss1;
4876 yyvs = yyvs1;
4877 yyls = yyls1;
4878 }
4879 # else /* defined YYSTACK_RELOCATE */
4880 /* Extend the stack our own way. */
4881 if (YYMAXDEPTH <= yystacksize)
4882 goto yyexhaustedlab;
4883 yystacksize *= 2;
4884 if (YYMAXDEPTH < yystacksize)
4885 yystacksize = YYMAXDEPTH;
4886
4887 {
4888 yy_state_t *yyss1 = yyss;
4889 union yyalloc *yyptr =
4890 YY_CAST (union yyalloc *,
4891 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
4892 if (! yyptr)
4893 goto yyexhaustedlab;
4894 YYSTACK_RELOCATE (yyss_alloc, yyss);
4895 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4896 YYSTACK_RELOCATE (yyls_alloc, yyls);
4897 # undef YYSTACK_RELOCATE
4898 if (yyss1 != yyssa)
4899 YYSTACK_FREE (yyss1);
4900 }
4901 # endif
4902
4903 yyssp = yyss + yysize - 1;
4904 yyvsp = yyvs + yysize - 1;
4905 yylsp = yyls + yysize - 1;
4906
4907 YY_IGNORE_USELESS_CAST_BEGIN
4908 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
4909 YY_CAST (long, yystacksize)));
4910 YY_IGNORE_USELESS_CAST_END
4911
4912 if (yyss + yystacksize - 1 <= yyssp)
4913 YYABORT;
4914 }
4915 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
4916
4917 if (yystate == YYFINAL)
4918 YYACCEPT;
4919
4920 goto yybackup;
4921
4922
4923 /*-----------.
4924 | yybackup. |
4925 `-----------*/
4926 yybackup:
4927 /* Do appropriate processing given the current state. Read a
4928 lookahead token if we need one and don't already have one. */
4929
4930 /* First try to decide what to do without reference to lookahead token. */
4931 yyn = yypact[yystate];
4932 if (yypact_value_is_default (yyn))
4933 goto yydefault;
4934
4935 /* Not known => get a lookahead token if don't already have one. */
4936
4937 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
4938 if (yychar == PKL_TAB_EMPTY)
4939 {
4940 YYDPRINTF ((stderr, "Reading a token\n"));
4941 yychar = yylex (&yylval, &yylloc, scanner);
4942 }
4943
4944 if (yychar <= PKL_TAB_EOF)
4945 {
4946 yychar = PKL_TAB_EOF;
4947 yytoken = YYSYMBOL_YYEOF;
4948 YYDPRINTF ((stderr, "Now at end of input.\n"));
4949 }
4950 else if (yychar == PKL_TAB_error)
4951 {
4952 /* The scanner already issued an error message, process directly
4953 to error recovery. But do not keep the error token as
4954 lookahead, it is too special and may lead us to an endless
4955 loop in error recovery. */
4956 yychar = PKL_TAB_UNDEF;
4957 yytoken = YYSYMBOL_YYerror;
4958 yyerror_range[1] = yylloc;
4959 goto yyerrlab1;
4960 }
4961 else
4962 {
4963 yytoken = YYTRANSLATE (yychar);
4964 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4965 }
4966
4967 /* If the proper action on seeing token YYTOKEN is to reduce or to
4968 detect an error, take that action. */
4969 yyn += yytoken;
4970 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4971 {
4972 YY_LAC_ESTABLISH;
4973 goto yydefault;
4974 }
4975 yyn = yytable[yyn];
4976 if (yyn <= 0)
4977 {
4978 if (yytable_value_is_error (yyn))
4979 goto yyerrlab;
4980 YY_LAC_ESTABLISH;
4981 yyn = -yyn;
4982 goto yyreduce;
4983 }
4984
4985 /* Count tokens shifted since error; after three, turn off error
4986 status. */
4987 if (yyerrstatus)
4988 yyerrstatus--;
4989
4990 /* Shift the lookahead token. */
4991 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4992 yystate = yyn;
4993 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4994 *++yyvsp = yylval;
4995 YY_IGNORE_MAYBE_UNINITIALIZED_END
4996 *++yylsp = yylloc;
4997
4998 /* Discard the shifted token. */
4999 yychar = PKL_TAB_EMPTY;
5000 YY_LAC_DISCARD ("shift");
5001 goto yynewstate;
5002
5003
5004 /*-----------------------------------------------------------.
5005 | yydefault -- do the default action for the current state. |
5006 `-----------------------------------------------------------*/
5007 yydefault:
5008 yyn = yydefact[yystate];
5009 if (yyn == 0)
5010 goto yyerrlab;
5011 goto yyreduce;
5012
5013
5014 /*-----------------------------.
5015 | yyreduce -- do a reduction. |
5016 `-----------------------------*/
5017 yyreduce:
5018 /* yyn is the number of a rule to reduce with. */
5019 yylen = yyr2[yyn];
5020
5021 /* If YYLEN is nonzero, implement the default value of the action:
5022 '$$ = $1'.
5023
5024 Otherwise, the following line sets YYVAL to garbage.
5025 This behavior is undocumented and Bison
5026 users should not rely upon it. Assigning to YYVAL
5027 unconditionally makes the parser a bit smaller, and it avoids a
5028 GCC warning that YYVAL may be used uninitialized. */
5029 yyval = yyvsp[1-yylen];
5030
5031 /* Default location. */
5032 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
5033 yyerror_range[1] = yyloc;
5034 YY_REDUCE_PRINT (yyn);
5035 {
5036 int yychar_backup = yychar;
5037 switch (yyn)
5038 {
5039 case 2:
5040 #line 549 "pkl-tab.y"
5041 {
5042 pkl_parser->env = pkl_env_push_frame (pkl_parser->env);
5043 }
5044 #line 5045 "pkl-tab.c"
5045 break;
5046
5047 case 3:
5048 #line 564 "pkl-tab.y"
5049 {
5050 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[0].ast));
5051 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5052 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5053 }
5054 #line 5055 "pkl-tab.c"
5055 break;
5056
5057 case 4:
5058 #line 570 "pkl-tab.y"
5059 {
5060 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[-1].ast));
5061 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5062 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5063 YYACCEPT;
5064 }
5065 #line 5066 "pkl-tab.c"
5066 break;
5067
5068 case 5:
5069 #line 577 "pkl-tab.y"
5070 {
5071 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[0].ast));
5072 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5073 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5074 }
5075 #line 5076 "pkl-tab.c"
5076 break;
5077
5078 case 6:
5079 #line 583 "pkl-tab.y"
5080 {
5081 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[-1].ast));
5082 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5083 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5084 }
5085 #line 5086 "pkl-tab.c"
5086 break;
5087
5088 case 7:
5089 #line 589 "pkl-tab.y"
5090 {
5091 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[0].ast));
5092 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5093 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5094 }
5095 #line 5096 "pkl-tab.c"
5096 break;
5097
5098 case 8:
5099 #line 595 "pkl-tab.y"
5100 {
5101 /* This rule is to allow the presence of an extra
5102 ';' after the sentence. This to allow the poke
5103 command manager to ease the handling of
5104 semicolons in the command line. */
5105 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[-1].ast));
5106 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5107 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5108 }
5109 #line 5110 "pkl-tab.c"
5110 break;
5111
5112 case 9:
5113 #line 605 "pkl-tab.y"
5114 {
5115 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[0].ast));
5116 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5117 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5118 }
5119 #line 5120 "pkl-tab.c"
5120 break;
5121
5122 case 10:
5123 #line 611 "pkl-tab.y"
5124 {
5125 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[-1].ast));
5126 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5127 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5128 }
5129 #line 5130 "pkl-tab.c"
5130 break;
5131
5132 case 11:
5133 #line 617 "pkl-tab.y"
5134 {
5135 (yyval.ast) = pkl_ast_make_program (pkl_parser->ast, (yyvsp[0].ast));
5136 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5137 pkl_parser->ast->ast = ASTREF ((yyval.ast));
5138 }
5139 #line 5140 "pkl-tab.c"
5140 break;
5141
5142 case 12:
5143 #line 626 "pkl-tab.y"
5144 {
5145 (yyval.ast) = NULL;
5146 }
5147 #line 5148 "pkl-tab.c"
5148 break;
5149
5150 case 15:
5151 #line 635 "pkl-tab.y"
5152 {
5153 if ((yyvsp[0].ast) != NULL)
5154 (yyval.ast) = pkl_ast_chainon ((yyvsp[-1].ast), (yyvsp[0].ast));
5155 else
5156 (yyval.ast) = (yyvsp[-1].ast);
5157 }
5158 #line 5159 "pkl-tab.c"
5159 break;
5160
5161 case 19:
5162 #line 651 "pkl-tab.y"
5163 {
5164 char *filename = NULL;
5165 int ret = load_module (pkl_parser,
5166 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-1].ast)),
5167 &(yyval.ast), 0 /* filename_p */, &filename);
5168 if (ret == 2)
5169 /* The sub-parser should have emitted proper error
5170 messages. No need to be verbose here. */
5171 YYERROR;
5172 else if (ret == 1)
5173 {
5174 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[-1]),
5175 "cannot load `%s'",
5176 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-1].ast)));
5177 YYERROR;
5178 }
5179
5180 /* Prepend and append SRC nodes to handle the change of
5181 source files. */
5182 {
5183 pkl_ast_node src1 = pkl_ast_make_src (pkl_parser->ast,
5184 filename);
5185 pkl_ast_node src2 = pkl_ast_make_src (pkl_parser->ast,
5186 pkl_parser->filename);
5187
5188 (yyval.ast) = pkl_ast_chainon (src1, (yyval.ast));
5189 (yyval.ast) = pkl_ast_chainon ((yyval.ast), src2);
5190 }
5191
5192 (yyvsp[-1].ast) = ASTREF ((yyvsp[-1].ast));
5193 pkl_ast_node_free ((yyvsp[-1].ast));
5194 free (filename);
5195 }
5196 #line 5197 "pkl-tab.c"
5197 break;
5198
5199 case 20:
5200 #line 685 "pkl-tab.y"
5201 {
5202 char *filename = PKL_AST_STRING_POINTER ((yyvsp[-1].ast));
5203 int ret = load_module (pkl_parser,
5204 filename,
5205 &(yyval.ast), 1 /* filename_p */, NULL);
5206 if (ret == 2)
5207 /* The sub-parser should have emitted proper error
5208 messages. No need to be verbose here. */
5209 YYERROR;
5210 else if (ret == 1)
5211 {
5212 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[-1]),
5213 "cannot load module from file `%s'",
5214 filename);
5215 YYERROR;
5216 }
5217
5218 /* Prepend and append SRC nodes to handle the change of
5219 source files. */
5220 {
5221 pkl_ast_node src1 = pkl_ast_make_src (pkl_parser->ast,
5222 filename);
5223 pkl_ast_node src2 = pkl_ast_make_src (pkl_parser->ast,
5224 pkl_parser->filename);
5225
5226 (yyval.ast) = pkl_ast_chainon (src1, (yyval.ast));
5227 (yyval.ast) = pkl_ast_chainon ((yyval.ast), src2);
5228 }
5229
5230 (yyvsp[-1].ast) = ASTREF ((yyvsp[-1].ast));
5231 pkl_ast_node_free ((yyvsp[-1].ast));
5232 }
5233 #line 5234 "pkl-tab.c"
5234 break;
5235
5236 case 23:
5237 #line 734 "pkl-tab.y"
5238 { (yyval.ast) = NULL; }
5239 #line 5240 "pkl-tab.c"
5240 break;
5241
5242 case 25:
5243 #line 737 "pkl-tab.y"
5244 {
5245 (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast));
5246 }
5247 #line 5248 "pkl-tab.c"
5248 break;
5249
5250 case 26:
5251 #line 743 "pkl-tab.y"
5252 { (yyval.ast) = NULL; }
5253 #line 5254 "pkl-tab.c"
5254 break;
5255
5256 case 29:
5257 #line 750 "pkl-tab.y"
5258 {
5259 (yyval.ast) = pkl_ast_make_unary_exp (pkl_parser->ast,
5260 (yyvsp[-1].opcode), (yyvsp[0].ast));
5261 PKL_AST_LOC ((yyval.ast)) = (yylsp[-1]);
5262 }
5263 #line 5264 "pkl-tab.c"
5264 break;
5265
5266 case 30:
5267 #line 756 "pkl-tab.y"
5268 {
5269 (yyval.ast) = pkl_ast_make_unary_exp (pkl_parser->ast, PKL_AST_OP_SIZEOF, (yyvsp[-1].ast));
5270 PKL_AST_LOC ((yyval.ast)) = (yylsp[-3]);
5271 }
5272 #line 5273 "pkl-tab.c"
5273 break;
5274
5275 case 31:
5276 #line 761 "pkl-tab.y"
5277 {
5278 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_ATTR,
5279 (yyvsp[-1].ast), (yyvsp[0].ast));
5280 PKL_AST_LOC ((yyvsp[0].ast)) = (yylsp[0]);
5281 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5282 }
5283 #line 5284 "pkl-tab.c"
5284 break;
5285
5286 case 32:
5287 #line 768 "pkl-tab.y"
5288 {
5289 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_ADD,
5290 (yyvsp[-2].ast), (yyvsp[0].ast));
5291 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5292 }
5293 #line 5294 "pkl-tab.c"
5294 break;
5295
5296 case 33:
5297 #line 774 "pkl-tab.y"
5298 {
5299 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_SUB,
5300 (yyvsp[-2].ast), (yyvsp[0].ast));
5301 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5302 }
5303 #line 5304 "pkl-tab.c"
5304 break;
5305
5306 case 34:
5307 #line 780 "pkl-tab.y"
5308 {
5309 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_MUL,
5310 (yyvsp[-2].ast), (yyvsp[0].ast));
5311 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5312 }
5313 #line 5314 "pkl-tab.c"
5314 break;
5315
5316 case 35:
5317 #line 786 "pkl-tab.y"
5318 {
5319 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_DIV,
5320 (yyvsp[-2].ast), (yyvsp[0].ast));
5321 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5322 }
5323 #line 5324 "pkl-tab.c"
5324 break;
5325
5326 case 36:
5327 #line 792 "pkl-tab.y"
5328 {
5329 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_CEILDIV, (yyvsp[-2].ast), (yyvsp[0].ast));
5330 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5331 }
5332 #line 5333 "pkl-tab.c"
5333 break;
5334
5335 case 37:
5336 #line 797 "pkl-tab.y"
5337 {
5338 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_POW, (yyvsp[-2].ast), (yyvsp[0].ast));
5339 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5340 }
5341 #line 5342 "pkl-tab.c"
5342 break;
5343
5344 case 38:
5345 #line 802 "pkl-tab.y"
5346 {
5347 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_MOD,
5348 (yyvsp[-2].ast), (yyvsp[0].ast));
5349 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5350 }
5351 #line 5352 "pkl-tab.c"
5352 break;
5353
5354 case 39:
5355 #line 808 "pkl-tab.y"
5356 {
5357 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_SL,
5358 (yyvsp[-2].ast), (yyvsp[0].ast));
5359 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5360 }
5361 #line 5362 "pkl-tab.c"
5362 break;
5363
5364 case 40:
5365 #line 814 "pkl-tab.y"
5366 {
5367 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_SR,
5368 (yyvsp[-2].ast), (yyvsp[0].ast));
5369 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5370 }
5371 #line 5372 "pkl-tab.c"
5372 break;
5373
5374 case 41:
5375 #line 820 "pkl-tab.y"
5376 {
5377 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_EQ,
5378 (yyvsp[-2].ast), (yyvsp[0].ast));
5379 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5380 }
5381 #line 5382 "pkl-tab.c"
5382 break;
5383
5384 case 42:
5385 #line 826 "pkl-tab.y"
5386 {
5387 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_NE,
5388 (yyvsp[-2].ast), (yyvsp[0].ast));
5389 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5390 }
5391 #line 5392 "pkl-tab.c"
5392 break;
5393
5394 case 43:
5395 #line 832 "pkl-tab.y"
5396 {
5397 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_LT,
5398 (yyvsp[-2].ast), (yyvsp[0].ast));
5399 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5400 }
5401 #line 5402 "pkl-tab.c"
5402 break;
5403
5404 case 44:
5405 #line 838 "pkl-tab.y"
5406 {
5407 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_GT,
5408 (yyvsp[-2].ast), (yyvsp[0].ast));
5409 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5410 }
5411 #line 5412 "pkl-tab.c"
5412 break;
5413
5414 case 45:
5415 #line 844 "pkl-tab.y"
5416 {
5417 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_LE,
5418 (yyvsp[-2].ast), (yyvsp[0].ast));
5419 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5420 }
5421 #line 5422 "pkl-tab.c"
5422 break;
5423
5424 case 46:
5425 #line 850 "pkl-tab.y"
5426 {
5427 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_GE,
5428 (yyvsp[-2].ast), (yyvsp[0].ast));
5429 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5430 }
5431 #line 5432 "pkl-tab.c"
5432 break;
5433
5434 case 47:
5435 #line 856 "pkl-tab.y"
5436 {
5437 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_IOR,
5438 (yyvsp[-2].ast), (yyvsp[0].ast));
5439 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5440 }
5441 #line 5442 "pkl-tab.c"
5442 break;
5443
5444 case 48:
5445 #line 862 "pkl-tab.y"
5446 {
5447 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_XOR,
5448 (yyvsp[-2].ast), (yyvsp[0].ast));
5449 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5450 }
5451 #line 5452 "pkl-tab.c"
5452 break;
5453
5454 case 49:
5455 #line 868 "pkl-tab.y"
5456 {
5457 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_BAND,
5458 (yyvsp[-2].ast), (yyvsp[0].ast));
5459 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5460 }
5461 #line 5462 "pkl-tab.c"
5462 break;
5463
5464 case 50:
5465 #line 874 "pkl-tab.y"
5466 {
5467 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_AND,
5468 (yyvsp[-2].ast), (yyvsp[0].ast));
5469 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5470 }
5471 #line 5472 "pkl-tab.c"
5472 break;
5473
5474 case 51:
5475 #line 880 "pkl-tab.y"
5476 {
5477 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_OR,
5478 (yyvsp[-2].ast), (yyvsp[0].ast));
5479 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5480 }
5481 #line 5482 "pkl-tab.c"
5482 break;
5483
5484 case 52:
5485 #line 886 "pkl-tab.y"
5486 {
5487 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_IN,
5488 (yyvsp[-2].ast), (yyvsp[0].ast));
5489 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5490 }
5491 #line 5492 "pkl-tab.c"
5492 break;
5493
5494 case 53:
5495 #line 892 "pkl-tab.y"
5496 {
5497 (yyval.ast) = pkl_ast_make_cast (pkl_parser->ast, (yyvsp[0].ast), (yyvsp[-2].ast));
5498 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5499 }
5500 #line 5501 "pkl-tab.c"
5501 break;
5502
5503 case 54:
5504 #line 897 "pkl-tab.y"
5505 {
5506 (yyval.ast) = pkl_ast_make_isa (pkl_parser->ast, (yyvsp[0].ast), (yyvsp[-2].ast));
5507 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5508 }
5509 #line 5510 "pkl-tab.c"
5510 break;
5511
5512 case 55:
5513 #line 902 "pkl-tab.y"
5514 {
5515 (yyval.ast) = pkl_ast_make_cond_exp (pkl_parser->ast,
5516 (yyvsp[-4].ast), (yyvsp[-2].ast), (yyvsp[0].ast));
5517 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5518 }
5519 #line 5520 "pkl-tab.c"
5520 break;
5521
5522 case 56:
5523 #line 908 "pkl-tab.y"
5524 {
5525 /* This syntax is only used for array
5526 constructors. */
5527 if (PKL_AST_TYPE_CODE ((yyvsp[-4].ast)) != PKL_TYPE_ARRAY)
5528 {
5529 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[-4]),
5530 "expected array type in constructor");
5531 YYERROR;
5532 }
5533
5534 (yyval.ast) = pkl_ast_make_cons (pkl_parser->ast, (yyvsp[-4].ast), (yyvsp[-2].ast));
5535 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5536 }
5537 #line 5538 "pkl-tab.c"
5538 break;
5539
5540 case 57:
5541 #line 922 "pkl-tab.y"
5542 {
5543 pkl_ast_node astruct;
5544
5545 /* This syntax is only used for struct
5546 constructors. */
5547 if (PKL_AST_TYPE_CODE ((yyvsp[-4].ast)) != PKL_TYPE_STRUCT)
5548 {
5549 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[-4]),
5550 "expected struct type in constructor");
5551 YYERROR;
5552 }
5553
5554 astruct = pkl_ast_make_struct (pkl_parser->ast,
5555 0 /* nelem */, (yyvsp[-2].ast));
5556 PKL_AST_LOC (astruct) = (yyloc);
5557
5558 (yyval.ast) = pkl_ast_make_cons (pkl_parser->ast, (yyvsp[-4].ast), astruct);
5559 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5560 }
5561 #line 5562 "pkl-tab.c"
5562 break;
5563
5564 case 58:
5565 #line 942 "pkl-tab.y"
5566 {
5567 if ((yyvsp[0].ast) == NULL)
5568 {
5569 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[0]),
5570 "invalid unit in offset");
5571 YYERROR;
5572 }
5573
5574 (yyval.ast) = pkl_ast_make_offset (pkl_parser->ast, NULL, (yyvsp[0].ast));
5575 PKL_AST_LOC ((yyvsp[0].ast)) = (yylsp[0]);
5576 if (PKL_AST_TYPE ((yyvsp[0].ast)))
5577 PKL_AST_LOC (PKL_AST_TYPE ((yyvsp[0].ast))) = (yylsp[0]);
5578 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5579 }
5580 #line 5581 "pkl-tab.c"
5581 break;
5582
5583 case 59:
5584 #line 957 "pkl-tab.y"
5585 {
5586 if ((yyvsp[0].ast) == NULL)
5587 {
5588 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[0]),
5589 "invalid unit in offset");
5590 YYERROR;
5591 }
5592
5593 (yyval.ast) = pkl_ast_make_offset (pkl_parser->ast, (yyvsp[-1].ast), (yyvsp[0].ast));
5594 PKL_AST_LOC ((yyvsp[0].ast)) = (yylsp[0]);
5595 if (PKL_AST_TYPE ((yyvsp[0].ast)))
5596 PKL_AST_LOC (PKL_AST_TYPE ((yyvsp[0].ast))) = (yylsp[0]);
5597 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5598 }
5599 #line 5600 "pkl-tab.c"
5600 break;
5601
5602 case 60:
5603 #line 972 "pkl-tab.y"
5604 {
5605 (yyval.ast) = pkl_ast_make_incrdecr (pkl_parser->ast, (yyvsp[0].ast),
5606 PKL_AST_ORDER_PRE, PKL_AST_SIGN_INCR);
5607 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5608 }
5609 #line 5610 "pkl-tab.c"
5610 break;
5611
5612 case 61:
5613 #line 978 "pkl-tab.y"
5614 {
5615 (yyval.ast) = pkl_ast_make_incrdecr (pkl_parser->ast, (yyvsp[0].ast),
5616 PKL_AST_ORDER_PRE, PKL_AST_SIGN_DECR);
5617 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5618 }
5619 #line 5620 "pkl-tab.c"
5620 break;
5621
5622 case 64:
5623 #line 989 "pkl-tab.y"
5624 {
5625 (yyval.ast) = pkl_ast_make_binary_exp (pkl_parser->ast, PKL_AST_OP_BCONC,
5626 (yyvsp[-2].ast), (yyvsp[0].ast));
5627 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5628 }
5629 #line 5630 "pkl-tab.c"
5630 break;
5631
5632 case 65:
5633 #line 997 "pkl-tab.y"
5634 { (yyval.integer) = 1; }
5635 #line 5636 "pkl-tab.c"
5636 break;
5637
5638 case 66:
5639 #line 998 "pkl-tab.y"
5640 { (yyval.integer) = 0; }
5641 #line 5642 "pkl-tab.c"
5642 break;
5643
5644 case 67:
5645 #line 1003 "pkl-tab.y"
5646 {
5647 (yyval.ast) = pkl_ast_make_map (pkl_parser->ast, (yyvsp[-1].integer),
5648 (yyvsp[-2].ast), NULL, (yyvsp[0].ast));
5649 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5650 }
5651 #line 5652 "pkl-tab.c"
5652 break;
5653
5654 case 68:
5655 #line 1009 "pkl-tab.y"
5656 {
5657 (yyval.ast) = pkl_ast_make_map (pkl_parser->ast, (yyvsp[-3].integer),
5658 (yyvsp[-4].ast), (yyvsp[-2].ast), (yyvsp[0].ast));
5659 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5660 }
5661 #line 5662 "pkl-tab.c"
5662 break;
5663
5664 case 69:
5665 #line 1017 "pkl-tab.y"
5666 { (yyval.opcode) = PKL_AST_OP_NEG; }
5667 #line 5668 "pkl-tab.c"
5668 break;
5669
5670 case 70:
5671 #line 1018 "pkl-tab.y"
5672 { (yyval.opcode) = PKL_AST_OP_POS; }
5673 #line 5674 "pkl-tab.c"
5674 break;
5675
5676 case 71:
5677 #line 1019 "pkl-tab.y"
5678 { (yyval.opcode) = PKL_AST_OP_BNOT; }
5679 #line 5680 "pkl-tab.c"
5680 break;
5681
5682 case 72:
5683 #line 1020 "pkl-tab.y"
5684 { (yyval.opcode) = PKL_AST_OP_NOT; }
5685 #line 5686 "pkl-tab.c"
5686 break;
5687
5688 case 73:
5689 #line 1021 "pkl-tab.y"
5690 { (yyval.opcode) = PKL_AST_OP_UNMAP; }
5691 #line 5692 "pkl-tab.c"
5692 break;
5693
5694 case 74:
5695 #line 1026 "pkl-tab.y"
5696 {
5697 /* Search for a variable definition in the
5698 compile-time environment, and create a
5699 PKL_AST_VAR node with it's lexical environment,
5700 annotated with its initialization. */
5701
5702 int back, over;
5703 const char *name = PKL_AST_IDENTIFIER_POINTER ((yyvsp[0].ast));
5704
5705 pkl_ast_node decl
5706 = pkl_env_lookup (pkl_parser->env,
5707 PKL_ENV_NS_MAIN,
5708 name, &back, &over);
5709 if (!decl
5710 || (PKL_AST_DECL_KIND (decl) != PKL_AST_DECL_KIND_VAR
5711 && PKL_AST_DECL_KIND (decl) != PKL_AST_DECL_KIND_FUNC))
5712 {
5713 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[0]),
5714 "undefined variable '%s'", name);
5715 YYERROR;
5716 }
5717
5718 (yyval.ast) = pkl_ast_make_var (pkl_parser->ast,
5719 (yyvsp[0].ast), /* name. */
5720 decl,
5721 back, over);
5722 PKL_AST_LOC ((yyval.ast)) = (yylsp[0]);
5723 }
5724 #line 5725 "pkl-tab.c"
5725 break;
5726
5727 case 75:
5728 #line 1055 "pkl-tab.y"
5729 {
5730 (yyval.ast) = (yyvsp[0].ast);
5731 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5732 PKL_AST_LOC (PKL_AST_TYPE ((yyval.ast))) = (yyloc);
5733 }
5734 #line 5735 "pkl-tab.c"
5735 break;
5736
5737 case 76:
5738 #line 1061 "pkl-tab.y"
5739 {
5740 (yyval.ast) = NULL; /* To avoid bison warning. */
5741 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[0]),
5742 "integer literal is too big");
5743 YYERROR;
5744 }
5745 #line 5746 "pkl-tab.c"
5746 break;
5747
5748 case 77:
5749 #line 1068 "pkl-tab.y"
5750 {
5751 (yyval.ast) = (yyvsp[0].ast);
5752 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5753 PKL_AST_LOC (PKL_AST_TYPE ((yyval.ast))) = (yyloc);
5754 }
5755 #line 5756 "pkl-tab.c"
5756 break;
5757
5758 case 78:
5759 #line 1074 "pkl-tab.y"
5760 {
5761 (yyval.ast) = (yyvsp[0].ast);
5762 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5763 PKL_AST_LOC (PKL_AST_TYPE ((yyval.ast))) = (yyloc);
5764 }
5765 #line 5766 "pkl-tab.c"
5766 break;
5767
5768 case 79:
5769 #line 1080 "pkl-tab.y"
5770 {
5771 if (PKL_AST_CODE ((yyvsp[-1].ast)) == PKL_AST_VAR)
5772 PKL_AST_VAR_IS_PARENTHESIZED ((yyvsp[-1].ast)) = 1;
5773 else if (PKL_AST_CODE ((yyvsp[-1].ast)) == PKL_AST_STRUCT_REF)
5774 PKL_AST_STRUCT_REF_IS_PARENTHESIZED ((yyvsp[-1].ast)) = 1;
5775 (yyval.ast) = (yyvsp[-1].ast);
5776 }
5777 #line 5778 "pkl-tab.c"
5778 break;
5779
5780 case 81:
5781 #line 1089 "pkl-tab.y"
5782 {
5783 (yyval.ast) = pkl_ast_make_struct_ref (pkl_parser->ast, (yyvsp[-2].ast), (yyvsp[0].ast));
5784 PKL_AST_LOC ((yyvsp[0].ast)) = (yylsp[0]);
5785 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5786 }
5787 #line 5788 "pkl-tab.c"
5788 break;
5789
5790 case 82:
5791 #line 1095 "pkl-tab.y"
5792 {
5793 (yyval.ast) = pkl_ast_make_indexer (pkl_parser->ast, (yyvsp[-3].ast), (yyvsp[-1].ast));
5794 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5795 }
5796 #line 5797 "pkl-tab.c"
5797 break;
5798
5799 case 83:
5800 #line 1100 "pkl-tab.y"
5801 {
5802 (yyval.ast) = pkl_ast_make_trimmer (pkl_parser->ast,
5803 (yyvsp[-5].ast), (yyvsp[-3].ast), NULL, (yyvsp[-1].ast));
5804 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5805 }
5806 #line 5807 "pkl-tab.c"
5807 break;
5808
5809 case 84:
5810 #line 1106 "pkl-tab.y"
5811 {
5812 (yyval.ast) = pkl_ast_make_trimmer (pkl_parser->ast,
5813 (yyvsp[-5].ast), (yyvsp[-3].ast), (yyvsp[-1].ast), NULL);
5814 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5815 }
5816 #line 5817 "pkl-tab.c"
5817 break;
5818
5819 case 85:
5820 #line 1112 "pkl-tab.y"
5821 {
5822 (yyval.ast) = pkl_ast_make_trimmer (pkl_parser->ast,
5823 (yyvsp[-3].ast), NULL, NULL, NULL);
5824 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5825 }
5826 #line 5827 "pkl-tab.c"
5827 break;
5828
5829 case 86:
5830 #line 1118 "pkl-tab.y"
5831 {
5832 (yyval.ast) = pkl_ast_make_trimmer (pkl_parser->ast,
5833 (yyvsp[-4].ast), NULL, (yyvsp[-1].ast), NULL);
5834 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5835 }
5836 #line 5837 "pkl-tab.c"
5837 break;
5838
5839 case 87:
5840 #line 1124 "pkl-tab.y"
5841 {
5842 (yyval.ast) = pkl_ast_make_trimmer (pkl_parser->ast,
5843 (yyvsp[-4].ast), (yyvsp[-2].ast), NULL, NULL);
5844 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5845 }
5846 #line 5847 "pkl-tab.c"
5847 break;
5848
5849 case 89:
5850 #line 1131 "pkl-tab.y"
5851 {
5852 (yyval.ast) = (yyvsp[-1].ast);
5853 }
5854 #line 5855 "pkl-tab.c"
5855 break;
5856
5857 case 90:
5858 #line 1135 "pkl-tab.y"
5859 {
5860 /* function_specifier needs to know whether we are
5861 in a function declaration or a method
5862 declaration. */
5863 pkl_parser->in_method_decl_p = 0;
5864 }
5865 #line 5866 "pkl-tab.c"
5866 break;
5867
5868 case 91:
5869 #line 1142 "pkl-tab.y"
5870 {
5871 /* Annotate the contained RETURN statements with
5872 their function and their lexical nest level
5873 within the function. */
5874 pkl_ast_finish_returns ((yyvsp[0].ast));
5875 (yyval.ast) = pkl_ast_make_lambda (pkl_parser->ast, (yyvsp[0].ast));
5876 }
5877 #line 5878 "pkl-tab.c"
5878 break;
5879
5880 case 92:
5881 #line 1150 "pkl-tab.y"
5882 {
5883 (yyval.ast) = pkl_ast_make_incrdecr (pkl_parser->ast, (yyvsp[-1].ast),
5884 PKL_AST_ORDER_POST, PKL_AST_SIGN_INCR);
5885 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5886 }
5887 #line 5888 "pkl-tab.c"
5888 break;
5889
5890 case 93:
5891 #line 1156 "pkl-tab.y"
5892 {
5893 (yyval.ast) = pkl_ast_make_incrdecr (pkl_parser->ast, (yyvsp[-1].ast),
5894 PKL_AST_ORDER_POST, PKL_AST_SIGN_DECR);
5895 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5896 }
5897 #line 5898 "pkl-tab.c"
5898 break;
5899
5900 case 94:
5901 #line 1165 "pkl-tab.y"
5902 {
5903 (yyval.ast) = pkl_ast_make_funcall (pkl_parser->ast,
5904 (yyvsp[-3].ast), (yyvsp[-1].ast));
5905 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5906 }
5907 #line 5908 "pkl-tab.c"
5908 break;
5909
5910 case 95:
5911 #line 1174 "pkl-tab.y"
5912 { (yyval.ast) = NULL; }
5913 #line 5914 "pkl-tab.c"
5914 break;
5915
5916 case 97:
5917 #line 1177 "pkl-tab.y"
5918 {
5919 (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast));
5920 }
5921 #line 5922 "pkl-tab.c"
5922 break;
5923
5924 case 98:
5925 #line 1184 "pkl-tab.y"
5926 {
5927 (yyval.ast) = pkl_ast_make_funcall_arg (pkl_parser->ast,
5928 (yyvsp[0].ast), NULL /* name */);
5929 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5930 }
5931 #line 5932 "pkl-tab.c"
5932 break;
5933
5934 case 101:
5935 #line 1198 "pkl-tab.y"
5936 { (yyval.ast) = NULL; }
5937 #line 5938 "pkl-tab.c"
5938 break;
5939
5940 case 103:
5941 #line 1201 "pkl-tab.y"
5942 {
5943 (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast));
5944 }
5945 #line 5946 "pkl-tab.c"
5946 break;
5947
5948 case 104:
5949 #line 1208 "pkl-tab.y"
5950 {
5951 (yyval.ast) = pkl_ast_make_struct_field (pkl_parser->ast,
5952 NULL /* name */,
5953 (yyvsp[0].ast));
5954 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5955 }
5956 #line 5957 "pkl-tab.c"
5957 break;
5958
5959 case 105:
5960 #line 1215 "pkl-tab.y"
5961 {
5962 (yyval.ast) = pkl_ast_make_struct_field (pkl_parser->ast,
5963 (yyvsp[-2].ast),
5964 (yyvsp[0].ast));
5965 PKL_AST_LOC ((yyvsp[-2].ast)) = (yylsp[-2]);
5966 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5967 }
5968 #line 5969 "pkl-tab.c"
5969 break;
5970
5971 case 106:
5972 #line 1226 "pkl-tab.y"
5973 {
5974 (yyval.ast) = pkl_ast_make_array (pkl_parser->ast,
5975 0 /* nelem */,
5976 0 /* ninitializer */,
5977 (yyvsp[-2].ast));
5978 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5979 }
5980 #line 5981 "pkl-tab.c"
5981 break;
5982
5983 case 108:
5984 #line 1238 "pkl-tab.y"
5985 {
5986 (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast));
5987 }
5988 #line 5989 "pkl-tab.c"
5989 break;
5990
5991 case 109:
5992 #line 1245 "pkl-tab.y"
5993 {
5994 (yyval.ast) = pkl_ast_make_array_initializer (pkl_parser->ast,
5995 NULL, (yyvsp[0].ast));
5996 PKL_AST_LOC ((yyval.ast)) = (yyloc);
5997 }
5998 #line 5999 "pkl-tab.c"
5999 break;
6000
6001 case 110:
6002 #line 1251 "pkl-tab.y"
6003 {
6004 (yyval.ast) = pkl_ast_make_array_initializer (pkl_parser->ast,
6005 (yyvsp[-3].ast), (yyvsp[0].ast));
6006 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6007 }
6008 #line 6009 "pkl-tab.c"
6009 break;
6010
6011 case 111:
6012 #line 1264 "pkl-tab.y"
6013 {
6014 /* Push the lexical frame for the function's
6015 arguments. */
6016 pkl_parser->env = pkl_env_push_frame (pkl_parser->env);
6017
6018 /* If in a method, register a dummy for the initial
6019 implicit argument. */
6020 if (pkl_parser->in_method_decl_p)
6021 pkl_register_dummies (pkl_parser, 1);
6022 }
6023 #line 6024 "pkl-tab.c"
6024 break;
6025
6026 case 112:
6027 #line 1278 "pkl-tab.y"
6028 {
6029 (yyval.ast) = pkl_ast_make_func (pkl_parser->ast,
6030 (yyvsp[-2].ast), (yyvsp[-4].ast), (yyvsp[0].ast));
6031 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6032
6033 /* Pop the frame introduced by `pushlevel'
6034 above. */
6035 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
6036 }
6037 #line 6038 "pkl-tab.c"
6038 break;
6039
6040 case 113:
6041 #line 1288 "pkl-tab.y"
6042 {
6043 (yyval.ast) = pkl_ast_make_func (pkl_parser->ast,
6044 (yyvsp[-3].ast), NULL, (yyvsp[0].ast));
6045 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6046
6047 /* Pop the frame introduced by `pushlevel'
6048 above. */
6049 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
6050 }
6051 #line 6052 "pkl-tab.c"
6052 break;
6053
6054 case 115:
6055 #line 1302 "pkl-tab.y"
6056 {
6057 (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast));
6058 }
6059 #line 6060 "pkl-tab.c"
6060 break;
6061
6062 case 116:
6063 #line 1309 "pkl-tab.y"
6064 {
6065 (yyval.ast) = pkl_ast_make_func_arg (pkl_parser->ast,
6066 (yyvsp[-2].ast), (yyvsp[-1].ast), (yyvsp[0].ast));
6067 PKL_AST_LOC ((yyvsp[-1].ast)) = (yylsp[-1]);
6068 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6069
6070 if (!pkl_register_arg (pkl_parser, (yyval.ast)))
6071 YYERROR;
6072 }
6073 #line 6074 "pkl-tab.c"
6074 break;
6075
6076 case 117:
6077 #line 1319 "pkl-tab.y"
6078 {
6079 pkl_ast_node type
6080 = pkl_ast_make_any_type (pkl_parser->ast);
6081 pkl_ast_node array_type
6082 = pkl_ast_make_array_type (pkl_parser->ast,
6083 type,
6084 NULL /* bound */);
6085
6086 PKL_AST_LOC (type) = (yylsp[-1]);
6087 PKL_AST_LOC (array_type) = (yylsp[-1]);
6088
6089 (yyval.ast) = pkl_ast_make_func_arg (pkl_parser->ast,
6090 array_type,
6091 (yyvsp[-1].ast),
6092 NULL /* initial */);
6093 PKL_AST_FUNC_ARG_VARARG ((yyval.ast)) = 1;
6094 PKL_AST_LOC ((yyvsp[-1].ast)) = (yylsp[-1]);
6095 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6096
6097 if (!pkl_register_arg (pkl_parser, (yyval.ast)))
6098 YYERROR;
6099 }
6100 #line 6101 "pkl-tab.c"
6101 break;
6102
6103 case 118:
6104 #line 1344 "pkl-tab.y"
6105 { (yyval.ast) = NULL; }
6106 #line 6107 "pkl-tab.c"
6107 break;
6108
6109 case 119:
6110 #line 1345 "pkl-tab.y"
6111 { (yyval.ast) = (yyvsp[0].ast); }
6112 #line 6113 "pkl-tab.c"
6113 break;
6114
6115 case 123:
6116 #line 1360 "pkl-tab.y"
6117 {
6118 pkl_ast_node decl = pkl_env_lookup (pkl_parser->env,
6119 PKL_ENV_NS_MAIN,
6120 PKL_AST_IDENTIFIER_POINTER ((yyvsp[0].ast)),
6121 NULL, NULL);
6122 assert (decl != NULL
6123 && PKL_AST_DECL_KIND (decl) == PKL_AST_DECL_KIND_TYPE);
6124 (yyval.ast) = PKL_AST_DECL_INITIAL (decl);
6125 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6126 (yyvsp[0].ast) = ASTREF ((yyvsp[0].ast)); pkl_ast_node_free ((yyvsp[0].ast));
6127 }
6128 #line 6129 "pkl-tab.c"
6129 break;
6130
6131 case 124:
6132 #line 1375 "pkl-tab.y"
6133 {
6134 (yyval.ast) = pkl_ast_make_string_type (pkl_parser->ast);
6135 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6136 }
6137 #line 6138 "pkl-tab.c"
6138 break;
6139
6140 case 125:
6141 #line 1383 "pkl-tab.y"
6142 {
6143 (yyval.ast) = pkl_ast_make_any_type (pkl_parser->ast);
6144 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6145 }
6146 #line 6147 "pkl-tab.c"
6147 break;
6148
6149 case 126:
6150 #line 1388 "pkl-tab.y"
6151 {
6152 (yyval.ast) = pkl_ast_make_void_type (pkl_parser->ast);
6153 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6154 }
6155 #line 6156 "pkl-tab.c"
6156 break;
6157
6158 case 135:
6159 #line 1407 "pkl-tab.y"
6160 {
6161 (yyval.ast) = pkl_ast_make_integral_type (pkl_parser->ast,
6162 PKL_AST_INTEGER_VALUE ((yyvsp[-1].ast)),
6163 (yyvsp[-2].integer));
6164 (yyvsp[-1].ast) = ASTREF ((yyvsp[-1].ast)); pkl_ast_node_free ((yyvsp[-1].ast));
6165 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6166 }
6167 #line 6168 "pkl-tab.c"
6168 break;
6169
6170 case 136:
6171 #line 1417 "pkl-tab.y"
6172 { (yyval.integer) = 1; }
6173 #line 6174 "pkl-tab.c"
6174 break;
6175
6176 case 137:
6177 #line 1418 "pkl-tab.y"
6178 { (yyval.integer) = 0; }
6179 #line 6180 "pkl-tab.c"
6180 break;
6181
6182 case 138:
6183 #line 1423 "pkl-tab.y"
6184 {
6185 pkl_ast_node decl
6186 = pkl_env_lookup (pkl_parser->env,
6187 PKL_ENV_NS_UNITS,
6188 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-1].ast)),
6189 NULL, NULL);
6190
6191 if (!decl)
6192 {
6193 /* This could be the name of a type. Try it out. */
6194 decl = pkl_env_lookup (pkl_parser->env,
6195 PKL_ENV_NS_MAIN,
6196 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-1].ast)),
6197 NULL, NULL);
6198
6199 if (!decl)
6200 {
6201 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[-1]),
6202 "invalid unit in offset type");
6203 YYERROR;
6204 }
6205 }
6206
6207 (yyval.ast) = pkl_ast_make_offset_type (pkl_parser->ast,
6208 (yyvsp[-3].ast),
6209 PKL_AST_DECL_INITIAL (decl));
6210
6211 (yyvsp[-1].ast) = ASTREF ((yyvsp[-1].ast)); pkl_ast_node_free ((yyvsp[-1].ast));
6212 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6213 }
6214 #line 6215 "pkl-tab.c"
6215 break;
6216
6217 case 139:
6218 #line 1454 "pkl-tab.y"
6219 {
6220 (yyval.ast) = pkl_ast_make_offset_type (pkl_parser->ast,
6221 (yyvsp[-3].ast), (yyvsp[-1].ast));
6222 PKL_AST_LOC (PKL_AST_TYPE ((yyvsp[-1].ast))) = (yylsp[-1]);
6223 PKL_AST_LOC ((yyvsp[-1].ast)) = (yylsp[-1]);
6224 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6225 }
6226 #line 6227 "pkl-tab.c"
6227 break;
6228
6229 case 140:
6230 #line 1465 "pkl-tab.y"
6231 {
6232 (yyval.ast) = pkl_ast_make_array_type (pkl_parser->ast, (yyvsp[-2].ast),
6233 NULL /* bound */);
6234 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6235 }
6236 #line 6237 "pkl-tab.c"
6237 break;
6238
6239 case 141:
6240 #line 1471 "pkl-tab.y"
6241 {
6242 (yyval.ast) = pkl_ast_make_array_type (pkl_parser->ast, (yyvsp[-3].ast), (yyvsp[-1].ast));
6243 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6244 }
6245 #line 6246 "pkl-tab.c"
6246 break;
6247
6248 case 142:
6249 #line 1479 "pkl-tab.y"
6250 {
6251 (yyval.ast) = pkl_ast_make_function_type (pkl_parser->ast,
6252 (yyvsp[0].ast), 0 /* narg */,
6253 (yyvsp[-2].ast));
6254 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6255 }
6256 #line 6257 "pkl-tab.c"
6257 break;
6258
6259 case 143:
6260 #line 1486 "pkl-tab.y"
6261 {
6262 (yyval.ast) = pkl_ast_make_function_type (pkl_parser->ast,
6263 (yyvsp[0].ast), 0 /* narg */,
6264 NULL);
6265 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6266 }
6267 #line 6268 "pkl-tab.c"
6268 break;
6269
6270 case 145:
6271 #line 1497 "pkl-tab.y"
6272 {
6273 (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast));
6274 }
6275 #line 6276 "pkl-tab.c"
6276 break;
6277
6278 case 146:
6279 #line 1504 "pkl-tab.y"
6280 {
6281 (yyval.ast) = pkl_ast_make_func_type_arg (pkl_parser->ast,
6282 (yyvsp[0].ast), NULL /* name */);
6283 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6284 }
6285 #line 6286 "pkl-tab.c"
6286 break;
6287
6288 case 147:
6289 #line 1510 "pkl-tab.y"
6290 {
6291 (yyval.ast) = pkl_ast_make_func_type_arg (pkl_parser->ast,
6292 (yyvsp[-1].ast), NULL /* name */);
6293 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6294 PKL_AST_FUNC_TYPE_ARG_OPTIONAL ((yyval.ast)) = 1;
6295 }
6296 #line 6297 "pkl-tab.c"
6297 break;
6298
6299 case 148:
6300 #line 1517 "pkl-tab.y"
6301 {
6302 pkl_ast_node type
6303 = pkl_ast_make_any_type (pkl_parser->ast);
6304 pkl_ast_node array_type
6305 = pkl_ast_make_array_type (pkl_parser->ast,
6306 type, NULL /* bound */);
6307
6308 PKL_AST_LOC (type) = (yylsp[0]);
6309 PKL_AST_LOC (array_type) = (yylsp[0]);
6310
6311 (yyval.ast) = pkl_ast_make_func_type_arg (pkl_parser->ast,
6312 array_type, NULL /* name */);
6313 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6314 PKL_AST_FUNC_TYPE_ARG_VARARG ((yyval.ast)) = 1;
6315 }
6316 #line 6317 "pkl-tab.c"
6317 break;
6318
6319 case 149:
6320 #line 1537 "pkl-tab.y"
6321 {
6322 (yyval.ast) = pkl_ast_make_struct_type (pkl_parser->ast,
6323 0 /* nelem */,
6324 0 /* nfield */,
6325 0 /* ndecl */,
6326 (yyvsp[-2].ast),
6327 NULL /* elems */,
6328 (yyvsp[-4].integer), (yyvsp[-3].integer));
6329 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6330
6331 /* The pushlevel in this rule and the subsequent
6332 pop_frame, while not strictly needed, is to
6333 avoid shift/reduce conflicts with the next
6334 rule. */
6335 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
6336 }
6337 #line 6338 "pkl-tab.c"
6338 break;
6339
6340 case 150:
6341 #line 1555 "pkl-tab.y"
6342 {
6343 /* Register dummies for the locals used in
6344 pkl-gen.pks:struct_mapper (not counting
6345 OFFSET). */
6346 pkl_register_dummies (pkl_parser, 5);
6347
6348 /* Now register OFFSET with a type of
6349 offset<uint<64>,1> */
6350 {
6351 pkl_ast_node decl, type;
6352 pkl_ast_node offset_identifier
6353 = pkl_ast_make_identifier (pkl_parser->ast, "OFFSET");
6354 pkl_ast_node offset_magnitude
6355 = pkl_ast_make_integer (pkl_parser->ast, 0);
6356 pkl_ast_node offset_unit
6357 = pkl_ast_make_integer (pkl_parser->ast, 1);
6358 pkl_ast_node offset;
6359
6360 type = pkl_ast_make_integral_type (pkl_parser->ast, 64, 0);
6361 PKL_AST_TYPE (offset_magnitude) = ASTREF (type);
6362 PKL_AST_TYPE (offset_unit) = ASTREF (type);
6363
6364 offset = pkl_ast_make_offset (pkl_parser->ast,
6365 offset_magnitude,
6366 offset_unit);
6367 type = pkl_ast_make_offset_type (pkl_parser->ast,
6368 type,
6369 offset_unit);
6370 PKL_AST_TYPE (offset) = ASTREF (type);
6371
6372 decl = pkl_ast_make_decl (pkl_parser->ast,
6373 PKL_AST_DECL_KIND_VAR,
6374 offset_identifier,
6375 offset,
6376 NULL /* source */);
6377
6378 if (!pkl_env_register (pkl_parser->env,
6379 PKL_ENV_NS_MAIN,
6380 PKL_AST_IDENTIFIER_POINTER (offset_identifier),
6381 decl))
6382 assert (0);
6383 }
6384 }
6385 #line 6386 "pkl-tab.c"
6386 break;
6387
6388 case 151:
6389 #line 1599 "pkl-tab.y"
6390 {
6391 (yyval.ast) = pkl_ast_make_struct_type (pkl_parser->ast,
6392 0 /* nelem */,
6393 0 /* nfield */,
6394 0 /* ndecl */,
6395 (yyvsp[-4].ast),
6396 (yyvsp[-1].ast),
6397 (yyvsp[-6].integer), (yyvsp[-5].integer));
6398 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6399
6400 /* Pop the frame pushed in the `pushlevel' above. */
6401 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
6402 }
6403 #line 6404 "pkl-tab.c"
6404 break;
6405
6406 case 152:
6407 #line 1615 "pkl-tab.y"
6408 { (yyval.integer) = 0; }
6409 #line 6410 "pkl-tab.c"
6410 break;
6411
6412 case 153:
6413 #line 1616 "pkl-tab.y"
6414 { (yyval.integer) = 1; }
6415 #line 6416 "pkl-tab.c"
6416 break;
6417
6418 case 154:
6419 #line 1620 "pkl-tab.y"
6420 { (yyval.integer) = 0; }
6421 #line 6422 "pkl-tab.c"
6422 break;
6423
6424 case 155:
6425 #line 1621 "pkl-tab.y"
6426 { (yyval.integer) = 1; }
6427 #line 6428 "pkl-tab.c"
6428 break;
6429
6430 case 156:
6431 #line 1625 "pkl-tab.y"
6432 { (yyval.ast) = NULL; }
6433 #line 6434 "pkl-tab.c"
6434 break;
6435
6436 case 157:
6437 #line 1626 "pkl-tab.y"
6438 { (yyval.ast) = (yyvsp[0].ast); }
6439 #line 6440 "pkl-tab.c"
6440 break;
6441
6442 case 160:
6443 #line 1633 "pkl-tab.y"
6444 { (yyval.ast) = pkl_ast_chainon ((yyvsp[-1].ast), (yyvsp[0].ast)); }
6445 #line 6446 "pkl-tab.c"
6446 break;
6447
6448 case 161:
6449 #line 1635 "pkl-tab.y"
6450 { (yyval.ast) = pkl_ast_chainon ((yyvsp[-1].ast), (yyvsp[0].ast)); }
6451 #line 6452 "pkl-tab.c"
6452 break;
6453
6454 case 162:
6455 #line 1639 "pkl-tab.y"
6456 { (yyval.integer) = PKL_AST_ENDIAN_DFL; }
6457 #line 6458 "pkl-tab.c"
6458 break;
6459
6460 case 163:
6461 #line 1640 "pkl-tab.y"
6462 { (yyval.integer) = PKL_AST_ENDIAN_LSB; }
6463 #line 6464 "pkl-tab.c"
6464 break;
6465
6466 case 164:
6467 #line 1641 "pkl-tab.y"
6468 { (yyval.integer) = PKL_AST_ENDIAN_MSB; }
6469 #line 6470 "pkl-tab.c"
6470 break;
6471
6472 case 165:
6473 #line 1646 "pkl-tab.y"
6474 {
6475 /* Register a variable in the current environment
6476 for the field. We do it in this mid-rule so
6477 the element can be used in the constraint. */
6478
6479 pkl_ast_node dummy, decl;
6480 pkl_ast_node identifier
6481 = ((yyvsp[0].ast) != NULL
6482 ? (yyvsp[0].ast)
6483 : pkl_ast_make_identifier (pkl_parser->ast, ""));
6484
6485
6486 dummy = pkl_ast_make_integer (pkl_parser->ast, 0);
6487 PKL_AST_TYPE (dummy) = ASTREF ((yyvsp[-1].ast));
6488 decl = pkl_ast_make_decl (pkl_parser->ast,
6489 PKL_AST_DECL_KIND_VAR,
6490 identifier, dummy,
6491 NULL /* source */);
6492 PKL_AST_DECL_STRUCT_FIELD_P (decl) = 1;
6493 PKL_AST_LOC (decl) = (yyloc);
6494
6495 if (!pkl_env_register (pkl_parser->env,
6496 PKL_ENV_NS_MAIN,
6497 PKL_AST_IDENTIFIER_POINTER (identifier),
6498 decl))
6499 {
6500 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[0]),
6501 "duplicated struct element '%s'",
6502 PKL_AST_IDENTIFIER_POINTER ((yyvsp[0].ast)));
6503 YYERROR;
6504 }
6505
6506 if (identifier)
6507 {
6508 identifier = ASTREF (identifier);
6509 pkl_ast_node_free (identifier);
6510 }
6511 }
6512 #line 6513 "pkl-tab.c"
6513 break;
6514
6515 case 166:
6516 #line 1686 "pkl-tab.y"
6517 {
6518 pkl_ast_node constraint = NULL;
6519 pkl_ast_node initializer = NULL;
6520
6521 if ((yyvsp[-3].ast) && PKL_AST_EXP_FLAG ((yyvsp[-3].ast)))
6522 {
6523 pkl_ast_node field_decl, field_var;
6524 int back, over;
6525
6526 /* We need a field name. */
6527 if ((yyvsp[-5].ast) == NULL)
6528 {
6529 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yyloc),
6530 "no initializer allowed in anonymous field");
6531 YYERROR;
6532 }
6533
6534 initializer = (yyvsp[-3].ast);
6535
6536 /* Build a constraint derived from the
6537 initializer. */
6538 field_decl = pkl_env_lookup (pkl_parser->env,
6539 PKL_ENV_NS_MAIN,
6540 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-5].ast)),
6541 &back, &over);
6542 assert (field_decl);
6543
6544 field_var = pkl_ast_make_var (pkl_parser->ast,
6545 (yyvsp[-5].ast),
6546 field_decl,
6547 back, over);
6548 PKL_AST_LOC (field_var) = PKL_AST_LOC (initializer);
6549
6550 constraint = pkl_ast_make_binary_exp (pkl_parser->ast,
6551 PKL_AST_OP_EQ,
6552 field_var,
6553 initializer);
6554 PKL_AST_LOC (constraint) = PKL_AST_LOC (initializer);
6555 }
6556 else
6557 constraint = (yyvsp[-3].ast);
6558
6559 (yyval.ast) = pkl_ast_make_struct_type_field (pkl_parser->ast, (yyvsp[-5].ast), (yyvsp[-6].ast),
6560 constraint, initializer,
6561 (yyvsp[-2].ast), (yyvsp[-7].integer), (yyvsp[-1].ast));
6562 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6563
6564 /* If endianness is empty, bison includes the blank
6565 characters before the type field as if they were
6566 part of this rule. Therefore the location should
6567 be adjusted here. */
6568 if ((yyvsp[-7].integer) == PKL_AST_ENDIAN_DFL)
6569 {
6570 PKL_AST_LOC ((yyval.ast)).first_line = (yylsp[-6]).first_line;
6571 PKL_AST_LOC ((yyval.ast)).first_column = (yylsp[-6]).first_column;
6572 }
6573
6574 if ((yyvsp[-5].ast) != NULL)
6575 {
6576 PKL_AST_LOC ((yyvsp[-5].ast)) = (yylsp[-5]);
6577 PKL_AST_TYPE ((yyvsp[-5].ast)) = pkl_ast_make_string_type (pkl_parser->ast);
6578 PKL_AST_TYPE ((yyvsp[-5].ast)) = ASTREF (PKL_AST_TYPE ((yyvsp[-5].ast)));
6579 PKL_AST_LOC (PKL_AST_TYPE ((yyvsp[-5].ast))) = (yylsp[-5]);
6580 }
6581 }
6582 #line 6583 "pkl-tab.c"
6583 break;
6584
6585 case 167:
6586 #line 1754 "pkl-tab.y"
6587 { (yyval.ast) = NULL; }
6588 #line 6589 "pkl-tab.c"
6589 break;
6590
6591 case 168:
6592 #line 1755 "pkl-tab.y"
6593 { (yyval.ast) = (yyvsp[0].ast); }
6594 #line 6595 "pkl-tab.c"
6595 break;
6596
6597 case 169:
6598 #line 1760 "pkl-tab.y"
6599 {
6600 (yyval.ast) = NULL;
6601 }
6602 #line 6603 "pkl-tab.c"
6603 break;
6604
6605 case 170:
6606 #line 1764 "pkl-tab.y"
6607 {
6608 (yyval.ast) = (yyvsp[0].ast);
6609 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6610 }
6611 #line 6612 "pkl-tab.c"
6612 break;
6613
6614 case 171:
6615 #line 1772 "pkl-tab.y"
6616 {
6617 (yyval.ast) = NULL;
6618 }
6619 #line 6620 "pkl-tab.c"
6620 break;
6621
6622 case 172:
6623 #line 1776 "pkl-tab.y"
6624 {
6625 (yyval.ast) = (yyvsp[0].ast);
6626 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6627 }
6628 #line 6629 "pkl-tab.c"
6629 break;
6630
6631 case 173:
6632 #line 1781 "pkl-tab.y"
6633 {
6634 (yyval.ast) = (yyvsp[0].ast);
6635 /* Use use the flag to distinguish between
6636 constraint and initializer. */
6637 PKL_AST_EXP_FLAG ((yyval.ast)) = 1;
6638 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6639 }
6640 #line 6641 "pkl-tab.c"
6641 break;
6642
6643 case 174:
6644 #line 1792 "pkl-tab.y"
6645 {
6646 (yyval.ast) = NULL;
6647 }
6648 #line 6649 "pkl-tab.c"
6649 break;
6650
6651 case 175:
6652 #line 1796 "pkl-tab.y"
6653 {
6654 (yyval.ast) = (yyvsp[0].ast);
6655 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6656 }
6657 #line 6658 "pkl-tab.c"
6658 break;
6659
6660 case 176:
6661 #line 1807 "pkl-tab.y"
6662 { (yyval.ast) = (yyvsp[0].ast); }
6663 #line 6664 "pkl-tab.c"
6664 break;
6665
6666 case 177:
6667 #line 1808 "pkl-tab.y"
6668 { (yyval.ast) = (yyvsp[0].ast); }
6669 #line 6670 "pkl-tab.c"
6670 break;
6671
6672 case 178:
6673 #line 1809 "pkl-tab.y"
6674 { (yyval.ast) = (yyvsp[0].ast); }
6675 #line 6676 "pkl-tab.c"
6676 break;
6677
6678 case 179:
6679 #line 1814 "pkl-tab.y"
6680 {
6681 /* In order to allow for the function to be called
6682 from within itself (recursive calls) we should
6683 register a partial declaration in the
6684 compile-time environment before processing the
6685 `function_specifier' below. */
6686
6687 (yyval.ast) = pkl_ast_make_decl (pkl_parser->ast,
6688 PKL_AST_DECL_KIND_FUNC, (yyvsp[0].ast),
6689 NULL /* initial */,
6690 pkl_parser->filename);
6691 PKL_AST_LOC ((yyvsp[0].ast)) = (yylsp[0]);
6692 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6693
6694 if (!pkl_env_register (pkl_parser->env,
6695 PKL_ENV_NS_MAIN,
6696 PKL_AST_IDENTIFIER_POINTER ((yyvsp[0].ast)),
6697 (yyval.ast)))
6698 {
6699 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[0]),
6700 "function or variable `%s' already defined",
6701 PKL_AST_IDENTIFIER_POINTER ((yyvsp[0].ast)));
6702 YYERROR;
6703 }
6704
6705 /* function_specifier needs to know whether we are
6706 in a function declaration or a method
6707 declaration. */
6708 pkl_parser->in_method_decl_p = ((yyvsp[-1].integer) == IS_METHOD);
6709 }
6710 #line 6711 "pkl-tab.c"
6711 break;
6712
6713 case 180:
6714 #line 1845 "pkl-tab.y"
6715 {
6716 /* Complete the declaration registered above with
6717 it's initial value, which is the specifier of the
6718 function being defined. */
6719 PKL_AST_DECL_INITIAL ((yyvsp[-2].ast))
6720 = ASTREF ((yyvsp[0].ast));
6721 (yyval.ast) = (yyvsp[-2].ast);
6722
6723 /* If the reference counting of the declaration is
6724 bigger than 1, this means there are recursive
6725 calls in the function body. Reset the refcount
6726 to 1, since these references are weak. */
6727 if (PKL_AST_REFCOUNT ((yyvsp[-2].ast)) > 1)
6728 PKL_AST_REFCOUNT ((yyvsp[-2].ast)) = 1;
6729
6730 /* Annotate the contained RETURN statements with
6731 their function and their lexical nest level
6732 within the function. */
6733 pkl_ast_finish_returns ((yyvsp[0].ast));
6734
6735 /* Annotate the function to be a method whenever
6736 appropriate. */
6737 if ((yyvsp[-4].integer) == IS_METHOD)
6738 PKL_AST_FUNC_METHOD_P ((yyvsp[0].ast)) = 1;
6739
6740 /* XXX: move to trans1. */
6741 PKL_AST_FUNC_NAME ((yyvsp[0].ast))
6742 = xstrdup (PKL_AST_IDENTIFIER_POINTER ((yyvsp[-3].ast)));
6743
6744 pkl_parser->in_method_decl_p = 0;
6745 }
6746 #line 6747 "pkl-tab.c"
6747 break;
6748
6749 case 181:
6750 #line 1876 "pkl-tab.y"
6751 { (yyval.ast) = (yyvsp[-1].ast); }
6752 #line 6753 "pkl-tab.c"
6753 break;
6754
6755 case 182:
6756 #line 1880 "pkl-tab.y"
6757 { (yyval.integer) = IS_DEFUN; }
6758 #line 6759 "pkl-tab.c"
6759 break;
6760
6761 case 183:
6762 #line 1881 "pkl-tab.y"
6763 { (yyval.integer) = IS_METHOD; }
6764 #line 6765 "pkl-tab.c"
6765 break;
6766
6767 case 185:
6768 #line 1887 "pkl-tab.y"
6769 { (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast)); }
6770 #line 6771 "pkl-tab.c"
6771 break;
6772
6773 case 186:
6774 #line 1892 "pkl-tab.y"
6775 {
6776 (yyval.ast) = pkl_ast_make_decl (pkl_parser->ast,
6777 PKL_AST_DECL_KIND_VAR, (yyvsp[-2].ast), (yyvsp[0].ast),
6778 pkl_parser->filename);
6779 PKL_AST_LOC ((yyvsp[-2].ast)) = (yylsp[-2]);
6780 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6781
6782 if (!pkl_env_register (pkl_parser->env,
6783 PKL_ENV_NS_MAIN,
6784 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-2].ast)),
6785 (yyval.ast)))
6786 {
6787 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[-2]),
6788 "the variable `%s' is already defined",
6789 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-2].ast)));
6790 YYERROR;
6791 }
6792 }
6793 #line 6794 "pkl-tab.c"
6794 break;
6795
6796 case 188:
6797 #line 1915 "pkl-tab.y"
6798 { (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast)); }
6799 #line 6800 "pkl-tab.c"
6800 break;
6801
6802 case 189:
6803 #line 1920 "pkl-tab.y"
6804 {
6805 (yyval.ast) = pkl_ast_make_decl (pkl_parser->ast,
6806 PKL_AST_DECL_KIND_TYPE, (yyvsp[-2].ast), (yyvsp[0].ast),
6807 pkl_parser->filename);
6808 PKL_AST_LOC ((yyvsp[-2].ast)) = (yylsp[-2]);
6809 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6810
6811 PKL_AST_TYPE_NAME ((yyvsp[0].ast)) = ASTREF ((yyvsp[-2].ast));
6812
6813 if (!pkl_env_register (pkl_parser->env,
6814 PKL_ENV_NS_MAIN,
6815 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-2].ast)),
6816 (yyval.ast)))
6817 {
6818 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[-2]),
6819 "the type `%s' is already defined",
6820 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-2].ast)));
6821 YYERROR;
6822 }
6823 }
6824 #line 6825 "pkl-tab.c"
6825 break;
6826
6827 case 191:
6828 #line 1945 "pkl-tab.y"
6829 { (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast)); }
6830 #line 6831 "pkl-tab.c"
6831 break;
6832
6833 case 192:
6834 #line 1950 "pkl-tab.y"
6835 {
6836 /* We need to cast the expression to uint<64> here,
6837 instead of pkl-promo, because the installed
6838 initializer is used as earlier as in the lexer. Not
6839 pretty. */
6840 pkl_ast_node type
6841 = pkl_ast_make_integral_type (pkl_parser->ast,
6842 64, 0);
6843 pkl_ast_node cast
6844 = pkl_ast_make_cast (pkl_parser->ast,
6845 type, (yyvsp[0].ast));
6846
6847 (yyval.ast) = pkl_ast_make_decl (pkl_parser->ast,
6848 PKL_AST_DECL_KIND_UNIT, (yyvsp[-2].ast), cast,
6849 pkl_parser->filename);
6850
6851 PKL_AST_LOC (type) = (yylsp[0]);
6852 PKL_AST_LOC (cast) = (yylsp[0]);
6853 PKL_AST_LOC ((yyvsp[-2].ast)) = (yylsp[-2]);
6854 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6855
6856 if (!pkl_env_register (pkl_parser->env,
6857 PKL_ENV_NS_UNITS,
6858 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-2].ast)),
6859 (yyval.ast)))
6860 {
6861 pkl_error (pkl_parser->compiler, pkl_parser->ast, (yylsp[-2]),
6862 "the unit `%s' is already defined",
6863 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-2].ast)));
6864 YYERROR;
6865 }
6866 }
6867 #line 6868 "pkl-tab.c"
6868 break;
6869
6870 case 193:
6871 #line 1989 "pkl-tab.y"
6872 {
6873 (yyval.ast) = pkl_ast_make_comp_stmt (pkl_parser->ast, NULL);
6874 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6875
6876 /* Pop the frame pushed by the `pushlevel' above. */
6877 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
6878 }
6879 #line 6880 "pkl-tab.c"
6880 break;
6881
6882 case 194:
6883 #line 1997 "pkl-tab.y"
6884 {
6885 (yyval.ast) = pkl_ast_make_comp_stmt (pkl_parser->ast, (yyvsp[-1].ast));
6886 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6887
6888 /* Pop the frame pushed by the `pushlevel' above. */
6889 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
6890 }
6891 #line 6892 "pkl-tab.c"
6892 break;
6893
6894 case 195:
6895 #line 2005 "pkl-tab.y"
6896 {
6897 (yyval.ast) = pkl_ast_make_builtin (pkl_parser->ast, (yyvsp[0].integer));
6898 PKL_AST_LOC ((yyval.ast)) = (yyloc);
6899
6900 /* Pop the frame pushed by the `pushlevel' above. */
6901 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
6902 }
6903 #line 6904 "pkl-tab.c"
6904 break;
6905
6906 case 196:
6907 #line 2015 "pkl-tab.y"
6908 { (yyval.integer) = PKL_AST_BUILTIN_RAND; }
6909 #line 6910 "pkl-tab.c"
6910 break;
6911
6912 case 197:
6913 #line 2016 "pkl-tab.y"
6914 { (yyval.integer) = PKL_AST_BUILTIN_GET_ENDIAN; }
6915 #line 6916 "pkl-tab.c"
6916 break;
6917
6918 case 198:
6919 #line 2017 "pkl-tab.y"
6920 { (yyval.integer) = PKL_AST_BUILTIN_SET_ENDIAN; }
6921 #line 6922 "pkl-tab.c"
6922 break;
6923
6924 case 199:
6925 #line 2018 "pkl-tab.y"
6926 { (yyval.integer) = PKL_AST_BUILTIN_GET_IOS; }
6927 #line 6928 "pkl-tab.c"
6928 break;
6929
6930 case 200:
6931 #line 2019 "pkl-tab.y"
6932 { (yyval.integer) = PKL_AST_BUILTIN_SET_IOS; }
6933 #line 6934 "pkl-tab.c"
6934 break;
6935
6936 case 201:
6937 #line 2020 "pkl-tab.y"
6938 { (yyval.integer) = PKL_AST_BUILTIN_OPEN; }
6939 #line 6940 "pkl-tab.c"
6940 break;
6941
6942 case 202:
6943 #line 2021 "pkl-tab.y"
6944 { (yyval.integer) = PKL_AST_BUILTIN_CLOSE; }
6945 #line 6946 "pkl-tab.c"
6946 break;
6947
6948 case 203:
6949 #line 2022 "pkl-tab.y"
6950 { (yyval.integer) = PKL_AST_BUILTIN_IOSIZE; }
6951 #line 6952 "pkl-tab.c"
6952 break;
6953
6954 case 204:
6955 #line 2023 "pkl-tab.y"
6956 { (yyval.integer) = PKL_AST_BUILTIN_GETENV; }
6957 #line 6958 "pkl-tab.c"
6958 break;
6959
6960 case 205:
6961 #line 2024 "pkl-tab.y"
6962 { (yyval.integer) = PKL_AST_BUILTIN_FORGET; }
6963 #line 6964 "pkl-tab.c"
6964 break;
6965
6966 case 206:
6967 #line 2025 "pkl-tab.y"
6968 { (yyval.integer) = PKL_AST_BUILTIN_GET_TIME; }
6969 #line 6970 "pkl-tab.c"
6970 break;
6971
6972 case 207:
6973 #line 2026 "pkl-tab.y"
6974 { (yyval.integer) = PKL_AST_BUILTIN_STRACE; }
6975 #line 6976 "pkl-tab.c"
6976 break;
6977
6978 case 208:
6979 #line 2027 "pkl-tab.y"
6980 { (yyval.integer) = PKL_AST_BUILTIN_TERM_GET_COLOR; }
6981 #line 6982 "pkl-tab.c"
6982 break;
6983
6984 case 209:
6985 #line 2028 "pkl-tab.y"
6986 { (yyval.integer) = PKL_AST_BUILTIN_TERM_SET_COLOR; }
6987 #line 6988 "pkl-tab.c"
6988 break;
6989
6990 case 210:
6991 #line 2029 "pkl-tab.y"
6992 { (yyval.integer) = PKL_AST_BUILTIN_TERM_GET_BGCOLOR; }
6993 #line 6994 "pkl-tab.c"
6994 break;
6995
6996 case 211:
6997 #line 2030 "pkl-tab.y"
6998 { (yyval.integer) = PKL_AST_BUILTIN_TERM_SET_BGCOLOR; }
6999 #line 7000 "pkl-tab.c"
7000 break;
7001
7002 case 212:
7003 #line 2031 "pkl-tab.y"
7004 { (yyval.integer) = PKL_AST_BUILTIN_TERM_BEGIN_CLASS; }
7005 #line 7006 "pkl-tab.c"
7006 break;
7007
7008 case 213:
7009 #line 2032 "pkl-tab.y"
7010 { (yyval.integer) = PKL_AST_BUILTIN_TERM_END_CLASS; }
7011 #line 7012 "pkl-tab.c"
7012 break;
7013
7014 case 214:
7015 #line 2033 "pkl-tab.y"
7016 { (yyval.integer) = PKL_AST_BUILTIN_TERM_BEGIN_HYPERLINK; }
7017 #line 7018 "pkl-tab.c"
7018 break;
7019
7020 case 215:
7021 #line 2034 "pkl-tab.y"
7022 { (yyval.integer) = PKL_AST_BUILTIN_TERM_END_HYPERLINK; }
7023 #line 7024 "pkl-tab.c"
7024 break;
7025
7026 case 217:
7027 #line 2040 "pkl-tab.y"
7028 { (yyval.ast) = pkl_ast_chainon ((yyvsp[-1].ast), (yyvsp[0].ast)); }
7029 #line 7030 "pkl-tab.c"
7030 break;
7031
7032 case 219:
7033 #line 2043 "pkl-tab.y"
7034 { (yyval.ast) = pkl_ast_chainon ((yyvsp[-1].ast), (yyvsp[0].ast)); }
7035 #line 7036 "pkl-tab.c"
7036 break;
7037
7038 case 220:
7039 #line 2047 "pkl-tab.y"
7040 { (yyval.integer) = PKL_AST_OP_POW; }
7041 #line 7042 "pkl-tab.c"
7042 break;
7043
7044 case 221:
7045 #line 2048 "pkl-tab.y"
7046 { (yyval.integer) = PKL_AST_OP_MUL; }
7047 #line 7048 "pkl-tab.c"
7048 break;
7049
7050 case 222:
7051 #line 2049 "pkl-tab.y"
7052 { (yyval.integer) = PKL_AST_OP_DIV; }
7053 #line 7054 "pkl-tab.c"
7054 break;
7055
7056 case 223:
7057 #line 2050 "pkl-tab.y"
7058 { (yyval.integer) = PKL_AST_OP_MOD; }
7059 #line 7060 "pkl-tab.c"
7060 break;
7061
7062 case 224:
7063 #line 2051 "pkl-tab.y"
7064 { (yyval.integer) = PKL_AST_OP_ADD; }
7065 #line 7066 "pkl-tab.c"
7066 break;
7067
7068 case 225:
7069 #line 2052 "pkl-tab.y"
7070 { (yyval.integer) = PKL_AST_OP_SUB; }
7071 #line 7072 "pkl-tab.c"
7072 break;
7073
7074 case 226:
7075 #line 2053 "pkl-tab.y"
7076 { (yyval.integer) = PKL_AST_OP_SL; }
7077 #line 7078 "pkl-tab.c"
7078 break;
7079
7080 case 227:
7081 #line 2054 "pkl-tab.y"
7082 { (yyval.integer) = PKL_AST_OP_SR; }
7083 #line 7084 "pkl-tab.c"
7084 break;
7085
7086 case 228:
7087 #line 2055 "pkl-tab.y"
7088 { (yyval.integer) = PKL_AST_OP_BAND; }
7089 #line 7090 "pkl-tab.c"
7090 break;
7091
7092 case 229:
7093 #line 2056 "pkl-tab.y"
7094 { (yyval.integer) = PKL_AST_OP_IOR; }
7095 #line 7096 "pkl-tab.c"
7096 break;
7097
7098 case 230:
7099 #line 2057 "pkl-tab.y"
7100 { (yyval.integer) = PKL_AST_OP_XOR; }
7101 #line 7102 "pkl-tab.c"
7102 break;
7103
7104 case 231:
7105 #line 2061 "pkl-tab.y"
7106 { (yyval.ast) = NULL; }
7107 #line 7108 "pkl-tab.c"
7108 break;
7109
7110 case 233:
7111 #line 2064 "pkl-tab.y"
7112 { (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), (yyvsp[0].ast)); }
7113 #line 7114 "pkl-tab.c"
7114 break;
7115
7116 case 234:
7117 #line 2069 "pkl-tab.y"
7118 {
7119 (yyval.ast) = pkl_ast_make_ass_stmt (pkl_parser->ast,
7120 (yyvsp[-2].ast), (yyvsp[0].ast));
7121 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7122 }
7123 #line 7124 "pkl-tab.c"
7124 break;
7125
7126 case 235:
7127 #line 2075 "pkl-tab.y"
7128 {
7129 pkl_ast_node exp
7130 = pkl_ast_make_binary_exp (pkl_parser->ast,
7131 (yyvsp[-1].integer), (yyvsp[-2].ast), (yyvsp[0].ast));
7132
7133 (yyval.ast) = pkl_ast_make_ass_stmt (pkl_parser->ast,
7134 (yyvsp[-2].ast), exp);
7135 PKL_AST_LOC (exp) = (yyloc);
7136 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7137 }
7138 #line 7139 "pkl-tab.c"
7139 break;
7140
7141 case 236:
7142 #line 2086 "pkl-tab.y"
7143 {
7144 (yyval.ast) = pkl_ast_make_ass_stmt (pkl_parser->ast,
7145 (yyvsp[-2].ast), (yyvsp[0].ast));
7146 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7147 }
7148 #line 7149 "pkl-tab.c"
7149 break;
7150
7151 case 237:
7152 #line 2092 "pkl-tab.y"
7153 {
7154 (yyval.ast) = pkl_ast_make_ass_stmt (pkl_parser->ast,
7155 (yyvsp[-2].ast), (yyvsp[0].ast));
7156 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7157 }
7158 #line 7159 "pkl-tab.c"
7159 break;
7160
7161 case 238:
7162 #line 2098 "pkl-tab.y"
7163 {
7164 (yyval.ast) = pkl_ast_make_exp_stmt (pkl_parser->ast,
7165 (yyvsp[0].ast));
7166 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7167 }
7168 #line 7169 "pkl-tab.c"
7169 break;
7170
7171 case 239:
7172 #line 2104 "pkl-tab.y"
7173 {
7174 (yyval.ast) = pkl_ast_make_print_stmt (pkl_parser->ast,
7175 (yyvsp[-2].ast), (yyvsp[-1].ast));
7176 PKL_AST_LOC ((yyvsp[-2].ast)) = (yylsp[-2]);
7177 if (PKL_AST_TYPE ((yyvsp[-2].ast)))
7178 PKL_AST_LOC (PKL_AST_TYPE ((yyvsp[-2].ast))) = (yylsp[-2]);
7179 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7180 }
7181 #line 7182 "pkl-tab.c"
7182 break;
7183
7184 case 240:
7185 #line 2113 "pkl-tab.y"
7186 {
7187 if (((yyval.ast) = pkl_make_assertion (pkl_parser, (yyvsp[-1].ast), NULL, (yyloc)))
7188 == NULL)
7189 YYERROR;
7190 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7191 }
7192 #line 7193 "pkl-tab.c"
7193 break;
7194
7195 case 241:
7196 #line 2120 "pkl-tab.y"
7197 {
7198 if (((yyval.ast) = pkl_make_assertion (pkl_parser, (yyvsp[-3].ast), (yyvsp[-1].ast), (yyloc)))
7199 == NULL)
7200 YYERROR;
7201 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7202 }
7203 #line 7204 "pkl-tab.c"
7204 break;
7205
7206 case 242:
7207 #line 2127 "pkl-tab.y"
7208 {
7209 (yyval.ast) = pkl_ast_make_exp_stmt (pkl_parser->ast,
7210 (yyvsp[0].ast));
7211 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7212 }
7213 #line 7214 "pkl-tab.c"
7214 break;
7215
7216 case 244:
7217 #line 2137 "pkl-tab.y"
7218 {
7219 (yyval.ast) = pkl_ast_make_null_stmt (pkl_parser->ast);
7220 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7221 }
7222 #line 7223 "pkl-tab.c"
7223 break;
7224
7225 case 245:
7226 #line 2142 "pkl-tab.y"
7227 {
7228 (yyval.ast) = (yyvsp[-1].ast);
7229 }
7230 #line 7231 "pkl-tab.c"
7231 break;
7232
7233 case 246:
7234 #line 2146 "pkl-tab.y"
7235 {
7236 (yyval.ast) = pkl_ast_make_if_stmt (pkl_parser->ast,
7237 (yyvsp[-2].ast), (yyvsp[0].ast), NULL);
7238 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7239 }
7240 #line 7241 "pkl-tab.c"
7241 break;
7242
7243 case 247:
7244 #line 2152 "pkl-tab.y"
7245 {
7246 (yyval.ast) = pkl_ast_make_if_stmt (pkl_parser->ast,
7247 (yyvsp[-4].ast), (yyvsp[-2].ast), (yyvsp[0].ast));
7248 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7249 }
7250 #line 7251 "pkl-tab.c"
7251 break;
7252
7253 case 248:
7254 #line 2158 "pkl-tab.y"
7255 {
7256 (yyval.ast) = pkl_ast_make_loop_stmt (pkl_parser->ast,
7257 PKL_AST_LOOP_STMT_KIND_WHILE,
7258 NULL, /* iterator */
7259 (yyvsp[-2].ast), /* condition */
7260 NULL, /* head */
7261 NULL, /* tail */
7262 (yyvsp[0].ast)); /* body */
7263 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7264
7265 /* Annotate the contained BREAK and CONTINUE
7266 statements with their lexical level within this
7267 loop. */
7268 pkl_ast_finish_breaks ((yyval.ast), (yyvsp[0].ast));
7269 }
7270 #line 7271 "pkl-tab.c"
7271 break;
7272
7273 case 249:
7274 #line 2174 "pkl-tab.y"
7275 {
7276 (yyval.ast) = pkl_ast_make_loop_stmt (pkl_parser->ast,
7277 PKL_AST_LOOP_STMT_KIND_FOR,
7278 NULL, /* iterator */
7279 (yyvsp[-4].ast), /* condition */
7280 (yyvsp[-6].ast), /* head */
7281 (yyvsp[-2].ast), /* tail */
7282 (yyvsp[0].ast)); /* body */
7283 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7284
7285 /* Annotate the contained BREAK and CONTINUE
7286 statements with their lexical level within this
7287 loop. */
7288 pkl_ast_finish_breaks ((yyval.ast), (yyvsp[0].ast));
7289
7290 /* Pop the frame introduced by `pushlevel'
7291 above. */
7292 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
7293 }
7294 #line 7295 "pkl-tab.c"
7295 break;
7296
7297 case 250:
7298 #line 2194 "pkl-tab.y"
7299 {
7300 (yyval.ast) = pkl_ast_make_loop_stmt (pkl_parser->ast,
7301 PKL_AST_LOOP_STMT_KIND_FOR,
7302 NULL, /* iterator */
7303 (yyvsp[-4].ast), /* condition */
7304 NULL, /* head */
7305 (yyvsp[-2].ast), /* tail */
7306 (yyvsp[0].ast)); /* body */
7307
7308 /* Annotate the contained BREAK and CONTINUE
7309 statements with their lexical level within this
7310 loop. */
7311 pkl_ast_finish_breaks ((yyval.ast), (yyvsp[0].ast));
7312
7313 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7314 }
7315 #line 7316 "pkl-tab.c"
7316 break;
7317
7318 case 251:
7319 #line 2211 "pkl-tab.y"
7320 {
7321 /* Push a new lexical level and register a variable
7322 with name IDENTIFIER. Note that the variable is
7323 created with a dummy INITIAL, as there is none. */
7324
7325 pkl_ast_node dummy = pkl_ast_make_integer (pkl_parser->ast,
7326 0);
7327 PKL_AST_LOC (dummy) = (yylsp[-3]);
7328
7329 (yyval.ast) = pkl_ast_make_decl (pkl_parser->ast,
7330 PKL_AST_DECL_KIND_VAR,
7331 (yyvsp[-3].ast),
7332 dummy,
7333 pkl_parser->filename);
7334 PKL_AST_LOC ((yyval.ast)) = (yylsp[-3]);
7335
7336 if (!pkl_env_register (pkl_parser->env,
7337 PKL_ENV_NS_MAIN,
7338 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-3].ast)),
7339 (yyval.ast)))
7340 /* This should never happen. */
7341 assert (0);
7342 }
7343 #line 7344 "pkl-tab.c"
7344 break;
7345
7346 case 252:
7347 #line 2235 "pkl-tab.y"
7348 {
7349 pkl_ast_node iterator
7350 = pkl_ast_make_loop_stmt_iterator (pkl_parser->ast,
7351 (yyvsp[-2].ast), /* decl */
7352 (yyvsp[-4].ast)); /* container */
7353 PKL_AST_LOC (iterator) = (yyloc);
7354
7355 (yyval.ast) = pkl_ast_make_loop_stmt (pkl_parser->ast,
7356 PKL_AST_LOOP_STMT_KIND_FOR_IN,
7357 iterator,
7358 NULL, /* condition */
7359 NULL, /* head */
7360 NULL, /* tail */
7361 (yyvsp[0].ast)); /* body */
7362 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7363
7364 /* Free the identifier. */
7365 (yyvsp[-6].ast) = ASTREF ((yyvsp[-6].ast)); pkl_ast_node_free ((yyvsp[-6].ast));
7366
7367 /* Annotate the contained BREAK and CONTINUE
7368 statements with their lexical level within this
7369 loop. */
7370 pkl_ast_finish_breaks ((yyval.ast), (yyvsp[0].ast));
7371
7372 /* Pop the frame introduced by `pushlevel'
7373 above. */
7374 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
7375 }
7376 #line 7377 "pkl-tab.c"
7377 break;
7378
7379 case 253:
7380 #line 2264 "pkl-tab.y"
7381 {
7382 /* XXX: avoid code replication here. */
7383
7384 /* Push a new lexical level and register a variable
7385 with name IDENTIFIER. Note that the variable is
7386 created with a dummy INITIAL, as there is none. */
7387
7388 pkl_ast_node dummy = pkl_ast_make_integer (pkl_parser->ast,
7389 0);
7390 PKL_AST_LOC (dummy) = (yylsp[-3]);
7391
7392 (yyval.ast) = pkl_ast_make_decl (pkl_parser->ast,
7393 PKL_AST_DECL_KIND_VAR,
7394 (yyvsp[-3].ast),
7395 dummy,
7396 pkl_parser->filename);
7397 PKL_AST_LOC ((yyval.ast)) = (yylsp[-3]);
7398
7399 if (!pkl_env_register (pkl_parser->env,
7400 PKL_ENV_NS_MAIN,
7401 PKL_AST_IDENTIFIER_POINTER ((yyvsp[-3].ast)),
7402 (yyval.ast)))
7403 /* This should never happen. */
7404 assert (0);
7405 }
7406 #line 7407 "pkl-tab.c"
7407 break;
7408
7409 case 254:
7410 #line 2290 "pkl-tab.y"
7411 {
7412 pkl_ast_node iterator
7413 = pkl_ast_make_loop_stmt_iterator (pkl_parser->ast,
7414 (yyvsp[-4].ast), /* decl */
7415 (yyvsp[-6].ast)); /* container */
7416 PKL_AST_LOC (iterator) = (yyloc);
7417
7418 (yyval.ast) = pkl_ast_make_loop_stmt (pkl_parser->ast,
7419 PKL_AST_LOOP_STMT_KIND_FOR_IN,
7420 iterator,
7421 (yyvsp[-2].ast), /* condition */
7422 NULL, /* head */
7423 NULL, /* tail */
7424 (yyvsp[0].ast)); /* body */
7425 PKL_AST_LOC ((yyvsp[-8].ast)) = (yylsp[-8]);
7426 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7427
7428 /* Annotate the contained BREAK and CONTINUE
7429 statements with their lexical level within this
7430 loop. */
7431 pkl_ast_finish_breaks ((yyval.ast), (yyvsp[0].ast));
7432
7433 /* Pop the frame introduced by `pushlevel'
7434 above. */
7435 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
7436 }
7437 #line 7438 "pkl-tab.c"
7438 break;
7439
7440 case 255:
7441 #line 2317 "pkl-tab.y"
7442 {
7443 (yyval.ast) = pkl_ast_make_break_stmt (pkl_parser->ast);
7444 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7445 }
7446 #line 7447 "pkl-tab.c"
7447 break;
7448
7449 case 256:
7450 #line 2322 "pkl-tab.y"
7451 {
7452 (yyval.ast) = pkl_ast_make_continue_stmt (pkl_parser->ast);
7453 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7454 }
7455 #line 7456 "pkl-tab.c"
7456 break;
7457
7458 case 257:
7459 #line 2327 "pkl-tab.y"
7460 {
7461 (yyval.ast) = pkl_ast_make_return_stmt (pkl_parser->ast,
7462 NULL);
7463 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7464 }
7465 #line 7466 "pkl-tab.c"
7466 break;
7467
7468 case 258:
7469 #line 2333 "pkl-tab.y"
7470 {
7471 (yyval.ast) = pkl_ast_make_return_stmt (pkl_parser->ast,
7472 (yyvsp[-1].ast));
7473 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7474 }
7475 #line 7476 "pkl-tab.c"
7476 break;
7477
7478 case 259:
7479 #line 2339 "pkl-tab.y"
7480 {
7481 (yyval.ast) = pkl_ast_make_try_catch_stmt (pkl_parser->ast,
7482 (yyvsp[-2].ast), (yyvsp[0].ast), NULL, NULL);
7483 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7484 }
7485 #line 7486 "pkl-tab.c"
7486 break;
7487
7488 case 260:
7489 #line 2345 "pkl-tab.y"
7490 {
7491 (yyval.ast) = pkl_ast_make_try_catch_stmt (pkl_parser->ast,
7492 (yyvsp[-4].ast), (yyvsp[0].ast), NULL, (yyvsp[-1].ast));
7493 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7494 }
7495 #line 7496 "pkl-tab.c"
7496 break;
7497
7498 case 261:
7499 #line 2351 "pkl-tab.y"
7500 {
7501 (yyval.ast) = pkl_ast_make_try_catch_stmt (pkl_parser->ast,
7502 (yyvsp[-6].ast), (yyvsp[0].ast), (yyvsp[-2].ast), NULL);
7503 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7504
7505 /* Pop the frame introduced by `pushlevel'
7506 above. */
7507 pkl_parser->env = pkl_env_pop_frame (pkl_parser->env);
7508 }
7509 #line 7510 "pkl-tab.c"
7510 break;
7511
7512 case 262:
7513 #line 2361 "pkl-tab.y"
7514 {
7515 (yyval.ast) = pkl_ast_make_try_until_stmt (pkl_parser->ast,
7516 (yyvsp[-3].ast), (yyvsp[-1].ast));
7517 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7518
7519 /* Annotate the contained BREAK and CONTINUE
7520 statements with their lexical level within this
7521 loop. */
7522 pkl_ast_finish_breaks ((yyval.ast), (yyvsp[-3].ast));
7523 }
7524 #line 7525 "pkl-tab.c"
7525 break;
7526
7527 case 263:
7528 #line 2372 "pkl-tab.y"
7529 {
7530 (yyval.ast) = pkl_ast_make_raise_stmt (pkl_parser->ast,
7531 NULL);
7532 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7533 }
7534 #line 7535 "pkl-tab.c"
7535 break;
7536
7537 case 264:
7538 #line 2378 "pkl-tab.y"
7539 {
7540 (yyval.ast) = pkl_ast_make_raise_stmt (pkl_parser->ast,
7541 (yyvsp[-1].ast));
7542 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7543 }
7544 #line 7545 "pkl-tab.c"
7545 break;
7546
7547 case 265:
7548 #line 2384 "pkl-tab.y"
7549 {
7550 (yyval.ast) = pkl_ast_make_print_stmt (pkl_parser->ast,
7551 NULL /* fmt */, (yyvsp[-1].ast));
7552 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7553 }
7554 #line 7555 "pkl-tab.c"
7555 break;
7556
7557 case 266:
7558 #line 2390 "pkl-tab.y"
7559 {
7560 (yyval.ast) = pkl_ast_make_print_stmt (pkl_parser->ast,
7561 (yyvsp[-2].ast), (yyvsp[-1].ast));
7562 PKL_AST_LOC ((yyvsp[-2].ast)) = (yylsp[-2]);
7563 if (PKL_AST_TYPE ((yyvsp[-2].ast)))
7564 PKL_AST_LOC (PKL_AST_TYPE ((yyvsp[-2].ast))) = (yylsp[-2]);
7565 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7566 }
7567 #line 7568 "pkl-tab.c"
7568 break;
7569
7570 case 267:
7571 #line 2402 "pkl-tab.y"
7572 {
7573 (yyval.ast) = NULL;
7574 }
7575 #line 7576 "pkl-tab.c"
7576 break;
7577
7578 case 268:
7579 #line 2406 "pkl-tab.y"
7580 {
7581 pkl_ast_node arg
7582 = pkl_ast_make_print_stmt_arg (pkl_parser->ast, (yyvsp[0].ast));
7583 PKL_AST_LOC (arg) = (yylsp[0]);
7584
7585 (yyval.ast) = pkl_ast_chainon ((yyvsp[-2].ast), arg);
7586 }
7587 #line 7588 "pkl-tab.c"
7588 break;
7589
7590 case 269:
7591 #line 2417 "pkl-tab.y"
7592 {
7593 (yyval.ast) = pkl_ast_make_funcall (pkl_parser->ast,
7594 (yyvsp[-1].ast), (yyvsp[0].ast));
7595 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7596 }
7597 #line 7598 "pkl-tab.c"
7598 break;
7599
7600 case 271:
7601 #line 2427 "pkl-tab.y"
7602 {
7603 (yyval.ast) = pkl_ast_chainon ((yyvsp[-1].ast), (yyvsp[0].ast));
7604 }
7605 #line 7606 "pkl-tab.c"
7606 break;
7607
7608 case 272:
7609 #line 2434 "pkl-tab.y"
7610 {
7611 (yyval.ast) = pkl_ast_make_funcall_arg (pkl_parser->ast,
7612 (yyvsp[0].ast), (yyvsp[-1].ast));
7613 PKL_AST_LOC ((yyvsp[-1].ast)) = (yylsp[-1]);
7614 PKL_AST_LOC ((yyval.ast)) = (yyloc);
7615 }
7616 #line 7617 "pkl-tab.c"
7617 break;
7618
7619
7620 #line 7621 "pkl-tab.c"
7621
7622 default: break;
7623 }
7624 if (yychar_backup != yychar)
7625 YY_LAC_DISCARD ("yychar change");
7626 }
7627 /* User semantic actions sometimes alter yychar, and that requires
7628 that yytoken be updated with the new translation. We take the
7629 approach of translating immediately before every use of yytoken.
7630 One alternative is translating here after every semantic action,
7631 but that translation would be missed if the semantic action invokes
7632 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
7633 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
7634 incorrect destructor might then be invoked immediately. In the
7635 case of YYERROR or YYBACKUP, subsequent parser actions might lead
7636 to an incorrect destructor call or verbose syntax error message
7637 before the lookahead is translated. */
7638 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
7639
7640 YYPOPSTACK (yylen);
7641 yylen = 0;
7642
7643 *++yyvsp = yyval;
7644 *++yylsp = yyloc;
7645
7646 /* Now 'shift' the result of the reduction. Determine what state
7647 that goes to, based on the state we popped back to and the rule
7648 number reduced by. */
7649 {
7650 const int yylhs = yyr1[yyn] - YYNTOKENS;
7651 const int yyi = yypgoto[yylhs] + *yyssp;
7652 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
7653 ? yytable[yyi]
7654 : yydefgoto[yylhs]);
7655 }
7656
7657 goto yynewstate;
7658
7659
7660 /*--------------------------------------.
7661 | yyerrlab -- here on detecting error. |
7662 `--------------------------------------*/
7663 yyerrlab:
7664 /* Make sure we have latest lookahead translation. See comments at
7665 user semantic actions for why this is necessary. */
7666 yytoken = yychar == PKL_TAB_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
7667 /* If not already recovering from an error, report this error. */
7668 if (!yyerrstatus)
7669 {
7670 ++yynerrs;
7671 {
7672 yypcontext_t yyctx
7673 = {yyssp, yyesa, &yyes, &yyes_capacity, yytoken, &yylloc};
7674 if (yychar != PKL_TAB_EMPTY)
7675 YY_LAC_ESTABLISH;
7676 if (yyreport_syntax_error (&yyctx, pkl_parser) == 2)
7677 goto yyexhaustedlab;
7678 }
7679 }
7680
7681 yyerror_range[1] = yylloc;
7682 if (yyerrstatus == 3)
7683 {
7684 /* If just tried and failed to reuse lookahead token after an
7685 error, discard it. */
7686
7687 if (yychar <= PKL_TAB_EOF)
7688 {
7689 /* Return failure if at end of input. */
7690 if (yychar == PKL_TAB_EOF)
7691 YYABORT;
7692 }
7693 else
7694 {
7695 yydestruct ("Error: discarding",
7696 yytoken, &yylval, &yylloc, pkl_parser);
7697 yychar = PKL_TAB_EMPTY;
7698 }
7699 }
7700
7701 /* Else will try to reuse lookahead token after shifting the error
7702 token. */
7703 goto yyerrlab1;
7704
7705
7706 /*---------------------------------------------------.
7707 | yyerrorlab -- error raised explicitly by YYERROR. |
7708 `---------------------------------------------------*/
7709 yyerrorlab:
7710 /* Pacify compilers when the user code never invokes YYERROR and the
7711 label yyerrorlab therefore never appears in user code. */
7712 if (0)
7713 YYERROR;
7714
7715 /* Do not reclaim the symbols of the rule whose action triggered
7716 this YYERROR. */
7717 YYPOPSTACK (yylen);
7718 yylen = 0;
7719 YY_STACK_PRINT (yyss, yyssp);
7720 yystate = *yyssp;
7721 goto yyerrlab1;
7722
7723
7724 /*-------------------------------------------------------------.
7725 | yyerrlab1 -- common code for both syntax error and YYERROR. |
7726 `-------------------------------------------------------------*/
7727 yyerrlab1:
7728 yyerrstatus = 3; /* Each real token shifted decrements this. */
7729
7730 /* Pop stack until we find a state that shifts the error token. */
7731 for (;;)
7732 {
7733 yyn = yypact[yystate];
7734 if (!yypact_value_is_default (yyn))
7735 {
7736 yyn += YYSYMBOL_YYerror;
7737 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
7738 {
7739 yyn = yytable[yyn];
7740 if (0 < yyn)
7741 break;
7742 }
7743 }
7744
7745 /* Pop the current state because it cannot handle the error token. */
7746 if (yyssp == yyss)
7747 YYABORT;
7748
7749 yyerror_range[1] = *yylsp;
7750 yydestruct ("Error: popping",
7751 YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, pkl_parser);
7752 YYPOPSTACK (1);
7753 yystate = *yyssp;
7754 YY_STACK_PRINT (yyss, yyssp);
7755 }
7756
7757 /* If the stack popping above didn't lose the initial context for the
7758 current lookahead token, the shift below will for sure. */
7759 YY_LAC_DISCARD ("error recovery");
7760
7761 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
7762 *++yyvsp = yylval;
7763 YY_IGNORE_MAYBE_UNINITIALIZED_END
7764
7765 yyerror_range[2] = yylloc;
7766 ++yylsp;
7767 YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
7768
7769 /* Shift the error token. */
7770 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
7771
7772 yystate = yyn;
7773 goto yynewstate;
7774
7775
7776 /*-------------------------------------.
7777 | yyacceptlab -- YYACCEPT comes here. |
7778 `-------------------------------------*/
7779 yyacceptlab:
7780 yyresult = 0;
7781 goto yyreturn;
7782
7783
7784 /*-----------------------------------.
7785 | yyabortlab -- YYABORT comes here. |
7786 `-----------------------------------*/
7787 yyabortlab:
7788 yyresult = 1;
7789 goto yyreturn;
7790
7791
7792 #if 1
7793 /*-------------------------------------------------.
7794 | yyexhaustedlab -- memory exhaustion comes here. |
7795 `-------------------------------------------------*/
7796 yyexhaustedlab:
7797 yyerror (&yylloc, pkl_parser, YY_("memory exhausted"));
7798 yyresult = 2;
7799 /* Fall through. */
7800 #endif
7801
7802
7803 /*-----------------------------------------------------.
7804 | yyreturn -- parsing is finished, return the result. |
7805 `-----------------------------------------------------*/
7806 yyreturn:
7807 if (yychar != PKL_TAB_EMPTY)
7808 {
7809 /* Make sure we have latest lookahead translation. See comments at
7810 user semantic actions for why this is necessary. */
7811 yytoken = YYTRANSLATE (yychar);
7812 yydestruct ("Cleanup: discarding lookahead",
7813 yytoken, &yylval, &yylloc, pkl_parser);
7814 }
7815 /* Do not reclaim the symbols of the rule whose action triggered
7816 this YYABORT or YYACCEPT. */
7817 YYPOPSTACK (yylen);
7818 YY_STACK_PRINT (yyss, yyssp);
7819 while (yyssp != yyss)
7820 {
7821 yydestruct ("Cleanup: popping",
7822 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, pkl_parser);
7823 YYPOPSTACK (1);
7824 }
7825 #ifndef yyoverflow
7826 if (yyss != yyssa)
7827 YYSTACK_FREE (yyss);
7828 #endif
7829 if (yyes != yyesa)
7830 YYSTACK_FREE (yyes);
7831
7832 return yyresult;
7833 }
7834
7835 #line 2473 "pkl-tab.y"
7836
7837
7838 /* Handle syntax errors. */
7839
7840 int
yyreport_syntax_error(const yypcontext_t * ctx,struct pkl_parser * pkl_parser)7841 yyreport_syntax_error (const yypcontext_t *ctx,
7842 struct pkl_parser *pkl_parser)
7843 {
7844 int res = 0;
7845 char *errmsg;
7846 yysymbol_kind_t lookahead = yypcontext_token (ctx);
7847
7848 errmsg = strdup ("syntax error");
7849 if (!errmsg)
7850 return YYENOMEM;
7851
7852 /* if the unexpected token is alien, then report
7853 pkl_parser->alien_err_msg. */
7854 if (lookahead == YYSYMBOL_ALIEN)
7855 {
7856 pkl_tab_error (yypcontext_location (ctx),
7857 pkl_parser,
7858 pkl_parser->alien_errmsg);
7859 free (pkl_parser->alien_errmsg);
7860 pkl_parser->alien_errmsg = NULL;
7861 }
7862 else
7863 {
7864 /* report tokens expected at this point. */
7865 yysymbol_kind_t expected[YYNTOKENS];
7866 int nexpected = yypcontext_expected_tokens (ctx, expected, YYNTOKENS);
7867
7868 if (nexpected < 0)
7869 /* forward errors to yyparse. */
7870 res = nexpected;
7871 else
7872 {
7873 /* XXX use expected? */
7874 #if 0
7875 int i;
7876
7877 for (i = 0; i < nexpected; ++i)
7878 {
7879 char *tmp = pk_str_concat (errmsg,
7880 i == 0 ? ": expected " : " or ",
7881 yysymbol_name (expected[i]),
7882 NULL);
7883 free (errmsg);
7884 errmsg = tmp;
7885 }
7886 #endif
7887 /* XXX use a table with better names for tokens. */
7888 if (lookahead != YYSYMBOL_YYEMPTY)
7889 {
7890 char *tmp = pk_str_concat (errmsg,
7891 ": unexpected ",
7892 yysymbol_name (lookahead),
7893 NULL);
7894 free (errmsg);
7895 if (!tmp)
7896 return YYENOMEM;
7897 errmsg = tmp;
7898 }
7899
7900 pkl_tab_error (yypcontext_location (ctx), pkl_parser, errmsg);
7901 free (errmsg);
7902 }
7903 }
7904
7905 return res;
7906 }
7907