Debian Codegraph @

formats/ctf/metadata/ctf-parser.c

raw
1 /* A Bison parser, made by GNU Bison 3.0.4. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
29
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
42
43 /* Identify Bison output. */
44 #define YYBISON 1
45
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.4"
48
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers. */
53 #define YYPURE 1
54
55 /* Push parsers. */
56 #define YYPUSH 0
57
58 /* Pull parsers. */
59 #define YYPULL 1
60
61
62
63
64 /* Copy the first part of user declarations. */
65 #line 1 "ctf-parser.y" /* yacc.c:339 */
66
67 /*
68 * ctf-parser.y
69 *
70 * Common Trace Format Metadata Grammar.
71 *
72 * Copyright 2010 - Mathieu Desnoyers <[email protected]>
73 *
74 * Permission is hereby granted, free of charge, to any person obtaining a copy
75 * of this software and associated documentation files (the "Software"), to deal
76 * in the Software without restriction, including without limitation the rights
77 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
78 * copies of the Software, and to permit persons to whom the Software is
79 * furnished to do so, subject to the following conditions:
80 *
81 * The above copyright notice and this permission notice shall be included in
82 * all copies or substantial portions of the Software.
83 *
84 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
85 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
86 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
87 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
88 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
89 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
90 * SOFTWARE.
91 */
92
93 #include <stdio.h>
94 #include <ctype.h>
95 #include <unistd.h>
96 #include <string.h>
97 #include <stdlib.h>
98 #include <assert.h>
99 #include <glib.h>
100 #include <errno.h>
101 #include <inttypes.h>
102 #include <babeltrace/list.h>
103 #include <babeltrace/babeltrace-internal.h>
104 #include "ctf-scanner.h"
105 #include "ctf-parser.h"
106 #include "ctf-ast.h"
107 #include "objstack.h"
108
109 BT_HIDDEN
110 int yydebug;
111
112 /* Join two lists, put "add" at the end of "head". */
113 static inline void
114 _bt_list_splice_tail (struct bt_list_head *add, struct bt_list_head *head)
115 {
116 /* Do nothing if the list which gets added is empty. */
117 if (add != add->next) {
118 add->next->prev = head->prev;
119 add->prev->next = head;
120 head->prev->next = add->next;
121 head->prev = add->prev;
122 }
123 }
124
125 BT_HIDDEN
126 int yyparse(struct ctf_scanner *scanner, yyscan_t yyscanner);
127 BT_HIDDEN
128 int yylex(union YYSTYPE *yyval, yyscan_t yyscanner);
129 BT_HIDDEN
130 int yylex_init_extra(struct ctf_scanner *scanner, yyscan_t * ptr_yy_globals);
131 BT_HIDDEN
132 int yylex_destroy(yyscan_t yyscanner);
133 BT_HIDDEN
134 void yyrestart(FILE * in_str, yyscan_t yyscanner);
135 BT_HIDDEN
136 int yyget_lineno(yyscan_t yyscanner);
137 BT_HIDDEN
138 char *yyget_text(yyscan_t yyscanner);
139
140 static const char *node_type_to_str[] = {
141 #define ENTRY(S) [S] = #S,
142 FOREACH_CTF_NODES(ENTRY)
143 #undef ENTRY
144 };
145
146 /*
147 * Static node for out of memory errors. Only "type" is used. lineno is
148 * always left at 0. The rest of the node content can be overwritten,
149 * but is never used.
150 */
151 static struct ctf_node error_node = {
152 .type = NODE_ERROR,
153 };
154
155 BT_HIDDEN
156 const char *node_type(struct ctf_node *node)
157 {
158 if (node->type < NR_NODE_TYPES)
159 return node_type_to_str[node->type];
160 else
161 return NULL;
162 }
163
164 void setstring(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src)
165 {
166 lvalp->s = objstack_alloc(scanner->objstack, strlen(src) + 1);
167 strcpy(lvalp->s, src);
168 }
169
170 static
171 int str_check(size_t str_len, size_t offset, size_t len)
172 {
173 /* check overflow */
174 if (offset + len < offset)
175 return -1;
176 if (offset + len > str_len)
177 return -1;
178 return 0;
179 }
180
181 static
182 int bt_isodigit(int c)
183 {
184 switch (c) {
185 case '0':
186 case '1':
187 case '2':
188 case '3':
189 case '4':
190 case '5':
191 case '6':
192 case '7':
193 return 1;
194 default:
195 return 0;
196 }
197 }
198
199 static
200 int parse_base_sequence(const char *src, size_t len, size_t pos,
201 char *buffer, size_t *buf_len, int base)
202 {
203 const size_t max_char = 3;
204 int nr_char = 0;
205
206 while (!str_check(len, pos, 1) && nr_char < max_char) {
207 char c = src[pos++];
208
209 if (base == 8) {
210 if (bt_isodigit(c))
211 buffer[nr_char++] = c;
212 else
213 break;
214 } else if (base == 16) {
215 if (isxdigit(c))
216 buffer[nr_char++] = c;
217 else
218 break;
219
220 } else {
221 /* Unsupported base */
222 return -1;
223 }
224 }
225 assert(nr_char > 0);
226 buffer[nr_char] = '\0';
227 *buf_len = nr_char;
228 return 0;
229 }
230
231 static
232 int import_basic_string(struct ctf_scanner *scanner, YYSTYPE *lvalp,
233 size_t len, const char *src, char delim)
234 {
235 size_t pos = 0, dpos = 0;
236
237 if (str_check(len, pos, 1))
238 return -1;
239 if (src[pos++] != delim)
240 return -1;
241
242 while (src[pos] != delim) {
243 char c;
244
245 if (str_check(len, pos, 1))
246 return -1;
247 c = src[pos++];
248 if (c == '\\') {
249 if (str_check(len, pos, 1))
250 return -1;
251 c = src[pos++];
252
253 switch (c) {
254 case 'a':
255 c = '\a';
256 break;
257 case 'b':
258 c = '\b';
259 break;
260 case 'f':
261 c = '\f';
262 break;
263 case 'n':
264 c = '\n';
265 break;
266 case 'r':
267 c = '\r';
268 break;
269 case 't':
270 c = '\t';
271 break;
272 case 'v':
273 c = '\v';
274 break;
275 case '\\':
276 c = '\\';
277 break;
278 case '\'':
279 c = '\'';
280 break;
281 case '\"':
282 c = '\"';
283 break;
284 case '?':
285 c = '?';
286 break;
287 case '0':
288 case '1':
289 case '2':
290 case '3':
291 case '4':
292 case '5':
293 case '6':
294 case '7':
295 {
296 char oct_buffer[4];
297 size_t oct_len;
298
299 if (parse_base_sequence(src, len, pos - 1,
300 oct_buffer, &oct_len, 8))
301 return -1;
302 c = strtoul(&oct_buffer[0], NULL, 8);
303 pos += oct_len - 1;
304 break;
305 }
306 case 'x':
307 {
308 char hex_buffer[4];
309 size_t hex_len;
310
311 if (parse_base_sequence(src, len, pos,
312 hex_buffer, &hex_len, 16))
313 return -1;
314 c = strtoul(&hex_buffer[0], NULL, 16);
315 pos += hex_len;
316 break;
317 }
318 default:
319 return -1;
320 }
321 }
322 if (str_check(len, dpos, 1))
323 return -1;
324 lvalp->s[dpos++] = c;
325 }
326
327 if (str_check(len, dpos, 1))
328 return -1;
329 lvalp->s[dpos++] = '\0';
330
331 if (str_check(len, pos, 1))
332 return -1;
333 if (src[pos++] != delim)
334 return -1;
335
336 if (str_check(len, pos, 1))
337 return -1;
338 if (src[pos] != '\0')
339 return -1;
340 return 0;
341 }
342
343 int import_string(struct ctf_scanner *scanner, YYSTYPE *lvalp,
344 const char *src, char delim)
345 {
346 size_t len;
347
348 len = strlen(src) + 1;
349 lvalp->s = objstack_alloc(scanner->objstack, len);
350 if (src[0] == 'L') {
351 // TODO: import wide string
352 printfl_error(yyget_lineno(scanner),
353 "Wide string not supported yet.");
354 return -1;
355 } else {
356 return import_basic_string(scanner, lvalp, len, src, delim);
357 }
358 }
359
360 static void init_scope(struct ctf_scanner_scope *scope,
361 struct ctf_scanner_scope *parent)
362 {
363 scope->parent = parent;
364 scope->types = g_hash_table_new_full(g_str_hash, g_str_equal,
365 NULL, NULL);
366 }
367
368 static void finalize_scope(struct ctf_scanner_scope *scope)
369 {
370 g_hash_table_destroy(scope->types);
371 }
372
373 static void push_scope(struct ctf_scanner *scanner)
374 {
375 struct ctf_scanner_scope *ns;
376
377 printf_debug("push scope\n");
378 ns = malloc(sizeof(struct ctf_scanner_scope));
379 init_scope(ns, scanner->cs);
380 scanner->cs = ns;
381 }
382
383 static void pop_scope(struct ctf_scanner *scanner)
384 {
385 struct ctf_scanner_scope *os;
386
387 printf_debug("pop scope\n");
388 os = scanner->cs;
389 scanner->cs = os->parent;
390 finalize_scope(os);
391 free(os);
392 }
393
394 static int lookup_type(struct ctf_scanner_scope *s, const char *id)
395 {
396 int ret;
397
398 ret = (int) (long) g_hash_table_lookup(s->types, id);
399 printf_debug("lookup %p %s %d\n", s, id, ret);
400 return ret;
401 }
402
403 BT_HIDDEN
404 int is_type(struct ctf_scanner *scanner, const char *id)
405 {
406 struct ctf_scanner_scope *it;
407 int ret = 0;
408
409 for (it = scanner->cs; it != NULL; it = it->parent) {
410 if (lookup_type(it, id)) {
411 ret = 1;
412 break;
413 }
414 }
415 printf_debug("is type %s %d\n", id, ret);
416 return ret;
417 }
418
419 static void add_type(struct ctf_scanner *scanner, char *id)
420 {
421 printf_debug("add type %s\n", id);
422 if (lookup_type(scanner->cs, id))
423 return;
424 g_hash_table_insert(scanner->cs->types, id, id);
425 }
426
427 static struct ctf_node *make_node(struct ctf_scanner *scanner,
428 enum node_type type)
429 {
430 struct ctf_node *node;
431
432 node = objstack_alloc(scanner->objstack, sizeof(*node));
433 if (!node) {
434 printfl_fatal(yyget_lineno(scanner->scanner), "out of memory");
435 return &error_node;
436 }
437 node->type = type;
438 node->lineno = yyget_lineno(scanner->scanner);
439 BT_INIT_LIST_HEAD(&node->tmp_head);
440 bt_list_add(&node->siblings, &node->tmp_head);
441
442 switch (type) {
443 case NODE_ROOT:
444 node->type = NODE_ERROR;
445 printfn_fatal(node, "trying to create root node");
446 break;
447
448 case NODE_EVENT:
449 BT_INIT_LIST_HEAD(&node->u.event.declaration_list);
450 break;
451 case NODE_STREAM:
452 BT_INIT_LIST_HEAD(&node->u.stream.declaration_list);
453 break;
454 case NODE_ENV:
455 BT_INIT_LIST_HEAD(&node->u.env.declaration_list);
456 break;
457 case NODE_TRACE:
458 BT_INIT_LIST_HEAD(&node->u.trace.declaration_list);
459 break;
460 case NODE_CLOCK:
461 BT_INIT_LIST_HEAD(&node->u.clock.declaration_list);
462 break;
463 case NODE_CALLSITE:
464 BT_INIT_LIST_HEAD(&node->u.callsite.declaration_list);
465 break;
466
467 case NODE_CTF_EXPRESSION:
468 BT_INIT_LIST_HEAD(&node->u.ctf_expression.left);
469 BT_INIT_LIST_HEAD(&node->u.ctf_expression.right);
470 break;
471 case NODE_UNARY_EXPRESSION:
472 break;
473
474 case NODE_TYPEDEF:
475 BT_INIT_LIST_HEAD(&node->u._typedef.type_declarators);
476 break;
477 case NODE_TYPEALIAS_TARGET:
478 BT_INIT_LIST_HEAD(&node->u.typealias_target.type_declarators);
479 break;
480 case NODE_TYPEALIAS_ALIAS:
481 BT_INIT_LIST_HEAD(&node->u.typealias_alias.type_declarators);
482 break;
483 case NODE_TYPEALIAS:
484 break;
485
486 case NODE_TYPE_SPECIFIER:
487 break;
488 case NODE_TYPE_SPECIFIER_LIST:
489 BT_INIT_LIST_HEAD(&node->u.type_specifier_list.head);
490 break;
491 case NODE_POINTER:
492 break;
493 case NODE_TYPE_DECLARATOR:
494 BT_INIT_LIST_HEAD(&node->u.type_declarator.pointers);
495 break;
496
497 case NODE_FLOATING_POINT:
498 BT_INIT_LIST_HEAD(&node->u.floating_point.expressions);
499 break;
500 case NODE_INTEGER:
501 BT_INIT_LIST_HEAD(&node->u.integer.expressions);
502 break;
503 case NODE_STRING:
504 BT_INIT_LIST_HEAD(&node->u.string.expressions);
505 break;
506 case NODE_ENUMERATOR:
507 BT_INIT_LIST_HEAD(&node->u.enumerator.values);
508 break;
509 case NODE_ENUM:
510 BT_INIT_LIST_HEAD(&node->u._enum.enumerator_list);
511 break;
512 case NODE_STRUCT_OR_VARIANT_DECLARATION:
513 BT_INIT_LIST_HEAD(&node->u.struct_or_variant_declaration.type_declarators);
514 break;
515 case NODE_VARIANT:
516 BT_INIT_LIST_HEAD(&node->u.variant.declaration_list);
517 break;
518 case NODE_STRUCT:
519 BT_INIT_LIST_HEAD(&node->u._struct.declaration_list);
520 BT_INIT_LIST_HEAD(&node->u._struct.min_align);
521 break;
522
523 case NODE_UNKNOWN:
524 default:
525 node->type = NODE_ERROR;
526 printfn_fatal(node, "unknown node type '%d'", (int) type);
527 break;
528 }
529
530 return node;
531 }
532
533 static int reparent_ctf_expression(struct ctf_node *node,
534 struct ctf_node *parent)
535 {
536 switch (parent->type) {
537 case NODE_EVENT:
538 _bt_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
539 break;
540 case NODE_STREAM:
541 _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
542 break;
543 case NODE_ENV:
544 _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
545 break;
546 case NODE_TRACE:
547 _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
548 break;
549 case NODE_CLOCK:
550 _bt_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
551 break;
552 case NODE_CALLSITE:
553 _bt_list_splice_tail(&node->tmp_head, &parent->u.callsite.declaration_list);
554 break;
555 case NODE_FLOATING_POINT:
556 _bt_list_splice_tail(&node->tmp_head, &parent->u.floating_point.expressions);
557 break;
558 case NODE_INTEGER:
559 _bt_list_splice_tail(&node->tmp_head, &parent->u.integer.expressions);
560 break;
561 case NODE_STRING:
562 _bt_list_splice_tail(&node->tmp_head, &parent->u.string.expressions);
563 break;
564
565 case NODE_ROOT:
566 case NODE_CTF_EXPRESSION:
567 case NODE_TYPEDEF:
568 case NODE_TYPEALIAS_TARGET:
569 case NODE_TYPEALIAS_ALIAS:
570 case NODE_TYPEALIAS:
571 case NODE_TYPE_SPECIFIER:
572 case NODE_TYPE_SPECIFIER_LIST:
573 case NODE_POINTER:
574 case NODE_TYPE_DECLARATOR:
575 case NODE_ENUMERATOR:
576 case NODE_ENUM:
577 case NODE_STRUCT_OR_VARIANT_DECLARATION:
578 case NODE_VARIANT:
579 case NODE_STRUCT:
580 case NODE_UNARY_EXPRESSION:
581 return -EPERM;
582
583 case NODE_UNKNOWN:
584 default:
585 printfn_fatal(node, "unknown node type '%d'", (int) parent->type);
586 return -EINVAL;
587 }
588 return 0;
589 }
590
591 static int reparent_typedef(struct ctf_node *node, struct ctf_node *parent)
592 {
593 switch (parent->type) {
594 case NODE_ROOT:
595 _bt_list_splice_tail(&node->tmp_head, &parent->u.root.declaration_list);
596 break;
597 case NODE_EVENT:
598 _bt_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
599 break;
600 case NODE_STREAM:
601 _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
602 break;
603 case NODE_ENV:
604 _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
605 break;
606 case NODE_TRACE:
607 _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
608 break;
609 case NODE_CLOCK:
610 _bt_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
611 break;
612 case NODE_CALLSITE:
613 _bt_list_splice_tail(&node->tmp_head, &parent->u.callsite.declaration_list);
614 break;
615 case NODE_VARIANT:
616 _bt_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
617 break;
618 case NODE_STRUCT:
619 _bt_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
620 break;
621
622 case NODE_FLOATING_POINT:
623 case NODE_INTEGER:
624 case NODE_STRING:
625 case NODE_CTF_EXPRESSION:
626 case NODE_TYPEDEF:
627 case NODE_TYPEALIAS_TARGET:
628 case NODE_TYPEALIAS_ALIAS:
629 case NODE_TYPEALIAS:
630 case NODE_TYPE_SPECIFIER:
631 case NODE_TYPE_SPECIFIER_LIST:
632 case NODE_POINTER:
633 case NODE_TYPE_DECLARATOR:
634 case NODE_ENUMERATOR:
635 case NODE_ENUM:
636 case NODE_STRUCT_OR_VARIANT_DECLARATION:
637 case NODE_UNARY_EXPRESSION:
638 return -EPERM;
639
640 case NODE_UNKNOWN:
641 default:
642 printfn_fatal(node, "unknown node type %d", parent->type);
643 return -EINVAL;
644 }
645 return 0;
646 }
647
648 static int reparent_typealias(struct ctf_node *node, struct ctf_node *parent)
649 {
650 switch (parent->type) {
651 case NODE_ROOT:
652 _bt_list_splice_tail(&node->tmp_head, &parent->u.root.declaration_list);
653 break;
654 case NODE_EVENT:
655 _bt_list_splice_tail(&node->tmp_head, &parent->u.event.declaration_list);
656 break;
657 case NODE_STREAM:
658 _bt_list_splice_tail(&node->tmp_head, &parent->u.stream.declaration_list);
659 break;
660 case NODE_ENV:
661 _bt_list_splice_tail(&node->tmp_head, &parent->u.env.declaration_list);
662 break;
663 case NODE_TRACE:
664 _bt_list_splice_tail(&node->tmp_head, &parent->u.trace.declaration_list);
665 break;
666 case NODE_CLOCK:
667 _bt_list_splice_tail(&node->tmp_head, &parent->u.clock.declaration_list);
668 break;
669 case NODE_CALLSITE:
670 _bt_list_splice_tail(&node->tmp_head, &parent->u.callsite.declaration_list);
671 break;
672 case NODE_VARIANT:
673 _bt_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
674 break;
675 case NODE_STRUCT:
676 _bt_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
677 break;
678
679 case NODE_FLOATING_POINT:
680 case NODE_INTEGER:
681 case NODE_STRING:
682 case NODE_CTF_EXPRESSION:
683 case NODE_TYPEDEF:
684 case NODE_TYPEALIAS_TARGET:
685 case NODE_TYPEALIAS_ALIAS:
686 case NODE_TYPEALIAS:
687 case NODE_TYPE_SPECIFIER:
688 case NODE_TYPE_SPECIFIER_LIST:
689 case NODE_POINTER:
690 case NODE_TYPE_DECLARATOR:
691 case NODE_ENUMERATOR:
692 case NODE_ENUM:
693 case NODE_STRUCT_OR_VARIANT_DECLARATION:
694 case NODE_UNARY_EXPRESSION:
695 return -EPERM;
696
697 case NODE_UNKNOWN:
698 default:
699 printfn_fatal(node, "unknown node type '%d'", (int) parent->type);
700 return -EINVAL;
701 }
702 return 0;
703 }
704
705 static int reparent_type_specifier(struct ctf_node *node,
706 struct ctf_node *parent)
707 {
708 switch (parent->type) {
709 case NODE_TYPE_SPECIFIER_LIST:
710 _bt_list_splice_tail(&node->tmp_head, &parent->u.type_specifier_list.head);
711 break;
712
713 case NODE_TYPE_SPECIFIER:
714 case NODE_EVENT:
715 case NODE_STREAM:
716 case NODE_ENV:
717 case NODE_TRACE:
718 case NODE_CLOCK:
719 case NODE_CALLSITE:
720 case NODE_VARIANT:
721 case NODE_STRUCT:
722 case NODE_TYPEDEF:
723 case NODE_TYPEALIAS_TARGET:
724 case NODE_TYPEALIAS_ALIAS:
725 case NODE_TYPE_DECLARATOR:
726 case NODE_ENUM:
727 case NODE_STRUCT_OR_VARIANT_DECLARATION:
728 case NODE_TYPEALIAS:
729 case NODE_FLOATING_POINT:
730 case NODE_INTEGER:
731 case NODE_STRING:
732 case NODE_CTF_EXPRESSION:
733 case NODE_POINTER:
734 case NODE_ENUMERATOR:
735 case NODE_UNARY_EXPRESSION:
736 return -EPERM;
737
738 case NODE_UNKNOWN:
739 default:
740 printfn_fatal(node, "unknown node type '%d'", (int) parent->type);
741 return -EINVAL;
742 }
743 return 0;
744 }
745
746 static int reparent_type_specifier_list(struct ctf_node *node,
747 struct ctf_node *parent)
748 {
749 switch (parent->type) {
750 case NODE_ROOT:
751 bt_list_add_tail(&node->siblings, &parent->u.root.declaration_list);
752 break;
753 case NODE_EVENT:
754 bt_list_add_tail(&node->siblings, &parent->u.event.declaration_list);
755 break;
756 case NODE_STREAM:
757 bt_list_add_tail(&node->siblings, &parent->u.stream.declaration_list);
758 break;
759 case NODE_ENV:
760 bt_list_add_tail(&node->siblings, &parent->u.env.declaration_list);
761 break;
762 case NODE_TRACE:
763 bt_list_add_tail(&node->siblings, &parent->u.trace.declaration_list);
764 break;
765 case NODE_CLOCK:
766 bt_list_add_tail(&node->siblings, &parent->u.clock.declaration_list);
767 break;
768 case NODE_CALLSITE:
769 bt_list_add_tail(&node->siblings, &parent->u.callsite.declaration_list);
770 break;
771 case NODE_VARIANT:
772 bt_list_add_tail(&node->siblings, &parent->u.variant.declaration_list);
773 break;
774 case NODE_STRUCT:
775 bt_list_add_tail(&node->siblings, &parent->u._struct.declaration_list);
776 break;
777 case NODE_TYPEDEF:
778 parent->u._typedef.type_specifier_list = node;
779 break;
780 case NODE_TYPEALIAS_TARGET:
781 parent->u.typealias_target.type_specifier_list = node;
782 break;
783 case NODE_TYPEALIAS_ALIAS:
784 parent->u.typealias_alias.type_specifier_list = node;
785 break;
786 case NODE_ENUM:
787 parent->u._enum.container_type = node;
788 break;
789 case NODE_STRUCT_OR_VARIANT_DECLARATION:
790 parent->u.struct_or_variant_declaration.type_specifier_list = node;
791 break;
792 case NODE_TYPE_DECLARATOR:
793 case NODE_TYPE_SPECIFIER:
794 case NODE_TYPEALIAS:
795 case NODE_FLOATING_POINT:
796 case NODE_INTEGER:
797 case NODE_STRING:
798 case NODE_CTF_EXPRESSION:
799 case NODE_POINTER:
800 case NODE_ENUMERATOR:
801 case NODE_UNARY_EXPRESSION:
802 return -EPERM;
803
804 case NODE_UNKNOWN:
805 default:
806 printfn_fatal(node, "unknown node type '%d'", (int) parent->type);
807 return -EINVAL;
808 }
809 return 0;
810 }
811
812 static int reparent_type_declarator(struct ctf_node *node,
813 struct ctf_node *parent)
814 {
815 switch (parent->type) {
816 case NODE_TYPE_DECLARATOR:
817 parent->u.type_declarator.type = TYPEDEC_NESTED;
818 parent->u.type_declarator.u.nested.type_declarator = node;
819 break;
820 case NODE_STRUCT_OR_VARIANT_DECLARATION:
821 _bt_list_splice_tail(&node->tmp_head, &parent->u.struct_or_variant_declaration.type_declarators);
822 break;
823 case NODE_TYPEDEF:
824 _bt_list_splice_tail(&node->tmp_head, &parent->u._typedef.type_declarators);
825 break;
826 case NODE_TYPEALIAS_TARGET:
827 _bt_list_splice_tail(&node->tmp_head, &parent->u.typealias_target.type_declarators);
828 break;
829 case NODE_TYPEALIAS_ALIAS:
830 _bt_list_splice_tail(&node->tmp_head, &parent->u.typealias_alias.type_declarators);
831 break;
832
833 case NODE_ROOT:
834 case NODE_EVENT:
835 case NODE_STREAM:
836 case NODE_ENV:
837 case NODE_TRACE:
838 case NODE_CLOCK:
839 case NODE_CALLSITE:
840 case NODE_VARIANT:
841 case NODE_STRUCT:
842 case NODE_TYPEALIAS:
843 case NODE_ENUM:
844 case NODE_FLOATING_POINT:
845 case NODE_INTEGER:
846 case NODE_STRING:
847 case NODE_CTF_EXPRESSION:
848 case NODE_TYPE_SPECIFIER:
849 case NODE_TYPE_SPECIFIER_LIST:
850 case NODE_POINTER:
851 case NODE_ENUMERATOR:
852 case NODE_UNARY_EXPRESSION:
853 return -EPERM;
854
855 case NODE_UNKNOWN:
856 default:
857 printfn_fatal(node, "unknown node type '%d'", (int) parent->type);
858 return -EINVAL;
859 }
860 return 0;
861 }
862
863 /*
864 * set_parent_node
865 *
866 * Link node to parent. Returns 0 on success, -EPERM if it is not permitted to
867 * create the link declared by the input, -ENOENT if node or parent is NULL,
868 * -EINVAL if there is an internal structure problem.
869 */
870 static int set_parent_node(struct ctf_node *node,
871 struct ctf_node *parent)
872 {
873 if (!node || !parent)
874 return -ENOENT;
875
876 /* Note: Linking to parent will be done only by an external visitor */
877
878 switch (node->type) {
879 case NODE_ROOT:
880 printfn_fatal(node, "trying to reparent root node");
881 return -EINVAL;
882
883 case NODE_EVENT:
884 if (parent->type == NODE_ROOT) {
885 _bt_list_splice_tail(&node->tmp_head, &parent->u.root.event);
886 } else {
887 return -EPERM;
888 }
889 break;
890 case NODE_STREAM:
891 if (parent->type == NODE_ROOT) {
892 _bt_list_splice_tail(&node->tmp_head, &parent->u.root.stream);
893 } else {
894 return -EPERM;
895 }
896 break;
897 case NODE_ENV:
898 if (parent->type == NODE_ROOT) {
899 _bt_list_splice_tail(&node->tmp_head, &parent->u.root.env);
900 } else {
901 return -EPERM;
902 }
903 break;
904 case NODE_TRACE:
905 if (parent->type == NODE_ROOT) {
906 _bt_list_splice_tail(&node->tmp_head, &parent->u.root.trace);
907 } else {
908 return -EPERM;
909 }
910 break;
911 case NODE_CLOCK:
912 if (parent->type == NODE_ROOT) {
913 _bt_list_splice_tail(&node->tmp_head, &parent->u.root.clock);
914 } else {
915 return -EPERM;
916 }
917 break;
918 case NODE_CALLSITE:
919 if (parent->type == NODE_ROOT) {
920 _bt_list_splice_tail(&node->tmp_head, &parent->u.root.callsite);
921 } else {
922 return -EPERM;
923 }
924 break;
925
926 case NODE_CTF_EXPRESSION:
927 return reparent_ctf_expression(node, parent);
928 case NODE_UNARY_EXPRESSION:
929 if (parent->type == NODE_TYPE_DECLARATOR)
930 parent->u.type_declarator.bitfield_len = node;
931 else
932 return -EPERM;
933 break;
934
935 case NODE_TYPEDEF:
936 return reparent_typedef(node, parent);
937 case NODE_TYPEALIAS_TARGET:
938 if (parent->type == NODE_TYPEALIAS)
939 parent->u.typealias.target = node;
940 else
941 return -EINVAL;
942 case NODE_TYPEALIAS_ALIAS:
943 if (parent->type == NODE_TYPEALIAS)
944 parent->u.typealias.alias = node;
945 else
946 return -EINVAL;
947 case NODE_TYPEALIAS:
948 return reparent_typealias(node, parent);
949
950 case NODE_POINTER:
951 if (parent->type == NODE_TYPE_DECLARATOR) {
952 _bt_list_splice_tail(&node->tmp_head, &parent->u.type_declarator.pointers);
953 } else
954 return -EPERM;
955 break;
956 case NODE_TYPE_DECLARATOR:
957 return reparent_type_declarator(node, parent);
958
959 case NODE_TYPE_SPECIFIER_LIST:
960 return reparent_type_specifier_list(node, parent);
961
962 case NODE_TYPE_SPECIFIER:
963 return reparent_type_specifier(node, parent);
964
965 case NODE_FLOATING_POINT:
966 case NODE_INTEGER:
967 case NODE_STRING:
968 case NODE_ENUM:
969 case NODE_VARIANT:
970 case NODE_STRUCT:
971 return -EINVAL; /* Dealt with internally within grammar */
972
973 case NODE_ENUMERATOR:
974 if (parent->type == NODE_ENUM) {
975 _bt_list_splice_tail(&node->tmp_head, &parent->u._enum.enumerator_list);
976 } else {
977 return -EPERM;
978 }
979 break;
980 case NODE_STRUCT_OR_VARIANT_DECLARATION:
981 switch (parent->type) {
982 case NODE_STRUCT:
983 _bt_list_splice_tail(&node->tmp_head, &parent->u._struct.declaration_list);
984 break;
985 case NODE_VARIANT:
986 _bt_list_splice_tail(&node->tmp_head, &parent->u.variant.declaration_list);
987 break;
988 default:
989 return -EINVAL;
990 }
991 break;
992
993 case NODE_UNKNOWN:
994 default:
995 printfn_fatal(node, "unknown node type '%d'", (int) parent->type);
996 return -EINVAL;
997 }
998 return 0;
999 }
1000
1001 BT_HIDDEN
1002 void yyerror(struct ctf_scanner *scanner, yyscan_t yyscanner, const char *str)
1003 {
1004 printfl_error(yyget_lineno(scanner->scanner),
1005 "token \"%s\": %s\n",
1006 yyget_text(scanner->scanner), str);
1007 }
1008
1009 BT_HIDDEN
1010 int yywrap(void)
1011 {
1012 return 1;
1013 }
1014
1015 #define reparent_error(scanner, str) \
1016 do { \
1017 yyerror(scanner, scanner->scanner, YY_("reparent_error: " str)); \
1018 YYERROR; \
1019 } while (0)
1020
1021 static struct ctf_ast *ctf_ast_alloc(struct ctf_scanner *scanner)
1022 {
1023 struct ctf_ast *ast;
1024
1025 ast = objstack_alloc(scanner->objstack, sizeof(*ast));
1026 if (!ast)
1027 return NULL;
1028 ast->root.type = NODE_ROOT;
1029 BT_INIT_LIST_HEAD(&ast->root.tmp_head);
1030 BT_INIT_LIST_HEAD(&ast->root.u.root.declaration_list);
1031 BT_INIT_LIST_HEAD(&ast->root.u.root.trace);
1032 BT_INIT_LIST_HEAD(&ast->root.u.root.env);
1033 BT_INIT_LIST_HEAD(&ast->root.u.root.stream);
1034 BT_INIT_LIST_HEAD(&ast->root.u.root.event);
1035 BT_INIT_LIST_HEAD(&ast->root.u.root.clock);
1036 BT_INIT_LIST_HEAD(&ast->root.u.root.callsite);
1037 return ast;
1038 }
1039
1040 int ctf_scanner_append_ast(struct ctf_scanner *scanner, FILE *input)
1041 {
1042 /* Start processing new stream */
1043 yyrestart(input, scanner->scanner);
1044 if (yydebug)
1045 fprintf(stdout, "Scanner input is a%s.\n",
1046 isatty(fileno(input)) ? "n interactive tty" :
1047 " noninteractive file");
1048 return yyparse(scanner, scanner->scanner);
1049 }
1050
1051 struct ctf_scanner *ctf_scanner_alloc(void)
1052 {
1053 struct ctf_scanner *scanner;
1054 int ret;
1055
1056 yydebug = babeltrace_debug;
1057
1058 scanner = malloc(sizeof(*scanner));
1059 if (!scanner)
1060 return NULL;
1061 memset(scanner, 0, sizeof(*scanner));
1062 ret = yylex_init_extra(scanner, &scanner->scanner);
1063 if (ret) {
1064 printf_fatal("yylex_init error");
1065 goto cleanup_scanner;
1066 }
1067 scanner->objstack = objstack_create();
1068 if (!scanner->objstack)
1069 goto cleanup_lexer;
1070 scanner->ast = ctf_ast_alloc(scanner);
1071 if (!scanner->ast)
1072 goto cleanup_objstack;
1073 init_scope(&scanner->root_scope, NULL);
1074 scanner->cs = &scanner->root_scope;
1075
1076 return scanner;
1077
1078 cleanup_objstack:
1079 objstack_destroy(scanner->objstack);
1080 cleanup_lexer:
1081 ret = yylex_destroy(scanner->scanner);
1082 if (!ret)
1083 printf_fatal("yylex_destroy error");
1084 cleanup_scanner:
1085 free(scanner);
1086 return NULL;
1087 }
1088
1089 void ctf_scanner_free(struct ctf_scanner *scanner)
1090 {
1091 int ret;
1092
1093 if (!scanner)
1094 return;
1095 finalize_scope(&scanner->root_scope);
1096 objstack_destroy(scanner->objstack);
1097 ret = yylex_destroy(scanner->scanner);
1098 if (ret)
1099 printf_error("yylex_destroy error");
1100 free(scanner);
1101 }
1102
1103
1104 #line 1105 "ctf-parser.c" /* yacc.c:339 */
1105
1106 # ifndef YY_NULLPTR
1107 # if defined __cplusplus && 201103L <= __cplusplus
1108 # define YY_NULLPTR nullptr
1109 # else
1110 # define YY_NULLPTR 0
1111 # endif
1112 # endif
1113
1114 /* Enabling verbose error messages. */
1115 #ifdef YYERROR_VERBOSE
1116 # undef YYERROR_VERBOSE
1117 # define YYERROR_VERBOSE 1
1118 #else
1119 # define YYERROR_VERBOSE 1
1120 #endif
1121
1122 /* In a future release of Bison, this section will be replaced
1123 by #include "y.tab.h". */
1124 #ifndef YY_YY_CTF_PARSER_H_INCLUDED
1125 # define YY_YY_CTF_PARSER_H_INCLUDED
1126 /* Debug traces. */
1127 #ifndef YYDEBUG
1128 # define YYDEBUG 1
1129 #endif
1130 #if YYDEBUG
1131 extern int yydebug;
1132 #endif
1133
1134 /* Token type. */
1135 #ifndef YYTOKENTYPE
1136 # define YYTOKENTYPE
1137 enum yytokentype
1138 {
1139 INTEGER_LITERAL = 258,
1140 STRING_LITERAL = 259,
1141 CHARACTER_LITERAL = 260,
1142 LSBRAC = 261,
1143 RSBRAC = 262,
1144 LPAREN = 263,
1145 RPAREN = 264,
1146 LBRAC = 265,
1147 RBRAC = 266,
1148 RARROW = 267,
1149 STAR = 268,
1150 PLUS = 269,
1151 MINUS = 270,
1152 LT = 271,
1153 GT = 272,
1154 TYPEASSIGN = 273,
1155 COLON = 274,
1156 SEMICOLON = 275,
1157 DOTDOTDOT = 276,
1158 DOT = 277,
1159 EQUAL = 278,
1160 COMMA = 279,
1161 CONST = 280,
1162 CHAR = 281,
1163 DOUBLE = 282,
1164 ENUM = 283,
1165 ENV = 284,
1166 EVENT = 285,
1167 FLOATING_POINT = 286,
1168 FLOAT = 287,
1169 INTEGER = 288,
1170 INT = 289,
1171 LONG = 290,
1172 SHORT = 291,
1173 SIGNED = 292,
1174 STREAM = 293,
1175 STRING = 294,
1176 STRUCT = 295,
1177 TRACE = 296,
1178 CALLSITE = 297,
1179 CLOCK = 298,
1180 TYPEALIAS = 299,
1181 TYPEDEF = 300,
1182 UNSIGNED = 301,
1183 VARIANT = 302,
1184 VOID = 303,
1185 _BOOL = 304,
1186 _COMPLEX = 305,
1187 _IMAGINARY = 306,
1188 TOK_ALIGN = 307,
1189 IDENTIFIER = 308,
1190 ID_TYPE = 309,
1191 ERROR = 310
1192 };
1193 #endif
1194 /* Tokens. */
1195 #define INTEGER_LITERAL 258
1196 #define STRING_LITERAL 259
1197 #define CHARACTER_LITERAL 260
1198 #define LSBRAC 261
1199 #define RSBRAC 262
1200 #define LPAREN 263
1201 #define RPAREN 264
1202 #define LBRAC 265
1203 #define RBRAC 266
1204 #define RARROW 267
1205 #define STAR 268
1206 #define PLUS 269
1207 #define MINUS 270
1208 #define LT 271
1209 #define GT 272
1210 #define TYPEASSIGN 273
1211 #define COLON 274
1212 #define SEMICOLON 275
1213 #define DOTDOTDOT 276
1214 #define DOT 277
1215 #define EQUAL 278
1216 #define COMMA 279
1217 #define CONST 280
1218 #define CHAR 281
1219 #define DOUBLE 282
1220 #define ENUM 283
1221 #define ENV 284
1222 #define EVENT 285
1223 #define FLOATING_POINT 286
1224 #define FLOAT 287
1225 #define INTEGER 288
1226 #define INT 289
1227 #define LONG 290
1228 #define SHORT 291
1229 #define SIGNED 292
1230 #define STREAM 293
1231 #define STRING 294
1232 #define STRUCT 295
1233 #define TRACE 296
1234 #define CALLSITE 297
1235 #define CLOCK 298
1236 #define TYPEALIAS 299
1237 #define TYPEDEF 300
1238 #define UNSIGNED 301
1239 #define VARIANT 302
1240 #define VOID 303
1241 #define _BOOL 304
1242 #define _COMPLEX 305
1243 #define _IMAGINARY 306
1244 #define TOK_ALIGN 307
1245 #define IDENTIFIER 308
1246 #define ID_TYPE 309
1247 #define ERROR 310
1248
1249 /* Value type. */
1250 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1251
1252 union YYSTYPE
1253 {
1254 #line 1060 "ctf-parser.y" /* yacc.c:355 */
1255
1256 long long ll;
1257 unsigned long long ull;
1258 char c;
1259 char *s;
1260 struct ctf_node *n;
1261
1262 #line 1263 "ctf-parser.c" /* yacc.c:355 */
1263 };
1264
1265 typedef union YYSTYPE YYSTYPE;
1266 # define YYSTYPE_IS_TRIVIAL 1
1267 # define YYSTYPE_IS_DECLARED 1
1268 #endif
1269
1270
1271
1272 int yyparse (struct ctf_scanner *scanner, yyscan_t yyscanner);
1273
1274 #endif /* !YY_YY_CTF_PARSER_H_INCLUDED */
1275
1276 /* Copy the second part of user declarations. */
1277
1278 #line 1279 "ctf-parser.c" /* yacc.c:358 */
1279
1280 #ifdef short
1281 # undef short
1282 #endif
1283
1284 #ifdef YYTYPE_UINT8
1285 typedef YYTYPE_UINT8 yytype_uint8;
1286 #else
1287 typedef unsigned char yytype_uint8;
1288 #endif
1289
1290 #ifdef YYTYPE_INT8
1291 typedef YYTYPE_INT8 yytype_int8;
1292 #else
1293 typedef signed char yytype_int8;
1294 #endif
1295
1296 #ifdef YYTYPE_UINT16
1297 typedef YYTYPE_UINT16 yytype_uint16;
1298 #else
1299 typedef unsigned short int yytype_uint16;
1300 #endif
1301
1302 #ifdef YYTYPE_INT16
1303 typedef YYTYPE_INT16 yytype_int16;
1304 #else
1305 typedef short int yytype_int16;
1306 #endif
1307
1308 #ifndef YYSIZE_T
1309 # ifdef __SIZE_TYPE__
1310 # define YYSIZE_T __SIZE_TYPE__
1311 # elif defined size_t
1312 # define YYSIZE_T size_t
1313 # elif ! defined YYSIZE_T
1314 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1315 # define YYSIZE_T size_t
1316 # else
1317 # define YYSIZE_T unsigned int
1318 # endif
1319 #endif
1320
1321 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1322
1323 #ifndef YY_
1324 # if defined YYENABLE_NLS && YYENABLE_NLS
1325 # if ENABLE_NLS
1326 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1327 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1328 # endif
1329 # endif
1330 # ifndef YY_
1331 # define YY_(Msgid) Msgid
1332 # endif
1333 #endif
1334
1335 #ifndef YY_ATTRIBUTE
1336 # if (defined __GNUC__ \
1337 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
1338 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
1339 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
1340 # else
1341 # define YY_ATTRIBUTE(Spec) /* empty */
1342 # endif
1343 #endif
1344
1345 #ifndef YY_ATTRIBUTE_PURE
1346 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
1347 #endif
1348
1349 #ifndef YY_ATTRIBUTE_UNUSED
1350 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
1351 #endif
1352
1353 #if !defined _Noreturn \
1354 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
1355 # if defined _MSC_VER && 1200 <= _MSC_VER
1356 # define _Noreturn __declspec (noreturn)
1357 # else
1358 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
1359 # endif
1360 #endif
1361
1362 /* Suppress unused-variable warnings by "using" E. */
1363 #if ! defined lint || defined __GNUC__
1364 # define YYUSE(E) ((void) (E))
1365 #else
1366 # define YYUSE(E) /* empty */
1367 #endif
1368
1369 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1370 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1371 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1372 _Pragma ("GCC diagnostic push") \
1373 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1374 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1375 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1376 _Pragma ("GCC diagnostic pop")
1377 #else
1378 # define YY_INITIAL_VALUE(Value) Value
1379 #endif
1380 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1381 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1382 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1383 #endif
1384 #ifndef YY_INITIAL_VALUE
1385 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1386 #endif
1387
1388
1389 #if ! defined yyoverflow || YYERROR_VERBOSE
1390
1391 /* The parser invokes alloca or malloc; define the necessary symbols. */
1392
1393 # ifdef YYSTACK_USE_ALLOCA
1394 # if YYSTACK_USE_ALLOCA
1395 # ifdef __GNUC__
1396 # define YYSTACK_ALLOC __builtin_alloca
1397 # elif defined __BUILTIN_VA_ARG_INCR
1398 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1399 # elif defined _AIX
1400 # define YYSTACK_ALLOC __alloca
1401 # elif defined _MSC_VER
1402 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1403 # define alloca _alloca
1404 # else
1405 # define YYSTACK_ALLOC alloca
1406 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1407 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1408 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1409 # ifndef EXIT_SUCCESS
1410 # define EXIT_SUCCESS 0
1411 # endif
1412 # endif
1413 # endif
1414 # endif
1415 # endif
1416
1417 # ifdef YYSTACK_ALLOC
1418 /* Pacify GCC's 'empty if-body' warning. */
1419 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1420 # ifndef YYSTACK_ALLOC_MAXIMUM
1421 /* The OS might guarantee only one guard page at the bottom of the stack,
1422 and a page size can be as small as 4096 bytes. So we cannot safely
1423 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1424 to allow for a few compiler-allocated temporary stack slots. */
1425 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1426 # endif
1427 # else
1428 # define YYSTACK_ALLOC YYMALLOC
1429 # define YYSTACK_FREE YYFREE
1430 # ifndef YYSTACK_ALLOC_MAXIMUM
1431 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1432 # endif
1433 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1434 && ! ((defined YYMALLOC || defined malloc) \
1435 && (defined YYFREE || defined free)))
1436 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1437 # ifndef EXIT_SUCCESS
1438 # define EXIT_SUCCESS 0
1439 # endif
1440 # endif
1441 # ifndef YYMALLOC
1442 # define YYMALLOC malloc
1443 # if ! defined malloc && ! defined EXIT_SUCCESS
1444 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1445 # endif
1446 # endif
1447 # ifndef YYFREE
1448 # define YYFREE free
1449 # if ! defined free && ! defined EXIT_SUCCESS
1450 void free (void *); /* INFRINGES ON USER NAME SPACE */
1451 # endif
1452 # endif
1453 # endif
1454 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1455
1456
1457 #if (! defined yyoverflow \
1458 && (! defined __cplusplus \
1459 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1460
1461 /* A type that is properly aligned for any stack member. */
1462 union yyalloc
1463 {
1464 yytype_int16 yyss_alloc;
1465 YYSTYPE yyvs_alloc;
1466 };
1467
1468 /* The size of the maximum gap between one aligned stack and the next. */
1469 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1470
1471 /* The size of an array large to enough to hold all stacks, each with
1472 N elements. */
1473 # define YYSTACK_BYTES(N) \
1474 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1475 + YYSTACK_GAP_MAXIMUM)
1476
1477 # define YYCOPY_NEEDED 1
1478
1479 /* Relocate STACK from its old location to the new one. The
1480 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1481 elements in the stack, and YYPTR gives the new location of the
1482 stack. Advance YYPTR to a properly aligned location for the next
1483 stack. */
1484 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1485 do \
1486 { \
1487 YYSIZE_T yynewbytes; \
1488 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1489 Stack = &yyptr->Stack_alloc; \
1490 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1491 yyptr += yynewbytes / sizeof (*yyptr); \
1492 } \
1493 while (0)
1494
1495 #endif
1496
1497 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1498 /* Copy COUNT objects from SRC to DST. The source and destination do
1499 not overlap. */
1500 # ifndef YYCOPY
1501 # if defined __GNUC__ && 1 < __GNUC__
1502 # define YYCOPY(Dst, Src, Count) \
1503 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
1504 # else
1505 # define YYCOPY(Dst, Src, Count) \
1506 do \
1507 { \
1508 YYSIZE_T yyi; \
1509 for (yyi = 0; yyi < (Count); yyi++) \
1510 (Dst)[yyi] = (Src)[yyi]; \
1511 } \
1512 while (0)
1513 # endif
1514 # endif
1515 #endif /* !YYCOPY_NEEDED */
1516
1517 /* YYFINAL -- State number of the termination state. */
1518 #define YYFINAL 72
1519 /* YYLAST -- Last index in YYTABLE. */
1520 #define YYLAST 2199
1521
1522 /* YYNTOKENS -- Number of terminals. */
1523 #define YYNTOKENS 56
1524 /* YYNNTS -- Number of nonterminals. */
1525 #define YYNNTS 58
1526 /* YYNRULES -- Number of rules. */
1527 #define YYNRULES 233
1528 /* YYNSTATES -- Number of states. */
1529 #define YYNSTATES 444
1530
1531 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
1532 by yylex, with out-of-bounds checking. */
1533 #define YYUNDEFTOK 2
1534 #define YYMAXUTOK 310
1535
1536 #define YYTRANSLATE(YYX) \
1537 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1538
1539 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1540 as returned by yylex, without out-of-bounds checking. */
1541 static const yytype_uint8 yytranslate[] =
1542 {
1543 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1568 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1569 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1570 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1571 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1572 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1573 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1574 55
1575 };
1576
1577 #if YYDEBUG
1578 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1579 static const yytype_uint16 yyrline[] =
1580 {
1581 0, 1115, 1115, 1120, 1128, 1130, 1132, 1134, 1136, 1138,
1582 1140, 1142, 1144, 1146, 1148, 1150, 1152, 1154, 1156, 1158,
1583 1160, 1162, 1164, 1166, 1168, 1170, 1172, 1174, 1176, 1178,
1584 1180, 1188, 1194, 1200, 1206, 1212, 1218, 1224, 1228, 1236,
1585 1245, 1254, 1263, 1272, 1284, 1286, 1294, 1311, 1317, 1324,
1586 1326, 1328, 1330, 1332, 1334, 1336, 1338, 1349, 1359, 1369,
1587 1390, 1394, 1403, 1408, 1414, 1418, 1427, 1432, 1437, 1441,
1588 1450, 1455, 1460, 1464, 1473, 1478, 1483, 1487, 1496, 1501,
1589 1506, 1510, 1519, 1524, 1529, 1538, 1546, 1555, 1563, 1572,
1590 1580, 1589, 1597, 1599, 1607, 1612, 1617, 1622, 1627, 1632,
1591 1637, 1642, 1648, 1654, 1665, 1670, 1675, 1680, 1685, 1690,
1592 1695, 1700, 1705, 1710, 1715, 1720, 1725, 1731, 1737, 1745,
1593 1751, 1759, 1765, 1771, 1779, 1785, 1791, 1800, 1807, 1815,
1594 1823, 1829, 1835, 1843, 1852, 1864, 1869, 1874, 1881, 1889,
1595 1897, 1905, 1914, 1921, 1930, 1937, 1945, 1954, 1961, 1970,
1596 1980, 1985, 1990, 1996, 2003, 2010, 2018, 2025, 2033, 2039,
1597 2046, 2053, 2061, 2067, 2074, 2082, 2092, 2093, 2106, 2116,
1598 2127, 2137, 2147, 2168, 2177, 2185, 2196, 2205, 2210, 2224,
1599 2226, 2234, 2236, 2238, 2247, 2249, 2257, 2262, 2267, 2272,
1600 2277, 2283, 2289, 2295, 2304, 2306, 2314, 2316, 2325, 2330,
1601 2336, 2342, 2350, 2360, 2362, 2370, 2372, 2381, 2386, 2392,
1602 2400, 2410, 2412, 2420, 2426, 2432, 2443, 2445, 2453, 2460,
1603 2466, 2477, 2481, 2486, 2496, 2497, 2503, 2505, 2513, 2525,
1604 2537, 2548, 2558, 2568
1605 };
1606 #endif
1607
1608 #if YYDEBUG || YYERROR_VERBOSE || 1
1609 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1610 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1611 static const char *const yytname[] =
1612 {
1613 "$end", "error", "$undefined", "INTEGER_LITERAL", "STRING_LITERAL",
1614 "CHARACTER_LITERAL", "LSBRAC", "RSBRAC", "LPAREN", "RPAREN", "LBRAC",
1615 "RBRAC", "RARROW", "STAR", "PLUS", "MINUS", "LT", "GT", "TYPEASSIGN",
1616 "COLON", "SEMICOLON", "DOTDOTDOT", "DOT", "EQUAL", "COMMA", "CONST",
1617 "CHAR", "DOUBLE", "ENUM", "ENV", "EVENT", "FLOATING_POINT", "FLOAT",
1618 "INTEGER", "INT", "LONG", "SHORT", "SIGNED", "STREAM", "STRING",
1619 "STRUCT", "TRACE", "CALLSITE", "CLOCK", "TYPEALIAS", "TYPEDEF",
1620 "UNSIGNED", "VARIANT", "VOID", "_BOOL", "_COMPLEX", "_IMAGINARY",
1621 "TOK_ALIGN", "IDENTIFIER", "ID_TYPE", "ERROR", "$accept", "file",
1622 "keywords", "postfix_expression", "unary_expression",
1623 "unary_expression_or_range", "declaration", "event_declaration",
1624 "event_declaration_begin", "event_declaration_end", "stream_declaration",
1625 "stream_declaration_begin", "stream_declaration_end", "env_declaration",
1626 "env_declaration_begin", "env_declaration_end", "trace_declaration",
1627 "trace_declaration_begin", "trace_declaration_end", "clock_declaration",
1628 "clock_declaration_begin", "clock_declaration_end",
1629 "callsite_declaration", "callsite_declaration_begin",
1630 "callsite_declaration_end", "integer_declaration_specifiers",
1631 "declaration_specifiers", "type_declarator_list",
1632 "integer_type_specifier", "type_specifier", "struct_type_specifier",
1633 "struct_declaration_begin", "struct_declaration_end",
1634 "variant_type_specifier", "variant_declaration_begin",
1635 "variant_declaration_end", "enum_type_specifier",
1636 "struct_or_variant_declaration_list", "struct_or_variant_declaration",
1637 "alias_declaration_specifiers", "struct_or_variant_declarator_list",
1638 "struct_or_variant_declarator", "enumerator_list", "enumerator",
1639 "abstract_declarator_list", "abstract_declarator",
1640 "direct_abstract_declarator", "alias_abstract_declarator_list",
1641 "alias_abstract_declarator", "direct_alias_abstract_declarator",
1642 "declarator", "direct_declarator", "type_declarator",
1643 "direct_type_declarator", "pointer", "type_qualifier_list",
1644 "ctf_assignment_expression_list", "ctf_assignment_expression", YY_NULLPTR
1645 };
1646 #endif
1647
1648 # ifdef YYPRINT
1649 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1650 (internal) symbol number NUM (which must be that of a token). */
1651 static const yytype_uint16 yytoknum[] =
1652 {
1653 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1654 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1655 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1656 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1657 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1658 305, 306, 307, 308, 309, 310
1659 };
1660 # endif
1661
1662 #define YYPACT_NINF -363
1663
1664 #define yypact_value_is_default(Yystate) \
1665 (!!((Yystate) == (-363)))
1666
1667 #define YYTABLE_NINF -33
1668
1669 #define yytable_value_is_error(Yytable_value) \
1670 0
1671
1672 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1673 STATE-NUM. */
1674 static const yytype_int16 yypact[] =
1675 {
1676 1998, -363, -363, -363, 45, 22, 92, 94, -363, 146,
1677 -363, -363, -363, -363, 165, 194, 59, 204, 207, 228,
1678 2088, 2088, -363, 57, -363, -363, -363, -363, -363, 397,
1679 -363, -363, 449, -363, 501, -363, 553, -363, 605, -363,
1680 -363, 1938, -363, 1679, 2145, 75, 150, -363, -363, -363,
1681 657, 709, -363, 761, -363, 241, 241, -363, -363, -363,
1682 -363, 813, -363, 865, 1756, 1786, -363, 66, 47, 145,
1683 -363, -363, -363, -363, -363, -363, -363, 1281, 19, 1333,
1684 1333, 116, 218, 253, 45, -363, -363, 94, 305, 146,
1685 354, 387, 394, 443, -363, 209, 59, -363, -363, -363,
1686 2088, 2088, 450, 57, 502, 554, 606, 658, -363, -363,
1687 710, -363, 131, 60, -363, 2028, 449, 205, 234, -363,
1688 501, 236, -363, 553, 238, -363, 605, -363, -363, 1816,
1689 -363, 30, -363, -363, -363, -363, -363, -363, -363, -363,
1690 -363, -363, -363, -363, -363, -363, -363, -363, -363, -363,
1691 -363, -363, 240, 243, 247, 48, -363, -363, -363, 251,
1692 -363, -363, -363, -363, -363, -363, -363, 81, -363, 1679,
1693 2145, 1679, 2145, -363, 917, -363, 969, -363, 1021, -363,
1694 -363, 1876, 252, -363, 813, 254, -363, 865, 35, 29,
1695 -363, 152, -363, 54, 9, 36, -363, 121, -363, 271,
1696 39, 267, 274, 113, -363, 132, -363, 1906, -363, 283,
1697 -363, 131, 131, 1756, 1786, 1281, 143, 1968, 2088, 1281,
1698 1816, -363, 273, -363, -363, -363, -363, -363, -363, -363,
1699 1786, 178, 1281, 1281, 1281, 1281, -363, 1384, 1073, 1679,
1700 -363, -363, 50, 300, 97, 349, -363, -363, -363, 1876,
1701 1876, -363, 2088, 2088, 1726, 246, -363, -363, -363, -363,
1702 -363, 286, -363, -363, 139, 2058, 35, 1177, 54, 292,
1703 -363, 36, 1281, 271, 294, 294, 289, 290, 1906, 291,
1704 299, 1906, -363, -363, -363, 166, 295, 311, -363, -363,
1705 -363, -363, -363, 2118, -363, 1786, 295, -363, 185, -363,
1706 303, -363, -363, -363, -363, -363, -363, -363, 1125, 112,
1707 -363, 1435, 1679, -363, 1486, 1679, 269, 279, 1756, 1786,
1708 37, 1281, 1816, -363, 192, -363, 313, 335, 43, 339,
1709 -363, -363, -363, -363, -363, -363, 1846, -363, -363, 341,
1710 -363, -363, 344, -363, -363, 294, 294, -363, 294, 294,
1711 -363, 2058, -363, 295, -363, 1281, -363, -363, 1537, -363,
1712 120, -363, 138, 347, 348, 169, 202, 343, -363, 1786,
1713 213, -363, 33, 1281, 1281, 335, 1281, 181, -363, -363,
1714 -363, 215, -363, 351, 350, -363, -363, 1906, 1906, -363,
1715 -363, -363, -363, 1846, -363, -363, -363, 1588, -363, 1639,
1716 1281, 1281, 2058, -363, -363, 223, -363, -363, -363, 356,
1717 352, 358, -363, 181, 1229, 351, -363, -363, 1906, 1906,
1718 1906, 1906, 345, -363, -363, 364, 369, 1846, -363, -363,
1719 -363, -363, -363, -363, 372, -363, -363, -363, -363, -363,
1720 -363, 224, -363, -363
1721 };
1722
1723 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1724 Performed when YYTABLE does not specify something else to do. Zero
1725 means the default is an error. */
1726 static const yytype_uint8 yydefact[] =
1727 {
1728 0, 88, 105, 110, 0, 0, 0, 0, 109, 0,
1729 107, 108, 106, 111, 0, 121, 0, 0, 0, 0,
1730 0, 0, 112, 0, 104, 113, 114, 115, 116, 0,
1731 2, 50, 0, 51, 0, 52, 0, 53, 0, 54,
1732 55, 0, 89, 0, 0, 162, 165, 124, 70, 62,
1733 0, 0, 66, 0, 135, 130, 131, 126, 166, 74,
1734 82, 0, 78, 0, 198, 0, 150, 0, 0, 0,
1735 125, 166, 1, 3, 34, 35, 36, 0, 0, 0,
1736 0, 88, 105, 110, 19, 26, 24, 16, 109, 17,
1737 107, 108, 106, 111, 25, 121, 21, 27, 29, 28,
1738 0, 23, 112, 20, 104, 113, 114, 115, 30, 31,
1739 116, 33, 44, 0, 60, 0, 0, 0, 0, 64,
1740 0, 0, 68, 0, 0, 72, 0, 49, 90, 0,
1741 91, 189, 22, 5, 10, 19, 16, 9, 17, 7,
1742 8, 6, 11, 18, 21, 23, 12, 20, 4, 13,
1743 14, 15, 186, 187, 188, 0, 184, 84, 94, 0,
1744 96, 97, 95, 98, 99, 100, 101, 0, 85, 0,
1745 0, 0, 0, 117, 0, 119, 0, 122, 0, 166,
1746 166, 0, 0, 80, 0, 0, 76, 0, 198, 221,
1747 199, 0, 194, 196, 198, 0, 218, 0, 92, 216,
1748 0, 0, 0, 0, 166, 0, 166, 0, 32, 0,
1749 63, 45, 46, 198, 0, 0, 0, 0, 0, 0,
1750 0, 61, 0, 226, 67, 65, 71, 69, 75, 73,
1751 0, 0, 0, 0, 0, 0, 152, 0, 0, 0,
1752 86, 87, 0, 0, 0, 0, 118, 120, 123, 0,
1753 0, 136, 0, 0, 0, 127, 167, 83, 81, 79,
1754 77, 0, 224, 222, 0, 0, 198, 0, 197, 0,
1755 57, 0, 0, 217, 0, 0, 0, 0, 0, 0,
1756 0, 0, 151, 137, 37, 0, 231, 0, 42, 43,
1757 39, 40, 41, 229, 228, 0, 232, 227, 0, 58,
1758 48, 193, 190, 191, 192, 158, 185, 102, 0, 0,
1759 154, 0, 0, 156, 0, 0, 128, 129, 198, 0,
1760 0, 0, 0, 213, 0, 179, 181, 211, 0, 0,
1761 200, 225, 223, 173, 175, 174, 207, 195, 202, 0,
1762 219, 93, 0, 166, 166, 142, 144, 140, 147, 149,
1763 145, 0, 38, 230, 56, 0, 103, 153, 0, 160,
1764 0, 163, 0, 0, 0, 0, 0, 0, 182, 0,
1765 0, 168, 0, 0, 0, 212, 0, 207, 176, 178,
1766 177, 0, 203, 205, 207, 201, 220, 0, 0, 166,
1767 166, 166, 166, 207, 47, 159, 155, 0, 157, 0,
1768 0, 0, 0, 170, 214, 0, 171, 180, 183, 0,
1769 0, 0, 59, 207, 0, 206, 138, 139, 0, 0,
1770 0, 0, 233, 161, 164, 0, 0, 207, 169, 215,
1771 132, 208, 204, 210, 0, 141, 143, 146, 148, 133,
1772 134, 0, 209, 172
1773 };
1774
1775 /* YYPGOTO[NTERM-NUM]. */
1776 static const yytype_int16 yypgoto[] =
1777 {
1778 -363, -363, -29, 200, -61, 34, 336, -363, -363, 264,
1779 -363, -363, 261, -363, -363, 266, -363, -363, 265, -363,
1780 -363, 203, -363, -363, 208, -114, 0, -127, -148, -31,
1781 -363, 190, 40, -363, -46, -241, -363, -47, -363, -321,
1782 -363, 32, -164, -234, -209, -161, 214, -362, -342, 10,
1783 82, 73, -189, 211, -63, -363, -25, -108
1784 };
1785
1786 /* YYDEFGOTO[NTERM-NUM]. */
1787 static const yytype_int16 yydefgoto[] =
1788 {
1789 -1, 29, 111, 112, 113, 301, 30, 31, 32, 114,
1790 33, 34, 119, 35, 36, 122, 37, 38, 125, 39,
1791 63, 186, 40, 61, 183, 167, 115, 197, 168, 42,
1792 57, 58, 255, 70, 71, 283, 47, 181, 256, 336,
1793 324, 325, 155, 156, 191, 192, 193, 381, 382, 383,
1794 326, 327, 198, 199, 200, 264, 116, 117
1795 };
1796
1797 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1798 positive, shift that token. If negative, reduce the rule whose
1799 number is the opposite. If YYTABLE_NINF, syntax error. */
1800 static const yytype_int16 yytable[] =
1801 {
1802 41, 194, 231, 306, 285, 242, 269, 244, 222, 120,
1803 130, 123, 222, 126, 154, 222, 209, 188, 222, 241,
1804 64, 65, 204, 206, 207, 174, 176, 261, 178, 41,
1805 393, 422, 48, 130, 130, 411, 184, 347, 187, 210,
1806 350, 320, 189, 188, 195, 320, 189, 195, 189, 189,
1807 189, 320, 321, 232, 262, 43, 243, 66, 245, 236,
1808 267, 310, 190, 203, 44, 441, 222, 66, 222, 54,
1809 222, 432, 237, 67, 311, 309, 222, 306, 218, 222,
1810 306, 427, 341, 219, 130, 169, 323, 286, 190, 196,
1811 323, 239, 196, 296, 170, 241, 323, 241, 45, 46,
1812 213, 214, 49, 298, 50, 337, 240, 158, 313, 365,
1813 68, 69, 55, 56, 159, 160, 161, 162, 163, 201,
1814 202, 314, -22, 357, 306, 194, 263, 164, -22, 230,
1815 165, 396, 249, 250, -22, 166, 358, 215, -22, -22,
1816 154, 270, 154, 216, 397, 271, 416, 417, 360, 398,
1817 194, 362, 189, 217, 287, 66, 51, 278, 294, 281,
1818 171, 205, 399, 306, 331, 306, 276, 277, 353, 172,
1819 265, 300, 300, 300, 300, 52, 266, 435, 436, 437,
1820 438, 254, 130, 130, 351, 279, 280, 402, 292, 377,
1821 266, 328, 366, 266, 189, 370, 288, 289, 299, 130,
1822 222, 332, 271, 194, 53, 354, 339, 254, 154, 271,
1823 154, 342, 371, 308, 59, -18, 372, 60, 293, 53,
1824 295, -18, 403, 130, -5, 223, 271, -18, 343, 344,
1825 -5, -18, -18, 406, 335, 412, -5, 271, 62, 413,
1826 -5, -5, 405, 428, 443, 179, 180, 271, 413, 254,
1827 254, 54, 318, 319, 224, 194, 226, 328, 228, -10,
1828 368, 238, 130, 233, 130, -10, 234, 302, 303, 304,
1829 235, -10, 257, 384, 259, -10, -10, 272, 254, 211,
1830 212, 254, 154, 154, 274, 154, 154, 130, 130, 316,
1831 317, 275, 284, 297, 394, 330, 387, 388, 329, 389,
1832 390, 340, 391, 392, 66, 380, 345, 346, 348, 328,
1833 312, -9, 408, 409, 384, 410, 349, -9, 352, 271,
1834 335, 363, 369, -9, 355, 240, 158, -9, -9, 154,
1835 384, 364, 373, 159, 160, 161, 162, 163, 130, 425,
1836 426, 374, 418, 419, 420, 421, 164, 376, 385, 165,
1837 384, 386, 404, 434, 166, 400, 401, 414, 377, 315,
1838 -7, 430, 380, 429, 384, 73, -7, 431, 154, 413,
1839 154, 335, -7, 439, 240, 158, -7, -7, 440, 442,
1840 221, 225, 159, 160, 161, 162, 163, 254, 254, 227,
1841 260, 229, 258, -8, 415, 164, 380, 72, 165, -8,
1842 -6, 375, 367, 166, 407, -8, -6, 0, 268, -8,
1843 -8, 273, -6, 0, 0, 0, -6, -6, 254, 254,
1844 254, 254, 1, 2, 3, 4, 5, 6, 7, 8,
1845 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
1846 19, 20, 21, 22, 23, 24, 25, 26, 27, -11,
1847 0, 28, 74, 75, 76, -11, -12, 77, 0, 0,
1848 78, -11, -12, 79, 80, -11, -11, 0, -12, 0,
1849 0, 0, -12, -12, 81, 82, 83, 84, 85, 86,
1850 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1851 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
1852 107, 108, 109, 110, 74, 75, 76, 0, -4, 77,
1853 0, 0, 118, 0, -4, 79, 80, 0, 0, 0,
1854 -4, 0, 0, 0, -4, -4, 81, 82, 83, 84,
1855 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1856 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1857 105, 106, 107, 108, 109, 110, 74, 75, 76, 0,
1858 -13, 77, 0, 0, 121, 0, -13, 79, 80, 0,
1859 0, 0, -13, 0, 0, 0, -13, -13, 81, 82,
1860 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
1861 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1862 103, 104, 105, 106, 107, 108, 109, 110, 74, 75,
1863 76, 0, -14, 77, 0, 0, 124, 0, -14, 79,
1864 80, 0, 0, 0, -14, 0, 0, 0, -14, -14,
1865 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1866 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
1867 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1868 74, 75, 76, 0, -15, 77, 0, 0, 173, 0,
1869 -15, 79, 80, 0, 0, 0, -15, 0, 0, 0,
1870 -15, -15, 81, 82, 83, 84, 85, 86, 87, 88,
1871 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1872 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
1873 109, 110, 74, 75, 76, 0, -32, 77, 0, 0,
1874 175, 0, -32, 79, 80, 0, 0, 0, -32, 0,
1875 0, 0, -32, -32, 81, 82, 83, 84, 85, 86,
1876 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1877 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
1878 107, 108, 109, 110, 74, 75, 76, 0, 0, 77,
1879 0, 0, 177, 0, 0, 79, 80, 0, 0, 0,
1880 0, 0, 0, 0, 0, 0, 81, 82, 83, 84,
1881 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1882 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1883 105, 106, 107, 108, 109, 110, 74, 75, 76, 0,
1884 0, 77, 0, 0, 182, 0, 0, 79, 80, 0,
1885 0, 0, 0, 0, 0, 0, 0, 0, 81, 82,
1886 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
1887 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1888 103, 104, 105, 106, 107, 108, 109, 110, 74, 75,
1889 76, 0, 0, 77, 0, 0, 185, 0, 0, 79,
1890 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1891 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1892 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
1893 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1894 74, 75, 76, 0, 0, 77, 0, 0, 246, 0,
1895 0, 79, 80, 0, 0, 0, 0, 0, 0, 0,
1896 0, 0, 81, 82, 83, 84, 85, 86, 87, 88,
1897 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1898 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
1899 109, 110, 74, 75, 76, 0, 0, 77, 0, 0,
1900 247, 0, 0, 79, 80, 0, 0, 0, 0, 0,
1901 0, 0, 0, 0, 81, 82, 83, 84, 85, 86,
1902 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1903 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
1904 107, 108, 109, 110, 74, 75, 76, 0, 0, 77,
1905 0, 0, 248, 0, 0, 79, 80, 0, 0, 0,
1906 0, 0, 0, 0, 0, 0, 81, 82, 83, 84,
1907 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1908 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
1909 105, 106, 107, 108, 109, 110, 74, 75, 76, 0,
1910 0, 77, 0, 0, 307, 0, 0, 79, 80, 0,
1911 0, 0, 0, 0, 0, 0, 0, 0, 81, 82,
1912 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
1913 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
1914 103, 104, 105, 106, 107, 108, 109, 110, 74, 75,
1915 76, 0, 0, 77, 0, 0, 356, 0, 0, 79,
1916 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1917 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1918 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
1919 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1920 74, 75, 76, 0, 338, 77, 0, 0, 0, 0,
1921 0, 79, 80, 0, 0, 0, 0, 0, 0, 0,
1922 0, 0, 132, 133, 134, 135, 85, 86, 136, 137,
1923 138, 139, 140, 141, 142, 94, 143, 144, 97, 98,
1924 99, 0, 145, 146, 147, 148, 149, 150, 151, 108,
1925 109, 208, 74, 75, 76, 0, 433, 77, 0, 0,
1926 0, 0, 0, 79, 80, 0, 0, 0, 0, 0,
1927 0, 0, 0, 0, 132, 133, 134, 135, 85, 86,
1928 136, 137, 138, 139, 140, 141, 142, 94, 143, 144,
1929 97, 98, 99, 0, 145, 146, 147, 148, 149, 150,
1930 151, 108, 109, 208, 74, 75, 76, 0, 0, 77,
1931 0, 0, 0, 0, 0, 79, 80, 0, 0, 0,
1932 0, 0, 0, 0, 0, 0, 132, 133, 134, 135,
1933 85, 86, 136, 137, 138, 139, 140, 141, 142, 94,
1934 143, 144, 97, 98, 99, 0, 145, 146, 147, 148,
1935 149, 150, 151, 108, 109, 208, 74, 75, 76, 0,
1936 0, 77, 0, 0, 0, 0, 0, 0, 0, 0,
1937 0, 0, 0, 0, 0, 0, 0, 0, 132, 133,
1938 134, 135, 85, 86, 136, 137, 138, 139, 140, 141,
1939 142, 94, 143, 144, 97, 98, 99, 0, 145, 146,
1940 147, 148, 149, 150, 151, 108, 109, 208, 131, 0,
1941 0, 0, 0, 0, 0, 305, 0, 0, 0, 0,
1942 0, 0, 0, 0, 0, 0, 0, 0, 0, 132,
1943 133, 134, 135, 85, 86, 136, 137, 138, 139, 140,
1944 141, 142, 94, 143, 144, 97, 98, 99, 0, 145,
1945 146, 147, 148, 149, 150, 151, 108, 152, 153, 131,
1946 0, 0, 0, 0, 0, 0, 359, 0, 0, 0,
1947 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1948 132, 133, 134, 135, 85, 86, 136, 137, 138, 139,
1949 140, 141, 142, 94, 143, 144, 97, 98, 99, 0,
1950 145, 146, 147, 148, 149, 150, 151, 108, 152, 153,
1951 131, 0, 0, 0, 0, 0, 0, 361, 0, 0,
1952 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1953 0, 132, 133, 134, 135, 85, 86, 136, 137, 138,
1954 139, 140, 141, 142, 94, 143, 144, 97, 98, 99,
1955 0, 145, 146, 147, 148, 149, 150, 151, 108, 152,
1956 153, 131, 0, 0, 0, 0, 0, 0, 395, 0,
1957 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1958 0, 0, 132, 133, 134, 135, 85, 86, 136, 137,
1959 138, 139, 140, 141, 142, 94, 143, 144, 97, 98,
1960 99, 0, 145, 146, 147, 148, 149, 150, 151, 108,
1961 152, 153, 131, 0, 0, 0, 0, 0, 0, 423,
1962 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1963 0, 0, 0, 132, 133, 134, 135, 85, 86, 136,
1964 137, 138, 139, 140, 141, 142, 94, 143, 144, 97,
1965 98, 99, 0, 145, 146, 147, 148, 149, 150, 151,
1966 108, 152, 153, 131, 0, 0, 0, 0, 0, 0,
1967 424, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1968 0, 0, 0, 0, 132, 133, 134, 135, 85, 86,
1969 136, 137, 138, 139, 140, 141, 142, 94, 143, 144,
1970 97, 98, 99, 131, 145, 146, 147, 148, 149, 150,
1971 151, 108, 152, 153, 0, 0, 0, 0, 0, 0,
1972 0, 0, 0, 0, 132, 133, 134, 135, 85, 86,
1973 136, 137, 138, 139, 140, 141, 142, 94, 143, 144,
1974 97, 98, 99, 0, 145, 146, 147, 148, 149, 150,
1975 151, 108, 152, 153, 320, 0, 0, 0, 0, 189,
1976 0, 0, 0, 0, 0, 321, 0, 0, 0, 0,
1977 0, 128, 2, 3, 4, 0, 0, 7, 8, 9,
1978 10, 11, 12, 13, 188, 15, 16, 0, 0, 189,
1979 0, 322, 22, 23, 24, 25, 26, 27, 0, 323,
1980 28, 128, 2, 3, 4, 0, 0, 7, 8, 9,
1981 10, 11, 12, 13, 195, 15, 16, 0, 0, 189,
1982 0, 0, 22, 23, 24, 25, 26, 27, 0, 190,
1983 28, 128, 2, 3, 4, 0, 0, 7, 8, 9,
1984 10, 11, 12, 13, 195, 15, 16, 0, 0, 189,
1985 0, 0, 22, 23, 24, 25, 26, 27, 0, 196,
1986 28, 1, 2, 3, 4, 0, 0, 7, 8, 9,
1987 10, 11, 12, 13, 377, 15, 16, 0, 0, 189,
1988 0, 0, 22, 23, 24, 25, 26, 27, 0, 196,
1989 28, 378, 2, 3, 4, 0, 0, 7, 8, 9,
1990 10, 11, 12, 13, 0, 15, 16, 251, 0, 0,
1991 0, 0, 22, 23, 24, 25, 26, 27, 0, 379,
1992 28, 1, 2, 3, 4, 0, 0, 7, 8, 9,
1993 10, 11, 12, 13, 0, 15, 16, 282, 0, 0,
1994 252, 253, 22, 23, 24, 25, 26, 27, 0, 0,
1995 28, 1, 2, 3, 4, 0, 0, 7, 8, 9,
1996 10, 11, 12, 13, 0, 15, 16, 0, 0, 0,
1997 252, 253, 22, 23, 24, 25, 26, 27, 127, 0,
1998 28, 0, 0, 128, 2, 3, 4, 0, 0, 7,
1999 8, 9, 10, 11, 12, 13, 0, 15, 16, 0,
2000 0, 0, 0, 129, 22, 23, 24, 25, 26, 27,
2001 0, 0, 28, 132, 133, 134, 135, 85, 86, 136,
2002 137, 138, 139, 140, 141, 142, 94, 143, 144, 97,
2003 98, 99, 0, 145, 146, 147, 148, 149, 150, 151,
2004 108, 290, 291, 1, 2, 3, 4, 5, 6, 7,
2005 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
2006 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
2007 0, 0, 28, 128, 2, 3, 4, 0, 0, 7,
2008 8, 9, 10, 11, 12, 13, 0, 15, 16, 0,
2009 0, 0, 0, 220, 22, 23, 24, 25, 26, 27,
2010 0, 0, 28, 333, 2, 3, 4, 0, 0, 7,
2011 8, 9, 10, 11, 12, 13, 0, 15, 16, 0,
2012 0, 0, 0, 0, 22, 23, 24, 25, 26, 27,
2013 0, 334, 28, 1, 2, 3, 4, 0, 0, 7,
2014 8, 9, 10, 11, 12, 13, 0, 15, 16, 0,
2015 0, 0, 0, 0, 22, 23, 24, 25, 26, 27,
2016 0, 0, 28, 128, 2, 3, 4, 0, 0, 7,
2017 8, 9, 10, 11, 12, 13, 0, 15, 16, 0,
2018 0, 0, 0, 0, 22, 23, 24, 25, 26, 27,
2019 157, 158, 28, 0, 0, 0, 0, 0, 159, 160,
2020 161, 162, 163, 0, 0, 0, 0, 0, 0, 0,
2021 0, 164, 0, 0, 165, 0, 0, 0, 0, 166
2022 };
2023
2024 static const yytype_int16 yycheck[] =
2025 {
2026 0, 64, 129, 237, 213, 169, 195, 171, 116, 34,
2027 41, 36, 120, 38, 43, 123, 77, 8, 126, 167,
2028 20, 21, 68, 69, 71, 50, 51, 188, 53, 29,
2029 351, 393, 10, 64, 65, 377, 61, 278, 63, 20,
2030 281, 8, 13, 8, 8, 8, 13, 8, 13, 13,
2031 13, 8, 19, 23, 25, 10, 170, 10, 172, 11,
2032 6, 11, 53, 16, 19, 427, 174, 10, 176, 10,
2033 178, 413, 24, 16, 24, 239, 184, 311, 18, 187,
2034 314, 402, 271, 23, 115, 10, 53, 214, 53, 53,
2035 53, 10, 53, 220, 19, 243, 53, 245, 53, 54,
2036 100, 101, 10, 230, 10, 266, 25, 26, 11, 318,
2037 53, 54, 53, 54, 33, 34, 35, 36, 37, 53,
2038 54, 24, 6, 11, 358, 188, 189, 46, 12, 129,
2039 49, 11, 179, 180, 18, 54, 24, 6, 22, 23,
2040 169, 20, 171, 12, 24, 24, 387, 388, 312, 11,
2041 213, 315, 13, 22, 215, 10, 10, 204, 219, 206,
2042 10, 16, 24, 397, 25, 399, 53, 54, 295, 19,
2043 18, 232, 233, 234, 235, 10, 24, 418, 419, 420,
2044 421, 181, 213, 214, 18, 53, 54, 18, 217, 8,
2045 24, 254, 319, 24, 13, 322, 53, 54, 20, 230,
2046 308, 264, 24, 266, 10, 20, 267, 207, 237, 24,
2047 239, 272, 20, 238, 10, 6, 24, 10, 218, 10,
2048 220, 12, 20, 254, 6, 20, 24, 18, 274, 275,
2049 12, 22, 23, 20, 265, 20, 18, 24, 10, 24,
2050 22, 23, 369, 20, 20, 55, 56, 24, 24, 249,
2051 250, 10, 252, 253, 20, 318, 20, 320, 20, 6,
2052 321, 10, 293, 23, 295, 12, 23, 233, 234, 235,
2053 23, 18, 20, 336, 20, 22, 23, 6, 278, 79,
2054 80, 281, 311, 312, 17, 314, 315, 318, 319, 249,
2055 250, 17, 9, 20, 355, 9, 343, 344, 52, 345,
2056 346, 9, 348, 349, 10, 336, 17, 17, 17, 372,
2057 10, 6, 373, 374, 377, 376, 17, 12, 7, 24,
2058 351, 52, 322, 18, 21, 25, 26, 22, 23, 358,
2059 393, 52, 19, 33, 34, 35, 36, 37, 369, 400,
2060 401, 6, 389, 390, 391, 392, 46, 8, 7, 49,
2061 413, 7, 9, 414, 54, 8, 8, 6, 8, 10,
2062 6, 9, 393, 7, 427, 29, 12, 9, 397, 24,
2063 399, 402, 18, 9, 25, 26, 22, 23, 9, 7,
2064 116, 120, 33, 34, 35, 36, 37, 387, 388, 123,
2065 187, 126, 184, 6, 384, 46, 427, 0, 49, 12,
2066 6, 328, 320, 54, 372, 18, 12, -1, 194, 22,
2067 23, 200, 18, -1, -1, -1, 22, 23, 418, 419,
2068 420, 421, 25, 26, 27, 28, 29, 30, 31, 32,
2069 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
2070 43, 44, 45, 46, 47, 48, 49, 50, 51, 6,
2071 -1, 54, 3, 4, 5, 12, 6, 8, -1, -1,
2072 11, 18, 12, 14, 15, 22, 23, -1, 18, -1,
2073 -1, -1, 22, 23, 25, 26, 27, 28, 29, 30,
2074 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2075 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
2076 51, 52, 53, 54, 3, 4, 5, -1, 6, 8,
2077 -1, -1, 11, -1, 12, 14, 15, -1, -1, -1,
2078 18, -1, -1, -1, 22, 23, 25, 26, 27, 28,
2079 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
2080 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
2081 49, 50, 51, 52, 53, 54, 3, 4, 5, -1,
2082 6, 8, -1, -1, 11, -1, 12, 14, 15, -1,
2083 -1, -1, 18, -1, -1, -1, 22, 23, 25, 26,
2084 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
2085 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
2086 47, 48, 49, 50, 51, 52, 53, 54, 3, 4,
2087 5, -1, 6, 8, -1, -1, 11, -1, 12, 14,
2088 15, -1, -1, -1, 18, -1, -1, -1, 22, 23,
2089 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2090 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2091 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2092 3, 4, 5, -1, 6, 8, -1, -1, 11, -1,
2093 12, 14, 15, -1, -1, -1, 18, -1, -1, -1,
2094 22, 23, 25, 26, 27, 28, 29, 30, 31, 32,
2095 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
2096 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
2097 53, 54, 3, 4, 5, -1, 6, 8, -1, -1,
2098 11, -1, 12, 14, 15, -1, -1, -1, 18, -1,
2099 -1, -1, 22, 23, 25, 26, 27, 28, 29, 30,
2100 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2101 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
2102 51, 52, 53, 54, 3, 4, 5, -1, -1, 8,
2103 -1, -1, 11, -1, -1, 14, 15, -1, -1, -1,
2104 -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
2105 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
2106 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
2107 49, 50, 51, 52, 53, 54, 3, 4, 5, -1,
2108 -1, 8, -1, -1, 11, -1, -1, 14, 15, -1,
2109 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
2110 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
2111 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
2112 47, 48, 49, 50, 51, 52, 53, 54, 3, 4,
2113 5, -1, -1, 8, -1, -1, 11, -1, -1, 14,
2114 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2115 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2116 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2117 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2118 3, 4, 5, -1, -1, 8, -1, -1, 11, -1,
2119 -1, 14, 15, -1, -1, -1, -1, -1, -1, -1,
2120 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
2121 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
2122 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
2123 53, 54, 3, 4, 5, -1, -1, 8, -1, -1,
2124 11, -1, -1, 14, 15, -1, -1, -1, -1, -1,
2125 -1, -1, -1, -1, 25, 26, 27, 28, 29, 30,
2126 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2127 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
2128 51, 52, 53, 54, 3, 4, 5, -1, -1, 8,
2129 -1, -1, 11, -1, -1, 14, 15, -1, -1, -1,
2130 -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
2131 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
2132 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
2133 49, 50, 51, 52, 53, 54, 3, 4, 5, -1,
2134 -1, 8, -1, -1, 11, -1, -1, 14, 15, -1,
2135 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
2136 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
2137 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
2138 47, 48, 49, 50, 51, 52, 53, 54, 3, 4,
2139 5, -1, -1, 8, -1, -1, 11, -1, -1, 14,
2140 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2141 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2142 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2143 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2144 3, 4, 5, -1, 7, 8, -1, -1, -1, -1,
2145 -1, 14, 15, -1, -1, -1, -1, -1, -1, -1,
2146 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
2147 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
2148 43, -1, 45, 46, 47, 48, 49, 50, 51, 52,
2149 53, 54, 3, 4, 5, -1, 7, 8, -1, -1,
2150 -1, -1, -1, 14, 15, -1, -1, -1, -1, -1,
2151 -1, -1, -1, -1, 25, 26, 27, 28, 29, 30,
2152 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2153 41, 42, 43, -1, 45, 46, 47, 48, 49, 50,
2154 51, 52, 53, 54, 3, 4, 5, -1, -1, 8,
2155 -1, -1, -1, -1, -1, 14, 15, -1, -1, -1,
2156 -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
2157 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
2158 39, 40, 41, 42, 43, -1, 45, 46, 47, 48,
2159 49, 50, 51, 52, 53, 54, 3, 4, 5, -1,
2160 -1, 8, -1, -1, -1, -1, -1, -1, -1, -1,
2161 -1, -1, -1, -1, -1, -1, -1, -1, 25, 26,
2162 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
2163 37, 38, 39, 40, 41, 42, 43, -1, 45, 46,
2164 47, 48, 49, 50, 51, 52, 53, 54, 4, -1,
2165 -1, -1, -1, -1, -1, 11, -1, -1, -1, -1,
2166 -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
2167 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
2168 36, 37, 38, 39, 40, 41, 42, 43, -1, 45,
2169 46, 47, 48, 49, 50, 51, 52, 53, 54, 4,
2170 -1, -1, -1, -1, -1, -1, 11, -1, -1, -1,
2171 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2172 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2173 35, 36, 37, 38, 39, 40, 41, 42, 43, -1,
2174 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2175 4, -1, -1, -1, -1, -1, -1, 11, -1, -1,
2176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2177 -1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
2178 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
2179 -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
2180 54, 4, -1, -1, -1, -1, -1, -1, 11, -1,
2181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2182 -1, -1, 25, 26, 27, 28, 29, 30, 31, 32,
2183 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
2184 43, -1, 45, 46, 47, 48, 49, 50, 51, 52,
2185 53, 54, 4, -1, -1, -1, -1, -1, -1, 11,
2186 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2187 -1, -1, -1, 25, 26, 27, 28, 29, 30, 31,
2188 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
2189 42, 43, -1, 45, 46, 47, 48, 49, 50, 51,
2190 52, 53, 54, 4, -1, -1, -1, -1, -1, -1,
2191 11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2192 -1, -1, -1, -1, 25, 26, 27, 28, 29, 30,
2193 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2194 41, 42, 43, 4, 45, 46, 47, 48, 49, 50,
2195 51, 52, 53, 54, -1, -1, -1, -1, -1, -1,
2196 -1, -1, -1, -1, 25, 26, 27, 28, 29, 30,
2197 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2198 41, 42, 43, -1, 45, 46, 47, 48, 49, 50,
2199 51, 52, 53, 54, 8, -1, -1, -1, -1, 13,
2200 -1, -1, -1, -1, -1, 19, -1, -1, -1, -1,
2201 -1, 25, 26, 27, 28, -1, -1, 31, 32, 33,
2202 34, 35, 36, 37, 8, 39, 40, -1, -1, 13,
2203 -1, 45, 46, 47, 48, 49, 50, 51, -1, 53,
2204 54, 25, 26, 27, 28, -1, -1, 31, 32, 33,
2205 34, 35, 36, 37, 8, 39, 40, -1, -1, 13,
2206 -1, -1, 46, 47, 48, 49, 50, 51, -1, 53,
2207 54, 25, 26, 27, 28, -1, -1, 31, 32, 33,
2208 34, 35, 36, 37, 8, 39, 40, -1, -1, 13,
2209 -1, -1, 46, 47, 48, 49, 50, 51, -1, 53,
2210 54, 25, 26, 27, 28, -1, -1, 31, 32, 33,
2211 34, 35, 36, 37, 8, 39, 40, -1, -1, 13,
2212 -1, -1, 46, 47, 48, 49, 50, 51, -1, 53,
2213 54, 25, 26, 27, 28, -1, -1, 31, 32, 33,
2214 34, 35, 36, 37, -1, 39, 40, 11, -1, -1,
2215 -1, -1, 46, 47, 48, 49, 50, 51, -1, 53,
2216 54, 25, 26, 27, 28, -1, -1, 31, 32, 33,
2217 34, 35, 36, 37, -1, 39, 40, 11, -1, -1,
2218 44, 45, 46, 47, 48, 49, 50, 51, -1, -1,
2219 54, 25, 26, 27, 28, -1, -1, 31, 32, 33,
2220 34, 35, 36, 37, -1, 39, 40, -1, -1, -1,
2221 44, 45, 46, 47, 48, 49, 50, 51, 20, -1,
2222 54, -1, -1, 25, 26, 27, 28, -1, -1, 31,
2223 32, 33, 34, 35, 36, 37, -1, 39, 40, -1,
2224 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
2225 -1, -1, 54, 25, 26, 27, 28, 29, 30, 31,
2226 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
2227 42, 43, -1, 45, 46, 47, 48, 49, 50, 51,
2228 52, 53, 54, 25, 26, 27, 28, 29, 30, 31,
2229 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
2230 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
2231 -1, -1, 54, 25, 26, 27, 28, -1, -1, 31,
2232 32, 33, 34, 35, 36, 37, -1, 39, 40, -1,
2233 -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
2234 -1, -1, 54, 25, 26, 27, 28, -1, -1, 31,
2235 32, 33, 34, 35, 36, 37, -1, 39, 40, -1,
2236 -1, -1, -1, -1, 46, 47, 48, 49, 50, 51,
2237 -1, 53, 54, 25, 26, 27, 28, -1, -1, 31,
2238 32, 33, 34, 35, 36, 37, -1, 39, 40, -1,
2239 -1, -1, -1, -1, 46, 47, 48, 49, 50, 51,
2240 -1, -1, 54, 25, 26, 27, 28, -1, -1, 31,
2241 32, 33, 34, 35, 36, 37, -1, 39, 40, -1,
2242 -1, -1, -1, -1, 46, 47, 48, 49, 50, 51,
2243 25, 26, 54, -1, -1, -1, -1, -1, 33, 34,
2244 35, 36, 37, -1, -1, -1, -1, -1, -1, -1,
2245 -1, 46, -1, -1, 49, -1, -1, -1, -1, 54
2246 };
2247
2248 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
2249 symbol of state STATE-NUM. */
2250 static const yytype_uint8 yystos[] =
2251 {
2252 0, 25, 26, 27, 28, 29, 30, 31, 32, 33,
2253 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
2254 44, 45, 46, 47, 48, 49, 50, 51, 54, 57,
2255 62, 63, 64, 66, 67, 69, 70, 72, 73, 75,
2256 78, 82, 85, 10, 19, 53, 54, 92, 10, 10,
2257 10, 10, 10, 10, 10, 53, 54, 86, 87, 10,
2258 10, 79, 10, 76, 82, 82, 10, 16, 53, 54,
2259 89, 90, 0, 62, 3, 4, 5, 8, 11, 14,
2260 15, 25, 26, 27, 28, 29, 30, 31, 32, 33,
2261 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
2262 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
2263 54, 58, 59, 60, 65, 82, 112, 113, 11, 68,
2264 112, 11, 71, 112, 11, 74, 112, 20, 25, 45,
2265 85, 4, 25, 26, 27, 28, 31, 32, 33, 34,
2266 35, 36, 37, 39, 40, 45, 46, 47, 48, 49,
2267 50, 51, 53, 54, 58, 98, 99, 25, 26, 33,
2268 34, 35, 36, 37, 46, 49, 54, 81, 84, 10,
2269 19, 10, 19, 11, 112, 11, 112, 11, 112, 87,
2270 87, 93, 11, 80, 112, 11, 77, 112, 8, 13,
2271 53, 100, 101, 102, 110, 8, 53, 83, 108, 109,
2272 110, 53, 54, 16, 90, 16, 90, 93, 54, 60,
2273 20, 59, 59, 82, 82, 6, 12, 22, 18, 23,
2274 45, 65, 113, 20, 20, 68, 20, 71, 20, 74,
2275 82, 83, 23, 23, 23, 23, 11, 24, 10, 10,
2276 25, 84, 98, 81, 98, 81, 11, 11, 11, 93,
2277 93, 11, 44, 45, 82, 88, 94, 20, 80, 20,
2278 77, 101, 25, 110, 111, 18, 24, 6, 102, 108,
2279 20, 24, 6, 109, 17, 17, 53, 54, 93, 53,
2280 54, 93, 11, 91, 9, 100, 83, 60, 53, 54,
2281 53, 54, 58, 82, 60, 82, 83, 20, 83, 20,
2282 60, 61, 61, 61, 61, 11, 99, 11, 112, 98,
2283 11, 24, 10, 11, 24, 10, 88, 88, 82, 82,
2284 8, 19, 45, 53, 96, 97, 106, 107, 110, 52,
2285 9, 25, 110, 25, 53, 85, 95, 101, 7, 60,
2286 9, 108, 60, 90, 90, 17, 17, 91, 17, 17,
2287 91, 18, 7, 83, 20, 21, 11, 11, 24, 11,
2288 98, 11, 98, 52, 52, 100, 83, 106, 60, 82,
2289 83, 20, 24, 19, 6, 107, 8, 8, 25, 53,
2290 85, 103, 104, 105, 110, 7, 7, 93, 93, 90,
2291 90, 90, 90, 95, 60, 11, 11, 24, 11, 24,
2292 8, 8, 18, 20, 9, 83, 20, 97, 60, 60,
2293 60, 104, 20, 24, 6, 105, 91, 91, 93, 93,
2294 93, 93, 103, 11, 11, 60, 60, 95, 20, 7,
2295 9, 9, 104, 7, 60, 91, 91, 91, 91, 9,
2296 9, 103, 7, 20
2297 };
2298
2299 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2300 static const yytype_uint8 yyr1[] =
2301 {
2302 0, 56, 57, 57, 58, 58, 58, 58, 58, 58,
2303 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
2304 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
2305 58, 59, 59, 59, 59, 59, 59, 59, 59, 59,
2306 59, 59, 59, 59, 60, 60, 60, 61, 61, 62,
2307 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
2308 63, 63, 64, 65, 66, 66, 67, 68, 69, 69,
2309 70, 71, 72, 72, 73, 74, 75, 75, 76, 77,
2310 78, 78, 79, 80, 81, 81, 81, 81, 82, 82,
2311 82, 82, 83, 83, 84, 84, 84, 84, 84, 84,
2312 84, 84, 84, 84, 85, 85, 85, 85, 85, 85,
2313 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
2314 85, 85, 85, 85, 85, 85, 85, 86, 86, 86,
2315 86, 86, 86, 86, 86, 87, 88, 89, 89, 89,
2316 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
2317 90, 91, 92, 92, 92, 92, 92, 92, 92, 92,
2318 92, 92, 92, 92, 92, 92, 93, 93, 94, 94,
2319 94, 94, 94, 95, 95, 95, 95, 95, 95, 96,
2320 96, 97, 97, 97, 98, 98, 99, 99, 99, 99,
2321 99, 99, 99, 99, 100, 100, 101, 101, 102, 102,
2322 102, 102, 102, 103, 103, 104, 104, 105, 105, 105,
2323 105, 106, 106, 107, 107, 107, 108, 108, 109, 109,
2324 109, 110, 110, 110, 111, 111, 112, 112, 113, 113,
2325 113, 113, 113, 113
2326 };
2327
2328 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
2329 static const yytype_uint8 yyr2[] =
2330 {
2331 0, 2, 1, 2, 1, 1, 1, 1, 1, 1,
2332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2334 1, 1, 1, 1, 1, 1, 1, 3, 4, 3,
2335 3, 3, 3, 3, 1, 2, 2, 3, 1, 2,
2336 1, 1, 1, 1, 1, 1, 5, 4, 4, 7,
2337 2, 3, 2, 2, 2, 3, 2, 2, 2, 3,
2338 2, 2, 2, 3, 2, 2, 3, 4, 1, 2,
2339 3, 4, 1, 2, 1, 1, 2, 2, 1, 1,
2340 2, 2, 1, 3, 1, 1, 1, 1, 1, 1,
2341 1, 1, 3, 4, 1, 1, 1, 1, 1, 1,
2342 1, 1, 1, 1, 1, 1, 1, 3, 4, 3,
2343 4, 1, 3, 4, 2, 2, 2, 3, 4, 4,
2344 1, 1, 7, 8, 8, 1, 1, 3, 6, 6,
2345 4, 7, 4, 7, 4, 4, 7, 4, 7, 4,
2346 1, 1, 3, 5, 4, 6, 4, 6, 4, 6,
2347 5, 7, 1, 5, 7, 1, 0, 2, 3, 5,
2348 4, 4, 7, 1, 1, 1, 2, 2, 2, 1,
2349 3, 1, 2, 3, 1, 3, 1, 1, 1, 1,
2350 3, 3, 3, 3, 1, 3, 1, 2, 0, 1,
2351 3, 4, 3, 1, 3, 1, 2, 0, 3, 4,
2352 3, 1, 2, 1, 3, 4, 1, 2, 1, 3,
2353 4, 1, 2, 3, 1, 2, 2, 3, 3, 3,
2354 4, 3, 3, 6
2355 };
2356
2357
2358 #define yyerrok (yyerrstatus = 0)
2359 #define yyclearin (yychar = YYEMPTY)
2360 #define YYEMPTY (-2)
2361 #define YYEOF 0
2362
2363 #define YYACCEPT goto yyacceptlab
2364 #define YYABORT goto yyabortlab
2365 #define YYERROR goto yyerrorlab
2366
2367
2368 #define YYRECOVERING() (!!yyerrstatus)
2369
2370 #define YYBACKUP(Token, Value) \
2371 do \
2372 if (yychar == YYEMPTY) \
2373 { \
2374 yychar = (Token); \
2375 yylval = (Value); \
2376 YYPOPSTACK (yylen); \
2377 yystate = *yyssp; \
2378 goto yybackup; \
2379 } \
2380 else \
2381 { \
2382 yyerror (scanner, yyscanner, YY_("syntax error: cannot back up")); \
2383 YYERROR; \
2384 } \
2385 while (0)
2386
2387 /* Error token number */
2388 #define YYTERROR 1
2389 #define YYERRCODE 256
2390
2391
2392
2393 /* Enable debugging if requested. */
2394 #if YYDEBUG
2395
2396 # ifndef YYFPRINTF
2397 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2398 # define YYFPRINTF fprintf
2399 # endif
2400
2401 # define YYDPRINTF(Args) \
2402 do { \
2403 if (yydebug) \
2404 YYFPRINTF Args; \
2405 } while (0)
2406
2407 /* This macro is provided for backward compatibility. */
2408 #ifndef YY_LOCATION_PRINT
2409 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2410 #endif
2411
2412
2413 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2414 do { \
2415 if (yydebug) \
2416 { \
2417 YYFPRINTF (stderr, "%s ", Title); \
2418 yy_symbol_print (stderr, \
2419 Type, Value, scanner, yyscanner); \
2420 YYFPRINTF (stderr, "\n"); \
2421 } \
2422 } while (0)
2423
2424
2425 /*----------------------------------------.
2426 | Print this symbol's value on YYOUTPUT. |
2427 `----------------------------------------*/
2428
2429 static void
2430 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct ctf_scanner *scanner, yyscan_t yyscanner)
2431 {
2432 FILE *yyo = yyoutput;
2433 YYUSE (yyo);
2434 YYUSE (scanner);
2435 YYUSE (yyscanner);
2436 if (!yyvaluep)
2437 return;
2438 # ifdef YYPRINT
2439 if (yytype < YYNTOKENS)
2440 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2441 # endif
2442 YYUSE (yytype);
2443 }
2444
2445
2446 /*--------------------------------.
2447 | Print this symbol on YYOUTPUT. |
2448 `--------------------------------*/
2449
2450 static void
2451 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, struct ctf_scanner *scanner, yyscan_t yyscanner)
2452 {
2453 YYFPRINTF (yyoutput, "%s %s (",
2454 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
2455
2456 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, yyscanner);
2457 YYFPRINTF (yyoutput, ")");
2458 }
2459
2460 /*------------------------------------------------------------------.
2461 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2462 | TOP (included). |
2463 `------------------------------------------------------------------*/
2464
2465 static void
2466 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
2467 {
2468 YYFPRINTF (stderr, "Stack now");
2469 for (; yybottom <= yytop; yybottom++)
2470 {
2471 int yybot = *yybottom;
2472 YYFPRINTF (stderr, " %d", yybot);
2473 }
2474 YYFPRINTF (stderr, "\n");
2475 }
2476
2477 # define YY_STACK_PRINT(Bottom, Top) \
2478 do { \
2479 if (yydebug) \
2480 yy_stack_print ((Bottom), (Top)); \
2481 } while (0)
2482
2483
2484 /*------------------------------------------------.
2485 | Report that the YYRULE is going to be reduced. |
2486 `------------------------------------------------*/
2487
2488 static void
2489 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, struct ctf_scanner *scanner, yyscan_t yyscanner)
2490 {
2491 unsigned long int yylno = yyrline[yyrule];
2492 int yynrhs = yyr2[yyrule];
2493 int yyi;
2494 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
2495 yyrule - 1, yylno);
2496 /* The symbols being reduced. */
2497 for (yyi = 0; yyi < yynrhs; yyi++)
2498 {
2499 YYFPRINTF (stderr, " $%d = ", yyi + 1);
2500 yy_symbol_print (stderr,
2501 yystos[yyssp[yyi + 1 - yynrhs]],
2502 &(yyvsp[(yyi + 1) - (yynrhs)])
2503 , scanner, yyscanner);
2504 YYFPRINTF (stderr, "\n");
2505 }
2506 }
2507
2508 # define YY_REDUCE_PRINT(Rule) \
2509 do { \
2510 if (yydebug) \
2511 yy_reduce_print (yyssp, yyvsp, Rule, scanner, yyscanner); \
2512 } while (0)
2513
2514 /* Nonzero means print parse trace. It is left uninitialized so that
2515 multiple parsers can coexist. */
2516 int yydebug;
2517 #else /* !YYDEBUG */
2518 # define YYDPRINTF(Args)
2519 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
2520 # define YY_STACK_PRINT(Bottom, Top)
2521 # define YY_REDUCE_PRINT(Rule)
2522 #endif /* !YYDEBUG */
2523
2524
2525 /* YYINITDEPTH -- initial size of the parser's stacks. */
2526 #ifndef YYINITDEPTH
2527 # define YYINITDEPTH 200
2528 #endif
2529
2530 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2531 if the built-in stack extension method is used).
2532
2533 Do not make this value too large; the results are undefined if
2534 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2535 evaluated with infinite-precision integer arithmetic. */
2536
2537 #ifndef YYMAXDEPTH
2538 # define YYMAXDEPTH 10000
2539 #endif
2540
2541
2542 #if YYERROR_VERBOSE
2543
2544 # ifndef yystrlen
2545 # if defined __GLIBC__ && defined _STRING_H
2546 # define yystrlen strlen
2547 # else
2548 /* Return the length of YYSTR. */
2549 static YYSIZE_T
2550 yystrlen (const char *yystr)
2551 {
2552 YYSIZE_T yylen;
2553 for (yylen = 0; yystr[yylen]; yylen++)
2554 continue;
2555 return yylen;
2556 }
2557 # endif
2558 # endif
2559
2560 # ifndef yystpcpy
2561 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2562 # define yystpcpy stpcpy
2563 # else
2564 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2565 YYDEST. */
2566 static char *
2567 yystpcpy (char *yydest, const char *yysrc)
2568 {
2569 char *yyd = yydest;
2570 const char *yys = yysrc;
2571
2572 while ((*yyd++ = *yys++) != '\0')
2573 continue;
2574
2575 return yyd - 1;
2576 }
2577 # endif
2578 # endif
2579
2580 # ifndef yytnamerr
2581 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2582 quotes and backslashes, so that it's suitable for yyerror. The
2583 heuristic is that double-quoting is unnecessary unless the string
2584 contains an apostrophe, a comma, or backslash (other than
2585 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2586 null, do not copy; instead, return the length of what the result
2587 would have been. */
2588 static YYSIZE_T
2589 yytnamerr (char *yyres, const char *yystr)
2590 {
2591 if (*yystr == '"')
2592 {
2593 YYSIZE_T yyn = 0;
2594 char const *yyp = yystr;
2595
2596 for (;;)
2597 switch (*++yyp)
2598 {
2599 case '\'':
2600 case ',':
2601 goto do_not_strip_quotes;
2602
2603 case '\\':
2604 if (*++yyp != '\\')
2605 goto do_not_strip_quotes;
2606 /* Fall through. */
2607 default:
2608 if (yyres)
2609 yyres[yyn] = *yyp;
2610 yyn++;
2611 break;
2612
2613 case '"':
2614 if (yyres)
2615 yyres[yyn] = '\0';
2616 return yyn;
2617 }
2618 do_not_strip_quotes: ;
2619 }
2620
2621 if (! yyres)
2622 return yystrlen (yystr);
2623
2624 return yystpcpy (yyres, yystr) - yyres;
2625 }
2626 # endif
2627
2628 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
2629 about the unexpected token YYTOKEN for the state stack whose top is
2630 YYSSP.
2631
2632 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
2633 not large enough to hold the message. In that case, also set
2634 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
2635 required number of bytes is too large to store. */
2636 static int
2637 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
2638 yytype_int16 *yyssp, int yytoken)
2639 {
2640 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
2641 YYSIZE_T yysize = yysize0;
2642 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2643 /* Internationalized format string. */
2644 const char *yyformat = YY_NULLPTR;
2645 /* Arguments of yyformat. */
2646 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2647 /* Number of reported tokens (one for the "unexpected", one per
2648 "expected"). */
2649 int yycount = 0;
2650
2651 /* There are many possibilities here to consider:
2652 - If this state is a consistent state with a default action, then
2653 the only way this function was invoked is if the default action
2654 is an error action. In that case, don't check for expected
2655 tokens because there are none.
2656 - The only way there can be no lookahead present (in yychar) is if
2657 this state is a consistent state with a default action. Thus,
2658 detecting the absence of a lookahead is sufficient to determine
2659 that there is no unexpected or expected token to report. In that
2660 case, just report a simple "syntax error".
2661 - Don't assume there isn't a lookahead just because this state is a
2662 consistent state with a default action. There might have been a
2663 previous inconsistent state, consistent state with a non-default
2664 action, or user semantic action that manipulated yychar.
2665 - Of course, the expected token list depends on states to have
2666 correct lookahead information, and it depends on the parser not
2667 to perform extra reductions after fetching a lookahead from the
2668 scanner and before detecting a syntax error. Thus, state merging
2669 (from LALR or IELR) and default reductions corrupt the expected
2670 token list. However, the list is correct for canonical LR with
2671 one exception: it will still contain any token that will not be
2672 accepted due to an error action in a later state.
2673 */
2674 if (yytoken != YYEMPTY)
2675 {
2676 int yyn = yypact[*yyssp];
2677 yyarg[yycount++] = yytname[yytoken];
2678 if (!yypact_value_is_default (yyn))
2679 {
2680 /* Start YYX at -YYN if negative to avoid negative indexes in
2681 YYCHECK. In other words, skip the first -YYN actions for
2682 this state because they are default actions. */
2683 int yyxbegin = yyn < 0 ? -yyn : 0;
2684 /* Stay within bounds of both yycheck and yytname. */
2685 int yychecklim = YYLAST - yyn + 1;
2686 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2687 int yyx;
2688
2689 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2690 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
2691 && !yytable_value_is_error (yytable[yyx + yyn]))
2692 {
2693 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2694 {
2695 yycount = 1;
2696 yysize = yysize0;
2697 break;
2698 }
2699 yyarg[yycount++] = yytname[yyx];
2700 {
2701 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
2702 if (! (yysize <= yysize1
2703 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2704 return 2;
2705 yysize = yysize1;
2706 }
2707 }
2708 }
2709 }
2710
2711 switch (yycount)
2712 {
2713 # define YYCASE_(N, S) \
2714 case N: \
2715 yyformat = S; \
2716 break
2717 YYCASE_(0, YY_("syntax error"));
2718 YYCASE_(1, YY_("syntax error, unexpected %s"));
2719 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2720 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2721 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2722 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2723 # undef YYCASE_
2724 }
2725
2726 {
2727 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2728 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2729 return 2;
2730 yysize = yysize1;
2731 }
2732
2733 if (*yymsg_alloc < yysize)
2734 {
2735 *yymsg_alloc = 2 * yysize;
2736 if (! (yysize <= *yymsg_alloc
2737 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2738 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2739 return 1;
2740 }
2741
2742 /* Avoid sprintf, as that infringes on the user's name space.
2743 Don't have undefined behavior even if the translation
2744 produced a string with the wrong number of "%s"s. */
2745 {
2746 char *yyp = *yymsg;
2747 int yyi = 0;
2748 while ((*yyp = *yyformat) != '\0')
2749 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2750 {
2751 yyp += yytnamerr (yyp, yyarg[yyi++]);
2752 yyformat += 2;
2753 }
2754 else
2755 {
2756 yyp++;
2757 yyformat++;
2758 }
2759 }
2760 return 0;
2761 }
2762 #endif /* YYERROR_VERBOSE */
2763
2764 /*-----------------------------------------------.
2765 | Release the memory associated to this symbol. |
2766 `-----------------------------------------------*/
2767
2768 static void
2769 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, struct ctf_scanner *scanner, yyscan_t yyscanner)
2770 {
2771 YYUSE (yyvaluep);
2772 YYUSE (scanner);
2773 YYUSE (yyscanner);
2774 if (!yymsg)
2775 yymsg = "Deleting";
2776 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2777
2778 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2779 YYUSE (yytype);
2780 YY_IGNORE_MAYBE_UNINITIALIZED_END
2781 }
2782
2783
2784
2785
2786 /*----------.
2787 | yyparse. |
2788 `----------*/
2789
2790 int
2791 yyparse (struct ctf_scanner *scanner, yyscan_t yyscanner)
2792 {
2793 /* The lookahead symbol. */
2794 int yychar;
2795
2796
2797 /* The semantic value of the lookahead symbol. */
2798 /* Default value used for initialization, for pacifying older GCCs
2799 or non-GCC compilers. */
2800 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
2801 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
2802
2803 /* Number of syntax errors so far. */
2804 int yynerrs;
2805
2806 int yystate;
2807 /* Number of tokens to shift before error messages enabled. */
2808 int yyerrstatus;
2809
2810 /* The stacks and their tools:
2811 'yyss': related to states.
2812 'yyvs': related to semantic values.
2813
2814 Refer to the stacks through separate pointers, to allow yyoverflow
2815 to reallocate them elsewhere. */
2816
2817 /* The state stack. */
2818 yytype_int16 yyssa[YYINITDEPTH];
2819 yytype_int16 *yyss;
2820 yytype_int16 *yyssp;
2821
2822 /* The semantic value stack. */
2823 YYSTYPE yyvsa[YYINITDEPTH];
2824 YYSTYPE *yyvs;
2825 YYSTYPE *yyvsp;
2826
2827 YYSIZE_T yystacksize;
2828
2829 int yyn;
2830 int yyresult;
2831 /* Lookahead token as an internal (translated) token number. */
2832 int yytoken = 0;
2833 /* The variables used to return semantic value and location from the
2834 action routines. */
2835 YYSTYPE yyval;
2836
2837 #if YYERROR_VERBOSE
2838 /* Buffer for error messages, and its allocated size. */
2839 char yymsgbuf[128];
2840 char *yymsg = yymsgbuf;
2841 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2842 #endif
2843
2844 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2845
2846 /* The number of symbols on the RHS of the reduced rule.
2847 Keep to zero when no symbol should be popped. */
2848 int yylen = 0;
2849
2850 yyssp = yyss = yyssa;
2851 yyvsp = yyvs = yyvsa;
2852 yystacksize = YYINITDEPTH;
2853
2854 YYDPRINTF ((stderr, "Starting parse\n"));
2855
2856 yystate = 0;
2857 yyerrstatus = 0;
2858 yynerrs = 0;
2859 yychar = YYEMPTY; /* Cause a token to be read. */
2860 goto yysetstate;
2861
2862 /*------------------------------------------------------------.
2863 | yynewstate -- Push a new state, which is found in yystate. |
2864 `------------------------------------------------------------*/
2865 yynewstate:
2866 /* In all cases, when you get here, the value and location stacks
2867 have just been pushed. So pushing a state here evens the stacks. */
2868 yyssp++;
2869
2870 yysetstate:
2871 *yyssp = yystate;
2872
2873 if (yyss + yystacksize - 1 <= yyssp)
2874 {
2875 /* Get the current used size of the three stacks, in elements. */
2876 YYSIZE_T yysize = yyssp - yyss + 1;
2877
2878 #ifdef yyoverflow
2879 {
2880 /* Give user a chance to reallocate the stack. Use copies of
2881 these so that the &'s don't force the real ones into
2882 memory. */
2883 YYSTYPE *yyvs1 = yyvs;
2884 yytype_int16 *yyss1 = yyss;
2885
2886 /* Each stack pointer address is followed by the size of the
2887 data in use in that stack, in bytes. This used to be a
2888 conditional around just the two extra args, but that might
2889 be undefined if yyoverflow is a macro. */
2890 yyoverflow (YY_("memory exhausted"),
2891 &yyss1, yysize * sizeof (*yyssp),
2892 &yyvs1, yysize * sizeof (*yyvsp),
2893 &yystacksize);
2894
2895 yyss = yyss1;
2896 yyvs = yyvs1;
2897 }
2898 #else /* no yyoverflow */
2899 # ifndef YYSTACK_RELOCATE
2900 goto yyexhaustedlab;
2901 # else
2902 /* Extend the stack our own way. */
2903 if (YYMAXDEPTH <= yystacksize)
2904 goto yyexhaustedlab;
2905 yystacksize *= 2;
2906 if (YYMAXDEPTH < yystacksize)
2907 yystacksize = YYMAXDEPTH;
2908
2909 {
2910 yytype_int16 *yyss1 = yyss;
2911 union yyalloc *yyptr =
2912 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2913 if (! yyptr)
2914 goto yyexhaustedlab;
2915 YYSTACK_RELOCATE (yyss_alloc, yyss);
2916 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2917 # undef YYSTACK_RELOCATE
2918 if (yyss1 != yyssa)
2919 YYSTACK_FREE (yyss1);
2920 }
2921 # endif
2922 #endif /* no yyoverflow */
2923
2924 yyssp = yyss + yysize - 1;
2925 yyvsp = yyvs + yysize - 1;
2926
2927 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2928 (unsigned long int) yystacksize));
2929
2930 if (yyss + yystacksize - 1 <= yyssp)
2931 YYABORT;
2932 }
2933
2934 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2935
2936 if (yystate == YYFINAL)
2937 YYACCEPT;
2938
2939 goto yybackup;
2940
2941 /*-----------.
2942 | yybackup. |
2943 `-----------*/
2944 yybackup:
2945
2946 /* Do appropriate processing given the current state. Read a
2947 lookahead token if we need one and don't already have one. */
2948
2949 /* First try to decide what to do without reference to lookahead token. */
2950 yyn = yypact[yystate];
2951 if (yypact_value_is_default (yyn))
2952 goto yydefault;
2953
2954 /* Not known => get a lookahead token if don't already have one. */
2955
2956 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2957 if (yychar == YYEMPTY)
2958 {
2959 YYDPRINTF ((stderr, "Reading a token: "));
2960 yychar = yylex (&yylval, yyscanner);
2961 }
2962
2963 if (yychar <= YYEOF)
2964 {
2965 yychar = yytoken = YYEOF;
2966 YYDPRINTF ((stderr, "Now at end of input.\n"));
2967 }
2968 else
2969 {
2970 yytoken = YYTRANSLATE (yychar);
2971 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2972 }
2973
2974 /* If the proper action on seeing token YYTOKEN is to reduce or to
2975 detect an error, take that action. */
2976 yyn += yytoken;
2977 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2978 goto yydefault;
2979 yyn = yytable[yyn];
2980 if (yyn <= 0)
2981 {
2982 if (yytable_value_is_error (yyn))
2983 goto yyerrlab;
2984 yyn = -yyn;
2985 goto yyreduce;
2986 }
2987
2988 /* Count tokens shifted since error; after three, turn off error
2989 status. */
2990 if (yyerrstatus)
2991 yyerrstatus--;
2992
2993 /* Shift the lookahead token. */
2994 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2995
2996 /* Discard the shifted token. */
2997 yychar = YYEMPTY;
2998
2999 yystate = yyn;
3000 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3001 *++yyvsp = yylval;
3002 YY_IGNORE_MAYBE_UNINITIALIZED_END
3003
3004 goto yynewstate;
3005
3006
3007 /*-----------------------------------------------------------.
3008 | yydefault -- do the default action for the current state. |
3009 `-----------------------------------------------------------*/
3010 yydefault:
3011 yyn = yydefact[yystate];
3012 if (yyn == 0)
3013 goto yyerrlab;
3014 goto yyreduce;
3015
3016
3017 /*-----------------------------.
3018 | yyreduce -- Do a reduction. |
3019 `-----------------------------*/
3020 yyreduce:
3021 /* yyn is the number of a rule to reduce with. */
3022 yylen = yyr2[yyn];
3023
3024 /* If YYLEN is nonzero, implement the default value of the action:
3025 '$$ = $1'.
3026
3027 Otherwise, the following line sets YYVAL to garbage.
3028 This behavior is undocumented and Bison
3029 users should not rely upon it. Assigning to YYVAL
3030 unconditionally makes the parser a bit smaller, and it avoids a
3031 GCC warning that YYVAL may be used uninitialized. */
3032 yyval = yyvsp[1-yylen];
3033
3034
3035 YY_REDUCE_PRINT (yyn);
3036 switch (yyn)
3037 {
3038 case 2:
3039 #line 1116 "ctf-parser.y" /* yacc.c:1646 */
3040 {
3041 if (set_parent_node((yyvsp[0].n), &ctf_scanner_get_ast(scanner)->root))
3042 reparent_error(scanner, "error reparenting to root");
3043 }
3044 #line 3045 "ctf-parser.c" /* yacc.c:1646 */
3045 break;
3046
3047 case 3:
3048 #line 1121 "ctf-parser.y" /* yacc.c:1646 */
3049 {
3050 if (set_parent_node((yyvsp[0].n), &ctf_scanner_get_ast(scanner)->root))
3051 reparent_error(scanner, "error reparenting to root");
3052 }
3053 #line 3054 "ctf-parser.c" /* yacc.c:1646 */
3054 break;
3055
3056 case 4:
3057 #line 1129 "ctf-parser.y" /* yacc.c:1646 */
3058 { (yyval.s) = yylval.s; }
3059 #line 3060 "ctf-parser.c" /* yacc.c:1646 */
3060 break;
3061
3062 case 5:
3063 #line 1131 "ctf-parser.y" /* yacc.c:1646 */
3064 { (yyval.s) = yylval.s; }
3065 #line 3066 "ctf-parser.c" /* yacc.c:1646 */
3066 break;
3067
3068 case 6:
3069 #line 1133 "ctf-parser.y" /* yacc.c:1646 */
3070 { (yyval.s) = yylval.s; }
3071 #line 3072 "ctf-parser.c" /* yacc.c:1646 */
3072 break;
3073
3074 case 7:
3075 #line 1135 "ctf-parser.y" /* yacc.c:1646 */
3076 { (yyval.s) = yylval.s; }
3077 #line 3078 "ctf-parser.c" /* yacc.c:1646 */
3078 break;
3079
3080 case 8:
3081 #line 1137 "ctf-parser.y" /* yacc.c:1646 */
3082 { (yyval.s) = yylval.s; }
3083 #line 3084 "ctf-parser.c" /* yacc.c:1646 */
3084 break;
3085
3086 case 9:
3087 #line 1139 "ctf-parser.y" /* yacc.c:1646 */
3088 { (yyval.s) = yylval.s; }
3089 #line 3090 "ctf-parser.c" /* yacc.c:1646 */
3090 break;
3091
3092 case 10:
3093 #line 1141 "ctf-parser.y" /* yacc.c:1646 */
3094 { (yyval.s) = yylval.s; }
3095 #line 3096 "ctf-parser.c" /* yacc.c:1646 */
3096 break;
3097
3098 case 11:
3099 #line 1143 "ctf-parser.y" /* yacc.c:1646 */
3100 { (yyval.s) = yylval.s; }
3101 #line 3102 "ctf-parser.c" /* yacc.c:1646 */
3102 break;
3103
3104 case 12:
3105 #line 1145 "ctf-parser.y" /* yacc.c:1646 */
3106 { (yyval.s) = yylval.s; }
3107 #line 3108 "ctf-parser.c" /* yacc.c:1646 */
3108 break;
3109
3110 case 13:
3111 #line 1147 "ctf-parser.y" /* yacc.c:1646 */
3112 { (yyval.s) = yylval.s; }
3113 #line 3114 "ctf-parser.c" /* yacc.c:1646 */
3114 break;
3115
3116 case 14:
3117 #line 1149 "ctf-parser.y" /* yacc.c:1646 */
3118 { (yyval.s) = yylval.s; }
3119 #line 3120 "ctf-parser.c" /* yacc.c:1646 */
3120 break;
3121
3122 case 15:
3123 #line 1151 "ctf-parser.y" /* yacc.c:1646 */
3124 { (yyval.s) = yylval.s; }
3125 #line 3126 "ctf-parser.c" /* yacc.c:1646 */
3126 break;
3127
3128 case 16:
3129 #line 1153 "ctf-parser.y" /* yacc.c:1646 */
3130 { (yyval.s) = yylval.s; }
3131 #line 3132 "ctf-parser.c" /* yacc.c:1646 */
3132 break;
3133
3134 case 17:
3135 #line 1155 "ctf-parser.y" /* yacc.c:1646 */
3136 { (yyval.s) = yylval.s; }
3137 #line 3138 "ctf-parser.c" /* yacc.c:1646 */
3138 break;
3139
3140 case 18:
3141 #line 1157 "ctf-parser.y" /* yacc.c:1646 */
3142 { (yyval.s) = yylval.s; }
3143 #line 3144 "ctf-parser.c" /* yacc.c:1646 */
3144 break;
3145
3146 case 19:
3147 #line 1159 "ctf-parser.y" /* yacc.c:1646 */
3148 { (yyval.s) = yylval.s; }
3149 #line 3150 "ctf-parser.c" /* yacc.c:1646 */
3150 break;
3151
3152 case 20:
3153 #line 1161 "ctf-parser.y" /* yacc.c:1646 */
3154 { (yyval.s) = yylval.s; }
3155 #line 3156 "ctf-parser.c" /* yacc.c:1646 */
3156 break;
3157
3158 case 21:
3159 #line 1163 "ctf-parser.y" /* yacc.c:1646 */
3160 { (yyval.s) = yylval.s; }
3161 #line 3162 "ctf-parser.c" /* yacc.c:1646 */
3162 break;
3163
3164 case 22:
3165 #line 1165 "ctf-parser.y" /* yacc.c:1646 */
3166 { (yyval.s) = yylval.s; }
3167 #line 3168 "ctf-parser.c" /* yacc.c:1646 */
3168 break;
3169
3170 case 23:
3171 #line 1167 "ctf-parser.y" /* yacc.c:1646 */
3172 { (yyval.s) = yylval.s; }
3173 #line 3174 "ctf-parser.c" /* yacc.c:1646 */
3174 break;
3175
3176 case 24:
3177 #line 1169 "ctf-parser.y" /* yacc.c:1646 */
3178 { (yyval.s) = yylval.s; }
3179 #line 3180 "ctf-parser.c" /* yacc.c:1646 */
3180 break;
3181
3182 case 25:
3183 #line 1171 "ctf-parser.y" /* yacc.c:1646 */
3184 { (yyval.s) = yylval.s; }
3185 #line 3186 "ctf-parser.c" /* yacc.c:1646 */
3186 break;
3187
3188 case 26:
3189 #line 1173 "ctf-parser.y" /* yacc.c:1646 */
3190 { (yyval.s) = yylval.s; }
3191 #line 3192 "ctf-parser.c" /* yacc.c:1646 */
3192 break;
3193
3194 case 27:
3195 #line 1175 "ctf-parser.y" /* yacc.c:1646 */
3196 { (yyval.s) = yylval.s; }
3197 #line 3198 "ctf-parser.c" /* yacc.c:1646 */
3198 break;
3199
3200 case 28:
3201 #line 1177 "ctf-parser.y" /* yacc.c:1646 */
3202 { (yyval.s) = yylval.s; }
3203 #line 3204 "ctf-parser.c" /* yacc.c:1646 */
3204 break;
3205
3206 case 29:
3207 #line 1179 "ctf-parser.y" /* yacc.c:1646 */
3208 { (yyval.s) = yylval.s; }
3209 #line 3210 "ctf-parser.c" /* yacc.c:1646 */
3210 break;
3211
3212 case 30:
3213 #line 1181 "ctf-parser.y" /* yacc.c:1646 */
3214 { (yyval.s) = yylval.s; }
3215 #line 3216 "ctf-parser.c" /* yacc.c:1646 */
3216 break;
3217
3218 case 31:
3219 #line 1189 "ctf-parser.y" /* yacc.c:1646 */
3220 {
3221 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3222 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3223 (yyval.n)->u.unary_expression.u.string = yylval.s;
3224 }
3225 #line 3226 "ctf-parser.c" /* yacc.c:1646 */
3226 break;
3227
3228 case 32:
3229 #line 1195 "ctf-parser.y" /* yacc.c:1646 */
3230 {
3231 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3232 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3233 (yyval.n)->u.unary_expression.u.string = yylval.s;
3234 }
3235 #line 3236 "ctf-parser.c" /* yacc.c:1646 */
3236 break;
3237
3238 case 33:
3239 #line 1201 "ctf-parser.y" /* yacc.c:1646 */
3240 {
3241 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3242 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3243 (yyval.n)->u.unary_expression.u.string = yylval.s;
3244 }
3245 #line 3246 "ctf-parser.c" /* yacc.c:1646 */
3246 break;
3247
3248 case 34:
3249 #line 1207 "ctf-parser.y" /* yacc.c:1646 */
3250 {
3251 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3252 (yyval.n)->u.unary_expression.type = UNARY_UNSIGNED_CONSTANT;
3253 (yyval.n)->u.unary_expression.u.unsigned_constant = (yyvsp[0].ull);
3254 }
3255 #line 3256 "ctf-parser.c" /* yacc.c:1646 */
3256 break;
3257
3258 case 35:
3259 #line 1213 "ctf-parser.y" /* yacc.c:1646 */
3260 {
3261 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3262 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3263 (yyval.n)->u.unary_expression.u.string = (yyvsp[0].s);
3264 }
3265 #line 3266 "ctf-parser.c" /* yacc.c:1646 */
3266 break;
3267
3268 case 36:
3269 #line 1219 "ctf-parser.y" /* yacc.c:1646 */
3270 {
3271 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3272 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3273 (yyval.n)->u.unary_expression.u.string = (yyvsp[0].s);
3274 }
3275 #line 3276 "ctf-parser.c" /* yacc.c:1646 */
3276 break;
3277
3278 case 37:
3279 #line 1225 "ctf-parser.y" /* yacc.c:1646 */
3280 {
3281 (yyval.n) = (yyvsp[-1].n);
3282 }
3283 #line 3284 "ctf-parser.c" /* yacc.c:1646 */
3284 break;
3285
3286 case 38:
3287 #line 1229 "ctf-parser.y" /* yacc.c:1646 */
3288 {
3289 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3290 (yyval.n)->u.unary_expression.type = UNARY_SBRAC;
3291 (yyval.n)->u.unary_expression.u.sbrac_exp = (yyvsp[-1].n);
3292 bt_list_splice(&((yyvsp[-3].n))->tmp_head, &((yyval.n))->tmp_head);
3293 bt_list_add_tail(&((yyval.n))->siblings, &((yyval.n))->tmp_head);
3294 }
3295 #line 3296 "ctf-parser.c" /* yacc.c:1646 */
3296 break;
3297
3298 case 39:
3299 #line 1237 "ctf-parser.y" /* yacc.c:1646 */
3300 {
3301 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3302 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3303 (yyval.n)->u.unary_expression.u.string = yylval.s;
3304 (yyval.n)->u.unary_expression.link = UNARY_DOTLINK;
3305 bt_list_splice(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->tmp_head);
3306 bt_list_add_tail(&((yyval.n))->siblings, &((yyval.n))->tmp_head);
3307 }
3308 #line 3309 "ctf-parser.c" /* yacc.c:1646 */
3309 break;
3310
3311 case 40:
3312 #line 1246 "ctf-parser.y" /* yacc.c:1646 */
3313 {
3314 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3315 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3316 (yyval.n)->u.unary_expression.u.string = yylval.s;
3317 (yyval.n)->u.unary_expression.link = UNARY_DOTLINK;
3318 bt_list_splice(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->tmp_head);
3319 bt_list_add_tail(&((yyval.n))->siblings, &((yyval.n))->tmp_head);
3320 }
3321 #line 3322 "ctf-parser.c" /* yacc.c:1646 */
3322 break;
3323
3324 case 41:
3325 #line 1255 "ctf-parser.y" /* yacc.c:1646 */
3326 {
3327 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3328 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3329 (yyval.n)->u.unary_expression.u.string = yylval.s;
3330 (yyval.n)->u.unary_expression.link = UNARY_DOTLINK;
3331 bt_list_splice(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->tmp_head);
3332 bt_list_add_tail(&((yyval.n))->siblings, &((yyval.n))->tmp_head);
3333 }
3334 #line 3335 "ctf-parser.c" /* yacc.c:1646 */
3335 break;
3336
3337 case 42:
3338 #line 1264 "ctf-parser.y" /* yacc.c:1646 */
3339 {
3340 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3341 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3342 (yyval.n)->u.unary_expression.u.string = yylval.s;
3343 (yyval.n)->u.unary_expression.link = UNARY_ARROWLINK;
3344 bt_list_splice(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->tmp_head);
3345 bt_list_add_tail(&((yyval.n))->siblings, &((yyval.n))->tmp_head);
3346 }
3347 #line 3348 "ctf-parser.c" /* yacc.c:1646 */
3348 break;
3349
3350 case 43:
3351 #line 1273 "ctf-parser.y" /* yacc.c:1646 */
3352 {
3353 (yyval.n) = make_node(scanner, NODE_UNARY_EXPRESSION);
3354 (yyval.n)->u.unary_expression.type = UNARY_STRING;
3355 (yyval.n)->u.unary_expression.u.string = yylval.s;
3356 (yyval.n)->u.unary_expression.link = UNARY_ARROWLINK;
3357 bt_list_splice(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->tmp_head);
3358 bt_list_add_tail(&((yyval.n))->siblings, &((yyval.n))->tmp_head);
3359 }
3360 #line 3361 "ctf-parser.c" /* yacc.c:1646 */
3361 break;
3362
3363 case 44:
3364 #line 1285 "ctf-parser.y" /* yacc.c:1646 */
3365 { (yyval.n) = (yyvsp[0].n); }
3366 #line 3367 "ctf-parser.c" /* yacc.c:1646 */
3367 break;
3368
3369 case 45:
3370 #line 1287 "ctf-parser.y" /* yacc.c:1646 */
3371 {
3372 (yyval.n) = (yyvsp[0].n);
3373 if ((yyval.n)->u.unary_expression.type != UNARY_UNSIGNED_CONSTANT
3374 && (yyval.n)->u.unary_expression.type != UNARY_SIGNED_CONSTANT) {
3375 reparent_error(scanner, "expecting numeric constant");
3376 }
3377 }
3378 #line 3379 "ctf-parser.c" /* yacc.c:1646 */
3379 break;
3380
3381 case 46:
3382 #line 1295 "ctf-parser.y" /* yacc.c:1646 */
3383 {
3384 (yyval.n) = (yyvsp[0].n);
3385 if ((yyval.n)->u.unary_expression.type == UNARY_UNSIGNED_CONSTANT) {
3386 (yyval.n)->u.unary_expression.type = UNARY_SIGNED_CONSTANT;
3387 (yyval.n)->u.unary_expression.u.signed_constant =
3388 -((yyval.n)->u.unary_expression.u.unsigned_constant);
3389 } else if ((yyval.n)->u.unary_expression.type == UNARY_UNSIGNED_CONSTANT) {
3390 (yyval.n)->u.unary_expression.u.signed_constant =
3391 -((yyval.n)->u.unary_expression.u.signed_constant);
3392 } else {
3393 reparent_error(scanner, "expecting numeric constant");
3394 }
3395 }
3396 #line 3397 "ctf-parser.c" /* yacc.c:1646 */
3397 break;
3398
3399 case 47:
3400 #line 1312 "ctf-parser.y" /* yacc.c:1646 */
3401 {
3402 (yyval.n) = (yyvsp[-2].n);
3403 _bt_list_splice_tail(&((yyvsp[0].n))->tmp_head, &((yyval.n))->tmp_head);
3404 (yyvsp[0].n)->u.unary_expression.link = UNARY_DOTDOTDOT;
3405 }
3406 #line 3407 "ctf-parser.c" /* yacc.c:1646 */
3407 break;
3408
3409 case 48:
3410 #line 1318 "ctf-parser.y" /* yacc.c:1646 */
3411 { (yyval.n) = (yyvsp[0].n); }
3412 #line 3413 "ctf-parser.c" /* yacc.c:1646 */
3413 break;
3414
3415 case 49:
3416 #line 1325 "ctf-parser.y" /* yacc.c:1646 */
3417 { (yyval.n) = (yyvsp[-1].n); }
3418 #line 3419 "ctf-parser.c" /* yacc.c:1646 */
3419 break;
3420
3421 case 50:
3422 #line 1327 "ctf-parser.y" /* yacc.c:1646 */
3423 { (yyval.n) = (yyvsp[0].n); }
3424 #line 3425 "ctf-parser.c" /* yacc.c:1646 */
3425 break;
3426
3427 case 51:
3428 #line 1329 "ctf-parser.y" /* yacc.c:1646 */
3429 { (yyval.n) = (yyvsp[0].n); }
3430 #line 3431 "ctf-parser.c" /* yacc.c:1646 */
3431 break;
3432
3433 case 52:
3434 #line 1331 "ctf-parser.y" /* yacc.c:1646 */
3435 { (yyval.n) = (yyvsp[0].n); }
3436 #line 3437 "ctf-parser.c" /* yacc.c:1646 */
3437 break;
3438
3439 case 53:
3440 #line 1333 "ctf-parser.y" /* yacc.c:1646 */
3441 { (yyval.n) = (yyvsp[0].n); }
3442 #line 3443 "ctf-parser.c" /* yacc.c:1646 */
3443 break;
3444
3445 case 54:
3446 #line 1335 "ctf-parser.y" /* yacc.c:1646 */
3447 { (yyval.n) = (yyvsp[0].n); }
3448 #line 3449 "ctf-parser.c" /* yacc.c:1646 */
3449 break;
3450
3451 case 55:
3452 #line 1337 "ctf-parser.y" /* yacc.c:1646 */
3453 { (yyval.n) = (yyvsp[0].n); }
3454 #line 3455 "ctf-parser.c" /* yacc.c:1646 */
3455 break;
3456
3457 case 56:
3458 #line 1339 "ctf-parser.y" /* yacc.c:1646 */
3459 {
3460 struct ctf_node *list;
3461
3462 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
3463 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3464 (yyval.n)->u._typedef.type_specifier_list = list;
3465 _bt_list_splice_tail(&((yyvsp[-4].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
3466 _bt_list_splice_tail(&((yyvsp[-2].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
3467 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
3468 }
3469 #line 3470 "ctf-parser.c" /* yacc.c:1646 */
3470 break;
3471
3472 case 57:
3473 #line 1350 "ctf-parser.y" /* yacc.c:1646 */
3474 {
3475 struct ctf_node *list;
3476
3477 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
3478 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3479 (yyval.n)->u._typedef.type_specifier_list = list;
3480 _bt_list_splice_tail(&((yyvsp[-2].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
3481 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
3482 }
3483 #line 3484 "ctf-parser.c" /* yacc.c:1646 */
3484 break;
3485
3486 case 58:
3487 #line 1360 "ctf-parser.y" /* yacc.c:1646 */
3488 {
3489 struct ctf_node *list;
3490
3491 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
3492 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3493 (yyval.n)->u._typedef.type_specifier_list = list;
3494 _bt_list_splice_tail(&((yyvsp[-3].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
3495 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
3496 }
3497 #line 3498 "ctf-parser.c" /* yacc.c:1646 */
3498 break;
3499
3500 case 59:
3501 #line 1370 "ctf-parser.y" /* yacc.c:1646 */
3502 {
3503 struct ctf_node *list;
3504
3505 (yyval.n) = make_node(scanner, NODE_TYPEALIAS);
3506 (yyval.n)->u.typealias.target = make_node(scanner, NODE_TYPEALIAS_TARGET);
3507 (yyval.n)->u.typealias.alias = make_node(scanner, NODE_TYPEALIAS_ALIAS);
3508
3509 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3510 (yyval.n)->u.typealias.target->u.typealias_target.type_specifier_list = list;
3511 _bt_list_splice_tail(&((yyvsp[-5].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
3512 _bt_list_splice_tail(&((yyvsp[-4].n))->tmp_head, &((yyval.n))->u.typealias.target->u.typealias_target.type_declarators);
3513
3514 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3515 (yyval.n)->u.typealias.alias->u.typealias_alias.type_specifier_list = list;
3516 _bt_list_splice_tail(&((yyvsp[-2].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
3517 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.typealias.alias->u.typealias_alias.type_declarators);
3518 }
3519 #line 3520 "ctf-parser.c" /* yacc.c:1646 */
3520 break;
3521
3522 case 60:
3523 #line 1391 "ctf-parser.y" /* yacc.c:1646 */
3524 {
3525 (yyval.n) = make_node(scanner, NODE_EVENT);
3526 }
3527 #line 3528 "ctf-parser.c" /* yacc.c:1646 */
3528 break;
3529
3530 case 61:
3531 #line 1395 "ctf-parser.y" /* yacc.c:1646 */
3532 {
3533 (yyval.n) = make_node(scanner, NODE_EVENT);
3534 if (set_parent_node((yyvsp[-1].n), (yyval.n)))
3535 reparent_error(scanner, "event_declaration");
3536 }
3537 #line 3538 "ctf-parser.c" /* yacc.c:1646 */
3538 break;
3539
3540 case 62:
3541 #line 1404 "ctf-parser.y" /* yacc.c:1646 */
3542 { push_scope(scanner); }
3543 #line 3544 "ctf-parser.c" /* yacc.c:1646 */
3544 break;
3545
3546 case 63:
3547 #line 1409 "ctf-parser.y" /* yacc.c:1646 */
3548 { pop_scope(scanner); }
3549 #line 3550 "ctf-parser.c" /* yacc.c:1646 */
3550 break;
3551
3552 case 64:
3553 #line 1415 "ctf-parser.y" /* yacc.c:1646 */
3554 {
3555 (yyval.n) = make_node(scanner, NODE_STREAM);
3556 }
3557 #line 3558 "ctf-parser.c" /* yacc.c:1646 */
3558 break;
3559
3560 case 65:
3561 #line 1419 "ctf-parser.y" /* yacc.c:1646 */
3562 {
3563 (yyval.n) = make_node(scanner, NODE_STREAM);
3564 if (set_parent_node((yyvsp[-1].n), (yyval.n)))
3565 reparent_error(scanner, "stream_declaration");
3566 }
3567 #line 3568 "ctf-parser.c" /* yacc.c:1646 */
3568 break;
3569
3570 case 66:
3571 #line 1428 "ctf-parser.y" /* yacc.c:1646 */
3572 { push_scope(scanner); }
3573 #line 3574 "ctf-parser.c" /* yacc.c:1646 */
3574 break;
3575
3576 case 67:
3577 #line 1433 "ctf-parser.y" /* yacc.c:1646 */
3578 { pop_scope(scanner); }
3579 #line 3580 "ctf-parser.c" /* yacc.c:1646 */
3580 break;
3581
3582 case 68:
3583 #line 1438 "ctf-parser.y" /* yacc.c:1646 */
3584 {
3585 (yyval.n) = make_node(scanner, NODE_ENV);
3586 }
3587 #line 3588 "ctf-parser.c" /* yacc.c:1646 */
3588 break;
3589
3590 case 69:
3591 #line 1442 "ctf-parser.y" /* yacc.c:1646 */
3592 {
3593 (yyval.n) = make_node(scanner, NODE_ENV);
3594 if (set_parent_node((yyvsp[-1].n), (yyval.n)))
3595 reparent_error(scanner, "env declaration");
3596 }
3597 #line 3598 "ctf-parser.c" /* yacc.c:1646 */
3598 break;
3599
3600 case 70:
3601 #line 1451 "ctf-parser.y" /* yacc.c:1646 */
3602 { push_scope(scanner); }
3603 #line 3604 "ctf-parser.c" /* yacc.c:1646 */
3604 break;
3605
3606 case 71:
3607 #line 1456 "ctf-parser.y" /* yacc.c:1646 */
3608 { pop_scope(scanner); }
3609 #line 3610 "ctf-parser.c" /* yacc.c:1646 */
3610 break;
3611
3612 case 72:
3613 #line 1461 "ctf-parser.y" /* yacc.c:1646 */
3614 {
3615 (yyval.n) = make_node(scanner, NODE_TRACE);
3616 }
3617 #line 3618 "ctf-parser.c" /* yacc.c:1646 */
3618 break;
3619
3620 case 73:
3621 #line 1465 "ctf-parser.y" /* yacc.c:1646 */
3622 {
3623 (yyval.n) = make_node(scanner, NODE_TRACE);
3624 if (set_parent_node((yyvsp[-1].n), (yyval.n)))
3625 reparent_error(scanner, "trace_declaration");
3626 }
3627 #line 3628 "ctf-parser.c" /* yacc.c:1646 */
3628 break;
3629
3630 case 74:
3631 #line 1474 "ctf-parser.y" /* yacc.c:1646 */
3632 { push_scope(scanner); }
3633 #line 3634 "ctf-parser.c" /* yacc.c:1646 */
3634 break;
3635
3636 case 75:
3637 #line 1479 "ctf-parser.y" /* yacc.c:1646 */
3638 { pop_scope(scanner); }
3639 #line 3640 "ctf-parser.c" /* yacc.c:1646 */
3640 break;
3641
3642 case 76:
3643 #line 1484 "ctf-parser.y" /* yacc.c:1646 */
3644 {
3645 (yyval.n) = make_node(scanner, NODE_CLOCK);
3646 }
3647 #line 3648 "ctf-parser.c" /* yacc.c:1646 */
3648 break;
3649
3650 case 77:
3651 #line 1488 "ctf-parser.y" /* yacc.c:1646 */
3652 {
3653 (yyval.n) = make_node(scanner, NODE_CLOCK);
3654 if (set_parent_node((yyvsp[-1].n), (yyval.n)))
3655 reparent_error(scanner, "trace_declaration");
3656 }
3657 #line 3658 "ctf-parser.c" /* yacc.c:1646 */
3658 break;
3659
3660 case 78:
3661 #line 1497 "ctf-parser.y" /* yacc.c:1646 */
3662 { push_scope(scanner); }
3663 #line 3664 "ctf-parser.c" /* yacc.c:1646 */
3664 break;
3665
3666 case 79:
3667 #line 1502 "ctf-parser.y" /* yacc.c:1646 */
3668 { pop_scope(scanner); }
3669 #line 3670 "ctf-parser.c" /* yacc.c:1646 */
3670 break;
3671
3672 case 80:
3673 #line 1507 "ctf-parser.y" /* yacc.c:1646 */
3674 {
3675 (yyval.n) = make_node(scanner, NODE_CALLSITE);
3676 }
3677 #line 3678 "ctf-parser.c" /* yacc.c:1646 */
3678 break;
3679
3680 case 81:
3681 #line 1511 "ctf-parser.y" /* yacc.c:1646 */
3682 {
3683 (yyval.n) = make_node(scanner, NODE_CALLSITE);
3684 if (set_parent_node((yyvsp[-1].n), (yyval.n)))
3685 reparent_error(scanner, "trace_declaration");
3686 }
3687 #line 3688 "ctf-parser.c" /* yacc.c:1646 */
3688 break;
3689
3690 case 82:
3691 #line 1520 "ctf-parser.y" /* yacc.c:1646 */
3692 { push_scope(scanner); }
3693 #line 3694 "ctf-parser.c" /* yacc.c:1646 */
3694 break;
3695
3696 case 83:
3697 #line 1525 "ctf-parser.y" /* yacc.c:1646 */
3698 { pop_scope(scanner); }
3699 #line 3700 "ctf-parser.c" /* yacc.c:1646 */
3700 break;
3701
3702 case 84:
3703 #line 1530 "ctf-parser.y" /* yacc.c:1646 */
3704 {
3705 struct ctf_node *node;
3706
3707 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3708 node = make_node(scanner, NODE_TYPE_SPECIFIER);
3709 node->u.type_specifier.type = TYPESPEC_CONST;
3710 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
3711 }
3712 #line 3713 "ctf-parser.c" /* yacc.c:1646 */
3713 break;
3714
3715 case 85:
3716 #line 1539 "ctf-parser.y" /* yacc.c:1646 */
3717 {
3718 struct ctf_node *node;
3719
3720 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3721 node = (yyvsp[0].n);
3722 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
3723 }
3724 #line 3725 "ctf-parser.c" /* yacc.c:1646 */
3725 break;
3726
3727 case 86:
3728 #line 1547 "ctf-parser.y" /* yacc.c:1646 */
3729 {
3730 struct ctf_node *node;
3731
3732 (yyval.n) = (yyvsp[-1].n);
3733 node = make_node(scanner, NODE_TYPE_SPECIFIER);
3734 node->u.type_specifier.type = TYPESPEC_CONST;
3735 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
3736 }
3737 #line 3738 "ctf-parser.c" /* yacc.c:1646 */
3738 break;
3739
3740 case 87:
3741 #line 1556 "ctf-parser.y" /* yacc.c:1646 */
3742 {
3743 (yyval.n) = (yyvsp[-1].n);
3744 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->u.type_specifier_list.head);
3745 }
3746 #line 3747 "ctf-parser.c" /* yacc.c:1646 */
3747 break;
3748
3749 case 88:
3750 #line 1564 "ctf-parser.y" /* yacc.c:1646 */
3751 {
3752 struct ctf_node *node;
3753
3754 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3755 node = make_node(scanner, NODE_TYPE_SPECIFIER);
3756 node->u.type_specifier.type = TYPESPEC_CONST;
3757 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
3758 }
3759 #line 3760 "ctf-parser.c" /* yacc.c:1646 */
3760 break;
3761
3762 case 89:
3763 #line 1573 "ctf-parser.y" /* yacc.c:1646 */
3764 {
3765 struct ctf_node *node;
3766
3767 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
3768 node = (yyvsp[0].n);
3769 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
3770 }
3771 #line 3772 "ctf-parser.c" /* yacc.c:1646 */
3772 break;
3773
3774 case 90:
3775 #line 1581 "ctf-parser.y" /* yacc.c:1646 */
3776 {
3777 struct ctf_node *node;
3778
3779 (yyval.n) = (yyvsp[-1].n);
3780 node = make_node(scanner, NODE_TYPE_SPECIFIER);
3781 node->u.type_specifier.type = TYPESPEC_CONST;
3782 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
3783 }
3784 #line 3785 "ctf-parser.c" /* yacc.c:1646 */
3785 break;
3786
3787 case 91:
3788 #line 1590 "ctf-parser.y" /* yacc.c:1646 */
3789 {
3790 (yyval.n) = (yyvsp[-1].n);
3791 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->u.type_specifier_list.head);
3792 }
3793 #line 3794 "ctf-parser.c" /* yacc.c:1646 */
3794 break;
3795
3796 case 92:
3797 #line 1598 "ctf-parser.y" /* yacc.c:1646 */
3798 { (yyval.n) = (yyvsp[0].n); }
3799 #line 3800 "ctf-parser.c" /* yacc.c:1646 */
3800 break;
3801
3802 case 93:
3803 #line 1600 "ctf-parser.y" /* yacc.c:1646 */
3804 {
3805 (yyval.n) = (yyvsp[-2].n);
3806 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->tmp_head);
3807 }
3808 #line 3809 "ctf-parser.c" /* yacc.c:1646 */
3809 break;
3810
3811 case 94:
3812 #line 1608 "ctf-parser.y" /* yacc.c:1646 */
3813 {
3814 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3815 (yyval.n)->u.type_specifier.type = TYPESPEC_CHAR;
3816 }
3817 #line 3818 "ctf-parser.c" /* yacc.c:1646 */
3818 break;
3819
3820 case 95:
3821 #line 1613 "ctf-parser.y" /* yacc.c:1646 */
3822 {
3823 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3824 (yyval.n)->u.type_specifier.type = TYPESPEC_SHORT;
3825 }
3826 #line 3827 "ctf-parser.c" /* yacc.c:1646 */
3827 break;
3828
3829 case 96:
3830 #line 1618 "ctf-parser.y" /* yacc.c:1646 */
3831 {
3832 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3833 (yyval.n)->u.type_specifier.type = TYPESPEC_INT;
3834 }
3835 #line 3836 "ctf-parser.c" /* yacc.c:1646 */
3836 break;
3837
3838 case 97:
3839 #line 1623 "ctf-parser.y" /* yacc.c:1646 */
3840 {
3841 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3842 (yyval.n)->u.type_specifier.type = TYPESPEC_LONG;
3843 }
3844 #line 3845 "ctf-parser.c" /* yacc.c:1646 */
3845 break;
3846
3847 case 98:
3848 #line 1628 "ctf-parser.y" /* yacc.c:1646 */
3849 {
3850 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3851 (yyval.n)->u.type_specifier.type = TYPESPEC_SIGNED;
3852 }
3853 #line 3854 "ctf-parser.c" /* yacc.c:1646 */
3854 break;
3855
3856 case 99:
3857 #line 1633 "ctf-parser.y" /* yacc.c:1646 */
3858 {
3859 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3860 (yyval.n)->u.type_specifier.type = TYPESPEC_UNSIGNED;
3861 }
3862 #line 3863 "ctf-parser.c" /* yacc.c:1646 */
3863 break;
3864
3865 case 100:
3866 #line 1638 "ctf-parser.y" /* yacc.c:1646 */
3867 {
3868 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3869 (yyval.n)->u.type_specifier.type = TYPESPEC_BOOL;
3870 }
3871 #line 3872 "ctf-parser.c" /* yacc.c:1646 */
3872 break;
3873
3874 case 101:
3875 #line 1643 "ctf-parser.y" /* yacc.c:1646 */
3876 {
3877 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3878 (yyval.n)->u.type_specifier.type = TYPESPEC_ID_TYPE;
3879 (yyval.n)->u.type_specifier.id_type = yylval.s;
3880 }
3881 #line 3882 "ctf-parser.c" /* yacc.c:1646 */
3882 break;
3883
3884 case 102:
3885 #line 1649 "ctf-parser.y" /* yacc.c:1646 */
3886 {
3887 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3888 (yyval.n)->u.type_specifier.type = TYPESPEC_INTEGER;
3889 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_INTEGER);
3890 }
3891 #line 3892 "ctf-parser.c" /* yacc.c:1646 */
3892 break;
3893
3894 case 103:
3895 #line 1655 "ctf-parser.y" /* yacc.c:1646 */
3896 {
3897 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3898 (yyval.n)->u.type_specifier.type = TYPESPEC_INTEGER;
3899 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_INTEGER);
3900 if (set_parent_node((yyvsp[-1].n), (yyval.n)->u.type_specifier.node))
3901 reparent_error(scanner, "integer reparent error");
3902 }
3903 #line 3904 "ctf-parser.c" /* yacc.c:1646 */
3904 break;
3905
3906 case 104:
3907 #line 1666 "ctf-parser.y" /* yacc.c:1646 */
3908 {
3909 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3910 (yyval.n)->u.type_specifier.type = TYPESPEC_VOID;
3911 }
3912 #line 3913 "ctf-parser.c" /* yacc.c:1646 */
3913 break;
3914
3915 case 105:
3916 #line 1671 "ctf-parser.y" /* yacc.c:1646 */
3917 {
3918 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3919 (yyval.n)->u.type_specifier.type = TYPESPEC_CHAR;
3920 }
3921 #line 3922 "ctf-parser.c" /* yacc.c:1646 */
3922 break;
3923
3924 case 106:
3925 #line 1676 "ctf-parser.y" /* yacc.c:1646 */
3926 {
3927 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3928 (yyval.n)->u.type_specifier.type = TYPESPEC_SHORT;
3929 }
3930 #line 3931 "ctf-parser.c" /* yacc.c:1646 */
3931 break;
3932
3933 case 107:
3934 #line 1681 "ctf-parser.y" /* yacc.c:1646 */
3935 {
3936 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3937 (yyval.n)->u.type_specifier.type = TYPESPEC_INT;
3938 }
3939 #line 3940 "ctf-parser.c" /* yacc.c:1646 */
3940 break;
3941
3942 case 108:
3943 #line 1686 "ctf-parser.y" /* yacc.c:1646 */
3944 {
3945 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3946 (yyval.n)->u.type_specifier.type = TYPESPEC_LONG;
3947 }
3948 #line 3949 "ctf-parser.c" /* yacc.c:1646 */
3949 break;
3950
3951 case 109:
3952 #line 1691 "ctf-parser.y" /* yacc.c:1646 */
3953 {
3954 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3955 (yyval.n)->u.type_specifier.type = TYPESPEC_FLOAT;
3956 }
3957 #line 3958 "ctf-parser.c" /* yacc.c:1646 */
3958 break;
3959
3960 case 110:
3961 #line 1696 "ctf-parser.y" /* yacc.c:1646 */
3962 {
3963 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3964 (yyval.n)->u.type_specifier.type = TYPESPEC_DOUBLE;
3965 }
3966 #line 3967 "ctf-parser.c" /* yacc.c:1646 */
3967 break;
3968
3969 case 111:
3970 #line 1701 "ctf-parser.y" /* yacc.c:1646 */
3971 {
3972 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3973 (yyval.n)->u.type_specifier.type = TYPESPEC_SIGNED;
3974 }
3975 #line 3976 "ctf-parser.c" /* yacc.c:1646 */
3976 break;
3977
3978 case 112:
3979 #line 1706 "ctf-parser.y" /* yacc.c:1646 */
3980 {
3981 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3982 (yyval.n)->u.type_specifier.type = TYPESPEC_UNSIGNED;
3983 }
3984 #line 3985 "ctf-parser.c" /* yacc.c:1646 */
3985 break;
3986
3987 case 113:
3988 #line 1711 "ctf-parser.y" /* yacc.c:1646 */
3989 {
3990 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
3991 (yyval.n)->u.type_specifier.type = TYPESPEC_BOOL;
3992 }
3993 #line 3994 "ctf-parser.c" /* yacc.c:1646 */
3994 break;
3995
3996 case 114:
3997 #line 1716 "ctf-parser.y" /* yacc.c:1646 */
3998 {
3999 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4000 (yyval.n)->u.type_specifier.type = TYPESPEC_COMPLEX;
4001 }
4002 #line 4003 "ctf-parser.c" /* yacc.c:1646 */
4003 break;
4004
4005 case 115:
4006 #line 1721 "ctf-parser.y" /* yacc.c:1646 */
4007 {
4008 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4009 (yyval.n)->u.type_specifier.type = TYPESPEC_IMAGINARY;
4010 }
4011 #line 4012 "ctf-parser.c" /* yacc.c:1646 */
4012 break;
4013
4014 case 116:
4015 #line 1726 "ctf-parser.y" /* yacc.c:1646 */
4016 {
4017 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4018 (yyval.n)->u.type_specifier.type = TYPESPEC_ID_TYPE;
4019 (yyval.n)->u.type_specifier.id_type = yylval.s;
4020 }
4021 #line 4022 "ctf-parser.c" /* yacc.c:1646 */
4022 break;
4023
4024 case 117:
4025 #line 1732 "ctf-parser.y" /* yacc.c:1646 */
4026 {
4027 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4028 (yyval.n)->u.type_specifier.type = TYPESPEC_FLOATING_POINT;
4029 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_FLOATING_POINT);
4030 }
4031 #line 4032 "ctf-parser.c" /* yacc.c:1646 */
4032 break;
4033
4034 case 118:
4035 #line 1738 "ctf-parser.y" /* yacc.c:1646 */
4036 {
4037 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4038 (yyval.n)->u.type_specifier.type = TYPESPEC_FLOATING_POINT;
4039 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_FLOATING_POINT);
4040 if (set_parent_node((yyvsp[-1].n), (yyval.n)->u.type_specifier.node))
4041 reparent_error(scanner, "floating point reparent error");
4042 }
4043 #line 4044 "ctf-parser.c" /* yacc.c:1646 */
4044 break;
4045
4046 case 119:
4047 #line 1746 "ctf-parser.y" /* yacc.c:1646 */
4048 {
4049 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4050 (yyval.n)->u.type_specifier.type = TYPESPEC_INTEGER;
4051 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_INTEGER);
4052 }
4053 #line 4054 "ctf-parser.c" /* yacc.c:1646 */
4054 break;
4055
4056 case 120:
4057 #line 1752 "ctf-parser.y" /* yacc.c:1646 */
4058 {
4059 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4060 (yyval.n)->u.type_specifier.type = TYPESPEC_INTEGER;
4061 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_INTEGER);
4062 if (set_parent_node((yyvsp[-1].n), (yyval.n)->u.type_specifier.node))
4063 reparent_error(scanner, "integer reparent error");
4064 }
4065 #line 4066 "ctf-parser.c" /* yacc.c:1646 */
4066 break;
4067
4068 case 121:
4069 #line 1760 "ctf-parser.y" /* yacc.c:1646 */
4070 {
4071 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4072 (yyval.n)->u.type_specifier.type = TYPESPEC_STRING;
4073 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_STRING);
4074 }
4075 #line 4076 "ctf-parser.c" /* yacc.c:1646 */
4076 break;
4077
4078 case 122:
4079 #line 1766 "ctf-parser.y" /* yacc.c:1646 */
4080 {
4081 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4082 (yyval.n)->u.type_specifier.type = TYPESPEC_STRING;
4083 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_STRING);
4084 }
4085 #line 4086 "ctf-parser.c" /* yacc.c:1646 */
4086 break;
4087
4088 case 123:
4089 #line 1772 "ctf-parser.y" /* yacc.c:1646 */
4090 {
4091 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4092 (yyval.n)->u.type_specifier.type = TYPESPEC_STRING;
4093 (yyval.n)->u.type_specifier.node = make_node(scanner, NODE_STRING);
4094 if (set_parent_node((yyvsp[-1].n), (yyval.n)->u.type_specifier.node))
4095 reparent_error(scanner, "string reparent error");
4096 }
4097 #line 4098 "ctf-parser.c" /* yacc.c:1646 */
4098 break;
4099
4100 case 124:
4101 #line 1780 "ctf-parser.y" /* yacc.c:1646 */
4102 {
4103 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4104 (yyval.n)->u.type_specifier.type = TYPESPEC_ENUM;
4105 (yyval.n)->u.type_specifier.node = (yyvsp[0].n);
4106 }
4107 #line 4108 "ctf-parser.c" /* yacc.c:1646 */
4108 break;
4109
4110 case 125:
4111 #line 1786 "ctf-parser.y" /* yacc.c:1646 */
4112 {
4113 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4114 (yyval.n)->u.type_specifier.type = TYPESPEC_VARIANT;
4115 (yyval.n)->u.type_specifier.node = (yyvsp[0].n);
4116 }
4117 #line 4118 "ctf-parser.c" /* yacc.c:1646 */
4118 break;
4119
4120 case 126:
4121 #line 1792 "ctf-parser.y" /* yacc.c:1646 */
4122 {
4123 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER);
4124 (yyval.n)->u.type_specifier.type = TYPESPEC_STRUCT;
4125 (yyval.n)->u.type_specifier.node = (yyvsp[0].n);
4126 }
4127 #line 4128 "ctf-parser.c" /* yacc.c:1646 */
4128 break;
4129
4130 case 127:
4131 #line 1801 "ctf-parser.y" /* yacc.c:1646 */
4132 {
4133 (yyval.n) = make_node(scanner, NODE_STRUCT);
4134 (yyval.n)->u._struct.has_body = 1;
4135 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4136 reparent_error(scanner, "struct reparent error");
4137 }
4138 #line 4139 "ctf-parser.c" /* yacc.c:1646 */
4139 break;
4140
4141 case 128:
4142 #line 1808 "ctf-parser.y" /* yacc.c:1646 */
4143 {
4144 (yyval.n) = make_node(scanner, NODE_STRUCT);
4145 (yyval.n)->u._struct.has_body = 1;
4146 (yyval.n)->u._struct.name = (yyvsp[-3].s);
4147 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4148 reparent_error(scanner, "struct reparent error");
4149 }
4150 #line 4151 "ctf-parser.c" /* yacc.c:1646 */
4151 break;
4152
4153 case 129:
4154 #line 1816 "ctf-parser.y" /* yacc.c:1646 */
4155 {
4156 (yyval.n) = make_node(scanner, NODE_STRUCT);
4157 (yyval.n)->u._struct.has_body = 1;
4158 (yyval.n)->u._struct.name = (yyvsp[-3].s);
4159 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4160 reparent_error(scanner, "struct reparent error");
4161 }
4162 #line 4163 "ctf-parser.c" /* yacc.c:1646 */
4163 break;
4164
4165 case 130:
4166 #line 1824 "ctf-parser.y" /* yacc.c:1646 */
4167 {
4168 (yyval.n) = make_node(scanner, NODE_STRUCT);
4169 (yyval.n)->u._struct.has_body = 0;
4170 (yyval.n)->u._struct.name = (yyvsp[0].s);
4171 }
4172 #line 4173 "ctf-parser.c" /* yacc.c:1646 */
4173 break;
4174
4175 case 131:
4176 #line 1830 "ctf-parser.y" /* yacc.c:1646 */
4177 {
4178 (yyval.n) = make_node(scanner, NODE_STRUCT);
4179 (yyval.n)->u._struct.has_body = 0;
4180 (yyval.n)->u._struct.name = (yyvsp[0].s);
4181 }
4182 #line 4183 "ctf-parser.c" /* yacc.c:1646 */
4183 break;
4184
4185 case 132:
4186 #line 1836 "ctf-parser.y" /* yacc.c:1646 */
4187 {
4188 (yyval.n) = make_node(scanner, NODE_STRUCT);
4189 (yyval.n)->u._struct.has_body = 1;
4190 bt_list_add_tail(&((yyvsp[-1].n))->siblings, &(yyval.n)->u._struct.min_align);
4191 if ((yyvsp[-5].n) && set_parent_node((yyvsp[-5].n), (yyval.n)))
4192 reparent_error(scanner, "struct reparent error");
4193 }
4194 #line 4195 "ctf-parser.c" /* yacc.c:1646 */
4195 break;
4196
4197 case 133:
4198 #line 1844 "ctf-parser.y" /* yacc.c:1646 */
4199 {
4200 (yyval.n) = make_node(scanner, NODE_STRUCT);
4201 (yyval.n)->u._struct.has_body = 1;
4202 (yyval.n)->u._struct.name = (yyvsp[-7].s);
4203 bt_list_add_tail(&((yyvsp[-1].n))->siblings, &(yyval.n)->u._struct.min_align);
4204 if ((yyvsp[-5].n) && set_parent_node((yyvsp[-5].n), (yyval.n)))
4205 reparent_error(scanner, "struct reparent error");
4206 }
4207 #line 4208 "ctf-parser.c" /* yacc.c:1646 */
4208 break;
4209
4210 case 134:
4211 #line 1853 "ctf-parser.y" /* yacc.c:1646 */
4212 {
4213 (yyval.n) = make_node(scanner, NODE_STRUCT);
4214 (yyval.n)->u._struct.has_body = 1;
4215 (yyval.n)->u._struct.name = (yyvsp[-7].s);
4216 bt_list_add_tail(&((yyvsp[-1].n))->siblings, &(yyval.n)->u._struct.min_align);
4217 if ((yyvsp[-5].n) && set_parent_node((yyvsp[-5].n), (yyval.n)))
4218 reparent_error(scanner, "struct reparent error");
4219 }
4220 #line 4221 "ctf-parser.c" /* yacc.c:1646 */
4221 break;
4222
4223 case 135:
4224 #line 1865 "ctf-parser.y" /* yacc.c:1646 */
4225 { push_scope(scanner); }
4226 #line 4227 "ctf-parser.c" /* yacc.c:1646 */
4227 break;
4228
4229 case 136:
4230 #line 1870 "ctf-parser.y" /* yacc.c:1646 */
4231 { pop_scope(scanner); }
4232 #line 4233 "ctf-parser.c" /* yacc.c:1646 */
4233 break;
4234
4235 case 137:
4236 #line 1875 "ctf-parser.y" /* yacc.c:1646 */
4237 {
4238 (yyval.n) = make_node(scanner, NODE_VARIANT);
4239 (yyval.n)->u.variant.has_body = 1;
4240 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4241 reparent_error(scanner, "variant reparent error");
4242 }
4243 #line 4244 "ctf-parser.c" /* yacc.c:1646 */
4244 break;
4245
4246 case 138:
4247 #line 1882 "ctf-parser.y" /* yacc.c:1646 */
4248 {
4249 (yyval.n) = make_node(scanner, NODE_VARIANT);
4250 (yyval.n)->u.variant.has_body = 1;
4251 (yyval.n)->u.variant.choice = (yyvsp[-4].s);
4252 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4253 reparent_error(scanner, "variant reparent error");
4254 }
4255 #line 4256 "ctf-parser.c" /* yacc.c:1646 */
4256 break;
4257
4258 case 139:
4259 #line 1890 "ctf-parser.y" /* yacc.c:1646 */
4260 {
4261 (yyval.n) = make_node(scanner, NODE_VARIANT);
4262 (yyval.n)->u.variant.has_body = 1;
4263 (yyval.n)->u.variant.choice = (yyvsp[-4].s);
4264 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4265 reparent_error(scanner, "variant reparent error");
4266 }
4267 #line 4268 "ctf-parser.c" /* yacc.c:1646 */
4268 break;
4269
4270 case 140:
4271 #line 1898 "ctf-parser.y" /* yacc.c:1646 */
4272 {
4273 (yyval.n) = make_node(scanner, NODE_VARIANT);
4274 (yyval.n)->u.variant.has_body = 1;
4275 (yyval.n)->u.variant.name = (yyvsp[-3].s);
4276 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4277 reparent_error(scanner, "variant reparent error");
4278 }
4279 #line 4280 "ctf-parser.c" /* yacc.c:1646 */
4280 break;
4281
4282 case 141:
4283 #line 1906 "ctf-parser.y" /* yacc.c:1646 */
4284 {
4285 (yyval.n) = make_node(scanner, NODE_VARIANT);
4286 (yyval.n)->u.variant.has_body = 1;
4287 (yyval.n)->u.variant.name = (yyvsp[-6].s);
4288 (yyval.n)->u.variant.choice = (yyvsp[-4].s);
4289 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4290 reparent_error(scanner, "variant reparent error");
4291 }
4292 #line 4293 "ctf-parser.c" /* yacc.c:1646 */
4293 break;
4294
4295 case 142:
4296 #line 1915 "ctf-parser.y" /* yacc.c:1646 */
4297 {
4298 (yyval.n) = make_node(scanner, NODE_VARIANT);
4299 (yyval.n)->u.variant.has_body = 0;
4300 (yyval.n)->u.variant.name = (yyvsp[-3].s);
4301 (yyval.n)->u.variant.choice = (yyvsp[-1].s);
4302 }
4303 #line 4304 "ctf-parser.c" /* yacc.c:1646 */
4304 break;
4305
4306 case 143:
4307 #line 1922 "ctf-parser.y" /* yacc.c:1646 */
4308 {
4309 (yyval.n) = make_node(scanner, NODE_VARIANT);
4310 (yyval.n)->u.variant.has_body = 1;
4311 (yyval.n)->u.variant.name = (yyvsp[-6].s);
4312 (yyval.n)->u.variant.choice = (yyvsp[-4].s);
4313 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4314 reparent_error(scanner, "variant reparent error");
4315 }
4316 #line 4317 "ctf-parser.c" /* yacc.c:1646 */
4317 break;
4318
4319 case 144:
4320 #line 1931 "ctf-parser.y" /* yacc.c:1646 */
4321 {
4322 (yyval.n) = make_node(scanner, NODE_VARIANT);
4323 (yyval.n)->u.variant.has_body = 0;
4324 (yyval.n)->u.variant.name = (yyvsp[-3].s);
4325 (yyval.n)->u.variant.choice = (yyvsp[-1].s);
4326 }
4327 #line 4328 "ctf-parser.c" /* yacc.c:1646 */
4328 break;
4329
4330 case 145:
4331 #line 1938 "ctf-parser.y" /* yacc.c:1646 */
4332 {
4333 (yyval.n) = make_node(scanner, NODE_VARIANT);
4334 (yyval.n)->u.variant.has_body = 1;
4335 (yyval.n)->u.variant.name = (yyvsp[-3].s);
4336 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4337 reparent_error(scanner, "variant reparent error");
4338 }
4339 #line 4340 "ctf-parser.c" /* yacc.c:1646 */
4340 break;
4341
4342 case 146:
4343 #line 1946 "ctf-parser.y" /* yacc.c:1646 */
4344 {
4345 (yyval.n) = make_node(scanner, NODE_VARIANT);
4346 (yyval.n)->u.variant.has_body = 1;
4347 (yyval.n)->u.variant.name = (yyvsp[-6].s);
4348 (yyval.n)->u.variant.choice = (yyvsp[-4].s);
4349 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4350 reparent_error(scanner, "variant reparent error");
4351 }
4352 #line 4353 "ctf-parser.c" /* yacc.c:1646 */
4353 break;
4354
4355 case 147:
4356 #line 1955 "ctf-parser.y" /* yacc.c:1646 */
4357 {
4358 (yyval.n) = make_node(scanner, NODE_VARIANT);
4359 (yyval.n)->u.variant.has_body = 0;
4360 (yyval.n)->u.variant.name = (yyvsp[-3].s);
4361 (yyval.n)->u.variant.choice = (yyvsp[-1].s);
4362 }
4363 #line 4364 "ctf-parser.c" /* yacc.c:1646 */
4364 break;
4365
4366 case 148:
4367 #line 1962 "ctf-parser.y" /* yacc.c:1646 */
4368 {
4369 (yyval.n) = make_node(scanner, NODE_VARIANT);
4370 (yyval.n)->u.variant.has_body = 1;
4371 (yyval.n)->u.variant.name = (yyvsp[-6].s);
4372 (yyval.n)->u.variant.choice = (yyvsp[-4].s);
4373 if ((yyvsp[-1].n) && set_parent_node((yyvsp[-1].n), (yyval.n)))
4374 reparent_error(scanner, "variant reparent error");
4375 }
4376 #line 4377 "ctf-parser.c" /* yacc.c:1646 */
4377 break;
4378
4379 case 149:
4380 #line 1971 "ctf-parser.y" /* yacc.c:1646 */
4381 {
4382 (yyval.n) = make_node(scanner, NODE_VARIANT);
4383 (yyval.n)->u.variant.has_body = 0;
4384 (yyval.n)->u.variant.name = (yyvsp[-3].s);
4385 (yyval.n)->u.variant.choice = (yyvsp[-1].s);
4386 }
4387 #line 4388 "ctf-parser.c" /* yacc.c:1646 */
4388 break;
4389
4390 case 150:
4391 #line 1981 "ctf-parser.y" /* yacc.c:1646 */
4392 { push_scope(scanner); }
4393 #line 4394 "ctf-parser.c" /* yacc.c:1646 */
4394 break;
4395
4396 case 151:
4397 #line 1986 "ctf-parser.y" /* yacc.c:1646 */
4398 { pop_scope(scanner); }
4399 #line 4400 "ctf-parser.c" /* yacc.c:1646 */
4400 break;
4401
4402 case 152:
4403 #line 1991 "ctf-parser.y" /* yacc.c:1646 */
4404 {
4405 (yyval.n) = make_node(scanner, NODE_ENUM);
4406 (yyval.n)->u._enum.has_body = 1;
4407 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4408 }
4409 #line 4410 "ctf-parser.c" /* yacc.c:1646 */
4410 break;
4411
4412 case 153:
4413 #line 1997 "ctf-parser.y" /* yacc.c:1646 */
4414 {
4415 (yyval.n) = make_node(scanner, NODE_ENUM);
4416 (yyval.n)->u._enum.has_body = 1;
4417 ((yyval.n))->u._enum.container_type = (yyvsp[-3].n);
4418 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4419 }
4420 #line 4421 "ctf-parser.c" /* yacc.c:1646 */
4421 break;
4422
4423 case 154:
4424 #line 2004 "ctf-parser.y" /* yacc.c:1646 */
4425 {
4426 (yyval.n) = make_node(scanner, NODE_ENUM);
4427 (yyval.n)->u._enum.has_body = 1;
4428 (yyval.n)->u._enum.enum_id = (yyvsp[-3].s);
4429 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4430 }
4431 #line 4432 "ctf-parser.c" /* yacc.c:1646 */
4432 break;
4433
4434 case 155:
4435 #line 2011 "ctf-parser.y" /* yacc.c:1646 */
4436 {
4437 (yyval.n) = make_node(scanner, NODE_ENUM);
4438 (yyval.n)->u._enum.has_body = 1;
4439 (yyval.n)->u._enum.enum_id = (yyvsp[-5].s);
4440 ((yyval.n))->u._enum.container_type = (yyvsp[-3].n);
4441 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4442 }
4443 #line 4444 "ctf-parser.c" /* yacc.c:1646 */
4444 break;
4445
4446 case 156:
4447 #line 2019 "ctf-parser.y" /* yacc.c:1646 */
4448 {
4449 (yyval.n) = make_node(scanner, NODE_ENUM);
4450 (yyval.n)->u._enum.has_body = 1;
4451 (yyval.n)->u._enum.enum_id = (yyvsp[-3].s);
4452 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4453 }
4454 #line 4455 "ctf-parser.c" /* yacc.c:1646 */
4455 break;
4456
4457 case 157:
4458 #line 2026 "ctf-parser.y" /* yacc.c:1646 */
4459 {
4460 (yyval.n) = make_node(scanner, NODE_ENUM);
4461 (yyval.n)->u._enum.has_body = 1;
4462 (yyval.n)->u._enum.enum_id = (yyvsp[-5].s);
4463 ((yyval.n))->u._enum.container_type = (yyvsp[-3].n);
4464 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4465 }
4466 #line 4467 "ctf-parser.c" /* yacc.c:1646 */
4467 break;
4468
4469 case 158:
4470 #line 2034 "ctf-parser.y" /* yacc.c:1646 */
4471 {
4472 (yyval.n) = make_node(scanner, NODE_ENUM);
4473 (yyval.n)->u._enum.has_body = 1;
4474 _bt_list_splice_tail(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4475 }
4476 #line 4477 "ctf-parser.c" /* yacc.c:1646 */
4477 break;
4478
4479 case 159:
4480 #line 2040 "ctf-parser.y" /* yacc.c:1646 */
4481 {
4482 (yyval.n) = make_node(scanner, NODE_ENUM);
4483 (yyval.n)->u._enum.has_body = 1;
4484 ((yyval.n))->u._enum.container_type = (yyvsp[-4].n);
4485 _bt_list_splice_tail(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4486 }
4487 #line 4488 "ctf-parser.c" /* yacc.c:1646 */
4488 break;
4489
4490 case 160:
4491 #line 2047 "ctf-parser.y" /* yacc.c:1646 */
4492 {
4493 (yyval.n) = make_node(scanner, NODE_ENUM);
4494 (yyval.n)->u._enum.has_body = 1;
4495 (yyval.n)->u._enum.enum_id = (yyvsp[-4].s);
4496 _bt_list_splice_tail(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4497 }
4498 #line 4499 "ctf-parser.c" /* yacc.c:1646 */
4499 break;
4500
4501 case 161:
4502 #line 2054 "ctf-parser.y" /* yacc.c:1646 */
4503 {
4504 (yyval.n) = make_node(scanner, NODE_ENUM);
4505 (yyval.n)->u._enum.has_body = 1;
4506 (yyval.n)->u._enum.enum_id = (yyvsp[-6].s);
4507 ((yyval.n))->u._enum.container_type = (yyvsp[-4].n);
4508 _bt_list_splice_tail(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4509 }
4510 #line 4511 "ctf-parser.c" /* yacc.c:1646 */
4511 break;
4512
4513 case 162:
4514 #line 2062 "ctf-parser.y" /* yacc.c:1646 */
4515 {
4516 (yyval.n) = make_node(scanner, NODE_ENUM);
4517 (yyval.n)->u._enum.has_body = 0;
4518 (yyval.n)->u._enum.enum_id = (yyvsp[0].s);
4519 }
4520 #line 4521 "ctf-parser.c" /* yacc.c:1646 */
4521 break;
4522
4523 case 163:
4524 #line 2068 "ctf-parser.y" /* yacc.c:1646 */
4525 {
4526 (yyval.n) = make_node(scanner, NODE_ENUM);
4527 (yyval.n)->u._enum.has_body = 1;
4528 (yyval.n)->u._enum.enum_id = (yyvsp[-4].s);
4529 _bt_list_splice_tail(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4530 }
4531 #line 4532 "ctf-parser.c" /* yacc.c:1646 */
4532 break;
4533
4534 case 164:
4535 #line 2075 "ctf-parser.y" /* yacc.c:1646 */
4536 {
4537 (yyval.n) = make_node(scanner, NODE_ENUM);
4538 (yyval.n)->u._enum.has_body = 1;
4539 (yyval.n)->u._enum.enum_id = (yyvsp[-6].s);
4540 ((yyval.n))->u._enum.container_type = (yyvsp[-4].n);
4541 _bt_list_splice_tail(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->u._enum.enumerator_list);
4542 }
4543 #line 4544 "ctf-parser.c" /* yacc.c:1646 */
4544 break;
4545
4546 case 165:
4547 #line 2083 "ctf-parser.y" /* yacc.c:1646 */
4548 {
4549 (yyval.n) = make_node(scanner, NODE_ENUM);
4550 (yyval.n)->u._enum.has_body = 0;
4551 (yyval.n)->u._enum.enum_id = (yyvsp[0].s);
4552 }
4553 #line 4554 "ctf-parser.c" /* yacc.c:1646 */
4554 break;
4555
4556 case 166:
4557 #line 2092 "ctf-parser.y" /* yacc.c:1646 */
4558 { (yyval.n) = NULL; }
4559 #line 4560 "ctf-parser.c" /* yacc.c:1646 */
4560 break;
4561
4562 case 167:
4563 #line 2094 "ctf-parser.y" /* yacc.c:1646 */
4564 {
4565 if ((yyvsp[-1].n)) {
4566 (yyval.n) = (yyvsp[-1].n);
4567 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->tmp_head);
4568 } else {
4569 (yyval.n) = (yyvsp[0].n);
4570 bt_list_add_tail(&((yyval.n))->siblings, &((yyval.n))->tmp_head);
4571 }
4572 }
4573 #line 4574 "ctf-parser.c" /* yacc.c:1646 */
4574 break;
4575
4576 case 168:
4577 #line 2107 "ctf-parser.y" /* yacc.c:1646 */
4578 {
4579 struct ctf_node *list;
4580
4581 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4582 _bt_list_splice_tail(&((yyvsp[-2].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
4583 (yyval.n) = make_node(scanner, NODE_STRUCT_OR_VARIANT_DECLARATION);
4584 ((yyval.n))->u.struct_or_variant_declaration.type_specifier_list = list;
4585 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.struct_or_variant_declaration.type_declarators);
4586 }
4587 #line 4588 "ctf-parser.c" /* yacc.c:1646 */
4588 break;
4589
4590 case 169:
4591 #line 2117 "ctf-parser.y" /* yacc.c:1646 */
4592 {
4593 struct ctf_node *list;
4594
4595 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
4596 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4597 (yyval.n)->u._typedef.type_specifier_list = list;
4598 _bt_list_splice_tail(&((yyvsp[-4].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
4599 _bt_list_splice_tail(&((yyvsp[-2].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
4600 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
4601 }
4602 #line 4603 "ctf-parser.c" /* yacc.c:1646 */
4603 break;
4604
4605 case 170:
4606 #line 2128 "ctf-parser.y" /* yacc.c:1646 */
4607 {
4608 struct ctf_node *list;
4609
4610 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
4611 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4612 (yyval.n)->u._typedef.type_specifier_list = list;
4613 _bt_list_splice_tail(&((yyvsp[-2].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
4614 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
4615 }
4616 #line 4617 "ctf-parser.c" /* yacc.c:1646 */
4617 break;
4618
4619 case 171:
4620 #line 2138 "ctf-parser.y" /* yacc.c:1646 */
4621 {
4622 struct ctf_node *list;
4623
4624 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4625 _bt_list_splice_tail(&((yyvsp[-3].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
4626 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
4627 ((yyval.n))->u.struct_or_variant_declaration.type_specifier_list = list;
4628 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
4629 }
4630 #line 4631 "ctf-parser.c" /* yacc.c:1646 */
4631 break;
4632
4633 case 172:
4634 #line 2148 "ctf-parser.y" /* yacc.c:1646 */
4635 {
4636 struct ctf_node *list;
4637
4638 (yyval.n) = make_node(scanner, NODE_TYPEALIAS);
4639 (yyval.n)->u.typealias.target = make_node(scanner, NODE_TYPEALIAS_TARGET);
4640 (yyval.n)->u.typealias.alias = make_node(scanner, NODE_TYPEALIAS_ALIAS);
4641
4642 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4643 (yyval.n)->u.typealias.target->u.typealias_target.type_specifier_list = list;
4644 _bt_list_splice_tail(&((yyvsp[-5].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
4645 _bt_list_splice_tail(&((yyvsp[-4].n))->tmp_head, &((yyval.n))->u.typealias.target->u.typealias_target.type_declarators);
4646
4647 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4648 (yyval.n)->u.typealias.alias->u.typealias_alias.type_specifier_list = list;
4649 _bt_list_splice_tail(&((yyvsp[-2].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
4650 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.typealias.alias->u.typealias_alias.type_declarators);
4651 }
4652 #line 4653 "ctf-parser.c" /* yacc.c:1646 */
4653 break;
4654
4655 case 173:
4656 #line 2169 "ctf-parser.y" /* yacc.c:1646 */
4657 {
4658 struct ctf_node *node;
4659
4660 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4661 node = make_node(scanner, NODE_TYPE_SPECIFIER);
4662 node->u.type_specifier.type = TYPESPEC_CONST;
4663 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
4664 }
4665 #line 4666 "ctf-parser.c" /* yacc.c:1646 */
4666 break;
4667
4668 case 174:
4669 #line 2178 "ctf-parser.y" /* yacc.c:1646 */
4670 {
4671 struct ctf_node *node;
4672
4673 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4674 node = (yyvsp[0].n);
4675 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
4676 }
4677 #line 4678 "ctf-parser.c" /* yacc.c:1646 */
4678 break;
4679
4680 case 175:
4681 #line 2186 "ctf-parser.y" /* yacc.c:1646 */
4682 {
4683 struct ctf_node *node;
4684
4685 add_type(scanner, (yyvsp[0].s));
4686 (yyval.n) = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
4687 node = make_node(scanner, NODE_TYPE_SPECIFIER);
4688 node->u.type_specifier.type = TYPESPEC_ID_TYPE;
4689 node->u.type_specifier.id_type = yylval.s;
4690 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
4691 }
4692 #line 4693 "ctf-parser.c" /* yacc.c:1646 */
4693 break;
4694
4695 case 176:
4696 #line 2197 "ctf-parser.y" /* yacc.c:1646 */
4697 {
4698 struct ctf_node *node;
4699
4700 (yyval.n) = (yyvsp[-1].n);
4701 node = make_node(scanner, NODE_TYPE_SPECIFIER);
4702 node->u.type_specifier.type = TYPESPEC_CONST;
4703 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
4704 }
4705 #line 4706 "ctf-parser.c" /* yacc.c:1646 */
4706 break;
4707
4708 case 177:
4709 #line 2206 "ctf-parser.y" /* yacc.c:1646 */
4710 {
4711 (yyval.n) = (yyvsp[-1].n);
4712 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->u.type_specifier_list.head);
4713 }
4714 #line 4715 "ctf-parser.c" /* yacc.c:1646 */
4715 break;
4716
4717 case 178:
4718 #line 2211 "ctf-parser.y" /* yacc.c:1646 */
4719 {
4720 struct ctf_node *node;
4721
4722 add_type(scanner, (yyvsp[0].s));
4723 (yyval.n) = (yyvsp[-1].n);
4724 node = make_node(scanner, NODE_TYPE_SPECIFIER);
4725 node->u.type_specifier.type = TYPESPEC_ID_TYPE;
4726 node->u.type_specifier.id_type = yylval.s;
4727 bt_list_add_tail(&node->siblings, &((yyval.n))->u.type_specifier_list.head);
4728 }
4729 #line 4730 "ctf-parser.c" /* yacc.c:1646 */
4730 break;
4731
4732 case 179:
4733 #line 2225 "ctf-parser.y" /* yacc.c:1646 */
4734 { (yyval.n) = (yyvsp[0].n); }
4735 #line 4736 "ctf-parser.c" /* yacc.c:1646 */
4736 break;
4737
4738 case 180:
4739 #line 2227 "ctf-parser.y" /* yacc.c:1646 */
4740 {
4741 (yyval.n) = (yyvsp[-2].n);
4742 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->tmp_head);
4743 }
4744 #line 4745 "ctf-parser.c" /* yacc.c:1646 */
4745 break;
4746
4747 case 181:
4748 #line 2235 "ctf-parser.y" /* yacc.c:1646 */
4749 { (yyval.n) = (yyvsp[0].n); }
4750 #line 4751 "ctf-parser.c" /* yacc.c:1646 */
4751 break;
4752
4753 case 182:
4754 #line 2237 "ctf-parser.y" /* yacc.c:1646 */
4755 { (yyval.n) = (yyvsp[0].n); }
4756 #line 4757 "ctf-parser.c" /* yacc.c:1646 */
4757 break;
4758
4759 case 183:
4760 #line 2239 "ctf-parser.y" /* yacc.c:1646 */
4761 {
4762 (yyval.n) = (yyvsp[-2].n);
4763 if (set_parent_node((yyvsp[0].n), (yyvsp[-2].n)))
4764 reparent_error(scanner, "struct_or_variant_declarator");
4765 }
4766 #line 4767 "ctf-parser.c" /* yacc.c:1646 */
4767 break;
4768
4769 case 184:
4770 #line 2248 "ctf-parser.y" /* yacc.c:1646 */
4771 { (yyval.n) = (yyvsp[0].n); }
4772 #line 4773 "ctf-parser.c" /* yacc.c:1646 */
4773 break;
4774
4775 case 185:
4776 #line 2250 "ctf-parser.y" /* yacc.c:1646 */
4777 {
4778 (yyval.n) = (yyvsp[-2].n);
4779 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->tmp_head);
4780 }
4781 #line 4782 "ctf-parser.c" /* yacc.c:1646 */
4782 break;
4783
4784 case 186:
4785 #line 2258 "ctf-parser.y" /* yacc.c:1646 */
4786 {
4787 (yyval.n) = make_node(scanner, NODE_ENUMERATOR);
4788 (yyval.n)->u.enumerator.id = (yyvsp[0].s);
4789 }
4790 #line 4791 "ctf-parser.c" /* yacc.c:1646 */
4791 break;
4792
4793 case 187:
4794 #line 2263 "ctf-parser.y" /* yacc.c:1646 */
4795 {
4796 (yyval.n) = make_node(scanner, NODE_ENUMERATOR);
4797 (yyval.n)->u.enumerator.id = (yyvsp[0].s);
4798 }
4799 #line 4800 "ctf-parser.c" /* yacc.c:1646 */
4800 break;
4801
4802 case 188:
4803 #line 2268 "ctf-parser.y" /* yacc.c:1646 */
4804 {
4805 (yyval.n) = make_node(scanner, NODE_ENUMERATOR);
4806 (yyval.n)->u.enumerator.id = (yyvsp[0].s);
4807 }
4808 #line 4809 "ctf-parser.c" /* yacc.c:1646 */
4809 break;
4810
4811 case 189:
4812 #line 2273 "ctf-parser.y" /* yacc.c:1646 */
4813 {
4814 (yyval.n) = make_node(scanner, NODE_ENUMERATOR);
4815 (yyval.n)->u.enumerator.id = (yyvsp[0].s);
4816 }
4817 #line 4818 "ctf-parser.c" /* yacc.c:1646 */
4818 break;
4819
4820 case 190:
4821 #line 2278 "ctf-parser.y" /* yacc.c:1646 */
4822 {
4823 (yyval.n) = make_node(scanner, NODE_ENUMERATOR);
4824 (yyval.n)->u.enumerator.id = (yyvsp[-2].s);
4825 bt_list_splice(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u.enumerator.values);
4826 }
4827 #line 4828 "ctf-parser.c" /* yacc.c:1646 */
4828 break;
4829
4830 case 191:
4831 #line 2284 "ctf-parser.y" /* yacc.c:1646 */
4832 {
4833 (yyval.n) = make_node(scanner, NODE_ENUMERATOR);
4834 (yyval.n)->u.enumerator.id = (yyvsp[-2].s);
4835 bt_list_splice(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u.enumerator.values);
4836 }
4837 #line 4838 "ctf-parser.c" /* yacc.c:1646 */
4838 break;
4839
4840 case 192:
4841 #line 2290 "ctf-parser.y" /* yacc.c:1646 */
4842 {
4843 (yyval.n) = make_node(scanner, NODE_ENUMERATOR);
4844 (yyval.n)->u.enumerator.id = (yyvsp[-2].s);
4845 bt_list_splice(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u.enumerator.values);
4846 }
4847 #line 4848 "ctf-parser.c" /* yacc.c:1646 */
4848 break;
4849
4850 case 193:
4851 #line 2296 "ctf-parser.y" /* yacc.c:1646 */
4852 {
4853 (yyval.n) = make_node(scanner, NODE_ENUMERATOR);
4854 (yyval.n)->u.enumerator.id = (yyvsp[-2].s);
4855 bt_list_splice(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u.enumerator.values);
4856 }
4857 #line 4858 "ctf-parser.c" /* yacc.c:1646 */
4858 break;
4859
4860 case 194:
4861 #line 2305 "ctf-parser.y" /* yacc.c:1646 */
4862 { (yyval.n) = (yyvsp[0].n); }
4863 #line 4864 "ctf-parser.c" /* yacc.c:1646 */
4864 break;
4865
4866 case 195:
4867 #line 2307 "ctf-parser.y" /* yacc.c:1646 */
4868 {
4869 (yyval.n) = (yyvsp[-2].n);
4870 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->tmp_head);
4871 }
4872 #line 4873 "ctf-parser.c" /* yacc.c:1646 */
4873 break;
4874
4875 case 196:
4876 #line 2315 "ctf-parser.y" /* yacc.c:1646 */
4877 { (yyval.n) = (yyvsp[0].n); }
4878 #line 4879 "ctf-parser.c" /* yacc.c:1646 */
4879 break;
4880
4881 case 197:
4882 #line 2317 "ctf-parser.y" /* yacc.c:1646 */
4883 {
4884 (yyval.n) = (yyvsp[0].n);
4885 bt_list_splice(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.type_declarator.pointers);
4886 }
4887 #line 4888 "ctf-parser.c" /* yacc.c:1646 */
4888 break;
4889
4890 case 198:
4891 #line 2325 "ctf-parser.y" /* yacc.c:1646 */
4892 {
4893 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
4894 (yyval.n)->u.type_declarator.type = TYPEDEC_ID;
4895 /* id is NULL */
4896 }
4897 #line 4898 "ctf-parser.c" /* yacc.c:1646 */
4898 break;
4899
4900 case 199:
4901 #line 2331 "ctf-parser.y" /* yacc.c:1646 */
4902 {
4903 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
4904 (yyval.n)->u.type_declarator.type = TYPEDEC_ID;
4905 (yyval.n)->u.type_declarator.u.id = (yyvsp[0].s);
4906 }
4907 #line 4908 "ctf-parser.c" /* yacc.c:1646 */
4908 break;
4909
4910 case 200:
4911 #line 2337 "ctf-parser.y" /* yacc.c:1646 */
4912 {
4913 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
4914 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
4915 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-1].n);
4916 }
4917 #line 4918 "ctf-parser.c" /* yacc.c:1646 */
4918 break;
4919
4920 case 201:
4921 #line 2343 "ctf-parser.y" /* yacc.c:1646 */
4922 {
4923 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
4924 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
4925 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-3].n);
4926 BT_INIT_LIST_HEAD(&((yyval.n))->u.type_declarator.u.nested.length);
4927 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.type_declarator.u.nested.length);
4928 }
4929 #line 4930 "ctf-parser.c" /* yacc.c:1646 */
4930 break;
4931
4932 case 202:
4933 #line 2351 "ctf-parser.y" /* yacc.c:1646 */
4934 {
4935 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
4936 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
4937 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-2].n);
4938 (yyval.n)->u.type_declarator.u.nested.abstract_array = 1;
4939 }
4940 #line 4941 "ctf-parser.c" /* yacc.c:1646 */
4941 break;
4942
4943 case 203:
4944 #line 2361 "ctf-parser.y" /* yacc.c:1646 */
4945 { (yyval.n) = (yyvsp[0].n); }
4946 #line 4947 "ctf-parser.c" /* yacc.c:1646 */
4947 break;
4948
4949 case 204:
4950 #line 2363 "ctf-parser.y" /* yacc.c:1646 */
4951 {
4952 (yyval.n) = (yyvsp[-2].n);
4953 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->tmp_head);
4954 }
4955 #line 4956 "ctf-parser.c" /* yacc.c:1646 */
4956 break;
4957
4958 case 205:
4959 #line 2371 "ctf-parser.y" /* yacc.c:1646 */
4960 { (yyval.n) = (yyvsp[0].n); }
4961 #line 4962 "ctf-parser.c" /* yacc.c:1646 */
4962 break;
4963
4964 case 206:
4965 #line 2373 "ctf-parser.y" /* yacc.c:1646 */
4966 {
4967 (yyval.n) = (yyvsp[0].n);
4968 bt_list_splice(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.type_declarator.pointers);
4969 }
4970 #line 4971 "ctf-parser.c" /* yacc.c:1646 */
4971 break;
4972
4973 case 207:
4974 #line 2381 "ctf-parser.y" /* yacc.c:1646 */
4975 {
4976 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
4977 (yyval.n)->u.type_declarator.type = TYPEDEC_ID;
4978 /* id is NULL */
4979 }
4980 #line 4981 "ctf-parser.c" /* yacc.c:1646 */
4981 break;
4982
4983 case 208:
4984 #line 2387 "ctf-parser.y" /* yacc.c:1646 */
4985 {
4986 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
4987 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
4988 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-1].n);
4989 }
4990 #line 4991 "ctf-parser.c" /* yacc.c:1646 */
4991 break;
4992
4993 case 209:
4994 #line 2393 "ctf-parser.y" /* yacc.c:1646 */
4995 {
4996 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
4997 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
4998 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-3].n);
4999 BT_INIT_LIST_HEAD(&((yyval.n))->u.type_declarator.u.nested.length);
5000 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.type_declarator.u.nested.length);
5001 }
5002 #line 5003 "ctf-parser.c" /* yacc.c:1646 */
5003 break;
5004
5005 case 210:
5006 #line 2401 "ctf-parser.y" /* yacc.c:1646 */
5007 {
5008 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
5009 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
5010 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-2].n);
5011 (yyval.n)->u.type_declarator.u.nested.abstract_array = 1;
5012 }
5013 #line 5014 "ctf-parser.c" /* yacc.c:1646 */
5014 break;
5015
5016 case 211:
5017 #line 2411 "ctf-parser.y" /* yacc.c:1646 */
5018 { (yyval.n) = (yyvsp[0].n); }
5019 #line 5020 "ctf-parser.c" /* yacc.c:1646 */
5020 break;
5021
5022 case 212:
5023 #line 2413 "ctf-parser.y" /* yacc.c:1646 */
5024 {
5025 (yyval.n) = (yyvsp[0].n);
5026 bt_list_splice(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.type_declarator.pointers);
5027 }
5028 #line 5029 "ctf-parser.c" /* yacc.c:1646 */
5029 break;
5030
5031 case 213:
5032 #line 2421 "ctf-parser.y" /* yacc.c:1646 */
5033 {
5034 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
5035 (yyval.n)->u.type_declarator.type = TYPEDEC_ID;
5036 (yyval.n)->u.type_declarator.u.id = (yyvsp[0].s);
5037 }
5038 #line 5039 "ctf-parser.c" /* yacc.c:1646 */
5039 break;
5040
5041 case 214:
5042 #line 2427 "ctf-parser.y" /* yacc.c:1646 */
5043 {
5044 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
5045 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
5046 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-1].n);
5047 }
5048 #line 5049 "ctf-parser.c" /* yacc.c:1646 */
5049 break;
5050
5051 case 215:
5052 #line 2433 "ctf-parser.y" /* yacc.c:1646 */
5053 {
5054 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
5055 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
5056 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-3].n);
5057 BT_INIT_LIST_HEAD(&((yyval.n))->u.type_declarator.u.nested.length);
5058 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.type_declarator.u.nested.length);
5059 }
5060 #line 5061 "ctf-parser.c" /* yacc.c:1646 */
5061 break;
5062
5063 case 216:
5064 #line 2444 "ctf-parser.y" /* yacc.c:1646 */
5065 { (yyval.n) = (yyvsp[0].n); }
5066 #line 5067 "ctf-parser.c" /* yacc.c:1646 */
5067 break;
5068
5069 case 217:
5070 #line 2446 "ctf-parser.y" /* yacc.c:1646 */
5071 {
5072 (yyval.n) = (yyvsp[0].n);
5073 bt_list_splice(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.type_declarator.pointers);
5074 }
5075 #line 5076 "ctf-parser.c" /* yacc.c:1646 */
5076 break;
5077
5078 case 218:
5079 #line 2454 "ctf-parser.y" /* yacc.c:1646 */
5080 {
5081 add_type(scanner, (yyvsp[0].s));
5082 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
5083 (yyval.n)->u.type_declarator.type = TYPEDEC_ID;
5084 (yyval.n)->u.type_declarator.u.id = (yyvsp[0].s);
5085 }
5086 #line 5087 "ctf-parser.c" /* yacc.c:1646 */
5087 break;
5088
5089 case 219:
5090 #line 2461 "ctf-parser.y" /* yacc.c:1646 */
5091 {
5092 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
5093 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
5094 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-1].n);
5095 }
5096 #line 5097 "ctf-parser.c" /* yacc.c:1646 */
5097 break;
5098
5099 case 220:
5100 #line 2467 "ctf-parser.y" /* yacc.c:1646 */
5101 {
5102 (yyval.n) = make_node(scanner, NODE_TYPE_DECLARATOR);
5103 (yyval.n)->u.type_declarator.type = TYPEDEC_NESTED;
5104 (yyval.n)->u.type_declarator.u.nested.type_declarator = (yyvsp[-3].n);
5105 BT_INIT_LIST_HEAD(&((yyval.n))->u.type_declarator.u.nested.length);
5106 _bt_list_splice_tail(&((yyvsp[-1].n))->tmp_head, &((yyval.n))->u.type_declarator.u.nested.length);
5107 }
5108 #line 5109 "ctf-parser.c" /* yacc.c:1646 */
5109 break;
5110
5111 case 221:
5112 #line 2478 "ctf-parser.y" /* yacc.c:1646 */
5113 {
5114 (yyval.n) = make_node(scanner, NODE_POINTER);
5115 }
5116 #line 5117 "ctf-parser.c" /* yacc.c:1646 */
5117 break;
5118
5119 case 222:
5120 #line 2482 "ctf-parser.y" /* yacc.c:1646 */
5121 {
5122 (yyval.n) = make_node(scanner, NODE_POINTER);
5123 bt_list_splice(&((yyvsp[0].n))->tmp_head, &((yyval.n))->tmp_head);
5124 }
5125 #line 5126 "ctf-parser.c" /* yacc.c:1646 */
5126 break;
5127
5128 case 223:
5129 #line 2487 "ctf-parser.y" /* yacc.c:1646 */
5130 {
5131 (yyval.n) = make_node(scanner, NODE_POINTER);
5132 (yyval.n)->u.pointer.const_qualifier = 1;
5133 bt_list_splice(&((yyvsp[0].n))->tmp_head, &((yyval.n))->tmp_head);
5134 }
5135 #line 5136 "ctf-parser.c" /* yacc.c:1646 */
5136 break;
5137
5138 case 226:
5139 #line 2504 "ctf-parser.y" /* yacc.c:1646 */
5140 { (yyval.n) = (yyvsp[-1].n); }
5141 #line 5142 "ctf-parser.c" /* yacc.c:1646 */
5142 break;
5143
5144 case 227:
5145 #line 2506 "ctf-parser.y" /* yacc.c:1646 */
5146 {
5147 (yyval.n) = (yyvsp[-2].n);
5148 bt_list_add_tail(&((yyvsp[-1].n))->siblings, &((yyval.n))->tmp_head);
5149 }
5150 #line 5151 "ctf-parser.c" /* yacc.c:1646 */
5151 break;
5152
5153 case 228:
5154 #line 2514 "ctf-parser.y" /* yacc.c:1646 */
5155 {
5156 /*
5157 * Because we have left and right, cannot use
5158 * set_parent_node.
5159 */
5160 (yyval.n) = make_node(scanner, NODE_CTF_EXPRESSION);
5161 _bt_list_splice_tail(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->u.ctf_expression.left);
5162 if ((yyvsp[-2].n)->u.unary_expression.type != UNARY_STRING)
5163 reparent_error(scanner, "ctf_assignment_expression left expects string");
5164 _bt_list_splice_tail(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u.ctf_expression.right);
5165 }
5166 #line 5167 "ctf-parser.c" /* yacc.c:1646 */
5167 break;
5168
5169 case 229:
5170 #line 2526 "ctf-parser.y" /* yacc.c:1646 */
5171 {
5172 /*
5173 * Because we have left and right, cannot use
5174 * set_parent_node.
5175 */
5176 (yyval.n) = make_node(scanner, NODE_CTF_EXPRESSION);
5177 _bt_list_splice_tail(&((yyvsp[-2].n))->tmp_head, &((yyval.n))->u.ctf_expression.left);
5178 if ((yyvsp[-2].n)->u.unary_expression.type != UNARY_STRING)
5179 reparent_error(scanner, "ctf_assignment_expression left expects string");
5180 bt_list_add_tail(&((yyvsp[0].n))->siblings, &((yyval.n))->u.ctf_expression.right);
5181 }
5182 #line 5183 "ctf-parser.c" /* yacc.c:1646 */
5183 break;
5184
5185 case 230:
5186 #line 2538 "ctf-parser.y" /* yacc.c:1646 */
5187 {
5188 struct ctf_node *list;
5189
5190 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
5191 _bt_list_splice_tail(&((yyvsp[-3].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
5192 _bt_list_splice_tail(&((yyvsp[-1].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
5193 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
5194 ((yyval.n))->u.struct_or_variant_declaration.type_specifier_list = list;
5195 _bt_list_splice_tail(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
5196 }
5197 #line 5198 "ctf-parser.c" /* yacc.c:1646 */
5198 break;
5199
5200 case 231:
5201 #line 2549 "ctf-parser.y" /* yacc.c:1646 */
5202 {
5203 struct ctf_node *list;
5204
5205 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
5206 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
5207 (yyval.n)->u._typedef.type_specifier_list = list;
5208 _bt_list_splice_tail(&((yyvsp[-1].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
5209 _bt_list_splice_tail(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
5210 }
5211 #line 5212 "ctf-parser.c" /* yacc.c:1646 */
5212 break;
5213
5214 case 232:
5215 #line 2559 "ctf-parser.y" /* yacc.c:1646 */
5216 {
5217 struct ctf_node *list;
5218
5219 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
5220 _bt_list_splice_tail(&((yyvsp[-2].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
5221 (yyval.n) = make_node(scanner, NODE_TYPEDEF);
5222 ((yyval.n))->u.struct_or_variant_declaration.type_specifier_list = list;
5223 _bt_list_splice_tail(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u._typedef.type_declarators);
5224 }
5225 #line 5226 "ctf-parser.c" /* yacc.c:1646 */
5226 break;
5227
5228 case 233:
5229 #line 2569 "ctf-parser.y" /* yacc.c:1646 */
5230 {
5231 struct ctf_node *list;
5232
5233 (yyval.n) = make_node(scanner, NODE_TYPEALIAS);
5234 (yyval.n)->u.typealias.target = make_node(scanner, NODE_TYPEALIAS_TARGET);
5235 (yyval.n)->u.typealias.alias = make_node(scanner, NODE_TYPEALIAS_ALIAS);
5236
5237 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
5238 (yyval.n)->u.typealias.target->u.typealias_target.type_specifier_list = list;
5239 _bt_list_splice_tail(&((yyvsp[-4].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
5240 _bt_list_splice_tail(&((yyvsp[-3].n))->tmp_head, &((yyval.n))->u.typealias.target->u.typealias_target.type_declarators);
5241
5242 list = make_node(scanner, NODE_TYPE_SPECIFIER_LIST);
5243 (yyval.n)->u.typealias.alias->u.typealias_alias.type_specifier_list = list;
5244 _bt_list_splice_tail(&((yyvsp[-1].n))->u.type_specifier_list.head, &list->u.type_specifier_list.head);
5245 _bt_list_splice_tail(&((yyvsp[0].n))->tmp_head, &((yyval.n))->u.typealias.alias->u.typealias_alias.type_declarators);
5246 }
5247 #line 5248 "ctf-parser.c" /* yacc.c:1646 */
5248 break;
5249
5250
5251 #line 5252 "ctf-parser.c" /* yacc.c:1646 */
5252 default: break;
5253 }
5254 /* User semantic actions sometimes alter yychar, and that requires
5255 that yytoken be updated with the new translation. We take the
5256 approach of translating immediately before every use of yytoken.
5257 One alternative is translating here after every semantic action,
5258 but that translation would be missed if the semantic action invokes
5259 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
5260 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
5261 incorrect destructor might then be invoked immediately. In the
5262 case of YYERROR or YYBACKUP, subsequent parser actions might lead
5263 to an incorrect destructor call or verbose syntax error message
5264 before the lookahead is translated. */
5265 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5266
5267 YYPOPSTACK (yylen);
5268 yylen = 0;
5269 YY_STACK_PRINT (yyss, yyssp);
5270
5271 *++yyvsp = yyval;
5272
5273 /* Now 'shift' the result of the reduction. Determine what state
5274 that goes to, based on the state we popped back to and the rule
5275 number reduced by. */
5276
5277 yyn = yyr1[yyn];
5278
5279 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5280 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5281 yystate = yytable[yystate];
5282 else
5283 yystate = yydefgoto[yyn - YYNTOKENS];
5284
5285 goto yynewstate;
5286
5287
5288 /*--------------------------------------.
5289 | yyerrlab -- here on detecting error. |
5290 `--------------------------------------*/
5291 yyerrlab:
5292 /* Make sure we have latest lookahead translation. See comments at
5293 user semantic actions for why this is necessary. */
5294 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5295
5296 /* If not already recovering from an error, report this error. */
5297 if (!yyerrstatus)
5298 {
5299 ++yynerrs;
5300 #if ! YYERROR_VERBOSE
5301 yyerror (scanner, yyscanner, YY_("syntax error"));
5302 #else
5303 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5304 yyssp, yytoken)
5305 {
5306 char const *yymsgp = YY_("syntax error");
5307 int yysyntax_error_status;
5308 yysyntax_error_status = YYSYNTAX_ERROR;
5309 if (yysyntax_error_status == 0)
5310 yymsgp = yymsg;
5311 else if (yysyntax_error_status == 1)
5312 {
5313 if (yymsg != yymsgbuf)
5314 YYSTACK_FREE (yymsg);
5315 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5316 if (!yymsg)
5317 {
5318 yymsg = yymsgbuf;
5319 yymsg_alloc = sizeof yymsgbuf;
5320 yysyntax_error_status = 2;
5321 }
5322 else
5323 {
5324 yysyntax_error_status = YYSYNTAX_ERROR;
5325 yymsgp = yymsg;
5326 }
5327 }
5328 yyerror (scanner, yyscanner, yymsgp);
5329 if (yysyntax_error_status == 2)
5330 goto yyexhaustedlab;
5331 }
5332 # undef YYSYNTAX_ERROR
5333 #endif
5334 }
5335
5336
5337
5338 if (yyerrstatus == 3)
5339 {
5340 /* If just tried and failed to reuse lookahead token after an
5341 error, discard it. */
5342
5343 if (yychar <= YYEOF)
5344 {
5345 /* Return failure if at end of input. */
5346 if (yychar == YYEOF)
5347 YYABORT;
5348 }
5349 else
5350 {
5351 yydestruct ("Error: discarding",
5352 yytoken, &yylval, scanner, yyscanner);
5353 yychar = YYEMPTY;
5354 }
5355 }
5356
5357 /* Else will try to reuse lookahead token after shifting the error
5358 token. */
5359 goto yyerrlab1;
5360
5361
5362 /*---------------------------------------------------.
5363 | yyerrorlab -- error raised explicitly by YYERROR. |
5364 `---------------------------------------------------*/
5365 yyerrorlab:
5366
5367 /* Pacify compilers like GCC when the user code never invokes
5368 YYERROR and the label yyerrorlab therefore never appears in user
5369 code. */
5370 if (/*CONSTCOND*/ 0)
5371 goto yyerrorlab;
5372
5373 /* Do not reclaim the symbols of the rule whose action triggered
5374 this YYERROR. */
5375 YYPOPSTACK (yylen);
5376 yylen = 0;
5377 YY_STACK_PRINT (yyss, yyssp);
5378 yystate = *yyssp;
5379 goto yyerrlab1;
5380
5381
5382 /*-------------------------------------------------------------.
5383 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5384 `-------------------------------------------------------------*/
5385 yyerrlab1:
5386 yyerrstatus = 3; /* Each real token shifted decrements this. */
5387
5388 for (;;)
5389 {
5390 yyn = yypact[yystate];
5391 if (!yypact_value_is_default (yyn))
5392 {
5393 yyn += YYTERROR;
5394 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5395 {
5396 yyn = yytable[yyn];
5397 if (0 < yyn)
5398 break;
5399 }
5400 }
5401
5402 /* Pop the current state because it cannot handle the error token. */
5403 if (yyssp == yyss)
5404 YYABORT;
5405
5406
5407 yydestruct ("Error: popping",
5408 yystos[yystate], yyvsp, scanner, yyscanner);
5409 YYPOPSTACK (1);
5410 yystate = *yyssp;
5411 YY_STACK_PRINT (yyss, yyssp);
5412 }
5413
5414 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
5415 *++yyvsp = yylval;
5416 YY_IGNORE_MAYBE_UNINITIALIZED_END
5417
5418
5419 /* Shift the error token. */
5420 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5421
5422 yystate = yyn;
5423 goto yynewstate;
5424
5425
5426 /*-------------------------------------.
5427 | yyacceptlab -- YYACCEPT comes here. |
5428 `-------------------------------------*/
5429 yyacceptlab:
5430 yyresult = 0;
5431 goto yyreturn;
5432
5433 /*-----------------------------------.
5434 | yyabortlab -- YYABORT comes here. |
5435 `-----------------------------------*/
5436 yyabortlab:
5437 yyresult = 1;
5438 goto yyreturn;
5439
5440 #if !defined yyoverflow || YYERROR_VERBOSE
5441 /*-------------------------------------------------.
5442 | yyexhaustedlab -- memory exhaustion comes here. |
5443 `-------------------------------------------------*/
5444 yyexhaustedlab:
5445 yyerror (scanner, yyscanner, YY_("memory exhausted"));
5446 yyresult = 2;
5447 /* Fall through. */
5448 #endif
5449
5450 yyreturn:
5451 if (yychar != YYEMPTY)
5452 {
5453 /* Make sure we have latest lookahead translation. See comments at
5454 user semantic actions for why this is necessary. */
5455 yytoken = YYTRANSLATE (yychar);
5456 yydestruct ("Cleanup: discarding lookahead",
5457 yytoken, &yylval, scanner, yyscanner);
5458 }
5459 /* Do not reclaim the symbols of the rule whose action triggered
5460 this YYABORT or YYACCEPT. */
5461 YYPOPSTACK (yylen);
5462 YY_STACK_PRINT (yyss, yyssp);
5463 while (yyssp != yyss)
5464 {
5465 yydestruct ("Cleanup: popping",
5466 yystos[*yyssp], yyvsp, scanner, yyscanner);
5467 YYPOPSTACK (1);
5468 }
5469 #ifndef yyoverflow
5470 if (yyss != yyssa)
5471 YYSTACK_FREE (yyss);
5472 #endif
5473 #if YYERROR_VERBOSE
5474 if (yymsg != yymsgbuf)
5475 YYSTACK_FREE (yymsg);
5476 #endif
5477 return yyresult;
5478 }