1 /* A Bison parser, made by GNU Bison 2.5. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
66 /* Copy the first part of user declarations. */
68 /* Line 268 of yacc.c */
78 #include "treefuncs.h"
82 /* FIXME: add gettext support */
87 static GList *class_nodes = NULL;
90 static GList *enum_vals = NULL;
91 static GList *flag_vals = NULL;
92 static GList *error_vals = NULL;
94 static gboolean abstract = FALSE;
95 static char *chunk_size = NULL;
96 static char *bonobo_object_class = NULL;
97 static int glade_xml = FALSE;
98 static GList *interfaces = NULL;
99 static GList *typestack = NULL;
100 static GList *funcargs = NULL;
101 static GList *checks = NULL;
102 static int has_self = FALSE;
103 static int vararg = FALSE;
104 static Method *last_added_method = NULL;
106 /* destructor and initializer for variables */
107 static gboolean destructor_unref = FALSE;
108 static char *destructor = NULL;
109 static int destructor_line = 0;
110 static gboolean destructor_simple = TRUE;
111 static char *initializer = NULL;
112 static int initializer_line = 0;
113 static int glade_widget = FALSE;
115 static char *funcattrs = NULL;
116 static char *onerror = NULL;
117 static char *defreturn = NULL;
119 static GList *gtktypes = NULL;
121 static Property *property = NULL;
123 /* this can be a global as we will only do one function at a time
125 static int the_scope = NO_SCOPE;
127 void free(void *ptr);
130 extern int ccode_line;
132 extern gboolean for_cpp;
142 if (strcmp (yytext, "\n") == 0 ||
143 strcmp (yytext, "\r") == 0) {
144 out = g_strconcat ("Error: ", str, " before end of line", NULL);
145 } else if (yytext[0] == '\0') {
146 out=g_strconcat("Error: ", str, " at end of input", NULL);
148 char *tmp = g_strdup(yytext);
149 while((p=strchr(tmp, '\n')))
152 out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL);
156 fprintf(stderr, "%s:%d: %s\n", filename, line_no, out);
165 Type *type = typestack->data;
166 typestack = g_list_remove(typestack,typestack->data);
171 push_variable (char *name, int scope, int line_no, char *postfix)
174 Type *type = pop_type ();
176 type->postfix = postfix;
178 var = node_new (VARIABLE_NODE,
181 "glade_widget", glade_widget,
184 "destructor_unref", destructor_unref,
185 "destructor:steal", destructor,
186 "destructor_line", destructor_line,
187 "destructor_simple", destructor_simple,
188 "initializer:steal", initializer,
189 "initializer_line", initializer_line,
190 "initializer_simple", TRUE,
192 class_nodes = g_list_append(class_nodes, var);
193 glade_widget = FALSE;
197 push_function (int scope, int method, char *oid, char *id,
198 GString *cbuf, int line_no, int ccode_line,
199 gboolean vararg, GList *flags)
205 g_assert(scope != CLASS_SCOPE);
207 if(method == INIT_METHOD ||
208 method == CLASS_INIT_METHOD ||
209 method == CONSTRUCTOR_METHOD ||
210 method == DISPOSE_METHOD ||
211 method == FINALIZE_METHOD) {
212 type = (Type *)node_new (TYPE_NODE,
219 /* a complicated and ugly test to figure out if we have
220 the wrong number of types for a signal */
221 if((method == SIGNAL_FIRST_METHOD ||
222 method == SIGNAL_LAST_METHOD) &&
223 g_list_length(gtktypes) != g_list_length(funcargs) &&
224 !(g_list_length(funcargs) == 1 &&
225 g_list_length(gtktypes) == 2 &&
226 strcmp(gtktypes->next->data, "NONE")==0)) {
227 error_print(GOB_WARN, line_no,
228 _("The number of GTK arguments and "
229 "function arguments for a signal "
230 "don't seem to match"));
232 if(g_list_length(gtktypes) > 2) {
234 for(li = gtktypes->next; li; li = li->next) {
235 if(strcmp(li->data, "NONE")==0) {
236 error_print(GOB_ERROR, line_no,
237 _("NONE can only appear in an "
238 "argument list by itself"));
244 c_cbuf = p = cbuf->str;
245 while(p && *p && (*p==' ' || *p=='\t' || *p=='\n' || *p=='\r'))
252 node = node_new (METHOD_NODE,
257 "gtktypes:steal", gtktypes,
258 "flags:steal", flags,
260 "args:steal", funcargs,
261 "funcattrs:steal", funcattrs,
262 "onerror:steal", onerror,
263 "defreturn:steal", defreturn,
264 "cbuf:steal", c_cbuf,
266 "ccode_line", ccode_line,
268 "unique_id", method_unique_id++,
271 last_added_method = (Method *)node;
275 /*only free segment if we haven't passed it
285 class_nodes = g_list_append(class_nodes, node);
289 free_all_global_state(void)
301 g_list_foreach(gtktypes, (GFunc)g_free, NULL);
302 g_list_free(gtktypes);
305 node_list_free (funcargs);
310 push_funcarg(char *name, char *postfix)
313 Type *type = pop_type();
315 type->postfix = postfix;
317 node = node_new (FUNCARG_NODE,
320 "checks:steal", checks,
324 funcargs = g_list_append(funcargs, node);
328 push_init_arg(char *name, int is_class)
335 tn = g_strconcat(((Class *)class)->otype,":Class",NULL);
337 tn = g_strdup(((Class *)class)->otype);
339 type = node_new (TYPE_NODE,
343 node = node_new (FUNCARG_NODE,
344 "atype:steal", (Type *)type,
347 funcargs = g_list_prepend(funcargs, node);
351 push_self(char *id, gboolean constant)
356 type = node_new (TYPE_NODE,
357 "name", ((Class *)class)->otype,
358 "pointer", constant ? "const *" : "*",
360 ch = g_list_append (ch, node_new (CHECK_NODE,
361 "chtype", NULL_CHECK,
363 ch = g_list_append (ch, node_new (CHECK_NODE,
364 "chtype", TYPE_CHECK,
366 node = node_new (FUNCARG_NODE,
367 "atype:steal", (Type *)type,
371 funcargs = g_list_prepend(funcargs, node);
375 find_var_or_die(const char *id, int line)
379 for(li = class_nodes; li != NULL; li = li->next) {
381 Node *node = li->data;
382 if(node->type != VARIABLE_NODE)
385 if(strcmp(var->id, id)==0)
389 error_printf(GOB_ERROR, line, _("Variable %s not defined here"), id);
391 g_assert_not_reached();
396 set_attr_value(char *type, char *val)
398 if(strcmp(type, "attr")==0) {
404 } else if(strcmp(type, "onerror")==0) {
410 } else if(strcmp(type, "defreturn")==0) {
421 export_accessors (const char *var_name,
433 the_type = (Type *)node_copy ((Node *)type);
435 the_type = get_tree_type (gtktype, TRUE);
437 if (the_type == NULL) {
438 error_print (GOB_ERROR, line_no,
439 _("Cannot determine type of property or argument"));
444 char *get_id = g_strdup_printf ("get_%s", var_name);
445 GString *get_cbuf = g_string_new (NULL);
446 Node *node1 = node_new (TYPE_NODE,
447 "name", the_type->name,
448 "pointer", the_type->pointer,
449 "postfix", the_type->postfix,
451 Node *node3 = node_new (TYPE_NODE,
452 "name", class->class.otype,
456 g_string_sprintf (get_cbuf,
458 "g_object_get (G_OBJECT (self), \"%s\", "
462 the_type->pointer ? the_type->pointer : "",
465 typestack = g_list_prepend (typestack, node1);
466 typestack = g_list_prepend (typestack, node3);
468 push_funcarg ("self", FALSE);
470 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
471 get_id, get_cbuf, get_lineno,
472 lineno, FALSE, NULL);
476 char *set_id = g_strdup_printf ("set_%s", var_name);
477 GString *set_cbuf = g_string_new (NULL);
478 Node *node1 = node_new (TYPE_NODE,
479 "name", the_type->name,
480 "pointer", the_type->pointer,
481 "postfix", the_type->postfix,
483 Node *node2 = node_new (TYPE_NODE,
486 Node *node3 = node_new (TYPE_NODE,
487 "name", class->class.otype,
491 g_string_sprintf (set_cbuf,
492 "\tg_object_set (G_OBJECT (self), "
493 "\"%s\", val, NULL);\n",
496 typestack = g_list_prepend (typestack, node2);
497 typestack = g_list_prepend (typestack, node1);
498 typestack = g_list_prepend (typestack, node3);
500 push_funcarg ("self", FALSE);
501 push_funcarg ("val", FALSE);
503 typestack = g_list_prepend (typestack, node2);
504 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
505 set_id, set_cbuf, set_lineno,
506 lineno, FALSE, NULL);
509 node_free ((Node *)the_type);
513 get_prop_enum_flag_cast (Property *prop)
516 if (prop->extra_gtktype == NULL ||
517 /* HACK! just in case someone made this
518 * work with 2.0.0 by using the TYPE
520 ((strstr (prop->extra_gtktype, "_TYPE_") != NULL ||
521 strstr (prop->extra_gtktype, "TYPE_") == prop->extra_gtktype) &&
522 strchr (prop->extra_gtktype, ':') == NULL)) {
523 if (prop->ptype != NULL)
524 return get_type (prop->ptype, TRUE);
526 return g_strdup ("");
528 tmp = remove_sep (prop->extra_gtktype);
529 ret = g_strdup_printf ("(%s) ", tmp);
535 add_construct_glade (char * file, char * root, char * domain)
540 type = (Type *)node_new (TYPE_NODE,
544 initializer = g_strdup_printf("\t{\n"
545 "\tGtkWidget * root;\n"
546 "\t%%1$s->_priv->_glade_xml = glade_xml_new(%s, %s, %s);\n"
547 "\troot = glade_xml_get_widget(%%1$s->_priv->_glade_xml, %s);\n"
548 "\tgtk_widget_show(root);\n"
549 "\tgtk_container_add(GTK_CONTAINER(%%1$s), root);\n"
550 "\tglade_xml_signal_autoconnect_full(%%1$s->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)%%1$s);\n"
551 "}\n", file, root, domain ? domain : "NULL", root);
553 var = node_new (VARIABLE_NODE,
554 "scope", PRIVATE_SCOPE,
556 "glade_widget", FALSE,
557 "id:steal", "_glade_xml",
558 "destructor_unref", FALSE,
559 "destructor", "g_object_unref",
560 "destructor_simple", TRUE,
561 "initializer", initializer,
562 "initializer_simple", FALSE,
564 class_nodes = g_list_prepend(class_nodes, var);
568 property_link_and_export (Node *node)
570 Property *prop = (Property *)node;
574 char *get = NULL, *set = NULL;
577 if (prop->set != NULL ||
579 error_print (GOB_ERROR, prop->line_no,
580 _("Property linking requested, but "
581 "getters and setters exist"));
584 var = find_var_or_die (prop->name, prop->line_no);
585 if(var->scope == PRIVATE_SCOPE) {
586 root = "self->_priv";
587 } else if (var->scope == CLASS_SCOPE) {
588 root = "SELF_GET_CLASS(self)";
590 error_print (GOB_ERROR, prop->line_no,
591 _("Self aliases needed when autolinking to a classwide member"));
596 if (strcmp (prop->gtktype, "STRING") == 0) {
597 set = g_strdup_printf("{ char *old = %s->%s; "
598 "%s->%s = g_value_dup_string (VAL); g_free (old); }",
601 get = g_strdup_printf("g_value_set_string (VAL, %s->%s);",
603 } else if (strcmp (prop->gtktype, "OBJECT") == 0) {
605 if (prop->extra_gtktype != NULL) {
606 cast = remove_sep (prop->extra_gtktype);
608 cast = g_strdup ("void");
610 set = g_strdup_printf("{ GObject *___old = (GObject *)%s->%s; "
611 "%s->%s = (%s *)g_value_dup_object (VAL); "
612 "if (___old != NULL) { "
613 "g_object_unref (G_OBJECT (___old)); "
619 get = g_strdup_printf ("g_value_set_object (VAL, "
620 "(gpointer)%s->%s);",
623 } else if (strcmp (prop->gtktype, "BOXED") == 0) {
624 char *type = make_me_type (prop->extra_gtktype,
626 if (prop->extra_gtktype == NULL) {
627 error_print (GOB_ERROR, prop->line_no,
628 _("Property linking requested for BOXED, but "
629 "boxed_type not set"));
631 set = g_strdup_printf("{ gpointer ___old = (gpointer)%s->%s; "
632 "gpointer ___new = (gpointer)g_value_get_boxed (VAL); "
633 "if (___new != ___old) { "
634 "if (___old != NULL) g_boxed_free (%s, ___old); "
635 "if (___new != NULL) %s->%s = g_boxed_copy (%s, ___new); "
636 "else %s->%s = NULL;"
644 get = g_strdup_printf("g_value_set_boxed (VAL, %s->%s);",
650 const char *getcast = "";
651 const char *setcast = "";
652 char *to_free = NULL;
653 set_func = g_strdup_printf ("g_value_set_%s", prop->gtktype);
654 g_strdown (set_func);
655 get_func = g_strdup_printf ("g_value_get_%s", prop->gtktype);
656 g_strdown (get_func);
659 if (strcmp (prop->gtktype, "FLAGS") == 0) {
660 setcast = "(guint) ";
662 get_prop_enum_flag_cast (prop);
663 } else if (strcmp (prop->gtktype, "ENUM") == 0) {
666 get_prop_enum_flag_cast (prop);
667 } else if (strcmp (prop->gtktype, "POINTER") == 0) {
668 setcast = "(gpointer) ";
669 getcast = g_strdup_printf ("(%s%s) ",
671 prop->ptype->pointer ? prop->ptype->pointer : "");
675 set = g_strdup_printf("%s->%s = %s%s (VAL);",
679 get = g_strdup_printf("%s (VAL, %s%s->%s);",
691 "get_line", prop->line_no,
693 "set_line", prop->line_no,
698 export_accessors (prop->name,
699 prop->get != NULL, prop->get_line,
700 prop->set != NULL, prop->set_line,
711 if (strcmp (s, "BOOL") == 0) {
712 error_print (GOB_WARN, line_no,
713 _("BOOL type is deprecated, please use BOOLEAN"));
715 return g_strdup ("BOOLEAN");
722 ensure_property (void)
724 if (property == NULL)
725 property = (Property *)node_new (PROPERTY_NODE, NULL);
730 /* Line 268 of yacc.c */
733 /* Enabling traces. */
738 /* Enabling verbose error messages. */
739 #ifdef YYERROR_VERBOSE
740 # undef YYERROR_VERBOSE
741 # define YYERROR_VERBOSE 1
743 # define YYERROR_VERBOSE 0
746 /* Enabling the token table. */
747 #ifndef YYTOKEN_TABLE
748 # define YYTOKEN_TABLE 0
755 /* Put the tokens into the symbol table, so that GDB and other debuggers
820 #define THREEDOTS 265
831 #define TYPETOKEN 276
832 #define ARRAY_DIM 277
833 #define SINGLE_CHAR 278
845 #define PROTECTED 290
846 #define CLASSWIDE 291
856 #define DEFAULT_VALUE 301
860 #define FLAGS_TYPE 305
861 #define ENUM_TYPE 306
862 #define PARAM_TYPE 307
863 #define BOXED_TYPE 308
864 #define OBJECT_TYPE 309
869 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
870 typedef union YYSTYPE
873 /* Line 293 of yacc.c */
884 /* Line 293 of yacc.c */
887 # define YYSTYPE_IS_TRIVIAL 1
888 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
889 # define YYSTYPE_IS_DECLARED 1
893 /* Copy the second part of user declarations. */
896 /* Line 343 of yacc.c */
904 typedef YYTYPE_UINT8 yytype_uint8;
906 typedef unsigned char yytype_uint8;
910 typedef YYTYPE_INT8 yytype_int8;
911 #elif (defined __STDC__ || defined __C99__FUNC__ \
912 || defined __cplusplus || defined _MSC_VER)
913 typedef signed char yytype_int8;
915 typedef short int yytype_int8;
919 typedef YYTYPE_UINT16 yytype_uint16;
921 typedef unsigned short int yytype_uint16;
925 typedef YYTYPE_INT16 yytype_int16;
927 typedef short int yytype_int16;
931 # ifdef __SIZE_TYPE__
932 # define YYSIZE_T __SIZE_TYPE__
933 # elif defined size_t
934 # define YYSIZE_T size_t
935 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
936 || defined __cplusplus || defined _MSC_VER)
937 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
938 # define YYSIZE_T size_t
940 # define YYSIZE_T unsigned int
944 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
947 # if defined YYENABLE_NLS && YYENABLE_NLS
949 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
950 # define YY_(msgid) dgettext ("bison-runtime", msgid)
954 # define YY_(msgid) msgid
958 /* Suppress unused-variable warnings by "using" E. */
959 #if ! defined lint || defined __GNUC__
960 # define YYUSE(e) ((void) (e))
962 # define YYUSE(e) /* empty */
965 /* Identity function, used to suppress warnings about constant conditions. */
969 #if (defined __STDC__ || defined __C99__FUNC__ \
970 || defined __cplusplus || defined _MSC_VER)
983 #if ! defined yyoverflow || YYERROR_VERBOSE
985 /* The parser invokes alloca or malloc; define the necessary symbols. */
987 # ifdef YYSTACK_USE_ALLOCA
988 # if YYSTACK_USE_ALLOCA
990 # define YYSTACK_ALLOC __builtin_alloca
991 # elif defined __BUILTIN_VA_ARG_INCR
992 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
994 # define YYSTACK_ALLOC __alloca
995 # elif defined _MSC_VER
996 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
997 # define alloca _alloca
999 # define YYSTACK_ALLOC alloca
1000 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1001 || defined __cplusplus || defined _MSC_VER)
1002 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1003 # ifndef EXIT_SUCCESS
1004 # define EXIT_SUCCESS 0
1011 # ifdef YYSTACK_ALLOC
1012 /* Pacify GCC's `empty if-body' warning. */
1013 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1014 # ifndef YYSTACK_ALLOC_MAXIMUM
1015 /* The OS might guarantee only one guard page at the bottom of the stack,
1016 and a page size can be as small as 4096 bytes. So we cannot safely
1017 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1018 to allow for a few compiler-allocated temporary stack slots. */
1019 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1022 # define YYSTACK_ALLOC YYMALLOC
1023 # define YYSTACK_FREE YYFREE
1024 # ifndef YYSTACK_ALLOC_MAXIMUM
1025 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1027 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1028 && ! ((defined YYMALLOC || defined malloc) \
1029 && (defined YYFREE || defined free)))
1030 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1031 # ifndef EXIT_SUCCESS
1032 # define EXIT_SUCCESS 0
1036 # define YYMALLOC malloc
1037 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1038 || defined __cplusplus || defined _MSC_VER)
1039 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1043 # define YYFREE free
1044 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1045 || defined __cplusplus || defined _MSC_VER)
1046 void free (void *); /* INFRINGES ON USER NAME SPACE */
1050 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1053 #if (! defined yyoverflow \
1054 && (! defined __cplusplus \
1055 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1057 /* A type that is properly aligned for any stack member. */
1060 yytype_int16 yyss_alloc;
1064 /* The size of the maximum gap between one aligned stack and the next. */
1065 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1067 /* The size of an array large to enough to hold all stacks, each with
1069 # define YYSTACK_BYTES(N) \
1070 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1071 + YYSTACK_GAP_MAXIMUM)
1073 # define YYCOPY_NEEDED 1
1075 /* Relocate STACK from its old location to the new one. The
1076 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1077 elements in the stack, and YYPTR gives the new location of the
1078 stack. Advance YYPTR to a properly aligned location for the next
1080 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1083 YYSIZE_T yynewbytes; \
1084 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1085 Stack = &yyptr->Stack_alloc; \
1086 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1087 yyptr += yynewbytes / sizeof (*yyptr); \
1093 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1094 /* Copy COUNT objects from FROM to TO. The source and destination do
1097 # if defined __GNUC__ && 1 < __GNUC__
1098 # define YYCOPY(To, From, Count) \
1099 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1101 # define YYCOPY(To, From, Count) \
1105 for (yyi = 0; yyi < (Count); yyi++) \
1106 (To)[yyi] = (From)[yyi]; \
1111 #endif /* !YYCOPY_NEEDED */
1113 /* YYFINAL -- State number of the termination state. */
1115 /* YYLAST -- Last index in YYTABLE. */
1118 /* YYNTOKENS -- Number of terminals. */
1119 #define YYNTOKENS 68
1120 /* YYNNTS -- Number of nonterminals. */
1122 /* YYNRULES -- Number of rules. */
1123 #define YYNRULES 198
1124 /* YYNRULES -- Number of states. */
1125 #define YYNSTATES 418
1127 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1128 #define YYUNDEFTOK 2
1129 #define YYMAXUTOK 309
1131 #define YYTRANSLATE(YYX) \
1132 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1134 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1135 static const yytype_uint8 yytranslate[] =
1137 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1138 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1139 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1140 2, 2, 2, 66, 2, 2, 2, 2, 2, 2,
1141 57, 58, 63, 2, 61, 67, 2, 2, 2, 2,
1142 2, 2, 2, 2, 2, 2, 2, 2, 2, 59,
1143 65, 60, 64, 2, 2, 2, 2, 2, 2, 2,
1144 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1145 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1146 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1147 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1148 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1149 2, 2, 2, 55, 62, 56, 2, 2, 2, 2,
1150 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1151 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1152 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1153 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1154 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1155 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1156 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1157 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1158 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1159 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1160 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1161 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1162 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1163 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1164 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1165 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1166 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1167 45, 46, 47, 48, 49, 50, 51, 52, 53, 54
1171 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1173 static const yytype_uint16 yyprhs[] =
1175 0, 0, 3, 7, 10, 13, 15, 17, 19, 21,
1176 23, 25, 27, 29, 31, 34, 37, 40, 43, 45,
1177 47, 49, 51, 56, 60, 66, 67, 72, 78, 84,
1178 90, 97, 105, 112, 120, 123, 125, 127, 130, 134,
1179 136, 138, 140, 142, 144, 146, 148, 150, 153, 157,
1180 160, 164, 167, 170, 172, 174, 176, 177, 183, 190,
1181 203, 213, 220, 224, 225, 237, 246, 252, 256, 257,
1182 261, 263, 265, 270, 272, 274, 278, 282, 286, 290,
1183 294, 298, 302, 306, 310, 314, 318, 322, 326, 330,
1184 334, 338, 342, 344, 350, 352, 356, 357, 361, 363,
1185 366, 368, 370, 372, 375, 378, 381, 385, 389, 392,
1186 395, 398, 400, 403, 405, 408, 410, 412, 414, 416,
1187 418, 420, 422, 424, 426, 428, 430, 432, 434, 437,
1188 440, 444, 447, 449, 453, 457, 460, 462, 467, 471,
1189 473, 476, 478, 489, 501, 511, 521, 530, 542, 551,
1190 557, 560, 565, 572, 573, 575, 578, 580, 582, 585,
1191 588, 592, 597, 602, 604, 608, 610, 614, 616, 619,
1192 623, 630, 638, 641, 643, 645, 648, 651, 655, 659,
1193 663, 667, 675, 684, 688, 690, 694, 696, 704, 713,
1194 717, 719, 727, 736, 740, 742, 744, 747, 749
1197 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1198 static const yytype_int8 yyrhs[] =
1200 69, 0, -1, 71, 72, 71, -1, 72, 71, -1,
1201 71, 72, -1, 72, -1, 24, -1, 26, -1, 29,
1202 -1, 27, -1, 28, -1, 30, -1, 31, -1, 25,
1203 -1, 71, 70, -1, 71, 113, -1, 71, 116, -1,
1204 71, 118, -1, 70, -1, 113, -1, 116, -1, 118,
1205 -1, 73, 55, 75, 56, -1, 73, 55, 56, -1,
1206 3, 21, 4, 21, 74, -1, -1, 57, 19, 58,
1207 74, -1, 57, 19, 19, 58, 74, -1, 57, 19,
1208 21, 58, 74, -1, 57, 19, 20, 58, 74, -1,
1209 57, 19, 32, 32, 58, 74, -1, 57, 19, 32,
1210 32, 32, 58, 74, -1, 57, 19, 19, 32, 58,
1211 74, -1, 57, 19, 19, 32, 32, 58, 74, -1,
1212 75, 76, -1, 76, -1, 104, -1, 19, 104, -1,
1213 19, 21, 104, -1, 81, -1, 82, -1, 84, -1,
1214 59, -1, 33, -1, 34, -1, 35, -1, 36, -1,
1215 19, 19, -1, 19, 55, 24, -1, 60, 120, -1,
1216 60, 55, 24, -1, 78, 79, -1, 79, 78, -1,
1217 79, -1, 78, -1, 19, -1, -1, 77, 93, 19,
1218 80, 59, -1, 77, 93, 19, 22, 80, 59, -1,
1219 38, 91, 90, 19, 83, 19, 55, 24, 19, 55,
1220 24, 59, -1, 38, 91, 90, 19, 83, 19, 55,
1221 24, 59, -1, 38, 91, 90, 19, 83, 19, -1,
1222 57, 19, 58, -1, -1, 37, 19, 19, 85, 19,
1223 55, 24, 19, 55, 24, 59, -1, 37, 19, 19,
1224 85, 19, 55, 24, 59, -1, 37, 19, 19, 85,
1225 59, -1, 57, 86, 58, -1, -1, 86, 61, 89,
1226 -1, 89, -1, 32, -1, 19, 57, 32, 58, -1,
1227 120, -1, 87, -1, 42, 60, 87, -1, 43, 60,
1228 87, -1, 44, 60, 120, -1, 45, 60, 120, -1,
1229 46, 60, 88, -1, 48, 60, 92, -1, 49, 60,
1230 93, -1, 50, 60, 21, -1, 50, 60, 19, -1,
1231 51, 60, 21, -1, 51, 60, 19, -1, 52, 60,
1232 21, -1, 52, 60, 19, -1, 53, 60, 21, -1,
1233 53, 60, 19, -1, 54, 60, 21, -1, 54, 60,
1234 19, -1, 19, -1, 19, 57, 19, 93, 58, -1,
1235 19, -1, 57, 92, 58, -1, -1, 19, 62, 92,
1236 -1, 19, -1, 94, 98, -1, 94, -1, 95, -1,
1237 19, -1, 5, 19, -1, 19, 5, -1, 97, 19,
1238 -1, 5, 97, 19, -1, 97, 19, 5, -1, 96,
1239 95, -1, 21, 95, -1, 5, 95, -1, 21, -1,
1240 21, 5, -1, 96, -1, 96, 5, -1, 6, -1,
1241 18, -1, 14, -1, 15, -1, 13, -1, 16, -1,
1242 17, -1, 11, -1, 12, -1, 7, -1, 8, -1,
1243 9, -1, 63, -1, 63, 5, -1, 63, 98, -1,
1244 63, 5, 98, -1, 19, 101, -1, 101, -1, 77,
1245 19, 101, -1, 19, 77, 101, -1, 77, 101, -1,
1246 99, -1, 19, 57, 102, 58, -1, 102, 61, 19,
1247 -1, 19, -1, 55, 24, -1, 59, -1, 40, 91,
1248 100, 93, 19, 57, 107, 58, 105, 103, -1, 77,
1249 40, 91, 99, 93, 19, 57, 107, 58, 105, 103,
1250 -1, 39, 77, 93, 19, 57, 107, 58, 105, 103,
1251 -1, 77, 39, 93, 19, 57, 107, 58, 105, 103,
1252 -1, 39, 93, 19, 57, 107, 58, 105, 103, -1,
1253 41, 57, 21, 58, 93, 19, 57, 107, 58, 105,
1254 103, -1, 77, 93, 19, 57, 107, 58, 105, 103,
1255 -1, 19, 57, 19, 58, 103, -1, 19, 106, -1,
1256 19, 106, 19, 106, -1, 19, 106, 19, 106, 19,
1257 106, -1, -1, 120, -1, 55, 24, -1, 6, -1,
1258 19, -1, 19, 5, -1, 5, 19, -1, 19, 61,
1259 108, -1, 19, 5, 61, 108, -1, 5, 19, 61,
1260 108, -1, 108, -1, 109, 61, 10, -1, 109, -1,
1261 109, 61, 110, -1, 110, -1, 93, 19, -1, 93,
1262 19, 22, -1, 93, 19, 57, 19, 111, 58, -1,
1263 93, 19, 22, 57, 19, 111, 58, -1, 111, 112,
1264 -1, 112, -1, 19, -1, 64, 120, -1, 65, 120,
1265 -1, 64, 60, 120, -1, 65, 60, 120, -1, 60,
1266 60, 120, -1, 66, 60, 120, -1, 9, 19, 55,
1267 114, 56, 21, 59, -1, 9, 19, 55, 114, 61,
1268 56, 21, 59, -1, 114, 61, 115, -1, 115, -1,
1269 19, 60, 120, -1, 19, -1, 48, 19, 55, 117,
1270 56, 21, 59, -1, 48, 19, 55, 117, 61, 56,
1271 21, 59, -1, 117, 61, 19, -1, 19, -1, 47,
1272 19, 55, 119, 56, 21, 59, -1, 47, 19, 55,
1273 119, 61, 56, 21, 59, -1, 119, 61, 19, -1,
1274 19, -1, 20, -1, 67, 20, -1, 23, -1, 19,
1278 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1279 static const yytype_uint16 yyrline[] =
1281 0, 704, 704, 705, 706, 707, 710, 719, 728, 737,
1282 746, 755, 764, 773, 784, 785, 786, 787, 788, 789,
1283 790, 791, 794, 799, 806, 823, 824, 832, 844, 853,
1284 865, 874, 883, 892, 903, 904, 907, 908, 917, 929,
1285 930, 931, 932, 935, 936, 937, 938, 941, 961, 985,
1286 989, 997, 998, 999, 1000, 1001, 1009, 1015, 1018, 1023,
1287 1091, 1145, 1234, 1242, 1247, 1295, 1331, 1347, 1348, 1351,
1288 1352, 1355, 1356, 1368, 1369, 1372, 1378, 1384, 1390, 1396,
1289 1402, 1408, 1415, 1421, 1427, 1433, 1439, 1445, 1451, 1457,
1290 1463, 1469, 1475, 1500, 1509, 1515, 1516, 1519, 1522, 1528,
1291 1535, 1544, 1547, 1550, 1554, 1558, 1562, 1567, 1575, 1579,
1292 1584, 1588, 1591, 1595, 1598, 1603, 1604, 1605, 1606, 1607,
1293 1608, 1609, 1610, 1611, 1614, 1615, 1616, 1619, 1620, 1621,
1294 1625, 1632, 1644, 1650, 1662, 1674, 1677, 1683, 1688, 1691,
1295 1696, 1697, 1701, 1724, 1747, 1770, 1793, 1811, 1824, 1834,
1296 1874, 1886, 1906, 1937, 1944, 1945, 1951, 1952, 1963, 1974,
1297 1985, 1995, 2005, 2015, 2018, 2019, 2022, 2023, 2026, 2029,
1298 2032, 2040, 2050, 2051, 2054, 2071, 2078, 2085, 2092, 2099,
1299 2106, 2115, 2124, 2135, 2136, 2139, 2159, 2169, 2178, 2189,
1300 2192, 2197, 2206, 2217, 2220, 2226, 2227, 2231, 2232
1304 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1305 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1306 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1307 static const char *const yytname[] =
1309 "$end", "error", "$undefined", "CLASS", "FROM", "CONST", "VOID",
1310 "STRUCT", "UNION", "ENUM", "THREEDOTS", "SIGNED", "UNSIGNED", "LONG",
1311 "SHORT", "INT", "FLOAT", "DOUBLE", "CHAR", "TOKEN", "NUMBER",
1312 "TYPETOKEN", "ARRAY_DIM", "SINGLE_CHAR", "CCODE", "CTCODE", "ADCODE",
1313 "HTCODE", "PHCODE", "HCODE", "ACODE", "ATCODE", "STRING", "PUBLIC",
1314 "PRIVATE", "PROTECTED", "CLASSWIDE", "PROPERTY", "ARGUMENT", "VIRTUAL",
1315 "SIGNAL", "OVERRIDE", "NICK", "BLURB", "MAXIMUM", "MINIMUM",
1316 "DEFAULT_VALUE", "ERROR", "FLAGS", "TYPE", "FLAGS_TYPE", "ENUM_TYPE",
1317 "PARAM_TYPE", "BOXED_TYPE", "OBJECT_TYPE", "'{'", "'}'", "'('", "')'",
1318 "';'", "'='", "','", "'|'", "'*'", "'>'", "'<'", "'!'", "'-'", "$accept",
1319 "prog", "ccode", "ccodes", "class", "classdec", "classflags",
1320 "classcode", "thing", "scope", "destructor", "initializer", "varoptions",
1321 "variable", "argument", "export", "property", "param_spec",
1322 "param_spec_list", "string", "anyval", "param_spec_value", "argtype",
1323 "flags", "flaglist", "type", "specifier_list", "spec_list", "specifier",
1324 "strunionenum", "pointer", "simplesigtype", "fullsigtype", "sigtype",
1325 "tokenlist", "codenocode", "method", "methodmods", "retcode", "funcargs",
1326 "arglist", "arglist1", "arg", "checklist", "check", "enumcode",
1327 "enumvals", "enumval", "flagcode", "flagvals", "errorcode", "errorvals",
1333 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1335 static const yytype_uint16 yytoknum[] =
1337 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1338 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1339 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1340 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1341 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1342 305, 306, 307, 308, 309, 123, 125, 40, 41, 59,
1343 61, 44, 124, 42, 62, 60, 33, 45
1347 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1348 static const yytype_uint8 yyr1[] =
1350 0, 68, 69, 69, 69, 69, 70, 70, 70, 70,
1351 70, 70, 70, 70, 71, 71, 71, 71, 71, 71,
1352 71, 71, 72, 72, 73, 74, 74, 74, 74, 74,
1353 74, 74, 74, 74, 75, 75, 76, 76, 76, 76,
1354 76, 76, 76, 77, 77, 77, 77, 78, 78, 79,
1355 79, 80, 80, 80, 80, 80, 80, 81, 81, 82,
1356 82, 82, 83, 83, 84, 84, 84, 85, 85, 86,
1357 86, 87, 87, 88, 88, 89, 89, 89, 89, 89,
1358 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
1359 89, 89, 89, 90, 90, 91, 91, 92, 92, 93,
1360 93, 94, 94, 94, 94, 94, 94, 94, 95, 95,
1361 95, 95, 95, 95, 95, 96, 96, 96, 96, 96,
1362 96, 96, 96, 96, 97, 97, 97, 98, 98, 98,
1363 98, 99, 99, 100, 100, 100, 100, 101, 102, 102,
1364 103, 103, 104, 104, 104, 104, 104, 104, 104, 104,
1365 105, 105, 105, 105, 106, 106, 107, 107, 107, 107,
1366 107, 107, 107, 107, 108, 108, 109, 109, 110, 110,
1367 110, 110, 111, 111, 112, 112, 112, 112, 112, 112,
1368 112, 113, 113, 114, 114, 115, 115, 116, 116, 117,
1369 117, 118, 118, 119, 119, 120, 120, 120, 120
1372 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1373 static const yytype_uint8 yyr2[] =
1375 0, 2, 3, 2, 2, 1, 1, 1, 1, 1,
1376 1, 1, 1, 1, 2, 2, 2, 2, 1, 1,
1377 1, 1, 4, 3, 5, 0, 4, 5, 5, 5,
1378 6, 7, 6, 7, 2, 1, 1, 2, 3, 1,
1379 1, 1, 1, 1, 1, 1, 1, 2, 3, 2,
1380 3, 2, 2, 1, 1, 1, 0, 5, 6, 12,
1381 9, 6, 3, 0, 11, 8, 5, 3, 0, 3,
1382 1, 1, 4, 1, 1, 3, 3, 3, 3, 3,
1383 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1384 3, 3, 1, 5, 1, 3, 0, 3, 1, 2,
1385 1, 1, 1, 2, 2, 2, 3, 3, 2, 2,
1386 2, 1, 2, 1, 2, 1, 1, 1, 1, 1,
1387 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1388 3, 2, 1, 3, 3, 2, 1, 4, 3, 1,
1389 2, 1, 10, 11, 9, 9, 8, 11, 8, 5,
1390 2, 4, 6, 0, 1, 2, 1, 1, 2, 2,
1391 3, 4, 4, 1, 3, 1, 3, 1, 2, 3,
1392 6, 7, 2, 1, 1, 2, 2, 3, 3, 3,
1393 3, 7, 8, 3, 1, 3, 1, 7, 8, 3,
1394 1, 7, 8, 3, 1, 1, 2, 1, 1
1397 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1398 Performed when YYTABLE doesn't specify something else to do. Zero
1399 means the default is an error. */
1400 static const yytype_uint8 yydefact[] =
1402 0, 0, 0, 6, 13, 7, 9, 10, 8, 11,
1403 12, 0, 0, 0, 18, 0, 5, 0, 19, 20,
1404 21, 0, 0, 0, 0, 1, 14, 4, 15, 16,
1405 17, 3, 0, 0, 0, 0, 0, 2, 0, 43,
1406 44, 45, 46, 0, 96, 0, 96, 0, 23, 42,
1407 0, 35, 0, 39, 40, 41, 36, 25, 186, 0,
1408 184, 194, 0, 190, 0, 0, 0, 0, 0, 37,
1409 0, 0, 0, 0, 115, 124, 125, 126, 122, 123,
1410 119, 117, 118, 120, 121, 116, 102, 111, 0, 0,
1411 100, 101, 113, 0, 0, 0, 22, 34, 0, 96,
1412 0, 0, 24, 0, 0, 0, 0, 0, 0, 0,
1413 38, 0, 0, 68, 98, 0, 94, 0, 0, 103,
1414 110, 0, 104, 112, 109, 0, 0, 127, 99, 114,
1415 108, 105, 0, 0, 136, 0, 132, 0, 0, 0,
1416 56, 0, 198, 195, 197, 0, 185, 0, 0, 183,
1417 0, 193, 0, 0, 189, 0, 0, 0, 0, 0,
1418 0, 95, 0, 63, 106, 0, 0, 128, 129, 107,
1419 0, 0, 0, 131, 0, 135, 0, 0, 0, 0,
1420 0, 55, 56, 0, 0, 54, 53, 0, 0, 0,
1421 0, 0, 25, 196, 181, 0, 191, 0, 187, 0,
1422 0, 141, 149, 92, 0, 0, 0, 0, 0, 0,
1423 0, 0, 0, 0, 0, 0, 0, 70, 0, 66,
1424 97, 0, 0, 0, 0, 0, 115, 102, 0, 0,
1425 163, 165, 167, 130, 139, 0, 134, 133, 0, 0,
1426 0, 0, 47, 0, 0, 0, 0, 49, 51, 0,
1427 52, 57, 0, 25, 25, 25, 0, 26, 182, 192,
1428 188, 140, 0, 0, 0, 0, 0, 0, 0, 0,
1429 0, 0, 0, 0, 67, 0, 0, 0, 0, 61,
1430 0, 103, 104, 0, 168, 153, 0, 137, 0, 0,
1431 0, 0, 0, 48, 58, 153, 50, 0, 25, 27,
1432 29, 28, 0, 25, 0, 71, 75, 76, 77, 78,
1433 198, 74, 79, 73, 80, 81, 83, 82, 85, 84,
1434 87, 86, 89, 88, 91, 90, 69, 0, 93, 62,
1435 0, 153, 0, 0, 160, 169, 0, 0, 0, 164,
1436 166, 138, 0, 0, 153, 0, 0, 25, 32, 25,
1437 30, 0, 0, 65, 0, 0, 162, 161, 0, 0,
1438 0, 150, 154, 146, 153, 0, 0, 0, 148, 33,
1439 31, 0, 0, 0, 60, 144, 0, 174, 0, 0,
1440 0, 0, 0, 173, 155, 0, 0, 153, 145, 153,
1441 72, 0, 0, 0, 0, 0, 175, 0, 176, 0,
1442 170, 172, 151, 142, 0, 0, 64, 0, 171, 179,
1443 177, 178, 180, 0, 147, 143, 59, 152
1446 /* YYDEFGOTO[NTERM-NUM]. */
1447 static const yytype_int16 yydefgoto[] =
1449 -1, 13, 14, 15, 16, 17, 102, 50, 51, 52,
1450 185, 186, 187, 53, 54, 223, 55, 159, 216, 306,
1451 312, 217, 117, 72, 115, 228, 90, 91, 92, 93,
1452 128, 134, 135, 136, 235, 202, 56, 338, 361, 229,
1453 230, 231, 232, 382, 383, 18, 59, 60, 19, 64,
1457 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1459 #define YYPACT_NINF -360
1460 static const yytype_int16 yypact[] =
1462 162, -2, 6, -360, -360, -360, -360, -360, -360, -360,
1463 -360, 16, 90, 131, -360, 162, 210, 77, -360, -360,
1464 -360, 156, 126, 160, 167, -360, -360, 210, -360, -360,
1465 -360, 210, 161, 223, 153, 230, 231, 210, 226, -360,
1466 -360, -360, -360, 244, 207, 309, 207, 214, -360, -360,
1467 192, -360, 292, -360, -360, -360, -360, 215, 242, -28,
1468 -360, -360, 151, -360, 152, 255, 300, 310, 292, -360,
1469 319, 330, 336, 376, -360, -360, -360, -360, -360, -360,
1470 -360, -360, -360, -360, -360, -360, 351, 444, 393, 338,
1471 295, -360, 458, 360, 327, 365, -360, -360, 393, 207,
1472 377, 384, -360, 7, 392, 92, 399, 98, 409, 100,
1473 -360, 379, 428, 394, 390, 395, 397, 447, 472, -360,
1474 -360, 448, -360, 472, -360, 449, 423, 5, -360, 472,
1475 -360, 476, 149, 463, -360, 393, -360, 433, 473, 475,
1476 58, 184, -360, -360, -360, 477, -360, 436, 478, -360,
1477 437, -360, 479, 439, -360, 480, 159, 445, 236, -4,
1478 330, -360, 484, 450, -360, 451, 410, 295, -360, -360,
1479 452, 485, 486, -360, 69, -360, 487, 393, 453, 69,
1480 393, 115, -3, 410, 18, 454, 492, 456, 117, 455,
1481 459, 488, 215, -360, -360, 457, -360, 460, -360, 462,
1482 494, -360, -360, -360, 464, 465, 466, 467, 468, 469,
1483 470, 471, 474, 481, 482, 483, 185, -360, 489, -360,
1484 -360, 393, 493, 503, 410, 427, 490, 8, 504, 491,
1485 -360, 495, -360, -360, -360, 212, -360, -360, 496, 513,
1486 410, 514, -360, 511, 498, 497, 512, -360, -360, 115,
1487 -360, -360, 120, 215, 215, 215, 121, -360, -360, -360,
1488 -360, -360, 110, 110, 7, 7, 63, 330, 393, 119,
1489 202, 235, 274, 333, -360, 236, 515, 500, 501, 499,
1490 502, 289, 290, 393, -8, 518, 359, -360, 519, 410,
1491 505, 506, 508, -360, -360, 518, -360, 509, 215, -360,
1492 -360, -360, 510, 215, 516, -360, -360, -360, -360, -360,
1493 516, -360, -360, -360, -360, -360, -360, -360, -360, -360,
1494 -360, -360, -360, -360, -360, -360, -360, 13, -360, -360,
1495 521, 518, 393, 393, -360, 517, 527, 70, 159, -360,
1496 -360, -360, 520, 410, 518, 410, 159, 215, -360, 215,
1497 -360, 529, 522, -360, 65, 159, -360, -360, 528, 32,
1498 526, 532, -360, -360, 518, 523, 159, 524, -360, -360,
1499 -360, 525, 539, 530, -360, -360, 32, -360, 531, 27,
1500 83, 533, 56, -360, -360, 70, 159, 518, -360, 518,
1501 -360, 507, 545, 81, 7, 7, -360, 7, -360, 7,
1502 -360, -360, 551, -360, 159, 159, -360, 535, -360, -360,
1503 -360, -360, -360, 70, -360, -360, -360, -360
1506 /* YYPGOTO[NTERM-NUM]. */
1507 static const yytype_int16 yypgoto[] =
1509 -360, -360, 21, 15, 537, -360, -190, -360, 534, -27,
1510 354, 386, 398, -360, -360, -360, -360, -360, -360, -90,
1511 -360, 297, -360, -37, -155, -44, -360, -70, -360, -67,
1512 -23, 440, -360, -5, -360, -326, 85, -288, -278, -179,
1513 -262, -360, 301, 199, -359, 237, -360, 536, 238, -360,
1517 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1518 positive, shift that token. If negative, reduce the rule which
1519 number is the opposite. If YYTABLE_NINF, syntax error. */
1520 #define YYTABLE_NINF -160
1521 static const yytype_int16 yytable[] =
1523 146, 89, 257, 120, 245, 220, 121, 346, 100, 94,
1524 167, 68, 363, 282, 335, 218, 181, 124, 88, 21,
1525 368, 334, 130, 401, 112, 22, 142, 143, 104, 375,
1526 144, 31, 352, 105, 401, 23, 26, 142, 143, 68,
1527 388, 144, 37, 355, 125, 280, 142, 143, 120, 336,
1528 144, 377, 26, 120, 138, 219, 366, 184, 26, 120,
1529 403, 291, 139, 299, 300, 301, -157, 133, 127, 283,
1530 356, 357, 353, 246, 145, 377, 386, 181, 414, 415,
1531 182, 247, 310, 143, 373, 145, 144, 395, 170, 142,
1532 143, 176, 378, 144, 145, 305, 379, 380, 381, 404,
1533 377, 405, 142, 143, 168, 172, 144, 402, 348, 24,
1534 342, 58, 314, 350, 400, 183, 378, 151, 184, 154,
1535 379, 380, 381, 69, 374, 360, 171, 173, 175, 304,
1536 145, 25, 32, 239, 242, 417, 241, 145, 316, 408,
1537 317, 378, 305, 397, 233, 379, 380, 381, 148, 252,
1538 145, 110, 297, 302, 152, 120, 155, 369, 121, 370,
1539 33, 308, 309, 313, 365, 1, 367, 236, 170, 237,
1540 243, 2, 58, 307, 173, 253, 311, 277, 298, 303,
1541 38, 34, 39, 40, 41, 42, 3, 4, 5, 6,
1542 7, 8, 9, 10, 39, 40, 41, 42, 43, 44,
1543 45, 46, 47, 188, 189, 190, 171, 106, 108, 11,
1544 12, 38, 107, 109, 200, 35, 191, 48, 201, 2,
1545 49, 318, 36, 319, 315, 39, 40, 41, 42, 43,
1546 44, 45, 46, 47, 3, 4, 5, 6, 7, 8,
1547 9, 10, 192, 274, 57, 65, 275, 66, 96, 61,
1548 63, 49, 28, 29, 320, 203, 321, 11, 12, 39,
1549 40, 41, 42, 70, 71, 45, 46, 47, 28, 29,
1550 287, 95, 101, 288, 28, 29, 396, 398, 204, 205,
1551 206, 207, 208, 67, 209, 210, 211, 212, 213, 214,
1552 215, 409, 410, 322, 411, 323, 412, 73, 74, 75,
1553 76, 77, 103, 78, 79, 80, 81, 82, 83, 84,
1554 85, 86, 67, 87, 73, 74, 75, 76, 77, 65,
1555 78, 79, 80, 81, 82, 83, 84, 85, 86, 111,
1556 87, 98, 99, 39, 40, 41, 42, 30, 113, 45,
1557 46, 47, 39, 40, 41, 42, 132, -159, -158, 114,
1558 332, 333, 324, 30, 325, 116, 122, 126, 127, 30,
1559 39, 40, 41, 42, 73, 74, 75, 76, 77, 339,
1560 78, 79, 80, 81, 82, 83, 84, 85, 86, 131,
1561 87, 118, 74, 75, 76, 77, 137, 78, 79, 80,
1562 81, 82, 83, 84, 85, 119, 140, 87, 73, 74,
1563 75, 76, 77, 141, 78, 79, 80, 81, 82, 83,
1564 84, 85, 86, 147, 87, 225, 226, 75, 76, 77,
1565 150, 78, 79, 80, 81, 82, 83, 84, 85, 227,
1566 153, 87, 118, 74, 75, 76, 77, 156, 78, 79,
1567 80, 81, 82, 83, 84, 85, 281, 157, 87, 123,
1568 74, 158, 160, 161, 162, 78, 79, 80, 81, 82,
1569 83, 84, 85, 129, 74, 87, 163, 164, 165, 78,
1570 79, 80, 81, 82, 83, 84, 85, 118, 74, 87,
1571 166, 169, 174, 78, 79, 80, 81, 82, 83, 84,
1572 85, 177, 178, 87, 179, 194, 196, 193, 198, 195,
1573 197, 199, 183, 221, 234, 170, 238, 222, 224, 171,
1574 240, 249, 278, 254, 184, 251, 258, 255, 261, 259,
1575 256, 260, 279, 284, 262, 263, 264, 265, 266, 267,
1576 268, 269, 290, 292, 270, 293, 296, 337, 341, 327,
1577 250, 271, 272, 273, 276, 354, 359, 376, -156, 285,
1578 384, 385, 27, 289, 330, 295, 286, 294, 328, 329,
1579 331, 371, 343, 391, 344, 345, 406, 347, 349, 407,
1580 413, 248, 326, 351, 358, 393, 0, 372, 364, 180,
1581 244, 387, 389, 390, 97, 392, 0, 340, 0, 0,
1582 0, 394, 0, 399, 416, 0, 0, 0, 0, 0,
1583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1584 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1585 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1586 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1590 #define yypact_value_is_default(yystate) \
1591 ((yystate) == (-360))
1593 #define yytable_value_is_error(yytable_value) \
1596 static const yytype_int16 yycheck[] =
1598 103, 45, 192, 73, 183, 160, 73, 295, 52, 46,
1599 5, 38, 338, 5, 22, 19, 19, 87, 45, 21,
1600 346, 283, 92, 382, 68, 19, 19, 20, 56, 355,
1601 23, 16, 19, 61, 393, 19, 15, 19, 20, 66,
1602 366, 23, 27, 331, 88, 224, 19, 20, 118, 57,
1603 23, 19, 31, 123, 98, 59, 344, 60, 37, 129,
1604 386, 240, 99, 253, 254, 255, 58, 94, 63, 61,
1605 332, 333, 59, 55, 67, 19, 364, 19, 404, 405,
1606 22, 184, 19, 20, 19, 67, 23, 60, 19, 19,
1607 20, 135, 60, 23, 67, 32, 64, 65, 66, 387,
1608 19, 389, 19, 20, 127, 132, 23, 385, 298, 19,
1609 289, 19, 267, 303, 58, 57, 60, 19, 60, 19,
1610 64, 65, 66, 38, 59, 55, 57, 132, 133, 19,
1611 67, 0, 55, 177, 19, 413, 180, 67, 19, 58,
1612 21, 60, 32, 60, 167, 64, 65, 66, 56, 32,
1613 67, 66, 32, 32, 56, 225, 56, 347, 225, 349,
1614 4, 264, 265, 266, 343, 3, 345, 172, 19, 174,
1615 55, 9, 19, 263, 179, 58, 266, 221, 58, 58,
1616 19, 55, 33, 34, 35, 36, 24, 25, 26, 27,
1617 28, 29, 30, 31, 33, 34, 35, 36, 37, 38,
1618 39, 40, 41, 19, 20, 21, 57, 56, 56, 47,
1619 48, 19, 61, 61, 55, 55, 32, 56, 59, 9,
1620 59, 19, 55, 21, 268, 33, 34, 35, 36, 37,
1621 38, 39, 40, 41, 24, 25, 26, 27, 28, 29,
1622 30, 31, 58, 58, 21, 19, 61, 21, 56, 19,
1623 19, 59, 15, 15, 19, 19, 21, 47, 48, 33,
1624 34, 35, 36, 19, 57, 39, 40, 41, 31, 31,
1625 58, 57, 57, 61, 37, 37, 379, 380, 42, 43,
1626 44, 45, 46, 57, 48, 49, 50, 51, 52, 53,
1627 54, 394, 395, 19, 397, 21, 399, 5, 6, 7,
1628 8, 9, 60, 11, 12, 13, 14, 15, 16, 17,
1629 18, 19, 57, 21, 5, 6, 7, 8, 9, 19,
1630 11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
1631 21, 39, 40, 33, 34, 35, 36, 15, 19, 39,
1632 40, 41, 33, 34, 35, 36, 19, 58, 58, 19,
1633 61, 61, 19, 31, 21, 19, 5, 19, 63, 37,
1634 33, 34, 35, 36, 5, 6, 7, 8, 9, 10,
1635 11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
1636 21, 5, 6, 7, 8, 9, 21, 11, 12, 13,
1637 14, 15, 16, 17, 18, 19, 19, 21, 5, 6,
1638 7, 8, 9, 19, 11, 12, 13, 14, 15, 16,
1639 17, 18, 19, 21, 21, 5, 6, 7, 8, 9,
1640 21, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1641 21, 21, 5, 6, 7, 8, 9, 58, 11, 12,
1642 13, 14, 15, 16, 17, 18, 19, 19, 21, 5,
1643 6, 57, 62, 58, 57, 11, 12, 13, 14, 15,
1644 16, 17, 18, 5, 6, 21, 19, 19, 19, 11,
1645 12, 13, 14, 15, 16, 17, 18, 5, 6, 21,
1646 57, 5, 19, 11, 12, 13, 14, 15, 16, 17,
1647 18, 58, 19, 21, 19, 59, 59, 20, 59, 21,
1648 21, 21, 57, 19, 19, 19, 19, 57, 57, 57,
1649 57, 19, 19, 58, 60, 59, 59, 58, 24, 59,
1650 32, 59, 19, 19, 60, 60, 60, 60, 60, 60,
1651 60, 60, 19, 19, 60, 24, 24, 19, 19, 24,
1652 186, 60, 60, 60, 55, 24, 19, 19, 58, 58,
1653 24, 19, 15, 57, 55, 58, 61, 59, 58, 58,
1654 58, 32, 57, 24, 58, 57, 59, 58, 58, 24,
1655 19, 185, 275, 57, 57, 376, -1, 55, 58, 139,
1656 182, 58, 58, 58, 50, 55, -1, 286, -1, -1,
1657 -1, 60, -1, 60, 59, -1, -1, -1, -1, -1,
1658 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1659 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1660 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1661 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1665 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1666 symbol of state STATE-NUM. */
1667 static const yytype_uint8 yystos[] =
1669 0, 3, 9, 24, 25, 26, 27, 28, 29, 30,
1670 31, 47, 48, 69, 70, 71, 72, 73, 113, 116,
1671 118, 21, 19, 19, 19, 0, 70, 72, 113, 116,
1672 118, 71, 55, 4, 55, 55, 55, 71, 19, 33,
1673 34, 35, 36, 37, 38, 39, 40, 41, 56, 59,
1674 75, 76, 77, 81, 82, 84, 104, 21, 19, 114,
1675 115, 19, 119, 19, 117, 19, 21, 57, 77, 104,
1676 19, 57, 91, 5, 6, 7, 8, 9, 11, 12,
1677 13, 14, 15, 16, 17, 18, 19, 21, 77, 93,
1678 94, 95, 96, 97, 91, 57, 56, 76, 39, 40,
1679 93, 57, 74, 60, 56, 61, 56, 61, 56, 61,
1680 104, 19, 93, 19, 19, 92, 19, 90, 5, 19,
1681 95, 97, 5, 5, 95, 93, 19, 63, 98, 5,
1682 95, 19, 19, 77, 99, 100, 101, 21, 93, 91,
1683 19, 19, 19, 20, 23, 67, 120, 21, 56, 115,
1684 21, 19, 56, 21, 19, 56, 58, 19, 57, 85,
1685 62, 58, 57, 19, 19, 19, 57, 5, 98, 5,
1686 19, 57, 77, 101, 19, 101, 93, 58, 19, 19,
1687 99, 19, 22, 57, 60, 78, 79, 80, 19, 20,
1688 21, 32, 58, 20, 59, 21, 59, 21, 59, 21,
1689 55, 59, 103, 19, 42, 43, 44, 45, 46, 48,
1690 49, 50, 51, 52, 53, 54, 86, 89, 19, 59,
1691 92, 19, 57, 83, 57, 5, 6, 19, 93, 107,
1692 108, 109, 110, 98, 19, 102, 101, 101, 19, 93,
1693 57, 93, 19, 55, 80, 107, 55, 120, 79, 19,
1694 78, 59, 32, 58, 58, 58, 32, 74, 59, 59,
1695 59, 24, 60, 60, 60, 60, 60, 60, 60, 60,
1696 60, 60, 60, 60, 58, 61, 55, 93, 19, 19,
1697 107, 19, 5, 61, 19, 58, 61, 58, 61, 57,
1698 19, 107, 19, 24, 59, 58, 24, 32, 58, 74,
1699 74, 74, 32, 58, 19, 32, 87, 87, 120, 120,
1700 19, 87, 88, 120, 92, 93, 19, 21, 19, 21,
1701 19, 21, 19, 21, 19, 21, 89, 24, 58, 58,
1702 55, 58, 61, 61, 108, 22, 57, 19, 105, 10,
1703 110, 19, 107, 57, 58, 57, 105, 58, 74, 58,
1704 74, 57, 19, 59, 24, 105, 108, 108, 57, 19,
1705 55, 106, 120, 103, 58, 107, 105, 107, 103, 74,
1706 74, 32, 55, 19, 59, 103, 19, 19, 60, 64,
1707 65, 66, 111, 112, 24, 19, 105, 58, 103, 58,
1708 58, 24, 55, 111, 60, 60, 120, 60, 120, 60,
1709 58, 112, 106, 103, 105, 105, 59, 24, 58, 120,
1710 120, 120, 120, 19, 103, 103, 59, 106
1713 #define yyerrok (yyerrstatus = 0)
1714 #define yyclearin (yychar = YYEMPTY)
1715 #define YYEMPTY (-2)
1718 #define YYACCEPT goto yyacceptlab
1719 #define YYABORT goto yyabortlab
1720 #define YYERROR goto yyerrorlab
1723 /* Like YYERROR except do call yyerror. This remains here temporarily
1724 to ease the transition to the new meaning of YYERROR, for GCC.
1725 Once GCC version 2 has supplanted version 1, this can go. However,
1726 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1727 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1730 #define YYFAIL goto yyerrlab
1732 /* This is here to suppress warnings from the GCC cpp's
1733 -Wunused-macros. Normally we don't worry about that warning, but
1734 some users do, and we want to make it easy for users to remove
1735 YYFAIL uses, which will produce warnings from Bison 2.5. */
1738 #define YYRECOVERING() (!!yyerrstatus)
1740 #define YYBACKUP(Token, Value) \
1742 if (yychar == YYEMPTY && yylen == 1) \
1751 yyerror (YY_("syntax error: cannot back up")); \
1758 #define YYERRCODE 256
1761 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1762 If N is 0, then set CURRENT to the empty location which ends
1763 the previous symbol: RHS[0] (always defined). */
1765 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1766 #ifndef YYLLOC_DEFAULT
1767 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1771 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1772 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1773 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1774 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1778 (Current).first_line = (Current).last_line = \
1779 YYRHSLOC (Rhs, 0).last_line; \
1780 (Current).first_column = (Current).last_column = \
1781 YYRHSLOC (Rhs, 0).last_column; \
1787 /* This macro is provided for backward compatibility. */
1789 #ifndef YY_LOCATION_PRINT
1790 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1794 /* YYLEX -- calling `yylex' with the right arguments. */
1797 # define YYLEX yylex (YYLEX_PARAM)
1799 # define YYLEX yylex ()
1802 /* Enable debugging if requested. */
1806 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1807 # define YYFPRINTF fprintf
1810 # define YYDPRINTF(Args) \
1816 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1820 YYFPRINTF (stderr, "%s ", Title); \
1821 yy_symbol_print (stderr, \
1823 YYFPRINTF (stderr, "\n"); \
1828 /*--------------------------------.
1829 | Print this symbol on YYOUTPUT. |
1830 `--------------------------------*/
1833 #if (defined __STDC__ || defined __C99__FUNC__ \
1834 || defined __cplusplus || defined _MSC_VER)
1836 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1839 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1842 YYSTYPE const * const yyvaluep;
1848 if (yytype < YYNTOKENS)
1849 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1861 /*--------------------------------.
1862 | Print this symbol on YYOUTPUT. |
1863 `--------------------------------*/
1865 #if (defined __STDC__ || defined __C99__FUNC__ \
1866 || defined __cplusplus || defined _MSC_VER)
1868 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1871 yy_symbol_print (yyoutput, yytype, yyvaluep)
1874 YYSTYPE const * const yyvaluep;
1877 if (yytype < YYNTOKENS)
1878 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1880 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1882 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1883 YYFPRINTF (yyoutput, ")");
1886 /*------------------------------------------------------------------.
1887 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1889 `------------------------------------------------------------------*/
1891 #if (defined __STDC__ || defined __C99__FUNC__ \
1892 || defined __cplusplus || defined _MSC_VER)
1894 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1897 yy_stack_print (yybottom, yytop)
1898 yytype_int16 *yybottom;
1899 yytype_int16 *yytop;
1902 YYFPRINTF (stderr, "Stack now");
1903 for (; yybottom <= yytop; yybottom++)
1905 int yybot = *yybottom;
1906 YYFPRINTF (stderr, " %d", yybot);
1908 YYFPRINTF (stderr, "\n");
1911 # define YY_STACK_PRINT(Bottom, Top) \
1914 yy_stack_print ((Bottom), (Top)); \
1918 /*------------------------------------------------.
1919 | Report that the YYRULE is going to be reduced. |
1920 `------------------------------------------------*/
1922 #if (defined __STDC__ || defined __C99__FUNC__ \
1923 || defined __cplusplus || defined _MSC_VER)
1925 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1928 yy_reduce_print (yyvsp, yyrule)
1933 int yynrhs = yyr2[yyrule];
1935 unsigned long int yylno = yyrline[yyrule];
1936 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1938 /* The symbols being reduced. */
1939 for (yyi = 0; yyi < yynrhs; yyi++)
1941 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1942 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1943 &(yyvsp[(yyi + 1) - (yynrhs)])
1945 YYFPRINTF (stderr, "\n");
1949 # define YY_REDUCE_PRINT(Rule) \
1952 yy_reduce_print (yyvsp, Rule); \
1955 /* Nonzero means print parse trace. It is left uninitialized so that
1956 multiple parsers can coexist. */
1958 #else /* !YYDEBUG */
1959 # define YYDPRINTF(Args)
1960 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1961 # define YY_STACK_PRINT(Bottom, Top)
1962 # define YY_REDUCE_PRINT(Rule)
1963 #endif /* !YYDEBUG */
1966 /* YYINITDEPTH -- initial size of the parser's stacks. */
1968 # define YYINITDEPTH 200
1971 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1972 if the built-in stack extension method is used).
1974 Do not make this value too large; the results are undefined if
1975 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1976 evaluated with infinite-precision integer arithmetic. */
1979 # define YYMAXDEPTH 10000
1986 # if defined __GLIBC__ && defined _STRING_H
1987 # define yystrlen strlen
1989 /* Return the length of YYSTR. */
1990 #if (defined __STDC__ || defined __C99__FUNC__ \
1991 || defined __cplusplus || defined _MSC_VER)
1993 yystrlen (const char *yystr)
2001 for (yylen = 0; yystr[yylen]; yylen++)
2009 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2010 # define yystpcpy stpcpy
2012 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2014 #if (defined __STDC__ || defined __C99__FUNC__ \
2015 || defined __cplusplus || defined _MSC_VER)
2017 yystpcpy (char *yydest, const char *yysrc)
2020 yystpcpy (yydest, yysrc)
2026 const char *yys = yysrc;
2028 while ((*yyd++ = *yys++) != '\0')
2037 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2038 quotes and backslashes, so that it's suitable for yyerror. The
2039 heuristic is that double-quoting is unnecessary unless the string
2040 contains an apostrophe, a comma, or backslash (other than
2041 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2042 null, do not copy; instead, return the length of what the result
2045 yytnamerr (char *yyres, const char *yystr)
2050 char const *yyp = yystr;
2057 goto do_not_strip_quotes;
2061 goto do_not_strip_quotes;
2074 do_not_strip_quotes: ;
2078 return yystrlen (yystr);
2080 return yystpcpy (yyres, yystr) - yyres;
2084 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
2085 about the unexpected token YYTOKEN for the state stack whose top is
2088 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
2089 not large enough to hold the message. In that case, also set
2090 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
2091 required number of bytes is too large to store. */
2093 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
2094 yytype_int16 *yyssp, int yytoken)
2096 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
2097 YYSIZE_T yysize = yysize0;
2099 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2100 /* Internationalized format string. */
2101 const char *yyformat = 0;
2102 /* Arguments of yyformat. */
2103 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2104 /* Number of reported tokens (one for the "unexpected", one per
2108 /* There are many possibilities here to consider:
2109 - Assume YYFAIL is not used. It's too flawed to consider. See
2110 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
2111 for details. YYERROR is fine as it does not invoke this
2113 - If this state is a consistent state with a default action, then
2114 the only way this function was invoked is if the default action
2115 is an error action. In that case, don't check for expected
2116 tokens because there are none.
2117 - The only way there can be no lookahead present (in yychar) is if
2118 this state is a consistent state with a default action. Thus,
2119 detecting the absence of a lookahead is sufficient to determine
2120 that there is no unexpected or expected token to report. In that
2121 case, just report a simple "syntax error".
2122 - Don't assume there isn't a lookahead just because this state is a
2123 consistent state with a default action. There might have been a
2124 previous inconsistent state, consistent state with a non-default
2125 action, or user semantic action that manipulated yychar.
2126 - Of course, the expected token list depends on states to have
2127 correct lookahead information, and it depends on the parser not
2128 to perform extra reductions after fetching a lookahead from the
2129 scanner and before detecting a syntax error. Thus, state merging
2130 (from LALR or IELR) and default reductions corrupt the expected
2131 token list. However, the list is correct for canonical LR with
2132 one exception: it will still contain any token that will not be
2133 accepted due to an error action in a later state.
2135 if (yytoken != YYEMPTY)
2137 int yyn = yypact[*yyssp];
2138 yyarg[yycount++] = yytname[yytoken];
2139 if (!yypact_value_is_default (yyn))
2141 /* Start YYX at -YYN if negative to avoid negative indexes in
2142 YYCHECK. In other words, skip the first -YYN actions for
2143 this state because they are default actions. */
2144 int yyxbegin = yyn < 0 ? -yyn : 0;
2145 /* Stay within bounds of both yycheck and yytname. */
2146 int yychecklim = YYLAST - yyn + 1;
2147 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2150 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2151 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
2152 && !yytable_value_is_error (yytable[yyx + yyn]))
2154 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2160 yyarg[yycount++] = yytname[yyx];
2161 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2162 if (! (yysize <= yysize1
2163 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2172 # define YYCASE_(N, S) \
2176 YYCASE_(0, YY_("syntax error"));
2177 YYCASE_(1, YY_("syntax error, unexpected %s"));
2178 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2179 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2180 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2181 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2185 yysize1 = yysize + yystrlen (yyformat);
2186 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2190 if (*yymsg_alloc < yysize)
2192 *yymsg_alloc = 2 * yysize;
2193 if (! (yysize <= *yymsg_alloc
2194 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2195 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2199 /* Avoid sprintf, as that infringes on the user's name space.
2200 Don't have undefined behavior even if the translation
2201 produced a string with the wrong number of "%s"s. */
2205 while ((*yyp = *yyformat) != '\0')
2206 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2208 yyp += yytnamerr (yyp, yyarg[yyi++]);
2219 #endif /* YYERROR_VERBOSE */
2221 /*-----------------------------------------------.
2222 | Release the memory associated to this symbol. |
2223 `-----------------------------------------------*/
2226 #if (defined __STDC__ || defined __C99__FUNC__ \
2227 || defined __cplusplus || defined _MSC_VER)
2229 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2232 yydestruct (yymsg, yytype, yyvaluep)
2242 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2253 /* Prevent warnings from -Wmissing-prototypes. */
2254 #ifdef YYPARSE_PARAM
2255 #if defined __STDC__ || defined __cplusplus
2256 int yyparse (void *YYPARSE_PARAM);
2260 #else /* ! YYPARSE_PARAM */
2261 #if defined __STDC__ || defined __cplusplus
2266 #endif /* ! YYPARSE_PARAM */
2269 /* The lookahead symbol. */
2272 /* The semantic value of the lookahead symbol. */
2275 /* Number of syntax errors so far. */
2283 #ifdef YYPARSE_PARAM
2284 #if (defined __STDC__ || defined __C99__FUNC__ \
2285 || defined __cplusplus || defined _MSC_VER)
2287 yyparse (void *YYPARSE_PARAM)
2290 yyparse (YYPARSE_PARAM)
2291 void *YYPARSE_PARAM;
2293 #else /* ! YYPARSE_PARAM */
2294 #if (defined __STDC__ || defined __C99__FUNC__ \
2295 || defined __cplusplus || defined _MSC_VER)
2306 /* Number of tokens to shift before error messages enabled. */
2309 /* The stacks and their tools:
2310 `yyss': related to states.
2311 `yyvs': related to semantic values.
2313 Refer to the stacks thru separate pointers, to allow yyoverflow
2314 to reallocate them elsewhere. */
2316 /* The state stack. */
2317 yytype_int16 yyssa[YYINITDEPTH];
2319 yytype_int16 *yyssp;
2321 /* The semantic value stack. */
2322 YYSTYPE yyvsa[YYINITDEPTH];
2326 YYSIZE_T yystacksize;
2330 /* Lookahead token as an internal (translated) token number. */
2332 /* The variables used to return semantic value and location from the
2337 /* Buffer for error messages, and its allocated size. */
2339 char *yymsg = yymsgbuf;
2340 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2343 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2345 /* The number of symbols on the RHS of the reduced rule.
2346 Keep to zero when no symbol should be popped. */
2352 yystacksize = YYINITDEPTH;
2354 YYDPRINTF ((stderr, "Starting parse\n"));
2359 yychar = YYEMPTY; /* Cause a token to be read. */
2361 /* Initialize stack pointers.
2362 Waste one element of value and location stack
2363 so that they stay on the same level as the state stack.
2364 The wasted elements are never initialized. */
2370 /*------------------------------------------------------------.
2371 | yynewstate -- Push a new state, which is found in yystate. |
2372 `------------------------------------------------------------*/
2374 /* In all cases, when you get here, the value and location stacks
2375 have just been pushed. So pushing a state here evens the stacks. */
2381 if (yyss + yystacksize - 1 <= yyssp)
2383 /* Get the current used size of the three stacks, in elements. */
2384 YYSIZE_T yysize = yyssp - yyss + 1;
2388 /* Give user a chance to reallocate the stack. Use copies of
2389 these so that the &'s don't force the real ones into
2391 YYSTYPE *yyvs1 = yyvs;
2392 yytype_int16 *yyss1 = yyss;
2394 /* Each stack pointer address is followed by the size of the
2395 data in use in that stack, in bytes. This used to be a
2396 conditional around just the two extra args, but that might
2397 be undefined if yyoverflow is a macro. */
2398 yyoverflow (YY_("memory exhausted"),
2399 &yyss1, yysize * sizeof (*yyssp),
2400 &yyvs1, yysize * sizeof (*yyvsp),
2406 #else /* no yyoverflow */
2407 # ifndef YYSTACK_RELOCATE
2408 goto yyexhaustedlab;
2410 /* Extend the stack our own way. */
2411 if (YYMAXDEPTH <= yystacksize)
2412 goto yyexhaustedlab;
2414 if (YYMAXDEPTH < yystacksize)
2415 yystacksize = YYMAXDEPTH;
2418 yytype_int16 *yyss1 = yyss;
2419 union yyalloc *yyptr =
2420 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2422 goto yyexhaustedlab;
2423 YYSTACK_RELOCATE (yyss_alloc, yyss);
2424 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2425 # undef YYSTACK_RELOCATE
2427 YYSTACK_FREE (yyss1);
2430 #endif /* no yyoverflow */
2432 yyssp = yyss + yysize - 1;
2433 yyvsp = yyvs + yysize - 1;
2435 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2436 (unsigned long int) yystacksize));
2438 if (yyss + yystacksize - 1 <= yyssp)
2442 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2444 if (yystate == YYFINAL)
2454 /* Do appropriate processing given the current state. Read a
2455 lookahead token if we need one and don't already have one. */
2457 /* First try to decide what to do without reference to lookahead token. */
2458 yyn = yypact[yystate];
2459 if (yypact_value_is_default (yyn))
2462 /* Not known => get a lookahead token if don't already have one. */
2464 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2465 if (yychar == YYEMPTY)
2467 YYDPRINTF ((stderr, "Reading a token: "));
2471 if (yychar <= YYEOF)
2473 yychar = yytoken = YYEOF;
2474 YYDPRINTF ((stderr, "Now at end of input.\n"));
2478 yytoken = YYTRANSLATE (yychar);
2479 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2482 /* If the proper action on seeing token YYTOKEN is to reduce or to
2483 detect an error, take that action. */
2485 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2490 if (yytable_value_is_error (yyn))
2496 /* Count tokens shifted since error; after three, turn off error
2501 /* Shift the lookahead token. */
2502 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2504 /* Discard the shifted token. */
2513 /*-----------------------------------------------------------.
2514 | yydefault -- do the default action for the current state. |
2515 `-----------------------------------------------------------*/
2517 yyn = yydefact[yystate];
2523 /*-----------------------------.
2524 | yyreduce -- Do a reduction. |
2525 `-----------------------------*/
2527 /* yyn is the number of a rule to reduce with. */
2530 /* If YYLEN is nonzero, implement the default value of the action:
2533 Otherwise, the following line sets YYVAL to garbage.
2534 This behavior is undocumented and Bison
2535 users should not rely upon it. Assigning to YYVAL
2536 unconditionally makes the parser a bit smaller, and it avoids a
2537 GCC warning that YYVAL may be used uninitialized. */
2538 yyval = yyvsp[1-yylen];
2541 YY_REDUCE_PRINT (yyn);
2546 /* Line 1806 of yacc.c */
2553 /* Line 1806 of yacc.c */
2560 /* Line 1806 of yacc.c */
2567 /* Line 1806 of yacc.c */
2574 /* Line 1806 of yacc.c */
2577 Node *node = node_new (CCODE_NODE,
2579 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2580 "line_no", ccode_line,
2582 nodes = g_list_append(nodes,node);
2583 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2589 /* Line 1806 of yacc.c */
2592 Node *node = node_new (CCODE_NODE,
2594 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2595 "line_no", ccode_line,
2597 nodes = g_list_append(nodes,node);
2598 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2604 /* Line 1806 of yacc.c */
2607 Node *node = node_new (CCODE_NODE,
2609 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2610 "line_no", ccode_line,
2612 nodes = g_list_append(nodes,node);
2613 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2619 /* Line 1806 of yacc.c */
2622 Node *node = node_new (CCODE_NODE,
2624 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2625 "line_no", ccode_line,
2627 nodes = g_list_append(nodes,node);
2628 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2634 /* Line 1806 of yacc.c */
2637 Node *node = node_new (CCODE_NODE,
2639 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2640 "line_no", ccode_line,
2642 nodes = g_list_append(nodes,node);
2643 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2649 /* Line 1806 of yacc.c */
2652 Node *node = node_new (CCODE_NODE,
2654 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2655 "line_no", ccode_line,
2657 nodes = g_list_append(nodes,node);
2658 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2664 /* Line 1806 of yacc.c */
2667 Node *node = node_new (CCODE_NODE,
2669 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2670 "line_no", ccode_line,
2672 nodes = g_list_append(nodes,node);
2673 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2679 /* Line 1806 of yacc.c */
2682 Node *node = node_new (CCODE_NODE,
2684 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2685 "line_no", ccode_line,
2687 nodes = g_list_append(nodes,node);
2688 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2694 /* Line 1806 of yacc.c */
2701 /* Line 1806 of yacc.c */
2708 /* Line 1806 of yacc.c */
2715 /* Line 1806 of yacc.c */
2722 /* Line 1806 of yacc.c */
2729 /* Line 1806 of yacc.c */
2736 /* Line 1806 of yacc.c */
2743 /* Line 1806 of yacc.c */
2750 /* Line 1806 of yacc.c */
2753 ((Class *)class)->nodes = class_nodes;
2755 nodes = g_list_append(nodes,class);
2761 /* Line 1806 of yacc.c */
2764 ((Class *)class)->nodes = NULL;
2766 nodes = g_list_append(nodes,class);
2772 /* Line 1806 of yacc.c */
2775 class = node_new (CLASS_NODE,
2776 "otype:steal", (yyvsp[(2) - (5)].id),
2777 "ptype:steal", (yyvsp[(4) - (5)].id),
2778 "bonobo_object_class:steal", bonobo_object_class,
2779 "glade_xml", glade_xml,
2780 "interfaces:steal", interfaces,
2781 "chunk_size:steal", chunk_size,
2782 "abstract", abstract,
2784 bonobo_object_class = NULL;
2793 /* Line 1806 of yacc.c */
2796 if(strcmp((yyvsp[(2) - (4)].id),"abstract") == 0) {
2799 yyerror(_("parse error"));
2807 /* Line 1806 of yacc.c */
2810 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2811 g_free (chunk_size);
2812 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2813 } else if(strcmp((yyvsp[(2) - (5)].id),"BonoboObject") == 0) {
2814 g_free (bonobo_object_class);
2815 bonobo_object_class = g_strdup((yyvsp[(3) - (5)].id));
2817 yyerror(_("parse error"));
2825 /* Line 1806 of yacc.c */
2828 if (strcmp ((yyvsp[(2) - (5)].id), "interface") == 0) {
2829 interfaces = g_list_append (interfaces,
2830 g_strdup ((yyvsp[(3) - (5)].id)));
2832 yyerror(_("parse error"));
2840 /* Line 1806 of yacc.c */
2843 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2844 g_free (chunk_size);
2845 if(atoi((yyvsp[(3) - (5)].id)) != 0)
2846 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2850 yyerror(_("parse error"));
2858 /* Line 1806 of yacc.c */
2861 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2863 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2865 yyerror(_("parse error"));
2873 /* Line 1806 of yacc.c */
2876 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2878 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2880 yyerror(_("parse error"));
2888 /* Line 1806 of yacc.c */
2891 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2893 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2895 yyerror(_("parse error"));
2903 /* Line 1806 of yacc.c */
2906 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2908 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2910 yyerror(_("parse error"));
2918 /* Line 1806 of yacc.c */
2925 /* Line 1806 of yacc.c */
2932 /* Line 1806 of yacc.c */
2939 /* Line 1806 of yacc.c */
2942 if (strcmp ((yyvsp[(1) - (2)].id), "BonoboObject") != 0) {
2943 g_free ((yyvsp[(1) - (2)].id));
2944 yyerror (_("parse error"));
2947 g_free ((yyvsp[(1) - (2)].id));
2948 last_added_method->bonobo_object_func = TRUE;
2954 /* Line 1806 of yacc.c */
2957 if (strcmp ((yyvsp[(1) - (3)].id), "interface") != 0) {
2958 g_free ((yyvsp[(1) - (3)].id));
2959 g_free ((yyvsp[(2) - (3)].id));
2960 yyerror (_("parse error"));
2963 g_free ((yyvsp[(1) - (3)].id));
2964 node_set ((Node *)last_added_method,
2965 "interface:steal", (yyvsp[(2) - (3)].id),
2972 /* Line 1806 of yacc.c */
2979 /* Line 1806 of yacc.c */
2986 /* Line 1806 of yacc.c */
2993 /* Line 1806 of yacc.c */
3000 /* Line 1806 of yacc.c */
3002 { the_scope = PUBLIC_SCOPE; }
3007 /* Line 1806 of yacc.c */
3009 { the_scope = PRIVATE_SCOPE; }
3014 /* Line 1806 of yacc.c */
3016 { the_scope = PROTECTED_SCOPE; }
3021 /* Line 1806 of yacc.c */
3023 { the_scope = CLASS_SCOPE; }
3028 /* Line 1806 of yacc.c */
3031 if (strcmp ((yyvsp[(1) - (2)].id), "destroywith") == 0) {
3032 g_free ((yyvsp[(1) - (2)].id));
3033 destructor_unref = FALSE;
3034 destructor = (yyvsp[(2) - (2)].id);
3035 destructor_line = line_no;
3036 destructor_simple = TRUE;
3037 } else if (strcmp ((yyvsp[(1) - (2)].id), "unrefwith") == 0) {
3038 g_free ((yyvsp[(1) - (2)].id));
3039 destructor_unref = TRUE;
3040 destructor = (yyvsp[(2) - (2)].id);
3041 destructor_line = line_no;
3042 destructor_simple = TRUE;
3044 g_free ((yyvsp[(1) - (2)].id));
3045 g_free ((yyvsp[(2) - (2)].id));
3046 yyerror (_("parse error"));
3054 /* Line 1806 of yacc.c */
3057 if (strcmp ((yyvsp[(1) - (3)].id), "destroy") == 0) {
3058 g_free((yyvsp[(1) - (3)].id));
3059 destructor_unref = FALSE;
3060 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3061 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3062 destructor_line = ccode_line;
3063 destructor_simple = FALSE;
3064 } else if (strcmp ((yyvsp[(1) - (3)].id), "unref") == 0) {
3065 g_free ((yyvsp[(1) - (3)].id));
3066 destructor_unref = TRUE;
3067 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3068 g_string_free ((yyvsp[(3) - (3)].cbuf), FALSE);
3069 destructor_line = ccode_line;
3070 destructor_simple = FALSE;
3072 g_free ((yyvsp[(1) - (3)].id));
3073 g_string_free ((yyvsp[(3) - (3)].cbuf), TRUE);
3074 yyerror (_("parse error"));
3082 /* Line 1806 of yacc.c */
3085 initializer = (yyvsp[(2) - (2)].id);
3086 initializer_line = ccode_line;
3092 /* Line 1806 of yacc.c */
3095 initializer = ((yyvsp[(3) - (3)].cbuf))->str;
3096 initializer_line = ccode_line;
3097 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3103 /* Line 1806 of yacc.c */
3110 /* Line 1806 of yacc.c */
3117 /* Line 1806 of yacc.c */
3119 { destructor = NULL; }
3124 /* Line 1806 of yacc.c */
3125 #line 1000 "parse.y"
3126 { initializer = NULL; }
3131 /* Line 1806 of yacc.c */
3132 #line 1001 "parse.y"
3134 if (strcmp ((yyvsp[(1) - (1)].id), "GladeXML") == 0) {
3135 glade_widget = TRUE;
3137 yyerror(_("parse error"));
3145 /* Line 1806 of yacc.c */
3146 #line 1009 "parse.y"
3155 /* Line 1806 of yacc.c */
3156 #line 1015 "parse.y"
3158 push_variable((yyvsp[(3) - (5)].id), the_scope,(yyvsp[(1) - (5)].line), NULL);
3164 /* Line 1806 of yacc.c */
3165 #line 1018 "parse.y"
3167 push_variable((yyvsp[(3) - (6)].id), the_scope, (yyvsp[(1) - (6)].line), (yyvsp[(4) - (6)].id));
3173 /* Line 1806 of yacc.c */
3174 #line 1023 "parse.y"
3177 if(strcmp((yyvsp[(6) - (12)].id),"get")==0 &&
3178 strcmp((yyvsp[(9) - (12)].id),"set")==0) {
3179 Type *type = pop_type();
3180 g_free ((yyvsp[(6) - (12)].id));
3181 g_free ((yyvsp[(9) - (12)].id));
3182 node = node_new (ARGUMENT_NODE,
3183 "gtktype:steal", (yyvsp[(3) - (12)].id),
3184 "atype:steal", type,
3185 "flags:steal", (yyvsp[(2) - (12)].list),
3186 "name:steal", (yyvsp[(4) - (12)].id),
3187 "get:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3188 "get_line", (yyvsp[(7) - (12)].line),
3189 "set:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3190 "set_line", (yyvsp[(10) - (12)].line),
3191 "line_no", (yyvsp[(1) - (12)].line),
3194 class_nodes = g_list_append(class_nodes,node);
3196 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3197 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3199 } else if(strcmp((yyvsp[(6) - (12)].id),"set")==0 &&
3200 strcmp((yyvsp[(9) - (12)].id),"get")==0) {
3201 Type *type = pop_type();
3202 g_free ((yyvsp[(6) - (12)].id));
3203 g_free ((yyvsp[(9) - (12)].id));
3204 node = node_new (ARGUMENT_NODE,
3205 "gtktype:steal", (yyvsp[(3) - (12)].id),
3206 "atype:steal", type,
3207 "flags:steal", (yyvsp[(2) - (12)].list),
3208 "name:steal", (yyvsp[(4) - (12)].id),
3209 "get:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3210 "get_line", (yyvsp[(10) - (12)].line),
3211 "set:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3212 "set_line", (yyvsp[(7) - (12)].line),
3213 "line_no", (yyvsp[(1) - (12)].line),
3215 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3216 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3217 class_nodes = g_list_append(class_nodes,node);
3219 g_free ((yyvsp[(3) - (12)].id));
3220 g_free ((yyvsp[(4) - (12)].id));
3221 g_free ((yyvsp[(6) - (12)].id));
3222 g_free ((yyvsp[(9) - (12)].id));
3223 g_list_foreach ((yyvsp[(2) - (12)].list), (GFunc)g_free, NULL);
3224 g_list_free ((yyvsp[(2) - (12)].list));
3225 g_string_free ((yyvsp[(11) - (12)].cbuf), TRUE);
3226 g_string_free ((yyvsp[(8) - (12)].cbuf), TRUE);
3227 yyerror (_("parse error"));
3231 if ((yyvsp[(5) - (12)].id) != NULL) {
3232 Argument *arg = (Argument *)node;
3233 export_accessors (arg->name,
3234 arg->get != NULL, arg->get_line,
3235 arg->set != NULL, arg->set_line,
3239 g_free ((yyvsp[(5) - (12)].id));
3247 /* Line 1806 of yacc.c */
3248 #line 1091 "parse.y"
3251 if(strcmp((yyvsp[(6) - (9)].id), "get") == 0) {
3252 Type *type = pop_type();
3253 g_free ((yyvsp[(6) - (9)].id));
3254 node = node_new (ARGUMENT_NODE,
3255 "gtktype:steal", (yyvsp[(3) - (9)].id),
3256 "atype:steal", type,
3257 "flags:steal", (yyvsp[(2) - (9)].list),
3258 "name:steal", (yyvsp[(4) - (9)].id),
3259 "get:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3260 "get_line", (yyvsp[(7) - (9)].line),
3261 "line_no", (yyvsp[(1) - (9)].line),
3264 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3265 class_nodes = g_list_append(class_nodes, node);
3266 } else if(strcmp((yyvsp[(6) - (9)].id), "set") == 0) {
3267 Type *type = pop_type();
3268 g_free ((yyvsp[(6) - (9)].id));
3269 node = node_new (ARGUMENT_NODE,
3270 "gtktype:steal", (yyvsp[(3) - (9)].id),
3271 "atype:steal", type,
3272 "flags:steal", (yyvsp[(2) - (9)].list),
3273 "name:steal", (yyvsp[(4) - (9)].id),
3274 "set:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3275 "set_line", (yyvsp[(7) - (9)].line),
3276 "line_no", (yyvsp[(1) - (9)].line),
3279 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3280 class_nodes = g_list_append (class_nodes, node);
3282 g_free ((yyvsp[(6) - (9)].id));
3283 g_free ((yyvsp[(3) - (9)].id));
3284 g_free ((yyvsp[(4) - (9)].id));
3285 g_list_foreach ((yyvsp[(2) - (9)].list), (GFunc)g_free, NULL);
3286 g_list_free ((yyvsp[(2) - (9)].list));
3287 g_string_free ((yyvsp[(8) - (9)].cbuf), TRUE);
3288 yyerror(_("parse error"));
3292 if ((yyvsp[(5) - (9)].id) != NULL) {
3293 Argument *arg = (Argument *)node;
3294 export_accessors (arg->name,
3295 arg->get != NULL, arg->get_line,
3296 arg->set != NULL, arg->set_line,
3300 g_free ((yyvsp[(5) - (9)].id));
3307 /* Line 1806 of yacc.c */
3308 #line 1145 "parse.y"
3311 char *get, *set = NULL;
3316 if(strcmp((yyvsp[(6) - (6)].id), "link")!=0 &&
3317 strcmp((yyvsp[(6) - (6)].id), "stringlink")!=0 &&
3318 strcmp((yyvsp[(6) - (6)].id), "objectlink")!=0) {
3319 g_free((yyvsp[(6) - (6)].id));
3320 g_free((yyvsp[(3) - (6)].id));
3321 g_free((yyvsp[(4) - (6)].id));
3322 g_list_foreach((yyvsp[(2) - (6)].list),(GFunc)g_free,NULL);
3323 g_list_free((yyvsp[(2) - (6)].list));
3324 yyerror(_("parse error"));
3330 var = find_var_or_die((yyvsp[(4) - (6)].id), (yyvsp[(1) - (6)].line));
3331 if(var->scope == PRIVATE_SCOPE) {
3332 root = "self->_priv";
3333 } else if(var->scope == CLASS_SCOPE) {
3334 root = "SELF_GET_CLASS(self)";
3336 error_print(GOB_ERROR, (yyvsp[(1) - (6)].line),
3337 _("Self aliases needed when autolinking to a classwide member"));
3342 if(strcmp((yyvsp[(6) - (6)].id), "link")==0) {
3343 set = g_strdup_printf("%s->%s = ARG;",
3344 root, (yyvsp[(4) - (6)].id));
3345 } else if(strcmp((yyvsp[(6) - (6)].id), "stringlink")==0) {
3346 set = g_strdup_printf("g_free (%s->%s); "
3347 "%s->%s = g_strdup (ARG);",
3348 root, (yyvsp[(4) - (6)].id),
3349 root, (yyvsp[(4) - (6)].id));
3350 } else if(strcmp((yyvsp[(6) - (6)].id), "objectlink")==0) {
3351 set = g_strdup_printf(
3353 "g_object_ref (G_OBJECT (ARG)); "
3354 "if (%s->%s != NULL) "
3355 "g_object_unref (G_OBJECT (%s->%s)); "
3357 root, (yyvsp[(4) - (6)].id),
3358 root, (yyvsp[(4) - (6)].id),
3359 root, (yyvsp[(4) - (6)].id));
3361 g_assert_not_reached();
3364 get = g_strdup_printf("ARG = %s->%s;", root, (yyvsp[(4) - (6)].id));
3366 g_free ((yyvsp[(6) - (6)].id));
3369 type = (Type *)node_copy ((Node *)var->vtype);
3371 node = node_new (ARGUMENT_NODE,
3372 "gtktype:steal", (yyvsp[(3) - (6)].id),
3373 "atype:steal", type,
3374 "flags:steal", (yyvsp[(2) - (6)].list),
3375 "name:steal", (yyvsp[(4) - (6)].id),
3377 "get_line", (yyvsp[(1) - (6)].line),
3379 "set_line", (yyvsp[(1) - (6)].line),
3380 "line_no", (yyvsp[(1) - (6)].line),
3383 if ((yyvsp[(5) - (6)].id) != NULL) {
3384 Argument *arg = (Argument *)node;
3385 export_accessors (arg->name,
3386 arg->get != NULL, arg->get_line,
3387 arg->set != NULL, arg->set_line,
3391 g_free ((yyvsp[(5) - (6)].id));
3394 class_nodes = g_list_append (class_nodes, node);
3400 /* Line 1806 of yacc.c */
3401 #line 1234 "parse.y"
3403 if (strcmp ((yyvsp[(2) - (3)].id), "export")!=0) {
3404 g_free ((yyvsp[(2) - (3)].id));
3405 yyerror (_("parse error"));
3408 (yyval.id) = (yyvsp[(2) - (3)].id);
3414 /* Line 1806 of yacc.c */
3415 #line 1242 "parse.y"
3423 /* Line 1806 of yacc.c */
3424 #line 1247 "parse.y"
3427 node_set ((Node *)property,
3428 "line_no", (yyvsp[(1) - (11)].line),
3429 "gtktype:steal", debool ((yyvsp[(2) - (11)].id)),
3430 "name:steal", (yyvsp[(3) - (11)].id),
3432 if (strcmp ((yyvsp[(5) - (11)].id), "get") == 0 &&
3433 strcmp ((yyvsp[(8) - (11)].id), "set") == 0) {
3434 node_set ((Node *)property,
3435 "get:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3436 "get_line", (yyvsp[(6) - (11)].line),
3437 "set:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3438 "set_line", (yyvsp[(9) - (11)].line),
3440 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3441 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3442 g_free ((yyvsp[(5) - (11)].id));
3443 g_free ((yyvsp[(8) - (11)].id));
3444 } else if (strcmp ((yyvsp[(5) - (11)].id), "set") == 0 &&
3445 strcmp ((yyvsp[(8) - (11)].id), "get") == 0) {
3446 node_set ((Node *)property,
3447 "get:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3448 "get_line", (yyvsp[(9) - (11)].line),
3449 "set:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3450 "set_line", (yyvsp[(6) - (11)].line),
3452 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3453 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3454 g_free ((yyvsp[(5) - (11)].id));
3455 g_free ((yyvsp[(8) - (11)].id));
3457 g_string_free ((yyvsp[(7) - (11)].cbuf), TRUE);
3458 g_string_free ((yyvsp[(10) - (11)].cbuf), TRUE);
3459 g_free ((yyvsp[(5) - (11)].id));
3460 g_free ((yyvsp[(8) - (11)].id));
3461 node_free ((Node *)property);
3463 yyerror (_("parse error"));
3466 property_link_and_export ((Node *)property);
3467 if (property != NULL) {
3468 class_nodes = g_list_append (class_nodes,
3477 /* Line 1806 of yacc.c */
3478 #line 1295 "parse.y"
3481 node_set ((Node *)property,
3482 "line_no", (yyvsp[(1) - (8)].line),
3483 "gtktype:steal", debool ((yyvsp[(2) - (8)].id)),
3484 "name:steal", (yyvsp[(3) - (8)].id),
3486 if (strcmp ((yyvsp[(5) - (8)].id), "get") == 0) {
3487 node_set ((Node *)property,
3488 "get:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3489 "get_line", (yyvsp[(6) - (8)].line),
3491 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3492 g_free ((yyvsp[(5) - (8)].id));
3493 } else if (strcmp ((yyvsp[(5) - (8)].id), "set") == 0) {
3494 node_set ((Node *)property,
3495 "set:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3496 "set_line", (yyvsp[(6) - (8)].line),
3498 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3499 g_free ((yyvsp[(5) - (8)].id));
3501 g_string_free ((yyvsp[(7) - (8)].cbuf), TRUE);
3502 g_free ((yyvsp[(5) - (8)].id));
3503 node_free ((Node *)property);
3505 yyerror (_("parse error"));
3508 property_link_and_export ((Node *)property);
3509 if (property != NULL) {
3510 class_nodes = g_list_append (class_nodes,
3519 /* Line 1806 of yacc.c */
3520 #line 1331 "parse.y"
3523 node_set ((Node *)property,
3524 "line_no", (yyvsp[(1) - (5)].line),
3525 "gtktype:steal", debool ((yyvsp[(2) - (5)].id)),
3526 "name:steal", (yyvsp[(3) - (5)].id),
3528 property_link_and_export ((Node *)property);
3529 if (property != NULL) {
3530 class_nodes = g_list_append (class_nodes,
3539 /* Line 1806 of yacc.c */
3540 #line 1347 "parse.y"
3546 /* Line 1806 of yacc.c */
3547 #line 1348 "parse.y"
3553 /* Line 1806 of yacc.c */
3554 #line 1351 "parse.y"
3560 /* Line 1806 of yacc.c */
3561 #line 1352 "parse.y"
3567 /* Line 1806 of yacc.c */
3568 #line 1355 "parse.y"
3569 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3574 /* Line 1806 of yacc.c */
3575 #line 1356 "parse.y"
3577 if (strcmp ((yyvsp[(1) - (4)].id), "_") != 0) {
3578 g_free ((yyvsp[(1) - (4)].id));
3579 yyerror(_("parse error"));
3582 g_free ((yyvsp[(1) - (4)].id));
3583 (yyval.id) = g_strconcat ("_(", (yyvsp[(3) - (4)].id), ")", NULL);
3584 g_free ((yyvsp[(3) - (4)].id));
3590 /* Line 1806 of yacc.c */
3591 #line 1368 "parse.y"
3592 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3597 /* Line 1806 of yacc.c */
3598 #line 1369 "parse.y"
3599 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3604 /* Line 1806 of yacc.c */
3605 #line 1372 "parse.y"
3608 node_set ((Node *)property,
3609 "nick:steal", (yyvsp[(3) - (3)].id),
3616 /* Line 1806 of yacc.c */
3617 #line 1378 "parse.y"
3620 node_set ((Node *)property,
3621 "blurb:steal", (yyvsp[(3) - (3)].id),
3628 /* Line 1806 of yacc.c */
3629 #line 1384 "parse.y"
3632 node_set ((Node *)property,
3633 "maximum:steal", (yyvsp[(3) - (3)].id),
3640 /* Line 1806 of yacc.c */
3641 #line 1390 "parse.y"
3644 node_set ((Node *)property,
3645 "minimum:steal", (yyvsp[(3) - (3)].id),
3652 /* Line 1806 of yacc.c */
3653 #line 1396 "parse.y"
3656 node_set ((Node *)property,
3657 "default_value:steal", (yyvsp[(3) - (3)].id),
3664 /* Line 1806 of yacc.c */
3665 #line 1402 "parse.y"
3668 node_set ((Node *)property,
3669 "flags:steal", (yyvsp[(3) - (3)].list),
3676 /* Line 1806 of yacc.c */
3677 #line 1408 "parse.y"
3679 Type *type = pop_type ();
3681 node_set ((Node *)property,
3682 "ptype:steal", type,
3689 /* Line 1806 of yacc.c */
3690 #line 1415 "parse.y"
3693 node_set ((Node *)property,
3694 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3701 /* Line 1806 of yacc.c */
3702 #line 1421 "parse.y"
3705 node_set ((Node *)property,
3706 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3713 /* Line 1806 of yacc.c */
3714 #line 1427 "parse.y"
3717 node_set ((Node *)property,
3718 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3725 /* Line 1806 of yacc.c */
3726 #line 1433 "parse.y"
3729 node_set ((Node *)property,
3730 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3737 /* Line 1806 of yacc.c */
3738 #line 1439 "parse.y"
3741 node_set ((Node *)property,
3742 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3749 /* Line 1806 of yacc.c */
3750 #line 1445 "parse.y"
3753 node_set ((Node *)property,
3754 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3761 /* Line 1806 of yacc.c */
3762 #line 1451 "parse.y"
3765 node_set ((Node *)property,
3766 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3773 /* Line 1806 of yacc.c */
3774 #line 1457 "parse.y"
3777 node_set ((Node *)property,
3778 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3785 /* Line 1806 of yacc.c */
3786 #line 1463 "parse.y"
3789 node_set ((Node *)property,
3790 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3797 /* Line 1806 of yacc.c */
3798 #line 1469 "parse.y"
3801 node_set ((Node *)property,
3802 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3809 /* Line 1806 of yacc.c */
3810 #line 1475 "parse.y"
3813 if (strcmp ((yyvsp[(1) - (1)].id), "override") == 0) {
3814 g_free((yyvsp[(1) - (1)].id));
3815 node_set ((Node *)property,
3818 } else if (strcmp ((yyvsp[(1) - (1)].id), "link") == 0) {
3819 g_free((yyvsp[(1) - (1)].id));
3820 node_set ((Node *)property,
3823 } else if (strcmp ((yyvsp[(1) - (1)].id), "export") == 0) {
3824 g_free((yyvsp[(1) - (1)].id));
3825 node_set ((Node *)property,
3829 g_free((yyvsp[(1) - (1)].id));
3830 yyerror(_("parse error"));
3838 /* Line 1806 of yacc.c */
3839 #line 1500 "parse.y"
3841 if(strcmp((yyvsp[(3) - (5)].id),"type")!=0) {
3842 g_free((yyvsp[(1) - (5)].id));
3843 g_free((yyvsp[(3) - (5)].id));
3844 yyerror(_("parse error"));
3847 (yyval.id) = debool ((yyvsp[(1) - (5)].id));
3853 /* Line 1806 of yacc.c */
3854 #line 1509 "parse.y"
3856 (yyval.id) = debool ((yyvsp[(1) - (1)].id));
3857 typestack = g_list_prepend(typestack,NULL);
3863 /* Line 1806 of yacc.c */
3864 #line 1515 "parse.y"
3865 { (yyval.list) = (yyvsp[(2) - (3)].list); }
3870 /* Line 1806 of yacc.c */
3871 #line 1516 "parse.y"
3872 { (yyval.list) = NULL; }
3877 /* Line 1806 of yacc.c */
3878 #line 1519 "parse.y"
3880 (yyval.list) = g_list_append((yyvsp[(3) - (3)].list),(yyvsp[(1) - (3)].id));
3886 /* Line 1806 of yacc.c */
3887 #line 1522 "parse.y"
3889 (yyval.list) = g_list_append(NULL,(yyvsp[(1) - (1)].id));
3895 /* Line 1806 of yacc.c */
3896 #line 1528 "parse.y"
3898 Node *node = node_new (TYPE_NODE,
3899 "name:steal", (yyvsp[(1) - (2)].id),
3900 "pointer:steal", (yyvsp[(2) - (2)].id),
3902 typestack = g_list_prepend(typestack,node);
3908 /* Line 1806 of yacc.c */
3909 #line 1535 "parse.y"
3911 Node *node = node_new (TYPE_NODE,
3912 "name:steal", (yyvsp[(1) - (1)].id),
3914 typestack = g_list_prepend(typestack,node);
3920 /* Line 1806 of yacc.c */
3921 #line 1544 "parse.y"
3923 (yyval.id) = (yyvsp[(1) - (1)].id);
3929 /* Line 1806 of yacc.c */
3930 #line 1547 "parse.y"
3932 (yyval.id) = (yyvsp[(1) - (1)].id);
3938 /* Line 1806 of yacc.c */
3939 #line 1550 "parse.y"
3941 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3942 g_free((yyvsp[(2) - (2)].id));
3948 /* Line 1806 of yacc.c */
3949 #line 1554 "parse.y"
3951 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3952 g_free((yyvsp[(1) - (2)].id));
3958 /* Line 1806 of yacc.c */
3959 #line 1558 "parse.y"
3961 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3962 g_free((yyvsp[(2) - (2)].id));
3968 /* Line 1806 of yacc.c */
3969 #line 1562 "parse.y"
3971 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (3)].id), " ",
3972 (yyvsp[(3) - (3)].id), NULL);
3973 g_free((yyvsp[(3) - (3)].id));
3979 /* Line 1806 of yacc.c */
3980 #line 1567 "parse.y"
3982 (yyval.id) = g_strconcat((yyvsp[(1) - (3)].id), " ",
3983 (yyvsp[(2) - (3)].id), " const", NULL);
3984 g_free((yyvsp[(2) - (3)].id));
3990 /* Line 1806 of yacc.c */
3991 #line 1575 "parse.y"
3993 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3994 g_free((yyvsp[(2) - (2)].id));
4000 /* Line 1806 of yacc.c */
4001 #line 1579 "parse.y"
4003 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
4004 g_free((yyvsp[(1) - (2)].id));
4005 g_free((yyvsp[(2) - (2)].id));
4011 /* Line 1806 of yacc.c */
4012 #line 1584 "parse.y"
4014 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
4015 g_free((yyvsp[(2) - (2)].id));
4021 /* Line 1806 of yacc.c */
4022 #line 1588 "parse.y"
4024 (yyval.id) = (yyvsp[(1) - (1)].id);
4030 /* Line 1806 of yacc.c */
4031 #line 1591 "parse.y"
4033 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
4034 g_free((yyvsp[(1) - (2)].id));
4040 /* Line 1806 of yacc.c */
4041 #line 1595 "parse.y"
4043 (yyval.id) = g_strdup((yyvsp[(1) - (1)].id));
4049 /* Line 1806 of yacc.c */
4050 #line 1598 "parse.y"
4052 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
4058 /* Line 1806 of yacc.c */
4059 #line 1603 "parse.y"
4060 { (yyval.id) = "void"; }
4065 /* Line 1806 of yacc.c */
4066 #line 1604 "parse.y"
4067 { (yyval.id) = "char"; }
4072 /* Line 1806 of yacc.c */
4073 #line 1605 "parse.y"
4074 { (yyval.id) = "short"; }
4079 /* Line 1806 of yacc.c */
4080 #line 1606 "parse.y"
4081 { (yyval.id) = "int"; }
4086 /* Line 1806 of yacc.c */
4087 #line 1607 "parse.y"
4088 { (yyval.id) = "long"; }
4093 /* Line 1806 of yacc.c */
4094 #line 1608 "parse.y"
4095 { (yyval.id) = "float"; }
4100 /* Line 1806 of yacc.c */
4101 #line 1609 "parse.y"
4102 { (yyval.id) = "double"; }
4107 /* Line 1806 of yacc.c */
4108 #line 1610 "parse.y"
4109 { (yyval.id) = "signed"; }
4114 /* Line 1806 of yacc.c */
4115 #line 1611 "parse.y"
4116 { (yyval.id) = "unsigned"; }
4121 /* Line 1806 of yacc.c */
4122 #line 1614 "parse.y"
4123 { (yyval.id) = "struct"; }
4128 /* Line 1806 of yacc.c */
4129 #line 1615 "parse.y"
4130 { (yyval.id) = "union"; }
4135 /* Line 1806 of yacc.c */
4136 #line 1616 "parse.y"
4137 { (yyval.id) = "enum"; }
4142 /* Line 1806 of yacc.c */
4143 #line 1619 "parse.y"
4144 { (yyval.id) = g_strdup("*"); }
4149 /* Line 1806 of yacc.c */
4150 #line 1620 "parse.y"
4151 { (yyval.id) = g_strdup("* const"); }
4156 /* Line 1806 of yacc.c */
4157 #line 1621 "parse.y"
4159 (yyval.id) = g_strconcat("*", (yyvsp[(2) - (2)].id), NULL);
4160 g_free((yyvsp[(2) - (2)].id));
4166 /* Line 1806 of yacc.c */
4167 #line 1625 "parse.y"
4169 (yyval.id) = g_strconcat("* const", (yyvsp[(3) - (3)].id), NULL);
4170 g_free((yyvsp[(3) - (3)].id));
4176 /* Line 1806 of yacc.c */
4177 #line 1632 "parse.y"
4179 if(strcmp((yyvsp[(1) - (2)].id), "first")==0)
4180 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4181 else if(strcmp((yyvsp[(1) - (2)].id), "last")==0)
4182 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4184 yyerror(_("signal must be 'first' or 'last'"));
4185 g_free((yyvsp[(1) - (2)].id));
4188 g_free((yyvsp[(1) - (2)].id));
4194 /* Line 1806 of yacc.c */
4195 #line 1644 "parse.y"
4197 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4203 /* Line 1806 of yacc.c */
4204 #line 1650 "parse.y"
4206 if(strcmp((yyvsp[(2) - (3)].id),"first")==0)
4207 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4208 else if(strcmp((yyvsp[(2) - (3)].id),"last")==0)
4209 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4211 yyerror(_("signal must be 'first' or 'last'"));
4212 g_free((yyvsp[(2) - (3)].id));
4215 g_free((yyvsp[(2) - (3)].id));
4221 /* Line 1806 of yacc.c */
4222 #line 1662 "parse.y"
4224 if(strcmp((yyvsp[(1) - (3)].id),"first")==0)
4225 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4226 else if(strcmp((yyvsp[(1) - (3)].id),"last")==0)
4227 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4229 yyerror(_("signal must be 'first' or 'last'"));
4230 g_free((yyvsp[(1) - (3)].id));
4233 g_free((yyvsp[(1) - (3)].id));
4239 /* Line 1806 of yacc.c */
4240 #line 1674 "parse.y"
4242 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4248 /* Line 1806 of yacc.c */
4249 #line 1677 "parse.y"
4251 /* the_scope was default thus public */
4252 the_scope = PUBLIC_SCOPE;
4258 /* Line 1806 of yacc.c */
4259 #line 1683 "parse.y"
4261 gtktypes = g_list_prepend(gtktypes, debool ((yyvsp[(1) - (4)].id)));
4267 /* Line 1806 of yacc.c */
4268 #line 1688 "parse.y"
4270 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(3) - (3)].id)));
4276 /* Line 1806 of yacc.c */
4277 #line 1691 "parse.y"
4279 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(1) - (1)].id)));
4285 /* Line 1806 of yacc.c */
4286 #line 1696 "parse.y"
4287 { (yyval.cbuf) = (yyvsp[(2) - (2)].cbuf); }
4292 /* Line 1806 of yacc.c */
4293 #line 1697 "parse.y"
4294 { (yyval.cbuf) = NULL; }
4299 /* Line 1806 of yacc.c */
4300 #line 1701 "parse.y"
4303 yyerror(_("signal without 'self' as "
4304 "first parameter"));
4305 free_all_global_state();
4308 if(the_scope == CLASS_SCOPE) {
4309 yyerror(_("a method cannot be of class scope"));
4310 free_all_global_state();
4313 if (funcattrs != NULL) {
4314 char *error = g_strdup_printf
4315 (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4320 push_function(the_scope, (yyvsp[(3) - (10)].sigtype),NULL,
4321 (yyvsp[(5) - (10)].id), (yyvsp[(10) - (10)].cbuf),(yyvsp[(1) - (10)].line),
4322 ccode_line, vararg, (yyvsp[(2) - (10)].list));
4328 /* Line 1806 of yacc.c */
4329 #line 1724 "parse.y"
4332 yyerror(_("signal without 'self' as "
4333 "first parameter"));
4334 free_all_global_state();
4337 if(the_scope == CLASS_SCOPE) {
4338 yyerror(_("a method cannot be of class scope"));
4339 free_all_global_state();
4342 if (funcattrs != NULL) {
4343 char *error = g_strdup_printf
4344 (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4349 push_function(the_scope, (yyvsp[(4) - (11)].sigtype), NULL,
4350 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf), (yyvsp[(2) - (11)].line),
4351 ccode_line, vararg, (yyvsp[(3) - (11)].list));
4357 /* Line 1806 of yacc.c */
4358 #line 1747 "parse.y"
4361 yyerror(_("virtual method without 'self' as "
4362 "first parameter"));
4363 free_all_global_state();
4366 if(the_scope == CLASS_SCOPE) {
4367 yyerror(_("a method cannot be of class scope"));
4368 free_all_global_state();
4371 if (funcattrs != NULL) {
4372 char *error = g_strdup_printf
4373 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4378 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4379 (yyvsp[(9) - (9)].cbuf), (yyvsp[(1) - (9)].line),
4380 ccode_line, vararg, NULL);
4386 /* Line 1806 of yacc.c */
4387 #line 1770 "parse.y"
4390 yyerror(_("virtual method without 'self' as "
4391 "first parameter"));
4392 free_all_global_state();
4395 if(the_scope == CLASS_SCOPE) {
4396 yyerror(_("a method cannot be of class scope"));
4397 free_all_global_state();
4400 if (funcattrs != NULL) {
4401 char *error = g_strdup_printf
4402 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4407 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4408 (yyvsp[(9) - (9)].cbuf), (yyvsp[(2) - (9)].line),
4409 ccode_line, vararg, NULL);
4415 /* Line 1806 of yacc.c */
4416 #line 1793 "parse.y"
4419 yyerror(_("virtual method without 'szelf' as "
4420 "first parameter"));
4421 free_all_global_state();
4424 if (funcattrs != NULL) {
4425 char *error = g_strdup_printf
4426 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4431 push_function(PUBLIC_SCOPE, VIRTUAL_METHOD, NULL,
4432 (yyvsp[(3) - (8)].id), (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line),
4433 ccode_line, vararg, NULL);
4439 /* Line 1806 of yacc.c */
4440 #line 1811 "parse.y"
4442 if (funcattrs != NULL) {
4443 char *error = g_strdup_printf
4444 (_("function attribute macros ('%s' in this case) may not be used with override methods"),
4449 push_function(NO_SCOPE, OVERRIDE_METHOD, (yyvsp[(3) - (11)].id),
4450 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf),
4451 (yyvsp[(1) - (11)].line), ccode_line,
4458 /* Line 1806 of yacc.c */
4459 #line 1824 "parse.y"
4461 if(the_scope == CLASS_SCOPE) {
4462 yyerror(_("a method cannot be of class scope"));
4463 free_all_global_state();
4466 push_function(the_scope, REGULAR_METHOD, NULL, (yyvsp[(3) - (8)].id),
4467 (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line), ccode_line,
4474 /* Line 1806 of yacc.c */
4475 #line 1834 "parse.y"
4477 if(strcmp((yyvsp[(1) - (5)].id), "init")==0) {
4478 push_init_arg((yyvsp[(3) - (5)].id),FALSE);
4479 push_function(NO_SCOPE, INIT_METHOD, NULL,
4480 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4481 ccode_line, FALSE, NULL);
4482 } else if(strcmp((yyvsp[(1) - (5)].id), "class_init")==0) {
4483 push_init_arg((yyvsp[(3) - (5)].id),TRUE);
4484 push_function(NO_SCOPE, CLASS_INIT_METHOD, NULL,
4485 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4486 ccode_line, FALSE, NULL);
4487 } else if(strcmp((yyvsp[(1) - (5)].id), "constructor")==0) {
4488 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4489 push_function(NO_SCOPE, CONSTRUCTOR_METHOD, NULL,
4490 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4491 ccode_line, FALSE, NULL);
4492 } else if(strcmp((yyvsp[(1) - (5)].id), "dispose")==0) {
4493 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4494 push_function(NO_SCOPE, DISPOSE_METHOD, NULL,
4495 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4496 ccode_line, FALSE, NULL);
4497 } else if(strcmp((yyvsp[(1) - (5)].id), "finalize")==0) {
4498 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4499 push_function(NO_SCOPE, FINALIZE_METHOD, NULL,
4500 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4501 ccode_line, FALSE, NULL);
4504 g_free((yyvsp[(1) - (5)].id));
4505 g_free((yyvsp[(3) - (5)].id));
4506 g_string_free((yyvsp[(5) - (5)].cbuf),TRUE);
4507 yyerror(_("parse error "
4508 "(untyped blocks must be init, "
4509 "class_init, constructor, dispose "
4518 /* Line 1806 of yacc.c */
4519 #line 1874 "parse.y"
4521 g_free(funcattrs); funcattrs = NULL;
4522 g_free(onerror); onerror = NULL;
4523 g_free(defreturn); defreturn = NULL;
4524 if(!set_attr_value((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id))) {
4525 g_free((yyvsp[(1) - (2)].id));
4526 g_free((yyvsp[(2) - (2)].id));
4527 yyerror(_("parse error"));
4530 g_free((yyvsp[(1) - (2)].id));
4536 /* Line 1806 of yacc.c */
4537 #line 1886 "parse.y"
4539 g_free(funcattrs); funcattrs = NULL;
4540 g_free(onerror); onerror = NULL;
4541 g_free(defreturn); defreturn = NULL;
4542 if(!set_attr_value((yyvsp[(1) - (4)].id), (yyvsp[(2) - (4)].id))) {
4543 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4544 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4545 yyerror(_("parse error"));
4548 if(!set_attr_value((yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id))) {
4549 funcattrs = onerror = defreturn = NULL;
4550 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4551 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4552 yyerror(_("parse error"));
4555 g_free((yyvsp[(1) - (4)].id));
4556 g_free((yyvsp[(3) - (4)].id));
4562 /* Line 1806 of yacc.c */
4563 #line 1906 "parse.y"
4565 g_free(funcattrs); funcattrs = NULL;
4566 g_free(onerror); onerror = NULL;
4567 g_free(defreturn); defreturn = NULL;
4568 if(!set_attr_value((yyvsp[(1) - (6)].id), (yyvsp[(2) - (6)].id))) {
4569 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4570 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4571 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4572 yyerror(_("parse error"));
4575 if(!set_attr_value((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id))) {
4576 funcattrs = onerror = defreturn = NULL;
4577 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4578 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4579 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4580 yyerror(_("parse error"));
4583 if(!set_attr_value((yyvsp[(5) - (6)].id), (yyvsp[(6) - (6)].id))) {
4584 funcattrs = onerror = defreturn = NULL;
4585 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4586 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4587 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4588 yyerror(_("parse error"));
4591 g_free((yyvsp[(1) - (6)].id));
4592 g_free((yyvsp[(3) - (6)].id));
4593 g_free((yyvsp[(5) - (6)].id));
4599 /* Line 1806 of yacc.c */
4600 #line 1937 "parse.y"
4602 g_free(funcattrs); funcattrs = NULL;
4603 g_free(onerror); onerror = NULL;
4604 g_free(defreturn); defreturn = NULL;
4610 /* Line 1806 of yacc.c */
4611 #line 1944 "parse.y"
4612 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4617 /* Line 1806 of yacc.c */
4618 #line 1945 "parse.y"
4620 (yyval.id) = ((yyvsp[(2) - (2)].cbuf))->str;
4621 g_string_free((yyvsp[(2) - (2)].cbuf), FALSE);
4627 /* Line 1806 of yacc.c */
4628 #line 1951 "parse.y"
4629 { vararg = FALSE; has_self = FALSE; }
4634 /* Line 1806 of yacc.c */
4635 #line 1952 "parse.y"
4639 if(strcmp((yyvsp[(1) - (1)].id),"self")==0)
4640 push_self((yyvsp[(1) - (1)].id), FALSE);
4642 g_free((yyvsp[(1) - (1)].id));
4643 yyerror(_("parse error"));
4651 /* Line 1806 of yacc.c */
4652 #line 1963 "parse.y"
4656 if(strcmp((yyvsp[(1) - (2)].id),"self")==0)
4657 push_self((yyvsp[(1) - (2)].id), TRUE);
4659 g_free((yyvsp[(1) - (2)].id));
4660 yyerror(_("parse error"));
4668 /* Line 1806 of yacc.c */
4669 #line 1974 "parse.y"
4673 if(strcmp((yyvsp[(2) - (2)].id),"self")==0)
4674 push_self((yyvsp[(2) - (2)].id), TRUE);
4676 g_free((yyvsp[(2) - (2)].id));
4677 yyerror(_("parse error"));
4685 /* Line 1806 of yacc.c */
4686 #line 1985 "parse.y"
4689 if(strcmp((yyvsp[(1) - (3)].id),"self")==0)
4690 push_self((yyvsp[(1) - (3)].id), FALSE);
4692 g_free((yyvsp[(1) - (3)].id));
4693 yyerror(_("parse error"));
4701 /* Line 1806 of yacc.c */
4702 #line 1995 "parse.y"
4705 if(strcmp((yyvsp[(1) - (4)].id),"self")==0)
4706 push_self((yyvsp[(1) - (4)].id), TRUE);
4708 g_free((yyvsp[(1) - (4)].id));
4709 yyerror(_("parse error"));
4717 /* Line 1806 of yacc.c */
4718 #line 2005 "parse.y"
4721 if(strcmp((yyvsp[(2) - (4)].id),"self")==0)
4722 push_self((yyvsp[(2) - (4)].id), TRUE);
4724 g_free((yyvsp[(2) - (4)].id));
4725 yyerror(_("parse error"));
4733 /* Line 1806 of yacc.c */
4734 #line 2015 "parse.y"
4735 { has_self = FALSE; }
4740 /* Line 1806 of yacc.c */
4741 #line 2018 "parse.y"
4747 /* Line 1806 of yacc.c */
4748 #line 2019 "parse.y"
4754 /* Line 1806 of yacc.c */
4755 #line 2022 "parse.y"
4761 /* Line 1806 of yacc.c */
4762 #line 2023 "parse.y"
4768 /* Line 1806 of yacc.c */
4769 #line 2026 "parse.y"
4771 push_funcarg((yyvsp[(2) - (2)].id),NULL);
4777 /* Line 1806 of yacc.c */
4778 #line 2029 "parse.y"
4780 push_funcarg((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].id));
4786 /* Line 1806 of yacc.c */
4787 #line 2032 "parse.y"
4789 if(strcmp((yyvsp[(4) - (6)].id),"check")!=0) {
4790 yyerror(_("parse error"));
4793 g_free((yyvsp[(4) - (6)].id));
4794 push_funcarg((yyvsp[(2) - (6)].id),NULL);
4800 /* Line 1806 of yacc.c */
4801 #line 2040 "parse.y"
4803 if(strcmp((yyvsp[(5) - (7)].id),"check")!=0) {
4804 yyerror(_("parse error"));
4807 g_free((yyvsp[(5) - (7)].id));
4808 push_funcarg((yyvsp[(2) - (7)].id),(yyvsp[(3) - (7)].id));
4814 /* Line 1806 of yacc.c */
4815 #line 2050 "parse.y"
4821 /* Line 1806 of yacc.c */
4822 #line 2051 "parse.y"
4828 /* Line 1806 of yacc.c */
4829 #line 2054 "parse.y"
4831 if(strcmp((yyvsp[(1) - (1)].id),"type")==0) {
4832 Node *node = node_new (CHECK_NODE,
4833 "chtype", TYPE_CHECK,
4835 checks = g_list_append(checks,node);
4836 } else if(strcmp((yyvsp[(1) - (1)].id),"null")==0) {
4837 Node *node = node_new (CHECK_NODE,
4838 "chtype", NULL_CHECK,
4840 checks = g_list_append(checks,node);
4842 yyerror(_("parse error"));
4845 g_free((yyvsp[(1) - (1)].id));
4851 /* Line 1806 of yacc.c */
4852 #line 2071 "parse.y"
4854 Node *node = node_new (CHECK_NODE,
4856 "number:steal", (yyvsp[(2) - (2)].id),
4858 checks = g_list_append(checks,node);
4864 /* Line 1806 of yacc.c */
4865 #line 2078 "parse.y"
4867 Node *node = node_new (CHECK_NODE,
4869 "number:steal", (yyvsp[(2) - (2)].id),
4871 checks = g_list_append(checks,node);
4877 /* Line 1806 of yacc.c */
4878 #line 2085 "parse.y"
4880 Node *node = node_new (CHECK_NODE,
4882 "number:steal", (yyvsp[(3) - (3)].id),
4884 checks = g_list_append(checks,node);
4890 /* Line 1806 of yacc.c */
4891 #line 2092 "parse.y"
4893 Node *node = node_new (CHECK_NODE,
4895 "number:steal", (yyvsp[(3) - (3)].id),
4897 checks = g_list_append(checks,node);
4903 /* Line 1806 of yacc.c */
4904 #line 2099 "parse.y"
4906 Node *node = node_new (CHECK_NODE,
4908 "number:steal", (yyvsp[(3) - (3)].id),
4910 checks = g_list_append(checks,node);
4916 /* Line 1806 of yacc.c */
4917 #line 2106 "parse.y"
4919 Node *node = node_new (CHECK_NODE,
4921 "number:steal", (yyvsp[(3) - (3)].id),
4923 checks = g_list_append(checks,node);
4929 /* Line 1806 of yacc.c */
4930 #line 2115 "parse.y"
4932 Node *node = node_new (ENUMDEF_NODE,
4933 "etype:steal", (yyvsp[(6) - (7)].id),
4934 "prefix:steal", (yyvsp[(2) - (7)].id),
4935 "values:steal", enum_vals,
4938 nodes = g_list_append (nodes, node);
4944 /* Line 1806 of yacc.c */
4945 #line 2124 "parse.y"
4947 Node *node = node_new (ENUMDEF_NODE,
4948 "etype:steal", (yyvsp[(7) - (8)].id),
4949 "prefix:steal", (yyvsp[(2) - (8)].id),
4950 "values:steal", enum_vals,
4953 nodes = g_list_append (nodes, node);
4959 /* Line 1806 of yacc.c */
4960 #line 2135 "parse.y"
4966 /* Line 1806 of yacc.c */
4967 #line 2136 "parse.y"
4973 /* Line 1806 of yacc.c */
4974 #line 2139 "parse.y"
4977 char *num = (yyvsp[(3) - (3)].id);
4979 /* A float value, that's a bad enum */
4980 if (num[0] >= '0' &&
4982 strchr (num, '.') != NULL) {
4983 g_free ((yyvsp[(1) - (3)].id));
4985 yyerror(_("parse error (enumerator value not integer constant)"));
4989 node = node_new (ENUMVALUE_NODE,
4990 "name:steal", (yyvsp[(1) - (3)].id),
4993 enum_vals = g_list_append (enum_vals, node);
4999 /* Line 1806 of yacc.c */
5000 #line 2159 "parse.y"
5004 node = node_new (ENUMVALUE_NODE,
5005 "name:steal", (yyvsp[(1) - (1)].id),
5007 enum_vals = g_list_append (enum_vals, node);
5013 /* Line 1806 of yacc.c */
5014 #line 2169 "parse.y"
5016 Node *node = node_new (FLAGS_NODE,
5017 "ftype:steal", (yyvsp[(6) - (7)].id),
5018 "prefix:steal", (yyvsp[(2) - (7)].id),
5019 "values:steal", flag_vals,
5022 nodes = g_list_append (nodes, node);
5028 /* Line 1806 of yacc.c */
5029 #line 2178 "parse.y"
5031 Node *node = node_new (FLAGS_NODE,
5032 "ftype:steal", (yyvsp[(7) - (8)].id),
5033 "prefix:steal", (yyvsp[(2) - (8)].id),
5034 "values:steal", flag_vals,
5037 nodes = g_list_append (nodes, node);
5043 /* Line 1806 of yacc.c */
5044 #line 2189 "parse.y"
5046 flag_vals = g_list_append (flag_vals, (yyvsp[(3) - (3)].id));
5052 /* Line 1806 of yacc.c */
5053 #line 2192 "parse.y"
5055 flag_vals = g_list_append (flag_vals, (yyvsp[(1) - (1)].id));
5061 /* Line 1806 of yacc.c */
5062 #line 2197 "parse.y"
5064 Node *node = node_new (ERROR_NODE,
5065 "etype:steal", (yyvsp[(6) - (7)].id),
5066 "prefix:steal", (yyvsp[(2) - (7)].id),
5067 "values:steal", error_vals,
5070 nodes = g_list_append (nodes, node);
5076 /* Line 1806 of yacc.c */
5077 #line 2206 "parse.y"
5079 Node *node = node_new (ERROR_NODE,
5080 "etype:steal", (yyvsp[(7) - (8)].id),
5081 "prefix:steal", (yyvsp[(2) - (8)].id),
5082 "values:steal", error_vals,
5085 nodes = g_list_append (nodes, node);
5091 /* Line 1806 of yacc.c */
5092 #line 2217 "parse.y"
5094 error_vals = g_list_append (error_vals, (yyvsp[(3) - (3)].id));
5100 /* Line 1806 of yacc.c */
5101 #line 2220 "parse.y"
5103 error_vals = g_list_append (error_vals, (yyvsp[(1) - (1)].id));
5109 /* Line 1806 of yacc.c */
5110 #line 2226 "parse.y"
5111 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5116 /* Line 1806 of yacc.c */
5117 #line 2227 "parse.y"
5119 (yyval.id) = g_strconcat("-",(yyvsp[(2) - (2)].id),NULL);
5120 g_free((yyvsp[(2) - (2)].id));
5126 /* Line 1806 of yacc.c */
5127 #line 2231 "parse.y"
5128 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5133 /* Line 1806 of yacc.c */
5134 #line 2232 "parse.y"
5135 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5140 /* Line 1806 of yacc.c */
5141 #line 5142 "parse.c"
5144 /* User semantic actions sometimes alter yychar, and that requires
5145 that yytoken be updated with the new translation. We take the
5146 approach of translating immediately before every use of yytoken.
5147 One alternative is translating here after every semantic action,
5148 but that translation would be missed if the semantic action invokes
5149 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
5150 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
5151 incorrect destructor might then be invoked immediately. In the
5152 case of YYERROR or YYBACKUP, subsequent parser actions might lead
5153 to an incorrect destructor call or verbose syntax error message
5154 before the lookahead is translated. */
5155 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5159 YY_STACK_PRINT (yyss, yyssp);
5163 /* Now `shift' the result of the reduction. Determine what state
5164 that goes to, based on the state we popped back to and the rule
5165 number reduced by. */
5169 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5170 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5171 yystate = yytable[yystate];
5173 yystate = yydefgoto[yyn - YYNTOKENS];
5178 /*------------------------------------.
5179 | yyerrlab -- here on detecting error |
5180 `------------------------------------*/
5182 /* Make sure we have latest lookahead translation. See comments at
5183 user semantic actions for why this is necessary. */
5184 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5186 /* If not already recovering from an error, report this error. */
5190 #if ! YYERROR_VERBOSE
5191 yyerror (YY_("syntax error"));
5193 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5196 char const *yymsgp = YY_("syntax error");
5197 int yysyntax_error_status;
5198 yysyntax_error_status = YYSYNTAX_ERROR;
5199 if (yysyntax_error_status == 0)
5201 else if (yysyntax_error_status == 1)
5203 if (yymsg != yymsgbuf)
5204 YYSTACK_FREE (yymsg);
5205 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5209 yymsg_alloc = sizeof yymsgbuf;
5210 yysyntax_error_status = 2;
5214 yysyntax_error_status = YYSYNTAX_ERROR;
5219 if (yysyntax_error_status == 2)
5220 goto yyexhaustedlab;
5222 # undef YYSYNTAX_ERROR
5228 if (yyerrstatus == 3)
5230 /* If just tried and failed to reuse lookahead token after an
5231 error, discard it. */
5233 if (yychar <= YYEOF)
5235 /* Return failure if at end of input. */
5236 if (yychar == YYEOF)
5241 yydestruct ("Error: discarding",
5247 /* Else will try to reuse lookahead token after shifting the error
5252 /*---------------------------------------------------.
5253 | yyerrorlab -- error raised explicitly by YYERROR. |
5254 `---------------------------------------------------*/
5257 /* Pacify compilers like GCC when the user code never invokes
5258 YYERROR and the label yyerrorlab therefore never appears in user
5260 if (/*CONSTCOND*/ 0)
5263 /* Do not reclaim the symbols of the rule which action triggered
5267 YY_STACK_PRINT (yyss, yyssp);
5272 /*-------------------------------------------------------------.
5273 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5274 `-------------------------------------------------------------*/
5276 yyerrstatus = 3; /* Each real token shifted decrements this. */
5280 yyn = yypact[yystate];
5281 if (!yypact_value_is_default (yyn))
5284 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5292 /* Pop the current state because it cannot handle the error token. */
5297 yydestruct ("Error: popping",
5298 yystos[yystate], yyvsp);
5301 YY_STACK_PRINT (yyss, yyssp);
5307 /* Shift the error token. */
5308 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5314 /*-------------------------------------.
5315 | yyacceptlab -- YYACCEPT comes here. |
5316 `-------------------------------------*/
5321 /*-----------------------------------.
5322 | yyabortlab -- YYABORT comes here. |
5323 `-----------------------------------*/
5328 #if !defined(yyoverflow) || YYERROR_VERBOSE
5329 /*-------------------------------------------------.
5330 | yyexhaustedlab -- memory exhaustion comes here. |
5331 `-------------------------------------------------*/
5333 yyerror (YY_("memory exhausted"));
5339 if (yychar != YYEMPTY)
5341 /* Make sure we have latest lookahead translation. See comments at
5342 user semantic actions for why this is necessary. */
5343 yytoken = YYTRANSLATE (yychar);
5344 yydestruct ("Cleanup: discarding lookahead",
5347 /* Do not reclaim the symbols of the rule which action triggered
5348 this YYABORT or YYACCEPT. */
5350 YY_STACK_PRINT (yyss, yyssp);
5351 while (yyssp != yyss)
5353 yydestruct ("Cleanup: popping",
5354 yystos[*yyssp], yyvsp);
5359 YYSTACK_FREE (yyss);
5362 if (yymsg != yymsgbuf)
5363 YYSTACK_FREE (yymsg);
5365 /* Make sure YYID is used. */
5366 return YYID (yyresult);
5371 /* Line 2067 of yacc.c */
5372 #line 2235 "parse.y"