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 0
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 25 "parser.y" /* yacc.c:339 */
66
67 #define yylex yylex
68
69 #include "swig.h"
70 #include "cparse.h"
71 #include "preprocessor.h"
72 #include <ctype.h>
73
74 /* We do this for portability */
75 #undef alloca
76 #define alloca malloc
77
78 /* -----------------------------------------------------------------------------
79 * Externals
80 * ----------------------------------------------------------------------------- */
81
82 int yyparse();
83
84 /* NEW Variables */
85
86 static Node *top = 0; /* Top of the generated parse tree */
87 static int unnamed = 0; /* Unnamed datatype counter */
88 static Hash *classes = 0; /* Hash table of classes */
89 static Hash *classes_typedefs = 0; /* Hash table of typedef classes: typedef struct X {...} Y; */
90 static Symtab *prev_symtab = 0;
91 static Node *current_class = 0;
92 String *ModuleName = 0;
93 static Node *module_node = 0;
94 static String *Classprefix = 0;
95 static String *Namespaceprefix = 0;
96 static int inclass = 0;
97 static Node *currentOuterClass = 0; /* for nested classes */
98 static const char *last_cpptype = 0;
99 static int inherit_list = 0;
100 static Parm *template_parameters = 0;
101 static int parsing_template_declaration = 0;
102 static int extendmode = 0;
103 static int compact_default_args = 0;
104 static int template_reduce = 0;
105 static int cparse_externc = 0;
106 int ignore_nested_classes = 0;
107 int kwargs_supported = 0;
108 /* -----------------------------------------------------------------------------
109 * Doxygen Comment Globals
110 * ----------------------------------------------------------------------------- */
111 static String *currentDeclComment = NULL; /* Comment of C/C++ declaration. */
112 static Node *previousNode = NULL; /* Pointer to the previous node (for post comments) */
113 static Node *currentNode = NULL; /* Pointer to the current node (for post comments) */
114
115 /* -----------------------------------------------------------------------------
116 * Assist Functions
117 * ----------------------------------------------------------------------------- */
118
119
120
121 /* Called by the parser (yyparse) when an error is found.*/
yyerror(const char * e)122 static void yyerror (const char *e) {
123 (void)e;
124 }
125
new_node(const_String_or_char_ptr tag)126 static Node *new_node(const_String_or_char_ptr tag) {
127 Node *n = Swig_cparse_new_node(tag);
128 /* Remember the previous node in case it will need a post-comment */
129 previousNode = currentNode;
130 currentNode = n;
131 return n;
132 }
133
134 /* Copies a node. Does not copy tree links or symbol table data (except for
135 sym:name) */
136
copy_node(Node * n)137 static Node *copy_node(Node *n) {
138 Node *nn;
139 Iterator k;
140 nn = NewHash();
141 Setfile(nn,Getfile(n));
142 Setline(nn,Getline(n));
143 for (k = First(n); k.key; k = Next(k)) {
144 String *ci;
145 String *key = k.key;
146 char *ckey = Char(key);
147 if ((strcmp(ckey,"nextSibling") == 0) ||
148 (strcmp(ckey,"previousSibling") == 0) ||
149 (strcmp(ckey,"parentNode") == 0) ||
150 (strcmp(ckey,"lastChild") == 0)) {
151 continue;
152 }
153 if (Strncmp(key,"csym:",5) == 0) continue;
154 /* We do copy sym:name. For templates */
155 if ((strcmp(ckey,"sym:name") == 0) ||
156 (strcmp(ckey,"sym:weak") == 0) ||
157 (strcmp(ckey,"sym:typename") == 0)) {
158 String *ci = Copy(k.item);
159 Setattr(nn,key, ci);
160 Delete(ci);
161 continue;
162 }
163 if (strcmp(ckey,"sym:symtab") == 0) {
164 Setattr(nn,"sym:needs_symtab", "1");
165 }
166 /* We don't copy any other symbol table attributes */
167 if (strncmp(ckey,"sym:",4) == 0) {
168 continue;
169 }
170 /* If children. We copy them recursively using this function */
171 if (strcmp(ckey,"firstChild") == 0) {
172 /* Copy children */
173 Node *cn = k.item;
174 while (cn) {
175 Node *copy = copy_node(cn);
176 appendChild(nn,copy);
177 Delete(copy);
178 cn = nextSibling(cn);
179 }
180 continue;
181 }
182 /* We don't copy the symbol table. But we drop an attribute
183 requires_symtab so that functions know it needs to be built */
184
185 if (strcmp(ckey,"symtab") == 0) {
186 /* Node defined a symbol table. */
187 Setattr(nn,"requires_symtab","1");
188 continue;
189 }
190 /* Can't copy nodes */
191 if (strcmp(ckey,"node") == 0) {
192 continue;
193 }
194 if ((strcmp(ckey,"parms") == 0) || (strcmp(ckey,"pattern") == 0) || (strcmp(ckey,"throws") == 0)
195 || (strcmp(ckey,"kwargs") == 0)) {
196 ParmList *pl = CopyParmList(k.item);
197 Setattr(nn,key,pl);
198 Delete(pl);
199 continue;
200 }
201 if (strcmp(ckey,"nested:outer") == 0) { /* don't copy outer classes links, they will be updated later */
202 Setattr(nn, key, k.item);
203 continue;
204 }
205 /* defaultargs will be patched back in later in update_defaultargs() */
206 if (strcmp(ckey,"defaultargs") == 0) {
207 Setattr(nn, "needs_defaultargs", "1");
208 continue;
209 }
210 /* same for abstracts, which contains pointers to the source node children, and so will need to be patch too */
211 if (strcmp(ckey,"abstracts") == 0) {
212 SetFlag(nn, "needs_abstracts");
213 continue;
214 }
215 /* Looks okay. Just copy the data using Copy */
216 ci = Copy(k.item);
217 Setattr(nn, key, ci);
218 Delete(ci);
219 }
220 return nn;
221 }
222
set_comment(Node * n,String * comment)223 static void set_comment(Node *n, String *comment) {
224 String *name;
225 Parm *p;
226 if (!n || !comment)
227 return;
228
229 if (Getattr(n, "doxygen"))
230 Append(Getattr(n, "doxygen"), comment);
231 else {
232 Setattr(n, "doxygen", comment);
233 /* This is the first comment, populate it with @params, if any */
234 p = Getattr(n, "parms");
235 while (p) {
236 if (Getattr(p, "doxygen"))
237 Printv(comment, "\n@param ", Getattr(p, "name"), Getattr(p, "doxygen"), NIL);
238 p=nextSibling(p);
239 }
240 }
241
242 /* Append same comment to every generated overload */
243 name = Getattr(n, "name");
244 if (!name)
245 return;
246 n = nextSibling(n);
247 while (n && Getattr(n, "name") && Strcmp(Getattr(n, "name"), name) == 0) {
248 Setattr(n, "doxygen", comment);
249 n = nextSibling(n);
250 }
251 }
252
253 /* -----------------------------------------------------------------------------
254 * Variables
255 * ----------------------------------------------------------------------------- */
256
257 static char *typemap_lang = 0; /* Current language setting */
258
259 static int cplus_mode = 0;
260
261 /* C++ modes */
262
263 #define CPLUS_PUBLIC 1
264 #define CPLUS_PRIVATE 2
265 #define CPLUS_PROTECTED 3
266
267 /* include types */
268 static int import_mode = 0;
269
SWIG_typemap_lang(const char * tm_lang)270 void SWIG_typemap_lang(const char *tm_lang) {
271 typemap_lang = Swig_copy_string(tm_lang);
272 }
273
SWIG_cparse_set_compact_default_args(int defargs)274 void SWIG_cparse_set_compact_default_args(int defargs) {
275 compact_default_args = defargs;
276 }
277
SWIG_cparse_template_reduce(int treduce)278 int SWIG_cparse_template_reduce(int treduce) {
279 template_reduce = treduce;
280 return treduce;
281 }
282
283 /* -----------------------------------------------------------------------------
284 * Assist functions
285 * ----------------------------------------------------------------------------- */
286
promote_type(int t)287 static int promote_type(int t) {
288 if (t <= T_UCHAR || t == T_CHAR || t == T_WCHAR) return T_INT;
289 return t;
290 }
291
292 /* Perform type-promotion for binary operators */
promote(int t1,int t2)293 static int promote(int t1, int t2) {
294 t1 = promote_type(t1);
295 t2 = promote_type(t2);
296 return t1 > t2 ? t1 : t2;
297 }
298
299 static String *yyrename = 0;
300
301 /* Forward renaming operator */
302
303 static String *resolve_create_node_scope(String *cname, int is_class_definition);
304
305
Swig_cparse_features(void)306 Hash *Swig_cparse_features(void) {
307 static Hash *features_hash = 0;
308 if (!features_hash) features_hash = NewHash();
309 return features_hash;
310 }
311
312 /* Fully qualify any template parameters */
feature_identifier_fix(String * s)313 static String *feature_identifier_fix(String *s) {
314 String *tp = SwigType_istemplate_templateprefix(s);
315 if (tp) {
316 String *ts, *ta, *tq;
317 ts = SwigType_templatesuffix(s);
318 ta = SwigType_templateargs(s);
319 tq = Swig_symbol_type_qualify(ta,0);
320 Append(tp,tq);
321 Append(tp,ts);
322 Delete(ts);
323 Delete(ta);
324 Delete(tq);
325 return tp;
326 } else {
327 return NewString(s);
328 }
329 }
330
set_access_mode(Node * n)331 static void set_access_mode(Node *n) {
332 if (cplus_mode == CPLUS_PUBLIC)
333 Setattr(n, "access", "public");
334 else if (cplus_mode == CPLUS_PROTECTED)
335 Setattr(n, "access", "protected");
336 else
337 Setattr(n, "access", "private");
338 }
339
restore_access_mode(Node * n)340 static void restore_access_mode(Node *n) {
341 String *mode = Getattr(n, "access");
342 if (Strcmp(mode, "private") == 0)
343 cplus_mode = CPLUS_PRIVATE;
344 else if (Strcmp(mode, "protected") == 0)
345 cplus_mode = CPLUS_PROTECTED;
346 else
347 cplus_mode = CPLUS_PUBLIC;
348 }
349
350 /* Generate the symbol table name for an object */
351 /* This is a bit of a mess. Need to clean up */
352 static String *add_oldname = 0;
353
354
355
make_name(Node * n,String * name,SwigType * decl)356 static String *make_name(Node *n, String *name,SwigType *decl) {
357 String *made_name = 0;
358 int destructor = name && (*(Char(name)) == '~');
359
360 if (yyrename) {
361 String *s = NewString(yyrename);
362 Delete(yyrename);
363 yyrename = 0;
364 if (destructor && (*(Char(s)) != '~')) {
365 Insert(s,0,"~");
366 }
367 return s;
368 }
369
370 if (!name) return 0;
371
372 if (parsing_template_declaration)
373 SetFlag(n, "parsing_template_declaration");
374 made_name = Swig_name_make(n, Namespaceprefix, name, decl, add_oldname);
375 Delattr(n, "parsing_template_declaration");
376
377 return made_name;
378 }
379
380 /* Generate an unnamed identifier */
make_unnamed()381 static String *make_unnamed() {
382 unnamed++;
383 return NewStringf("$unnamed%d$",unnamed);
384 }
385
386 /* Return if the node is a friend declaration */
is_friend(Node * n)387 static int is_friend(Node *n) {
388 return Cmp(Getattr(n,"storage"),"friend") == 0;
389 }
390
is_operator(String * name)391 static int is_operator(String *name) {
392 return Strncmp(name,"operator ", 9) == 0;
393 }
394
395
396 /* Add declaration list to symbol table */
397 static int add_only_one = 0;
398
add_symbols(Node * n)399 static void add_symbols(Node *n) {
400 String *decl;
401 String *wrn = 0;
402
403 if (inclass && n) {
404 cparse_normalize_void(n);
405 }
406 while (n) {
407 String *symname = 0;
408 /* for friends, we need to pop the scope once */
409 String *old_prefix = 0;
410 Symtab *old_scope = 0;
411 int isfriend = inclass && is_friend(n);
412 int iscdecl = Cmp(nodeType(n),"cdecl") == 0;
413 int only_csymbol = 0;
414
415 if (inclass) {
416 String *name = Getattr(n, "name");
417 if (isfriend) {
418 /* for friends, we need to add the scopename if needed */
419 String *prefix = name ? Swig_scopename_prefix(name) : 0;
420 old_prefix = Namespaceprefix;
421 old_scope = Swig_symbol_popscope();
422 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
423 if (!prefix) {
424 if (name && !is_operator(name) && Namespaceprefix) {
425 String *nname = NewStringf("%s::%s", Namespaceprefix, name);
426 Setattr(n,"name",nname);
427 Delete(nname);
428 }
429 } else {
430 Symtab *st = Swig_symbol_getscope(prefix);
431 String *ns = st ? Getattr(st,"name") : prefix;
432 String *base = Swig_scopename_last(name);
433 String *nname = NewStringf("%s::%s", ns, base);
434 Setattr(n,"name",nname);
435 Delete(nname);
436 Delete(base);
437 Delete(prefix);
438 }
439 Namespaceprefix = 0;
440 } else {
441 /* for member functions, we need to remove the redundant
442 class scope if provided, as in
443
444 struct Foo {
445 int Foo::method(int a);
446 };
447
448 */
449 String *prefix = name ? Swig_scopename_prefix(name) : 0;
450 if (prefix) {
451 if (Classprefix && (Equal(prefix,Classprefix))) {
452 String *base = Swig_scopename_last(name);
453 Setattr(n,"name",base);
454 Delete(base);
455 }
456 Delete(prefix);
457 }
458 }
459 }
460
461 if (!isfriend && (inclass || extendmode)) {
462 Setattr(n,"ismember","1");
463 }
464
465 if (extendmode) {
466 if (!Getattr(n, "template"))
467 SetFlag(n,"isextendmember");
468 }
469
470 if (!isfriend && inclass) {
471 if ((cplus_mode != CPLUS_PUBLIC)) {
472 only_csymbol = 1;
473 if (cplus_mode == CPLUS_PROTECTED) {
474 Setattr(n,"access", "protected");
475 only_csymbol = !Swig_need_protected(n);
476 } else {
477 Setattr(n,"access", "private");
478 /* private are needed only when they are pure virtuals - why? */
479 if ((Cmp(Getattr(n,"storage"),"virtual") == 0) && (Cmp(Getattr(n,"value"),"0") == 0)) {
480 only_csymbol = 0;
481 }
482 if (Cmp(nodeType(n),"destructor") == 0) {
483 /* Needed for "unref" feature */
484 only_csymbol = 0;
485 }
486 }
487 } else {
488 Setattr(n,"access", "public");
489 }
490 }
491 if (Getattr(n,"sym:name")) {
492 n = nextSibling(n);
493 continue;
494 }
495 decl = Getattr(n,"decl");
496 if (!SwigType_isfunction(decl)) {
497 String *name = Getattr(n,"name");
498 String *makename = Getattr(n,"parser:makename");
499 if (iscdecl) {
500 String *storage = Getattr(n, "storage");
501 if (Cmp(storage,"typedef") == 0) {
502 Setattr(n,"kind","typedef");
503 } else {
504 SwigType *type = Getattr(n,"type");
505 String *value = Getattr(n,"value");
506 Setattr(n,"kind","variable");
507 if (value && Len(value)) {
508 Setattr(n,"hasvalue","1");
509 }
510 if (type) {
511 SwigType *ty;
512 SwigType *tmp = 0;
513 if (decl) {
514 ty = tmp = Copy(type);
515 SwigType_push(ty,decl);
516 } else {
517 ty = type;
518 }
519 if (!SwigType_ismutable(ty) || (storage && Strstr(storage, "constexpr"))) {
520 SetFlag(n,"hasconsttype");
521 SetFlag(n,"feature:immutable");
522 }
523 if (tmp) Delete(tmp);
524 }
525 if (!type) {
526 Printf(stderr,"notype name %s\n", name);
527 }
528 }
529 }
530 Swig_features_get(Swig_cparse_features(), Namespaceprefix, name, 0, n);
531 if (makename) {
532 symname = make_name(n, makename,0);
533 Delattr(n,"parser:makename"); /* temporary information, don't leave it hanging around */
534 } else {
535 makename = name;
536 symname = make_name(n, makename,0);
537 }
538
539 if (!symname) {
540 symname = Copy(Getattr(n,"unnamed"));
541 }
542 if (symname) {
543 if (parsing_template_declaration)
544 SetFlag(n, "parsing_template_declaration");
545 wrn = Swig_name_warning(n, Namespaceprefix, symname,0);
546 Delattr(n, "parsing_template_declaration");
547 }
548 } else {
549 String *name = Getattr(n,"name");
550 SwigType *fdecl = Copy(decl);
551 SwigType *fun = SwigType_pop_function(fdecl);
552 if (iscdecl) {
553 Setattr(n,"kind","function");
554 }
555
556 Swig_features_get(Swig_cparse_features(),Namespaceprefix,name,fun,n);
557
558 symname = make_name(n, name,fun);
559 if (parsing_template_declaration)
560 SetFlag(n, "parsing_template_declaration");
561 wrn = Swig_name_warning(n, Namespaceprefix,symname,fun);
562 Delattr(n, "parsing_template_declaration");
563
564 Delete(fdecl);
565 Delete(fun);
566
567 }
568 if (!symname) {
569 n = nextSibling(n);
570 continue;
571 }
572 if (cparse_cplusplus) {
573 String *value = Getattr(n, "value");
574 if (value && Strcmp(value, "delete") == 0) {
575 /* C++11 deleted definition / deleted function */
576 SetFlag(n,"deleted");
577 SetFlag(n,"feature:ignore");
578 }
579 if (SwigType_isrvalue_reference(Getattr(n, "refqualifier"))) {
580 /* Ignore rvalue ref-qualifiers by default
581 * Use Getattr instead of GetFlag to handle explicit ignore and explicit not ignore */
582 if (!(Getattr(n, "feature:ignore") || Strncmp(symname, "$ignore", 7) == 0)) {
583 SWIG_WARN_NODE_BEGIN(n);
584 Swig_warning(WARN_TYPE_RVALUE_REF_QUALIFIER_IGNORED, Getfile(n), Getline(n),
585 "Method with rvalue ref-qualifier %s ignored.\n", Swig_name_decl(n));
586 SWIG_WARN_NODE_END(n);
587 SetFlag(n, "feature:ignore");
588 }
589 }
590 }
591 if (only_csymbol || GetFlag(n, "feature:ignore") || Strncmp(symname, "$ignore", 7) == 0) {
592 /* Only add to C symbol table and continue */
593 Swig_symbol_add(0, n);
594 if (!only_csymbol && !GetFlag(n, "feature:ignore")) {
595 /* Print the warning attached to $ignore name, if any */
596 char *c = Char(symname) + 7;
597 if (strlen(c)) {
598 SWIG_WARN_NODE_BEGIN(n);
599 Swig_warning(0,Getfile(n), Getline(n), "%s\n",c+1);
600 SWIG_WARN_NODE_END(n);
601 }
602 /* If the symbol was ignored via "rename" and is visible, set also feature:ignore*/
603 SetFlag(n, "feature:ignore");
604 }
605 if (!GetFlag(n, "feature:ignore") && Strcmp(symname,"$ignore") == 0) {
606 /* Add feature:ignore if the symbol was explicitly ignored, regardless of visibility */
607 SetFlag(n, "feature:ignore");
608 }
609 } else {
610 Node *c;
611 if ((wrn) && (Len(wrn))) {
612 String *metaname = symname;
613 if (!Getmeta(metaname,"already_warned")) {
614 SWIG_WARN_NODE_BEGIN(n);
615 Swig_warning(0,Getfile(n),Getline(n), "%s\n", wrn);
616 SWIG_WARN_NODE_END(n);
617 Setmeta(metaname,"already_warned","1");
618 }
619 }
620 c = Swig_symbol_add(symname,n);
621
622 if (c != n) {
623 /* symbol conflict attempting to add in the new symbol */
624 if (Getattr(n,"sym:weak")) {
625 Setattr(n,"sym:name",symname);
626 } else {
627 String *e = NewStringEmpty();
628 String *en = NewStringEmpty();
629 String *ec = NewStringEmpty();
630 int redefined = Swig_need_redefined_warn(n,c,inclass);
631 if (redefined) {
632 Printf(en,"Identifier '%s' redefined (ignored)",symname);
633 Printf(ec,"previous definition of '%s'",symname);
634 } else {
635 Printf(en,"Redundant redeclaration of '%s'",symname);
636 Printf(ec,"previous declaration of '%s'",symname);
637 }
638 if (Cmp(symname,Getattr(n,"name"))) {
639 Printf(en," (Renamed from '%s')", SwigType_namestr(Getattr(n,"name")));
640 }
641 Printf(en,",");
642 if (Cmp(symname,Getattr(c,"name"))) {
643 Printf(ec," (Renamed from '%s')", SwigType_namestr(Getattr(c,"name")));
644 }
645 Printf(ec,".");
646 SWIG_WARN_NODE_BEGIN(n);
647 if (redefined) {
648 Swig_warning(WARN_PARSE_REDEFINED,Getfile(n),Getline(n),"%s\n",en);
649 Swig_warning(WARN_PARSE_REDEFINED,Getfile(c),Getline(c),"%s\n",ec);
650 } else if (!is_friend(n) && !is_friend(c)) {
651 Swig_warning(WARN_PARSE_REDUNDANT,Getfile(n),Getline(n),"%s\n",en);
652 Swig_warning(WARN_PARSE_REDUNDANT,Getfile(c),Getline(c),"%s\n",ec);
653 }
654 SWIG_WARN_NODE_END(n);
655 Printf(e,"%s:%d:%s\n%s:%d:%s\n",Getfile(n),Getline(n),en,
656 Getfile(c),Getline(c),ec);
657 Setattr(n,"error",e);
658 Delete(e);
659 Delete(en);
660 Delete(ec);
661 }
662 }
663 }
664 /* restore the class scope if needed */
665 if (isfriend) {
666 Swig_symbol_setscope(old_scope);
667 if (old_prefix) {
668 Delete(Namespaceprefix);
669 Namespaceprefix = old_prefix;
670 }
671 }
672 Delete(symname);
673
674 if (add_only_one) return;
675 n = nextSibling(n);
676 }
677 }
678
679
680 /* add symbols a parse tree node copy */
681
add_symbols_copy(Node * n)682 static void add_symbols_copy(Node *n) {
683 String *name;
684 int emode = 0;
685 while (n) {
686 char *cnodeType = Char(nodeType(n));
687
688 if (strcmp(cnodeType,"access") == 0) {
689 String *kind = Getattr(n,"kind");
690 if (Strcmp(kind,"public") == 0) {
691 cplus_mode = CPLUS_PUBLIC;
692 } else if (Strcmp(kind,"private") == 0) {
693 cplus_mode = CPLUS_PRIVATE;
694 } else if (Strcmp(kind,"protected") == 0) {
695 cplus_mode = CPLUS_PROTECTED;
696 }
697 n = nextSibling(n);
698 continue;
699 }
700
701 add_oldname = Getattr(n,"sym:name");
702 if ((add_oldname) || (Getattr(n,"sym:needs_symtab"))) {
703 int old_inclass = -1;
704 Node *old_current_class = 0;
705 if (add_oldname) {
706 DohIncref(add_oldname);
707 /* Disable this, it prevents %rename to work with templates */
708 /* If already renamed, we used that name */
709 /*
710 if (Strcmp(add_oldname, Getattr(n,"name")) != 0) {
711 Delete(yyrename);
712 yyrename = Copy(add_oldname);
713 }
714 */
715 }
716 Delattr(n,"sym:needs_symtab");
717 Delattr(n,"sym:name");
718
719 add_only_one = 1;
720 add_symbols(n);
721
722 if (Getattr(n,"partialargs")) {
723 Swig_symbol_cadd(Getattr(n,"partialargs"),n);
724 }
725 add_only_one = 0;
726 name = Getattr(n,"name");
727 if (Getattr(n,"requires_symtab")) {
728 Swig_symbol_newscope();
729 Swig_symbol_setscopename(name);
730 Delete(Namespaceprefix);
731 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
732 }
733 if (strcmp(cnodeType,"class") == 0) {
734 old_inclass = inclass;
735 inclass = 1;
736 old_current_class = current_class;
737 current_class = n;
738 if (Strcmp(Getattr(n,"kind"),"class") == 0) {
739 cplus_mode = CPLUS_PRIVATE;
740 } else {
741 cplus_mode = CPLUS_PUBLIC;
742 }
743 }
744 if (strcmp(cnodeType,"extend") == 0) {
745 emode = cplus_mode;
746 cplus_mode = CPLUS_PUBLIC;
747 }
748 add_symbols_copy(firstChild(n));
749 if (strcmp(cnodeType,"extend") == 0) {
750 cplus_mode = emode;
751 }
752 if (Getattr(n,"requires_symtab")) {
753 Setattr(n,"symtab", Swig_symbol_popscope());
754 Delattr(n,"requires_symtab");
755 Delete(Namespaceprefix);
756 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
757 }
758 if (add_oldname) {
759 Delete(add_oldname);
760 add_oldname = 0;
761 }
762 if (strcmp(cnodeType,"class") == 0) {
763 inclass = old_inclass;
764 current_class = old_current_class;
765 }
766 } else {
767 if (strcmp(cnodeType,"extend") == 0) {
768 emode = cplus_mode;
769 cplus_mode = CPLUS_PUBLIC;
770 }
771 add_symbols_copy(firstChild(n));
772 if (strcmp(cnodeType,"extend") == 0) {
773 cplus_mode = emode;
774 }
775 }
776 n = nextSibling(n);
777 }
778 }
779
780 /* Add in the "defaultargs" attribute for functions in instantiated templates.
781 * n should be any instantiated template (class or start of linked list of functions). */
update_defaultargs(Node * n)782 static void update_defaultargs(Node *n) {
783 if (n) {
784 Node *firstdefaultargs = n;
785 update_defaultargs(firstChild(n));
786 n = nextSibling(n);
787 /* recursively loop through nodes of all types, but all we really need are the overloaded functions */
788 while (n) {
789 update_defaultargs(firstChild(n));
790 if (!Getattr(n, "defaultargs")) {
791 if (Getattr(n, "needs_defaultargs")) {
792 Setattr(n, "defaultargs", firstdefaultargs);
793 Delattr(n, "needs_defaultargs");
794 } else {
795 firstdefaultargs = n;
796 }
797 } else {
798 /* Functions added in with %extend (for specialized template classes) will already have default args patched up */
799 assert(Getattr(n, "defaultargs") == firstdefaultargs);
800 }
801 n = nextSibling(n);
802 }
803 }
804 }
805
806 /* Check a set of declarations to see if any are pure-abstract */
807
pure_abstracts(Node * n)808 static List *pure_abstracts(Node *n) {
809 List *abstracts = 0;
810 while (n) {
811 if (Cmp(nodeType(n),"cdecl") == 0) {
812 String *decl = Getattr(n,"decl");
813 if (SwigType_isfunction(decl)) {
814 String *init = Getattr(n,"value");
815 if (Cmp(init,"0") == 0) {
816 if (!abstracts) {
817 abstracts = NewList();
818 }
819 Append(abstracts,n);
820 SetFlag(n,"abstract");
821 }
822 }
823 } else if (Cmp(nodeType(n),"destructor") == 0) {
824 if (Cmp(Getattr(n,"value"),"0") == 0) {
825 if (!abstracts) {
826 abstracts = NewList();
827 }
828 Append(abstracts,n);
829 SetFlag(n,"abstract");
830 }
831 }
832 n = nextSibling(n);
833 }
834 return abstracts;
835 }
836
837 /* Recompute the "abstracts" attribute for the classes in instantiated templates, similarly to update_defaultargs() above. */
update_abstracts(Node * n)838 static void update_abstracts(Node *n) {
839 for (; n; n = nextSibling(n)) {
840 Node* const child = firstChild(n);
841 if (!child)
842 continue;
843
844 update_abstracts(child);
845
846 if (Getattr(n, "needs_abstracts")) {
847 Setattr(n, "abstracts", pure_abstracts(child));
848 Delattr(n, "needs_abstracts");
849 }
850 }
851 }
852
853 /* Make a classname */
854
make_class_name(String * name)855 static String *make_class_name(String *name) {
856 String *nname = 0;
857 String *prefix;
858 if (Namespaceprefix) {
859 nname= NewStringf("%s::%s", Namespaceprefix, name);
860 } else {
861 nname = NewString(name);
862 }
863 prefix = SwigType_istemplate_templateprefix(nname);
864 if (prefix) {
865 String *args, *qargs;
866 args = SwigType_templateargs(nname);
867 qargs = Swig_symbol_type_qualify(args,0);
868 Append(prefix,qargs);
869 Delete(nname);
870 Delete(args);
871 Delete(qargs);
872 nname = prefix;
873 }
874 return nname;
875 }
876
877 /* Use typedef name as class name */
878
add_typedef_name(Node * n,Node * declnode,String * oldName,Symtab * cscope,String * scpname)879 static void add_typedef_name(Node *n, Node *declnode, String *oldName, Symtab *cscope, String *scpname) {
880 String *class_rename = 0;
881 SwigType *decl = Getattr(declnode, "decl");
882 if (!decl || !Len(decl)) {
883 String *cname;
884 String *tdscopename;
885 String *class_scope = Swig_symbol_qualifiedscopename(cscope);
886 String *name = Getattr(declnode, "name");
887 cname = Copy(name);
888 Setattr(n, "tdname", cname);
889 tdscopename = class_scope ? NewStringf("%s::%s", class_scope, name) : Copy(name);
890 class_rename = Getattr(n, "class_rename");
891 if (class_rename && (Strcmp(class_rename, oldName) == 0))
892 Setattr(n, "class_rename", NewString(name));
893 if (!classes_typedefs) classes_typedefs = NewHash();
894 if (!Equal(scpname, tdscopename) && !Getattr(classes_typedefs, tdscopename)) {
895 Setattr(classes_typedefs, tdscopename, n);
896 }
897 Setattr(n, "decl", decl);
898 Delete(class_scope);
899 Delete(cname);
900 Delete(tdscopename);
901 }
902 }
903
904 /* If the class name is qualified. We need to create or lookup namespace entries */
905
set_scope_to_global()906 static Symtab *set_scope_to_global() {
907 Symtab *symtab = Swig_symbol_global_scope();
908 Swig_symbol_setscope(symtab);
909 return symtab;
910 }
911
912 /* Remove the block braces, { and }, if the 'noblock' attribute is set.
913 * Node *kw can be either a Hash or Parmlist. */
remove_block(Node * kw,const String * inputcode)914 static String *remove_block(Node *kw, const String *inputcode) {
915 String *modified_code = 0;
916 while (kw) {
917 String *name = Getattr(kw,"name");
918 if (name && (Cmp(name,"noblock") == 0)) {
919 char *cstr = Char(inputcode);
920 int len = Len(inputcode);
921 if (len && cstr[0] == '{') {
922 --len; ++cstr;
923 if (len && cstr[len - 1] == '}') { --len; }
924 /* we now remove the extra spaces */
925 while (len && isspace((int)cstr[0])) { --len; ++cstr; }
926 while (len && isspace((int)cstr[len - 1])) { --len; }
927 modified_code = NewStringWithSize(cstr, len);
928 break;
929 }
930 }
931 kw = nextSibling(kw);
932 }
933 return modified_code;
934 }
935
936 /*
937 #define RESOLVE_DEBUG 1
938 */
939 static Node *nscope = 0;
940 static Node *nscope_inner = 0;
941
942 /* Remove the scope prefix from cname and return the base name without the prefix.
943 * The scopes required for the symbol name are resolved and/or created, if required.
944 * For example AA::BB::CC as input returns CC and creates the namespace AA then inner
945 * namespace BB in the current scope. */
resolve_create_node_scope(String * cname,int is_class_definition)946 static String *resolve_create_node_scope(String *cname, int is_class_definition) {
947 Symtab *gscope = 0;
948 Node *cname_node = 0;
949 String *last = Swig_scopename_last(cname);
950 nscope = 0;
951 nscope_inner = 0;
952
953 if (Strncmp(cname,"::" ,2) != 0) {
954 if (is_class_definition) {
955 /* Only lookup symbols which are in scope via a using declaration but not via a using directive.
956 For example find y via 'using x::y' but not y via a 'using namespace x'. */
957 cname_node = Swig_symbol_clookup_no_inherit(cname, 0);
958 if (!cname_node) {
959 Node *full_lookup_node = Swig_symbol_clookup(cname, 0);
960 if (full_lookup_node) {
961 /* This finds a symbol brought into scope via both a using directive and a using declaration. */
962 Node *last_node = Swig_symbol_clookup_no_inherit(last, 0);
963 if (last_node == full_lookup_node)
964 cname_node = last_node;
965 }
966 }
967 } else {
968 /* For %template, the template needs to be in scope via any means. */
969 cname_node = Swig_symbol_clookup(cname, 0);
970 }
971 }
972 #if RESOLVE_DEBUG
973 if (!cname_node)
974 Printf(stdout, "symbol does not yet exist (%d): [%s]\n", is_class_definition, cname);
975 else
976 Printf(stdout, "symbol does exist (%d): [%s]\n", is_class_definition, cname);
977 #endif
978
979 if (cname_node) {
980 /* The symbol has been defined already or is in another scope.
981 If it is a weak symbol, it needs replacing and if it was brought into the current scope,
982 the scope needs adjusting appropriately for the new symbol.
983 Similarly for defined templates. */
984 Symtab *symtab = Getattr(cname_node, "sym:symtab");
985 Node *sym_weak = Getattr(cname_node, "sym:weak");
986 if ((symtab && sym_weak) || Equal(nodeType(cname_node), "template")) {
987 /* Check if the scope is the current scope */
988 String *current_scopename = Swig_symbol_qualifiedscopename(0);
989 String *found_scopename = Swig_symbol_qualifiedscopename(symtab);
990 if (!current_scopename)
991 current_scopename = NewString("");
992 if (!found_scopename)
993 found_scopename = NewString("");
994
995 {
996 int fail = 1;
997 List *current_scopes = Swig_scopename_tolist(current_scopename);
998 List *found_scopes = Swig_scopename_tolist(found_scopename);
999 Iterator cit = First(current_scopes);
1000 Iterator fit = First(found_scopes);
1001 #if RESOLVE_DEBUG
1002 Printf(stdout, "comparing current: [%s] found: [%s]\n", current_scopename, found_scopename);
1003 #endif
1004 for (; fit.item && cit.item; fit = Next(fit), cit = Next(cit)) {
1005 String *current = cit.item;
1006 String *found = fit.item;
1007 #if RESOLVE_DEBUG
1008 Printf(stdout, " looping %s %s\n", current, found);
1009 #endif
1010 if (Strcmp(current, found) != 0)
1011 break;
1012 }
1013
1014 if (!cit.item) {
1015 String *subscope = NewString("");
1016 for (; fit.item; fit = Next(fit)) {
1017 if (Len(subscope) > 0)
1018 Append(subscope, "::");
1019 Append(subscope, fit.item);
1020 }
1021 if (Len(subscope) > 0)
1022 cname = NewStringf("%s::%s", subscope, last);
1023 else
1024 cname = Copy(last);
1025 #if RESOLVE_DEBUG
1026 Printf(stdout, "subscope to create: [%s] cname: [%s]\n", subscope, cname);
1027 #endif
1028 fail = 0;
1029 Delete(subscope);
1030 } else {
1031 if (is_class_definition) {
1032 if (!fit.item) {
1033 /* It is valid to define a new class with the same name as one forward declared in a parent scope */
1034 fail = 0;
1035 } else if (Swig_scopename_check(cname)) {
1036 /* Classes defined with scope qualifiers must have a matching forward declaration in matching scope */
1037 fail = 1;
1038 } else {
1039 /* This may let through some invalid cases */
1040 fail = 0;
1041 }
1042 #if RESOLVE_DEBUG
1043 Printf(stdout, "scope for class definition, fail: %d\n", fail);
1044 #endif
1045 } else {
1046 #if RESOLVE_DEBUG
1047 Printf(stdout, "no matching base scope for template\n");
1048 #endif
1049 fail = 1;
1050 }
1051 }
1052
1053 Delete(found_scopes);
1054 Delete(current_scopes);
1055
1056 if (fail) {
1057 String *cname_resolved = NewStringf("%s::%s", found_scopename, last);
1058 Swig_error(cparse_file, cparse_line, "'%s' resolves to '%s' and was incorrectly instantiated in scope '%s' instead of within scope '%s'.\n", cname, cname_resolved, current_scopename, found_scopename);
1059 cname = Copy(last);
1060 Delete(cname_resolved);
1061 }
1062 }
1063
1064 Delete(current_scopename);
1065 Delete(found_scopename);
1066 }
1067 } else if (!is_class_definition) {
1068 /* A template instantiation requires a template to be found in scope... fail here too?
1069 Swig_error(cparse_file, cparse_line, "No template found to instantiate '%s' with %%template.\n", cname);
1070 */
1071 }
1072
1073 if (Swig_scopename_check(cname)) {
1074 Node *ns;
1075 String *prefix = Swig_scopename_prefix(cname);
1076 if (prefix && (Strncmp(prefix,"::",2) == 0)) {
1077 /* I don't think we can use :: global scope to declare classes and hence neither %template. - consider reporting error instead - wsfulton. */
1078 /* Use the global scope */
1079 String *nprefix = NewString(Char(prefix)+2);
1080 Delete(prefix);
1081 prefix= nprefix;
1082 gscope = set_scope_to_global();
1083 }
1084 if (Len(prefix) == 0) {
1085 String *base = Copy(last);
1086 /* Use the global scope, but we need to add a 'global' namespace. */
1087 if (!gscope) gscope = set_scope_to_global();
1088 /* note that this namespace is not the "unnamed" one,
1089 and we don't use Setattr(nscope,"name", ""),
1090 because the unnamed namespace is private */
1091 nscope = new_node("namespace");
1092 Setattr(nscope,"symtab", gscope);;
1093 nscope_inner = nscope;
1094 Delete(last);
1095 return base;
1096 }
1097 /* Try to locate the scope */
1098 ns = Swig_symbol_clookup(prefix,0);
1099 if (!ns) {
1100 Swig_error(cparse_file,cparse_line,"Undefined scope '%s'\n", prefix);
1101 } else {
1102 Symtab *nstab = Getattr(ns,"symtab");
1103 if (!nstab) {
1104 Swig_error(cparse_file,cparse_line, "'%s' is not defined as a valid scope.\n", prefix);
1105 ns = 0;
1106 } else {
1107 /* Check if the node scope is the current scope */
1108 String *tname = Swig_symbol_qualifiedscopename(0);
1109 String *nname = Swig_symbol_qualifiedscopename(nstab);
1110 if (tname && (Strcmp(tname,nname) == 0)) {
1111 ns = 0;
1112 cname = Copy(last);
1113 }
1114 Delete(tname);
1115 Delete(nname);
1116 }
1117 if (ns) {
1118 /* we will try to create a new node using the namespaces we
1119 can find in the scope name */
1120 List *scopes = Swig_scopename_tolist(prefix);
1121 String *sname;
1122 Iterator si;
1123
1124 for (si = First(scopes); si.item; si = Next(si)) {
1125 Node *ns1,*ns2;
1126 sname = si.item;
1127 ns1 = Swig_symbol_clookup(sname,0);
1128 assert(ns1);
1129 if (Strcmp(nodeType(ns1),"namespace") == 0) {
1130 if (Getattr(ns1,"alias")) {
1131 ns1 = Getattr(ns1,"namespace");
1132 }
1133 } else {
1134 /* now this last part is a class */
1135 si = Next(si);
1136 /* or a nested class tree, which is unrolled here */
1137 for (; si.item; si = Next(si)) {
1138 if (si.item) {
1139 Printf(sname,"::%s",si.item);
1140 }
1141 }
1142 /* we get the 'inner' class */
1143 nscope_inner = Swig_symbol_clookup(sname,0);
1144 /* set the scope to the inner class */
1145 Swig_symbol_setscope(Getattr(nscope_inner,"symtab"));
1146 /* save the last namespace prefix */
1147 Delete(Namespaceprefix);
1148 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
1149 /* and return the node name, including the inner class prefix */
1150 break;
1151 }
1152 /* here we just populate the namespace tree as usual */
1153 ns2 = new_node("namespace");
1154 Setattr(ns2,"name",sname);
1155 Setattr(ns2,"symtab", Getattr(ns1,"symtab"));
1156 add_symbols(ns2);
1157 Swig_symbol_setscope(Getattr(ns1,"symtab"));
1158 Delete(Namespaceprefix);
1159 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
1160 if (nscope_inner) {
1161 if (Getattr(nscope_inner,"symtab") != Getattr(ns2,"symtab")) {
1162 appendChild(nscope_inner,ns2);
1163 Delete(ns2);
1164 }
1165 }
1166 nscope_inner = ns2;
1167 if (!nscope) nscope = ns2;
1168 }
1169 cname = Copy(last);
1170 Delete(scopes);
1171 }
1172 }
1173 Delete(prefix);
1174 }
1175 Delete(last);
1176
1177 return cname;
1178 }
1179
1180 /* look for simple typedef name in typedef list */
try_to_find_a_name_for_unnamed_structure(const char * storage,Node * decls)1181 static String *try_to_find_a_name_for_unnamed_structure(const char *storage, Node *decls) {
1182 String *name = 0;
1183 Node *n = decls;
1184 if (storage && (strcmp(storage, "typedef") == 0)) {
1185 for (; n; n = nextSibling(n)) {
1186 if (!Len(Getattr(n, "decl"))) {
1187 name = Copy(Getattr(n, "name"));
1188 break;
1189 }
1190 }
1191 }
1192 return name;
1193 }
1194
1195 /* traverse copied tree segment, and update outer class links*/
update_nested_classes(Node * n)1196 static void update_nested_classes(Node *n)
1197 {
1198 Node *c = firstChild(n);
1199 while (c) {
1200 if (Getattr(c, "nested:outer"))
1201 Setattr(c, "nested:outer", n);
1202 update_nested_classes(c);
1203 c = nextSibling(c);
1204 }
1205 }
1206
1207 /* -----------------------------------------------------------------------------
1208 * nested_forward_declaration()
1209 *
1210 * Nested struct handling for C++ code if the nested classes are disabled.
1211 * Create the nested class/struct/union as a forward declaration.
1212 * ----------------------------------------------------------------------------- */
1213
nested_forward_declaration(const char * storage,const char * kind,String * sname,String * name,Node * cpp_opt_declarators)1214 static Node *nested_forward_declaration(const char *storage, const char *kind, String *sname, String *name, Node *cpp_opt_declarators) {
1215 Node *nn = 0;
1216
1217 if (sname) {
1218 /* Add forward declaration of the nested type */
1219 Node *n = new_node("classforward");
1220 Setattr(n, "kind", kind);
1221 Setattr(n, "name", sname);
1222 Setattr(n, "storage", storage);
1223 Setattr(n, "sym:weak", "1");
1224 add_symbols(n);
1225 nn = n;
1226 }
1227
1228 /* Add any variable instances. Also add in any further typedefs of the nested type.
1229 Note that anonymous typedefs (eg typedef struct {...} a, b;) are treated as class forward declarations */
1230 if (cpp_opt_declarators) {
1231 int storage_typedef = (storage && (strcmp(storage, "typedef") == 0));
1232 int variable_of_anonymous_type = !sname && !storage_typedef;
1233 if (!variable_of_anonymous_type) {
1234 int anonymous_typedef = !sname && (storage && (strcmp(storage, "typedef") == 0));
1235 Node *n = cpp_opt_declarators;
1236 SwigType *type = name;
1237 while (n) {
1238 Setattr(n, "type", type);
1239 Setattr(n, "storage", storage);
1240 if (anonymous_typedef) {
1241 Setattr(n, "nodeType", "classforward");
1242 Setattr(n, "sym:weak", "1");
1243 }
1244 n = nextSibling(n);
1245 }
1246 add_symbols(cpp_opt_declarators);
1247
1248 if (nn) {
1249 set_nextSibling(nn, cpp_opt_declarators);
1250 } else {
1251 nn = cpp_opt_declarators;
1252 }
1253 }
1254 }
1255
1256 if (!currentOuterClass || !GetFlag(currentOuterClass, "nested")) {
1257 if (nn && Equal(nodeType(nn), "classforward")) {
1258 Node *n = nn;
1259 if (!GetFlag(n, "feature:ignore")) {
1260 SWIG_WARN_NODE_BEGIN(n);
1261 Swig_warning(WARN_PARSE_NAMED_NESTED_CLASS, cparse_file, cparse_line,"Nested %s not currently supported (%s ignored)\n", kind, sname ? sname : name);
1262 SWIG_WARN_NODE_END(n);
1263 }
1264 } else {
1265 Swig_warning(WARN_PARSE_UNNAMED_NESTED_CLASS, cparse_file, cparse_line, "Nested %s not currently supported (ignored).\n", kind);
1266 }
1267 }
1268
1269 return nn;
1270 }
1271
1272
Swig_cparse(File * f)1273 Node *Swig_cparse(File *f) {
1274 scanner_file(f);
1275 top = 0;
1276 yyparse();
1277 return top;
1278 }
1279
single_new_feature(const char * featurename,String * val,Hash * featureattribs,char * declaratorid,SwigType * type,ParmList * declaratorparms,String * qualifier)1280 static void single_new_feature(const char *featurename, String *val, Hash *featureattribs, char *declaratorid, SwigType *type, ParmList *declaratorparms, String *qualifier) {
1281 String *fname;
1282 String *name;
1283 String *fixname;
1284 SwigType *t = Copy(type);
1285
1286 /* Printf(stdout, "single_new_feature: [%s] [%s] [%s] [%s] [%s] [%s]\n", featurename, val, declaratorid, t, ParmList_str_defaultargs(declaratorparms), qualifier); */
1287
1288 /* Warn about deprecated features */
1289 if (strcmp(featurename, "nestedworkaround") == 0)
1290 Swig_warning(WARN_DEPRECATED_NESTED_WORKAROUND, cparse_file, cparse_line, "The 'nestedworkaround' feature is deprecated.\n");
1291
1292 fname = NewStringf("feature:%s",featurename);
1293 if (declaratorid) {
1294 fixname = feature_identifier_fix(declaratorid);
1295 } else {
1296 fixname = NewStringEmpty();
1297 }
1298 if (Namespaceprefix) {
1299 name = NewStringf("%s::%s",Namespaceprefix, fixname);
1300 } else {
1301 name = fixname;
1302 }
1303
1304 if (declaratorparms) Setmeta(val,"parms",declaratorparms);
1305 if (!Len(t)) t = 0;
1306 if (t) {
1307 if (qualifier) SwigType_push(t,qualifier);
1308 if (SwigType_isfunction(t)) {
1309 SwigType *decl = SwigType_pop_function(t);
1310 if (SwigType_ispointer(t)) {
1311 String *nname = NewStringf("*%s",name);
1312 Swig_feature_set(Swig_cparse_features(), nname, decl, fname, val, featureattribs);
1313 Delete(nname);
1314 } else {
1315 Swig_feature_set(Swig_cparse_features(), name, decl, fname, val, featureattribs);
1316 }
1317 Delete(decl);
1318 } else if (SwigType_ispointer(t)) {
1319 String *nname = NewStringf("*%s",name);
1320 Swig_feature_set(Swig_cparse_features(),nname,0,fname,val, featureattribs);
1321 Delete(nname);
1322 }
1323 } else {
1324 /* Global feature, that is, feature not associated with any particular symbol */
1325 Swig_feature_set(Swig_cparse_features(),name,0,fname,val, featureattribs);
1326 }
1327 Delete(fname);
1328 Delete(name);
1329 }
1330
1331 /* Add a new feature to the Hash. Additional features are added if the feature has a parameter list (declaratorparms)
1332 * and one or more of the parameters have a default argument. An extra feature is added for each defaulted parameter,
1333 * simulating the equivalent overloaded method. */
new_feature(const char * featurename,String * val,Hash * featureattribs,char * declaratorid,SwigType * type,ParmList * declaratorparms,String * qualifier)1334 static void new_feature(const char *featurename, String *val, Hash *featureattribs, char *declaratorid, SwigType *type, ParmList *declaratorparms, String *qualifier) {
1335
1336 ParmList *declparms = declaratorparms;
1337
1338 /* remove the { and } braces if the noblock attribute is set */
1339 String *newval = remove_block(featureattribs, val);
1340 val = newval ? newval : val;
1341
1342 /* Add the feature */
1343 single_new_feature(featurename, val, featureattribs, declaratorid, type, declaratorparms, qualifier);
1344
1345 /* Add extra features if there are default parameters in the parameter list */
1346 if (type) {
1347 while (declparms) {
1348 if (ParmList_has_defaultargs(declparms)) {
1349
1350 /* Create a parameter list for the new feature by copying all
1351 but the last (defaulted) parameter */
1352 ParmList* newparms = CopyParmListMax(declparms, ParmList_len(declparms)-1);
1353
1354 /* Create new declaration - with the last parameter removed */
1355 SwigType *newtype = Copy(type);
1356 Delete(SwigType_pop_function(newtype)); /* remove the old parameter list from newtype */
1357 SwigType_add_function(newtype,newparms);
1358
1359 single_new_feature(featurename, Copy(val), featureattribs, declaratorid, newtype, newparms, qualifier);
1360 declparms = newparms;
1361 } else {
1362 declparms = 0;
1363 }
1364 }
1365 }
1366 }
1367
1368 /* check if a function declaration is a plain C object */
is_cfunction(Node * n)1369 static int is_cfunction(Node *n) {
1370 if (!cparse_cplusplus || cparse_externc)
1371 return 1;
1372 if (Swig_storage_isexternc(n)) {
1373 return 1;
1374 }
1375 return 0;
1376 }
1377
1378 /* If the Node is a function with parameters, check to see if any of the parameters
1379 * have default arguments. If so create a new function for each defaulted argument.
1380 * The additional functions form a linked list of nodes with the head being the original Node n. */
default_arguments(Node * n)1381 static void default_arguments(Node *n) {
1382 Node *function = n;
1383
1384 if (function) {
1385 ParmList *varargs = Getattr(function,"feature:varargs");
1386 if (varargs) {
1387 /* Handles the %varargs directive by looking for "feature:varargs" and
1388 * substituting ... with an alternative set of arguments. */
1389 Parm *p = Getattr(function,"parms");
1390 Parm *pp = 0;
1391 while (p) {
1392 SwigType *t = Getattr(p,"type");
1393 if (Strcmp(t,"v(...)") == 0) {
1394 if (pp) {
1395 ParmList *cv = Copy(varargs);
1396 set_nextSibling(pp,cv);
1397 Delete(cv);
1398 } else {
1399 ParmList *cv = Copy(varargs);
1400 Setattr(function,"parms", cv);
1401 Delete(cv);
1402 }
1403 break;
1404 }
1405 pp = p;
1406 p = nextSibling(p);
1407 }
1408 }
1409
1410 /* Do not add in functions if kwargs is being used or if user wants old default argument wrapping
1411 (one wrapped method per function irrespective of number of default arguments) */
1412 if (compact_default_args
1413 || is_cfunction(function)
1414 || GetFlag(function,"feature:compactdefaultargs")
1415 || (GetFlag(function,"feature:kwargs") && kwargs_supported)) {
1416 ParmList *p = Getattr(function,"parms");
1417 if (p)
1418 Setattr(p,"compactdefargs", "1"); /* mark parameters for special handling */
1419 function = 0; /* don't add in extra methods */
1420 }
1421 }
1422
1423 while (function) {
1424 ParmList *parms = Getattr(function,"parms");
1425 if (ParmList_has_defaultargs(parms)) {
1426
1427 /* Create a parameter list for the new function by copying all
1428 but the last (defaulted) parameter */
1429 ParmList* newparms = CopyParmListMax(parms,ParmList_len(parms)-1);
1430
1431 /* Create new function and add to symbol table */
1432 {
1433 SwigType *ntype = Copy(nodeType(function));
1434 char *cntype = Char(ntype);
1435 Node *new_function = new_node(ntype);
1436 SwigType *decl = Copy(Getattr(function,"decl"));
1437 int constqualifier = SwigType_isconst(decl);
1438 String *ccode = Copy(Getattr(function,"code"));
1439 String *cstorage = Copy(Getattr(function,"storage"));
1440 String *cvalue = Copy(Getattr(function,"value"));
1441 SwigType *ctype = Copy(Getattr(function,"type"));
1442 String *cthrow = Copy(Getattr(function,"throw"));
1443
1444 Delete(SwigType_pop_function(decl)); /* remove the old parameter list from decl */
1445 SwigType_add_function(decl,newparms);
1446 if (constqualifier)
1447 SwigType_add_qualifier(decl,"const");
1448
1449 Setattr(new_function,"name", Getattr(function,"name"));
1450 Setattr(new_function,"code", ccode);
1451 Setattr(new_function,"decl", decl);
1452 Setattr(new_function,"parms", newparms);
1453 Setattr(new_function,"storage", cstorage);
1454 Setattr(new_function,"value", cvalue);
1455 Setattr(new_function,"type", ctype);
1456 Setattr(new_function,"throw", cthrow);
1457
1458 Delete(ccode);
1459 Delete(cstorage);
1460 Delete(cvalue);
1461 Delete(ctype);
1462 Delete(cthrow);
1463 Delete(decl);
1464
1465 {
1466 Node *throws = Getattr(function,"throws");
1467 ParmList *pl = CopyParmList(throws);
1468 if (throws) Setattr(new_function,"throws",pl);
1469 Delete(pl);
1470 }
1471
1472 /* copy specific attributes for global (or in a namespace) template functions - these are not templated class methods */
1473 if (strcmp(cntype,"template") == 0) {
1474 Node *templatetype = Getattr(function,"templatetype");
1475 Node *symtypename = Getattr(function,"sym:typename");
1476 Parm *templateparms = Getattr(function,"templateparms");
1477 if (templatetype) {
1478 Node *tmp = Copy(templatetype);
1479 Setattr(new_function,"templatetype",tmp);
1480 Delete(tmp);
1481 }
1482 if (symtypename) {
1483 Node *tmp = Copy(symtypename);
1484 Setattr(new_function,"sym:typename",tmp);
1485 Delete(tmp);
1486 }
1487 if (templateparms) {
1488 Parm *tmp = CopyParmList(templateparms);
1489 Setattr(new_function,"templateparms",tmp);
1490 Delete(tmp);
1491 }
1492 } else if (strcmp(cntype,"constructor") == 0) {
1493 /* only copied for constructors as this is not a user defined feature - it is hard coded in the parser */
1494 if (GetFlag(function,"feature:new")) SetFlag(new_function,"feature:new");
1495 }
1496
1497 add_symbols(new_function);
1498 /* mark added functions as ones with overloaded parameters and point to the parsed method */
1499 Setattr(new_function,"defaultargs", n);
1500
1501 /* Point to the new function, extending the linked list */
1502 set_nextSibling(function, new_function);
1503 Delete(new_function);
1504 function = new_function;
1505
1506 Delete(ntype);
1507 }
1508 } else {
1509 function = 0;
1510 }
1511 }
1512 }
1513
1514 /* -----------------------------------------------------------------------------
1515 * mark_nodes_as_extend()
1516 *
1517 * Used by the %extend to mark subtypes with "feature:extend".
1518 * template instances declared within %extend are skipped
1519 * ----------------------------------------------------------------------------- */
1520
mark_nodes_as_extend(Node * n)1521 static void mark_nodes_as_extend(Node *n) {
1522 for (; n; n = nextSibling(n)) {
1523 if (Getattr(n, "template") && Strcmp(nodeType(n), "class") == 0)
1524 continue;
1525 /* Fix me: extend is not a feature. Replace with isextendmember? */
1526 Setattr(n, "feature:extend", "1");
1527 mark_nodes_as_extend(firstChild(n));
1528 }
1529 }
1530
1531 /* -----------------------------------------------------------------------------
1532 * add_qualifier_to_declarator()
1533 *
1534 * Normally the qualifier is pushed on to the front of the type.
1535 * Adding a qualifier to a pointer to member function is a special case.
1536 * For example : typedef double (Cls::*pmf)(void) const;
1537 * The qualifier is : q(const).
1538 * The declarator is : m(Cls).f(void).
1539 * We need : m(Cls).q(const).f(void).
1540 * ----------------------------------------------------------------------------- */
1541
add_qualifier_to_declarator(SwigType * type,SwigType * qualifier)1542 static String *add_qualifier_to_declarator(SwigType *type, SwigType *qualifier) {
1543 int is_pointer_to_member_function = 0;
1544 String *decl = Copy(type);
1545 String *poppedtype = NewString("");
1546 assert(qualifier);
1547
1548 while (decl) {
1549 if (SwigType_ismemberpointer(decl)) {
1550 String *memberptr = SwigType_pop(decl);
1551 if (SwigType_isfunction(decl)) {
1552 is_pointer_to_member_function = 1;
1553 SwigType_push(decl, qualifier);
1554 SwigType_push(decl, memberptr);
1555 Insert(decl, 0, poppedtype);
1556 Delete(memberptr);
1557 break;
1558 } else {
1559 Append(poppedtype, memberptr);
1560 }
1561 Delete(memberptr);
1562 } else {
1563 String *popped = SwigType_pop(decl);
1564 if (!popped)
1565 break;
1566 Append(poppedtype, popped);
1567 Delete(popped);
1568 }
1569 }
1570
1571 if (!is_pointer_to_member_function) {
1572 Delete(decl);
1573 decl = Copy(type);
1574 SwigType_push(decl, qualifier);
1575 }
1576
1577 Delete(poppedtype);
1578 return decl;
1579 }
1580
1581
1582 #line 1583 "y.tab.c" /* yacc.c:339 */
1583
1584 # ifndef YY_NULLPTR
1585 # if defined __cplusplus && 201103L <= __cplusplus
1586 # define YY_NULLPTR nullptr
1587 # else
1588 # define YY_NULLPTR 0
1589 # endif
1590 # endif
1591
1592 /* Enabling verbose error messages. */
1593 #ifdef YYERROR_VERBOSE
1594 # undef YYERROR_VERBOSE
1595 # define YYERROR_VERBOSE 1
1596 #else
1597 # define YYERROR_VERBOSE 0
1598 #endif
1599
1600 /* In a future release of Bison, this section will be replaced
1601 by #include "y.tab.h". */
1602 #ifndef YY_YY_Y_TAB_H_INCLUDED
1603 # define YY_YY_Y_TAB_H_INCLUDED
1604 /* Debug traces. */
1605 #ifndef YYDEBUG
1606 # define YYDEBUG 0
1607 #endif
1608 #if YYDEBUG
1609 extern int yydebug;
1610 #endif
1611
1612 /* Token type. */
1613 #ifndef YYTOKENTYPE
1614 # define YYTOKENTYPE
1615 enum yytokentype
1616 {
1617 ID = 258,
1618 HBLOCK = 259,
1619 POUND = 260,
1620 STRING = 261,
1621 WSTRING = 262,
1622 INCLUDE = 263,
1623 IMPORT = 264,
1624 INSERT = 265,
1625 CHARCONST = 266,
1626 WCHARCONST = 267,
1627 NUM_INT = 268,
1628 NUM_FLOAT = 269,
1629 NUM_UNSIGNED = 270,
1630 NUM_LONG = 271,
1631 NUM_ULONG = 272,
1632 NUM_LONGLONG = 273,
1633 NUM_ULONGLONG = 274,
1634 NUM_BOOL = 275,
1635 TYPEDEF = 276,
1636 TYPE_INT = 277,
1637 TYPE_UNSIGNED = 278,
1638 TYPE_SHORT = 279,
1639 TYPE_LONG = 280,
1640 TYPE_FLOAT = 281,
1641 TYPE_DOUBLE = 282,
1642 TYPE_CHAR = 283,
1643 TYPE_WCHAR = 284,
1644 TYPE_VOID = 285,
1645 TYPE_SIGNED = 286,
1646 TYPE_BOOL = 287,
1647 TYPE_COMPLEX = 288,
1648 TYPE_TYPEDEF = 289,
1649 TYPE_RAW = 290,
1650 TYPE_NON_ISO_INT8 = 291,
1651 TYPE_NON_ISO_INT16 = 292,
1652 TYPE_NON_ISO_INT32 = 293,
1653 TYPE_NON_ISO_INT64 = 294,
1654 LPAREN = 295,
1655 RPAREN = 296,
1656 COMMA = 297,
1657 SEMI = 298,
1658 EXTERN = 299,
1659 INIT = 300,
1660 LBRACE = 301,
1661 RBRACE = 302,
1662 PERIOD = 303,
1663 CONST_QUAL = 304,
1664 VOLATILE = 305,
1665 REGISTER = 306,
1666 STRUCT = 307,
1667 UNION = 308,
1668 EQUAL = 309,
1669 SIZEOF = 310,
1670 MODULE = 311,
1671 LBRACKET = 312,
1672 RBRACKET = 313,
1673 BEGINFILE = 314,
1674 ENDOFFILE = 315,
1675 ILLEGAL = 316,
1676 CONSTANT = 317,
1677 NAME = 318,
1678 RENAME = 319,
1679 NAMEWARN = 320,
1680 EXTEND = 321,
1681 PRAGMA = 322,
1682 FEATURE = 323,
1683 VARARGS = 324,
1684 ENUM = 325,
1685 CLASS = 326,
1686 TYPENAME = 327,
1687 PRIVATE = 328,
1688 PUBLIC = 329,
1689 PROTECTED = 330,
1690 COLON = 331,
1691 STATIC = 332,
1692 VIRTUAL = 333,
1693 FRIEND = 334,
1694 THROW = 335,
1695 CATCH = 336,
1696 EXPLICIT = 337,
1697 STATIC_ASSERT = 338,
1698 CONSTEXPR = 339,
1699 THREAD_LOCAL = 340,
1700 DECLTYPE = 341,
1701 AUTO = 342,
1702 NOEXCEPT = 343,
1703 OVERRIDE = 344,
1704 FINAL = 345,
1705 USING = 346,
1706 NAMESPACE = 347,
1707 NATIVE = 348,
1708 INLINE = 349,
1709 TYPEMAP = 350,
1710 EXCEPT = 351,
1711 ECHO = 352,
1712 APPLY = 353,
1713 CLEAR = 354,
1714 SWIGTEMPLATE = 355,
1715 FRAGMENT = 356,
1716 WARN = 357,
1717 LESSTHAN = 358,
1718 GREATERTHAN = 359,
1719 DELETE_KW = 360,
1720 DEFAULT = 361,
1721 LESSTHANOREQUALTO = 362,
1722 GREATERTHANOREQUALTO = 363,
1723 EQUALTO = 364,
1724 NOTEQUALTO = 365,
1725 ARROW = 366,
1726 QUESTIONMARK = 367,
1727 TYPES = 368,
1728 PARMS = 369,
1729 NONID = 370,
1730 DSTAR = 371,
1731 DCNOT = 372,
1732 TEMPLATE = 373,
1733 OPERATOR = 374,
1734 CONVERSIONOPERATOR = 375,
1735 PARSETYPE = 376,
1736 PARSEPARM = 377,
1737 PARSEPARMS = 378,
1738 DOXYGENSTRING = 379,
1739 DOXYGENPOSTSTRING = 380,
1740 CAST = 381,
1741 LOR = 382,
1742 LAND = 383,
1743 OR = 384,
1744 XOR = 385,
1745 AND = 386,
1746 LSHIFT = 387,
1747 RSHIFT = 388,
1748 PLUS = 389,
1749 MINUS = 390,
1750 STAR = 391,
1751 SLASH = 392,
1752 MODULO = 393,
1753 UMINUS = 394,
1754 NOT = 395,
1755 LNOT = 396,
1756 DCOLON = 397
1757 };
1758 #endif
1759 /* Tokens. */
1760 #define ID 258
1761 #define HBLOCK 259
1762 #define POUND 260
1763 #define STRING 261
1764 #define WSTRING 262
1765 #define INCLUDE 263
1766 #define IMPORT 264
1767 #define INSERT 265
1768 #define CHARCONST 266
1769 #define WCHARCONST 267
1770 #define NUM_INT 268
1771 #define NUM_FLOAT 269
1772 #define NUM_UNSIGNED 270
1773 #define NUM_LONG 271
1774 #define NUM_ULONG 272
1775 #define NUM_LONGLONG 273
1776 #define NUM_ULONGLONG 274
1777 #define NUM_BOOL 275
1778 #define TYPEDEF 276
1779 #define TYPE_INT 277
1780 #define TYPE_UNSIGNED 278
1781 #define TYPE_SHORT 279
1782 #define TYPE_LONG 280
1783 #define TYPE_FLOAT 281
1784 #define TYPE_DOUBLE 282
1785 #define TYPE_CHAR 283
1786 #define TYPE_WCHAR 284
1787 #define TYPE_VOID 285
1788 #define TYPE_SIGNED 286
1789 #define TYPE_BOOL 287
1790 #define TYPE_COMPLEX 288
1791 #define TYPE_TYPEDEF 289
1792 #define TYPE_RAW 290
1793 #define TYPE_NON_ISO_INT8 291
1794 #define TYPE_NON_ISO_INT16 292
1795 #define TYPE_NON_ISO_INT32 293
1796 #define TYPE_NON_ISO_INT64 294
1797 #define LPAREN 295
1798 #define RPAREN 296
1799 #define COMMA 297
1800 #define SEMI 298
1801 #define EXTERN 299
1802 #define INIT 300
1803 #define LBRACE 301
1804 #define RBRACE 302
1805 #define PERIOD 303
1806 #define CONST_QUAL 304
1807 #define VOLATILE 305
1808 #define REGISTER 306
1809 #define STRUCT 307
1810 #define UNION 308
1811 #define EQUAL 309
1812 #define SIZEOF 310
1813 #define MODULE 311
1814 #define LBRACKET 312
1815 #define RBRACKET 313
1816 #define BEGINFILE 314
1817 #define ENDOFFILE 315
1818 #define ILLEGAL 316
1819 #define CONSTANT 317
1820 #define NAME 318
1821 #define RENAME 319
1822 #define NAMEWARN 320
1823 #define EXTEND 321
1824 #define PRAGMA 322
1825 #define FEATURE 323
1826 #define VARARGS 324
1827 #define ENUM 325
1828 #define CLASS 326
1829 #define TYPENAME 327
1830 #define PRIVATE 328
1831 #define PUBLIC 329
1832 #define PROTECTED 330
1833 #define COLON 331
1834 #define STATIC 332
1835 #define VIRTUAL 333
1836 #define FRIEND 334
1837 #define THROW 335
1838 #define CATCH 336
1839 #define EXPLICIT 337
1840 #define STATIC_ASSERT 338
1841 #define CONSTEXPR 339
1842 #define THREAD_LOCAL 340
1843 #define DECLTYPE 341
1844 #define AUTO 342
1845 #define NOEXCEPT 343
1846 #define OVERRIDE 344
1847 #define FINAL 345
1848 #define USING 346
1849 #define NAMESPACE 347
1850 #define NATIVE 348
1851 #define INLINE 349
1852 #define TYPEMAP 350
1853 #define EXCEPT 351
1854 #define ECHO 352
1855 #define APPLY 353
1856 #define CLEAR 354
1857 #define SWIGTEMPLATE 355
1858 #define FRAGMENT 356
1859 #define WARN 357
1860 #define LESSTHAN 358
1861 #define GREATERTHAN 359
1862 #define DELETE_KW 360
1863 #define DEFAULT 361
1864 #define LESSTHANOREQUALTO 362
1865 #define GREATERTHANOREQUALTO 363
1866 #define EQUALTO 364
1867 #define NOTEQUALTO 365
1868 #define ARROW 366
1869 #define QUESTIONMARK 367
1870 #define TYPES 368
1871 #define PARMS 369
1872 #define NONID 370
1873 #define DSTAR 371
1874 #define DCNOT 372
1875 #define TEMPLATE 373
1876 #define OPERATOR 374
1877 #define CONVERSIONOPERATOR 375
1878 #define PARSETYPE 376
1879 #define PARSEPARM 377
1880 #define PARSEPARMS 378
1881 #define DOXYGENSTRING 379
1882 #define DOXYGENPOSTSTRING 380
1883 #define CAST 381
1884 #define LOR 382
1885 #define LAND 383
1886 #define OR 384
1887 #define XOR 385
1888 #define AND 386
1889 #define LSHIFT 387
1890 #define RSHIFT 388
1891 #define PLUS 389
1892 #define MINUS 390
1893 #define STAR 391
1894 #define SLASH 392
1895 #define MODULO 393
1896 #define UMINUS 394
1897 #define NOT 395
1898 #define LNOT 396
1899 #define DCOLON 397
1900
1901 /* Value type. */
1902 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1903
1904 union YYSTYPE
1905 {
1906 #line 1542 "parser.y" /* yacc.c:355 */
1907
1908 const char *id;
1909 List *bases;
1910 struct Define {
1911 String *val;
1912 String *rawval;
1913 int type;
1914 String *qualifier;
1915 String *refqualifier;
1916 String *bitfield;
1917 Parm *throws;
1918 String *throwf;
1919 String *nexcept;
1920 String *final;
1921 } dtype;
1922 struct {
1923 const char *type;
1924 String *filename;
1925 int line;
1926 } loc;
1927 struct {
1928 char *id;
1929 SwigType *type;
1930 String *defarg;
1931 ParmList *parms;
1932 short have_parms;
1933 ParmList *throws;
1934 String *throwf;
1935 String *nexcept;
1936 String *final;
1937 } decl;
1938 Parm *tparms;
1939 struct {
1940 String *method;
1941 Hash *kwargs;
1942 } tmap;
1943 struct {
1944 String *type;
1945 String *us;
1946 } ptype;
1947 SwigType *type;
1948 String *str;
1949 Parm *p;
1950 ParmList *pl;
1951 int intvalue;
1952 Node *node;
1953
1954 #line 1955 "y.tab.c" /* yacc.c:355 */
1955 };
1956
1957 typedef union YYSTYPE YYSTYPE;
1958 # define YYSTYPE_IS_TRIVIAL 1
1959 # define YYSTYPE_IS_DECLARED 1
1960 #endif
1961
1962
1963 extern YYSTYPE yylval;
1964
1965 int yyparse (void);
1966
1967 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
1968
1969 /* Copy the second part of user declarations. */
1970
1971 #line 1972 "y.tab.c" /* yacc.c:358 */
1972
1973 #ifdef short
1974 # undef short
1975 #endif
1976
1977 #ifdef YYTYPE_UINT8
1978 typedef YYTYPE_UINT8 yytype_uint8;
1979 #else
1980 typedef unsigned char yytype_uint8;
1981 #endif
1982
1983 #ifdef YYTYPE_INT8
1984 typedef YYTYPE_INT8 yytype_int8;
1985 #else
1986 typedef signed char yytype_int8;
1987 #endif
1988
1989 #ifdef YYTYPE_UINT16
1990 typedef YYTYPE_UINT16 yytype_uint16;
1991 #else
1992 typedef unsigned short int yytype_uint16;
1993 #endif
1994
1995 #ifdef YYTYPE_INT16
1996 typedef YYTYPE_INT16 yytype_int16;
1997 #else
1998 typedef short int yytype_int16;
1999 #endif
2000
2001 #ifndef YYSIZE_T
2002 # ifdef __SIZE_TYPE__
2003 # define YYSIZE_T __SIZE_TYPE__
2004 # elif defined size_t
2005 # define YYSIZE_T size_t
2006 # elif ! defined YYSIZE_T
2007 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
2008 # define YYSIZE_T size_t
2009 # else
2010 # define YYSIZE_T unsigned int
2011 # endif
2012 #endif
2013
2014 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
2015
2016 #ifndef YY_
2017 # if defined YYENABLE_NLS && YYENABLE_NLS
2018 # if ENABLE_NLS
2019 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
2020 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
2021 # endif
2022 # endif
2023 # ifndef YY_
2024 # define YY_(Msgid) Msgid
2025 # endif
2026 #endif
2027
2028 #ifndef YY_ATTRIBUTE
2029 # if (defined __GNUC__ \
2030 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
2031 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
2032 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
2033 # else
2034 # define YY_ATTRIBUTE(Spec) /* empty */
2035 # endif
2036 #endif
2037
2038 #ifndef YY_ATTRIBUTE_PURE
2039 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
2040 #endif
2041
2042 #ifndef YY_ATTRIBUTE_UNUSED
2043 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
2044 #endif
2045
2046 #if !defined _Noreturn \
2047 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
2048 # if defined _MSC_VER && 1200 <= _MSC_VER
2049 # define _Noreturn __declspec (noreturn)
2050 # else
2051 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
2052 # endif
2053 #endif
2054
2055 /* Suppress unused-variable warnings by "using" E. */
2056 #if ! defined lint || defined __GNUC__
2057 # define YYUSE(E) ((void) (E))
2058 #else
2059 # define YYUSE(E) /* empty */
2060 #endif
2061
2062 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
2063 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
2064 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
2065 _Pragma ("GCC diagnostic push") \
2066 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
2067 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
2068 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
2069 _Pragma ("GCC diagnostic pop")
2070 #else
2071 # define YY_INITIAL_VALUE(Value) Value
2072 #endif
2073 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2074 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2075 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
2076 #endif
2077 #ifndef YY_INITIAL_VALUE
2078 # define YY_INITIAL_VALUE(Value) /* Nothing. */
2079 #endif
2080
2081
2082 #if ! defined yyoverflow || YYERROR_VERBOSE
2083
2084 /* The parser invokes alloca or malloc; define the necessary symbols. */
2085
2086 # ifdef YYSTACK_USE_ALLOCA
2087 # if YYSTACK_USE_ALLOCA
2088 # ifdef __GNUC__
2089 # define YYSTACK_ALLOC __builtin_alloca
2090 # elif defined __BUILTIN_VA_ARG_INCR
2091 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
2092 # elif defined _AIX
2093 # define YYSTACK_ALLOC __alloca
2094 # elif defined _MSC_VER
2095 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
2096 # define alloca _alloca
2097 # else
2098 # define YYSTACK_ALLOC alloca
2099 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
2100 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2101 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
2102 # ifndef EXIT_SUCCESS
2103 # define EXIT_SUCCESS 0
2104 # endif
2105 # endif
2106 # endif
2107 # endif
2108 # endif
2109
2110 # ifdef YYSTACK_ALLOC
2111 /* Pacify GCC's 'empty if-body' warning. */
2112 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
2113 # ifndef YYSTACK_ALLOC_MAXIMUM
2114 /* The OS might guarantee only one guard page at the bottom of the stack,
2115 and a page size can be as small as 4096 bytes. So we cannot safely
2116 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
2117 to allow for a few compiler-allocated temporary stack slots. */
2118 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
2119 # endif
2120 # else
2121 # define YYSTACK_ALLOC YYMALLOC
2122 # define YYSTACK_FREE YYFREE
2123 # ifndef YYSTACK_ALLOC_MAXIMUM
2124 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
2125 # endif
2126 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
2127 && ! ((defined YYMALLOC || defined malloc) \
2128 && (defined YYFREE || defined free)))
2129 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
2130 # ifndef EXIT_SUCCESS
2131 # define EXIT_SUCCESS 0
2132 # endif
2133 # endif
2134 # ifndef YYMALLOC
2135 # define YYMALLOC malloc
2136 # if ! defined malloc && ! defined EXIT_SUCCESS
2137 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
2138 # endif
2139 # endif
2140 # ifndef YYFREE
2141 # define YYFREE free
2142 # if ! defined free && ! defined EXIT_SUCCESS
2143 void free (void *); /* INFRINGES ON USER NAME SPACE */
2144 # endif
2145 # endif
2146 # endif
2147 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
2148
2149
2150 #if (! defined yyoverflow \
2151 && (! defined __cplusplus \
2152 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
2153
2154 /* A type that is properly aligned for any stack member. */
2155 union yyalloc
2156 {
2157 yytype_int16 yyss_alloc;
2158 YYSTYPE yyvs_alloc;
2159 };
2160
2161 /* The size of the maximum gap between one aligned stack and the next. */
2162 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2163
2164 /* The size of an array large to enough to hold all stacks, each with
2165 N elements. */
2166 # define YYSTACK_BYTES(N) \
2167 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2168 + YYSTACK_GAP_MAXIMUM)
2169
2170 # define YYCOPY_NEEDED 1
2171
2172 /* Relocate STACK from its old location to the new one. The
2173 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2174 elements in the stack, and YYPTR gives the new location of the
2175 stack. Advance YYPTR to a properly aligned location for the next
2176 stack. */
2177 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
2178 do \
2179 { \
2180 YYSIZE_T yynewbytes; \
2181 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
2182 Stack = &yyptr->Stack_alloc; \
2183 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2184 yyptr += yynewbytes / sizeof (*yyptr); \
2185 } \
2186 while (0)
2187
2188 #endif
2189
2190 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
2191 /* Copy COUNT objects from SRC to DST. The source and destination do
2192 not overlap. */
2193 # ifndef YYCOPY
2194 # if defined __GNUC__ && 1 < __GNUC__
2195 # define YYCOPY(Dst, Src, Count) \
2196 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
2197 # else
2198 # define YYCOPY(Dst, Src, Count) \
2199 do \
2200 { \
2201 YYSIZE_T yyi; \
2202 for (yyi = 0; yyi < (Count); yyi++) \
2203 (Dst)[yyi] = (Src)[yyi]; \
2204 } \
2205 while (0)
2206 # endif
2207 # endif
2208 #endif /* !YYCOPY_NEEDED */
2209
2210 /* YYFINAL -- State number of the termination state. */
2211 #define YYFINAL 62
2212 /* YYLAST -- Last index in YYTABLE. */
2213 #define YYLAST 5637
2214
2215 /* YYNTOKENS -- Number of terminals. */
2216 #define YYNTOKENS 143
2217 /* YYNNTS -- Number of nonterminals. */
2218 #define YYNNTS 181
2219 /* YYNRULES -- Number of rules. */
2220 #define YYNRULES 611
2221 /* YYNSTATES -- Number of states. */
2222 #define YYNSTATES 1191
2223
2224 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
2225 by yylex, with out-of-bounds checking. */
2226 #define YYUNDEFTOK 2
2227 #define YYMAXUTOK 397
2228
2229 #define YYTRANSLATE(YYX) \
2230 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2231
2232 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
2233 as returned by yylex, without out-of-bounds checking. */
2234 static const yytype_uint8 yytranslate[] =
2235 {
2236 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2237 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2238 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2239 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2240 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2241 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2242 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2243 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2244 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2245 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2246 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2247 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2248 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2249 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2250 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2251 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2252 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2253 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2254 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2255 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2256 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2257 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2258 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2259 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2260 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2261 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2262 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2263 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2264 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2265 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2266 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2267 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2268 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2269 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2270 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2271 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
2272 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
2273 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
2274 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
2275 135, 136, 137, 138, 139, 140, 141, 142
2276 };
2277
2278 #if YYDEBUG
2279 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
2280 static const yytype_uint16 yyrline[] =
2281 {
2282 0, 1713, 1713, 1725, 1729, 1732, 1735, 1738, 1741, 1746,
2283 1755, 1759, 1766, 1771, 1772, 1773, 1774, 1775, 1785, 1801,
2284 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820,
2285 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830,
2286 1831, 1838, 1838, 1920, 1930, 1941, 1961, 1985, 2009, 2020,
2287 2029, 2048, 2054, 2060, 2065, 2072, 2079, 2083, 2096, 2105,
2288 2120, 2133, 2133, 2189, 2190, 2197, 2216, 2247, 2251, 2261,
2289 2266, 2284, 2327, 2333, 2346, 2352, 2378, 2384, 2391, 2392,
2290 2395, 2396, 2403, 2449, 2495, 2506, 2509, 2536, 2542, 2548,
2291 2554, 2562, 2568, 2574, 2580, 2588, 2589, 2590, 2593, 2598,
2292 2608, 2644, 2645, 2680, 2697, 2705, 2718, 2743, 2749, 2753,
2293 2756, 2767, 2772, 2785, 2797, 3095, 3105, 3112, 3113, 3117,
2294 3117, 3142, 3148, 3158, 3170, 3179, 3259, 3322, 3326, 3351,
2295 3355, 3366, 3371, 3372, 3373, 3377, 3378, 3379, 3390, 3395,
2296 3400, 3407, 3413, 3418, 3421, 3421, 3434, 3437, 3440, 3449,
2297 3452, 3459, 3481, 3510, 3608, 3661, 3662, 3663, 3664, 3665,
2298 3666, 3671, 3671, 3920, 3920, 4067, 4068, 4080, 4098, 4098,
2299 4359, 4365, 4371, 4374, 4377, 4380, 4383, 4386, 4391, 4427,
2300 4431, 4434, 4437, 4442, 4446, 4451, 4461, 4492, 4492, 4550,
2301 4550, 4572, 4599, 4616, 4621, 4616, 4629, 4630, 4631, 4631,
2302 4647, 4648, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672,
2303 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4682, 4685,
2304 4689, 4701, 4730, 4760, 4793, 4812, 4833, 4855, 4878, 4901,
2305 4909, 4916, 4923, 4931, 4939, 4942, 4946, 4949, 4950, 4951,
2306 4952, 4953, 4954, 4955, 4956, 4959, 4970, 4981, 4994, 5005,
2307 5016, 5030, 5033, 5036, 5037, 5041, 5043, 5051, 5063, 5064,
2308 5065, 5066, 5067, 5068, 5069, 5070, 5071, 5072, 5073, 5074,
2309 5075, 5076, 5077, 5078, 5079, 5080, 5081, 5082, 5089, 5100,
2310 5104, 5111, 5115, 5120, 5124, 5136, 5146, 5156, 5159, 5163,
2311 5169, 5182, 5186, 5189, 5193, 5197, 5225, 5233, 5246, 5262,
2312 5273, 5283, 5295, 5299, 5303, 5310, 5332, 5349, 5368, 5387,
2313 5394, 5402, 5411, 5420, 5424, 5433, 5444, 5455, 5467, 5477,
2314 5491, 5499, 5508, 5517, 5521, 5530, 5541, 5552, 5564, 5574,
2315 5584, 5595, 5608, 5615, 5623, 5639, 5647, 5658, 5669, 5680,
2316 5699, 5707, 5724, 5732, 5739, 5746, 5757, 5769, 5780, 5792,
2317 5803, 5814, 5834, 5855, 5861, 5867, 5874, 5881, 5890, 5899,
2318 5902, 5911, 5920, 5927, 5934, 5941, 5949, 5959, 5970, 5981,
2319 5992, 5999, 6006, 6009, 6026, 6044, 6054, 6061, 6067, 6072,
2320 6079, 6083, 6088, 6095, 6099, 6105, 6109, 6115, 6116, 6117,
2321 6123, 6129, 6133, 6134, 6138, 6145, 6148, 6149, 6153, 6154,
2322 6156, 6159, 6162, 6167, 6178, 6203, 6206, 6260, 6264, 6268,
2323 6272, 6276, 6280, 6284, 6288, 6292, 6296, 6300, 6304, 6308,
2324 6312, 6318, 6318, 6334, 6339, 6342, 6348, 6363, 6379, 6380,
2325 6383, 6384, 6388, 6389, 6399, 6403, 6408, 6418, 6429, 6434,
2326 6439, 6442, 6448, 6456, 6468, 6483, 6484, 6504, 6508, 6518,
2327 6524, 6527, 6530, 6534, 6539, 6544, 6545, 6550, 6564, 6580,
2328 6590, 6608, 6615, 6622, 6629, 6637, 6645, 6649, 6653, 6659,
2329 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6669, 6673, 6677,
2330 6681, 6685, 6689, 6693, 6697, 6701, 6705, 6709, 6713, 6717,
2331 6721, 6735, 6739, 6743, 6749, 6753, 6757, 6761, 6765, 6781,
2332 6786, 6789, 6794, 6799, 6799, 6800, 6803, 6820, 6829, 6829,
2333 6847, 6847, 6865, 6866, 6867, 6870, 6874, 6878, 6882, 6888,
2334 6891, 6895, 6901, 6905, 6909, 6915, 6918, 6923, 6924, 6927,
2335 6930, 6933, 6936, 6941, 6944, 6949, 6955, 6961, 6967, 6973,
2336 6979, 6987, 6995, 7000, 7007, 7010, 7020, 7031, 7042, 7052,
2337 7062, 7070, 7082, 7083, 7086, 7087, 7088, 7089, 7092, 7104,
2338 7110, 7119, 7120, 7121, 7124, 7125, 7126, 7129, 7130, 7133,
2339 7138, 7142, 7145, 7148, 7151, 7154, 7159, 7163, 7166, 7173,
2340 7179, 7182, 7187, 7190, 7196, 7201, 7205, 7208, 7211, 7214,
2341 7219, 7223, 7226, 7229, 7235, 7238, 7241, 7249, 7252, 7255,
2342 7259, 7264, 7277, 7281, 7286, 7292, 7296, 7301, 7305, 7312,
2343 7315, 7320
2344 };
2345 #endif
2346
2347 #if YYDEBUG || YYERROR_VERBOSE || 0
2348 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2349 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2350 static const char *const yytname[] =
2351 {
2352 "$end", "error", "$undefined", "ID", "HBLOCK", "POUND", "STRING",
2353 "WSTRING", "INCLUDE", "IMPORT", "INSERT", "CHARCONST", "WCHARCONST",
2354 "NUM_INT", "NUM_FLOAT", "NUM_UNSIGNED", "NUM_LONG", "NUM_ULONG",
2355 "NUM_LONGLONG", "NUM_ULONGLONG", "NUM_BOOL", "TYPEDEF", "TYPE_INT",
2356 "TYPE_UNSIGNED", "TYPE_SHORT", "TYPE_LONG", "TYPE_FLOAT", "TYPE_DOUBLE",
2357 "TYPE_CHAR", "TYPE_WCHAR", "TYPE_VOID", "TYPE_SIGNED", "TYPE_BOOL",
2358 "TYPE_COMPLEX", "TYPE_TYPEDEF", "TYPE_RAW", "TYPE_NON_ISO_INT8",
2359 "TYPE_NON_ISO_INT16", "TYPE_NON_ISO_INT32", "TYPE_NON_ISO_INT64",
2360 "LPAREN", "RPAREN", "COMMA", "SEMI", "EXTERN", "INIT", "LBRACE",
2361 "RBRACE", "PERIOD", "CONST_QUAL", "VOLATILE", "REGISTER", "STRUCT",
2362 "UNION", "EQUAL", "SIZEOF", "MODULE", "LBRACKET", "RBRACKET",
2363 "BEGINFILE", "ENDOFFILE", "ILLEGAL", "CONSTANT", "NAME", "RENAME",
2364 "NAMEWARN", "EXTEND", "PRAGMA", "FEATURE", "VARARGS", "ENUM", "CLASS",
2365 "TYPENAME", "PRIVATE", "PUBLIC", "PROTECTED", "COLON", "STATIC",
2366 "VIRTUAL", "FRIEND", "THROW", "CATCH", "EXPLICIT", "STATIC_ASSERT",
2367 "CONSTEXPR", "THREAD_LOCAL", "DECLTYPE", "AUTO", "NOEXCEPT", "OVERRIDE",
2368 "FINAL", "USING", "NAMESPACE", "NATIVE", "INLINE", "TYPEMAP", "EXCEPT",
2369 "ECHO", "APPLY", "CLEAR", "SWIGTEMPLATE", "FRAGMENT", "WARN", "LESSTHAN",
2370 "GREATERTHAN", "DELETE_KW", "DEFAULT", "LESSTHANOREQUALTO",
2371 "GREATERTHANOREQUALTO", "EQUALTO", "NOTEQUALTO", "ARROW", "QUESTIONMARK",
2372 "TYPES", "PARMS", "NONID", "DSTAR", "DCNOT", "TEMPLATE", "OPERATOR",
2373 "CONVERSIONOPERATOR", "PARSETYPE", "PARSEPARM", "PARSEPARMS",
2374 "DOXYGENSTRING", "DOXYGENPOSTSTRING", "CAST", "LOR", "LAND", "OR", "XOR",
2375 "AND", "LSHIFT", "RSHIFT", "PLUS", "MINUS", "STAR", "SLASH", "MODULO",
2376 "UMINUS", "NOT", "LNOT", "DCOLON", "$accept", "program", "interface",
2377 "declaration", "swig_directive", "extend_directive", "$@1",
2378 "apply_directive", "clear_directive", "constant_directive",
2379 "echo_directive", "except_directive", "stringtype", "fname",
2380 "fragment_directive", "include_directive", "$@2", "includetype",
2381 "inline_directive", "insert_directive", "module_directive",
2382 "name_directive", "native_directive", "pragma_directive", "pragma_arg",
2383 "pragma_lang", "rename_directive", "rename_namewarn",
2384 "feature_directive", "stringbracesemi", "featattr", "varargs_directive",
2385 "varargs_parms", "typemap_directive", "typemap_type", "tm_list",
2386 "tm_tail", "typemap_parm", "types_directive", "template_directive",
2387 "warn_directive", "c_declaration", "$@3", "c_decl", "c_decl_tail",
2388 "initializer", "cpp_alternate_rettype", "cpp_lambda_decl",
2389 "lambda_introducer", "lambda_body", "lambda_tail", "$@4", "c_enum_key",
2390 "c_enum_inherit", "c_enum_forward_decl", "c_enum_decl",
2391 "c_constructor_decl", "cpp_declaration", "cpp_class_decl", "@5", "@6",
2392 "cpp_opt_declarators", "cpp_forward_class_decl", "cpp_template_decl",
2393 "$@7", "cpp_template_possible", "template_parms", "templateparameters",
2394 "templateparameter", "templateparameterstail", "cpp_using_decl",
2395 "cpp_namespace_decl", "@8", "$@9", "cpp_members", "$@10", "$@11", "$@12",
2396 "cpp_member_no_dox", "cpp_member", "cpp_constructor_decl",
2397 "cpp_destructor_decl", "cpp_conversion_operator", "cpp_catch_decl",
2398 "cpp_static_assert", "cpp_protection_decl", "cpp_swig_directive",
2399 "cpp_end", "cpp_vend", "anonymous_bitfield", "anon_bitfield_type",
2400 "extern_string", "storage_class", "parms", "rawparms", "ptail",
2401 "parm_no_dox", "parm", "valparms", "rawvalparms", "valptail", "valparm",
2402 "def_args", "parameter_declarator", "plain_declarator", "declarator",
2403 "notso_direct_declarator", "direct_declarator", "abstract_declarator",
2404 "direct_abstract_declarator", "pointer", "cv_ref_qualifier",
2405 "ref_qualifier", "type_qualifier", "type_qualifier_raw", "type",
2406 "rawtype", "type_right", "decltype", "primitive_type",
2407 "primitive_type_list", "type_specifier", "definetype", "$@13",
2408 "default_delete", "deleted_definition", "explicit_default", "ename",
2409 "constant_directives", "optional_ignored_defines", "enumlist",
2410 "enumlist_item", "edecl_with_dox", "edecl", "etype", "expr", "exprmem",
2411 "valexpr", "exprnum", "exprcompound", "ellipsis", "variadic", "inherit",
2412 "raw_inherit", "$@14", "base_list", "base_specifier", "@15", "@16",
2413 "access_specifier", "templcpptype", "cpptype", "classkey", "classkeyopt",
2414 "opt_virtual", "virt_specifier_seq", "virt_specifier_seq_opt",
2415 "exception_specification", "qualifiers_exception_specification",
2416 "cpp_const", "ctor_end", "ctor_initializer", "mem_initializer_list",
2417 "mem_initializer", "less_valparms_greater", "identifier", "idstring",
2418 "idstringopt", "idcolon", "idcolontail", "idtemplate",
2419 "idtemplatetemplate", "idcolonnt", "idcolontailnt", "string", "wstring",
2420 "stringbrace", "options", "kwargs", "stringnum", "empty", YY_NULLPTR
2421 };
2422 #endif
2423
2424 # ifdef YYPRINT
2425 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
2426 (internal) symbol number NUM (which must be that of a token). */
2427 static const yytype_uint16 yytoknum[] =
2428 {
2429 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2430 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2431 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2432 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2433 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2434 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2435 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2436 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2437 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2438 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
2439 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
2440 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
2441 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
2442 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
2443 395, 396, 397
2444 };
2445 # endif
2446
2447 #define YYPACT_NINF -1036
2448
2449 #define yypact_value_is_default(Yystate) \
2450 (!!((Yystate) == (-1036)))
2451
2452 #define YYTABLE_NINF -612
2453
2454 #define yytable_value_is_error(Yytable_value) \
2455 0
2456
2457 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2458 STATE-NUM. */
2459 static const yytype_int16 yypact[] =
2460 {
2461 719, 4503, 4606, 69, 81, 3947, -1036, -1036, -1036, -1036,
2462 -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036,
2463 -1036, -1036, -1036, -1036, -1036, -1036, 149, -1036, -1036, -1036,
2464 -1036, -1036, 304, 205, 236, 299, -1036, -1036, 226, 241,
2465 289, 5235, 185, 306, 441, 5518, 699, 174, 699, -1036,
2466 -1036, -1036, 3303, -1036, 185, 289, -1036, 269, -1036, 463,
2467 507, 4916, -1036, 382, -1036, -1036, -1036, 521, -1036, -1036,
2468 39, 535, 5019, 537, -1036, -1036, 535, 546, 579, 590,
2469 8, -1036, -1036, 613, 562, 624, 217, 293, 298, 343,
2470 635, 169, 639, 649, 542, 5306, 5306, 640, 654, 698,
2471 665, 278, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036,
2472 -1036, -1036, -1036, -1036, 535, -1036, -1036, -1036, -1036, -1036,
2473 -1036, -1036, 857, -1036, -1036, -1036, -1036, -1036, -1036, -1036,
2474 -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036,
2475 -1036, -1036, -1036, 82, 5377, -1036, 660, -1036, -1036, 662,
2476 664, 185, 162, 483, 2266, -1036, -1036, -1036, -1036, -1036,
2477 699, -1036, 3541, 674, 166, 2402, 3218, 52, 434, 1513,
2478 48, 185, -1036, -1036, 244, 385, 244, 404, 403, 597,
2479 -1036, -1036, -1036, -1036, -1036, 202, 223, -1036, -1036, -1036,
2480 683, -1036, 687, -1036, -1036, 626, -1036, -1036, 483, 154,
2481 626, 626, -1036, 682, 1158, -1036, 13, 802, 34, 202,
2482 202, -1036, 626, 4813, -1036, -1036, 4916, -1036, -1036, -1036,
2483 -1036, -1036, -1036, 185, 272, -1036, 249, 700, 202, -1036,
2484 -1036, 626, 202, -1036, -1036, -1036, 768, 4916, 730, 381,
2485 747, 754, 626, 698, 768, 4916, 4916, 185, 698, 358,
2486 925, 1139, 626, 438, 2013, 688, -1036, -1036, 1158, 185,
2487 1441, 232, -1036, 759, 764, 772, 202, -1036, -1036, 269,
2488 711, 706, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036,
2489 -1036, -1036, -1036, 3218, 370, 3218, 3218, 3218, 3218, 3218,
2490 3218, 3218, -1036, 714, -1036, 786, 790, 1061, 2238, 36,
2491 21, -1036, -1036, 768, 827, -1036, -1036, 3658, 130, 130,
2492 797, 803, 892, 733, 798, -1036, -1036, -1036, 799, 3218,
2493 -1036, -1036, -1036, -1036, 3722, -1036, 2238, 814, 3658, 809,
2494 185, 440, 404, -1036, 811, 440, 404, -1036, 725, -1036,
2495 -1036, 4916, 2538, -1036, 4916, 2674, 818, 1935, 2272, 440,
2496 404, 755, 553, -1036, -1036, 269, 830, 4709, -1036, -1036,
2497 -1036, -1036, 839, 768, 185, -1036, -1036, 392, 842, -1036,
2498 -1036, 1447, 244, 447, 318, -1036, 858, -1036, -1036, -1036,
2499 -1036, 185, -1036, 860, 844, 499, 868, 861, -1036, 874,
2500 873, -1036, 5448, -1036, 185, -1036, 877, 879, -1036, 880,
2501 881, 5306, -1036, -1036, 459, -1036, -1036, -1036, 5306, -1036,
2502 -1036, -1036, 883, -1036, -1036, 566, 261, 885, 823, -1036,
2503 889, -1036, 165, -1036, -1036, 54, 128, 128, 128, 467,
2504 819, 895, 147, 894, 4916, 2408, 2492, 828, 2018, 1576,
2505 50, 863, 242, -1036, 3775, 1576, -1036, 897, -1036, 286,
2506 -1036, -1036, -1036, -1036, 289, -1036, 483, 942, 2642, 5448,
2507 900, 3050, 2649, -1036, -1036, -1036, -1036, -1036, -1036, 2266,
2508 -1036, -1036, -1036, 3218, 3218, 3218, 3218, 3218, 3218, 3218,
2509 3218, 3218, 3218, 3218, 3218, 3218, 3218, 3218, 3218, 3218,
2510 947, 953, -1036, 531, 531, 2074, 845, 362, -1036, 519,
2511 -1036, -1036, 531, 531, 565, 848, 1601, 128, 3218, 2238,
2512 -1036, 4916, 2007, 11, 910, -1036, 4916, 2810, 918, -1036,
2513 926, -1036, 4450, 928, -1036, 4760, 922, 923, 440, 404,
2514 930, 440, 404, 1887, 931, 932, 2544, 440, -1036, -1036,
2515 -1036, 4916, 687, 354, -1036, -1036, 626, 2722, -1036, 941,
2516 4916, 946, -1036, 944, -1036, 681, 1465, 2237, 954, 4916,
2517 1158, 973, -1036, 381, 4060, 979, -1036, 1048, 5306, 186,
2518 984, 980, 4916, 754, 508, 982, 626, 4916, 126, 935,
2519 4916, -1036, -1036, -1036, 1601, 276, 1305, 18, -1036, 987,
2520 2356, 989, 288, 945, 948, -1036, -1036, 638, -1036, 328,
2521 -1036, -1036, -1036, 920, -1036, 977, 5518, 482, -1036, 995,
2522 819, 244, 960, -1036, -1036, 993, -1036, 185, -1036, 3218,
2523 2946, 3082, 3354, 70, 174, 997, 786, 867, 867, 3177,
2524 3177, 2373, 1277, 3050, 2921, 2785, 2649, 752, 752, 732,
2525 732, -1036, -1036, -1036, -1036, -1036, 848, 699, -1036, -1036,
2526 -1036, 531, 1000, 1002, 381, 438, 4863, 1006, 600, 848,
2527 -1036, 1232, 1305, 1007, -1036, 5395, 1305, 416, -1036, 416,
2528 -1036, 1305, 1004, 1005, 1010, 1011, 2628, 440, 404, 1018,
2529 1019, 1020, 440, 687, -1036, -1036, -1036, 768, 4173, -1036,
2530 1008, -1036, 261, 1012, -1036, 1030, -1036, -1036, -1036, -1036,
2531 768, -1036, -1036, -1036, 1033, -1036, 1576, 768, -1036, 1022,
2532 88, 658, 1465, -1036, 1576, -1036, 1034, -1036, -1036, 4286,
2533 44, 5448, 484, -1036, -1036, 4916, -1036, 1037, -1036, 939,
2534 -1036, 280, 985, -1036, 1041, 1036, -1036, 185, 1742, 889,
2535 -1036, 381, 1576, 353, 1305, -1036, 4916, 3218, -1036, -1036,
2536 -1036, -1036, -1036, 4678, -1036, 474, -1036, -1036, 1023, 3076,
2537 426, -1036, -1036, 1045, -1036, 804, -1036, 2147, -1036, 244,
2538 2238, 3218, 3218, 3354, 3845, 3218, 1049, 1050, 1057, 1060,
2539 -1036, 3218, -1036, -1036, 1063, 1064, -1036, -1036, -1036, 621,
2540 440, -1036, -1036, 440, -1036, -1036, 440, 1305, 1305, 1054,
2541 1059, 1062, 440, 1305, 1065, 1066, -1036, -1036, 626, 626,
2542 416, 2147, 4916, 126, 2722, 1654, 626, 1070, -1036, 1576,
2543 1046, -1036, -1036, 768, 1158, 173, -1036, 5306, -1036, 1071,
2544 416, 72, 202, 104, -1036, 2266, 192, -1036, 1067, 39,
2545 302, -1036, -1036, -1036, -1036, -1036, -1036, -1036, 5090, -1036,
2546 4399, 1077, -1036, 1083, 2777, -1036, -1036, -1036, 505, -1036,
2547 -1036, -1036, 4916, -1036, 525, 1023, -1036, 62, 1081, 24,
2548 -1036, 4916, 318, 1082, 1055, -1036, -1036, 1158, -1036, -1036,
2549 -1036, 960, -1036, -1036, -1036, 185, -1036, -1036, -1036, 1092,
2550 1073, 1076, 1078, 1013, 3435, 202, -1036, -1036, -1036, -1036,
2551 -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036, -1036,
2552 -1036, -1036, -1036, -1036, -1036, -1036, -1036, 1099, 1031, 2147,
2553 -1036, -1036, -1036, -1036, -1036, -1036, -1036, 5162, 1100, 2147,
2554 -1036, 2238, 2238, 2238, 3218, 3218, -1036, 5448, 2508, -1036,
2555 -1036, -1036, 440, 440, 1305, 1107, 1115, 440, 1305, 1305,
2556 -1036, -1036, 244, 1117, 1128, -1036, 768, 1136, -1036, 1576,
2557 1768, 126, -1036, 1138, -1036, 1141, -1036, -1036, -1036, 280,
2558 -1036, -1036, 280, 1084, -1036, -1036, 5448, 4916, 1158, 5448,
2559 1950, -1036, -1036, 505, -1036, -1036, 244, -1036, 1129, -1036,
2560 -1036, -1036, -1036, 202, 1023, -1036, 1131, 1774, 38, -1036,
2561 1149, 1148, 318, 185, 620, -1036, 1576, -1036, 1134, 960,
2562 2147, -1036, -1036, -1036, -1036, 202, -1036, 1155, 1831, -1036,
2563 -1036, 1123, 1126, 1133, 1135, 1140, 25, 1153, 2238, 2238,
2564 174, 440, 1305, 1305, 440, 440, 1161, -1036, 1162, -1036,
2565 1164, -1036, 1576, -1036, -1036, -1036, -1036, -1036, 1167, 381,
2566 1108, 17, 3775, -1036, 426, 1576, 1174, -1036, -1036, 3218,
2567 -1036, 1576, 1023, -1036, 627, -1036, 1181, 1176, 1177, 486,
2568 -1036, -1036, 244, 1178, -1036, -1036, -1036, 185, -1036, 2147,
2569 1187, 4916, -1036, -1036, 1576, 3218, -1036, 1831, 1191, 440,
2570 440, -1036, -1036, -1036, 1190, -1036, 1193, -1036, 4916, 1197,
2571 1198, 9, 1202, -1036, 45, -1036, -1036, 2238, 244, -1036,
2572 -1036, -1036, -1036, 185, 1196, -1036, -1036, 426, 1201, 1134,
2573 1192, 4916, 1204, 244, 2912, -1036, -1036, -1036, -1036, 1210,
2574 4916, 4916, 4916, 1215, 3076, 5448, 525, 426, 1211, 1212,
2575 -1036, -1036, -1036, -1036, 1221, 1576, 426, -1036, 1576, 1229,
2576 1230, 1233, 4916, -1036, 1234, -1036, -1036, 1228, -1036, 2147,
2577 1576, -1036, 571, -1036, -1036, 606, 1576, 1576, 1576, 1237,
2578 525, 1239, -1036, -1036, -1036, -1036, 318, -1036, -1036, 318,
2579 -1036, -1036, -1036, 1576, -1036, -1036, 1242, 1245, -1036, -1036,
2580 -1036
2581 };
2582
2583 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
2584 Performed when YYTABLE does not specify something else to do. Zero
2585 means the default is an error. */
2586 static const yytype_uint16 yydefact[] =
2587 {
2588 611, 0, 0, 0, 0, 0, 12, 4, 561, 407,
2589 415, 408, 409, 412, 413, 410, 411, 397, 414, 396,
2590 416, 399, 417, 418, 419, 420, 0, 387, 388, 389,
2591 520, 521, 146, 515, 516, 0, 562, 563, 0, 0,
2592 573, 0, 0, 287, 0, 0, 385, 611, 392, 402,
2593 395, 404, 405, 519, 0, 580, 400, 571, 6, 0,
2594 0, 611, 1, 17, 67, 63, 64, 0, 263, 16,
2595 258, 611, 0, 0, 85, 86, 611, 611, 0, 0,
2596 262, 264, 265, 0, 266, 0, 267, 272, 0, 0,
2597 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2598 0, 0, 10, 11, 9, 13, 20, 21, 22, 23,
2599 24, 25, 26, 27, 611, 28, 29, 30, 31, 32,
2600 33, 34, 0, 35, 36, 37, 38, 39, 40, 14,
2601 116, 121, 118, 117, 18, 15, 155, 156, 157, 158,
2602 159, 160, 124, 259, 0, 277, 0, 148, 147, 0,
2603 0, 0, 0, 0, 611, 574, 288, 398, 289, 3,
2604 391, 386, 611, 0, 421, 0, 0, 573, 363, 362,
2605 379, 0, 304, 284, 611, 313, 611, 359, 353, 340,
2606 301, 393, 406, 401, 581, 0, 0, 569, 5, 8,
2607 0, 278, 611, 280, 19, 0, 595, 275, 0, 257,
2608 0, 0, 602, 0, 0, 390, 580, 0, 611, 0,
2609 0, 81, 0, 611, 270, 274, 611, 268, 230, 271,
2610 269, 276, 273, 0, 0, 189, 580, 0, 0, 65,
2611 66, 0, 0, 54, 52, 49, 50, 611, 0, 611,
2612 0, 611, 611, 0, 115, 611, 611, 0, 0, 0,
2613 0, 0, 0, 313, 0, 340, 261, 260, 0, 611,
2614 0, 611, 286, 0, 0, 0, 0, 575, 582, 572,
2615 0, 561, 597, 457, 458, 469, 470, 471, 472, 473,
2616 474, 475, 476, 0, 0, 0, 0, 0, 0, 0,
2617 0, 0, 295, 0, 290, 611, 446, 390, 0, 451,
2618 445, 450, 455, 452, 456, 292, 394, 611, 363, 362,
2619 0, 0, 353, 400, 0, 299, 426, 427, 297, 0,
2620 423, 424, 425, 370, 0, 445, 300, 0, 611, 0,
2621 0, 315, 361, 332, 0, 314, 360, 377, 378, 341,
2622 302, 611, 0, 303, 611, 0, 0, 356, 355, 310,
2623 354, 332, 364, 579, 578, 577, 0, 0, 279, 283,
2624 565, 564, 0, 566, 0, 594, 119, 605, 0, 71,
2625 48, 0, 611, 313, 421, 73, 0, 523, 524, 522,
2626 525, 0, 526, 0, 77, 0, 0, 0, 101, 0,
2627 0, 185, 0, 611, 0, 187, 0, 0, 106, 0,
2628 0, 0, 110, 306, 313, 307, 309, 44, 0, 107,
2629 109, 567, 0, 568, 57, 0, 56, 0, 0, 178,
2630 611, 182, 519, 180, 170, 0, 0, 0, 0, 564,
2631 0, 0, 0, 0, 611, 0, 0, 332, 0, 611,
2632 340, 611, 580, 429, 611, 611, 503, 0, 502, 401,
2633 505, 517, 518, 403, 0, 570, 0, 0, 0, 0,
2634 0, 467, 466, 495, 494, 468, 496, 497, 560, 0,
2635 291, 294, 498, 0, 0, 0, 0, 0, 0, 0,
2636 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2637 0, 0, 596, 363, 362, 353, 400, 0, 340, 0,
2638 375, 372, 356, 355, 0, 340, 364, 0, 0, 422,
2639 371, 611, 353, 400, 0, 333, 611, 0, 0, 376,
2640 0, 349, 0, 0, 368, 0, 0, 0, 312, 358,
2641 0, 311, 357, 366, 0, 0, 0, 316, 365, 576,
2642 7, 0, 611, 0, 171, 611, 0, 0, 601, 0,
2643 611, 0, 72, 0, 80, 0, 0, 0, 0, 0,
2644 0, 0, 186, 611, 0, 0, 611, 611, 0, 0,
2645 111, 0, 611, 611, 0, 0, 0, 0, 0, 168,
2646 0, 179, 184, 61, 0, 0, 0, 0, 82, 0,
2647 0, 0, 536, 529, 530, 384, 383, 541, 382, 380,
2648 537, 542, 544, 0, 545, 0, 0, 0, 150, 0,
2649 400, 611, 611, 163, 167, 0, 583, 0, 447, 459,
2650 0, 0, 379, 0, 611, 0, 611, 492, 491, 489,
2651 490, 0, 488, 487, 483, 484, 482, 485, 486, 477,
2652 478, 479, 480, 481, 449, 448, 0, 364, 344, 343,
2653 342, 366, 0, 0, 365, 323, 0, 0, 0, 332,
2654 334, 364, 0, 0, 337, 0, 0, 351, 350, 373,
2655 369, 0, 0, 0, 0, 0, 0, 317, 367, 0,
2656 0, 0, 319, 611, 281, 69, 70, 68, 0, 606,
2657 607, 610, 609, 603, 46, 0, 45, 41, 79, 76,
2658 78, 600, 96, 599, 0, 91, 611, 598, 95, 0,
2659 609, 0, 0, 102, 611, 229, 0, 190, 191, 0,
2660 258, 0, 0, 53, 51, 611, 43, 0, 108, 0,
2661 588, 586, 0, 60, 0, 0, 113, 0, 611, 611,
2662 611, 0, 611, 0, 0, 351, 611, 0, 539, 532,
2663 531, 543, 381, 0, 141, 0, 149, 151, 611, 611,
2664 0, 131, 527, 504, 506, 508, 528, 0, 161, 611,
2665 460, 0, 0, 379, 378, 0, 0, 0, 0, 0,
2666 293, 0, 345, 347, 0, 0, 298, 352, 335, 0,
2667 325, 339, 338, 324, 305, 374, 320, 0, 0, 0,
2668 0, 0, 318, 0, 0, 0, 282, 120, 0, 0,
2669 351, 0, 611, 0, 0, 0, 0, 0, 93, 611,
2670 0, 122, 188, 257, 0, 580, 104, 0, 103, 0,
2671 351, 0, 0, 0, 584, 611, 0, 55, 0, 258,
2672 0, 172, 173, 176, 175, 169, 174, 177, 0, 183,
2673 0, 0, 84, 0, 0, 134, 133, 135, 611, 137,
2674 132, 136, 611, 142, 0, 430, 432, 438, 0, 434,
2675 433, 611, 421, 542, 611, 154, 130, 0, 127, 129,
2676 125, 611, 513, 512, 514, 0, 510, 198, 217, 0,
2677 0, 0, 0, 264, 611, 0, 242, 243, 235, 244,
2678 215, 196, 240, 236, 234, 237, 238, 239, 241, 216,
2679 212, 213, 200, 207, 206, 210, 209, 0, 218, 0,
2680 201, 202, 205, 211, 203, 204, 214, 0, 277, 0,
2681 285, 463, 462, 461, 0, 0, 453, 0, 493, 346,
2682 348, 336, 322, 321, 0, 0, 0, 326, 0, 0,
2683 608, 604, 611, 0, 0, 87, 609, 98, 92, 611,
2684 0, 0, 100, 0, 74, 0, 112, 308, 589, 587,
2685 593, 592, 591, 0, 58, 59, 0, 611, 0, 0,
2686 0, 62, 83, 535, 540, 533, 611, 534, 0, 144,
2687 143, 140, 431, 0, 611, 440, 442, 0, 611, 435,
2688 0, 0, 0, 0, 0, 553, 611, 507, 611, 611,
2689 0, 193, 232, 231, 233, 0, 219, 0, 0, 220,
2690 192, 397, 396, 399, 0, 395, 400, 0, 465, 464,
2691 611, 327, 0, 0, 331, 330, 0, 42, 0, 99,
2692 0, 94, 611, 89, 75, 105, 585, 590, 0, 611,
2693 0, 0, 611, 538, 0, 611, 0, 441, 439, 0,
2694 152, 611, 611, 436, 0, 550, 0, 552, 554, 0,
2695 546, 547, 611, 0, 500, 509, 501, 0, 199, 0,
2696 0, 611, 165, 164, 611, 0, 208, 0, 0, 329,
2697 328, 47, 97, 88, 0, 114, 0, 168, 611, 0,
2698 0, 0, 0, 126, 0, 145, 443, 444, 611, 437,
2699 548, 549, 551, 0, 0, 558, 559, 0, 0, 611,
2700 0, 611, 0, 611, 0, 162, 454, 90, 123, 0,
2701 611, 611, 611, 0, 611, 0, 0, 0, 555, 0,
2702 128, 499, 511, 194, 0, 611, 0, 251, 611, 0,
2703 0, 0, 611, 221, 0, 138, 153, 0, 556, 0,
2704 611, 222, 0, 166, 228, 0, 611, 611, 611, 0,
2705 0, 0, 195, 223, 245, 247, 0, 248, 250, 421,
2706 226, 225, 224, 611, 139, 557, 0, 0, 227, 246,
2707 249
2708 };
2709
2710 /* YYPGOTO[NTERM-NUM]. */
2711 static const yytype_int16 yypgoto[] =
2712 {
2713 -1036, -1036, -360, -1036, -1036, -1036, -1036, 56, 67, -2,
2714 73, -1036, 743, -1036, 75, 80, -1036, -1036, -1036, 83,
2715 -1036, 84, -1036, 90, -1036, -1036, 91, -1036, 101, -553,
2716 -684, 103, -1036, 105, -1036, -369, 720, -91, 107, 110,
2717 112, 113, -1036, 554, -913, -933, -1036, -1036, -1036, -1035,
2718 -915, -1036, -130, -1036, -1036, -1036, -1036, -1036, 32, -1036,
2719 -1036, 213, 35, 46, -1036, -1036, 327, -1036, 727, 570,
2720 118, -1036, -1036, -1036, -783, -1036, -1036, -1036, 420, -1036,
2721 577, -1036, 578, 133, -1036, -1036, -1036, -1036, -532, -1036,
2722 -1036, -1036, 14, -35, -1036, -501, 1276, 10, 492, -1036,
2723 702, 866, -39, -602, -548, 197, 1175, 26, -149, 1127,
2724 201, -621, 731, 74, -1036, -65, 41, -27, 576, -714,
2725 1280, -1036, -365, -1036, -163, -1036, -1036, -1036, 472, 344,
2726 -936, -1036, -1036, 346, -1036, 978, -1036, -144, -503, -1036,
2727 -1036, 221, 893, -1036, -1036, -1036, 460, -1036, -1036, -1036,
2728 -240, 27, -1036, -1036, 334, -568, -1036, -576, -1036, 612,
2729 212, -1036, -1036, 235, -24, 1124, -178, -1036, 1052, -211,
2730 -150, 1171, -1036, -271, 1297, -1036, 628, 7, -193, -537,
2731 0
2732 };
2733
2734 /* YYDEFGOTO[NTERM-NUM]. */
2735 static const yytype_int16 yydefgoto[] =
2736 {
2737 -1, 4, 5, 104, 105, 106, 811, 896, 897, 898,
2738 899, 111, 414, 415, 900, 901, 740, 114, 115, 902,
2739 117, 903, 119, 904, 699, 210, 905, 122, 906, 705,
2740 558, 907, 387, 908, 397, 240, 409, 241, 909, 910,
2741 911, 912, 545, 130, 880, 760, 858, 131, 755, 864,
2742 991, 1056, 42, 607, 132, 133, 134, 135, 913, 929,
2743 767, 1083, 914, 915, 738, 845, 418, 419, 420, 581,
2744 916, 140, 566, 393, 917, 1079, 1159, 1010, 918, 919,
2745 920, 921, 922, 923, 142, 924, 925, 1161, 1164, 926,
2746 1024, 143, 927, 310, 191, 358, 43, 192, 293, 294,
2747 470, 295, 761, 173, 402, 174, 331, 253, 176, 177,
2748 254, 597, 598, 45, 46, 296, 205, 48, 49, 50,
2749 51, 52, 318, 319, 360, 321, 322, 441, 866, 867,
2750 868, 869, 994, 995, 1106, 298, 299, 325, 301, 302,
2751 1074, 1075, 447, 448, 612, 763, 764, 885, 1009, 886,
2752 53, 54, 380, 381, 765, 600, 986, 601, 602, 1165,
2753 875, 1004, 1067, 1068, 184, 55, 367, 412, 56, 187,
2754 57, 269, 732, 834, 303, 304, 708, 201, 368, 693,
2755 193
2756 };
2757
2758 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2759 positive, shift that token. If negative, reduce the rule whose
2760 number is the opposite. If YYTABLE_NINF, syntax error. */
2761 static const yytype_int16 yytable[] =
2762 {
2763 6, 320, 268, 109, 238, 145, 422, 204, 172, 551,
2764 300, 44, 59, 311, 259, 716, 155, 362, 160, 144,
2765 711, 751, 778, 369, 748, 736, 190, 817, 953, 376,
2766 239, 239, 571, 564, 385, 353, 268, 136, 398, 860,
2767 137, 684, 47, 47, 691, 196, 794, 180, 795, 1132,
2768 196, 138, 660, 1054, 691, 327, 431, 1098, 455, 660,
2769 365, 107, 1063, -296, 411, 8, 998, 374, 1086, 1136,
2770 60, 202, 108, 175, 433, 8, 202, 211, 110, 260,
2771 112, 62, 47, 208, 490, 113, 377, 378, 116, 118,
2772 405, 863, 214, 215, 365, 120, 121, 27, 28, 29,
2773 72, -256, 47, 256, 605, 379, 123, 8, 124, 61,
2774 125, 775, 126, 583, 202, 127, 154, 128, 129, 1170,
2775 161, 248, 181, 139, 197, -296, 1109, 661, 247, 197,
2776 701, 8, 196, 8, 744, 340, 1020, 343, 141, 1117,
2777 1133, 1103, -566, 155, 539, 1099, 1027, 491, 1100, 999,
2778 8, 36, 37, 170, 305, 154, 1135, 198, 311, 818,
2779 365, 36, 37, 1062, 292, 8, 438, 257, 371, 702,
2780 162, 261, 703, 229, 180, 1137, 180, 8, 388, 311,
2781 270, 389, 806, 873, 170, 688, 993, 165, 8, 952,
2782 1146, 968, 359, 36, 37, 297, 974, 146, 776, 722,
2783 366, 777, 400, 47, 1140, 8, 719, -181, 382, 967,
2784 417, 320, 315, 1025, 162, 230, 964, 36, 37, 36,
2785 37, 1155, 163, 971, 1156, 364, 8, 1078, 164, 723,
2786 373, 165, 724, 1163, 306, 8, 36, 37, 975, 406,
2787 704, 410, 413, 38, 338, 38, 423, 167, 178, 167,
2788 166, 36, 37, 149, 47, 1184, 421, 47, 172, 443,
2789 955, 450, 38, 36, 37, 404, 40, 365, 171, -181,
2790 171, 316, 317, 1039, 36, 37, 154, 957, 47, 8,
2791 266, 267, 196, 170, 150, -428, 47, 47, -428, 38,
2792 985, 36, 37, 167, 219, 471, 1120, 180, 164, 220,
2793 38, 8, 168, 394, 40, 169, 520, 577, 446, 523,
2794 170, 691, 36, 37, 171, 391, 371, 573, -428, 252,
2795 166, 36, 37, 175, 163, 300, 392, 563, 747, 614,
2796 30, 31, -611, 549, 497, 499, 239, 221, 504, 151,
2797 422, 266, 354, 239, 153, 154, 8, 38, 47, 33,
2798 34, 40, 154, 689, 30, 31, 147, 653, 685, 365,
2799 196, 8, 446, 312, 196, 36, 37, 542, 152, 47,
2800 222, 337, 180, 33, 34, 148, 1172, 593, 594, 709,
2801 850, 246, 47, 734, 8, 47, 185, 36, 37, 225,
2802 223, 38, 154, 6, 624, 167, 852, 832, 47, 589,
2803 686, 372, 434, 648, 250, 977, 8, 251, 1043, 609,
2804 459, 186, 170, 38, 405, 1053, 171, 40, 460, 342,
2805 582, 162, 833, 316, 317, 341, 538, 876, 1088, 163,
2806 616, 158, 36, 37, 546, 653, 403, 8, 165, 604,
2807 178, 608, 342, 328, 344, 604, 547, 36, 37, 450,
2808 428, 346, 497, 499, 504, 439, 595, 445, 38, 596,
2809 165, 345, 40, 316, 317, 27, 28, 29, 877, 878,
2810 36, 37, 879, 38, 328, 47, 657, 40, 434, 292,
2811 516, 663, 329, 617, 159, 47, 426, 550, 701, 427,
2812 196, 165, 36, 37, 170, 342, 38, 517, 178, 572,
2813 167, 1096, 194, 239, 342, 785, 188, 1001, 495, 168,
2814 297, 8, 169, 599, 862, 695, 342, 170, 38, 599,
2815 863, 171, 40, 36, 37, 757, 1115, 826, 758, 512,
2816 703, 347, 1116, 655, 348, 30, 31, 727, 827, 519,
2817 556, 557, 359, 330, 595, 6, 235, 596, 196, 38,
2818 189, 683, 47, 40, 33, 34, 8, 47, 873, 434,
2819 649, 195, 109, 406, 145, 989, 6, 145, 990, 713,
2820 154, 307, 428, 410, 330, 200, 342, 207, 144, 756,
2821 654, 721, 47, -580, -580, 172, 209, 735, 165, 404,
2822 421, 47, 785, 432, 593, 594, 136, 36, 37, 137,
2823 47, 534, 27, 28, 29, 434, 650, 575, 576, -580,
2824 138, 180, 766, 47, 1174, 950, 951, 1175, 47, 212,
2825 107, 47, 342, 729, 180, 1176, 471, 730, 1173, 8,
2826 213, 108, 196, 586, 1180, 1181, 1182, 110, 709, 112,
2827 516, 788, 36, 37, 113, 428, 217, 116, 118, 1177,
2828 175, 1188, 1178, 216, 120, 121, 824, 517, 741, 623,
2829 1179, 516, 941, 1070, 218, 123, 1071, 124, 38, 125,
2830 1110, 126, 40, 1111, 127, 228, 128, 129, 517, 231,
2831 242, 535, 139, 359, 536, 698, 109, 196, 145, 232,
2832 829, 300, 233, 330, 243, 234, 774, 141, 1046, 815,
2833 816, 1047, 144, 652, 196, 245, 604, 178, 262, 320,
2834 263, 853, 264, 352, 604, 36, 37, 109, 591, 145,
2835 136, 538, 314, 137, 356, 370, 592, 593, 594, 357,
2836 930, 316, 317, 144, 138, 538, 965, 422, 145, 582,
2837 6, 599, 604, 599, 107, 1017, 395, 160, 27, 28,
2838 29, 136, 848, 706, 137, 108, 865, 714, 870, 604,
2839 403, 110, 239, 112, 178, 138, 47, 928, 113, 180,
2840 842, 116, 118, 843, 365, 107, 401, 954, 120, 121,
2841 599, 652, 742, 980, 844, 178, 108, 47, 599, 123,
2842 407, 124, 110, 125, 112, 126, 408, 259, 127, 113,
2843 128, 129, 116, 118, 438, 8, 139, 451, 196, 120,
2844 121, 928, 452, 453, 1187, 456, 599, 457, 468, 604,
2845 123, 141, 124, 337, 125, 178, 126, 988, 469, 127,
2846 472, 128, 129, 599, 492, 305, 1000, 139, 500, 1066,
2847 1, 2, 3, 375, 501, 292, 507, 774, 109, 506,
2848 145, 784, 141, 47, 511, 178, 508, 514, 987, 518,
2849 8, 170, 980, 865, 144, 1080, 526, 247, 487, 488,
2850 489, 533, 1030, 540, 1005, 261, 297, 882, 883, 884,
2851 543, 766, 136, 548, 599, 137, 485, 486, 487, 488,
2852 489, 36, 37, 599, 145, 8, 138, 249, 555, 552,
2853 405, 554, 560, 47, 599, 163, 107, 316, 317, 819,
2854 559, 1049, 47, 1036, 1051, 561, 562, 108, 567, 928,
2855 568, 569, 570, 110, 574, 112, 578, 579, 8, 928,
2856 113, 580, 162, 116, 118, 584, 585, 588, 784, 606,
2857 120, 121, 178, 613, 590, 618, 36, 37, 625, 165,
2858 644, 123, 180, 124, 261, 125, 645, 126, 662, 604,
2859 127, 647, 128, 129, 651, 432, 666, 667, 139, 669,
2860 671, 672, 38, 329, 337, 519, 167, 423, 673, 679,
2861 680, 36, 37, 141, 694, 250, 180, 421, 251, 696,
2862 697, 172, 865, 170, 870, 712, 865, 171, 870, 483,
2863 484, 485, 486, 487, 488, 489, 604, 38, 1076, 766,
2864 928, 167, 959, 1186, 36, 37, 320, 1102, 47, 715,
2865 502, 963, 718, 503, 725, 733, 737, 726, 745, 746,
2866 180, 753, 171, 599, 754, 749, 759, 750, 762, 768,
2867 38, 782, 604, 783, 40, 779, 1122, 787, 791, 406,
2868 808, 603, 797, 798, 809, 604, 175, 611, 799, 800,
2869 865, 604, 870, 1129, 8, 330, 803, 804, 805, 68,
2870 1154, 810, 180, 812, 1006, 404, 814, 821, 830, 928,
2871 599, 831, 836, 837, 604, 72, 1144, 881, 835, 962,
2872 934, 935, 720, 47, 157, 1149, 1150, 1151, 936, 179,
2873 937, 162, 944, -611, 939, 940, 183, 945, 180, 163,
2874 946, 960, 966, 948, 949, 164, 599, 1169, 165, 1076,
2875 982, 976, 47, 180, 983, 80, 81, 82, 997, 599,
2876 84, 1003, 86, 87, 604, 599, 1002, 166, 1011, 47,
2877 224, 227, 8, 324, 326, 604, 1018, -197, 604, 1012,
2878 36, 37, 1013, 1015, 1014, 1032, 1019, 1042, 599, 928,
2879 604, 8, 47, 1033, 1037, -611, 604, 604, 604, 1038,
2880 1055, 47, 47, 47, 255, 439, 38, 445, 816, 432,
2881 167, 1044, 1073, 604, 1045, 1059, -611, 334, 1048, 168,
2882 1064, 1065, 169, 47, 1061, 1081, 206, 170, 371, -254,
2883 1087, 171, -253, 265, 1091, 1092, 163, 1093, 599, -255,
2884 1095, 1085, 1097, 226, 313, 1084, -252, 1105, 1113, 599,
2885 333, 333, 599, 339, 1112, 1114, 1118, 1121, 36, 37,
2886 351, 178, 1126, 1127, 599, 8, 1128, 1130, 1131, 1143,
2887 599, 599, 599, 1134, 1139, 1145, 403, 36, 37, 1141,
2888 178, 1148, 1101, 428, 38, 1152, 255, 599, 40, 1157,
2889 1158, 458, 1160, 461, 462, 463, 464, 465, 466, 467,
2890 1166, 1167, 432, 38, 1168, 390, 1171, 167, 1183, 330,
2891 863, 27, 28, 29, 1084, 1189, 250, 1185, 1190, 251,
2892 690, 179, 841, 728, 170, 332, 336, 509, 171, 424,
2893 1125, 430, 333, 333, 1050, 350, 437, 739, 8, 849,
2894 440, 157, 255, 449, 1016, 846, 847, 156, 813, 361,
2895 522, 36, 37, 525, 361, 361, 820, 973, 780, 859,
2896 752, 361, 182, 383, 384, 626, 361, 992, 1058, 1057,
2897 1142, 1007, 615, 1077, 335, 432, 1153, 38, 1138, 179,
2898 828, 40, 396, 349, 851, 361, 399, 355, 0, 496,
2899 498, 498, 0, 0, 505, 0, 361, 199, 0, 0,
2900 0, 874, 330, 429, 0, 0, 361, 0, 0, 0,
2901 513, 0, 515, 442, 473, 474, 475, 476, 0, 0,
2902 454, 236, 0, 0, 36, 37, 244, 0, 0, 333,
2903 333, 0, 0, 0, 333, 479, 480, 481, 482, 483,
2904 484, 485, 486, 487, 488, 489, 544, 0, 0, 0,
2905 38, 0, 0, 430, 40, 0, 335, 0, 0, 349,
2906 0, 961, 0, 553, 0, 332, 336, 0, 0, 350,
2907 0, 0, 0, 0, 8, 330, 565, 0, 0, 0,
2908 8, 627, 628, 629, 630, 631, 632, 633, 634, 635,
2909 636, 637, 638, 639, 640, 641, 642, 643, 8, 701,
2910 0, 196, 0, 0, 529, 532, 0, 0, 498, 498,
2911 498, 444, 0, 0, 587, 0, 656, 333, 333, 163,
2912 333, 0, 363, 0, 0, 665, 610, 363, 363, 0,
2913 0, 0, 0, 0, 363, 371, 0, 0, 702, 363,
2914 0, 703, 0, 163, 0, 0, 8, 0, 0, 0,
2915 0, 0, 528, 531, 0, 0, 0, 537, 363, 0,
2916 36, 37, 0, 0, 0, 0, 36, 37, 0, 363,
2917 416, 0, 0, 0, 0, 425, 363, 646, 0, 363,
2918 0, 0, 0, 328, 36, 37, 38, 0, 179, 498,
2919 167, 334, 38, 0, 659, 0, 40, 0, 0, 250,
2920 165, 1040, 251, 0, 0, 426, 0, 170, 427, 704,
2921 38, 171, 0, 170, 167, 333, 0, 0, 333, 0,
2922 0, 0, 0, 250, 0, 0, 251, 770, 633, 636,
2923 641, 170, 36, 37, 8, 171, 0, 0, 255, 0,
2924 528, 531, 255, 537, 0, 179, 0, 0, 1072, 0,
2925 332, 336, 350, 0, 0, 27, 28, 29, 38, 529,
2926 532, 0, 40, 0, 0, 0, 179, 255, 333, 350,
2927 0, 162, 333, 0, 0, 0, 0, 0, 0, 163,
2928 27, 28, 29, 330, 1094, 0, 591, 8, 165, 0,
2929 678, 0, 0, 0, 592, 593, 594, 1104, 0, 769,
2930 361, 0, 0, 1108, 0, 0, 179, 0, 0, 0,
2931 0, 361, 0, 0, 0, 0, 0, 658, 0, 0,
2932 36, 37, 0, 0, 371, 0, 1123, 958, 731, 0,
2933 361, 0, 163, 0, 595, 0, 179, 596, 677, 0,
2934 0, 682, 0, 333, 333, 0, 38, 0, 333, 0,
2935 167, 0, 0, 333, 0, 854, 0, 0, 333, 168,
2936 0, 0, 169, 0, 0, 0, 0, 170, 0, 0,
2937 0, 171, 0, 36, 37, 0, 874, 0, 0, 931,
2938 932, 465, 0, 933, 0, 0, 0, 1162, 0, 938,
2939 0, 658, 0, 68, 255, 677, 0, 0, 0, 38,
2940 0, 8, 0, 167, 0, 0, 0, 8, 678, 0,
2941 0, 0, 250, 0, 0, 251, 839, 0, 0, 838,
2942 170, 0, 0, 179, 171, 0, 333, 0, 0, 0,
2943 0, 0, 0, 0, 0, 861, 0, 0, 371, 0,
2944 0, 1041, 0, 0, 371, 0, 163, 1060, 0, 80,
2945 81, 82, 163, 0, 84, 0, 86, 87, 0, 0,
2946 0, 0, 0, 0, 8, 0, 789, 790, 0, 0,
2947 687, 793, 0, 363, 692, 825, 796, 0, 0, 333,
2948 333, 802, 700, 707, 710, 333, 0, 36, 37, 0,
2949 840, 0, 0, 36, 37, 0, 0, 255, 0, 0,
2950 0, 371, 0, 363, 1082, 707, 255, 0, 0, 163,
2951 0, 0, 743, 38, 0, 0, 0, 167, 0, 38,
2952 8, 0, 0, 167, 0, 0, 250, 0, 0, 251,
2953 0, 0, 250, 0, 170, 251, 0, 0, 171, 0,
2954 170, 0, 1028, 1029, 171, 0, 0, 0, 0, 789,
2955 36, 37, 0, 0, 0, 0, 0, 328, 0, 255,
2956 0, 0, 361, 361, 0, 674, 0, 1008, 8, 0,
2957 361, 0, 0, 0, 165, 0, 38, 0, 0, 0,
2958 167, 0, 0, 8, 0, 969, 970, 972, 0, 250,
2959 0, 0, 251, 0, 0, 0, 0, 170, 0, 0,
2960 0, 171, 942, 943, 0, 328, 36, 37, 947, 1026,
2961 0, 0, 0, 527, 0, 0, 0, 0, 0, 0,
2962 1052, 996, 165, 0, 0, 0, 333, 0, 163, 0,
2963 333, 333, 38, 0, 0, 0, 40, 0, 0, 707,
2964 8, 0, 255, 0, 0, 675, 8, 823, 676, 707,
2965 0, 8, 0, 0, 36, 37, 0, 330, 0, 0,
2966 255, 0, 255, 0, 0, 0, 0, 1107, 0, 36,
2967 37, 0, 0, 0, 0, 0, 0, 328, 0, 255,
2968 38, 0, 0, 432, 40, 1069, 0, 0, 432, 0,
2969 0, 346, 0, 1124, 165, 38, 534, 0, 0, 167,
2970 255, 0, 0, 0, 0, 330, 0, 8, 250, 0,
2971 0, 251, 179, 0, 333, 333, 170, 0, 0, 0,
2972 171, 0, 0, 0, 0, 0, 36, 37, 0, 0,
2973 0, 179, 36, 37, 610, 363, 363, 36, 37, 0,
2974 707, 956, 0, 363, 307, 0, 0, 996, 0, 1031,
2975 0, 0, 38, 1034, 1035, 0, 40, 0, 38, 1119,
2976 0, 165, 40, 38, 0, 502, 823, 40, 503, 255,
2977 0, 435, 0, 0, 436, 0, 535, 330, 887, 536,
2978 -611, 64, 0, 330, 0, 65, 66, 67, 330, 0,
2979 0, 0, 0, 36, 37, 1069, 0, 0, 68, -611,
2980 -611, -611, -611, -611, -611, -611, -611, -611, -611, -611,
2981 -611, 0, -611, -611, -611, -611, -611, 0, 0, 38,
2982 888, 70, 0, 40, -611, 0, -611, -611, -611, -611,
2983 -611, 0, 502, 0, 0, 503, 0, 1089, 1090, 72,
2984 73, 74, 75, 889, 77, 78, 79, -611, -611, -611,
2985 890, 891, 892, 0, 80, 893, 82, 0, 83, 84,
2986 85, 86, 87, -611, -611, 0, -611, -611, 88, 0,
2987 8, 0, 92, 196, 94, 95, 96, 97, 98, 99,
2988 275, 276, 277, 278, 279, 280, 281, 282, 707, 0,
2989 100, 0, -611, 0, 0, 101, -611, -611, 0, 271,
2990 0, 894, 196, 272, 0, 8, 0, 273, 274, 275,
2991 276, 277, 278, 279, 280, 281, 282, 895, 9, 10,
2992 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
2993 0, 21, 22, 23, 24, 25, 283, 0, 0, 0,
2994 0, 0, 328, 0, 26, 27, 28, 29, 30, 31,
2995 530, 284, 0, 0, 0, 0, 36, 37, 0, 165,
2996 0, 0, 0, 0, 0, 0, 32, 33, 34, 0,
2997 0, 0, 316, 317, 0, 473, 474, 475, 476, 0,
2998 477, 0, 35, 0, 0, 36, 37, 0, 0, 8,
2999 0, 36, 37, 0, 0, 478, 479, 480, 481, 482,
3000 483, 484, 485, 486, 487, 488, 489, 0, 0, 0,
3001 0, 38, 0, 0, 39, 40, 0, 38, 0, 0,
3002 41, 40, 0, 0, 285, 0, 432, 286, 0, 0,
3003 287, 288, 289, 0, 674, 271, 290, 291, 196, 272,
3004 0, 8, 330, 273, 274, 275, 276, 277, 278, 279,
3005 280, 281, 282, 0, 9, 10, 11, 12, 13, 14,
3006 15, 16, 17, 18, 19, 20, 0, 21, 22, 23,
3007 24, 25, 283, 0, 0, 36, 37, 0, 432, 781,
3008 0, 27, 28, 29, 30, 31, 527, 284, 0, 0,
3009 323, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3010 0, 38, 32, 33, 34, 40, 0, 0, 0, 0,
3011 473, 474, 475, 476, 675, 477, 0, 676, 35, 0,
3012 0, 36, 37, 0, 0, 8, 330, 36, 37, 0,
3013 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
3014 488, 489, 0, 0, 0, 0, 0, 38, 0, 0,
3015 0, 40, 0, 38, 0, 0, 0, 40, 0, 0,
3016 285, 0, 432, 286, 0, 0, 287, 288, 289, 0,
3017 530, 271, 290, 291, 196, 272, 0, 8, 330, 273,
3018 274, 275, 276, 277, 278, 279, 280, 281, 282, 0,
3019 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
3020 19, 20, 0, 21, 22, 23, 24, 25, 283, 0,
3021 0, 36, 37, 0, 432, 0, 0, 27, 28, 29,
3022 30, 31, 681, 284, 0, 0, 521, 0, 0, 0,
3023 0, 0, 0, 0, 0, 0, 0, 38, 32, 33,
3024 34, 40, 0, 0, 0, 473, 474, 475, 476, 0,
3025 0, 0, 0, 0, 35, 0, 0, 36, 37, 0,
3026 0, 8, 330, 36, 37, 478, 479, 480, 481, 482,
3027 483, 484, 485, 486, 487, 488, 489, 0, 0, 0,
3028 0, 0, 0, 38, 0, 0, 0, 40, 0, 38,
3029 0, 0, 0, 40, 0, 0, 285, 0, 432, 286,
3030 0, 0, 287, 288, 289, 0, 801, 271, 290, 291,
3031 196, 272, 0, 619, 330, 273, 274, 275, 276, 277,
3032 278, 279, 280, 281, 282, 0, 9, 10, 11, 12,
3033 13, 14, 15, 16, 17, 18, 19, 20, 0, 21,
3034 22, 23, 24, 25, 283, 0, 0, 36, 37, 0,
3035 0, 0, 0, 27, 28, 29, 30, 31, 196, 284,
3036 0, 0, 524, 0, 0, 275, 276, 277, 278, 279,
3037 280, 281, 282, 38, 32, 33, 34, 40, 0, 473,
3038 474, 475, 476, 0, 477, 0, 473, 474, 475, 476,
3039 35, 0, 0, 36, 37, 0, 0, 0, 330, 478,
3040 620, 480, 481, 621, 483, 484, 485, 486, 622, 488,
3041 489, 483, 484, 485, 486, 487, 488, 489, 0, 38,
3042 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
3043 0, 0, 285, 0, 0, 286, 0, 0, 287, 288,
3044 289, 0, 0, 271, 290, 291, 196, 272, 984, 0,
3045 0, 273, 274, 275, 276, 277, 278, 279, 280, 281,
3046 282, 0, 9, 10, 11, 12, 13, 14, 15, 16,
3047 17, 18, 19, 20, 0, 21, 22, 23, 24, 25,
3048 283, 0, 0, 0, 0, 0, 0, 0, 0, 27,
3049 28, 29, 30, 31, 0, 284, 0, 0, 664, 0,
3050 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3051 32, 33, 34, 0, 473, 474, 475, 476, 0, 477,
3052 0, 0, 473, 474, 475, 476, 35, 0, 0, 36,
3053 37, 0, 0, 0, 478, 479, 480, 481, 482, 483,
3054 484, 485, 486, 487, 488, 489, 482, 483, 484, 485,
3055 486, 487, 488, 489, 0, 38, 0, 0, 0, 40,
3056 0, 0, 0, 0, 0, 0, 0, 0, 285, 0,
3057 0, 286, 0, 0, 287, 288, 289, 0, 0, 271,
3058 290, 291, 196, 272, 0, 1147, 0, 273, 274, 275,
3059 276, 277, 278, 279, 280, 281, 282, 0, 9, 10,
3060 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
3061 0, 21, 22, 23, 24, 25, 283, 771, 0, 0,
3062 0, 0, 0, 0, 0, 27, 28, 29, 30, 31,
3063 0, 284, 0, 0, 0, 0, 0, 0, 0, 0,
3064 0, 0, 0, 0, 0, 0, 32, 33, 34, 473,
3065 474, 475, 476, 0, 477, 0, 0, 0, 473, 474,
3066 475, 476, 35, 0, 0, 36, 37, 0, 0, 478,
3067 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
3068 489, 481, 482, 483, 484, 485, 486, 487, 488, 489,
3069 0, 38, 0, 0, 0, 40, 0, 0, 0, 0,
3070 0, 0, 0, 0, 285, 0, 0, 286, 0, 0,
3071 287, 288, 289, 0, 0, 271, 290, 291, 196, 272,
3072 0, 0, 0, 273, 274, 275, 276, 277, 278, 279,
3073 280, 281, 282, 0, 9, 10, 11, 12, 13, 14,
3074 15, 16, 17, 18, 19, 20, 871, 21, 22, 23,
3075 24, 25, 283, 772, 0, 27, 28, 29, 0, 0,
3076 872, 27, 28, 29, 30, 31, 0, 284, 0, 0,
3077 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3078 0, 0, 32, 33, 34, 0, 591, 473, 474, 475,
3079 476, 0, 0, 0, 592, 593, 594, 0, 35, 0,
3080 0, 36, 37, 0, 0, 0, 0, 0, 0, 480,
3081 481, 482, 483, 484, 485, 486, 487, 488, 489, 0,
3082 0, 0, 0, 0, 0, 0, 0, 38, 0, 0,
3083 0, 40, 0, 0, 595, 0, 0, 596, 0, 0,
3084 285, 0, 0, 286, 0, 0, 287, 288, 289, 0,
3085 0, 271, 290, 291, 196, 272, 0, 0, 0, 273,
3086 274, 275, 276, 277, 278, 279, 280, 281, 282, 0,
3087 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
3088 19, 20, 0, 21, 22, 23, 24, 25, 283, 0,
3089 0, 0, 0, 0, 0, 0, 0, 27, 28, 29,
3090 30, 31, 0, 284, 0, 0, 0, 0, 0, 0,
3091 0, 0, 0, 0, 473, 474, 0, 0, 32, 33,
3092 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3093 0, 0, 0, 0, 35, 0, 0, 36, 37, 483,
3094 484, 485, 486, 487, 488, 489, 0, 0, 0, 0,
3095 0, 0, 0, 0, 0, 9, 10, 11, 12, 13,
3096 14, 15, 16, 38, 18, 0, 20, 40, 0, 22,
3097 23, 24, 25, 0, 0, 0, 285, 0, 0, 286,
3098 0, 0, 287, 288, 289, 0, 0, 271, 290, 291,
3099 196, 272, 0, 0, 0, 273, 274, 275, 276, 277,
3100 278, 279, 280, 281, 282, 0, 9, 10, 11, 12,
3101 13, 14, 15, 16, 17, 18, 19, 20, 0, 21,
3102 22, 23, 24, 25, 283, 0, 0, 0, 0, 0,
3103 0, 0, 0, 27, 28, 29, 30, 31, 0, 284,
3104 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3105 0, 0, 0, 0, 32, 33, 34, 0, 0, 0,
3106 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,
3107 35, 0, 0, 36, 37, 67, 0, 0, 0, 0,
3108 0, 0, 0, 0, 0, 0, 68, 0, 0, 0,
3109 0, 0, 0, 0, 0, 0, 0, 0, 0, 38,
3110 0, 0, 0, 40, 0, 0, 0, 0, 888, 70,
3111 0, 0, 0, 0, 0, 0, 0, 0, 287, 288,
3112 773, 0, 0, 0, 290, 291, 0, 72, 73, 74,
3113 75, 0, 77, 78, 79, 0, 0, 0, 890, 891,
3114 892, 0, 80, 893, 82, 0, 83, 84, 85, 86,
3115 87, 0, 0, 0, 0, 0, 88, 0, 0, 0,
3116 92, 0, 94, 95, 96, 97, 98, 99, 0, 0,
3117 0, 0, 0, 0, 8, 0, 0, 0, 100, 0,
3118 0, 0, 0, 101, 0, 0, 0, 0, 0, 0,
3119 0, 0, 0, 9, 10, 11, 12, 13, 14, 15,
3120 16, 17, 18, 19, 20, 895, 21, 22, 23, 24,
3121 25, 307, 0, 0, 0, 0, 0, 0, 0, 26,
3122 27, 28, 29, 30, 31, 0, 0, 0, 165, 0,
3123 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3124 0, 32, 33, 34, 0, 0, 0, 0, 0, 0,
3125 0, 0, 0, 0, 0, 0, 0, 35, 0, 0,
3126 36, 37, 0, 0, 0, 0, 0, 0, 0, 0,
3127 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3128 0, 0, 0, 0, 0, 0, 38, 0, 0, 39,
3129 40, 8, 0, 0, 0, 41, 0, 0, 0, 308,
3130 0, 0, 309, 0, 0, 0, 0, 170, 0, 0,
3131 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
3132 19, 20, 0, 21, 22, 23, 24, 25, 307, 0,
3133 0, 0, 0, 0, 0, 0, 26, 27, 28, 29,
3134 30, 31, 0, 0, 0, 165, 0, 0, 0, 0,
3135 0, 0, 0, 0, 0, 0, 0, 0, 32, 33,
3136 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3137 0, 0, 0, 0, 35, 0, 0, 36, 37, 0,
3138 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3140 0, 0, 0, 38, 0, 0, 39, 40, 8, 0,
3141 510, 0, 41, 0, 0, 0, 493, 0, 0, 494,
3142 0, 0, 0, 0, 170, 0, 0, 9, 10, 11,
3143 12, 13, 14, 15, 16, 17, 18, 19, 20, 0,
3144 21, 22, 23, 24, 25, 0, 0, 0, 0, 0,
3145 0, 0, 0, 26, 27, 28, 29, 30, 31, 473,
3146 474, 475, 476, 0, 477, 0, 0, 0, 0, 0,
3147 0, 0, 0, 0, 0, 32, 33, 34, 8, 478,
3148 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
3149 489, 35, 0, 0, 36, 37, 0, 9, 10, 11,
3150 12, 13, 14, 15, 16, 17, 18, 19, 20, 0,
3151 21, 22, 23, 24, 25, 0, 0, 0, 0, 0,
3152 38, 0, 0, 39, 40, 0, 0, 30, 31, 41,
3153 0, 0, 0, 426, 0, 0, 427, 0, 0, 0,
3154 0, 170, 0, 0, 0, 32, 33, 34, 0, 0,
3155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3156 0, 35, 0, 0, 36, 37, 0, 0, 0, 0,
3157 0, 0, 0, 0, 0, 0, 0, -2, 63, 0,
3158 -611, 64, 0, 0, 0, 65, 66, 67, 0, 0,
3159 38, 0, 0, 0, 40, 0, 0, 0, 68, -611,
3160 -611, -611, -611, -611, -611, -611, -611, -611, -611, -611,
3161 -611, 170, -611, -611, -611, -611, -611, 0, 0, 0,
3162 69, 70, 0, 0, 0, 0, -611, -611, -611, -611,
3163 -611, 0, 0, 71, 0, 0, 0, 0, 0, 72,
3164 73, 74, 75, 76, 77, 78, 79, -611, -611, -611,
3165 0, 0, 0, 0, 80, 81, 82, 0, 83, 84,
3166 85, 86, 87, -611, -611, 0, -611, -611, 88, 89,
3167 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
3168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3169 100, 63, -611, -611, 64, 101, -611, 0, 65, 66,
3170 67, 102, 103, 0, 0, 0, 0, 0, 0, 0,
3171 0, 68, -611, -611, -611, -611, -611, -611, -611, -611,
3172 -611, -611, -611, -611, 0, -611, -611, -611, -611, -611,
3173 0, 0, 0, 69, 70, 0, 0, 717, 0, -611,
3174 -611, -611, -611, -611, 0, 0, 71, 0, 0, 0,
3175 0, 0, 72, 73, 74, 75, 76, 77, 78, 79,
3176 -611, -611, -611, 0, 0, 0, 0, 80, 81, 82,
3177 0, 83, 84, 85, 86, 87, -611, -611, 0, -611,
3178 -611, 88, 89, 90, 91, 92, 93, 94, 95, 96,
3179 97, 98, 99, 0, 0, 0, 0, 0, 0, 0,
3180 0, 0, 0, 100, 63, -611, -611, 64, 101, -611,
3181 0, 65, 66, 67, 102, 103, 0, 0, 0, 0,
3182 0, 0, 0, 0, 68, -611, -611, -611, -611, -611,
3183 -611, -611, -611, -611, -611, -611, -611, 0, -611, -611,
3184 -611, -611, -611, 0, 0, 0, 69, 70, 0, 0,
3185 807, 0, -611, -611, -611, -611, -611, 0, 0, 71,
3186 0, 0, 0, 0, 0, 72, 73, 74, 75, 76,
3187 77, 78, 79, -611, -611, -611, 0, 0, 0, 0,
3188 80, 81, 82, 0, 83, 84, 85, 86, 87, -611,
3189 -611, 0, -611, -611, 88, 89, 90, 91, 92, 93,
3190 94, 95, 96, 97, 98, 99, 0, 0, 0, 0,
3191 0, 0, 0, 0, 0, 0, 100, 63, -611, -611,
3192 64, 101, -611, 0, 65, 66, 67, 102, 103, 0,
3193 0, 0, 0, 0, 0, 0, 0, 68, -611, -611,
3194 -611, -611, -611, -611, -611, -611, -611, -611, -611, -611,
3195 0, -611, -611, -611, -611, -611, 0, 0, 0, 69,
3196 70, 0, 0, 822, 0, -611, -611, -611, -611, -611,
3197 0, 0, 71, 0, 0, 0, 0, 0, 72, 73,
3198 74, 75, 76, 77, 78, 79, -611, -611, -611, 0,
3199 0, 0, 0, 80, 81, 82, 0, 83, 84, 85,
3200 86, 87, -611, -611, 0, -611, -611, 88, 89, 90,
3201 91, 92, 93, 94, 95, 96, 97, 98, 99, 0,
3202 0, 0, 0, 0, 0, 0, 0, 0, 0, 100,
3203 63, -611, -611, 64, 101, -611, 0, 65, 66, 67,
3204 102, 103, 0, 0, 0, 0, 0, 0, 0, 0,
3205 68, -611, -611, -611, -611, -611, -611, -611, -611, -611,
3206 -611, -611, -611, 0, -611, -611, -611, -611, -611, 0,
3207 0, 0, 69, 70, 0, 0, 0, 0, -611, -611,
3208 -611, -611, -611, 0, 0, 71, 0, 0, 0, 981,
3209 0, 72, 73, 74, 75, 76, 77, 78, 79, -611,
3210 -611, -611, 0, 0, 0, 0, 80, 81, 82, 0,
3211 83, 84, 85, 86, 87, -611, -611, 0, -611, -611,
3212 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
3213 98, 99, 0, 0, 7, 0, 8, 0, 668, 0,
3214 0, 0, 100, 0, -611, 0, 0, 101, -611, 0,
3215 0, 0, 0, 102, 103, 9, 10, 11, 12, 13,
3216 14, 15, 16, 17, 18, 19, 20, 0, 21, 22,
3217 23, 24, 25, 0, 0, 0, 0, 0, 0, 0,
3218 0, 26, 27, 28, 29, 30, 31, 473, 474, 475,
3219 476, 0, 477, 0, 0, 0, 0, 0, 0, 0,
3220 0, 0, 0, 32, 33, 34, 0, 478, 479, 480,
3221 481, 482, 483, 484, 485, 486, 487, 488, 489, 35,
3222 0, 0, 36, 37, 0, 0, 0, 0, 0, 0,
3223 0, 0, 0, 0, 0, 0, 0, 58, 0, 8,
3224 0, 0, 0, 0, 0, 0, 0, 0, 38, 0,
3225 0, 39, 40, 0, 0, 0, 0, 41, 9, 10,
3226 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
3227 0, 21, 22, 23, 24, 25, 0, 0, 0, 0,
3228 0, 0, 0, 0, 26, 27, 28, 29, 30, 31,
3229 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3230 0, 0, 0, 0, 0, 0, 32, 33, 34, 0,
3231 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,
3232 0, 0, 35, 0, 0, 36, 37, 0, 0, 0,
3233 9, 10, 11, 12, 13, 14, 15, 16, 855, 18,
3234 856, 20, 8, 857, 22, 23, 24, 25, 0, 0,
3235 0, 38, 0, 0, 39, 40, 0, 0, 0, 0,
3236 41, 9, 10, 11, 12, 13, 14, 15, 16, 17,
3237 18, 19, 20, 0, 21, 22, 23, 24, 25, 0,
3238 0, 0, 0, 0, 0, 0, 0, 26, 27, 28,
3239 29, 30, 31, 0, 35, 0, 0, 36, 37, 0,
3240 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
3241 33, 34, 0, 0, 0, 0, 0, 0, 0, 0,
3242 0, 0, 0, 38, 0, 35, 0, 40, 36, 37,
3243 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3244 0, 0, 0, 0, 0, 0, 8, 0, 670, 0,
3245 0, 0, 0, 0, 38, 0, 386, 39, 40, 0,
3246 0, 0, 0, 41, 541, 9, 10, 11, 12, 13,
3247 14, 15, 16, 17, 18, 19, 20, 0, 21, 22,
3248 23, 24, 25, 0, 0, 0, 0, 0, 0, 0,
3249 0, 26, 27, 28, 29, 30, 31, 473, 474, 475,
3250 476, 0, 477, 0, 0, 0, 0, 0, 0, 0,
3251 0, 0, 0, 32, 33, 34, 0, 478, 479, 480,
3252 481, 482, 483, 484, 485, 486, 487, 488, 489, 35,
3253 0, 0, 36, 37, 0, 0, 0, 0, 0, 0,
3254 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
3255 0, 786, 0, 0, 0, 0, 0, 0, 38, 0,
3256 0, 39, 40, 0, 0, 0, 0, 41, 9, 10,
3257 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
3258 0, 21, 22, 23, 24, 25, 0, 0, 0, 0,
3259 0, 0, 0, 0, 26, 27, 28, 29, 30, 31,
3260 473, 474, 475, 476, 0, 477, 0, 0, 0, 0,
3261 0, 0, 0, 0, 0, 0, 32, 33, 34, 0,
3262 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
3263 488, 489, 35, 0, 0, 36, 37, 0, 0, 0,
3264 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3265 203, 0, 8, 0, 0, 0, 0, 0, 0, 0,
3266 0, 38, 0, 0, 39, 40, 0, 0, 0, 0,
3267 41, 9, 10, 11, 12, 13, 14, 15, 16, 17,
3268 18, 19, 20, 0, 21, 22, 23, 24, 25, 0,
3269 0, 0, 0, 0, 0, 0, 0, 0, 27, 28,
3270 29, 30, 31, 0, 0, 0, 0, 0, 0, 0,
3271 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
3272 33, 34, 0, 8, 0, 0, 0, 0, 0, 0,
3273 0, 0, 0, 0, 0, 35, 0, 0, 36, 37,
3274 0, 0, 9, 10, 11, 12, 13, 14, 15, 16,
3275 17, 18, 19, 20, 0, 21, 22, 23, 24, 25,
3276 0, 0, 0, 0, 38, 0, 0, 0, 40, 27,
3277 28, 29, 30, 31, 0, 0, 0, 0, 0, 0,
3278 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3279 32, 33, 34, 0, 0, 8, 0, 0, 0, 0,
3280 0, 0, 0, 0, 0, 0, 35, 978, 0, 36,
3281 37, 0, 0, 0, 9, 10, 11, 12, 13, 14,
3282 15, 16, 1021, 18, 1022, 20, 0, 1023, 22, 23,
3283 24, 25, 0, 0, 0, 38, 0, 0, 0, 40,
3284 979, 27, 28, 29, 30, 31, 0, 0, 0, 0,
3285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3286 0, 0, 32, 33, 34, 0, 0, 0, 8, 0,
3287 0, 0, 0, 0, 0, 0, 0, 0, 35, 258,
3288 0, 36, 37, 0, 0, 0, 0, 9, 10, 11,
3289 12, 13, 14, 15, 16, 17, 18, 19, 20, 0,
3290 21, 22, 23, 24, 25, 0, 0, 38, 0, 0,
3291 0, 40, 979, 26, 27, 28, 29, 30, 31, 0,
3292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3293 0, 0, 0, 0, 0, 32, 33, 34, 0, 8,
3294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3295 0, 35, 0, 0, 36, 37, 0, 0, 9, 10,
3296 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
3297 0, 21, 22, 23, 24, 25, 237, 0, 0, 0,
3298 38, 0, 0, 39, 40, 27, 28, 29, 30, 31,
3299 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3300 0, 0, 0, 0, 0, 0, 32, 33, 34, 0,
3301 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3302 0, 0, 35, 0, 0, 36, 37, 0, 0, 9,
3303 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
3304 20, 0, 21, 22, 23, 24, 25, 0, 0, 0,
3305 0, 38, 0, 0, 0, 40, 27, 28, 29, 30,
3306 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3307 0, 0, 0, 0, 0, 0, 0, 32, 33, 34,
3308 0, 8, 0, 792, 0, 0, 0, 0, 0, 0,
3309 0, 0, 0, 35, 258, 0, 36, 37, 0, 0,
3310 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
3311 19, 20, 0, 21, 22, 23, 24, 25, 0, 0,
3312 0, 0, 38, 0, 0, 0, 40, 27, 28, 29,
3313 30, 31, 473, 474, 475, 476, 0, 477, 0, 0,
3314 0, 0, 0, 0, 0, 0, 0, 0, 32, 33,
3315 34, 8, 478, 479, 480, 481, 482, 483, 484, 485,
3316 486, 487, 488, 489, 35, 0, 0, 36, 37, 0,
3317 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
3318 19, 20, 0, 21, 22, 23, 24, 25, 0, 0,
3319 0, 0, 0, 38, 0, 0, 0, 40, 0, 0,
3320 30, 31, 0, 0, 0, 0, 0, 0, 0, 0,
3321 0, 0, 0, 0, 0, 0, 0, 0, 32, 33,
3322 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3323 0, 0, 0, 0, 35, 0, 0, 36, 37, 0,
3324 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3325 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3326 0, 0, 0, 38, 0, 0, 0, 40
3327 };
3328
3329 static const yytype_int16 yycheck[] =
3330 {
3331 0, 164, 152, 5, 95, 5, 246, 72, 47, 374,
3332 154, 1, 2, 162, 144, 563, 40, 195, 45, 5,
3333 557, 597, 624, 201, 592, 578, 61, 711, 811, 207,
3334 95, 96, 401, 393, 212, 185, 186, 5, 231, 753,
3335 5, 542, 1, 2, 547, 6, 667, 47, 669, 40,
3336 6, 5, 41, 986, 557, 3, 249, 40, 269, 41,
3337 6, 5, 998, 42, 242, 3, 42, 54, 43, 1104,
3338 1, 71, 5, 47, 252, 3, 76, 77, 5, 144,
3339 5, 0, 41, 76, 48, 5, 52, 53, 5, 5,
3340 239, 46, 84, 85, 6, 5, 5, 49, 50, 51,
3341 62, 76, 61, 21, 54, 71, 5, 3, 5, 40,
3342 5, 41, 5, 59, 114, 5, 103, 5, 5, 1154,
3343 46, 114, 48, 5, 85, 104, 1062, 116, 101, 85,
3344 4, 3, 6, 3, 116, 174, 919, 176, 5, 1072,
3345 131, 1054, 54, 167, 355, 128, 929, 111, 131, 125,
3346 3, 89, 90, 136, 154, 103, 111, 118, 307, 712,
3347 6, 89, 90, 125, 154, 3, 116, 85, 40, 43,
3348 40, 144, 46, 4, 174, 1108, 176, 3, 213, 328,
3349 153, 216, 683, 759, 136, 545, 124, 57, 3, 810,
3350 1123, 119, 192, 89, 90, 154, 4, 48, 128, 568,
3351 46, 131, 237, 162, 1117, 3, 566, 42, 208, 830,
3352 245, 374, 46, 927, 40, 46, 43, 89, 90, 89,
3353 90, 1136, 48, 119, 1137, 198, 3, 1010, 54, 43,
3354 204, 57, 46, 1146, 160, 3, 89, 90, 46, 239,
3355 114, 241, 242, 115, 170, 115, 246, 119, 47, 119,
3356 76, 89, 90, 48, 213, 1170, 246, 216, 297, 259,
3357 813, 261, 115, 89, 90, 239, 119, 6, 140, 104,
3358 140, 105, 106, 957, 89, 90, 103, 814, 237, 3,
3359 118, 119, 6, 136, 48, 43, 245, 246, 46, 115,
3360 858, 89, 90, 119, 77, 295, 1079, 297, 54, 82,
3361 115, 3, 128, 54, 119, 131, 341, 46, 76, 344,
3362 136, 814, 89, 90, 140, 43, 40, 408, 76, 122,
3363 76, 89, 90, 297, 48, 469, 54, 392, 40, 43,
3364 52, 53, 46, 372, 308, 309, 401, 44, 312, 40,
3365 580, 118, 119, 408, 103, 103, 3, 115, 307, 71,
3366 72, 119, 103, 546, 52, 53, 52, 506, 4, 6,
3367 6, 3, 76, 162, 6, 89, 90, 357, 142, 328,
3368 77, 170, 372, 71, 72, 71, 1159, 89, 90, 557,
3369 740, 103, 341, 576, 3, 344, 117, 89, 90, 46,
3370 92, 115, 103, 393, 459, 119, 43, 117, 357, 434,
3371 46, 204, 40, 41, 128, 103, 3, 131, 961, 444,
3372 40, 142, 136, 115, 563, 983, 140, 119, 48, 57,
3373 420, 40, 142, 105, 106, 40, 352, 1, 1030, 48,
3374 454, 125, 89, 90, 42, 584, 239, 3, 57, 439,
3375 239, 441, 57, 40, 40, 445, 54, 89, 90, 449,
3376 249, 48, 426, 427, 428, 258, 128, 260, 115, 131,
3377 57, 57, 119, 105, 106, 49, 50, 51, 42, 43,
3378 89, 90, 46, 115, 40, 434, 511, 119, 40, 469,
3379 40, 516, 48, 456, 43, 444, 128, 40, 4, 131,
3380 6, 57, 89, 90, 136, 57, 115, 57, 297, 40,
3381 119, 1049, 120, 568, 57, 654, 43, 872, 307, 128,
3382 469, 3, 131, 439, 40, 550, 57, 136, 115, 445,
3383 46, 140, 119, 89, 90, 43, 40, 43, 46, 328,
3384 46, 128, 46, 507, 131, 52, 53, 572, 54, 338,
3385 41, 42, 542, 140, 128, 545, 4, 131, 6, 115,
3386 43, 541, 511, 119, 71, 72, 3, 516, 1134, 40,
3387 41, 40, 564, 563, 564, 40, 566, 567, 43, 559,
3388 103, 40, 371, 573, 140, 40, 57, 40, 564, 606,
3389 506, 567, 541, 116, 117, 624, 40, 577, 57, 563,
3390 580, 550, 741, 40, 89, 90, 564, 89, 90, 564,
3391 559, 48, 49, 50, 51, 40, 41, 41, 42, 142,
3392 564, 611, 612, 572, 43, 808, 809, 46, 577, 40,
3393 564, 580, 57, 115, 624, 54, 626, 119, 1160, 3,
3394 40, 564, 6, 432, 1166, 1167, 1168, 564, 816, 564,
3395 40, 41, 89, 90, 564, 444, 84, 564, 564, 43,
3396 624, 1183, 46, 40, 564, 564, 721, 57, 584, 458,
3397 54, 40, 41, 43, 40, 564, 46, 564, 115, 564,
3398 43, 564, 119, 46, 564, 40, 564, 564, 57, 40,
3399 40, 128, 564, 683, 131, 4, 688, 6, 688, 40,
3400 725, 835, 43, 140, 40, 46, 622, 564, 969, 41,
3401 42, 972, 688, 506, 6, 40, 706, 506, 48, 872,
3402 48, 746, 48, 116, 714, 89, 90, 719, 80, 719,
3403 688, 647, 48, 688, 41, 43, 88, 89, 90, 42,
3404 769, 105, 106, 719, 688, 661, 827, 977, 738, 739,
3405 740, 667, 742, 669, 688, 895, 46, 774, 49, 50,
3406 51, 719, 738, 556, 719, 688, 758, 560, 758, 759,
3407 563, 688, 827, 688, 563, 719, 725, 767, 688, 769,
3408 738, 688, 688, 738, 6, 719, 46, 812, 688, 688,
3409 706, 584, 585, 848, 738, 584, 719, 746, 714, 688,
3410 43, 688, 719, 688, 719, 688, 42, 927, 688, 719,
3411 688, 688, 719, 719, 116, 3, 688, 48, 6, 719,
3412 719, 811, 48, 41, 1179, 104, 742, 111, 104, 819,
3413 719, 688, 719, 622, 719, 624, 719, 862, 42, 719,
3414 40, 719, 719, 759, 7, 835, 871, 719, 41, 1002,
3415 121, 122, 123, 41, 41, 835, 48, 773, 850, 116,
3416 850, 654, 719, 812, 40, 654, 57, 48, 858, 48,
3417 3, 136, 927, 865, 850, 1015, 48, 840, 136, 137,
3418 138, 116, 937, 43, 874, 848, 835, 73, 74, 75,
3419 41, 881, 850, 41, 810, 850, 134, 135, 136, 137,
3420 138, 89, 90, 819, 894, 3, 850, 40, 54, 41,
3421 1049, 41, 41, 862, 830, 48, 850, 105, 106, 712,
3422 42, 976, 871, 952, 979, 41, 43, 850, 41, 919,
3423 41, 41, 41, 850, 41, 850, 41, 104, 3, 929,
3424 850, 42, 40, 850, 850, 116, 41, 43, 741, 76,
3425 850, 850, 741, 46, 116, 3, 89, 90, 48, 57,
3426 3, 850, 952, 850, 927, 850, 3, 850, 48, 959,
3427 850, 116, 850, 850, 116, 40, 48, 41, 850, 41,
3428 48, 48, 115, 48, 773, 774, 119, 977, 48, 48,
3429 48, 89, 90, 850, 43, 128, 986, 977, 131, 43,
3430 46, 1030, 994, 136, 994, 41, 998, 140, 998, 132,
3431 133, 134, 135, 136, 137, 138, 1006, 115, 1008, 1009,
3432 1010, 119, 815, 1176, 89, 90, 1179, 1052, 977, 46,
3433 128, 824, 43, 131, 40, 43, 91, 47, 41, 40,
3434 1030, 111, 140, 959, 57, 90, 41, 89, 78, 46,
3435 115, 41, 1042, 41, 119, 48, 1081, 41, 41, 1049,
3436 42, 439, 48, 48, 42, 1055, 1030, 445, 48, 48,
3437 1062, 1061, 1062, 1098, 3, 140, 48, 48, 48, 21,
3438 1135, 41, 1072, 40, 877, 1049, 54, 43, 41, 1079,
3439 1006, 142, 41, 47, 1084, 62, 1121, 42, 103, 43,
3440 41, 41, 44, 1052, 42, 1130, 1131, 1132, 41, 47,
3441 40, 40, 48, 42, 41, 41, 54, 48, 1108, 48,
3442 48, 41, 41, 48, 48, 54, 1042, 1152, 57, 1119,
3443 43, 54, 1081, 1123, 41, 77, 78, 79, 47, 1055,
3444 82, 76, 84, 85, 1134, 1061, 54, 76, 46, 1098,
3445 88, 89, 3, 165, 166, 1145, 47, 47, 1148, 76,
3446 89, 90, 76, 140, 76, 48, 125, 960, 1084, 1159,
3447 1160, 3, 1121, 48, 47, 104, 1166, 1167, 1168, 41,
3448 41, 1130, 1131, 1132, 122, 978, 115, 980, 42, 40,
3449 119, 43, 48, 1183, 43, 54, 125, 48, 104, 128,
3450 41, 43, 131, 1152, 997, 40, 72, 136, 40, 76,
3451 47, 140, 76, 151, 43, 43, 48, 43, 1134, 76,
3452 43, 76, 104, 89, 162, 1018, 76, 43, 42, 1145,
3453 168, 169, 1148, 171, 43, 48, 48, 40, 89, 90,
3454 178, 1030, 41, 43, 1160, 3, 43, 40, 40, 47,
3455 1166, 1167, 1168, 41, 48, 41, 1049, 89, 90, 48,
3456 1049, 41, 1051, 1052, 115, 40, 204, 1183, 119, 48,
3457 48, 283, 41, 285, 286, 287, 288, 289, 290, 291,
3458 41, 41, 40, 115, 41, 223, 48, 119, 41, 140,
3459 46, 49, 50, 51, 1087, 43, 128, 48, 43, 131,
3460 547, 239, 738, 573, 136, 168, 169, 319, 140, 247,
3461 1087, 249, 250, 251, 977, 178, 254, 580, 3, 739,
3462 258, 259, 260, 261, 894, 738, 738, 41, 706, 195,
3463 342, 89, 90, 345, 200, 201, 714, 835, 626, 753,
3464 599, 207, 52, 209, 210, 469, 212, 865, 994, 993,
3465 1119, 881, 449, 1009, 169, 40, 1134, 115, 1113, 297,
3466 722, 119, 228, 178, 742, 231, 232, 186, -1, 307,
3467 308, 309, -1, -1, 312, -1, 242, 70, -1, -1,
3468 -1, 759, 140, 249, -1, -1, 252, -1, -1, -1,
3469 328, -1, 330, 259, 107, 108, 109, 110, -1, -1,
3470 266, 94, -1, -1, 89, 90, 99, -1, -1, 347,
3471 348, -1, -1, -1, 352, 128, 129, 130, 131, 132,
3472 133, 134, 135, 136, 137, 138, 364, -1, -1, -1,
3473 115, -1, -1, 371, 119, -1, 251, -1, -1, 254,
3474 -1, 819, -1, 381, -1, 308, 309, -1, -1, 312,
3475 -1, -1, -1, -1, 3, 140, 394, -1, -1, -1,
3476 3, 473, 474, 475, 476, 477, 478, 479, 480, 481,
3477 482, 483, 484, 485, 486, 487, 488, 489, 3, 4,
3478 -1, 6, -1, -1, 347, 348, -1, -1, 426, 427,
3479 428, 40, -1, -1, 432, -1, 508, 435, 436, 48,
3480 438, -1, 195, -1, -1, 517, 444, 200, 201, -1,
3481 -1, -1, -1, -1, 207, 40, -1, -1, 43, 212,
3482 -1, 46, -1, 48, -1, -1, 3, -1, -1, -1,
3483 -1, -1, 347, 348, -1, -1, -1, 352, 231, -1,
3484 89, 90, -1, -1, -1, -1, 89, 90, -1, 242,
3485 243, -1, -1, -1, -1, 248, 249, 495, -1, 252,
3486 -1, -1, -1, 40, 89, 90, 115, -1, 506, 507,
3487 119, 48, 115, -1, 512, -1, 119, -1, -1, 128,
3488 57, 959, 131, -1, -1, 128, -1, 136, 131, 114,
3489 115, 140, -1, 136, 119, 533, -1, -1, 536, -1,
3490 -1, -1, -1, 128, -1, -1, 131, 619, 620, 621,
3491 622, 136, 89, 90, 3, 140, -1, -1, 556, -1,
3492 435, 436, 560, 438, -1, 563, -1, -1, 1006, -1,
3493 493, 494, 495, -1, -1, 49, 50, 51, 115, 502,
3494 503, -1, 119, -1, -1, -1, 584, 585, 586, 512,
3495 -1, 40, 590, -1, -1, -1, -1, -1, -1, 48,
3496 49, 50, 51, 140, 1042, -1, 80, 3, 57, -1,
3497 533, -1, -1, -1, 88, 89, 90, 1055, -1, 617,
3498 546, -1, -1, 1061, -1, -1, 624, -1, -1, -1,
3499 -1, 557, -1, -1, -1, -1, -1, 512, -1, -1,
3500 89, 90, -1, -1, 40, -1, 1084, 43, 574, -1,
3501 576, -1, 48, -1, 128, -1, 654, 131, 533, -1,
3502 -1, 536, -1, 661, 662, -1, 115, -1, 666, -1,
3503 119, -1, -1, 671, -1, 747, -1, -1, 676, 128,
3504 -1, -1, 131, -1, -1, -1, -1, 136, -1, -1,
3505 -1, 140, -1, 89, 90, -1, 1134, -1, -1, 771,
3506 772, 773, -1, 775, -1, -1, -1, 1145, -1, 781,
3507 -1, 586, -1, 21, 712, 590, -1, -1, -1, 115,
3508 -1, 3, -1, 119, -1, -1, -1, 3, 651, -1,
3509 -1, -1, 128, -1, -1, 131, 44, -1, -1, 737,
3510 136, -1, -1, 741, 140, -1, 744, -1, -1, -1,
3511 -1, -1, -1, -1, -1, 753, -1, -1, 40, -1,
3512 -1, 43, -1, -1, 40, -1, 48, 43, -1, 77,
3513 78, 79, 48, -1, 82, -1, 84, 85, -1, -1,
3514 -1, -1, -1, -1, 3, -1, 661, 662, -1, -1,
3515 543, 666, -1, 546, 547, 721, 671, -1, -1, 797,
3516 798, 676, 555, 556, 557, 803, -1, 89, 90, -1,
3517 118, -1, -1, 89, 90, -1, -1, 815, -1, -1,
3518 -1, 40, -1, 576, 43, 578, 824, -1, -1, 48,
3519 -1, -1, 585, 115, -1, -1, -1, 119, -1, 115,
3520 3, -1, -1, 119, -1, -1, 128, -1, -1, 131,
3521 -1, -1, 128, -1, 136, 131, -1, -1, 140, -1,
3522 136, -1, 934, 935, 140, -1, -1, -1, -1, 744,
3523 89, 90, -1, -1, -1, -1, -1, 40, -1, 877,
3524 -1, -1, 808, 809, -1, 48, -1, 885, 3, -1,
3525 816, -1, -1, -1, 57, -1, 115, -1, -1, -1,
3526 119, -1, -1, 3, -1, 831, 832, 833, -1, 128,
3527 -1, -1, 131, -1, -1, -1, -1, 136, -1, -1,
3528 -1, 140, 797, 798, -1, 40, 89, 90, 803, 927,
3529 -1, -1, -1, 48, -1, -1, -1, -1, -1, -1,
3530 40, 867, 57, -1, -1, -1, 944, -1, 48, -1,
3531 948, 949, 115, -1, -1, -1, 119, -1, -1, 712,
3532 3, -1, 960, -1, -1, 128, 3, 720, 131, 722,
3533 -1, 3, -1, -1, 89, 90, -1, 140, -1, -1,
3534 978, -1, 980, -1, -1, -1, -1, 1059, -1, 89,
3535 90, -1, -1, -1, -1, -1, -1, 40, -1, 997,
3536 115, -1, -1, 40, 119, 1003, -1, -1, 40, -1,
3537 -1, 48, -1, 1085, 57, 115, 48, -1, -1, 119,
3538 1018, -1, -1, -1, -1, 140, -1, 3, 128, -1,
3539 -1, 131, 1030, -1, 1032, 1033, 136, -1, -1, -1,
3540 140, -1, -1, -1, -1, -1, 89, 90, -1, -1,
3541 -1, 1049, 89, 90, 1052, 808, 809, 89, 90, -1,
3542 813, 814, -1, 816, 40, -1, -1, 993, -1, 944,
3543 -1, -1, 115, 948, 949, -1, 119, -1, 115, 1077,
3544 -1, 57, 119, 115, -1, 128, 839, 119, 131, 1087,
3545 -1, 128, -1, -1, 131, -1, 128, 140, 1, 131,
3546 3, 4, -1, 140, -1, 8, 9, 10, 140, -1,
3547 -1, -1, -1, 89, 90, 1113, -1, -1, 21, 22,
3548 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
3549 33, -1, 35, 36, 37, 38, 39, -1, -1, 115,
3550 43, 44, -1, 119, 47, -1, 49, 50, 51, 52,
3551 53, -1, 128, -1, -1, 131, -1, 1032, 1033, 62,
3552 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
3553 73, 74, 75, -1, 77, 78, 79, -1, 81, 82,
3554 83, 84, 85, 86, 87, -1, 89, 90, 91, -1,
3555 3, -1, 95, 6, 97, 98, 99, 100, 101, 102,
3556 13, 14, 15, 16, 17, 18, 19, 20, 961, -1,
3557 113, -1, 115, -1, -1, 118, 119, 120, -1, 3,
3558 -1, 124, 6, 7, -1, 3, -1, 11, 12, 13,
3559 14, 15, 16, 17, 18, 19, 20, 140, 22, 23,
3560 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3561 -1, 35, 36, 37, 38, 39, 40, -1, -1, -1,
3562 -1, -1, 40, -1, 48, 49, 50, 51, 52, 53,
3563 48, 55, -1, -1, -1, -1, 89, 90, -1, 57,
3564 -1, -1, -1, -1, -1, -1, 70, 71, 72, -1,
3565 -1, -1, 105, 106, -1, 107, 108, 109, 110, -1,
3566 112, -1, 86, -1, -1, 89, 90, -1, -1, 3,
3567 -1, 89, 90, -1, -1, 127, 128, 129, 130, 131,
3568 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
3569 -1, 115, -1, -1, 118, 119, -1, 115, -1, -1,
3570 124, 119, -1, -1, 128, -1, 40, 131, -1, -1,
3571 134, 135, 136, -1, 48, 3, 140, 141, 6, 7,
3572 -1, 3, 140, 11, 12, 13, 14, 15, 16, 17,
3573 18, 19, 20, -1, 22, 23, 24, 25, 26, 27,
3574 28, 29, 30, 31, 32, 33, -1, 35, 36, 37,
3575 38, 39, 40, -1, -1, 89, 90, -1, 40, 76,
3576 -1, 49, 50, 51, 52, 53, 48, 55, -1, -1,
3577 58, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3578 -1, 115, 70, 71, 72, 119, -1, -1, -1, -1,
3579 107, 108, 109, 110, 128, 112, -1, 131, 86, -1,
3580 -1, 89, 90, -1, -1, 3, 140, 89, 90, -1,
3581 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
3582 137, 138, -1, -1, -1, -1, -1, 115, -1, -1,
3583 -1, 119, -1, 115, -1, -1, -1, 119, -1, -1,
3584 128, -1, 40, 131, -1, -1, 134, 135, 136, -1,
3585 48, 3, 140, 141, 6, 7, -1, 3, 140, 11,
3586 12, 13, 14, 15, 16, 17, 18, 19, 20, -1,
3587 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3588 32, 33, -1, 35, 36, 37, 38, 39, 40, -1,
3589 -1, 89, 90, -1, 40, -1, -1, 49, 50, 51,
3590 52, 53, 48, 55, -1, -1, 58, -1, -1, -1,
3591 -1, -1, -1, -1, -1, -1, -1, 115, 70, 71,
3592 72, 119, -1, -1, -1, 107, 108, 109, 110, -1,
3593 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3594 -1, 3, 140, 89, 90, 127, 128, 129, 130, 131,
3595 132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
3596 -1, -1, -1, 115, -1, -1, -1, 119, -1, 115,
3597 -1, -1, -1, 119, -1, -1, 128, -1, 40, 131,
3598 -1, -1, 134, 135, 136, -1, 48, 3, 140, 141,
3599 6, 7, -1, 41, 140, 11, 12, 13, 14, 15,
3600 16, 17, 18, 19, 20, -1, 22, 23, 24, 25,
3601 26, 27, 28, 29, 30, 31, 32, 33, -1, 35,
3602 36, 37, 38, 39, 40, -1, -1, 89, 90, -1,
3603 -1, -1, -1, 49, 50, 51, 52, 53, 6, 55,
3604 -1, -1, 58, -1, -1, 13, 14, 15, 16, 17,
3605 18, 19, 20, 115, 70, 71, 72, 119, -1, 107,
3606 108, 109, 110, -1, 112, -1, 107, 108, 109, 110,
3607 86, -1, -1, 89, 90, -1, -1, -1, 140, 127,
3608 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3609 138, 132, 133, 134, 135, 136, 137, 138, -1, 115,
3610 -1, -1, -1, 119, -1, -1, -1, -1, -1, -1,
3611 -1, -1, 128, -1, -1, 131, -1, -1, 134, 135,
3612 136, -1, -1, 3, 140, 141, 6, 7, 41, -1,
3613 -1, 11, 12, 13, 14, 15, 16, 17, 18, 19,
3614 20, -1, 22, 23, 24, 25, 26, 27, 28, 29,
3615 30, 31, 32, 33, -1, 35, 36, 37, 38, 39,
3616 40, -1, -1, -1, -1, -1, -1, -1, -1, 49,
3617 50, 51, 52, 53, -1, 55, -1, -1, 58, -1,
3618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3619 70, 71, 72, -1, 107, 108, 109, 110, -1, 112,
3620 -1, -1, 107, 108, 109, 110, 86, -1, -1, 89,
3621 90, -1, -1, -1, 127, 128, 129, 130, 131, 132,
3622 133, 134, 135, 136, 137, 138, 131, 132, 133, 134,
3623 135, 136, 137, 138, -1, 115, -1, -1, -1, 119,
3624 -1, -1, -1, -1, -1, -1, -1, -1, 128, -1,
3625 -1, 131, -1, -1, 134, 135, 136, -1, -1, 3,
3626 140, 141, 6, 7, -1, 43, -1, 11, 12, 13,
3627 14, 15, 16, 17, 18, 19, 20, -1, 22, 23,
3628 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3629 -1, 35, 36, 37, 38, 39, 40, 41, -1, -1,
3630 -1, -1, -1, -1, -1, 49, 50, 51, 52, 53,
3631 -1, 55, -1, -1, -1, -1, -1, -1, -1, -1,
3632 -1, -1, -1, -1, -1, -1, 70, 71, 72, 107,
3633 108, 109, 110, -1, 112, -1, -1, -1, 107, 108,
3634 109, 110, 86, -1, -1, 89, 90, -1, -1, 127,
3635 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3636 138, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3637 -1, 115, -1, -1, -1, 119, -1, -1, -1, -1,
3638 -1, -1, -1, -1, 128, -1, -1, 131, -1, -1,
3639 134, 135, 136, -1, -1, 3, 140, 141, 6, 7,
3640 -1, -1, -1, 11, 12, 13, 14, 15, 16, 17,
3641 18, 19, 20, -1, 22, 23, 24, 25, 26, 27,
3642 28, 29, 30, 31, 32, 33, 40, 35, 36, 37,
3643 38, 39, 40, 41, -1, 49, 50, 51, -1, -1,
3644 54, 49, 50, 51, 52, 53, -1, 55, -1, -1,
3645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3646 -1, -1, 70, 71, 72, -1, 80, 107, 108, 109,
3647 110, -1, -1, -1, 88, 89, 90, -1, 86, -1,
3648 -1, 89, 90, -1, -1, -1, -1, -1, -1, 129,
3649 130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3650 -1, -1, -1, -1, -1, -1, -1, 115, -1, -1,
3651 -1, 119, -1, -1, 128, -1, -1, 131, -1, -1,
3652 128, -1, -1, 131, -1, -1, 134, 135, 136, -1,
3653 -1, 3, 140, 141, 6, 7, -1, -1, -1, 11,
3654 12, 13, 14, 15, 16, 17, 18, 19, 20, -1,
3655 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3656 32, 33, -1, 35, 36, 37, 38, 39, 40, -1,
3657 -1, -1, -1, -1, -1, -1, -1, 49, 50, 51,
3658 52, 53, -1, 55, -1, -1, -1, -1, -1, -1,
3659 -1, -1, -1, -1, 107, 108, -1, -1, 70, 71,
3660 72, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3661 -1, -1, -1, -1, 86, -1, -1, 89, 90, 132,
3662 133, 134, 135, 136, 137, 138, -1, -1, -1, -1,
3663 -1, -1, -1, -1, -1, 22, 23, 24, 25, 26,
3664 27, 28, 29, 115, 31, -1, 33, 119, -1, 36,
3665 37, 38, 39, -1, -1, -1, 128, -1, -1, 131,
3666 -1, -1, 134, 135, 136, -1, -1, 3, 140, 141,
3667 6, 7, -1, -1, -1, 11, 12, 13, 14, 15,
3668 16, 17, 18, 19, 20, -1, 22, 23, 24, 25,
3669 26, 27, 28, 29, 30, 31, 32, 33, -1, 35,
3670 36, 37, 38, 39, 40, -1, -1, -1, -1, -1,
3671 -1, -1, -1, 49, 50, 51, 52, 53, -1, 55,
3672 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3673 -1, -1, -1, -1, 70, 71, 72, -1, -1, -1,
3674 -1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
3675 86, -1, -1, 89, 90, 10, -1, -1, -1, -1,
3676 -1, -1, -1, -1, -1, -1, 21, -1, -1, -1,
3677 -1, -1, -1, -1, -1, -1, -1, -1, -1, 115,
3678 -1, -1, -1, 119, -1, -1, -1, -1, 43, 44,
3679 -1, -1, -1, -1, -1, -1, -1, -1, 134, 135,
3680 136, -1, -1, -1, 140, 141, -1, 62, 63, 64,
3681 65, -1, 67, 68, 69, -1, -1, -1, 73, 74,
3682 75, -1, 77, 78, 79, -1, 81, 82, 83, 84,
3683 85, -1, -1, -1, -1, -1, 91, -1, -1, -1,
3684 95, -1, 97, 98, 99, 100, 101, 102, -1, -1,
3685 -1, -1, -1, -1, 3, -1, -1, -1, 113, -1,
3686 -1, -1, -1, 118, -1, -1, -1, -1, -1, -1,
3687 -1, -1, -1, 22, 23, 24, 25, 26, 27, 28,
3688 29, 30, 31, 32, 33, 140, 35, 36, 37, 38,
3689 39, 40, -1, -1, -1, -1, -1, -1, -1, 48,
3690 49, 50, 51, 52, 53, -1, -1, -1, 57, -1,
3691 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3692 -1, 70, 71, 72, -1, -1, -1, -1, -1, -1,
3693 -1, -1, -1, -1, -1, -1, -1, 86, -1, -1,
3694 89, 90, -1, -1, -1, -1, -1, -1, -1, -1,
3695 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3696 -1, -1, -1, -1, -1, -1, 115, -1, -1, 118,
3697 119, 3, -1, -1, -1, 124, -1, -1, -1, 128,
3698 -1, -1, 131, -1, -1, -1, -1, 136, -1, -1,
3699 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3700 32, 33, -1, 35, 36, 37, 38, 39, 40, -1,
3701 -1, -1, -1, -1, -1, -1, 48, 49, 50, 51,
3702 52, 53, -1, -1, -1, 57, -1, -1, -1, -1,
3703 -1, -1, -1, -1, -1, -1, -1, -1, 70, 71,
3704 72, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3705 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3706 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3707 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3708 -1, -1, -1, 115, -1, -1, 118, 119, 3, -1,
3709 58, -1, 124, -1, -1, -1, 128, -1, -1, 131,
3710 -1, -1, -1, -1, 136, -1, -1, 22, 23, 24,
3711 25, 26, 27, 28, 29, 30, 31, 32, 33, -1,
3712 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
3713 -1, -1, -1, 48, 49, 50, 51, 52, 53, 107,
3714 108, 109, 110, -1, 112, -1, -1, -1, -1, -1,
3715 -1, -1, -1, -1, -1, 70, 71, 72, 3, 127,
3716 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3717 138, 86, -1, -1, 89, 90, -1, 22, 23, 24,
3718 25, 26, 27, 28, 29, 30, 31, 32, 33, -1,
3719 35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
3720 115, -1, -1, 118, 119, -1, -1, 52, 53, 124,
3721 -1, -1, -1, 128, -1, -1, 131, -1, -1, -1,
3722 -1, 136, -1, -1, -1, 70, 71, 72, -1, -1,
3723 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3724 -1, 86, -1, -1, 89, 90, -1, -1, -1, -1,
3725 -1, -1, -1, -1, -1, -1, -1, 0, 1, -1,
3726 3, 4, -1, -1, -1, 8, 9, 10, -1, -1,
3727 115, -1, -1, -1, 119, -1, -1, -1, 21, 22,
3728 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
3729 33, 136, 35, 36, 37, 38, 39, -1, -1, -1,
3730 43, 44, -1, -1, -1, -1, 49, 50, 51, 52,
3731 53, -1, -1, 56, -1, -1, -1, -1, -1, 62,
3732 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
3733 -1, -1, -1, -1, 77, 78, 79, -1, 81, 82,
3734 83, 84, 85, 86, 87, -1, 89, 90, 91, 92,
3735 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
3736 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3737 113, 1, 115, 3, 4, 118, 119, -1, 8, 9,
3738 10, 124, 125, -1, -1, -1, -1, -1, -1, -1,
3739 -1, 21, 22, 23, 24, 25, 26, 27, 28, 29,
3740 30, 31, 32, 33, -1, 35, 36, 37, 38, 39,
3741 -1, -1, -1, 43, 44, -1, -1, 47, -1, 49,
3742 50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
3743 -1, -1, 62, 63, 64, 65, 66, 67, 68, 69,
3744 70, 71, 72, -1, -1, -1, -1, 77, 78, 79,
3745 -1, 81, 82, 83, 84, 85, 86, 87, -1, 89,
3746 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
3747 100, 101, 102, -1, -1, -1, -1, -1, -1, -1,
3748 -1, -1, -1, 113, 1, 115, 3, 4, 118, 119,
3749 -1, 8, 9, 10, 124, 125, -1, -1, -1, -1,
3750 -1, -1, -1, -1, 21, 22, 23, 24, 25, 26,
3751 27, 28, 29, 30, 31, 32, 33, -1, 35, 36,
3752 37, 38, 39, -1, -1, -1, 43, 44, -1, -1,
3753 47, -1, 49, 50, 51, 52, 53, -1, -1, 56,
3754 -1, -1, -1, -1, -1, 62, 63, 64, 65, 66,
3755 67, 68, 69, 70, 71, 72, -1, -1, -1, -1,
3756 77, 78, 79, -1, 81, 82, 83, 84, 85, 86,
3757 87, -1, 89, 90, 91, 92, 93, 94, 95, 96,
3758 97, 98, 99, 100, 101, 102, -1, -1, -1, -1,
3759 -1, -1, -1, -1, -1, -1, 113, 1, 115, 3,
3760 4, 118, 119, -1, 8, 9, 10, 124, 125, -1,
3761 -1, -1, -1, -1, -1, -1, -1, 21, 22, 23,
3762 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3763 -1, 35, 36, 37, 38, 39, -1, -1, -1, 43,
3764 44, -1, -1, 47, -1, 49, 50, 51, 52, 53,
3765 -1, -1, 56, -1, -1, -1, -1, -1, 62, 63,
3766 64, 65, 66, 67, 68, 69, 70, 71, 72, -1,
3767 -1, -1, -1, 77, 78, 79, -1, 81, 82, 83,
3768 84, 85, 86, 87, -1, 89, 90, 91, 92, 93,
3769 94, 95, 96, 97, 98, 99, 100, 101, 102, -1,
3770 -1, -1, -1, -1, -1, -1, -1, -1, -1, 113,
3771 1, 115, 3, 4, 118, 119, -1, 8, 9, 10,
3772 124, 125, -1, -1, -1, -1, -1, -1, -1, -1,
3773 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
3774 31, 32, 33, -1, 35, 36, 37, 38, 39, -1,
3775 -1, -1, 43, 44, -1, -1, -1, -1, 49, 50,
3776 51, 52, 53, -1, -1, 56, -1, -1, -1, 60,
3777 -1, 62, 63, 64, 65, 66, 67, 68, 69, 70,
3778 71, 72, -1, -1, -1, -1, 77, 78, 79, -1,
3779 81, 82, 83, 84, 85, 86, 87, -1, 89, 90,
3780 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
3781 101, 102, -1, -1, 1, -1, 3, -1, 58, -1,
3782 -1, -1, 113, -1, 115, -1, -1, 118, 119, -1,
3783 -1, -1, -1, 124, 125, 22, 23, 24, 25, 26,
3784 27, 28, 29, 30, 31, 32, 33, -1, 35, 36,
3785 37, 38, 39, -1, -1, -1, -1, -1, -1, -1,
3786 -1, 48, 49, 50, 51, 52, 53, 107, 108, 109,
3787 110, -1, 112, -1, -1, -1, -1, -1, -1, -1,
3788 -1, -1, -1, 70, 71, 72, -1, 127, 128, 129,
3789 130, 131, 132, 133, 134, 135, 136, 137, 138, 86,
3790 -1, -1, 89, 90, -1, -1, -1, -1, -1, -1,
3791 -1, -1, -1, -1, -1, -1, -1, 1, -1, 3,
3792 -1, -1, -1, -1, -1, -1, -1, -1, 115, -1,
3793 -1, 118, 119, -1, -1, -1, -1, 124, 22, 23,
3794 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3795 -1, 35, 36, 37, 38, 39, -1, -1, -1, -1,
3796 -1, -1, -1, -1, 48, 49, 50, 51, 52, 53,
3797 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3798 -1, -1, -1, -1, -1, -1, 70, 71, 72, -1,
3799 -1, 3, -1, -1, -1, -1, -1, -1, -1, -1,
3800 -1, -1, 86, -1, -1, 89, 90, -1, -1, -1,
3801 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3802 32, 33, 3, 35, 36, 37, 38, 39, -1, -1,
3803 -1, 115, -1, -1, 118, 119, -1, -1, -1, -1,
3804 124, 22, 23, 24, 25, 26, 27, 28, 29, 30,
3805 31, 32, 33, -1, 35, 36, 37, 38, 39, -1,
3806 -1, -1, -1, -1, -1, -1, -1, 48, 49, 50,
3807 51, 52, 53, -1, 86, -1, -1, 89, 90, -1,
3808 -1, -1, -1, -1, -1, -1, -1, -1, -1, 70,
3809 71, 72, -1, -1, -1, -1, -1, -1, -1, -1,
3810 -1, -1, -1, 115, -1, 86, -1, 119, 89, 90,
3811 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3812 -1, -1, -1, -1, -1, -1, 3, -1, 58, -1,
3813 -1, -1, -1, -1, 115, -1, 13, 118, 119, -1,
3814 -1, -1, -1, 124, 125, 22, 23, 24, 25, 26,
3815 27, 28, 29, 30, 31, 32, 33, -1, 35, 36,
3816 37, 38, 39, -1, -1, -1, -1, -1, -1, -1,
3817 -1, 48, 49, 50, 51, 52, 53, 107, 108, 109,
3818 110, -1, 112, -1, -1, -1, -1, -1, -1, -1,
3819 -1, -1, -1, 70, 71, 72, -1, 127, 128, 129,
3820 130, 131, 132, 133, 134, 135, 136, 137, 138, 86,
3821 -1, -1, 89, 90, -1, -1, -1, -1, -1, -1,
3822 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
3823 -1, 58, -1, -1, -1, -1, -1, -1, 115, -1,
3824 -1, 118, 119, -1, -1, -1, -1, 124, 22, 23,
3825 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3826 -1, 35, 36, 37, 38, 39, -1, -1, -1, -1,
3827 -1, -1, -1, -1, 48, 49, 50, 51, 52, 53,
3828 107, 108, 109, 110, -1, 112, -1, -1, -1, -1,
3829 -1, -1, -1, -1, -1, -1, 70, 71, 72, -1,
3830 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
3831 137, 138, 86, -1, -1, 89, 90, -1, -1, -1,
3832 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3833 1, -1, 3, -1, -1, -1, -1, -1, -1, -1,
3834 -1, 115, -1, -1, 118, 119, -1, -1, -1, -1,
3835 124, 22, 23, 24, 25, 26, 27, 28, 29, 30,
3836 31, 32, 33, -1, 35, 36, 37, 38, 39, -1,
3837 -1, -1, -1, -1, -1, -1, -1, -1, 49, 50,
3838 51, 52, 53, -1, -1, -1, -1, -1, -1, -1,
3839 -1, -1, -1, -1, -1, -1, -1, -1, -1, 70,
3840 71, 72, -1, 3, -1, -1, -1, -1, -1, -1,
3841 -1, -1, -1, -1, -1, 86, -1, -1, 89, 90,
3842 -1, -1, 22, 23, 24, 25, 26, 27, 28, 29,
3843 30, 31, 32, 33, -1, 35, 36, 37, 38, 39,
3844 -1, -1, -1, -1, 115, -1, -1, -1, 119, 49,
3845 50, 51, 52, 53, -1, -1, -1, -1, -1, -1,
3846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3847 70, 71, 72, -1, -1, 3, -1, -1, -1, -1,
3848 -1, -1, -1, -1, -1, -1, 86, 87, -1, 89,
3849 90, -1, -1, -1, 22, 23, 24, 25, 26, 27,
3850 28, 29, 30, 31, 32, 33, -1, 35, 36, 37,
3851 38, 39, -1, -1, -1, 115, -1, -1, -1, 119,
3852 120, 49, 50, 51, 52, 53, -1, -1, -1, -1,
3853 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3854 -1, -1, 70, 71, 72, -1, -1, -1, 3, -1,
3855 -1, -1, -1, -1, -1, -1, -1, -1, 86, 87,
3856 -1, 89, 90, -1, -1, -1, -1, 22, 23, 24,
3857 25, 26, 27, 28, 29, 30, 31, 32, 33, -1,
3858 35, 36, 37, 38, 39, -1, -1, 115, -1, -1,
3859 -1, 119, 120, 48, 49, 50, 51, 52, 53, -1,
3860 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3861 -1, -1, -1, -1, -1, 70, 71, 72, -1, 3,
3862 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3863 -1, 86, -1, -1, 89, 90, -1, -1, 22, 23,
3864 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3865 -1, 35, 36, 37, 38, 39, 40, -1, -1, -1,
3866 115, -1, -1, 118, 119, 49, 50, 51, 52, 53,
3867 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3868 -1, -1, -1, -1, -1, -1, 70, 71, 72, -1,
3869 3, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3870 -1, -1, 86, -1, -1, 89, 90, -1, -1, 22,
3871 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
3872 33, -1, 35, 36, 37, 38, 39, -1, -1, -1,
3873 -1, 115, -1, -1, -1, 119, 49, 50, 51, 52,
3874 53, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3875 -1, -1, -1, -1, -1, -1, -1, 70, 71, 72,
3876 -1, 3, -1, 58, -1, -1, -1, -1, -1, -1,
3877 -1, -1, -1, 86, 87, -1, 89, 90, -1, -1,
3878 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3879 32, 33, -1, 35, 36, 37, 38, 39, -1, -1,
3880 -1, -1, 115, -1, -1, -1, 119, 49, 50, 51,
3881 52, 53, 107, 108, 109, 110, -1, 112, -1, -1,
3882 -1, -1, -1, -1, -1, -1, -1, -1, 70, 71,
3883 72, 3, 127, 128, 129, 130, 131, 132, 133, 134,
3884 135, 136, 137, 138, 86, -1, -1, 89, 90, -1,
3885 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3886 32, 33, -1, 35, 36, 37, 38, 39, -1, -1,
3887 -1, -1, -1, 115, -1, -1, -1, 119, -1, -1,
3888 52, 53, -1, -1, -1, -1, -1, -1, -1, -1,
3889 -1, -1, -1, -1, -1, -1, -1, -1, 70, 71,
3890 72, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3891 -1, -1, -1, -1, 86, -1, -1, 89, 90, -1,
3892 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3893 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3894 -1, -1, -1, 115, -1, -1, -1, 119
3895 };
3896
3897 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3898 symbol of state STATE-NUM. */
3899 static const yytype_uint16 yystos[] =
3900 {
3901 0, 121, 122, 123, 144, 145, 323, 1, 3, 22,
3902 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
3903 33, 35, 36, 37, 38, 39, 48, 49, 50, 51,
3904 52, 53, 70, 71, 72, 86, 89, 90, 115, 118,
3905 119, 124, 195, 239, 240, 256, 257, 259, 260, 261,
3906 262, 263, 264, 293, 294, 308, 311, 313, 1, 240,
3907 1, 40, 0, 1, 4, 8, 9, 10, 21, 43,
3908 44, 56, 62, 63, 64, 65, 66, 67, 68, 69,
3909 77, 78, 79, 81, 82, 83, 84, 85, 91, 92,
3910 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
3911 113, 118, 124, 125, 146, 147, 148, 150, 151, 152,
3912 153, 154, 157, 158, 160, 161, 162, 163, 164, 165,
3913 166, 169, 170, 171, 174, 176, 181, 182, 183, 184,
3914 186, 190, 197, 198, 199, 200, 201, 205, 206, 213,
3915 214, 226, 227, 234, 235, 323, 48, 52, 71, 48,
3916 48, 40, 142, 103, 103, 307, 239, 311, 125, 43,
3917 260, 256, 40, 48, 54, 57, 76, 119, 128, 131,
3918 136, 140, 245, 246, 248, 250, 251, 252, 253, 311,
3919 323, 256, 263, 311, 307, 117, 142, 312, 43, 43,
3920 236, 237, 240, 323, 120, 40, 6, 85, 118, 317,
3921 40, 320, 323, 1, 258, 259, 308, 40, 320, 40,
3922 168, 323, 40, 40, 84, 85, 40, 84, 40, 77,
3923 82, 44, 77, 92, 311, 46, 308, 311, 40, 4,
3924 46, 40, 40, 43, 46, 4, 317, 40, 180, 258,
3925 178, 180, 40, 40, 317, 40, 103, 294, 320, 40,
3926 128, 131, 248, 250, 253, 311, 21, 85, 87, 195,
3927 258, 294, 48, 48, 48, 311, 118, 119, 313, 314,
3928 294, 3, 7, 11, 12, 13, 14, 15, 16, 17,
3929 18, 19, 20, 40, 55, 128, 131, 134, 135, 136,
3930 140, 141, 240, 241, 242, 244, 258, 259, 278, 279,
3931 280, 281, 282, 317, 318, 323, 256, 40, 128, 131,
3932 236, 251, 253, 311, 48, 46, 105, 106, 265, 266,
3933 267, 268, 269, 58, 278, 280, 278, 3, 40, 48,
3934 140, 249, 252, 311, 48, 249, 252, 253, 256, 311,
3935 245, 40, 57, 245, 40, 57, 48, 128, 131, 249,
3936 252, 311, 116, 313, 119, 314, 41, 42, 238, 323,
3937 267, 308, 309, 317, 294, 6, 46, 309, 321, 309,
3938 43, 40, 248, 250, 54, 41, 309, 52, 53, 71,
3939 295, 296, 323, 308, 308, 309, 13, 175, 236, 236,
3940 311, 43, 54, 216, 54, 46, 308, 177, 321, 308,
3941 236, 46, 247, 248, 250, 251, 323, 43, 42, 179,
3942 323, 309, 310, 323, 155, 156, 317, 236, 209, 210,
3943 211, 240, 293, 323, 311, 317, 128, 131, 253, 308,
3944 311, 321, 40, 309, 40, 128, 131, 311, 116, 248,
3945 311, 270, 308, 323, 40, 248, 76, 285, 286, 311,
3946 323, 48, 48, 41, 308, 312, 104, 111, 278, 40,
3947 48, 278, 278, 278, 278, 278, 278, 278, 104, 42,
3948 243, 323, 40, 107, 108, 109, 110, 112, 127, 128,
3949 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3950 48, 111, 7, 128, 131, 253, 311, 250, 311, 250,
3951 41, 41, 128, 131, 250, 311, 116, 48, 57, 278,
3952 58, 40, 253, 311, 48, 311, 40, 57, 48, 253,
3953 236, 58, 278, 236, 58, 278, 48, 48, 249, 252,
3954 48, 249, 252, 116, 48, 128, 131, 249, 256, 312,
3955 43, 125, 240, 41, 311, 185, 42, 54, 41, 245,
3956 40, 265, 41, 311, 41, 54, 41, 42, 173, 42,
3957 41, 41, 43, 258, 145, 311, 215, 41, 41, 41,
3958 41, 178, 40, 180, 41, 41, 42, 46, 41, 104,
3959 42, 212, 323, 59, 116, 41, 253, 311, 43, 236,
3960 116, 80, 88, 89, 90, 128, 131, 254, 255, 256,
3961 298, 300, 301, 302, 323, 54, 76, 196, 323, 236,
3962 311, 302, 287, 46, 43, 285, 307, 294, 3, 41,
3963 128, 131, 136, 253, 258, 48, 244, 278, 278, 278,
3964 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
3965 278, 278, 278, 278, 3, 3, 311, 116, 41, 41,
3966 41, 116, 248, 251, 256, 250, 278, 236, 249, 311,
3967 41, 116, 48, 236, 58, 278, 48, 41, 58, 41,
3968 58, 48, 48, 48, 48, 128, 131, 249, 252, 48,
3969 48, 48, 249, 240, 238, 4, 46, 317, 145, 321,
3970 155, 281, 317, 322, 43, 236, 43, 46, 4, 167,
3971 317, 4, 43, 46, 114, 172, 248, 317, 319, 309,
3972 317, 322, 41, 240, 248, 46, 247, 47, 43, 145,
3973 44, 235, 178, 43, 46, 40, 47, 236, 179, 115,
3974 119, 308, 315, 43, 321, 240, 172, 91, 207, 211,
3975 159, 256, 248, 317, 116, 41, 40, 40, 298, 90,
3976 89, 300, 255, 111, 57, 191, 260, 43, 46, 41,
3977 188, 245, 78, 288, 289, 297, 323, 203, 46, 311,
3978 278, 41, 41, 136, 256, 41, 128, 131, 246, 48,
3979 243, 76, 41, 41, 248, 251, 58, 41, 41, 249,
3980 249, 41, 58, 249, 254, 254, 249, 48, 48, 48,
3981 48, 48, 249, 48, 48, 48, 238, 47, 42, 42,
3982 41, 149, 40, 302, 54, 41, 42, 173, 172, 248,
3983 302, 43, 47, 317, 258, 308, 43, 54, 319, 236,
3984 41, 142, 117, 142, 316, 103, 41, 47, 311, 44,
3985 118, 186, 201, 205, 206, 208, 223, 225, 235, 212,
3986 145, 302, 43, 236, 278, 30, 32, 35, 189, 261,
3987 262, 311, 40, 46, 192, 152, 271, 272, 273, 274,
3988 323, 40, 54, 300, 302, 303, 1, 42, 43, 46,
3989 187, 42, 73, 74, 75, 290, 292, 1, 43, 66,
3990 73, 74, 75, 78, 124, 140, 150, 151, 152, 153,
3991 157, 158, 162, 164, 166, 169, 171, 174, 176, 181,
3992 182, 183, 184, 201, 205, 206, 213, 217, 221, 222,
3993 223, 224, 225, 226, 228, 229, 232, 235, 323, 202,
3994 245, 278, 278, 278, 41, 41, 41, 40, 278, 41,
3995 41, 41, 249, 249, 48, 48, 48, 249, 48, 48,
3996 321, 321, 254, 217, 236, 172, 317, 322, 43, 248,
3997 41, 302, 43, 248, 43, 180, 41, 254, 119, 308,
3998 308, 119, 308, 241, 4, 46, 54, 103, 87, 120,
3999 258, 60, 43, 41, 41, 298, 299, 323, 236, 40,
4000 43, 193, 271, 124, 275, 276, 308, 47, 42, 125,
4001 236, 265, 54, 76, 304, 323, 248, 289, 311, 291,
4002 220, 46, 76, 76, 76, 140, 221, 313, 47, 125,
4003 217, 30, 32, 35, 233, 262, 311, 217, 278, 278,
4004 258, 249, 48, 48, 249, 249, 245, 47, 41, 173,
4005 302, 43, 248, 172, 43, 43, 316, 316, 104, 258,
4006 209, 258, 40, 298, 188, 41, 194, 276, 272, 54,
4007 43, 248, 125, 273, 41, 43, 267, 305, 306, 311,
4008 43, 46, 302, 48, 283, 284, 323, 297, 217, 218,
4009 313, 40, 43, 204, 248, 76, 43, 47, 246, 249,
4010 249, 43, 43, 43, 302, 43, 247, 104, 40, 128,
4011 131, 253, 236, 187, 302, 43, 277, 278, 302, 273,
4012 43, 46, 43, 42, 48, 40, 46, 188, 48, 311,
4013 217, 40, 236, 302, 278, 204, 41, 43, 43, 236,
4014 40, 40, 40, 131, 41, 111, 192, 188, 306, 48,
4015 187, 48, 284, 47, 236, 41, 188, 43, 41, 236,
4016 236, 236, 40, 303, 258, 193, 187, 48, 48, 219,
4017 41, 230, 302, 187, 231, 302, 41, 41, 41, 236,
4018 192, 48, 217, 231, 43, 46, 54, 43, 46, 54,
4019 231, 231, 231, 41, 193, 48, 267, 265, 231, 43,
4020 43
4021 };
4022
4023 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
4024 static const yytype_uint16 yyr1[] =
4025 {
4026 0, 143, 144, 144, 144, 144, 144, 144, 144, 145,
4027 145, 145, 145, 146, 146, 146, 146, 146, 146, 146,
4028 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
4029 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
4030 147, 149, 148, 150, 151, 152, 152, 152, 152, 153,
4031 153, 154, 154, 154, 154, 155, 156, 156, 157, 157,
4032 157, 159, 158, 160, 160, 161, 161, 162, 162, 162,
4033 162, 163, 164, 164, 165, 165, 166, 166, 167, 167,
4034 168, 168, 169, 169, 169, 170, 170, 171, 171, 171,
4035 171, 171, 171, 171, 171, 172, 172, 172, 173, 173,
4036 174, 175, 175, 176, 176, 176, 177, 178, 179, 179,
4037 180, 180, 180, 181, 182, 183, 184, 184, 184, 185,
4038 184, 184, 184, 184, 184, 186, 186, 187, 187, 187,
4039 187, 188, 189, 189, 189, 189, 189, 189, 190, 190,
4040 190, 191, 192, 193, 194, 193, 195, 195, 195, 196,
4041 196, 197, 198, 198, 199, 200, 200, 200, 200, 200,
4042 200, 202, 201, 203, 201, 204, 204, 205, 207, 206,
4043 206, 206, 208, 208, 208, 208, 208, 208, 209, 210,
4044 210, 211, 211, 212, 212, 213, 213, 215, 214, 216,
4045 214, 214, 217, 218, 219, 217, 217, 217, 220, 217,
4046 221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
4047 221, 221, 221, 221, 221, 221, 221, 221, 222, 222,
4048 222, 223, 224, 224, 225, 225, 225, 225, 225, 226,
4049 227, 228, 228, 228, 229, 229, 229, 229, 229, 229,
4050 229, 229, 229, 229, 229, 230, 230, 230, 231, 231,
4051 231, 232, 233, 233, 233, 233, 233, 234, 235, 235,
4052 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
4053 235, 235, 235, 235, 235, 235, 235, 235, 236, 237,
4054 237, 238, 238, 238, 239, 239, 239, 240, 240, 240,
4055 241, 242, 242, 243, 243, 244, 244, 245, 245, 245,
4056 245, 245, 246, 246, 246, 246, 247, 247, 247, 247,
4057 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
4058 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
4059 248, 248, 249, 249, 249, 249, 249, 249, 249, 249,
4060 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
4061 250, 250, 250, 251, 251, 251, 251, 251, 251, 251,
4062 251, 251, 251, 251, 251, 251, 251, 251, 252, 252,
4063 252, 252, 252, 252, 252, 252, 253, 253, 253, 253,
4064 254, 254, 254, 255, 255, 256, 256, 257, 257, 257,
4065 258, 259, 259, 259, 259, 260, 260, 260, 260, 260,
4066 260, 260, 260, 261, 262, 263, 263, 264, 264, 264,
4067 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
4068 264, 266, 265, 265, 267, 267, 268, 269, 270, 270,
4069 271, 271, 272, 272, 273, 273, 273, 273, 273, 274,
4070 275, 275, 276, 276, 277, 278, 278, 279, 279, 279,
4071 280, 280, 280, 280, 280, 280, 280, 280, 280, 280,
4072 280, 280, 280, 280, 280, 280, 280, 280, 280, 281,
4073 281, 281, 281, 281, 281, 281, 281, 282, 282, 282,
4074 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
4075 282, 282, 282, 282, 282, 282, 282, 282, 282, 283,
4076 284, 284, 285, 287, 286, 286, 288, 288, 290, 289,
4077 291, 289, 292, 292, 292, 293, 293, 293, 293, 294,
4078 294, 294, 295, 295, 295, 296, 296, 297, 297, 298,
4079 298, 298, 298, 299, 299, 300, 300, 300, 300, 300,
4080 300, 301, 301, 301, 302, 302, 303, 303, 303, 303,
4081 303, 303, 304, 304, 305, 305, 305, 305, 306, 306,
4082 307, 308, 308, 308, 309, 309, 309, 310, 310, 311,
4083 311, 311, 311, 311, 311, 311, 312, 312, 312, 312,
4084 313, 313, 314, 314, 315, 315, 315, 315, 315, 315,
4085 316, 316, 316, 316, 317, 317, 318, 318, 319, 319,
4086 319, 320, 320, 321, 321, 321, 321, 321, 321, 322,
4087 322, 323
4088 };
4089
4090 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
4091 static const yytype_uint8 yyr2[] =
4092 {
4093 0, 2, 1, 3, 2, 3, 2, 5, 3, 2,
4094 2, 2, 1, 1, 1, 1, 1, 1, 1, 2,
4095 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4096 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4097 1, 0, 8, 5, 3, 5, 5, 9, 3, 2,
4098 2, 5, 2, 5, 2, 4, 1, 1, 7, 7,
4099 5, 0, 7, 1, 1, 2, 2, 1, 5, 5,
4100 5, 3, 4, 3, 7, 8, 5, 3, 1, 1,
4101 3, 1, 4, 7, 6, 1, 1, 7, 9, 8,
4102 10, 5, 7, 6, 8, 1, 1, 5, 4, 5,
4103 7, 1, 3, 6, 6, 8, 1, 2, 3, 1,
4104 2, 3, 6, 5, 9, 2, 1, 1, 1, 0,
4105 6, 1, 6, 10, 1, 6, 9, 1, 5, 1,
4106 1, 1, 1, 1, 1, 1, 1, 1, 11, 13,
4107 7, 1, 1, 1, 0, 3, 1, 2, 2, 2,
4108 1, 5, 8, 11, 6, 1, 1, 1, 1, 1,
4109 1, 0, 9, 0, 8, 1, 4, 4, 0, 6,
4110 3, 4, 1, 1, 1, 1, 1, 1, 1, 2,
4111 1, 1, 1, 3, 1, 3, 4, 0, 6, 0,
4112 5, 5, 2, 0, 0, 7, 1, 1, 0, 3,
4113 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
4114 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
4115 2, 6, 6, 7, 8, 8, 8, 9, 7, 5,
4116 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
4117 1, 1, 1, 1, 1, 2, 4, 2, 2, 4,
4118 2, 5, 1, 1, 1, 1, 1, 2, 1, 1,
4119 2, 2, 1, 1, 1, 1, 1, 1, 2, 2,
4120 2, 2, 1, 2, 2, 2, 2, 1, 1, 2,
4121 1, 3, 4, 1, 2, 7, 3, 1, 2, 2,
4122 1, 2, 1, 3, 1, 1, 1, 2, 5, 2,
4123 2, 1, 2, 2, 1, 5, 1, 1, 5, 1,
4124 2, 3, 3, 1, 2, 2, 3, 4, 5, 4,
4125 5, 6, 6, 4, 5, 5, 6, 7, 8, 8,
4126 7, 7, 1, 2, 3, 4, 5, 3, 4, 4,
4127 1, 2, 4, 4, 4, 5, 6, 5, 6, 3,
4128 4, 4, 5, 1, 2, 2, 2, 3, 3, 1,
4129 2, 2, 1, 1, 2, 3, 3, 4, 3, 4,
4130 2, 3, 3, 4, 5, 3, 3, 2, 2, 1,
4131 1, 2, 1, 1, 1, 1, 2, 1, 1, 1,
4132 1, 2, 1, 2, 3, 1, 1, 1, 2, 1,
4133 1, 2, 1, 4, 1, 1, 2, 1, 1, 1,
4134 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4135 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
4136 1, 2, 1, 1, 1, 2, 3, 4, 1, 3,
4137 1, 2, 1, 3, 1, 1, 1, 3, 3, 3,
4138 1, 1, 1, 5, 8, 1, 1, 1, 1, 3,
4139 4, 5, 5, 5, 6, 6, 2, 2, 2, 1,
4140 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
4141 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
4142 3, 3, 3, 5, 2, 2, 2, 2, 2, 3,
4143 1, 1, 1, 0, 3, 1, 1, 3, 0, 4,
4144 0, 6, 1, 1, 1, 1, 1, 4, 4, 1,
4145 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
4146 1, 2, 2, 1, 1, 4, 1, 1, 5, 2,
4147 4, 1, 1, 2, 1, 1, 3, 3, 4, 4,
4148 3, 4, 2, 1, 1, 3, 4, 6, 2, 2,
4149 3, 1, 1, 1, 1, 1, 1, 1, 1, 2,
4150 4, 1, 3, 1, 2, 3, 3, 2, 2, 2,
4151 1, 2, 1, 3, 2, 4, 1, 3, 1, 3,
4152 3, 2, 2, 2, 2, 1, 2, 1, 1, 1,
4153 1, 3, 1, 3, 5, 1, 3, 3, 5, 1,
4154 1, 0
4155 };
4156
4157
4158 #define yyerrok (yyerrstatus = 0)
4159 #define yyclearin (yychar = YYEMPTY)
4160 #define YYEMPTY (-2)
4161 #define YYEOF 0
4162
4163 #define YYACCEPT goto yyacceptlab
4164 #define YYABORT goto yyabortlab
4165 #define YYERROR goto yyerrorlab
4166
4167
4168 #define YYRECOVERING() (!!yyerrstatus)
4169
4170 #define YYBACKUP(Token, Value) \
4171 do \
4172 if (yychar == YYEMPTY) \
4173 { \
4174 yychar = (Token); \
4175 yylval = (Value); \
4176 YYPOPSTACK (yylen); \
4177 yystate = *yyssp; \
4178 goto yybackup; \
4179 } \
4180 else \
4181 { \
4182 yyerror (YY_("syntax error: cannot back up")); \
4183 YYERROR; \
4184 } \
4185 while (0)
4186
4187 /* Error token number */
4188 #define YYTERROR 1
4189 #define YYERRCODE 256
4190
4191
4192
4193 /* Enable debugging if requested. */
4194 #if YYDEBUG
4195
4196 # ifndef YYFPRINTF
4197 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
4198 # define YYFPRINTF fprintf
4199 # endif
4200
4201 # define YYDPRINTF(Args) \
4202 do { \
4203 if (yydebug) \
4204 YYFPRINTF Args; \
4205 } while (0)
4206
4207 /* This macro is provided for backward compatibility. */
4208 #ifndef YY_LOCATION_PRINT
4209 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
4210 #endif
4211
4212
4213 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
4214 do { \
4215 if (yydebug) \
4216 { \
4217 YYFPRINTF (stderr, "%s ", Title); \
4218 yy_symbol_print (stderr, \
4219 Type, Value); \
4220 YYFPRINTF (stderr, "\n"); \
4221 } \
4222 } while (0)
4223
4224
4225 /*----------------------------------------.
4226 | Print this symbol's value on YYOUTPUT. |
4227 `----------------------------------------*/
4228
4229 static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)4230 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
4231 {
4232 FILE *yyo = yyoutput;
4233 YYUSE (yyo);
4234 if (!yyvaluep)
4235 return;
4236 # ifdef YYPRINT
4237 if (yytype < YYNTOKENS)
4238 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
4239 # endif
4240 YYUSE (yytype);
4241 }
4242
4243
4244 /*--------------------------------.
4245 | Print this symbol on YYOUTPUT. |
4246 `--------------------------------*/
4247
4248 static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)4249 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
4250 {
4251 YYFPRINTF (yyoutput, "%s %s (",
4252 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
4253
4254 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
4255 YYFPRINTF (yyoutput, ")");
4256 }
4257
4258 /*------------------------------------------------------------------.
4259 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
4260 | TOP (included). |
4261 `------------------------------------------------------------------*/
4262
4263 static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)4264 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
4265 {
4266 YYFPRINTF (stderr, "Stack now");
4267 for (; yybottom <= yytop; yybottom++)
4268 {
4269 int yybot = *yybottom;
4270 YYFPRINTF (stderr, " %d", yybot);
4271 }
4272 YYFPRINTF (stderr, "\n");
4273 }
4274
4275 # define YY_STACK_PRINT(Bottom, Top) \
4276 do { \
4277 if (yydebug) \
4278 yy_stack_print ((Bottom), (Top)); \
4279 } while (0)
4280
4281
4282 /*------------------------------------------------.
4283 | Report that the YYRULE is going to be reduced. |
4284 `------------------------------------------------*/
4285
4286 static void
yy_reduce_print(yytype_int16 * yyssp,YYSTYPE * yyvsp,int yyrule)4287 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
4288 {
4289 unsigned long int yylno = yyrline[yyrule];
4290 int yynrhs = yyr2[yyrule];
4291 int yyi;
4292 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
4293 yyrule - 1, yylno);
4294 /* The symbols being reduced. */
4295 for (yyi = 0; yyi < yynrhs; yyi++)
4296 {
4297 YYFPRINTF (stderr, " $%d = ", yyi + 1);
4298 yy_symbol_print (stderr,
4299 yystos[yyssp[yyi + 1 - yynrhs]],
4300 &(yyvsp[(yyi + 1) - (yynrhs)])
4301 );
4302 YYFPRINTF (stderr, "\n");
4303 }
4304 }
4305
4306 # define YY_REDUCE_PRINT(Rule) \
4307 do { \
4308 if (yydebug) \
4309 yy_reduce_print (yyssp, yyvsp, Rule); \
4310 } while (0)
4311
4312 /* Nonzero means print parse trace. It is left uninitialized so that
4313 multiple parsers can coexist. */
4314 int yydebug;
4315 #else /* !YYDEBUG */
4316 # define YYDPRINTF(Args)
4317 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
4318 # define YY_STACK_PRINT(Bottom, Top)
4319 # define YY_REDUCE_PRINT(Rule)
4320 #endif /* !YYDEBUG */
4321
4322
4323 /* YYINITDEPTH -- initial size of the parser's stacks. */
4324 #ifndef YYINITDEPTH
4325 # define YYINITDEPTH 200
4326 #endif
4327
4328 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
4329 if the built-in stack extension method is used).
4330
4331 Do not make this value too large; the results are undefined if
4332 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
4333 evaluated with infinite-precision integer arithmetic. */
4334
4335 #ifndef YYMAXDEPTH
4336 # define YYMAXDEPTH 10000
4337 #endif
4338
4339
4340 #if YYERROR_VERBOSE
4341
4342 # ifndef yystrlen
4343 # if defined __GLIBC__ && defined _STRING_H
4344 # define yystrlen strlen
4345 # else
4346 /* Return the length of YYSTR. */
4347 static YYSIZE_T
yystrlen(const char * yystr)4348 yystrlen (const char *yystr)
4349 {
4350 YYSIZE_T yylen;
4351 for (yylen = 0; yystr[yylen]; yylen++)
4352 continue;
4353 return yylen;
4354 }
4355 # endif
4356 # endif
4357
4358 # ifndef yystpcpy
4359 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
4360 # define yystpcpy stpcpy
4361 # else
4362 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
4363 YYDEST. */
4364 static char *
yystpcpy(char * yydest,const char * yysrc)4365 yystpcpy (char *yydest, const char *yysrc)
4366 {
4367 char *yyd = yydest;
4368 const char *yys = yysrc;
4369
4370 while ((*yyd++ = *yys++) != '\0')
4371 continue;
4372
4373 return yyd - 1;
4374 }
4375 # endif
4376 # endif
4377
4378 # ifndef yytnamerr
4379 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4380 quotes and backslashes, so that it's suitable for yyerror. The
4381 heuristic is that double-quoting is unnecessary unless the string
4382 contains an apostrophe, a comma, or backslash (other than
4383 backslash-backslash). YYSTR is taken from yytname. If YYRES is
4384 null, do not copy; instead, return the length of what the result
4385 would have been. */
4386 static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)4387 yytnamerr (char *yyres, const char *yystr)
4388 {
4389 if (*yystr == '"')
4390 {
4391 YYSIZE_T yyn = 0;
4392 char const *yyp = yystr;
4393
4394 for (;;)
4395 switch (*++yyp)
4396 {
4397 case '\'':
4398 case ',':
4399 goto do_not_strip_quotes;
4400
4401 case '\\':
4402 if (*++yyp != '\\')
4403 goto do_not_strip_quotes;
4404 /* Fall through. */
4405 default:
4406 if (yyres)
4407 yyres[yyn] = *yyp;
4408 yyn++;
4409 break;
4410
4411 case '"':
4412 if (yyres)
4413 yyres[yyn] = '\0';
4414 return yyn;
4415 }
4416 do_not_strip_quotes: ;
4417 }
4418
4419 if (! yyres)
4420 return yystrlen (yystr);
4421
4422 return yystpcpy (yyres, yystr) - yyres;
4423 }
4424 # endif
4425
4426 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
4427 about the unexpected token YYTOKEN for the state stack whose top is
4428 YYSSP.
4429
4430 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
4431 not large enough to hold the message. In that case, also set
4432 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
4433 required number of bytes is too large to store. */
4434 static int
yysyntax_error(YYSIZE_T * yymsg_alloc,char ** yymsg,yytype_int16 * yyssp,int yytoken)4435 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
4436 yytype_int16 *yyssp, int yytoken)
4437 {
4438 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
4439 YYSIZE_T yysize = yysize0;
4440 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4441 /* Internationalized format string. */
4442 const char *yyformat = YY_NULLPTR;
4443 /* Arguments of yyformat. */
4444 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4445 /* Number of reported tokens (one for the "unexpected", one per
4446 "expected"). */
4447 int yycount = 0;
4448
4449 /* There are many possibilities here to consider:
4450 - If this state is a consistent state with a default action, then
4451 the only way this function was invoked is if the default action
4452 is an error action. In that case, don't check for expected
4453 tokens because there are none.
4454 - The only way there can be no lookahead present (in yychar) is if
4455 this state is a consistent state with a default action. Thus,
4456 detecting the absence of a lookahead is sufficient to determine
4457 that there is no unexpected or expected token to report. In that
4458 case, just report a simple "syntax error".
4459 - Don't assume there isn't a lookahead just because this state is a
4460 consistent state with a default action. There might have been a
4461 previous inconsistent state, consistent state with a non-default
4462 action, or user semantic action that manipulated yychar.
4463 - Of course, the expected token list depends on states to have
4464 correct lookahead information, and it depends on the parser not
4465 to perform extra reductions after fetching a lookahead from the
4466 scanner and before detecting a syntax error. Thus, state merging
4467 (from LALR or IELR) and default reductions corrupt the expected
4468 token list. However, the list is correct for canonical LR with
4469 one exception: it will still contain any token that will not be
4470 accepted due to an error action in a later state.
4471 */
4472 if (yytoken != YYEMPTY)
4473 {
4474 int yyn = yypact[*yyssp];
4475 yyarg[yycount++] = yytname[yytoken];
4476 if (!yypact_value_is_default (yyn))
4477 {
4478 /* Start YYX at -YYN if negative to avoid negative indexes in
4479 YYCHECK. In other words, skip the first -YYN actions for
4480 this state because they are default actions. */
4481 int yyxbegin = yyn < 0 ? -yyn : 0;
4482 /* Stay within bounds of both yycheck and yytname. */
4483 int yychecklim = YYLAST - yyn + 1;
4484 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4485 int yyx;
4486
4487 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4488 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
4489 && !yytable_value_is_error (yytable[yyx + yyn]))
4490 {
4491 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4492 {
4493 yycount = 1;
4494 yysize = yysize0;
4495 break;
4496 }
4497 yyarg[yycount++] = yytname[yyx];
4498 {
4499 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
4500 if (! (yysize <= yysize1
4501 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
4502 return 2;
4503 yysize = yysize1;
4504 }
4505 }
4506 }
4507 }
4508
4509 switch (yycount)
4510 {
4511 # define YYCASE_(N, S) \
4512 case N: \
4513 yyformat = S; \
4514 break
4515 YYCASE_(0, YY_("syntax error"));
4516 YYCASE_(1, YY_("syntax error, unexpected %s"));
4517 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
4518 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
4519 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
4520 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
4521 # undef YYCASE_
4522 }
4523
4524 {
4525 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
4526 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
4527 return 2;
4528 yysize = yysize1;
4529 }
4530
4531 if (*yymsg_alloc < yysize)
4532 {
4533 *yymsg_alloc = 2 * yysize;
4534 if (! (yysize <= *yymsg_alloc
4535 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
4536 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
4537 return 1;
4538 }
4539
4540 /* Avoid sprintf, as that infringes on the user's name space.
4541 Don't have undefined behavior even if the translation
4542 produced a string with the wrong number of "%s"s. */
4543 {
4544 char *yyp = *yymsg;
4545 int yyi = 0;
4546 while ((*yyp = *yyformat) != '\0')
4547 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
4548 {
4549 yyp += yytnamerr (yyp, yyarg[yyi++]);
4550 yyformat += 2;
4551 }
4552 else
4553 {
4554 yyp++;
4555 yyformat++;
4556 }
4557 }
4558 return 0;
4559 }
4560 #endif /* YYERROR_VERBOSE */
4561
4562 /*-----------------------------------------------.
4563 | Release the memory associated to this symbol. |
4564 `-----------------------------------------------*/
4565
4566 static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)4567 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4568 {
4569 YYUSE (yyvaluep);
4570 if (!yymsg)
4571 yymsg = "Deleting";
4572 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4573
4574 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4575 YYUSE (yytype);
4576 YY_IGNORE_MAYBE_UNINITIALIZED_END
4577 }
4578
4579
4580
4581
4582 /* The lookahead symbol. */
4583 int yychar;
4584
4585 /* The semantic value of the lookahead symbol. */
4586 YYSTYPE yylval;
4587 /* Number of syntax errors so far. */
4588 int yynerrs;
4589
4590
4591 /*----------.
4592 | yyparse. |
4593 `----------*/
4594
4595 int
yyparse(void)4596 yyparse (void)
4597 {
4598 int yystate;
4599 /* Number of tokens to shift before error messages enabled. */
4600 int yyerrstatus;
4601
4602 /* The stacks and their tools:
4603 'yyss': related to states.
4604 'yyvs': related to semantic values.
4605
4606 Refer to the stacks through separate pointers, to allow yyoverflow
4607 to reallocate them elsewhere. */
4608
4609 /* The state stack. */
4610 yytype_int16 yyssa[YYINITDEPTH];
4611 yytype_int16 *yyss;
4612 yytype_int16 *yyssp;
4613
4614 /* The semantic value stack. */
4615 YYSTYPE yyvsa[YYINITDEPTH];
4616 YYSTYPE *yyvs;
4617 YYSTYPE *yyvsp;
4618
4619 YYSIZE_T yystacksize;
4620
4621 int yyn;
4622 int yyresult;
4623 /* Lookahead token as an internal (translated) token number. */
4624 int yytoken = 0;
4625 /* The variables used to return semantic value and location from the
4626 action routines. */
4627 YYSTYPE yyval;
4628
4629 #if YYERROR_VERBOSE
4630 /* Buffer for error messages, and its allocated size. */
4631 char yymsgbuf[128];
4632 char *yymsg = yymsgbuf;
4633 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4634 #endif
4635
4636 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4637
4638 /* The number of symbols on the RHS of the reduced rule.
4639 Keep to zero when no symbol should be popped. */
4640 int yylen = 0;
4641
4642 yyssp = yyss = yyssa;
4643 yyvsp = yyvs = yyvsa;
4644 yystacksize = YYINITDEPTH;
4645
4646 YYDPRINTF ((stderr, "Starting parse\n"));
4647
4648 yystate = 0;
4649 yyerrstatus = 0;
4650 yynerrs = 0;
4651 yychar = YYEMPTY; /* Cause a token to be read. */
4652 goto yysetstate;
4653
4654 /*------------------------------------------------------------.
4655 | yynewstate -- Push a new state, which is found in yystate. |
4656 `------------------------------------------------------------*/
4657 yynewstate:
4658 /* In all cases, when you get here, the value and location stacks
4659 have just been pushed. So pushing a state here evens the stacks. */
4660 yyssp++;
4661
4662 yysetstate:
4663 *yyssp = yystate;
4664
4665 if (yyss + yystacksize - 1 <= yyssp)
4666 {
4667 /* Get the current used size of the three stacks, in elements. */
4668 YYSIZE_T yysize = yyssp - yyss + 1;
4669
4670 #ifdef yyoverflow
4671 {
4672 /* Give user a chance to reallocate the stack. Use copies of
4673 these so that the &'s don't force the real ones into
4674 memory. */
4675 YYSTYPE *yyvs1 = yyvs;
4676 yytype_int16 *yyss1 = yyss;
4677
4678 /* Each stack pointer address is followed by the size of the
4679 data in use in that stack, in bytes. This used to be a
4680 conditional around just the two extra args, but that might
4681 be undefined if yyoverflow is a macro. */
4682 yyoverflow (YY_("memory exhausted"),
4683 &yyss1, yysize * sizeof (*yyssp),
4684 &yyvs1, yysize * sizeof (*yyvsp),
4685 &yystacksize);
4686
4687 yyss = yyss1;
4688 yyvs = yyvs1;
4689 }
4690 #else /* no yyoverflow */
4691 # ifndef YYSTACK_RELOCATE
4692 goto yyexhaustedlab;
4693 # else
4694 /* Extend the stack our own way. */
4695 if (YYMAXDEPTH <= yystacksize)
4696 goto yyexhaustedlab;
4697 yystacksize *= 2;
4698 if (YYMAXDEPTH < yystacksize)
4699 yystacksize = YYMAXDEPTH;
4700
4701 {
4702 yytype_int16 *yyss1 = yyss;
4703 union yyalloc *yyptr =
4704 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4705 if (! yyptr)
4706 goto yyexhaustedlab;
4707 YYSTACK_RELOCATE (yyss_alloc, yyss);
4708 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
4709 # undef YYSTACK_RELOCATE
4710 if (yyss1 != yyssa)
4711 YYSTACK_FREE (yyss1);
4712 }
4713 # endif
4714 #endif /* no yyoverflow */
4715
4716 yyssp = yyss + yysize - 1;
4717 yyvsp = yyvs + yysize - 1;
4718
4719 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4720 (unsigned long int) yystacksize));
4721
4722 if (yyss + yystacksize - 1 <= yyssp)
4723 YYABORT;
4724 }
4725
4726 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4727
4728 if (yystate == YYFINAL)
4729 YYACCEPT;
4730
4731 goto yybackup;
4732
4733 /*-----------.
4734 | yybackup. |
4735 `-----------*/
4736 yybackup:
4737
4738 /* Do appropriate processing given the current state. Read a
4739 lookahead token if we need one and don't already have one. */
4740
4741 /* First try to decide what to do without reference to lookahead token. */
4742 yyn = yypact[yystate];
4743 if (yypact_value_is_default (yyn))
4744 goto yydefault;
4745
4746 /* Not known => get a lookahead token if don't already have one. */
4747
4748 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
4749 if (yychar == YYEMPTY)
4750 {
4751 YYDPRINTF ((stderr, "Reading a token: "));
4752 yychar = yylex ();
4753 }
4754
4755 if (yychar <= YYEOF)
4756 {
4757 yychar = yytoken = YYEOF;
4758 YYDPRINTF ((stderr, "Now at end of input.\n"));
4759 }
4760 else
4761 {
4762 yytoken = YYTRANSLATE (yychar);
4763 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4764 }
4765
4766 /* If the proper action on seeing token YYTOKEN is to reduce or to
4767 detect an error, take that action. */
4768 yyn += yytoken;
4769 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4770 goto yydefault;
4771 yyn = yytable[yyn];
4772 if (yyn <= 0)
4773 {
4774 if (yytable_value_is_error (yyn))
4775 goto yyerrlab;
4776 yyn = -yyn;
4777 goto yyreduce;
4778 }
4779
4780 /* Count tokens shifted since error; after three, turn off error
4781 status. */
4782 if (yyerrstatus)
4783 yyerrstatus--;
4784
4785 /* Shift the lookahead token. */
4786 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4787
4788 /* Discard the shifted token. */
4789 yychar = YYEMPTY;
4790
4791 yystate = yyn;
4792 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
4793 *++yyvsp = yylval;
4794 YY_IGNORE_MAYBE_UNINITIALIZED_END
4795
4796 goto yynewstate;
4797
4798
4799 /*-----------------------------------------------------------.
4800 | yydefault -- do the default action for the current state. |
4801 `-----------------------------------------------------------*/
4802 yydefault:
4803 yyn = yydefact[yystate];
4804 if (yyn == 0)
4805 goto yyerrlab;
4806 goto yyreduce;
4807
4808
4809 /*-----------------------------.
4810 | yyreduce -- Do a reduction. |
4811 `-----------------------------*/
4812 yyreduce:
4813 /* yyn is the number of a rule to reduce with. */
4814 yylen = yyr2[yyn];
4815
4816 /* If YYLEN is nonzero, implement the default value of the action:
4817 '$$ = $1'.
4818
4819 Otherwise, the following line sets YYVAL to garbage.
4820 This behavior is undocumented and Bison
4821 users should not rely upon it. Assigning to YYVAL
4822 unconditionally makes the parser a bit smaller, and it avoids a
4823 GCC warning that YYVAL may be used uninitialized. */
4824 yyval = yyvsp[1-yylen];
4825
4826
4827 YY_REDUCE_PRINT (yyn);
4828 switch (yyn)
4829 {
4830 case 2:
4831 #line 1713 "parser.y" /* yacc.c:1646 */
4832 {
4833 if (!classes) classes = NewHash();
4834 Setattr((yyvsp[0].node),"classes",classes);
4835 Setattr((yyvsp[0].node),"name",ModuleName);
4836
4837 if ((!module_node) && ModuleName) {
4838 module_node = new_node("module");
4839 Setattr(module_node,"name",ModuleName);
4840 }
4841 Setattr((yyvsp[0].node),"module",module_node);
4842 top = (yyvsp[0].node);
4843 }
4844 #line 4845 "y.tab.c" /* yacc.c:1646 */
4845 break;
4846
4847 case 3:
4848 #line 1725 "parser.y" /* yacc.c:1646 */
4849 {
4850 top = Copy(Getattr((yyvsp[-1].p),"type"));
4851 Delete((yyvsp[-1].p));
4852 }
4853 #line 4854 "y.tab.c" /* yacc.c:1646 */
4854 break;
4855
4856 case 4:
4857 #line 1729 "parser.y" /* yacc.c:1646 */
4858 {
4859 top = 0;
4860 }
4861 #line 4862 "y.tab.c" /* yacc.c:1646 */
4862 break;
4863
4864 case 5:
4865 #line 1732 "parser.y" /* yacc.c:1646 */
4866 {
4867 top = (yyvsp[-1].p);
4868 }
4869 #line 4870 "y.tab.c" /* yacc.c:1646 */
4870 break;
4871
4872 case 6:
4873 #line 1735 "parser.y" /* yacc.c:1646 */
4874 {
4875 top = 0;
4876 }
4877 #line 4878 "y.tab.c" /* yacc.c:1646 */
4878 break;
4879
4880 case 7:
4881 #line 1738 "parser.y" /* yacc.c:1646 */
4882 {
4883 top = (yyvsp[-2].pl);
4884 }
4885 #line 4886 "y.tab.c" /* yacc.c:1646 */
4886 break;
4887
4888 case 8:
4889 #line 1741 "parser.y" /* yacc.c:1646 */
4890 {
4891 top = 0;
4892 }
4893 #line 4894 "y.tab.c" /* yacc.c:1646 */
4894 break;
4895
4896 case 9:
4897 #line 1746 "parser.y" /* yacc.c:1646 */
4898 {
4899 /* add declaration to end of linked list (the declaration isn't always a single declaration, sometimes it is a linked list itself) */
4900 if (currentDeclComment != NULL) {
4901 set_comment((yyvsp[0].node), currentDeclComment);
4902 currentDeclComment = NULL;
4903 }
4904 appendChild((yyvsp[-1].node),(yyvsp[0].node));
4905 (yyval.node) = (yyvsp[-1].node);
4906 }
4907 #line 4908 "y.tab.c" /* yacc.c:1646 */
4908 break;
4909
4910 case 10:
4911 #line 1755 "parser.y" /* yacc.c:1646 */
4912 {
4913 currentDeclComment = (yyvsp[0].str);
4914 (yyval.node) = (yyvsp[-1].node);
4915 }
4916 #line 4917 "y.tab.c" /* yacc.c:1646 */
4917 break;
4918
4919 case 11:
4920 #line 1759 "parser.y" /* yacc.c:1646 */
4921 {
4922 Node *node = lastChild((yyvsp[-1].node));
4923 if (node) {
4924 set_comment(node, (yyvsp[0].str));
4925 }
4926 (yyval.node) = (yyvsp[-1].node);
4927 }
4928 #line 4929 "y.tab.c" /* yacc.c:1646 */
4929 break;
4930
4931 case 12:
4932 #line 1766 "parser.y" /* yacc.c:1646 */
4933 {
4934 (yyval.node) = new_node("top");
4935 }
4936 #line 4937 "y.tab.c" /* yacc.c:1646 */
4937 break;
4938
4939 case 13:
4940 #line 1771 "parser.y" /* yacc.c:1646 */
4941 { (yyval.node) = (yyvsp[0].node); }
4942 #line 4943 "y.tab.c" /* yacc.c:1646 */
4943 break;
4944
4945 case 14:
4946 #line 1772 "parser.y" /* yacc.c:1646 */
4947 { (yyval.node) = (yyvsp[0].node); }
4948 #line 4949 "y.tab.c" /* yacc.c:1646 */
4949 break;
4950
4951 case 15:
4952 #line 1773 "parser.y" /* yacc.c:1646 */
4953 { (yyval.node) = (yyvsp[0].node); }
4954 #line 4955 "y.tab.c" /* yacc.c:1646 */
4955 break;
4956
4957 case 16:
4958 #line 1774 "parser.y" /* yacc.c:1646 */
4959 { (yyval.node) = 0; }
4960 #line 4961 "y.tab.c" /* yacc.c:1646 */
4961 break;
4962
4963 case 17:
4964 #line 1775 "parser.y" /* yacc.c:1646 */
4965 {
4966 (yyval.node) = 0;
4967 if (cparse_unknown_directive) {
4968 Swig_error(cparse_file, cparse_line, "Unknown directive '%s'.\n", cparse_unknown_directive);
4969 } else {
4970 Swig_error(cparse_file, cparse_line, "Syntax error in input(1).\n");
4971 }
4972 SWIG_exit(EXIT_FAILURE);
4973 }
4974 #line 4975 "y.tab.c" /* yacc.c:1646 */
4975 break;
4976
4977 case 18:
4978 #line 1785 "parser.y" /* yacc.c:1646 */
4979 {
4980 if ((yyval.node)) {
4981 add_symbols((yyval.node));
4982 }
4983 (yyval.node) = (yyvsp[0].node);
4984 }
4985 #line 4986 "y.tab.c" /* yacc.c:1646 */
4986 break;
4987
4988 case 19:
4989 #line 1801 "parser.y" /* yacc.c:1646 */
4990 {
4991 (yyval.node) = 0;
4992 skip_decl();
4993 }
4994 #line 4995 "y.tab.c" /* yacc.c:1646 */
4995 break;
4996
4997 case 20:
4998 #line 1811 "parser.y" /* yacc.c:1646 */
4999 { (yyval.node) = (yyvsp[0].node); }
5000 #line 5001 "y.tab.c" /* yacc.c:1646 */
5001 break;
5002
5003 case 21:
5004 #line 1812 "parser.y" /* yacc.c:1646 */
5005 { (yyval.node) = (yyvsp[0].node); }
5006 #line 5007 "y.tab.c" /* yacc.c:1646 */
5007 break;
5008
5009 case 22:
5010 #line 1813 "parser.y" /* yacc.c:1646 */
5011 { (yyval.node) = (yyvsp[0].node); }
5012 #line 5013 "y.tab.c" /* yacc.c:1646 */
5013 break;
5014
5015 case 23:
5016 #line 1814 "parser.y" /* yacc.c:1646 */
5017 { (yyval.node) = (yyvsp[0].node); }
5018 #line 5019 "y.tab.c" /* yacc.c:1646 */
5019 break;
5020
5021 case 24:
5022 #line 1815 "parser.y" /* yacc.c:1646 */
5023 { (yyval.node) = (yyvsp[0].node); }
5024 #line 5025 "y.tab.c" /* yacc.c:1646 */
5025 break;
5026
5027 case 25:
5028 #line 1816 "parser.y" /* yacc.c:1646 */
5029 { (yyval.node) = (yyvsp[0].node); }
5030 #line 5031 "y.tab.c" /* yacc.c:1646 */
5031 break;
5032
5033 case 26:
5034 #line 1817 "parser.y" /* yacc.c:1646 */
5035 { (yyval.node) = (yyvsp[0].node); }
5036 #line 5037 "y.tab.c" /* yacc.c:1646 */
5037 break;
5038
5039 case 27:
5040 #line 1818 "parser.y" /* yacc.c:1646 */
5041 { (yyval.node) = (yyvsp[0].node); }
5042 #line 5043 "y.tab.c" /* yacc.c:1646 */
5043 break;
5044
5045 case 28:
5046 #line 1819 "parser.y" /* yacc.c:1646 */
5047 { (yyval.node) = (yyvsp[0].node); }
5048 #line 5049 "y.tab.c" /* yacc.c:1646 */
5049 break;
5050
5051 case 29:
5052 #line 1820 "parser.y" /* yacc.c:1646 */
5053 { (yyval.node) = (yyvsp[0].node); }
5054 #line 5055 "y.tab.c" /* yacc.c:1646 */
5055 break;
5056
5057 case 30:
5058 #line 1821 "parser.y" /* yacc.c:1646 */
5059 { (yyval.node) = (yyvsp[0].node); }
5060 #line 5061 "y.tab.c" /* yacc.c:1646 */
5061 break;
5062
5063 case 31:
5064 #line 1822 "parser.y" /* yacc.c:1646 */
5065 { (yyval.node) = (yyvsp[0].node); }
5066 #line 5067 "y.tab.c" /* yacc.c:1646 */
5067 break;
5068
5069 case 32:
5070 #line 1823 "parser.y" /* yacc.c:1646 */
5071 { (yyval.node) = (yyvsp[0].node); }
5072 #line 5073 "y.tab.c" /* yacc.c:1646 */
5073 break;
5074
5075 case 33:
5076 #line 1824 "parser.y" /* yacc.c:1646 */
5077 { (yyval.node) = (yyvsp[0].node); }
5078 #line 5079 "y.tab.c" /* yacc.c:1646 */
5079 break;
5080
5081 case 34:
5082 #line 1825 "parser.y" /* yacc.c:1646 */
5083 { (yyval.node) = (yyvsp[0].node); }
5084 #line 5085 "y.tab.c" /* yacc.c:1646 */
5085 break;
5086
5087 case 35:
5088 #line 1826 "parser.y" /* yacc.c:1646 */
5089 { (yyval.node) = (yyvsp[0].node); }
5090 #line 5091 "y.tab.c" /* yacc.c:1646 */
5091 break;
5092
5093 case 36:
5094 #line 1827 "parser.y" /* yacc.c:1646 */
5095 { (yyval.node) = (yyvsp[0].node); }
5096 #line 5097 "y.tab.c" /* yacc.c:1646 */
5097 break;
5098
5099 case 37:
5100 #line 1828 "parser.y" /* yacc.c:1646 */
5101 { (yyval.node) = (yyvsp[0].node); }
5102 #line 5103 "y.tab.c" /* yacc.c:1646 */
5103 break;
5104
5105 case 38:
5106 #line 1829 "parser.y" /* yacc.c:1646 */
5107 { (yyval.node) = (yyvsp[0].node); }
5108 #line 5109 "y.tab.c" /* yacc.c:1646 */
5109 break;
5110
5111 case 39:
5112 #line 1830 "parser.y" /* yacc.c:1646 */
5113 { (yyval.node) = (yyvsp[0].node); }
5114 #line 5115 "y.tab.c" /* yacc.c:1646 */
5115 break;
5116
5117 case 40:
5118 #line 1831 "parser.y" /* yacc.c:1646 */
5119 { (yyval.node) = (yyvsp[0].node); }
5120 #line 5121 "y.tab.c" /* yacc.c:1646 */
5121 break;
5122
5123 case 41:
5124 #line 1838 "parser.y" /* yacc.c:1646 */
5125 {
5126 Node *cls;
5127 String *clsname;
5128 extendmode = 1;
5129 cplus_mode = CPLUS_PUBLIC;
5130 if (!classes) classes = NewHash();
5131 if (!classes_typedefs) classes_typedefs = NewHash();
5132 clsname = make_class_name((yyvsp[-1].str));
5133 cls = Getattr(classes,clsname);
5134 if (!cls) {
5135 cls = Getattr(classes_typedefs, clsname);
5136 if (!cls) {
5137 /* No previous definition. Create a new scope */
5138 Node *am = Getattr(Swig_extend_hash(),clsname);
5139 if (!am) {
5140 Swig_symbol_newscope();
5141 Swig_symbol_setscopename((yyvsp[-1].str));
5142 prev_symtab = 0;
5143 } else {
5144 prev_symtab = Swig_symbol_setscope(Getattr(am,"symtab"));
5145 }
5146 current_class = 0;
5147 } else {
5148 /* Previous typedef class definition. Use its symbol table.
5149 Deprecated, just the real name should be used.
5150 Note that %extend before the class typedef never worked, only %extend after the class typdef. */
5151 prev_symtab = Swig_symbol_setscope(Getattr(cls, "symtab"));
5152 current_class = cls;
5153 SWIG_WARN_NODE_BEGIN(cls);
5154 Swig_warning(WARN_PARSE_EXTEND_NAME, cparse_file, cparse_line, "Deprecated %%extend name used - the %s name '%s' should be used instead of the typedef name '%s'.\n", Getattr(cls, "kind"), SwigType_namestr(Getattr(cls, "name")), (yyvsp[-1].str));
5155 SWIG_WARN_NODE_END(cls);
5156 }
5157 } else {
5158 /* Previous class definition. Use its symbol table */
5159 prev_symtab = Swig_symbol_setscope(Getattr(cls,"symtab"));
5160 current_class = cls;
5161 }
5162 Classprefix = NewString((yyvsp[-1].str));
5163 Namespaceprefix= Swig_symbol_qualifiedscopename(0);
5164 Delete(clsname);
5165 }
5166 #line 5167 "y.tab.c" /* yacc.c:1646 */
5167 break;
5168
5169 case 42:
5170 #line 1878 "parser.y" /* yacc.c:1646 */
5171 {
5172 String *clsname;
5173 extendmode = 0;
5174 (yyval.node) = new_node("extend");
5175 Setattr((yyval.node),"symtab",Swig_symbol_popscope());
5176 if (prev_symtab) {
5177 Swig_symbol_setscope(prev_symtab);
5178 }
5179 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
5180 clsname = make_class_name((yyvsp[-4].str));
5181 Setattr((yyval.node),"name",clsname);
5182
5183 mark_nodes_as_extend((yyvsp[-1].node));
5184 if (current_class) {
5185 /* We add the extension to the previously defined class */
5186 appendChild((yyval.node), (yyvsp[-1].node));
5187 appendChild(current_class,(yyval.node));
5188 } else {
5189 /* We store the extensions in the extensions hash */
5190 Node *am = Getattr(Swig_extend_hash(),clsname);
5191 if (am) {
5192 /* Append the members to the previous extend methods */
5193 appendChild(am, (yyvsp[-1].node));
5194 } else {
5195 appendChild((yyval.node), (yyvsp[-1].node));
5196 Setattr(Swig_extend_hash(),clsname,(yyval.node));
5197 }
5198 }
5199 current_class = 0;
5200 Delete(Classprefix);
5201 Delete(clsname);
5202 Classprefix = 0;
5203 prev_symtab = 0;
5204 (yyval.node) = 0;
5205
5206 }
5207 #line 5208 "y.tab.c" /* yacc.c:1646 */
5208 break;
5209
5210 case 43:
5211 #line 1920 "parser.y" /* yacc.c:1646 */
5212 {
5213 (yyval.node) = new_node("apply");
5214 Setattr((yyval.node),"pattern",Getattr((yyvsp[-3].p),"pattern"));
5215 appendChild((yyval.node),(yyvsp[-1].p));
5216 }
5217 #line 5218 "y.tab.c" /* yacc.c:1646 */
5218 break;
5219
5220 case 44:
5221 #line 1930 "parser.y" /* yacc.c:1646 */
5222 {
5223 (yyval.node) = new_node("clear");
5224 appendChild((yyval.node),(yyvsp[-1].p));
5225 }
5226 #line 5227 "y.tab.c" /* yacc.c:1646 */
5227 break;
5228
5229 case 45:
5230 #line 1941 "parser.y" /* yacc.c:1646 */
5231 {
5232 if (((yyvsp[-1].dtype).type != T_ERROR) && ((yyvsp[-1].dtype).type != T_SYMBOL)) {
5233 SwigType *type = NewSwigType((yyvsp[-1].dtype).type);
5234 (yyval.node) = new_node("constant");
5235 Setattr((yyval.node),"name",(yyvsp[-3].id));
5236 Setattr((yyval.node),"type",type);
5237 Setattr((yyval.node),"value",(yyvsp[-1].dtype).val);
5238 if ((yyvsp[-1].dtype).rawval) Setattr((yyval.node),"rawval", (yyvsp[-1].dtype).rawval);
5239 Setattr((yyval.node),"storage","%constant");
5240 SetFlag((yyval.node),"feature:immutable");
5241 add_symbols((yyval.node));
5242 Delete(type);
5243 } else {
5244 if ((yyvsp[-1].dtype).type == T_ERROR) {
5245 Swig_warning(WARN_PARSE_UNSUPPORTED_VALUE,cparse_file,cparse_line,"Unsupported constant value (ignored)\n");
5246 }
5247 (yyval.node) = 0;
5248 }
5249
5250 }
5251 #line 5252 "y.tab.c" /* yacc.c:1646 */
5252 break;
5253
5254 case 46:
5255 #line 1961 "parser.y" /* yacc.c:1646 */
5256 {
5257 if (((yyvsp[-1].dtype).type != T_ERROR) && ((yyvsp[-1].dtype).type != T_SYMBOL)) {
5258 SwigType_push((yyvsp[-3].type),(yyvsp[-2].decl).type);
5259 /* Sneaky callback function trick */
5260 if (SwigType_isfunction((yyvsp[-3].type))) {
5261 SwigType_add_pointer((yyvsp[-3].type));
5262 }
5263 (yyval.node) = new_node("constant");
5264 Setattr((yyval.node),"name",(yyvsp[-2].decl).id);
5265 Setattr((yyval.node),"type",(yyvsp[-3].type));
5266 Setattr((yyval.node),"value",(yyvsp[-1].dtype).val);
5267 if ((yyvsp[-1].dtype).rawval) Setattr((yyval.node),"rawval", (yyvsp[-1].dtype).rawval);
5268 Setattr((yyval.node),"storage","%constant");
5269 SetFlag((yyval.node),"feature:immutable");
5270 add_symbols((yyval.node));
5271 } else {
5272 if ((yyvsp[-1].dtype).type == T_ERROR) {
5273 Swig_warning(WARN_PARSE_UNSUPPORTED_VALUE,cparse_file,cparse_line, "Unsupported constant value\n");
5274 }
5275 (yyval.node) = 0;
5276 }
5277 }
5278 #line 5279 "y.tab.c" /* yacc.c:1646 */
5279 break;
5280
5281 case 47:
5282 #line 1985 "parser.y" /* yacc.c:1646 */
5283 {
5284 if (((yyvsp[-1].dtype).type != T_ERROR) && ((yyvsp[-1].dtype).type != T_SYMBOL)) {
5285 SwigType_add_function((yyvsp[-7].type), (yyvsp[-4].pl));
5286 SwigType_push((yyvsp[-7].type), (yyvsp[-2].dtype).qualifier);
5287 SwigType_push((yyvsp[-7].type), (yyvsp[-6].decl).type);
5288 /* Sneaky callback function trick */
5289 if (SwigType_isfunction((yyvsp[-7].type))) {
5290 SwigType_add_pointer((yyvsp[-7].type));
5291 }
5292 (yyval.node) = new_node("constant");
5293 Setattr((yyval.node), "name", (yyvsp[-6].decl).id);
5294 Setattr((yyval.node), "type", (yyvsp[-7].type));
5295 Setattr((yyval.node), "value", (yyvsp[-1].dtype).val);
5296 if ((yyvsp[-1].dtype).rawval) Setattr((yyval.node), "rawval", (yyvsp[-1].dtype).rawval);
5297 Setattr((yyval.node), "storage", "%constant");
5298 SetFlag((yyval.node), "feature:immutable");
5299 add_symbols((yyval.node));
5300 } else {
5301 if ((yyvsp[-1].dtype).type == T_ERROR) {
5302 Swig_warning(WARN_PARSE_UNSUPPORTED_VALUE,cparse_file,cparse_line, "Unsupported constant value\n");
5303 }
5304 (yyval.node) = 0;
5305 }
5306 }
5307 #line 5308 "y.tab.c" /* yacc.c:1646 */
5308 break;
5309
5310 case 48:
5311 #line 2009 "parser.y" /* yacc.c:1646 */
5312 {
5313 Swig_warning(WARN_PARSE_BAD_VALUE,cparse_file,cparse_line,"Bad constant value (ignored).\n");
5314 (yyval.node) = 0;
5315 }
5316 #line 5317 "y.tab.c" /* yacc.c:1646 */
5317 break;
5318
5319 case 49:
5320 #line 2020 "parser.y" /* yacc.c:1646 */
5321 {
5322 char temp[64];
5323 Replace((yyvsp[0].str),"$file",cparse_file, DOH_REPLACE_ANY);
5324 sprintf(temp,"%d", cparse_line);
5325 Replace((yyvsp[0].str),"$line",temp,DOH_REPLACE_ANY);
5326 Printf(stderr,"%s\n", (yyvsp[0].str));
5327 Delete((yyvsp[0].str));
5328 (yyval.node) = 0;
5329 }
5330 #line 5331 "y.tab.c" /* yacc.c:1646 */
5331 break;
5332
5333 case 50:
5334 #line 2029 "parser.y" /* yacc.c:1646 */
5335 {
5336 char temp[64];
5337 String *s = (yyvsp[0].str);
5338 Replace(s,"$file",cparse_file, DOH_REPLACE_ANY);
5339 sprintf(temp,"%d", cparse_line);
5340 Replace(s,"$line",temp,DOH_REPLACE_ANY);
5341 Printf(stderr,"%s\n", s);
5342 Delete(s);
5343 (yyval.node) = 0;
5344 }
5345 #line 5346 "y.tab.c" /* yacc.c:1646 */
5346 break;
5347
5348 case 51:
5349 #line 2048 "parser.y" /* yacc.c:1646 */
5350 {
5351 skip_balanced('{','}');
5352 (yyval.node) = 0;
5353 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated. Use %%exception instead.\n");
5354 }
5355 #line 5356 "y.tab.c" /* yacc.c:1646 */
5356 break;
5357
5358 case 52:
5359 #line 2054 "parser.y" /* yacc.c:1646 */
5360 {
5361 skip_balanced('{','}');
5362 (yyval.node) = 0;
5363 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated. Use %%exception instead.\n");
5364 }
5365 #line 5366 "y.tab.c" /* yacc.c:1646 */
5366 break;
5367
5368 case 53:
5369 #line 2060 "parser.y" /* yacc.c:1646 */
5370 {
5371 (yyval.node) = 0;
5372 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated. Use %%exception instead.\n");
5373 }
5374 #line 5375 "y.tab.c" /* yacc.c:1646 */
5375 break;
5376
5377 case 54:
5378 #line 2065 "parser.y" /* yacc.c:1646 */
5379 {
5380 (yyval.node) = 0;
5381 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated. Use %%exception instead.\n");
5382 }
5383 #line 5384 "y.tab.c" /* yacc.c:1646 */
5384 break;
5385
5386 case 55:
5387 #line 2072 "parser.y" /* yacc.c:1646 */
5388 {
5389 (yyval.node) = NewHash();
5390 Setattr((yyval.node),"value",(yyvsp[-3].str));
5391 Setattr((yyval.node),"type",Getattr((yyvsp[-1].p),"type"));
5392 }
5393 #line 5394 "y.tab.c" /* yacc.c:1646 */
5394 break;
5395
5396 case 56:
5397 #line 2079 "parser.y" /* yacc.c:1646 */
5398 {
5399 (yyval.node) = NewHash();
5400 Setattr((yyval.node),"value",(yyvsp[0].str));
5401 }
5402 #line 5403 "y.tab.c" /* yacc.c:1646 */
5403 break;
5404
5405 case 57:
5406 #line 2083 "parser.y" /* yacc.c:1646 */
5407 {
5408 (yyval.node) = (yyvsp[0].node);
5409 }
5410 #line 5411 "y.tab.c" /* yacc.c:1646 */
5411 break;
5412
5413 case 58:
5414 #line 2096 "parser.y" /* yacc.c:1646 */
5415 {
5416 Hash *p = (yyvsp[-2].node);
5417 (yyval.node) = new_node("fragment");
5418 Setattr((yyval.node),"value",Getattr((yyvsp[-4].node),"value"));
5419 Setattr((yyval.node),"type",Getattr((yyvsp[-4].node),"type"));
5420 Setattr((yyval.node),"section",Getattr(p,"name"));
5421 Setattr((yyval.node),"kwargs",nextSibling(p));
5422 Setattr((yyval.node),"code",(yyvsp[0].str));
5423 }
5424 #line 5425 "y.tab.c" /* yacc.c:1646 */
5425 break;
5426
5427 case 59:
5428 #line 2105 "parser.y" /* yacc.c:1646 */
5429 {
5430 Hash *p = (yyvsp[-2].node);
5431 String *code;
5432 skip_balanced('{','}');
5433 (yyval.node) = new_node("fragment");
5434 Setattr((yyval.node),"value",Getattr((yyvsp[-4].node),"value"));
5435 Setattr((yyval.node),"type",Getattr((yyvsp[-4].node),"type"));
5436 Setattr((yyval.node),"section",Getattr(p,"name"));
5437 Setattr((yyval.node),"kwargs",nextSibling(p));
5438 Delitem(scanner_ccode,0);
5439 Delitem(scanner_ccode,DOH_END);
5440 code = Copy(scanner_ccode);
5441 Setattr((yyval.node),"code",code);
5442 Delete(code);
5443 }
5444 #line 5445 "y.tab.c" /* yacc.c:1646 */
5445 break;
5446
5447 case 60:
5448 #line 2120 "parser.y" /* yacc.c:1646 */
5449 {
5450 (yyval.node) = new_node("fragment");
5451 Setattr((yyval.node),"value",Getattr((yyvsp[-2].node),"value"));
5452 Setattr((yyval.node),"type",Getattr((yyvsp[-2].node),"type"));
5453 Setattr((yyval.node),"emitonly","1");
5454 }
5455 #line 5456 "y.tab.c" /* yacc.c:1646 */
5456 break;
5457
5458 case 61:
5459 #line 2133 "parser.y" /* yacc.c:1646 */
5460 {
5461 (yyvsp[-3].loc).filename = Copy(cparse_file);
5462 (yyvsp[-3].loc).line = cparse_line;
5463 scanner_set_location((yyvsp[-1].str),1);
5464 if ((yyvsp[-2].node)) {
5465 String *maininput = Getattr((yyvsp[-2].node), "maininput");
5466 if (maininput)
5467 scanner_set_main_input_file(NewString(maininput));
5468 }
5469 }
5470 #line 5471 "y.tab.c" /* yacc.c:1646 */
5471 break;
5472
5473 case 62:
5474 #line 2142 "parser.y" /* yacc.c:1646 */
5475 {
5476 String *mname = 0;
5477 (yyval.node) = (yyvsp[-1].node);
5478 scanner_set_location((yyvsp[-6].loc).filename,(yyvsp[-6].loc).line+1);
5479 if (strcmp((yyvsp[-6].loc).type,"include") == 0) set_nodeType((yyval.node),"include");
5480 if (strcmp((yyvsp[-6].loc).type,"import") == 0) {
5481 mname = (yyvsp[-5].node) ? Getattr((yyvsp[-5].node),"module") : 0;
5482 set_nodeType((yyval.node),"import");
5483 if (import_mode) --import_mode;
5484 }
5485
5486 Setattr((yyval.node),"name",(yyvsp[-4].str));
5487 /* Search for the module (if any) */
5488 {
5489 Node *n = firstChild((yyval.node));
5490 while (n) {
5491 if (Strcmp(nodeType(n),"module") == 0) {
5492 if (mname) {
5493 Setattr(n,"name", mname);
5494 mname = 0;
5495 }
5496 Setattr((yyval.node),"module",Getattr(n,"name"));
5497 break;
5498 }
5499 n = nextSibling(n);
5500 }
5501 if (mname) {
5502 /* There is no module node in the import
5503 node, ie, you imported a .h file
5504 directly. We are forced then to create
5505 a new import node with a module node.
5506 */
5507 Node *nint = new_node("import");
5508 Node *mnode = new_node("module");
5509 Setattr(mnode,"name", mname);
5510 Setattr(mnode,"options",(yyvsp[-5].node));
5511 appendChild(nint,mnode);
5512 Delete(mnode);
5513 appendChild(nint,firstChild((yyval.node)));
5514 (yyval.node) = nint;
5515 Setattr((yyval.node),"module",mname);
5516 }
5517 }
5518 Setattr((yyval.node),"options",(yyvsp[-5].node));
5519 }
5520 #line 5521 "y.tab.c" /* yacc.c:1646 */
5521 break;
5522
5523 case 63:
5524 #line 2189 "parser.y" /* yacc.c:1646 */
5525 { (yyval.loc).type = "include"; }
5526 #line 5527 "y.tab.c" /* yacc.c:1646 */
5527 break;
5528
5529 case 64:
5530 #line 2190 "parser.y" /* yacc.c:1646 */
5531 { (yyval.loc).type = "import"; ++import_mode;}
5532 #line 5533 "y.tab.c" /* yacc.c:1646 */
5533 break;
5534
5535 case 65:
5536 #line 2197 "parser.y" /* yacc.c:1646 */
5537 {
5538 String *cpps;
5539 if (Namespaceprefix) {
5540 Swig_error(cparse_file, cparse_start_line, "%%inline directive inside a namespace is disallowed.\n");
5541 (yyval.node) = 0;
5542 } else {
5543 (yyval.node) = new_node("insert");
5544 Setattr((yyval.node),"code",(yyvsp[0].str));
5545 /* Need to run through the preprocessor */
5546 Seek((yyvsp[0].str),0,SEEK_SET);
5547 Setline((yyvsp[0].str),cparse_start_line);
5548 Setfile((yyvsp[0].str),cparse_file);
5549 cpps = Preprocessor_parse((yyvsp[0].str));
5550 start_inline(Char(cpps), cparse_start_line);
5551 Delete((yyvsp[0].str));
5552 Delete(cpps);
5553 }
5554
5555 }
5556 #line 5557 "y.tab.c" /* yacc.c:1646 */
5557 break;
5558
5559 case 66:
5560 #line 2216 "parser.y" /* yacc.c:1646 */
5561 {
5562 String *cpps;
5563 int start_line = cparse_line;
5564 skip_balanced('{','}');
5565 if (Namespaceprefix) {
5566 Swig_error(cparse_file, cparse_start_line, "%%inline directive inside a namespace is disallowed.\n");
5567
5568 (yyval.node) = 0;
5569 } else {
5570 String *code;
5571 (yyval.node) = new_node("insert");
5572 Delitem(scanner_ccode,0);
5573 Delitem(scanner_ccode,DOH_END);
5574 code = Copy(scanner_ccode);
5575 Setattr((yyval.node),"code", code);
5576 Delete(code);
5577 cpps=Copy(scanner_ccode);
5578 start_inline(Char(cpps), start_line);
5579 Delete(cpps);
5580 }
5581 }
5582 #line 5583 "y.tab.c" /* yacc.c:1646 */
5583 break;
5584
5585 case 67:
5586 #line 2247 "parser.y" /* yacc.c:1646 */
5587 {
5588 (yyval.node) = new_node("insert");
5589 Setattr((yyval.node),"code",(yyvsp[0].str));
5590 }
5591 #line 5592 "y.tab.c" /* yacc.c:1646 */
5592 break;
5593
5594 case 68:
5595 #line 2251 "parser.y" /* yacc.c:1646 */
5596 {
5597 String *code = NewStringEmpty();
5598 (yyval.node) = new_node("insert");
5599 Setattr((yyval.node),"section",(yyvsp[-2].id));
5600 Setattr((yyval.node),"code",code);
5601 if (Swig_insert_file((yyvsp[0].str),code) < 0) {
5602 Swig_error(cparse_file, cparse_line, "Couldn't find '%s'.\n", (yyvsp[0].str));
5603 (yyval.node) = 0;
5604 }
5605 }
5606 #line 5607 "y.tab.c" /* yacc.c:1646 */
5607 break;
5608
5609 case 69:
5610 #line 2261 "parser.y" /* yacc.c:1646 */
5611 {
5612 (yyval.node) = new_node("insert");
5613 Setattr((yyval.node),"section",(yyvsp[-2].id));
5614 Setattr((yyval.node),"code",(yyvsp[0].str));
5615 }
5616 #line 5617 "y.tab.c" /* yacc.c:1646 */
5617 break;
5618
5619 case 70:
5620 #line 2266 "parser.y" /* yacc.c:1646 */
5621 {
5622 String *code;
5623 skip_balanced('{','}');
5624 (yyval.node) = new_node("insert");
5625 Setattr((yyval.node),"section",(yyvsp[-2].id));
5626 Delitem(scanner_ccode,0);
5627 Delitem(scanner_ccode,DOH_END);
5628 code = Copy(scanner_ccode);
5629 Setattr((yyval.node),"code", code);
5630 Delete(code);
5631 }
5632 #line 5633 "y.tab.c" /* yacc.c:1646 */
5633 break;
5634
5635 case 71:
5636 #line 2284 "parser.y" /* yacc.c:1646 */
5637 {
5638 (yyval.node) = new_node("module");
5639 if ((yyvsp[-1].node)) {
5640 Setattr((yyval.node),"options",(yyvsp[-1].node));
5641 if (Getattr((yyvsp[-1].node),"directors")) {
5642 Wrapper_director_mode_set(1);
5643 if (!cparse_cplusplus) {
5644 Swig_error(cparse_file, cparse_line, "Directors are not supported for C code and require the -c++ option\n");
5645 }
5646 }
5647 if (Getattr((yyvsp[-1].node),"dirprot")) {
5648 Wrapper_director_protected_mode_set(1);
5649 }
5650 if (Getattr((yyvsp[-1].node),"allprotected")) {
5651 Wrapper_all_protected_mode_set(1);
5652 }
5653 if (Getattr((yyvsp[-1].node),"templatereduce")) {
5654 template_reduce = 1;
5655 }
5656 if (Getattr((yyvsp[-1].node),"notemplatereduce")) {
5657 template_reduce = 0;
5658 }
5659 }
5660 if (!ModuleName) ModuleName = NewString((yyvsp[0].id));
5661 if (!import_mode) {
5662 /* first module included, we apply global
5663 ModuleName, which can be modify by -module */
5664 String *mname = Copy(ModuleName);
5665 Setattr((yyval.node),"name",mname);
5666 Delete(mname);
5667 } else {
5668 /* import mode, we just pass the idstring */
5669 Setattr((yyval.node),"name",(yyvsp[0].id));
5670 }
5671 if (!module_node) module_node = (yyval.node);
5672 }
5673 #line 5674 "y.tab.c" /* yacc.c:1646 */
5674 break;
5675
5676 case 72:
5677 #line 2327 "parser.y" /* yacc.c:1646 */
5678 {
5679 Swig_warning(WARN_DEPRECATED_NAME,cparse_file,cparse_line, "%%name is deprecated. Use %%rename instead.\n");
5680 Delete(yyrename);
5681 yyrename = NewString((yyvsp[-1].id));
5682 (yyval.node) = 0;
5683 }
5684 #line 5685 "y.tab.c" /* yacc.c:1646 */
5685 break;
5686
5687 case 73:
5688 #line 2333 "parser.y" /* yacc.c:1646 */
5689 {
5690 Swig_warning(WARN_DEPRECATED_NAME,cparse_file,cparse_line, "%%name is deprecated. Use %%rename instead.\n");
5691 (yyval.node) = 0;
5692 Swig_error(cparse_file,cparse_line,"Missing argument to %%name directive.\n");
5693 }
5694 #line 5695 "y.tab.c" /* yacc.c:1646 */
5695 break;
5696
5697 case 74:
5698 #line 2346 "parser.y" /* yacc.c:1646 */
5699 {
5700 (yyval.node) = new_node("native");
5701 Setattr((yyval.node),"name",(yyvsp[-4].id));
5702 Setattr((yyval.node),"wrap:name",(yyvsp[-1].id));
5703 add_symbols((yyval.node));
5704 }
5705 #line 5706 "y.tab.c" /* yacc.c:1646 */
5706 break;
5707
5708 case 75:
5709 #line 2352 "parser.y" /* yacc.c:1646 */
5710 {
5711 if (!SwigType_isfunction((yyvsp[-1].decl).type)) {
5712 Swig_error(cparse_file,cparse_line,"%%native declaration '%s' is not a function.\n", (yyvsp[-1].decl).id);
5713 (yyval.node) = 0;
5714 } else {
5715 Delete(SwigType_pop_function((yyvsp[-1].decl).type));
5716 /* Need check for function here */
5717 SwigType_push((yyvsp[-2].type),(yyvsp[-1].decl).type);
5718 (yyval.node) = new_node("native");
5719 Setattr((yyval.node),"name",(yyvsp[-5].id));
5720 Setattr((yyval.node),"wrap:name",(yyvsp[-1].decl).id);
5721 Setattr((yyval.node),"type",(yyvsp[-2].type));
5722 Setattr((yyval.node),"parms",(yyvsp[-1].decl).parms);
5723 Setattr((yyval.node),"decl",(yyvsp[-1].decl).type);
5724 }
5725 add_symbols((yyval.node));
5726 }
5727 #line 5728 "y.tab.c" /* yacc.c:1646 */
5728 break;
5729
5730 case 76:
5731 #line 2378 "parser.y" /* yacc.c:1646 */
5732 {
5733 (yyval.node) = new_node("pragma");
5734 Setattr((yyval.node),"lang",(yyvsp[-3].id));
5735 Setattr((yyval.node),"name",(yyvsp[-2].id));
5736 Setattr((yyval.node),"value",(yyvsp[0].str));
5737 }
5738 #line 5739 "y.tab.c" /* yacc.c:1646 */
5739 break;
5740
5741 case 77:
5742 #line 2384 "parser.y" /* yacc.c:1646 */
5743 {
5744 (yyval.node) = new_node("pragma");
5745 Setattr((yyval.node),"lang",(yyvsp[-1].id));
5746 Setattr((yyval.node),"name",(yyvsp[0].id));
5747 }
5748 #line 5749 "y.tab.c" /* yacc.c:1646 */
5749 break;
5750
5751 case 78:
5752 #line 2391 "parser.y" /* yacc.c:1646 */
5753 { (yyval.str) = (yyvsp[0].str); }
5754 #line 5755 "y.tab.c" /* yacc.c:1646 */
5755 break;
5756
5757 case 79:
5758 #line 2392 "parser.y" /* yacc.c:1646 */
5759 { (yyval.str) = (yyvsp[0].str); }
5760 #line 5761 "y.tab.c" /* yacc.c:1646 */
5761 break;
5762
5763 case 80:
5764 #line 2395 "parser.y" /* yacc.c:1646 */
5765 { (yyval.id) = (yyvsp[-1].id); }
5766 #line 5767 "y.tab.c" /* yacc.c:1646 */
5767 break;
5768
5769 case 81:
5770 #line 2396 "parser.y" /* yacc.c:1646 */
5771 { (yyval.id) = (char *) "swig"; }
5772 #line 5773 "y.tab.c" /* yacc.c:1646 */
5773 break;
5774
5775 case 82:
5776 #line 2403 "parser.y" /* yacc.c:1646 */
5777 {
5778 SwigType *t = (yyvsp[-2].decl).type;
5779 Hash *kws = NewHash();
5780 String *fixname;
5781 fixname = feature_identifier_fix((yyvsp[-2].decl).id);
5782 Setattr(kws,"name",(yyvsp[-1].id));
5783 if (!Len(t)) t = 0;
5784 /* Special declarator check */
5785 if (t) {
5786 if (SwigType_isfunction(t)) {
5787 SwigType *decl = SwigType_pop_function(t);
5788 if (SwigType_ispointer(t)) {
5789 String *nname = NewStringf("*%s",fixname);
5790 if ((yyvsp[-3].intvalue)) {
5791 Swig_name_rename_add(Namespaceprefix, nname,decl,kws,(yyvsp[-2].decl).parms);
5792 } else {
5793 Swig_name_namewarn_add(Namespaceprefix,nname,decl,kws);
5794 }
5795 Delete(nname);
5796 } else {
5797 if ((yyvsp[-3].intvalue)) {
5798 Swig_name_rename_add(Namespaceprefix,(fixname),decl,kws,(yyvsp[-2].decl).parms);
5799 } else {
5800 Swig_name_namewarn_add(Namespaceprefix,(fixname),decl,kws);
5801 }
5802 }
5803 Delete(decl);
5804 } else if (SwigType_ispointer(t)) {
5805 String *nname = NewStringf("*%s",fixname);
5806 if ((yyvsp[-3].intvalue)) {
5807 Swig_name_rename_add(Namespaceprefix,(nname),0,kws,(yyvsp[-2].decl).parms);
5808 } else {
5809 Swig_name_namewarn_add(Namespaceprefix,(nname),0,kws);
5810 }
5811 Delete(nname);
5812 }
5813 } else {
5814 if ((yyvsp[-3].intvalue)) {
5815 Swig_name_rename_add(Namespaceprefix,(fixname),0,kws,(yyvsp[-2].decl).parms);
5816 } else {
5817 Swig_name_namewarn_add(Namespaceprefix,(fixname),0,kws);
5818 }
5819 }
5820 (yyval.node) = 0;
5821 scanner_clear_rename();
5822 }
5823 #line 5824 "y.tab.c" /* yacc.c:1646 */
5824 break;
5825
5826 case 83:
5827 #line 2449 "parser.y" /* yacc.c:1646 */
5828 {
5829 String *fixname;
5830 Hash *kws = (yyvsp[-4].node);
5831 SwigType *t = (yyvsp[-2].decl).type;
5832 fixname = feature_identifier_fix((yyvsp[-2].decl).id);
5833 if (!Len(t)) t = 0;
5834 /* Special declarator check */
5835 if (t) {
5836 if ((yyvsp[-1].dtype).qualifier) SwigType_push(t,(yyvsp[-1].dtype).qualifier);
5837 if (SwigType_isfunction(t)) {
5838 SwigType *decl = SwigType_pop_function(t);
5839 if (SwigType_ispointer(t)) {
5840 String *nname = NewStringf("*%s",fixname);
5841 if ((yyvsp[-6].intvalue)) {
5842 Swig_name_rename_add(Namespaceprefix, nname,decl,kws,(yyvsp[-2].decl).parms);
5843 } else {
5844 Swig_name_namewarn_add(Namespaceprefix,nname,decl,kws);
5845 }
5846 Delete(nname);
5847 } else {
5848 if ((yyvsp[-6].intvalue)) {
5849 Swig_name_rename_add(Namespaceprefix,(fixname),decl,kws,(yyvsp[-2].decl).parms);
5850 } else {
5851 Swig_name_namewarn_add(Namespaceprefix,(fixname),decl,kws);
5852 }
5853 }
5854 Delete(decl);
5855 } else if (SwigType_ispointer(t)) {
5856 String *nname = NewStringf("*%s",fixname);
5857 if ((yyvsp[-6].intvalue)) {
5858 Swig_name_rename_add(Namespaceprefix,(nname),0,kws,(yyvsp[-2].decl).parms);
5859 } else {
5860 Swig_name_namewarn_add(Namespaceprefix,(nname),0,kws);
5861 }
5862 Delete(nname);
5863 }
5864 } else {
5865 if ((yyvsp[-6].intvalue)) {
5866 Swig_name_rename_add(Namespaceprefix,(fixname),0,kws,(yyvsp[-2].decl).parms);
5867 } else {
5868 Swig_name_namewarn_add(Namespaceprefix,(fixname),0,kws);
5869 }
5870 }
5871 (yyval.node) = 0;
5872 scanner_clear_rename();
5873 }
5874 #line 5875 "y.tab.c" /* yacc.c:1646 */
5875 break;
5876
5877 case 84:
5878 #line 2495 "parser.y" /* yacc.c:1646 */
5879 {
5880 if ((yyvsp[-5].intvalue)) {
5881 Swig_name_rename_add(Namespaceprefix,(yyvsp[-1].str),0,(yyvsp[-3].node),0);
5882 } else {
5883 Swig_name_namewarn_add(Namespaceprefix,(yyvsp[-1].str),0,(yyvsp[-3].node));
5884 }
5885 (yyval.node) = 0;
5886 scanner_clear_rename();
5887 }
5888 #line 5889 "y.tab.c" /* yacc.c:1646 */
5889 break;
5890
5891 case 85:
5892 #line 2506 "parser.y" /* yacc.c:1646 */
5893 {
5894 (yyval.intvalue) = 1;
5895 }
5896 #line 5897 "y.tab.c" /* yacc.c:1646 */
5897 break;
5898
5899 case 86:
5900 #line 2509 "parser.y" /* yacc.c:1646 */
5901 {
5902 (yyval.intvalue) = 0;
5903 }
5904 #line 5905 "y.tab.c" /* yacc.c:1646 */
5905 break;
5906
5907 case 87:
5908 #line 2536 "parser.y" /* yacc.c:1646 */
5909 {
5910 String *val = (yyvsp[0].str) ? NewString((yyvsp[0].str)) : NewString("1");
5911 new_feature((yyvsp[-4].id), val, 0, (yyvsp[-2].decl).id, (yyvsp[-2].decl).type, (yyvsp[-2].decl).parms, (yyvsp[-1].dtype).qualifier);
5912 (yyval.node) = 0;
5913 scanner_clear_rename();
5914 }
5915 #line 5916 "y.tab.c" /* yacc.c:1646 */
5916 break;
5917
5918 case 88:
5919 #line 2542 "parser.y" /* yacc.c:1646 */
5920 {
5921 String *val = Len((yyvsp[-4].str)) ? (yyvsp[-4].str) : 0;
5922 new_feature((yyvsp[-6].id), val, 0, (yyvsp[-2].decl).id, (yyvsp[-2].decl).type, (yyvsp[-2].decl).parms, (yyvsp[-1].dtype).qualifier);
5923 (yyval.node) = 0;
5924 scanner_clear_rename();
5925 }
5926 #line 5927 "y.tab.c" /* yacc.c:1646 */
5927 break;
5928
5929 case 89:
5930 #line 2548 "parser.y" /* yacc.c:1646 */
5931 {
5932 String *val = (yyvsp[0].str) ? NewString((yyvsp[0].str)) : NewString("1");
5933 new_feature((yyvsp[-5].id), val, (yyvsp[-4].node), (yyvsp[-2].decl).id, (yyvsp[-2].decl).type, (yyvsp[-2].decl).parms, (yyvsp[-1].dtype).qualifier);
5934 (yyval.node) = 0;
5935 scanner_clear_rename();
5936 }
5937 #line 5938 "y.tab.c" /* yacc.c:1646 */
5938 break;
5939
5940 case 90:
5941 #line 2554 "parser.y" /* yacc.c:1646 */
5942 {
5943 String *val = Len((yyvsp[-5].str)) ? (yyvsp[-5].str) : 0;
5944 new_feature((yyvsp[-7].id), val, (yyvsp[-4].node), (yyvsp[-2].decl).id, (yyvsp[-2].decl).type, (yyvsp[-2].decl).parms, (yyvsp[-1].dtype).qualifier);
5945 (yyval.node) = 0;
5946 scanner_clear_rename();
5947 }
5948 #line 5949 "y.tab.c" /* yacc.c:1646 */
5949 break;
5950
5951 case 91:
5952 #line 2562 "parser.y" /* yacc.c:1646 */
5953 {
5954 String *val = (yyvsp[0].str) ? NewString((yyvsp[0].str)) : NewString("1");
5955 new_feature((yyvsp[-2].id), val, 0, 0, 0, 0, 0);
5956 (yyval.node) = 0;
5957 scanner_clear_rename();
5958 }
5959 #line 5960 "y.tab.c" /* yacc.c:1646 */
5960 break;
5961
5962 case 92:
5963 #line 2568 "parser.y" /* yacc.c:1646 */
5964 {
5965 String *val = Len((yyvsp[-2].str)) ? (yyvsp[-2].str) : 0;
5966 new_feature((yyvsp[-4].id), val, 0, 0, 0, 0, 0);
5967 (yyval.node) = 0;
5968 scanner_clear_rename();
5969 }
5970 #line 5971 "y.tab.c" /* yacc.c:1646 */
5971 break;
5972
5973 case 93:
5974 #line 2574 "parser.y" /* yacc.c:1646 */
5975 {
5976 String *val = (yyvsp[0].str) ? NewString((yyvsp[0].str)) : NewString("1");
5977 new_feature((yyvsp[-3].id), val, (yyvsp[-2].node), 0, 0, 0, 0);
5978 (yyval.node) = 0;
5979 scanner_clear_rename();
5980 }
5981 #line 5982 "y.tab.c" /* yacc.c:1646 */
5982 break;
5983
5984 case 94:
5985 #line 2580 "parser.y" /* yacc.c:1646 */
5986 {
5987 String *val = Len((yyvsp[-3].str)) ? (yyvsp[-3].str) : 0;
5988 new_feature((yyvsp[-5].id), val, (yyvsp[-2].node), 0, 0, 0, 0);
5989 (yyval.node) = 0;
5990 scanner_clear_rename();
5991 }
5992 #line 5993 "y.tab.c" /* yacc.c:1646 */
5993 break;
5994
5995 case 95:
5996 #line 2588 "parser.y" /* yacc.c:1646 */
5997 { (yyval.str) = (yyvsp[0].str); }
5998 #line 5999 "y.tab.c" /* yacc.c:1646 */
5999 break;
6000
6001 case 96:
6002 #line 2589 "parser.y" /* yacc.c:1646 */
6003 { (yyval.str) = 0; }
6004 #line 6005 "y.tab.c" /* yacc.c:1646 */
6005 break;
6006
6007 case 97:
6008 #line 2590 "parser.y" /* yacc.c:1646 */
6009 { (yyval.str) = (yyvsp[-2].pl); }
6010 #line 6011 "y.tab.c" /* yacc.c:1646 */
6011 break;
6012
6013 case 98:
6014 #line 2593 "parser.y" /* yacc.c:1646 */
6015 {
6016 (yyval.node) = NewHash();
6017 Setattr((yyval.node),"name",(yyvsp[-2].id));
6018 Setattr((yyval.node),"value",(yyvsp[0].str));
6019 }
6020 #line 6021 "y.tab.c" /* yacc.c:1646 */
6021 break;
6022
6023 case 99:
6024 #line 2598 "parser.y" /* yacc.c:1646 */
6025 {
6026 (yyval.node) = NewHash();
6027 Setattr((yyval.node),"name",(yyvsp[-3].id));
6028 Setattr((yyval.node),"value",(yyvsp[-1].str));
6029 set_nextSibling((yyval.node),(yyvsp[0].node));
6030 }
6031 #line 6032 "y.tab.c" /* yacc.c:1646 */
6032 break;
6033
6034 case 100:
6035 #line 2608 "parser.y" /* yacc.c:1646 */
6036 {
6037 Parm *val;
6038 String *name;
6039 SwigType *t;
6040 if (Namespaceprefix) name = NewStringf("%s::%s", Namespaceprefix, (yyvsp[-2].decl).id);
6041 else name = NewString((yyvsp[-2].decl).id);
6042 val = (yyvsp[-4].pl);
6043 if ((yyvsp[-2].decl).parms) {
6044 Setmeta(val,"parms",(yyvsp[-2].decl).parms);
6045 }
6046 t = (yyvsp[-2].decl).type;
6047 if (!Len(t)) t = 0;
6048 if (t) {
6049 if ((yyvsp[-1].dtype).qualifier) SwigType_push(t,(yyvsp[-1].dtype).qualifier);
6050 if (SwigType_isfunction(t)) {
6051 SwigType *decl = SwigType_pop_function(t);
6052 if (SwigType_ispointer(t)) {
6053 String *nname = NewStringf("*%s",name);
6054 Swig_feature_set(Swig_cparse_features(), nname, decl, "feature:varargs", val, 0);
6055 Delete(nname);
6056 } else {
6057 Swig_feature_set(Swig_cparse_features(), name, decl, "feature:varargs", val, 0);
6058 }
6059 Delete(decl);
6060 } else if (SwigType_ispointer(t)) {
6061 String *nname = NewStringf("*%s",name);
6062 Swig_feature_set(Swig_cparse_features(),nname,0,"feature:varargs",val, 0);
6063 Delete(nname);
6064 }
6065 } else {
6066 Swig_feature_set(Swig_cparse_features(),name,0,"feature:varargs",val, 0);
6067 }
6068 Delete(name);
6069 (yyval.node) = 0;
6070 }
6071 #line 6072 "y.tab.c" /* yacc.c:1646 */
6072 break;
6073
6074 case 101:
6075 #line 2644 "parser.y" /* yacc.c:1646 */
6076 { (yyval.pl) = (yyvsp[0].pl); }
6077 #line 6078 "y.tab.c" /* yacc.c:1646 */
6078 break;
6079
6080 case 102:
6081 #line 2645 "parser.y" /* yacc.c:1646 */
6082 {
6083 int i;
6084 int n;
6085 Parm *p;
6086 n = atoi(Char((yyvsp[-2].dtype).val));
6087 if (n <= 0) {
6088 Swig_error(cparse_file, cparse_line,"Argument count in %%varargs must be positive.\n");
6089 (yyval.pl) = 0;
6090 } else {
6091 String *name = Getattr((yyvsp[0].p), "name");
6092 (yyval.pl) = Copy((yyvsp[0].p));
6093 if (name)
6094 Setattr((yyval.pl), "name", NewStringf("%s%d", name, n));
6095 for (i = 1; i < n; i++) {
6096 p = Copy((yyvsp[0].p));
6097 name = Getattr(p, "name");
6098 if (name)
6099 Setattr(p, "name", NewStringf("%s%d", name, n-i));
6100 set_nextSibling(p,(yyval.pl));
6101 Delete((yyval.pl));
6102 (yyval.pl) = p;
6103 }
6104 }
6105 }
6106 #line 6107 "y.tab.c" /* yacc.c:1646 */
6107 break;
6108
6109 case 103:
6110 #line 2680 "parser.y" /* yacc.c:1646 */
6111 {
6112 (yyval.node) = 0;
6113 if ((yyvsp[-3].tmap).method) {
6114 String *code = 0;
6115 (yyval.node) = new_node("typemap");
6116 Setattr((yyval.node),"method",(yyvsp[-3].tmap).method);
6117 if ((yyvsp[-3].tmap).kwargs) {
6118 ParmList *kw = (yyvsp[-3].tmap).kwargs;
6119 code = remove_block(kw, (yyvsp[0].str));
6120 Setattr((yyval.node),"kwargs", (yyvsp[-3].tmap).kwargs);
6121 }
6122 code = code ? code : NewString((yyvsp[0].str));
6123 Setattr((yyval.node),"code", code);
6124 Delete(code);
6125 appendChild((yyval.node),(yyvsp[-1].p));
6126 }
6127 }
6128 #line 6129 "y.tab.c" /* yacc.c:1646 */
6129 break;
6130
6131 case 104:
6132 #line 2697 "parser.y" /* yacc.c:1646 */
6133 {
6134 (yyval.node) = 0;
6135 if ((yyvsp[-3].tmap).method) {
6136 (yyval.node) = new_node("typemap");
6137 Setattr((yyval.node),"method",(yyvsp[-3].tmap).method);
6138 appendChild((yyval.node),(yyvsp[-1].p));
6139 }
6140 }
6141 #line 6142 "y.tab.c" /* yacc.c:1646 */
6142 break;
6143
6144 case 105:
6145 #line 2705 "parser.y" /* yacc.c:1646 */
6146 {
6147 (yyval.node) = 0;
6148 if ((yyvsp[-5].tmap).method) {
6149 (yyval.node) = new_node("typemapcopy");
6150 Setattr((yyval.node),"method",(yyvsp[-5].tmap).method);
6151 Setattr((yyval.node),"pattern", Getattr((yyvsp[-1].p),"pattern"));
6152 appendChild((yyval.node),(yyvsp[-3].p));
6153 }
6154 }
6155 #line 6156 "y.tab.c" /* yacc.c:1646 */
6156 break;
6157
6158 case 106:
6159 #line 2718 "parser.y" /* yacc.c:1646 */
6160 {
6161 Hash *p;
6162 String *name;
6163 p = nextSibling((yyvsp[0].node));
6164 if (p && (!Getattr(p,"value"))) {
6165 /* this is the deprecated two argument typemap form */
6166 Swig_warning(WARN_DEPRECATED_TYPEMAP_LANG,cparse_file, cparse_line,
6167 "Specifying the language name in %%typemap is deprecated - use #ifdef SWIG<LANG> instead.\n");
6168 /* two argument typemap form */
6169 name = Getattr((yyvsp[0].node),"name");
6170 if (!name || (Strcmp(name,typemap_lang))) {
6171 (yyval.tmap).method = 0;
6172 (yyval.tmap).kwargs = 0;
6173 } else {
6174 (yyval.tmap).method = Getattr(p,"name");
6175 (yyval.tmap).kwargs = nextSibling(p);
6176 }
6177 } else {
6178 /* one-argument typemap-form */
6179 (yyval.tmap).method = Getattr((yyvsp[0].node),"name");
6180 (yyval.tmap).kwargs = p;
6181 }
6182 }
6183 #line 6184 "y.tab.c" /* yacc.c:1646 */
6184 break;
6185
6186 case 107:
6187 #line 2743 "parser.y" /* yacc.c:1646 */
6188 {
6189 (yyval.p) = (yyvsp[-1].p);
6190 set_nextSibling((yyval.p),(yyvsp[0].p));
6191 }
6192 #line 6193 "y.tab.c" /* yacc.c:1646 */
6193 break;
6194
6195 case 108:
6196 #line 2749 "parser.y" /* yacc.c:1646 */
6197 {
6198 (yyval.p) = (yyvsp[-1].p);
6199 set_nextSibling((yyval.p),(yyvsp[0].p));
6200 }
6201 #line 6202 "y.tab.c" /* yacc.c:1646 */
6202 break;
6203
6204 case 109:
6205 #line 2753 "parser.y" /* yacc.c:1646 */
6206 { (yyval.p) = 0;}
6207 #line 6208 "y.tab.c" /* yacc.c:1646 */
6208 break;
6209
6210 case 110:
6211 #line 2756 "parser.y" /* yacc.c:1646 */
6212 {
6213 Parm *parm;
6214 SwigType_push((yyvsp[-1].type),(yyvsp[0].decl).type);
6215 (yyval.p) = new_node("typemapitem");
6216 parm = NewParmWithoutFileLineInfo((yyvsp[-1].type),(yyvsp[0].decl).id);
6217 Setattr((yyval.p),"pattern",parm);
6218 Setattr((yyval.p),"parms", (yyvsp[0].decl).parms);
6219 Delete(parm);
6220 /* $$ = NewParmWithoutFileLineInfo($1,$2.id);
6221 Setattr($$,"parms",$2.parms); */
6222 }
6223 #line 6224 "y.tab.c" /* yacc.c:1646 */
6224 break;
6225
6226 case 111:
6227 #line 2767 "parser.y" /* yacc.c:1646 */
6228 {
6229 (yyval.p) = new_node("typemapitem");
6230 Setattr((yyval.p),"pattern",(yyvsp[-1].pl));
6231 /* Setattr($$,"multitype",$2); */
6232 }
6233 #line 6234 "y.tab.c" /* yacc.c:1646 */
6234 break;
6235
6236 case 112:
6237 #line 2772 "parser.y" /* yacc.c:1646 */
6238 {
6239 (yyval.p) = new_node("typemapitem");
6240 Setattr((yyval.p),"pattern", (yyvsp[-4].pl));
6241 /* Setattr($$,"multitype",$2); */
6242 Setattr((yyval.p),"parms",(yyvsp[-1].pl));
6243 }
6244 #line 6245 "y.tab.c" /* yacc.c:1646 */
6245 break;
6246
6247 case 113:
6248 #line 2785 "parser.y" /* yacc.c:1646 */
6249 {
6250 (yyval.node) = new_node("types");
6251 Setattr((yyval.node),"parms",(yyvsp[-2].pl));
6252 if ((yyvsp[0].str))
6253 Setattr((yyval.node),"convcode",NewString((yyvsp[0].str)));
6254 }
6255 #line 6256 "y.tab.c" /* yacc.c:1646 */
6256 break;
6257
6258 case 114:
6259 #line 2797 "parser.y" /* yacc.c:1646 */
6260 {
6261 Parm *p, *tp;
6262 Node *n;
6263 Node *outer_class = currentOuterClass;
6264 Symtab *tscope = 0;
6265 int specialized = 0;
6266 int variadic = 0;
6267
6268 (yyval.node) = 0;
6269
6270 tscope = Swig_symbol_current(); /* Get the current scope */
6271
6272 /* If the class name is qualified, we need to create or lookup namespace entries */
6273 (yyvsp[-4].str) = resolve_create_node_scope((yyvsp[-4].str), 0);
6274
6275 if (nscope_inner && Strcmp(nodeType(nscope_inner), "class") == 0) {
6276 outer_class = nscope_inner;
6277 }
6278
6279 /*
6280 We use the new namespace entry 'nscope' only to
6281 emit the template node. The template parameters are
6282 resolved in the current 'tscope'.
6283
6284 This is closer to the C++ (typedef) behavior.
6285 */
6286 n = Swig_cparse_template_locate((yyvsp[-4].str),(yyvsp[-2].p),tscope);
6287
6288 /* Patch the argument types to respect namespaces */
6289 p = (yyvsp[-2].p);
6290 while (p) {
6291 SwigType *value = Getattr(p,"value");
6292 if (!value) {
6293 SwigType *ty = Getattr(p,"type");
6294 if (ty) {
6295 SwigType *rty = 0;
6296 int reduce = template_reduce;
6297 if (reduce || !SwigType_ispointer(ty)) {
6298 rty = Swig_symbol_typedef_reduce(ty,tscope);
6299 if (!reduce) reduce = SwigType_ispointer(rty);
6300 }
6301 ty = reduce ? Swig_symbol_type_qualify(rty,tscope) : Swig_symbol_type_qualify(ty,tscope);
6302 Setattr(p,"type",ty);
6303 Delete(ty);
6304 Delete(rty);
6305 }
6306 } else {
6307 value = Swig_symbol_type_qualify(value,tscope);
6308 Setattr(p,"value",value);
6309 Delete(value);
6310 }
6311
6312 p = nextSibling(p);
6313 }
6314
6315 /* Look for the template */
6316 {
6317 Node *nn = n;
6318 Node *linklistend = 0;
6319 Node *linkliststart = 0;
6320 while (nn) {
6321 Node *templnode = 0;
6322 if (Strcmp(nodeType(nn),"template") == 0) {
6323 int nnisclass = (Strcmp(Getattr(nn,"templatetype"),"class") == 0); /* if not a templated class it is a templated function */
6324 Parm *tparms = Getattr(nn,"templateparms");
6325 if (!tparms) {
6326 specialized = 1;
6327 } else if (Getattr(tparms,"variadic") && strncmp(Char(Getattr(tparms,"variadic")), "1", 1)==0) {
6328 variadic = 1;
6329 }
6330 if (nnisclass && !variadic && !specialized && (ParmList_len((yyvsp[-2].p)) > ParmList_len(tparms))) {
6331 Swig_error(cparse_file, cparse_line, "Too many template parameters. Maximum of %d.\n", ParmList_len(tparms));
6332 } else if (nnisclass && !specialized && ((ParmList_len((yyvsp[-2].p)) < (ParmList_numrequired(tparms) - (variadic?1:0))))) { /* Variadic parameter is optional */
6333 Swig_error(cparse_file, cparse_line, "Not enough template parameters specified. %d required.\n", (ParmList_numrequired(tparms)-(variadic?1:0)) );
6334 } else if (!nnisclass && ((ParmList_len((yyvsp[-2].p)) != ParmList_len(tparms)))) {
6335 /* must be an overloaded templated method - ignore it as it is overloaded with a different number of template parameters */
6336 nn = Getattr(nn,"sym:nextSibling"); /* repeat for overloaded templated functions */
6337 continue;
6338 } else {
6339 String *tname = Copy((yyvsp[-4].str));
6340 int def_supplied = 0;
6341 /* Expand the template */
6342 Node *templ = Swig_symbol_clookup((yyvsp[-4].str),0);
6343 Parm *targs = templ ? Getattr(templ,"templateparms") : 0;
6344
6345 ParmList *temparms;
6346 if (specialized) temparms = CopyParmList((yyvsp[-2].p));
6347 else temparms = CopyParmList(tparms);
6348
6349 /* Create typedef's and arguments */
6350 p = (yyvsp[-2].p);
6351 tp = temparms;
6352 if (!p && ParmList_len(p) != ParmList_len(temparms)) {
6353 /* we have no template parameters supplied in %template for a template that has default args*/
6354 p = tp;
6355 def_supplied = 1;
6356 }
6357
6358 while (p) {
6359 String *value = Getattr(p,"value");
6360 if (def_supplied) {
6361 Setattr(p,"default","1");
6362 }
6363 if (value) {
6364 Setattr(tp,"value",value);
6365 } else {
6366 SwigType *ty = Getattr(p,"type");
6367 if (ty) {
6368 Setattr(tp,"type",ty);
6369 }
6370 Delattr(tp,"value");
6371 }
6372 /* fix default arg values */
6373 if (targs) {
6374 Parm *pi = temparms;
6375 Parm *ti = targs;
6376 String *tv = Getattr(tp,"value");
6377 if (!tv) tv = Getattr(tp,"type");
6378 while(pi != tp && ti && pi) {
6379 String *name = Getattr(ti,"name");
6380 String *value = Getattr(pi,"value");
6381 if (!value) value = Getattr(pi,"type");
6382 Replaceid(tv, name, value);
6383 pi = nextSibling(pi);
6384 ti = nextSibling(ti);
6385 }
6386 }
6387 p = nextSibling(p);
6388 tp = nextSibling(tp);
6389 if (!p && tp) {
6390 p = tp;
6391 def_supplied = 1;
6392 } else if (p && !tp) { /* Variadic template - tp < p */
6393 SWIG_WARN_NODE_BEGIN(nn);
6394 Swig_warning(WARN_CPP11_VARIADIC_TEMPLATE,cparse_file, cparse_line,"Only the first variadic template argument is currently supported.\n");
6395 SWIG_WARN_NODE_END(nn);
6396 break;
6397 }
6398 }
6399
6400 templnode = copy_node(nn);
6401 update_nested_classes(templnode); /* update classes nested within template */
6402 /* We need to set the node name based on name used to instantiate */
6403 Setattr(templnode,"name",tname);
6404 Delete(tname);
6405 if (!specialized) {
6406 Delattr(templnode,"sym:typename");
6407 } else {
6408 Setattr(templnode,"sym:typename","1");
6409 }
6410 /* for now, nested %template is allowed only in the same scope as the template declaration */
6411 if ((yyvsp[-6].id) && !(nnisclass && ((outer_class && (outer_class != Getattr(nn, "nested:outer")))
6412 ||(extendmode && current_class && (current_class != Getattr(nn, "nested:outer")))))) {
6413 /*
6414 Comment this out for 1.3.28. We need to
6415 re-enable it later but first we need to
6416 move %ignore from using %rename to use
6417 %feature(ignore).
6418
6419 String *symname = Swig_name_make(templnode,0,$3,0,0);
6420 */
6421 String *symname = NewString((yyvsp[-6].id));
6422 Swig_cparse_template_expand(templnode,symname,temparms,tscope);
6423 Setattr(templnode,"sym:name",symname);
6424 } else {
6425 static int cnt = 0;
6426 String *nname = NewStringf("__dummy_%d__", cnt++);
6427 Swig_cparse_template_expand(templnode,nname,temparms,tscope);
6428 Setattr(templnode,"sym:name",nname);
6429 Delete(nname);
6430 Setattr(templnode,"feature:onlychildren", "typemap,typemapitem,typemapcopy,typedef,types,fragment,apply");
6431 if ((yyvsp[-6].id)) {
6432 Swig_warning(WARN_PARSE_NESTED_TEMPLATE, cparse_file, cparse_line, "Named nested template instantiations not supported. Processing as if no name was given to %%template().\n");
6433 }
6434 }
6435 Delattr(templnode,"templatetype");
6436 Setattr(templnode,"template",nn);
6437 Setfile(templnode,cparse_file);
6438 Setline(templnode,cparse_line);
6439 Delete(temparms);
6440 if (outer_class && nnisclass) {
6441 SetFlag(templnode, "nested");
6442 Setattr(templnode, "nested:outer", outer_class);
6443 }
6444 add_symbols_copy(templnode);
6445
6446 if (Strcmp(nodeType(templnode),"class") == 0) {
6447
6448 /* Identify pure abstract methods */
6449 Setattr(templnode,"abstracts", pure_abstracts(firstChild(templnode)));
6450
6451 /* Set up inheritance in symbol table */
6452 {
6453 Symtab *csyms;
6454 List *baselist = Getattr(templnode,"baselist");
6455 csyms = Swig_symbol_current();
6456 Swig_symbol_setscope(Getattr(templnode,"symtab"));
6457 if (baselist) {
6458 List *bases = Swig_make_inherit_list(Getattr(templnode,"name"),baselist, Namespaceprefix);
6459 if (bases) {
6460 Iterator s;
6461 for (s = First(bases); s.item; s = Next(s)) {
6462 Symtab *st = Getattr(s.item,"symtab");
6463 if (st) {
6464 Setfile(st,Getfile(s.item));
6465 Setline(st,Getline(s.item));
6466 Swig_symbol_inherit(st);
6467 }
6468 }
6469 Delete(bases);
6470 }
6471 }
6472 Swig_symbol_setscope(csyms);
6473 }
6474
6475 /* Merge in %extend methods for this class.
6476 This only merges methods within %extend for a template specialized class such as
6477 template<typename T> class K {}; %extend K<int> { ... }
6478 The copy_node() call above has already added in the generic %extend methods such as
6479 template<typename T> class K {}; %extend K { ... } */
6480
6481 /* !!! This may be broken. We may have to add the
6482 %extend methods at the beginning of the class */
6483 {
6484 String *stmp = 0;
6485 String *clsname;
6486 Node *am;
6487 if (Namespaceprefix) {
6488 clsname = stmp = NewStringf("%s::%s", Namespaceprefix, Getattr(templnode,"name"));
6489 } else {
6490 clsname = Getattr(templnode,"name");
6491 }
6492 am = Getattr(Swig_extend_hash(),clsname);
6493 if (am) {
6494 Symtab *st = Swig_symbol_current();
6495 Swig_symbol_setscope(Getattr(templnode,"symtab"));
6496 /* Printf(stdout,"%s: %s %p %p\n", Getattr(templnode,"name"), clsname, Swig_symbol_current(), Getattr(templnode,"symtab")); */
6497 Swig_extend_merge(templnode,am);
6498 Swig_symbol_setscope(st);
6499 Swig_extend_append_previous(templnode,am);
6500 Delattr(Swig_extend_hash(),clsname);
6501 }
6502 if (stmp) Delete(stmp);
6503 }
6504
6505 /* Add to classes hash */
6506 if (!classes)
6507 classes = NewHash();
6508
6509 if (Namespaceprefix) {
6510 String *temp = NewStringf("%s::%s", Namespaceprefix, Getattr(templnode,"name"));
6511 Setattr(classes,temp,templnode);
6512 Delete(temp);
6513 } else {
6514 String *qs = Swig_symbol_qualifiedscopename(templnode);
6515 Setattr(classes, qs,templnode);
6516 Delete(qs);
6517 }
6518 }
6519 }
6520
6521 /* all the overloaded templated functions are added into a linked list */
6522 if (!linkliststart)
6523 linkliststart = templnode;
6524 if (nscope_inner) {
6525 /* non-global namespace */
6526 if (templnode) {
6527 appendChild(nscope_inner,templnode);
6528 Delete(templnode);
6529 if (nscope) (yyval.node) = nscope;
6530 }
6531 } else {
6532 /* global namespace */
6533 if (!linklistend) {
6534 (yyval.node) = templnode;
6535 } else {
6536 set_nextSibling(linklistend,templnode);
6537 Delete(templnode);
6538 }
6539 linklistend = templnode;
6540 }
6541 }
6542 nn = Getattr(nn,"sym:nextSibling"); /* repeat for overloaded templated functions. If a templated class there will never be a sibling. */
6543 }
6544 update_defaultargs(linkliststart);
6545 update_abstracts(linkliststart);
6546 }
6547 Swig_symbol_setscope(tscope);
6548 Delete(Namespaceprefix);
6549 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6550 }
6551 #line 6552 "y.tab.c" /* yacc.c:1646 */
6552 break;
6553
6554 case 115:
6555 #line 3095 "parser.y" /* yacc.c:1646 */
6556 {
6557 Swig_warning(0,cparse_file, cparse_line,"%s\n", (yyvsp[0].str));
6558 (yyval.node) = 0;
6559 }
6560 #line 6561 "y.tab.c" /* yacc.c:1646 */
6561 break;
6562
6563 case 116:
6564 #line 3105 "parser.y" /* yacc.c:1646 */
6565 {
6566 (yyval.node) = (yyvsp[0].node);
6567 if ((yyval.node)) {
6568 add_symbols((yyval.node));
6569 default_arguments((yyval.node));
6570 }
6571 }
6572 #line 6573 "y.tab.c" /* yacc.c:1646 */
6573 break;
6574
6575 case 117:
6576 #line 3112 "parser.y" /* yacc.c:1646 */
6577 { (yyval.node) = (yyvsp[0].node); }
6578 #line 6579 "y.tab.c" /* yacc.c:1646 */
6579 break;
6580
6581 case 118:
6582 #line 3113 "parser.y" /* yacc.c:1646 */
6583 { (yyval.node) = (yyvsp[0].node); }
6584 #line 6585 "y.tab.c" /* yacc.c:1646 */
6585 break;
6586
6587 case 119:
6588 #line 3117 "parser.y" /* yacc.c:1646 */
6589 {
6590 if (Strcmp((yyvsp[-1].str),"C") == 0) {
6591 cparse_externc = 1;
6592 }
6593 }
6594 #line 6595 "y.tab.c" /* yacc.c:1646 */
6595 break;
6596
6597 case 120:
6598 #line 3121 "parser.y" /* yacc.c:1646 */
6599 {
6600 cparse_externc = 0;
6601 if (Strcmp((yyvsp[-4].str),"C") == 0) {
6602 Node *n = firstChild((yyvsp[-1].node));
6603 (yyval.node) = new_node("extern");
6604 Setattr((yyval.node),"name",(yyvsp[-4].str));
6605 appendChild((yyval.node),n);
6606 while (n) {
6607 SwigType *decl = Getattr(n,"decl");
6608 if (SwigType_isfunction(decl) && !Equal(Getattr(n, "storage"), "typedef")) {
6609 Setattr(n,"storage","externc");
6610 }
6611 n = nextSibling(n);
6612 }
6613 } else {
6614 Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", (yyvsp[-4].str));
6615 (yyval.node) = new_node("extern");
6616 Setattr((yyval.node),"name",(yyvsp[-4].str));
6617 appendChild((yyval.node),firstChild((yyvsp[-1].node)));
6618 }
6619 }
6620 #line 6621 "y.tab.c" /* yacc.c:1646 */
6621 break;
6622
6623 case 121:
6624 #line 3142 "parser.y" /* yacc.c:1646 */
6625 {
6626 (yyval.node) = (yyvsp[0].node);
6627 SWIG_WARN_NODE_BEGIN((yyval.node));
6628 Swig_warning(WARN_CPP11_LAMBDA, cparse_file, cparse_line, "Lambda expressions and closures are not fully supported yet.\n");
6629 SWIG_WARN_NODE_END((yyval.node));
6630 }
6631 #line 6632 "y.tab.c" /* yacc.c:1646 */
6632 break;
6633
6634 case 122:
6635 #line 3148 "parser.y" /* yacc.c:1646 */
6636 {
6637 /* Convert using statement to a typedef statement */
6638 (yyval.node) = new_node("cdecl");
6639 Setattr((yyval.node),"type",(yyvsp[-2].type));
6640 Setattr((yyval.node),"storage","typedef");
6641 Setattr((yyval.node),"name",(yyvsp[-4].str));
6642 Setattr((yyval.node),"decl",(yyvsp[-1].decl).type);
6643 SetFlag((yyval.node),"typealias");
6644 add_symbols((yyval.node));
6645 }
6646 #line 6647 "y.tab.c" /* yacc.c:1646 */
6647 break;
6648
6649 case 123:
6650 #line 3158 "parser.y" /* yacc.c:1646 */
6651 {
6652 /* Convert alias template to a "template" typedef statement */
6653 (yyval.node) = new_node("template");
6654 Setattr((yyval.node),"type",(yyvsp[-2].type));
6655 Setattr((yyval.node),"storage","typedef");
6656 Setattr((yyval.node),"name",(yyvsp[-4].str));
6657 Setattr((yyval.node),"decl",(yyvsp[-1].decl).type);
6658 Setattr((yyval.node),"templateparms",(yyvsp[-7].tparms));
6659 Setattr((yyval.node),"templatetype","cdecl");
6660 SetFlag((yyval.node),"aliastemplate");
6661 add_symbols((yyval.node));
6662 }
6663 #line 6664 "y.tab.c" /* yacc.c:1646 */
6664 break;
6665
6666 case 124:
6667 #line 3170 "parser.y" /* yacc.c:1646 */
6668 {
6669 (yyval.node) = (yyvsp[0].node);
6670 }
6671 #line 6672 "y.tab.c" /* yacc.c:1646 */
6672 break;
6673
6674 case 125:
6675 #line 3179 "parser.y" /* yacc.c:1646 */
6676 {
6677 String *decl = (yyvsp[-3].decl).type;
6678 (yyval.node) = new_node("cdecl");
6679 if ((yyvsp[-2].dtype).qualifier)
6680 decl = add_qualifier_to_declarator((yyvsp[-3].decl).type, (yyvsp[-2].dtype).qualifier);
6681 Setattr((yyval.node),"refqualifier",(yyvsp[-2].dtype).refqualifier);
6682 Setattr((yyval.node),"type",(yyvsp[-4].type));
6683 Setattr((yyval.node),"storage",(yyvsp[-5].id));
6684 Setattr((yyval.node),"name",(yyvsp[-3].decl).id);
6685 Setattr((yyval.node),"decl",decl);
6686 Setattr((yyval.node),"parms",(yyvsp[-3].decl).parms);
6687 Setattr((yyval.node),"value",(yyvsp[-1].dtype).val);
6688 Setattr((yyval.node),"throws",(yyvsp[-2].dtype).throws);
6689 Setattr((yyval.node),"throw",(yyvsp[-2].dtype).throwf);
6690 Setattr((yyval.node),"noexcept",(yyvsp[-2].dtype).nexcept);
6691 Setattr((yyval.node),"final",(yyvsp[-2].dtype).final);
6692 if ((yyvsp[-1].dtype).val && (yyvsp[-1].dtype).type) {
6693 /* store initializer type as it might be different to the declared type */
6694 SwigType *valuetype = NewSwigType((yyvsp[-1].dtype).type);
6695 if (Len(valuetype) > 0)
6696 Setattr((yyval.node),"valuetype",valuetype);
6697 else
6698 Delete(valuetype);
6699 }
6700 if (!(yyvsp[0].node)) {
6701 if (Len(scanner_ccode)) {
6702 String *code = Copy(scanner_ccode);
6703 Setattr((yyval.node),"code",code);
6704 Delete(code);
6705 }
6706 } else {
6707 Node *n = (yyvsp[0].node);
6708 /* Inherit attributes */
6709 while (n) {
6710 String *type = Copy((yyvsp[-4].type));
6711 Setattr(n,"type",type);
6712 Setattr(n,"storage",(yyvsp[-5].id));
6713 n = nextSibling(n);
6714 Delete(type);
6715 }
6716 }
6717 if ((yyvsp[-1].dtype).bitfield) {
6718 Setattr((yyval.node),"bitfield", (yyvsp[-1].dtype).bitfield);
6719 }
6720
6721 if ((yyvsp[-3].decl).id) {
6722 /* Look for "::" declarations (ignored) */
6723 if (Strstr((yyvsp[-3].decl).id, "::")) {
6724 /* This is a special case. If the scope name of the declaration exactly
6725 matches that of the declaration, then we will allow it. Otherwise, delete. */
6726 String *p = Swig_scopename_prefix((yyvsp[-3].decl).id);
6727 if (p) {
6728 if ((Namespaceprefix && Strcmp(p, Namespaceprefix) == 0) ||
6729 (Classprefix && Strcmp(p, Classprefix) == 0)) {
6730 String *lstr = Swig_scopename_last((yyvsp[-3].decl).id);
6731 Setattr((yyval.node), "name", lstr);
6732 Delete(lstr);
6733 set_nextSibling((yyval.node), (yyvsp[0].node));
6734 } else {
6735 Delete((yyval.node));
6736 (yyval.node) = (yyvsp[0].node);
6737 }
6738 Delete(p);
6739 } else {
6740 Delete((yyval.node));
6741 (yyval.node) = (yyvsp[0].node);
6742 }
6743 } else {
6744 set_nextSibling((yyval.node), (yyvsp[0].node));
6745 }
6746 } else {
6747 Swig_error(cparse_file, cparse_line, "Missing symbol name for global declaration\n");
6748 (yyval.node) = 0;
6749 }
6750
6751 if ((yyvsp[-2].dtype).qualifier && (yyvsp[-5].id) && Strstr((yyvsp[-5].id), "static"))
6752 Swig_error(cparse_file, cparse_line, "Static function %s cannot have a qualifier.\n", Swig_name_decl((yyval.node)));
6753 }
6754 #line 6755 "y.tab.c" /* yacc.c:1646 */
6755 break;
6756
6757 case 126:
6758 #line 3259 "parser.y" /* yacc.c:1646 */
6759 {
6760 (yyval.node) = new_node("cdecl");
6761 if ((yyvsp[-5].dtype).qualifier) SwigType_push((yyvsp[-6].decl).type, (yyvsp[-5].dtype).qualifier);
6762 Setattr((yyval.node),"refqualifier",(yyvsp[-5].dtype).refqualifier);
6763 Setattr((yyval.node),"type",(yyvsp[-3].node));
6764 Setattr((yyval.node),"storage",(yyvsp[-8].id));
6765 Setattr((yyval.node),"name",(yyvsp[-6].decl).id);
6766 Setattr((yyval.node),"decl",(yyvsp[-6].decl).type);
6767 Setattr((yyval.node),"parms",(yyvsp[-6].decl).parms);
6768 Setattr((yyval.node),"value",(yyvsp[-5].dtype).val);
6769 Setattr((yyval.node),"throws",(yyvsp[-5].dtype).throws);
6770 Setattr((yyval.node),"throw",(yyvsp[-5].dtype).throwf);
6771 Setattr((yyval.node),"noexcept",(yyvsp[-5].dtype).nexcept);
6772 Setattr((yyval.node),"final",(yyvsp[-5].dtype).final);
6773 if (!(yyvsp[0].node)) {
6774 if (Len(scanner_ccode)) {
6775 String *code = Copy(scanner_ccode);
6776 Setattr((yyval.node),"code",code);
6777 Delete(code);
6778 }
6779 } else {
6780 Node *n = (yyvsp[0].node);
6781 while (n) {
6782 String *type = Copy((yyvsp[-3].node));
6783 Setattr(n,"type",type);
6784 Setattr(n,"storage",(yyvsp[-8].id));
6785 n = nextSibling(n);
6786 Delete(type);
6787 }
6788 }
6789 if ((yyvsp[-5].dtype).bitfield) {
6790 Setattr((yyval.node),"bitfield", (yyvsp[-5].dtype).bitfield);
6791 }
6792
6793 if (Strstr((yyvsp[-6].decl).id,"::")) {
6794 String *p = Swig_scopename_prefix((yyvsp[-6].decl).id);
6795 if (p) {
6796 if ((Namespaceprefix && Strcmp(p, Namespaceprefix) == 0) ||
6797 (Classprefix && Strcmp(p, Classprefix) == 0)) {
6798 String *lstr = Swig_scopename_last((yyvsp[-6].decl).id);
6799 Setattr((yyval.node),"name",lstr);
6800 Delete(lstr);
6801 set_nextSibling((yyval.node), (yyvsp[0].node));
6802 } else {
6803 Delete((yyval.node));
6804 (yyval.node) = (yyvsp[0].node);
6805 }
6806 Delete(p);
6807 } else {
6808 Delete((yyval.node));
6809 (yyval.node) = (yyvsp[0].node);
6810 }
6811 } else {
6812 set_nextSibling((yyval.node), (yyvsp[0].node));
6813 }
6814
6815 if ((yyvsp[-5].dtype).qualifier && (yyvsp[-8].id) && Strstr((yyvsp[-8].id), "static"))
6816 Swig_error(cparse_file, cparse_line, "Static function %s cannot have a qualifier.\n", Swig_name_decl((yyval.node)));
6817 }
6818 #line 6819 "y.tab.c" /* yacc.c:1646 */
6819 break;
6820
6821 case 127:
6822 #line 3322 "parser.y" /* yacc.c:1646 */
6823 {
6824 (yyval.node) = 0;
6825 Clear(scanner_ccode);
6826 }
6827 #line 6828 "y.tab.c" /* yacc.c:1646 */
6828 break;
6829
6830 case 128:
6831 #line 3326 "parser.y" /* yacc.c:1646 */
6832 {
6833 (yyval.node) = new_node("cdecl");
6834 if ((yyvsp[-2].dtype).qualifier) SwigType_push((yyvsp[-3].decl).type,(yyvsp[-2].dtype).qualifier);
6835 Setattr((yyval.node),"refqualifier",(yyvsp[-2].dtype).refqualifier);
6836 Setattr((yyval.node),"name",(yyvsp[-3].decl).id);
6837 Setattr((yyval.node),"decl",(yyvsp[-3].decl).type);
6838 Setattr((yyval.node),"parms",(yyvsp[-3].decl).parms);
6839 Setattr((yyval.node),"value",(yyvsp[-1].dtype).val);
6840 Setattr((yyval.node),"throws",(yyvsp[-2].dtype).throws);
6841 Setattr((yyval.node),"throw",(yyvsp[-2].dtype).throwf);
6842 Setattr((yyval.node),"noexcept",(yyvsp[-2].dtype).nexcept);
6843 Setattr((yyval.node),"final",(yyvsp[-2].dtype).final);
6844 if ((yyvsp[-1].dtype).bitfield) {
6845 Setattr((yyval.node),"bitfield", (yyvsp[-1].dtype).bitfield);
6846 }
6847 if (!(yyvsp[0].node)) {
6848 if (Len(scanner_ccode)) {
6849 String *code = Copy(scanner_ccode);
6850 Setattr((yyval.node),"code",code);
6851 Delete(code);
6852 }
6853 } else {
6854 set_nextSibling((yyval.node), (yyvsp[0].node));
6855 }
6856 }
6857 #line 6858 "y.tab.c" /* yacc.c:1646 */
6858 break;
6859
6860 case 129:
6861 #line 3351 "parser.y" /* yacc.c:1646 */
6862 {
6863 skip_balanced('{','}');
6864 (yyval.node) = 0;
6865 }
6866 #line 6867 "y.tab.c" /* yacc.c:1646 */
6867 break;
6868
6869 case 130:
6870 #line 3355 "parser.y" /* yacc.c:1646 */
6871 {
6872 (yyval.node) = 0;
6873 if (yychar == RPAREN) {
6874 Swig_error(cparse_file, cparse_line, "Unexpected ')'.\n");
6875 } else {
6876 Swig_error(cparse_file, cparse_line, "Syntax error - possibly a missing semicolon.\n");
6877 }
6878 SWIG_exit(EXIT_FAILURE);
6879 }
6880 #line 6881 "y.tab.c" /* yacc.c:1646 */
6881 break;
6882
6883 case 131:
6884 #line 3366 "parser.y" /* yacc.c:1646 */
6885 {
6886 (yyval.dtype) = (yyvsp[0].dtype);
6887 }
6888 #line 6889 "y.tab.c" /* yacc.c:1646 */
6889 break;
6890
6891 case 132:
6892 #line 3371 "parser.y" /* yacc.c:1646 */
6893 { (yyval.node) = (yyvsp[0].type); }
6894 #line 6895 "y.tab.c" /* yacc.c:1646 */
6895 break;
6896
6897 case 133:
6898 #line 3372 "parser.y" /* yacc.c:1646 */
6899 { (yyval.node) = (yyvsp[0].type); }
6900 #line 6901 "y.tab.c" /* yacc.c:1646 */
6901 break;
6902
6903 case 134:
6904 #line 3373 "parser.y" /* yacc.c:1646 */
6905 { (yyval.node) = (yyvsp[0].type); }
6906 #line 6907 "y.tab.c" /* yacc.c:1646 */
6907 break;
6908
6909 case 135:
6910 #line 3377 "parser.y" /* yacc.c:1646 */
6911 { (yyval.node) = (yyvsp[0].type); }
6912 #line 6913 "y.tab.c" /* yacc.c:1646 */
6913 break;
6914
6915 case 136:
6916 #line 3378 "parser.y" /* yacc.c:1646 */
6917 { (yyval.node) = (yyvsp[0].str); }
6918 #line 6919 "y.tab.c" /* yacc.c:1646 */
6919 break;
6920
6921 case 137:
6922 #line 3379 "parser.y" /* yacc.c:1646 */
6923 { (yyval.node) = (yyvsp[0].type); }
6924 #line 6925 "y.tab.c" /* yacc.c:1646 */
6925 break;
6926
6927 case 138:
6928 #line 3390 "parser.y" /* yacc.c:1646 */
6929 {
6930 (yyval.node) = new_node("lambda");
6931 Setattr((yyval.node),"name",(yyvsp[-8].str));
6932 add_symbols((yyval.node));
6933 }
6934 #line 6935 "y.tab.c" /* yacc.c:1646 */
6935 break;
6936
6937 case 139:
6938 #line 3395 "parser.y" /* yacc.c:1646 */
6939 {
6940 (yyval.node) = new_node("lambda");
6941 Setattr((yyval.node),"name",(yyvsp[-10].str));
6942 add_symbols((yyval.node));
6943 }
6944 #line 6945 "y.tab.c" /* yacc.c:1646 */
6945 break;
6946
6947 case 140:
6948 #line 3400 "parser.y" /* yacc.c:1646 */
6949 {
6950 (yyval.node) = new_node("lambda");
6951 Setattr((yyval.node),"name",(yyvsp[-4].str));
6952 add_symbols((yyval.node));
6953 }
6954 #line 6955 "y.tab.c" /* yacc.c:1646 */
6955 break;
6956
6957 case 141:
6958 #line 3407 "parser.y" /* yacc.c:1646 */
6959 {
6960 skip_balanced('[',']');
6961 (yyval.node) = 0;
6962 }
6963 #line 6964 "y.tab.c" /* yacc.c:1646 */
6964 break;
6965
6966 case 142:
6967 #line 3413 "parser.y" /* yacc.c:1646 */
6968 {
6969 skip_balanced('{','}');
6970 (yyval.node) = 0;
6971 }
6972 #line 6973 "y.tab.c" /* yacc.c:1646 */
6973 break;
6974
6975 case 143:
6976 #line 3418 "parser.y" /* yacc.c:1646 */
6977 {
6978 (yyval.pl) = 0;
6979 }
6980 #line 6981 "y.tab.c" /* yacc.c:1646 */
6981 break;
6982
6983 case 144:
6984 #line 3421 "parser.y" /* yacc.c:1646 */
6985 {
6986 skip_balanced('(',')');
6987 }
6988 #line 6989 "y.tab.c" /* yacc.c:1646 */
6989 break;
6990
6991 case 145:
6992 #line 3423 "parser.y" /* yacc.c:1646 */
6993 {
6994 (yyval.pl) = 0;
6995 }
6996 #line 6997 "y.tab.c" /* yacc.c:1646 */
6997 break;
6998
6999 case 146:
7000 #line 3434 "parser.y" /* yacc.c:1646 */
7001 {
7002 (yyval.node) = (char *)"enum";
7003 }
7004 #line 7005 "y.tab.c" /* yacc.c:1646 */
7005 break;
7006
7007 case 147:
7008 #line 3437 "parser.y" /* yacc.c:1646 */
7009 {
7010 (yyval.node) = (char *)"enum class";
7011 }
7012 #line 7013 "y.tab.c" /* yacc.c:1646 */
7013 break;
7014
7015 case 148:
7016 #line 3440 "parser.y" /* yacc.c:1646 */
7017 {
7018 (yyval.node) = (char *)"enum struct";
7019 }
7020 #line 7021 "y.tab.c" /* yacc.c:1646 */
7021 break;
7022
7023 case 149:
7024 #line 3449 "parser.y" /* yacc.c:1646 */
7025 {
7026 (yyval.node) = (yyvsp[0].type);
7027 }
7028 #line 7029 "y.tab.c" /* yacc.c:1646 */
7029 break;
7030
7031 case 150:
7032 #line 3452 "parser.y" /* yacc.c:1646 */
7033 { (yyval.node) = 0; }
7034 #line 7035 "y.tab.c" /* yacc.c:1646 */
7035 break;
7036
7037 case 151:
7038 #line 3459 "parser.y" /* yacc.c:1646 */
7039 {
7040 SwigType *ty = 0;
7041 int scopedenum = (yyvsp[-2].id) && !Equal((yyvsp[-3].node), "enum");
7042 (yyval.node) = new_node("enumforward");
7043 ty = NewStringf("enum %s", (yyvsp[-2].id));
7044 Setattr((yyval.node),"enumkey",(yyvsp[-3].node));
7045 if (scopedenum)
7046 SetFlag((yyval.node), "scopedenum");
7047 Setattr((yyval.node),"name",(yyvsp[-2].id));
7048 Setattr((yyval.node),"inherit",(yyvsp[-1].node));
7049 Setattr((yyval.node),"type",ty);
7050 Setattr((yyval.node),"sym:weak", "1");
7051 add_symbols((yyval.node));
7052 }
7053 #line 7054 "y.tab.c" /* yacc.c:1646 */
7054 break;
7055
7056 case 152:
7057 #line 3481 "parser.y" /* yacc.c:1646 */
7058 {
7059 SwigType *ty = 0;
7060 int scopedenum = (yyvsp[-5].id) && !Equal((yyvsp[-6].node), "enum");
7061 (yyval.node) = new_node("enum");
7062 ty = NewStringf("enum %s", (yyvsp[-5].id));
7063 Setattr((yyval.node),"enumkey",(yyvsp[-6].node));
7064 if (scopedenum)
7065 SetFlag((yyval.node), "scopedenum");
7066 Setattr((yyval.node),"name",(yyvsp[-5].id));
7067 Setattr((yyval.node),"inherit",(yyvsp[-4].node));
7068 Setattr((yyval.node),"type",ty);
7069 appendChild((yyval.node),(yyvsp[-2].node));
7070 add_symbols((yyval.node)); /* Add to tag space */
7071
7072 if (scopedenum) {
7073 Swig_symbol_newscope();
7074 Swig_symbol_setscopename((yyvsp[-5].id));
7075 Delete(Namespaceprefix);
7076 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7077 }
7078
7079 add_symbols((yyvsp[-2].node)); /* Add enum values to appropriate enum or enum class scope */
7080
7081 if (scopedenum) {
7082 Setattr((yyval.node),"symtab", Swig_symbol_popscope());
7083 Delete(Namespaceprefix);
7084 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7085 }
7086 }
7087 #line 7088 "y.tab.c" /* yacc.c:1646 */
7088 break;
7089
7090 case 153:
7091 #line 3510 "parser.y" /* yacc.c:1646 */
7092 {
7093 Node *n;
7094 SwigType *ty = 0;
7095 String *unnamed = 0;
7096 int unnamedinstance = 0;
7097 int scopedenum = (yyvsp[-8].id) && !Equal((yyvsp[-9].node), "enum");
7098
7099 (yyval.node) = new_node("enum");
7100 Setattr((yyval.node),"enumkey",(yyvsp[-9].node));
7101 if (scopedenum)
7102 SetFlag((yyval.node), "scopedenum");
7103 Setattr((yyval.node),"inherit",(yyvsp[-7].node));
7104 if ((yyvsp[-8].id)) {
7105 Setattr((yyval.node),"name",(yyvsp[-8].id));
7106 ty = NewStringf("enum %s", (yyvsp[-8].id));
7107 } else if ((yyvsp[-3].decl).id) {
7108 unnamed = make_unnamed();
7109 ty = NewStringf("enum %s", unnamed);
7110 Setattr((yyval.node),"unnamed",unnamed);
7111 /* name is not set for unnamed enum instances, e.g. enum { foo } Instance; */
7112 if ((yyvsp[-10].id) && Cmp((yyvsp[-10].id),"typedef") == 0) {
7113 Setattr((yyval.node),"name",(yyvsp[-3].decl).id);
7114 } else {
7115 unnamedinstance = 1;
7116 }
7117 Setattr((yyval.node),"storage",(yyvsp[-10].id));
7118 }
7119 if ((yyvsp[-3].decl).id && Cmp((yyvsp[-10].id),"typedef") == 0) {
7120 Setattr((yyval.node),"tdname",(yyvsp[-3].decl).id);
7121 Setattr((yyval.node),"allows_typedef","1");
7122 }
7123 appendChild((yyval.node),(yyvsp[-5].node));
7124 n = new_node("cdecl");
7125 Setattr(n,"type",ty);
7126 Setattr(n,"name",(yyvsp[-3].decl).id);
7127 Setattr(n,"storage",(yyvsp[-10].id));
7128 Setattr(n,"decl",(yyvsp[-3].decl).type);
7129 Setattr(n,"parms",(yyvsp[-3].decl).parms);
7130 Setattr(n,"unnamed",unnamed);
7131
7132 if (unnamedinstance) {
7133 SwigType *cty = NewString("enum ");
7134 Setattr((yyval.node),"type",cty);
7135 SetFlag((yyval.node),"unnamedinstance");
7136 SetFlag(n,"unnamedinstance");
7137 Delete(cty);
7138 }
7139 if ((yyvsp[0].node)) {
7140 Node *p = (yyvsp[0].node);
7141 set_nextSibling(n,p);
7142 while (p) {
7143 SwigType *cty = Copy(ty);
7144 Setattr(p,"type",cty);
7145 Setattr(p,"unnamed",unnamed);
7146 Setattr(p,"storage",(yyvsp[-10].id));
7147 Delete(cty);
7148 p = nextSibling(p);
7149 }
7150 } else {
7151 if (Len(scanner_ccode)) {
7152 String *code = Copy(scanner_ccode);
7153 Setattr(n,"code",code);
7154 Delete(code);
7155 }
7156 }
7157
7158 /* Ensure that typedef enum ABC {foo} XYZ; uses XYZ for sym:name, like structs.
7159 * Note that class_rename/yyrename are bit of a mess so used this simple approach to change the name. */
7160 if ((yyvsp[-3].decl).id && (yyvsp[-8].id) && Cmp((yyvsp[-10].id),"typedef") == 0) {
7161 String *name = NewString((yyvsp[-3].decl).id);
7162 Setattr((yyval.node), "parser:makename", name);
7163 Delete(name);
7164 }
7165
7166 add_symbols((yyval.node)); /* Add enum to tag space */
7167 set_nextSibling((yyval.node),n);
7168 Delete(n);
7169
7170 if (scopedenum) {
7171 Swig_symbol_newscope();
7172 Swig_symbol_setscopename((yyvsp[-8].id));
7173 Delete(Namespaceprefix);
7174 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7175 }
7176
7177 add_symbols((yyvsp[-5].node)); /* Add enum values to appropriate enum or enum class scope */
7178
7179 if (scopedenum) {
7180 Setattr((yyval.node),"symtab", Swig_symbol_popscope());
7181 Delete(Namespaceprefix);
7182 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7183 }
7184
7185 add_symbols(n);
7186 Delete(unnamed);
7187 }
7188 #line 7189 "y.tab.c" /* yacc.c:1646 */
7189 break;
7190
7191 case 154:
7192 #line 3608 "parser.y" /* yacc.c:1646 */
7193 {
7194 /* This is a sick hack. If the ctor_end has parameters,
7195 and the parms parameter only has 1 parameter, this
7196 could be a declaration of the form:
7197
7198 type (id)(parms)
7199
7200 Otherwise it's an error. */
7201 int err = 0;
7202 (yyval.node) = 0;
7203
7204 if ((ParmList_len((yyvsp[-2].pl)) == 1) && (!Swig_scopename_check((yyvsp[-4].type)))) {
7205 SwigType *ty = Getattr((yyvsp[-2].pl),"type");
7206 String *name = Getattr((yyvsp[-2].pl),"name");
7207 err = 1;
7208 if (!name) {
7209 (yyval.node) = new_node("cdecl");
7210 Setattr((yyval.node),"type",(yyvsp[-4].type));
7211 Setattr((yyval.node),"storage",(yyvsp[-5].id));
7212 Setattr((yyval.node),"name",ty);
7213
7214 if ((yyvsp[0].decl).have_parms) {
7215 SwigType *decl = NewStringEmpty();
7216 SwigType_add_function(decl,(yyvsp[0].decl).parms);
7217 Setattr((yyval.node),"decl",decl);
7218 Setattr((yyval.node),"parms",(yyvsp[0].decl).parms);
7219 if (Len(scanner_ccode)) {
7220 String *code = Copy(scanner_ccode);
7221 Setattr((yyval.node),"code",code);
7222 Delete(code);
7223 }
7224 }
7225 if ((yyvsp[0].decl).defarg) {
7226 Setattr((yyval.node),"value",(yyvsp[0].decl).defarg);
7227 }
7228 Setattr((yyval.node),"throws",(yyvsp[0].decl).throws);
7229 Setattr((yyval.node),"throw",(yyvsp[0].decl).throwf);
7230 Setattr((yyval.node),"noexcept",(yyvsp[0].decl).nexcept);
7231 Setattr((yyval.node),"final",(yyvsp[0].decl).final);
7232 err = 0;
7233 }
7234 }
7235 if (err) {
7236 Swig_error(cparse_file,cparse_line,"Syntax error in input(2).\n");
7237 SWIG_exit(EXIT_FAILURE);
7238 }
7239 }
7240 #line 7241 "y.tab.c" /* yacc.c:1646 */
7241 break;
7242
7243 case 155:
7244 #line 3661 "parser.y" /* yacc.c:1646 */
7245 { (yyval.node) = (yyvsp[0].node); }
7246 #line 7247 "y.tab.c" /* yacc.c:1646 */
7247 break;
7248
7249 case 156:
7250 #line 3662 "parser.y" /* yacc.c:1646 */
7251 { (yyval.node) = (yyvsp[0].node); }
7252 #line 7253 "y.tab.c" /* yacc.c:1646 */
7253 break;
7254
7255 case 157:
7256 #line 3663 "parser.y" /* yacc.c:1646 */
7257 { (yyval.node) = (yyvsp[0].node); }
7258 #line 7259 "y.tab.c" /* yacc.c:1646 */
7259 break;
7260
7261 case 158:
7262 #line 3664 "parser.y" /* yacc.c:1646 */
7263 { (yyval.node) = (yyvsp[0].node); }
7264 #line 7265 "y.tab.c" /* yacc.c:1646 */
7265 break;
7266
7267 case 159:
7268 #line 3665 "parser.y" /* yacc.c:1646 */
7269 { (yyval.node) = (yyvsp[0].node); }
7270 #line 7271 "y.tab.c" /* yacc.c:1646 */
7271 break;
7272
7273 case 160:
7274 #line 3666 "parser.y" /* yacc.c:1646 */
7275 { (yyval.node) = 0; }
7276 #line 7277 "y.tab.c" /* yacc.c:1646 */
7277 break;
7278
7279 case 161:
7280 #line 3671 "parser.y" /* yacc.c:1646 */
7281 {
7282 String *prefix;
7283 List *bases = 0;
7284 Node *scope = 0;
7285 String *code;
7286 (yyval.node) = new_node("class");
7287 Setline((yyval.node),cparse_start_line);
7288 Setattr((yyval.node),"kind",(yyvsp[-3].id));
7289 if ((yyvsp[-1].bases)) {
7290 Setattr((yyval.node),"baselist", Getattr((yyvsp[-1].bases),"public"));
7291 Setattr((yyval.node),"protectedbaselist", Getattr((yyvsp[-1].bases),"protected"));
7292 Setattr((yyval.node),"privatebaselist", Getattr((yyvsp[-1].bases),"private"));
7293 }
7294 Setattr((yyval.node),"allows_typedef","1");
7295
7296 /* preserve the current scope */
7297 Setattr((yyval.node),"prev_symtab",Swig_symbol_current());
7298
7299 /* If the class name is qualified. We need to create or lookup namespace/scope entries */
7300 scope = resolve_create_node_scope((yyvsp[-2].str), 1);
7301 /* save nscope_inner to the class - it may be overwritten in nested classes*/
7302 Setattr((yyval.node), "nested:innerscope", nscope_inner);
7303 Setattr((yyval.node), "nested:nscope", nscope);
7304 Setfile(scope,cparse_file);
7305 Setline(scope,cparse_line);
7306 (yyvsp[-2].str) = scope;
7307 Setattr((yyval.node),"name",(yyvsp[-2].str));
7308
7309 if (currentOuterClass) {
7310 SetFlag((yyval.node), "nested");
7311 Setattr((yyval.node), "nested:outer", currentOuterClass);
7312 set_access_mode((yyval.node));
7313 }
7314 Swig_features_get(Swig_cparse_features(), Namespaceprefix, Getattr((yyval.node), "name"), 0, (yyval.node));
7315 /* save yyrename to the class attribute, to be used later in add_symbols()*/
7316 Setattr((yyval.node), "class_rename", make_name((yyval.node), (yyvsp[-2].str), 0));
7317 Setattr((yyval.node), "Classprefix", (yyvsp[-2].str));
7318 Classprefix = NewString((yyvsp[-2].str));
7319 /* Deal with inheritance */
7320 if ((yyvsp[-1].bases))
7321 bases = Swig_make_inherit_list((yyvsp[-2].str),Getattr((yyvsp[-1].bases),"public"),Namespaceprefix);
7322 prefix = SwigType_istemplate_templateprefix((yyvsp[-2].str));
7323 if (prefix) {
7324 String *fbase, *tbase;
7325 if (Namespaceprefix) {
7326 fbase = NewStringf("%s::%s", Namespaceprefix,(yyvsp[-2].str));
7327 tbase = NewStringf("%s::%s", Namespaceprefix, prefix);
7328 } else {
7329 fbase = Copy((yyvsp[-2].str));
7330 tbase = Copy(prefix);
7331 }
7332 Swig_name_inherit(tbase,fbase);
7333 Delete(fbase);
7334 Delete(tbase);
7335 }
7336 if (strcmp((yyvsp[-3].id),"class") == 0) {
7337 cplus_mode = CPLUS_PRIVATE;
7338 } else {
7339 cplus_mode = CPLUS_PUBLIC;
7340 }
7341 if (!cparse_cplusplus) {
7342 set_scope_to_global();
7343 }
7344 Swig_symbol_newscope();
7345 Swig_symbol_setscopename((yyvsp[-2].str));
7346 Swig_inherit_base_symbols(bases);
7347 Delete(Namespaceprefix);
7348 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7349 cparse_start_line = cparse_line;
7350
7351 /* If there are active template parameters, we need to make sure they are
7352 placed in the class symbol table so we can catch shadows */
7353
7354 if (template_parameters) {
7355 Parm *tp = template_parameters;
7356 while(tp) {
7357 String *tpname = Copy(Getattr(tp,"name"));
7358 Node *tn = new_node("templateparm");
7359 Setattr(tn,"name",tpname);
7360 Swig_symbol_cadd(tpname,tn);
7361 tp = nextSibling(tp);
7362 Delete(tpname);
7363 }
7364 }
7365 Delete(prefix);
7366 inclass = 1;
7367 currentOuterClass = (yyval.node);
7368 if (cparse_cplusplusout) {
7369 /* save the structure declaration to declare it in global scope for C++ to see */
7370 code = get_raw_text_balanced('{', '}');
7371 Setattr((yyval.node), "code", code);
7372 Delete(code);
7373 }
7374 }
7375 #line 7376 "y.tab.c" /* yacc.c:1646 */
7376 break;
7377
7378 case 162:
7379 #line 3764 "parser.y" /* yacc.c:1646 */
7380 {
7381 Node *p;
7382 SwigType *ty;
7383 Symtab *cscope;
7384 Node *am = 0;
7385 String *scpname = 0;
7386 (void) (yyvsp[-3].node);
7387 (yyval.node) = currentOuterClass;
7388 currentOuterClass = Getattr((yyval.node), "nested:outer");
7389 nscope_inner = Getattr((yyval.node), "nested:innerscope");
7390 nscope = Getattr((yyval.node), "nested:nscope");
7391 Delattr((yyval.node), "nested:innerscope");
7392 Delattr((yyval.node), "nested:nscope");
7393 if (nscope_inner && Strcmp(nodeType(nscope_inner), "class") == 0) { /* actual parent class for this class */
7394 Node* forward_declaration = Swig_symbol_clookup_no_inherit(Getattr((yyval.node),"name"), Getattr(nscope_inner, "symtab"));
7395 if (forward_declaration) {
7396 Setattr((yyval.node), "access", Getattr(forward_declaration, "access"));
7397 }
7398 Setattr((yyval.node), "nested:outer", nscope_inner);
7399 SetFlag((yyval.node), "nested");
7400 }
7401 if (!currentOuterClass)
7402 inclass = 0;
7403 cscope = Getattr((yyval.node), "prev_symtab");
7404 Delattr((yyval.node), "prev_symtab");
7405
7406 /* Check for pure-abstract class */
7407 Setattr((yyval.node),"abstracts", pure_abstracts((yyvsp[-2].node)));
7408
7409 /* This bit of code merges in a previously defined %extend directive (if any) */
7410 {
7411 String *clsname = Swig_symbol_qualifiedscopename(0);
7412 am = Getattr(Swig_extend_hash(), clsname);
7413 if (am) {
7414 Swig_extend_merge((yyval.node), am);
7415 Delattr(Swig_extend_hash(), clsname);
7416 }
7417 Delete(clsname);
7418 }
7419 if (!classes) classes = NewHash();
7420 scpname = Swig_symbol_qualifiedscopename(0);
7421 Setattr(classes, scpname, (yyval.node));
7422
7423 appendChild((yyval.node), (yyvsp[-2].node));
7424
7425 if (am)
7426 Swig_extend_append_previous((yyval.node), am);
7427
7428 p = (yyvsp[0].node);
7429 if (p && !nscope_inner) {
7430 if (!cparse_cplusplus && currentOuterClass)
7431 appendChild(currentOuterClass, p);
7432 else
7433 appendSibling((yyval.node), p);
7434 }
7435
7436 if (nscope_inner) {
7437 ty = NewString(scpname); /* if the class is declared out of scope, let the declarator use fully qualified type*/
7438 } else if (cparse_cplusplus && !cparse_externc) {
7439 ty = NewString((yyvsp[-6].str));
7440 } else {
7441 ty = NewStringf("%s %s", (yyvsp[-7].id), (yyvsp[-6].str));
7442 }
7443 while (p) {
7444 Setattr(p, "storage", (yyvsp[-8].id));
7445 Setattr(p, "type" ,ty);
7446 if (!cparse_cplusplus && currentOuterClass && (!Getattr(currentOuterClass, "name"))) {
7447 SetFlag(p, "hasconsttype");
7448 SetFlag(p, "feature:immutable");
7449 }
7450 p = nextSibling(p);
7451 }
7452 if ((yyvsp[0].node) && Cmp((yyvsp[-8].id),"typedef") == 0)
7453 add_typedef_name((yyval.node), (yyvsp[0].node), (yyvsp[-6].str), cscope, scpname);
7454 Delete(scpname);
7455
7456 if (cplus_mode != CPLUS_PUBLIC) {
7457 /* we 'open' the class at the end, to allow %template
7458 to add new members */
7459 Node *pa = new_node("access");
7460 Setattr(pa, "kind", "public");
7461 cplus_mode = CPLUS_PUBLIC;
7462 appendChild((yyval.node), pa);
7463 Delete(pa);
7464 }
7465 if (currentOuterClass)
7466 restore_access_mode((yyval.node));
7467 Setattr((yyval.node), "symtab", Swig_symbol_popscope());
7468 Classprefix = Getattr((yyval.node), "Classprefix");
7469 Delattr((yyval.node), "Classprefix");
7470 Delete(Namespaceprefix);
7471 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7472 if (cplus_mode == CPLUS_PRIVATE) {
7473 (yyval.node) = 0; /* skip private nested classes */
7474 } else if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag((yyval.node), "feature:flatnested")) {
7475 (yyval.node) = nested_forward_declaration((yyvsp[-8].id), (yyvsp[-7].id), (yyvsp[-6].str), Copy((yyvsp[-6].str)), (yyvsp[0].node));
7476 } else if (nscope_inner) {
7477 /* this is tricky */
7478 /* we add the declaration in the original namespace */
7479 if (Strcmp(nodeType(nscope_inner), "class") == 0 && cparse_cplusplus && ignore_nested_classes && !GetFlag((yyval.node), "feature:flatnested"))
7480 (yyval.node) = nested_forward_declaration((yyvsp[-8].id), (yyvsp[-7].id), (yyvsp[-6].str), Copy((yyvsp[-6].str)), (yyvsp[0].node));
7481 appendChild(nscope_inner, (yyval.node));
7482 Swig_symbol_setscope(Getattr(nscope_inner, "symtab"));
7483 Delete(Namespaceprefix);
7484 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7485 yyrename = Copy(Getattr((yyval.node), "class_rename"));
7486 add_symbols((yyval.node));
7487 Delattr((yyval.node), "class_rename");
7488 /* but the variable definition in the current scope */
7489 Swig_symbol_setscope(cscope);
7490 Delete(Namespaceprefix);
7491 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7492 add_symbols((yyvsp[0].node));
7493 if (nscope) {
7494 (yyval.node) = nscope; /* here we return recreated namespace tower instead of the class itself */
7495 if ((yyvsp[0].node)) {
7496 appendSibling((yyval.node), (yyvsp[0].node));
7497 }
7498 } else if (!SwigType_istemplate(ty) && template_parameters == 0) { /* for template we need the class itself */
7499 (yyval.node) = (yyvsp[0].node);
7500 }
7501 } else {
7502 Delete(yyrename);
7503 yyrename = 0;
7504 if (!cparse_cplusplus && currentOuterClass) { /* nested C structs go into global scope*/
7505 Node *outer = currentOuterClass;
7506 while (Getattr(outer, "nested:outer"))
7507 outer = Getattr(outer, "nested:outer");
7508 appendSibling(outer, (yyval.node));
7509 Swig_symbol_setscope(cscope); /* declaration goes in the parent scope */
7510 add_symbols((yyvsp[0].node));
7511 set_scope_to_global();
7512 Delete(Namespaceprefix);
7513 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7514 yyrename = Copy(Getattr((yyval.node), "class_rename"));
7515 add_symbols((yyval.node));
7516 if (!cparse_cplusplusout)
7517 Delattr((yyval.node), "nested:outer");
7518 Delattr((yyval.node), "class_rename");
7519 (yyval.node) = 0;
7520 } else {
7521 yyrename = Copy(Getattr((yyval.node), "class_rename"));
7522 add_symbols((yyval.node));
7523 add_symbols((yyvsp[0].node));
7524 Delattr((yyval.node), "class_rename");
7525 }
7526 }
7527 Delete(ty);
7528 Swig_symbol_setscope(cscope);
7529 Delete(Namespaceprefix);
7530 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7531 Classprefix = currentOuterClass ? Getattr(currentOuterClass, "Classprefix") : 0;
7532 }
7533 #line 7534 "y.tab.c" /* yacc.c:1646 */
7534 break;
7535
7536 case 163:
7537 #line 3920 "parser.y" /* yacc.c:1646 */
7538 {
7539 String *unnamed;
7540 String *code;
7541 unnamed = make_unnamed();
7542 (yyval.node) = new_node("class");
7543 Setline((yyval.node),cparse_start_line);
7544 Setattr((yyval.node),"kind",(yyvsp[-2].id));
7545 if ((yyvsp[-1].bases)) {
7546 Setattr((yyval.node),"baselist", Getattr((yyvsp[-1].bases),"public"));
7547 Setattr((yyval.node),"protectedbaselist", Getattr((yyvsp[-1].bases),"protected"));
7548 Setattr((yyval.node),"privatebaselist", Getattr((yyvsp[-1].bases),"private"));
7549 }
7550 Setattr((yyval.node),"storage",(yyvsp[-3].id));
7551 Setattr((yyval.node),"unnamed",unnamed);
7552 Setattr((yyval.node),"allows_typedef","1");
7553 if (currentOuterClass) {
7554 SetFlag((yyval.node), "nested");
7555 Setattr((yyval.node), "nested:outer", currentOuterClass);
7556 set_access_mode((yyval.node));
7557 }
7558 Swig_features_get(Swig_cparse_features(), Namespaceprefix, 0, 0, (yyval.node));
7559 /* save yyrename to the class attribute, to be used later in add_symbols()*/
7560 Setattr((yyval.node), "class_rename", make_name((yyval.node),0,0));
7561 if (strcmp((yyvsp[-2].id),"class") == 0) {
7562 cplus_mode = CPLUS_PRIVATE;
7563 } else {
7564 cplus_mode = CPLUS_PUBLIC;
7565 }
7566 Swig_symbol_newscope();
7567 cparse_start_line = cparse_line;
7568 currentOuterClass = (yyval.node);
7569 inclass = 1;
7570 Classprefix = 0;
7571 Delete(Namespaceprefix);
7572 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7573 /* save the structure declaration to make a typedef for it later*/
7574 code = get_raw_text_balanced('{', '}');
7575 Setattr((yyval.node), "code", code);
7576 Delete(code);
7577 }
7578 #line 7579 "y.tab.c" /* yacc.c:1646 */
7579 break;
7580
7581 case 164:
7582 #line 3959 "parser.y" /* yacc.c:1646 */
7583 {
7584 String *unnamed;
7585 List *bases = 0;
7586 String *name = 0;
7587 Node *n;
7588 Classprefix = 0;
7589 (void)(yyvsp[-3].node);
7590 (yyval.node) = currentOuterClass;
7591 currentOuterClass = Getattr((yyval.node), "nested:outer");
7592 if (!currentOuterClass)
7593 inclass = 0;
7594 else
7595 restore_access_mode((yyval.node));
7596 unnamed = Getattr((yyval.node),"unnamed");
7597 /* Check for pure-abstract class */
7598 Setattr((yyval.node),"abstracts", pure_abstracts((yyvsp[-2].node)));
7599 n = (yyvsp[0].node);
7600 if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag((yyval.node), "feature:flatnested")) {
7601 String *name = n ? Copy(Getattr(n, "name")) : 0;
7602 (yyval.node) = nested_forward_declaration((yyvsp[-7].id), (yyvsp[-6].id), 0, name, n);
7603 Swig_symbol_popscope();
7604 Delete(Namespaceprefix);
7605 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7606 } else if (n) {
7607 appendSibling((yyval.node),n);
7608 /* If a proper typedef name was given, we'll use it to set the scope name */
7609 name = try_to_find_a_name_for_unnamed_structure((yyvsp[-7].id), n);
7610 if (name) {
7611 String *scpname = 0;
7612 SwigType *ty;
7613 Setattr((yyval.node),"tdname",name);
7614 Setattr((yyval.node),"name",name);
7615 Swig_symbol_setscopename(name);
7616 if ((yyvsp[-5].bases))
7617 bases = Swig_make_inherit_list(name,Getattr((yyvsp[-5].bases),"public"),Namespaceprefix);
7618 Swig_inherit_base_symbols(bases);
7619
7620 /* If a proper name was given, we use that as the typedef, not unnamed */
7621 Clear(unnamed);
7622 Append(unnamed, name);
7623 if (cparse_cplusplus && !cparse_externc) {
7624 ty = NewString(name);
7625 } else {
7626 ty = NewStringf("%s %s", (yyvsp[-6].id),name);
7627 }
7628 while (n) {
7629 Setattr(n,"storage",(yyvsp[-7].id));
7630 Setattr(n, "type", ty);
7631 if (!cparse_cplusplus && currentOuterClass && (!Getattr(currentOuterClass, "name"))) {
7632 SetFlag(n,"hasconsttype");
7633 SetFlag(n,"feature:immutable");
7634 }
7635 n = nextSibling(n);
7636 }
7637 n = (yyvsp[0].node);
7638
7639 /* Check for previous extensions */
7640 {
7641 String *clsname = Swig_symbol_qualifiedscopename(0);
7642 Node *am = Getattr(Swig_extend_hash(),clsname);
7643 if (am) {
7644 /* Merge the extension into the symbol table */
7645 Swig_extend_merge((yyval.node),am);
7646 Swig_extend_append_previous((yyval.node),am);
7647 Delattr(Swig_extend_hash(),clsname);
7648 }
7649 Delete(clsname);
7650 }
7651 if (!classes) classes = NewHash();
7652 scpname = Swig_symbol_qualifiedscopename(0);
7653 Setattr(classes,scpname,(yyval.node));
7654 Delete(scpname);
7655 } else { /* no suitable name was found for a struct */
7656 Setattr((yyval.node), "nested:unnamed", Getattr(n, "name")); /* save the name of the first declarator for later use in name generation*/
7657 while (n) { /* attach unnamed struct to the declarators, so that they would receive proper type later*/
7658 Setattr(n, "nested:unnamedtype", (yyval.node));
7659 Setattr(n, "storage", (yyvsp[-7].id));
7660 n = nextSibling(n);
7661 }
7662 n = (yyvsp[0].node);
7663 Swig_symbol_setscopename("<unnamed>");
7664 }
7665 appendChild((yyval.node),(yyvsp[-2].node));
7666 /* Pop the scope */
7667 Setattr((yyval.node),"symtab",Swig_symbol_popscope());
7668 if (name) {
7669 Delete(yyrename);
7670 yyrename = Copy(Getattr((yyval.node), "class_rename"));
7671 Delete(Namespaceprefix);
7672 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7673 add_symbols((yyval.node));
7674 add_symbols(n);
7675 Delattr((yyval.node), "class_rename");
7676 }else if (cparse_cplusplus)
7677 (yyval.node) = 0; /* ignore unnamed structs for C++ */
7678 Delete(unnamed);
7679 } else { /* unnamed struct w/o declarator*/
7680 Swig_symbol_popscope();
7681 Delete(Namespaceprefix);
7682 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7683 add_symbols((yyvsp[-2].node));
7684 Delete((yyval.node));
7685 (yyval.node) = (yyvsp[-2].node); /* pass member list to outer class/namespace (instead of self)*/
7686 }
7687 Classprefix = currentOuterClass ? Getattr(currentOuterClass, "Classprefix") : 0;
7688 }
7689 #line 7690 "y.tab.c" /* yacc.c:1646 */
7690 break;
7691
7692 case 165:
7693 #line 4067 "parser.y" /* yacc.c:1646 */
7694 { (yyval.node) = 0; }
7695 #line 7696 "y.tab.c" /* yacc.c:1646 */
7696 break;
7697
7698 case 166:
7699 #line 4068 "parser.y" /* yacc.c:1646 */
7700 {
7701 (yyval.node) = new_node("cdecl");
7702 Setattr((yyval.node),"name",(yyvsp[-3].decl).id);
7703 Setattr((yyval.node),"decl",(yyvsp[-3].decl).type);
7704 Setattr((yyval.node),"parms",(yyvsp[-3].decl).parms);
7705 set_nextSibling((yyval.node), (yyvsp[0].node));
7706 }
7707 #line 7708 "y.tab.c" /* yacc.c:1646 */
7708 break;
7709
7710 case 167:
7711 #line 4080 "parser.y" /* yacc.c:1646 */
7712 {
7713 if ((yyvsp[-3].id) && (Strcmp((yyvsp[-3].id),"friend") == 0)) {
7714 /* Ignore */
7715 (yyval.node) = 0;
7716 } else {
7717 (yyval.node) = new_node("classforward");
7718 Setattr((yyval.node),"kind",(yyvsp[-2].id));
7719 Setattr((yyval.node),"name",(yyvsp[-1].str));
7720 Setattr((yyval.node),"sym:weak", "1");
7721 add_symbols((yyval.node));
7722 }
7723 }
7724 #line 7725 "y.tab.c" /* yacc.c:1646 */
7725 break;
7726
7727 case 168:
7728 #line 4098 "parser.y" /* yacc.c:1646 */
7729 {
7730 if (currentOuterClass)
7731 Setattr(currentOuterClass, "template_parameters", template_parameters);
7732 template_parameters = (yyvsp[-1].tparms);
7733 parsing_template_declaration = 1;
7734 }
7735 #line 7736 "y.tab.c" /* yacc.c:1646 */
7736 break;
7737
7738 case 169:
7739 #line 4103 "parser.y" /* yacc.c:1646 */
7740 {
7741 String *tname = 0;
7742 int error = 0;
7743
7744 /* check if we get a namespace node with a class declaration, and retrieve the class */
7745 Symtab *cscope = Swig_symbol_current();
7746 Symtab *sti = 0;
7747 Node *ntop = (yyvsp[0].node);
7748 Node *ni = ntop;
7749 SwigType *ntype = ni ? nodeType(ni) : 0;
7750 while (ni && Strcmp(ntype,"namespace") == 0) {
7751 sti = Getattr(ni,"symtab");
7752 ni = firstChild(ni);
7753 ntype = nodeType(ni);
7754 }
7755 if (sti) {
7756 Swig_symbol_setscope(sti);
7757 Delete(Namespaceprefix);
7758 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7759 (yyvsp[0].node) = ni;
7760 }
7761
7762 (yyval.node) = (yyvsp[0].node);
7763 if ((yyval.node)) tname = Getattr((yyval.node),"name");
7764
7765 /* Check if the class is a template specialization */
7766 if (((yyval.node)) && (Strchr(tname,'<')) && (!is_operator(tname))) {
7767 /* If a specialization. Check if defined. */
7768 Node *tempn = 0;
7769 {
7770 String *tbase = SwigType_templateprefix(tname);
7771 tempn = Swig_symbol_clookup_local(tbase,0);
7772 if (!tempn || (Strcmp(nodeType(tempn),"template") != 0)) {
7773 SWIG_WARN_NODE_BEGIN(tempn);
7774 Swig_warning(WARN_PARSE_TEMPLATE_SP_UNDEF, Getfile((yyval.node)),Getline((yyval.node)),"Specialization of non-template '%s'.\n", tbase);
7775 SWIG_WARN_NODE_END(tempn);
7776 tempn = 0;
7777 error = 1;
7778 }
7779 Delete(tbase);
7780 }
7781 Setattr((yyval.node),"specialization","1");
7782 Setattr((yyval.node),"templatetype",nodeType((yyval.node)));
7783 set_nodeType((yyval.node),"template");
7784 /* Template partial specialization */
7785 if (tempn && ((yyvsp[-3].tparms)) && ((yyvsp[0].node))) {
7786 List *tlist;
7787 String *targs = SwigType_templateargs(tname);
7788 tlist = SwigType_parmlist(targs);
7789 /* Printf(stdout,"targs = '%s' %s\n", targs, tlist); */
7790 if (!Getattr((yyval.node),"sym:weak")) {
7791 Setattr((yyval.node),"sym:typename","1");
7792 }
7793
7794 if (Len(tlist) != ParmList_len(Getattr(tempn,"templateparms"))) {
7795 Swig_error(Getfile((yyval.node)),Getline((yyval.node)),"Inconsistent argument count in template partial specialization. %d %d\n", Len(tlist), ParmList_len(Getattr(tempn,"templateparms")));
7796
7797 } else {
7798
7799 /* This code builds the argument list for the partial template
7800 specialization. This is a little hairy, but the idea is as
7801 follows:
7802
7803 $3 contains a list of arguments supplied for the template.
7804 For example template<class T>.
7805
7806 tlist is a list of the specialization arguments--which may be
7807 different. For example class<int,T>.
7808
7809 tp is a copy of the arguments in the original template definition.
7810
7811 The patching algorithm walks through the list of supplied
7812 arguments ($3), finds the position in the specialization arguments
7813 (tlist), and then patches the name in the argument list of the
7814 original template.
7815 */
7816
7817 {
7818 String *pn;
7819 Parm *p, *p1;
7820 int i, nargs;
7821 Parm *tp = CopyParmList(Getattr(tempn,"templateparms"));
7822 nargs = Len(tlist);
7823 p = (yyvsp[-3].tparms);
7824 while (p) {
7825 for (i = 0; i < nargs; i++){
7826 pn = Getattr(p,"name");
7827 if (Strcmp(pn,SwigType_base(Getitem(tlist,i))) == 0) {
7828 int j;
7829 Parm *p1 = tp;
7830 for (j = 0; j < i; j++) {
7831 p1 = nextSibling(p1);
7832 }
7833 Setattr(p1,"name",pn);
7834 Setattr(p1,"partialarg","1");
7835 }
7836 }
7837 p = nextSibling(p);
7838 }
7839 p1 = tp;
7840 i = 0;
7841 while (p1) {
7842 if (!Getattr(p1,"partialarg")) {
7843 Delattr(p1,"name");
7844 Setattr(p1,"type", Getitem(tlist,i));
7845 }
7846 i++;
7847 p1 = nextSibling(p1);
7848 }
7849 Setattr((yyval.node),"templateparms",tp);
7850 Delete(tp);
7851 }
7852 #if 0
7853 /* Patch the parameter list */
7854 if (tempn) {
7855 Parm *p,*p1;
7856 ParmList *tp = CopyParmList(Getattr(tempn,"templateparms"));
7857 p = (yyvsp[-3].tparms);
7858 p1 = tp;
7859 while (p && p1) {
7860 String *pn = Getattr(p,"name");
7861 Printf(stdout,"pn = '%s'\n", pn);
7862 if (pn) Setattr(p1,"name",pn);
7863 else Delattr(p1,"name");
7864 pn = Getattr(p,"type");
7865 if (pn) Setattr(p1,"type",pn);
7866 p = nextSibling(p);
7867 p1 = nextSibling(p1);
7868 }
7869 Setattr((yyval.node),"templateparms",tp);
7870 Delete(tp);
7871 } else {
7872 Setattr((yyval.node),"templateparms",(yyvsp[-3].tparms));
7873 }
7874 #endif
7875 Delattr((yyval.node),"specialization");
7876 Setattr((yyval.node),"partialspecialization","1");
7877 /* Create a specialized name for matching */
7878 {
7879 Parm *p = (yyvsp[-3].tparms);
7880 String *fname = NewString(Getattr((yyval.node),"name"));
7881 String *ffname = 0;
7882 ParmList *partialparms = 0;
7883
7884 char tmp[32];
7885 int i, ilen;
7886 while (p) {
7887 String *n = Getattr(p,"name");
7888 if (!n) {
7889 p = nextSibling(p);
7890 continue;
7891 }
7892 ilen = Len(tlist);
7893 for (i = 0; i < ilen; i++) {
7894 if (Strstr(Getitem(tlist,i),n)) {
7895 sprintf(tmp,"$%d",i+1);
7896 Replaceid(fname,n,tmp);
7897 }
7898 }
7899 p = nextSibling(p);
7900 }
7901 /* Patch argument names with typedef */
7902 {
7903 Iterator tt;
7904 Parm *parm_current = 0;
7905 List *tparms = SwigType_parmlist(fname);
7906 ffname = SwigType_templateprefix(fname);
7907 Append(ffname,"<(");
7908 for (tt = First(tparms); tt.item; ) {
7909 SwigType *rtt = Swig_symbol_typedef_reduce(tt.item,0);
7910 SwigType *ttr = Swig_symbol_type_qualify(rtt,0);
7911
7912 Parm *newp = NewParmWithoutFileLineInfo(ttr, 0);
7913 if (partialparms)
7914 set_nextSibling(parm_current, newp);
7915 else
7916 partialparms = newp;
7917 parm_current = newp;
7918
7919 Append(ffname,ttr);
7920 tt = Next(tt);
7921 if (tt.item) Putc(',',ffname);
7922 Delete(rtt);
7923 Delete(ttr);
7924 }
7925 Delete(tparms);
7926 Append(ffname,")>");
7927 }
7928 {
7929 Node *new_partial = NewHash();
7930 String *partials = Getattr(tempn,"partials");
7931 if (!partials) {
7932 partials = NewList();
7933 Setattr(tempn,"partials",partials);
7934 Delete(partials);
7935 }
7936 /* Printf(stdout,"partial: fname = '%s', '%s'\n", fname, Swig_symbol_typedef_reduce(fname,0)); */
7937 Setattr(new_partial, "partialparms", partialparms);
7938 Setattr(new_partial, "templcsymname", ffname);
7939 Append(partials, new_partial);
7940 }
7941 Setattr((yyval.node),"partialargs",ffname);
7942 Swig_symbol_cadd(ffname,(yyval.node));
7943 }
7944 }
7945 Delete(tlist);
7946 Delete(targs);
7947 } else {
7948 /* An explicit template specialization */
7949 /* add default args from primary (unspecialized) template */
7950 String *ty = Swig_symbol_template_deftype(tname,0);
7951 String *fname = Swig_symbol_type_qualify(ty,0);
7952 Swig_symbol_cadd(fname,(yyval.node));
7953 Delete(ty);
7954 Delete(fname);
7955 }
7956 } else if ((yyval.node)) {
7957 Setattr((yyval.node),"templatetype",nodeType((yyvsp[0].node)));
7958 set_nodeType((yyval.node),"template");
7959 Setattr((yyval.node),"templateparms", (yyvsp[-3].tparms));
7960 if (!Getattr((yyval.node),"sym:weak")) {
7961 Setattr((yyval.node),"sym:typename","1");
7962 }
7963 add_symbols((yyval.node));
7964 default_arguments((yyval.node));
7965 /* We also place a fully parameterized version in the symbol table */
7966 {
7967 Parm *p;
7968 String *fname = NewStringf("%s<(", Getattr((yyval.node),"name"));
7969 p = (yyvsp[-3].tparms);
7970 while (p) {
7971 String *n = Getattr(p,"name");
7972 if (!n) n = Getattr(p,"type");
7973 Append(fname,n);
7974 p = nextSibling(p);
7975 if (p) Putc(',',fname);
7976 }
7977 Append(fname,")>");
7978 Swig_symbol_cadd(fname,(yyval.node));
7979 }
7980 }
7981 (yyval.node) = ntop;
7982 Swig_symbol_setscope(cscope);
7983 Delete(Namespaceprefix);
7984 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7985 if (error || (nscope_inner && Strcmp(nodeType(nscope_inner), "class") == 0)) {
7986 (yyval.node) = 0;
7987 }
7988 if (currentOuterClass)
7989 template_parameters = Getattr(currentOuterClass, "template_parameters");
7990 else
7991 template_parameters = 0;
7992 parsing_template_declaration = 0;
7993 }
7994 #line 7995 "y.tab.c" /* yacc.c:1646 */
7995 break;
7996
7997 case 170:
7998 #line 4359 "parser.y" /* yacc.c:1646 */
7999 {
8000 Swig_warning(WARN_PARSE_EXPLICIT_TEMPLATE, cparse_file, cparse_line, "Explicit template instantiation ignored.\n");
8001 (yyval.node) = 0;
8002 }
8003 #line 8004 "y.tab.c" /* yacc.c:1646 */
8004 break;
8005
8006 case 171:
8007 #line 4365 "parser.y" /* yacc.c:1646 */
8008 {
8009 Swig_warning(WARN_PARSE_EXPLICIT_TEMPLATE, cparse_file, cparse_line, "Explicit template instantiation ignored.\n");
8010 (yyval.node) = 0;
8011 }
8012 #line 8013 "y.tab.c" /* yacc.c:1646 */
8013 break;
8014
8015 case 172:
8016 #line 4371 "parser.y" /* yacc.c:1646 */
8017 {
8018 (yyval.node) = (yyvsp[0].node);
8019 }
8020 #line 8021 "y.tab.c" /* yacc.c:1646 */
8021 break;
8022
8023 case 173:
8024 #line 4374 "parser.y" /* yacc.c:1646 */
8025 {
8026 (yyval.node) = (yyvsp[0].node);
8027 }
8028 #line 8029 "y.tab.c" /* yacc.c:1646 */
8029 break;
8030
8031 case 174:
8032 #line 4377 "parser.y" /* yacc.c:1646 */
8033 {
8034 (yyval.node) = (yyvsp[0].node);
8035 }
8036 #line 8037 "y.tab.c" /* yacc.c:1646 */
8037 break;
8038
8039 case 175:
8040 #line 4380 "parser.y" /* yacc.c:1646 */
8041 {
8042 (yyval.node) = 0;
8043 }
8044 #line 8045 "y.tab.c" /* yacc.c:1646 */
8045 break;
8046
8047 case 176:
8048 #line 4383 "parser.y" /* yacc.c:1646 */
8049 {
8050 (yyval.node) = (yyvsp[0].node);
8051 }
8052 #line 8053 "y.tab.c" /* yacc.c:1646 */
8053 break;
8054
8055 case 177:
8056 #line 4386 "parser.y" /* yacc.c:1646 */
8057 {
8058 (yyval.node) = (yyvsp[0].node);
8059 }
8060 #line 8061 "y.tab.c" /* yacc.c:1646 */
8061 break;
8062
8063 case 178:
8064 #line 4391 "parser.y" /* yacc.c:1646 */
8065 {
8066 /* Rip out the parameter names */
8067 Parm *p = (yyvsp[0].pl);
8068 (yyval.tparms) = (yyvsp[0].pl);
8069
8070 while (p) {
8071 String *name = Getattr(p,"name");
8072 if (!name) {
8073 /* Hmmm. Maybe it's a 'class T' parameter */
8074 char *type = Char(Getattr(p,"type"));
8075 /* Template template parameter */
8076 if (strncmp(type,"template<class> ",16) == 0) {
8077 type += 16;
8078 }
8079 if ((strncmp(type,"class ",6) == 0) || (strncmp(type,"typename ", 9) == 0)) {
8080 char *t = strchr(type,' ');
8081 Setattr(p,"name", t+1);
8082 } else
8083 /* Variadic template args */
8084 if ((strncmp(type,"class... ",9) == 0) || (strncmp(type,"typename... ", 12) == 0)) {
8085 char *t = strchr(type,' ');
8086 Setattr(p,"name", t+1);
8087 Setattr(p,"variadic", "1");
8088 } else {
8089 /*
8090 Swig_error(cparse_file, cparse_line, "Missing template parameter name\n");
8091 $$.rparms = 0;
8092 $$.parms = 0;
8093 break; */
8094 }
8095 }
8096 p = nextSibling(p);
8097 }
8098 }
8099 #line 8100 "y.tab.c" /* yacc.c:1646 */
8100 break;
8101
8102 case 179:
8103 #line 4427 "parser.y" /* yacc.c:1646 */
8104 {
8105 set_nextSibling((yyvsp[-1].p),(yyvsp[0].pl));
8106 (yyval.pl) = (yyvsp[-1].p);
8107 }
8108 #line 8109 "y.tab.c" /* yacc.c:1646 */
8109 break;
8110
8111 case 180:
8112 #line 4431 "parser.y" /* yacc.c:1646 */
8113 { (yyval.pl) = 0; }
8114 #line 8115 "y.tab.c" /* yacc.c:1646 */
8115 break;
8116
8117 case 181:
8118 #line 4434 "parser.y" /* yacc.c:1646 */
8119 {
8120 (yyval.p) = NewParmWithoutFileLineInfo(NewString((yyvsp[0].id)), 0);
8121 }
8122 #line 8123 "y.tab.c" /* yacc.c:1646 */
8123 break;
8124
8125 case 182:
8126 #line 4437 "parser.y" /* yacc.c:1646 */
8127 {
8128 (yyval.p) = (yyvsp[0].p);
8129 }
8130 #line 8131 "y.tab.c" /* yacc.c:1646 */
8131 break;
8132
8133 case 183:
8134 #line 4442 "parser.y" /* yacc.c:1646 */
8135 {
8136 set_nextSibling((yyvsp[-1].p),(yyvsp[0].pl));
8137 (yyval.pl) = (yyvsp[-1].p);
8138 }
8139 #line 8140 "y.tab.c" /* yacc.c:1646 */
8140 break;
8141
8142 case 184:
8143 #line 4446 "parser.y" /* yacc.c:1646 */
8144 { (yyval.pl) = 0; }
8145 #line 8146 "y.tab.c" /* yacc.c:1646 */
8146 break;
8147
8148 case 185:
8149 #line 4451 "parser.y" /* yacc.c:1646 */
8150 {
8151 String *uname = Swig_symbol_type_qualify((yyvsp[-1].str),0);
8152 String *name = Swig_scopename_last((yyvsp[-1].str));
8153 (yyval.node) = new_node("using");
8154 Setattr((yyval.node),"uname",uname);
8155 Setattr((yyval.node),"name", name);
8156 Delete(uname);
8157 Delete(name);
8158 add_symbols((yyval.node));
8159 }
8160 #line 8161 "y.tab.c" /* yacc.c:1646 */
8161 break;
8162
8163 case 186:
8164 #line 4461 "parser.y" /* yacc.c:1646 */
8165 {
8166 Node *n = Swig_symbol_clookup((yyvsp[-1].str),0);
8167 if (!n) {
8168 Swig_error(cparse_file, cparse_line, "Nothing known about namespace '%s'\n", (yyvsp[-1].str));
8169 (yyval.node) = 0;
8170 } else {
8171
8172 while (Strcmp(nodeType(n),"using") == 0) {
8173 n = Getattr(n,"node");
8174 }
8175 if (n) {
8176 if (Strcmp(nodeType(n),"namespace") == 0) {
8177 Symtab *current = Swig_symbol_current();
8178 Symtab *symtab = Getattr(n,"symtab");
8179 (yyval.node) = new_node("using");
8180 Setattr((yyval.node),"node",n);
8181 Setattr((yyval.node),"namespace", (yyvsp[-1].str));
8182 if (current != symtab) {
8183 Swig_symbol_inherit(symtab);
8184 }
8185 } else {
8186 Swig_error(cparse_file, cparse_line, "'%s' is not a namespace.\n", (yyvsp[-1].str));
8187 (yyval.node) = 0;
8188 }
8189 } else {
8190 (yyval.node) = 0;
8191 }
8192 }
8193 }
8194 #line 8195 "y.tab.c" /* yacc.c:1646 */
8195 break;
8196
8197 case 187:
8198 #line 4492 "parser.y" /* yacc.c:1646 */
8199 {
8200 Hash *h;
8201 Node *parent_ns = 0;
8202 List *scopes = Swig_scopename_tolist((yyvsp[-1].str));
8203 int ilen = Len(scopes);
8204 int i;
8205
8206 /*
8207 Printf(stdout, "==== Namespace %s creation...\n", $2);
8208 */
8209 (yyval.node) = 0;
8210 for (i = 0; i < ilen; i++) {
8211 Node *ns = new_node("namespace");
8212 Symtab *current_symtab = Swig_symbol_current();
8213 String *scopename = Getitem(scopes, i);
8214 Setattr(ns, "name", scopename);
8215 (yyval.node) = ns;
8216 if (parent_ns)
8217 appendChild(parent_ns, ns);
8218 parent_ns = ns;
8219 h = Swig_symbol_clookup(scopename, 0);
8220 if (h && (current_symtab == Getattr(h, "sym:symtab")) && (Strcmp(nodeType(h), "namespace") == 0)) {
8221 /*
8222 Printf(stdout, " Scope %s [found C++17 style]\n", scopename);
8223 */
8224 if (Getattr(h, "alias")) {
8225 h = Getattr(h, "namespace");
8226 Swig_warning(WARN_PARSE_NAMESPACE_ALIAS, cparse_file, cparse_line, "Namespace alias '%s' not allowed here. Assuming '%s'\n",
8227 scopename, Getattr(h, "name"));
8228 scopename = Getattr(h, "name");
8229 }
8230 Swig_symbol_setscope(Getattr(h, "symtab"));
8231 } else {
8232 /*
8233 Printf(stdout, " Scope %s [creating single scope C++17 style]\n", scopename);
8234 */
8235 h = Swig_symbol_newscope();
8236 Swig_symbol_setscopename(scopename);
8237 }
8238 Delete(Namespaceprefix);
8239 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
8240 }
8241 Delete(scopes);
8242 }
8243 #line 8244 "y.tab.c" /* yacc.c:1646 */
8244 break;
8245
8246 case 188:
8247 #line 4535 "parser.y" /* yacc.c:1646 */
8248 {
8249 Node *n = (yyvsp[-2].node);
8250 Node *top_ns = 0;
8251 do {
8252 Setattr(n, "symtab", Swig_symbol_popscope());
8253 Delete(Namespaceprefix);
8254 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
8255 add_symbols(n);
8256 top_ns = n;
8257 n = parentNode(n);
8258 } while(n);
8259 appendChild((yyvsp[-2].node), firstChild((yyvsp[-1].node)));
8260 Delete((yyvsp[-1].node));
8261 (yyval.node) = top_ns;
8262 }
8263 #line 8264 "y.tab.c" /* yacc.c:1646 */
8264 break;
8265
8266 case 189:
8267 #line 4550 "parser.y" /* yacc.c:1646 */
8268 {
8269 Hash *h;
8270 (yyvsp[-1].node) = Swig_symbol_current();
8271 h = Swig_symbol_clookup(" ",0);
8272 if (h && (Strcmp(nodeType(h),"namespace") == 0)) {
8273 Swig_symbol_setscope(Getattr(h,"symtab"));
8274 } else {
8275 Swig_symbol_newscope();
8276 /* we don't use "__unnamed__", but a long 'empty' name */
8277 Swig_symbol_setscopename(" ");
8278 }
8279 Namespaceprefix = 0;
8280 }
8281 #line 8282 "y.tab.c" /* yacc.c:1646 */
8282 break;
8283
8284 case 190:
8285 #line 4562 "parser.y" /* yacc.c:1646 */
8286 {
8287 (yyval.node) = (yyvsp[-1].node);
8288 set_nodeType((yyval.node),"namespace");
8289 Setattr((yyval.node),"unnamed","1");
8290 Setattr((yyval.node),"symtab", Swig_symbol_popscope());
8291 Swig_symbol_setscope((yyvsp[-4].node));
8292 Delete(Namespaceprefix);
8293 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
8294 add_symbols((yyval.node));
8295 }
8296 #line 8297 "y.tab.c" /* yacc.c:1646 */
8297 break;
8298
8299 case 191:
8300 #line 4572 "parser.y" /* yacc.c:1646 */
8301 {
8302 /* Namespace alias */
8303 Node *n;
8304 (yyval.node) = new_node("namespace");
8305 Setattr((yyval.node),"name",(yyvsp[-3].id));
8306 Setattr((yyval.node),"alias",(yyvsp[-1].str));
8307 n = Swig_symbol_clookup((yyvsp[-1].str),0);
8308 if (!n) {
8309 Swig_error(cparse_file, cparse_line, "Unknown namespace '%s'\n", (yyvsp[-1].str));
8310 (yyval.node) = 0;
8311 } else {
8312 if (Strcmp(nodeType(n),"namespace") != 0) {
8313 Swig_error(cparse_file, cparse_line, "'%s' is not a namespace\n",(yyvsp[-1].str));
8314 (yyval.node) = 0;
8315 } else {
8316 while (Getattr(n,"alias")) {
8317 n = Getattr(n,"namespace");
8318 }
8319 Setattr((yyval.node),"namespace",n);
8320 add_symbols((yyval.node));
8321 /* Set up a scope alias */
8322 Swig_symbol_alias((yyvsp[-3].id),Getattr(n,"symtab"));
8323 }
8324 }
8325 }
8326 #line 8327 "y.tab.c" /* yacc.c:1646 */
8327 break;
8328
8329 case 192:
8330 #line 4599 "parser.y" /* yacc.c:1646 */
8331 {
8332 (yyval.node) = (yyvsp[-1].node);
8333 /* Insert cpp_member (including any siblings) to the front of the cpp_members linked list */
8334 if ((yyval.node)) {
8335 Node *p = (yyval.node);
8336 Node *pp =0;
8337 while (p) {
8338 pp = p;
8339 p = nextSibling(p);
8340 }
8341 set_nextSibling(pp,(yyvsp[0].node));
8342 if ((yyvsp[0].node))
8343 set_previousSibling((yyvsp[0].node), pp);
8344 } else {
8345 (yyval.node) = (yyvsp[0].node);
8346 }
8347 }
8348 #line 8349 "y.tab.c" /* yacc.c:1646 */
8349 break;
8350
8351 case 193:
8352 #line 4616 "parser.y" /* yacc.c:1646 */
8353 {
8354 extendmode = 1;
8355 if (cplus_mode != CPLUS_PUBLIC) {
8356 Swig_error(cparse_file,cparse_line,"%%extend can only be used in a public section\n");
8357 }
8358 }
8359 #line 8360 "y.tab.c" /* yacc.c:1646 */
8360 break;
8361
8362 case 194:
8363 #line 4621 "parser.y" /* yacc.c:1646 */
8364 {
8365 extendmode = 0;
8366 }
8367 #line 8368 "y.tab.c" /* yacc.c:1646 */
8368 break;
8369
8370 case 195:
8371 #line 4623 "parser.y" /* yacc.c:1646 */
8372 {
8373 (yyval.node) = new_node("extend");
8374 mark_nodes_as_extend((yyvsp[-3].node));
8375 appendChild((yyval.node),(yyvsp[-3].node));
8376 set_nextSibling((yyval.node),(yyvsp[0].node));
8377 }
8378 #line 8379 "y.tab.c" /* yacc.c:1646 */
8379 break;
8380
8381 case 196:
8382 #line 4629 "parser.y" /* yacc.c:1646 */
8383 { (yyval.node) = (yyvsp[0].node); }
8384 #line 8385 "y.tab.c" /* yacc.c:1646 */
8385 break;
8386
8387 case 197:
8388 #line 4630 "parser.y" /* yacc.c:1646 */
8389 { (yyval.node) = 0;}
8390 #line 8391 "y.tab.c" /* yacc.c:1646 */
8391 break;
8392
8393 case 198:
8394 #line 4631 "parser.y" /* yacc.c:1646 */
8395 {
8396 int start_line = cparse_line;
8397 skip_decl();
8398 Swig_error(cparse_file,start_line,"Syntax error in input(3).\n");
8399 SWIG_exit(EXIT_FAILURE);
8400 }
8401 #line 8402 "y.tab.c" /* yacc.c:1646 */
8402 break;
8403
8404 case 199:
8405 #line 4636 "parser.y" /* yacc.c:1646 */
8406 {
8407 (yyval.node) = (yyvsp[0].node);
8408 }
8409 #line 8410 "y.tab.c" /* yacc.c:1646 */
8410 break;
8411
8412 case 200:
8413 #line 4647 "parser.y" /* yacc.c:1646 */
8414 { (yyval.node) = (yyvsp[0].node); }
8415 #line 8416 "y.tab.c" /* yacc.c:1646 */
8416 break;
8417
8418 case 201:
8419 #line 4648 "parser.y" /* yacc.c:1646 */
8420 {
8421 (yyval.node) = (yyvsp[0].node);
8422 if (extendmode && current_class) {
8423 String *symname;
8424 symname= make_name((yyval.node),Getattr((yyval.node),"name"), Getattr((yyval.node),"decl"));
8425 if (Strcmp(symname,Getattr((yyval.node),"name")) == 0) {
8426 /* No renaming operation. Set name to class name */
8427 Delete(yyrename);
8428 yyrename = NewString(Getattr(current_class,"sym:name"));
8429 } else {
8430 Delete(yyrename);
8431 yyrename = symname;
8432 }
8433 }
8434 add_symbols((yyval.node));
8435 default_arguments((yyval.node));
8436 }
8437 #line 8438 "y.tab.c" /* yacc.c:1646 */
8438 break;
8439
8440 case 202:
8441 #line 4665 "parser.y" /* yacc.c:1646 */
8442 { (yyval.node) = (yyvsp[0].node); }
8443 #line 8444 "y.tab.c" /* yacc.c:1646 */
8444 break;
8445
8446 case 203:
8447 #line 4666 "parser.y" /* yacc.c:1646 */
8448 { (yyval.node) = (yyvsp[0].node); }
8449 #line 8450 "y.tab.c" /* yacc.c:1646 */
8450 break;
8451
8452 case 204:
8453 #line 4667 "parser.y" /* yacc.c:1646 */
8454 { (yyval.node) = (yyvsp[0].node); }
8455 #line 8456 "y.tab.c" /* yacc.c:1646 */
8456 break;
8457
8458 case 205:
8459 #line 4668 "parser.y" /* yacc.c:1646 */
8460 { (yyval.node) = (yyvsp[0].node); }
8461 #line 8462 "y.tab.c" /* yacc.c:1646 */
8462 break;
8463
8464 case 206:
8465 #line 4669 "parser.y" /* yacc.c:1646 */
8466 { (yyval.node) = (yyvsp[0].node); }
8467 #line 8468 "y.tab.c" /* yacc.c:1646 */
8468 break;
8469
8470 case 207:
8471 #line 4670 "parser.y" /* yacc.c:1646 */
8472 { (yyval.node) = (yyvsp[0].node); }
8473 #line 8474 "y.tab.c" /* yacc.c:1646 */
8474 break;
8475
8476 case 208:
8477 #line 4671 "parser.y" /* yacc.c:1646 */
8478 { (yyval.node) = 0; }
8479 #line 8480 "y.tab.c" /* yacc.c:1646 */
8480 break;
8481
8482 case 209:
8483 #line 4672 "parser.y" /* yacc.c:1646 */
8484 { (yyval.node) = (yyvsp[0].node); }
8485 #line 8486 "y.tab.c" /* yacc.c:1646 */
8486 break;
8487
8488 case 210:
8489 #line 4673 "parser.y" /* yacc.c:1646 */
8490 { (yyval.node) = (yyvsp[0].node); }
8491 #line 8492 "y.tab.c" /* yacc.c:1646 */
8492 break;
8493
8494 case 211:
8495 #line 4674 "parser.y" /* yacc.c:1646 */
8496 { (yyval.node) = 0; }
8497 #line 8498 "y.tab.c" /* yacc.c:1646 */
8498 break;
8499
8500 case 212:
8501 #line 4675 "parser.y" /* yacc.c:1646 */
8502 { (yyval.node) = (yyvsp[0].node); }
8503 #line 8504 "y.tab.c" /* yacc.c:1646 */
8504 break;
8505
8506 case 213:
8507 #line 4676 "parser.y" /* yacc.c:1646 */
8508 { (yyval.node) = (yyvsp[0].node); }
8509 #line 8510 "y.tab.c" /* yacc.c:1646 */
8510 break;
8511
8512 case 214:
8513 #line 4677 "parser.y" /* yacc.c:1646 */
8514 { (yyval.node) = 0; }
8515 #line 8516 "y.tab.c" /* yacc.c:1646 */
8516 break;
8517
8518 case 215:
8519 #line 4678 "parser.y" /* yacc.c:1646 */
8520 {(yyval.node) = (yyvsp[0].node); }
8521 #line 8522 "y.tab.c" /* yacc.c:1646 */
8522 break;
8523
8524 case 216:
8525 #line 4679 "parser.y" /* yacc.c:1646 */
8526 {(yyval.node) = (yyvsp[0].node); }
8527 #line 8528 "y.tab.c" /* yacc.c:1646 */
8528 break;
8529
8530 case 217:
8531 #line 4680 "parser.y" /* yacc.c:1646 */
8532 { (yyval.node) = 0; }
8533 #line 8534 "y.tab.c" /* yacc.c:1646 */
8534 break;
8535
8536 case 218:
8537 #line 4682 "parser.y" /* yacc.c:1646 */
8538 {
8539 (yyval.node) = (yyvsp[0].node);
8540 }
8541 #line 8542 "y.tab.c" /* yacc.c:1646 */
8542 break;
8543
8544 case 219:
8545 #line 4685 "parser.y" /* yacc.c:1646 */
8546 {
8547 (yyval.node) = (yyvsp[0].node);
8548 set_comment((yyvsp[0].node), (yyvsp[-1].str));
8549 }
8550 #line 8551 "y.tab.c" /* yacc.c:1646 */
8551 break;
8552
8553 case 220:
8554 #line 4689 "parser.y" /* yacc.c:1646 */
8555 {
8556 (yyval.node) = (yyvsp[-1].node);
8557 set_comment((yyvsp[-1].node), (yyvsp[0].str));
8558 }
8559 #line 8560 "y.tab.c" /* yacc.c:1646 */
8560 break;
8561
8562 case 221:
8563 #line 4701 "parser.y" /* yacc.c:1646 */
8564 {
8565 if (inclass || extendmode) {
8566 SwigType *decl = NewStringEmpty();
8567 (yyval.node) = new_node("constructor");
8568 Setattr((yyval.node),"storage",(yyvsp[-5].id));
8569 Setattr((yyval.node),"name",(yyvsp[-4].type));
8570 Setattr((yyval.node),"parms",(yyvsp[-2].pl));
8571 SwigType_add_function(decl,(yyvsp[-2].pl));
8572 Setattr((yyval.node),"decl",decl);
8573 Setattr((yyval.node),"throws",(yyvsp[0].decl).throws);
8574 Setattr((yyval.node),"throw",(yyvsp[0].decl).throwf);
8575 Setattr((yyval.node),"noexcept",(yyvsp[0].decl).nexcept);
8576 Setattr((yyval.node),"final",(yyvsp[0].decl).final);
8577 if (Len(scanner_ccode)) {
8578 String *code = Copy(scanner_ccode);
8579 Setattr((yyval.node),"code",code);
8580 Delete(code);
8581 }
8582 SetFlag((yyval.node),"feature:new");
8583 if ((yyvsp[0].decl).defarg)
8584 Setattr((yyval.node),"value",(yyvsp[0].decl).defarg);
8585 } else {
8586 (yyval.node) = 0;
8587 }
8588 }
8589 #line 8590 "y.tab.c" /* yacc.c:1646 */
8590 break;
8591
8592 case 222:
8593 #line 4730 "parser.y" /* yacc.c:1646 */
8594 {
8595 String *name = NewStringf("%s",(yyvsp[-4].str));
8596 if (*(Char(name)) != '~') Insert(name,0,"~");
8597 (yyval.node) = new_node("destructor");
8598 Setattr((yyval.node),"name",name);
8599 Delete(name);
8600 if (Len(scanner_ccode)) {
8601 String *code = Copy(scanner_ccode);
8602 Setattr((yyval.node),"code",code);
8603 Delete(code);
8604 }
8605 {
8606 String *decl = NewStringEmpty();
8607 SwigType_add_function(decl,(yyvsp[-2].pl));
8608 Setattr((yyval.node),"decl",decl);
8609 Delete(decl);
8610 }
8611 Setattr((yyval.node),"throws",(yyvsp[0].dtype).throws);
8612 Setattr((yyval.node),"throw",(yyvsp[0].dtype).throwf);
8613 Setattr((yyval.node),"noexcept",(yyvsp[0].dtype).nexcept);
8614 Setattr((yyval.node),"final",(yyvsp[0].dtype).final);
8615 if ((yyvsp[0].dtype).val)
8616 Setattr((yyval.node),"value",(yyvsp[0].dtype).val);
8617 if ((yyvsp[0].dtype).qualifier)
8618 Swig_error(cparse_file, cparse_line, "Destructor %s %s cannot have a qualifier.\n", Swig_name_decl((yyval.node)), SwigType_str((yyvsp[0].dtype).qualifier, 0));
8619 add_symbols((yyval.node));
8620 }
8621 #line 8622 "y.tab.c" /* yacc.c:1646 */
8622 break;
8623
8624 case 223:
8625 #line 4760 "parser.y" /* yacc.c:1646 */
8626 {
8627 String *name;
8628 (yyval.node) = new_node("destructor");
8629 Setattr((yyval.node),"storage","virtual");
8630 name = NewStringf("%s",(yyvsp[-4].str));
8631 if (*(Char(name)) != '~') Insert(name,0,"~");
8632 Setattr((yyval.node),"name",name);
8633 Delete(name);
8634 Setattr((yyval.node),"throws",(yyvsp[0].dtype).throws);
8635 Setattr((yyval.node),"throw",(yyvsp[0].dtype).throwf);
8636 Setattr((yyval.node),"noexcept",(yyvsp[0].dtype).nexcept);
8637 Setattr((yyval.node),"final",(yyvsp[0].dtype).final);
8638 if ((yyvsp[0].dtype).val)
8639 Setattr((yyval.node),"value",(yyvsp[0].dtype).val);
8640 if (Len(scanner_ccode)) {
8641 String *code = Copy(scanner_ccode);
8642 Setattr((yyval.node),"code",code);
8643 Delete(code);
8644 }
8645 {
8646 String *decl = NewStringEmpty();
8647 SwigType_add_function(decl,(yyvsp[-2].pl));
8648 Setattr((yyval.node),"decl",decl);
8649 Delete(decl);
8650 }
8651 if ((yyvsp[0].dtype).qualifier)
8652 Swig_error(cparse_file, cparse_line, "Destructor %s %s cannot have a qualifier.\n", Swig_name_decl((yyval.node)), SwigType_str((yyvsp[0].dtype).qualifier, 0));
8653 add_symbols((yyval.node));
8654 }
8655 #line 8656 "y.tab.c" /* yacc.c:1646 */
8656 break;
8657
8658 case 224:
8659 #line 4793 "parser.y" /* yacc.c:1646 */
8660 {
8661 (yyval.node) = new_node("cdecl");
8662 Setattr((yyval.node),"type",(yyvsp[-5].type));
8663 Setattr((yyval.node),"name",(yyvsp[-6].str));
8664 Setattr((yyval.node),"storage",(yyvsp[-7].id));
8665
8666 SwigType_add_function((yyvsp[-4].type),(yyvsp[-2].pl));
8667 if ((yyvsp[0].dtype).qualifier) {
8668 SwigType_push((yyvsp[-4].type),(yyvsp[0].dtype).qualifier);
8669 }
8670 if ((yyvsp[0].dtype).val) {
8671 Setattr((yyval.node),"value",(yyvsp[0].dtype).val);
8672 }
8673 Setattr((yyval.node),"refqualifier",(yyvsp[0].dtype).refqualifier);
8674 Setattr((yyval.node),"decl",(yyvsp[-4].type));
8675 Setattr((yyval.node),"parms",(yyvsp[-2].pl));
8676 Setattr((yyval.node),"conversion_operator","1");
8677 add_symbols((yyval.node));
8678 }
8679 #line 8680 "y.tab.c" /* yacc.c:1646 */
8680 break;
8681
8682 case 225:
8683 #line 4812 "parser.y" /* yacc.c:1646 */
8684 {
8685 SwigType *decl;
8686 (yyval.node) = new_node("cdecl");
8687 Setattr((yyval.node),"type",(yyvsp[-5].type));
8688 Setattr((yyval.node),"name",(yyvsp[-6].str));
8689 Setattr((yyval.node),"storage",(yyvsp[-7].id));
8690 decl = NewStringEmpty();
8691 SwigType_add_reference(decl);
8692 SwigType_add_function(decl,(yyvsp[-2].pl));
8693 if ((yyvsp[0].dtype).qualifier) {
8694 SwigType_push(decl,(yyvsp[0].dtype).qualifier);
8695 }
8696 if ((yyvsp[0].dtype).val) {
8697 Setattr((yyval.node),"value",(yyvsp[0].dtype).val);
8698 }
8699 Setattr((yyval.node),"refqualifier",(yyvsp[0].dtype).refqualifier);
8700 Setattr((yyval.node),"decl",decl);
8701 Setattr((yyval.node),"parms",(yyvsp[-2].pl));
8702 Setattr((yyval.node),"conversion_operator","1");
8703 add_symbols((yyval.node));
8704 }
8705 #line 8706 "y.tab.c" /* yacc.c:1646 */
8706 break;
8707
8708 case 226:
8709 #line 4833 "parser.y" /* yacc.c:1646 */
8710 {
8711 SwigType *decl;
8712 (yyval.node) = new_node("cdecl");
8713 Setattr((yyval.node),"type",(yyvsp[-5].type));
8714 Setattr((yyval.node),"name",(yyvsp[-6].str));
8715 Setattr((yyval.node),"storage",(yyvsp[-7].id));
8716 decl = NewStringEmpty();
8717 SwigType_add_rvalue_reference(decl);
8718 SwigType_add_function(decl,(yyvsp[-2].pl));
8719 if ((yyvsp[0].dtype).qualifier) {
8720 SwigType_push(decl,(yyvsp[0].dtype).qualifier);
8721 }
8722 if ((yyvsp[0].dtype).val) {
8723 Setattr((yyval.node),"value",(yyvsp[0].dtype).val);
8724 }
8725 Setattr((yyval.node),"refqualifier",(yyvsp[0].dtype).refqualifier);
8726 Setattr((yyval.node),"decl",decl);
8727 Setattr((yyval.node),"parms",(yyvsp[-2].pl));
8728 Setattr((yyval.node),"conversion_operator","1");
8729 add_symbols((yyval.node));
8730 }
8731 #line 8732 "y.tab.c" /* yacc.c:1646 */
8732 break;
8733
8734 case 227:
8735 #line 4855 "parser.y" /* yacc.c:1646 */
8736 {
8737 SwigType *decl;
8738 (yyval.node) = new_node("cdecl");
8739 Setattr((yyval.node),"type",(yyvsp[-6].type));
8740 Setattr((yyval.node),"name",(yyvsp[-7].str));
8741 Setattr((yyval.node),"storage",(yyvsp[-8].id));
8742 decl = NewStringEmpty();
8743 SwigType_add_pointer(decl);
8744 SwigType_add_reference(decl);
8745 SwigType_add_function(decl,(yyvsp[-2].pl));
8746 if ((yyvsp[0].dtype).qualifier) {
8747 SwigType_push(decl,(yyvsp[0].dtype).qualifier);
8748 }
8749 if ((yyvsp[0].dtype).val) {
8750 Setattr((yyval.node),"value",(yyvsp[0].dtype).val);
8751 }
8752 Setattr((yyval.node),"refqualifier",(yyvsp[0].dtype).refqualifier);
8753 Setattr((yyval.node),"decl",decl);
8754 Setattr((yyval.node),"parms",(yyvsp[-2].pl));
8755 Setattr((yyval.node),"conversion_operator","1");
8756 add_symbols((yyval.node));
8757 }
8758 #line 8759 "y.tab.c" /* yacc.c:1646 */
8759 break;
8760
8761 case 228:
8762 #line 4878 "parser.y" /* yacc.c:1646 */
8763 {
8764 String *t = NewStringEmpty();
8765 (yyval.node) = new_node("cdecl");
8766 Setattr((yyval.node),"type",(yyvsp[-4].type));
8767 Setattr((yyval.node),"name",(yyvsp[-5].str));
8768 Setattr((yyval.node),"storage",(yyvsp[-6].id));
8769 SwigType_add_function(t,(yyvsp[-2].pl));
8770 if ((yyvsp[0].dtype).qualifier) {
8771 SwigType_push(t,(yyvsp[0].dtype).qualifier);
8772 }
8773 if ((yyvsp[0].dtype).val) {
8774 Setattr((yyval.node),"value",(yyvsp[0].dtype).val);
8775 }
8776 Setattr((yyval.node),"refqualifier",(yyvsp[0].dtype).refqualifier);
8777 Setattr((yyval.node),"decl",t);
8778 Setattr((yyval.node),"parms",(yyvsp[-2].pl));
8779 Setattr((yyval.node),"conversion_operator","1");
8780 add_symbols((yyval.node));
8781 }
8782 #line 8783 "y.tab.c" /* yacc.c:1646 */
8783 break;
8784
8785 case 229:
8786 #line 4901 "parser.y" /* yacc.c:1646 */
8787 {
8788 skip_balanced('{','}');
8789 (yyval.node) = 0;
8790 }
8791 #line 8792 "y.tab.c" /* yacc.c:1646 */
8792 break;
8793
8794 case 230:
8795 #line 4909 "parser.y" /* yacc.c:1646 */
8796 {
8797 skip_balanced('(',')');
8798 (yyval.node) = 0;
8799 }
8800 #line 8801 "y.tab.c" /* yacc.c:1646 */
8801 break;
8802
8803 case 231:
8804 #line 4916 "parser.y" /* yacc.c:1646 */
8805 {
8806 (yyval.node) = new_node("access");
8807 Setattr((yyval.node),"kind","public");
8808 cplus_mode = CPLUS_PUBLIC;
8809 }
8810 #line 8811 "y.tab.c" /* yacc.c:1646 */
8811 break;
8812
8813 case 232:
8814 #line 4923 "parser.y" /* yacc.c:1646 */
8815 {
8816 (yyval.node) = new_node("access");
8817 Setattr((yyval.node),"kind","private");
8818 cplus_mode = CPLUS_PRIVATE;
8819 }
8820 #line 8821 "y.tab.c" /* yacc.c:1646 */
8821 break;
8822
8823 case 233:
8824 #line 4931 "parser.y" /* yacc.c:1646 */
8825 {
8826 (yyval.node) = new_node("access");
8827 Setattr((yyval.node),"kind","protected");
8828 cplus_mode = CPLUS_PROTECTED;
8829 }
8830 #line 8831 "y.tab.c" /* yacc.c:1646 */
8831 break;
8832
8833 case 234:
8834 #line 4939 "parser.y" /* yacc.c:1646 */
8835 { (yyval.node) = (yyvsp[0].node); }
8836 #line 8837 "y.tab.c" /* yacc.c:1646 */
8837 break;
8838
8839 case 235:
8840 #line 4942 "parser.y" /* yacc.c:1646 */
8841 { (yyval.node) = (yyvsp[0].node); }
8842 #line 8843 "y.tab.c" /* yacc.c:1646 */
8843 break;
8844
8845 case 236:
8846 #line 4946 "parser.y" /* yacc.c:1646 */
8847 { (yyval.node) = (yyvsp[0].node); }
8848 #line 8849 "y.tab.c" /* yacc.c:1646 */
8849 break;
8850
8851 case 237:
8852 #line 4949 "parser.y" /* yacc.c:1646 */
8853 { (yyval.node) = (yyvsp[0].node); }
8854 #line 8855 "y.tab.c" /* yacc.c:1646 */
8855 break;
8856
8857 case 238:
8858 #line 4950 "parser.y" /* yacc.c:1646 */
8859 { (yyval.node) = (yyvsp[0].node); }
8860 #line 8861 "y.tab.c" /* yacc.c:1646 */
8861 break;
8862
8863 case 239:
8864 #line 4951 "parser.y" /* yacc.c:1646 */
8865 { (yyval.node) = (yyvsp[0].node); }
8866 #line 8867 "y.tab.c" /* yacc.c:1646 */
8867 break;
8868
8869 case 240:
8870 #line 4952 "parser.y" /* yacc.c:1646 */
8871 { (yyval.node) = (yyvsp[0].node); }
8872 #line 8873 "y.tab.c" /* yacc.c:1646 */
8873 break;
8874
8875 case 241:
8876 #line 4953 "parser.y" /* yacc.c:1646 */
8877 { (yyval.node) = (yyvsp[0].node); }
8878 #line 8879 "y.tab.c" /* yacc.c:1646 */
8879 break;
8880
8881 case 242:
8882 #line 4954 "parser.y" /* yacc.c:1646 */
8883 { (yyval.node) = (yyvsp[0].node); }
8884 #line 8885 "y.tab.c" /* yacc.c:1646 */
8885 break;
8886
8887 case 243:
8888 #line 4955 "parser.y" /* yacc.c:1646 */
8889 { (yyval.node) = (yyvsp[0].node); }
8890 #line 8891 "y.tab.c" /* yacc.c:1646 */
8891 break;
8892
8893 case 244:
8894 #line 4956 "parser.y" /* yacc.c:1646 */
8895 { (yyval.node) = (yyvsp[0].node); }
8896 #line 8897 "y.tab.c" /* yacc.c:1646 */
8897 break;
8898
8899 case 245:
8900 #line 4959 "parser.y" /* yacc.c:1646 */
8901 {
8902 Clear(scanner_ccode);
8903 (yyval.dtype).val = 0;
8904 (yyval.dtype).qualifier = (yyvsp[-1].dtype).qualifier;
8905 (yyval.dtype).refqualifier = (yyvsp[-1].dtype).refqualifier;
8906 (yyval.dtype).bitfield = 0;
8907 (yyval.dtype).throws = (yyvsp[-1].dtype).throws;
8908 (yyval.dtype).throwf = (yyvsp[-1].dtype).throwf;
8909 (yyval.dtype).nexcept = (yyvsp[-1].dtype).nexcept;
8910 (yyval.dtype).final = (yyvsp[-1].dtype).final;
8911 }
8912 #line 8913 "y.tab.c" /* yacc.c:1646 */
8913 break;
8914
8915 case 246:
8916 #line 4970 "parser.y" /* yacc.c:1646 */
8917 {
8918 Clear(scanner_ccode);
8919 (yyval.dtype).val = (yyvsp[-1].dtype).val;
8920 (yyval.dtype).qualifier = (yyvsp[-3].dtype).qualifier;
8921 (yyval.dtype).refqualifier = (yyvsp[-3].dtype).refqualifier;
8922 (yyval.dtype).bitfield = 0;
8923 (yyval.dtype).throws = (yyvsp[-3].dtype).throws;
8924 (yyval.dtype).throwf = (yyvsp[-3].dtype).throwf;
8925 (yyval.dtype).nexcept = (yyvsp[-3].dtype).nexcept;
8926 (yyval.dtype).final = (yyvsp[-3].dtype).final;
8927 }
8928 #line 8929 "y.tab.c" /* yacc.c:1646 */
8929 break;
8930
8931 case 247:
8932 #line 4981 "parser.y" /* yacc.c:1646 */
8933 {
8934 skip_balanced('{','}');
8935 (yyval.dtype).val = 0;
8936 (yyval.dtype).qualifier = (yyvsp[-1].dtype).qualifier;
8937 (yyval.dtype).refqualifier = (yyvsp[-1].dtype).refqualifier;
8938 (yyval.dtype).bitfield = 0;
8939 (yyval.dtype).throws = (yyvsp[-1].dtype).throws;
8940 (yyval.dtype).throwf = (yyvsp[-1].dtype).throwf;
8941 (yyval.dtype).nexcept = (yyvsp[-1].dtype).nexcept;
8942 (yyval.dtype).final = (yyvsp[-1].dtype).final;
8943 }
8944 #line 8945 "y.tab.c" /* yacc.c:1646 */
8945 break;
8946
8947 case 248:
8948 #line 4994 "parser.y" /* yacc.c:1646 */
8949 {
8950 Clear(scanner_ccode);
8951 (yyval.dtype).val = 0;
8952 (yyval.dtype).qualifier = (yyvsp[-1].dtype).qualifier;
8953 (yyval.dtype).refqualifier = (yyvsp[-1].dtype).refqualifier;
8954 (yyval.dtype).bitfield = 0;
8955 (yyval.dtype).throws = (yyvsp[-1].dtype).throws;
8956 (yyval.dtype).throwf = (yyvsp[-1].dtype).throwf;
8957 (yyval.dtype).nexcept = (yyvsp[-1].dtype).nexcept;
8958 (yyval.dtype).final = (yyvsp[-1].dtype).final;
8959 }
8960 #line 8961 "y.tab.c" /* yacc.c:1646 */
8961 break;
8962
8963 case 249:
8964 #line 5005 "parser.y" /* yacc.c:1646 */
8965 {
8966 Clear(scanner_ccode);
8967 (yyval.dtype).val = (yyvsp[-1].dtype).val;
8968 (yyval.dtype).qualifier = (yyvsp[-3].dtype).qualifier;
8969 (yyval.dtype).refqualifier = (yyvsp[-3].dtype).refqualifier;
8970 (yyval.dtype).bitfield = 0;
8971 (yyval.dtype).throws = (yyvsp[-3].dtype).throws;
8972 (yyval.dtype).throwf = (yyvsp[-3].dtype).throwf;
8973 (yyval.dtype).nexcept = (yyvsp[-3].dtype).nexcept;
8974 (yyval.dtype).final = (yyvsp[-3].dtype).final;
8975 }
8976 #line 8977 "y.tab.c" /* yacc.c:1646 */
8977 break;
8978
8979 case 250:
8980 #line 5016 "parser.y" /* yacc.c:1646 */
8981 {
8982 skip_balanced('{','}');
8983 (yyval.dtype).val = 0;
8984 (yyval.dtype).qualifier = (yyvsp[-1].dtype).qualifier;
8985 (yyval.dtype).refqualifier = (yyvsp[-1].dtype).refqualifier;
8986 (yyval.dtype).bitfield = 0;
8987 (yyval.dtype).throws = (yyvsp[-1].dtype).throws;
8988 (yyval.dtype).throwf = (yyvsp[-1].dtype).throwf;
8989 (yyval.dtype).nexcept = (yyvsp[-1].dtype).nexcept;
8990 (yyval.dtype).final = (yyvsp[-1].dtype).final;
8991 }
8992 #line 8993 "y.tab.c" /* yacc.c:1646 */
8993 break;
8994
8995 case 251:
8996 #line 5030 "parser.y" /* yacc.c:1646 */
8997 { }
8998 #line 8999 "y.tab.c" /* yacc.c:1646 */
8999 break;
9000
9001 case 252:
9002 #line 5033 "parser.y" /* yacc.c:1646 */
9003 { (yyval.type) = (yyvsp[0].type);
9004 /* Printf(stdout,"primitive = '%s'\n", $$);*/
9005 }
9006 #line 9007 "y.tab.c" /* yacc.c:1646 */
9007 break;
9008
9009 case 253:
9010 #line 5036 "parser.y" /* yacc.c:1646 */
9011 { (yyval.type) = (yyvsp[0].type); }
9012 #line 9013 "y.tab.c" /* yacc.c:1646 */
9013 break;
9014
9015 case 254:
9016 #line 5037 "parser.y" /* yacc.c:1646 */
9017 { (yyval.type) = (yyvsp[0].type); }
9018 #line 9019 "y.tab.c" /* yacc.c:1646 */
9019 break;
9020
9021 case 255:
9022 #line 5041 "parser.y" /* yacc.c:1646 */
9023 { (yyval.type) = (yyvsp[0].type); }
9024 #line 9025 "y.tab.c" /* yacc.c:1646 */
9025 break;
9026
9027 case 256:
9028 #line 5043 "parser.y" /* yacc.c:1646 */
9029 {
9030 (yyval.type) = (yyvsp[0].str);
9031 }
9032 #line 9033 "y.tab.c" /* yacc.c:1646 */
9033 break;
9034
9035 case 257:
9036 #line 5051 "parser.y" /* yacc.c:1646 */
9037 {
9038 if (Strcmp((yyvsp[0].str),"C") == 0) {
9039 (yyval.id) = "externc";
9040 } else if (Strcmp((yyvsp[0].str),"C++") == 0) {
9041 (yyval.id) = "extern";
9042 } else {
9043 Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", (yyvsp[0].str));
9044 (yyval.id) = 0;
9045 }
9046 }
9047 #line 9048 "y.tab.c" /* yacc.c:1646 */
9048 break;
9049
9050 case 258:
9051 #line 5063 "parser.y" /* yacc.c:1646 */
9052 { (yyval.id) = "extern"; }
9053 #line 9054 "y.tab.c" /* yacc.c:1646 */
9054 break;
9055
9056 case 259:
9057 #line 5064 "parser.y" /* yacc.c:1646 */
9058 { (yyval.id) = (yyvsp[0].id); }
9059 #line 9060 "y.tab.c" /* yacc.c:1646 */
9060 break;
9061
9062 case 260:
9063 #line 5065 "parser.y" /* yacc.c:1646 */
9064 { (yyval.id) = "thread_local"; }
9065 #line 9066 "y.tab.c" /* yacc.c:1646 */
9066 break;
9067
9068 case 261:
9069 #line 5066 "parser.y" /* yacc.c:1646 */
9070 { (yyval.id) = "typedef"; }
9071 #line 9072 "y.tab.c" /* yacc.c:1646 */
9072 break;
9073
9074 case 262:
9075 #line 5067 "parser.y" /* yacc.c:1646 */
9076 { (yyval.id) = "static"; }
9077 #line 9078 "y.tab.c" /* yacc.c:1646 */
9078 break;
9079
9080 case 263:
9081 #line 5068 "parser.y" /* yacc.c:1646 */
9082 { (yyval.id) = "typedef"; }
9083 #line 9084 "y.tab.c" /* yacc.c:1646 */
9084 break;
9085
9086 case 264:
9087 #line 5069 "parser.y" /* yacc.c:1646 */
9088 { (yyval.id) = "virtual"; }
9089 #line 9090 "y.tab.c" /* yacc.c:1646 */
9090 break;
9091
9092 case 265:
9093 #line 5070 "parser.y" /* yacc.c:1646 */
9094 { (yyval.id) = "friend"; }
9095 #line 9096 "y.tab.c" /* yacc.c:1646 */
9096 break;
9097
9098 case 266:
9099 #line 5071 "parser.y" /* yacc.c:1646 */
9100 { (yyval.id) = "explicit"; }
9101 #line 9102 "y.tab.c" /* yacc.c:1646 */
9102 break;
9103
9104 case 267:
9105 #line 5072 "parser.y" /* yacc.c:1646 */
9106 { (yyval.id) = "constexpr"; }
9107 #line 9108 "y.tab.c" /* yacc.c:1646 */
9108 break;
9109
9110 case 268:
9111 #line 5073 "parser.y" /* yacc.c:1646 */
9112 { (yyval.id) = "explicit constexpr"; }
9113 #line 9114 "y.tab.c" /* yacc.c:1646 */
9114 break;
9115
9116 case 269:
9117 #line 5074 "parser.y" /* yacc.c:1646 */
9118 { (yyval.id) = "explicit constexpr"; }
9119 #line 9120 "y.tab.c" /* yacc.c:1646 */
9120 break;
9121
9122 case 270:
9123 #line 5075 "parser.y" /* yacc.c:1646 */
9124 { (yyval.id) = "static constexpr"; }
9125 #line 9126 "y.tab.c" /* yacc.c:1646 */
9126 break;
9127
9128 case 271:
9129 #line 5076 "parser.y" /* yacc.c:1646 */
9130 { (yyval.id) = "static constexpr"; }
9131 #line 9132 "y.tab.c" /* yacc.c:1646 */
9132 break;
9133
9134 case 272:
9135 #line 5077 "parser.y" /* yacc.c:1646 */
9136 { (yyval.id) = "thread_local"; }
9137 #line 9138 "y.tab.c" /* yacc.c:1646 */
9138 break;
9139
9140 case 273:
9141 #line 5078 "parser.y" /* yacc.c:1646 */
9142 { (yyval.id) = "static thread_local"; }
9143 #line 9144 "y.tab.c" /* yacc.c:1646 */
9144 break;
9145
9146 case 274:
9147 #line 5079 "parser.y" /* yacc.c:1646 */
9148 { (yyval.id) = "static thread_local"; }
9149 #line 9150 "y.tab.c" /* yacc.c:1646 */
9150 break;
9151
9152 case 275:
9153 #line 5080 "parser.y" /* yacc.c:1646 */
9154 { (yyval.id) = "extern thread_local"; }
9155 #line 9156 "y.tab.c" /* yacc.c:1646 */
9156 break;
9157
9158 case 276:
9159 #line 5081 "parser.y" /* yacc.c:1646 */
9160 { (yyval.id) = "extern thread_local"; }
9161 #line 9162 "y.tab.c" /* yacc.c:1646 */
9162 break;
9163
9164 case 277:
9165 #line 5082 "parser.y" /* yacc.c:1646 */
9166 { (yyval.id) = 0; }
9167 #line 9168 "y.tab.c" /* yacc.c:1646 */
9168 break;
9169
9170 case 278:
9171 #line 5089 "parser.y" /* yacc.c:1646 */
9172 {
9173 Parm *p;
9174 (yyval.pl) = (yyvsp[0].pl);
9175 p = (yyvsp[0].pl);
9176 while (p) {
9177 Replace(Getattr(p,"type"),"typename ", "", DOH_REPLACE_ANY);
9178 p = nextSibling(p);
9179 }
9180 }
9181 #line 9182 "y.tab.c" /* yacc.c:1646 */
9182 break;
9183
9184 case 279:
9185 #line 5100 "parser.y" /* yacc.c:1646 */
9186 {
9187 set_nextSibling((yyvsp[-1].p),(yyvsp[0].pl));
9188 (yyval.pl) = (yyvsp[-1].p);
9189 }
9190 #line 9191 "y.tab.c" /* yacc.c:1646 */
9191 break;
9192
9193 case 280:
9194 #line 5104 "parser.y" /* yacc.c:1646 */
9195 {
9196 (yyval.pl) = 0;
9197 previousNode = currentNode;
9198 currentNode=0;
9199 }
9200 #line 9201 "y.tab.c" /* yacc.c:1646 */
9201 break;
9202
9203 case 281:
9204 #line 5111 "parser.y" /* yacc.c:1646 */
9205 {
9206 set_nextSibling((yyvsp[-1].p),(yyvsp[0].pl));
9207 (yyval.pl) = (yyvsp[-1].p);
9208 }
9209 #line 9210 "y.tab.c" /* yacc.c:1646 */
9210 break;
9211
9212 case 282:
9213 #line 5115 "parser.y" /* yacc.c:1646 */
9214 {
9215 set_comment(previousNode, (yyvsp[-2].str));
9216 set_nextSibling((yyvsp[-1].p), (yyvsp[0].pl));
9217 (yyval.pl) = (yyvsp[-1].p);
9218 }
9219 #line 9220 "y.tab.c" /* yacc.c:1646 */
9220 break;
9221
9222 case 283:
9223 #line 5120 "parser.y" /* yacc.c:1646 */
9224 { (yyval.pl) = 0; }
9225 #line 9226 "y.tab.c" /* yacc.c:1646 */
9226 break;
9227
9228 case 284:
9229 #line 5124 "parser.y" /* yacc.c:1646 */
9230 {
9231 SwigType_push((yyvsp[-1].type),(yyvsp[0].decl).type);
9232 (yyval.p) = NewParmWithoutFileLineInfo((yyvsp[-1].type),(yyvsp[0].decl).id);
9233 previousNode = currentNode;
9234 currentNode = (yyval.p);
9235 Setfile((yyval.p),cparse_file);
9236 Setline((yyval.p),cparse_line);
9237 if ((yyvsp[0].decl).defarg) {
9238 Setattr((yyval.p),"value",(yyvsp[0].decl).defarg);
9239 }
9240 }
9241 #line 9242 "y.tab.c" /* yacc.c:1646 */
9242 break;
9243
9244 case 285:
9245 #line 5136 "parser.y" /* yacc.c:1646 */
9246 {
9247 (yyval.p) = NewParmWithoutFileLineInfo(NewStringf("template<class> %s %s", (yyvsp[-2].id),(yyvsp[-1].str)), 0);
9248 previousNode = currentNode;
9249 currentNode = (yyval.p);
9250 Setfile((yyval.p),cparse_file);
9251 Setline((yyval.p),cparse_line);
9252 if ((yyvsp[0].dtype).val) {
9253 Setattr((yyval.p),"value",(yyvsp[0].dtype).val);
9254 }
9255 }
9256 #line 9257 "y.tab.c" /* yacc.c:1646 */
9257 break;
9258
9259 case 286:
9260 #line 5146 "parser.y" /* yacc.c:1646 */
9261 {
9262 SwigType *t = NewString("v(...)");
9263 (yyval.p) = NewParmWithoutFileLineInfo(t, 0);
9264 previousNode = currentNode;
9265 currentNode = (yyval.p);
9266 Setfile((yyval.p),cparse_file);
9267 Setline((yyval.p),cparse_line);
9268 }
9269 #line 9270 "y.tab.c" /* yacc.c:1646 */
9270 break;
9271
9272 case 287:
9273 #line 5156 "parser.y" /* yacc.c:1646 */
9274 {
9275 (yyval.p) = (yyvsp[0].p);
9276 }
9277 #line 9278 "y.tab.c" /* yacc.c:1646 */
9278 break;
9279
9280 case 288:
9281 #line 5159 "parser.y" /* yacc.c:1646 */
9282 {
9283 (yyval.p) = (yyvsp[0].p);
9284 set_comment((yyvsp[0].p), (yyvsp[-1].str));
9285 }
9286 #line 9287 "y.tab.c" /* yacc.c:1646 */
9287 break;
9288
9289 case 289:
9290 #line 5163 "parser.y" /* yacc.c:1646 */
9291 {
9292 (yyval.p) = (yyvsp[-1].p);
9293 set_comment((yyvsp[-1].p), (yyvsp[0].str));
9294 }
9295 #line 9296 "y.tab.c" /* yacc.c:1646 */
9296 break;
9297
9298 case 290:
9299 #line 5169 "parser.y" /* yacc.c:1646 */
9300 {
9301 Parm *p;
9302 (yyval.p) = (yyvsp[0].p);
9303 p = (yyvsp[0].p);
9304 while (p) {
9305 if (Getattr(p,"type")) {
9306 Replace(Getattr(p,"type"),"typename ", "", DOH_REPLACE_ANY);
9307 }
9308 p = nextSibling(p);
9309 }
9310 }
9311 #line 9312 "y.tab.c" /* yacc.c:1646 */
9312 break;
9313
9314 case 291:
9315 #line 5182 "parser.y" /* yacc.c:1646 */
9316 {
9317 set_nextSibling((yyvsp[-1].p),(yyvsp[0].p));
9318 (yyval.p) = (yyvsp[-1].p);
9319 }
9320 #line 9321 "y.tab.c" /* yacc.c:1646 */
9321 break;
9322
9323 case 292:
9324 #line 5186 "parser.y" /* yacc.c:1646 */
9325 { (yyval.p) = 0; }
9326 #line 9327 "y.tab.c" /* yacc.c:1646 */
9327 break;
9328
9329 case 293:
9330 #line 5189 "parser.y" /* yacc.c:1646 */
9331 {
9332 set_nextSibling((yyvsp[-1].p),(yyvsp[0].p));
9333 (yyval.p) = (yyvsp[-1].p);
9334 }
9335 #line 9336 "y.tab.c" /* yacc.c:1646 */
9336 break;
9337
9338 case 294:
9339 #line 5193 "parser.y" /* yacc.c:1646 */
9340 { (yyval.p) = 0; }
9341 #line 9342 "y.tab.c" /* yacc.c:1646 */
9342 break;
9343
9344 case 295:
9345 #line 5197 "parser.y" /* yacc.c:1646 */
9346 {
9347 (yyval.p) = (yyvsp[0].p);
9348 {
9349 /* We need to make a possible adjustment for integer parameters. */
9350 SwigType *type;
9351 Node *n = 0;
9352
9353 while (!n) {
9354 type = Getattr((yyvsp[0].p),"type");
9355 n = Swig_symbol_clookup(type,0); /* See if we can find a node that matches the typename */
9356 if ((n) && (Strcmp(nodeType(n),"cdecl") == 0)) {
9357 SwigType *decl = Getattr(n,"decl");
9358 if (!SwigType_isfunction(decl)) {
9359 String *value = Getattr(n,"value");
9360 if (value) {
9361 String *v = Copy(value);
9362 Setattr((yyvsp[0].p),"type",v);
9363 Delete(v);
9364 n = 0;
9365 }
9366 }
9367 } else {
9368 break;
9369 }
9370 }
9371 }
9372
9373 }
9374 #line 9375 "y.tab.c" /* yacc.c:1646 */
9375 break;
9376
9377 case 296:
9378 #line 5225 "parser.y" /* yacc.c:1646 */
9379 {
9380 (yyval.p) = NewParmWithoutFileLineInfo(0,0);
9381 Setfile((yyval.p),cparse_file);
9382 Setline((yyval.p),cparse_line);
9383 Setattr((yyval.p),"value",(yyvsp[0].dtype).val);
9384 }
9385 #line 9386 "y.tab.c" /* yacc.c:1646 */
9386 break;
9387
9388 case 297:
9389 #line 5233 "parser.y" /* yacc.c:1646 */
9390 {
9391 (yyval.dtype) = (yyvsp[0].dtype);
9392 if ((yyvsp[0].dtype).type == T_ERROR) {
9393 Swig_warning(WARN_PARSE_BAD_DEFAULT,cparse_file, cparse_line, "Can't set default argument (ignored)\n");
9394 (yyval.dtype).val = 0;
9395 (yyval.dtype).rawval = 0;
9396 (yyval.dtype).bitfield = 0;
9397 (yyval.dtype).throws = 0;
9398 (yyval.dtype).throwf = 0;
9399 (yyval.dtype).nexcept = 0;
9400 (yyval.dtype).final = 0;
9401 }
9402 }
9403 #line 9404 "y.tab.c" /* yacc.c:1646 */
9404 break;
9405
9406 case 298:
9407 #line 5246 "parser.y" /* yacc.c:1646 */
9408 {
9409 (yyval.dtype) = (yyvsp[-3].dtype);
9410 if ((yyvsp[-3].dtype).type == T_ERROR) {
9411 Swig_warning(WARN_PARSE_BAD_DEFAULT,cparse_file, cparse_line, "Can't set default argument (ignored)\n");
9412 (yyval.dtype) = (yyvsp[-3].dtype);
9413 (yyval.dtype).val = 0;
9414 (yyval.dtype).rawval = 0;
9415 (yyval.dtype).bitfield = 0;
9416 (yyval.dtype).throws = 0;
9417 (yyval.dtype).throwf = 0;
9418 (yyval.dtype).nexcept = 0;
9419 (yyval.dtype).final = 0;
9420 } else {
9421 (yyval.dtype).val = NewStringf("%s[%s]",(yyvsp[-3].dtype).val,(yyvsp[-1].dtype).val);
9422 }
9423 }
9424 #line 9425 "y.tab.c" /* yacc.c:1646 */
9425 break;
9426
9427 case 299:
9428 #line 5262 "parser.y" /* yacc.c:1646 */
9429 {
9430 skip_balanced('{','}');
9431 (yyval.dtype).val = NewString(scanner_ccode);
9432 (yyval.dtype).rawval = 0;
9433 (yyval.dtype).type = T_INT;
9434 (yyval.dtype).bitfield = 0;
9435 (yyval.dtype).throws = 0;
9436 (yyval.dtype).throwf = 0;
9437 (yyval.dtype).nexcept = 0;
9438 (yyval.dtype).final = 0;
9439 }
9440 #line 9441 "y.tab.c" /* yacc.c:1646 */
9441 break;
9442
9443 case 300:
9444 #line 5273 "parser.y" /* yacc.c:1646 */
9445 {
9446 (yyval.dtype).val = 0;
9447 (yyval.dtype).rawval = 0;
9448 (yyval.dtype).type = 0;
9449 (yyval.dtype).bitfield = (yyvsp[0].dtype).val;
9450 (yyval.dtype).throws = 0;
9451 (yyval.dtype).throwf = 0;
9452 (yyval.dtype).nexcept = 0;
9453 (yyval.dtype).final = 0;
9454 }
9455 #line 9456 "y.tab.c" /* yacc.c:1646 */
9456 break;
9457
9458 case 301:
9459 #line 5283 "parser.y" /* yacc.c:1646 */
9460 {
9461 (yyval.dtype).val = 0;
9462 (yyval.dtype).rawval = 0;
9463 (yyval.dtype).type = T_INT;
9464 (yyval.dtype).bitfield = 0;
9465 (yyval.dtype).throws = 0;
9466 (yyval.dtype).throwf = 0;
9467 (yyval.dtype).nexcept = 0;
9468 (yyval.dtype).final = 0;
9469 }
9470 #line 9471 "y.tab.c" /* yacc.c:1646 */
9471 break;
9472
9473 case 302:
9474 #line 5295 "parser.y" /* yacc.c:1646 */
9475 {
9476 (yyval.decl) = (yyvsp[-1].decl);
9477 (yyval.decl).defarg = (yyvsp[0].dtype).rawval ? (yyvsp[0].dtype).rawval : (yyvsp[0].dtype).val;
9478 }
9479 #line 9480 "y.tab.c" /* yacc.c:1646 */
9480 break;
9481
9482 case 303:
9483 #line 5299 "parser.y" /* yacc.c:1646 */
9484 {
9485 (yyval.decl) = (yyvsp[-1].decl);
9486 (yyval.decl).defarg = (yyvsp[0].dtype).rawval ? (yyvsp[0].dtype).rawval : (yyvsp[0].dtype).val;
9487 }
9488 #line 9489 "y.tab.c" /* yacc.c:1646 */
9489 break;
9490
9491 case 304:
9492 #line 5303 "parser.y" /* yacc.c:1646 */
9493 {
9494 (yyval.decl).type = 0;
9495 (yyval.decl).id = 0;
9496 (yyval.decl).defarg = (yyvsp[0].dtype).rawval ? (yyvsp[0].dtype).rawval : (yyvsp[0].dtype).val;
9497 }
9498 #line 9499 "y.tab.c" /* yacc.c:1646 */
9499 break;
9500
9501 case 305:
9502 #line 5310 "parser.y" /* yacc.c:1646 */
9503 {
9504 SwigType *t;
9505 (yyval.decl) = (yyvsp[-4].decl);
9506 t = NewStringEmpty();
9507 SwigType_add_function(t,(yyvsp[-2].pl));
9508 if ((yyvsp[0].dtype).qualifier)
9509 SwigType_push(t, (yyvsp[0].dtype).qualifier);
9510 if (!(yyval.decl).have_parms) {
9511 (yyval.decl).parms = (yyvsp[-2].pl);
9512 (yyval.decl).have_parms = 1;
9513 }
9514 if (!(yyval.decl).type) {
9515 (yyval.decl).type = t;
9516 } else {
9517 SwigType_push(t, (yyval.decl).type);
9518 Delete((yyval.decl).type);
9519 (yyval.decl).type = t;
9520 }
9521 (yyval.decl).defarg = 0;
9522 }
9523 #line 9524 "y.tab.c" /* yacc.c:1646 */
9524 break;
9525
9526 case 306:
9527 #line 5332 "parser.y" /* yacc.c:1646 */
9528 {
9529 (yyval.decl) = (yyvsp[0].decl);
9530 if (SwigType_isfunction((yyvsp[0].decl).type)) {
9531 Delete(SwigType_pop_function((yyvsp[0].decl).type));
9532 } else if (SwigType_isarray((yyvsp[0].decl).type)) {
9533 SwigType *ta = SwigType_pop_arrays((yyvsp[0].decl).type);
9534 if (SwigType_isfunction((yyvsp[0].decl).type)) {
9535 Delete(SwigType_pop_function((yyvsp[0].decl).type));
9536 } else {
9537 (yyval.decl).parms = 0;
9538 }
9539 SwigType_push((yyvsp[0].decl).type,ta);
9540 Delete(ta);
9541 } else {
9542 (yyval.decl).parms = 0;
9543 }
9544 }
9545 #line 9546 "y.tab.c" /* yacc.c:1646 */
9546 break;
9547
9548 case 307:
9549 #line 5349 "parser.y" /* yacc.c:1646 */
9550 {
9551 (yyval.decl) = (yyvsp[0].decl);
9552 if (SwigType_isfunction((yyvsp[0].decl).type)) {
9553 Delete(SwigType_pop_function((yyvsp[0].decl).type));
9554 } else if (SwigType_isarray((yyvsp[0].decl).type)) {
9555 SwigType *ta = SwigType_pop_arrays((yyvsp[0].decl).type);
9556 if (SwigType_isfunction((yyvsp[0].decl).type)) {
9557 Delete(SwigType_pop_function((yyvsp[0].decl).type));
9558 } else {
9559 (yyval.decl).parms = 0;
9560 }
9561 SwigType_push((yyvsp[0].decl).type,ta);
9562 Delete(ta);
9563 } else {
9564 (yyval.decl).parms = 0;
9565 }
9566 }
9567 #line 9568 "y.tab.c" /* yacc.c:1646 */
9568 break;
9569
9570 case 308:
9571 #line 5368 "parser.y" /* yacc.c:1646 */
9572 {
9573 SwigType *t;
9574 (yyval.decl) = (yyvsp[-4].decl);
9575 t = NewStringEmpty();
9576 SwigType_add_function(t, (yyvsp[-2].pl));
9577 if ((yyvsp[0].dtype).qualifier)
9578 SwigType_push(t, (yyvsp[0].dtype).qualifier);
9579 if (!(yyval.decl).have_parms) {
9580 (yyval.decl).parms = (yyvsp[-2].pl);
9581 (yyval.decl).have_parms = 1;
9582 }
9583 if (!(yyval.decl).type) {
9584 (yyval.decl).type = t;
9585 } else {
9586 SwigType_push(t, (yyval.decl).type);
9587 Delete((yyval.decl).type);
9588 (yyval.decl).type = t;
9589 }
9590 }
9591 #line 9592 "y.tab.c" /* yacc.c:1646 */
9592 break;
9593
9594 case 309:
9595 #line 5387 "parser.y" /* yacc.c:1646 */
9596 {
9597 (yyval.decl).type = 0;
9598 (yyval.decl).id = 0;
9599 (yyval.decl).parms = 0;
9600 }
9601 #line 9602 "y.tab.c" /* yacc.c:1646 */
9602 break;
9603
9604 case 310:
9605 #line 5394 "parser.y" /* yacc.c:1646 */
9606 {
9607 (yyval.decl) = (yyvsp[0].decl);
9608 if ((yyval.decl).type) {
9609 SwigType_push((yyvsp[-1].type),(yyval.decl).type);
9610 Delete((yyval.decl).type);
9611 }
9612 (yyval.decl).type = (yyvsp[-1].type);
9613 }
9614 #line 9615 "y.tab.c" /* yacc.c:1646 */
9615 break;
9616
9617 case 311:
9618 #line 5402 "parser.y" /* yacc.c:1646 */
9619 {
9620 (yyval.decl) = (yyvsp[0].decl);
9621 SwigType_add_reference((yyvsp[-2].type));
9622 if ((yyval.decl).type) {
9623 SwigType_push((yyvsp[-2].type),(yyval.decl).type);
9624 Delete((yyval.decl).type);
9625 }
9626 (yyval.decl).type = (yyvsp[-2].type);
9627 }
9628 #line 9629 "y.tab.c" /* yacc.c:1646 */
9629 break;
9630
9631 case 312:
9632 #line 5411 "parser.y" /* yacc.c:1646 */
9633 {
9634 (yyval.decl) = (yyvsp[0].decl);
9635 SwigType_add_rvalue_reference((yyvsp[-2].type));
9636 if ((yyval.decl).type) {
9637 SwigType_push((yyvsp[-2].type),(yyval.decl).type);
9638 Delete((yyval.decl).type);
9639 }
9640 (yyval.decl).type = (yyvsp[-2].type);
9641 }
9642 #line 9643 "y.tab.c" /* yacc.c:1646 */
9643 break;
9644
9645 case 313:
9646 #line 5420 "parser.y" /* yacc.c:1646 */
9647 {
9648 (yyval.decl) = (yyvsp[0].decl);
9649 if (!(yyval.decl).type) (yyval.decl).type = NewStringEmpty();
9650 }
9651 #line 9652 "y.tab.c" /* yacc.c:1646 */
9652 break;
9653
9654 case 314:
9655 #line 5424 "parser.y" /* yacc.c:1646 */
9656 {
9657 (yyval.decl) = (yyvsp[0].decl);
9658 (yyval.decl).type = NewStringEmpty();
9659 SwigType_add_reference((yyval.decl).type);
9660 if ((yyvsp[0].decl).type) {
9661 SwigType_push((yyval.decl).type,(yyvsp[0].decl).type);
9662 Delete((yyvsp[0].decl).type);
9663 }
9664 }
9665 #line 9666 "y.tab.c" /* yacc.c:1646 */
9666 break;
9667
9668 case 315:
9669 #line 5433 "parser.y" /* yacc.c:1646 */
9670 {
9671 /* Introduced in C++11, move operator && */
9672 /* Adds one S/R conflict */
9673 (yyval.decl) = (yyvsp[0].decl);
9674 (yyval.decl).type = NewStringEmpty();
9675 SwigType_add_rvalue_reference((yyval.decl).type);
9676 if ((yyvsp[0].decl).type) {
9677 SwigType_push((yyval.decl).type,(yyvsp[0].decl).type);
9678 Delete((yyvsp[0].decl).type);
9679 }
9680 }
9681 #line 9682 "y.tab.c" /* yacc.c:1646 */
9682 break;
9683
9684 case 316:
9685 #line 5444 "parser.y" /* yacc.c:1646 */
9686 {
9687 SwigType *t = NewStringEmpty();
9688
9689 (yyval.decl) = (yyvsp[0].decl);
9690 SwigType_add_memberpointer(t,(yyvsp[-2].str));
9691 if ((yyval.decl).type) {
9692 SwigType_push(t,(yyval.decl).type);
9693 Delete((yyval.decl).type);
9694 }
9695 (yyval.decl).type = t;
9696 }
9697 #line 9698 "y.tab.c" /* yacc.c:1646 */
9698 break;
9699
9700 case 317:
9701 #line 5455 "parser.y" /* yacc.c:1646 */
9702 {
9703 SwigType *t = NewStringEmpty();
9704 (yyval.decl) = (yyvsp[0].decl);
9705 SwigType_add_memberpointer(t,(yyvsp[-2].str));
9706 SwigType_push((yyvsp[-3].type),t);
9707 if ((yyval.decl).type) {
9708 SwigType_push((yyvsp[-3].type),(yyval.decl).type);
9709 Delete((yyval.decl).type);
9710 }
9711 (yyval.decl).type = (yyvsp[-3].type);
9712 Delete(t);
9713 }
9714 #line 9715 "y.tab.c" /* yacc.c:1646 */
9715 break;
9716
9717 case 318:
9718 #line 5467 "parser.y" /* yacc.c:1646 */
9719 {
9720 (yyval.decl) = (yyvsp[0].decl);
9721 SwigType_add_memberpointer((yyvsp[-4].type),(yyvsp[-3].str));
9722 SwigType_add_reference((yyvsp[-4].type));
9723 if ((yyval.decl).type) {
9724 SwigType_push((yyvsp[-4].type),(yyval.decl).type);
9725 Delete((yyval.decl).type);
9726 }
9727 (yyval.decl).type = (yyvsp[-4].type);
9728 }
9729 #line 9730 "y.tab.c" /* yacc.c:1646 */
9730 break;
9731
9732 case 319:
9733 #line 5477 "parser.y" /* yacc.c:1646 */
9734 {
9735 SwigType *t = NewStringEmpty();
9736 (yyval.decl) = (yyvsp[0].decl);
9737 SwigType_add_memberpointer(t,(yyvsp[-3].str));
9738 SwigType_add_reference(t);
9739 if ((yyval.decl).type) {
9740 SwigType_push(t,(yyval.decl).type);
9741 Delete((yyval.decl).type);
9742 }
9743 (yyval.decl).type = t;
9744 }
9745 #line 9746 "y.tab.c" /* yacc.c:1646 */
9746 break;
9747
9748 case 320:
9749 #line 5491 "parser.y" /* yacc.c:1646 */
9750 {
9751 (yyval.decl) = (yyvsp[0].decl);
9752 if ((yyval.decl).type) {
9753 SwigType_push((yyvsp[-4].type),(yyval.decl).type);
9754 Delete((yyval.decl).type);
9755 }
9756 (yyval.decl).type = (yyvsp[-4].type);
9757 }
9758 #line 9759 "y.tab.c" /* yacc.c:1646 */
9759 break;
9760
9761 case 321:
9762 #line 5499 "parser.y" /* yacc.c:1646 */
9763 {
9764 (yyval.decl) = (yyvsp[0].decl);
9765 SwigType_add_reference((yyvsp[-5].type));
9766 if ((yyval.decl).type) {
9767 SwigType_push((yyvsp[-5].type),(yyval.decl).type);
9768 Delete((yyval.decl).type);
9769 }
9770 (yyval.decl).type = (yyvsp[-5].type);
9771 }
9772 #line 9773 "y.tab.c" /* yacc.c:1646 */
9773 break;
9774
9775 case 322:
9776 #line 5508 "parser.y" /* yacc.c:1646 */
9777 {
9778 (yyval.decl) = (yyvsp[0].decl);
9779 SwigType_add_rvalue_reference((yyvsp[-5].type));
9780 if ((yyval.decl).type) {
9781 SwigType_push((yyvsp[-5].type),(yyval.decl).type);
9782 Delete((yyval.decl).type);
9783 }
9784 (yyval.decl).type = (yyvsp[-5].type);
9785 }
9786 #line 9787 "y.tab.c" /* yacc.c:1646 */
9787 break;
9788
9789 case 323:
9790 #line 5517 "parser.y" /* yacc.c:1646 */
9791 {
9792 (yyval.decl) = (yyvsp[0].decl);
9793 if (!(yyval.decl).type) (yyval.decl).type = NewStringEmpty();
9794 }
9795 #line 9796 "y.tab.c" /* yacc.c:1646 */
9796 break;
9797
9798 case 324:
9799 #line 5521 "parser.y" /* yacc.c:1646 */
9800 {
9801 (yyval.decl) = (yyvsp[0].decl);
9802 (yyval.decl).type = NewStringEmpty();
9803 SwigType_add_reference((yyval.decl).type);
9804 if ((yyvsp[0].decl).type) {
9805 SwigType_push((yyval.decl).type,(yyvsp[0].decl).type);
9806 Delete((yyvsp[0].decl).type);
9807 }
9808 }
9809 #line 9810 "y.tab.c" /* yacc.c:1646 */
9810 break;
9811
9812 case 325:
9813 #line 5530 "parser.y" /* yacc.c:1646 */
9814 {
9815 /* Introduced in C++11, move operator && */
9816 /* Adds one S/R conflict */
9817 (yyval.decl) = (yyvsp[0].decl);
9818 (yyval.decl).type = NewStringEmpty();
9819 SwigType_add_rvalue_reference((yyval.decl).type);
9820 if ((yyvsp[0].decl).type) {
9821 SwigType_push((yyval.decl).type,(yyvsp[0].decl).type);
9822 Delete((yyvsp[0].decl).type);
9823 }
9824 }
9825 #line 9826 "y.tab.c" /* yacc.c:1646 */
9826 break;
9827
9828 case 326:
9829 #line 5541 "parser.y" /* yacc.c:1646 */
9830 {
9831 SwigType *t = NewStringEmpty();
9832
9833 (yyval.decl) = (yyvsp[0].decl);
9834 SwigType_add_memberpointer(t,(yyvsp[-5].str));
9835 if ((yyval.decl).type) {
9836 SwigType_push(t,(yyval.decl).type);
9837 Delete((yyval.decl).type);
9838 }
9839 (yyval.decl).type = t;
9840 }
9841 #line 9842 "y.tab.c" /* yacc.c:1646 */
9842 break;
9843
9844 case 327:
9845 #line 5552 "parser.y" /* yacc.c:1646 */
9846 {
9847 SwigType *t = NewStringEmpty();
9848 (yyval.decl) = (yyvsp[0].decl);
9849 SwigType_add_memberpointer(t,(yyvsp[-5].str));
9850 SwigType_push((yyvsp[-6].type),t);
9851 if ((yyval.decl).type) {
9852 SwigType_push((yyvsp[-6].type),(yyval.decl).type);
9853 Delete((yyval.decl).type);
9854 }
9855 (yyval.decl).type = (yyvsp[-6].type);
9856 Delete(t);
9857 }
9858 #line 9859 "y.tab.c" /* yacc.c:1646 */
9859 break;
9860
9861 case 328:
9862 #line 5564 "parser.y" /* yacc.c:1646 */
9863 {
9864 (yyval.decl) = (yyvsp[0].decl);
9865 SwigType_add_memberpointer((yyvsp[-7].type),(yyvsp[-6].str));
9866 SwigType_add_reference((yyvsp[-7].type));
9867 if ((yyval.decl).type) {
9868 SwigType_push((yyvsp[-7].type),(yyval.decl).type);
9869 Delete((yyval.decl).type);
9870 }
9871 (yyval.decl).type = (yyvsp[-7].type);
9872 }
9873 #line 9874 "y.tab.c" /* yacc.c:1646 */
9874 break;
9875
9876 case 329:
9877 #line 5574 "parser.y" /* yacc.c:1646 */
9878 {
9879 (yyval.decl) = (yyvsp[0].decl);
9880 SwigType_add_memberpointer((yyvsp[-7].type),(yyvsp[-6].str));
9881 SwigType_add_rvalue_reference((yyvsp[-7].type));
9882 if ((yyval.decl).type) {
9883 SwigType_push((yyvsp[-7].type),(yyval.decl).type);
9884 Delete((yyval.decl).type);
9885 }
9886 (yyval.decl).type = (yyvsp[-7].type);
9887 }
9888 #line 9889 "y.tab.c" /* yacc.c:1646 */
9889 break;
9890
9891 case 330:
9892 #line 5584 "parser.y" /* yacc.c:1646 */
9893 {
9894 SwigType *t = NewStringEmpty();
9895 (yyval.decl) = (yyvsp[0].decl);
9896 SwigType_add_memberpointer(t,(yyvsp[-6].str));
9897 SwigType_add_reference(t);
9898 if ((yyval.decl).type) {
9899 SwigType_push(t,(yyval.decl).type);
9900 Delete((yyval.decl).type);
9901 }
9902 (yyval.decl).type = t;
9903 }
9904 #line 9905 "y.tab.c" /* yacc.c:1646 */
9905 break;
9906
9907 case 331:
9908 #line 5595 "parser.y" /* yacc.c:1646 */
9909 {
9910 SwigType *t = NewStringEmpty();
9911 (yyval.decl) = (yyvsp[0].decl);
9912 SwigType_add_memberpointer(t,(yyvsp[-6].str));
9913 SwigType_add_rvalue_reference(t);
9914 if ((yyval.decl).type) {
9915 SwigType_push(t,(yyval.decl).type);
9916 Delete((yyval.decl).type);
9917 }
9918 (yyval.decl).type = t;
9919 }
9920 #line 9921 "y.tab.c" /* yacc.c:1646 */
9921 break;
9922
9923 case 332:
9924 #line 5608 "parser.y" /* yacc.c:1646 */
9925 {
9926 /* Note: This is non-standard C. Template declarator is allowed to follow an identifier */
9927 (yyval.decl).id = Char((yyvsp[0].str));
9928 (yyval.decl).type = 0;
9929 (yyval.decl).parms = 0;
9930 (yyval.decl).have_parms = 0;
9931 }
9932 #line 9933 "y.tab.c" /* yacc.c:1646 */
9933 break;
9934
9935 case 333:
9936 #line 5615 "parser.y" /* yacc.c:1646 */
9937 {
9938 (yyval.decl).id = Char(NewStringf("~%s",(yyvsp[0].str)));
9939 (yyval.decl).type = 0;
9940 (yyval.decl).parms = 0;
9941 (yyval.decl).have_parms = 0;
9942 }
9943 #line 9944 "y.tab.c" /* yacc.c:1646 */
9944 break;
9945
9946 case 334:
9947 #line 5623 "parser.y" /* yacc.c:1646 */
9948 {
9949 (yyval.decl).id = Char((yyvsp[-1].str));
9950 (yyval.decl).type = 0;
9951 (yyval.decl).parms = 0;
9952 (yyval.decl).have_parms = 0;
9953 }
9954 #line 9955 "y.tab.c" /* yacc.c:1646 */
9955 break;
9956
9957 case 335:
9958 #line 5639 "parser.y" /* yacc.c:1646 */
9959 {
9960 (yyval.decl) = (yyvsp[-1].decl);
9961 if ((yyval.decl).type) {
9962 SwigType_push((yyvsp[-2].type),(yyval.decl).type);
9963 Delete((yyval.decl).type);
9964 }
9965 (yyval.decl).type = (yyvsp[-2].type);
9966 }
9967 #line 9968 "y.tab.c" /* yacc.c:1646 */
9968 break;
9969
9970 case 336:
9971 #line 5647 "parser.y" /* yacc.c:1646 */
9972 {
9973 SwigType *t;
9974 (yyval.decl) = (yyvsp[-1].decl);
9975 t = NewStringEmpty();
9976 SwigType_add_memberpointer(t,(yyvsp[-3].str));
9977 if ((yyval.decl).type) {
9978 SwigType_push(t,(yyval.decl).type);
9979 Delete((yyval.decl).type);
9980 }
9981 (yyval.decl).type = t;
9982 }
9983 #line 9984 "y.tab.c" /* yacc.c:1646 */
9984 break;
9985
9986 case 337:
9987 #line 5658 "parser.y" /* yacc.c:1646 */
9988 {
9989 SwigType *t;
9990 (yyval.decl) = (yyvsp[-2].decl);
9991 t = NewStringEmpty();
9992 SwigType_add_array(t,"");
9993 if ((yyval.decl).type) {
9994 SwigType_push(t,(yyval.decl).type);
9995 Delete((yyval.decl).type);
9996 }
9997 (yyval.decl).type = t;
9998 }
9999 #line 10000 "y.tab.c" /* yacc.c:1646 */
10000 break;
10001
10002 case 338:
10003 #line 5669 "parser.y" /* yacc.c:1646 */
10004 {
10005 SwigType *t;
10006 (yyval.decl) = (yyvsp[-3].decl);
10007 t = NewStringEmpty();
10008 SwigType_add_array(t,(yyvsp[-1].dtype).val);
10009 if ((yyval.decl).type) {
10010 SwigType_push(t,(yyval.decl).type);
10011 Delete((yyval.decl).type);
10012 }
10013 (yyval.decl).type = t;
10014 }
10015 #line 10016 "y.tab.c" /* yacc.c:1646 */
10016 break;
10017
10018 case 339:
10019 #line 5680 "parser.y" /* yacc.c:1646 */
10020 {
10021 SwigType *t;
10022 (yyval.decl) = (yyvsp[-3].decl);
10023 t = NewStringEmpty();
10024 SwigType_add_function(t,(yyvsp[-1].pl));
10025 if (!(yyval.decl).have_parms) {
10026 (yyval.decl).parms = (yyvsp[-1].pl);
10027 (yyval.decl).have_parms = 1;
10028 }
10029 if (!(yyval.decl).type) {
10030 (yyval.decl).type = t;
10031 } else {
10032 SwigType_push(t, (yyval.decl).type);
10033 Delete((yyval.decl).type);
10034 (yyval.decl).type = t;
10035 }
10036 }
10037 #line 10038 "y.tab.c" /* yacc.c:1646 */
10038 break;
10039
10040 case 340:
10041 #line 5699 "parser.y" /* yacc.c:1646 */
10042 {
10043 /* Note: This is non-standard C. Template declarator is allowed to follow an identifier */
10044 (yyval.decl).id = Char((yyvsp[0].str));
10045 (yyval.decl).type = 0;
10046 (yyval.decl).parms = 0;
10047 (yyval.decl).have_parms = 0;
10048 }
10049 #line 10050 "y.tab.c" /* yacc.c:1646 */
10050 break;
10051
10052 case 341:
10053 #line 5707 "parser.y" /* yacc.c:1646 */
10054 {
10055 (yyval.decl).id = Char(NewStringf("~%s",(yyvsp[0].str)));
10056 (yyval.decl).type = 0;
10057 (yyval.decl).parms = 0;
10058 (yyval.decl).have_parms = 0;
10059 }
10060 #line 10061 "y.tab.c" /* yacc.c:1646 */
10061 break;
10062
10063 case 342:
10064 #line 5724 "parser.y" /* yacc.c:1646 */
10065 {
10066 (yyval.decl) = (yyvsp[-1].decl);
10067 if ((yyval.decl).type) {
10068 SwigType_push((yyvsp[-2].type),(yyval.decl).type);
10069 Delete((yyval.decl).type);
10070 }
10071 (yyval.decl).type = (yyvsp[-2].type);
10072 }
10073 #line 10074 "y.tab.c" /* yacc.c:1646 */
10074 break;
10075
10076 case 343:
10077 #line 5732 "parser.y" /* yacc.c:1646 */
10078 {
10079 (yyval.decl) = (yyvsp[-1].decl);
10080 if (!(yyval.decl).type) {
10081 (yyval.decl).type = NewStringEmpty();
10082 }
10083 SwigType_add_reference((yyval.decl).type);
10084 }
10085 #line 10086 "y.tab.c" /* yacc.c:1646 */
10086 break;
10087
10088 case 344:
10089 #line 5739 "parser.y" /* yacc.c:1646 */
10090 {
10091 (yyval.decl) = (yyvsp[-1].decl);
10092 if (!(yyval.decl).type) {
10093 (yyval.decl).type = NewStringEmpty();
10094 }
10095 SwigType_add_rvalue_reference((yyval.decl).type);
10096 }
10097 #line 10098 "y.tab.c" /* yacc.c:1646 */
10098 break;
10099
10100 case 345:
10101 #line 5746 "parser.y" /* yacc.c:1646 */
10102 {
10103 SwigType *t;
10104 (yyval.decl) = (yyvsp[-1].decl);
10105 t = NewStringEmpty();
10106 SwigType_add_memberpointer(t,(yyvsp[-3].str));
10107 if ((yyval.decl).type) {
10108 SwigType_push(t,(yyval.decl).type);
10109 Delete((yyval.decl).type);
10110 }
10111 (yyval.decl).type = t;
10112 }
10113 #line 10114 "y.tab.c" /* yacc.c:1646 */
10114 break;
10115
10116 case 346:
10117 #line 5757 "parser.y" /* yacc.c:1646 */
10118 {
10119 SwigType *t;
10120 (yyval.decl) = (yyvsp[-1].decl);
10121 t = NewStringEmpty();
10122 SwigType_add_memberpointer(t, (yyvsp[-4].str));
10123 SwigType_push(t, (yyvsp[-2].str));
10124 if ((yyval.decl).type) {
10125 SwigType_push(t, (yyval.decl).type);
10126 Delete((yyval.decl).type);
10127 }
10128 (yyval.decl).type = t;
10129 }
10130 #line 10131 "y.tab.c" /* yacc.c:1646 */
10131 break;
10132
10133 case 347:
10134 #line 5769 "parser.y" /* yacc.c:1646 */
10135 {
10136 SwigType *t;
10137 (yyval.decl) = (yyvsp[-1].decl);
10138 t = NewStringEmpty();
10139 SwigType_add_memberpointer(t, (yyvsp[-3].str));
10140 if ((yyval.decl).type) {
10141 SwigType_push(t, (yyval.decl).type);
10142 Delete((yyval.decl).type);
10143 }
10144 (yyval.decl).type = t;
10145 }
10146 #line 10147 "y.tab.c" /* yacc.c:1646 */
10147 break;
10148
10149 case 348:
10150 #line 5780 "parser.y" /* yacc.c:1646 */
10151 {
10152 SwigType *t;
10153 (yyval.decl) = (yyvsp[-1].decl);
10154 t = NewStringEmpty();
10155 SwigType_add_memberpointer(t, (yyvsp[-4].str));
10156 SwigType_push(t, (yyvsp[-2].str));
10157 if ((yyval.decl).type) {
10158 SwigType_push(t, (yyval.decl).type);
10159 Delete((yyval.decl).type);
10160 }
10161 (yyval.decl).type = t;
10162 }
10163 #line 10164 "y.tab.c" /* yacc.c:1646 */
10164 break;
10165
10166 case 349:
10167 #line 5792 "parser.y" /* yacc.c:1646 */
10168 {
10169 SwigType *t;
10170 (yyval.decl) = (yyvsp[-2].decl);
10171 t = NewStringEmpty();
10172 SwigType_add_array(t,"");
10173 if ((yyval.decl).type) {
10174 SwigType_push(t,(yyval.decl).type);
10175 Delete((yyval.decl).type);
10176 }
10177 (yyval.decl).type = t;
10178 }
10179 #line 10180 "y.tab.c" /* yacc.c:1646 */
10180 break;
10181
10182 case 350:
10183 #line 5803 "parser.y" /* yacc.c:1646 */
10184 {
10185 SwigType *t;
10186 (yyval.decl) = (yyvsp[-3].decl);
10187 t = NewStringEmpty();
10188 SwigType_add_array(t,(yyvsp[-1].dtype).val);
10189 if ((yyval.decl).type) {
10190 SwigType_push(t,(yyval.decl).type);
10191 Delete((yyval.decl).type);
10192 }
10193 (yyval.decl).type = t;
10194 }
10195 #line 10196 "y.tab.c" /* yacc.c:1646 */
10196 break;
10197
10198 case 351:
10199 #line 5814 "parser.y" /* yacc.c:1646 */
10200 {
10201 SwigType *t;
10202 (yyval.decl) = (yyvsp[-3].decl);
10203 t = NewStringEmpty();
10204 SwigType_add_function(t,(yyvsp[-1].pl));
10205 if (!(yyval.decl).have_parms) {
10206 (yyval.decl).parms = (yyvsp[-1].pl);
10207 (yyval.decl).have_parms = 1;
10208 }
10209 if (!(yyval.decl).type) {
10210 (yyval.decl).type = t;
10211 } else {
10212 SwigType_push(t, (yyval.decl).type);
10213 Delete((yyval.decl).type);
10214 (yyval.decl).type = t;
10215 }
10216 }
10217 #line 10218 "y.tab.c" /* yacc.c:1646 */
10218 break;
10219
10220 case 352:
10221 #line 5834 "parser.y" /* yacc.c:1646 */
10222 {
10223 SwigType *t;
10224 Append((yyvsp[-4].str), " "); /* intervening space is mandatory */
10225 Append((yyvsp[-4].str), Char((yyvsp[-3].id)));
10226 (yyval.decl).id = Char((yyvsp[-4].str));
10227 t = NewStringEmpty();
10228 SwigType_add_function(t,(yyvsp[-1].pl));
10229 if (!(yyval.decl).have_parms) {
10230 (yyval.decl).parms = (yyvsp[-1].pl);
10231 (yyval.decl).have_parms = 1;
10232 }
10233 if (!(yyval.decl).type) {
10234 (yyval.decl).type = t;
10235 } else {
10236 SwigType_push(t, (yyval.decl).type);
10237 Delete((yyval.decl).type);
10238 (yyval.decl).type = t;
10239 }
10240 }
10241 #line 10242 "y.tab.c" /* yacc.c:1646 */
10242 break;
10243
10244 case 353:
10245 #line 5855 "parser.y" /* yacc.c:1646 */
10246 {
10247 (yyval.decl).type = (yyvsp[0].type);
10248 (yyval.decl).id = 0;
10249 (yyval.decl).parms = 0;
10250 (yyval.decl).have_parms = 0;
10251 }
10252 #line 10253 "y.tab.c" /* yacc.c:1646 */
10253 break;
10254
10255 case 354:
10256 #line 5861 "parser.y" /* yacc.c:1646 */
10257 {
10258 (yyval.decl) = (yyvsp[0].decl);
10259 SwigType_push((yyvsp[-1].type),(yyvsp[0].decl).type);
10260 (yyval.decl).type = (yyvsp[-1].type);
10261 Delete((yyvsp[0].decl).type);
10262 }
10263 #line 10264 "y.tab.c" /* yacc.c:1646 */
10264 break;
10265
10266 case 355:
10267 #line 5867 "parser.y" /* yacc.c:1646 */
10268 {
10269 (yyval.decl).type = (yyvsp[-1].type);
10270 SwigType_add_reference((yyval.decl).type);
10271 (yyval.decl).id = 0;
10272 (yyval.decl).parms = 0;
10273 (yyval.decl).have_parms = 0;
10274 }
10275 #line 10276 "y.tab.c" /* yacc.c:1646 */
10276 break;
10277
10278 case 356:
10279 #line 5874 "parser.y" /* yacc.c:1646 */
10280 {
10281 (yyval.decl).type = (yyvsp[-1].type);
10282 SwigType_add_rvalue_reference((yyval.decl).type);
10283 (yyval.decl).id = 0;
10284 (yyval.decl).parms = 0;
10285 (yyval.decl).have_parms = 0;
10286 }
10287 #line 10288 "y.tab.c" /* yacc.c:1646 */
10288 break;
10289
10290 case 357:
10291 #line 5881 "parser.y" /* yacc.c:1646 */
10292 {
10293 (yyval.decl) = (yyvsp[0].decl);
10294 SwigType_add_reference((yyvsp[-2].type));
10295 if ((yyval.decl).type) {
10296 SwigType_push((yyvsp[-2].type),(yyval.decl).type);
10297 Delete((yyval.decl).type);
10298 }
10299 (yyval.decl).type = (yyvsp[-2].type);
10300 }
10301 #line 10302 "y.tab.c" /* yacc.c:1646 */
10302 break;
10303
10304 case 358:
10305 #line 5890 "parser.y" /* yacc.c:1646 */
10306 {
10307 (yyval.decl) = (yyvsp[0].decl);
10308 SwigType_add_rvalue_reference((yyvsp[-2].type));
10309 if ((yyval.decl).type) {
10310 SwigType_push((yyvsp[-2].type),(yyval.decl).type);
10311 Delete((yyval.decl).type);
10312 }
10313 (yyval.decl).type = (yyvsp[-2].type);
10314 }
10315 #line 10316 "y.tab.c" /* yacc.c:1646 */
10316 break;
10317
10318 case 359:
10319 #line 5899 "parser.y" /* yacc.c:1646 */
10320 {
10321 (yyval.decl) = (yyvsp[0].decl);
10322 }
10323 #line 10324 "y.tab.c" /* yacc.c:1646 */
10324 break;
10325
10326 case 360:
10327 #line 5902 "parser.y" /* yacc.c:1646 */
10328 {
10329 (yyval.decl) = (yyvsp[0].decl);
10330 (yyval.decl).type = NewStringEmpty();
10331 SwigType_add_reference((yyval.decl).type);
10332 if ((yyvsp[0].decl).type) {
10333 SwigType_push((yyval.decl).type,(yyvsp[0].decl).type);
10334 Delete((yyvsp[0].decl).type);
10335 }
10336 }
10337 #line 10338 "y.tab.c" /* yacc.c:1646 */
10338 break;
10339
10340 case 361:
10341 #line 5911 "parser.y" /* yacc.c:1646 */
10342 {
10343 (yyval.decl) = (yyvsp[0].decl);
10344 (yyval.decl).type = NewStringEmpty();
10345 SwigType_add_rvalue_reference((yyval.decl).type);
10346 if ((yyvsp[0].decl).type) {
10347 SwigType_push((yyval.decl).type,(yyvsp[0].decl).type);
10348 Delete((yyvsp[0].decl).type);
10349 }
10350 }
10351 #line 10352 "y.tab.c" /* yacc.c:1646 */
10352 break;
10353
10354 case 362:
10355 #line 5920 "parser.y" /* yacc.c:1646 */
10356 {
10357 (yyval.decl).id = 0;
10358 (yyval.decl).parms = 0;
10359 (yyval.decl).have_parms = 0;
10360 (yyval.decl).type = NewStringEmpty();
10361 SwigType_add_reference((yyval.decl).type);
10362 }
10363 #line 10364 "y.tab.c" /* yacc.c:1646 */
10364 break;
10365
10366 case 363:
10367 #line 5927 "parser.y" /* yacc.c:1646 */
10368 {
10369 (yyval.decl).id = 0;
10370 (yyval.decl).parms = 0;
10371 (yyval.decl).have_parms = 0;
10372 (yyval.decl).type = NewStringEmpty();
10373 SwigType_add_rvalue_reference((yyval.decl).type);
10374 }
10375 #line 10376 "y.tab.c" /* yacc.c:1646 */
10376 break;
10377
10378 case 364:
10379 #line 5934 "parser.y" /* yacc.c:1646 */
10380 {
10381 (yyval.decl).type = NewStringEmpty();
10382 SwigType_add_memberpointer((yyval.decl).type,(yyvsp[-1].str));
10383 (yyval.decl).id = 0;
10384 (yyval.decl).parms = 0;
10385 (yyval.decl).have_parms = 0;
10386 }
10387 #line 10388 "y.tab.c" /* yacc.c:1646 */
10388 break;
10389
10390 case 365:
10391 #line 5941 "parser.y" /* yacc.c:1646 */
10392 {
10393 (yyval.decl).type = NewStringEmpty();
10394 SwigType_add_memberpointer((yyval.decl).type, (yyvsp[-2].str));
10395 SwigType_push((yyval.decl).type, (yyvsp[0].str));
10396 (yyval.decl).id = 0;
10397 (yyval.decl).parms = 0;
10398 (yyval.decl).have_parms = 0;
10399 }
10400 #line 10401 "y.tab.c" /* yacc.c:1646 */
10401 break;
10402
10403 case 366:
10404 #line 5949 "parser.y" /* yacc.c:1646 */
10405 {
10406 SwigType *t = NewStringEmpty();
10407 (yyval.decl).type = (yyvsp[-2].type);
10408 (yyval.decl).id = 0;
10409 (yyval.decl).parms = 0;
10410 (yyval.decl).have_parms = 0;
10411 SwigType_add_memberpointer(t,(yyvsp[-1].str));
10412 SwigType_push((yyval.decl).type,t);
10413 Delete(t);
10414 }
10415 #line 10416 "y.tab.c" /* yacc.c:1646 */
10416 break;
10417
10418 case 367:
10419 #line 5959 "parser.y" /* yacc.c:1646 */
10420 {
10421 (yyval.decl) = (yyvsp[0].decl);
10422 SwigType_add_memberpointer((yyvsp[-3].type),(yyvsp[-2].str));
10423 if ((yyval.decl).type) {
10424 SwigType_push((yyvsp[-3].type),(yyval.decl).type);
10425 Delete((yyval.decl).type);
10426 }
10427 (yyval.decl).type = (yyvsp[-3].type);
10428 }
10429 #line 10430 "y.tab.c" /* yacc.c:1646 */
10430 break;
10431
10432 case 368:
10433 #line 5970 "parser.y" /* yacc.c:1646 */
10434 {
10435 SwigType *t;
10436 (yyval.decl) = (yyvsp[-2].decl);
10437 t = NewStringEmpty();
10438 SwigType_add_array(t,"");
10439 if ((yyval.decl).type) {
10440 SwigType_push(t,(yyval.decl).type);
10441 Delete((yyval.decl).type);
10442 }
10443 (yyval.decl).type = t;
10444 }
10445 #line 10446 "y.tab.c" /* yacc.c:1646 */
10446 break;
10447
10448 case 369:
10449 #line 5981 "parser.y" /* yacc.c:1646 */
10450 {
10451 SwigType *t;
10452 (yyval.decl) = (yyvsp[-3].decl);
10453 t = NewStringEmpty();
10454 SwigType_add_array(t,(yyvsp[-1].dtype).val);
10455 if ((yyval.decl).type) {
10456 SwigType_push(t,(yyval.decl).type);
10457 Delete((yyval.decl).type);
10458 }
10459 (yyval.decl).type = t;
10460 }
10461 #line 10462 "y.tab.c" /* yacc.c:1646 */
10462 break;
10463
10464 case 370:
10465 #line 5992 "parser.y" /* yacc.c:1646 */
10466 {
10467 (yyval.decl).type = NewStringEmpty();
10468 (yyval.decl).id = 0;
10469 (yyval.decl).parms = 0;
10470 (yyval.decl).have_parms = 0;
10471 SwigType_add_array((yyval.decl).type,"");
10472 }
10473 #line 10474 "y.tab.c" /* yacc.c:1646 */
10474 break;
10475
10476 case 371:
10477 #line 5999 "parser.y" /* yacc.c:1646 */
10478 {
10479 (yyval.decl).type = NewStringEmpty();
10480 (yyval.decl).id = 0;
10481 (yyval.decl).parms = 0;
10482 (yyval.decl).have_parms = 0;
10483 SwigType_add_array((yyval.decl).type,(yyvsp[-1].dtype).val);
10484 }
10485 #line 10486 "y.tab.c" /* yacc.c:1646 */
10486 break;
10487
10488 case 372:
10489 #line 6006 "parser.y" /* yacc.c:1646 */
10490 {
10491 (yyval.decl) = (yyvsp[-1].decl);
10492 }
10493 #line 10494 "y.tab.c" /* yacc.c:1646 */
10494 break;
10495
10496 case 373:
10497 #line 6009 "parser.y" /* yacc.c:1646 */
10498 {
10499 SwigType *t;
10500 (yyval.decl) = (yyvsp[-3].decl);
10501 t = NewStringEmpty();
10502 SwigType_add_function(t,(yyvsp[-1].pl));
10503 if (!(yyval.decl).type) {
10504 (yyval.decl).type = t;
10505 } else {
10506 SwigType_push(t,(yyval.decl).type);
10507 Delete((yyval.decl).type);
10508 (yyval.decl).type = t;
10509 }
10510 if (!(yyval.decl).have_parms) {
10511 (yyval.decl).parms = (yyvsp[-1].pl);
10512 (yyval.decl).have_parms = 1;
10513 }
10514 }
10515 #line 10516 "y.tab.c" /* yacc.c:1646 */
10516 break;
10517
10518 case 374:
10519 #line 6026 "parser.y" /* yacc.c:1646 */
10520 {
10521 SwigType *t;
10522 (yyval.decl) = (yyvsp[-4].decl);
10523 t = NewStringEmpty();
10524 SwigType_add_function(t,(yyvsp[-2].pl));
10525 SwigType_push(t, (yyvsp[0].dtype).qualifier);
10526 if (!(yyval.decl).type) {
10527 (yyval.decl).type = t;
10528 } else {
10529 SwigType_push(t,(yyval.decl).type);
10530 Delete((yyval.decl).type);
10531 (yyval.decl).type = t;
10532 }
10533 if (!(yyval.decl).have_parms) {
10534 (yyval.decl).parms = (yyvsp[-2].pl);
10535 (yyval.decl).have_parms = 1;
10536 }
10537 }
10538 #line 10539 "y.tab.c" /* yacc.c:1646 */
10539 break;
10540
10541 case 375:
10542 #line 6044 "parser.y" /* yacc.c:1646 */
10543 {
10544 (yyval.decl).type = NewStringEmpty();
10545 SwigType_add_function((yyval.decl).type,(yyvsp[-1].pl));
10546 (yyval.decl).parms = (yyvsp[-1].pl);
10547 (yyval.decl).have_parms = 1;
10548 (yyval.decl).id = 0;
10549 }
10550 #line 10551 "y.tab.c" /* yacc.c:1646 */
10551 break;
10552
10553 case 376:
10554 #line 6054 "parser.y" /* yacc.c:1646 */
10555 {
10556 (yyval.type) = NewStringEmpty();
10557 SwigType_add_pointer((yyval.type));
10558 SwigType_push((yyval.type),(yyvsp[-1].str));
10559 SwigType_push((yyval.type),(yyvsp[0].type));
10560 Delete((yyvsp[0].type));
10561 }
10562 #line 10563 "y.tab.c" /* yacc.c:1646 */
10563 break;
10564
10565 case 377:
10566 #line 6061 "parser.y" /* yacc.c:1646 */
10567 {
10568 (yyval.type) = NewStringEmpty();
10569 SwigType_add_pointer((yyval.type));
10570 SwigType_push((yyval.type),(yyvsp[0].type));
10571 Delete((yyvsp[0].type));
10572 }
10573 #line 10574 "y.tab.c" /* yacc.c:1646 */
10574 break;
10575
10576 case 378:
10577 #line 6067 "parser.y" /* yacc.c:1646 */
10578 {
10579 (yyval.type) = NewStringEmpty();
10580 SwigType_add_pointer((yyval.type));
10581 SwigType_push((yyval.type),(yyvsp[0].str));
10582 }
10583 #line 10584 "y.tab.c" /* yacc.c:1646 */
10584 break;
10585
10586 case 379:
10587 #line 6072 "parser.y" /* yacc.c:1646 */
10588 {
10589 (yyval.type) = NewStringEmpty();
10590 SwigType_add_pointer((yyval.type));
10591 }
10592 #line 10593 "y.tab.c" /* yacc.c:1646 */
10593 break;
10594
10595 case 380:
10596 #line 6079 "parser.y" /* yacc.c:1646 */
10597 {
10598 (yyval.dtype).qualifier = (yyvsp[0].str);
10599 (yyval.dtype).refqualifier = 0;
10600 }
10601 #line 10602 "y.tab.c" /* yacc.c:1646 */
10602 break;
10603
10604 case 381:
10605 #line 6083 "parser.y" /* yacc.c:1646 */
10606 {
10607 (yyval.dtype).qualifier = (yyvsp[-1].str);
10608 (yyval.dtype).refqualifier = (yyvsp[0].str);
10609 SwigType_push((yyval.dtype).qualifier, (yyvsp[0].str));
10610 }
10611 #line 10612 "y.tab.c" /* yacc.c:1646 */
10612 break;
10613
10614 case 382:
10615 #line 6088 "parser.y" /* yacc.c:1646 */
10616 {
10617 (yyval.dtype).qualifier = NewStringEmpty();
10618 (yyval.dtype).refqualifier = (yyvsp[0].str);
10619 SwigType_push((yyval.dtype).qualifier, (yyvsp[0].str));
10620 }
10621 #line 10622 "y.tab.c" /* yacc.c:1646 */
10622 break;
10623
10624 case 383:
10625 #line 6095 "parser.y" /* yacc.c:1646 */
10626 {
10627 (yyval.str) = NewStringEmpty();
10628 SwigType_add_reference((yyval.str));
10629 }
10630 #line 10631 "y.tab.c" /* yacc.c:1646 */
10631 break;
10632
10633 case 384:
10634 #line 6099 "parser.y" /* yacc.c:1646 */
10635 {
10636 (yyval.str) = NewStringEmpty();
10637 SwigType_add_rvalue_reference((yyval.str));
10638 }
10639 #line 10640 "y.tab.c" /* yacc.c:1646 */
10640 break;
10641
10642 case 385:
10643 #line 6105 "parser.y" /* yacc.c:1646 */
10644 {
10645 (yyval.str) = NewStringEmpty();
10646 if ((yyvsp[0].id)) SwigType_add_qualifier((yyval.str),(yyvsp[0].id));
10647 }
10648 #line 10649 "y.tab.c" /* yacc.c:1646 */
10649 break;
10650
10651 case 386:
10652 #line 6109 "parser.y" /* yacc.c:1646 */
10653 {
10654 (yyval.str) = (yyvsp[0].str);
10655 if ((yyvsp[-1].id)) SwigType_add_qualifier((yyval.str),(yyvsp[-1].id));
10656 }
10657 #line 10658 "y.tab.c" /* yacc.c:1646 */
10658 break;
10659
10660 case 387:
10661 #line 6115 "parser.y" /* yacc.c:1646 */
10662 { (yyval.id) = "const"; }
10663 #line 10664 "y.tab.c" /* yacc.c:1646 */
10664 break;
10665
10666 case 388:
10667 #line 6116 "parser.y" /* yacc.c:1646 */
10668 { (yyval.id) = "volatile"; }
10669 #line 10670 "y.tab.c" /* yacc.c:1646 */
10670 break;
10671
10672 case 389:
10673 #line 6117 "parser.y" /* yacc.c:1646 */
10674 { (yyval.id) = 0; }
10675 #line 10676 "y.tab.c" /* yacc.c:1646 */
10676 break;
10677
10678 case 390:
10679 #line 6123 "parser.y" /* yacc.c:1646 */
10680 {
10681 (yyval.type) = (yyvsp[0].type);
10682 Replace((yyval.type),"typename ","", DOH_REPLACE_ANY);
10683 }
10684 #line 10685 "y.tab.c" /* yacc.c:1646 */
10685 break;
10686
10687 case 391:
10688 #line 6129 "parser.y" /* yacc.c:1646 */
10689 {
10690 (yyval.type) = (yyvsp[0].type);
10691 SwigType_push((yyval.type),(yyvsp[-1].str));
10692 }
10693 #line 10694 "y.tab.c" /* yacc.c:1646 */
10694 break;
10695
10696 case 392:
10697 #line 6133 "parser.y" /* yacc.c:1646 */
10698 { (yyval.type) = (yyvsp[0].type); }
10699 #line 10700 "y.tab.c" /* yacc.c:1646 */
10700 break;
10701
10702 case 393:
10703 #line 6134 "parser.y" /* yacc.c:1646 */
10704 {
10705 (yyval.type) = (yyvsp[-1].type);
10706 SwigType_push((yyval.type),(yyvsp[0].str));
10707 }
10708 #line 10709 "y.tab.c" /* yacc.c:1646 */
10709 break;
10710
10711 case 394:
10712 #line 6138 "parser.y" /* yacc.c:1646 */
10713 {
10714 (yyval.type) = (yyvsp[-1].type);
10715 SwigType_push((yyval.type),(yyvsp[0].str));
10716 SwigType_push((yyval.type),(yyvsp[-2].str));
10717 }
10718 #line 10719 "y.tab.c" /* yacc.c:1646 */
10719 break;
10720
10721 case 395:
10722 #line 6145 "parser.y" /* yacc.c:1646 */
10723 { (yyval.type) = (yyvsp[0].type);
10724 /* Printf(stdout,"primitive = '%s'\n", $$);*/
10725 }
10726 #line 10727 "y.tab.c" /* yacc.c:1646 */
10727 break;
10728
10729 case 396:
10730 #line 6148 "parser.y" /* yacc.c:1646 */
10731 { (yyval.type) = (yyvsp[0].type); }
10732 #line 10733 "y.tab.c" /* yacc.c:1646 */
10733 break;
10734
10735 case 397:
10736 #line 6149 "parser.y" /* yacc.c:1646 */
10737 { (yyval.type) = (yyvsp[0].type); }
10738 #line 10739 "y.tab.c" /* yacc.c:1646 */
10739 break;
10740
10741 case 398:
10742 #line 6153 "parser.y" /* yacc.c:1646 */
10743 { (yyval.type) = NewStringf("enum %s", (yyvsp[0].str)); }
10744 #line 10745 "y.tab.c" /* yacc.c:1646 */
10745 break;
10746
10747 case 399:
10748 #line 6154 "parser.y" /* yacc.c:1646 */
10749 { (yyval.type) = (yyvsp[0].type); }
10750 #line 10751 "y.tab.c" /* yacc.c:1646 */
10751 break;
10752
10753 case 400:
10754 #line 6156 "parser.y" /* yacc.c:1646 */
10755 {
10756 (yyval.type) = (yyvsp[0].str);
10757 }
10758 #line 10759 "y.tab.c" /* yacc.c:1646 */
10759 break;
10760
10761 case 401:
10762 #line 6159 "parser.y" /* yacc.c:1646 */
10763 {
10764 (yyval.type) = NewStringf("%s %s", (yyvsp[-1].id), (yyvsp[0].str));
10765 }
10766 #line 10767 "y.tab.c" /* yacc.c:1646 */
10767 break;
10768
10769 case 402:
10770 #line 6162 "parser.y" /* yacc.c:1646 */
10771 {
10772 (yyval.type) = (yyvsp[0].type);
10773 }
10774 #line 10775 "y.tab.c" /* yacc.c:1646 */
10775 break;
10776
10777 case 403:
10778 #line 6167 "parser.y" /* yacc.c:1646 */
10779 {
10780 Node *n = Swig_symbol_clookup((yyvsp[-1].str),0);
10781 if (!n) {
10782 Swig_error(cparse_file, cparse_line, "Identifier %s not defined.\n", (yyvsp[-1].str));
10783 (yyval.type) = (yyvsp[-1].str);
10784 } else {
10785 (yyval.type) = Getattr(n, "type");
10786 }
10787 }
10788 #line 10789 "y.tab.c" /* yacc.c:1646 */
10789 break;
10790
10791 case 404:
10792 #line 6178 "parser.y" /* yacc.c:1646 */
10793 {
10794 if (!(yyvsp[0].ptype).type) (yyvsp[0].ptype).type = NewString("int");
10795 if ((yyvsp[0].ptype).us) {
10796 (yyval.type) = NewStringf("%s %s", (yyvsp[0].ptype).us, (yyvsp[0].ptype).type);
10797 Delete((yyvsp[0].ptype).us);
10798 Delete((yyvsp[0].ptype).type);
10799 } else {
10800 (yyval.type) = (yyvsp[0].ptype).type;
10801 }
10802 if (Cmp((yyval.type),"signed int") == 0) {
10803 Delete((yyval.type));
10804 (yyval.type) = NewString("int");
10805 } else if (Cmp((yyval.type),"signed long") == 0) {
10806 Delete((yyval.type));
10807 (yyval.type) = NewString("long");
10808 } else if (Cmp((yyval.type),"signed short") == 0) {
10809 Delete((yyval.type));
10810 (yyval.type) = NewString("short");
10811 } else if (Cmp((yyval.type),"signed long long") == 0) {
10812 Delete((yyval.type));
10813 (yyval.type) = NewString("long long");
10814 }
10815 }
10816 #line 10817 "y.tab.c" /* yacc.c:1646 */
10817 break;
10818
10819 case 405:
10820 #line 6203 "parser.y" /* yacc.c:1646 */
10821 {
10822 (yyval.ptype) = (yyvsp[0].ptype);
10823 }
10824 #line 10825 "y.tab.c" /* yacc.c:1646 */
10825 break;
10826
10827 case 406:
10828 #line 6206 "parser.y" /* yacc.c:1646 */
10829 {
10830 if ((yyvsp[-1].ptype).us && (yyvsp[0].ptype).us) {
10831 Swig_error(cparse_file, cparse_line, "Extra %s specifier.\n", (yyvsp[0].ptype).us);
10832 }
10833 (yyval.ptype) = (yyvsp[0].ptype);
10834 if ((yyvsp[-1].ptype).us) (yyval.ptype).us = (yyvsp[-1].ptype).us;
10835 if ((yyvsp[-1].ptype).type) {
10836 if (!(yyvsp[0].ptype).type) (yyval.ptype).type = (yyvsp[-1].ptype).type;
10837 else {
10838 int err = 0;
10839 if ((Cmp((yyvsp[-1].ptype).type,"long") == 0)) {
10840 if ((Cmp((yyvsp[0].ptype).type,"long") == 0) || (Strncmp((yyvsp[0].ptype).type,"double",6) == 0)) {
10841 (yyval.ptype).type = NewStringf("long %s", (yyvsp[0].ptype).type);
10842 } else if (Cmp((yyvsp[0].ptype).type,"int") == 0) {
10843 (yyval.ptype).type = (yyvsp[-1].ptype).type;
10844 } else {
10845 err = 1;
10846 }
10847 } else if ((Cmp((yyvsp[-1].ptype).type,"short")) == 0) {
10848 if (Cmp((yyvsp[0].ptype).type,"int") == 0) {
10849 (yyval.ptype).type = (yyvsp[-1].ptype).type;
10850 } else {
10851 err = 1;
10852 }
10853 } else if (Cmp((yyvsp[-1].ptype).type,"int") == 0) {
10854 (yyval.ptype).type = (yyvsp[0].ptype).type;
10855 } else if (Cmp((yyvsp[-1].ptype).type,"double") == 0) {
10856 if (Cmp((yyvsp[0].ptype).type,"long") == 0) {
10857 (yyval.ptype).type = NewString("long double");
10858 } else if (Cmp((yyvsp[0].ptype).type,"complex") == 0) {
10859 (yyval.ptype).type = NewString("double complex");
10860 } else {
10861 err = 1;
10862 }
10863 } else if (Cmp((yyvsp[-1].ptype).type,"float") == 0) {
10864 if (Cmp((yyvsp[0].ptype).type,"complex") == 0) {
10865 (yyval.ptype).type = NewString("float complex");
10866 } else {
10867 err = 1;
10868 }
10869 } else if (Cmp((yyvsp[-1].ptype).type,"complex") == 0) {
10870 (yyval.ptype).type = NewStringf("%s complex", (yyvsp[0].ptype).type);
10871 } else {
10872 err = 1;
10873 }
10874 if (err) {
10875 Swig_error(cparse_file, cparse_line, "Extra %s specifier.\n", (yyvsp[-1].ptype).type);
10876 }
10877 }
10878 }
10879 }
10880 #line 10881 "y.tab.c" /* yacc.c:1646 */
10881 break;
10882
10883 case 407:
10884 #line 6260 "parser.y" /* yacc.c:1646 */
10885 {
10886 (yyval.ptype).type = NewString("int");
10887 (yyval.ptype).us = 0;
10888 }
10889 #line 10890 "y.tab.c" /* yacc.c:1646 */
10890 break;
10891
10892 case 408:
10893 #line 6264 "parser.y" /* yacc.c:1646 */
10894 {
10895 (yyval.ptype).type = NewString("short");
10896 (yyval.ptype).us = 0;
10897 }
10898 #line 10899 "y.tab.c" /* yacc.c:1646 */
10899 break;
10900
10901 case 409:
10902 #line 6268 "parser.y" /* yacc.c:1646 */
10903 {
10904 (yyval.ptype).type = NewString("long");
10905 (yyval.ptype).us = 0;
10906 }
10907 #line 10908 "y.tab.c" /* yacc.c:1646 */
10908 break;
10909
10910 case 410:
10911 #line 6272 "parser.y" /* yacc.c:1646 */
10912 {
10913 (yyval.ptype).type = NewString("char");
10914 (yyval.ptype).us = 0;
10915 }
10916 #line 10917 "y.tab.c" /* yacc.c:1646 */
10917 break;
10918
10919 case 411:
10920 #line 6276 "parser.y" /* yacc.c:1646 */
10921 {
10922 (yyval.ptype).type = NewString("wchar_t");
10923 (yyval.ptype).us = 0;
10924 }
10925 #line 10926 "y.tab.c" /* yacc.c:1646 */
10926 break;
10927
10928 case 412:
10929 #line 6280 "parser.y" /* yacc.c:1646 */
10930 {
10931 (yyval.ptype).type = NewString("float");
10932 (yyval.ptype).us = 0;
10933 }
10934 #line 10935 "y.tab.c" /* yacc.c:1646 */
10935 break;
10936
10937 case 413:
10938 #line 6284 "parser.y" /* yacc.c:1646 */
10939 {
10940 (yyval.ptype).type = NewString("double");
10941 (yyval.ptype).us = 0;
10942 }
10943 #line 10944 "y.tab.c" /* yacc.c:1646 */
10944 break;
10945
10946 case 414:
10947 #line 6288 "parser.y" /* yacc.c:1646 */
10948 {
10949 (yyval.ptype).us = NewString("signed");
10950 (yyval.ptype).type = 0;
10951 }
10952 #line 10953 "y.tab.c" /* yacc.c:1646 */
10953 break;
10954
10955 case 415:
10956 #line 6292 "parser.y" /* yacc.c:1646 */
10957 {
10958 (yyval.ptype).us = NewString("unsigned");
10959 (yyval.ptype).type = 0;
10960 }
10961 #line 10962 "y.tab.c" /* yacc.c:1646 */
10962 break;
10963
10964 case 416:
10965 #line 6296 "parser.y" /* yacc.c:1646 */
10966 {
10967 (yyval.ptype).type = NewString("complex");
10968 (yyval.ptype).us = 0;
10969 }
10970 #line 10971 "y.tab.c" /* yacc.c:1646 */
10971 break;
10972
10973 case 417:
10974 #line 6300 "parser.y" /* yacc.c:1646 */
10975 {
10976 (yyval.ptype).type = NewString("__int8");
10977 (yyval.ptype).us = 0;
10978 }
10979 #line 10980 "y.tab.c" /* yacc.c:1646 */
10980 break;
10981
10982 case 418:
10983 #line 6304 "parser.y" /* yacc.c:1646 */
10984 {
10985 (yyval.ptype).type = NewString("__int16");
10986 (yyval.ptype).us = 0;
10987 }
10988 #line 10989 "y.tab.c" /* yacc.c:1646 */
10989 break;
10990
10991 case 419:
10992 #line 6308 "parser.y" /* yacc.c:1646 */
10993 {
10994 (yyval.ptype).type = NewString("__int32");
10995 (yyval.ptype).us = 0;
10996 }
10997 #line 10998 "y.tab.c" /* yacc.c:1646 */
10998 break;
10999
11000 case 420:
11001 #line 6312 "parser.y" /* yacc.c:1646 */
11002 {
11003 (yyval.ptype).type = NewString("__int64");
11004 (yyval.ptype).us = 0;
11005 }
11006 #line 11007 "y.tab.c" /* yacc.c:1646 */
11007 break;
11008
11009 case 421:
11010 #line 6318 "parser.y" /* yacc.c:1646 */
11011 { /* scanner_check_typedef(); */ }
11012 #line 11013 "y.tab.c" /* yacc.c:1646 */
11013 break;
11014
11015 case 422:
11016 #line 6318 "parser.y" /* yacc.c:1646 */
11017 {
11018 (yyval.dtype) = (yyvsp[0].dtype);
11019 if ((yyval.dtype).type == T_STRING) {
11020 (yyval.dtype).rawval = NewStringf("\"%(escape)s\"",(yyval.dtype).val);
11021 } else if ((yyval.dtype).type != T_CHAR && (yyval.dtype).type != T_WSTRING && (yyval.dtype).type != T_WCHAR) {
11022 (yyval.dtype).rawval = NewStringf("%s", (yyval.dtype).val);
11023 }
11024 (yyval.dtype).qualifier = 0;
11025 (yyval.dtype).refqualifier = 0;
11026 (yyval.dtype).bitfield = 0;
11027 (yyval.dtype).throws = 0;
11028 (yyval.dtype).throwf = 0;
11029 (yyval.dtype).nexcept = 0;
11030 (yyval.dtype).final = 0;
11031 scanner_ignore_typedef();
11032 }
11033 #line 11034 "y.tab.c" /* yacc.c:1646 */
11034 break;
11035
11036 case 423:
11037 #line 6334 "parser.y" /* yacc.c:1646 */
11038 {
11039 (yyval.dtype) = (yyvsp[0].dtype);
11040 }
11041 #line 11042 "y.tab.c" /* yacc.c:1646 */
11042 break;
11043
11044 case 424:
11045 #line 6339 "parser.y" /* yacc.c:1646 */
11046 {
11047 (yyval.dtype) = (yyvsp[0].dtype);
11048 }
11049 #line 11050 "y.tab.c" /* yacc.c:1646 */
11050 break;
11051
11052 case 425:
11053 #line 6342 "parser.y" /* yacc.c:1646 */
11054 {
11055 (yyval.dtype) = (yyvsp[0].dtype);
11056 }
11057 #line 11058 "y.tab.c" /* yacc.c:1646 */
11058 break;
11059
11060 case 426:
11061 #line 6348 "parser.y" /* yacc.c:1646 */
11062 {
11063 (yyval.dtype).val = NewString("delete");
11064 (yyval.dtype).rawval = 0;
11065 (yyval.dtype).type = T_STRING;
11066 (yyval.dtype).qualifier = 0;
11067 (yyval.dtype).refqualifier = 0;
11068 (yyval.dtype).bitfield = 0;
11069 (yyval.dtype).throws = 0;
11070 (yyval.dtype).throwf = 0;
11071 (yyval.dtype).nexcept = 0;
11072 (yyval.dtype).final = 0;
11073 }
11074 #line 11075 "y.tab.c" /* yacc.c:1646 */
11075 break;
11076
11077 case 427:
11078 #line 6363 "parser.y" /* yacc.c:1646 */
11079 {
11080 (yyval.dtype).val = NewString("default");
11081 (yyval.dtype).rawval = 0;
11082 (yyval.dtype).type = T_STRING;
11083 (yyval.dtype).qualifier = 0;
11084 (yyval.dtype).refqualifier = 0;
11085 (yyval.dtype).bitfield = 0;
11086 (yyval.dtype).throws = 0;
11087 (yyval.dtype).throwf = 0;
11088 (yyval.dtype).nexcept = 0;
11089 (yyval.dtype).final = 0;
11090 }
11091 #line 11092 "y.tab.c" /* yacc.c:1646 */
11092 break;
11093
11094 case 428:
11095 #line 6379 "parser.y" /* yacc.c:1646 */
11096 { (yyval.id) = (yyvsp[0].id); }
11097 #line 11098 "y.tab.c" /* yacc.c:1646 */
11098 break;
11099
11100 case 429:
11101 #line 6380 "parser.y" /* yacc.c:1646 */
11102 { (yyval.id) = (char *) 0;}
11103 #line 11104 "y.tab.c" /* yacc.c:1646 */
11104 break;
11105
11106 case 434:
11107 #line 6399 "parser.y" /* yacc.c:1646 */
11108 {
11109 Setattr((yyvsp[0].node),"_last",(yyvsp[0].node));
11110 (yyval.node) = (yyvsp[0].node);
11111 }
11112 #line 11113 "y.tab.c" /* yacc.c:1646 */
11113 break;
11114
11115 case 435:
11116 #line 6403 "parser.y" /* yacc.c:1646 */
11117 {
11118 Setattr((yyvsp[-1].node),"_last",(yyvsp[-1].node));
11119 set_comment((yyvsp[-1].node), (yyvsp[0].str));
11120 (yyval.node) = (yyvsp[-1].node);
11121 }
11122 #line 11123 "y.tab.c" /* yacc.c:1646 */
11123 break;
11124
11125 case 436:
11126 #line 6408 "parser.y" /* yacc.c:1646 */
11127 {
11128 if ((yyvsp[0].node)) {
11129 set_nextSibling((yyvsp[-2].node), (yyvsp[0].node));
11130 Setattr((yyvsp[-2].node),"_last",Getattr((yyvsp[0].node),"_last"));
11131 Setattr((yyvsp[0].node),"_last",NULL);
11132 } else {
11133 Setattr((yyvsp[-2].node),"_last",(yyvsp[-2].node));
11134 }
11135 (yyval.node) = (yyvsp[-2].node);
11136 }
11137 #line 11138 "y.tab.c" /* yacc.c:1646 */
11138 break;
11139
11140 case 437:
11141 #line 6418 "parser.y" /* yacc.c:1646 */
11142 {
11143 if ((yyvsp[0].node)) {
11144 set_nextSibling((yyvsp[-3].node), (yyvsp[0].node));
11145 Setattr((yyvsp[-3].node),"_last",Getattr((yyvsp[0].node),"_last"));
11146 Setattr((yyvsp[0].node),"_last",NULL);
11147 } else {
11148 Setattr((yyvsp[-3].node),"_last",(yyvsp[-3].node));
11149 }
11150 set_comment((yyvsp[-3].node), (yyvsp[-1].str));
11151 (yyval.node) = (yyvsp[-3].node);
11152 }
11153 #line 11154 "y.tab.c" /* yacc.c:1646 */
11154 break;
11155
11156 case 438:
11157 #line 6429 "parser.y" /* yacc.c:1646 */
11158 {
11159 (yyval.node) = 0;
11160 }
11161 #line 11162 "y.tab.c" /* yacc.c:1646 */
11162 break;
11163
11164 case 439:
11165 #line 6434 "parser.y" /* yacc.c:1646 */
11166 {
11167 (yyval.node) = (yyvsp[-1].node);
11168 }
11169 #line 11170 "y.tab.c" /* yacc.c:1646 */
11170 break;
11171
11172 case 440:
11173 #line 6439 "parser.y" /* yacc.c:1646 */
11174 {
11175 (yyval.node) = (yyvsp[0].node);
11176 }
11177 #line 11178 "y.tab.c" /* yacc.c:1646 */
11178 break;
11179
11180 case 441:
11181 #line 6442 "parser.y" /* yacc.c:1646 */
11182 {
11183 (yyval.node) = (yyvsp[0].node);
11184 set_comment((yyvsp[0].node), (yyvsp[-1].str));
11185 }
11186 #line 11187 "y.tab.c" /* yacc.c:1646 */
11187 break;
11188
11189 case 442:
11190 #line 6448 "parser.y" /* yacc.c:1646 */
11191 {
11192 SwigType *type = NewSwigType(T_INT);
11193 (yyval.node) = new_node("enumitem");
11194 Setattr((yyval.node),"name",(yyvsp[0].id));
11195 Setattr((yyval.node),"type",type);
11196 SetFlag((yyval.node),"feature:immutable");
11197 Delete(type);
11198 }
11199 #line 11200 "y.tab.c" /* yacc.c:1646 */
11200 break;
11201
11202 case 443:
11203 #line 6456 "parser.y" /* yacc.c:1646 */
11204 {
11205 SwigType *type = NewSwigType((yyvsp[0].dtype).type == T_BOOL ? T_BOOL : ((yyvsp[0].dtype).type == T_CHAR ? T_CHAR : T_INT));
11206 (yyval.node) = new_node("enumitem");
11207 Setattr((yyval.node),"name",(yyvsp[-2].id));
11208 Setattr((yyval.node),"type",type);
11209 SetFlag((yyval.node),"feature:immutable");
11210 Setattr((yyval.node),"enumvalue", (yyvsp[0].dtype).val);
11211 Setattr((yyval.node),"value",(yyvsp[-2].id));
11212 Delete(type);
11213 }
11214 #line 11215 "y.tab.c" /* yacc.c:1646 */
11215 break;
11216
11217 case 444:
11218 #line 6468 "parser.y" /* yacc.c:1646 */
11219 {
11220 (yyval.dtype) = (yyvsp[0].dtype);
11221 if (((yyval.dtype).type != T_INT) && ((yyval.dtype).type != T_UINT) &&
11222 ((yyval.dtype).type != T_LONG) && ((yyval.dtype).type != T_ULONG) &&
11223 ((yyval.dtype).type != T_LONGLONG) && ((yyval.dtype).type != T_ULONGLONG) &&
11224 ((yyval.dtype).type != T_SHORT) && ((yyval.dtype).type != T_USHORT) &&
11225 ((yyval.dtype).type != T_SCHAR) && ((yyval.dtype).type != T_UCHAR) &&
11226 ((yyval.dtype).type != T_CHAR) && ((yyval.dtype).type != T_BOOL)) {
11227 Swig_error(cparse_file,cparse_line,"Type error. Expecting an integral type\n");
11228 }
11229 }
11230 #line 11231 "y.tab.c" /* yacc.c:1646 */
11231 break;
11232
11233 case 445:
11234 #line 6483 "parser.y" /* yacc.c:1646 */
11235 { (yyval.dtype) = (yyvsp[0].dtype); }
11236 #line 11237 "y.tab.c" /* yacc.c:1646 */
11237 break;
11238
11239 case 446:
11240 #line 6484 "parser.y" /* yacc.c:1646 */
11241 {
11242 Node *n;
11243 (yyval.dtype).val = (yyvsp[0].type);
11244 (yyval.dtype).type = T_INT;
11245 /* Check if value is in scope */
11246 n = Swig_symbol_clookup((yyvsp[0].type),0);
11247 if (n) {
11248 /* A band-aid for enum values used in expressions. */
11249 if (Strcmp(nodeType(n),"enumitem") == 0) {
11250 String *q = Swig_symbol_qualified(n);
11251 if (q) {
11252 (yyval.dtype).val = NewStringf("%s::%s", q, Getattr(n,"name"));
11253 Delete(q);
11254 }
11255 }
11256 }
11257 }
11258 #line 11259 "y.tab.c" /* yacc.c:1646 */
11259 break;
11260
11261 case 447:
11262 #line 6504 "parser.y" /* yacc.c:1646 */
11263 {
11264 (yyval.dtype).val = NewStringf("%s->%s", (yyvsp[-2].id), (yyvsp[0].id));
11265 (yyval.dtype).type = 0;
11266 }
11267 #line 11268 "y.tab.c" /* yacc.c:1646 */
11268 break;
11269
11270 case 448:
11271 #line 6508 "parser.y" /* yacc.c:1646 */
11272 {
11273 (yyval.dtype) = (yyvsp[-2].dtype);
11274 Printf((yyval.dtype).val, "->%s", (yyvsp[0].id));
11275 }
11276 #line 11277 "y.tab.c" /* yacc.c:1646 */
11277 break;
11278
11279 case 449:
11280 #line 6518 "parser.y" /* yacc.c:1646 */
11281 {
11282 (yyval.dtype) = (yyvsp[-2].dtype);
11283 Printf((yyval.dtype).val, ".%s", (yyvsp[0].id));
11284 }
11285 #line 11286 "y.tab.c" /* yacc.c:1646 */
11286 break;
11287
11288 case 450:
11289 #line 6524 "parser.y" /* yacc.c:1646 */
11290 {
11291 (yyval.dtype) = (yyvsp[0].dtype);
11292 }
11293 #line 11294 "y.tab.c" /* yacc.c:1646 */
11294 break;
11295
11296 case 451:
11297 #line 6527 "parser.y" /* yacc.c:1646 */
11298 {
11299 (yyval.dtype) = (yyvsp[0].dtype);
11300 }
11301 #line 11302 "y.tab.c" /* yacc.c:1646 */
11302 break;
11303
11304 case 452:
11305 #line 6530 "parser.y" /* yacc.c:1646 */
11306 {
11307 (yyval.dtype).val = (yyvsp[0].str);
11308 (yyval.dtype).type = T_STRING;
11309 }
11310 #line 11311 "y.tab.c" /* yacc.c:1646 */
11311 break;
11312
11313 case 453:
11314 #line 6534 "parser.y" /* yacc.c:1646 */
11315 {
11316 SwigType_push((yyvsp[-2].type),(yyvsp[-1].decl).type);
11317 (yyval.dtype).val = NewStringf("sizeof(%s)",SwigType_str((yyvsp[-2].type),0));
11318 (yyval.dtype).type = T_ULONG;
11319 }
11320 #line 11321 "y.tab.c" /* yacc.c:1646 */
11321 break;
11322
11323 case 454:
11324 #line 6539 "parser.y" /* yacc.c:1646 */
11325 {
11326 SwigType_push((yyvsp[-2].type),(yyvsp[-1].decl).type);
11327 (yyval.dtype).val = NewStringf("sizeof...(%s)",SwigType_str((yyvsp[-2].type),0));
11328 (yyval.dtype).type = T_ULONG;
11329 }
11330 #line 11331 "y.tab.c" /* yacc.c:1646 */
11331 break;
11332
11333 case 455:
11334 #line 6544 "parser.y" /* yacc.c:1646 */
11335 { (yyval.dtype) = (yyvsp[0].dtype); }
11336 #line 11337 "y.tab.c" /* yacc.c:1646 */
11337 break;
11338
11339 case 456:
11340 #line 6545 "parser.y" /* yacc.c:1646 */
11341 {
11342 (yyval.dtype).val = (yyvsp[0].str);
11343 (yyval.dtype).rawval = NewStringf("L\"%s\"", (yyval.dtype).val);
11344 (yyval.dtype).type = T_WSTRING;
11345 }
11346 #line 11347 "y.tab.c" /* yacc.c:1646 */
11347 break;
11348
11349 case 457:
11350 #line 6550 "parser.y" /* yacc.c:1646 */
11351 {
11352 (yyval.dtype).val = NewString((yyvsp[0].str));
11353 if (Len((yyval.dtype).val)) {
11354 (yyval.dtype).rawval = NewStringf("'%(escape)s'", (yyval.dtype).val);
11355 } else {
11356 (yyval.dtype).rawval = NewString("'\\0'");
11357 }
11358 (yyval.dtype).type = T_CHAR;
11359 (yyval.dtype).bitfield = 0;
11360 (yyval.dtype).throws = 0;
11361 (yyval.dtype).throwf = 0;
11362 (yyval.dtype).nexcept = 0;
11363 (yyval.dtype).final = 0;
11364 }
11365 #line 11366 "y.tab.c" /* yacc.c:1646 */
11366 break;
11367
11368 case 458:
11369 #line 6564 "parser.y" /* yacc.c:1646 */
11370 {
11371 (yyval.dtype).val = NewString((yyvsp[0].str));
11372 if (Len((yyval.dtype).val)) {
11373 (yyval.dtype).rawval = NewStringf("L\'%s\'", (yyval.dtype).val);
11374 } else {
11375 (yyval.dtype).rawval = NewString("L'\\0'");
11376 }
11377 (yyval.dtype).type = T_WCHAR;
11378 (yyval.dtype).bitfield = 0;
11379 (yyval.dtype).throws = 0;
11380 (yyval.dtype).throwf = 0;
11381 (yyval.dtype).nexcept = 0;
11382 (yyval.dtype).final = 0;
11383 }
11384 #line 11385 "y.tab.c" /* yacc.c:1646 */
11385 break;
11386
11387 case 459:
11388 #line 6580 "parser.y" /* yacc.c:1646 */
11389 {
11390 (yyval.dtype).val = NewStringf("(%s)",(yyvsp[-1].dtype).val);
11391 if ((yyvsp[-1].dtype).rawval) {
11392 (yyval.dtype).rawval = NewStringf("(%s)",(yyvsp[-1].dtype).rawval);
11393 }
11394 (yyval.dtype).type = (yyvsp[-1].dtype).type;
11395 }
11396 #line 11397 "y.tab.c" /* yacc.c:1646 */
11397 break;
11398
11399 case 460:
11400 #line 6590 "parser.y" /* yacc.c:1646 */
11401 {
11402 (yyval.dtype) = (yyvsp[0].dtype);
11403 if ((yyvsp[0].dtype).type != T_STRING) {
11404 switch ((yyvsp[-2].dtype).type) {
11405 case T_FLOAT:
11406 case T_DOUBLE:
11407 case T_LONGDOUBLE:
11408 case T_FLTCPLX:
11409 case T_DBLCPLX:
11410 (yyval.dtype).val = NewStringf("(%s)%s", (yyvsp[-2].dtype).val, (yyvsp[0].dtype).val); /* SwigType_str and decimal points don't mix! */
11411 break;
11412 default:
11413 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[-2].dtype).val,0), (yyvsp[0].dtype).val);
11414 break;
11415 }
11416 }
11417 (yyval.dtype).type = promote((yyvsp[-2].dtype).type, (yyvsp[0].dtype).type);
11418 }
11419 #line 11420 "y.tab.c" /* yacc.c:1646 */
11420 break;
11421
11422 case 461:
11423 #line 6608 "parser.y" /* yacc.c:1646 */
11424 {
11425 (yyval.dtype) = (yyvsp[0].dtype);
11426 if ((yyvsp[0].dtype).type != T_STRING) {
11427 SwigType_push((yyvsp[-3].dtype).val,(yyvsp[-2].type));
11428 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[-3].dtype).val,0), (yyvsp[0].dtype).val);
11429 }
11430 }
11431 #line 11432 "y.tab.c" /* yacc.c:1646 */
11432 break;
11433
11434 case 462:
11435 #line 6615 "parser.y" /* yacc.c:1646 */
11436 {
11437 (yyval.dtype) = (yyvsp[0].dtype);
11438 if ((yyvsp[0].dtype).type != T_STRING) {
11439 SwigType_add_reference((yyvsp[-3].dtype).val);
11440 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[-3].dtype).val,0), (yyvsp[0].dtype).val);
11441 }
11442 }
11443 #line 11444 "y.tab.c" /* yacc.c:1646 */
11444 break;
11445
11446 case 463:
11447 #line 6622 "parser.y" /* yacc.c:1646 */
11448 {
11449 (yyval.dtype) = (yyvsp[0].dtype);
11450 if ((yyvsp[0].dtype).type != T_STRING) {
11451 SwigType_add_rvalue_reference((yyvsp[-3].dtype).val);
11452 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[-3].dtype).val,0), (yyvsp[0].dtype).val);
11453 }
11454 }
11455 #line 11456 "y.tab.c" /* yacc.c:1646 */
11456 break;
11457
11458 case 464:
11459 #line 6629 "parser.y" /* yacc.c:1646 */
11460 {
11461 (yyval.dtype) = (yyvsp[0].dtype);
11462 if ((yyvsp[0].dtype).type != T_STRING) {
11463 SwigType_push((yyvsp[-4].dtype).val,(yyvsp[-3].type));
11464 SwigType_add_reference((yyvsp[-4].dtype).val);
11465 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[-4].dtype).val,0), (yyvsp[0].dtype).val);
11466 }
11467 }
11468 #line 11469 "y.tab.c" /* yacc.c:1646 */
11469 break;
11470
11471 case 465:
11472 #line 6637 "parser.y" /* yacc.c:1646 */
11473 {
11474 (yyval.dtype) = (yyvsp[0].dtype);
11475 if ((yyvsp[0].dtype).type != T_STRING) {
11476 SwigType_push((yyvsp[-4].dtype).val,(yyvsp[-3].type));
11477 SwigType_add_rvalue_reference((yyvsp[-4].dtype).val);
11478 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[-4].dtype).val,0), (yyvsp[0].dtype).val);
11479 }
11480 }
11481 #line 11482 "y.tab.c" /* yacc.c:1646 */
11482 break;
11483
11484 case 466:
11485 #line 6645 "parser.y" /* yacc.c:1646 */
11486 {
11487 (yyval.dtype) = (yyvsp[0].dtype);
11488 (yyval.dtype).val = NewStringf("&%s",(yyvsp[0].dtype).val);
11489 }
11490 #line 11491 "y.tab.c" /* yacc.c:1646 */
11491 break;
11492
11493 case 467:
11494 #line 6649 "parser.y" /* yacc.c:1646 */
11495 {
11496 (yyval.dtype) = (yyvsp[0].dtype);
11497 (yyval.dtype).val = NewStringf("&&%s",(yyvsp[0].dtype).val);
11498 }
11499 #line 11500 "y.tab.c" /* yacc.c:1646 */
11500 break;
11501
11502 case 468:
11503 #line 6653 "parser.y" /* yacc.c:1646 */
11504 {
11505 (yyval.dtype) = (yyvsp[0].dtype);
11506 (yyval.dtype).val = NewStringf("*%s",(yyvsp[0].dtype).val);
11507 }
11508 #line 11509 "y.tab.c" /* yacc.c:1646 */
11509 break;
11510
11511 case 469:
11512 #line 6659 "parser.y" /* yacc.c:1646 */
11513 { (yyval.dtype) = (yyvsp[0].dtype); }
11514 #line 11515 "y.tab.c" /* yacc.c:1646 */
11515 break;
11516
11517 case 470:
11518 #line 6660 "parser.y" /* yacc.c:1646 */
11519 { (yyval.dtype) = (yyvsp[0].dtype); }
11520 #line 11521 "y.tab.c" /* yacc.c:1646 */
11521 break;
11522
11523 case 471:
11524 #line 6661 "parser.y" /* yacc.c:1646 */
11525 { (yyval.dtype) = (yyvsp[0].dtype); }
11526 #line 11527 "y.tab.c" /* yacc.c:1646 */
11527 break;
11528
11529 case 472:
11530 #line 6662 "parser.y" /* yacc.c:1646 */
11531 { (yyval.dtype) = (yyvsp[0].dtype); }
11532 #line 11533 "y.tab.c" /* yacc.c:1646 */
11533 break;
11534
11535 case 473:
11536 #line 6663 "parser.y" /* yacc.c:1646 */
11537 { (yyval.dtype) = (yyvsp[0].dtype); }
11538 #line 11539 "y.tab.c" /* yacc.c:1646 */
11539 break;
11540
11541 case 474:
11542 #line 6664 "parser.y" /* yacc.c:1646 */
11543 { (yyval.dtype) = (yyvsp[0].dtype); }
11544 #line 11545 "y.tab.c" /* yacc.c:1646 */
11545 break;
11546
11547 case 475:
11548 #line 6665 "parser.y" /* yacc.c:1646 */
11549 { (yyval.dtype) = (yyvsp[0].dtype); }
11550 #line 11551 "y.tab.c" /* yacc.c:1646 */
11551 break;
11552
11553 case 476:
11554 #line 6666 "parser.y" /* yacc.c:1646 */
11555 { (yyval.dtype) = (yyvsp[0].dtype); }
11556 #line 11557 "y.tab.c" /* yacc.c:1646 */
11557 break;
11558
11559 case 477:
11560 #line 6669 "parser.y" /* yacc.c:1646 */
11561 {
11562 (yyval.dtype).val = NewStringf("%s+%s", COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11563 (yyval.dtype).type = promote((yyvsp[-2].dtype).type,(yyvsp[0].dtype).type);
11564 }
11565 #line 11566 "y.tab.c" /* yacc.c:1646 */
11566 break;
11567
11568 case 478:
11569 #line 6673 "parser.y" /* yacc.c:1646 */
11570 {
11571 (yyval.dtype).val = NewStringf("%s-%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11572 (yyval.dtype).type = promote((yyvsp[-2].dtype).type,(yyvsp[0].dtype).type);
11573 }
11574 #line 11575 "y.tab.c" /* yacc.c:1646 */
11575 break;
11576
11577 case 479:
11578 #line 6677 "parser.y" /* yacc.c:1646 */
11579 {
11580 (yyval.dtype).val = NewStringf("%s*%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11581 (yyval.dtype).type = promote((yyvsp[-2].dtype).type,(yyvsp[0].dtype).type);
11582 }
11583 #line 11584 "y.tab.c" /* yacc.c:1646 */
11584 break;
11585
11586 case 480:
11587 #line 6681 "parser.y" /* yacc.c:1646 */
11588 {
11589 (yyval.dtype).val = NewStringf("%s/%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11590 (yyval.dtype).type = promote((yyvsp[-2].dtype).type,(yyvsp[0].dtype).type);
11591 }
11592 #line 11593 "y.tab.c" /* yacc.c:1646 */
11593 break;
11594
11595 case 481:
11596 #line 6685 "parser.y" /* yacc.c:1646 */
11597 {
11598 (yyval.dtype).val = NewStringf("%s%%%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11599 (yyval.dtype).type = promote((yyvsp[-2].dtype).type,(yyvsp[0].dtype).type);
11600 }
11601 #line 11602 "y.tab.c" /* yacc.c:1646 */
11602 break;
11603
11604 case 482:
11605 #line 6689 "parser.y" /* yacc.c:1646 */
11606 {
11607 (yyval.dtype).val = NewStringf("%s&%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11608 (yyval.dtype).type = promote((yyvsp[-2].dtype).type,(yyvsp[0].dtype).type);
11609 }
11610 #line 11611 "y.tab.c" /* yacc.c:1646 */
11611 break;
11612
11613 case 483:
11614 #line 6693 "parser.y" /* yacc.c:1646 */
11615 {
11616 (yyval.dtype).val = NewStringf("%s|%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11617 (yyval.dtype).type = promote((yyvsp[-2].dtype).type,(yyvsp[0].dtype).type);
11618 }
11619 #line 11620 "y.tab.c" /* yacc.c:1646 */
11620 break;
11621
11622 case 484:
11623 #line 6697 "parser.y" /* yacc.c:1646 */
11624 {
11625 (yyval.dtype).val = NewStringf("%s^%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11626 (yyval.dtype).type = promote((yyvsp[-2].dtype).type,(yyvsp[0].dtype).type);
11627 }
11628 #line 11629 "y.tab.c" /* yacc.c:1646 */
11629 break;
11630
11631 case 485:
11632 #line 6701 "parser.y" /* yacc.c:1646 */
11633 {
11634 (yyval.dtype).val = NewStringf("%s << %s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11635 (yyval.dtype).type = promote_type((yyvsp[-2].dtype).type);
11636 }
11637 #line 11638 "y.tab.c" /* yacc.c:1646 */
11638 break;
11639
11640 case 486:
11641 #line 6705 "parser.y" /* yacc.c:1646 */
11642 {
11643 (yyval.dtype).val = NewStringf("%s >> %s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11644 (yyval.dtype).type = promote_type((yyvsp[-2].dtype).type);
11645 }
11646 #line 11647 "y.tab.c" /* yacc.c:1646 */
11647 break;
11648
11649 case 487:
11650 #line 6709 "parser.y" /* yacc.c:1646 */
11651 {
11652 (yyval.dtype).val = NewStringf("%s&&%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11653 (yyval.dtype).type = cparse_cplusplus ? T_BOOL : T_INT;
11654 }
11655 #line 11656 "y.tab.c" /* yacc.c:1646 */
11656 break;
11657
11658 case 488:
11659 #line 6713 "parser.y" /* yacc.c:1646 */
11660 {
11661 (yyval.dtype).val = NewStringf("%s||%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11662 (yyval.dtype).type = cparse_cplusplus ? T_BOOL : T_INT;
11663 }
11664 #line 11665 "y.tab.c" /* yacc.c:1646 */
11665 break;
11666
11667 case 489:
11668 #line 6717 "parser.y" /* yacc.c:1646 */
11669 {
11670 (yyval.dtype).val = NewStringf("%s==%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11671 (yyval.dtype).type = cparse_cplusplus ? T_BOOL : T_INT;
11672 }
11673 #line 11674 "y.tab.c" /* yacc.c:1646 */
11674 break;
11675
11676 case 490:
11677 #line 6721 "parser.y" /* yacc.c:1646 */
11678 {
11679 (yyval.dtype).val = NewStringf("%s!=%s",COMPOUND_EXPR_VAL((yyvsp[-2].dtype)),COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11680 (yyval.dtype).type = cparse_cplusplus ? T_BOOL : T_INT;
11681 }
11682 #line 11683 "y.tab.c" /* yacc.c:1646 */
11683 break;
11684
11685 case 491:
11686 #line 6735 "parser.y" /* yacc.c:1646 */
11687 {
11688 (yyval.dtype).val = NewStringf("%s >= %s", COMPOUND_EXPR_VAL((yyvsp[-2].dtype)), COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11689 (yyval.dtype).type = cparse_cplusplus ? T_BOOL : T_INT;
11690 }
11691 #line 11692 "y.tab.c" /* yacc.c:1646 */
11692 break;
11693
11694 case 492:
11695 #line 6739 "parser.y" /* yacc.c:1646 */
11696 {
11697 (yyval.dtype).val = NewStringf("%s <= %s", COMPOUND_EXPR_VAL((yyvsp[-2].dtype)), COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11698 (yyval.dtype).type = cparse_cplusplus ? T_BOOL : T_INT;
11699 }
11700 #line 11701 "y.tab.c" /* yacc.c:1646 */
11701 break;
11702
11703 case 493:
11704 #line 6743 "parser.y" /* yacc.c:1646 */
11705 {
11706 (yyval.dtype).val = NewStringf("%s?%s:%s", COMPOUND_EXPR_VAL((yyvsp[-4].dtype)), COMPOUND_EXPR_VAL((yyvsp[-2].dtype)), COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11707 /* This may not be exactly right, but is probably good enough
11708 * for the purposes of parsing constant expressions. */
11709 (yyval.dtype).type = promote((yyvsp[-2].dtype).type, (yyvsp[0].dtype).type);
11710 }
11711 #line 11712 "y.tab.c" /* yacc.c:1646 */
11712 break;
11713
11714 case 494:
11715 #line 6749 "parser.y" /* yacc.c:1646 */
11716 {
11717 (yyval.dtype).val = NewStringf("-%s",(yyvsp[0].dtype).val);
11718 (yyval.dtype).type = (yyvsp[0].dtype).type;
11719 }
11720 #line 11721 "y.tab.c" /* yacc.c:1646 */
11721 break;
11722
11723 case 495:
11724 #line 6753 "parser.y" /* yacc.c:1646 */
11725 {
11726 (yyval.dtype).val = NewStringf("+%s",(yyvsp[0].dtype).val);
11727 (yyval.dtype).type = (yyvsp[0].dtype).type;
11728 }
11729 #line 11730 "y.tab.c" /* yacc.c:1646 */
11730 break;
11731
11732 case 496:
11733 #line 6757 "parser.y" /* yacc.c:1646 */
11734 {
11735 (yyval.dtype).val = NewStringf("~%s",(yyvsp[0].dtype).val);
11736 (yyval.dtype).type = (yyvsp[0].dtype).type;
11737 }
11738 #line 11739 "y.tab.c" /* yacc.c:1646 */
11739 break;
11740
11741 case 497:
11742 #line 6761 "parser.y" /* yacc.c:1646 */
11743 {
11744 (yyval.dtype).val = NewStringf("!%s",COMPOUND_EXPR_VAL((yyvsp[0].dtype)));
11745 (yyval.dtype).type = T_INT;
11746 }
11747 #line 11748 "y.tab.c" /* yacc.c:1646 */
11748 break;
11749
11750 case 498:
11751 #line 6765 "parser.y" /* yacc.c:1646 */
11752 {
11753 String *qty;
11754 skip_balanced('(',')');
11755 qty = Swig_symbol_type_qualify((yyvsp[-1].type),0);
11756 if (SwigType_istemplate(qty)) {
11757 String *nstr = SwigType_namestr(qty);
11758 Delete(qty);
11759 qty = nstr;
11760 }
11761 (yyval.dtype).val = NewStringf("%s%s",qty,scanner_ccode);
11762 Clear(scanner_ccode);
11763 (yyval.dtype).type = T_INT;
11764 Delete(qty);
11765 }
11766 #line 11767 "y.tab.c" /* yacc.c:1646 */
11767 break;
11768
11769 case 499:
11770 #line 6781 "parser.y" /* yacc.c:1646 */
11771 {
11772 (yyval.str) = NewString("...");
11773 }
11774 #line 11775 "y.tab.c" /* yacc.c:1646 */
11775 break;
11776
11777 case 500:
11778 #line 6786 "parser.y" /* yacc.c:1646 */
11779 {
11780 (yyval.str) = (yyvsp[0].str);
11781 }
11782 #line 11783 "y.tab.c" /* yacc.c:1646 */
11783 break;
11784
11785 case 501:
11786 #line 6789 "parser.y" /* yacc.c:1646 */
11787 {
11788 (yyval.str) = 0;
11789 }
11790 #line 11791 "y.tab.c" /* yacc.c:1646 */
11791 break;
11792
11793 case 502:
11794 #line 6794 "parser.y" /* yacc.c:1646 */
11795 {
11796 (yyval.bases) = (yyvsp[0].bases);
11797 }
11798 #line 11799 "y.tab.c" /* yacc.c:1646 */
11799 break;
11800
11801 case 503:
11802 #line 6799 "parser.y" /* yacc.c:1646 */
11803 { inherit_list = 1; }
11804 #line 11805 "y.tab.c" /* yacc.c:1646 */
11805 break;
11806
11807 case 504:
11808 #line 6799 "parser.y" /* yacc.c:1646 */
11809 { (yyval.bases) = (yyvsp[0].bases); inherit_list = 0; }
11810 #line 11811 "y.tab.c" /* yacc.c:1646 */
11811 break;
11812
11813 case 505:
11814 #line 6800 "parser.y" /* yacc.c:1646 */
11815 { (yyval.bases) = 0; }
11816 #line 11817 "y.tab.c" /* yacc.c:1646 */
11817 break;
11818
11819 case 506:
11820 #line 6803 "parser.y" /* yacc.c:1646 */
11821 {
11822 Hash *list = NewHash();
11823 Node *base = (yyvsp[0].node);
11824 Node *name = Getattr(base,"name");
11825 List *lpublic = NewList();
11826 List *lprotected = NewList();
11827 List *lprivate = NewList();
11828 Setattr(list,"public",lpublic);
11829 Setattr(list,"protected",lprotected);
11830 Setattr(list,"private",lprivate);
11831 Delete(lpublic);
11832 Delete(lprotected);
11833 Delete(lprivate);
11834 Append(Getattr(list,Getattr(base,"access")),name);
11835 (yyval.bases) = list;
11836 }
11837 #line 11838 "y.tab.c" /* yacc.c:1646 */
11838 break;
11839
11840 case 507:
11841 #line 6820 "parser.y" /* yacc.c:1646 */
11842 {
11843 Hash *list = (yyvsp[-2].bases);
11844 Node *base = (yyvsp[0].node);
11845 Node *name = Getattr(base,"name");
11846 Append(Getattr(list,Getattr(base,"access")),name);
11847 (yyval.bases) = list;
11848 }
11849 #line 11850 "y.tab.c" /* yacc.c:1646 */
11850 break;
11851
11852 case 508:
11853 #line 6829 "parser.y" /* yacc.c:1646 */
11854 {
11855 (yyval.intvalue) = cparse_line;
11856 }
11857 #line 11858 "y.tab.c" /* yacc.c:1646 */
11858 break;
11859
11860 case 509:
11861 #line 6831 "parser.y" /* yacc.c:1646 */
11862 {
11863 (yyval.node) = NewHash();
11864 Setfile((yyval.node),cparse_file);
11865 Setline((yyval.node),(yyvsp[-2].intvalue));
11866 Setattr((yyval.node),"name",(yyvsp[-1].str));
11867 Setfile((yyvsp[-1].str),cparse_file);
11868 Setline((yyvsp[-1].str),(yyvsp[-2].intvalue));
11869 if (last_cpptype && (Strcmp(last_cpptype,"struct") != 0)) {
11870 Setattr((yyval.node),"access","private");
11871 Swig_warning(WARN_PARSE_NO_ACCESS, Getfile((yyval.node)), Getline((yyval.node)), "No access specifier given for base class '%s' (ignored).\n", SwigType_namestr((yyvsp[-1].str)));
11872 } else {
11873 Setattr((yyval.node),"access","public");
11874 }
11875 if ((yyvsp[0].str))
11876 SetFlag((yyval.node), "variadic");
11877 }
11878 #line 11879 "y.tab.c" /* yacc.c:1646 */
11879 break;
11880
11881 case 510:
11882 #line 6847 "parser.y" /* yacc.c:1646 */
11883 {
11884 (yyval.intvalue) = cparse_line;
11885 }
11886 #line 11887 "y.tab.c" /* yacc.c:1646 */
11887 break;
11888
11889 case 511:
11890 #line 6849 "parser.y" /* yacc.c:1646 */
11891 {
11892 (yyval.node) = NewHash();
11893 Setfile((yyval.node),cparse_file);
11894 Setline((yyval.node),(yyvsp[-3].intvalue));
11895 Setattr((yyval.node),"name",(yyvsp[-1].str));
11896 Setfile((yyvsp[-1].str),cparse_file);
11897 Setline((yyvsp[-1].str),(yyvsp[-3].intvalue));
11898 Setattr((yyval.node),"access",(yyvsp[-4].id));
11899 if (Strcmp((yyvsp[-4].id),"public") != 0) {
11900 Swig_warning(WARN_PARSE_PRIVATE_INHERIT, Getfile((yyval.node)), Getline((yyval.node)), "%s inheritance from base '%s' (ignored).\n", (yyvsp[-4].id), SwigType_namestr((yyvsp[-1].str)));
11901 }
11902 if ((yyvsp[0].str))
11903 SetFlag((yyval.node), "variadic");
11904 }
11905 #line 11906 "y.tab.c" /* yacc.c:1646 */
11906 break;
11907
11908 case 512:
11909 #line 6865 "parser.y" /* yacc.c:1646 */
11910 { (yyval.id) = (char*)"public"; }
11911 #line 11912 "y.tab.c" /* yacc.c:1646 */
11912 break;
11913
11914 case 513:
11915 #line 6866 "parser.y" /* yacc.c:1646 */
11916 { (yyval.id) = (char*)"private"; }
11917 #line 11918 "y.tab.c" /* yacc.c:1646 */
11918 break;
11919
11920 case 514:
11921 #line 6867 "parser.y" /* yacc.c:1646 */
11922 { (yyval.id) = (char*)"protected"; }
11923 #line 11924 "y.tab.c" /* yacc.c:1646 */
11924 break;
11925
11926 case 515:
11927 #line 6870 "parser.y" /* yacc.c:1646 */
11928 {
11929 (yyval.id) = (char*)"class";
11930 if (!inherit_list) last_cpptype = (yyval.id);
11931 }
11932 #line 11933 "y.tab.c" /* yacc.c:1646 */
11933 break;
11934
11935 case 516:
11936 #line 6874 "parser.y" /* yacc.c:1646 */
11937 {
11938 (yyval.id) = (char *)"typename";
11939 if (!inherit_list) last_cpptype = (yyval.id);
11940 }
11941 #line 11942 "y.tab.c" /* yacc.c:1646 */
11942 break;
11943
11944 case 517:
11945 #line 6878 "parser.y" /* yacc.c:1646 */
11946 {
11947 (yyval.id) = (char *)"class...";
11948 if (!inherit_list) last_cpptype = (yyval.id);
11949 }
11950 #line 11951 "y.tab.c" /* yacc.c:1646 */
11951 break;
11952
11953 case 518:
11954 #line 6882 "parser.y" /* yacc.c:1646 */
11955 {
11956 (yyval.id) = (char *)"typename...";
11957 if (!inherit_list) last_cpptype = (yyval.id);
11958 }
11959 #line 11960 "y.tab.c" /* yacc.c:1646 */
11960 break;
11961
11962 case 519:
11963 #line 6888 "parser.y" /* yacc.c:1646 */
11964 {
11965 (yyval.id) = (yyvsp[0].id);
11966 }
11967 #line 11968 "y.tab.c" /* yacc.c:1646 */
11968 break;
11969
11970 case 520:
11971 #line 6891 "parser.y" /* yacc.c:1646 */
11972 {
11973 (yyval.id) = (char*)"struct";
11974 if (!inherit_list) last_cpptype = (yyval.id);
11975 }
11976 #line 11977 "y.tab.c" /* yacc.c:1646 */
11977 break;
11978
11979 case 521:
11980 #line 6895 "parser.y" /* yacc.c:1646 */
11981 {
11982 (yyval.id) = (char*)"union";
11983 if (!inherit_list) last_cpptype = (yyval.id);
11984 }
11985 #line 11986 "y.tab.c" /* yacc.c:1646 */
11986 break;
11987
11988 case 522:
11989 #line 6901 "parser.y" /* yacc.c:1646 */
11990 {
11991 (yyval.id) = (char*)"class";
11992 if (!inherit_list) last_cpptype = (yyval.id);
11993 }
11994 #line 11995 "y.tab.c" /* yacc.c:1646 */
11995 break;
11996
11997 case 523:
11998 #line 6905 "parser.y" /* yacc.c:1646 */
11999 {
12000 (yyval.id) = (char*)"struct";
12001 if (!inherit_list) last_cpptype = (yyval.id);
12002 }
12003 #line 12004 "y.tab.c" /* yacc.c:1646 */
12004 break;
12005
12006 case 524:
12007 #line 6909 "parser.y" /* yacc.c:1646 */
12008 {
12009 (yyval.id) = (char*)"union";
12010 if (!inherit_list) last_cpptype = (yyval.id);
12011 }
12012 #line 12013 "y.tab.c" /* yacc.c:1646 */
12013 break;
12014
12015 case 525:
12016 #line 6915 "parser.y" /* yacc.c:1646 */
12017 {
12018 (yyval.id) = (yyvsp[0].id);
12019 }
12020 #line 12021 "y.tab.c" /* yacc.c:1646 */
12021 break;
12022
12023 case 526:
12024 #line 6918 "parser.y" /* yacc.c:1646 */
12025 {
12026 (yyval.id) = 0;
12027 }
12028 #line 12029 "y.tab.c" /* yacc.c:1646 */
12029 break;
12030
12031 case 529:
12032 #line 6927 "parser.y" /* yacc.c:1646 */
12033 {
12034 (yyval.str) = 0;
12035 }
12036 #line 12037 "y.tab.c" /* yacc.c:1646 */
12037 break;
12038
12039 case 530:
12040 #line 6930 "parser.y" /* yacc.c:1646 */
12041 {
12042 (yyval.str) = NewString("1");
12043 }
12044 #line 12045 "y.tab.c" /* yacc.c:1646 */
12045 break;
12046
12047 case 531:
12048 #line 6933 "parser.y" /* yacc.c:1646 */
12049 {
12050 (yyval.str) = NewString("1");
12051 }
12052 #line 12053 "y.tab.c" /* yacc.c:1646 */
12053 break;
12054
12055 case 532:
12056 #line 6936 "parser.y" /* yacc.c:1646 */
12057 {
12058 (yyval.str) = NewString("1");
12059 }
12060 #line 12061 "y.tab.c" /* yacc.c:1646 */
12061 break;
12062
12063 case 533:
12064 #line 6941 "parser.y" /* yacc.c:1646 */
12065 {
12066 (yyval.str) = (yyvsp[0].str);
12067 }
12068 #line 12069 "y.tab.c" /* yacc.c:1646 */
12069 break;
12070
12071 case 534:
12072 #line 6944 "parser.y" /* yacc.c:1646 */
12073 {
12074 (yyval.str) = 0;
12075 }
12076 #line 12077 "y.tab.c" /* yacc.c:1646 */
12077 break;
12078
12079 case 535:
12080 #line 6949 "parser.y" /* yacc.c:1646 */
12081 {
12082 (yyval.dtype).throws = (yyvsp[-1].pl);
12083 (yyval.dtype).throwf = NewString("1");
12084 (yyval.dtype).nexcept = 0;
12085 (yyval.dtype).final = 0;
12086 }
12087 #line 12088 "y.tab.c" /* yacc.c:1646 */
12088 break;
12089
12090 case 536:
12091 #line 6955 "parser.y" /* yacc.c:1646 */
12092 {
12093 (yyval.dtype).throws = 0;
12094 (yyval.dtype).throwf = 0;
12095 (yyval.dtype).nexcept = NewString("true");
12096 (yyval.dtype).final = 0;
12097 }
12098 #line 12099 "y.tab.c" /* yacc.c:1646 */
12099 break;
12100
12101 case 537:
12102 #line 6961 "parser.y" /* yacc.c:1646 */
12103 {
12104 (yyval.dtype).throws = 0;
12105 (yyval.dtype).throwf = 0;
12106 (yyval.dtype).nexcept = 0;
12107 (yyval.dtype).final = (yyvsp[0].str);
12108 }
12109 #line 12110 "y.tab.c" /* yacc.c:1646 */
12110 break;
12111
12112 case 538:
12113 #line 6967 "parser.y" /* yacc.c:1646 */
12114 {
12115 (yyval.dtype).throws = (yyvsp[-2].pl);
12116 (yyval.dtype).throwf = NewString("1");
12117 (yyval.dtype).nexcept = 0;
12118 (yyval.dtype).final = (yyvsp[0].str);
12119 }
12120 #line 12121 "y.tab.c" /* yacc.c:1646 */
12121 break;
12122
12123 case 539:
12124 #line 6973 "parser.y" /* yacc.c:1646 */
12125 {
12126 (yyval.dtype).throws = 0;
12127 (yyval.dtype).throwf = 0;
12128 (yyval.dtype).nexcept = NewString("true");
12129 (yyval.dtype).final = (yyvsp[0].str);
12130 }
12131 #line 12132 "y.tab.c" /* yacc.c:1646 */
12132 break;
12133
12134 case 540:
12135 #line 6979 "parser.y" /* yacc.c:1646 */
12136 {
12137 (yyval.dtype).throws = 0;
12138 (yyval.dtype).throwf = 0;
12139 (yyval.dtype).nexcept = (yyvsp[-1].dtype).val;
12140 (yyval.dtype).final = 0;
12141 }
12142 #line 12143 "y.tab.c" /* yacc.c:1646 */
12143 break;
12144
12145 case 541:
12146 #line 6987 "parser.y" /* yacc.c:1646 */
12147 {
12148 (yyval.dtype).throws = 0;
12149 (yyval.dtype).throwf = 0;
12150 (yyval.dtype).nexcept = 0;
12151 (yyval.dtype).final = 0;
12152 (yyval.dtype).qualifier = (yyvsp[0].dtype).qualifier;
12153 (yyval.dtype).refqualifier = (yyvsp[0].dtype).refqualifier;
12154 }
12155 #line 12156 "y.tab.c" /* yacc.c:1646 */
12156 break;
12157
12158 case 542:
12159 #line 6995 "parser.y" /* yacc.c:1646 */
12160 {
12161 (yyval.dtype) = (yyvsp[0].dtype);
12162 (yyval.dtype).qualifier = 0;
12163 (yyval.dtype).refqualifier = 0;
12164 }
12165 #line 12166 "y.tab.c" /* yacc.c:1646 */
12166 break;
12167
12168 case 543:
12169 #line 7000 "parser.y" /* yacc.c:1646 */
12170 {
12171 (yyval.dtype) = (yyvsp[0].dtype);
12172 (yyval.dtype).qualifier = (yyvsp[-1].dtype).qualifier;
12173 (yyval.dtype).refqualifier = (yyvsp[-1].dtype).refqualifier;
12174 }
12175 #line 12176 "y.tab.c" /* yacc.c:1646 */
12176 break;
12177
12178 case 544:
12179 #line 7007 "parser.y" /* yacc.c:1646 */
12180 {
12181 (yyval.dtype) = (yyvsp[0].dtype);
12182 }
12183 #line 12184 "y.tab.c" /* yacc.c:1646 */
12184 break;
12185
12186 case 545:
12187 #line 7010 "parser.y" /* yacc.c:1646 */
12188 {
12189 (yyval.dtype).throws = 0;
12190 (yyval.dtype).throwf = 0;
12191 (yyval.dtype).nexcept = 0;
12192 (yyval.dtype).final = 0;
12193 (yyval.dtype).qualifier = 0;
12194 (yyval.dtype).refqualifier = 0;
12195 }
12196 #line 12197 "y.tab.c" /* yacc.c:1646 */
12197 break;
12198
12199 case 546:
12200 #line 7020 "parser.y" /* yacc.c:1646 */
12201 {
12202 Clear(scanner_ccode);
12203 (yyval.decl).have_parms = 0;
12204 (yyval.decl).defarg = 0;
12205 (yyval.decl).throws = (yyvsp[-2].dtype).throws;
12206 (yyval.decl).throwf = (yyvsp[-2].dtype).throwf;
12207 (yyval.decl).nexcept = (yyvsp[-2].dtype).nexcept;
12208 (yyval.decl).final = (yyvsp[-2].dtype).final;
12209 if ((yyvsp[-2].dtype).qualifier)
12210 Swig_error(cparse_file, cparse_line, "Constructor cannot have a qualifier.\n");
12211 }
12212 #line 12213 "y.tab.c" /* yacc.c:1646 */
12213 break;
12214
12215 case 547:
12216 #line 7031 "parser.y" /* yacc.c:1646 */
12217 {
12218 skip_balanced('{','}');
12219 (yyval.decl).have_parms = 0;
12220 (yyval.decl).defarg = 0;
12221 (yyval.decl).throws = (yyvsp[-2].dtype).throws;
12222 (yyval.decl).throwf = (yyvsp[-2].dtype).throwf;
12223 (yyval.decl).nexcept = (yyvsp[-2].dtype).nexcept;
12224 (yyval.decl).final = (yyvsp[-2].dtype).final;
12225 if ((yyvsp[-2].dtype).qualifier)
12226 Swig_error(cparse_file, cparse_line, "Constructor cannot have a qualifier.\n");
12227 }
12228 #line 12229 "y.tab.c" /* yacc.c:1646 */
12229 break;
12230
12231 case 548:
12232 #line 7042 "parser.y" /* yacc.c:1646 */
12233 {
12234 Clear(scanner_ccode);
12235 (yyval.decl).parms = (yyvsp[-2].pl);
12236 (yyval.decl).have_parms = 1;
12237 (yyval.decl).defarg = 0;
12238 (yyval.decl).throws = 0;
12239 (yyval.decl).throwf = 0;
12240 (yyval.decl).nexcept = 0;
12241 (yyval.decl).final = 0;
12242 }
12243 #line 12244 "y.tab.c" /* yacc.c:1646 */
12244 break;
12245
12246 case 549:
12247 #line 7052 "parser.y" /* yacc.c:1646 */
12248 {
12249 skip_balanced('{','}');
12250 (yyval.decl).parms = (yyvsp[-2].pl);
12251 (yyval.decl).have_parms = 1;
12252 (yyval.decl).defarg = 0;
12253 (yyval.decl).throws = 0;
12254 (yyval.decl).throwf = 0;
12255 (yyval.decl).nexcept = 0;
12256 (yyval.decl).final = 0;
12257 }
12258 #line 12259 "y.tab.c" /* yacc.c:1646 */
12259 break;
12260
12261 case 550:
12262 #line 7062 "parser.y" /* yacc.c:1646 */
12263 {
12264 (yyval.decl).have_parms = 0;
12265 (yyval.decl).defarg = (yyvsp[-1].dtype).val;
12266 (yyval.decl).throws = 0;
12267 (yyval.decl).throwf = 0;
12268 (yyval.decl).nexcept = 0;
12269 (yyval.decl).final = 0;
12270 }
12271 #line 12272 "y.tab.c" /* yacc.c:1646 */
12272 break;
12273
12274 case 551:
12275 #line 7070 "parser.y" /* yacc.c:1646 */
12276 {
12277 (yyval.decl).have_parms = 0;
12278 (yyval.decl).defarg = (yyvsp[-1].dtype).val;
12279 (yyval.decl).throws = (yyvsp[-3].dtype).throws;
12280 (yyval.decl).throwf = (yyvsp[-3].dtype).throwf;
12281 (yyval.decl).nexcept = (yyvsp[-3].dtype).nexcept;
12282 (yyval.decl).final = (yyvsp[-3].dtype).final;
12283 if ((yyvsp[-3].dtype).qualifier)
12284 Swig_error(cparse_file, cparse_line, "Constructor cannot have a qualifier.\n");
12285 }
12286 #line 12287 "y.tab.c" /* yacc.c:1646 */
12287 break;
12288
12289 case 558:
12290 #line 7092 "parser.y" /* yacc.c:1646 */
12291 {
12292 skip_balanced('(',')');
12293 Clear(scanner_ccode);
12294 }
12295 #line 12296 "y.tab.c" /* yacc.c:1646 */
12296 break;
12297
12298 case 559:
12299 #line 7104 "parser.y" /* yacc.c:1646 */
12300 {
12301 skip_balanced('{','}');
12302 Clear(scanner_ccode);
12303 }
12304 #line 12305 "y.tab.c" /* yacc.c:1646 */
12305 break;
12306
12307 case 560:
12308 #line 7110 "parser.y" /* yacc.c:1646 */
12309 {
12310 String *s = NewStringEmpty();
12311 SwigType_add_template(s,(yyvsp[-1].p));
12312 (yyval.id) = Char(s);
12313 scanner_last_id(1);
12314 }
12315 #line 12316 "y.tab.c" /* yacc.c:1646 */
12316 break;
12317
12318 case 561:
12319 #line 7119 "parser.y" /* yacc.c:1646 */
12320 { (yyval.id) = (yyvsp[0].id); }
12321 #line 12322 "y.tab.c" /* yacc.c:1646 */
12322 break;
12323
12324 case 562:
12325 #line 7120 "parser.y" /* yacc.c:1646 */
12326 { (yyval.id) = Swig_copy_string("override"); }
12327 #line 12328 "y.tab.c" /* yacc.c:1646 */
12328 break;
12329
12330 case 563:
12331 #line 7121 "parser.y" /* yacc.c:1646 */
12332 { (yyval.id) = Swig_copy_string("final"); }
12333 #line 12334 "y.tab.c" /* yacc.c:1646 */
12334 break;
12335
12336 case 564:
12337 #line 7124 "parser.y" /* yacc.c:1646 */
12338 { (yyval.id) = (yyvsp[0].id); }
12339 #line 12340 "y.tab.c" /* yacc.c:1646 */
12340 break;
12341
12342 case 565:
12343 #line 7125 "parser.y" /* yacc.c:1646 */
12344 { (yyval.id) = Char((yyvsp[0].dtype).val); }
12345 #line 12346 "y.tab.c" /* yacc.c:1646 */
12346 break;
12347
12348 case 566:
12349 #line 7126 "parser.y" /* yacc.c:1646 */
12350 { (yyval.id) = Char((yyvsp[0].str)); }
12351 #line 12352 "y.tab.c" /* yacc.c:1646 */
12352 break;
12353
12354 case 567:
12355 #line 7129 "parser.y" /* yacc.c:1646 */
12356 { (yyval.id) = (yyvsp[0].id); }
12357 #line 12358 "y.tab.c" /* yacc.c:1646 */
12358 break;
12359
12360 case 568:
12361 #line 7130 "parser.y" /* yacc.c:1646 */
12362 { (yyval.id) = 0; }
12363 #line 12364 "y.tab.c" /* yacc.c:1646 */
12364 break;
12365
12366 case 569:
12367 #line 7133 "parser.y" /* yacc.c:1646 */
12368 {
12369 (yyval.str) = 0;
12370 if (!(yyval.str)) (yyval.str) = NewStringf("%s%s", (yyvsp[-1].str),(yyvsp[0].str));
12371 Delete((yyvsp[0].str));
12372 }
12373 #line 12374 "y.tab.c" /* yacc.c:1646 */
12374 break;
12375
12376 case 570:
12377 #line 7138 "parser.y" /* yacc.c:1646 */
12378 {
12379 (yyval.str) = NewStringf("::%s%s",(yyvsp[-1].str),(yyvsp[0].str));
12380 Delete((yyvsp[0].str));
12381 }
12382 #line 12383 "y.tab.c" /* yacc.c:1646 */
12383 break;
12384
12385 case 571:
12386 #line 7142 "parser.y" /* yacc.c:1646 */
12387 {
12388 (yyval.str) = NewString((yyvsp[0].str));
12389 }
12390 #line 12391 "y.tab.c" /* yacc.c:1646 */
12391 break;
12392
12393 case 572:
12394 #line 7145 "parser.y" /* yacc.c:1646 */
12395 {
12396 (yyval.str) = NewStringf("::%s",(yyvsp[0].str));
12397 }
12398 #line 12399 "y.tab.c" /* yacc.c:1646 */
12399 break;
12400
12401 case 573:
12402 #line 7148 "parser.y" /* yacc.c:1646 */
12403 {
12404 (yyval.str) = NewStringf("%s", (yyvsp[0].str));
12405 }
12406 #line 12407 "y.tab.c" /* yacc.c:1646 */
12407 break;
12408
12409 case 574:
12410 #line 7151 "parser.y" /* yacc.c:1646 */
12411 {
12412 (yyval.str) = NewStringf("%s%s", (yyvsp[-1].str), (yyvsp[0].id));
12413 }
12414 #line 12415 "y.tab.c" /* yacc.c:1646 */
12415 break;
12416
12417 case 575:
12418 #line 7154 "parser.y" /* yacc.c:1646 */
12419 {
12420 (yyval.str) = NewStringf("::%s",(yyvsp[0].str));
12421 }
12422 #line 12423 "y.tab.c" /* yacc.c:1646 */
12423 break;
12424
12425 case 576:
12426 #line 7159 "parser.y" /* yacc.c:1646 */
12427 {
12428 (yyval.str) = NewStringf("::%s%s",(yyvsp[-1].str),(yyvsp[0].str));
12429 Delete((yyvsp[0].str));
12430 }
12431 #line 12432 "y.tab.c" /* yacc.c:1646 */
12432 break;
12433
12434 case 577:
12435 #line 7163 "parser.y" /* yacc.c:1646 */
12436 {
12437 (yyval.str) = NewStringf("::%s",(yyvsp[0].str));
12438 }
12439 #line 12440 "y.tab.c" /* yacc.c:1646 */
12440 break;
12441
12442 case 578:
12443 #line 7166 "parser.y" /* yacc.c:1646 */
12444 {
12445 (yyval.str) = NewStringf("::%s",(yyvsp[0].str));
12446 }
12447 #line 12448 "y.tab.c" /* yacc.c:1646 */
12448 break;
12449
12450 case 579:
12451 #line 7173 "parser.y" /* yacc.c:1646 */
12452 {
12453 (yyval.str) = NewStringf("::~%s",(yyvsp[0].str));
12454 }
12455 #line 12456 "y.tab.c" /* yacc.c:1646 */
12456 break;
12457
12458 case 580:
12459 #line 7179 "parser.y" /* yacc.c:1646 */
12460 {
12461 (yyval.str) = NewStringf("%s", (yyvsp[0].id));
12462 }
12463 #line 12464 "y.tab.c" /* yacc.c:1646 */
12464 break;
12465
12466 case 581:
12467 #line 7182 "parser.y" /* yacc.c:1646 */
12468 {
12469 (yyval.str) = NewStringf("%s%s", (yyvsp[-1].id), (yyvsp[0].id));
12470 }
12471 #line 12472 "y.tab.c" /* yacc.c:1646 */
12472 break;
12473
12474 case 582:
12475 #line 7187 "parser.y" /* yacc.c:1646 */
12476 {
12477 (yyval.str) = (yyvsp[0].str);
12478 }
12479 #line 12480 "y.tab.c" /* yacc.c:1646 */
12480 break;
12481
12482 case 583:
12483 #line 7190 "parser.y" /* yacc.c:1646 */
12484 {
12485 (yyval.str) = NewStringf("%s%s", (yyvsp[-1].id), (yyvsp[0].id));
12486 }
12487 #line 12488 "y.tab.c" /* yacc.c:1646 */
12488 break;
12489
12490 case 584:
12491 #line 7196 "parser.y" /* yacc.c:1646 */
12492 {
12493 (yyval.str) = 0;
12494 if (!(yyval.str)) (yyval.str) = NewStringf("%s%s", (yyvsp[-1].id),(yyvsp[0].str));
12495 Delete((yyvsp[0].str));
12496 }
12497 #line 12498 "y.tab.c" /* yacc.c:1646 */
12498 break;
12499
12500 case 585:
12501 #line 7201 "parser.y" /* yacc.c:1646 */
12502 {
12503 (yyval.str) = NewStringf("::%s%s",(yyvsp[-1].id),(yyvsp[0].str));
12504 Delete((yyvsp[0].str));
12505 }
12506 #line 12507 "y.tab.c" /* yacc.c:1646 */
12507 break;
12508
12509 case 586:
12510 #line 7205 "parser.y" /* yacc.c:1646 */
12511 {
12512 (yyval.str) = NewString((yyvsp[0].id));
12513 }
12514 #line 12515 "y.tab.c" /* yacc.c:1646 */
12515 break;
12516
12517 case 587:
12518 #line 7208 "parser.y" /* yacc.c:1646 */
12519 {
12520 (yyval.str) = NewStringf("::%s",(yyvsp[0].id));
12521 }
12522 #line 12523 "y.tab.c" /* yacc.c:1646 */
12523 break;
12524
12525 case 588:
12526 #line 7211 "parser.y" /* yacc.c:1646 */
12527 {
12528 (yyval.str) = NewString((yyvsp[0].str));
12529 }
12530 #line 12531 "y.tab.c" /* yacc.c:1646 */
12531 break;
12532
12533 case 589:
12534 #line 7214 "parser.y" /* yacc.c:1646 */
12535 {
12536 (yyval.str) = NewStringf("::%s",(yyvsp[0].str));
12537 }
12538 #line 12539 "y.tab.c" /* yacc.c:1646 */
12539 break;
12540
12541 case 590:
12542 #line 7219 "parser.y" /* yacc.c:1646 */
12543 {
12544 (yyval.str) = NewStringf("::%s%s",(yyvsp[-1].id),(yyvsp[0].str));
12545 Delete((yyvsp[0].str));
12546 }
12547 #line 12548 "y.tab.c" /* yacc.c:1646 */
12548 break;
12549
12550 case 591:
12551 #line 7223 "parser.y" /* yacc.c:1646 */
12552 {
12553 (yyval.str) = NewStringf("::%s",(yyvsp[0].id));
12554 }
12555 #line 12556 "y.tab.c" /* yacc.c:1646 */
12556 break;
12557
12558 case 592:
12559 #line 7226 "parser.y" /* yacc.c:1646 */
12560 {
12561 (yyval.str) = NewStringf("::%s",(yyvsp[0].str));
12562 }
12563 #line 12564 "y.tab.c" /* yacc.c:1646 */
12564 break;
12565
12566 case 593:
12567 #line 7229 "parser.y" /* yacc.c:1646 */
12568 {
12569 (yyval.str) = NewStringf("::~%s",(yyvsp[0].id));
12570 }
12571 #line 12572 "y.tab.c" /* yacc.c:1646 */
12572 break;
12573
12574 case 594:
12575 #line 7235 "parser.y" /* yacc.c:1646 */
12576 {
12577 (yyval.str) = NewStringf("%s%s", (yyvsp[-1].str), (yyvsp[0].id));
12578 }
12579 #line 12580 "y.tab.c" /* yacc.c:1646 */
12580 break;
12581
12582 case 595:
12583 #line 7238 "parser.y" /* yacc.c:1646 */
12584 { (yyval.str) = NewString((yyvsp[0].id));}
12585 #line 12586 "y.tab.c" /* yacc.c:1646 */
12586 break;
12587
12588 case 596:
12589 #line 7241 "parser.y" /* yacc.c:1646 */
12590 {
12591 (yyval.str) = NewStringf("%s%s", (yyvsp[-1].str), (yyvsp[0].id));
12592 }
12593 #line 12594 "y.tab.c" /* yacc.c:1646 */
12594 break;
12595
12596 case 597:
12597 #line 7249 "parser.y" /* yacc.c:1646 */
12598 { (yyval.str) = NewString((yyvsp[0].id));}
12599 #line 12600 "y.tab.c" /* yacc.c:1646 */
12600 break;
12601
12602 case 598:
12603 #line 7252 "parser.y" /* yacc.c:1646 */
12604 {
12605 (yyval.str) = (yyvsp[0].str);
12606 }
12607 #line 12608 "y.tab.c" /* yacc.c:1646 */
12608 break;
12609
12610 case 599:
12611 #line 7255 "parser.y" /* yacc.c:1646 */
12612 {
12613 skip_balanced('{','}');
12614 (yyval.str) = NewString(scanner_ccode);
12615 }
12616 #line 12617 "y.tab.c" /* yacc.c:1646 */
12617 break;
12618
12619 case 600:
12620 #line 7259 "parser.y" /* yacc.c:1646 */
12621 {
12622 (yyval.str) = (yyvsp[0].str);
12623 }
12624 #line 12625 "y.tab.c" /* yacc.c:1646 */
12625 break;
12626
12627 case 601:
12628 #line 7264 "parser.y" /* yacc.c:1646 */
12629 {
12630 Hash *n;
12631 (yyval.node) = NewHash();
12632 n = (yyvsp[-1].node);
12633 while(n) {
12634 String *name, *value;
12635 name = Getattr(n,"name");
12636 value = Getattr(n,"value");
12637 if (!value) value = (String *) "1";
12638 Setattr((yyval.node),name, value);
12639 n = nextSibling(n);
12640 }
12641 }
12642 #line 12643 "y.tab.c" /* yacc.c:1646 */
12643 break;
12644
12645 case 602:
12646 #line 7277 "parser.y" /* yacc.c:1646 */
12647 { (yyval.node) = 0; }
12648 #line 12649 "y.tab.c" /* yacc.c:1646 */
12649 break;
12650
12651 case 603:
12652 #line 7281 "parser.y" /* yacc.c:1646 */
12653 {
12654 (yyval.node) = NewHash();
12655 Setattr((yyval.node),"name",(yyvsp[-2].id));
12656 Setattr((yyval.node),"value",(yyvsp[0].str));
12657 }
12658 #line 12659 "y.tab.c" /* yacc.c:1646 */
12659 break;
12660
12661 case 604:
12662 #line 7286 "parser.y" /* yacc.c:1646 */
12663 {
12664 (yyval.node) = NewHash();
12665 Setattr((yyval.node),"name",(yyvsp[-4].id));
12666 Setattr((yyval.node),"value",(yyvsp[-2].str));
12667 set_nextSibling((yyval.node),(yyvsp[0].node));
12668 }
12669 #line 12670 "y.tab.c" /* yacc.c:1646 */
12670 break;
12671
12672 case 605:
12673 #line 7292 "parser.y" /* yacc.c:1646 */
12674 {
12675 (yyval.node) = NewHash();
12676 Setattr((yyval.node),"name",(yyvsp[0].id));
12677 }
12678 #line 12679 "y.tab.c" /* yacc.c:1646 */
12679 break;
12680
12681 case 606:
12682 #line 7296 "parser.y" /* yacc.c:1646 */
12683 {
12684 (yyval.node) = NewHash();
12685 Setattr((yyval.node),"name",(yyvsp[-2].id));
12686 set_nextSibling((yyval.node),(yyvsp[0].node));
12687 }
12688 #line 12689 "y.tab.c" /* yacc.c:1646 */
12689 break;
12690
12691 case 607:
12692 #line 7301 "parser.y" /* yacc.c:1646 */
12693 {
12694 (yyval.node) = (yyvsp[0].node);
12695 Setattr((yyval.node),"name",(yyvsp[-2].id));
12696 }
12697 #line 12698 "y.tab.c" /* yacc.c:1646 */
12698 break;
12699
12700 case 608:
12701 #line 7305 "parser.y" /* yacc.c:1646 */
12702 {
12703 (yyval.node) = (yyvsp[-2].node);
12704 Setattr((yyval.node),"name",(yyvsp[-4].id));
12705 set_nextSibling((yyval.node),(yyvsp[0].node));
12706 }
12707 #line 12708 "y.tab.c" /* yacc.c:1646 */
12708 break;
12709
12710 case 609:
12711 #line 7312 "parser.y" /* yacc.c:1646 */
12712 {
12713 (yyval.str) = (yyvsp[0].str);
12714 }
12715 #line 12716 "y.tab.c" /* yacc.c:1646 */
12716 break;
12717
12718 case 610:
12719 #line 7315 "parser.y" /* yacc.c:1646 */
12720 {
12721 (yyval.str) = Char((yyvsp[0].dtype).val);
12722 }
12723 #line 12724 "y.tab.c" /* yacc.c:1646 */
12724 break;
12725
12726
12727 #line 12728 "y.tab.c" /* yacc.c:1646 */
12728 default: break;
12729 }
12730 /* User semantic actions sometimes alter yychar, and that requires
12731 that yytoken be updated with the new translation. We take the
12732 approach of translating immediately before every use of yytoken.
12733 One alternative is translating here after every semantic action,
12734 but that translation would be missed if the semantic action invokes
12735 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
12736 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
12737 incorrect destructor might then be invoked immediately. In the
12738 case of YYERROR or YYBACKUP, subsequent parser actions might lead
12739 to an incorrect destructor call or verbose syntax error message
12740 before the lookahead is translated. */
12741 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
12742
12743 YYPOPSTACK (yylen);
12744 yylen = 0;
12745 YY_STACK_PRINT (yyss, yyssp);
12746
12747 *++yyvsp = yyval;
12748
12749 /* Now 'shift' the result of the reduction. Determine what state
12750 that goes to, based on the state we popped back to and the rule
12751 number reduced by. */
12752
12753 yyn = yyr1[yyn];
12754
12755 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
12756 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
12757 yystate = yytable[yystate];
12758 else
12759 yystate = yydefgoto[yyn - YYNTOKENS];
12760
12761 goto yynewstate;
12762
12763
12764 /*--------------------------------------.
12765 | yyerrlab -- here on detecting error. |
12766 `--------------------------------------*/
12767 yyerrlab:
12768 /* Make sure we have latest lookahead translation. See comments at
12769 user semantic actions for why this is necessary. */
12770 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
12771
12772 /* If not already recovering from an error, report this error. */
12773 if (!yyerrstatus)
12774 {
12775 ++yynerrs;
12776 #if ! YYERROR_VERBOSE
12777 yyerror (YY_("syntax error"));
12778 #else
12779 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
12780 yyssp, yytoken)
12781 {
12782 char const *yymsgp = YY_("syntax error");
12783 int yysyntax_error_status;
12784 yysyntax_error_status = YYSYNTAX_ERROR;
12785 if (yysyntax_error_status == 0)
12786 yymsgp = yymsg;
12787 else if (yysyntax_error_status == 1)
12788 {
12789 if (yymsg != yymsgbuf)
12790 YYSTACK_FREE (yymsg);
12791 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
12792 if (!yymsg)
12793 {
12794 yymsg = yymsgbuf;
12795 yymsg_alloc = sizeof yymsgbuf;
12796 yysyntax_error_status = 2;
12797 }
12798 else
12799 {
12800 yysyntax_error_status = YYSYNTAX_ERROR;
12801 yymsgp = yymsg;
12802 }
12803 }
12804 yyerror (yymsgp);
12805 if (yysyntax_error_status == 2)
12806 goto yyexhaustedlab;
12807 }
12808 # undef YYSYNTAX_ERROR
12809 #endif
12810 }
12811
12812
12813
12814 if (yyerrstatus == 3)
12815 {
12816 /* If just tried and failed to reuse lookahead token after an
12817 error, discard it. */
12818
12819 if (yychar <= YYEOF)
12820 {
12821 /* Return failure if at end of input. */
12822 if (yychar == YYEOF)
12823 YYABORT;
12824 }
12825 else
12826 {
12827 yydestruct ("Error: discarding",
12828 yytoken, &yylval);
12829 yychar = YYEMPTY;
12830 }
12831 }
12832
12833 /* Else will try to reuse lookahead token after shifting the error
12834 token. */
12835 goto yyerrlab1;
12836
12837
12838 /*---------------------------------------------------.
12839 | yyerrorlab -- error raised explicitly by YYERROR. |
12840 `---------------------------------------------------*/
12841 yyerrorlab:
12842
12843 /* Pacify compilers like GCC when the user code never invokes
12844 YYERROR and the label yyerrorlab therefore never appears in user
12845 code. */
12846 if (/*CONSTCOND*/ 0)
12847 goto yyerrorlab;
12848
12849 /* Do not reclaim the symbols of the rule whose action triggered
12850 this YYERROR. */
12851 YYPOPSTACK (yylen);
12852 yylen = 0;
12853 YY_STACK_PRINT (yyss, yyssp);
12854 yystate = *yyssp;
12855 goto yyerrlab1;
12856
12857
12858 /*-------------------------------------------------------------.
12859 | yyerrlab1 -- common code for both syntax error and YYERROR. |
12860 `-------------------------------------------------------------*/
12861 yyerrlab1:
12862 yyerrstatus = 3; /* Each real token shifted decrements this. */
12863
12864 for (;;)
12865 {
12866 yyn = yypact[yystate];
12867 if (!yypact_value_is_default (yyn))
12868 {
12869 yyn += YYTERROR;
12870 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
12871 {
12872 yyn = yytable[yyn];
12873 if (0 < yyn)
12874 break;
12875 }
12876 }
12877
12878 /* Pop the current state because it cannot handle the error token. */
12879 if (yyssp == yyss)
12880 YYABORT;
12881
12882
12883 yydestruct ("Error: popping",
12884 yystos[yystate], yyvsp);
12885 YYPOPSTACK (1);
12886 yystate = *yyssp;
12887 YY_STACK_PRINT (yyss, yyssp);
12888 }
12889
12890 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
12891 *++yyvsp = yylval;
12892 YY_IGNORE_MAYBE_UNINITIALIZED_END
12893
12894
12895 /* Shift the error token. */
12896 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
12897
12898 yystate = yyn;
12899 goto yynewstate;
12900
12901
12902 /*-------------------------------------.
12903 | yyacceptlab -- YYACCEPT comes here. |
12904 `-------------------------------------*/
12905 yyacceptlab:
12906 yyresult = 0;
12907 goto yyreturn;
12908
12909 /*-----------------------------------.
12910 | yyabortlab -- YYABORT comes here. |
12911 `-----------------------------------*/
12912 yyabortlab:
12913 yyresult = 1;
12914 goto yyreturn;
12915
12916 #if !defined yyoverflow || YYERROR_VERBOSE
12917 /*-------------------------------------------------.
12918 | yyexhaustedlab -- memory exhaustion comes here. |
12919 `-------------------------------------------------*/
12920 yyexhaustedlab:
12921 yyerror (YY_("memory exhausted"));
12922 yyresult = 2;
12923 /* Fall through. */
12924 #endif
12925
12926 yyreturn:
12927 if (yychar != YYEMPTY)
12928 {
12929 /* Make sure we have latest lookahead translation. See comments at
12930 user semantic actions for why this is necessary. */
12931 yytoken = YYTRANSLATE (yychar);
12932 yydestruct ("Cleanup: discarding lookahead",
12933 yytoken, &yylval);
12934 }
12935 /* Do not reclaim the symbols of the rule whose action triggered
12936 this YYABORT or YYACCEPT. */
12937 YYPOPSTACK (yylen);
12938 YY_STACK_PRINT (yyss, yyssp);
12939 while (yyssp != yyss)
12940 {
12941 yydestruct ("Cleanup: popping",
12942 yystos[*yyssp], yyvsp);
12943 YYPOPSTACK (1);
12944 }
12945 #ifndef yyoverflow
12946 if (yyss != yyssa)
12947 YYSTACK_FREE (yyss);
12948 #endif
12949 #if YYERROR_VERBOSE
12950 if (yymsg != yymsgbuf)
12951 YYSTACK_FREE (yymsg);
12952 #endif
12953 return yyresult;
12954 }
12955 #line 7322 "parser.y" /* yacc.c:1906 */
12956
12957
Swig_cparse_type(String * s)12958 SwigType *Swig_cparse_type(String *s) {
12959 String *ns;
12960 ns = NewStringf("%s;",s);
12961 Seek(ns,0,SEEK_SET);
12962 scanner_file(ns);
12963 top = 0;
12964 scanner_next_token(PARSETYPE);
12965 yyparse();
12966 /* Printf(stdout,"typeparse: '%s' ---> '%s'\n", s, top); */
12967 return top;
12968 }
12969
12970
Swig_cparse_parm(String * s)12971 Parm *Swig_cparse_parm(String *s) {
12972 String *ns;
12973 ns = NewStringf("%s;",s);
12974 Seek(ns,0,SEEK_SET);
12975 scanner_file(ns);
12976 top = 0;
12977 scanner_next_token(PARSEPARM);
12978 yyparse();
12979 /* Printf(stdout,"typeparse: '%s' ---> '%s'\n", s, top); */
12980 Delete(ns);
12981 return top;
12982 }
12983
12984
Swig_cparse_parms(String * s,Node * file_line_node)12985 ParmList *Swig_cparse_parms(String *s, Node *file_line_node) {
12986 String *ns;
12987 char *cs = Char(s);
12988 if (cs && cs[0] != '(') {
12989 ns = NewStringf("(%s);",s);
12990 } else {
12991 ns = NewStringf("%s;",s);
12992 }
12993 Setfile(ns, Getfile(file_line_node));
12994 Setline(ns, Getline(file_line_node));
12995 Seek(ns,0,SEEK_SET);
12996 scanner_file(ns);
12997 top = 0;
12998 scanner_next_token(PARSEPARMS);
12999 yyparse();
13000 /* Printf(stdout,"typeparse: '%s' ---> '%s'\n", s, top); */
13001 return top;
13002 }
13003
13004