1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
99 TYPE_NON_ISO_INT8 = 288,
100 TYPE_NON_ISO_INT16 = 289,
101 TYPE_NON_ISO_INT32 = 290,
102 TYPE_NON_ISO_INT64 = 291,
160 LESSTHANOREQUALTO = 349,
161 GREATERTHANOREQUALTO = 350,
203 #define CHARCONST 265
205 #define NUM_FLOAT 267
206 #define NUM_UNSIGNED 268
208 #define NUM_ULONG 270
209 #define NUM_LONGLONG 271
210 #define NUM_ULONGLONG 272
213 #define TYPE_UNSIGNED 275
214 #define TYPE_SHORT 276
215 #define TYPE_LONG 277
216 #define TYPE_FLOAT 278
217 #define TYPE_DOUBLE 279
218 #define TYPE_CHAR 280
219 #define TYPE_WCHAR 281
220 #define TYPE_VOID 282
221 #define TYPE_SIGNED 283
222 #define TYPE_BOOL 284
223 #define TYPE_COMPLEX 285
224 #define TYPE_TYPEDEF 286
226 #define TYPE_NON_ISO_INT8 288
227 #define TYPE_NON_ISO_INT16 289
228 #define TYPE_NON_ISO_INT32 290
229 #define TYPE_NON_ISO_INT64 291
239 #define CONST_QUAL 301
263 #define PROTECTED 325
272 #define NAMESPACE 334
280 #define SWIGTEMPLATE 342
284 #define GREATERTHAN 346
286 #define DELETE_KW 348
287 #define LESSTHANOREQUALTO 349
288 #define GREATERTHANOREQUALTO 350
290 #define NOTEQUALTO 352
291 #define QUESTIONMARK 353
299 #define COPERATOR 361
300 #define PARSETYPE 362
301 #define PARSEPARM 363
302 #define PARSEPARMS 364
324 /* Copy the first part of user declarations. */
330 char cvsroot_parser_y[] = "$Id: parser.y 11582 2009-08-15 10:40:19Z wsfulton $";
334 #include "preprocessor.h"
337 /* We do this for portability */
339 #define alloca malloc
341 /* -----------------------------------------------------------------------------
343 * ----------------------------------------------------------------------------- */
349 static Node *top = 0; /* Top of the generated parse tree */
350 static int unnamed = 0; /* Unnamed datatype counter */
351 static Hash *extendhash = 0; /* Hash table of added methods */
352 static Hash *classes = 0; /* Hash table of classes */
353 static Symtab *prev_symtab = 0;
354 static Node *current_class = 0;
355 String *ModuleName = 0;
356 static Node *module_node = 0;
357 static String *Classprefix = 0;
358 static String *Namespaceprefix = 0;
359 static int inclass = 0;
360 static char *last_cpptype = 0;
361 static int inherit_list = 0;
362 static Parm *template_parameters = 0;
363 static int extendmode = 0;
364 static int compact_default_args = 0;
365 static int template_reduce = 0;
366 static int cparse_externc = 0;
368 static int max_class_levels = 0;
369 static int class_level = 0;
370 static Node **class_decl = NULL;
372 /* -----------------------------------------------------------------------------
374 * ----------------------------------------------------------------------------- */
378 /* Called by the parser (yyparse) when an error is found.*/
379 static void yyerror (const char *e) {
383 static Node *new_node(const_String_or_char_ptr tag) {
386 Setfile(n,cparse_file);
387 Setline(n,cparse_line);
391 /* Copies a node. Does not copy tree links or symbol table data (except for
394 static Node *copy_node(Node *n) {
398 Setfile(nn,Getfile(n));
399 Setline(nn,Getline(n));
400 for (k = First(n); k.key; k = Next(k)) {
403 char *ckey = Char(key);
404 if ((strcmp(ckey,"nextSibling") == 0) ||
405 (strcmp(ckey,"previousSibling") == 0) ||
406 (strcmp(ckey,"parentNode") == 0) ||
407 (strcmp(ckey,"lastChild") == 0)) {
410 if (Strncmp(key,"csym:",5) == 0) continue;
411 /* We do copy sym:name. For templates */
412 if ((strcmp(ckey,"sym:name") == 0) ||
413 (strcmp(ckey,"sym:weak") == 0) ||
414 (strcmp(ckey,"sym:typename") == 0)) {
415 String *ci = Copy(k.item);
420 if (strcmp(ckey,"sym:symtab") == 0) {
421 Setattr(nn,"sym:needs_symtab", "1");
423 /* We don't copy any other symbol table attributes */
424 if (strncmp(ckey,"sym:",4) == 0) {
427 /* If children. We copy them recursively using this function */
428 if (strcmp(ckey,"firstChild") == 0) {
432 Node *copy = copy_node(cn);
433 appendChild(nn,copy);
435 cn = nextSibling(cn);
439 /* We don't copy the symbol table. But we drop an attribute
440 requires_symtab so that functions know it needs to be built */
442 if (strcmp(ckey,"symtab") == 0) {
443 /* Node defined a symbol table. */
444 Setattr(nn,"requires_symtab","1");
447 /* Can't copy nodes */
448 if (strcmp(ckey,"node") == 0) {
451 if ((strcmp(ckey,"parms") == 0) || (strcmp(ckey,"pattern") == 0) || (strcmp(ckey,"throws") == 0)
452 || (strcmp(ckey,"kwargs") == 0)) {
453 ParmList *pl = CopyParmList(k.item);
458 /* Looks okay. Just copy the data using Copy */
460 Setattr(nn, key, ci);
466 /* -----------------------------------------------------------------------------
468 * ----------------------------------------------------------------------------- */
470 static char *typemap_lang = 0; /* Current language setting */
472 static int cplus_mode = 0;
473 static String *class_rename = 0;
477 #define CPLUS_PUBLIC 1
478 #define CPLUS_PRIVATE 2
479 #define CPLUS_PROTECTED 3
482 static int import_mode = 0;
484 void SWIG_typemap_lang(const char *tm_lang) {
485 typemap_lang = Swig_copy_string(tm_lang);
488 void SWIG_cparse_set_compact_default_args(int defargs) {
489 compact_default_args = defargs;
492 int SWIG_cparse_template_reduce(int treduce) {
493 template_reduce = treduce;
497 /* -----------------------------------------------------------------------------
499 * ----------------------------------------------------------------------------- */
501 static int promote_type(int t) {
502 if (t <= T_UCHAR || t == T_CHAR) return T_INT;
506 /* Perform type-promotion for binary operators */
507 static int promote(int t1, int t2) {
508 t1 = promote_type(t1);
509 t2 = promote_type(t2);
510 return t1 > t2 ? t1 : t2;
513 static String *yyrename = 0;
515 /* Forward renaming operator */
517 static String *resolve_node_scope(String *cname);
520 Hash *Swig_cparse_features(void) {
521 static Hash *features_hash = 0;
522 if (!features_hash) features_hash = NewHash();
523 return features_hash;
526 static String *feature_identifier_fix(String *s) {
527 if (SwigType_istemplate(s)) {
528 String *tp, *ts, *ta, *tq;
529 tp = SwigType_templateprefix(s);
530 ts = SwigType_templatesuffix(s);
531 ta = SwigType_templateargs(s);
532 tq = Swig_symbol_type_qualify(ta,0);
544 /* Generate the symbol table name for an object */
545 /* This is a bit of a mess. Need to clean up */
546 static String *add_oldname = 0;
550 static String *make_name(Node *n, String *name,SwigType *decl) {
551 int destructor = name && (*(Char(name)) == '~');
554 String *s = NewString(yyrename);
557 if (destructor && (*(Char(s)) != '~')) {
564 return Swig_name_make(n,Namespaceprefix,name,decl,add_oldname);
567 /* Generate an unnamed identifier */
568 static String *make_unnamed() {
570 return NewStringf("$unnamed%d$",unnamed);
573 /* Return if the node is a friend declaration */
574 static int is_friend(Node *n) {
575 return Cmp(Getattr(n,"storage"),"friend") == 0;
578 static int is_operator(String *name) {
579 return Strncmp(name,"operator ", 9) == 0;
583 /* Add declaration list to symbol table */
584 static int add_only_one = 0;
586 static void add_symbols(Node *n) {
590 cparse_normalize_void(n);
594 /* for friends, we need to pop the scope once */
595 String *old_prefix = 0;
596 Symtab *old_scope = 0;
597 int isfriend = inclass && is_friend(n);
598 int iscdecl = Cmp(nodeType(n),"cdecl") == 0;
599 int only_csymbol = 0;
601 Setattr(n,"isextension","1");
605 String *name = Getattr(n, "name");
607 /* for friends, we need to add the scopename if needed */
608 String *prefix = name ? Swig_scopename_prefix(name) : 0;
609 old_prefix = Namespaceprefix;
610 old_scope = Swig_symbol_popscope();
611 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
613 if (name && !is_operator(name) && Namespaceprefix) {
614 String *nname = NewStringf("%s::%s", Namespaceprefix, name);
615 Setattr(n,"name",nname);
619 Symtab *st = Swig_symbol_getscope(prefix);
620 String *ns = st ? Getattr(st,"name") : prefix;
621 String *base = Swig_scopename_last(name);
622 String *nname = NewStringf("%s::%s", ns, base);
623 Setattr(n,"name",nname);
630 /* for member functions, we need to remove the redundant
631 class scope if provided, as in
634 int Foo::method(int a);
638 String *prefix = name ? Swig_scopename_prefix(name) : 0;
640 if (Classprefix && (Equal(prefix,Classprefix))) {
641 String *base = Swig_scopename_last(name);
642 Setattr(n,"name",base);
649 if (!Getattr(n,"parentNode") && class_level) set_parentNode(n,class_decl[class_level - 1]);
651 Setattr(n,"ismember","1");
654 if (!isfriend && inclass) {
655 if ((cplus_mode != CPLUS_PUBLIC)) {
657 if (cplus_mode == CPLUS_PROTECTED) {
658 Setattr(n,"access", "protected");
659 only_csymbol = !Swig_need_protected(n);
661 Setattr(n,"access", "private");
662 /* private are needed only when they are pure virtuals - why? */
663 if ((Cmp(Getattr(n,"storage"),"virtual") == 0) && (Cmp(Getattr(n,"value"),"0") == 0)) {
668 Setattr(n,"access", "public");
671 if (Getattr(n,"sym:name")) {
675 decl = Getattr(n,"decl");
676 if (!SwigType_isfunction(decl)) {
677 String *name = Getattr(n,"name");
678 String *makename = Getattr(n,"parser:makename");
680 String *storage = Getattr(n, "storage");
681 if (Cmp(storage,"typedef") == 0) {
682 Setattr(n,"kind","typedef");
684 SwigType *type = Getattr(n,"type");
685 String *value = Getattr(n,"value");
686 Setattr(n,"kind","variable");
687 if (value && Len(value)) {
688 Setattr(n,"hasvalue","1");
694 ty = tmp = Copy(type);
695 SwigType_push(ty,decl);
699 if (!SwigType_ismutable(ty)) {
700 SetFlag(n,"hasconsttype");
701 SetFlag(n,"feature:immutable");
703 if (tmp) Delete(tmp);
706 Printf(stderr,"notype name %s\n", name);
710 Swig_features_get(Swig_cparse_features(), Namespaceprefix, name, 0, n);
712 symname = make_name(n, makename,0);
713 Delattr(n,"parser:makename"); /* temporary information, don't leave it hanging around */
716 symname = make_name(n, makename,0);
720 symname = Copy(Getattr(n,"unnamed"));
723 wrn = Swig_name_warning(n, Namespaceprefix, symname,0);
726 String *name = Getattr(n,"name");
727 SwigType *fdecl = Copy(decl);
728 SwigType *fun = SwigType_pop_function(fdecl);
730 Setattr(n,"kind","function");
733 Swig_features_get(Swig_cparse_features(),Namespaceprefix,name,fun,n);
735 symname = make_name(n, name,fun);
736 wrn = Swig_name_warning(n, Namespaceprefix,symname,fun);
746 if (only_csymbol || GetFlag(n,"feature:ignore")) {
747 /* Only add to C symbol table and continue */
748 Swig_symbol_add(0, n);
749 } else if (strncmp(Char(symname),"$ignore",7) == 0) {
750 char *c = Char(symname)+7;
751 SetFlag(n,"feature:ignore");
753 SWIG_WARN_NODE_BEGIN(n);
754 Swig_warning(0,Getfile(n), Getline(n), "%s\n",c+1);
755 SWIG_WARN_NODE_END(n);
757 Swig_symbol_add(0, n);
760 if ((wrn) && (Len(wrn))) {
761 String *metaname = symname;
762 if (!Getmeta(metaname,"already_warned")) {
763 SWIG_WARN_NODE_BEGIN(n);
764 Swig_warning(0,Getfile(n),Getline(n), "%s\n", wrn);
765 SWIG_WARN_NODE_END(n);
766 Setmeta(metaname,"already_warned","1");
769 c = Swig_symbol_add(symname,n);
772 /* symbol conflict attempting to add in the new symbol */
773 if (Getattr(n,"sym:weak")) {
774 Setattr(n,"sym:name",symname);
776 String *e = NewStringEmpty();
777 String *en = NewStringEmpty();
778 String *ec = NewStringEmpty();
779 int redefined = Swig_need_redefined_warn(n,c,inclass);
781 Printf(en,"Identifier '%s' redefined (ignored)",symname);
782 Printf(ec,"previous definition of '%s'",symname);
784 Printf(en,"Redundant redeclaration of '%s'",symname);
785 Printf(ec,"previous declaration of '%s'",symname);
787 if (Cmp(symname,Getattr(n,"name"))) {
788 Printf(en," (Renamed from '%s')", SwigType_namestr(Getattr(n,"name")));
791 if (Cmp(symname,Getattr(c,"name"))) {
792 Printf(ec," (Renamed from '%s')", SwigType_namestr(Getattr(c,"name")));
795 SWIG_WARN_NODE_BEGIN(n);
797 Swig_warning(WARN_PARSE_REDEFINED,Getfile(n),Getline(n),"%s\n",en);
798 Swig_warning(WARN_PARSE_REDEFINED,Getfile(c),Getline(c),"%s\n",ec);
799 } else if (!is_friend(n) && !is_friend(c)) {
800 Swig_warning(WARN_PARSE_REDUNDANT,Getfile(n),Getline(n),"%s\n",en);
801 Swig_warning(WARN_PARSE_REDUNDANT,Getfile(c),Getline(c),"%s\n",ec);
803 SWIG_WARN_NODE_END(n);
804 Printf(e,"%s:%d:%s\n%s:%d:%s\n",Getfile(n),Getline(n),en,
805 Getfile(c),Getline(c),ec);
806 Setattr(n,"error",e);
813 /* restore the class scope if needed */
815 Swig_symbol_setscope(old_scope);
817 Delete(Namespaceprefix);
818 Namespaceprefix = old_prefix;
823 if (add_only_one) return;
829 /* add symbols a parse tree node copy */
831 static void add_symbols_copy(Node *n) {
835 char *cnodeType = Char(nodeType(n));
837 if (strcmp(cnodeType,"access") == 0) {
838 String *kind = Getattr(n,"kind");
839 if (Strcmp(kind,"public") == 0) {
840 cplus_mode = CPLUS_PUBLIC;
841 } else if (Strcmp(kind,"private") == 0) {
842 cplus_mode = CPLUS_PRIVATE;
843 } else if (Strcmp(kind,"protected") == 0) {
844 cplus_mode = CPLUS_PROTECTED;
850 add_oldname = Getattr(n,"sym:name");
851 if ((add_oldname) || (Getattr(n,"sym:needs_symtab"))) {
853 DohIncref(add_oldname);
854 /* Disable this, it prevents %rename to work with templates */
855 /* If already renamed, we used that name */
857 if (Strcmp(add_oldname, Getattr(n,"name")) != 0) {
859 yyrename = Copy(add_oldname);
863 Delattr(n,"sym:needs_symtab");
864 Delattr(n,"sym:name");
869 if (Getattr(n,"partialargs")) {
870 Swig_symbol_cadd(Getattr(n,"partialargs"),n);
873 name = Getattr(n,"name");
874 if (Getattr(n,"requires_symtab")) {
875 Swig_symbol_newscope();
876 Swig_symbol_setscopename(name);
877 Delete(Namespaceprefix);
878 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
880 if (strcmp(cnodeType,"class") == 0) {
883 if (Strcmp(Getattr(n,"kind"),"class") == 0) {
884 cplus_mode = CPLUS_PRIVATE;
886 cplus_mode = CPLUS_PUBLIC;
889 if (strcmp(cnodeType,"extend") == 0) {
891 cplus_mode = CPLUS_PUBLIC;
893 add_symbols_copy(firstChild(n));
894 if (strcmp(cnodeType,"extend") == 0) {
897 if (Getattr(n,"requires_symtab")) {
898 Setattr(n,"symtab", Swig_symbol_popscope());
899 Delattr(n,"requires_symtab");
900 Delete(Namespaceprefix);
901 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
907 if (strcmp(cnodeType,"class") == 0) {
912 if (strcmp(cnodeType,"extend") == 0) {
914 cplus_mode = CPLUS_PUBLIC;
916 add_symbols_copy(firstChild(n));
917 if (strcmp(cnodeType,"extend") == 0) {
925 /* Extension merge. This function is used to handle the %extend directive
926 when it appears before a class definition. To handle this, the %extend
927 actually needs to take precedence. Therefore, we will selectively nuke symbols
928 from the current symbol table, replacing them with the added methods */
930 static void merge_extensions(Node *cls, Node *am) {
937 if (Strcmp(nodeType(n),"constructor") == 0) {
938 symname = Getattr(n,"sym:name");
940 if (Strcmp(symname,Getattr(n,"name")) == 0) {
941 /* If the name and the sym:name of a constructor are the same,
942 then it hasn't been renamed. However---the name of the class
943 itself might have been renamed so we need to do a consistency
945 if (Getattr(cls,"sym:name")) {
946 Setattr(n,"sym:name", Getattr(cls,"sym:name"));
952 symname = Getattr(n,"sym:name");
954 if ((symname) && (!Getattr(n,"error"))) {
955 /* Remove node from its symbol table */
956 Swig_symbol_remove(n);
957 csym = Swig_symbol_add(symname,n);
959 /* Conflict with previous definition. Nuke previous definition */
960 String *e = NewStringEmpty();
961 String *en = NewStringEmpty();
962 String *ec = NewStringEmpty();
963 Printf(ec,"Identifier '%s' redefined by %%extend (ignored),",symname);
964 Printf(en,"%%extend definition of '%s'.",symname);
965 SWIG_WARN_NODE_BEGIN(n);
966 Swig_warning(WARN_PARSE_REDEFINED,Getfile(csym),Getline(csym),"%s\n",ec);
967 Swig_warning(WARN_PARSE_REDEFINED,Getfile(n),Getline(n),"%s\n",en);
968 SWIG_WARN_NODE_END(n);
969 Printf(e,"%s:%d:%s\n%s:%d:%s\n",Getfile(csym),Getline(csym),ec,
970 Getfile(n),Getline(n),en);
971 Setattr(csym,"error",e);
975 Swig_symbol_remove(csym); /* Remove class definition */
976 Swig_symbol_add(symname,n); /* Insert extend definition */
983 static void append_previous_extension(Node *cls, Node *am) {
993 set_nextSibling(n,0);
994 /* typemaps and fragments need to be prepended */
995 if (((Cmp(nodeType(n),"typemap") == 0) || (Cmp(nodeType(n),"fragment") == 0))) {
996 if (!pe) pe = new_node("extend");
999 if (!ae) ae = new_node("extend");
1004 if (pe) prependChild(cls,pe);
1005 if (ae) appendChild(cls,ae);
1009 /* Check for unused %extend. Special case, don't report unused
1010 extensions for templates */
1012 static void check_extensions() {
1015 if (!extendhash) return;
1016 for (ki = First(extendhash); ki.key; ki = Next(ki)) {
1017 if (!Strchr(ki.key,'<')) {
1018 SWIG_WARN_NODE_BEGIN(ki.item);
1019 Swig_warning(WARN_PARSE_EXTEND_UNDEF,Getfile(ki.item), Getline(ki.item), "%%extend defined for an undeclared class %s.\n", ki.key);
1020 SWIG_WARN_NODE_END(ki.item);
1025 /* Check a set of declarations to see if any are pure-abstract */
1027 static List *pure_abstract(Node *n) {
1030 if (Cmp(nodeType(n),"cdecl") == 0) {
1031 String *decl = Getattr(n,"decl");
1032 if (SwigType_isfunction(decl)) {
1033 String *init = Getattr(n,"value");
1034 if (Cmp(init,"0") == 0) {
1039 Setattr(n,"abstract","1");
1042 } else if (Cmp(nodeType(n),"destructor") == 0) {
1043 if (Cmp(Getattr(n,"value"),"0") == 0) {
1048 Setattr(n,"abstract","1");
1056 /* Make a classname */
1058 static String *make_class_name(String *name) {
1060 if (Namespaceprefix) {
1061 nname= NewStringf("%s::%s", Namespaceprefix, name);
1063 nname = NewString(name);
1065 if (SwigType_istemplate(nname)) {
1066 String *prefix, *args, *qargs;
1067 prefix = SwigType_templateprefix(nname);
1068 args = SwigType_templateargs(nname);
1069 qargs = Swig_symbol_type_qualify(args,0);
1070 Append(prefix,qargs);
1079 static List *make_inherit_list(String *clsname, List *names) {
1082 List *bases = NewList();
1084 if (Namespaceprefix) derived = NewStringf("%s::%s", Namespaceprefix,clsname);
1085 else derived = NewString(clsname);
1088 for (i = 0; i < ilen; i++) {
1091 String *n = Getitem(names,i);
1092 /* Try to figure out where this symbol is */
1093 s = Swig_symbol_clookup(n,0);
1095 while (s && (Strcmp(nodeType(s),"class") != 0)) {
1096 /* Not a class. Could be a typedef though. */
1097 String *storage = Getattr(s,"storage");
1098 if (storage && (Strcmp(storage,"typedef") == 0)) {
1099 String *nn = Getattr(s,"type");
1100 s = Swig_symbol_clookup(nn,Getattr(s,"sym:symtab"));
1105 if (s && ((Strcmp(nodeType(s),"class") == 0) || (Strcmp(nodeType(s),"template") == 0))) {
1106 String *q = Swig_symbol_qualified(s);
1109 base = NewStringf("%s::%s", q, Getattr(s,"name"));
1112 base = NewString(Getattr(s,"name"));
1115 base = NewString(n);
1118 base = NewString(n);
1121 Swig_name_inherit(base,derived);
1128 /* If the class name is qualified. We need to create or lookup namespace entries */
1130 static Symtab *get_global_scope() {
1131 Symtab *symtab = Swig_symbol_current();
1132 Node *pn = parentNode(symtab);
1135 pn = parentNode(symtab);
1138 Swig_symbol_setscope(symtab);
1142 /* Remove the block braces, { and }, if the 'noblock' attribute is set.
1143 * Node *kw can be either a Hash or Parmlist. */
1144 static String *remove_block(Node *kw, const String *inputcode) {
1145 String *modified_code = 0;
1147 String *name = Getattr(kw,"name");
1148 if (name && (Cmp(name,"noblock") == 0)) {
1149 char *cstr = Char(inputcode);
1150 size_t len = Len(inputcode);
1151 if (len && cstr[0] == '{') {
1153 if (len && cstr[len - 1] == '}') { --len; }
1154 /* we now remove the extra spaces */
1155 while (len && isspace((int)cstr[0])) { --len; ++cstr; }
1156 while (len && isspace((int)cstr[len - 1])) { --len; }
1157 modified_code = NewStringWithSize(cstr, len);
1161 kw = nextSibling(kw);
1163 return modified_code;
1167 static Node *nscope = 0;
1168 static Node *nscope_inner = 0;
1169 static String *resolve_node_scope(String *cname) {
1173 if (Swig_scopename_check(cname)) {
1175 String *prefix = Swig_scopename_prefix(cname);
1176 String *base = Swig_scopename_last(cname);
1177 if (prefix && (Strncmp(prefix,"::",2) == 0)) {
1178 /* Use the global scope */
1179 String *nprefix = NewString(Char(prefix)+2);
1182 gscope = get_global_scope();
1184 if (!prefix || (Len(prefix) == 0)) {
1185 /* Use the global scope, but we need to add a 'global' namespace. */
1186 if (!gscope) gscope = get_global_scope();
1187 /* note that this namespace is not the "unnamed" one,
1188 and we don't use Setattr(nscope,"name", ""),
1189 because the unnamed namespace is private */
1190 nscope = new_node("namespace");
1191 Setattr(nscope,"symtab", gscope);;
1192 nscope_inner = nscope;
1195 /* Try to locate the scope */
1196 ns = Swig_symbol_clookup(prefix,0);
1198 Swig_error(cparse_file,cparse_line,"Undefined scope '%s'\n", prefix);
1200 Symtab *nstab = Getattr(ns,"symtab");
1202 Swig_error(cparse_file,cparse_line,
1203 "'%s' is not defined as a valid scope.\n", prefix);
1206 /* Check if the node scope is the current scope */
1207 String *tname = Swig_symbol_qualifiedscopename(0);
1208 String *nname = Swig_symbol_qualifiedscopename(nstab);
1209 if (tname && (Strcmp(tname,nname) == 0)) {
1217 /* we will try to create a new node using the namespaces we
1218 can find in the scope name */
1222 String *name = NewString(prefix);
1225 String *base = Swig_scopename_last(name);
1226 String *tprefix = Swig_scopename_prefix(name);
1227 Insert(scopes,0,base);
1232 for (si = First(scopes); si.item; si = Next(si)) {
1235 ns1 = Swig_symbol_clookup(sname,0);
1237 if (Strcmp(nodeType(ns1),"namespace") == 0) {
1238 if (Getattr(ns1,"alias")) {
1239 ns1 = Getattr(ns1,"namespace");
1242 /* now this last part is a class */
1244 ns1 = Swig_symbol_clookup(sname,0);
1245 /* or a nested class tree, which is unrolled here */
1246 for (; si.item; si = Next(si)) {
1248 Printf(sname,"::%s",si.item);
1251 /* we get the 'inner' class */
1252 nscope_inner = Swig_symbol_clookup(sname,0);
1253 /* set the scope to the inner class */
1254 Swig_symbol_setscope(Getattr(nscope_inner,"symtab"));
1255 /* save the last namespace prefix */
1256 Delete(Namespaceprefix);
1257 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
1258 /* and return the node name, including the inner class prefix */
1261 /* here we just populate the namespace tree as usual */
1262 ns2 = new_node("namespace");
1263 Setattr(ns2,"name",sname);
1264 Setattr(ns2,"symtab", Getattr(ns1,"symtab"));
1266 Swig_symbol_setscope(Getattr(ns1,"symtab"));
1267 Delete(Namespaceprefix);
1268 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
1270 if (Getattr(nscope_inner,"symtab") != Getattr(ns2,"symtab")) {
1271 appendChild(nscope_inner,ns2);
1276 if (!nscope) nscope = ns2;
1291 /* Structures for handling code fragments built for nested classes */
1293 typedef struct Nested {
1294 String *code; /* Associated code fragment */
1295 int line; /* line number where it starts */
1296 char *name; /* Name associated with this nested class */
1297 char *kind; /* Kind of class */
1298 int unnamed; /* unnamed class */
1299 SwigType *type; /* Datatype associated with the name */
1300 struct Nested *next; /* Next code fragment in list */
1303 /* Some internal variables for saving nested class information */
1305 static Nested *nested_list = 0;
1307 /* Add a function to the nested list */
1309 static void add_nested(Nested *n) {
1311 if (!nested_list) nested_list = n;
1314 while (n1->next) n1 = n1->next;
1319 /* Strips C-style and C++-style comments from string in-place. */
1320 static void strip_comments(char *string) {
1322 * 0 - not in comment
1323 * 1 - in c-style comment
1324 * 2 - in c++-style comment
1326 * 4 - after reading / not in comments
1327 * 5 - after reading * in c-style comments
1328 * 6 - after reading \ in strings
1353 else if (*c == '\\')
1361 } else if (*c == '*') {
1383 /* Dump all of the nested class declarations to the inline processor
1384 * However. We need to do a few name replacements and other munging
1385 * first. This function must be called before closing a class! */
1387 static Node *dump_nested(const char *parent) {
1398 /* Token replace the name of the parent class */
1399 Replace(n->code, "$classname", parent, DOH_REPLACE_ANY);
1401 /* Fix up the name of the datatype (for building typedefs and other stuff) */
1402 Append(n->type,parent);
1403 Append(n->type,"_");
1404 Append(n->type,n->name);
1406 /* Add the appropriate declaration to the C++ processor */
1407 retx = new_node("cdecl");
1408 Setattr(retx,"name",n->name);
1410 Setattr(retx,"type",nt);
1412 Setattr(retx,"nested",parent);
1414 Setattr(retx,"unnamed","1");
1419 set_nextSibling(retx,ret);
1424 /* Insert a forward class declaration */
1425 /* Disabled: [ 597599 ] union in class: incorrect scope
1426 retx = new_node("classforward");
1427 Setattr(retx,"kind",n->kind);
1428 Setattr(retx,"name",Copy(n->type));
1429 Setattr(retx,"sym:name", make_name(n->type,0));
1430 set_nextSibling(retx,ret);
1434 /* Strip comments - further code may break in presence of comments. */
1435 strip_comments(Char(n->code));
1437 /* Make all SWIG created typedef structs/unions/classes unnamed else
1438 redefinition errors occur - nasty hack alert.*/
1441 const char* types_array[3] = {"struct", "union", "class"};
1443 for (i=0; i<3; i++) {
1444 char* code_ptr = Char(n->code);
1446 /* Replace struct name (as in 'struct name {...}' ) with whitespace
1447 name will be between struct and opening brace */
1449 code_ptr = strstr(code_ptr, types_array[i]);
1451 char *open_bracket_pos;
1452 code_ptr += strlen(types_array[i]);
1453 open_bracket_pos = strchr(code_ptr, '{');
1454 if (open_bracket_pos) {
1455 /* Make sure we don't have something like struct A a; */
1456 char* semi_colon_pos = strchr(code_ptr, ';');
1457 if (!(semi_colon_pos && (semi_colon_pos < open_bracket_pos)))
1458 while (code_ptr < open_bracket_pos)
1467 /* Remove SWIG directive %constant which may be left in the SWIG created typedefs */
1468 char* code_ptr = Char(n->code);
1470 code_ptr = strstr(code_ptr, "%constant");
1472 char* directive_end_pos = strchr(code_ptr, ';');
1473 if (directive_end_pos) {
1474 while (code_ptr <= directive_end_pos)
1481 Node *head = new_node("insert");
1482 String *code = NewStringf("\n%s\n",n->code);
1483 Setattr(head,"code", code);
1485 set_nextSibling(head,ret);
1490 /* Dump the code to the scanner */
1491 start_inline(Char(n->code),n->line);
1502 Node *Swig_cparse(File *f) {
1509 static void single_new_feature(const char *featurename, String *val, Hash *featureattribs, char *declaratorid, SwigType *type, ParmList *declaratorparms, String *qualifier) {
1513 SwigType *t = Copy(type);
1515 /* Printf(stdout, "single_new_feature: [%s] [%s] [%s] [%s] [%s] [%s]\n", featurename, val, declaratorid, t, ParmList_str_defaultargs(declaratorparms), qualifier); */
1517 fname = NewStringf("feature:%s",featurename);
1519 fixname = feature_identifier_fix(declaratorid);
1521 fixname = NewStringEmpty();
1523 if (Namespaceprefix) {
1524 name = NewStringf("%s::%s",Namespaceprefix, fixname);
1529 if (declaratorparms) Setmeta(val,"parms",declaratorparms);
1532 if (qualifier) SwigType_push(t,qualifier);
1533 if (SwigType_isfunction(t)) {
1534 SwigType *decl = SwigType_pop_function(t);
1535 if (SwigType_ispointer(t)) {
1536 String *nname = NewStringf("*%s",name);
1537 Swig_feature_set(Swig_cparse_features(), nname, decl, fname, val, featureattribs);
1540 Swig_feature_set(Swig_cparse_features(), name, decl, fname, val, featureattribs);
1543 } else if (SwigType_ispointer(t)) {
1544 String *nname = NewStringf("*%s",name);
1545 Swig_feature_set(Swig_cparse_features(),nname,0,fname,val, featureattribs);
1549 /* Global feature, that is, feature not associated with any particular symbol */
1550 Swig_feature_set(Swig_cparse_features(),name,0,fname,val, featureattribs);
1556 /* Add a new feature to the Hash. Additional features are added if the feature has a parameter list (declaratorparms)
1557 * and one or more of the parameters have a default argument. An extra feature is added for each defaulted parameter,
1558 * simulating the equivalent overloaded method. */
1559 static void new_feature(const char *featurename, String *val, Hash *featureattribs, char *declaratorid, SwigType *type, ParmList *declaratorparms, String *qualifier) {
1561 ParmList *declparms = declaratorparms;
1563 /* remove the { and } braces if the noblock attribute is set */
1564 String *newval = remove_block(featureattribs, val);
1565 val = newval ? newval : val;
1567 /* Add the feature */
1568 single_new_feature(featurename, val, featureattribs, declaratorid, type, declaratorparms, qualifier);
1570 /* Add extra features if there are default parameters in the parameter list */
1573 if (ParmList_has_defaultargs(declparms)) {
1575 /* Create a parameter list for the new feature by copying all
1576 but the last (defaulted) parameter */
1577 ParmList* newparms = CopyParmListMax(declparms, ParmList_len(declparms)-1);
1579 /* Create new declaration - with the last parameter removed */
1580 SwigType *newtype = Copy(type);
1581 Delete(SwigType_pop_function(newtype)); /* remove the old parameter list from newtype */
1582 SwigType_add_function(newtype,newparms);
1584 single_new_feature(featurename, Copy(val), featureattribs, declaratorid, newtype, newparms, qualifier);
1585 declparms = newparms;
1593 /* check if a function declaration is a plain C object */
1594 static int is_cfunction(Node *n) {
1595 if (!cparse_cplusplus || cparse_externc) return 1;
1596 if (Cmp(Getattr(n,"storage"),"externc") == 0) {
1602 /* If the Node is a function with parameters, check to see if any of the parameters
1603 * have default arguments. If so create a new function for each defaulted argument.
1604 * The additional functions form a linked list of nodes with the head being the original Node n. */
1605 static void default_arguments(Node *n) {
1609 ParmList *varargs = Getattr(function,"feature:varargs");
1611 /* Handles the %varargs directive by looking for "feature:varargs" and
1612 * substituting ... with an alternative set of arguments. */
1613 Parm *p = Getattr(function,"parms");
1616 SwigType *t = Getattr(p,"type");
1617 if (Strcmp(t,"v(...)") == 0) {
1619 ParmList *cv = Copy(varargs);
1620 set_nextSibling(pp,cv);
1623 ParmList *cv = Copy(varargs);
1624 Setattr(function,"parms", cv);
1634 /* Do not add in functions if kwargs is being used or if user wants old default argument wrapping
1635 (one wrapped method per function irrespective of number of default arguments) */
1636 if (compact_default_args
1637 || is_cfunction(function)
1638 || GetFlag(function,"feature:compactdefaultargs")
1639 || GetFlag(function,"feature:kwargs")) {
1640 ParmList *p = Getattr(function,"parms");
1642 Setattr(p,"compactdefargs", "1"); /* mark parameters for special handling */
1643 function = 0; /* don't add in extra methods */
1648 ParmList *parms = Getattr(function,"parms");
1649 if (ParmList_has_defaultargs(parms)) {
1651 /* Create a parameter list for the new function by copying all
1652 but the last (defaulted) parameter */
1653 ParmList* newparms = CopyParmListMax(parms,ParmList_len(parms)-1);
1655 /* Create new function and add to symbol table */
1657 SwigType *ntype = Copy(nodeType(function));
1658 char *cntype = Char(ntype);
1659 Node *new_function = new_node(ntype);
1660 SwigType *decl = Copy(Getattr(function,"decl"));
1661 int constqualifier = SwigType_isconst(decl);
1662 String *ccode = Copy(Getattr(function,"code"));
1663 String *cstorage = Copy(Getattr(function,"storage"));
1664 String *cvalue = Copy(Getattr(function,"value"));
1665 SwigType *ctype = Copy(Getattr(function,"type"));
1666 String *cthrow = Copy(Getattr(function,"throw"));
1668 Delete(SwigType_pop_function(decl)); /* remove the old parameter list from decl */
1669 SwigType_add_function(decl,newparms);
1671 SwigType_add_qualifier(decl,"const");
1673 Setattr(new_function,"name", Getattr(function,"name"));
1674 Setattr(new_function,"code", ccode);
1675 Setattr(new_function,"decl", decl);
1676 Setattr(new_function,"parms", newparms);
1677 Setattr(new_function,"storage", cstorage);
1678 Setattr(new_function,"value", cvalue);
1679 Setattr(new_function,"type", ctype);
1680 Setattr(new_function,"throw", cthrow);
1690 Node *throws = Getattr(function,"throws");
1691 ParmList *pl = CopyParmList(throws);
1692 if (throws) Setattr(new_function,"throws",pl);
1696 /* copy specific attributes for global (or in a namespace) template functions - these are not templated class methods */
1697 if (strcmp(cntype,"template") == 0) {
1698 Node *templatetype = Getattr(function,"templatetype");
1699 Node *symtypename = Getattr(function,"sym:typename");
1700 Parm *templateparms = Getattr(function,"templateparms");
1702 Node *tmp = Copy(templatetype);
1703 Setattr(new_function,"templatetype",tmp);
1707 Node *tmp = Copy(symtypename);
1708 Setattr(new_function,"sym:typename",tmp);
1711 if (templateparms) {
1712 Parm *tmp = CopyParmList(templateparms);
1713 Setattr(new_function,"templateparms",tmp);
1716 } else if (strcmp(cntype,"constructor") == 0) {
1717 /* only copied for constructors as this is not a user defined feature - it is hard coded in the parser */
1718 if (GetFlag(function,"feature:new")) SetFlag(new_function,"feature:new");
1721 add_symbols(new_function);
1722 /* mark added functions as ones with overloaded parameters and point to the parsed method */
1723 Setattr(new_function,"defaultargs", n);
1725 /* Point to the new function, extending the linked list */
1726 set_nextSibling(function, new_function);
1727 Delete(new_function);
1728 function = new_function;
1738 /* -----------------------------------------------------------------------------
1741 * Used by the parser to mark subtypes with extra information.
1742 * ----------------------------------------------------------------------------- */
1744 static void tag_nodes(Node *n, const_String_or_char_ptr attrname, DOH *value) {
1746 Setattr(n, attrname, value);
1747 tag_nodes(firstChild(n), attrname, value);
1754 /* Enabling traces. */
1759 /* Enabling verbose error messages. */
1760 #ifdef YYERROR_VERBOSE
1761 # undef YYERROR_VERBOSE
1762 # define YYERROR_VERBOSE 1
1764 # define YYERROR_VERBOSE 0
1767 /* Enabling the token table. */
1768 #ifndef YYTOKEN_TABLE
1769 # define YYTOKEN_TABLE 0
1772 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1773 typedef union YYSTYPE
1774 #line 1440 "parser.y"
1817 /* Line 187 of yacc.c. */
1818 #line 1819 "y.tab.c"
1820 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
1821 # define YYSTYPE_IS_DECLARED 1
1822 # define YYSTYPE_IS_TRIVIAL 1
1827 /* Copy the second part of user declarations. */
1830 /* Line 216 of yacc.c. */
1831 #line 1832 "y.tab.c"
1838 typedef YYTYPE_UINT8 yytype_uint8;
1840 typedef unsigned char yytype_uint8;
1844 typedef YYTYPE_INT8 yytype_int8;
1845 #elif (defined __STDC__ || defined __C99__FUNC__ \
1846 || defined __cplusplus || defined _MSC_VER)
1847 typedef signed char yytype_int8;
1849 typedef short int yytype_int8;
1852 #ifdef YYTYPE_UINT16
1853 typedef YYTYPE_UINT16 yytype_uint16;
1855 typedef unsigned short int yytype_uint16;
1859 typedef YYTYPE_INT16 yytype_int16;
1861 typedef short int yytype_int16;
1865 # ifdef __SIZE_TYPE__
1866 # define YYSIZE_T __SIZE_TYPE__
1867 # elif defined size_t
1868 # define YYSIZE_T size_t
1869 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1870 || defined __cplusplus || defined _MSC_VER)
1871 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1872 # define YYSIZE_T size_t
1874 # define YYSIZE_T unsigned int
1878 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1883 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1884 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1888 # define YY_(msgid) msgid
1892 /* Suppress unused-variable warnings by "using" E. */
1893 #if ! defined lint || defined __GNUC__
1894 # define YYUSE(e) ((void) (e))
1896 # define YYUSE(e) /* empty */
1899 /* Identity function, used to suppress warnings about constant conditions. */
1901 # define YYID(n) (n)
1903 #if (defined __STDC__ || defined __C99__FUNC__ \
1904 || defined __cplusplus || defined _MSC_VER)
1917 #if ! defined yyoverflow || YYERROR_VERBOSE
1919 /* The parser invokes alloca or malloc; define the necessary symbols. */
1921 # ifdef YYSTACK_USE_ALLOCA
1922 # if YYSTACK_USE_ALLOCA
1924 # define YYSTACK_ALLOC __builtin_alloca
1925 # elif defined __BUILTIN_VA_ARG_INCR
1926 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1928 # define YYSTACK_ALLOC __alloca
1929 # elif defined _MSC_VER
1930 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1931 # define alloca _alloca
1933 # define YYSTACK_ALLOC alloca
1934 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1935 || defined __cplusplus || defined _MSC_VER)
1936 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1938 # define _STDLIB_H 1
1945 # ifdef YYSTACK_ALLOC
1946 /* Pacify GCC's `empty if-body' warning. */
1947 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1948 # ifndef YYSTACK_ALLOC_MAXIMUM
1949 /* The OS might guarantee only one guard page at the bottom of the stack,
1950 and a page size can be as small as 4096 bytes. So we cannot safely
1951 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1952 to allow for a few compiler-allocated temporary stack slots. */
1953 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1956 # define YYSTACK_ALLOC YYMALLOC
1957 # define YYSTACK_FREE YYFREE
1958 # ifndef YYSTACK_ALLOC_MAXIMUM
1959 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1961 # if (defined __cplusplus && ! defined _STDLIB_H \
1962 && ! ((defined YYMALLOC || defined malloc) \
1963 && (defined YYFREE || defined free)))
1964 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1966 # define _STDLIB_H 1
1970 # define YYMALLOC malloc
1971 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1972 || defined __cplusplus || defined _MSC_VER)
1973 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1977 # define YYFREE free
1978 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1979 || defined __cplusplus || defined _MSC_VER)
1980 void free (void *); /* INFRINGES ON USER NAME SPACE */
1984 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1987 #if (! defined yyoverflow \
1988 && (! defined __cplusplus \
1989 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1991 /* A type that is properly aligned for any stack member. */
1998 /* The size of the maximum gap between one aligned stack and the next. */
1999 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
2001 /* The size of an array large to enough to hold all stacks, each with
2003 # define YYSTACK_BYTES(N) \
2004 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
2005 + YYSTACK_GAP_MAXIMUM)
2007 /* Copy COUNT objects from FROM to TO. The source and destination do
2010 # if defined __GNUC__ && 1 < __GNUC__
2011 # define YYCOPY(To, From, Count) \
2012 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
2014 # define YYCOPY(To, From, Count) \
2018 for (yyi = 0; yyi < (Count); yyi++) \
2019 (To)[yyi] = (From)[yyi]; \
2025 /* Relocate STACK from its old location to the new one. The
2026 local variables YYSIZE and YYSTACKSIZE give the old and new number of
2027 elements in the stack, and YYPTR gives the new location of the
2028 stack. Advance YYPTR to a properly aligned location for the next
2030 # define YYSTACK_RELOCATE(Stack) \
2033 YYSIZE_T yynewbytes; \
2034 YYCOPY (&yyptr->Stack, Stack, yysize); \
2035 Stack = &yyptr->Stack; \
2036 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
2037 yyptr += yynewbytes / sizeof (*yyptr); \
2043 /* YYFINAL -- State number of the termination state. */
2045 /* YYLAST -- Last index in YYTABLE. */
2048 /* YYNTOKENS -- Number of terminals. */
2049 #define YYNTOKENS 127
2050 /* YYNNTS -- Number of nonterminals. */
2052 /* YYNRULES -- Number of rules. */
2053 #define YYNRULES 467
2054 /* YYNRULES -- Number of states. */
2055 #define YYNSTATES 904
2057 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
2058 #define YYUNDEFTOK 2
2059 #define YYMAXUTOK 381
2061 #define YYTRANSLATE(YYX) \
2062 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
2064 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
2065 static const yytype_uint8 yytranslate[] =
2067 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2068 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2069 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2070 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2071 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2072 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2073 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2074 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2075 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2076 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2077 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2078 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2079 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2080 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2081 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2082 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2083 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2084 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2085 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2086 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2087 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2088 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2089 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2090 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2091 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2092 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
2093 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
2094 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
2095 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
2096 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
2097 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
2098 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
2099 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
2100 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
2101 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
2102 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
2103 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
2104 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
2109 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
2111 static const yytype_uint16 yyprhs[] =
2113 0, 0, 3, 5, 9, 12, 16, 19, 25, 29,
2114 32, 34, 36, 38, 40, 42, 44, 46, 49, 51,
2115 53, 55, 57, 59, 61, 63, 65, 67, 69, 71,
2116 73, 75, 77, 79, 81, 83, 85, 87, 89, 91,
2117 92, 100, 106, 110, 116, 122, 126, 129, 132, 138,
2118 141, 147, 150, 155, 157, 159, 167, 175, 181, 182,
2119 190, 192, 194, 197, 200, 202, 208, 214, 220, 224,
2120 229, 233, 241, 250, 256, 260, 262, 264, 268, 270,
2121 275, 283, 290, 292, 294, 302, 312, 321, 332, 338,
2122 346, 353, 362, 364, 366, 372, 377, 383, 391, 393,
2123 397, 404, 411, 420, 422, 425, 429, 431, 434, 438,
2124 445, 451, 461, 464, 466, 468, 470, 471, 478, 484,
2125 486, 491, 493, 495, 498, 504, 511, 516, 524, 533,
2126 540, 542, 544, 546, 548, 550, 552, 553, 563, 564,
2127 573, 575, 578, 583, 584, 591, 595, 597, 599, 601,
2128 603, 605, 607, 609, 612, 614, 616, 618, 622, 624,
2129 628, 633, 634, 641, 642, 648, 654, 657, 658, 665,
2130 667, 669, 670, 674, 676, 678, 680, 682, 684, 686,
2131 688, 690, 694, 696, 698, 700, 702, 704, 706, 708,
2132 710, 712, 719, 726, 734, 743, 752, 760, 766, 769,
2133 772, 775, 776, 784, 785, 792, 793, 802, 804, 806,
2134 808, 810, 812, 814, 816, 818, 820, 822, 824, 826,
2135 828, 831, 834, 837, 842, 845, 851, 853, 856, 858,
2136 860, 862, 864, 866, 868, 870, 873, 875, 879, 881,
2137 884, 892, 896, 898, 901, 903, 907, 909, 911, 913,
2138 916, 922, 925, 928, 930, 933, 936, 938, 940, 942,
2139 944, 947, 951, 953, 956, 960, 965, 971, 976, 978,
2140 981, 985, 990, 996, 1000, 1005, 1010, 1012, 1015, 1020,
2141 1025, 1031, 1035, 1040, 1045, 1047, 1050, 1053, 1057, 1059,
2142 1062, 1064, 1067, 1071, 1076, 1080, 1085, 1088, 1092, 1096,
2143 1101, 1105, 1109, 1112, 1115, 1117, 1119, 1122, 1124, 1126,
2144 1128, 1130, 1133, 1135, 1138, 1142, 1144, 1146, 1148, 1151,
2145 1154, 1156, 1158, 1161, 1163, 1165, 1168, 1170, 1172, 1174,
2146 1176, 1178, 1180, 1182, 1184, 1186, 1188, 1190, 1192, 1194,
2147 1196, 1197, 1200, 1202, 1204, 1208, 1210, 1212, 1216, 1218,
2148 1220, 1222, 1224, 1226, 1228, 1234, 1236, 1238, 1242, 1247,
2149 1253, 1259, 1266, 1269, 1272, 1274, 1276, 1278, 1280, 1282,
2150 1284, 1286, 1290, 1294, 1298, 1302, 1306, 1310, 1314, 1318,
2151 1322, 1326, 1330, 1334, 1338, 1342, 1346, 1350, 1356, 1359,
2152 1362, 1365, 1368, 1371, 1373, 1374, 1378, 1380, 1382, 1386,
2153 1389, 1394, 1396, 1398, 1400, 1402, 1404, 1406, 1408, 1410,
2154 1412, 1414, 1416, 1421, 1427, 1429, 1433, 1437, 1442, 1447,
2155 1451, 1454, 1456, 1458, 1462, 1465, 1469, 1471, 1473, 1475,
2156 1477, 1479, 1482, 1487, 1489, 1493, 1495, 1499, 1503, 1506,
2157 1509, 1512, 1515, 1518, 1523, 1525, 1529, 1531, 1535, 1539,
2158 1542, 1545, 1548, 1551, 1553, 1555, 1557, 1559, 1563, 1565,
2159 1569, 1575, 1577, 1581, 1585, 1591, 1593, 1595
2162 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
2163 static const yytype_int16 yyrhs[] =
2165 128, 0, -1, 129, -1, 107, 215, 40, -1, 107,
2166 1, -1, 108, 215, 40, -1, 108, 1, -1, 109,
2167 37, 212, 38, 40, -1, 109, 1, 40, -1, 129,
2168 130, -1, 274, -1, 131, -1, 168, -1, 176, -1,
2169 40, -1, 1, -1, 175, -1, 1, 106, -1, 132,
2170 -1, 134, -1, 135, -1, 136, -1, 137, -1, 138,
2171 -1, 141, -1, 142, -1, 145, -1, 146, -1, 147,
2172 -1, 148, -1, 149, -1, 150, -1, 153, -1, 155,
2173 -1, 158, -1, 160, -1, 165, -1, 166, -1, 167,
2174 -1, -1, 61, 271, 264, 43, 133, 193, 44, -1,
2175 85, 164, 43, 162, 44, -1, 86, 162, 40, -1,
2176 57, 3, 51, 237, 40, -1, 57, 231, 223, 220,
2177 40, -1, 57, 1, 40, -1, 84, 4, -1, 84,
2178 269, -1, 83, 37, 3, 38, 43, -1, 83, 43,
2179 -1, 83, 37, 3, 38, 40, -1, 83, 40, -1,
2180 269, 43, 215, 44, -1, 269, -1, 139, -1, 88,
2181 37, 140, 39, 272, 38, 4, -1, 88, 37, 140,
2182 39, 272, 38, 43, -1, 88, 37, 140, 38, 40,
2183 -1, -1, 144, 271, 269, 54, 143, 129, 55, -1,
2184 7, -1, 8, -1, 81, 4, -1, 81, 43, -1,
2185 4, -1, 9, 37, 262, 38, 269, -1, 9, 37,
2186 262, 38, 4, -1, 9, 37, 262, 38, 43, -1,
2187 53, 271, 262, -1, 58, 37, 262, 38, -1, 58,
2188 37, 38, -1, 80, 37, 3, 38, 211, 3, 40,
2189 -1, 80, 37, 3, 38, 211, 231, 223, 40, -1,
2190 62, 152, 3, 51, 151, -1, 62, 152, 3, -1,
2191 269, -1, 4, -1, 37, 3, 38, -1, 274, -1,
2192 154, 223, 262, 40, -1, 154, 37, 272, 38, 223,
2193 256, 40, -1, 154, 37, 272, 38, 269, 40, -1,
2194 59, -1, 60, -1, 63, 37, 262, 38, 223, 256,
2195 156, -1, 63, 37, 262, 39, 273, 38, 223, 256,
2196 40, -1, 63, 37, 262, 157, 38, 223, 256, 156,
2197 -1, 63, 37, 262, 39, 273, 157, 38, 223, 256,
2198 40, -1, 63, 37, 262, 38, 156, -1, 63, 37,
2199 262, 39, 273, 38, 40, -1, 63, 37, 262, 157,
2200 38, 156, -1, 63, 37, 262, 39, 273, 157, 38,
2201 40, -1, 270, -1, 40, -1, 100, 37, 212, 38,
2202 40, -1, 39, 262, 51, 273, -1, 39, 262, 51,
2203 273, 157, -1, 64, 37, 159, 38, 223, 256, 40,
2204 -1, 212, -1, 11, 39, 215, -1, 82, 37, 161,
2205 38, 162, 270, -1, 82, 37, 161, 38, 162, 40,
2206 -1, 82, 37, 161, 38, 162, 51, 164, 40, -1,
2207 272, -1, 164, 163, -1, 39, 164, 163, -1, 274,
2208 -1, 231, 222, -1, 37, 212, 38, -1, 37, 212,
2209 38, 37, 212, 38, -1, 99, 37, 212, 38, 156,
2210 -1, 87, 37, 263, 38, 267, 90, 216, 91, 40,
2211 -1, 89, 269, -1, 170, -1, 174, -1, 173, -1,
2212 -1, 41, 269, 43, 169, 129, 44, -1, 211, 231,
2213 223, 172, 171, -1, 40, -1, 39, 223, 172, 171,
2214 -1, 43, -1, 220, -1, 229, 220, -1, 75, 37,
2215 212, 38, 220, -1, 229, 75, 37, 212, 38, 220,
2216 -1, 211, 65, 3, 40, -1, 211, 65, 239, 43,
2217 240, 44, 40, -1, 211, 65, 239, 43, 240, 44,
2218 223, 171, -1, 211, 231, 37, 212, 38, 257, -1,
2219 177, -1, 181, -1, 182, -1, 189, -1, 190, -1,
2220 200, -1, -1, 211, 254, 264, 247, 43, 178, 193,
2221 44, 180, -1, -1, 211, 254, 43, 179, 193, 44,
2222 223, 171, -1, 40, -1, 223, 171, -1, 211, 254,
2223 264, 40, -1, -1, 104, 90, 185, 91, 183, 184,
2224 -1, 104, 254, 264, -1, 170, -1, 177, -1, 197,
2225 -1, 182, -1, 181, -1, 199, -1, 186, -1, 187,
2226 188, -1, 274, -1, 253, -1, 215, -1, 39, 187,
2227 188, -1, 274, -1, 78, 264, 40, -1, 78, 79,
2228 264, 40, -1, -1, 79, 264, 43, 191, 129, 44,
2229 -1, -1, 79, 43, 192, 129, 44, -1, 79, 3,
2230 51, 264, 40, -1, 196, 193, -1, -1, 61, 43,
2231 194, 193, 44, 193, -1, 142, -1, 274, -1, -1,
2232 1, 195, 193, -1, 168, -1, 197, -1, 198, -1,
2233 201, -1, 207, -1, 199, -1, 181, -1, 202, -1,
2234 211, 264, 40, -1, 189, -1, 182, -1, 200, -1,
2235 166, -1, 167, -1, 210, -1, 141, -1, 165, -1,
2236 40, -1, 211, 231, 37, 212, 38, 257, -1, 124,
2237 266, 37, 212, 38, 208, -1, 73, 124, 266, 37,
2238 212, 38, 209, -1, 211, 106, 231, 228, 37, 212,
2239 38, 209, -1, 211, 106, 231, 115, 37, 212, 38,
2240 209, -1, 211, 106, 231, 37, 212, 38, 209, -1,
2241 76, 37, 212, 38, 43, -1, 69, 71, -1, 68,
2242 71, -1, 70, 71, -1, -1, 211, 254, 3, 43,
2243 203, 206, 40, -1, -1, 211, 254, 43, 204, 206,
2244 40, -1, -1, 211, 254, 264, 71, 250, 43, 205,
2245 40, -1, 223, -1, 274, -1, 150, -1, 136, -1,
2246 148, -1, 153, -1, 155, -1, 158, -1, 146, -1,
2247 160, -1, 134, -1, 135, -1, 137, -1, 256, 40,
2248 -1, 256, 43, -1, 256, 40, -1, 256, 51, 237,
2249 40, -1, 256, 43, -1, 211, 231, 71, 243, 40,
2250 -1, 41, -1, 41, 269, -1, 72, -1, 18, -1,
2251 73, -1, 74, -1, 77, -1, 274, -1, 213, -1,
2252 215, 214, -1, 274, -1, 39, 215, 214, -1, 274,
2253 -1, 232, 221, -1, 104, 90, 254, 91, 254, 264,
2254 220, -1, 45, 45, 45, -1, 217, -1, 219, 218,
2255 -1, 274, -1, 39, 219, 218, -1, 274, -1, 215,
2256 -1, 244, -1, 51, 237, -1, 51, 237, 54, 243,
2257 55, -1, 51, 43, -1, 71, 243, -1, 274, -1,
2258 223, 220, -1, 226, 220, -1, 220, -1, 223, -1,
2259 226, -1, 274, -1, 228, 224, -1, 228, 115, 224,
2260 -1, 225, -1, 115, 224, -1, 264, 102, 224, -1,
2261 228, 264, 102, 224, -1, 228, 264, 102, 115, 224,
2262 -1, 264, 102, 115, 224, -1, 264, -1, 124, 264,
2263 -1, 37, 264, 38, -1, 37, 228, 224, 38, -1,
2264 37, 264, 102, 224, 38, -1, 224, 54, 55, -1,
2265 224, 54, 243, 55, -1, 224, 37, 212, 38, -1,
2266 264, -1, 124, 264, -1, 37, 228, 225, 38, -1,
2267 37, 115, 225, 38, -1, 37, 264, 102, 225, 38,
2268 -1, 225, 54, 55, -1, 225, 54, 243, 55, -1,
2269 225, 37, 212, 38, -1, 228, -1, 228, 227, -1,
2270 228, 115, -1, 228, 115, 227, -1, 227, -1, 115,
2271 227, -1, 115, -1, 264, 102, -1, 228, 264, 102,
2272 -1, 228, 264, 102, 227, -1, 227, 54, 55, -1,
2273 227, 54, 243, 55, -1, 54, 55, -1, 54, 243,
2274 55, -1, 37, 226, 38, -1, 227, 37, 212, 38,
2275 -1, 37, 212, 38, -1, 122, 229, 228, -1, 122,
2276 228, -1, 122, 229, -1, 122, -1, 230, -1, 230,
2277 229, -1, 46, -1, 47, -1, 48, -1, 232, -1,
2278 229, 233, -1, 233, -1, 233, 229, -1, 229, 233,
2279 229, -1, 234, -1, 29, -1, 27, -1, 31, 261,
2280 -1, 65, 264, -1, 32, -1, 264, -1, 254, 264,
2281 -1, 235, -1, 236, -1, 236, 235, -1, 19, -1,
2282 21, -1, 22, -1, 25, -1, 26, -1, 23, -1,
2283 24, -1, 28, -1, 20, -1, 30, -1, 33, -1,
2284 34, -1, 35, -1, 36, -1, -1, 238, 243, -1,
2285 3, -1, 274, -1, 240, 39, 241, -1, 241, -1,
2286 3, -1, 3, 51, 242, -1, 274, -1, 243, -1,
2287 244, -1, 231, -1, 245, -1, 269, -1, 52, 37,
2288 231, 221, 38, -1, 246, -1, 10, -1, 37, 243,
2289 38, -1, 37, 243, 38, 243, -1, 37, 243, 228,
2290 38, 243, -1, 37, 243, 115, 38, 243, -1, 37,
2291 243, 228, 115, 38, 243, -1, 115, 243, -1, 122,
2292 243, -1, 11, -1, 12, -1, 13, -1, 14, -1,
2293 15, -1, 16, -1, 17, -1, 243, 119, 243, -1,
2294 243, 118, 243, -1, 243, 122, 243, -1, 243, 121,
2295 243, -1, 243, 120, 243, -1, 243, 115, 243, -1,
2296 243, 113, 243, -1, 243, 114, 243, -1, 243, 117,
2297 243, -1, 243, 116, 243, -1, 243, 112, 243, -1,
2298 243, 111, 243, -1, 243, 96, 243, -1, 243, 97,
2299 243, -1, 243, 95, 243, -1, 243, 94, 243, -1,
2300 243, 98, 243, 71, 243, -1, 118, 243, -1, 119,
2301 243, -1, 124, 243, -1, 123, 243, -1, 231, 37,
2302 -1, 248, -1, -1, 71, 249, 250, -1, 274, -1,
2303 251, -1, 250, 39, 251, -1, 255, 264, -1, 255,
2304 252, 255, 264, -1, 69, -1, 68, -1, 70, -1,
2305 66, -1, 67, -1, 253, -1, 49, -1, 50, -1,
2306 73, -1, 274, -1, 229, -1, 75, 37, 212, 38,
2307 -1, 229, 75, 37, 212, 38, -1, 274, -1, 256,
2308 258, 40, -1, 256, 258, 43, -1, 37, 212, 38,
2309 40, -1, 37, 212, 38, 43, -1, 51, 237, 40,
2310 -1, 71, 259, -1, 274, -1, 260, -1, 259, 39,
2311 260, -1, 264, 37, -1, 90, 216, 91, -1, 274,
2312 -1, 3, -1, 269, -1, 262, -1, 274, -1, 266,
2313 265, -1, 101, 126, 266, 265, -1, 266, -1, 101,
2314 126, 266, -1, 105, -1, 101, 126, 105, -1, 126,
2315 266, 265, -1, 126, 266, -1, 126, 105, -1, 103,
2316 266, -1, 3, 261, -1, 3, 268, -1, 101, 126,
2317 3, 268, -1, 3, -1, 101, 126, 3, -1, 105,
2318 -1, 101, 126, 105, -1, 126, 3, 268, -1, 126,
2319 3, -1, 126, 105, -1, 103, 3, -1, 269, 6,
2320 -1, 6, -1, 269, -1, 43, -1, 4, -1, 37,
2321 272, 38, -1, 274, -1, 262, 51, 273, -1, 262,
2322 51, 273, 39, 272, -1, 262, -1, 262, 39, 272,
2323 -1, 262, 51, 139, -1, 262, 51, 139, 39, 272,
2324 -1, 269, -1, 245, -1, -1
2327 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
2328 static const yytype_uint16 yyrline[] =
2330 0, 1593, 1593, 1606, 1610, 1613, 1616, 1619, 1622, 1627,
2331 1632, 1637, 1638, 1639, 1640, 1641, 1647, 1663, 1673, 1674,
2332 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684,
2333 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1700,
2334 1700, 1772, 1782, 1793, 1814, 1836, 1847, 1856, 1875, 1881,
2335 1887, 1892, 1899, 1906, 1910, 1923, 1932, 1947, 1960, 1960,
2336 2015, 2016, 2023, 2043, 2074, 2078, 2088, 2093, 2111, 2151,
2337 2157, 2170, 2176, 2202, 2208, 2215, 2216, 2219, 2220, 2228,
2338 2274, 2320, 2331, 2334, 2361, 2367, 2373, 2379, 2387, 2393,
2339 2399, 2405, 2413, 2414, 2415, 2418, 2423, 2433, 2469, 2470,
2340 2500, 2517, 2525, 2538, 2563, 2569, 2573, 2576, 2587, 2592,
2341 2605, 2617, 2890, 2900, 2907, 2908, 2912, 2912, 2943, 3004,
2342 3008, 3030, 3036, 3042, 3048, 3054, 3067, 3082, 3092, 3170,
2343 3221, 3222, 3223, 3224, 3225, 3226, 3232, 3232, 3464, 3464,
2344 3586, 3587, 3599, 3619, 3619, 3854, 3860, 3863, 3866, 3869,
2345 3872, 3875, 3880, 3910, 3914, 3917, 3920, 3925, 3929, 3934,
2346 3944, 3975, 3975, 4004, 4004, 4026, 4053, 4068, 4068, 4078,
2347 4079, 4080, 4080, 4096, 4097, 4114, 4115, 4116, 4117, 4118,
2348 4119, 4120, 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128,
2349 4129, 4138, 4163, 4187, 4228, 4243, 4261, 4280, 4287, 4294,
2350 4302, 4325, 4325, 4360, 4360, 4391, 4391, 4409, 4410, 4416,
2351 4419, 4423, 4426, 4427, 4428, 4429, 4430, 4431, 4432, 4433,
2352 4436, 4441, 4448, 4456, 4464, 4475, 4481, 4482, 4490, 4491,
2353 4492, 4493, 4494, 4495, 4502, 4513, 4517, 4520, 4524, 4528,
2354 4538, 4546, 4554, 4567, 4571, 4574, 4578, 4582, 4610, 4618,
2355 4629, 4643, 4652, 4660, 4670, 4674, 4678, 4685, 4702, 4719,
2356 4727, 4735, 4744, 4748, 4757, 4768, 4780, 4790, 4803, 4810,
2357 4818, 4834, 4842, 4853, 4864, 4875, 4894, 4902, 4919, 4927,
2358 4934, 4945, 4956, 4967, 4986, 4992, 4998, 5005, 5014, 5017,
2359 5026, 5033, 5040, 5050, 5061, 5072, 5083, 5090, 5097, 5100,
2360 5117, 5127, 5134, 5140, 5145, 5151, 5155, 5161, 5162, 5163,
2361 5169, 5175, 5179, 5180, 5184, 5191, 5194, 5195, 5196, 5197,
2362 5198, 5200, 5203, 5208, 5233, 5236, 5290, 5294, 5298, 5302,
2363 5306, 5310, 5314, 5318, 5322, 5326, 5330, 5334, 5338, 5342,
2364 5348, 5348, 5374, 5375, 5378, 5391, 5399, 5407, 5424, 5427,
2365 5442, 5443, 5462, 5463, 5467, 5472, 5473, 5487, 5494, 5511,
2366 5518, 5525, 5533, 5537, 5543, 5544, 5545, 5546, 5547, 5548,
2367 5549, 5552, 5556, 5560, 5564, 5568, 5572, 5576, 5580, 5584,
2368 5588, 5592, 5596, 5600, 5604, 5618, 5625, 5629, 5635, 5639,
2369 5643, 5647, 5651, 5667, 5672, 5672, 5673, 5676, 5693, 5702,
2370 5715, 5728, 5729, 5730, 5734, 5738, 5744, 5747, 5751, 5757,
2371 5758, 5761, 5766, 5771, 5776, 5783, 5790, 5797, 5805, 5813,
2372 5821, 5822, 5825, 5826, 5829, 5835, 5841, 5844, 5845, 5848,
2373 5849, 5852, 5857, 5861, 5864, 5867, 5870, 5875, 5879, 5882,
2374 5889, 5895, 5904, 5909, 5913, 5916, 5919, 5922, 5927, 5931,
2375 5934, 5937, 5943, 5948, 5951, 5954, 5958, 5963, 5976, 5980,
2376 5985, 5991, 5995, 6000, 6004, 6011, 6014, 6019
2380 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
2381 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
2382 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
2383 static const char *const yytname[] =
2385 "$end", "error", "$undefined", "ID", "HBLOCK", "POUND", "STRING",
2386 "INCLUDE", "IMPORT", "INSERT", "CHARCONST", "NUM_INT", "NUM_FLOAT",
2387 "NUM_UNSIGNED", "NUM_LONG", "NUM_ULONG", "NUM_LONGLONG", "NUM_ULONGLONG",
2388 "TYPEDEF", "TYPE_INT", "TYPE_UNSIGNED", "TYPE_SHORT", "TYPE_LONG",
2389 "TYPE_FLOAT", "TYPE_DOUBLE", "TYPE_CHAR", "TYPE_WCHAR", "TYPE_VOID",
2390 "TYPE_SIGNED", "TYPE_BOOL", "TYPE_COMPLEX", "TYPE_TYPEDEF", "TYPE_RAW",
2391 "TYPE_NON_ISO_INT8", "TYPE_NON_ISO_INT16", "TYPE_NON_ISO_INT32",
2392 "TYPE_NON_ISO_INT64", "LPAREN", "RPAREN", "COMMA", "SEMI", "EXTERN",
2393 "INIT", "LBRACE", "RBRACE", "PERIOD", "CONST_QUAL", "VOLATILE",
2394 "REGISTER", "STRUCT", "UNION", "EQUAL", "SIZEOF", "MODULE", "LBRACKET",
2395 "RBRACKET", "ILLEGAL", "CONSTANT", "NAME", "RENAME", "NAMEWARN",
2396 "EXTEND", "PRAGMA", "FEATURE", "VARARGS", "ENUM", "CLASS", "TYPENAME",
2397 "PRIVATE", "PUBLIC", "PROTECTED", "COLON", "STATIC", "VIRTUAL", "FRIEND",
2398 "THROW", "CATCH", "EXPLICIT", "USING", "NAMESPACE", "NATIVE", "INLINE",
2399 "TYPEMAP", "EXCEPT", "ECHO", "APPLY", "CLEAR", "SWIGTEMPLATE",
2400 "FRAGMENT", "WARN", "LESSTHAN", "GREATERTHAN", "MODULO", "DELETE_KW",
2401 "LESSTHANOREQUALTO", "GREATERTHANOREQUALTO", "EQUALTO", "NOTEQUALTO",
2402 "QUESTIONMARK", "TYPES", "PARMS", "NONID", "DSTAR", "DCNOT", "TEMPLATE",
2403 "OPERATOR", "COPERATOR", "PARSETYPE", "PARSEPARM", "PARSEPARMS", "CAST",
2404 "LOR", "LAND", "OR", "XOR", "AND", "RSHIFT", "LSHIFT", "MINUS", "PLUS",
2405 "MODULUS", "SLASH", "STAR", "LNOT", "NOT", "UMINUS", "DCOLON", "$accept",
2406 "program", "interface", "declaration", "swig_directive",
2407 "extend_directive", "@1", "apply_directive", "clear_directive",
2408 "constant_directive", "echo_directive", "except_directive", "stringtype",
2409 "fname", "fragment_directive", "include_directive", "@2", "includetype",
2410 "inline_directive", "insert_directive", "module_directive",
2411 "name_directive", "native_directive", "pragma_directive", "pragma_arg",
2412 "pragma_lang", "rename_directive", "rename_namewarn",
2413 "feature_directive", "stringbracesemi", "featattr", "varargs_directive",
2414 "varargs_parms", "typemap_directive", "typemap_type", "tm_list",
2415 "tm_tail", "typemap_parm", "types_directive", "template_directive",
2416 "warn_directive", "c_declaration", "@3", "c_decl", "c_decl_tail",
2417 "initializer", "c_enum_forward_decl", "c_enum_decl",
2418 "c_constructor_decl", "cpp_declaration", "cpp_class_decl", "@4", "@5",
2419 "cpp_opt_declarators", "cpp_forward_class_decl", "cpp_template_decl",
2420 "@6", "cpp_temp_possible", "template_parms", "templateparameters",
2421 "templateparameter", "templateparameterstail", "cpp_using_decl",
2422 "cpp_namespace_decl", "@7", "@8", "cpp_members", "@9", "@10",
2423 "cpp_member", "cpp_constructor_decl", "cpp_destructor_decl",
2424 "cpp_conversion_operator", "cpp_catch_decl", "cpp_protection_decl",
2425 "cpp_nested", "@11", "@12", "@13", "nested_decl", "cpp_swig_directive",
2426 "cpp_end", "cpp_vend", "anonymous_bitfield", "storage_class", "parms",
2427 "rawparms", "ptail", "parm", "valparms", "rawvalparms", "valptail",
2428 "valparm", "def_args", "parameter_declarator",
2429 "typemap_parameter_declarator", "declarator", "notso_direct_declarator",
2430 "direct_declarator", "abstract_declarator", "direct_abstract_declarator",
2431 "pointer", "type_qualifier", "type_qualifier_raw", "type", "rawtype",
2432 "type_right", "primitive_type", "primitive_type_list", "type_specifier",
2433 "definetype", "@14", "ename", "enumlist", "edecl", "etype", "expr",
2434 "valexpr", "exprnum", "exprcompound", "inherit", "raw_inherit", "@15",
2435 "base_list", "base_specifier", "access_specifier", "templcpptype",
2436 "cpptype", "opt_virtual", "cpp_const", "ctor_end", "ctor_initializer",
2437 "mem_initializer_list", "mem_initializer", "template_decl", "idstring",
2438 "idstringopt", "idcolon", "idcolontail", "idtemplate", "idcolonnt",
2439 "idcolontailnt", "string", "stringbrace", "options", "kwargs",
2440 "stringnum", "empty", 0
2445 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
2447 static const yytype_uint16 yytoknum[] =
2449 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
2450 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
2451 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
2452 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
2453 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
2454 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
2455 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
2456 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
2457 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
2458 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
2459 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
2460 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
2461 375, 376, 377, 378, 379, 380, 381
2465 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
2466 static const yytype_uint16 yyr1[] =
2468 0, 127, 128, 128, 128, 128, 128, 128, 128, 129,
2469 129, 130, 130, 130, 130, 130, 130, 130, 131, 131,
2470 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
2471 131, 131, 131, 131, 131, 131, 131, 131, 131, 133,
2472 132, 134, 135, 136, 136, 136, 137, 137, 138, 138,
2473 138, 138, 139, 140, 140, 141, 141, 141, 143, 142,
2474 144, 144, 145, 145, 146, 146, 146, 146, 147, 148,
2475 148, 149, 149, 150, 150, 151, 151, 152, 152, 153,
2476 153, 153, 154, 154, 155, 155, 155, 155, 155, 155,
2477 155, 155, 156, 156, 156, 157, 157, 158, 159, 159,
2478 160, 160, 160, 161, 162, 163, 163, 164, 164, 164,
2479 165, 166, 167, 168, 168, 168, 169, 168, 170, 171,
2480 171, 171, 172, 172, 172, 172, 173, 174, 174, 175,
2481 176, 176, 176, 176, 176, 176, 178, 177, 179, 177,
2482 180, 180, 181, 183, 182, 182, 184, 184, 184, 184,
2483 184, 184, 185, 186, 186, 187, 187, 188, 188, 189,
2484 189, 191, 190, 192, 190, 190, 193, 194, 193, 193,
2485 193, 195, 193, 196, 196, 196, 196, 196, 196, 196,
2486 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
2487 196, 197, 198, 198, 199, 199, 199, 200, 201, 201,
2488 201, 203, 202, 204, 202, 205, 202, 206, 206, 207,
2489 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
2490 208, 208, 209, 209, 209, 210, 211, 211, 211, 211,
2491 211, 211, 211, 211, 212, 213, 213, 214, 214, 215,
2492 215, 215, 216, 217, 217, 218, 218, 219, 219, 220,
2493 220, 220, 220, 220, 221, 221, 221, 222, 222, 222,
2494 223, 223, 223, 223, 223, 223, 223, 223, 224, 224,
2495 224, 224, 224, 224, 224, 224, 225, 225, 225, 225,
2496 225, 225, 225, 225, 226, 226, 226, 226, 226, 226,
2497 226, 226, 226, 226, 227, 227, 227, 227, 227, 227,
2498 227, 228, 228, 228, 228, 229, 229, 230, 230, 230,
2499 231, 232, 232, 232, 232, 233, 233, 233, 233, 233,
2500 233, 233, 233, 234, 235, 235, 236, 236, 236, 236,
2501 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
2502 238, 237, 239, 239, 240, 240, 241, 241, 241, 242,
2503 243, 243, 244, 244, 244, 244, 244, 244, 244, 244,
2504 244, 244, 244, 244, 245, 245, 245, 245, 245, 245,
2505 245, 246, 246, 246, 246, 246, 246, 246, 246, 246,
2506 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
2507 246, 246, 246, 247, 249, 248, 248, 250, 250, 251,
2508 251, 252, 252, 252, 253, 253, 254, 254, 254, 255,
2509 255, 256, 256, 256, 256, 257, 257, 257, 257, 257,
2510 258, 258, 259, 259, 260, 261, 261, 262, 262, 263,
2511 263, 264, 264, 264, 264, 264, 264, 265, 265, 265,
2512 265, 266, 267, 267, 267, 267, 267, 267, 268, 268,
2513 268, 268, 269, 269, 270, 270, 270, 271, 271, 272,
2514 272, 272, 272, 272, 272, 273, 273, 274
2517 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2518 static const yytype_uint8 yyr2[] =
2520 0, 2, 1, 3, 2, 3, 2, 5, 3, 2,
2521 1, 1, 1, 1, 1, 1, 1, 2, 1, 1,
2522 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2523 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2524 7, 5, 3, 5, 5, 3, 2, 2, 5, 2,
2525 5, 2, 4, 1, 1, 7, 7, 5, 0, 7,
2526 1, 1, 2, 2, 1, 5, 5, 5, 3, 4,
2527 3, 7, 8, 5, 3, 1, 1, 3, 1, 4,
2528 7, 6, 1, 1, 7, 9, 8, 10, 5, 7,
2529 6, 8, 1, 1, 5, 4, 5, 7, 1, 3,
2530 6, 6, 8, 1, 2, 3, 1, 2, 3, 6,
2531 5, 9, 2, 1, 1, 1, 0, 6, 5, 1,
2532 4, 1, 1, 2, 5, 6, 4, 7, 8, 6,
2533 1, 1, 1, 1, 1, 1, 0, 9, 0, 8,
2534 1, 2, 4, 0, 6, 3, 1, 1, 1, 1,
2535 1, 1, 1, 2, 1, 1, 1, 3, 1, 3,
2536 4, 0, 6, 0, 5, 5, 2, 0, 6, 1,
2537 1, 0, 3, 1, 1, 1, 1, 1, 1, 1,
2538 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
2539 1, 6, 6, 7, 8, 8, 7, 5, 2, 2,
2540 2, 0, 7, 0, 6, 0, 8, 1, 1, 1,
2541 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2542 2, 2, 2, 4, 2, 5, 1, 2, 1, 1,
2543 1, 1, 1, 1, 1, 2, 1, 3, 1, 2,
2544 7, 3, 1, 2, 1, 3, 1, 1, 1, 2,
2545 5, 2, 2, 1, 2, 2, 1, 1, 1, 1,
2546 2, 3, 1, 2, 3, 4, 5, 4, 1, 2,
2547 3, 4, 5, 3, 4, 4, 1, 2, 4, 4,
2548 5, 3, 4, 4, 1, 2, 2, 3, 1, 2,
2549 1, 2, 3, 4, 3, 4, 2, 3, 3, 4,
2550 3, 3, 2, 2, 1, 1, 2, 1, 1, 1,
2551 1, 2, 1, 2, 3, 1, 1, 1, 2, 2,
2552 1, 1, 2, 1, 1, 2, 1, 1, 1, 1,
2553 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2554 0, 2, 1, 1, 3, 1, 1, 3, 1, 1,
2555 1, 1, 1, 1, 5, 1, 1, 3, 4, 5,
2556 5, 6, 2, 2, 1, 1, 1, 1, 1, 1,
2557 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2558 3, 3, 3, 3, 3, 3, 3, 5, 2, 2,
2559 2, 2, 2, 1, 0, 3, 1, 1, 3, 2,
2560 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2561 1, 1, 4, 5, 1, 3, 3, 4, 4, 3,
2562 2, 1, 1, 3, 2, 3, 1, 1, 1, 1,
2563 1, 2, 4, 1, 3, 1, 3, 3, 2, 2,
2564 2, 2, 2, 4, 1, 3, 1, 3, 3, 2,
2565 2, 2, 2, 1, 1, 1, 1, 3, 1, 3,
2566 5, 1, 3, 3, 5, 1, 1, 0
2569 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2570 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2571 means the default is an error. */
2572 static const yytype_uint16 yydefact[] =
2574 467, 0, 0, 0, 0, 0, 10, 4, 467, 326,
2575 334, 327, 328, 331, 332, 329, 330, 317, 333, 316,
2576 335, 467, 320, 336, 337, 338, 339, 0, 307, 308,
2577 309, 407, 408, 0, 404, 405, 0, 0, 435, 0,
2578 0, 305, 467, 312, 315, 323, 324, 406, 0, 321,
2579 433, 6, 0, 0, 467, 1, 15, 64, 60, 61,
2580 0, 229, 14, 226, 467, 0, 0, 82, 83, 467,
2581 467, 0, 0, 228, 230, 231, 0, 232, 0, 0,
2582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2583 0, 0, 9, 11, 18, 19, 20, 21, 22, 23,
2584 24, 25, 467, 26, 27, 28, 29, 30, 31, 32,
2585 0, 33, 34, 35, 36, 37, 38, 12, 113, 115,
2586 114, 16, 13, 130, 131, 132, 133, 134, 135, 0,
2587 233, 467, 441, 426, 318, 0, 319, 0, 0, 3,
2588 311, 306, 467, 340, 0, 0, 290, 304, 0, 256,
2589 239, 467, 262, 467, 288, 284, 276, 253, 313, 325,
2590 322, 0, 0, 431, 5, 8, 0, 234, 467, 236,
2591 17, 0, 453, 227, 0, 0, 458, 0, 467, 0,
2592 310, 0, 0, 0, 0, 78, 0, 467, 467, 0,
2593 0, 467, 163, 0, 0, 62, 63, 0, 0, 51,
2594 49, 46, 47, 467, 0, 467, 0, 467, 467, 0,
2595 112, 467, 467, 0, 0, 0, 0, 0, 0, 276,
2596 467, 0, 0, 356, 364, 365, 366, 367, 368, 369,
2597 370, 0, 0, 0, 0, 0, 0, 0, 0, 247,
2598 0, 242, 467, 351, 310, 0, 350, 352, 355, 353,
2599 244, 241, 436, 434, 0, 314, 467, 290, 0, 0,
2600 284, 321, 251, 249, 0, 296, 0, 350, 252, 467,
2601 0, 263, 289, 268, 302, 303, 277, 254, 467, 0,
2602 255, 467, 0, 286, 260, 285, 268, 291, 440, 439,
2603 438, 0, 0, 235, 238, 427, 0, 428, 452, 116,
2604 461, 0, 68, 45, 340, 0, 467, 70, 0, 0,
2605 0, 74, 0, 0, 0, 98, 0, 0, 159, 0,
2606 467, 161, 0, 0, 103, 0, 0, 0, 107, 257,
2607 258, 259, 42, 0, 104, 106, 429, 0, 430, 54,
2608 0, 53, 0, 0, 152, 467, 156, 406, 154, 145,
2609 0, 427, 0, 0, 0, 0, 0, 0, 0, 268,
2610 0, 467, 0, 343, 467, 467, 138, 322, 0, 0,
2611 362, 388, 389, 363, 391, 390, 425, 0, 243, 246,
2612 392, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2613 0, 0, 0, 0, 0, 0, 0, 0, 432, 0,
2614 290, 284, 321, 0, 276, 300, 298, 286, 0, 276,
2615 291, 0, 341, 297, 284, 321, 269, 467, 0, 301,
2616 0, 281, 0, 0, 294, 0, 261, 287, 292, 0,
2617 264, 437, 7, 467, 0, 467, 0, 0, 457, 0,
2618 0, 69, 39, 77, 0, 0, 0, 0, 0, 0,
2619 0, 160, 0, 0, 467, 467, 0, 0, 108, 0,
2620 467, 0, 0, 0, 0, 0, 143, 0, 153, 158,
2621 58, 0, 0, 0, 0, 79, 0, 126, 467, 0,
2622 321, 0, 0, 122, 467, 0, 142, 394, 0, 393,
2623 396, 357, 0, 304, 0, 467, 467, 386, 385, 383,
2624 384, 0, 382, 381, 377, 378, 376, 380, 379, 372,
2625 371, 375, 374, 373, 0, 0, 291, 279, 278, 292,
2626 0, 0, 0, 268, 270, 291, 0, 273, 0, 283,
2627 282, 299, 295, 0, 265, 293, 267, 237, 66, 67,
2628 65, 0, 462, 463, 466, 465, 459, 43, 44, 0,
2629 76, 73, 75, 456, 93, 455, 0, 88, 467, 454,
2630 92, 0, 465, 0, 0, 99, 467, 197, 165, 164,
2631 0, 226, 0, 0, 50, 48, 467, 41, 105, 444,
2632 0, 446, 0, 57, 0, 0, 110, 467, 467, 467,
2633 467, 0, 0, 346, 0, 345, 348, 467, 467, 0,
2634 119, 121, 118, 0, 123, 171, 190, 0, 0, 0,
2635 0, 230, 0, 217, 218, 210, 219, 188, 169, 215,
2636 211, 209, 212, 213, 214, 216, 189, 185, 186, 173,
2637 179, 183, 182, 0, 0, 174, 175, 178, 184, 176,
2638 180, 177, 187, 0, 233, 467, 136, 358, 0, 304,
2639 303, 0, 0, 0, 245, 0, 467, 280, 250, 271,
2640 0, 275, 274, 266, 117, 0, 0, 0, 467, 0,
2641 411, 0, 414, 0, 0, 0, 0, 90, 467, 0,
2642 162, 227, 467, 0, 101, 0, 100, 0, 0, 0,
2643 442, 0, 467, 0, 52, 146, 147, 150, 149, 144,
2644 148, 151, 0, 157, 0, 0, 81, 0, 467, 0,
2645 467, 340, 467, 129, 0, 467, 467, 0, 167, 199,
2646 198, 200, 0, 0, 0, 166, 0, 0, 0, 321,
2647 409, 395, 397, 0, 410, 0, 360, 359, 0, 354,
2648 387, 240, 272, 464, 460, 40, 0, 467, 0, 84,
2649 465, 95, 89, 467, 0, 0, 97, 71, 0, 0,
2650 109, 451, 449, 450, 445, 447, 0, 55, 56, 0,
2651 59, 80, 347, 349, 344, 127, 0, 0, 0, 0,
2652 0, 421, 467, 0, 0, 172, 0, 0, 467, 0,
2653 0, 467, 0, 467, 203, 322, 181, 467, 402, 401,
2654 403, 467, 399, 0, 361, 0, 0, 467, 96, 0,
2655 91, 467, 86, 72, 102, 448, 443, 0, 128, 0,
2656 419, 420, 422, 0, 415, 416, 124, 120, 467, 0,
2657 467, 0, 139, 467, 0, 0, 0, 0, 201, 467,
2658 467, 398, 0, 0, 94, 412, 0, 85, 0, 111,
2659 417, 418, 0, 424, 125, 0, 0, 467, 0, 467,
2660 467, 467, 225, 467, 0, 207, 208, 0, 400, 140,
2661 137, 0, 413, 87, 423, 168, 467, 192, 0, 467,
2662 0, 0, 191, 0, 204, 205, 141, 193, 0, 220,
2663 221, 196, 467, 467, 202, 0, 222, 224, 340, 195,
2667 /* YYDEFGOTO[NTERM-NUM]. */
2668 static const yytype_int16 yydefgoto[] =
2670 -1, 4, 5, 92, 93, 94, 549, 613, 614, 615,
2671 616, 99, 339, 340, 617, 618, 589, 102, 103, 619,
2672 105, 620, 107, 621, 551, 184, 622, 110, 623, 557,
2673 447, 624, 314, 625, 323, 206, 334, 207, 626, 627,
2674 628, 629, 435, 118, 602, 482, 119, 120, 121, 122,
2675 123, 735, 485, 870, 630, 631, 587, 699, 343, 344,
2676 345, 468, 632, 127, 454, 320, 633, 786, 717, 634,
2677 635, 636, 637, 638, 639, 640, 863, 839, 895, 864,
2678 641, 877, 887, 642, 643, 258, 167, 293, 168, 240,
2679 241, 378, 242, 149, 150, 328, 151, 271, 152, 153,
2680 154, 218, 40, 41, 243, 180, 43, 44, 45, 46,
2681 263, 264, 362, 594, 595, 772, 245, 267, 247, 248,
2682 488, 489, 645, 731, 732, 801, 47, 48, 733, 888,
2683 713, 780, 821, 822, 132, 300, 337, 49, 163, 50,
2684 582, 690, 249, 560, 175, 301, 546, 169
2687 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2689 #define YYPACT_NINF -550
2690 static const yytype_int16 yypact[] =
2692 590, 3291, 3341, 121, 117, 2846, -550, -550, -67, -550,
2693 -550, -550, -550, -550, -550, -550, -550, -550, -550, -550,
2694 -550, -67, -550, -550, -550, -550, -550, 115, -550, -550,
2695 -550, -550, -550, 191, -550, -550, 75, 161, -550, 156,
2696 3797, 717, 325, 717, -550, -550, 1803, -550, 191, -550,
2697 100, -550, 221, 227, 3549, -550, 166, -550, -550, -550,
2698 288, -550, -550, 318, 298, 3401, 303, -550, -550, 298,
2699 311, 333, 366, -550, -550, -550, 392, -550, 116, 42,
2700 420, 106, 431, 429, 384, 3599, 3599, 442, 455, 318,
2701 465, 600, -550, -550, -550, -550, -550, -550, -550, -550,
2702 -550, -550, 298, -550, -550, -550, -550, -550, -550, -550,
2703 983, -550, -550, -550, -550, -550, -550, -550, -550, -550,
2704 -550, -550, -550, -550, -550, -550, -550, -550, -550, 3648,
2705 -550, 1740, -550, -550, -550, 296, -550, 49, 461, -550,
2706 717, -550, 2522, 463, 1862, 2350, 87, 241, 191, -550,
2707 -550, 104, 323, 104, 356, 176, 252, -550, -550, -550,
2708 -550, 518, 77, -550, -550, -550, 484, -550, 487, -550,
2709 -550, 377, -550, 126, 377, 377, -550, 532, 108, 1003,
2710 -550, 256, 191, 530, 571, -550, 377, 1522, 3549, 191,
2711 562, 129, -550, 573, 616, -550, -550, 377, 620, -550,
2712 -550, -550, 623, 3549, 583, 228, 592, 596, 377, 318,
2713 623, 3549, 3549, 191, 318, 270, 381, 377, 312, 535,
2714 194, 1014, 85, -550, -550, -550, -550, -550, -550, -550,
2715 -550, 2350, 610, 2350, 2350, 2350, 2350, 2350, 2350, -550,
2716 557, -550, 613, 621, 113, 1699, -8, -550, -550, 623,
2717 -550, -550, -550, 100, 568, -550, 2626, 742, 615, 626,
2718 928, 561, -550, 614, 2350, -550, 1825, -550, 1699, 2626,
2719 191, 387, 356, -550, -550, 552, -550, -550, 3549, 1984,
2720 -550, 3549, 2106, 87, 387, 356, 575, 720, -550, -550,
2721 100, 635, 3549, -550, -550, -550, 641, 623, -550, -550,
2722 330, 646, -550, -550, -550, 715, 104, -550, 649, 650,
2723 657, 652, 53, 667, 669, -550, 673, 684, -550, 191,
2724 -550, -550, 688, 698, -550, 700, 703, 3599, -550, -550,
2725 -550, -550, -550, 3599, -550, -550, -550, 705, -550, -550,
2726 207, 131, 706, 655, -550, 708, -550, 43, -550, -550,
2727 20, 317, 933, 933, 648, 722, 105, 738, 381, 681,
2728 720, 83, 745, -550, 2687, 625, -550, 287, 1197, 3698,
2729 1163, -550, -550, -550, -550, -550, -550, 1740, -550, -550,
2730 -550, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350,
2731 2350, 2350, 2350, 2350, 2350, 2350, 2350, 2350, -550, 461,
2732 443, 341, 689, 284, -550, -550, -550, 443, 394, 696,
2733 933, 2350, 1699, -550, 970, 13, -550, 3549, 2228, -550,
2734 752, -550, 1947, 762, -550, 2069, 387, 356, 1027, 381,
2735 387, -550, -550, 487, 304, -550, 377, 1212, -550, 765,
2736 766, -550, -550, -550, 509, 651, 1958, 770, 3549, 1003,
2737 779, -550, 769, 2935, -550, 865, 3599, 497, 787, 782,
2738 596, 281, 789, 377, 3549, 538, -550, 3549, -550, -550,
2739 -550, 933, 299, 381, 25, -550, 874, -550, 829, 793,
2740 648, 801, 690, -550, 203, 1621, -550, -550, 798, -550,
2741 -550, 2350, 1404, 2472, 15, 325, 613, 1057, 1057, 1122,
2742 1122, 2716, 1382, 1479, 1489, 1249, 1163, 828, 828, 692,
2743 692, -550, -550, -550, 191, 696, -550, -550, -550, 443,
2744 407, 2191, 493, 696, -550, 381, 808, -550, 2313, -550,
2745 -550, -550, -550, 381, 387, 356, 387, -550, -550, -550,
2746 623, 3024, -550, 809, -550, 131, 811, -550, -550, 1621,
2747 -550, -550, 623, -550, -550, -550, 814, -550, 674, 623,
2748 -550, 802, 78, 265, 651, -550, 674, -550, -550, -550,
2749 3113, 318, 3747, 351, -550, -550, 3549, -550, -550, 213,
2750 736, -550, 774, -550, 818, 821, -550, 730, 708, -550,
2751 674, 230, 381, 816, 94, -550, -550, 823, 3549, 1003,
2752 -550, -550, -550, 831, -550, -550, -550, 830, 813, 815,
2753 817, 748, 518, -550, -550, -550, -550, -550, -550, -550,
2754 -550, -550, -550, -550, -550, -550, -550, -550, -550, -550,
2755 -550, -550, -550, 836, 1621, -550, -550, -550, -550, -550,
2756 -550, -550, -550, 3450, 845, 822, -550, 1699, 2350, 2472,
2757 2740, 2350, 852, 853, -550, 2350, 104, -550, -550, -550,
2758 498, -550, -550, 387, -550, 377, 377, 855, 3549, 871,
2759 835, 538, -550, 1212, 879, 377, 875, -550, 674, 877,
2760 -550, 623, -1, 1003, -550, 3599, -550, 882, 912, 84,
2761 -550, 111, 1740, 196, -550, -550, -550, -550, -550, -550,
2762 -550, -550, 3500, -550, 3202, 884, -550, 2350, 829, 926,
2763 3549, -550, 851, -550, 887, 625, 3549, 1621, -550, -550,
2764 -550, -550, 518, 889, 1003, -550, 3698, 41, 212, 890,
2765 -550, 888, -550, 369, -550, 1621, 1699, 1699, 2350, -550,
2766 1837, -550, -550, -550, -550, -550, 894, 3549, 916, -550,
2767 623, 917, -550, 674, 948, 538, -550, -550, 918, 922,
2768 -550, -550, 213, -550, 213, -550, 873, -550, -550, 1032,
2769 -550, -550, -550, 1699, -550, -550, 690, 929, 931, 191,
2770 505, -550, 104, 690, 930, -550, 1621, 932, 3549, 690,
2771 -15, 2687, 2350, 19, -550, 198, -550, 822, -550, -550,
2772 -550, 822, -550, 934, 1699, 936, 949, 3549, -550, 950,
2773 -550, 674, -550, -550, -550, -550, -550, 951, -550, 514,
2774 -550, 953, -550, 935, -550, -550, -550, -550, 104, 956,
2775 3549, 959, -550, 3549, 965, 967, 972, 1618, -550, 1003,
2776 822, -550, 191, 978, -550, -550, 973, -550, 974, -550,
2777 -550, -550, 191, -550, -550, 1621, 975, 674, 985, 3549,
2778 3549, 823, -550, 1003, 981, -550, -550, 372, -550, -550,
2779 -550, 690, -550, -550, -550, -550, 674, -550, 543, 674,
2780 987, 990, -550, 996, -550, -550, -550, -550, 447, -550,
2781 -550, -550, 674, 674, -550, 997, -550, -550, -550, -550,
2782 -550, -550, 999, -550
2785 /* YYPGOTO[NTERM-NUM]. */
2786 static const yytype_int16 yypgoto[] =
2788 -550, -550, -314, -550, -550, -550, -550, 10, 12, 23,
2789 24, -550, 605, -550, 28, 30, -550, -550, -550, 35,
2790 -550, 36, -550, 38, -550, -550, 50, -550, 54, -446,
2791 -549, 55, -550, 63, -550, -311, 545, -84, 66, 70,
2792 72, 76, -550, 425, -377, 332, -550, -550, -550, -550,
2793 467, -550, -550, -550, -2, 5, -550, -550, -550, -550,
2794 588, 468, 81, -550, -550, -550, -536, -550, -550, -550,
2795 472, -550, 473, 90, -550, -550, -550, -550, -550, 199,
2796 -550, -550, -375, -550, -3, 186, -550, 628, 222, 373,
2797 -550, 570, 691, -97, 572, -550, -44, -117, -181, -112,
2798 -121, -22, -34, -550, 576, 45, -36, -550, 1028, -550,
2799 -286, -550, -550, -550, 365, -550, 966, -119, -410, -550,
2800 -550, -550, -550, 236, 280, -550, -201, -33, 277, -493,
2801 219, -550, -550, 234, 1061, -114, -550, 739, -142, -113,
2802 -550, -202, 726, 516, 183, -165, -409, 0
2805 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2806 positive, shift that token. If negative, reduce the rule which
2807 number is the opposite. If zero, do what YYDEFACT says.
2808 If YYTABLE_NINF, syntax error. */
2809 #define YYTABLE_NINF -468
2810 static const yytype_int16 yytable[] =
2812 6, 204, 129, 124, 140, 130, 453, 141, 133, 158,
2813 125, 347, 246, 667, 676, 95, 459, 96, 439, 586,
2814 155, 133, 833, 131, 253, 272, 298, 544, 97, 98,
2815 259, -248, 324, 100, 285, 101, 544, 563, 284, 757,
2816 104, 106, 157, 108, 8, 191, 42, 42, 288, 290,
2817 355, 524, 8, 651, 277, 109, 280, 296, 213, 111,
2818 112, 302, 838, 524, 176, 671, 217, 308, 113, 176,
2819 185, 114, 312, 679, 470, 115, 403, 116, 791, 408,
2820 8, 117, -155, -248, 298, 192, 126, 762, 8, 131,
2821 8, 445, 446, 330, 336, 128, 222, 705, 725, 42,
2822 834, 284, 176, 357, 712, 254, 255, 147, 8, 131,
2823 195, 398, 792, 275, 764, 525, 8, 55, 677, 8,
2824 260, 541, 53, 477, 269, 274, -342, 592, 366, -428,
2825 652, 250, 298, 708, -155, 306, 272, 298, 709, 285,
2826 570, 144, 36, 36, 259, 573, 38, 38, 431, 196,
2827 142, 157, -467, 157, 252, 143, 216, 259, 54, 304,
2828 135, 329, 427, 147, 143, 148, 426, 144, 294, 299,
2829 430, 403, 408, 131, 464, 145, 244, 365, 133, 8,
2830 319, 785, 289, 155, 145, 755, 36, 42, 36, 763,
2831 38, 133, 38, 353, 8, 189, 139, 361, 131, 803,
2832 767, 137, 808, 161, -467, 331, 36, 335, 338, 440,
2833 38, 270, 348, 269, 36, 793, 765, 36, 38, 131,
2834 363, 38, 155, 39, 52, 749, 162, 147, 146, 520,
2835 144, 8, 42, 42, 401, 147, 298, 148, 486, 768,
2836 166, 426, 379, 430, 157, 462, 463, 414, 42, 460,
2837 829, 138, 182, 419, 143, 794, 42, 42, 246, 295,
2838 809, 164, 172, 544, 751, 142, 347, 165, 483, 840,
2839 706, 542, 170, 351, 145, 704, 172, 36, 603, 272,
2840 285, 38, 144, 353, 579, 214, 427, 28, 29, 30,
2841 520, 283, 36, 285, 307, 36, 38, 522, 584, 38,
2842 270, 42, 8, 674, 675, 172, 157, 535, 538, 812,
2843 172, 534, 536, 36, 42, 8, 688, 38, 848, 875,
2844 6, 278, 517, 42, 172, 171, 42, 486, 8, 36,
2845 -467, 484, 561, 38, 473, 174, 305, 42, 279, 689,
2846 181, 251, 353, 146, 8, 469, 494, 539, 183, 356,
2847 147, 133, 148, 239, 287, 553, 522, 172, 487, 534,
2848 278, 133, 142, 147, 878, 157, 514, 490, 712, 436,
2849 186, 36, 8, 315, 316, 38, 143, 279, 256, 144,
2850 295, 437, 580, 172, 8, 352, 581, 604, 201, 326,
2851 172, 684, 147, 281, 555, 144, 145, 342, 535, 818,
2852 36, 558, 685, 187, 38, 566, 827, 131, 660, 42,
2853 282, 797, 832, 36, 216, 885, 663, 38, 356, -467,
2854 -467, 147, 244, 148, 417, 778, 36, 358, 590, 188,
2855 38, 278, 518, 294, 346, 6, 270, 798, 799, 800,
2856 146, 418, 36, -467, 278, 657, 38, 147, 279, 148,
2857 129, 124, 572, 130, 6, 130, 407, 194, 125, 650,
2858 335, 279, 42, 95, 420, 96, 198, 423, 197, 199,
2859 36, 274, 200, 155, 38, 660, 97, 98, 596, 208,
2860 256, 100, 36, 101, 157, 644, 38, 896, 104, 106,
2861 897, 108, 209, 42, 886, 157, 379, 144, 898, 723,
2862 743, 744, 211, 109, 891, 270, 262, 111, 112, 42,
2863 31, 32, 42, 550, 433, 172, 113, 899, 900, 114,
2864 678, 8, 291, 115, 670, 116, 292, 34, 35, 117,
2865 417, 659, 670, 310, 126, 417, 742, 574, 129, 124,
2866 575, 130, 553, 128, 172, 824, 125, 418, 825, 644,
2867 479, 95, 418, 96, 850, 715, 670, 851, 672, 741,
2868 815, 561, 816, 670, 97, 98, 672, 129, 124, 100,
2869 130, 101, 303, 246, 311, 125, 104, 106, 554, 108,
2870 95, 555, 96, 889, 702, 697, 890, 130, 469, 6,
2871 672, 109, 698, 97, 98, 111, 112, 672, 100, 239,
2872 101, 759, 318, 526, 113, 104, 106, 114, 108, 787,
2873 728, 115, 902, 116, 140, 650, 321, 117, 483, 322,
2874 109, 42, 126, 325, 111, 112, 327, 274, 419, 298,
2875 753, 128, 332, 113, 644, 333, 114, 360, 556, 758,
2876 115, 179, 116, 42, 670, 734, 117, 369, 376, 31,
2877 32, 126, 377, 405, 8, 553, 157, 172, 380, 399,
2878 128, 205, 205, 410, 406, 776, 34, 35, 411, 222,
2879 565, 28, 29, 30, 147, 432, 143, 428, 672, 434,
2880 789, 484, 133, 365, 438, 826, 585, 441, 305, 346,
2881 212, 554, 250, 442, 555, 443, 145, 1, 2, 3,
2882 481, 129, 124, 444, 130, 221, 448, 449, 596, 125,
2883 811, 450, 781, 42, 95, 157, 96, 644, 8, 670,
2884 28, 29, 30, 8, 451, 365, 455, 97, 98, 599,
2885 600, 854, 100, 601, 101, 644, 456, 244, 457, 104,
2886 106, 458, 108, 461, 465, 8, 466, 467, 61, 669,
2887 471, 556, 36, 672, 109, 42, 38, 356, 111, 112,
2888 472, 42, 687, 28, 29, 30, 216, 113, 835, 353,
2889 114, 571, 136, 147, 115, 148, 116, 670, 475, 142,
2890 117, 156, 157, 476, 714, 126, 644, 160, 478, 173,
2891 529, 516, 42, 133, 128, 865, 144, 734, 519, 871,
2892 531, 734, 73, 74, 75, 547, 548, 77, 564, 568,
2893 202, 672, 395, 396, 397, 210, 36, 190, 193, 865,
2894 38, 36, 567, 670, 576, 38, 577, 670, 157, 583,
2895 352, 597, 593, 42, 91, 429, 42, 147, 598, 866,
2896 734, 646, 670, 36, 270, 670, 661, 38, 665, 219,
2897 666, 668, 42, 673, 746, 644, 693, 672, 670, 670,
2898 710, 672, 691, 866, 692, 694, 148, 707, 716, 28,
2899 29, 30, 722, 718, 711, 42, 672, 8, 42, 672,
2900 724, 261, 8, 61, 719, 273, 720, 276, 721, -170,
2901 738, 739, 672, 672, 286, 730, 777, 297, 669, 745,
2902 297, 297, 784, 205, 42, 42, 571, 297, 747, 205,
2903 748, 356, 297, 754, 239, 761, 305, 756, 219, 752,
2904 760, 309, 779, 297, 771, 782, 788, 797, 317, 8,
2905 796, 8, 805, 806, 297, 341, 8, 73, 74, 75,
2906 350, 297, 77, 297, 156, 495, 393, 394, 395, 396,
2907 397, 8, 349, 807, 354, 273, 675, 359, 813, 136,
2908 219, 367, 814, 305, 817, 142, 775, 819, 828, 830,
2909 305, 820, 853, 8, 831, 36, 844, 836, 843, 38,
2910 36, 8, 144, 156, 38, 305, 8, 845, 810, 533,
2911 847, 849, 852, 846, 216, 402, 404, 857, 270, 409,
2912 855, 147, 859, 148, 860, 578, 8, 269, 415, 416,
2913 861, 872, 695, 876, 873, 305, 856, 8, 869, 858,
2914 215, 884, 273, 879, 144, 892, 273, 36, 893, 36,
2915 8, 38, 205, 38, 36, 8, 894, 901, 38, 903,
2916 305, 216, 543, 407, 354, 880, 881, 783, 147, 36,
2917 148, 364, 148, 38, 696, 588, 703, 148, 452, 700,
2918 701, 537, 883, 216, 269, 766, 654, 653, 496, 791,
2919 147, 36, 148, 774, 159, 38, 867, 841, 842, 36,
2920 882, 144, 134, 38, 36, 407, 874, 0, 38, 686,
2921 0, 404, 404, 216, 270, 474, 0, 273, 216, 273,
2922 147, 0, 148, 480, 36, 147, 0, 148, 38, 0,
2923 266, 268, 0, 0, 0, 36, 0, 0, 216, 38,
2924 0, 0, 0, 0, 0, 147, 0, 148, 36, 216,
2925 0, 0, 38, 36, 0, 0, 147, 38, 148, 0,
2926 515, 0, 533, 0, 0, 0, 0, 216, 683, 404,
2927 0, 270, 0, 523, 147, 0, 148, 0, 0, 0,
2928 540, 0, 297, 545, 0, 0, 0, 273, 273, 0,
2929 552, 559, 562, 391, 392, 393, 394, 395, 396, 397,
2930 0, 0, 0, 0, 219, 0, 0, 0, 219, 297,
2931 0, 559, 0, 0, 0, 0, 0, 368, 591, 370,
2932 371, 372, 373, 374, 375, 0, 0, 0, 0, 0,
2933 404, 219, 273, 0, 0, 273, 381, 382, 172, 727,
2934 0, 0, 0, 224, 225, 226, 227, 228, 229, 230,
2935 412, 0, 0, 0, 156, 491, 0, 0, 391, 392,
2936 393, 394, 395, 396, 397, 422, 0, 0, 425, 0,
2937 0, 0, 0, 656, 0, 0, 0, 381, 382, 383,
2938 384, 205, 0, 0, 273, 0, 0, 0, 0, 0,
2939 0, 0, 273, 0, 0, 0, 0, 0, 769, 391,
2940 392, 393, 394, 395, 396, 397, 0, 0, 0, 0,
2941 559, 381, 382, 383, 384, 385, 0, 681, 0, 559,
2942 0, 0, 790, 219, 0, 0, 0, 0, 386, 387,
2943 388, 389, 492, 391, 392, 393, 394, 395, 396, 493,
2944 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2945 0, 273, 0, 0, 0, 0, 0, 0, 219, 0,
2946 0, 0, 0, 381, 382, 383, 384, 497, 498, 499,
2947 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
2948 510, 511, 512, 513, 390, 391, 392, 393, 394, 395,
2949 396, 397, 0, 0, 0, 0, 0, 521, 0, 0,
2950 0, 0, 729, 0, 528, 0, 0, 0, 0, 0,
2951 0, 297, 297, 0, 0, 0, 0, 559, 0, 750,
2952 0, 297, 0, 0, 0, 0, 0, 8, 0, 0,
2953 172, 0, 0, 219, 223, 224, 225, 226, 227, 228,
2954 229, 230, 219, 9, 10, 11, 12, 13, 14, 15,
2955 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
2956 26, 231, 648, 0, 0, 0, 0, 0, 219, 0,
2957 28, 29, 30, 31, 32, 0, 232, 647, 506, 513,
2958 0, 0, 0, 219, 0, 0, 219, 795, 0, 33,
2959 34, 35, 802, 0, 0, 0, 381, 382, 383, 384,
2960 0, 559, 0, 0, 0, 0, 0, 0, 0, 0,
2961 0, 0, 0, 219, 387, 388, 389, 390, 391, 392,
2962 393, 394, 395, 396, 397, 36, 0, 0, 219, 38,
2963 0, 0, 0, 0, 0, 0, 0, 0, 823, 233,
2964 0, 0, 234, 235, 0, 8, 236, 237, 238, 0,
2965 480, 0, 0, 313, 0, 0, 0, 0, 0, 0,
2966 0, 9, 10, 11, 12, 13, 14, 15, 16, 17,
2967 18, 19, 20, 21, 22, 23, 24, 25, 26, 0,
2968 0, 0, 0, 0, 0, 0, 0, 27, 28, 29,
2969 30, 31, 32, 381, 382, 383, 384, 0, 219, 0,
2970 0, 868, 219, 381, 382, 383, 384, 33, 34, 35,
2971 0, 823, 388, 389, 390, 391, 392, 393, 394, 395,
2972 396, 397, 219, 389, 390, 391, 392, 393, 394, 395,
2973 396, 397, 0, 0, 736, 373, 0, 737, 0, 0,
2974 0, 740, 605, 36, -467, 57, 37, 38, 58, 59,
2975 60, 0, 0, 0, 0, 0, 0, 0, 0, 61,
2976 -467, -467, -467, -467, -467, -467, -467, -467, -467, -467,
2977 -467, -467, -467, -467, -467, -467, -467, -467, 862, 0,
2978 0, 606, 63, 0, 0, -467, 0, -467, -467, -467,
2979 -467, -467, 0, 773, 0, 0, 0, 0, 65, 66,
2980 67, 68, 607, 70, 71, 72, -467, -467, -467, 608,
2981 609, 610, 0, 73, 611, 75, 0, 76, 77, 78,
2982 0, 0, 0, 82, 804, 84, 85, 86, 87, 88,
2983 89, 0, 381, 382, 383, 384, 385, 0, 0, 0,
2984 90, 0, -467, 0, 0, 91, -467, -467, 0, 386,
2985 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
2986 397, 0, 0, 8, 0, 612, 172, 0, 0, 0,
2987 223, 224, 225, 226, 227, 228, 229, 230, 837, 9,
2988 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
2989 20, 21, 22, 23, 24, 25, 26, 231, 0, 0,
2990 0, 0, 0, 0, 0, 27, 28, 29, 30, 31,
2991 32, 0, 232, 381, 382, 383, 384, 385, 0, 0,
2992 0, 0, 0, 0, 0, 33, 34, 35, 0, 0,
2993 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
2994 396, 397, 9, 10, 11, 12, 13, 14, 15, 16,
2995 0, 18, 0, 20, 0, 0, 23, 24, 25, 26,
2996 0, 36, 0, 0, 37, 38, 0, 0, 0, 0,
2997 0, 0, 0, 0, 0, 233, 0, 0, 234, 235,
2998 0, 0, 236, 237, 238, 8, 0, 0, 172, 0,
2999 0, 0, 223, 224, 225, 226, 227, 228, 229, 230,
3000 413, 9, 10, 11, 12, 13, 14, 15, 16, 17,
3001 18, 19, 20, 21, 22, 23, 24, 25, 26, 231,
3002 0, 0, 0, 0, 0, 0, 0, 0, 28, 29,
3003 30, 31, 32, 0, 232, 0, 0, 265, 0, 381,
3004 382, 383, 384, 385, 0, 0, 0, 33, 34, 35,
3005 0, 381, 382, 383, 384, 0, 386, 387, 388, 389,
3006 390, 391, 392, 393, 394, 395, 396, 397, 386, 387,
3007 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
3008 0, 295, 0, 36, 172, 0, 0, 38, 0, 224,
3009 225, 226, 227, 228, 229, 230, 0, 233, 0, 0,
3010 234, 235, 0, 0, 236, 237, 238, 8, 0, 0,
3011 172, 0, 0, 0, 223, 224, 225, 226, 227, 228,
3012 229, 230, 530, 9, 10, 11, 12, 13, 14, 15,
3013 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
3014 26, 231, 0, 0, 0, 0, 0, 0, 0, 0,
3015 28, 29, 30, 31, 32, 0, 232, 0, 0, 421,
3016 0, 381, 382, 383, 384, 385, 0, 0, 0, 33,
3017 34, 35, 0, 0, 0, 0, 0, 0, 386, 387,
3018 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
3019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3020 0, 0, 0, 0, 0, 36, 0, 0, 0, 38,
3021 0, 0, 0, 0, 0, 0, 0, 0, 0, 233,
3022 0, 0, 234, 235, 0, 0, 236, 237, 238, 8,
3023 0, 0, 172, 0, 0, 0, 223, 224, 225, 226,
3024 227, 228, 229, 230, 532, 9, 10, 11, 12, 13,
3025 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
3026 24, 25, 26, 231, 0, 0, 0, 0, 0, 0,
3027 0, 0, 28, 29, 30, 31, 32, 0, 232, 0,
3028 0, 424, 0, 381, 382, 383, 384, 385, 0, 0,
3029 0, 33, 34, 35, 0, 0, 0, 0, 0, 0,
3030 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
3031 396, 397, 0, 0, 0, 0, 0, 0, 0, 0,
3032 0, 0, 0, 0, 0, 0, 0, 36, 0, 0,
3033 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
3034 0, 233, 0, 0, 234, 235, 0, 0, 236, 237,
3035 238, 8, 0, 0, 172, 0, 0, 0, 223, 224,
3036 225, 226, 227, 228, 229, 230, 658, 9, 10, 11,
3037 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
3038 22, 23, 24, 25, 26, 231, 0, 0, 0, 0,
3039 0, 0, 0, 0, 28, 29, 30, 31, 32, 0,
3040 232, 0, 0, 527, 0, 381, 382, 383, 384, 385,
3041 0, 0, 0, 33, 34, 35, 0, 0, 0, 0,
3042 0, 0, 386, 387, 388, 389, 390, 391, 392, 393,
3043 394, 395, 396, 397, 0, 0, 0, 0, 0, 0,
3044 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,
3045 0, 0, 0, 38, 0, 0, 0, 0, 0, 0,
3046 0, 0, 0, 233, 0, 0, 234, 235, 0, 0,
3047 236, 237, 238, 8, 0, 0, 172, 0, 0, 0,
3048 223, 224, 225, 226, 227, 228, 229, 230, 662, 9,
3049 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
3050 20, 21, 22, 23, 24, 25, 26, 231, 0, 0,
3051 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
3052 32, 0, 232, 0, 0, 0, 0, 381, 382, 383,
3053 384, 385, 0, 0, 0, 33, 34, 35, 0, 0,
3054 0, 0, 0, 0, 386, 387, 388, 389, 390, 391,
3055 392, 393, 394, 395, 396, 397, 0, 0, 0, 0,
3056 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3057 0, 36, 0, 0, 0, 38, 0, 0, 0, 0,
3058 0, 0, 0, 0, 0, 233, 0, 0, 234, 235,
3059 0, 0, 236, 237, 238, 8, 0, 0, 172, 0,
3060 0, 0, 223, 224, 225, 226, 227, 228, 229, 230,
3061 0, 9, 10, 11, 12, 13, 14, 15, 16, 17,
3062 18, 19, 20, 21, 22, 23, 24, 25, 26, 231,
3063 0, 0, 0, 0, 0, 0, 0, 0, 28, 29,
3064 30, 31, 32, 0, 232, 8, 0, 0, 0, 0,
3065 0, 0, 0, 0, 0, 0, 0, 33, 34, 35,
3066 0, 9, 10, 11, 12, 13, 14, 15, 16, 17,
3067 18, 19, 20, 21, 22, 23, 24, 25, 26, 256,
3068 0, 0, 0, 0, 0, 0, 0, 27, 28, 29,
3069 30, 31, 32, 36, 0, 0, 144, 38, 0, 0,
3070 0, 0, 0, 0, 0, 0, 0, 33, 34, 35,
3071 234, 235, 0, 0, 649, 237, 238, 0, 0, 0,
3072 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3073 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3074 0, 0, 0, 36, 0, 0, 37, 38, 0, 8,
3075 0, 0, 0, 0, 0, 0, 0, 257, 0, 0,
3076 0, 0, 0, 0, 147, 9, 10, 11, 12, 13,
3077 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
3078 24, 25, 26, 256, 0, 0, 0, 0, 0, 0,
3079 0, 27, 28, 29, 30, 31, 32, 0, 0, 0,
3080 144, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3081 8, 33, 34, 35, 0, 0, 0, 0, 0, 0,
3082 0, 0, 0, 0, 0, 0, 9, 10, 11, 12,
3083 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
3084 23, 24, 25, 26, 0, 0, 0, 36, 0, 0,
3085 37, 38, 27, 28, 29, 30, 31, 32, 0, 0,
3086 0, 400, 0, 8, 0, 0, 0, 0, 147, 0,
3087 0, 0, 33, 34, 35, 0, 0, 0, 0, 9,
3088 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
3089 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
3090 0, 0, 0, 0, 0, 0, 0, 655, 36, 31,
3091 32, 37, 38, 0, 0, 0, 0, 0, 0, 0,
3092 0, 0, 352, 0, 0, 33, 34, 35, 0, 147,
3093 381, 382, 383, 384, 385, 0, 0, 0, 0, 0,
3094 0, 0, 0, 0, 0, 0, 0, 386, 387, 388,
3095 389, 390, 391, 392, 393, 394, 395, 396, 397, 0,
3096 0, 36, 0, 0, 0, 38, -2, 56, 0, -467,
3097 57, 0, 0, 58, 59, 60, 0, 0, 0, 0,
3098 0, 0, 147, 0, 61, -467, -467, -467, -467, -467,
3099 -467, -467, -467, -467, -467, -467, -467, -467, -467, -467,
3100 -467, -467, -467, 0, 0, 0, 62, 63, 0, 0,
3101 0, 0, -467, -467, -467, -467, -467, 0, 0, 64,
3102 0, 0, 0, 65, 66, 67, 68, 69, 70, 71,
3103 72, -467, -467, -467, 0, 0, 0, 0, 73, 74,
3104 75, 0, 76, 77, 78, 79, 80, 81, 82, 83,
3105 84, 85, 86, 87, 88, 89, 56, 0, -467, 57,
3106 0, 0, 58, 59, 60, 90, 0, -467, 0, 0,
3107 91, -467, 0, 61, -467, -467, -467, -467, -467, -467,
3108 -467, -467, -467, -467, -467, -467, -467, -467, -467, -467,
3109 -467, -467, 0, 0, 0, 62, 63, 0, 0, 569,
3110 0, -467, -467, -467, -467, -467, 0, 0, 64, 0,
3111 0, 0, 65, 66, 67, 68, 69, 70, 71, 72,
3112 -467, -467, -467, 0, 0, 0, 0, 73, 74, 75,
3113 0, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3114 85, 86, 87, 88, 89, 56, 0, -467, 57, 0,
3115 0, 58, 59, 60, 90, 0, -467, 0, 0, 91,
3116 -467, 0, 61, -467, -467, -467, -467, -467, -467, -467,
3117 -467, -467, -467, -467, -467, -467, -467, -467, -467, -467,
3118 -467, 0, 0, 0, 62, 63, 0, 0, 664, 0,
3119 -467, -467, -467, -467, -467, 0, 0, 64, 0, 0,
3120 0, 65, 66, 67, 68, 69, 70, 71, 72, -467,
3121 -467, -467, 0, 0, 0, 0, 73, 74, 75, 0,
3122 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3123 86, 87, 88, 89, 56, 0, -467, 57, 0, 0,
3124 58, 59, 60, 90, 0, -467, 0, 0, 91, -467,
3125 0, 61, -467, -467, -467, -467, -467, -467, -467, -467,
3126 -467, -467, -467, -467, -467, -467, -467, -467, -467, -467,
3127 0, 0, 0, 62, 63, 0, 0, 680, 0, -467,
3128 -467, -467, -467, -467, 0, 0, 64, 0, 0, 0,
3129 65, 66, 67, 68, 69, 70, 71, 72, -467, -467,
3130 -467, 0, 0, 0, 0, 73, 74, 75, 0, 76,
3131 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3132 87, 88, 89, 56, 0, -467, 57, 0, 0, 58,
3133 59, 60, 90, 0, -467, 0, 0, 91, -467, 0,
3134 61, -467, -467, -467, -467, -467, -467, -467, -467, -467,
3135 -467, -467, -467, -467, -467, -467, -467, -467, -467, 0,
3136 0, 0, 62, 63, 0, 0, 0, 0, -467, -467,
3137 -467, -467, -467, 0, 0, 64, 0, 770, 0, 65,
3138 66, 67, 68, 69, 70, 71, 72, -467, -467, -467,
3139 0, 0, 0, 0, 73, 74, 75, 0, 76, 77,
3140 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3141 88, 89, 7, 0, 8, 0, 0, 0, 0, 0,
3142 0, 90, 0, -467, 0, 0, 91, -467, 0, 0,
3143 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
3144 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3145 0, 0, 0, 0, 0, 0, 27, 28, 29, 30,
3146 31, 32, 51, 0, 8, 0, 0, 0, 0, 0,
3147 0, 0, 0, 0, 0, 0, 33, 34, 35, 0,
3148 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
3149 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3150 0, 0, 0, 0, 0, 0, 27, 28, 29, 30,
3151 31, 32, 36, 0, 0, 37, 38, 0, 0, 0,
3152 0, 0, 177, 0, 178, 0, 33, 34, 35, 0,
3153 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3154 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
3155 19, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3156 0, 0, 36, 0, 0, 37, 38, 28, 29, 30,
3157 31, 32, 0, 8, 0, 0, 0, 0, 0, 0,
3158 0, 0, 0, 0, 0, 0, 33, 34, 35, 9,
3159 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
3160 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
3161 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
3162 32, 0, 36, 8, 0, 0, 38, 0, 0, 0,
3163 0, 0, 0, 0, 0, 220, 34, 35, 0, 9,
3164 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
3165 20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
3166 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
3167 32, 36, 8, 0, 0, 38, 726, 0, 0, 0,
3168 0, 0, 0, 0, 0, 33, 34, 35, 9, 10,
3169 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
3170 21, 22, 23, 24, 25, 26, 0, 0, 0, 0,
3171 0, 0, 0, 0, 27, 28, 29, 30, 31, 32,
3172 0, 36, 8, 0, 0, 38, 726, 0, 0, 0,
3173 0, 0, 0, 0, 33, 34, 35, 0, 9, 10,
3174 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
3175 21, 22, 23, 24, 25, 26, 203, 0, 0, 0,
3176 0, 0, 0, 0, 0, 28, 29, 30, 31, 32,
3177 36, 8, 0, 37, 38, 0, 0, 0, 0, 0,
3178 0, 0, 0, 0, 33, 34, 35, 9, 10, 11,
3179 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
3180 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
3181 0, 0, 0, 0, 28, 29, 30, 31, 32, 0,
3182 36, 8, 0, 0, 38, 0, 0, 0, 0, 0,
3183 0, 0, 0, 220, 34, 35, 0, 9, 10, 11,
3184 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
3185 22, 23, 24, 25, 26, 0, 0, 0, 0, 0,
3186 0, 0, 0, 0, 28, 29, 30, 31, 32, 36,
3187 682, 0, 0, 38, 0, 0, 0, 0, 0, 0,
3188 0, 0, 0, 33, 34, 35, 9, 10, 11, 12,
3189 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
3190 23, 24, 25, 26, 0, 0, 0, 0, 0, 0,
3191 0, 0, 0, 28, 29, 30, 31, 32, 0, 36,
3192 8, 0, 0, 38, 0, 0, 0, 0, 0, 0,
3193 0, 0, 33, 34, 35, 0, 9, 10, 11, 12,
3194 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
3195 23, 24, 25, 26, 0, 0, 0, 0, 0, 0,
3196 0, 0, 0, 0, 0, 0, 31, 32, 36, 0,
3197 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
3198 0, 0, 33, 34, 35, 0, 0, 0, 0, 0,
3199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3201 0, 0, 0, 0, 0, 0, 0, 0, 36, 0,
3205 static const yytype_int16 yycheck[] =
3207 0, 85, 5, 5, 40, 5, 320, 41, 8, 43,
3208 5, 212, 131, 549, 563, 5, 327, 5, 304, 465,
3209 42, 21, 37, 90, 137, 146, 6, 437, 5, 5,
3210 142, 39, 197, 5, 155, 5, 446, 446, 155, 40,
3211 5, 5, 42, 5, 3, 3, 1, 2, 161, 162,
3212 215, 38, 3, 38, 151, 5, 153, 171, 91, 5,
3213 5, 175, 43, 38, 64, 558, 110, 181, 5, 69,
3214 70, 5, 186, 566, 54, 5, 257, 5, 37, 260,
3215 3, 5, 39, 91, 6, 43, 5, 3, 3, 90,
3216 3, 38, 39, 205, 208, 5, 129, 590, 634, 54,
3217 115, 218, 102, 217, 597, 138, 140, 122, 3, 90,
3218 4, 253, 71, 147, 3, 102, 3, 0, 564, 3,
3219 142, 435, 1, 40, 37, 147, 43, 102, 43, 51,
3220 115, 131, 6, 39, 91, 179, 257, 6, 44, 260,
3221 454, 54, 101, 101, 256, 456, 105, 105, 290, 43,
3222 37, 151, 39, 153, 105, 51, 115, 269, 37, 51,
3223 45, 205, 283, 122, 51, 124, 283, 54, 168, 43,
3224 287, 352, 353, 90, 43, 71, 131, 221, 178, 3,
3225 51, 717, 105, 205, 71, 678, 101, 142, 101, 105,
3226 105, 191, 105, 215, 3, 79, 40, 3, 90, 735,
3227 4, 126, 751, 103, 91, 205, 101, 207, 208, 306,
3228 105, 124, 212, 37, 101, 3, 105, 101, 105, 90,
3229 220, 105, 244, 1, 2, 671, 126, 122, 115, 410,
3230 54, 3, 187, 188, 256, 122, 6, 124, 40, 43,
3231 54, 358, 242, 360, 244, 38, 39, 269, 203, 333,
3232 786, 90, 69, 275, 51, 43, 211, 212, 377, 3,
3233 753, 40, 6, 673, 673, 37, 467, 40, 365, 71,
3234 40, 436, 106, 3, 71, 589, 6, 101, 75, 400,
3235 401, 105, 54, 305, 3, 102, 407, 46, 47, 48,
3236 471, 115, 101, 414, 38, 101, 105, 414, 463, 105,
3237 124, 256, 3, 38, 39, 6, 306, 428, 4, 755,
3238 6, 428, 429, 101, 269, 3, 103, 105, 811, 855,
3239 320, 37, 38, 278, 6, 37, 281, 40, 3, 101,
3240 43, 365, 446, 105, 356, 37, 37, 292, 54, 126,
3241 37, 45, 364, 115, 3, 345, 368, 43, 37, 37,
3242 122, 351, 124, 131, 102, 4, 473, 6, 71, 476,
3243 37, 361, 37, 122, 857, 365, 399, 367, 861, 39,
3244 37, 101, 3, 187, 188, 105, 51, 54, 37, 54,
3245 3, 51, 101, 6, 3, 115, 105, 484, 4, 203,
3246 6, 40, 122, 37, 43, 54, 71, 211, 519, 776,
3247 101, 445, 51, 37, 105, 449, 783, 90, 525, 364,
3248 54, 39, 789, 101, 115, 43, 533, 105, 37, 102,
3249 103, 122, 377, 124, 37, 711, 101, 115, 472, 37,
3250 105, 37, 38, 433, 212, 435, 124, 68, 69, 70,
3251 115, 54, 101, 126, 37, 38, 105, 122, 54, 124,
3252 453, 453, 455, 453, 454, 455, 115, 37, 453, 493,
3253 460, 54, 417, 453, 278, 453, 37, 281, 37, 40,
3254 101, 493, 43, 495, 105, 592, 453, 453, 478, 37,
3255 37, 453, 101, 453, 484, 485, 105, 40, 453, 453,
3256 43, 453, 37, 448, 871, 495, 496, 54, 51, 612,
3257 665, 666, 37, 453, 879, 124, 43, 453, 453, 464,
3258 49, 50, 467, 4, 292, 6, 453, 892, 893, 453,
3259 564, 3, 38, 453, 558, 453, 39, 66, 67, 453,
3260 37, 38, 566, 3, 453, 37, 38, 40, 541, 541,
3261 43, 541, 4, 453, 6, 40, 541, 54, 43, 549,
3262 364, 541, 54, 541, 40, 599, 590, 43, 558, 656,
3263 762, 675, 764, 597, 541, 541, 566, 570, 570, 541,
3264 570, 541, 40, 692, 3, 570, 541, 541, 40, 541,
3265 570, 43, 570, 40, 587, 587, 43, 587, 588, 589,
3266 590, 541, 587, 570, 570, 541, 541, 597, 570, 377,
3267 570, 685, 40, 417, 541, 570, 570, 541, 570, 722,
3268 643, 541, 898, 541, 650, 649, 43, 541, 715, 3,
3269 570, 576, 541, 3, 570, 570, 43, 649, 650, 6,
3270 674, 541, 40, 570, 634, 39, 570, 102, 100, 683,
3271 570, 65, 570, 598, 678, 645, 570, 37, 91, 49,
3272 50, 570, 39, 38, 3, 4, 656, 6, 37, 91,
3273 570, 85, 86, 102, 38, 709, 66, 67, 54, 702,
3274 448, 46, 47, 48, 122, 40, 51, 102, 678, 38,
3275 724, 715, 682, 727, 38, 782, 464, 38, 37, 467,
3276 90, 40, 692, 43, 43, 38, 71, 107, 108, 109,
3277 75, 704, 704, 51, 704, 129, 39, 38, 708, 704,
3278 754, 38, 712, 668, 704, 715, 704, 717, 3, 753,
3279 46, 47, 48, 3, 40, 769, 38, 704, 704, 39,
3280 40, 828, 704, 43, 704, 735, 38, 692, 38, 704,
3281 704, 38, 704, 38, 38, 3, 91, 39, 18, 75,
3282 102, 100, 101, 753, 704, 710, 105, 37, 704, 704,
3283 38, 716, 576, 46, 47, 48, 115, 704, 790, 791,
3284 704, 41, 33, 122, 704, 124, 704, 811, 40, 37,
3285 704, 42, 782, 102, 598, 704, 786, 48, 43, 63,
3286 38, 102, 747, 793, 704, 839, 54, 797, 102, 843,
3287 38, 801, 72, 73, 74, 40, 40, 77, 38, 40,
3288 84, 811, 120, 121, 122, 89, 101, 78, 79, 863,
3289 105, 101, 43, 857, 37, 105, 44, 861, 828, 40,
3290 115, 38, 3, 788, 104, 115, 791, 122, 37, 839,
3291 840, 43, 876, 101, 124, 879, 38, 105, 39, 110,
3292 39, 37, 807, 51, 668, 855, 38, 857, 892, 893,
3293 37, 861, 126, 863, 90, 44, 124, 51, 37, 46,
3294 47, 48, 124, 43, 51, 830, 876, 3, 833, 879,
3295 44, 142, 3, 18, 71, 146, 71, 148, 71, 44,
3296 38, 38, 892, 893, 155, 73, 710, 171, 75, 44,
3297 174, 175, 716, 327, 859, 860, 41, 181, 37, 333,
3298 75, 37, 186, 38, 692, 3, 37, 40, 179, 40,
3299 38, 182, 71, 197, 40, 38, 37, 39, 189, 3,
3300 40, 3, 38, 747, 208, 209, 3, 72, 73, 74,
3301 214, 215, 77, 217, 205, 369, 118, 119, 120, 121,
3302 122, 3, 213, 37, 215, 216, 39, 218, 40, 220,
3303 221, 222, 40, 37, 91, 37, 40, 38, 38, 37,
3304 37, 40, 37, 3, 788, 101, 40, 791, 44, 105,
3305 101, 3, 54, 244, 105, 37, 3, 38, 40, 115,
3306 40, 40, 39, 807, 115, 256, 257, 38, 124, 260,
3307 44, 122, 37, 124, 37, 460, 3, 37, 269, 270,
3308 38, 38, 587, 38, 40, 37, 830, 3, 40, 833,
3309 37, 40, 283, 38, 54, 38, 287, 101, 38, 101,
3310 3, 105, 456, 105, 101, 3, 40, 40, 105, 40,
3311 37, 115, 437, 115, 305, 859, 860, 715, 122, 101,
3312 124, 37, 124, 105, 587, 467, 588, 124, 319, 587,
3313 587, 433, 863, 115, 37, 692, 496, 495, 377, 37,
3314 122, 101, 124, 708, 46, 105, 840, 797, 801, 101,
3315 861, 54, 21, 105, 101, 115, 852, -1, 105, 573,
3316 -1, 352, 353, 115, 124, 356, -1, 358, 115, 360,
3317 122, -1, 124, 364, 101, 122, -1, 124, 105, -1,
3318 144, 145, -1, -1, -1, 101, -1, -1, 115, 105,
3319 -1, -1, -1, -1, -1, 122, -1, 124, 101, 115,
3320 -1, -1, 105, 101, -1, -1, 122, 105, 124, -1,
3321 401, -1, 115, -1, -1, -1, -1, 115, 572, 410,
3322 -1, 124, -1, 414, 122, -1, 124, -1, -1, -1,
3323 434, -1, 436, 437, -1, -1, -1, 428, 429, -1,
3324 444, 445, 446, 116, 117, 118, 119, 120, 121, 122,
3325 -1, -1, -1, -1, 445, -1, -1, -1, 449, 463,
3326 -1, 465, -1, -1, -1, -1, -1, 231, 472, 233,
3327 234, 235, 236, 237, 238, -1, -1, -1, -1, -1,
3328 471, 472, 473, -1, -1, 476, 94, 95, 6, 643,
3329 -1, -1, -1, 11, 12, 13, 14, 15, 16, 17,
3330 264, -1, -1, -1, 495, 38, -1, -1, 116, 117,
3331 118, 119, 120, 121, 122, 279, -1, -1, 282, -1,
3332 -1, -1, -1, 514, -1, -1, -1, 94, 95, 96,
3333 97, 685, -1, -1, 525, -1, -1, -1, -1, -1,
3334 -1, -1, 533, -1, -1, -1, -1, -1, 702, 116,
3335 117, 118, 119, 120, 121, 122, -1, -1, -1, -1,
3336 564, 94, 95, 96, 97, 98, -1, 571, -1, 573,
3337 -1, -1, 726, 564, -1, -1, -1, -1, 111, 112,
3338 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
3339 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3340 -1, 592, -1, -1, -1, -1, -1, -1, 599, -1,
3341 -1, -1, -1, 94, 95, 96, 97, 381, 382, 383,
3342 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
3343 394, 395, 396, 397, 115, 116, 117, 118, 119, 120,
3344 121, 122, -1, -1, -1, -1, -1, 411, -1, -1,
3345 -1, -1, 643, -1, 418, -1, -1, -1, -1, -1,
3346 -1, 665, 666, -1, -1, -1, -1, 671, -1, 673,
3347 -1, 675, -1, -1, -1, -1, -1, 3, -1, -1,
3348 6, -1, -1, 674, 10, 11, 12, 13, 14, 15,
3349 16, 17, 683, 19, 20, 21, 22, 23, 24, 25,
3350 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
3351 36, 37, 38, -1, -1, -1, -1, -1, 709, -1,
3352 46, 47, 48, 49, 50, -1, 52, 491, 492, 493,
3353 -1, -1, -1, 724, -1, -1, 727, 728, -1, 65,
3354 66, 67, 733, -1, -1, -1, 94, 95, 96, 97,
3355 -1, 755, -1, -1, -1, -1, -1, -1, -1, -1,
3356 -1, -1, -1, 754, 112, 113, 114, 115, 116, 117,
3357 118, 119, 120, 121, 122, 101, -1, -1, 769, 105,
3358 -1, -1, -1, -1, -1, -1, -1, -1, 779, 115,
3359 -1, -1, 118, 119, -1, 3, 122, 123, 124, -1,
3360 791, -1, -1, 11, -1, -1, -1, -1, -1, -1,
3361 -1, 19, 20, 21, 22, 23, 24, 25, 26, 27,
3362 28, 29, 30, 31, 32, 33, 34, 35, 36, -1,
3363 -1, -1, -1, -1, -1, -1, -1, 45, 46, 47,
3364 48, 49, 50, 94, 95, 96, 97, -1, 839, -1,
3365 -1, 842, 843, 94, 95, 96, 97, 65, 66, 67,
3366 -1, 852, 113, 114, 115, 116, 117, 118, 119, 120,
3367 121, 122, 863, 114, 115, 116, 117, 118, 119, 120,
3368 121, 122, -1, -1, 648, 649, -1, 651, -1, -1,
3369 -1, 655, 1, 101, 3, 4, 104, 105, 7, 8,
3370 9, -1, -1, -1, -1, -1, -1, -1, -1, 18,
3371 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
3372 29, 30, 31, 32, 33, 34, 35, 36, 40, -1,
3373 -1, 40, 41, -1, -1, 44, -1, 46, 47, 48,
3374 49, 50, -1, 707, -1, -1, -1, -1, 57, 58,
3375 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
3376 69, 70, -1, 72, 73, 74, -1, 76, 77, 78,
3377 -1, -1, -1, 82, 738, 84, 85, 86, 87, 88,
3378 89, -1, 94, 95, 96, 97, 98, -1, -1, -1,
3379 99, -1, 101, -1, -1, 104, 105, 106, -1, 111,
3380 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
3381 122, -1, -1, 3, -1, 124, 6, -1, -1, -1,
3382 10, 11, 12, 13, 14, 15, 16, 17, 792, 19,
3383 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
3384 30, 31, 32, 33, 34, 35, 36, 37, -1, -1,
3385 -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
3386 50, -1, 52, 94, 95, 96, 97, 98, -1, -1,
3387 -1, -1, -1, -1, -1, 65, 66, 67, -1, -1,
3388 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
3389 121, 122, 19, 20, 21, 22, 23, 24, 25, 26,
3390 -1, 28, -1, 30, -1, -1, 33, 34, 35, 36,
3391 -1, 101, -1, -1, 104, 105, -1, -1, -1, -1,
3392 -1, -1, -1, -1, -1, 115, -1, -1, 118, 119,
3393 -1, -1, 122, 123, 124, 3, -1, -1, 6, -1,
3394 -1, -1, 10, 11, 12, 13, 14, 15, 16, 17,
3395 55, 19, 20, 21, 22, 23, 24, 25, 26, 27,
3396 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
3397 -1, -1, -1, -1, -1, -1, -1, -1, 46, 47,
3398 48, 49, 50, -1, 52, -1, -1, 55, -1, 94,
3399 95, 96, 97, 98, -1, -1, -1, 65, 66, 67,
3400 -1, 94, 95, 96, 97, -1, 111, 112, 113, 114,
3401 115, 116, 117, 118, 119, 120, 121, 122, 111, 112,
3402 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
3403 -1, 3, -1, 101, 6, -1, -1, 105, -1, 11,
3404 12, 13, 14, 15, 16, 17, -1, 115, -1, -1,
3405 118, 119, -1, -1, 122, 123, 124, 3, -1, -1,
3406 6, -1, -1, -1, 10, 11, 12, 13, 14, 15,
3407 16, 17, 55, 19, 20, 21, 22, 23, 24, 25,
3408 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
3409 36, 37, -1, -1, -1, -1, -1, -1, -1, -1,
3410 46, 47, 48, 49, 50, -1, 52, -1, -1, 55,
3411 -1, 94, 95, 96, 97, 98, -1, -1, -1, 65,
3412 66, 67, -1, -1, -1, -1, -1, -1, 111, 112,
3413 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
3414 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3415 -1, -1, -1, -1, -1, 101, -1, -1, -1, 105,
3416 -1, -1, -1, -1, -1, -1, -1, -1, -1, 115,
3417 -1, -1, 118, 119, -1, -1, 122, 123, 124, 3,
3418 -1, -1, 6, -1, -1, -1, 10, 11, 12, 13,
3419 14, 15, 16, 17, 55, 19, 20, 21, 22, 23,
3420 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3421 34, 35, 36, 37, -1, -1, -1, -1, -1, -1,
3422 -1, -1, 46, 47, 48, 49, 50, -1, 52, -1,
3423 -1, 55, -1, 94, 95, 96, 97, 98, -1, -1,
3424 -1, 65, 66, 67, -1, -1, -1, -1, -1, -1,
3425 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
3426 121, 122, -1, -1, -1, -1, -1, -1, -1, -1,
3427 -1, -1, -1, -1, -1, -1, -1, 101, -1, -1,
3428 -1, 105, -1, -1, -1, -1, -1, -1, -1, -1,
3429 -1, 115, -1, -1, 118, 119, -1, -1, 122, 123,
3430 124, 3, -1, -1, 6, -1, -1, -1, 10, 11,
3431 12, 13, 14, 15, 16, 17, 55, 19, 20, 21,
3432 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3433 32, 33, 34, 35, 36, 37, -1, -1, -1, -1,
3434 -1, -1, -1, -1, 46, 47, 48, 49, 50, -1,
3435 52, -1, -1, 55, -1, 94, 95, 96, 97, 98,
3436 -1, -1, -1, 65, 66, 67, -1, -1, -1, -1,
3437 -1, -1, 111, 112, 113, 114, 115, 116, 117, 118,
3438 119, 120, 121, 122, -1, -1, -1, -1, -1, -1,
3439 -1, -1, -1, -1, -1, -1, -1, -1, -1, 101,
3440 -1, -1, -1, 105, -1, -1, -1, -1, -1, -1,
3441 -1, -1, -1, 115, -1, -1, 118, 119, -1, -1,
3442 122, 123, 124, 3, -1, -1, 6, -1, -1, -1,
3443 10, 11, 12, 13, 14, 15, 16, 17, 55, 19,
3444 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
3445 30, 31, 32, 33, 34, 35, 36, 37, -1, -1,
3446 -1, -1, -1, -1, -1, -1, 46, 47, 48, 49,
3447 50, -1, 52, -1, -1, -1, -1, 94, 95, 96,
3448 97, 98, -1, -1, -1, 65, 66, 67, -1, -1,
3449 -1, -1, -1, -1, 111, 112, 113, 114, 115, 116,
3450 117, 118, 119, 120, 121, 122, -1, -1, -1, -1,
3451 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3452 -1, 101, -1, -1, -1, 105, -1, -1, -1, -1,
3453 -1, -1, -1, -1, -1, 115, -1, -1, 118, 119,
3454 -1, -1, 122, 123, 124, 3, -1, -1, 6, -1,
3455 -1, -1, 10, 11, 12, 13, 14, 15, 16, 17,
3456 -1, 19, 20, 21, 22, 23, 24, 25, 26, 27,
3457 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
3458 -1, -1, -1, -1, -1, -1, -1, -1, 46, 47,
3459 48, 49, 50, -1, 52, 3, -1, -1, -1, -1,
3460 -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
3461 -1, 19, 20, 21, 22, 23, 24, 25, 26, 27,
3462 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
3463 -1, -1, -1, -1, -1, -1, -1, 45, 46, 47,
3464 48, 49, 50, 101, -1, -1, 54, 105, -1, -1,
3465 -1, -1, -1, -1, -1, -1, -1, 65, 66, 67,
3466 118, 119, -1, -1, 122, 123, 124, -1, -1, -1,
3467 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3469 -1, -1, -1, 101, -1, -1, 104, 105, -1, 3,
3470 -1, -1, -1, -1, -1, -1, -1, 115, -1, -1,
3471 -1, -1, -1, -1, 122, 19, 20, 21, 22, 23,
3472 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3473 34, 35, 36, 37, -1, -1, -1, -1, -1, -1,
3474 -1, 45, 46, 47, 48, 49, 50, -1, -1, -1,
3475 54, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3476 3, 65, 66, 67, -1, -1, -1, -1, -1, -1,
3477 -1, -1, -1, -1, -1, -1, 19, 20, 21, 22,
3478 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
3479 33, 34, 35, 36, -1, -1, -1, 101, -1, -1,
3480 104, 105, 45, 46, 47, 48, 49, 50, -1, -1,
3481 -1, 115, -1, 3, -1, -1, -1, -1, 122, -1,
3482 -1, -1, 65, 66, 67, -1, -1, -1, -1, 19,
3483 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
3484 30, 31, 32, 33, 34, 35, 36, -1, -1, -1,
3485 -1, -1, -1, -1, -1, -1, -1, 71, 101, 49,
3486 50, 104, 105, -1, -1, -1, -1, -1, -1, -1,
3487 -1, -1, 115, -1, -1, 65, 66, 67, -1, 122,
3488 94, 95, 96, 97, 98, -1, -1, -1, -1, -1,
3489 -1, -1, -1, -1, -1, -1, -1, 111, 112, 113,
3490 114, 115, 116, 117, 118, 119, 120, 121, 122, -1,
3491 -1, 101, -1, -1, -1, 105, 0, 1, -1, 3,
3492 4, -1, -1, 7, 8, 9, -1, -1, -1, -1,
3493 -1, -1, 122, -1, 18, 19, 20, 21, 22, 23,
3494 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
3495 34, 35, 36, -1, -1, -1, 40, 41, -1, -1,
3496 -1, -1, 46, 47, 48, 49, 50, -1, -1, 53,
3497 -1, -1, -1, 57, 58, 59, 60, 61, 62, 63,
3498 64, 65, 66, 67, -1, -1, -1, -1, 72, 73,
3499 74, -1, 76, 77, 78, 79, 80, 81, 82, 83,
3500 84, 85, 86, 87, 88, 89, 1, -1, 3, 4,
3501 -1, -1, 7, 8, 9, 99, -1, 101, -1, -1,
3502 104, 105, -1, 18, 19, 20, 21, 22, 23, 24,
3503 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
3504 35, 36, -1, -1, -1, 40, 41, -1, -1, 44,
3505 -1, 46, 47, 48, 49, 50, -1, -1, 53, -1,
3506 -1, -1, 57, 58, 59, 60, 61, 62, 63, 64,
3507 65, 66, 67, -1, -1, -1, -1, 72, 73, 74,
3508 -1, 76, 77, 78, 79, 80, 81, 82, 83, 84,
3509 85, 86, 87, 88, 89, 1, -1, 3, 4, -1,
3510 -1, 7, 8, 9, 99, -1, 101, -1, -1, 104,
3511 105, -1, 18, 19, 20, 21, 22, 23, 24, 25,
3512 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
3513 36, -1, -1, -1, 40, 41, -1, -1, 44, -1,
3514 46, 47, 48, 49, 50, -1, -1, 53, -1, -1,
3515 -1, 57, 58, 59, 60, 61, 62, 63, 64, 65,
3516 66, 67, -1, -1, -1, -1, 72, 73, 74, -1,
3517 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3518 86, 87, 88, 89, 1, -1, 3, 4, -1, -1,
3519 7, 8, 9, 99, -1, 101, -1, -1, 104, 105,
3520 -1, 18, 19, 20, 21, 22, 23, 24, 25, 26,
3521 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
3522 -1, -1, -1, 40, 41, -1, -1, 44, -1, 46,
3523 47, 48, 49, 50, -1, -1, 53, -1, -1, -1,
3524 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
3525 67, -1, -1, -1, -1, 72, 73, 74, -1, 76,
3526 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3527 87, 88, 89, 1, -1, 3, 4, -1, -1, 7,
3528 8, 9, 99, -1, 101, -1, -1, 104, 105, -1,
3529 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
3530 28, 29, 30, 31, 32, 33, 34, 35, 36, -1,
3531 -1, -1, 40, 41, -1, -1, -1, -1, 46, 47,
3532 48, 49, 50, -1, -1, 53, -1, 55, -1, 57,
3533 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
3534 -1, -1, -1, -1, 72, 73, 74, -1, 76, 77,
3535 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3536 88, 89, 1, -1, 3, -1, -1, -1, -1, -1,
3537 -1, 99, -1, 101, -1, -1, 104, 105, -1, -1,
3538 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
3539 29, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3540 -1, -1, -1, -1, -1, -1, 45, 46, 47, 48,
3541 49, 50, 1, -1, 3, -1, -1, -1, -1, -1,
3542 -1, -1, -1, -1, -1, -1, 65, 66, 67, -1,
3543 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
3544 29, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3545 -1, -1, -1, -1, -1, -1, 45, 46, 47, 48,
3546 49, 50, 101, -1, -1, 104, 105, -1, -1, -1,
3547 -1, -1, 1, -1, 3, -1, 65, 66, 67, -1,
3548 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3549 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
3550 29, 30, 31, 32, 33, 34, 35, 36, -1, -1,
3551 -1, -1, 101, -1, -1, 104, 105, 46, 47, 48,
3552 49, 50, -1, 3, -1, -1, -1, -1, -1, -1,
3553 -1, -1, -1, -1, -1, -1, 65, 66, 67, 19,
3554 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
3555 30, 31, 32, 33, 34, 35, 36, -1, -1, -1,
3556 -1, -1, -1, -1, -1, -1, 46, 47, 48, 49,
3557 50, -1, 101, 3, -1, -1, 105, -1, -1, -1,
3558 -1, -1, -1, -1, -1, 65, 66, 67, -1, 19,
3559 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
3560 30, 31, 32, 33, 34, 35, 36, -1, -1, -1,
3561 -1, -1, -1, -1, -1, -1, 46, 47, 48, 49,
3562 50, 101, 3, -1, -1, 105, 106, -1, -1, -1,
3563 -1, -1, -1, -1, -1, 65, 66, 67, 19, 20,
3564 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
3565 31, 32, 33, 34, 35, 36, -1, -1, -1, -1,
3566 -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
3567 -1, 101, 3, -1, -1, 105, 106, -1, -1, -1,
3568 -1, -1, -1, -1, 65, 66, 67, -1, 19, 20,
3569 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
3570 31, 32, 33, 34, 35, 36, 37, -1, -1, -1,
3571 -1, -1, -1, -1, -1, 46, 47, 48, 49, 50,
3572 101, 3, -1, 104, 105, -1, -1, -1, -1, -1,
3573 -1, -1, -1, -1, 65, 66, 67, 19, 20, 21,
3574 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3575 32, 33, 34, 35, 36, -1, -1, -1, -1, -1,
3576 -1, -1, -1, -1, 46, 47, 48, 49, 50, -1,
3577 101, 3, -1, -1, 105, -1, -1, -1, -1, -1,
3578 -1, -1, -1, 65, 66, 67, -1, 19, 20, 21,
3579 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
3580 32, 33, 34, 35, 36, -1, -1, -1, -1, -1,
3581 -1, -1, -1, -1, 46, 47, 48, 49, 50, 101,
3582 3, -1, -1, 105, -1, -1, -1, -1, -1, -1,
3583 -1, -1, -1, 65, 66, 67, 19, 20, 21, 22,
3584 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
3585 33, 34, 35, 36, -1, -1, -1, -1, -1, -1,
3586 -1, -1, -1, 46, 47, 48, 49, 50, -1, 101,
3587 3, -1, -1, 105, -1, -1, -1, -1, -1, -1,
3588 -1, -1, 65, 66, 67, -1, 19, 20, 21, 22,
3589 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
3590 33, 34, 35, 36, -1, -1, -1, -1, -1, -1,
3591 -1, -1, -1, -1, -1, -1, 49, 50, 101, -1,
3592 -1, -1, 105, -1, -1, -1, -1, -1, -1, -1,
3593 -1, -1, 65, 66, 67, -1, -1, -1, -1, -1,
3594 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3595 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3596 -1, -1, -1, -1, -1, -1, -1, -1, 101, -1,
3600 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
3601 symbol of state STATE-NUM. */
3602 static const yytype_uint16 yystos[] =
3604 0, 107, 108, 109, 128, 129, 274, 1, 3, 19,
3605 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
3606 30, 31, 32, 33, 34, 35, 36, 45, 46, 47,
3607 48, 49, 50, 65, 66, 67, 101, 104, 105, 215,
3608 229, 230, 232, 233, 234, 235, 236, 253, 254, 264,
3609 266, 1, 215, 1, 37, 0, 1, 4, 7, 8,
3610 9, 18, 40, 41, 53, 57, 58, 59, 60, 61,
3611 62, 63, 64, 72, 73, 74, 76, 77, 78, 79,
3612 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3613 99, 104, 130, 131, 132, 134, 135, 136, 137, 138,
3614 141, 142, 144, 145, 146, 147, 148, 149, 150, 153,
3615 154, 155, 158, 160, 165, 166, 167, 168, 170, 173,
3616 174, 175, 176, 177, 181, 182, 189, 190, 200, 211,
3617 274, 90, 261, 274, 261, 45, 264, 126, 90, 40,
3618 233, 229, 37, 51, 54, 71, 115, 122, 124, 220,
3619 221, 223, 225, 226, 227, 228, 264, 274, 229, 235,
3620 264, 103, 126, 265, 40, 40, 212, 213, 215, 274,
3621 106, 37, 6, 269, 37, 271, 274, 1, 3, 231,
3622 232, 37, 271, 37, 152, 274, 37, 37, 37, 79,
3623 264, 3, 43, 264, 37, 4, 43, 37, 37, 40,
3624 43, 4, 269, 37, 164, 231, 162, 164, 37, 37,
3625 269, 37, 90, 254, 271, 37, 115, 223, 228, 264,
3626 65, 231, 254, 10, 11, 12, 13, 14, 15, 16,
3627 17, 37, 52, 115, 118, 119, 122, 123, 124, 215,
3628 216, 217, 219, 231, 232, 243, 244, 245, 246, 269,
3629 274, 45, 105, 266, 254, 229, 37, 115, 212, 226,
3630 228, 264, 43, 237, 238, 55, 243, 244, 243, 37,
3631 124, 224, 227, 264, 228, 229, 264, 220, 37, 54,
3632 220, 37, 54, 115, 224, 227, 264, 102, 266, 105,
3633 266, 38, 39, 214, 274, 3, 262, 269, 6, 43,
3634 262, 272, 262, 40, 51, 37, 223, 38, 262, 264,
3635 3, 3, 262, 11, 159, 212, 212, 264, 40, 51,
3636 192, 43, 3, 161, 272, 3, 212, 43, 222, 223,
3637 226, 274, 40, 39, 163, 274, 262, 263, 274, 139,
3638 140, 269, 212, 185, 186, 187, 215, 253, 274, 264,
3639 269, 3, 115, 228, 264, 272, 37, 262, 115, 264,
3640 102, 3, 239, 274, 37, 223, 43, 264, 243, 37,
3641 243, 243, 243, 243, 243, 243, 91, 39, 218, 274,
3642 37, 94, 95, 96, 97, 98, 111, 112, 113, 114,
3643 115, 116, 117, 118, 119, 120, 121, 122, 265, 91,
3644 115, 228, 264, 225, 264, 38, 38, 115, 225, 264,
3645 102, 54, 243, 55, 228, 264, 264, 37, 54, 228,
3646 212, 55, 243, 212, 55, 243, 224, 227, 102, 115,
3647 224, 265, 40, 215, 38, 169, 39, 51, 38, 237,
3648 220, 38, 43, 38, 51, 38, 39, 157, 39, 38,
3649 38, 40, 264, 129, 191, 38, 38, 38, 38, 162,
3650 164, 38, 38, 39, 43, 38, 91, 39, 188, 274,
3651 54, 102, 38, 228, 264, 40, 102, 40, 43, 212,
3652 264, 75, 172, 220, 229, 179, 40, 71, 247, 248,
3653 274, 38, 115, 122, 228, 231, 219, 243, 243, 243,
3654 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
3655 243, 243, 243, 243, 254, 264, 102, 38, 38, 102,
3656 225, 243, 224, 264, 38, 102, 212, 55, 243, 38,
3657 55, 38, 55, 115, 224, 227, 224, 214, 4, 43,
3658 269, 129, 272, 139, 245, 269, 273, 40, 40, 133,
3659 4, 151, 269, 4, 40, 43, 100, 156, 223, 269,
3660 270, 262, 269, 273, 38, 215, 223, 43, 40, 44,
3661 129, 41, 211, 162, 40, 43, 37, 44, 163, 3,
3662 101, 105, 267, 40, 272, 215, 156, 183, 187, 143,
3663 223, 269, 102, 3, 240, 241, 274, 38, 37, 39,
3664 40, 43, 171, 75, 220, 1, 40, 61, 68, 69,
3665 70, 73, 124, 134, 135, 136, 137, 141, 142, 146,
3666 148, 150, 153, 155, 158, 160, 165, 166, 167, 168,
3667 181, 182, 189, 193, 196, 197, 198, 199, 200, 201,
3668 202, 207, 210, 211, 274, 249, 43, 243, 38, 122,
3669 229, 38, 115, 221, 218, 71, 264, 38, 55, 38,
3670 224, 38, 55, 224, 44, 39, 39, 193, 37, 75,
3671 229, 256, 274, 51, 38, 39, 157, 156, 223, 256,
3672 44, 269, 3, 231, 40, 51, 270, 212, 103, 126,
3673 268, 126, 90, 38, 44, 170, 177, 181, 182, 184,
3674 197, 199, 211, 188, 129, 256, 40, 51, 39, 44,
3675 37, 51, 256, 257, 212, 223, 37, 195, 43, 71,
3676 71, 71, 124, 266, 44, 193, 106, 231, 254, 264,
3677 73, 250, 251, 255, 274, 178, 243, 243, 38, 38,
3678 243, 220, 38, 272, 272, 44, 212, 37, 75, 156,
3679 269, 273, 40, 223, 38, 256, 40, 40, 223, 164,
3680 38, 3, 3, 105, 3, 105, 216, 4, 43, 231,
3681 55, 40, 242, 243, 241, 40, 223, 212, 237, 71,
3682 258, 274, 38, 172, 212, 193, 194, 266, 37, 223,
3683 231, 37, 71, 3, 43, 264, 40, 39, 68, 69,
3684 70, 252, 264, 193, 243, 38, 212, 37, 157, 256,
3685 40, 223, 156, 40, 40, 268, 268, 91, 171, 38,
3686 40, 259, 260, 264, 40, 43, 220, 171, 38, 193,
3687 37, 212, 171, 37, 115, 228, 212, 243, 43, 204,
3688 71, 251, 255, 44, 40, 38, 212, 40, 256, 40,
3689 40, 43, 39, 37, 220, 44, 212, 38, 212, 37,
3690 37, 38, 40, 203, 206, 223, 274, 250, 264, 40,
3691 180, 223, 38, 40, 260, 193, 38, 208, 256, 38,
3692 212, 212, 257, 206, 40, 43, 171, 209, 256, 40,
3693 43, 209, 38, 38, 40, 205, 40, 43, 51, 209,
3697 #define yyerrok (yyerrstatus = 0)
3698 #define yyclearin (yychar = YYEMPTY)
3699 #define YYEMPTY (-2)
3702 #define YYACCEPT goto yyacceptlab
3703 #define YYABORT goto yyabortlab
3704 #define YYERROR goto yyerrorlab
3707 /* Like YYERROR except do call yyerror. This remains here temporarily
3708 to ease the transition to the new meaning of YYERROR, for GCC.
3709 Once GCC version 2 has supplanted version 1, this can go. */
3711 #define YYFAIL goto yyerrlab
3713 #define YYRECOVERING() (!!yyerrstatus)
3715 #define YYBACKUP(Token, Value) \
3717 if (yychar == YYEMPTY && yylen == 1) \
3721 yytoken = YYTRANSLATE (yychar); \
3727 yyerror (YY_("syntax error: cannot back up")); \
3734 #define YYERRCODE 256
3737 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
3738 If N is 0, then set CURRENT to the empty location which ends
3739 the previous symbol: RHS[0] (always defined). */
3741 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
3742 #ifndef YYLLOC_DEFAULT
3743 # define YYLLOC_DEFAULT(Current, Rhs, N) \
3747 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
3748 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
3749 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
3750 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
3754 (Current).first_line = (Current).last_line = \
3755 YYRHSLOC (Rhs, 0).last_line; \
3756 (Current).first_column = (Current).last_column = \
3757 YYRHSLOC (Rhs, 0).last_column; \
3763 /* YY_LOCATION_PRINT -- Print the location on the stream.
3764 This macro was not mandated originally: define only if we know
3765 we won't break user code: when these are the locations we know. */
3767 #ifndef YY_LOCATION_PRINT
3768 # if YYLTYPE_IS_TRIVIAL
3769 # define YY_LOCATION_PRINT(File, Loc) \
3770 fprintf (File, "%d.%d-%d.%d", \
3771 (Loc).first_line, (Loc).first_column, \
3772 (Loc).last_line, (Loc).last_column)
3774 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
3779 /* YYLEX -- calling `yylex' with the right arguments. */
3782 # define YYLEX yylex (YYLEX_PARAM)
3784 # define YYLEX yylex ()
3787 /* Enable debugging if requested. */
3791 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
3792 # define YYFPRINTF fprintf
3795 # define YYDPRINTF(Args) \
3801 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
3805 YYFPRINTF (stderr, "%s ", Title); \
3806 yy_symbol_print (stderr, \
3808 YYFPRINTF (stderr, "\n"); \
3813 /*--------------------------------.
3814 | Print this symbol on YYOUTPUT. |
3815 `--------------------------------*/
3818 #if (defined __STDC__ || defined __C99__FUNC__ \
3819 || defined __cplusplus || defined _MSC_VER)
3821 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3824 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
3827 YYSTYPE const * const yyvaluep;
3833 if (yytype < YYNTOKENS)
3834 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
3846 /*--------------------------------.
3847 | Print this symbol on YYOUTPUT. |
3848 `--------------------------------*/
3850 #if (defined __STDC__ || defined __C99__FUNC__ \
3851 || defined __cplusplus || defined _MSC_VER)
3853 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
3856 yy_symbol_print (yyoutput, yytype, yyvaluep)
3859 YYSTYPE const * const yyvaluep;
3862 if (yytype < YYNTOKENS)
3863 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
3865 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
3867 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
3868 YYFPRINTF (yyoutput, ")");
3871 /*------------------------------------------------------------------.
3872 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
3874 `------------------------------------------------------------------*/
3876 #if (defined __STDC__ || defined __C99__FUNC__ \
3877 || defined __cplusplus || defined _MSC_VER)
3879 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
3882 yy_stack_print (bottom, top)
3883 yytype_int16 *bottom;
3887 YYFPRINTF (stderr, "Stack now");
3888 for (; bottom <= top; ++bottom)
3889 YYFPRINTF (stderr, " %d", *bottom);
3890 YYFPRINTF (stderr, "\n");
3893 # define YY_STACK_PRINT(Bottom, Top) \
3896 yy_stack_print ((Bottom), (Top)); \
3900 /*------------------------------------------------.
3901 | Report that the YYRULE is going to be reduced. |
3902 `------------------------------------------------*/
3904 #if (defined __STDC__ || defined __C99__FUNC__ \
3905 || defined __cplusplus || defined _MSC_VER)
3907 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
3910 yy_reduce_print (yyvsp, yyrule)
3915 int yynrhs = yyr2[yyrule];
3917 unsigned long int yylno = yyrline[yyrule];
3918 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
3920 /* The symbols being reduced. */
3921 for (yyi = 0; yyi < yynrhs; yyi++)
3923 fprintf (stderr, " $%d = ", yyi + 1);
3924 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
3925 &(yyvsp[(yyi + 1) - (yynrhs)])
3927 fprintf (stderr, "\n");
3931 # define YY_REDUCE_PRINT(Rule) \
3934 yy_reduce_print (yyvsp, Rule); \
3937 /* Nonzero means print parse trace. It is left uninitialized so that
3938 multiple parsers can coexist. */
3940 #else /* !YYDEBUG */
3941 # define YYDPRINTF(Args)
3942 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
3943 # define YY_STACK_PRINT(Bottom, Top)
3944 # define YY_REDUCE_PRINT(Rule)
3945 #endif /* !YYDEBUG */
3948 /* YYINITDEPTH -- initial size of the parser's stacks. */
3950 # define YYINITDEPTH 200
3953 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
3954 if the built-in stack extension method is used).
3956 Do not make this value too large; the results are undefined if
3957 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
3958 evaluated with infinite-precision integer arithmetic. */
3961 # define YYMAXDEPTH 10000
3969 # if defined __GLIBC__ && defined _STRING_H
3970 # define yystrlen strlen
3972 /* Return the length of YYSTR. */
3973 #if (defined __STDC__ || defined __C99__FUNC__ \
3974 || defined __cplusplus || defined _MSC_VER)
3976 yystrlen (const char *yystr)
3984 for (yylen = 0; yystr[yylen]; yylen++)
3992 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
3993 # define yystpcpy stpcpy
3995 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
3997 #if (defined __STDC__ || defined __C99__FUNC__ \
3998 || defined __cplusplus || defined _MSC_VER)
4000 yystpcpy (char *yydest, const char *yysrc)
4003 yystpcpy (yydest, yysrc)
4009 const char *yys = yysrc;
4011 while ((*yyd++ = *yys++) != '\0')
4020 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
4021 quotes and backslashes, so that it's suitable for yyerror. The
4022 heuristic is that double-quoting is unnecessary unless the string
4023 contains an apostrophe, a comma, or backslash (other than
4024 backslash-backslash). YYSTR is taken from yytname. If YYRES is
4025 null, do not copy; instead, return the length of what the result
4028 yytnamerr (char *yyres, const char *yystr)
4033 char const *yyp = yystr;
4040 goto do_not_strip_quotes;
4044 goto do_not_strip_quotes;
4057 do_not_strip_quotes: ;
4061 return yystrlen (yystr);
4063 return yystpcpy (yyres, yystr) - yyres;
4067 /* Copy into YYRESULT an error message about the unexpected token
4068 YYCHAR while in state YYSTATE. Return the number of bytes copied,
4069 including the terminating null byte. If YYRESULT is null, do not
4070 copy anything; just return the number of bytes that would be
4071 copied. As a special case, return 0 if an ordinary "syntax error"
4072 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
4073 size calculation. */
4075 yysyntax_error (char *yyresult, int yystate, int yychar)
4077 int yyn = yypact[yystate];
4079 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
4083 int yytype = YYTRANSLATE (yychar);
4084 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
4085 YYSIZE_T yysize = yysize0;
4087 int yysize_overflow = 0;
4088 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
4089 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
4093 /* This is so xgettext sees the translatable formats that are
4094 constructed on the fly. */
4095 YY_("syntax error, unexpected %s");
4096 YY_("syntax error, unexpected %s, expecting %s");
4097 YY_("syntax error, unexpected %s, expecting %s or %s");
4098 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
4099 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
4103 static char const yyunexpected[] = "syntax error, unexpected %s";
4104 static char const yyexpecting[] = ", expecting %s";
4105 static char const yyor[] = " or %s";
4106 char yyformat[sizeof yyunexpected
4107 + sizeof yyexpecting - 1
4108 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
4109 * (sizeof yyor - 1))];
4110 char const *yyprefix = yyexpecting;
4112 /* Start YYX at -YYN if negative to avoid negative indexes in
4114 int yyxbegin = yyn < 0 ? -yyn : 0;
4116 /* Stay within bounds of both yycheck and yytname. */
4117 int yychecklim = YYLAST - yyn + 1;
4118 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
4121 yyarg[0] = yytname[yytype];
4122 yyfmt = yystpcpy (yyformat, yyunexpected);
4124 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
4125 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
4127 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
4131 yyformat[sizeof yyunexpected - 1] = '\0';
4134 yyarg[yycount++] = yytname[yyx];
4135 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
4136 yysize_overflow |= (yysize1 < yysize);
4138 yyfmt = yystpcpy (yyfmt, yyprefix);
4142 yyf = YY_(yyformat);
4143 yysize1 = yysize + yystrlen (yyf);
4144 yysize_overflow |= (yysize1 < yysize);
4147 if (yysize_overflow)
4148 return YYSIZE_MAXIMUM;
4152 /* Avoid sprintf, as that infringes on the user's name space.
4153 Don't have undefined behavior even if the translation
4154 produced a string with the wrong number of "%s"s. */
4155 char *yyp = yyresult;
4157 while ((*yyp = *yyf) != '\0')
4159 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4161 yyp += yytnamerr (yyp, yyarg[yyi++]);
4174 #endif /* YYERROR_VERBOSE */
4177 /*-----------------------------------------------.
4178 | Release the memory associated to this symbol. |
4179 `-----------------------------------------------*/
4182 #if (defined __STDC__ || defined __C99__FUNC__ \
4183 || defined __cplusplus || defined _MSC_VER)
4185 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
4188 yydestruct (yymsg, yytype, yyvaluep)
4198 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
4209 /* Prevent warnings from -Wmissing-prototypes. */
4211 #ifdef YYPARSE_PARAM
4212 #if defined __STDC__ || defined __cplusplus
4213 int yyparse (void *YYPARSE_PARAM);
4217 #else /* ! YYPARSE_PARAM */
4218 #if defined __STDC__ || defined __cplusplus
4223 #endif /* ! YYPARSE_PARAM */
4227 /* The look-ahead symbol. */
4230 /* The semantic value of the look-ahead symbol. */
4233 /* Number of syntax errors so far. */
4242 #ifdef YYPARSE_PARAM
4243 #if (defined __STDC__ || defined __C99__FUNC__ \
4244 || defined __cplusplus || defined _MSC_VER)
4246 yyparse (void *YYPARSE_PARAM)
4249 yyparse (YYPARSE_PARAM)
4250 void *YYPARSE_PARAM;
4252 #else /* ! YYPARSE_PARAM */
4253 #if (defined __STDC__ || defined __C99__FUNC__ \
4254 || defined __cplusplus || defined _MSC_VER)
4268 /* Number of tokens to shift before error messages enabled. */
4270 /* Look-ahead token as an internal (translated) token number. */
4273 /* Buffer for error messages, and its allocated size. */
4275 char *yymsg = yymsgbuf;
4276 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
4279 /* Three stacks and their tools:
4280 `yyss': related to states,
4281 `yyvs': related to semantic values,
4282 `yyls': related to locations.
4284 Refer to the stacks thru separate pointers, to allow yyoverflow
4285 to reallocate them elsewhere. */
4287 /* The state stack. */
4288 yytype_int16 yyssa[YYINITDEPTH];
4289 yytype_int16 *yyss = yyssa;
4290 yytype_int16 *yyssp;
4292 /* The semantic value stack. */
4293 YYSTYPE yyvsa[YYINITDEPTH];
4294 YYSTYPE *yyvs = yyvsa;
4299 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
4301 YYSIZE_T yystacksize = YYINITDEPTH;
4303 /* The variables used to return semantic value and location from the
4308 /* The number of symbols on the RHS of the reduced rule.
4309 Keep to zero when no symbol should be popped. */
4312 YYDPRINTF ((stderr, "Starting parse\n"));
4317 yychar = YYEMPTY; /* Cause a token to be read. */
4319 /* Initialize stack pointers.
4320 Waste one element of value and location stack
4321 so that they stay on the same level as the state stack.
4322 The wasted elements are never initialized. */
4329 /*------------------------------------------------------------.
4330 | yynewstate -- Push a new state, which is found in yystate. |
4331 `------------------------------------------------------------*/
4333 /* In all cases, when you get here, the value and location stacks
4334 have just been pushed. So pushing a state here evens the stacks. */
4340 if (yyss + yystacksize - 1 <= yyssp)
4342 /* Get the current used size of the three stacks, in elements. */
4343 YYSIZE_T yysize = yyssp - yyss + 1;
4347 /* Give user a chance to reallocate the stack. Use copies of
4348 these so that the &'s don't force the real ones into
4350 YYSTYPE *yyvs1 = yyvs;
4351 yytype_int16 *yyss1 = yyss;
4354 /* Each stack pointer address is followed by the size of the
4355 data in use in that stack, in bytes. This used to be a
4356 conditional around just the two extra args, but that might
4357 be undefined if yyoverflow is a macro. */
4358 yyoverflow (YY_("memory exhausted"),
4359 &yyss1, yysize * sizeof (*yyssp),
4360 &yyvs1, yysize * sizeof (*yyvsp),
4367 #else /* no yyoverflow */
4368 # ifndef YYSTACK_RELOCATE
4369 goto yyexhaustedlab;
4371 /* Extend the stack our own way. */
4372 if (YYMAXDEPTH <= yystacksize)
4373 goto yyexhaustedlab;
4375 if (YYMAXDEPTH < yystacksize)
4376 yystacksize = YYMAXDEPTH;
4379 yytype_int16 *yyss1 = yyss;
4380 union yyalloc *yyptr =
4381 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
4383 goto yyexhaustedlab;
4384 YYSTACK_RELOCATE (yyss);
4385 YYSTACK_RELOCATE (yyvs);
4387 # undef YYSTACK_RELOCATE
4389 YYSTACK_FREE (yyss1);
4392 #endif /* no yyoverflow */
4394 yyssp = yyss + yysize - 1;
4395 yyvsp = yyvs + yysize - 1;
4398 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
4399 (unsigned long int) yystacksize));
4401 if (yyss + yystacksize - 1 <= yyssp)
4405 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
4414 /* Do appropriate processing given the current state. Read a
4415 look-ahead token if we need one and don't already have one. */
4417 /* First try to decide what to do without reference to look-ahead token. */
4418 yyn = yypact[yystate];
4419 if (yyn == YYPACT_NINF)
4422 /* Not known => get a look-ahead token if don't already have one. */
4424 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
4425 if (yychar == YYEMPTY)
4427 YYDPRINTF ((stderr, "Reading a token: "));
4431 if (yychar <= YYEOF)
4433 yychar = yytoken = YYEOF;
4434 YYDPRINTF ((stderr, "Now at end of input.\n"));
4438 yytoken = YYTRANSLATE (yychar);
4439 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
4442 /* If the proper action on seeing token YYTOKEN is to reduce or to
4443 detect an error, take that action. */
4445 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
4450 if (yyn == 0 || yyn == YYTABLE_NINF)
4459 /* Count tokens shifted since error; after three, turn off error
4464 /* Shift the look-ahead token. */
4465 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
4467 /* Discard the shifted token unless it is eof. */
4468 if (yychar != YYEOF)
4477 /*-----------------------------------------------------------.
4478 | yydefault -- do the default action for the current state. |
4479 `-----------------------------------------------------------*/
4481 yyn = yydefact[yystate];
4487 /*-----------------------------.
4488 | yyreduce -- Do a reduction. |
4489 `-----------------------------*/
4491 /* yyn is the number of a rule to reduce with. */
4494 /* If YYLEN is nonzero, implement the default value of the action:
4497 Otherwise, the following line sets YYVAL to garbage.
4498 This behavior is undocumented and Bison
4499 users should not rely upon it. Assigning to YYVAL
4500 unconditionally makes the parser a bit smaller, and it avoids a
4501 GCC warning that YYVAL may be used uninitialized. */
4502 yyval = yyvsp[1-yylen];
4505 YY_REDUCE_PRINT (yyn);
4509 #line 1593 "parser.y"
4511 if (!classes) classes = NewHash();
4512 Setattr((yyvsp[(1) - (1)].node),"classes",classes);
4513 Setattr((yyvsp[(1) - (1)].node),"name",ModuleName);
4515 if ((!module_node) && ModuleName) {
4516 module_node = new_node("module");
4517 Setattr(module_node,"name",ModuleName);
4519 Setattr((yyvsp[(1) - (1)].node),"module",module_node);
4521 top = (yyvsp[(1) - (1)].node);
4526 #line 1606 "parser.y"
4528 top = Copy(Getattr((yyvsp[(2) - (3)].p),"type"));
4529 Delete((yyvsp[(2) - (3)].p));
4534 #line 1610 "parser.y"
4541 #line 1613 "parser.y"
4543 top = (yyvsp[(2) - (3)].p);
4548 #line 1616 "parser.y"
4555 #line 1619 "parser.y"
4557 top = (yyvsp[(3) - (5)].pl);
4562 #line 1622 "parser.y"
4569 #line 1627 "parser.y"
4571 /* add declaration to end of linked list (the declaration isn't always a single declaration, sometimes it is a linked list itself) */
4572 appendChild((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node));
4573 (yyval.node) = (yyvsp[(1) - (2)].node);
4578 #line 1632 "parser.y"
4580 (yyval.node) = new_node("top");
4585 #line 1637 "parser.y"
4586 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4590 #line 1638 "parser.y"
4591 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4595 #line 1639 "parser.y"
4596 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4600 #line 1640 "parser.y"
4601 { (yyval.node) = 0; }
4605 #line 1641 "parser.y"
4608 Swig_error(cparse_file, cparse_line,"Syntax error in input(1).\n");
4614 #line 1647 "parser.y"
4617 add_symbols((yyval.node));
4619 (yyval.node) = (yyvsp[(1) - (1)].node);
4624 #line 1663 "parser.y"
4632 #line 1673 "parser.y"
4633 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4637 #line 1674 "parser.y"
4638 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4642 #line 1675 "parser.y"
4643 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4647 #line 1676 "parser.y"
4648 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4652 #line 1677 "parser.y"
4653 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4657 #line 1678 "parser.y"
4658 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4662 #line 1679 "parser.y"
4663 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4667 #line 1680 "parser.y"
4668 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4672 #line 1681 "parser.y"
4673 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4677 #line 1682 "parser.y"
4678 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4682 #line 1683 "parser.y"
4683 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4687 #line 1684 "parser.y"
4688 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4692 #line 1685 "parser.y"
4693 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4697 #line 1686 "parser.y"
4698 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4702 #line 1687 "parser.y"
4703 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4707 #line 1688 "parser.y"
4708 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4712 #line 1689 "parser.y"
4713 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4717 #line 1690 "parser.y"
4718 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4722 #line 1691 "parser.y"
4723 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4727 #line 1692 "parser.y"
4728 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4732 #line 1693 "parser.y"
4733 { (yyval.node) = (yyvsp[(1) - (1)].node); }
4737 #line 1700 "parser.y"
4741 cplus_mode = CPLUS_PUBLIC;
4742 if (!classes) classes = NewHash();
4743 if (!extendhash) extendhash = NewHash();
4744 clsname = make_class_name((yyvsp[(3) - (4)].str));
4745 cls = Getattr(classes,clsname);
4747 /* No previous definition. Create a new scope */
4748 Node *am = Getattr(extendhash,clsname);
4750 Swig_symbol_newscope();
4751 Swig_symbol_setscopename((yyvsp[(3) - (4)].str));
4754 prev_symtab = Swig_symbol_setscope(Getattr(am,"symtab"));
4758 /* Previous class definition. Use its symbol table */
4759 prev_symtab = Swig_symbol_setscope(Getattr(cls,"symtab"));
4760 current_class = cls;
4763 Classprefix = NewString((yyvsp[(3) - (4)].str));
4764 Namespaceprefix= Swig_symbol_qualifiedscopename(0);
4770 #line 1728 "parser.y"
4774 (yyval.node) = new_node("extend");
4775 Setattr((yyval.node),"symtab",Swig_symbol_popscope());
4777 Swig_symbol_setscope(prev_symtab);
4779 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
4780 clsname = make_class_name((yyvsp[(3) - (7)].str));
4781 Setattr((yyval.node),"name",clsname);
4783 /* Mark members as extend */
4785 tag_nodes((yyvsp[(6) - (7)].node),"feature:extend",(char*) "1");
4786 if (current_class) {
4787 /* We add the extension to the previously defined class */
4788 appendChild((yyval.node),(yyvsp[(6) - (7)].node));
4789 appendChild(current_class,(yyval.node));
4791 /* We store the extensions in the extensions hash */
4792 Node *am = Getattr(extendhash,clsname);
4794 /* Append the members to the previous extend methods */
4795 appendChild(am,(yyvsp[(6) - (7)].node));
4797 appendChild((yyval.node),(yyvsp[(6) - (7)].node));
4798 Setattr(extendhash,clsname,(yyval.node));
4802 Delete(Classprefix);
4812 #line 1772 "parser.y"
4814 (yyval.node) = new_node("apply");
4815 Setattr((yyval.node),"pattern",Getattr((yyvsp[(2) - (5)].p),"pattern"));
4816 appendChild((yyval.node),(yyvsp[(4) - (5)].p));
4821 #line 1782 "parser.y"
4823 (yyval.node) = new_node("clear");
4824 appendChild((yyval.node),(yyvsp[(2) - (3)].p));
4829 #line 1793 "parser.y"
4831 if (((yyvsp[(4) - (5)].dtype).type != T_ERROR) && ((yyvsp[(4) - (5)].dtype).type != T_SYMBOL)) {
4832 SwigType *type = NewSwigType((yyvsp[(4) - (5)].dtype).type);
4833 (yyval.node) = new_node("constant");
4834 Setattr((yyval.node),"name",(yyvsp[(2) - (5)].id));
4835 Setattr((yyval.node),"type",type);
4836 Setattr((yyval.node),"value",(yyvsp[(4) - (5)].dtype).val);
4837 if ((yyvsp[(4) - (5)].dtype).rawval) Setattr((yyval.node),"rawval", (yyvsp[(4) - (5)].dtype).rawval);
4838 Setattr((yyval.node),"storage","%constant");
4839 SetFlag((yyval.node),"feature:immutable");
4840 add_symbols((yyval.node));
4843 if ((yyvsp[(4) - (5)].dtype).type == T_ERROR) {
4844 Swig_warning(WARN_PARSE_UNSUPPORTED_VALUE,cparse_file,cparse_line,"Unsupported constant value (ignored)\n");
4853 #line 1814 "parser.y"
4855 if (((yyvsp[(4) - (5)].dtype).type != T_ERROR) && ((yyvsp[(4) - (5)].dtype).type != T_SYMBOL)) {
4856 SwigType_push((yyvsp[(2) - (5)].type),(yyvsp[(3) - (5)].decl).type);
4857 /* Sneaky callback function trick */
4858 if (SwigType_isfunction((yyvsp[(2) - (5)].type))) {
4859 SwigType_add_pointer((yyvsp[(2) - (5)].type));
4861 (yyval.node) = new_node("constant");
4862 Setattr((yyval.node),"name",(yyvsp[(3) - (5)].decl).id);
4863 Setattr((yyval.node),"type",(yyvsp[(2) - (5)].type));
4864 Setattr((yyval.node),"value",(yyvsp[(4) - (5)].dtype).val);
4865 if ((yyvsp[(4) - (5)].dtype).rawval) Setattr((yyval.node),"rawval", (yyvsp[(4) - (5)].dtype).rawval);
4866 Setattr((yyval.node),"storage","%constant");
4867 SetFlag((yyval.node),"feature:immutable");
4868 add_symbols((yyval.node));
4870 if ((yyvsp[(4) - (5)].dtype).type == T_ERROR) {
4871 Swig_warning(WARN_PARSE_UNSUPPORTED_VALUE,cparse_file,cparse_line,"Unsupported constant value\n");
4879 #line 1836 "parser.y"
4881 Swig_warning(WARN_PARSE_BAD_VALUE,cparse_file,cparse_line,"Bad constant value (ignored).\n");
4887 #line 1847 "parser.y"
4890 Replace((yyvsp[(2) - (2)].str),"$file",cparse_file, DOH_REPLACE_ANY);
4891 sprintf(temp,"%d", cparse_line);
4892 Replace((yyvsp[(2) - (2)].str),"$line",temp,DOH_REPLACE_ANY);
4893 Printf(stderr,"%s\n", (yyvsp[(2) - (2)].str));
4894 Delete((yyvsp[(2) - (2)].str));
4900 #line 1856 "parser.y"
4903 String *s = NewString((yyvsp[(2) - (2)].id));
4904 Replace(s,"$file",cparse_file, DOH_REPLACE_ANY);
4905 sprintf(temp,"%d", cparse_line);
4906 Replace(s,"$line",temp,DOH_REPLACE_ANY);
4907 Printf(stderr,"%s\n", s);
4914 #line 1875 "parser.y"
4916 skip_balanced('{','}');
4918 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated. Use %%exception instead.\n");
4923 #line 1881 "parser.y"
4925 skip_balanced('{','}');
4927 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated. Use %%exception instead.\n");
4932 #line 1887 "parser.y"
4935 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated. Use %%exception instead.\n");
4940 #line 1892 "parser.y"
4943 Swig_warning(WARN_DEPRECATED_EXCEPT,cparse_file, cparse_line, "%%except is deprecated. Use %%exception instead.\n");
4948 #line 1899 "parser.y"
4950 (yyval.node) = NewHash();
4951 Setattr((yyval.node),"value",(yyvsp[(1) - (4)].id));
4952 Setattr((yyval.node),"type",Getattr((yyvsp[(3) - (4)].p),"type"));
4957 #line 1906 "parser.y"
4959 (yyval.node) = NewHash();
4960 Setattr((yyval.node),"value",(yyvsp[(1) - (1)].id));
4965 #line 1910 "parser.y"
4967 (yyval.node) = (yyvsp[(1) - (1)].node);
4972 #line 1923 "parser.y"
4974 Hash *p = (yyvsp[(5) - (7)].node);
4975 (yyval.node) = new_node("fragment");
4976 Setattr((yyval.node),"value",Getattr((yyvsp[(3) - (7)].node),"value"));
4977 Setattr((yyval.node),"type",Getattr((yyvsp[(3) - (7)].node),"type"));
4978 Setattr((yyval.node),"section",Getattr(p,"name"));
4979 Setattr((yyval.node),"kwargs",nextSibling(p));
4980 Setattr((yyval.node),"code",(yyvsp[(7) - (7)].str));
4985 #line 1932 "parser.y"
4987 Hash *p = (yyvsp[(5) - (7)].node);
4989 skip_balanced('{','}');
4990 (yyval.node) = new_node("fragment");
4991 Setattr((yyval.node),"value",Getattr((yyvsp[(3) - (7)].node),"value"));
4992 Setattr((yyval.node),"type",Getattr((yyvsp[(3) - (7)].node),"type"));
4993 Setattr((yyval.node),"section",Getattr(p,"name"));
4994 Setattr((yyval.node),"kwargs",nextSibling(p));
4995 Delitem(scanner_ccode,0);
4996 Delitem(scanner_ccode,DOH_END);
4997 code = Copy(scanner_ccode);
4998 Setattr((yyval.node),"code",code);
5004 #line 1947 "parser.y"
5006 (yyval.node) = new_node("fragment");
5007 Setattr((yyval.node),"value",Getattr((yyvsp[(3) - (5)].node),"value"));
5008 Setattr((yyval.node),"type",Getattr((yyvsp[(3) - (5)].node),"type"));
5009 Setattr((yyval.node),"emitonly","1");
5014 #line 1960 "parser.y"
5016 (yyvsp[(1) - (4)].loc).filename = Copy(cparse_file);
5017 (yyvsp[(1) - (4)].loc).line = cparse_line;
5018 scanner_set_location(NewString((yyvsp[(3) - (4)].id)),1);
5019 if ((yyvsp[(2) - (4)].node)) {
5020 String *maininput = Getattr((yyvsp[(2) - (4)].node), "maininput");
5022 scanner_set_main_input_file(NewString(maininput));
5028 #line 1969 "parser.y"
5031 (yyval.node) = (yyvsp[(6) - (7)].node);
5032 scanner_set_location((yyvsp[(1) - (7)].loc).filename,(yyvsp[(1) - (7)].loc).line);
5033 if (strcmp((yyvsp[(1) - (7)].loc).type,"include") == 0) set_nodeType((yyval.node),"include");
5034 if (strcmp((yyvsp[(1) - (7)].loc).type,"import") == 0) {
5035 mname = (yyvsp[(2) - (7)].node) ? Getattr((yyvsp[(2) - (7)].node),"module") : 0;
5036 set_nodeType((yyval.node),"import");
5037 if (import_mode) --import_mode;
5040 Setattr((yyval.node),"name",(yyvsp[(3) - (7)].id));
5041 /* Search for the module (if any) */
5043 Node *n = firstChild((yyval.node));
5045 if (Strcmp(nodeType(n),"module") == 0) {
5047 Setattr(n,"name", mname);
5050 Setattr((yyval.node),"module",Getattr(n,"name"));
5056 /* There is no module node in the import
5057 node, ie, you imported a .h file
5058 directly. We are forced then to create
5059 a new import node with a module node.
5061 Node *nint = new_node("import");
5062 Node *mnode = new_node("module");
5063 Setattr(mnode,"name", mname);
5064 appendChild(nint,mnode);
5066 appendChild(nint,firstChild((yyval.node)));
5067 (yyval.node) = nint;
5068 Setattr((yyval.node),"module",mname);
5071 Setattr((yyval.node),"options",(yyvsp[(2) - (7)].node));
5076 #line 2015 "parser.y"
5077 { (yyval.loc).type = (char *) "include"; }
5081 #line 2016 "parser.y"
5082 { (yyval.loc).type = (char *) "import"; ++import_mode;}
5086 #line 2023 "parser.y"
5089 if (Namespaceprefix) {
5090 Swig_error(cparse_file, cparse_start_line, "%%inline directive inside a namespace is disallowed.\n");
5094 (yyval.node) = new_node("insert");
5095 Setattr((yyval.node),"code",(yyvsp[(2) - (2)].str));
5096 /* Need to run through the preprocessor */
5097 Setline((yyvsp[(2) - (2)].str),cparse_start_line);
5098 Setfile((yyvsp[(2) - (2)].str),cparse_file);
5099 Seek((yyvsp[(2) - (2)].str),0,SEEK_SET);
5100 cpps = Preprocessor_parse((yyvsp[(2) - (2)].str));
5101 start_inline(Char(cpps), cparse_start_line);
5102 Delete((yyvsp[(2) - (2)].str));
5110 #line 2043 "parser.y"
5113 int start_line = cparse_line;
5114 skip_balanced('{','}');
5115 if (Namespaceprefix) {
5116 Swig_error(cparse_file, cparse_start_line, "%%inline directive inside a namespace is disallowed.\n");
5121 (yyval.node) = new_node("insert");
5122 Delitem(scanner_ccode,0);
5123 Delitem(scanner_ccode,DOH_END);
5124 code = Copy(scanner_ccode);
5125 Setattr((yyval.node),"code", code);
5127 cpps=Copy(scanner_ccode);
5128 start_inline(Char(cpps), start_line);
5135 #line 2074 "parser.y"
5137 (yyval.node) = new_node("insert");
5138 Setattr((yyval.node),"code",(yyvsp[(1) - (1)].str));
5143 #line 2078 "parser.y"
5145 String *code = NewStringEmpty();
5146 (yyval.node) = new_node("insert");
5147 Setattr((yyval.node),"section",(yyvsp[(3) - (5)].id));
5148 Setattr((yyval.node),"code",code);
5149 if (Swig_insert_file((yyvsp[(5) - (5)].id),code) < 0) {
5150 Swig_error(cparse_file, cparse_line, "Couldn't find '%s'.\n", (yyvsp[(5) - (5)].id));
5157 #line 2088 "parser.y"
5159 (yyval.node) = new_node("insert");
5160 Setattr((yyval.node),"section",(yyvsp[(3) - (5)].id));
5161 Setattr((yyval.node),"code",(yyvsp[(5) - (5)].str));
5166 #line 2093 "parser.y"
5169 skip_balanced('{','}');
5170 (yyval.node) = new_node("insert");
5171 Setattr((yyval.node),"section",(yyvsp[(3) - (5)].id));
5172 Delitem(scanner_ccode,0);
5173 Delitem(scanner_ccode,DOH_END);
5174 code = Copy(scanner_ccode);
5175 Setattr((yyval.node),"code", code);
5181 #line 2111 "parser.y"
5183 (yyval.node) = new_node("module");
5184 if ((yyvsp[(2) - (3)].node)) {
5185 Setattr((yyval.node),"options",(yyvsp[(2) - (3)].node));
5186 if (Getattr((yyvsp[(2) - (3)].node),"directors")) {
5187 Wrapper_director_mode_set(1);
5189 if (Getattr((yyvsp[(2) - (3)].node),"dirprot")) {
5190 Wrapper_director_protected_mode_set(1);
5192 if (Getattr((yyvsp[(2) - (3)].node),"allprotected")) {
5193 Wrapper_all_protected_mode_set(1);
5195 if (Getattr((yyvsp[(2) - (3)].node),"templatereduce")) {
5196 template_reduce = 1;
5198 if (Getattr((yyvsp[(2) - (3)].node),"notemplatereduce")) {
5199 template_reduce = 0;
5202 if (!ModuleName) ModuleName = NewString((yyvsp[(3) - (3)].id));
5204 /* first module included, we apply global
5205 ModuleName, which can be modify by -module */
5206 String *mname = Copy(ModuleName);
5207 Setattr((yyval.node),"name",mname);
5210 /* import mode, we just pass the idstring */
5211 Setattr((yyval.node),"name",(yyvsp[(3) - (3)].id));
5213 if (!module_node) module_node = (yyval.node);
5218 #line 2151 "parser.y"
5220 Swig_warning(WARN_DEPRECATED_NAME,cparse_file,cparse_line, "%%name is deprecated. Use %%rename instead.\n");
5222 yyrename = NewString((yyvsp[(3) - (4)].id));
5228 #line 2157 "parser.y"
5230 Swig_warning(WARN_DEPRECATED_NAME,cparse_file,cparse_line, "%%name is deprecated. Use %%rename instead.\n");
5232 Swig_error(cparse_file,cparse_line,"Missing argument to %%name directive.\n");
5237 #line 2170 "parser.y"
5239 (yyval.node) = new_node("native");
5240 Setattr((yyval.node),"name",(yyvsp[(3) - (7)].id));
5241 Setattr((yyval.node),"wrap:name",(yyvsp[(6) - (7)].id));
5242 add_symbols((yyval.node));
5247 #line 2176 "parser.y"
5249 if (!SwigType_isfunction((yyvsp[(7) - (8)].decl).type)) {
5250 Swig_error(cparse_file,cparse_line,"%%native declaration '%s' is not a function.\n", (yyvsp[(7) - (8)].decl).id);
5253 Delete(SwigType_pop_function((yyvsp[(7) - (8)].decl).type));
5254 /* Need check for function here */
5255 SwigType_push((yyvsp[(6) - (8)].type),(yyvsp[(7) - (8)].decl).type);
5256 (yyval.node) = new_node("native");
5257 Setattr((yyval.node),"name",(yyvsp[(3) - (8)].id));
5258 Setattr((yyval.node),"wrap:name",(yyvsp[(7) - (8)].decl).id);
5259 Setattr((yyval.node),"type",(yyvsp[(6) - (8)].type));
5260 Setattr((yyval.node),"parms",(yyvsp[(7) - (8)].decl).parms);
5261 Setattr((yyval.node),"decl",(yyvsp[(7) - (8)].decl).type);
5263 add_symbols((yyval.node));
5268 #line 2202 "parser.y"
5270 (yyval.node) = new_node("pragma");
5271 Setattr((yyval.node),"lang",(yyvsp[(2) - (5)].id));
5272 Setattr((yyval.node),"name",(yyvsp[(3) - (5)].id));
5273 Setattr((yyval.node),"value",(yyvsp[(5) - (5)].str));
5278 #line 2208 "parser.y"
5280 (yyval.node) = new_node("pragma");
5281 Setattr((yyval.node),"lang",(yyvsp[(2) - (3)].id));
5282 Setattr((yyval.node),"name",(yyvsp[(3) - (3)].id));
5287 #line 2215 "parser.y"
5288 { (yyval.str) = NewString((yyvsp[(1) - (1)].id)); }
5292 #line 2216 "parser.y"
5293 { (yyval.str) = (yyvsp[(1) - (1)].str); }
5297 #line 2219 "parser.y"
5298 { (yyval.id) = (yyvsp[(2) - (3)].id); }
5302 #line 2220 "parser.y"
5303 { (yyval.id) = (char *) "swig"; }
5307 #line 2228 "parser.y"
5309 SwigType *t = (yyvsp[(2) - (4)].decl).type;
5310 Hash *kws = NewHash();
5312 fixname = feature_identifier_fix((yyvsp[(2) - (4)].decl).id);
5313 Setattr(kws,"name",(yyvsp[(3) - (4)].id));
5315 /* Special declarator check */
5317 if (SwigType_isfunction(t)) {
5318 SwigType *decl = SwigType_pop_function(t);
5319 if (SwigType_ispointer(t)) {
5320 String *nname = NewStringf("*%s",fixname);
5321 if ((yyvsp[(1) - (4)].ivalue)) {
5322 Swig_name_rename_add(Namespaceprefix, nname,decl,kws,(yyvsp[(2) - (4)].decl).parms);
5324 Swig_name_namewarn_add(Namespaceprefix,nname,decl,kws);
5328 if ((yyvsp[(1) - (4)].ivalue)) {
5329 Swig_name_rename_add(Namespaceprefix,(fixname),decl,kws,(yyvsp[(2) - (4)].decl).parms);
5331 Swig_name_namewarn_add(Namespaceprefix,(fixname),decl,kws);
5335 } else if (SwigType_ispointer(t)) {
5336 String *nname = NewStringf("*%s",fixname);
5337 if ((yyvsp[(1) - (4)].ivalue)) {
5338 Swig_name_rename_add(Namespaceprefix,(nname),0,kws,(yyvsp[(2) - (4)].decl).parms);
5340 Swig_name_namewarn_add(Namespaceprefix,(nname),0,kws);
5345 if ((yyvsp[(1) - (4)].ivalue)) {
5346 Swig_name_rename_add(Namespaceprefix,(fixname),0,kws,(yyvsp[(2) - (4)].decl).parms);
5348 Swig_name_namewarn_add(Namespaceprefix,(fixname),0,kws);
5352 scanner_clear_rename();
5357 #line 2274 "parser.y"
5360 Hash *kws = (yyvsp[(3) - (7)].node);
5361 SwigType *t = (yyvsp[(5) - (7)].decl).type;
5362 fixname = feature_identifier_fix((yyvsp[(5) - (7)].decl).id);
5364 /* Special declarator check */
5366 if ((yyvsp[(6) - (7)].dtype).qualifier) SwigType_push(t,(yyvsp[(6) - (7)].dtype).qualifier);
5367 if (SwigType_isfunction(t)) {
5368 SwigType *decl = SwigType_pop_function(t);
5369 if (SwigType_ispointer(t)) {
5370 String *nname = NewStringf("*%s",fixname);
5371 if ((yyvsp[(1) - (7)].ivalue)) {
5372 Swig_name_rename_add(Namespaceprefix, nname,decl,kws,(yyvsp[(5) - (7)].decl).parms);
5374 Swig_name_namewarn_add(Namespaceprefix,nname,decl,kws);
5378 if ((yyvsp[(1) - (7)].ivalue)) {
5379 Swig_name_rename_add(Namespaceprefix,(fixname),decl,kws,(yyvsp[(5) - (7)].decl).parms);
5381 Swig_name_namewarn_add(Namespaceprefix,(fixname),decl,kws);
5385 } else if (SwigType_ispointer(t)) {
5386 String *nname = NewStringf("*%s",fixname);
5387 if ((yyvsp[(1) - (7)].ivalue)) {
5388 Swig_name_rename_add(Namespaceprefix,(nname),0,kws,(yyvsp[(5) - (7)].decl).parms);
5390 Swig_name_namewarn_add(Namespaceprefix,(nname),0,kws);
5395 if ((yyvsp[(1) - (7)].ivalue)) {
5396 Swig_name_rename_add(Namespaceprefix,(fixname),0,kws,(yyvsp[(5) - (7)].decl).parms);
5398 Swig_name_namewarn_add(Namespaceprefix,(fixname),0,kws);
5402 scanner_clear_rename();
5407 #line 2320 "parser.y"
5409 if ((yyvsp[(1) - (6)].ivalue)) {
5410 Swig_name_rename_add(Namespaceprefix,(yyvsp[(5) - (6)].id),0,(yyvsp[(3) - (6)].node),0);
5412 Swig_name_namewarn_add(Namespaceprefix,(yyvsp[(5) - (6)].id),0,(yyvsp[(3) - (6)].node));
5415 scanner_clear_rename();
5420 #line 2331 "parser.y"
5427 #line 2334 "parser.y"
5434 #line 2361 "parser.y"
5436 String *val = (yyvsp[(7) - (7)].str) ? NewString((yyvsp[(7) - (7)].str)) : NewString("1");
5437 new_feature((yyvsp[(3) - (7)].id), val, 0, (yyvsp[(5) - (7)].decl).id, (yyvsp[(5) - (7)].decl).type, (yyvsp[(5) - (7)].decl).parms, (yyvsp[(6) - (7)].dtype).qualifier);
5439 scanner_clear_rename();
5444 #line 2367 "parser.y"
5446 String *val = Len((yyvsp[(5) - (9)].id)) ? NewString((yyvsp[(5) - (9)].id)) : 0;
5447 new_feature((yyvsp[(3) - (9)].id), val, 0, (yyvsp[(7) - (9)].decl).id, (yyvsp[(7) - (9)].decl).type, (yyvsp[(7) - (9)].decl).parms, (yyvsp[(8) - (9)].dtype).qualifier);
5449 scanner_clear_rename();
5454 #line 2373 "parser.y"
5456 String *val = (yyvsp[(8) - (8)].str) ? NewString((yyvsp[(8) - (8)].str)) : NewString("1");
5457 new_feature((yyvsp[(3) - (8)].id), val, (yyvsp[(4) - (8)].node), (yyvsp[(6) - (8)].decl).id, (yyvsp[(6) - (8)].decl).type, (yyvsp[(6) - (8)].decl).parms, (yyvsp[(7) - (8)].dtype).qualifier);
5459 scanner_clear_rename();
5464 #line 2379 "parser.y"
5466 String *val = Len((yyvsp[(5) - (10)].id)) ? NewString((yyvsp[(5) - (10)].id)) : 0;
5467 new_feature((yyvsp[(3) - (10)].id), val, (yyvsp[(6) - (10)].node), (yyvsp[(8) - (10)].decl).id, (yyvsp[(8) - (10)].decl).type, (yyvsp[(8) - (10)].decl).parms, (yyvsp[(9) - (10)].dtype).qualifier);
5469 scanner_clear_rename();
5474 #line 2387 "parser.y"
5476 String *val = (yyvsp[(5) - (5)].str) ? NewString((yyvsp[(5) - (5)].str)) : NewString("1");
5477 new_feature((yyvsp[(3) - (5)].id), val, 0, 0, 0, 0, 0);
5479 scanner_clear_rename();
5484 #line 2393 "parser.y"
5486 String *val = Len((yyvsp[(5) - (7)].id)) ? NewString((yyvsp[(5) - (7)].id)) : 0;
5487 new_feature((yyvsp[(3) - (7)].id), val, 0, 0, 0, 0, 0);
5489 scanner_clear_rename();
5494 #line 2399 "parser.y"
5496 String *val = (yyvsp[(6) - (6)].str) ? NewString((yyvsp[(6) - (6)].str)) : NewString("1");
5497 new_feature((yyvsp[(3) - (6)].id), val, (yyvsp[(4) - (6)].node), 0, 0, 0, 0);
5499 scanner_clear_rename();
5504 #line 2405 "parser.y"
5506 String *val = Len((yyvsp[(5) - (8)].id)) ? NewString((yyvsp[(5) - (8)].id)) : 0;
5507 new_feature((yyvsp[(3) - (8)].id), val, (yyvsp[(6) - (8)].node), 0, 0, 0, 0);
5509 scanner_clear_rename();
5514 #line 2413 "parser.y"
5515 { (yyval.str) = (yyvsp[(1) - (1)].str); }
5519 #line 2414 "parser.y"
5520 { (yyval.str) = 0; }
5524 #line 2415 "parser.y"
5525 { (yyval.str) = (yyvsp[(3) - (5)].pl); }
5529 #line 2418 "parser.y"
5531 (yyval.node) = NewHash();
5532 Setattr((yyval.node),"name",(yyvsp[(2) - (4)].id));
5533 Setattr((yyval.node),"value",(yyvsp[(4) - (4)].id));
5538 #line 2423 "parser.y"
5540 (yyval.node) = NewHash();
5541 Setattr((yyval.node),"name",(yyvsp[(2) - (5)].id));
5542 Setattr((yyval.node),"value",(yyvsp[(4) - (5)].id));
5543 set_nextSibling((yyval.node),(yyvsp[(5) - (5)].node));
5548 #line 2433 "parser.y"
5553 if (Namespaceprefix) name = NewStringf("%s::%s", Namespaceprefix, (yyvsp[(5) - (7)].decl).id);
5554 else name = NewString((yyvsp[(5) - (7)].decl).id);
5555 val = (yyvsp[(3) - (7)].pl);
5556 if ((yyvsp[(5) - (7)].decl).parms) {
5557 Setmeta(val,"parms",(yyvsp[(5) - (7)].decl).parms);
5559 t = (yyvsp[(5) - (7)].decl).type;
5562 if ((yyvsp[(6) - (7)].dtype).qualifier) SwigType_push(t,(yyvsp[(6) - (7)].dtype).qualifier);
5563 if (SwigType_isfunction(t)) {
5564 SwigType *decl = SwigType_pop_function(t);
5565 if (SwigType_ispointer(t)) {
5566 String *nname = NewStringf("*%s",name);
5567 Swig_feature_set(Swig_cparse_features(), nname, decl, "feature:varargs", val, 0);
5570 Swig_feature_set(Swig_cparse_features(), name, decl, "feature:varargs", val, 0);
5573 } else if (SwigType_ispointer(t)) {
5574 String *nname = NewStringf("*%s",name);
5575 Swig_feature_set(Swig_cparse_features(),nname,0,"feature:varargs",val, 0);
5579 Swig_feature_set(Swig_cparse_features(),name,0,"feature:varargs",val, 0);
5587 #line 2469 "parser.y"
5588 { (yyval.pl) = (yyvsp[(1) - (1)].pl); }
5592 #line 2470 "parser.y"
5597 n = atoi(Char((yyvsp[(1) - (3)].dtype).val));
5599 Swig_error(cparse_file, cparse_line,"Argument count in %%varargs must be positive.\n");
5602 (yyval.pl) = Copy((yyvsp[(3) - (3)].p));
5603 Setattr((yyval.pl),"name","VARARGS_SENTINEL");
5604 for (i = 0; i < n; i++) {
5605 p = Copy((yyvsp[(3) - (3)].p));
5606 set_nextSibling(p,(yyval.pl));
5615 #line 2500 "parser.y"
5618 if ((yyvsp[(3) - (6)].tmap).method) {
5620 (yyval.node) = new_node("typemap");
5621 Setattr((yyval.node),"method",(yyvsp[(3) - (6)].tmap).method);
5622 if ((yyvsp[(3) - (6)].tmap).kwargs) {
5623 ParmList *kw = (yyvsp[(3) - (6)].tmap).kwargs;
5624 code = remove_block(kw, (yyvsp[(6) - (6)].str));
5625 Setattr((yyval.node),"kwargs", (yyvsp[(3) - (6)].tmap).kwargs);
5627 code = code ? code : NewString((yyvsp[(6) - (6)].str));
5628 Setattr((yyval.node),"code", code);
5630 appendChild((yyval.node),(yyvsp[(5) - (6)].p));
5636 #line 2517 "parser.y"
5639 if ((yyvsp[(3) - (6)].tmap).method) {
5640 (yyval.node) = new_node("typemap");
5641 Setattr((yyval.node),"method",(yyvsp[(3) - (6)].tmap).method);
5642 appendChild((yyval.node),(yyvsp[(5) - (6)].p));
5648 #line 2525 "parser.y"
5651 if ((yyvsp[(3) - (8)].tmap).method) {
5652 (yyval.node) = new_node("typemapcopy");
5653 Setattr((yyval.node),"method",(yyvsp[(3) - (8)].tmap).method);
5654 Setattr((yyval.node),"pattern", Getattr((yyvsp[(7) - (8)].p),"pattern"));
5655 appendChild((yyval.node),(yyvsp[(5) - (8)].p));
5661 #line 2538 "parser.y"
5665 p = nextSibling((yyvsp[(1) - (1)].node));
5666 if (p && (!Getattr(p,"value"))) {
5667 /* this is the deprecated two argument typemap form */
5668 Swig_warning(WARN_DEPRECATED_TYPEMAP_LANG,cparse_file, cparse_line,
5669 "Specifying the language name in %%typemap is deprecated - use #ifdef SWIG<LANG> instead.\n");
5670 /* two argument typemap form */
5671 name = Getattr((yyvsp[(1) - (1)].node),"name");
5672 if (!name || (Strcmp(name,typemap_lang))) {
5673 (yyval.tmap).method = 0;
5674 (yyval.tmap).kwargs = 0;
5676 (yyval.tmap).method = Getattr(p,"name");
5677 (yyval.tmap).kwargs = nextSibling(p);
5680 /* one-argument typemap-form */
5681 (yyval.tmap).method = Getattr((yyvsp[(1) - (1)].node),"name");
5682 (yyval.tmap).kwargs = p;
5688 #line 2563 "parser.y"
5690 (yyval.p) = (yyvsp[(1) - (2)].p);
5691 set_nextSibling((yyval.p),(yyvsp[(2) - (2)].p));
5696 #line 2569 "parser.y"
5698 (yyval.p) = (yyvsp[(2) - (3)].p);
5699 set_nextSibling((yyval.p),(yyvsp[(3) - (3)].p));
5704 #line 2573 "parser.y"
5709 #line 2576 "parser.y"
5712 SwigType_push((yyvsp[(1) - (2)].type),(yyvsp[(2) - (2)].decl).type);
5713 (yyval.p) = new_node("typemapitem");
5714 parm = NewParm((yyvsp[(1) - (2)].type),(yyvsp[(2) - (2)].decl).id);
5715 Setattr((yyval.p),"pattern",parm);
5716 Setattr((yyval.p),"parms", (yyvsp[(2) - (2)].decl).parms);
5718 /* $$ = NewParm($1,$2.id);
5719 Setattr($$,"parms",$2.parms); */
5724 #line 2587 "parser.y"
5726 (yyval.p) = new_node("typemapitem");
5727 Setattr((yyval.p),"pattern",(yyvsp[(2) - (3)].pl));
5728 /* Setattr($$,"multitype",$2); */
5733 #line 2592 "parser.y"
5735 (yyval.p) = new_node("typemapitem");
5736 Setattr((yyval.p),"pattern", (yyvsp[(2) - (6)].pl));
5737 /* Setattr($$,"multitype",$2); */
5738 Setattr((yyval.p),"parms",(yyvsp[(5) - (6)].pl));
5743 #line 2605 "parser.y"
5745 (yyval.node) = new_node("types");
5746 Setattr((yyval.node),"parms",(yyvsp[(3) - (5)].pl));
5747 if ((yyvsp[(5) - (5)].str))
5748 Setattr((yyval.node),"convcode",NewString((yyvsp[(5) - (5)].str)));
5753 #line 2617 "parser.y"
5759 int specialized = 0;
5763 tscope = Swig_symbol_current(); /* Get the current scope */
5765 /* If the class name is qualified, we need to create or lookup namespace entries */
5767 (yyvsp[(5) - (9)].str) = resolve_node_scope((yyvsp[(5) - (9)].str));
5771 We use the new namespace entry 'nscope' only to
5772 emit the template node. The template parameters are
5773 resolved in the current 'tscope'.
5775 This is closer to the C++ (typedef) behavior.
5777 n = Swig_cparse_template_locate((yyvsp[(5) - (9)].str),(yyvsp[(7) - (9)].p),tscope);
5779 /* Patch the argument types to respect namespaces */
5780 p = (yyvsp[(7) - (9)].p);
5782 SwigType *value = Getattr(p,"value");
5784 SwigType *ty = Getattr(p,"type");
5787 int reduce = template_reduce;
5788 if (reduce || !SwigType_ispointer(ty)) {
5789 rty = Swig_symbol_typedef_reduce(ty,tscope);
5790 if (!reduce) reduce = SwigType_ispointer(rty);
5792 ty = reduce ? Swig_symbol_type_qualify(rty,tscope) : Swig_symbol_type_qualify(ty,tscope);
5793 Setattr(p,"type",ty);
5798 value = Swig_symbol_type_qualify(value,tscope);
5799 Setattr(p,"value",value);
5806 /* Look for the template */
5809 Node *linklistend = 0;
5811 Node *templnode = 0;
5812 if (Strcmp(nodeType(nn),"template") == 0) {
5813 int nnisclass = (Strcmp(Getattr(nn,"templatetype"),"class") == 0); /* if not a templated class it is a templated function */
5814 Parm *tparms = Getattr(nn,"templateparms");
5818 if (nnisclass && !specialized && ((ParmList_len((yyvsp[(7) - (9)].p)) > ParmList_len(tparms)))) {
5819 Swig_error(cparse_file, cparse_line, "Too many template parameters. Maximum of %d.\n", ParmList_len(tparms));
5820 } else if (nnisclass && !specialized && ((ParmList_len((yyvsp[(7) - (9)].p)) < ParmList_numrequired(tparms)))) {
5821 Swig_error(cparse_file, cparse_line, "Not enough template parameters specified. %d required.\n", ParmList_numrequired(tparms));
5822 } else if (!nnisclass && ((ParmList_len((yyvsp[(7) - (9)].p)) != ParmList_len(tparms)))) {
5823 /* must be an overloaded templated method - ignore it as it is overloaded with a different number of template parameters */
5824 nn = Getattr(nn,"sym:nextSibling"); /* repeat for overloaded templated functions */
5827 String *tname = Copy((yyvsp[(5) - (9)].str));
5828 int def_supplied = 0;
5829 /* Expand the template */
5830 Node *templ = Swig_symbol_clookup((yyvsp[(5) - (9)].str),0);
5831 Parm *targs = templ ? Getattr(templ,"templateparms") : 0;
5834 if (specialized) temparms = CopyParmList((yyvsp[(7) - (9)].p));
5835 else temparms = CopyParmList(tparms);
5837 /* Create typedef's and arguments */
5838 p = (yyvsp[(7) - (9)].p);
5840 if (!p && ParmList_len(p) != ParmList_len(temparms)) {
5841 /* we have no template parameters supplied in %template for a template that has default args*/
5847 String *value = Getattr(p,"value");
5849 Setattr(p,"default","1");
5852 Setattr(tp,"value",value);
5854 SwigType *ty = Getattr(p,"type");
5856 Setattr(tp,"type",ty);
5858 Delattr(tp,"value");
5860 /* fix default arg values */
5862 Parm *pi = temparms;
5864 String *tv = Getattr(tp,"value");
5865 if (!tv) tv = Getattr(tp,"type");
5866 while(pi != tp && ti && pi) {
5867 String *name = Getattr(ti,"name");
5868 String *value = Getattr(pi,"value");
5869 if (!value) value = Getattr(pi,"type");
5870 Replaceid(tv, name, value);
5871 pi = nextSibling(pi);
5872 ti = nextSibling(ti);
5876 tp = nextSibling(tp);
5883 templnode = copy_node(nn);
5884 /* We need to set the node name based on name used to instantiate */
5885 Setattr(templnode,"name",tname);
5888 Delattr(templnode,"sym:typename");
5890 Setattr(templnode,"sym:typename","1");
5892 if ((yyvsp[(3) - (9)].id)) {
5894 Comment this out for 1.3.28. We need to
5895 re-enable it later but first we need to
5896 move %ignore from using %rename to use
5899 String *symname = Swig_name_make(templnode,0,$3,0,0);
5901 String *symname = (yyvsp[(3) - (9)].id);
5902 Swig_cparse_template_expand(templnode,symname,temparms,tscope);
5903 Setattr(templnode,"sym:name",symname);
5906 String *nname = NewStringf("__dummy_%d__", cnt++);
5907 Swig_cparse_template_expand(templnode,nname,temparms,tscope);
5908 Setattr(templnode,"sym:name",nname);
5910 Setattr(templnode,"feature:onlychildren",
5911 "typemap,typemapitem,typemapcopy,typedef,types,fragment");
5913 Delattr(templnode,"templatetype");
5914 Setattr(templnode,"template",nn);
5916 Setfile(templnode,cparse_file);
5917 Setline(templnode,cparse_line);
5920 add_symbols_copy(templnode);
5922 if (Strcmp(nodeType(templnode),"class") == 0) {
5924 /* Identify pure abstract methods */
5925 Setattr(templnode,"abstract", pure_abstract(firstChild(templnode)));
5927 /* Set up inheritance in symbol table */
5930 List *baselist = Getattr(templnode,"baselist");
5931 csyms = Swig_symbol_current();
5932 Swig_symbol_setscope(Getattr(templnode,"symtab"));
5934 List *bases = make_inherit_list(Getattr(templnode,"name"),baselist);
5937 for (s = First(bases); s.item; s = Next(s)) {
5938 Symtab *st = Getattr(s.item,"symtab");
5940 Setfile(st,Getfile(s.item));
5941 Setline(st,Getline(s.item));
5942 Swig_symbol_inherit(st);
5948 Swig_symbol_setscope(csyms);
5951 /* Merge in addmethods for this class */
5953 /* !!! This may be broken. We may have to add the
5954 addmethods at the beginning of the class */
5960 if (Namespaceprefix) {
5961 clsname = stmp = NewStringf("%s::%s", Namespaceprefix, Getattr(templnode,"name"));
5963 clsname = Getattr(templnode,"name");
5965 am = Getattr(extendhash,clsname);
5967 Symtab *st = Swig_symbol_current();
5968 Swig_symbol_setscope(Getattr(templnode,"symtab"));
5969 /* Printf(stdout,"%s: %s %x %x\n", Getattr(templnode,"name"), clsname, Swig_symbol_current(), Getattr(templnode,"symtab")); */
5970 merge_extensions(templnode,am);
5971 Swig_symbol_setscope(st);
5972 append_previous_extension(templnode,am);
5973 Delattr(extendhash,clsname);
5975 if (stmp) Delete(stmp);
5977 /* Add to classes hash */
5978 if (!classes) classes = NewHash();
5981 if (Namespaceprefix) {
5982 String *temp = NewStringf("%s::%s", Namespaceprefix, Getattr(templnode,"name"));
5983 Setattr(classes,temp,templnode);
5986 String *qs = Swig_symbol_qualifiedscopename(templnode);
5987 Setattr(classes, qs,templnode);
5994 /* all the overloaded templated functions are added into a linked list */
5996 /* non-global namespace */
5998 appendChild(nscope_inner,templnode);
6000 if (nscope) (yyval.node) = nscope;
6003 /* global namespace */
6005 (yyval.node) = templnode;
6007 set_nextSibling(linklistend,templnode);
6010 linklistend = templnode;
6013 nn = Getattr(nn,"sym:nextSibling"); /* repeat for overloaded templated functions. If a templated class there will never be a sibling. */
6016 Swig_symbol_setscope(tscope);
6017 Delete(Namespaceprefix);
6018 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6023 #line 2890 "parser.y"
6025 Swig_warning(0,cparse_file, cparse_line,"%s\n", (yyvsp[(2) - (2)].id));
6031 #line 2900 "parser.y"
6033 (yyval.node) = (yyvsp[(1) - (1)].node);
6035 add_symbols((yyval.node));
6036 default_arguments((yyval.node));
6042 #line 2907 "parser.y"
6043 { (yyval.node) = (yyvsp[(1) - (1)].node); }
6047 #line 2908 "parser.y"
6048 { (yyval.node) = (yyvsp[(1) - (1)].node); }
6052 #line 2912 "parser.y"
6054 if (Strcmp((yyvsp[(2) - (3)].id),"C") == 0) {
6061 #line 2916 "parser.y"
6064 if (Strcmp((yyvsp[(2) - (6)].id),"C") == 0) {
6065 Node *n = firstChild((yyvsp[(5) - (6)].node));
6066 (yyval.node) = new_node("extern");
6067 Setattr((yyval.node),"name",(yyvsp[(2) - (6)].id));
6068 appendChild((yyval.node),n);
6070 SwigType *decl = Getattr(n,"decl");
6071 if (SwigType_isfunction(decl)) {
6072 Setattr(n,"storage","externc");
6077 Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", (yyvsp[(2) - (6)].id));
6078 (yyval.node) = new_node("extern");
6079 Setattr((yyval.node),"name",(yyvsp[(2) - (6)].id));
6080 appendChild((yyval.node),firstChild((yyvsp[(5) - (6)].node)));
6086 #line 2943 "parser.y"
6088 (yyval.node) = new_node("cdecl");
6089 if ((yyvsp[(4) - (5)].dtype).qualifier) SwigType_push((yyvsp[(3) - (5)].decl).type,(yyvsp[(4) - (5)].dtype).qualifier);
6090 Setattr((yyval.node),"type",(yyvsp[(2) - (5)].type));
6091 Setattr((yyval.node),"storage",(yyvsp[(1) - (5)].id));
6092 Setattr((yyval.node),"name",(yyvsp[(3) - (5)].decl).id);
6093 Setattr((yyval.node),"decl",(yyvsp[(3) - (5)].decl).type);
6094 Setattr((yyval.node),"parms",(yyvsp[(3) - (5)].decl).parms);
6095 Setattr((yyval.node),"value",(yyvsp[(4) - (5)].dtype).val);
6096 Setattr((yyval.node),"throws",(yyvsp[(4) - (5)].dtype).throws);
6097 Setattr((yyval.node),"throw",(yyvsp[(4) - (5)].dtype).throwf);
6098 if (!(yyvsp[(5) - (5)].node)) {
6099 if (Len(scanner_ccode)) {
6100 String *code = Copy(scanner_ccode);
6101 Setattr((yyval.node),"code",code);
6105 Node *n = (yyvsp[(5) - (5)].node);
6106 /* Inherit attributes */
6108 String *type = Copy((yyvsp[(2) - (5)].type));
6109 Setattr(n,"type",type);
6110 Setattr(n,"storage",(yyvsp[(1) - (5)].id));
6115 if ((yyvsp[(4) - (5)].dtype).bitfield) {
6116 Setattr((yyval.node),"bitfield", (yyvsp[(4) - (5)].dtype).bitfield);
6119 /* Look for "::" declarations (ignored) */
6120 if (Strstr((yyvsp[(3) - (5)].decl).id,"::")) {
6121 /* This is a special case. If the scope name of the declaration exactly
6122 matches that of the declaration, then we will allow it. Otherwise, delete. */
6123 String *p = Swig_scopename_prefix((yyvsp[(3) - (5)].decl).id);
6125 if ((Namespaceprefix && Strcmp(p,Namespaceprefix) == 0) ||
6126 (inclass && Strcmp(p,Classprefix) == 0)) {
6127 String *lstr = Swig_scopename_last((yyvsp[(3) - (5)].decl).id);
6128 Setattr((yyval.node),"name",lstr);
6130 set_nextSibling((yyval.node),(yyvsp[(5) - (5)].node));
6132 Delete((yyval.node));
6133 (yyval.node) = (yyvsp[(5) - (5)].node);
6137 Delete((yyval.node));
6138 (yyval.node) = (yyvsp[(5) - (5)].node);
6141 set_nextSibling((yyval.node),(yyvsp[(5) - (5)].node));
6147 #line 3004 "parser.y"
6150 Clear(scanner_ccode);
6155 #line 3008 "parser.y"
6157 (yyval.node) = new_node("cdecl");
6158 if ((yyvsp[(3) - (4)].dtype).qualifier) SwigType_push((yyvsp[(2) - (4)].decl).type,(yyvsp[(3) - (4)].dtype).qualifier);
6159 Setattr((yyval.node),"name",(yyvsp[(2) - (4)].decl).id);
6160 Setattr((yyval.node),"decl",(yyvsp[(2) - (4)].decl).type);
6161 Setattr((yyval.node),"parms",(yyvsp[(2) - (4)].decl).parms);
6162 Setattr((yyval.node),"value",(yyvsp[(3) - (4)].dtype).val);
6163 Setattr((yyval.node),"throws",(yyvsp[(3) - (4)].dtype).throws);
6164 Setattr((yyval.node),"throw",(yyvsp[(3) - (4)].dtype).throwf);
6165 if ((yyvsp[(3) - (4)].dtype).bitfield) {
6166 Setattr((yyval.node),"bitfield", (yyvsp[(3) - (4)].dtype).bitfield);
6168 if (!(yyvsp[(4) - (4)].node)) {
6169 if (Len(scanner_ccode)) {
6170 String *code = Copy(scanner_ccode);
6171 Setattr((yyval.node),"code",code);
6175 set_nextSibling((yyval.node),(yyvsp[(4) - (4)].node));
6181 #line 3030 "parser.y"
6183 skip_balanced('{','}');
6189 #line 3036 "parser.y"
6191 (yyval.dtype) = (yyvsp[(1) - (1)].dtype);
6192 (yyval.dtype).qualifier = 0;
6193 (yyval.dtype).throws = 0;
6194 (yyval.dtype).throwf = 0;
6199 #line 3042 "parser.y"
6201 (yyval.dtype) = (yyvsp[(2) - (2)].dtype);
6202 (yyval.dtype).qualifier = (yyvsp[(1) - (2)].str);
6203 (yyval.dtype).throws = 0;
6204 (yyval.dtype).throwf = 0;
6209 #line 3048 "parser.y"
6211 (yyval.dtype) = (yyvsp[(5) - (5)].dtype);
6212 (yyval.dtype).qualifier = 0;
6213 (yyval.dtype).throws = (yyvsp[(3) - (5)].pl);
6214 (yyval.dtype).throwf = NewString("1");
6219 #line 3054 "parser.y"
6221 (yyval.dtype) = (yyvsp[(6) - (6)].dtype);
6222 (yyval.dtype).qualifier = (yyvsp[(1) - (6)].str);
6223 (yyval.dtype).throws = (yyvsp[(4) - (6)].pl);
6224 (yyval.dtype).throwf = NewString("1");
6229 #line 3067 "parser.y"
6232 (yyval.node) = new_node("enumforward");
6233 ty = NewStringf("enum %s", (yyvsp[(3) - (4)].id));
6234 Setattr((yyval.node),"name",(yyvsp[(3) - (4)].id));
6235 Setattr((yyval.node),"type",ty);
6236 Setattr((yyval.node),"sym:weak", "1");
6237 add_symbols((yyval.node));
6242 #line 3082 "parser.y"
6245 (yyval.node) = new_node("enum");
6246 ty = NewStringf("enum %s", (yyvsp[(3) - (7)].id));
6247 Setattr((yyval.node),"name",(yyvsp[(3) - (7)].id));
6248 Setattr((yyval.node),"type",ty);
6249 appendChild((yyval.node),(yyvsp[(5) - (7)].node));
6250 add_symbols((yyval.node)); /* Add to tag space */
6251 add_symbols((yyvsp[(5) - (7)].node)); /* Add enum values to id space */
6256 #line 3092 "parser.y"
6260 String *unnamed = 0;
6261 int unnamedinstance = 0;
6263 (yyval.node) = new_node("enum");
6264 if ((yyvsp[(3) - (8)].id)) {
6265 Setattr((yyval.node),"name",(yyvsp[(3) - (8)].id));
6266 ty = NewStringf("enum %s", (yyvsp[(3) - (8)].id));
6267 } else if ((yyvsp[(7) - (8)].decl).id) {
6268 unnamed = make_unnamed();
6269 ty = NewStringf("enum %s", unnamed);
6270 Setattr((yyval.node),"unnamed",unnamed);
6271 /* name is not set for unnamed enum instances, e.g. enum { foo } Instance; */
6272 if ((yyvsp[(1) - (8)].id) && Cmp((yyvsp[(1) - (8)].id),"typedef") == 0) {
6273 Setattr((yyval.node),"name",(yyvsp[(7) - (8)].decl).id);
6275 unnamedinstance = 1;
6277 Setattr((yyval.node),"storage",(yyvsp[(1) - (8)].id));
6279 if ((yyvsp[(7) - (8)].decl).id && Cmp((yyvsp[(1) - (8)].id),"typedef") == 0) {
6280 Setattr((yyval.node),"tdname",(yyvsp[(7) - (8)].decl).id);
6281 Setattr((yyval.node),"allows_typedef","1");
6283 appendChild((yyval.node),(yyvsp[(5) - (8)].node));
6284 n = new_node("cdecl");
6285 Setattr(n,"type",ty);
6286 Setattr(n,"name",(yyvsp[(7) - (8)].decl).id);
6287 Setattr(n,"storage",(yyvsp[(1) - (8)].id));
6288 Setattr(n,"decl",(yyvsp[(7) - (8)].decl).type);
6289 Setattr(n,"parms",(yyvsp[(7) - (8)].decl).parms);
6290 Setattr(n,"unnamed",unnamed);
6292 if (unnamedinstance) {
6293 SwigType *cty = NewString("enum ");
6294 Setattr((yyval.node),"type",cty);
6295 Setattr((yyval.node),"unnamedinstance","1");
6296 Setattr(n,"unnamedinstance","1");
6299 if ((yyvsp[(8) - (8)].node)) {
6300 Node *p = (yyvsp[(8) - (8)].node);
6301 set_nextSibling(n,p);
6303 SwigType *cty = Copy(ty);
6304 Setattr(p,"type",cty);
6305 Setattr(p,"unnamed",unnamed);
6306 Setattr(p,"storage",(yyvsp[(1) - (8)].id));
6311 if (Len(scanner_ccode)) {
6312 String *code = Copy(scanner_ccode);
6313 Setattr(n,"code",code);
6318 /* Ensure that typedef enum ABC {foo} XYZ; uses XYZ for sym:name, like structs.
6319 * Note that class_rename/yyrename are bit of a mess so used this simple approach to change the name. */
6320 if ((yyvsp[(7) - (8)].decl).id && (yyvsp[(3) - (8)].id) && Cmp((yyvsp[(1) - (8)].id),"typedef") == 0) {
6321 String *name = NewString((yyvsp[(7) - (8)].decl).id);
6322 Setattr((yyval.node), "parser:makename", name);
6326 add_symbols((yyval.node)); /* Add enum to tag space */
6327 set_nextSibling((yyval.node),n);
6329 add_symbols((yyvsp[(5) - (8)].node)); /* Add enum values to id space */
6336 #line 3170 "parser.y"
6338 /* This is a sick hack. If the ctor_end has parameters,
6339 and the parms parameter only has 1 parameter, this
6340 could be a declaration of the form:
6344 Otherwise it's an error. */
6348 if ((ParmList_len((yyvsp[(4) - (6)].pl)) == 1) && (!Swig_scopename_check((yyvsp[(2) - (6)].type)))) {
6349 SwigType *ty = Getattr((yyvsp[(4) - (6)].pl),"type");
6350 String *name = Getattr((yyvsp[(4) - (6)].pl),"name");
6353 (yyval.node) = new_node("cdecl");
6354 Setattr((yyval.node),"type",(yyvsp[(2) - (6)].type));
6355 Setattr((yyval.node),"storage",(yyvsp[(1) - (6)].id));
6356 Setattr((yyval.node),"name",ty);
6358 if ((yyvsp[(6) - (6)].decl).have_parms) {
6359 SwigType *decl = NewStringEmpty();
6360 SwigType_add_function(decl,(yyvsp[(6) - (6)].decl).parms);
6361 Setattr((yyval.node),"decl",decl);
6362 Setattr((yyval.node),"parms",(yyvsp[(6) - (6)].decl).parms);
6363 if (Len(scanner_ccode)) {
6364 String *code = Copy(scanner_ccode);
6365 Setattr((yyval.node),"code",code);
6369 if ((yyvsp[(6) - (6)].decl).defarg) {
6370 Setattr((yyval.node),"value",(yyvsp[(6) - (6)].decl).defarg);
6372 Setattr((yyval.node),"throws",(yyvsp[(6) - (6)].decl).throws);
6373 Setattr((yyval.node),"throw",(yyvsp[(6) - (6)].decl).throwf);
6378 Swig_error(cparse_file,cparse_line,"Syntax error in input(2).\n");
6385 #line 3221 "parser.y"
6386 { (yyval.node) = (yyvsp[(1) - (1)].node); }
6390 #line 3222 "parser.y"
6391 { (yyval.node) = (yyvsp[(1) - (1)].node); }
6395 #line 3223 "parser.y"
6396 { (yyval.node) = (yyvsp[(1) - (1)].node); }
6400 #line 3224 "parser.y"
6401 { (yyval.node) = (yyvsp[(1) - (1)].node); }
6405 #line 3225 "parser.y"
6406 { (yyval.node) = (yyvsp[(1) - (1)].node); }
6410 #line 3226 "parser.y"
6411 { (yyval.node) = 0; }
6415 #line 3232 "parser.y"
6419 (yyval.node) = new_node("class");
6420 Setline((yyval.node),cparse_start_line);
6421 Setattr((yyval.node),"kind",(yyvsp[(2) - (5)].id));
6422 if ((yyvsp[(4) - (5)].bases)) {
6423 Setattr((yyval.node),"baselist", Getattr((yyvsp[(4) - (5)].bases),"public"));
6424 Setattr((yyval.node),"protectedbaselist", Getattr((yyvsp[(4) - (5)].bases),"protected"));
6425 Setattr((yyval.node),"privatebaselist", Getattr((yyvsp[(4) - (5)].bases),"private"));
6427 Setattr((yyval.node),"allows_typedef","1");
6429 /* preserve the current scope */
6430 prev_symtab = Swig_symbol_current();
6432 /* If the class name is qualified. We need to create or lookup namespace/scope entries */
6433 scope = resolve_node_scope((yyvsp[(3) - (5)].str));
6434 Setfile(scope,cparse_file);
6435 Setline(scope,cparse_line);
6436 (yyvsp[(3) - (5)].str) = scope;
6438 /* support for old nested classes "pseudo" support, such as:
6440 %rename(Ala__Ola) Ala::Ola;
6446 this should disappear when a proper implementation is added.
6448 if (nscope_inner && Strcmp(nodeType(nscope_inner),"namespace") != 0) {
6449 if (Namespaceprefix) {
6450 String *name = NewStringf("%s::%s", Namespaceprefix, (yyvsp[(3) - (5)].str));
6451 (yyvsp[(3) - (5)].str) = name;
6452 Namespaceprefix = 0;
6456 Setattr((yyval.node),"name",(yyvsp[(3) - (5)].str));
6458 Delete(class_rename);
6459 class_rename = make_name((yyval.node),(yyvsp[(3) - (5)].str),0);
6460 Classprefix = NewString((yyvsp[(3) - (5)].str));
6461 /* Deal with inheritance */
6462 if ((yyvsp[(4) - (5)].bases)) {
6463 bases = make_inherit_list((yyvsp[(3) - (5)].str),Getattr((yyvsp[(4) - (5)].bases),"public"));
6465 if (SwigType_istemplate((yyvsp[(3) - (5)].str))) {
6466 String *fbase, *tbase, *prefix;
6467 prefix = SwigType_templateprefix((yyvsp[(3) - (5)].str));
6468 if (Namespaceprefix) {
6469 fbase = NewStringf("%s::%s", Namespaceprefix,(yyvsp[(3) - (5)].str));
6470 tbase = NewStringf("%s::%s", Namespaceprefix, prefix);
6472 fbase = Copy((yyvsp[(3) - (5)].str));
6473 tbase = Copy(prefix);
6475 Swig_name_inherit(tbase,fbase);
6480 if (strcmp((yyvsp[(2) - (5)].id),"class") == 0) {
6481 cplus_mode = CPLUS_PRIVATE;
6483 cplus_mode = CPLUS_PUBLIC;
6485 Swig_symbol_newscope();
6486 Swig_symbol_setscopename((yyvsp[(3) - (5)].str));
6489 for (s = First(bases); s.item; s = Next(s)) {
6490 Symtab *st = Getattr(s.item,"symtab");
6492 Setfile(st,Getfile(s.item));
6493 Setline(st,Getline(s.item));
6494 Swig_symbol_inherit(st);
6499 Delete(Namespaceprefix);
6500 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6501 cparse_start_line = cparse_line;
6503 /* If there are active template parameters, we need to make sure they are
6504 placed in the class symbol table so we can catch shadows */
6506 if (template_parameters) {
6507 Parm *tp = template_parameters;
6509 String *tpname = Copy(Getattr(tp,"name"));
6510 Node *tn = new_node("templateparm");
6511 Setattr(tn,"name",tpname);
6512 Swig_symbol_cadd(tpname,tn);
6513 tp = nextSibling(tp);
6517 if (class_level >= max_class_levels) {
6518 if (!max_class_levels) {
6519 max_class_levels = 16;
6521 max_class_levels *= 2;
6523 class_decl = (Node**) realloc(class_decl, sizeof(Node*) * max_class_levels);
6525 Swig_error(cparse_file, cparse_line, "realloc() failed\n");
6528 class_decl[class_level++] = (yyval.node);
6534 #line 3346 "parser.y"
6538 Symtab *cscope = prev_symtab;
6540 String *scpname = 0;
6541 (yyval.node) = class_decl[--class_level];
6544 /* Check for pure-abstract class */
6545 Setattr((yyval.node),"abstract", pure_abstract((yyvsp[(7) - (9)].node)));
6547 /* This bit of code merges in a previously defined %extend directive (if any) */
6550 String *clsname = Swig_symbol_qualifiedscopename(0);
6551 am = Getattr(extendhash,clsname);
6553 merge_extensions((yyval.node),am);
6554 Delattr(extendhash,clsname);
6558 if (!classes) classes = NewHash();
6559 scpname = Swig_symbol_qualifiedscopename(0);
6560 Setattr(classes,scpname,(yyval.node));
6563 appendChild((yyval.node),(yyvsp[(7) - (9)].node));
6565 if (am) append_previous_extension((yyval.node),am);
6567 p = (yyvsp[(9) - (9)].node);
6569 set_nextSibling((yyval.node),p);
6572 if (cparse_cplusplus && !cparse_externc) {
6573 ty = NewString((yyvsp[(3) - (9)].str));
6575 ty = NewStringf("%s %s", (yyvsp[(2) - (9)].id),(yyvsp[(3) - (9)].str));
6578 Setattr(p,"storage",(yyvsp[(1) - (9)].id));
6579 Setattr(p,"type",ty);
6582 /* Dump nested classes */
6584 String *name = (yyvsp[(3) - (9)].str);
6585 if ((yyvsp[(9) - (9)].node)) {
6586 SwigType *decltype = Getattr((yyvsp[(9) - (9)].node),"decl");
6587 if (Cmp((yyvsp[(1) - (9)].id),"typedef") == 0) {
6588 if (!decltype || !Len(decltype)) {
6590 name = Getattr((yyvsp[(9) - (9)].node),"name");
6592 Setattr((yyval.node),"tdname",cname);
6595 /* Use typedef name as class name */
6596 if (class_rename && (Strcmp(class_rename,(yyvsp[(3) - (9)].str)) == 0)) {
6597 Delete(class_rename);
6598 class_rename = NewString(name);
6600 if (!Getattr(classes,name)) {
6601 Setattr(classes,name,(yyval.node));
6603 Setattr((yyval.node),"decl",decltype);
6607 appendChild((yyval.node),dump_nested(Char(name)));
6610 if (cplus_mode != CPLUS_PUBLIC) {
6611 /* we 'open' the class at the end, to allow %template
6612 to add new members */
6613 Node *pa = new_node("access");
6614 Setattr(pa,"kind","public");
6615 cplus_mode = CPLUS_PUBLIC;
6616 appendChild((yyval.node),pa);
6620 Setattr((yyval.node),"symtab",Swig_symbol_popscope());
6624 /* this is tricky */
6625 /* we add the declaration in the original namespace */
6626 appendChild(nscope_inner,(yyval.node));
6627 Swig_symbol_setscope(Getattr(nscope_inner,"symtab"));
6628 Delete(Namespaceprefix);
6629 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6630 add_symbols((yyval.node));
6631 if (nscope) (yyval.node) = nscope;
6632 /* but the variable definition in the current scope */
6633 Swig_symbol_setscope(cscope);
6634 Delete(Namespaceprefix);
6635 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6636 add_symbols((yyvsp[(9) - (9)].node));
6639 yyrename = Copy(class_rename);
6640 Delete(Namespaceprefix);
6641 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6643 add_symbols((yyval.node));
6644 add_symbols((yyvsp[(9) - (9)].node));
6646 Swig_symbol_setscope(cscope);
6647 Delete(Namespaceprefix);
6648 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6653 #line 3464 "parser.y"
6656 unnamed = make_unnamed();
6657 (yyval.node) = new_node("class");
6658 Setline((yyval.node),cparse_start_line);
6659 Setattr((yyval.node),"kind",(yyvsp[(2) - (3)].id));
6660 Setattr((yyval.node),"storage",(yyvsp[(1) - (3)].id));
6661 Setattr((yyval.node),"unnamed",unnamed);
6662 Setattr((yyval.node),"allows_typedef","1");
6663 Delete(class_rename);
6664 class_rename = make_name((yyval.node),0,0);
6665 if (strcmp((yyvsp[(2) - (3)].id),"class") == 0) {
6666 cplus_mode = CPLUS_PRIVATE;
6668 cplus_mode = CPLUS_PUBLIC;
6670 Swig_symbol_newscope();
6671 cparse_start_line = cparse_line;
6672 if (class_level >= max_class_levels) {
6673 if (!max_class_levels) {
6674 max_class_levels = 16;
6676 max_class_levels *= 2;
6678 class_decl = (Node**) realloc(class_decl, sizeof(Node*) * max_class_levels);
6680 Swig_error(cparse_file, cparse_line, "realloc() failed\n");
6683 class_decl[class_level++] = (yyval.node);
6685 Classprefix = NewStringEmpty();
6686 Delete(Namespaceprefix);
6687 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6692 #line 3498 "parser.y"
6697 (yyval.node) = class_decl[--class_level];
6699 unnamed = Getattr((yyval.node),"unnamed");
6701 /* Check for pure-abstract class */
6702 Setattr((yyval.node),"abstract", pure_abstract((yyvsp[(5) - (8)].node)));
6704 n = new_node("cdecl");
6705 Setattr(n,"name",(yyvsp[(7) - (8)].decl).id);
6706 Setattr(n,"unnamed",unnamed);
6707 Setattr(n,"type",unnamed);
6708 Setattr(n,"decl",(yyvsp[(7) - (8)].decl).type);
6709 Setattr(n,"parms",(yyvsp[(7) - (8)].decl).parms);
6710 Setattr(n,"storage",(yyvsp[(1) - (8)].id));
6711 if ((yyvsp[(8) - (8)].node)) {
6712 Node *p = (yyvsp[(8) - (8)].node);
6713 set_nextSibling(n,p);
6715 String *type = Copy(unnamed);
6716 Setattr(p,"name",(yyvsp[(7) - (8)].decl).id);
6717 Setattr(p,"unnamed",unnamed);
6718 Setattr(p,"type",type);
6720 Setattr(p,"storage",(yyvsp[(1) - (8)].id));
6724 set_nextSibling((yyval.node),n);
6727 /* If a proper typedef name was given, we'll use it to set the scope name */
6729 if ((yyvsp[(1) - (8)].id) && (strcmp((yyvsp[(1) - (8)].id),"typedef") == 0)) {
6730 if (!Len((yyvsp[(7) - (8)].decl).type)) {
6731 String *scpname = 0;
6732 name = (yyvsp[(7) - (8)].decl).id;
6733 Setattr((yyval.node),"tdname",name);
6734 Setattr((yyval.node),"name",name);
6735 Swig_symbol_setscopename(name);
6737 /* If a proper name was given, we use that as the typedef, not unnamed */
6739 Append(unnamed, name);
6742 set_nextSibling((yyval.node),n);
6744 /* Check for previous extensions */
6746 String *clsname = Swig_symbol_qualifiedscopename(0);
6747 Node *am = Getattr(extendhash,clsname);
6749 /* Merge the extension into the symbol table */
6750 merge_extensions((yyval.node),am);
6751 append_previous_extension((yyval.node),am);
6752 Delattr(extendhash,clsname);
6756 if (!classes) classes = NewHash();
6757 scpname = Swig_symbol_qualifiedscopename(0);
6758 Setattr(classes,scpname,(yyval.node));
6761 Swig_symbol_setscopename((char*)"<unnamed>");
6764 appendChild((yyval.node),(yyvsp[(5) - (8)].node));
6765 appendChild((yyval.node),dump_nested(Char(name)));
6768 Setattr((yyval.node),"symtab",Swig_symbol_popscope());
6771 yyrename = NewString(class_rename);
6773 Delete(Namespaceprefix);
6774 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6775 add_symbols((yyval.node));
6782 #line 3586 "parser.y"
6783 { (yyval.node) = 0; }
6787 #line 3587 "parser.y"
6789 (yyval.node) = new_node("cdecl");
6790 Setattr((yyval.node),"name",(yyvsp[(1) - (2)].decl).id);
6791 Setattr((yyval.node),"decl",(yyvsp[(1) - (2)].decl).type);
6792 Setattr((yyval.node),"parms",(yyvsp[(1) - (2)].decl).parms);
6793 set_nextSibling((yyval.node),(yyvsp[(2) - (2)].node));
6798 #line 3599 "parser.y"
6800 if ((yyvsp[(1) - (4)].id) && (Strcmp((yyvsp[(1) - (4)].id),"friend") == 0)) {
6804 (yyval.node) = new_node("classforward");
6805 Setfile((yyval.node),cparse_file);
6806 Setline((yyval.node),cparse_line);
6807 Setattr((yyval.node),"kind",(yyvsp[(2) - (4)].id));
6808 Setattr((yyval.node),"name",(yyvsp[(3) - (4)].str));
6809 Setattr((yyval.node),"sym:weak", "1");
6810 add_symbols((yyval.node));
6816 #line 3619 "parser.y"
6817 { template_parameters = (yyvsp[(3) - (4)].tparms); }
6821 #line 3619 "parser.y"
6826 /* check if we get a namespace node with a class declaration, and retrieve the class */
6827 Symtab *cscope = Swig_symbol_current();
6829 Node *ntop = (yyvsp[(6) - (6)].node);
6831 SwigType *ntype = ni ? nodeType(ni) : 0;
6832 while (ni && Strcmp(ntype,"namespace") == 0) {
6833 sti = Getattr(ni,"symtab");
6834 ni = firstChild(ni);
6835 ntype = nodeType(ni);
6838 Swig_symbol_setscope(sti);
6839 Delete(Namespaceprefix);
6840 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
6841 (yyvsp[(6) - (6)].node) = ni;
6844 template_parameters = 0;
6845 (yyval.node) = (yyvsp[(6) - (6)].node);
6846 if ((yyval.node)) tname = Getattr((yyval.node),"name");
6848 /* Check if the class is a template specialization */
6849 if (((yyval.node)) && (Strchr(tname,'<')) && (!is_operator(tname))) {
6850 /* If a specialization. Check if defined. */
6853 String *tbase = SwigType_templateprefix(tname);
6854 tempn = Swig_symbol_clookup_local(tbase,0);
6855 if (!tempn || (Strcmp(nodeType(tempn),"template") != 0)) {
6856 SWIG_WARN_NODE_BEGIN(tempn);
6857 Swig_warning(WARN_PARSE_TEMPLATE_SP_UNDEF, Getfile((yyval.node)),Getline((yyval.node)),"Specialization of non-template '%s'.\n", tbase);
6858 SWIG_WARN_NODE_END(tempn);
6864 Setattr((yyval.node),"specialization","1");
6865 Setattr((yyval.node),"templatetype",nodeType((yyval.node)));
6866 set_nodeType((yyval.node),"template");
6867 /* Template partial specialization */
6868 if (tempn && ((yyvsp[(3) - (6)].tparms)) && ((yyvsp[(6) - (6)].node))) {
6870 String *targs = SwigType_templateargs(tname);
6871 tlist = SwigType_parmlist(targs);
6872 /* Printf(stdout,"targs = '%s' %s\n", targs, tlist); */
6873 if (!Getattr((yyval.node),"sym:weak")) {
6874 Setattr((yyval.node),"sym:typename","1");
6877 if (Len(tlist) != ParmList_len(Getattr(tempn,"templateparms"))) {
6878 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")));
6882 /* This code builds the argument list for the partial template
6883 specialization. This is a little hairy, but the idea is as
6886 $3 contains a list of arguments supplied for the template.
6887 For example template<class T>.
6889 tlist is a list of the specialization arguments--which may be
6890 different. For example class<int,T>.
6892 tp is a copy of the arguments in the original template definition.
6894 The patching algorithm walks through the list of supplied
6895 arguments ($3), finds the position in the specialization arguments
6896 (tlist), and then patches the name in the argument list of the
6904 Parm *tp = CopyParmList(Getattr(tempn,"templateparms"));
6906 p = (yyvsp[(3) - (6)].tparms);
6908 for (i = 0; i < nargs; i++){
6909 pn = Getattr(p,"name");
6910 if (Strcmp(pn,SwigType_base(Getitem(tlist,i))) == 0) {
6913 for (j = 0; j < i; j++) {
6914 p1 = nextSibling(p1);
6916 Setattr(p1,"name",pn);
6917 Setattr(p1,"partialarg","1");
6925 if (!Getattr(p1,"partialarg")) {
6927 Setattr(p1,"type", Getitem(tlist,i));
6930 p1 = nextSibling(p1);
6932 Setattr((yyval.node),"templateparms",tp);
6936 /* Patch the parameter list */
6939 ParmList *tp = CopyParmList(Getattr(tempn,"templateparms"));
6940 p = (yyvsp[(3) - (6)].tparms);
6943 String *pn = Getattr(p,"name");
6944 Printf(stdout,"pn = '%s'\n", pn);
6945 if (pn) Setattr(p1,"name",pn);
6946 else Delattr(p1,"name");
6947 pn = Getattr(p,"type");
6948 if (pn) Setattr(p1,"type",pn);
6950 p1 = nextSibling(p1);
6952 Setattr((yyval.node),"templateparms",tp);
6955 Setattr((yyval.node),"templateparms",(yyvsp[(3) - (6)].tparms));
6958 Delattr((yyval.node),"specialization");
6959 Setattr((yyval.node),"partialspecialization","1");
6960 /* Create a specialized name for matching */
6962 Parm *p = (yyvsp[(3) - (6)].tparms);
6963 String *fname = NewString(Getattr((yyval.node),"name"));
6969 String *n = Getattr(p,"name");
6975 for (i = 0; i < ilen; i++) {
6976 if (Strstr(Getitem(tlist,i),n)) {
6977 sprintf(tmp,"$%d",i+1);
6978 Replaceid(fname,n,tmp);
6983 /* Patch argument names with typedef */
6986 List *tparms = SwigType_parmlist(fname);
6987 ffname = SwigType_templateprefix(fname);
6988 Append(ffname,"<(");
6989 for (tt = First(tparms); tt.item; ) {
6990 SwigType *rtt = Swig_symbol_typedef_reduce(tt.item,0);
6991 SwigType *ttr = Swig_symbol_type_qualify(rtt,0);
6994 if (tt.item) Putc(',',ffname);
6999 Append(ffname,")>");
7002 String *partials = Getattr(tempn,"partials");
7004 partials = NewList();
7005 Setattr(tempn,"partials",partials);
7008 /* Printf(stdout,"partial: fname = '%s', '%s'\n", fname, Swig_symbol_typedef_reduce(fname,0)); */
7009 Append(partials,ffname);
7011 Setattr((yyval.node),"partialargs",ffname);
7012 Swig_symbol_cadd(ffname,(yyval.node));
7018 /* Need to resolve exact specialization name */
7019 /* add default args from generic template */
7020 String *ty = Swig_symbol_template_deftype(tname,0);
7021 String *fname = Swig_symbol_type_qualify(ty,0);
7022 Swig_symbol_cadd(fname,(yyval.node));
7026 } else if ((yyval.node)) {
7027 Setattr((yyval.node),"templatetype",nodeType((yyvsp[(6) - (6)].node)));
7028 set_nodeType((yyval.node),"template");
7029 Setattr((yyval.node),"templateparms", (yyvsp[(3) - (6)].tparms));
7030 if (!Getattr((yyval.node),"sym:weak")) {
7031 Setattr((yyval.node),"sym:typename","1");
7033 add_symbols((yyval.node));
7034 default_arguments((yyval.node));
7035 /* We also place a fully parameterized version in the symbol table */
7038 String *fname = NewStringf("%s<(", Getattr((yyval.node),"name"));
7039 p = (yyvsp[(3) - (6)].tparms);
7041 String *n = Getattr(p,"name");
7042 if (!n) n = Getattr(p,"type");
7045 if (p) Putc(',',fname);
7048 Swig_symbol_cadd(fname,(yyval.node));
7051 (yyval.node) = ntop;
7052 Swig_symbol_setscope(cscope);
7053 Delete(Namespaceprefix);
7054 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7055 if (error) (yyval.node) = 0;
7060 #line 3854 "parser.y"
7062 Swig_warning(WARN_PARSE_EXPLICIT_TEMPLATE, cparse_file, cparse_line, "Explicit template instantiation ignored.\n");
7068 #line 3860 "parser.y"
7070 (yyval.node) = (yyvsp[(1) - (1)].node);
7075 #line 3863 "parser.y"
7077 (yyval.node) = (yyvsp[(1) - (1)].node);
7082 #line 3866 "parser.y"
7084 (yyval.node) = (yyvsp[(1) - (1)].node);
7089 #line 3869 "parser.y"
7096 #line 3872 "parser.y"
7098 (yyval.node) = (yyvsp[(1) - (1)].node);
7103 #line 3875 "parser.y"
7105 (yyval.node) = (yyvsp[(1) - (1)].node);
7110 #line 3880 "parser.y"
7112 /* Rip out the parameter names */
7113 Parm *p = (yyvsp[(1) - (1)].pl);
7114 (yyval.tparms) = (yyvsp[(1) - (1)].pl);
7117 String *name = Getattr(p,"name");
7119 /* Hmmm. Maybe it's a 'class T' parameter */
7120 char *type = Char(Getattr(p,"type"));
7121 /* Template template parameter */
7122 if (strncmp(type,"template<class> ",16) == 0) {
7125 if ((strncmp(type,"class ",6) == 0) || (strncmp(type,"typename ", 9) == 0)) {
7126 char *t = strchr(type,' ');
7127 Setattr(p,"name", t+1);
7130 Swig_error(cparse_file, cparse_line, "Missing template parameter name\n");
7142 #line 3910 "parser.y"
7144 set_nextSibling((yyvsp[(1) - (2)].p),(yyvsp[(2) - (2)].pl));
7145 (yyval.pl) = (yyvsp[(1) - (2)].p);
7150 #line 3914 "parser.y"
7155 #line 3917 "parser.y"
7157 (yyval.p) = NewParm(NewString((yyvsp[(1) - (1)].id)), 0);
7162 #line 3920 "parser.y"
7164 (yyval.p) = (yyvsp[(1) - (1)].p);
7169 #line 3925 "parser.y"
7171 set_nextSibling((yyvsp[(2) - (3)].p),(yyvsp[(3) - (3)].pl));
7172 (yyval.pl) = (yyvsp[(2) - (3)].p);
7177 #line 3929 "parser.y"
7182 #line 3934 "parser.y"
7184 String *uname = Swig_symbol_type_qualify((yyvsp[(2) - (3)].str),0);
7185 String *name = Swig_scopename_last((yyvsp[(2) - (3)].str));
7186 (yyval.node) = new_node("using");
7187 Setattr((yyval.node),"uname",uname);
7188 Setattr((yyval.node),"name", name);
7191 add_symbols((yyval.node));
7196 #line 3944 "parser.y"
7198 Node *n = Swig_symbol_clookup((yyvsp[(3) - (4)].str),0);
7200 Swig_error(cparse_file, cparse_line, "Nothing known about namespace '%s'\n", (yyvsp[(3) - (4)].str));
7204 while (Strcmp(nodeType(n),"using") == 0) {
7205 n = Getattr(n,"node");
7208 if (Strcmp(nodeType(n),"namespace") == 0) {
7209 Symtab *current = Swig_symbol_current();
7210 Symtab *symtab = Getattr(n,"symtab");
7211 (yyval.node) = new_node("using");
7212 Setattr((yyval.node),"node",n);
7213 Setattr((yyval.node),"namespace", (yyvsp[(3) - (4)].str));
7214 if (current != symtab) {
7215 Swig_symbol_inherit(symtab);
7218 Swig_error(cparse_file, cparse_line, "'%s' is not a namespace.\n", (yyvsp[(3) - (4)].str));
7229 #line 3975 "parser.y"
7232 (yyvsp[(1) - (3)].node) = Swig_symbol_current();
7233 h = Swig_symbol_clookup((yyvsp[(2) - (3)].str),0);
7234 if (h && ((yyvsp[(1) - (3)].node) == Getattr(h,"sym:symtab")) && (Strcmp(nodeType(h),"namespace") == 0)) {
7235 if (Getattr(h,"alias")) {
7236 h = Getattr(h,"namespace");
7237 Swig_warning(WARN_PARSE_NAMESPACE_ALIAS, cparse_file, cparse_line, "Namespace alias '%s' not allowed here. Assuming '%s'\n",
7238 (yyvsp[(2) - (3)].str), Getattr(h,"name"));
7239 (yyvsp[(2) - (3)].str) = Getattr(h,"name");
7241 Swig_symbol_setscope(Getattr(h,"symtab"));
7243 Swig_symbol_newscope();
7244 Swig_symbol_setscopename((yyvsp[(2) - (3)].str));
7246 Delete(Namespaceprefix);
7247 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7252 #line 3993 "parser.y"
7254 Node *n = (yyvsp[(5) - (6)].node);
7255 set_nodeType(n,"namespace");
7256 Setattr(n,"name",(yyvsp[(2) - (6)].str));
7257 Setattr(n,"symtab", Swig_symbol_popscope());
7258 Swig_symbol_setscope((yyvsp[(1) - (6)].node));
7260 Delete(Namespaceprefix);
7261 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7262 add_symbols((yyval.node));
7267 #line 4004 "parser.y"
7270 (yyvsp[(1) - (2)].node) = Swig_symbol_current();
7271 h = Swig_symbol_clookup((char *)" ",0);
7272 if (h && (Strcmp(nodeType(h),"namespace") == 0)) {
7273 Swig_symbol_setscope(Getattr(h,"symtab"));
7275 Swig_symbol_newscope();
7276 /* we don't use "__unnamed__", but a long 'empty' name */
7277 Swig_symbol_setscopename(" ");
7279 Namespaceprefix = 0;
7284 #line 4016 "parser.y"
7286 (yyval.node) = (yyvsp[(4) - (5)].node);
7287 set_nodeType((yyval.node),"namespace");
7288 Setattr((yyval.node),"unnamed","1");
7289 Setattr((yyval.node),"symtab", Swig_symbol_popscope());
7290 Swig_symbol_setscope((yyvsp[(1) - (5)].node));
7291 Delete(Namespaceprefix);
7292 Namespaceprefix = Swig_symbol_qualifiedscopename(0);
7293 add_symbols((yyval.node));
7298 #line 4026 "parser.y"
7300 /* Namespace alias */
7302 (yyval.node) = new_node("namespace");
7303 Setattr((yyval.node),"name",(yyvsp[(2) - (5)].id));
7304 Setattr((yyval.node),"alias",(yyvsp[(4) - (5)].str));
7305 n = Swig_symbol_clookup((yyvsp[(4) - (5)].str),0);
7307 Swig_error(cparse_file, cparse_line, "Unknown namespace '%s'\n", (yyvsp[(4) - (5)].str));
7310 if (Strcmp(nodeType(n),"namespace") != 0) {
7311 Swig_error(cparse_file, cparse_line, "'%s' is not a namespace\n",(yyvsp[(4) - (5)].str));
7314 while (Getattr(n,"alias")) {
7315 n = Getattr(n,"namespace");
7317 Setattr((yyval.node),"namespace",n);
7318 add_symbols((yyval.node));
7319 /* Set up a scope alias */
7320 Swig_symbol_alias((yyvsp[(2) - (5)].id),Getattr(n,"symtab"));
7327 #line 4053 "parser.y"
7329 (yyval.node) = (yyvsp[(1) - (2)].node);
7330 /* Insert cpp_member (including any siblings) to the front of the cpp_members linked list */
7332 Node *p = (yyval.node);
7338 set_nextSibling(pp,(yyvsp[(2) - (2)].node));
7340 (yyval.node) = (yyvsp[(2) - (2)].node);
7346 #line 4068 "parser.y"
7348 if (cplus_mode != CPLUS_PUBLIC) {
7349 Swig_error(cparse_file,cparse_line,"%%extend can only be used in a public section\n");
7355 #line 4072 "parser.y"
7357 (yyval.node) = new_node("extend");
7358 tag_nodes((yyvsp[(4) - (6)].node),"feature:extend",(char*) "1");
7359 appendChild((yyval.node),(yyvsp[(4) - (6)].node));
7360 set_nextSibling((yyval.node),(yyvsp[(6) - (6)].node));
7365 #line 4078 "parser.y"
7366 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7370 #line 4079 "parser.y"
7371 { (yyval.node) = 0;}
7375 #line 4080 "parser.y"
7377 int start_line = cparse_line;
7379 Swig_error(cparse_file,start_line,"Syntax error in input(3).\n");
7385 #line 4085 "parser.y"
7387 (yyval.node) = (yyvsp[(3) - (3)].node);
7392 #line 4096 "parser.y"
7393 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7397 #line 4097 "parser.y"
7399 (yyval.node) = (yyvsp[(1) - (1)].node);
7402 symname= make_name((yyval.node),Getattr((yyval.node),"name"), Getattr((yyval.node),"decl"));
7403 if (Strcmp(symname,Getattr((yyval.node),"name")) == 0) {
7404 /* No renaming operation. Set name to class name */
7406 yyrename = NewString(Getattr(current_class,"sym:name"));
7412 add_symbols((yyval.node));
7413 default_arguments((yyval.node));
7418 #line 4114 "parser.y"
7419 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7423 #line 4115 "parser.y"
7424 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7428 #line 4116 "parser.y"
7429 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7433 #line 4117 "parser.y"
7434 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7438 #line 4118 "parser.y"
7439 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7443 #line 4119 "parser.y"
7444 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7448 #line 4120 "parser.y"
7449 { (yyval.node) = 0; }
7453 #line 4121 "parser.y"
7454 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7458 #line 4122 "parser.y"
7459 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7463 #line 4123 "parser.y"
7464 { (yyval.node) = 0; }
7468 #line 4124 "parser.y"
7469 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7473 #line 4125 "parser.y"
7474 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7478 #line 4126 "parser.y"
7479 { (yyval.node) = 0; }
7483 #line 4127 "parser.y"
7484 {(yyval.node) = (yyvsp[(1) - (1)].node); }
7488 #line 4128 "parser.y"
7489 {(yyval.node) = (yyvsp[(1) - (1)].node); }
7493 #line 4129 "parser.y"
7494 { (yyval.node) = 0; }
7498 #line 4138 "parser.y"
7501 SwigType *decl = NewStringEmpty();
7502 (yyval.node) = new_node("constructor");
7503 Setattr((yyval.node),"storage",(yyvsp[(1) - (6)].id));
7504 Setattr((yyval.node),"name",(yyvsp[(2) - (6)].type));
7505 Setattr((yyval.node),"parms",(yyvsp[(4) - (6)].pl));
7506 SwigType_add_function(decl,(yyvsp[(4) - (6)].pl));
7507 Setattr((yyval.node),"decl",decl);
7508 Setattr((yyval.node),"throws",(yyvsp[(6) - (6)].decl).throws);
7509 Setattr((yyval.node),"throw",(yyvsp[(6) - (6)].decl).throwf);
7510 if (Len(scanner_ccode)) {
7511 String *code = Copy(scanner_ccode);
7512 Setattr((yyval.node),"code",code);
7515 SetFlag((yyval.node),"feature:new");
7523 #line 4163 "parser.y"
7525 String *name = NewStringf("%s",(yyvsp[(2) - (6)].str));
7526 if (*(Char(name)) != '~') Insert(name,0,"~");
7527 (yyval.node) = new_node("destructor");
7528 Setattr((yyval.node),"name",name);
7530 if (Len(scanner_ccode)) {
7531 String *code = Copy(scanner_ccode);
7532 Setattr((yyval.node),"code",code);
7536 String *decl = NewStringEmpty();
7537 SwigType_add_function(decl,(yyvsp[(4) - (6)].pl));
7538 Setattr((yyval.node),"decl",decl);
7541 Setattr((yyval.node),"throws",(yyvsp[(6) - (6)].dtype).throws);
7542 Setattr((yyval.node),"throw",(yyvsp[(6) - (6)].dtype).throwf);
7543 add_symbols((yyval.node));
7548 #line 4187 "parser.y"
7552 (yyval.node) = new_node("destructor");
7553 /* Check for template names. If the class is a template
7554 and the constructor is missing the template part, we
7557 c = strchr(Char(Classprefix),'<');
7558 if (c && !Strchr((yyvsp[(3) - (7)].str),'<')) {
7559 (yyvsp[(3) - (7)].str) = NewStringf("%s%s",(yyvsp[(3) - (7)].str),c);
7562 Setattr((yyval.node),"storage","virtual");
7563 name = NewStringf("%s",(yyvsp[(3) - (7)].str));
7564 if (*(Char(name)) != '~') Insert(name,0,"~");
7565 Setattr((yyval.node),"name",name);
7567 Setattr((yyval.node),"throws",(yyvsp[(7) - (7)].dtype).throws);
7568 Setattr((yyval.node),"throw",(yyvsp[(7) - (7)].dtype).throwf);
7569 if ((yyvsp[(7) - (7)].dtype).val) {
7570 Setattr((yyval.node),"value","0");
7572 if (Len(scanner_ccode)) {
7573 String *code = Copy(scanner_ccode);
7574 Setattr((yyval.node),"code",code);
7578 String *decl = NewStringEmpty();
7579 SwigType_add_function(decl,(yyvsp[(5) - (7)].pl));
7580 Setattr((yyval.node),"decl",decl);
7584 add_symbols((yyval.node));
7589 #line 4228 "parser.y"
7591 (yyval.node) = new_node("cdecl");
7592 Setattr((yyval.node),"type",(yyvsp[(3) - (8)].type));
7593 Setattr((yyval.node),"name",(yyvsp[(2) - (8)].str));
7594 Setattr((yyval.node),"storage",(yyvsp[(1) - (8)].id));
7596 SwigType_add_function((yyvsp[(4) - (8)].type),(yyvsp[(6) - (8)].pl));
7597 if ((yyvsp[(8) - (8)].dtype).qualifier) {
7598 SwigType_push((yyvsp[(4) - (8)].type),(yyvsp[(8) - (8)].dtype).qualifier);
7600 Setattr((yyval.node),"decl",(yyvsp[(4) - (8)].type));
7601 Setattr((yyval.node),"parms",(yyvsp[(6) - (8)].pl));
7602 Setattr((yyval.node),"conversion_operator","1");
7603 add_symbols((yyval.node));
7608 #line 4243 "parser.y"
7611 (yyval.node) = new_node("cdecl");
7612 Setattr((yyval.node),"type",(yyvsp[(3) - (8)].type));
7613 Setattr((yyval.node),"name",(yyvsp[(2) - (8)].str));
7614 Setattr((yyval.node),"storage",(yyvsp[(1) - (8)].id));
7615 decl = NewStringEmpty();
7616 SwigType_add_reference(decl);
7617 SwigType_add_function(decl,(yyvsp[(6) - (8)].pl));
7618 if ((yyvsp[(8) - (8)].dtype).qualifier) {
7619 SwigType_push(decl,(yyvsp[(8) - (8)].dtype).qualifier);
7621 Setattr((yyval.node),"decl",decl);
7622 Setattr((yyval.node),"parms",(yyvsp[(6) - (8)].pl));
7623 Setattr((yyval.node),"conversion_operator","1");
7624 add_symbols((yyval.node));
7629 #line 4261 "parser.y"
7631 String *t = NewStringEmpty();
7632 (yyval.node) = new_node("cdecl");
7633 Setattr((yyval.node),"type",(yyvsp[(3) - (7)].type));
7634 Setattr((yyval.node),"name",(yyvsp[(2) - (7)].str));
7635 Setattr((yyval.node),"storage",(yyvsp[(1) - (7)].id));
7636 SwigType_add_function(t,(yyvsp[(5) - (7)].pl));
7637 if ((yyvsp[(7) - (7)].dtype).qualifier) {
7638 SwigType_push(t,(yyvsp[(7) - (7)].dtype).qualifier);
7640 Setattr((yyval.node),"decl",t);
7641 Setattr((yyval.node),"parms",(yyvsp[(5) - (7)].pl));
7642 Setattr((yyval.node),"conversion_operator","1");
7643 add_symbols((yyval.node));
7648 #line 4280 "parser.y"
7650 skip_balanced('{','}');
7656 #line 4287 "parser.y"
7658 (yyval.node) = new_node("access");
7659 Setattr((yyval.node),"kind","public");
7660 cplus_mode = CPLUS_PUBLIC;
7665 #line 4294 "parser.y"
7667 (yyval.node) = new_node("access");
7668 Setattr((yyval.node),"kind","private");
7669 cplus_mode = CPLUS_PRIVATE;
7674 #line 4302 "parser.y"
7676 (yyval.node) = new_node("access");
7677 Setattr((yyval.node),"kind","protected");
7678 cplus_mode = CPLUS_PROTECTED;
7683 #line 4325 "parser.y"
7684 { cparse_start_line = cparse_line; skip_balanced('{','}');
7689 #line 4326 "parser.y"
7692 if (cplus_mode == CPLUS_PUBLIC) {
7693 if ((yyvsp[(6) - (7)].decl).id && strcmp((yyvsp[(2) - (7)].id), "class") != 0) {
7694 Nested *n = (Nested *) malloc(sizeof(Nested));
7695 n->code = NewStringEmpty();
7696 Printv(n->code, "typedef ", (yyvsp[(2) - (7)].id), " ",
7697 Char(scanner_ccode), " $classname_", (yyvsp[(6) - (7)].decl).id, ";\n", NIL);
7699 n->name = Swig_copy_string((yyvsp[(6) - (7)].decl).id);
7700 n->line = cparse_start_line;
7701 n->type = NewStringEmpty();
7702 n->kind = (yyvsp[(2) - (7)].id);
7704 SwigType_push(n->type, (yyvsp[(6) - (7)].decl).type);
7708 Swig_warning(WARN_PARSE_NESTED_CLASS, cparse_file, cparse_line, "Nested %s not currently supported (ignored).\n", (yyvsp[(2) - (7)].id));
7709 if (strcmp((yyvsp[(2) - (7)].id), "class") == 0) {
7710 /* For now, just treat the nested class as a forward
7711 * declaration (SF bug #909387). */
7712 (yyval.node) = new_node("classforward");
7713 Setfile((yyval.node),cparse_file);
7714 Setline((yyval.node),cparse_line);
7715 Setattr((yyval.node),"kind",(yyvsp[(2) - (7)].id));
7716 Setattr((yyval.node),"name",(yyvsp[(3) - (7)].id));
7717 Setattr((yyval.node),"sym:weak", "1");
7718 add_symbols((yyval.node));
7726 #line 4360 "parser.y"
7727 { cparse_start_line = cparse_line; skip_balanced('{','}');
7732 #line 4361 "parser.y"
7735 if (cplus_mode == CPLUS_PUBLIC) {
7736 if (strcmp((yyvsp[(2) - (6)].id),"class") == 0) {
7737 Swig_warning(WARN_PARSE_NESTED_CLASS,cparse_file, cparse_line,"Nested class not currently supported (ignored)\n");
7738 /* Generate some code for a new class */
7739 } else if ((yyvsp[(5) - (6)].decl).id) {
7740 /* Generate some code for a new class */
7741 Nested *n = (Nested *) malloc(sizeof(Nested));
7742 n->code = NewStringEmpty();
7743 Printv(n->code, "typedef ", (yyvsp[(2) - (6)].id), " " ,
7744 Char(scanner_ccode), " $classname_", (yyvsp[(5) - (6)].decl).id, ";\n",NIL);
7745 n->name = Swig_copy_string((yyvsp[(5) - (6)].decl).id);
7746 n->line = cparse_start_line;
7747 n->type = NewStringEmpty();
7748 n->kind = (yyvsp[(2) - (6)].id);
7750 SwigType_push(n->type,(yyvsp[(5) - (6)].decl).type);
7754 Swig_warning(WARN_PARSE_NESTED_CLASS, cparse_file, cparse_line, "Nested %s not currently supported (ignored).\n", (yyvsp[(2) - (6)].id));
7761 #line 4391 "parser.y"
7762 { cparse_start_line = cparse_line; skip_balanced('{','}');
7767 #line 4392 "parser.y"
7770 if (cplus_mode == CPLUS_PUBLIC) {
7771 Swig_warning(WARN_PARSE_NESTED_CLASS,cparse_file, cparse_line,"Nested class not currently supported (ignored)\n");
7777 #line 4409 "parser.y"
7778 { (yyval.decl) = (yyvsp[(1) - (1)].decl);}
7782 #line 4410 "parser.y"
7783 { (yyval.decl).id = 0; }
7787 #line 4416 "parser.y"
7788 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7792 #line 4419 "parser.y"
7793 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7797 #line 4423 "parser.y"
7798 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7802 #line 4426 "parser.y"
7803 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7807 #line 4427 "parser.y"
7808 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7812 #line 4428 "parser.y"
7813 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7817 #line 4429 "parser.y"
7818 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7822 #line 4430 "parser.y"
7823 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7827 #line 4431 "parser.y"
7828 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7832 #line 4432 "parser.y"
7833 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7837 #line 4433 "parser.y"
7838 { (yyval.node) = (yyvsp[(1) - (1)].node); }
7842 #line 4436 "parser.y"
7844 Clear(scanner_ccode);
7845 (yyval.dtype).throws = (yyvsp[(1) - (2)].dtype).throws;
7846 (yyval.dtype).throwf = (yyvsp[(1) - (2)].dtype).throwf;
7851 #line 4441 "parser.y"
7853 skip_balanced('{','}');
7854 (yyval.dtype).throws = (yyvsp[(1) - (2)].dtype).throws;
7855 (yyval.dtype).throwf = (yyvsp[(1) - (2)].dtype).throwf;
7860 #line 4448 "parser.y"
7862 Clear(scanner_ccode);
7863 (yyval.dtype).val = 0;
7864 (yyval.dtype).qualifier = (yyvsp[(1) - (2)].dtype).qualifier;
7865 (yyval.dtype).bitfield = 0;
7866 (yyval.dtype).throws = (yyvsp[(1) - (2)].dtype).throws;
7867 (yyval.dtype).throwf = (yyvsp[(1) - (2)].dtype).throwf;
7872 #line 4456 "parser.y"
7874 Clear(scanner_ccode);
7875 (yyval.dtype).val = (yyvsp[(3) - (4)].dtype).val;
7876 (yyval.dtype).qualifier = (yyvsp[(1) - (4)].dtype).qualifier;
7877 (yyval.dtype).bitfield = 0;
7878 (yyval.dtype).throws = (yyvsp[(1) - (4)].dtype).throws;
7879 (yyval.dtype).throwf = (yyvsp[(1) - (4)].dtype).throwf;
7884 #line 4464 "parser.y"
7886 skip_balanced('{','}');
7887 (yyval.dtype).val = 0;
7888 (yyval.dtype).qualifier = (yyvsp[(1) - (2)].dtype).qualifier;
7889 (yyval.dtype).bitfield = 0;
7890 (yyval.dtype).throws = (yyvsp[(1) - (2)].dtype).throws;
7891 (yyval.dtype).throwf = (yyvsp[(1) - (2)].dtype).throwf;
7896 #line 4475 "parser.y"
7901 #line 4481 "parser.y"
7902 { (yyval.id) = "extern"; }
7906 #line 4482 "parser.y"
7908 if (strcmp((yyvsp[(2) - (2)].id),"C") == 0) {
7909 (yyval.id) = "externc";
7911 Swig_warning(WARN_PARSE_UNDEFINED_EXTERN,cparse_file, cparse_line,"Unrecognized extern type \"%s\".\n", (yyvsp[(2) - (2)].id));
7918 #line 4490 "parser.y"
7919 { (yyval.id) = "static"; }
7923 #line 4491 "parser.y"
7924 { (yyval.id) = "typedef"; }
7928 #line 4492 "parser.y"
7929 { (yyval.id) = "virtual"; }
7933 #line 4493 "parser.y"
7934 { (yyval.id) = "friend"; }
7938 #line 4494 "parser.y"
7939 { (yyval.id) = "explicit"; }
7943 #line 4495 "parser.y"
7948 #line 4502 "parser.y"
7951 (yyval.pl) = (yyvsp[(1) - (1)].pl);
7952 p = (yyvsp[(1) - (1)].pl);
7954 Replace(Getattr(p,"type"),"typename ", "", DOH_REPLACE_ANY);
7961 #line 4513 "parser.y"
7963 set_nextSibling((yyvsp[(1) - (2)].p),(yyvsp[(2) - (2)].pl));
7964 (yyval.pl) = (yyvsp[(1) - (2)].p);
7969 #line 4517 "parser.y"
7974 #line 4520 "parser.y"
7976 set_nextSibling((yyvsp[(2) - (3)].p),(yyvsp[(3) - (3)].pl));
7977 (yyval.pl) = (yyvsp[(2) - (3)].p);
7982 #line 4524 "parser.y"
7987 #line 4528 "parser.y"
7989 SwigType_push((yyvsp[(1) - (2)].type),(yyvsp[(2) - (2)].decl).type);
7990 (yyval.p) = NewParm((yyvsp[(1) - (2)].type),(yyvsp[(2) - (2)].decl).id);
7991 Setfile((yyval.p),cparse_file);
7992 Setline((yyval.p),cparse_line);
7993 if ((yyvsp[(2) - (2)].decl).defarg) {
7994 Setattr((yyval.p),"value",(yyvsp[(2) - (2)].decl).defarg);
8000 #line 4538 "parser.y"
8002 (yyval.p) = NewParm(NewStringf("template<class> %s %s", (yyvsp[(5) - (7)].id),(yyvsp[(6) - (7)].str)), 0);
8003 Setfile((yyval.p),cparse_file);
8004 Setline((yyval.p),cparse_line);
8005 if ((yyvsp[(7) - (7)].dtype).val) {
8006 Setattr((yyval.p),"value",(yyvsp[(7) - (7)].dtype).val);
8012 #line 4546 "parser.y"
8014 SwigType *t = NewString("v(...)");
8015 (yyval.p) = NewParm(t, 0);
8016 Setfile((yyval.p),cparse_file);
8017 Setline((yyval.p),cparse_line);
8022 #line 4554 "parser.y"
8025 (yyval.p) = (yyvsp[(1) - (1)].p);
8026 p = (yyvsp[(1) - (1)].p);
8028 if (Getattr(p,"type")) {
8029 Replace(Getattr(p,"type"),"typename ", "", DOH_REPLACE_ANY);
8037 #line 4567 "parser.y"
8039 set_nextSibling((yyvsp[(1) - (2)].p),(yyvsp[(2) - (2)].p));
8040 (yyval.p) = (yyvsp[(1) - (2)].p);
8045 #line 4571 "parser.y"
8050 #line 4574 "parser.y"
8052 set_nextSibling((yyvsp[(2) - (3)].p),(yyvsp[(3) - (3)].p));
8053 (yyval.p) = (yyvsp[(2) - (3)].p);
8058 #line 4578 "parser.y"
8063 #line 4582 "parser.y"
8065 (yyval.p) = (yyvsp[(1) - (1)].p);
8067 /* We need to make a possible adjustment for integer parameters. */
8072 type = Getattr((yyvsp[(1) - (1)].p),"type");
8073 n = Swig_symbol_clookup(type,0); /* See if we can find a node that matches the typename */
8074 if ((n) && (Strcmp(nodeType(n),"cdecl") == 0)) {
8075 SwigType *decl = Getattr(n,"decl");
8076 if (!SwigType_isfunction(decl)) {
8077 String *value = Getattr(n,"value");
8079 String *v = Copy(value);
8080 Setattr((yyvsp[(1) - (1)].p),"type",v);
8095 #line 4610 "parser.y"
8097 (yyval.p) = NewParm(0,0);
8098 Setfile((yyval.p),cparse_file);
8099 Setline((yyval.p),cparse_line);
8100 Setattr((yyval.p),"value",(yyvsp[(1) - (1)].dtype).val);
8105 #line 4618 "parser.y"
8107 (yyval.dtype) = (yyvsp[(2) - (2)].dtype);
8108 if ((yyvsp[(2) - (2)].dtype).type == T_ERROR) {
8109 Swig_warning(WARN_PARSE_BAD_DEFAULT,cparse_file, cparse_line, "Can't set default argument (ignored)\n");
8110 (yyval.dtype).val = 0;
8111 (yyval.dtype).rawval = 0;
8112 (yyval.dtype).bitfield = 0;
8113 (yyval.dtype).throws = 0;
8114 (yyval.dtype).throwf = 0;
8120 #line 4629 "parser.y"
8122 (yyval.dtype) = (yyvsp[(2) - (5)].dtype);
8123 if ((yyvsp[(2) - (5)].dtype).type == T_ERROR) {
8124 Swig_warning(WARN_PARSE_BAD_DEFAULT,cparse_file, cparse_line, "Can't set default argument (ignored)\n");
8125 (yyval.dtype) = (yyvsp[(2) - (5)].dtype);
8126 (yyval.dtype).val = 0;
8127 (yyval.dtype).rawval = 0;
8128 (yyval.dtype).bitfield = 0;
8129 (yyval.dtype).throws = 0;
8130 (yyval.dtype).throwf = 0;
8132 (yyval.dtype).val = NewStringf("%s[%s]",(yyvsp[(2) - (5)].dtype).val,(yyvsp[(4) - (5)].dtype).val);
8138 #line 4643 "parser.y"
8140 skip_balanced('{','}');
8141 (yyval.dtype).val = 0;
8142 (yyval.dtype).rawval = 0;
8143 (yyval.dtype).type = T_INT;
8144 (yyval.dtype).bitfield = 0;
8145 (yyval.dtype).throws = 0;
8146 (yyval.dtype).throwf = 0;
8151 #line 4652 "parser.y"
8153 (yyval.dtype).val = 0;
8154 (yyval.dtype).rawval = 0;
8155 (yyval.dtype).type = 0;
8156 (yyval.dtype).bitfield = (yyvsp[(2) - (2)].dtype).val;
8157 (yyval.dtype).throws = 0;
8158 (yyval.dtype).throwf = 0;
8163 #line 4660 "parser.y"
8165 (yyval.dtype).val = 0;
8166 (yyval.dtype).rawval = 0;
8167 (yyval.dtype).type = T_INT;
8168 (yyval.dtype).bitfield = 0;
8169 (yyval.dtype).throws = 0;
8170 (yyval.dtype).throwf = 0;
8175 #line 4670 "parser.y"
8177 (yyval.decl) = (yyvsp[(1) - (2)].decl);
8178 (yyval.decl).defarg = (yyvsp[(2) - (2)].dtype).rawval ? (yyvsp[(2) - (2)].dtype).rawval : (yyvsp[(2) - (2)].dtype).val;
8183 #line 4674 "parser.y"
8185 (yyval.decl) = (yyvsp[(1) - (2)].decl);
8186 (yyval.decl).defarg = (yyvsp[(2) - (2)].dtype).rawval ? (yyvsp[(2) - (2)].dtype).rawval : (yyvsp[(2) - (2)].dtype).val;
8191 #line 4678 "parser.y"
8193 (yyval.decl).type = 0;
8194 (yyval.decl).id = 0;
8195 (yyval.decl).defarg = (yyvsp[(1) - (1)].dtype).rawval ? (yyvsp[(1) - (1)].dtype).rawval : (yyvsp[(1) - (1)].dtype).val;
8200 #line 4685 "parser.y"
8202 (yyval.decl) = (yyvsp[(1) - (1)].decl);
8203 if (SwigType_isfunction((yyvsp[(1) - (1)].decl).type)) {
8204 Delete(SwigType_pop_function((yyvsp[(1) - (1)].decl).type));
8205 } else if (SwigType_isarray((yyvsp[(1) - (1)].decl).type)) {
8206 SwigType *ta = SwigType_pop_arrays((yyvsp[(1) - (1)].decl).type);
8207 if (SwigType_isfunction((yyvsp[(1) - (1)].decl).type)) {
8208 Delete(SwigType_pop_function((yyvsp[(1) - (1)].decl).type));
8210 (yyval.decl).parms = 0;
8212 SwigType_push((yyvsp[(1) - (1)].decl).type,ta);
8215 (yyval.decl).parms = 0;
8221 #line 4702 "parser.y"
8223 (yyval.decl) = (yyvsp[(1) - (1)].decl);
8224 if (SwigType_isfunction((yyvsp[(1) - (1)].decl).type)) {
8225 Delete(SwigType_pop_function((yyvsp[(1) - (1)].decl).type));
8226 } else if (SwigType_isarray((yyvsp[(1) - (1)].decl).type)) {
8227 SwigType *ta = SwigType_pop_arrays((yyvsp[(1) - (1)].decl).type);
8228 if (SwigType_isfunction((yyvsp[(1) - (1)].decl).type)) {
8229 Delete(SwigType_pop_function((yyvsp[(1) - (1)].decl).type));
8231 (yyval.decl).parms = 0;
8233 SwigType_push((yyvsp[(1) - (1)].decl).type,ta);
8236 (yyval.decl).parms = 0;
8242 #line 4719 "parser.y"
8244 (yyval.decl).type = 0;
8245 (yyval.decl).id = 0;
8246 (yyval.decl).parms = 0;
8251 #line 4727 "parser.y"
8253 (yyval.decl) = (yyvsp[(2) - (2)].decl);
8254 if ((yyval.decl).type) {
8255 SwigType_push((yyvsp[(1) - (2)].type),(yyval.decl).type);
8256 Delete((yyval.decl).type);
8258 (yyval.decl).type = (yyvsp[(1) - (2)].type);
8263 #line 4735 "parser.y"
8265 (yyval.decl) = (yyvsp[(3) - (3)].decl);
8266 SwigType_add_reference((yyvsp[(1) - (3)].type));
8267 if ((yyval.decl).type) {
8268 SwigType_push((yyvsp[(1) - (3)].type),(yyval.decl).type);
8269 Delete((yyval.decl).type);
8271 (yyval.decl).type = (yyvsp[(1) - (3)].type);
8276 #line 4744 "parser.y"
8278 (yyval.decl) = (yyvsp[(1) - (1)].decl);
8279 if (!(yyval.decl).type) (yyval.decl).type = NewStringEmpty();
8284 #line 4748 "parser.y"
8286 (yyval.decl) = (yyvsp[(2) - (2)].decl);
8287 (yyval.decl).type = NewStringEmpty();
8288 SwigType_add_reference((yyval.decl).type);
8289 if ((yyvsp[(2) - (2)].decl).type) {
8290 SwigType_push((yyval.decl).type,(yyvsp[(2) - (2)].decl).type);
8291 Delete((yyvsp[(2) - (2)].decl).type);
8297 #line 4757 "parser.y"
8299 SwigType *t = NewStringEmpty();
8301 (yyval.decl) = (yyvsp[(3) - (3)].decl);
8302 SwigType_add_memberpointer(t,(yyvsp[(1) - (3)].str));
8303 if ((yyval.decl).type) {
8304 SwigType_push(t,(yyval.decl).type);
8305 Delete((yyval.decl).type);
8307 (yyval.decl).type = t;
8312 #line 4768 "parser.y"
8314 SwigType *t = NewStringEmpty();
8315 (yyval.decl) = (yyvsp[(4) - (4)].decl);
8316 SwigType_add_memberpointer(t,(yyvsp[(2) - (4)].str));
8317 SwigType_push((yyvsp[(1) - (4)].type),t);
8318 if ((yyval.decl).type) {
8319 SwigType_push((yyvsp[(1) - (4)].type),(yyval.decl).type);
8320 Delete((yyval.decl).type);
8322 (yyval.decl).type = (yyvsp[(1) - (4)].type);
8328 #line 4780 "parser.y"
8330 (yyval.decl) = (yyvsp[(5) - (5)].decl);
8331 SwigType_add_memberpointer((yyvsp[(1) - (5)].type),(yyvsp[(2) - (5)].str));
8332 SwigType_add_reference((yyvsp[(1) - (5)].type));
8333 if ((yyval.decl).type) {
8334 SwigType_push((yyvsp[(1) - (5)].type),(yyval.decl).type);
8335 Delete((yyval.decl).type);
8337 (yyval.decl).type = (yyvsp[(1) - (5)].type);
8342 #line 4790 "parser.y"
8344 SwigType *t = NewStringEmpty();
8345 (yyval.decl) = (yyvsp[(4) - (4)].decl);
8346 SwigType_add_memberpointer(t,(yyvsp[(1) - (4)].str));
8347 SwigType_add_reference(t);
8348 if ((yyval.decl).type) {
8349 SwigType_push(t,(yyval.decl).type);
8350 Delete((yyval.decl).type);
8352 (yyval.decl).type = t;
8357 #line 4803 "parser.y"
8359 /* Note: This is non-standard C. Template declarator is allowed to follow an identifier */
8360 (yyval.decl).id = Char((yyvsp[(1) - (1)].str));
8361 (yyval.decl).type = 0;
8362 (yyval.decl).parms = 0;
8363 (yyval.decl).have_parms = 0;
8368 #line 4810 "parser.y"
8370 (yyval.decl).id = Char(NewStringf("~%s",(yyvsp[(2) - (2)].str)));
8371 (yyval.decl).type = 0;
8372 (yyval.decl).parms = 0;
8373 (yyval.decl).have_parms = 0;
8378 #line 4818 "parser.y"
8380 (yyval.decl).id = Char((yyvsp[(2) - (3)].str));
8381 (yyval.decl).type = 0;
8382 (yyval.decl).parms = 0;
8383 (yyval.decl).have_parms = 0;
8388 #line 4834 "parser.y"
8390 (yyval.decl) = (yyvsp[(3) - (4)].decl);
8391 if ((yyval.decl).type) {
8392 SwigType_push((yyvsp[(2) - (4)].type),(yyval.decl).type);
8393 Delete((yyval.decl).type);
8395 (yyval.decl).type = (yyvsp[(2) - (4)].type);
8400 #line 4842 "parser.y"
8403 (yyval.decl) = (yyvsp[(4) - (5)].decl);
8404 t = NewStringEmpty();
8405 SwigType_add_memberpointer(t,(yyvsp[(2) - (5)].str));
8406 if ((yyval.decl).type) {
8407 SwigType_push(t,(yyval.decl).type);
8408 Delete((yyval.decl).type);
8410 (yyval.decl).type = t;
8415 #line 4853 "parser.y"
8418 (yyval.decl) = (yyvsp[(1) - (3)].decl);
8419 t = NewStringEmpty();
8420 SwigType_add_array(t,(char*)"");
8421 if ((yyval.decl).type) {
8422 SwigType_push(t,(yyval.decl).type);
8423 Delete((yyval.decl).type);
8425 (yyval.decl).type = t;
8430 #line 4864 "parser.y"
8433 (yyval.decl) = (yyvsp[(1) - (4)].decl);
8434 t = NewStringEmpty();
8435 SwigType_add_array(t,(yyvsp[(3) - (4)].dtype).val);
8436 if ((yyval.decl).type) {
8437 SwigType_push(t,(yyval.decl).type);
8438 Delete((yyval.decl).type);
8440 (yyval.decl).type = t;
8445 #line 4875 "parser.y"
8448 (yyval.decl) = (yyvsp[(1) - (4)].decl);
8449 t = NewStringEmpty();
8450 SwigType_add_function(t,(yyvsp[(3) - (4)].pl));
8451 if (!(yyval.decl).have_parms) {
8452 (yyval.decl).parms = (yyvsp[(3) - (4)].pl);
8453 (yyval.decl).have_parms = 1;
8455 if (!(yyval.decl).type) {
8456 (yyval.decl).type = t;
8458 SwigType_push(t, (yyval.decl).type);
8459 Delete((yyval.decl).type);
8460 (yyval.decl).type = t;
8466 #line 4894 "parser.y"
8468 /* Note: This is non-standard C. Template declarator is allowed to follow an identifier */
8469 (yyval.decl).id = Char((yyvsp[(1) - (1)].str));
8470 (yyval.decl).type = 0;
8471 (yyval.decl).parms = 0;
8472 (yyval.decl).have_parms = 0;
8477 #line 4902 "parser.y"
8479 (yyval.decl).id = Char(NewStringf("~%s",(yyvsp[(2) - (2)].str)));
8480 (yyval.decl).type = 0;
8481 (yyval.decl).parms = 0;
8482 (yyval.decl).have_parms = 0;
8487 #line 4919 "parser.y"
8489 (yyval.decl) = (yyvsp[(3) - (4)].decl);
8490 if ((yyval.decl).type) {
8491 SwigType_push((yyvsp[(2) - (4)].type),(yyval.decl).type);
8492 Delete((yyval.decl).type);
8494 (yyval.decl).type = (yyvsp[(2) - (4)].type);
8499 #line 4927 "parser.y"
8501 (yyval.decl) = (yyvsp[(3) - (4)].decl);
8502 if (!(yyval.decl).type) {
8503 (yyval.decl).type = NewStringEmpty();
8505 SwigType_add_reference((yyval.decl).type);
8510 #line 4934 "parser.y"
8513 (yyval.decl) = (yyvsp[(4) - (5)].decl);
8514 t = NewStringEmpty();
8515 SwigType_add_memberpointer(t,(yyvsp[(2) - (5)].str));
8516 if ((yyval.decl).type) {
8517 SwigType_push(t,(yyval.decl).type);
8518 Delete((yyval.decl).type);
8520 (yyval.decl).type = t;
8525 #line 4945 "parser.y"
8528 (yyval.decl) = (yyvsp[(1) - (3)].decl);
8529 t = NewStringEmpty();
8530 SwigType_add_array(t,(char*)"");
8531 if ((yyval.decl).type) {
8532 SwigType_push(t,(yyval.decl).type);
8533 Delete((yyval.decl).type);
8535 (yyval.decl).type = t;
8540 #line 4956 "parser.y"
8543 (yyval.decl) = (yyvsp[(1) - (4)].decl);
8544 t = NewStringEmpty();
8545 SwigType_add_array(t,(yyvsp[(3) - (4)].dtype).val);
8546 if ((yyval.decl).type) {
8547 SwigType_push(t,(yyval.decl).type);
8548 Delete((yyval.decl).type);
8550 (yyval.decl).type = t;
8555 #line 4967 "parser.y"
8558 (yyval.decl) = (yyvsp[(1) - (4)].decl);
8559 t = NewStringEmpty();
8560 SwigType_add_function(t,(yyvsp[(3) - (4)].pl));
8561 if (!(yyval.decl).have_parms) {
8562 (yyval.decl).parms = (yyvsp[(3) - (4)].pl);
8563 (yyval.decl).have_parms = 1;
8565 if (!(yyval.decl).type) {
8566 (yyval.decl).type = t;
8568 SwigType_push(t, (yyval.decl).type);
8569 Delete((yyval.decl).type);
8570 (yyval.decl).type = t;
8576 #line 4986 "parser.y"
8578 (yyval.decl).type = (yyvsp[(1) - (1)].type);
8579 (yyval.decl).id = 0;
8580 (yyval.decl).parms = 0;
8581 (yyval.decl).have_parms = 0;
8586 #line 4992 "parser.y"
8588 (yyval.decl) = (yyvsp[(2) - (2)].decl);
8589 SwigType_push((yyvsp[(1) - (2)].type),(yyvsp[(2) - (2)].decl).type);
8590 (yyval.decl).type = (yyvsp[(1) - (2)].type);
8591 Delete((yyvsp[(2) - (2)].decl).type);
8596 #line 4998 "parser.y"
8598 (yyval.decl).type = (yyvsp[(1) - (2)].type);
8599 SwigType_add_reference((yyval.decl).type);
8600 (yyval.decl).id = 0;
8601 (yyval.decl).parms = 0;
8602 (yyval.decl).have_parms = 0;
8607 #line 5005 "parser.y"
8609 (yyval.decl) = (yyvsp[(3) - (3)].decl);
8610 SwigType_add_reference((yyvsp[(1) - (3)].type));
8611 if ((yyval.decl).type) {
8612 SwigType_push((yyvsp[(1) - (3)].type),(yyval.decl).type);
8613 Delete((yyval.decl).type);
8615 (yyval.decl).type = (yyvsp[(1) - (3)].type);
8620 #line 5014 "parser.y"
8622 (yyval.decl) = (yyvsp[(1) - (1)].decl);
8627 #line 5017 "parser.y"
8629 (yyval.decl) = (yyvsp[(2) - (2)].decl);
8630 (yyval.decl).type = NewStringEmpty();
8631 SwigType_add_reference((yyval.decl).type);
8632 if ((yyvsp[(2) - (2)].decl).type) {
8633 SwigType_push((yyval.decl).type,(yyvsp[(2) - (2)].decl).type);
8634 Delete((yyvsp[(2) - (2)].decl).type);
8640 #line 5026 "parser.y"
8642 (yyval.decl).id = 0;
8643 (yyval.decl).parms = 0;
8644 (yyval.decl).have_parms = 0;
8645 (yyval.decl).type = NewStringEmpty();
8646 SwigType_add_reference((yyval.decl).type);
8651 #line 5033 "parser.y"
8653 (yyval.decl).type = NewStringEmpty();
8654 SwigType_add_memberpointer((yyval.decl).type,(yyvsp[(1) - (2)].str));
8655 (yyval.decl).id = 0;
8656 (yyval.decl).parms = 0;
8657 (yyval.decl).have_parms = 0;
8662 #line 5040 "parser.y"
8664 SwigType *t = NewStringEmpty();
8665 (yyval.decl).type = (yyvsp[(1) - (3)].type);
8666 (yyval.decl).id = 0;
8667 (yyval.decl).parms = 0;
8668 (yyval.decl).have_parms = 0;
8669 SwigType_add_memberpointer(t,(yyvsp[(2) - (3)].str));
8670 SwigType_push((yyval.decl).type,t);
8676 #line 5050 "parser.y"
8678 (yyval.decl) = (yyvsp[(4) - (4)].decl);
8679 SwigType_add_memberpointer((yyvsp[(1) - (4)].type),(yyvsp[(2) - (4)].str));
8680 if ((yyval.decl).type) {
8681 SwigType_push((yyvsp[(1) - (4)].type),(yyval.decl).type);
8682 Delete((yyval.decl).type);
8684 (yyval.decl).type = (yyvsp[(1) - (4)].type);
8689 #line 5061 "parser.y"
8692 (yyval.decl) = (yyvsp[(1) - (3)].decl);
8693 t = NewStringEmpty();
8694 SwigType_add_array(t,(char*)"");
8695 if ((yyval.decl).type) {
8696 SwigType_push(t,(yyval.decl).type);
8697 Delete((yyval.decl).type);
8699 (yyval.decl).type = t;
8704 #line 5072 "parser.y"
8707 (yyval.decl) = (yyvsp[(1) - (4)].decl);
8708 t = NewStringEmpty();
8709 SwigType_add_array(t,(yyvsp[(3) - (4)].dtype).val);
8710 if ((yyval.decl).type) {
8711 SwigType_push(t,(yyval.decl).type);
8712 Delete((yyval.decl).type);
8714 (yyval.decl).type = t;
8719 #line 5083 "parser.y"
8721 (yyval.decl).type = NewStringEmpty();
8722 (yyval.decl).id = 0;
8723 (yyval.decl).parms = 0;
8724 (yyval.decl).have_parms = 0;
8725 SwigType_add_array((yyval.decl).type,(char*)"");
8730 #line 5090 "parser.y"
8732 (yyval.decl).type = NewStringEmpty();
8733 (yyval.decl).id = 0;
8734 (yyval.decl).parms = 0;
8735 (yyval.decl).have_parms = 0;
8736 SwigType_add_array((yyval.decl).type,(yyvsp[(2) - (3)].dtype).val);
8741 #line 5097 "parser.y"
8743 (yyval.decl) = (yyvsp[(2) - (3)].decl);
8748 #line 5100 "parser.y"
8751 (yyval.decl) = (yyvsp[(1) - (4)].decl);
8752 t = NewStringEmpty();
8753 SwigType_add_function(t,(yyvsp[(3) - (4)].pl));
8754 if (!(yyval.decl).type) {
8755 (yyval.decl).type = t;
8757 SwigType_push(t,(yyval.decl).type);
8758 Delete((yyval.decl).type);
8759 (yyval.decl).type = t;
8761 if (!(yyval.decl).have_parms) {
8762 (yyval.decl).parms = (yyvsp[(3) - (4)].pl);
8763 (yyval.decl).have_parms = 1;
8769 #line 5117 "parser.y"
8771 (yyval.decl).type = NewStringEmpty();
8772 SwigType_add_function((yyval.decl).type,(yyvsp[(2) - (3)].pl));
8773 (yyval.decl).parms = (yyvsp[(2) - (3)].pl);
8774 (yyval.decl).have_parms = 1;
8775 (yyval.decl).id = 0;
8780 #line 5127 "parser.y"
8782 (yyval.type) = NewStringEmpty();
8783 SwigType_add_pointer((yyval.type));
8784 SwigType_push((yyval.type),(yyvsp[(2) - (3)].str));
8785 SwigType_push((yyval.type),(yyvsp[(3) - (3)].type));
8786 Delete((yyvsp[(3) - (3)].type));
8791 #line 5134 "parser.y"
8793 (yyval.type) = NewStringEmpty();
8794 SwigType_add_pointer((yyval.type));
8795 SwigType_push((yyval.type),(yyvsp[(2) - (2)].type));
8796 Delete((yyvsp[(2) - (2)].type));
8801 #line 5140 "parser.y"
8803 (yyval.type) = NewStringEmpty();
8804 SwigType_add_pointer((yyval.type));
8805 SwigType_push((yyval.type),(yyvsp[(2) - (2)].str));
8810 #line 5145 "parser.y"
8812 (yyval.type) = NewStringEmpty();
8813 SwigType_add_pointer((yyval.type));
8818 #line 5151 "parser.y"
8820 (yyval.str) = NewStringEmpty();
8821 if ((yyvsp[(1) - (1)].id)) SwigType_add_qualifier((yyval.str),(yyvsp[(1) - (1)].id));
8826 #line 5155 "parser.y"
8828 (yyval.str) = (yyvsp[(2) - (2)].str);
8829 if ((yyvsp[(1) - (2)].id)) SwigType_add_qualifier((yyval.str),(yyvsp[(1) - (2)].id));
8834 #line 5161 "parser.y"
8835 { (yyval.id) = "const"; }
8839 #line 5162 "parser.y"
8840 { (yyval.id) = "volatile"; }
8844 #line 5163 "parser.y"
8849 #line 5169 "parser.y"
8851 (yyval.type) = (yyvsp[(1) - (1)].type);
8852 Replace((yyval.type),"typename ","", DOH_REPLACE_ANY);
8857 #line 5175 "parser.y"
8859 (yyval.type) = (yyvsp[(2) - (2)].type);
8860 SwigType_push((yyval.type),(yyvsp[(1) - (2)].str));
8865 #line 5179 "parser.y"
8866 { (yyval.type) = (yyvsp[(1) - (1)].type); }
8870 #line 5180 "parser.y"
8872 (yyval.type) = (yyvsp[(1) - (2)].type);
8873 SwigType_push((yyval.type),(yyvsp[(2) - (2)].str));
8878 #line 5184 "parser.y"
8880 (yyval.type) = (yyvsp[(2) - (3)].type);
8881 SwigType_push((yyval.type),(yyvsp[(3) - (3)].str));
8882 SwigType_push((yyval.type),(yyvsp[(1) - (3)].str));
8887 #line 5191 "parser.y"
8888 { (yyval.type) = (yyvsp[(1) - (1)].type);
8889 /* Printf(stdout,"primitive = '%s'\n", $$);*/
8894 #line 5194 "parser.y"
8895 { (yyval.type) = (yyvsp[(1) - (1)].type); }
8899 #line 5195 "parser.y"
8900 { (yyval.type) = (yyvsp[(1) - (1)].type); }
8904 #line 5196 "parser.y"
8905 { (yyval.type) = NewStringf("%s%s",(yyvsp[(1) - (2)].type),(yyvsp[(2) - (2)].id)); }
8909 #line 5197 "parser.y"
8910 { (yyval.type) = NewStringf("enum %s", (yyvsp[(2) - (2)].str)); }
8914 #line 5198 "parser.y"
8915 { (yyval.type) = (yyvsp[(1) - (1)].type); }
8919 #line 5200 "parser.y"
8921 (yyval.type) = (yyvsp[(1) - (1)].str);
8926 #line 5203 "parser.y"
8928 (yyval.type) = NewStringf("%s %s", (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].str));
8933 #line 5208 "parser.y"
8935 if (!(yyvsp[(1) - (1)].ptype).type) (yyvsp[(1) - (1)].ptype).type = NewString("int");
8936 if ((yyvsp[(1) - (1)].ptype).us) {
8937 (yyval.type) = NewStringf("%s %s", (yyvsp[(1) - (1)].ptype).us, (yyvsp[(1) - (1)].ptype).type);
8938 Delete((yyvsp[(1) - (1)].ptype).us);
8939 Delete((yyvsp[(1) - (1)].ptype).type);
8941 (yyval.type) = (yyvsp[(1) - (1)].ptype).type;
8943 if (Cmp((yyval.type),"signed int") == 0) {
8944 Delete((yyval.type));
8945 (yyval.type) = NewString("int");
8946 } else if (Cmp((yyval.type),"signed long") == 0) {
8947 Delete((yyval.type));
8948 (yyval.type) = NewString("long");
8949 } else if (Cmp((yyval.type),"signed short") == 0) {
8950 Delete((yyval.type));
8951 (yyval.type) = NewString("short");
8952 } else if (Cmp((yyval.type),"signed long long") == 0) {
8953 Delete((yyval.type));
8954 (yyval.type) = NewString("long long");
8960 #line 5233 "parser.y"
8962 (yyval.ptype) = (yyvsp[(1) - (1)].ptype);
8967 #line 5236 "parser.y"
8969 if ((yyvsp[(1) - (2)].ptype).us && (yyvsp[(2) - (2)].ptype).us) {
8970 Swig_error(cparse_file, cparse_line, "Extra %s specifier.\n", (yyvsp[(2) - (2)].ptype).us);
8972 (yyval.ptype) = (yyvsp[(2) - (2)].ptype);
8973 if ((yyvsp[(1) - (2)].ptype).us) (yyval.ptype).us = (yyvsp[(1) - (2)].ptype).us;
8974 if ((yyvsp[(1) - (2)].ptype).type) {
8975 if (!(yyvsp[(2) - (2)].ptype).type) (yyval.ptype).type = (yyvsp[(1) - (2)].ptype).type;
8978 if ((Cmp((yyvsp[(1) - (2)].ptype).type,"long") == 0)) {
8979 if ((Cmp((yyvsp[(2) - (2)].ptype).type,"long") == 0) || (Strncmp((yyvsp[(2) - (2)].ptype).type,"double",6) == 0)) {
8980 (yyval.ptype).type = NewStringf("long %s", (yyvsp[(2) - (2)].ptype).type);
8981 } else if (Cmp((yyvsp[(2) - (2)].ptype).type,"int") == 0) {
8982 (yyval.ptype).type = (yyvsp[(1) - (2)].ptype).type;
8986 } else if ((Cmp((yyvsp[(1) - (2)].ptype).type,"short")) == 0) {
8987 if (Cmp((yyvsp[(2) - (2)].ptype).type,"int") == 0) {
8988 (yyval.ptype).type = (yyvsp[(1) - (2)].ptype).type;
8992 } else if (Cmp((yyvsp[(1) - (2)].ptype).type,"int") == 0) {
8993 (yyval.ptype).type = (yyvsp[(2) - (2)].ptype).type;
8994 } else if (Cmp((yyvsp[(1) - (2)].ptype).type,"double") == 0) {
8995 if (Cmp((yyvsp[(2) - (2)].ptype).type,"long") == 0) {
8996 (yyval.ptype).type = NewString("long double");
8997 } else if (Cmp((yyvsp[(2) - (2)].ptype).type,"complex") == 0) {
8998 (yyval.ptype).type = NewString("double complex");
9002 } else if (Cmp((yyvsp[(1) - (2)].ptype).type,"float") == 0) {
9003 if (Cmp((yyvsp[(2) - (2)].ptype).type,"complex") == 0) {
9004 (yyval.ptype).type = NewString("float complex");
9008 } else if (Cmp((yyvsp[(1) - (2)].ptype).type,"complex") == 0) {
9009 (yyval.ptype).type = NewStringf("%s complex", (yyvsp[(2) - (2)].ptype).type);
9014 Swig_error(cparse_file, cparse_line, "Extra %s specifier.\n", (yyvsp[(1) - (2)].ptype).type);
9022 #line 5290 "parser.y"
9024 (yyval.ptype).type = NewString("int");
9025 (yyval.ptype).us = 0;
9030 #line 5294 "parser.y"
9032 (yyval.ptype).type = NewString("short");
9033 (yyval.ptype).us = 0;
9038 #line 5298 "parser.y"
9040 (yyval.ptype).type = NewString("long");
9041 (yyval.ptype).us = 0;
9046 #line 5302 "parser.y"
9048 (yyval.ptype).type = NewString("char");
9049 (yyval.ptype).us = 0;
9054 #line 5306 "parser.y"
9056 (yyval.ptype).type = NewString("wchar_t");
9057 (yyval.ptype).us = 0;
9062 #line 5310 "parser.y"
9064 (yyval.ptype).type = NewString("float");
9065 (yyval.ptype).us = 0;
9070 #line 5314 "parser.y"
9072 (yyval.ptype).type = NewString("double");
9073 (yyval.ptype).us = 0;
9078 #line 5318 "parser.y"
9080 (yyval.ptype).us = NewString("signed");
9081 (yyval.ptype).type = 0;
9086 #line 5322 "parser.y"
9088 (yyval.ptype).us = NewString("unsigned");
9089 (yyval.ptype).type = 0;
9094 #line 5326 "parser.y"
9096 (yyval.ptype).type = NewString("complex");
9097 (yyval.ptype).us = 0;
9102 #line 5330 "parser.y"
9104 (yyval.ptype).type = NewString("__int8");
9105 (yyval.ptype).us = 0;
9110 #line 5334 "parser.y"
9112 (yyval.ptype).type = NewString("__int16");
9113 (yyval.ptype).us = 0;
9118 #line 5338 "parser.y"
9120 (yyval.ptype).type = NewString("__int32");
9121 (yyval.ptype).us = 0;
9126 #line 5342 "parser.y"
9128 (yyval.ptype).type = NewString("__int64");
9129 (yyval.ptype).us = 0;
9134 #line 5348 "parser.y"
9135 { /* scanner_check_typedef(); */ }
9139 #line 5348 "parser.y"
9141 (yyval.dtype) = (yyvsp[(2) - (2)].dtype);
9142 if ((yyval.dtype).type == T_STRING) {
9143 (yyval.dtype).rawval = NewStringf("\"%(escape)s\"",(yyval.dtype).val);
9144 } else if ((yyval.dtype).type != T_CHAR) {
9145 (yyval.dtype).rawval = 0;
9147 (yyval.dtype).bitfield = 0;
9148 (yyval.dtype).throws = 0;
9149 (yyval.dtype).throwf = 0;
9150 scanner_ignore_typedef();
9155 #line 5374 "parser.y"
9156 { (yyval.id) = (yyvsp[(1) - (1)].id); }
9160 #line 5375 "parser.y"
9161 { (yyval.id) = (char *) 0;}
9165 #line 5378 "parser.y"
9168 /* Ignore if there is a trailing comma in the enum list */
9169 if ((yyvsp[(3) - (3)].node)) {
9170 Node *leftSibling = Getattr((yyvsp[(1) - (3)].node),"_last");
9172 leftSibling=(yyvsp[(1) - (3)].node);
9174 set_nextSibling(leftSibling,(yyvsp[(3) - (3)].node));
9175 Setattr((yyvsp[(1) - (3)].node),"_last",(yyvsp[(3) - (3)].node));
9177 (yyval.node) = (yyvsp[(1) - (3)].node);
9182 #line 5391 "parser.y"
9184 (yyval.node) = (yyvsp[(1) - (1)].node);
9185 if ((yyvsp[(1) - (1)].node)) {
9186 Setattr((yyvsp[(1) - (1)].node),"_last",(yyvsp[(1) - (1)].node));
9192 #line 5399 "parser.y"
9194 SwigType *type = NewSwigType(T_INT);
9195 (yyval.node) = new_node("enumitem");
9196 Setattr((yyval.node),"name",(yyvsp[(1) - (1)].id));
9197 Setattr((yyval.node),"type",type);
9198 SetFlag((yyval.node),"feature:immutable");
9204 #line 5407 "parser.y"
9206 (yyval.node) = new_node("enumitem");
9207 Setattr((yyval.node),"name",(yyvsp[(1) - (3)].id));
9208 Setattr((yyval.node),"enumvalue", (yyvsp[(3) - (3)].dtype).val);
9209 if ((yyvsp[(3) - (3)].dtype).type == T_CHAR) {
9210 SwigType *type = NewSwigType(T_CHAR);
9211 Setattr((yyval.node),"value",NewStringf("\'%(escape)s\'", (yyvsp[(3) - (3)].dtype).val));
9212 Setattr((yyval.node),"type",type);
9215 SwigType *type = NewSwigType(T_INT);
9216 Setattr((yyval.node),"value",(yyvsp[(1) - (3)].id));
9217 Setattr((yyval.node),"type",type);
9220 SetFlag((yyval.node),"feature:immutable");
9225 #line 5424 "parser.y"
9226 { (yyval.node) = 0; }
9230 #line 5427 "parser.y"
9232 (yyval.dtype) = (yyvsp[(1) - (1)].dtype);
9233 if (((yyval.dtype).type != T_INT) && ((yyval.dtype).type != T_UINT) &&
9234 ((yyval.dtype).type != T_LONG) && ((yyval.dtype).type != T_ULONG) &&
9235 ((yyval.dtype).type != T_SHORT) && ((yyval.dtype).type != T_USHORT) &&
9236 ((yyval.dtype).type != T_SCHAR) && ((yyval.dtype).type != T_UCHAR) &&
9237 ((yyval.dtype).type != T_CHAR)) {
9238 Swig_error(cparse_file,cparse_line,"Type error. Expecting an int\n");
9240 if ((yyval.dtype).type == T_CHAR) (yyval.dtype).type = T_INT;
9245 #line 5442 "parser.y"
9246 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9250 #line 5443 "parser.y"
9253 (yyval.dtype).val = (yyvsp[(1) - (1)].type);
9254 (yyval.dtype).type = T_INT;
9255 /* Check if value is in scope */
9256 n = Swig_symbol_clookup((yyvsp[(1) - (1)].type),0);
9258 /* A band-aid for enum values used in expressions. */
9259 if (Strcmp(nodeType(n),"enumitem") == 0) {
9260 String *q = Swig_symbol_qualified(n);
9262 (yyval.dtype).val = NewStringf("%s::%s", q, Getattr(n,"name"));
9271 #line 5462 "parser.y"
9272 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9276 #line 5463 "parser.y"
9278 (yyval.dtype).val = NewString((yyvsp[(1) - (1)].id));
9279 (yyval.dtype).type = T_STRING;
9284 #line 5467 "parser.y"
9286 SwigType_push((yyvsp[(3) - (5)].type),(yyvsp[(4) - (5)].decl).type);
9287 (yyval.dtype).val = NewStringf("sizeof(%s)",SwigType_str((yyvsp[(3) - (5)].type),0));
9288 (yyval.dtype).type = T_ULONG;
9293 #line 5472 "parser.y"
9294 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9298 #line 5473 "parser.y"
9300 (yyval.dtype).val = NewString((yyvsp[(1) - (1)].str));
9301 if (Len((yyval.dtype).val)) {
9302 (yyval.dtype).rawval = NewStringf("'%(escape)s'", (yyval.dtype).val);
9304 (yyval.dtype).rawval = NewString("'\\0'");
9306 (yyval.dtype).type = T_CHAR;
9307 (yyval.dtype).bitfield = 0;
9308 (yyval.dtype).throws = 0;
9309 (yyval.dtype).throwf = 0;
9314 #line 5487 "parser.y"
9316 (yyval.dtype).val = NewStringf("(%s)",(yyvsp[(2) - (3)].dtype).val);
9317 (yyval.dtype).type = (yyvsp[(2) - (3)].dtype).type;
9322 #line 5494 "parser.y"
9324 (yyval.dtype) = (yyvsp[(4) - (4)].dtype);
9325 if ((yyvsp[(4) - (4)].dtype).type != T_STRING) {
9326 switch ((yyvsp[(2) - (4)].dtype).type) {
9332 (yyval.dtype).val = NewStringf("(%s)%s", (yyvsp[(2) - (4)].dtype).val, (yyvsp[(4) - (4)].dtype).val); /* SwigType_str and decimal points don't mix! */
9335 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[(2) - (4)].dtype).val,0), (yyvsp[(4) - (4)].dtype).val);
9343 #line 5511 "parser.y"
9345 (yyval.dtype) = (yyvsp[(5) - (5)].dtype);
9346 if ((yyvsp[(5) - (5)].dtype).type != T_STRING) {
9347 SwigType_push((yyvsp[(2) - (5)].dtype).val,(yyvsp[(3) - (5)].type));
9348 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[(2) - (5)].dtype).val,0), (yyvsp[(5) - (5)].dtype).val);
9354 #line 5518 "parser.y"
9356 (yyval.dtype) = (yyvsp[(5) - (5)].dtype);
9357 if ((yyvsp[(5) - (5)].dtype).type != T_STRING) {
9358 SwigType_add_reference((yyvsp[(2) - (5)].dtype).val);
9359 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[(2) - (5)].dtype).val,0), (yyvsp[(5) - (5)].dtype).val);
9365 #line 5525 "parser.y"
9367 (yyval.dtype) = (yyvsp[(6) - (6)].dtype);
9368 if ((yyvsp[(6) - (6)].dtype).type != T_STRING) {
9369 SwigType_push((yyvsp[(2) - (6)].dtype).val,(yyvsp[(3) - (6)].type));
9370 SwigType_add_reference((yyvsp[(2) - (6)].dtype).val);
9371 (yyval.dtype).val = NewStringf("(%s) %s", SwigType_str((yyvsp[(2) - (6)].dtype).val,0), (yyvsp[(6) - (6)].dtype).val);
9377 #line 5533 "parser.y"
9379 (yyval.dtype) = (yyvsp[(2) - (2)].dtype);
9380 (yyval.dtype).val = NewStringf("&%s",(yyvsp[(2) - (2)].dtype).val);
9385 #line 5537 "parser.y"
9387 (yyval.dtype) = (yyvsp[(2) - (2)].dtype);
9388 (yyval.dtype).val = NewStringf("*%s",(yyvsp[(2) - (2)].dtype).val);
9393 #line 5543 "parser.y"
9394 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9398 #line 5544 "parser.y"
9399 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9403 #line 5545 "parser.y"
9404 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9408 #line 5546 "parser.y"
9409 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9413 #line 5547 "parser.y"
9414 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9418 #line 5548 "parser.y"
9419 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9423 #line 5549 "parser.y"
9424 { (yyval.dtype) = (yyvsp[(1) - (1)].dtype); }
9428 #line 5552 "parser.y"
9430 (yyval.dtype).val = NewStringf("%s+%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9431 (yyval.dtype).type = promote((yyvsp[(1) - (3)].dtype).type,(yyvsp[(3) - (3)].dtype).type);
9436 #line 5556 "parser.y"
9438 (yyval.dtype).val = NewStringf("%s-%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9439 (yyval.dtype).type = promote((yyvsp[(1) - (3)].dtype).type,(yyvsp[(3) - (3)].dtype).type);
9444 #line 5560 "parser.y"
9446 (yyval.dtype).val = NewStringf("%s*%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9447 (yyval.dtype).type = promote((yyvsp[(1) - (3)].dtype).type,(yyvsp[(3) - (3)].dtype).type);
9452 #line 5564 "parser.y"
9454 (yyval.dtype).val = NewStringf("%s/%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9455 (yyval.dtype).type = promote((yyvsp[(1) - (3)].dtype).type,(yyvsp[(3) - (3)].dtype).type);
9460 #line 5568 "parser.y"
9462 (yyval.dtype).val = NewStringf("%s%%%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9463 (yyval.dtype).type = promote((yyvsp[(1) - (3)].dtype).type,(yyvsp[(3) - (3)].dtype).type);
9468 #line 5572 "parser.y"
9470 (yyval.dtype).val = NewStringf("%s&%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9471 (yyval.dtype).type = promote((yyvsp[(1) - (3)].dtype).type,(yyvsp[(3) - (3)].dtype).type);
9476 #line 5576 "parser.y"
9478 (yyval.dtype).val = NewStringf("%s|%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9479 (yyval.dtype).type = promote((yyvsp[(1) - (3)].dtype).type,(yyvsp[(3) - (3)].dtype).type);
9484 #line 5580 "parser.y"
9486 (yyval.dtype).val = NewStringf("%s^%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9487 (yyval.dtype).type = promote((yyvsp[(1) - (3)].dtype).type,(yyvsp[(3) - (3)].dtype).type);
9492 #line 5584 "parser.y"
9494 (yyval.dtype).val = NewStringf("%s << %s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9495 (yyval.dtype).type = promote_type((yyvsp[(1) - (3)].dtype).type);
9500 #line 5588 "parser.y"
9502 (yyval.dtype).val = NewStringf("%s >> %s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9503 (yyval.dtype).type = promote_type((yyvsp[(1) - (3)].dtype).type);
9508 #line 5592 "parser.y"
9510 (yyval.dtype).val = NewStringf("%s&&%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9511 (yyval.dtype).type = T_INT;
9516 #line 5596 "parser.y"
9518 (yyval.dtype).val = NewStringf("%s||%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9519 (yyval.dtype).type = T_INT;
9524 #line 5600 "parser.y"
9526 (yyval.dtype).val = NewStringf("%s==%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9527 (yyval.dtype).type = T_INT;
9532 #line 5604 "parser.y"
9534 (yyval.dtype).val = NewStringf("%s!=%s",(yyvsp[(1) - (3)].dtype).val,(yyvsp[(3) - (3)].dtype).val);
9535 (yyval.dtype).type = T_INT;
9540 #line 5618 "parser.y"
9542 /* Putting >= in the expression literally causes an infinite
9543 * loop somewhere in the type system. Just workaround for now
9544 * - SWIG_GE is defined in swiglabels.swg. */
9545 (yyval.dtype).val = NewStringf("%s SWIG_GE %s", (yyvsp[(1) - (3)].dtype).val, (yyvsp[(3) - (3)].dtype).val);
9546 (yyval.dtype).type = T_INT;
9551 #line 5625 "parser.y"
9553 (yyval.dtype).val = NewStringf("%s SWIG_LE %s", (yyvsp[(1) - (3)].dtype).val, (yyvsp[(3) - (3)].dtype).val);
9554 (yyval.dtype).type = T_INT;
9559 #line 5629 "parser.y"
9561 (yyval.dtype).val = NewStringf("%s?%s:%s", (yyvsp[(1) - (5)].dtype).val, (yyvsp[(3) - (5)].dtype).val, (yyvsp[(5) - (5)].dtype).val);
9562 /* This may not be exactly right, but is probably good enough
9563 * for the purposes of parsing constant expressions. */
9564 (yyval.dtype).type = promote((yyvsp[(3) - (5)].dtype).type, (yyvsp[(5) - (5)].dtype).type);
9569 #line 5635 "parser.y"
9571 (yyval.dtype).val = NewStringf("-%s",(yyvsp[(2) - (2)].dtype).val);
9572 (yyval.dtype).type = (yyvsp[(2) - (2)].dtype).type;
9577 #line 5639 "parser.y"
9579 (yyval.dtype).val = NewStringf("+%s",(yyvsp[(2) - (2)].dtype).val);
9580 (yyval.dtype).type = (yyvsp[(2) - (2)].dtype).type;
9585 #line 5643 "parser.y"
9587 (yyval.dtype).val = NewStringf("~%s",(yyvsp[(2) - (2)].dtype).val);
9588 (yyval.dtype).type = (yyvsp[(2) - (2)].dtype).type;
9593 #line 5647 "parser.y"
9595 (yyval.dtype).val = NewStringf("!%s",(yyvsp[(2) - (2)].dtype).val);
9596 (yyval.dtype).type = T_INT;
9601 #line 5651 "parser.y"
9604 skip_balanced('(',')');
9605 qty = Swig_symbol_type_qualify((yyvsp[(1) - (2)].type),0);
9606 if (SwigType_istemplate(qty)) {
9607 String *nstr = SwigType_namestr(qty);
9611 (yyval.dtype).val = NewStringf("%s%s",qty,scanner_ccode);
9612 Clear(scanner_ccode);
9613 (yyval.dtype).type = T_INT;
9619 #line 5667 "parser.y"
9621 (yyval.bases) = (yyvsp[(1) - (1)].bases);
9626 #line 5672 "parser.y"
9627 { inherit_list = 1; }
9631 #line 5672 "parser.y"
9632 { (yyval.bases) = (yyvsp[(3) - (3)].bases); inherit_list = 0; }
9636 #line 5673 "parser.y"
9637 { (yyval.bases) = 0; }
9641 #line 5676 "parser.y"
9643 Hash *list = NewHash();
9644 Node *base = (yyvsp[(1) - (1)].node);
9645 Node *name = Getattr(base,"name");
9646 List *lpublic = NewList();
9647 List *lprotected = NewList();
9648 List *lprivate = NewList();
9649 Setattr(list,"public",lpublic);
9650 Setattr(list,"protected",lprotected);
9651 Setattr(list,"private",lprivate);
9655 Append(Getattr(list,Getattr(base,"access")),name);
9656 (yyval.bases) = list;
9661 #line 5693 "parser.y"
9663 Hash *list = (yyvsp[(1) - (3)].bases);
9664 Node *base = (yyvsp[(3) - (3)].node);
9665 Node *name = Getattr(base,"name");
9666 Append(Getattr(list,Getattr(base,"access")),name);
9667 (yyval.bases) = list;
9672 #line 5702 "parser.y"
9674 (yyval.node) = NewHash();
9675 Setfile((yyval.node),cparse_file);
9676 Setline((yyval.node),cparse_line);
9677 Setattr((yyval.node),"name",(yyvsp[(2) - (2)].str));
9678 if (last_cpptype && (Strcmp(last_cpptype,"struct") != 0)) {
9679 Setattr((yyval.node),"access","private");
9680 Swig_warning(WARN_PARSE_NO_ACCESS,cparse_file,cparse_line,
9681 "No access specifier given for base class %s (ignored).\n",(yyvsp[(2) - (2)].str));
9683 Setattr((yyval.node),"access","public");
9689 #line 5715 "parser.y"
9691 (yyval.node) = NewHash();
9692 Setfile((yyval.node),cparse_file);
9693 Setline((yyval.node),cparse_line);
9694 Setattr((yyval.node),"name",(yyvsp[(4) - (4)].str));
9695 Setattr((yyval.node),"access",(yyvsp[(2) - (4)].id));
9696 if (Strcmp((yyvsp[(2) - (4)].id),"public") != 0) {
9697 Swig_warning(WARN_PARSE_PRIVATE_INHERIT, cparse_file,
9698 cparse_line,"%s inheritance ignored.\n", (yyvsp[(2) - (4)].id));
9704 #line 5728 "parser.y"
9705 { (yyval.id) = (char*)"public"; }
9709 #line 5729 "parser.y"
9710 { (yyval.id) = (char*)"private"; }
9714 #line 5730 "parser.y"
9715 { (yyval.id) = (char*)"protected"; }
9719 #line 5734 "parser.y"
9721 (yyval.id) = (char*)"class";
9722 if (!inherit_list) last_cpptype = (yyval.id);
9727 #line 5738 "parser.y"
9729 (yyval.id) = (char *)"typename";
9730 if (!inherit_list) last_cpptype = (yyval.id);
9735 #line 5744 "parser.y"
9737 (yyval.id) = (yyvsp[(1) - (1)].id);
9742 #line 5747 "parser.y"
9744 (yyval.id) = (char*)"struct";
9745 if (!inherit_list) last_cpptype = (yyval.id);
9750 #line 5751 "parser.y"
9752 (yyval.id) = (char*)"union";
9753 if (!inherit_list) last_cpptype = (yyval.id);
9758 #line 5761 "parser.y"
9760 (yyval.dtype).qualifier = (yyvsp[(1) - (1)].str);
9761 (yyval.dtype).throws = 0;
9762 (yyval.dtype).throwf = 0;
9767 #line 5766 "parser.y"
9769 (yyval.dtype).qualifier = 0;
9770 (yyval.dtype).throws = (yyvsp[(3) - (4)].pl);
9771 (yyval.dtype).throwf = NewString("1");
9776 #line 5771 "parser.y"
9778 (yyval.dtype).qualifier = (yyvsp[(1) - (5)].str);
9779 (yyval.dtype).throws = (yyvsp[(4) - (5)].pl);
9780 (yyval.dtype).throwf = NewString("1");
9785 #line 5776 "parser.y"
9787 (yyval.dtype).qualifier = 0;
9788 (yyval.dtype).throws = 0;
9789 (yyval.dtype).throwf = 0;
9794 #line 5783 "parser.y"
9796 Clear(scanner_ccode);
9797 (yyval.decl).have_parms = 0;
9798 (yyval.decl).defarg = 0;
9799 (yyval.decl).throws = (yyvsp[(1) - (3)].dtype).throws;
9800 (yyval.decl).throwf = (yyvsp[(1) - (3)].dtype).throwf;
9805 #line 5790 "parser.y"
9807 skip_balanced('{','}');
9808 (yyval.decl).have_parms = 0;
9809 (yyval.decl).defarg = 0;
9810 (yyval.decl).throws = (yyvsp[(1) - (3)].dtype).throws;
9811 (yyval.decl).throwf = (yyvsp[(1) - (3)].dtype).throwf;
9816 #line 5797 "parser.y"
9818 Clear(scanner_ccode);
9819 (yyval.decl).parms = (yyvsp[(2) - (4)].pl);
9820 (yyval.decl).have_parms = 1;
9821 (yyval.decl).defarg = 0;
9822 (yyval.decl).throws = 0;
9823 (yyval.decl).throwf = 0;
9828 #line 5805 "parser.y"
9830 skip_balanced('{','}');
9831 (yyval.decl).parms = (yyvsp[(2) - (4)].pl);
9832 (yyval.decl).have_parms = 1;
9833 (yyval.decl).defarg = 0;
9834 (yyval.decl).throws = 0;
9835 (yyval.decl).throwf = 0;
9840 #line 5813 "parser.y"
9842 (yyval.decl).have_parms = 0;
9843 (yyval.decl).defarg = (yyvsp[(2) - (3)].dtype).val;
9844 (yyval.decl).throws = 0;
9845 (yyval.decl).throwf = 0;
9850 #line 5829 "parser.y"
9852 skip_balanced('(',')');
9853 Clear(scanner_ccode);
9858 #line 5835 "parser.y"
9860 String *s = NewStringEmpty();
9861 SwigType_add_template(s,(yyvsp[(2) - (3)].p));
9862 (yyval.id) = Char(s);
9868 #line 5841 "parser.y"
9869 { (yyval.id) = (char*)""; }
9873 #line 5844 "parser.y"
9874 { (yyval.id) = (yyvsp[(1) - (1)].id); }
9878 #line 5845 "parser.y"
9879 { (yyval.id) = (yyvsp[(1) - (1)].id); }
9883 #line 5848 "parser.y"
9884 { (yyval.id) = (yyvsp[(1) - (1)].id); }
9888 #line 5849 "parser.y"
9893 #line 5852 "parser.y"
9896 if (!(yyval.str)) (yyval.str) = NewStringf("%s%s", (yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str));
9897 Delete((yyvsp[(2) - (2)].str));
9902 #line 5857 "parser.y"
9904 (yyval.str) = NewStringf("::%s%s",(yyvsp[(3) - (4)].str),(yyvsp[(4) - (4)].str));
9905 Delete((yyvsp[(4) - (4)].str));
9910 #line 5861 "parser.y"
9912 (yyval.str) = NewString((yyvsp[(1) - (1)].str));
9917 #line 5864 "parser.y"
9919 (yyval.str) = NewStringf("::%s",(yyvsp[(3) - (3)].str));
9924 #line 5867 "parser.y"
9926 (yyval.str) = NewString((yyvsp[(1) - (1)].str));
9931 #line 5870 "parser.y"
9933 (yyval.str) = NewStringf("::%s",(yyvsp[(3) - (3)].str));
9938 #line 5875 "parser.y"
9940 (yyval.str) = NewStringf("::%s%s",(yyvsp[(2) - (3)].str),(yyvsp[(3) - (3)].str));
9941 Delete((yyvsp[(3) - (3)].str));
9946 #line 5879 "parser.y"
9948 (yyval.str) = NewStringf("::%s",(yyvsp[(2) - (2)].str));
9953 #line 5882 "parser.y"
9955 (yyval.str) = NewStringf("::%s",(yyvsp[(2) - (2)].str));
9960 #line 5889 "parser.y"
9962 (yyval.str) = NewStringf("::~%s",(yyvsp[(2) - (2)].str));
9967 #line 5895 "parser.y"
9969 (yyval.str) = NewStringf("%s%s",(yyvsp[(1) - (2)].id),(yyvsp[(2) - (2)].id));
9977 #line 5904 "parser.y"
9980 if (!(yyval.str)) (yyval.str) = NewStringf("%s%s", (yyvsp[(1) - (2)].id),(yyvsp[(2) - (2)].str));
9981 Delete((yyvsp[(2) - (2)].str));
9986 #line 5909 "parser.y"
9988 (yyval.str) = NewStringf("::%s%s",(yyvsp[(3) - (4)].id),(yyvsp[(4) - (4)].str));
9989 Delete((yyvsp[(4) - (4)].str));
9994 #line 5913 "parser.y"
9996 (yyval.str) = NewString((yyvsp[(1) - (1)].id));
10001 #line 5916 "parser.y"
10003 (yyval.str) = NewStringf("::%s",(yyvsp[(3) - (3)].id));
10008 #line 5919 "parser.y"
10010 (yyval.str) = NewString((yyvsp[(1) - (1)].str));
10015 #line 5922 "parser.y"
10017 (yyval.str) = NewStringf("::%s",(yyvsp[(3) - (3)].str));
10022 #line 5927 "parser.y"
10024 (yyval.str) = NewStringf("::%s%s",(yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].str));
10025 Delete((yyvsp[(3) - (3)].str));
10030 #line 5931 "parser.y"
10032 (yyval.str) = NewStringf("::%s",(yyvsp[(2) - (2)].id));
10037 #line 5934 "parser.y"
10039 (yyval.str) = NewStringf("::%s",(yyvsp[(2) - (2)].str));
10044 #line 5937 "parser.y"
10046 (yyval.str) = NewStringf("::~%s",(yyvsp[(2) - (2)].id));
10051 #line 5943 "parser.y"
10053 (yyval.id) = (char *) malloc(strlen((yyvsp[(1) - (2)].id))+strlen((yyvsp[(2) - (2)].id))+1);
10054 strcpy((yyval.id),(yyvsp[(1) - (2)].id));
10055 strcat((yyval.id),(yyvsp[(2) - (2)].id));
10060 #line 5948 "parser.y"
10061 { (yyval.id) = (yyvsp[(1) - (1)].id);}
10065 #line 5951 "parser.y"
10067 (yyval.str) = NewString((yyvsp[(1) - (1)].id));
10072 #line 5954 "parser.y"
10074 skip_balanced('{','}');
10075 (yyval.str) = NewString(scanner_ccode);
10080 #line 5958 "parser.y"
10082 (yyval.str) = (yyvsp[(1) - (1)].str);
10087 #line 5963 "parser.y"
10090 (yyval.node) = NewHash();
10091 n = (yyvsp[(2) - (3)].node);
10093 String *name, *value;
10094 name = Getattr(n,"name");
10095 value = Getattr(n,"value");
10096 if (!value) value = (String *) "1";
10097 Setattr((yyval.node),name, value);
10098 n = nextSibling(n);
10104 #line 5976 "parser.y"
10105 { (yyval.node) = 0; }
10109 #line 5980 "parser.y"
10111 (yyval.node) = NewHash();
10112 Setattr((yyval.node),"name",(yyvsp[(1) - (3)].id));
10113 Setattr((yyval.node),"value",(yyvsp[(3) - (3)].id));
10118 #line 5985 "parser.y"
10120 (yyval.node) = NewHash();
10121 Setattr((yyval.node),"name",(yyvsp[(1) - (5)].id));
10122 Setattr((yyval.node),"value",(yyvsp[(3) - (5)].id));
10123 set_nextSibling((yyval.node),(yyvsp[(5) - (5)].node));
10128 #line 5991 "parser.y"
10130 (yyval.node) = NewHash();
10131 Setattr((yyval.node),"name",(yyvsp[(1) - (1)].id));
10136 #line 5995 "parser.y"
10138 (yyval.node) = NewHash();
10139 Setattr((yyval.node),"name",(yyvsp[(1) - (3)].id));
10140 set_nextSibling((yyval.node),(yyvsp[(3) - (3)].node));
10145 #line 6000 "parser.y"
10147 (yyval.node) = (yyvsp[(3) - (3)].node);
10148 Setattr((yyval.node),"name",(yyvsp[(1) - (3)].id));
10153 #line 6004 "parser.y"
10155 (yyval.node) = (yyvsp[(3) - (5)].node);
10156 Setattr((yyval.node),"name",(yyvsp[(1) - (5)].id));
10157 set_nextSibling((yyval.node),(yyvsp[(5) - (5)].node));
10162 #line 6011 "parser.y"
10164 (yyval.id) = (yyvsp[(1) - (1)].id);
10169 #line 6014 "parser.y"
10171 (yyval.id) = Char((yyvsp[(1) - (1)].dtype).val);
10176 /* Line 1267 of yacc.c. */
10177 #line 10178 "y.tab.c"
10180 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
10182 YYPOPSTACK (yylen);
10184 YY_STACK_PRINT (yyss, yyssp);
10189 /* Now `shift' the result of the reduction. Determine what state
10190 that goes to, based on the state we popped back to and the rule
10191 number reduced by. */
10195 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
10196 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
10197 yystate = yytable[yystate];
10199 yystate = yydefgoto[yyn - YYNTOKENS];
10204 /*------------------------------------.
10205 | yyerrlab -- here on detecting error |
10206 `------------------------------------*/
10208 /* If not already recovering from an error, report this error. */
10212 #if ! YYERROR_VERBOSE
10213 yyerror (YY_("syntax error"));
10216 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
10217 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
10219 YYSIZE_T yyalloc = 2 * yysize;
10220 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
10221 yyalloc = YYSTACK_ALLOC_MAXIMUM;
10222 if (yymsg != yymsgbuf)
10223 YYSTACK_FREE (yymsg);
10224 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
10226 yymsg_alloc = yyalloc;
10230 yymsg_alloc = sizeof yymsgbuf;
10234 if (0 < yysize && yysize <= yymsg_alloc)
10236 (void) yysyntax_error (yymsg, yystate, yychar);
10241 yyerror (YY_("syntax error"));
10243 goto yyexhaustedlab;
10251 if (yyerrstatus == 3)
10253 /* If just tried and failed to reuse look-ahead token after an
10254 error, discard it. */
10256 if (yychar <= YYEOF)
10258 /* Return failure if at end of input. */
10259 if (yychar == YYEOF)
10264 yydestruct ("Error: discarding",
10270 /* Else will try to reuse look-ahead token after shifting the error
10275 /*---------------------------------------------------.
10276 | yyerrorlab -- error raised explicitly by YYERROR. |
10277 `---------------------------------------------------*/
10280 /* Pacify compilers like GCC when the user code never invokes
10281 YYERROR and the label yyerrorlab therefore never appears in user
10283 if (/*CONSTCOND*/ 0)
10286 /* Do not reclaim the symbols of the rule which action triggered
10288 YYPOPSTACK (yylen);
10290 YY_STACK_PRINT (yyss, yyssp);
10295 /*-------------------------------------------------------------.
10296 | yyerrlab1 -- common code for both syntax error and YYERROR. |
10297 `-------------------------------------------------------------*/
10299 yyerrstatus = 3; /* Each real token shifted decrements this. */
10303 yyn = yypact[yystate];
10304 if (yyn != YYPACT_NINF)
10307 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
10309 yyn = yytable[yyn];
10315 /* Pop the current state because it cannot handle the error token. */
10320 yydestruct ("Error: popping",
10321 yystos[yystate], yyvsp);
10324 YY_STACK_PRINT (yyss, yyssp);
10327 if (yyn == YYFINAL)
10333 /* Shift the error token. */
10334 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
10340 /*-------------------------------------.
10341 | yyacceptlab -- YYACCEPT comes here. |
10342 `-------------------------------------*/
10347 /*-----------------------------------.
10348 | yyabortlab -- YYABORT comes here. |
10349 `-----------------------------------*/
10355 /*-------------------------------------------------.
10356 | yyexhaustedlab -- memory exhaustion comes here. |
10357 `-------------------------------------------------*/
10359 yyerror (YY_("memory exhausted"));
10361 /* Fall through. */
10365 if (yychar != YYEOF && yychar != YYEMPTY)
10366 yydestruct ("Cleanup: discarding lookahead",
10368 /* Do not reclaim the symbols of the rule which action triggered
10369 this YYABORT or YYACCEPT. */
10370 YYPOPSTACK (yylen);
10371 YY_STACK_PRINT (yyss, yyssp);
10372 while (yyssp != yyss)
10374 yydestruct ("Cleanup: popping",
10375 yystos[*yyssp], yyvsp);
10380 YYSTACK_FREE (yyss);
10382 #if YYERROR_VERBOSE
10383 if (yymsg != yymsgbuf)
10384 YYSTACK_FREE (yymsg);
10386 /* Make sure YYID is used. */
10387 return YYID (yyresult);
10391 #line 6021 "parser.y"
10394 SwigType *Swig_cparse_type(String *s) {
10396 ns = NewStringf("%s;",s);
10397 Seek(ns,0,SEEK_SET);
10400 scanner_next_token(PARSETYPE);
10402 /* Printf(stdout,"typeparse: '%s' ---> '%s'\n", s, top); */
10407 Parm *Swig_cparse_parm(String *s) {
10409 ns = NewStringf("%s;",s);
10410 Seek(ns,0,SEEK_SET);
10413 scanner_next_token(PARSEPARM);
10415 /* Printf(stdout,"typeparse: '%s' ---> '%s'\n", s, top); */
10421 ParmList *Swig_cparse_parms(String *s) {
10423 char *cs = Char(s);
10424 if (cs && cs[0] != '(') {
10425 ns = NewStringf("(%s);",s);
10427 ns = NewStringf("%s;",s);
10429 Seek(ns,0,SEEK_SET);
10432 scanner_next_token(PARSEPARMS);
10434 /* Printf(stdout,"typeparse: '%s' ---> '%s'\n", s, top); */