2 /* A Bison parser, made by GNU Bison 2.4.1. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4.1"
52 #define YYSKELETON_NAME "yacc.c"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
68 /* Copy the first part of user declarations. */
70 /* Line 189 of yacc.c */
80 #include "treefuncs.h"
84 /* FIXME: add gettext support */
89 static GList *class_nodes = NULL;
92 static GList *enum_vals = NULL;
93 static GList *flag_vals = NULL;
94 static GList *error_vals = NULL;
96 static gboolean abstract = FALSE;
97 static char *chunk_size = NULL;
98 static char *bonobo_object_class = NULL;
99 static int glade_xml = FALSE;
100 static GList *interfaces = NULL;
101 static GList *typestack = NULL;
102 static GList *funcargs = NULL;
103 static GList *checks = NULL;
104 static int has_self = FALSE;
105 static int vararg = FALSE;
106 static Method *last_added_method = NULL;
108 /* destructor and initializer for variables */
109 static gboolean destructor_unref = FALSE;
110 static char *destructor = NULL;
111 static int destructor_line = 0;
112 static gboolean destructor_simple = TRUE;
113 static char *initializer = NULL;
114 static int initializer_line = 0;
115 static int glade_widget = FALSE;
117 static char *funcattrs = NULL;
118 static char *onerror = NULL;
119 static char *defreturn = NULL;
121 static GList *gtktypes = NULL;
123 static Property *property = NULL;
125 /* this can be a global as we will only do one function at a time
127 static int the_scope = NO_SCOPE;
129 void free(void *ptr);
132 extern int ccode_line;
134 extern gboolean for_cpp;
144 if (strcmp (yytext, "\n") == 0 ||
145 strcmp (yytext, "\r") == 0) {
146 out = g_strconcat ("Error: ", str, " before end of line", NULL);
147 } else if (yytext[0] == '\0') {
148 out=g_strconcat("Error: ", str, " at end of input", NULL);
150 char *tmp = g_strdup(yytext);
151 while((p=strchr(tmp, '\n')))
154 out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL);
158 fprintf(stderr, "%s:%d: %s\n", filename, line_no, out);
167 Type *type = typestack->data;
168 typestack = g_list_remove(typestack,typestack->data);
173 push_variable (char *name, int scope, int line_no, char *postfix)
176 Type *type = pop_type ();
178 type->postfix = postfix;
180 var = node_new (VARIABLE_NODE,
183 "glade_widget", glade_widget,
186 "destructor_unref", destructor_unref,
187 "destructor:steal", destructor,
188 "destructor_line", destructor_line,
189 "destructor_simple", destructor_simple,
190 "initializer:steal", initializer,
191 "initializer_line", initializer_line,
192 "initializer_simple", TRUE,
194 class_nodes = g_list_append(class_nodes, var);
195 glade_widget = FALSE;
199 push_function (int scope, int method, char *oid, char *id,
200 GString *cbuf, int line_no, int ccode_line,
201 gboolean vararg, GList *flags)
207 g_assert(scope != CLASS_SCOPE);
209 if(method == INIT_METHOD ||
210 method == CLASS_INIT_METHOD ||
211 method == CONSTRUCTOR_METHOD ||
212 method == DISPOSE_METHOD ||
213 method == FINALIZE_METHOD) {
214 type = (Type *)node_new (TYPE_NODE,
221 /* a complicated and ugly test to figure out if we have
222 the wrong number of types for a signal */
223 if((method == SIGNAL_FIRST_METHOD ||
224 method == SIGNAL_LAST_METHOD) &&
225 g_list_length(gtktypes) != g_list_length(funcargs) &&
226 !(g_list_length(funcargs) == 1 &&
227 g_list_length(gtktypes) == 2 &&
228 strcmp(gtktypes->next->data, "NONE")==0)) {
229 error_print(GOB_WARN, line_no,
230 _("The number of GTK arguments and "
231 "function arguments for a signal "
232 "don't seem to match"));
234 if(g_list_length(gtktypes) > 2) {
236 for(li = gtktypes->next; li; li = li->next) {
237 if(strcmp(li->data, "NONE")==0) {
238 error_print(GOB_ERROR, line_no,
239 _("NONE can only appear in an "
240 "argument list by itself"));
246 c_cbuf = p = cbuf->str;
247 while(p && *p && (*p==' ' || *p=='\t' || *p=='\n' || *p=='\r'))
254 node = node_new (METHOD_NODE,
259 "gtktypes:steal", gtktypes,
260 "flags:steal", flags,
262 "args:steal", funcargs,
263 "funcattrs:steal", funcattrs,
264 "onerror:steal", onerror,
265 "defreturn:steal", defreturn,
266 "cbuf:steal", c_cbuf,
268 "ccode_line", ccode_line,
270 "unique_id", method_unique_id++,
273 last_added_method = (Method *)node;
277 /*only free segment if we haven't passed it
287 class_nodes = g_list_append(class_nodes, node);
291 free_all_global_state(void)
303 g_list_foreach(gtktypes, (GFunc)g_free, NULL);
304 g_list_free(gtktypes);
307 node_list_free (funcargs);
312 push_funcarg(char *name, char *postfix)
315 Type *type = pop_type();
317 type->postfix = postfix;
319 node = node_new (FUNCARG_NODE,
322 "checks:steal", checks,
326 funcargs = g_list_append(funcargs, node);
330 push_init_arg(char *name, int is_class)
337 tn = g_strconcat(((Class *)class)->otype,":Class",NULL);
339 tn = g_strdup(((Class *)class)->otype);
341 type = node_new (TYPE_NODE,
345 node = node_new (FUNCARG_NODE,
346 "atype:steal", (Type *)type,
349 funcargs = g_list_prepend(funcargs, node);
353 push_self(char *id, gboolean constant)
358 type = node_new (TYPE_NODE,
359 "name", ((Class *)class)->otype,
360 "pointer", constant ? "const *" : "*",
362 ch = g_list_append (ch, node_new (CHECK_NODE,
363 "chtype", NULL_CHECK,
365 ch = g_list_append (ch, node_new (CHECK_NODE,
366 "chtype", TYPE_CHECK,
368 node = node_new (FUNCARG_NODE,
369 "atype:steal", (Type *)type,
373 funcargs = g_list_prepend(funcargs, node);
377 find_var_or_die(const char *id, int line)
381 for(li = class_nodes; li != NULL; li = li->next) {
383 Node *node = li->data;
384 if(node->type != VARIABLE_NODE)
387 if(strcmp(var->id, id)==0)
391 error_printf(GOB_ERROR, line, _("Variable %s not defined here"), id);
393 g_assert_not_reached();
398 set_attr_value(char *type, char *val)
400 if(strcmp(type, "attr")==0) {
406 } else if(strcmp(type, "onerror")==0) {
412 } else if(strcmp(type, "defreturn")==0) {
423 export_accessors (const char *var_name,
435 the_type = (Type *)node_copy ((Node *)type);
437 the_type = get_tree_type (gtktype, TRUE);
439 if (the_type == NULL) {
440 error_print (GOB_ERROR, line_no,
441 _("Cannot determine type of property or argument"));
446 char *get_id = g_strdup_printf ("get_%s", var_name);
447 GString *get_cbuf = g_string_new (NULL);
448 Node *node1 = node_new (TYPE_NODE,
449 "name", the_type->name,
450 "pointer", the_type->pointer,
451 "postfix", the_type->postfix,
453 Node *node3 = node_new (TYPE_NODE,
454 "name", class->class.otype,
458 g_string_sprintf (get_cbuf,
460 "g_object_get (G_OBJECT (self), \"%s\", "
464 the_type->pointer ? the_type->pointer : "",
467 typestack = g_list_prepend (typestack, node1);
468 typestack = g_list_prepend (typestack, node3);
470 push_funcarg ("self", FALSE);
472 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
473 get_id, get_cbuf, get_lineno,
474 lineno, FALSE, NULL);
478 char *set_id = g_strdup_printf ("set_%s", var_name);
479 GString *set_cbuf = g_string_new (NULL);
480 Node *node1 = node_new (TYPE_NODE,
481 "name", the_type->name,
482 "pointer", the_type->pointer,
483 "postfix", the_type->postfix,
485 Node *node2 = node_new (TYPE_NODE,
488 Node *node3 = node_new (TYPE_NODE,
489 "name", class->class.otype,
493 g_string_sprintf (set_cbuf,
494 "\tg_object_set (G_OBJECT (self), "
495 "\"%s\", val, NULL);\n",
498 typestack = g_list_prepend (typestack, node2);
499 typestack = g_list_prepend (typestack, node1);
500 typestack = g_list_prepend (typestack, node3);
502 push_funcarg ("self", FALSE);
503 push_funcarg ("val", FALSE);
505 typestack = g_list_prepend (typestack, node2);
506 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
507 set_id, set_cbuf, set_lineno,
508 lineno, FALSE, NULL);
511 node_free ((Node *)the_type);
515 get_prop_enum_flag_cast (Property *prop)
518 if (prop->extra_gtktype == NULL ||
519 /* HACK! just in case someone made this
520 * work with 2.0.0 by using the TYPE
522 ((strstr (prop->extra_gtktype, "_TYPE_") != NULL ||
523 strstr (prop->extra_gtktype, "TYPE_") == prop->extra_gtktype) &&
524 strchr (prop->extra_gtktype, ':') == NULL)) {
525 if (prop->ptype != NULL)
526 return get_type (prop->ptype, TRUE);
528 return g_strdup ("");
530 tmp = remove_sep (prop->extra_gtktype);
531 ret = g_strdup_printf ("(%s) ", tmp);
537 add_construct_glade (char * file, char * root, char * domain)
542 type = (Type *)node_new (TYPE_NODE,
546 initializer = g_strdup_printf("\t{\n"
547 "\tGtkWidget * root;\n"
548 "\t%%1$s->_priv->_glade_xml = glade_xml_new(%s, %s, %s);\n"
549 "\troot = glade_xml_get_widget(%%1$s->_priv->_glade_xml, %s);\n"
550 "\tgtk_widget_show(root);\n"
551 "\tgtk_container_add(GTK_CONTAINER(%%1$s), root);\n"
552 "\tglade_xml_signal_autoconnect_full(%%1$s->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)%%1$s);\n"
553 "}\n", file, root, domain ? domain : "NULL", root);
555 var = node_new (VARIABLE_NODE,
556 "scope", PRIVATE_SCOPE,
558 "glade_widget", FALSE,
559 "id:steal", "_glade_xml",
560 "destructor_unref", FALSE,
561 "destructor", "g_object_unref",
562 "destructor_simple", TRUE,
563 "initializer", initializer,
564 "initializer_simple", FALSE,
566 class_nodes = g_list_prepend(class_nodes, var);
570 property_link_and_export (Node *node)
572 Property *prop = (Property *)node;
576 char *get = NULL, *set = NULL;
579 if (prop->set != NULL ||
581 error_print (GOB_ERROR, prop->line_no,
582 _("Property linking requested, but "
583 "getters and setters exist"));
586 var = find_var_or_die (prop->name, prop->line_no);
587 if(var->scope == PRIVATE_SCOPE) {
588 root = "self->_priv";
589 } else if (var->scope == CLASS_SCOPE) {
590 root = "SELF_GET_CLASS(self)";
592 error_print (GOB_ERROR, prop->line_no,
593 _("Self aliases needed when autolinking to a classwide member"));
598 if (strcmp (prop->gtktype, "STRING") == 0) {
599 set = g_strdup_printf("{ char *old = %s->%s; "
600 "%s->%s = g_value_dup_string (VAL); g_free (old); }",
603 get = g_strdup_printf("g_value_set_string (VAL, %s->%s);",
605 } else if (strcmp (prop->gtktype, "OBJECT") == 0) {
607 if (prop->extra_gtktype != NULL) {
608 cast = remove_sep (prop->extra_gtktype);
610 cast = g_strdup ("void");
612 set = g_strdup_printf("{ GObject *___old = (GObject *)%s->%s; "
613 "%s->%s = (%s *)g_value_dup_object (VAL); "
614 "if (___old != NULL) { "
615 "g_object_unref (G_OBJECT (___old)); "
621 get = g_strdup_printf ("g_value_set_object (VAL, "
622 "(gpointer)%s->%s);",
625 } else if (strcmp (prop->gtktype, "BOXED") == 0) {
626 char *type = make_me_type (prop->extra_gtktype,
628 if (prop->extra_gtktype == NULL) {
629 error_print (GOB_ERROR, prop->line_no,
630 _("Property linking requested for BOXED, but "
631 "boxed_type not set"));
633 set = g_strdup_printf("{ gpointer ___old = (gpointer)%s->%s; "
634 "gpointer ___new = (gpointer)g_value_get_boxed (VAL); "
635 "if (___new != ___old) { "
636 "if (___old != NULL) g_boxed_free (%s, ___old); "
637 "if (___new != NULL) %s->%s = g_boxed_copy (%s, ___new); "
638 "else %s->%s = NULL;"
646 get = g_strdup_printf("g_value_set_boxed (VAL, %s->%s);",
652 const char *getcast = "";
653 const char *setcast = "";
654 char *to_free = NULL;
655 set_func = g_strdup_printf ("g_value_set_%s", prop->gtktype);
656 g_strdown (set_func);
657 get_func = g_strdup_printf ("g_value_get_%s", prop->gtktype);
658 g_strdown (get_func);
661 if (strcmp (prop->gtktype, "FLAGS") == 0) {
662 setcast = "(guint) ";
664 get_prop_enum_flag_cast (prop);
665 } else if (strcmp (prop->gtktype, "ENUM") == 0) {
668 get_prop_enum_flag_cast (prop);
669 } else if (strcmp (prop->gtktype, "POINTER") == 0) {
670 setcast = "(gpointer) ";
671 getcast = g_strdup_printf ("(%s%s) ",
673 prop->ptype->pointer ? prop->ptype->pointer : "");
677 set = g_strdup_printf("%s->%s = %s%s (VAL);",
681 get = g_strdup_printf("%s (VAL, %s%s->%s);",
693 "get_line", prop->line_no,
695 "set_line", prop->line_no,
700 export_accessors (prop->name,
701 prop->get != NULL, prop->get_line,
702 prop->set != NULL, prop->set_line,
713 if (strcmp (s, "BOOL") == 0) {
714 error_print (GOB_WARN, line_no,
715 _("BOOL type is deprecated, please use BOOLEAN"));
717 return g_strdup ("BOOLEAN");
724 ensure_property (void)
726 if (property == NULL)
727 property = (Property *)node_new (PROPERTY_NODE, NULL);
732 /* Line 189 of yacc.c */
735 /* Enabling traces. */
740 /* Enabling verbose error messages. */
741 #ifdef YYERROR_VERBOSE
742 # undef YYERROR_VERBOSE
743 # define YYERROR_VERBOSE 1
745 # define YYERROR_VERBOSE 0
748 /* Enabling the token table. */
749 #ifndef YYTOKEN_TABLE
750 # define YYTOKEN_TABLE 0
757 /* Put the tokens into the symbol table, so that GDB and other debuggers
821 #define THREEDOTS 265
832 #define TYPETOKEN 276
833 #define ARRAY_DIM 277
834 #define SINGLE_CHAR 278
845 #define PROTECTED 289
846 #define CLASSWIDE 290
856 #define DEFAULT_VALUE 300
860 #define FLAGS_TYPE 304
861 #define ENUM_TYPE 305
862 #define PARAM_TYPE 306
863 #define BOXED_TYPE 307
864 #define OBJECT_TYPE 308
869 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
870 typedef union YYSTYPE
873 /* Line 214 of yacc.c */
884 /* Line 214 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 264 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)
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 _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1001 || defined __cplusplus || defined _MSC_VER)
1002 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1004 # define _STDLIB_H 1
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 _STDLIB_H \
1028 && ! ((defined YYMALLOC || defined malloc) \
1029 && (defined YYFREE || defined free)))
1030 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1032 # define _STDLIB_H 1
1036 # define YYMALLOC malloc
1037 # if ! defined malloc && ! defined _STDLIB_H && (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 _STDLIB_H && (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 /* Copy COUNT objects from FROM to TO. The source and destination do
1076 # if defined __GNUC__ && 1 < __GNUC__
1077 # define YYCOPY(To, From, Count) \
1078 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1080 # define YYCOPY(To, From, Count) \
1084 for (yyi = 0; yyi < (Count); yyi++) \
1085 (To)[yyi] = (From)[yyi]; \
1091 /* Relocate STACK from its old location to the new one. The
1092 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1093 elements in the stack, and YYPTR gives the new location of the
1094 stack. Advance YYPTR to a properly aligned location for the next
1096 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1099 YYSIZE_T yynewbytes; \
1100 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1101 Stack = &yyptr->Stack_alloc; \
1102 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1103 yyptr += yynewbytes / sizeof (*yyptr); \
1109 /* YYFINAL -- State number of the termination state. */
1111 /* YYLAST -- Last index in YYTABLE. */
1114 /* YYNTOKENS -- Number of terminals. */
1115 #define YYNTOKENS 67
1116 /* YYNNTS -- Number of nonterminals. */
1118 /* YYNRULES -- Number of rules. */
1119 #define YYNRULES 197
1120 /* YYNRULES -- Number of states. */
1121 #define YYNSTATES 417
1123 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1124 #define YYUNDEFTOK 2
1125 #define YYMAXUTOK 308
1127 #define YYTRANSLATE(YYX) \
1128 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1130 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1131 static const yytype_uint8 yytranslate[] =
1133 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1134 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1135 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1136 2, 2, 2, 65, 2, 2, 2, 2, 2, 2,
1137 56, 57, 62, 2, 60, 66, 2, 2, 2, 2,
1138 2, 2, 2, 2, 2, 2, 2, 2, 2, 58,
1139 64, 59, 63, 2, 2, 2, 2, 2, 2, 2,
1140 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1141 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1142 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1143 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1144 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1145 2, 2, 2, 54, 61, 55, 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, 2, 2, 2, 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, 1, 2, 3, 4,
1159 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1160 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1161 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1162 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1163 45, 46, 47, 48, 49, 50, 51, 52, 53
1167 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1169 static const yytype_uint16 yyprhs[] =
1171 0, 0, 3, 7, 10, 13, 15, 17, 19, 21,
1172 23, 25, 27, 29, 32, 35, 38, 41, 43, 45,
1173 47, 49, 54, 58, 64, 65, 70, 76, 82, 88,
1174 95, 103, 110, 118, 121, 123, 125, 128, 132, 134,
1175 136, 138, 140, 142, 144, 146, 148, 151, 155, 158,
1176 162, 165, 168, 170, 172, 174, 175, 181, 188, 201,
1177 211, 218, 222, 223, 235, 244, 250, 254, 255, 259,
1178 261, 263, 268, 270, 272, 276, 280, 284, 288, 292,
1179 296, 300, 304, 308, 312, 316, 320, 324, 328, 332,
1180 336, 340, 342, 348, 350, 354, 355, 359, 361, 364,
1181 366, 368, 370, 373, 376, 379, 383, 387, 390, 393,
1182 396, 398, 401, 403, 406, 408, 410, 412, 414, 416,
1183 418, 420, 422, 424, 426, 428, 430, 432, 435, 438,
1184 442, 445, 447, 451, 455, 458, 460, 465, 469, 471,
1185 474, 476, 487, 499, 509, 519, 528, 540, 549, 555,
1186 558, 563, 570, 571, 573, 576, 578, 580, 583, 586,
1187 590, 595, 600, 602, 606, 608, 612, 614, 617, 621,
1188 628, 636, 639, 641, 643, 646, 649, 653, 657, 661,
1189 665, 673, 682, 686, 688, 692, 694, 702, 711, 715,
1190 717, 725, 734, 738, 740, 742, 745, 747
1193 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1194 static const yytype_int8 yyrhs[] =
1196 68, 0, -1, 70, 71, 70, -1, 71, 70, -1,
1197 70, 71, -1, 71, -1, 24, -1, 25, -1, 28,
1198 -1, 26, -1, 27, -1, 29, -1, 30, -1, 70,
1199 69, -1, 70, 112, -1, 70, 115, -1, 70, 117,
1200 -1, 69, -1, 112, -1, 115, -1, 117, -1, 72,
1201 54, 74, 55, -1, 72, 54, 55, -1, 3, 21,
1202 4, 21, 73, -1, -1, 56, 19, 57, 73, -1,
1203 56, 19, 19, 57, 73, -1, 56, 19, 21, 57,
1204 73, -1, 56, 19, 20, 57, 73, -1, 56, 19,
1205 31, 31, 57, 73, -1, 56, 19, 31, 31, 31,
1206 57, 73, -1, 56, 19, 19, 31, 57, 73, -1,
1207 56, 19, 19, 31, 31, 57, 73, -1, 74, 75,
1208 -1, 75, -1, 103, -1, 19, 103, -1, 19, 21,
1209 103, -1, 80, -1, 81, -1, 83, -1, 58, -1,
1210 32, -1, 33, -1, 34, -1, 35, -1, 19, 19,
1211 -1, 19, 54, 24, -1, 59, 119, -1, 59, 54,
1212 24, -1, 77, 78, -1, 78, 77, -1, 78, -1,
1213 77, -1, 19, -1, -1, 76, 92, 19, 79, 58,
1214 -1, 76, 92, 19, 22, 79, 58, -1, 37, 90,
1215 89, 19, 82, 19, 54, 24, 19, 54, 24, 58,
1216 -1, 37, 90, 89, 19, 82, 19, 54, 24, 58,
1217 -1, 37, 90, 89, 19, 82, 19, -1, 56, 19,
1218 57, -1, -1, 36, 19, 19, 84, 19, 54, 24,
1219 19, 54, 24, 58, -1, 36, 19, 19, 84, 19,
1220 54, 24, 58, -1, 36, 19, 19, 84, 58, -1,
1221 56, 85, 57, -1, -1, 85, 60, 88, -1, 88,
1222 -1, 31, -1, 19, 56, 31, 57, -1, 119, -1,
1223 86, -1, 41, 59, 86, -1, 42, 59, 86, -1,
1224 43, 59, 119, -1, 44, 59, 119, -1, 45, 59,
1225 87, -1, 47, 59, 91, -1, 48, 59, 92, -1,
1226 49, 59, 21, -1, 49, 59, 19, -1, 50, 59,
1227 21, -1, 50, 59, 19, -1, 51, 59, 21, -1,
1228 51, 59, 19, -1, 52, 59, 21, -1, 52, 59,
1229 19, -1, 53, 59, 21, -1, 53, 59, 19, -1,
1230 19, -1, 19, 56, 19, 92, 57, -1, 19, -1,
1231 56, 91, 57, -1, -1, 19, 61, 91, -1, 19,
1232 -1, 93, 97, -1, 93, -1, 94, -1, 19, -1,
1233 5, 19, -1, 19, 5, -1, 96, 19, -1, 5,
1234 96, 19, -1, 96, 19, 5, -1, 95, 94, -1,
1235 21, 94, -1, 5, 94, -1, 21, -1, 21, 5,
1236 -1, 95, -1, 95, 5, -1, 6, -1, 18, -1,
1237 14, -1, 15, -1, 13, -1, 16, -1, 17, -1,
1238 11, -1, 12, -1, 7, -1, 8, -1, 9, -1,
1239 62, -1, 62, 5, -1, 62, 97, -1, 62, 5,
1240 97, -1, 19, 100, -1, 100, -1, 76, 19, 100,
1241 -1, 19, 76, 100, -1, 76, 100, -1, 98, -1,
1242 19, 56, 101, 57, -1, 101, 60, 19, -1, 19,
1243 -1, 54, 24, -1, 58, -1, 39, 90, 99, 92,
1244 19, 56, 106, 57, 104, 102, -1, 76, 39, 90,
1245 98, 92, 19, 56, 106, 57, 104, 102, -1, 38,
1246 76, 92, 19, 56, 106, 57, 104, 102, -1, 76,
1247 38, 92, 19, 56, 106, 57, 104, 102, -1, 38,
1248 92, 19, 56, 106, 57, 104, 102, -1, 40, 56,
1249 21, 57, 92, 19, 56, 106, 57, 104, 102, -1,
1250 76, 92, 19, 56, 106, 57, 104, 102, -1, 19,
1251 56, 19, 57, 102, -1, 19, 105, -1, 19, 105,
1252 19, 105, -1, 19, 105, 19, 105, 19, 105, -1,
1253 -1, 119, -1, 54, 24, -1, 6, -1, 19, -1,
1254 19, 5, -1, 5, 19, -1, 19, 60, 107, -1,
1255 19, 5, 60, 107, -1, 5, 19, 60, 107, -1,
1256 107, -1, 108, 60, 10, -1, 108, -1, 108, 60,
1257 109, -1, 109, -1, 92, 19, -1, 92, 19, 22,
1258 -1, 92, 19, 56, 19, 110, 57, -1, 92, 19,
1259 22, 56, 19, 110, 57, -1, 110, 111, -1, 111,
1260 -1, 19, -1, 63, 119, -1, 64, 119, -1, 63,
1261 59, 119, -1, 64, 59, 119, -1, 59, 59, 119,
1262 -1, 65, 59, 119, -1, 9, 19, 54, 113, 55,
1263 21, 58, -1, 9, 19, 54, 113, 60, 55, 21,
1264 58, -1, 113, 60, 114, -1, 114, -1, 19, 59,
1265 119, -1, 19, -1, 47, 19, 54, 116, 55, 21,
1266 58, -1, 47, 19, 54, 116, 60, 55, 21, 58,
1267 -1, 116, 60, 19, -1, 19, -1, 46, 19, 54,
1268 118, 55, 21, 58, -1, 46, 19, 54, 118, 60,
1269 55, 21, 58, -1, 118, 60, 19, -1, 19, -1,
1270 20, -1, 66, 20, -1, 23, -1, 19, -1
1273 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1274 static const yytype_uint16 yyrline[] =
1276 0, 704, 704, 705, 706, 707, 710, 719, 728, 737,
1277 746, 755, 764, 775, 776, 777, 778, 779, 780, 781,
1278 782, 785, 790, 797, 814, 815, 823, 835, 844, 856,
1279 865, 874, 883, 894, 895, 898, 899, 908, 920, 921,
1280 922, 923, 926, 927, 928, 929, 932, 952, 976, 980,
1281 988, 989, 990, 991, 992, 1000, 1006, 1009, 1014, 1082,
1282 1136, 1225, 1233, 1238, 1286, 1322, 1338, 1339, 1342, 1343,
1283 1346, 1347, 1359, 1360, 1363, 1369, 1375, 1381, 1387, 1393,
1284 1399, 1406, 1412, 1418, 1424, 1430, 1436, 1442, 1448, 1454,
1285 1460, 1466, 1491, 1500, 1506, 1507, 1510, 1513, 1519, 1526,
1286 1535, 1538, 1541, 1545, 1549, 1553, 1558, 1566, 1570, 1575,
1287 1579, 1582, 1586, 1589, 1594, 1595, 1596, 1597, 1598, 1599,
1288 1600, 1601, 1602, 1605, 1606, 1607, 1610, 1611, 1612, 1616,
1289 1623, 1635, 1641, 1653, 1665, 1668, 1674, 1679, 1682, 1687,
1290 1688, 1692, 1715, 1738, 1761, 1784, 1802, 1815, 1825, 1865,
1291 1877, 1897, 1928, 1935, 1936, 1942, 1943, 1954, 1965, 1976,
1292 1986, 1996, 2006, 2009, 2010, 2013, 2014, 2017, 2020, 2023,
1293 2031, 2041, 2042, 2045, 2062, 2069, 2076, 2083, 2090, 2097,
1294 2106, 2115, 2126, 2127, 2130, 2150, 2160, 2169, 2180, 2183,
1295 2188, 2197, 2208, 2211, 2217, 2218, 2222, 2223
1299 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1300 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1301 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1302 static const char *const yytname[] =
1304 "$end", "error", "$undefined", "CLASS", "FROM", "CONST", "VOID",
1305 "STRUCT", "UNION", "ENUM", "THREEDOTS", "SIGNED", "UNSIGNED", "LONG",
1306 "SHORT", "INT", "FLOAT", "DOUBLE", "CHAR", "TOKEN", "NUMBER",
1307 "TYPETOKEN", "ARRAY_DIM", "SINGLE_CHAR", "CCODE", "ADCODE", "HTCODE",
1308 "PHCODE", "HCODE", "ACODE", "ATCODE", "STRING", "PUBLIC", "PRIVATE",
1309 "PROTECTED", "CLASSWIDE", "PROPERTY", "ARGUMENT", "VIRTUAL", "SIGNAL",
1310 "OVERRIDE", "NICK", "BLURB", "MAXIMUM", "MINIMUM", "DEFAULT_VALUE",
1311 "ERROR", "FLAGS", "TYPE", "FLAGS_TYPE", "ENUM_TYPE", "PARAM_TYPE",
1312 "BOXED_TYPE", "OBJECT_TYPE", "'{'", "'}'", "'('", "')'", "';'", "'='",
1313 "','", "'|'", "'*'", "'>'", "'<'", "'!'", "'-'", "$accept", "prog",
1314 "ccode", "ccodes", "class", "classdec", "classflags", "classcode",
1315 "thing", "scope", "destructor", "initializer", "varoptions", "variable",
1316 "argument", "export", "property", "param_spec", "param_spec_list",
1317 "string", "anyval", "param_spec_value", "argtype", "flags", "flaglist",
1318 "type", "specifier_list", "spec_list", "specifier", "strunionenum",
1319 "pointer", "simplesigtype", "fullsigtype", "sigtype", "tokenlist",
1320 "codenocode", "method", "methodmods", "retcode", "funcargs", "arglist",
1321 "arglist1", "arg", "checklist", "check", "enumcode", "enumvals",
1322 "enumval", "flagcode", "flagvals", "errorcode", "errorvals", "numtok", 0
1327 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1329 static const yytype_uint16 yytoknum[] =
1331 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1332 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1333 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1334 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1335 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1336 305, 306, 307, 308, 123, 125, 40, 41, 59, 61,
1337 44, 124, 42, 62, 60, 33, 45
1341 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1342 static const yytype_uint8 yyr1[] =
1344 0, 67, 68, 68, 68, 68, 69, 69, 69, 69,
1345 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
1346 70, 71, 71, 72, 73, 73, 73, 73, 73, 73,
1347 73, 73, 73, 74, 74, 75, 75, 75, 75, 75,
1348 75, 75, 76, 76, 76, 76, 77, 77, 78, 78,
1349 79, 79, 79, 79, 79, 79, 80, 80, 81, 81,
1350 81, 82, 82, 83, 83, 83, 84, 84, 85, 85,
1351 86, 86, 87, 87, 88, 88, 88, 88, 88, 88,
1352 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
1353 88, 88, 89, 89, 90, 90, 91, 91, 92, 92,
1354 93, 93, 93, 93, 93, 93, 93, 94, 94, 94,
1355 94, 94, 94, 94, 95, 95, 95, 95, 95, 95,
1356 95, 95, 95, 96, 96, 96, 97, 97, 97, 97,
1357 98, 98, 99, 99, 99, 99, 100, 101, 101, 102,
1358 102, 103, 103, 103, 103, 103, 103, 103, 103, 104,
1359 104, 104, 104, 105, 105, 106, 106, 106, 106, 106,
1360 106, 106, 106, 107, 107, 108, 108, 109, 109, 109,
1361 109, 110, 110, 111, 111, 111, 111, 111, 111, 111,
1362 112, 112, 113, 113, 114, 114, 115, 115, 116, 116,
1363 117, 117, 118, 118, 119, 119, 119, 119
1366 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1367 static const yytype_uint8 yyr2[] =
1369 0, 2, 3, 2, 2, 1, 1, 1, 1, 1,
1370 1, 1, 1, 2, 2, 2, 2, 1, 1, 1,
1371 1, 4, 3, 5, 0, 4, 5, 5, 5, 6,
1372 7, 6, 7, 2, 1, 1, 2, 3, 1, 1,
1373 1, 1, 1, 1, 1, 1, 2, 3, 2, 3,
1374 2, 2, 1, 1, 1, 0, 5, 6, 12, 9,
1375 6, 3, 0, 11, 8, 5, 3, 0, 3, 1,
1376 1, 4, 1, 1, 3, 3, 3, 3, 3, 3,
1377 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1378 3, 1, 5, 1, 3, 0, 3, 1, 2, 1,
1379 1, 1, 2, 2, 2, 3, 3, 2, 2, 2,
1380 1, 2, 1, 2, 1, 1, 1, 1, 1, 1,
1381 1, 1, 1, 1, 1, 1, 1, 2, 2, 3,
1382 2, 1, 3, 3, 2, 1, 4, 3, 1, 2,
1383 1, 10, 11, 9, 9, 8, 11, 8, 5, 2,
1384 4, 6, 0, 1, 2, 1, 1, 2, 2, 3,
1385 4, 4, 1, 3, 1, 3, 1, 2, 3, 6,
1386 7, 2, 1, 1, 2, 2, 3, 3, 3, 3,
1387 7, 8, 3, 1, 3, 1, 7, 8, 3, 1,
1388 7, 8, 3, 1, 1, 2, 1, 1
1391 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1392 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1393 means the default is an error. */
1394 static const yytype_uint8 yydefact[] =
1396 0, 0, 0, 6, 7, 9, 10, 8, 11, 12,
1397 0, 0, 0, 17, 0, 5, 0, 18, 19, 20,
1398 0, 0, 0, 0, 1, 13, 4, 14, 15, 16,
1399 3, 0, 0, 0, 0, 0, 2, 0, 42, 43,
1400 44, 45, 0, 95, 0, 95, 0, 22, 41, 0,
1401 34, 0, 38, 39, 40, 35, 24, 185, 0, 183,
1402 193, 0, 189, 0, 0, 0, 0, 0, 36, 0,
1403 0, 0, 0, 114, 123, 124, 125, 121, 122, 118,
1404 116, 117, 119, 120, 115, 101, 110, 0, 0, 99,
1405 100, 112, 0, 0, 0, 21, 33, 0, 95, 0,
1406 0, 23, 0, 0, 0, 0, 0, 0, 0, 37,
1407 0, 0, 67, 97, 0, 93, 0, 0, 102, 109,
1408 0, 103, 111, 108, 0, 0, 126, 98, 113, 107,
1409 104, 0, 0, 135, 0, 131, 0, 0, 0, 55,
1410 0, 197, 194, 196, 0, 184, 0, 0, 182, 0,
1411 192, 0, 0, 188, 0, 0, 0, 0, 0, 0,
1412 94, 0, 62, 105, 0, 0, 127, 128, 106, 0,
1413 0, 0, 130, 0, 134, 0, 0, 0, 0, 0,
1414 54, 55, 0, 0, 53, 52, 0, 0, 0, 0,
1415 0, 24, 195, 180, 0, 190, 0, 186, 0, 0,
1416 140, 148, 91, 0, 0, 0, 0, 0, 0, 0,
1417 0, 0, 0, 0, 0, 0, 69, 0, 65, 96,
1418 0, 0, 0, 0, 0, 114, 101, 0, 0, 162,
1419 164, 166, 129, 138, 0, 133, 132, 0, 0, 0,
1420 0, 46, 0, 0, 0, 0, 48, 50, 0, 51,
1421 56, 0, 24, 24, 24, 0, 25, 181, 191, 187,
1422 139, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1423 0, 0, 0, 66, 0, 0, 0, 0, 60, 0,
1424 102, 103, 0, 167, 152, 0, 136, 0, 0, 0,
1425 0, 0, 47, 57, 152, 49, 0, 24, 26, 28,
1426 27, 0, 24, 0, 70, 74, 75, 76, 77, 197,
1427 73, 78, 72, 79, 80, 82, 81, 84, 83, 86,
1428 85, 88, 87, 90, 89, 68, 0, 92, 61, 0,
1429 152, 0, 0, 159, 168, 0, 0, 0, 163, 165,
1430 137, 0, 0, 152, 0, 0, 24, 31, 24, 29,
1431 0, 0, 64, 0, 0, 161, 160, 0, 0, 0,
1432 149, 153, 145, 152, 0, 0, 0, 147, 32, 30,
1433 0, 0, 0, 59, 143, 0, 173, 0, 0, 0,
1434 0, 0, 172, 154, 0, 0, 152, 144, 152, 71,
1435 0, 0, 0, 0, 0, 174, 0, 175, 0, 169,
1436 171, 150, 141, 0, 0, 63, 0, 170, 178, 176,
1437 177, 179, 0, 146, 142, 58, 151
1440 /* YYDEFGOTO[NTERM-NUM]. */
1441 static const yytype_int16 yydefgoto[] =
1443 -1, 12, 13, 14, 15, 16, 101, 49, 50, 51,
1444 184, 185, 186, 52, 53, 222, 54, 158, 215, 305,
1445 311, 216, 116, 71, 114, 227, 89, 90, 91, 92,
1446 127, 133, 134, 135, 234, 201, 55, 337, 360, 228,
1447 229, 230, 231, 381, 382, 17, 58, 59, 18, 63,
1451 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1453 #define YYPACT_NINF -326
1454 static const yytype_int16 yypact[] =
1456 145, 13, 77, -326, -326, -326, -326, -326, -326, -326,
1457 108, 196, 146, -326, 145, 205, 168, -326, -326, -326,
1458 264, 173, 221, 232, -326, -326, 205, -326, -326, -326,
1459 205, 161, 259, 276, 283, 301, 205, 222, -326, -326,
1460 -326, -326, 309, 273, 327, 273, 281, -326, -326, 170,
1461 -326, 292, -326, -326, -326, -326, 291, 290, -27, -326,
1462 -326, 40, -326, 127, 294, 250, 332, 292, -326, 333,
1463 334, 335, 375, -326, -326, -326, -326, -326, -326, -326,
1464 -326, -326, -326, -326, -326, 350, 443, 392, 337, 295,
1465 -326, 457, 339, 239, 357, -326, -326, 392, 273, 366,
1466 376, -326, 27, 381, 71, 391, 95, 398, 124, -326,
1467 372, 417, 390, 389, 394, 396, 434, 471, -326, -326,
1468 446, -326, 471, -326, 447, 411, 4, -326, 471, -326,
1469 474, 231, 461, -326, 392, -326, 424, 472, 475, 122,
1470 192, -326, -326, -326, 470, -326, 435, 476, -326, 437,
1471 -326, 477, 438, -326, 478, 163, 444, 274, 0, 334,
1472 -326, 482, 448, -326, 449, 409, 295, -326, -326, 450,
1473 483, 484, -326, 6, -326, 488, 392, 452, 6, 392,
1474 64, 38, 409, 32, 451, 490, 453, 80, 455, 456,
1475 485, 291, -326, -326, 459, -326, 460, -326, 462, 491,
1476 -326, -326, -326, 463, 464, 465, 466, 467, 468, 469,
1477 473, 479, 480, 481, 486, -30, -326, 487, -326, -326,
1478 392, 495, 500, 409, 426, 489, 11, 502, 492, -326,
1479 493, -326, -326, -326, 126, -326, -326, 494, 510, 409,
1480 511, -326, 507, 496, 498, 509, -326, -326, 64, -326,
1481 -326, 187, 291, 291, 291, 189, -326, -326, -326, -326,
1482 -326, 85, 85, 27, 27, 18, 334, 392, -6, 219,
1483 226, 260, 293, -326, 274, 512, 499, 501, 497, 503,
1484 128, 179, 392, 100, 515, 358, -326, 516, 409, 505,
1485 506, 508, -326, -326, 515, -326, 513, 291, -326, -326,
1486 -326, 514, 291, 517, -326, -326, -326, -326, -326, 517,
1487 -326, -326, -326, -326, -326, -326, -326, -326, -326, -326,
1488 -326, -326, -326, -326, -326, -326, 12, -326, -326, 518,
1489 515, 392, 392, -326, 519, 524, 69, 163, -326, -326,
1490 -326, 520, 409, 515, 409, 163, 291, -326, 291, -326,
1491 521, 522, -326, 61, 163, -326, -326, 525, 66, 523,
1492 529, -326, -326, 515, 526, 163, 527, -326, -326, -326,
1493 528, 533, 532, -326, -326, 66, -326, 530, 83, 101,
1494 531, 75, -326, -326, 69, 163, 515, -326, 515, -326,
1495 504, 535, 88, 27, 27, -326, 27, -326, 27, -326,
1496 -326, 546, -326, 163, 163, -326, 534, -326, -326, -326,
1497 -326, -326, 69, -326, -326, -326, -326
1500 /* YYPGOTO[NTERM-NUM]. */
1501 static const yytype_int16 yypgoto[] =
1503 -326, -326, -4, 102, 552, -326, -189, -326, 538, -26,
1504 352, 383, 387, -326, -326, -326, -326, -326, -326, 5,
1505 -326, 298, -326, -24, -154, -43, -326, -69, -326, -66,
1506 -57, 431, -326, -96, -326, -325, -23, -287, -297, -178,
1507 -259, -326, 289, 203, -216, 154, -326, 536, 212, -326,
1511 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1512 positive, shift that token. If negative, reduce the rule which
1513 number is the opposite. If zero, do what YYDEFACT says.
1514 If YYTABLE_NINF, syntax error. */
1515 #define YYTABLE_NINF -159
1516 static const yytype_int16 yytable[] =
1518 145, 88, 256, 119, 244, 219, 120, 345, 99, 166,
1519 25, 67, 362, 315, 68, 316, 281, 123, 87, 217,
1520 367, 93, 129, 333, 111, 169, 25, 273, 103, 374,
1521 274, 351, 25, 104, 20, 172, 174, 309, 142, 67,
1522 387, 143, 109, 354, 124, 279, 141, 142, 119, 304,
1523 143, 141, 142, 119, 137, 143, 365, 180, 218, 119,
1524 402, 290, 170, 298, 299, 300, 126, 132, -156, 167,
1525 352, 282, 355, 356, 138, 235, 385, 236, 413, 414,
1526 372, 246, 172, 241, 144, 376, 245, 401, 141, 142,
1527 57, 175, 143, 144, 376, 105, 21, 183, 144, 403,
1528 106, 404, 141, 142, 303, 171, 143, 376, 347, 232,
1529 341, 251, 313, 349, 150, 416, 304, 30, 242, 373,
1530 141, 142, 334, 359, 143, 377, 147, 22, 36, 378,
1531 379, 380, 399, 238, 377, 144, 240, 252, 378, 379,
1532 380, 180, 394, 153, 181, 407, 24, 377, 1, 144,
1533 151, 378, 379, 380, 2, 119, 335, 368, 120, 369,
1534 396, 307, 308, 312, 364, 400, 366, 144, 27, 3,
1535 4, 5, 6, 7, 8, 9, 400, 276, 182, 154,
1536 37, 183, 107, 286, 27, -158, 287, 108, 331, 37,
1537 27, 10, 11, 38, 39, 40, 41, 42, 43, 44,
1538 45, 46, 38, 39, 40, 41, 42, 43, 44, 45,
1539 46, 187, 188, 189, 2, 23, 47, 199, 296, 48,
1540 301, 200, 31, 190, 314, 95, 28, 33, 48, 3,
1541 4, 5, 6, 7, 8, 9, -157, 29, 317, 332,
1542 318, 64, 28, 65, 297, 319, 302, 320, 28, 191,
1543 169, 10, 11, 29, 38, 39, 40, 41, 131, 29,
1544 44, 45, 46, 38, 39, 40, 41, 306, 32, 64,
1545 310, 38, 39, 40, 41, 34, 395, 397, 66, 321,
1546 56, 322, 38, 39, 40, 41, 35, 170, 44, 45,
1547 46, 408, 409, 202, 410, 57, 411, 72, 73, 74,
1548 75, 76, 60, 77, 78, 79, 80, 81, 82, 83,
1549 84, 85, 323, 86, 324, 203, 204, 205, 206, 207,
1550 62, 208, 209, 210, 211, 212, 213, 214, 69, 70,
1551 97, 98, 72, 73, 74, 75, 76, 94, 77, 78,
1552 79, 80, 81, 82, 83, 84, 85, 100, 86, 102,
1553 66, 110, 112, 113, 115, 121, 125, 126, 130, 38,
1554 39, 40, 41, 72, 73, 74, 75, 76, 338, 77,
1555 78, 79, 80, 81, 82, 83, 84, 85, 136, 86,
1556 117, 73, 74, 75, 76, 139, 77, 78, 79, 80,
1557 81, 82, 83, 84, 118, 140, 86, 72, 73, 74,
1558 75, 76, 146, 77, 78, 79, 80, 81, 82, 83,
1559 84, 85, 149, 86, 224, 225, 74, 75, 76, 152,
1560 77, 78, 79, 80, 81, 82, 83, 84, 226, 155,
1561 86, 117, 73, 74, 75, 76, 156, 77, 78, 79,
1562 80, 81, 82, 83, 84, 280, 157, 86, 122, 73,
1563 159, 160, 161, 162, 77, 78, 79, 80, 81, 82,
1564 83, 84, 128, 73, 86, 163, 164, 165, 77, 78,
1565 79, 80, 81, 82, 83, 84, 117, 73, 86, 168,
1566 173, 176, 77, 78, 79, 80, 81, 82, 83, 84,
1567 192, 177, 86, 193, 178, 195, 197, 194, 196, 198,
1568 182, 220, 233, 169, 221, 223, 170, 237, 239, 248,
1569 183, 250, 253, 254, 277, 260, 255, 257, 258, 278,
1570 259, 283, 261, 262, 263, 264, 265, 266, 267, 289,
1571 291, 292, 268, 295, 336, 340, 326, 249, 269, 270,
1572 271, 275, 353, 358, 375, 272, -155, 383, 384, 284,
1573 288, 329, 370, 285, 293, 294, 327, 390, 328, 406,
1574 330, 342, 405, 343, 344, 412, 26, 247, 243, 179,
1575 346, 348, 325, 350, 339, 357, 371, 363, 392, 0,
1576 0, 0, 0, 386, 388, 389, 391, 96, 0, 393,
1577 398, 0, 415, 0, 0, 0, 0, 0, 0, 0,
1578 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1579 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1580 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1585 static const yytype_int16 yycheck[] =
1587 102, 44, 191, 72, 182, 159, 72, 294, 51, 5,
1588 14, 37, 337, 19, 37, 21, 5, 86, 44, 19,
1589 345, 45, 91, 282, 67, 19, 30, 57, 55, 354,
1590 60, 19, 36, 60, 21, 131, 132, 19, 20, 65,
1591 365, 23, 65, 330, 87, 223, 19, 20, 117, 31,
1592 23, 19, 20, 122, 97, 23, 343, 19, 58, 128,
1593 385, 239, 56, 252, 253, 254, 62, 93, 57, 126,
1594 58, 60, 331, 332, 98, 171, 363, 173, 403, 404,
1595 19, 183, 178, 19, 66, 19, 54, 384, 19, 20,
1596 19, 134, 23, 66, 19, 55, 19, 59, 66, 386,
1597 60, 388, 19, 20, 19, 131, 23, 19, 297, 166,
1598 288, 31, 266, 302, 19, 412, 31, 15, 54, 58,
1599 19, 20, 22, 54, 23, 59, 55, 19, 26, 63,
1600 64, 65, 57, 176, 59, 66, 179, 57, 63, 64,
1601 65, 19, 59, 19, 22, 57, 0, 59, 3, 66,
1602 55, 63, 64, 65, 9, 224, 56, 346, 224, 348,
1603 59, 263, 264, 265, 342, 381, 344, 66, 14, 24,
1604 25, 26, 27, 28, 29, 30, 392, 220, 56, 55,
1605 19, 59, 55, 57, 30, 57, 60, 60, 60, 19,
1606 36, 46, 47, 32, 33, 34, 35, 36, 37, 38,
1607 39, 40, 32, 33, 34, 35, 36, 37, 38, 39,
1608 40, 19, 20, 21, 9, 19, 55, 54, 31, 58,
1609 31, 58, 54, 31, 267, 55, 14, 54, 58, 24,
1610 25, 26, 27, 28, 29, 30, 57, 14, 19, 60,
1611 21, 19, 30, 21, 57, 19, 57, 21, 36, 57,
1612 19, 46, 47, 30, 32, 33, 34, 35, 19, 36,
1613 38, 39, 40, 32, 33, 34, 35, 262, 4, 19,
1614 265, 32, 33, 34, 35, 54, 378, 379, 56, 19,
1615 21, 21, 32, 33, 34, 35, 54, 56, 38, 39,
1616 40, 393, 394, 19, 396, 19, 398, 5, 6, 7,
1617 8, 9, 19, 11, 12, 13, 14, 15, 16, 17,
1618 18, 19, 19, 21, 21, 41, 42, 43, 44, 45,
1619 19, 47, 48, 49, 50, 51, 52, 53, 19, 56,
1620 38, 39, 5, 6, 7, 8, 9, 56, 11, 12,
1621 13, 14, 15, 16, 17, 18, 19, 56, 21, 59,
1622 56, 19, 19, 19, 19, 5, 19, 62, 19, 32,
1623 33, 34, 35, 5, 6, 7, 8, 9, 10, 11,
1624 12, 13, 14, 15, 16, 17, 18, 19, 21, 21,
1625 5, 6, 7, 8, 9, 19, 11, 12, 13, 14,
1626 15, 16, 17, 18, 19, 19, 21, 5, 6, 7,
1627 8, 9, 21, 11, 12, 13, 14, 15, 16, 17,
1628 18, 19, 21, 21, 5, 6, 7, 8, 9, 21,
1629 11, 12, 13, 14, 15, 16, 17, 18, 19, 57,
1630 21, 5, 6, 7, 8, 9, 19, 11, 12, 13,
1631 14, 15, 16, 17, 18, 19, 56, 21, 5, 6,
1632 61, 57, 56, 19, 11, 12, 13, 14, 15, 16,
1633 17, 18, 5, 6, 21, 19, 19, 56, 11, 12,
1634 13, 14, 15, 16, 17, 18, 5, 6, 21, 5,
1635 19, 57, 11, 12, 13, 14, 15, 16, 17, 18,
1636 20, 19, 21, 58, 19, 58, 58, 21, 21, 21,
1637 56, 19, 19, 19, 56, 56, 56, 19, 56, 19,
1638 59, 58, 57, 57, 19, 24, 31, 58, 58, 19,
1639 58, 19, 59, 59, 59, 59, 59, 59, 59, 19,
1640 19, 24, 59, 24, 19, 19, 24, 185, 59, 59,
1641 59, 54, 24, 19, 19, 59, 57, 24, 19, 57,
1642 56, 54, 31, 60, 58, 57, 57, 24, 57, 24,
1643 57, 56, 58, 57, 56, 19, 14, 184, 181, 138,
1644 57, 57, 274, 56, 285, 56, 54, 57, 375, -1,
1645 -1, -1, -1, 57, 57, 57, 54, 49, -1, 59,
1646 59, -1, 58, -1, -1, -1, -1, -1, -1, -1,
1647 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1648 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1649 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1650 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1654 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1655 symbol of state STATE-NUM. */
1656 static const yytype_uint8 yystos[] =
1658 0, 3, 9, 24, 25, 26, 27, 28, 29, 30,
1659 46, 47, 68, 69, 70, 71, 72, 112, 115, 117,
1660 21, 19, 19, 19, 0, 69, 71, 112, 115, 117,
1661 70, 54, 4, 54, 54, 54, 70, 19, 32, 33,
1662 34, 35, 36, 37, 38, 39, 40, 55, 58, 74,
1663 75, 76, 80, 81, 83, 103, 21, 19, 113, 114,
1664 19, 118, 19, 116, 19, 21, 56, 76, 103, 19,
1665 56, 90, 5, 6, 7, 8, 9, 11, 12, 13,
1666 14, 15, 16, 17, 18, 19, 21, 76, 92, 93,
1667 94, 95, 96, 90, 56, 55, 75, 38, 39, 92,
1668 56, 73, 59, 55, 60, 55, 60, 55, 60, 103,
1669 19, 92, 19, 19, 91, 19, 89, 5, 19, 94,
1670 96, 5, 5, 94, 92, 19, 62, 97, 5, 94,
1671 19, 19, 76, 98, 99, 100, 21, 92, 90, 19,
1672 19, 19, 20, 23, 66, 119, 21, 55, 114, 21,
1673 19, 55, 21, 19, 55, 57, 19, 56, 84, 61,
1674 57, 56, 19, 19, 19, 56, 5, 97, 5, 19,
1675 56, 76, 100, 19, 100, 92, 57, 19, 19, 98,
1676 19, 22, 56, 59, 77, 78, 79, 19, 20, 21,
1677 31, 57, 20, 58, 21, 58, 21, 58, 21, 54,
1678 58, 102, 19, 41, 42, 43, 44, 45, 47, 48,
1679 49, 50, 51, 52, 53, 85, 88, 19, 58, 91,
1680 19, 56, 82, 56, 5, 6, 19, 92, 106, 107,
1681 108, 109, 97, 19, 101, 100, 100, 19, 92, 56,
1682 92, 19, 54, 79, 106, 54, 119, 78, 19, 77,
1683 58, 31, 57, 57, 57, 31, 73, 58, 58, 58,
1684 24, 59, 59, 59, 59, 59, 59, 59, 59, 59,
1685 59, 59, 59, 57, 60, 54, 92, 19, 19, 106,
1686 19, 5, 60, 19, 57, 60, 57, 60, 56, 19,
1687 106, 19, 24, 58, 57, 24, 31, 57, 73, 73,
1688 73, 31, 57, 19, 31, 86, 86, 119, 119, 19,
1689 86, 87, 119, 91, 92, 19, 21, 19, 21, 19,
1690 21, 19, 21, 19, 21, 88, 24, 57, 57, 54,
1691 57, 60, 60, 107, 22, 56, 19, 104, 10, 109,
1692 19, 106, 56, 57, 56, 104, 57, 73, 57, 73,
1693 56, 19, 58, 24, 104, 107, 107, 56, 19, 54,
1694 105, 119, 102, 57, 106, 104, 106, 102, 73, 73,
1695 31, 54, 19, 58, 102, 19, 19, 59, 63, 64,
1696 65, 110, 111, 24, 19, 104, 57, 102, 57, 57,
1697 24, 54, 110, 59, 59, 119, 59, 119, 59, 57,
1698 111, 105, 102, 104, 104, 58, 24, 57, 119, 119,
1699 119, 119, 19, 102, 102, 58, 105
1702 #define yyerrok (yyerrstatus = 0)
1703 #define yyclearin (yychar = YYEMPTY)
1704 #define YYEMPTY (-2)
1707 #define YYACCEPT goto yyacceptlab
1708 #define YYABORT goto yyabortlab
1709 #define YYERROR goto yyerrorlab
1712 /* Like YYERROR except do call yyerror. This remains here temporarily
1713 to ease the transition to the new meaning of YYERROR, for GCC.
1714 Once GCC version 2 has supplanted version 1, this can go. */
1716 #define YYFAIL goto yyerrlab
1718 #define YYRECOVERING() (!!yyerrstatus)
1720 #define YYBACKUP(Token, Value) \
1722 if (yychar == YYEMPTY && yylen == 1) \
1726 yytoken = YYTRANSLATE (yychar); \
1732 yyerror (YY_("syntax error: cannot back up")); \
1739 #define YYERRCODE 256
1742 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1743 If N is 0, then set CURRENT to the empty location which ends
1744 the previous symbol: RHS[0] (always defined). */
1746 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1747 #ifndef YYLLOC_DEFAULT
1748 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1752 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1753 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1754 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1755 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1759 (Current).first_line = (Current).last_line = \
1760 YYRHSLOC (Rhs, 0).last_line; \
1761 (Current).first_column = (Current).last_column = \
1762 YYRHSLOC (Rhs, 0).last_column; \
1768 /* YY_LOCATION_PRINT -- Print the location on the stream.
1769 This macro was not mandated originally: define only if we know
1770 we won't break user code: when these are the locations we know. */
1772 #ifndef YY_LOCATION_PRINT
1773 # if YYLTYPE_IS_TRIVIAL
1774 # define YY_LOCATION_PRINT(File, Loc) \
1775 fprintf (File, "%d.%d-%d.%d", \
1776 (Loc).first_line, (Loc).first_column, \
1777 (Loc).last_line, (Loc).last_column)
1779 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1784 /* YYLEX -- calling `yylex' with the right arguments. */
1787 # define YYLEX yylex (YYLEX_PARAM)
1789 # define YYLEX yylex ()
1792 /* Enable debugging if requested. */
1796 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1797 # define YYFPRINTF fprintf
1800 # define YYDPRINTF(Args) \
1806 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1810 YYFPRINTF (stderr, "%s ", Title); \
1811 yy_symbol_print (stderr, \
1813 YYFPRINTF (stderr, "\n"); \
1818 /*--------------------------------.
1819 | Print this symbol on YYOUTPUT. |
1820 `--------------------------------*/
1823 #if (defined __STDC__ || defined __C99__FUNC__ \
1824 || defined __cplusplus || defined _MSC_VER)
1826 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1829 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1832 YYSTYPE const * const yyvaluep;
1838 if (yytype < YYNTOKENS)
1839 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1851 /*--------------------------------.
1852 | Print this symbol on YYOUTPUT. |
1853 `--------------------------------*/
1855 #if (defined __STDC__ || defined __C99__FUNC__ \
1856 || defined __cplusplus || defined _MSC_VER)
1858 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1861 yy_symbol_print (yyoutput, yytype, yyvaluep)
1864 YYSTYPE const * const yyvaluep;
1867 if (yytype < YYNTOKENS)
1868 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1870 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1872 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1873 YYFPRINTF (yyoutput, ")");
1876 /*------------------------------------------------------------------.
1877 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1879 `------------------------------------------------------------------*/
1881 #if (defined __STDC__ || defined __C99__FUNC__ \
1882 || defined __cplusplus || defined _MSC_VER)
1884 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1887 yy_stack_print (yybottom, yytop)
1888 yytype_int16 *yybottom;
1889 yytype_int16 *yytop;
1892 YYFPRINTF (stderr, "Stack now");
1893 for (; yybottom <= yytop; yybottom++)
1895 int yybot = *yybottom;
1896 YYFPRINTF (stderr, " %d", yybot);
1898 YYFPRINTF (stderr, "\n");
1901 # define YY_STACK_PRINT(Bottom, Top) \
1904 yy_stack_print ((Bottom), (Top)); \
1908 /*------------------------------------------------.
1909 | Report that the YYRULE is going to be reduced. |
1910 `------------------------------------------------*/
1912 #if (defined __STDC__ || defined __C99__FUNC__ \
1913 || defined __cplusplus || defined _MSC_VER)
1915 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1918 yy_reduce_print (yyvsp, yyrule)
1923 int yynrhs = yyr2[yyrule];
1925 unsigned long int yylno = yyrline[yyrule];
1926 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1928 /* The symbols being reduced. */
1929 for (yyi = 0; yyi < yynrhs; yyi++)
1931 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1932 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1933 &(yyvsp[(yyi + 1) - (yynrhs)])
1935 YYFPRINTF (stderr, "\n");
1939 # define YY_REDUCE_PRINT(Rule) \
1942 yy_reduce_print (yyvsp, Rule); \
1945 /* Nonzero means print parse trace. It is left uninitialized so that
1946 multiple parsers can coexist. */
1948 #else /* !YYDEBUG */
1949 # define YYDPRINTF(Args)
1950 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1951 # define YY_STACK_PRINT(Bottom, Top)
1952 # define YY_REDUCE_PRINT(Rule)
1953 #endif /* !YYDEBUG */
1956 /* YYINITDEPTH -- initial size of the parser's stacks. */
1958 # define YYINITDEPTH 200
1961 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1962 if the built-in stack extension method is used).
1964 Do not make this value too large; the results are undefined if
1965 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1966 evaluated with infinite-precision integer arithmetic. */
1969 # define YYMAXDEPTH 10000
1977 # if defined __GLIBC__ && defined _STRING_H
1978 # define yystrlen strlen
1980 /* Return the length of YYSTR. */
1981 #if (defined __STDC__ || defined __C99__FUNC__ \
1982 || defined __cplusplus || defined _MSC_VER)
1984 yystrlen (const char *yystr)
1992 for (yylen = 0; yystr[yylen]; yylen++)
2000 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2001 # define yystpcpy stpcpy
2003 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2005 #if (defined __STDC__ || defined __C99__FUNC__ \
2006 || defined __cplusplus || defined _MSC_VER)
2008 yystpcpy (char *yydest, const char *yysrc)
2011 yystpcpy (yydest, yysrc)
2017 const char *yys = yysrc;
2019 while ((*yyd++ = *yys++) != '\0')
2028 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2029 quotes and backslashes, so that it's suitable for yyerror. The
2030 heuristic is that double-quoting is unnecessary unless the string
2031 contains an apostrophe, a comma, or backslash (other than
2032 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2033 null, do not copy; instead, return the length of what the result
2036 yytnamerr (char *yyres, const char *yystr)
2041 char const *yyp = yystr;
2048 goto do_not_strip_quotes;
2052 goto do_not_strip_quotes;
2065 do_not_strip_quotes: ;
2069 return yystrlen (yystr);
2071 return yystpcpy (yyres, yystr) - yyres;
2075 /* Copy into YYRESULT an error message about the unexpected token
2076 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2077 including the terminating null byte. If YYRESULT is null, do not
2078 copy anything; just return the number of bytes that would be
2079 copied. As a special case, return 0 if an ordinary "syntax error"
2080 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2081 size calculation. */
2083 yysyntax_error (char *yyresult, int yystate, int yychar)
2085 int yyn = yypact[yystate];
2087 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2091 int yytype = YYTRANSLATE (yychar);
2092 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2093 YYSIZE_T yysize = yysize0;
2095 int yysize_overflow = 0;
2096 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2097 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2101 /* This is so xgettext sees the translatable formats that are
2102 constructed on the fly. */
2103 YY_("syntax error, unexpected %s");
2104 YY_("syntax error, unexpected %s, expecting %s");
2105 YY_("syntax error, unexpected %s, expecting %s or %s");
2106 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2107 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2111 static char const yyunexpected[] = "syntax error, unexpected %s";
2112 static char const yyexpecting[] = ", expecting %s";
2113 static char const yyor[] = " or %s";
2114 char yyformat[sizeof yyunexpected
2115 + sizeof yyexpecting - 1
2116 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2117 * (sizeof yyor - 1))];
2118 char const *yyprefix = yyexpecting;
2120 /* Start YYX at -YYN if negative to avoid negative indexes in
2122 int yyxbegin = yyn < 0 ? -yyn : 0;
2124 /* Stay within bounds of both yycheck and yytname. */
2125 int yychecklim = YYLAST - yyn + 1;
2126 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2129 yyarg[0] = yytname[yytype];
2130 yyfmt = yystpcpy (yyformat, yyunexpected);
2132 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2133 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2135 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2139 yyformat[sizeof yyunexpected - 1] = '\0';
2142 yyarg[yycount++] = yytname[yyx];
2143 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2144 yysize_overflow |= (yysize1 < yysize);
2146 yyfmt = yystpcpy (yyfmt, yyprefix);
2150 yyf = YY_(yyformat);
2151 yysize1 = yysize + yystrlen (yyf);
2152 yysize_overflow |= (yysize1 < yysize);
2155 if (yysize_overflow)
2156 return YYSIZE_MAXIMUM;
2160 /* Avoid sprintf, as that infringes on the user's name space.
2161 Don't have undefined behavior even if the translation
2162 produced a string with the wrong number of "%s"s. */
2163 char *yyp = yyresult;
2165 while ((*yyp = *yyf) != '\0')
2167 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2169 yyp += yytnamerr (yyp, yyarg[yyi++]);
2182 #endif /* YYERROR_VERBOSE */
2185 /*-----------------------------------------------.
2186 | Release the memory associated to this symbol. |
2187 `-----------------------------------------------*/
2190 #if (defined __STDC__ || defined __C99__FUNC__ \
2191 || defined __cplusplus || defined _MSC_VER)
2193 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2196 yydestruct (yymsg, yytype, yyvaluep)
2206 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2216 /* Prevent warnings from -Wmissing-prototypes. */
2217 #ifdef YYPARSE_PARAM
2218 #if defined __STDC__ || defined __cplusplus
2219 int yyparse (void *YYPARSE_PARAM);
2223 #else /* ! YYPARSE_PARAM */
2224 #if defined __STDC__ || defined __cplusplus
2229 #endif /* ! YYPARSE_PARAM */
2232 /* The lookahead symbol. */
2235 /* The semantic value of the lookahead symbol. */
2238 /* Number of syntax errors so far. */
2243 /*-------------------------.
2244 | yyparse or yypush_parse. |
2245 `-------------------------*/
2247 #ifdef YYPARSE_PARAM
2248 #if (defined __STDC__ || defined __C99__FUNC__ \
2249 || defined __cplusplus || defined _MSC_VER)
2251 yyparse (void *YYPARSE_PARAM)
2254 yyparse (YYPARSE_PARAM)
2255 void *YYPARSE_PARAM;
2257 #else /* ! YYPARSE_PARAM */
2258 #if (defined __STDC__ || defined __C99__FUNC__ \
2259 || defined __cplusplus || defined _MSC_VER)
2272 /* Number of tokens to shift before error messages enabled. */
2275 /* The stacks and their tools:
2276 `yyss': related to states.
2277 `yyvs': related to semantic values.
2279 Refer to the stacks thru separate pointers, to allow yyoverflow
2280 to reallocate them elsewhere. */
2282 /* The state stack. */
2283 yytype_int16 yyssa[YYINITDEPTH];
2285 yytype_int16 *yyssp;
2287 /* The semantic value stack. */
2288 YYSTYPE yyvsa[YYINITDEPTH];
2292 YYSIZE_T yystacksize;
2296 /* Lookahead token as an internal (translated) token number. */
2298 /* The variables used to return semantic value and location from the
2303 /* Buffer for error messages, and its allocated size. */
2305 char *yymsg = yymsgbuf;
2306 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2309 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2311 /* The number of symbols on the RHS of the reduced rule.
2312 Keep to zero when no symbol should be popped. */
2318 yystacksize = YYINITDEPTH;
2320 YYDPRINTF ((stderr, "Starting parse\n"));
2325 yychar = YYEMPTY; /* Cause a token to be read. */
2327 /* Initialize stack pointers.
2328 Waste one element of value and location stack
2329 so that they stay on the same level as the state stack.
2330 The wasted elements are never initialized. */
2336 /*------------------------------------------------------------.
2337 | yynewstate -- Push a new state, which is found in yystate. |
2338 `------------------------------------------------------------*/
2340 /* In all cases, when you get here, the value and location stacks
2341 have just been pushed. So pushing a state here evens the stacks. */
2347 if (yyss + yystacksize - 1 <= yyssp)
2349 /* Get the current used size of the three stacks, in elements. */
2350 YYSIZE_T yysize = yyssp - yyss + 1;
2354 /* Give user a chance to reallocate the stack. Use copies of
2355 these so that the &'s don't force the real ones into
2357 YYSTYPE *yyvs1 = yyvs;
2358 yytype_int16 *yyss1 = yyss;
2360 /* Each stack pointer address is followed by the size of the
2361 data in use in that stack, in bytes. This used to be a
2362 conditional around just the two extra args, but that might
2363 be undefined if yyoverflow is a macro. */
2364 yyoverflow (YY_("memory exhausted"),
2365 &yyss1, yysize * sizeof (*yyssp),
2366 &yyvs1, yysize * sizeof (*yyvsp),
2372 #else /* no yyoverflow */
2373 # ifndef YYSTACK_RELOCATE
2374 goto yyexhaustedlab;
2376 /* Extend the stack our own way. */
2377 if (YYMAXDEPTH <= yystacksize)
2378 goto yyexhaustedlab;
2380 if (YYMAXDEPTH < yystacksize)
2381 yystacksize = YYMAXDEPTH;
2384 yytype_int16 *yyss1 = yyss;
2385 union yyalloc *yyptr =
2386 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2388 goto yyexhaustedlab;
2389 YYSTACK_RELOCATE (yyss_alloc, yyss);
2390 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2391 # undef YYSTACK_RELOCATE
2393 YYSTACK_FREE (yyss1);
2396 #endif /* no yyoverflow */
2398 yyssp = yyss + yysize - 1;
2399 yyvsp = yyvs + yysize - 1;
2401 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2402 (unsigned long int) yystacksize));
2404 if (yyss + yystacksize - 1 <= yyssp)
2408 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2410 if (yystate == YYFINAL)
2420 /* Do appropriate processing given the current state. Read a
2421 lookahead token if we need one and don't already have one. */
2423 /* First try to decide what to do without reference to lookahead token. */
2424 yyn = yypact[yystate];
2425 if (yyn == YYPACT_NINF)
2428 /* Not known => get a lookahead token if don't already have one. */
2430 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2431 if (yychar == YYEMPTY)
2433 YYDPRINTF ((stderr, "Reading a token: "));
2437 if (yychar <= YYEOF)
2439 yychar = yytoken = YYEOF;
2440 YYDPRINTF ((stderr, "Now at end of input.\n"));
2444 yytoken = YYTRANSLATE (yychar);
2445 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2448 /* If the proper action on seeing token YYTOKEN is to reduce or to
2449 detect an error, take that action. */
2451 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2456 if (yyn == 0 || yyn == YYTABLE_NINF)
2462 /* Count tokens shifted since error; after three, turn off error
2467 /* Shift the lookahead token. */
2468 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2470 /* Discard the shifted token. */
2479 /*-----------------------------------------------------------.
2480 | yydefault -- do the default action for the current state. |
2481 `-----------------------------------------------------------*/
2483 yyn = yydefact[yystate];
2489 /*-----------------------------.
2490 | yyreduce -- Do a reduction. |
2491 `-----------------------------*/
2493 /* yyn is the number of a rule to reduce with. */
2496 /* If YYLEN is nonzero, implement the default value of the action:
2499 Otherwise, the following line sets YYVAL to garbage.
2500 This behavior is undocumented and Bison
2501 users should not rely upon it. Assigning to YYVAL
2502 unconditionally makes the parser a bit smaller, and it avoids a
2503 GCC warning that YYVAL may be used uninitialized. */
2504 yyval = yyvsp[1-yylen];
2507 YY_REDUCE_PRINT (yyn);
2512 /* Line 1455 of yacc.c */
2519 /* Line 1455 of yacc.c */
2526 /* Line 1455 of yacc.c */
2533 /* Line 1455 of yacc.c */
2540 /* Line 1455 of yacc.c */
2543 Node *node = node_new (CCODE_NODE,
2545 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2546 "line_no", ccode_line,
2548 nodes = g_list_append(nodes,node);
2549 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2555 /* Line 1455 of yacc.c */
2558 Node *node = node_new (CCODE_NODE,
2560 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2561 "line_no", ccode_line,
2563 nodes = g_list_append(nodes,node);
2564 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2570 /* Line 1455 of yacc.c */
2573 Node *node = node_new (CCODE_NODE,
2575 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2576 "line_no", ccode_line,
2578 nodes = g_list_append(nodes,node);
2579 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2585 /* Line 1455 of yacc.c */
2588 Node *node = node_new (CCODE_NODE,
2590 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2591 "line_no", ccode_line,
2593 nodes = g_list_append(nodes,node);
2594 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2600 /* Line 1455 of yacc.c */
2603 Node *node = node_new (CCODE_NODE,
2605 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2606 "line_no", ccode_line,
2608 nodes = g_list_append(nodes,node);
2609 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2615 /* Line 1455 of yacc.c */
2618 Node *node = node_new (CCODE_NODE,
2620 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2621 "line_no", ccode_line,
2623 nodes = g_list_append(nodes,node);
2624 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2630 /* Line 1455 of yacc.c */
2633 Node *node = node_new (CCODE_NODE,
2635 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2636 "line_no", ccode_line,
2638 nodes = g_list_append(nodes,node);
2639 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2645 /* Line 1455 of yacc.c */
2652 /* Line 1455 of yacc.c */
2659 /* Line 1455 of yacc.c */
2666 /* Line 1455 of yacc.c */
2673 /* Line 1455 of yacc.c */
2680 /* Line 1455 of yacc.c */
2687 /* Line 1455 of yacc.c */
2694 /* Line 1455 of yacc.c */
2701 /* Line 1455 of yacc.c */
2704 ((Class *)class)->nodes = class_nodes;
2706 nodes = g_list_append(nodes,class);
2712 /* Line 1455 of yacc.c */
2715 ((Class *)class)->nodes = NULL;
2717 nodes = g_list_append(nodes,class);
2723 /* Line 1455 of yacc.c */
2726 class = node_new (CLASS_NODE,
2727 "otype:steal", (yyvsp[(2) - (5)].id),
2728 "ptype:steal", (yyvsp[(4) - (5)].id),
2729 "bonobo_object_class:steal", bonobo_object_class,
2730 "glade_xml", glade_xml,
2731 "interfaces:steal", interfaces,
2732 "chunk_size:steal", chunk_size,
2733 "abstract", abstract,
2735 bonobo_object_class = NULL;
2744 /* Line 1455 of yacc.c */
2747 if(strcmp((yyvsp[(2) - (4)].id),"abstract") == 0) {
2750 yyerror(_("parse error"));
2758 /* Line 1455 of yacc.c */
2761 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2762 g_free (chunk_size);
2763 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2764 } else if(strcmp((yyvsp[(2) - (5)].id),"BonoboObject") == 0) {
2765 g_free (bonobo_object_class);
2766 bonobo_object_class = g_strdup((yyvsp[(3) - (5)].id));
2768 yyerror(_("parse error"));
2776 /* Line 1455 of yacc.c */
2779 if (strcmp ((yyvsp[(2) - (5)].id), "interface") == 0) {
2780 interfaces = g_list_append (interfaces,
2781 g_strdup ((yyvsp[(3) - (5)].id)));
2783 yyerror(_("parse error"));
2791 /* Line 1455 of yacc.c */
2794 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2795 g_free (chunk_size);
2796 if(atoi((yyvsp[(3) - (5)].id)) != 0)
2797 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2801 yyerror(_("parse error"));
2809 /* Line 1455 of yacc.c */
2812 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2814 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2816 yyerror(_("parse error"));
2824 /* Line 1455 of yacc.c */
2827 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2829 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2831 yyerror(_("parse error"));
2839 /* Line 1455 of yacc.c */
2842 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2844 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2846 yyerror(_("parse error"));
2854 /* Line 1455 of yacc.c */
2857 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2859 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2861 yyerror(_("parse error"));
2869 /* Line 1455 of yacc.c */
2876 /* Line 1455 of yacc.c */
2883 /* Line 1455 of yacc.c */
2890 /* Line 1455 of yacc.c */
2893 if (strcmp ((yyvsp[(1) - (2)].id), "BonoboObject") != 0) {
2894 g_free ((yyvsp[(1) - (2)].id));
2895 yyerror (_("parse error"));
2898 g_free ((yyvsp[(1) - (2)].id));
2899 last_added_method->bonobo_object_func = TRUE;
2905 /* Line 1455 of yacc.c */
2908 if (strcmp ((yyvsp[(1) - (3)].id), "interface") != 0) {
2909 g_free ((yyvsp[(1) - (3)].id));
2910 g_free ((yyvsp[(2) - (3)].id));
2911 yyerror (_("parse error"));
2914 g_free ((yyvsp[(1) - (3)].id));
2915 node_set ((Node *)last_added_method,
2916 "interface:steal", (yyvsp[(2) - (3)].id),
2923 /* Line 1455 of yacc.c */
2930 /* Line 1455 of yacc.c */
2937 /* Line 1455 of yacc.c */
2944 /* Line 1455 of yacc.c */
2951 /* Line 1455 of yacc.c */
2953 { the_scope = PUBLIC_SCOPE; }
2958 /* Line 1455 of yacc.c */
2960 { the_scope = PRIVATE_SCOPE; }
2965 /* Line 1455 of yacc.c */
2967 { the_scope = PROTECTED_SCOPE; }
2972 /* Line 1455 of yacc.c */
2974 { the_scope = CLASS_SCOPE; }
2979 /* Line 1455 of yacc.c */
2982 if (strcmp ((yyvsp[(1) - (2)].id), "destroywith") == 0) {
2983 g_free ((yyvsp[(1) - (2)].id));
2984 destructor_unref = FALSE;
2985 destructor = (yyvsp[(2) - (2)].id);
2986 destructor_line = line_no;
2987 destructor_simple = TRUE;
2988 } else if (strcmp ((yyvsp[(1) - (2)].id), "unrefwith") == 0) {
2989 g_free ((yyvsp[(1) - (2)].id));
2990 destructor_unref = TRUE;
2991 destructor = (yyvsp[(2) - (2)].id);
2992 destructor_line = line_no;
2993 destructor_simple = TRUE;
2995 g_free ((yyvsp[(1) - (2)].id));
2996 g_free ((yyvsp[(2) - (2)].id));
2997 yyerror (_("parse error"));
3005 /* Line 1455 of yacc.c */
3008 if (strcmp ((yyvsp[(1) - (3)].id), "destroy") == 0) {
3009 g_free((yyvsp[(1) - (3)].id));
3010 destructor_unref = FALSE;
3011 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3012 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3013 destructor_line = ccode_line;
3014 destructor_simple = FALSE;
3015 } else if (strcmp ((yyvsp[(1) - (3)].id), "unref") == 0) {
3016 g_free ((yyvsp[(1) - (3)].id));
3017 destructor_unref = TRUE;
3018 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3019 g_string_free ((yyvsp[(3) - (3)].cbuf), FALSE);
3020 destructor_line = ccode_line;
3021 destructor_simple = FALSE;
3023 g_free ((yyvsp[(1) - (3)].id));
3024 g_string_free ((yyvsp[(3) - (3)].cbuf), TRUE);
3025 yyerror (_("parse error"));
3033 /* Line 1455 of yacc.c */
3036 initializer = (yyvsp[(2) - (2)].id);
3037 initializer_line = ccode_line;
3043 /* Line 1455 of yacc.c */
3046 initializer = ((yyvsp[(3) - (3)].cbuf))->str;
3047 initializer_line = ccode_line;
3048 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3054 /* Line 1455 of yacc.c */
3061 /* Line 1455 of yacc.c */
3068 /* Line 1455 of yacc.c */
3070 { destructor = NULL; }
3075 /* Line 1455 of yacc.c */
3077 { initializer = NULL; }
3082 /* Line 1455 of yacc.c */
3085 if (strcmp ((yyvsp[(1) - (1)].id), "GladeXML") == 0) {
3086 glade_widget = TRUE;
3088 yyerror(_("parse error"));
3096 /* Line 1455 of yacc.c */
3097 #line 1000 "parse.y"
3106 /* Line 1455 of yacc.c */
3107 #line 1006 "parse.y"
3109 push_variable((yyvsp[(3) - (5)].id), the_scope,(yyvsp[(1) - (5)].line), NULL);
3115 /* Line 1455 of yacc.c */
3116 #line 1009 "parse.y"
3118 push_variable((yyvsp[(3) - (6)].id), the_scope, (yyvsp[(1) - (6)].line), (yyvsp[(4) - (6)].id));
3124 /* Line 1455 of yacc.c */
3125 #line 1014 "parse.y"
3128 if(strcmp((yyvsp[(6) - (12)].id),"get")==0 &&
3129 strcmp((yyvsp[(9) - (12)].id),"set")==0) {
3130 Type *type = pop_type();
3131 g_free ((yyvsp[(6) - (12)].id));
3132 g_free ((yyvsp[(9) - (12)].id));
3133 node = node_new (ARGUMENT_NODE,
3134 "gtktype:steal", (yyvsp[(3) - (12)].id),
3135 "atype:steal", type,
3136 "flags:steal", (yyvsp[(2) - (12)].list),
3137 "name:steal", (yyvsp[(4) - (12)].id),
3138 "get:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3139 "get_line", (yyvsp[(7) - (12)].line),
3140 "set:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3141 "set_line", (yyvsp[(10) - (12)].line),
3142 "line_no", (yyvsp[(1) - (12)].line),
3145 class_nodes = g_list_append(class_nodes,node);
3147 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3148 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3150 } else if(strcmp((yyvsp[(6) - (12)].id),"set")==0 &&
3151 strcmp((yyvsp[(9) - (12)].id),"get")==0) {
3152 Type *type = pop_type();
3153 g_free ((yyvsp[(6) - (12)].id));
3154 g_free ((yyvsp[(9) - (12)].id));
3155 node = node_new (ARGUMENT_NODE,
3156 "gtktype:steal", (yyvsp[(3) - (12)].id),
3157 "atype:steal", type,
3158 "flags:steal", (yyvsp[(2) - (12)].list),
3159 "name:steal", (yyvsp[(4) - (12)].id),
3160 "get:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3161 "get_line", (yyvsp[(10) - (12)].line),
3162 "set:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3163 "set_line", (yyvsp[(7) - (12)].line),
3164 "line_no", (yyvsp[(1) - (12)].line),
3166 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3167 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3168 class_nodes = g_list_append(class_nodes,node);
3170 g_free ((yyvsp[(3) - (12)].id));
3171 g_free ((yyvsp[(4) - (12)].id));
3172 g_free ((yyvsp[(6) - (12)].id));
3173 g_free ((yyvsp[(9) - (12)].id));
3174 g_list_foreach ((yyvsp[(2) - (12)].list), (GFunc)g_free, NULL);
3175 g_list_free ((yyvsp[(2) - (12)].list));
3176 g_string_free ((yyvsp[(11) - (12)].cbuf), TRUE);
3177 g_string_free ((yyvsp[(8) - (12)].cbuf), TRUE);
3178 yyerror (_("parse error"));
3182 if ((yyvsp[(5) - (12)].id) != NULL) {
3183 Argument *arg = (Argument *)node;
3184 export_accessors (arg->name,
3185 arg->get != NULL, arg->get_line,
3186 arg->set != NULL, arg->set_line,
3190 g_free ((yyvsp[(5) - (12)].id));
3198 /* Line 1455 of yacc.c */
3199 #line 1082 "parse.y"
3202 if(strcmp((yyvsp[(6) - (9)].id), "get") == 0) {
3203 Type *type = pop_type();
3204 g_free ((yyvsp[(6) - (9)].id));
3205 node = node_new (ARGUMENT_NODE,
3206 "gtktype:steal", (yyvsp[(3) - (9)].id),
3207 "atype:steal", type,
3208 "flags:steal", (yyvsp[(2) - (9)].list),
3209 "name:steal", (yyvsp[(4) - (9)].id),
3210 "get:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3211 "get_line", (yyvsp[(7) - (9)].line),
3212 "line_no", (yyvsp[(1) - (9)].line),
3215 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3216 class_nodes = g_list_append(class_nodes, node);
3217 } else if(strcmp((yyvsp[(6) - (9)].id), "set") == 0) {
3218 Type *type = pop_type();
3219 g_free ((yyvsp[(6) - (9)].id));
3220 node = node_new (ARGUMENT_NODE,
3221 "gtktype:steal", (yyvsp[(3) - (9)].id),
3222 "atype:steal", type,
3223 "flags:steal", (yyvsp[(2) - (9)].list),
3224 "name:steal", (yyvsp[(4) - (9)].id),
3225 "set:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3226 "set_line", (yyvsp[(7) - (9)].line),
3227 "line_no", (yyvsp[(1) - (9)].line),
3230 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3231 class_nodes = g_list_append (class_nodes, node);
3233 g_free ((yyvsp[(6) - (9)].id));
3234 g_free ((yyvsp[(3) - (9)].id));
3235 g_free ((yyvsp[(4) - (9)].id));
3236 g_list_foreach ((yyvsp[(2) - (9)].list), (GFunc)g_free, NULL);
3237 g_list_free ((yyvsp[(2) - (9)].list));
3238 g_string_free ((yyvsp[(8) - (9)].cbuf), TRUE);
3239 yyerror(_("parse error"));
3243 if ((yyvsp[(5) - (9)].id) != NULL) {
3244 Argument *arg = (Argument *)node;
3245 export_accessors (arg->name,
3246 arg->get != NULL, arg->get_line,
3247 arg->set != NULL, arg->set_line,
3251 g_free ((yyvsp[(5) - (9)].id));
3258 /* Line 1455 of yacc.c */
3259 #line 1136 "parse.y"
3262 char *get, *set = NULL;
3267 if(strcmp((yyvsp[(6) - (6)].id), "link")!=0 &&
3268 strcmp((yyvsp[(6) - (6)].id), "stringlink")!=0 &&
3269 strcmp((yyvsp[(6) - (6)].id), "objectlink")!=0) {
3270 g_free((yyvsp[(6) - (6)].id));
3271 g_free((yyvsp[(3) - (6)].id));
3272 g_free((yyvsp[(4) - (6)].id));
3273 g_list_foreach((yyvsp[(2) - (6)].list),(GFunc)g_free,NULL);
3274 g_list_free((yyvsp[(2) - (6)].list));
3275 yyerror(_("parse error"));
3281 var = find_var_or_die((yyvsp[(4) - (6)].id), (yyvsp[(1) - (6)].line));
3282 if(var->scope == PRIVATE_SCOPE) {
3283 root = "self->_priv";
3284 } else if(var->scope == CLASS_SCOPE) {
3285 root = "SELF_GET_CLASS(self)";
3287 error_print(GOB_ERROR, (yyvsp[(1) - (6)].line),
3288 _("Self aliases needed when autolinking to a classwide member"));
3293 if(strcmp((yyvsp[(6) - (6)].id), "link")==0) {
3294 set = g_strdup_printf("%s->%s = ARG;",
3295 root, (yyvsp[(4) - (6)].id));
3296 } else if(strcmp((yyvsp[(6) - (6)].id), "stringlink")==0) {
3297 set = g_strdup_printf("g_free (%s->%s); "
3298 "%s->%s = g_strdup (ARG);",
3299 root, (yyvsp[(4) - (6)].id),
3300 root, (yyvsp[(4) - (6)].id));
3301 } else if(strcmp((yyvsp[(6) - (6)].id), "objectlink")==0) {
3302 set = g_strdup_printf(
3304 "g_object_ref (G_OBJECT (ARG)); "
3305 "if (%s->%s != NULL) "
3306 "g_object_unref (G_OBJECT (%s->%s)); "
3308 root, (yyvsp[(4) - (6)].id),
3309 root, (yyvsp[(4) - (6)].id),
3310 root, (yyvsp[(4) - (6)].id));
3312 g_assert_not_reached();
3315 get = g_strdup_printf("ARG = %s->%s;", root, (yyvsp[(4) - (6)].id));
3317 g_free ((yyvsp[(6) - (6)].id));
3320 type = (Type *)node_copy ((Node *)var->vtype);
3322 node = node_new (ARGUMENT_NODE,
3323 "gtktype:steal", (yyvsp[(3) - (6)].id),
3324 "atype:steal", type,
3325 "flags:steal", (yyvsp[(2) - (6)].list),
3326 "name:steal", (yyvsp[(4) - (6)].id),
3328 "get_line", (yyvsp[(1) - (6)].line),
3330 "set_line", (yyvsp[(1) - (6)].line),
3331 "line_no", (yyvsp[(1) - (6)].line),
3334 if ((yyvsp[(5) - (6)].id) != NULL) {
3335 Argument *arg = (Argument *)node;
3336 export_accessors (arg->name,
3337 arg->get != NULL, arg->get_line,
3338 arg->set != NULL, arg->set_line,
3342 g_free ((yyvsp[(5) - (6)].id));
3345 class_nodes = g_list_append (class_nodes, node);
3351 /* Line 1455 of yacc.c */
3352 #line 1225 "parse.y"
3354 if (strcmp ((yyvsp[(2) - (3)].id), "export")!=0) {
3355 g_free ((yyvsp[(2) - (3)].id));
3356 yyerror (_("parse error"));
3359 (yyval.id) = (yyvsp[(2) - (3)].id);
3365 /* Line 1455 of yacc.c */
3366 #line 1233 "parse.y"
3374 /* Line 1455 of yacc.c */
3375 #line 1238 "parse.y"
3378 node_set ((Node *)property,
3379 "line_no", (yyvsp[(1) - (11)].line),
3380 "gtktype:steal", debool ((yyvsp[(2) - (11)].id)),
3381 "name:steal", (yyvsp[(3) - (11)].id),
3383 if (strcmp ((yyvsp[(5) - (11)].id), "get") == 0 &&
3384 strcmp ((yyvsp[(8) - (11)].id), "set") == 0) {
3385 node_set ((Node *)property,
3386 "get:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3387 "get_line", (yyvsp[(6) - (11)].line),
3388 "set:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3389 "set_line", (yyvsp[(9) - (11)].line),
3391 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3392 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3393 g_free ((yyvsp[(5) - (11)].id));
3394 g_free ((yyvsp[(8) - (11)].id));
3395 } else if (strcmp ((yyvsp[(5) - (11)].id), "set") == 0 &&
3396 strcmp ((yyvsp[(8) - (11)].id), "get") == 0) {
3397 node_set ((Node *)property,
3398 "get:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3399 "get_line", (yyvsp[(9) - (11)].line),
3400 "set:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3401 "set_line", (yyvsp[(6) - (11)].line),
3403 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3404 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3405 g_free ((yyvsp[(5) - (11)].id));
3406 g_free ((yyvsp[(8) - (11)].id));
3408 g_string_free ((yyvsp[(7) - (11)].cbuf), TRUE);
3409 g_string_free ((yyvsp[(10) - (11)].cbuf), TRUE);
3410 g_free ((yyvsp[(5) - (11)].id));
3411 g_free ((yyvsp[(8) - (11)].id));
3412 node_free ((Node *)property);
3414 yyerror (_("parse error"));
3417 property_link_and_export ((Node *)property);
3418 if (property != NULL) {
3419 class_nodes = g_list_append (class_nodes,
3428 /* Line 1455 of yacc.c */
3429 #line 1286 "parse.y"
3432 node_set ((Node *)property,
3433 "line_no", (yyvsp[(1) - (8)].line),
3434 "gtktype:steal", debool ((yyvsp[(2) - (8)].id)),
3435 "name:steal", (yyvsp[(3) - (8)].id),
3437 if (strcmp ((yyvsp[(5) - (8)].id), "get") == 0) {
3438 node_set ((Node *)property,
3439 "get:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3440 "get_line", (yyvsp[(6) - (8)].line),
3442 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3443 g_free ((yyvsp[(5) - (8)].id));
3444 } else if (strcmp ((yyvsp[(5) - (8)].id), "set") == 0) {
3445 node_set ((Node *)property,
3446 "set:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3447 "set_line", (yyvsp[(6) - (8)].line),
3449 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3450 g_free ((yyvsp[(5) - (8)].id));
3452 g_string_free ((yyvsp[(7) - (8)].cbuf), TRUE);
3453 g_free ((yyvsp[(5) - (8)].id));
3454 node_free ((Node *)property);
3456 yyerror (_("parse error"));
3459 property_link_and_export ((Node *)property);
3460 if (property != NULL) {
3461 class_nodes = g_list_append (class_nodes,
3470 /* Line 1455 of yacc.c */
3471 #line 1322 "parse.y"
3474 node_set ((Node *)property,
3475 "line_no", (yyvsp[(1) - (5)].line),
3476 "gtktype:steal", debool ((yyvsp[(2) - (5)].id)),
3477 "name:steal", (yyvsp[(3) - (5)].id),
3479 property_link_and_export ((Node *)property);
3480 if (property != NULL) {
3481 class_nodes = g_list_append (class_nodes,
3490 /* Line 1455 of yacc.c */
3491 #line 1338 "parse.y"
3497 /* Line 1455 of yacc.c */
3498 #line 1339 "parse.y"
3504 /* Line 1455 of yacc.c */
3505 #line 1342 "parse.y"
3511 /* Line 1455 of yacc.c */
3512 #line 1343 "parse.y"
3518 /* Line 1455 of yacc.c */
3519 #line 1346 "parse.y"
3520 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3525 /* Line 1455 of yacc.c */
3526 #line 1347 "parse.y"
3528 if (strcmp ((yyvsp[(1) - (4)].id), "_") != 0) {
3529 g_free ((yyvsp[(1) - (4)].id));
3530 yyerror(_("parse error"));
3533 g_free ((yyvsp[(1) - (4)].id));
3534 (yyval.id) = g_strconcat ("_(", (yyvsp[(3) - (4)].id), ")", NULL);
3535 g_free ((yyvsp[(3) - (4)].id));
3541 /* Line 1455 of yacc.c */
3542 #line 1359 "parse.y"
3543 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3548 /* Line 1455 of yacc.c */
3549 #line 1360 "parse.y"
3550 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3555 /* Line 1455 of yacc.c */
3556 #line 1363 "parse.y"
3559 node_set ((Node *)property,
3560 "nick:steal", (yyvsp[(3) - (3)].id),
3567 /* Line 1455 of yacc.c */
3568 #line 1369 "parse.y"
3571 node_set ((Node *)property,
3572 "blurb:steal", (yyvsp[(3) - (3)].id),
3579 /* Line 1455 of yacc.c */
3580 #line 1375 "parse.y"
3583 node_set ((Node *)property,
3584 "maximum:steal", (yyvsp[(3) - (3)].id),
3591 /* Line 1455 of yacc.c */
3592 #line 1381 "parse.y"
3595 node_set ((Node *)property,
3596 "minimum:steal", (yyvsp[(3) - (3)].id),
3603 /* Line 1455 of yacc.c */
3604 #line 1387 "parse.y"
3607 node_set ((Node *)property,
3608 "default_value:steal", (yyvsp[(3) - (3)].id),
3615 /* Line 1455 of yacc.c */
3616 #line 1393 "parse.y"
3619 node_set ((Node *)property,
3620 "flags:steal", (yyvsp[(3) - (3)].list),
3627 /* Line 1455 of yacc.c */
3628 #line 1399 "parse.y"
3630 Type *type = pop_type ();
3632 node_set ((Node *)property,
3633 "ptype:steal", type,
3640 /* Line 1455 of yacc.c */
3641 #line 1406 "parse.y"
3644 node_set ((Node *)property,
3645 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3652 /* Line 1455 of yacc.c */
3653 #line 1412 "parse.y"
3656 node_set ((Node *)property,
3657 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3664 /* Line 1455 of yacc.c */
3665 #line 1418 "parse.y"
3668 node_set ((Node *)property,
3669 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3676 /* Line 1455 of yacc.c */
3677 #line 1424 "parse.y"
3680 node_set ((Node *)property,
3681 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3688 /* Line 1455 of yacc.c */
3689 #line 1430 "parse.y"
3692 node_set ((Node *)property,
3693 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3700 /* Line 1455 of yacc.c */
3701 #line 1436 "parse.y"
3704 node_set ((Node *)property,
3705 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3712 /* Line 1455 of yacc.c */
3713 #line 1442 "parse.y"
3716 node_set ((Node *)property,
3717 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3724 /* Line 1455 of yacc.c */
3725 #line 1448 "parse.y"
3728 node_set ((Node *)property,
3729 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3736 /* Line 1455 of yacc.c */
3737 #line 1454 "parse.y"
3740 node_set ((Node *)property,
3741 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3748 /* Line 1455 of yacc.c */
3749 #line 1460 "parse.y"
3752 node_set ((Node *)property,
3753 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3760 /* Line 1455 of yacc.c */
3761 #line 1466 "parse.y"
3764 if (strcmp ((yyvsp[(1) - (1)].id), "override") == 0) {
3765 g_free((yyvsp[(1) - (1)].id));
3766 node_set ((Node *)property,
3769 } else if (strcmp ((yyvsp[(1) - (1)].id), "link") == 0) {
3770 g_free((yyvsp[(1) - (1)].id));
3771 node_set ((Node *)property,
3774 } else if (strcmp ((yyvsp[(1) - (1)].id), "export") == 0) {
3775 g_free((yyvsp[(1) - (1)].id));
3776 node_set ((Node *)property,
3780 g_free((yyvsp[(1) - (1)].id));
3781 yyerror(_("parse error"));
3789 /* Line 1455 of yacc.c */
3790 #line 1491 "parse.y"
3792 if(strcmp((yyvsp[(3) - (5)].id),"type")!=0) {
3793 g_free((yyvsp[(1) - (5)].id));
3794 g_free((yyvsp[(3) - (5)].id));
3795 yyerror(_("parse error"));
3798 (yyval.id) = debool ((yyvsp[(1) - (5)].id));
3804 /* Line 1455 of yacc.c */
3805 #line 1500 "parse.y"
3807 (yyval.id) = debool ((yyvsp[(1) - (1)].id));
3808 typestack = g_list_prepend(typestack,NULL);
3814 /* Line 1455 of yacc.c */
3815 #line 1506 "parse.y"
3816 { (yyval.list) = (yyvsp[(2) - (3)].list); }
3821 /* Line 1455 of yacc.c */
3822 #line 1507 "parse.y"
3823 { (yyval.list) = NULL; }
3828 /* Line 1455 of yacc.c */
3829 #line 1510 "parse.y"
3831 (yyval.list) = g_list_append((yyvsp[(3) - (3)].list),(yyvsp[(1) - (3)].id));
3837 /* Line 1455 of yacc.c */
3838 #line 1513 "parse.y"
3840 (yyval.list) = g_list_append(NULL,(yyvsp[(1) - (1)].id));
3846 /* Line 1455 of yacc.c */
3847 #line 1519 "parse.y"
3849 Node *node = node_new (TYPE_NODE,
3850 "name:steal", (yyvsp[(1) - (2)].id),
3851 "pointer:steal", (yyvsp[(2) - (2)].id),
3853 typestack = g_list_prepend(typestack,node);
3859 /* Line 1455 of yacc.c */
3860 #line 1526 "parse.y"
3862 Node *node = node_new (TYPE_NODE,
3863 "name:steal", (yyvsp[(1) - (1)].id),
3865 typestack = g_list_prepend(typestack,node);
3871 /* Line 1455 of yacc.c */
3872 #line 1535 "parse.y"
3874 (yyval.id) = (yyvsp[(1) - (1)].id);
3880 /* Line 1455 of yacc.c */
3881 #line 1538 "parse.y"
3883 (yyval.id) = (yyvsp[(1) - (1)].id);
3889 /* Line 1455 of yacc.c */
3890 #line 1541 "parse.y"
3892 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3893 g_free((yyvsp[(2) - (2)].id));
3899 /* Line 1455 of yacc.c */
3900 #line 1545 "parse.y"
3902 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3903 g_free((yyvsp[(1) - (2)].id));
3909 /* Line 1455 of yacc.c */
3910 #line 1549 "parse.y"
3912 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3913 g_free((yyvsp[(2) - (2)].id));
3919 /* Line 1455 of yacc.c */
3920 #line 1553 "parse.y"
3922 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (3)].id), " ",
3923 (yyvsp[(3) - (3)].id), NULL);
3924 g_free((yyvsp[(3) - (3)].id));
3930 /* Line 1455 of yacc.c */
3931 #line 1558 "parse.y"
3933 (yyval.id) = g_strconcat((yyvsp[(1) - (3)].id), " ",
3934 (yyvsp[(2) - (3)].id), " const", NULL);
3935 g_free((yyvsp[(2) - (3)].id));
3941 /* Line 1455 of yacc.c */
3942 #line 1566 "parse.y"
3944 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3945 g_free((yyvsp[(2) - (2)].id));
3951 /* Line 1455 of yacc.c */
3952 #line 1570 "parse.y"
3954 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3955 g_free((yyvsp[(1) - (2)].id));
3956 g_free((yyvsp[(2) - (2)].id));
3962 /* Line 1455 of yacc.c */
3963 #line 1575 "parse.y"
3965 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3966 g_free((yyvsp[(2) - (2)].id));
3972 /* Line 1455 of yacc.c */
3973 #line 1579 "parse.y"
3975 (yyval.id) = (yyvsp[(1) - (1)].id);
3981 /* Line 1455 of yacc.c */
3982 #line 1582 "parse.y"
3984 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3985 g_free((yyvsp[(1) - (2)].id));
3991 /* Line 1455 of yacc.c */
3992 #line 1586 "parse.y"
3994 (yyval.id) = g_strdup((yyvsp[(1) - (1)].id));
4000 /* Line 1455 of yacc.c */
4001 #line 1589 "parse.y"
4003 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
4009 /* Line 1455 of yacc.c */
4010 #line 1594 "parse.y"
4011 { (yyval.id) = "void"; }
4016 /* Line 1455 of yacc.c */
4017 #line 1595 "parse.y"
4018 { (yyval.id) = "char"; }
4023 /* Line 1455 of yacc.c */
4024 #line 1596 "parse.y"
4025 { (yyval.id) = "short"; }
4030 /* Line 1455 of yacc.c */
4031 #line 1597 "parse.y"
4032 { (yyval.id) = "int"; }
4037 /* Line 1455 of yacc.c */
4038 #line 1598 "parse.y"
4039 { (yyval.id) = "long"; }
4044 /* Line 1455 of yacc.c */
4045 #line 1599 "parse.y"
4046 { (yyval.id) = "float"; }
4051 /* Line 1455 of yacc.c */
4052 #line 1600 "parse.y"
4053 { (yyval.id) = "double"; }
4058 /* Line 1455 of yacc.c */
4059 #line 1601 "parse.y"
4060 { (yyval.id) = "signed"; }
4065 /* Line 1455 of yacc.c */
4066 #line 1602 "parse.y"
4067 { (yyval.id) = "unsigned"; }
4072 /* Line 1455 of yacc.c */
4073 #line 1605 "parse.y"
4074 { (yyval.id) = "struct"; }
4079 /* Line 1455 of yacc.c */
4080 #line 1606 "parse.y"
4081 { (yyval.id) = "union"; }
4086 /* Line 1455 of yacc.c */
4087 #line 1607 "parse.y"
4088 { (yyval.id) = "enum"; }
4093 /* Line 1455 of yacc.c */
4094 #line 1610 "parse.y"
4095 { (yyval.id) = g_strdup("*"); }
4100 /* Line 1455 of yacc.c */
4101 #line 1611 "parse.y"
4102 { (yyval.id) = g_strdup("* const"); }
4107 /* Line 1455 of yacc.c */
4108 #line 1612 "parse.y"
4110 (yyval.id) = g_strconcat("*", (yyvsp[(2) - (2)].id), NULL);
4111 g_free((yyvsp[(2) - (2)].id));
4117 /* Line 1455 of yacc.c */
4118 #line 1616 "parse.y"
4120 (yyval.id) = g_strconcat("* const", (yyvsp[(3) - (3)].id), NULL);
4121 g_free((yyvsp[(3) - (3)].id));
4127 /* Line 1455 of yacc.c */
4128 #line 1623 "parse.y"
4130 if(strcmp((yyvsp[(1) - (2)].id), "first")==0)
4131 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4132 else if(strcmp((yyvsp[(1) - (2)].id), "last")==0)
4133 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4135 yyerror(_("signal must be 'first' or 'last'"));
4136 g_free((yyvsp[(1) - (2)].id));
4139 g_free((yyvsp[(1) - (2)].id));
4145 /* Line 1455 of yacc.c */
4146 #line 1635 "parse.y"
4148 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4154 /* Line 1455 of yacc.c */
4155 #line 1641 "parse.y"
4157 if(strcmp((yyvsp[(2) - (3)].id),"first")==0)
4158 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4159 else if(strcmp((yyvsp[(2) - (3)].id),"last")==0)
4160 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4162 yyerror(_("signal must be 'first' or 'last'"));
4163 g_free((yyvsp[(2) - (3)].id));
4166 g_free((yyvsp[(2) - (3)].id));
4172 /* Line 1455 of yacc.c */
4173 #line 1653 "parse.y"
4175 if(strcmp((yyvsp[(1) - (3)].id),"first")==0)
4176 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4177 else if(strcmp((yyvsp[(1) - (3)].id),"last")==0)
4178 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4180 yyerror(_("signal must be 'first' or 'last'"));
4181 g_free((yyvsp[(1) - (3)].id));
4184 g_free((yyvsp[(1) - (3)].id));
4190 /* Line 1455 of yacc.c */
4191 #line 1665 "parse.y"
4193 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4199 /* Line 1455 of yacc.c */
4200 #line 1668 "parse.y"
4202 /* the_scope was default thus public */
4203 the_scope = PUBLIC_SCOPE;
4209 /* Line 1455 of yacc.c */
4210 #line 1674 "parse.y"
4212 gtktypes = g_list_prepend(gtktypes, debool ((yyvsp[(1) - (4)].id)));
4218 /* Line 1455 of yacc.c */
4219 #line 1679 "parse.y"
4221 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(3) - (3)].id)));
4227 /* Line 1455 of yacc.c */
4228 #line 1682 "parse.y"
4230 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(1) - (1)].id)));
4236 /* Line 1455 of yacc.c */
4237 #line 1687 "parse.y"
4238 { (yyval.cbuf) = (yyvsp[(2) - (2)].cbuf); }
4243 /* Line 1455 of yacc.c */
4244 #line 1688 "parse.y"
4245 { (yyval.cbuf) = NULL; }
4250 /* Line 1455 of yacc.c */
4251 #line 1692 "parse.y"
4254 yyerror(_("signal without 'self' as "
4255 "first parameter"));
4256 free_all_global_state();
4259 if(the_scope == CLASS_SCOPE) {
4260 yyerror(_("a method cannot be of class scope"));
4261 free_all_global_state();
4264 if (funcattrs != NULL) {
4265 char *error = g_strdup_printf
4266 (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4271 push_function(the_scope, (yyvsp[(3) - (10)].sigtype),NULL,
4272 (yyvsp[(5) - (10)].id), (yyvsp[(10) - (10)].cbuf),(yyvsp[(1) - (10)].line),
4273 ccode_line, vararg, (yyvsp[(2) - (10)].list));
4279 /* Line 1455 of yacc.c */
4280 #line 1715 "parse.y"
4283 yyerror(_("signal without 'self' as "
4284 "first parameter"));
4285 free_all_global_state();
4288 if(the_scope == CLASS_SCOPE) {
4289 yyerror(_("a method cannot be of class scope"));
4290 free_all_global_state();
4293 if (funcattrs != NULL) {
4294 char *error = g_strdup_printf
4295 (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4300 push_function(the_scope, (yyvsp[(4) - (11)].sigtype), NULL,
4301 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf), (yyvsp[(2) - (11)].line),
4302 ccode_line, vararg, (yyvsp[(3) - (11)].list));
4308 /* Line 1455 of yacc.c */
4309 #line 1738 "parse.y"
4312 yyerror(_("virtual method without 'self' as "
4313 "first parameter"));
4314 free_all_global_state();
4317 if(the_scope == CLASS_SCOPE) {
4318 yyerror(_("a method cannot be of class scope"));
4319 free_all_global_state();
4322 if (funcattrs != NULL) {
4323 char *error = g_strdup_printf
4324 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4329 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4330 (yyvsp[(9) - (9)].cbuf), (yyvsp[(1) - (9)].line),
4331 ccode_line, vararg, NULL);
4337 /* Line 1455 of yacc.c */
4338 #line 1761 "parse.y"
4341 yyerror(_("virtual method without 'self' as "
4342 "first parameter"));
4343 free_all_global_state();
4346 if(the_scope == CLASS_SCOPE) {
4347 yyerror(_("a method cannot be of class scope"));
4348 free_all_global_state();
4351 if (funcattrs != NULL) {
4352 char *error = g_strdup_printf
4353 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4358 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4359 (yyvsp[(9) - (9)].cbuf), (yyvsp[(2) - (9)].line),
4360 ccode_line, vararg, NULL);
4366 /* Line 1455 of yacc.c */
4367 #line 1784 "parse.y"
4370 yyerror(_("virtual method without 'szelf' as "
4371 "first parameter"));
4372 free_all_global_state();
4375 if (funcattrs != NULL) {
4376 char *error = g_strdup_printf
4377 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4382 push_function(PUBLIC_SCOPE, VIRTUAL_METHOD, NULL,
4383 (yyvsp[(3) - (8)].id), (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line),
4384 ccode_line, vararg, NULL);
4390 /* Line 1455 of yacc.c */
4391 #line 1802 "parse.y"
4393 if (funcattrs != NULL) {
4394 char *error = g_strdup_printf
4395 (_("function attribute macros ('%s' in this case) may not be used with override methods"),
4400 push_function(NO_SCOPE, OVERRIDE_METHOD, (yyvsp[(3) - (11)].id),
4401 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf),
4402 (yyvsp[(1) - (11)].line), ccode_line,
4409 /* Line 1455 of yacc.c */
4410 #line 1815 "parse.y"
4412 if(the_scope == CLASS_SCOPE) {
4413 yyerror(_("a method cannot be of class scope"));
4414 free_all_global_state();
4417 push_function(the_scope, REGULAR_METHOD, NULL, (yyvsp[(3) - (8)].id),
4418 (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line), ccode_line,
4425 /* Line 1455 of yacc.c */
4426 #line 1825 "parse.y"
4428 if(strcmp((yyvsp[(1) - (5)].id), "init")==0) {
4429 push_init_arg((yyvsp[(3) - (5)].id),FALSE);
4430 push_function(NO_SCOPE, INIT_METHOD, NULL,
4431 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4432 ccode_line, FALSE, NULL);
4433 } else if(strcmp((yyvsp[(1) - (5)].id), "class_init")==0) {
4434 push_init_arg((yyvsp[(3) - (5)].id),TRUE);
4435 push_function(NO_SCOPE, CLASS_INIT_METHOD, NULL,
4436 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4437 ccode_line, FALSE, NULL);
4438 } else if(strcmp((yyvsp[(1) - (5)].id), "constructor")==0) {
4439 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4440 push_function(NO_SCOPE, CONSTRUCTOR_METHOD, NULL,
4441 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4442 ccode_line, FALSE, NULL);
4443 } else if(strcmp((yyvsp[(1) - (5)].id), "dispose")==0) {
4444 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4445 push_function(NO_SCOPE, DISPOSE_METHOD, NULL,
4446 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4447 ccode_line, FALSE, NULL);
4448 } else if(strcmp((yyvsp[(1) - (5)].id), "finalize")==0) {
4449 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4450 push_function(NO_SCOPE, FINALIZE_METHOD, NULL,
4451 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4452 ccode_line, FALSE, NULL);
4455 g_free((yyvsp[(1) - (5)].id));
4456 g_free((yyvsp[(3) - (5)].id));
4457 g_string_free((yyvsp[(5) - (5)].cbuf),TRUE);
4458 yyerror(_("parse error "
4459 "(untyped blocks must be init, "
4460 "class_init, constructor, dispose "
4469 /* Line 1455 of yacc.c */
4470 #line 1865 "parse.y"
4472 g_free(funcattrs); funcattrs = NULL;
4473 g_free(onerror); onerror = NULL;
4474 g_free(defreturn); defreturn = NULL;
4475 if(!set_attr_value((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id))) {
4476 g_free((yyvsp[(1) - (2)].id));
4477 g_free((yyvsp[(2) - (2)].id));
4478 yyerror(_("parse error"));
4481 g_free((yyvsp[(1) - (2)].id));
4487 /* Line 1455 of yacc.c */
4488 #line 1877 "parse.y"
4490 g_free(funcattrs); funcattrs = NULL;
4491 g_free(onerror); onerror = NULL;
4492 g_free(defreturn); defreturn = NULL;
4493 if(!set_attr_value((yyvsp[(1) - (4)].id), (yyvsp[(2) - (4)].id))) {
4494 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4495 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4496 yyerror(_("parse error"));
4499 if(!set_attr_value((yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id))) {
4500 funcattrs = onerror = defreturn = NULL;
4501 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4502 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4503 yyerror(_("parse error"));
4506 g_free((yyvsp[(1) - (4)].id));
4507 g_free((yyvsp[(3) - (4)].id));
4513 /* Line 1455 of yacc.c */
4514 #line 1897 "parse.y"
4516 g_free(funcattrs); funcattrs = NULL;
4517 g_free(onerror); onerror = NULL;
4518 g_free(defreturn); defreturn = NULL;
4519 if(!set_attr_value((yyvsp[(1) - (6)].id), (yyvsp[(2) - (6)].id))) {
4520 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4521 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4522 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4523 yyerror(_("parse error"));
4526 if(!set_attr_value((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id))) {
4527 funcattrs = onerror = defreturn = NULL;
4528 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4529 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4530 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4531 yyerror(_("parse error"));
4534 if(!set_attr_value((yyvsp[(5) - (6)].id), (yyvsp[(6) - (6)].id))) {
4535 funcattrs = onerror = defreturn = NULL;
4536 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4537 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4538 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4539 yyerror(_("parse error"));
4542 g_free((yyvsp[(1) - (6)].id));
4543 g_free((yyvsp[(3) - (6)].id));
4544 g_free((yyvsp[(5) - (6)].id));
4550 /* Line 1455 of yacc.c */
4551 #line 1928 "parse.y"
4553 g_free(funcattrs); funcattrs = NULL;
4554 g_free(onerror); onerror = NULL;
4555 g_free(defreturn); defreturn = NULL;
4561 /* Line 1455 of yacc.c */
4562 #line 1935 "parse.y"
4563 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4568 /* Line 1455 of yacc.c */
4569 #line 1936 "parse.y"
4571 (yyval.id) = ((yyvsp[(2) - (2)].cbuf))->str;
4572 g_string_free((yyvsp[(2) - (2)].cbuf), FALSE);
4578 /* Line 1455 of yacc.c */
4579 #line 1942 "parse.y"
4580 { vararg = FALSE; has_self = FALSE; }
4585 /* Line 1455 of yacc.c */
4586 #line 1943 "parse.y"
4590 if(strcmp((yyvsp[(1) - (1)].id),"self")==0)
4591 push_self((yyvsp[(1) - (1)].id), FALSE);
4593 g_free((yyvsp[(1) - (1)].id));
4594 yyerror(_("parse error"));
4602 /* Line 1455 of yacc.c */
4603 #line 1954 "parse.y"
4607 if(strcmp((yyvsp[(1) - (2)].id),"self")==0)
4608 push_self((yyvsp[(1) - (2)].id), TRUE);
4610 g_free((yyvsp[(1) - (2)].id));
4611 yyerror(_("parse error"));
4619 /* Line 1455 of yacc.c */
4620 #line 1965 "parse.y"
4624 if(strcmp((yyvsp[(2) - (2)].id),"self")==0)
4625 push_self((yyvsp[(2) - (2)].id), TRUE);
4627 g_free((yyvsp[(2) - (2)].id));
4628 yyerror(_("parse error"));
4636 /* Line 1455 of yacc.c */
4637 #line 1976 "parse.y"
4640 if(strcmp((yyvsp[(1) - (3)].id),"self")==0)
4641 push_self((yyvsp[(1) - (3)].id), FALSE);
4643 g_free((yyvsp[(1) - (3)].id));
4644 yyerror(_("parse error"));
4652 /* Line 1455 of yacc.c */
4653 #line 1986 "parse.y"
4656 if(strcmp((yyvsp[(1) - (4)].id),"self")==0)
4657 push_self((yyvsp[(1) - (4)].id), TRUE);
4659 g_free((yyvsp[(1) - (4)].id));
4660 yyerror(_("parse error"));
4668 /* Line 1455 of yacc.c */
4669 #line 1996 "parse.y"
4672 if(strcmp((yyvsp[(2) - (4)].id),"self")==0)
4673 push_self((yyvsp[(2) - (4)].id), TRUE);
4675 g_free((yyvsp[(2) - (4)].id));
4676 yyerror(_("parse error"));
4684 /* Line 1455 of yacc.c */
4685 #line 2006 "parse.y"
4686 { has_self = FALSE; }
4691 /* Line 1455 of yacc.c */
4692 #line 2009 "parse.y"
4698 /* Line 1455 of yacc.c */
4699 #line 2010 "parse.y"
4705 /* Line 1455 of yacc.c */
4706 #line 2013 "parse.y"
4712 /* Line 1455 of yacc.c */
4713 #line 2014 "parse.y"
4719 /* Line 1455 of yacc.c */
4720 #line 2017 "parse.y"
4722 push_funcarg((yyvsp[(2) - (2)].id),NULL);
4728 /* Line 1455 of yacc.c */
4729 #line 2020 "parse.y"
4731 push_funcarg((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].id));
4737 /* Line 1455 of yacc.c */
4738 #line 2023 "parse.y"
4740 if(strcmp((yyvsp[(4) - (6)].id),"check")!=0) {
4741 yyerror(_("parse error"));
4744 g_free((yyvsp[(4) - (6)].id));
4745 push_funcarg((yyvsp[(2) - (6)].id),NULL);
4751 /* Line 1455 of yacc.c */
4752 #line 2031 "parse.y"
4754 if(strcmp((yyvsp[(5) - (7)].id),"check")!=0) {
4755 yyerror(_("parse error"));
4758 g_free((yyvsp[(5) - (7)].id));
4759 push_funcarg((yyvsp[(2) - (7)].id),(yyvsp[(3) - (7)].id));
4765 /* Line 1455 of yacc.c */
4766 #line 2041 "parse.y"
4772 /* Line 1455 of yacc.c */
4773 #line 2042 "parse.y"
4779 /* Line 1455 of yacc.c */
4780 #line 2045 "parse.y"
4782 if(strcmp((yyvsp[(1) - (1)].id),"type")==0) {
4783 Node *node = node_new (CHECK_NODE,
4784 "chtype", TYPE_CHECK,
4786 checks = g_list_append(checks,node);
4787 } else if(strcmp((yyvsp[(1) - (1)].id),"null")==0) {
4788 Node *node = node_new (CHECK_NODE,
4789 "chtype", NULL_CHECK,
4791 checks = g_list_append(checks,node);
4793 yyerror(_("parse error"));
4796 g_free((yyvsp[(1) - (1)].id));
4802 /* Line 1455 of yacc.c */
4803 #line 2062 "parse.y"
4805 Node *node = node_new (CHECK_NODE,
4807 "number:steal", (yyvsp[(2) - (2)].id),
4809 checks = g_list_append(checks,node);
4815 /* Line 1455 of yacc.c */
4816 #line 2069 "parse.y"
4818 Node *node = node_new (CHECK_NODE,
4820 "number:steal", (yyvsp[(2) - (2)].id),
4822 checks = g_list_append(checks,node);
4828 /* Line 1455 of yacc.c */
4829 #line 2076 "parse.y"
4831 Node *node = node_new (CHECK_NODE,
4833 "number:steal", (yyvsp[(3) - (3)].id),
4835 checks = g_list_append(checks,node);
4841 /* Line 1455 of yacc.c */
4842 #line 2083 "parse.y"
4844 Node *node = node_new (CHECK_NODE,
4846 "number:steal", (yyvsp[(3) - (3)].id),
4848 checks = g_list_append(checks,node);
4854 /* Line 1455 of yacc.c */
4855 #line 2090 "parse.y"
4857 Node *node = node_new (CHECK_NODE,
4859 "number:steal", (yyvsp[(3) - (3)].id),
4861 checks = g_list_append(checks,node);
4867 /* Line 1455 of yacc.c */
4868 #line 2097 "parse.y"
4870 Node *node = node_new (CHECK_NODE,
4872 "number:steal", (yyvsp[(3) - (3)].id),
4874 checks = g_list_append(checks,node);
4880 /* Line 1455 of yacc.c */
4881 #line 2106 "parse.y"
4883 Node *node = node_new (ENUMDEF_NODE,
4884 "etype:steal", (yyvsp[(6) - (7)].id),
4885 "prefix:steal", (yyvsp[(2) - (7)].id),
4886 "values:steal", enum_vals,
4889 nodes = g_list_append (nodes, node);
4895 /* Line 1455 of yacc.c */
4896 #line 2115 "parse.y"
4898 Node *node = node_new (ENUMDEF_NODE,
4899 "etype:steal", (yyvsp[(7) - (8)].id),
4900 "prefix:steal", (yyvsp[(2) - (8)].id),
4901 "values:steal", enum_vals,
4904 nodes = g_list_append (nodes, node);
4910 /* Line 1455 of yacc.c */
4911 #line 2126 "parse.y"
4917 /* Line 1455 of yacc.c */
4918 #line 2127 "parse.y"
4924 /* Line 1455 of yacc.c */
4925 #line 2130 "parse.y"
4928 char *num = (yyvsp[(3) - (3)].id);
4930 /* A float value, that's a bad enum */
4931 if (num[0] >= '0' &&
4933 strchr (num, '.') != NULL) {
4934 g_free ((yyvsp[(1) - (3)].id));
4936 yyerror(_("parse error (enumerator value not integer constant)"));
4940 node = node_new (ENUMVALUE_NODE,
4941 "name:steal", (yyvsp[(1) - (3)].id),
4944 enum_vals = g_list_append (enum_vals, node);
4950 /* Line 1455 of yacc.c */
4951 #line 2150 "parse.y"
4955 node = node_new (ENUMVALUE_NODE,
4956 "name:steal", (yyvsp[(1) - (1)].id),
4958 enum_vals = g_list_append (enum_vals, node);
4964 /* Line 1455 of yacc.c */
4965 #line 2160 "parse.y"
4967 Node *node = node_new (FLAGS_NODE,
4968 "ftype:steal", (yyvsp[(6) - (7)].id),
4969 "prefix:steal", (yyvsp[(2) - (7)].id),
4970 "values:steal", flag_vals,
4973 nodes = g_list_append (nodes, node);
4979 /* Line 1455 of yacc.c */
4980 #line 2169 "parse.y"
4982 Node *node = node_new (FLAGS_NODE,
4983 "ftype:steal", (yyvsp[(7) - (8)].id),
4984 "prefix:steal", (yyvsp[(2) - (8)].id),
4985 "values:steal", flag_vals,
4988 nodes = g_list_append (nodes, node);
4994 /* Line 1455 of yacc.c */
4995 #line 2180 "parse.y"
4997 flag_vals = g_list_append (flag_vals, (yyvsp[(3) - (3)].id));
5003 /* Line 1455 of yacc.c */
5004 #line 2183 "parse.y"
5006 flag_vals = g_list_append (flag_vals, (yyvsp[(1) - (1)].id));
5012 /* Line 1455 of yacc.c */
5013 #line 2188 "parse.y"
5015 Node *node = node_new (ERROR_NODE,
5016 "etype:steal", (yyvsp[(6) - (7)].id),
5017 "prefix:steal", (yyvsp[(2) - (7)].id),
5018 "values:steal", error_vals,
5021 nodes = g_list_append (nodes, node);
5027 /* Line 1455 of yacc.c */
5028 #line 2197 "parse.y"
5030 Node *node = node_new (ERROR_NODE,
5031 "etype:steal", (yyvsp[(7) - (8)].id),
5032 "prefix:steal", (yyvsp[(2) - (8)].id),
5033 "values:steal", error_vals,
5036 nodes = g_list_append (nodes, node);
5042 /* Line 1455 of yacc.c */
5043 #line 2208 "parse.y"
5045 error_vals = g_list_append (error_vals, (yyvsp[(3) - (3)].id));
5051 /* Line 1455 of yacc.c */
5052 #line 2211 "parse.y"
5054 error_vals = g_list_append (error_vals, (yyvsp[(1) - (1)].id));
5060 /* Line 1455 of yacc.c */
5061 #line 2217 "parse.y"
5062 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5067 /* Line 1455 of yacc.c */
5068 #line 2218 "parse.y"
5070 (yyval.id) = g_strconcat("-",(yyvsp[(2) - (2)].id),NULL);
5071 g_free((yyvsp[(2) - (2)].id));
5077 /* Line 1455 of yacc.c */
5078 #line 2222 "parse.y"
5079 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5084 /* Line 1455 of yacc.c */
5085 #line 2223 "parse.y"
5086 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5091 /* Line 1455 of yacc.c */
5092 #line 5093 "parse.c"
5095 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5099 YY_STACK_PRINT (yyss, yyssp);
5103 /* Now `shift' the result of the reduction. Determine what state
5104 that goes to, based on the state we popped back to and the rule
5105 number reduced by. */
5109 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5110 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5111 yystate = yytable[yystate];
5113 yystate = yydefgoto[yyn - YYNTOKENS];
5118 /*------------------------------------.
5119 | yyerrlab -- here on detecting error |
5120 `------------------------------------*/
5122 /* If not already recovering from an error, report this error. */
5126 #if ! YYERROR_VERBOSE
5127 yyerror (YY_("syntax error"));
5130 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
5131 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
5133 YYSIZE_T yyalloc = 2 * yysize;
5134 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5135 yyalloc = YYSTACK_ALLOC_MAXIMUM;
5136 if (yymsg != yymsgbuf)
5137 YYSTACK_FREE (yymsg);
5138 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5140 yymsg_alloc = yyalloc;
5144 yymsg_alloc = sizeof yymsgbuf;
5148 if (0 < yysize && yysize <= yymsg_alloc)
5150 (void) yysyntax_error (yymsg, yystate, yychar);
5155 yyerror (YY_("syntax error"));
5157 goto yyexhaustedlab;
5165 if (yyerrstatus == 3)
5167 /* If just tried and failed to reuse lookahead token after an
5168 error, discard it. */
5170 if (yychar <= YYEOF)
5172 /* Return failure if at end of input. */
5173 if (yychar == YYEOF)
5178 yydestruct ("Error: discarding",
5184 /* Else will try to reuse lookahead token after shifting the error
5189 /*---------------------------------------------------.
5190 | yyerrorlab -- error raised explicitly by YYERROR. |
5191 `---------------------------------------------------*/
5194 /* Pacify compilers like GCC when the user code never invokes
5195 YYERROR and the label yyerrorlab therefore never appears in user
5197 if (/*CONSTCOND*/ 0)
5200 /* Do not reclaim the symbols of the rule which action triggered
5204 YY_STACK_PRINT (yyss, yyssp);
5209 /*-------------------------------------------------------------.
5210 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5211 `-------------------------------------------------------------*/
5213 yyerrstatus = 3; /* Each real token shifted decrements this. */
5217 yyn = yypact[yystate];
5218 if (yyn != YYPACT_NINF)
5221 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5229 /* Pop the current state because it cannot handle the error token. */
5234 yydestruct ("Error: popping",
5235 yystos[yystate], yyvsp);
5238 YY_STACK_PRINT (yyss, yyssp);
5244 /* Shift the error token. */
5245 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5251 /*-------------------------------------.
5252 | yyacceptlab -- YYACCEPT comes here. |
5253 `-------------------------------------*/
5258 /*-----------------------------------.
5259 | yyabortlab -- YYABORT comes here. |
5260 `-----------------------------------*/
5265 #if !defined(yyoverflow) || YYERROR_VERBOSE
5266 /*-------------------------------------------------.
5267 | yyexhaustedlab -- memory exhaustion comes here. |
5268 `-------------------------------------------------*/
5270 yyerror (YY_("memory exhausted"));
5276 if (yychar != YYEMPTY)
5277 yydestruct ("Cleanup: discarding lookahead",
5279 /* Do not reclaim the symbols of the rule which action triggered
5280 this YYABORT or YYACCEPT. */
5282 YY_STACK_PRINT (yyss, yyssp);
5283 while (yyssp != yyss)
5285 yydestruct ("Cleanup: popping",
5286 yystos[*yyssp], yyvsp);
5291 YYSTACK_FREE (yyss);
5294 if (yymsg != yymsgbuf)
5295 YYSTACK_FREE (yymsg);
5297 /* Make sure YYID is used. */
5298 return YYID (yyresult);
5303 /* Line 1675 of yacc.c */
5304 #line 2226 "parse.y"