1 /* A Bison parser, made by GNU Bison 2.4.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
6 2009, 2010 Free Software Foundation, Inc.
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
44 /* Identify Bison output. */
48 #define YYBISON_VERSION "2.4.3"
51 #define YYSKELETON_NAME "yacc.c"
62 /* Using locations. */
63 #define YYLSP_NEEDED 0
67 /* Copy the first part of user declarations. */
69 /* Line 189 of yacc.c */
79 #include "treefuncs.h"
83 /* FIXME: add gettext support */
88 static GList *class_nodes = NULL;
91 static GList *enum_vals = NULL;
92 static GList *flag_vals = NULL;
93 static GList *error_vals = NULL;
95 static gboolean abstract = FALSE;
96 static char *chunk_size = NULL;
97 static char *bonobo_object_class = NULL;
98 static int glade_xml = FALSE;
99 static GList *interfaces = NULL;
100 static GList *typestack = NULL;
101 static GList *funcargs = NULL;
102 static GList *checks = NULL;
103 static int has_self = FALSE;
104 static int vararg = FALSE;
105 static Method *last_added_method = NULL;
107 /* destructor and initializer for variables */
108 static gboolean destructor_unref = FALSE;
109 static char *destructor = NULL;
110 static int destructor_line = 0;
111 static gboolean destructor_simple = TRUE;
112 static char *initializer = NULL;
113 static int initializer_line = 0;
114 static int glade_widget = FALSE;
116 static char *funcattrs = NULL;
117 static char *onerror = NULL;
118 static char *defreturn = NULL;
120 static GList *gtktypes = NULL;
122 static Property *property = NULL;
124 /* this can be a global as we will only do one function at a time
126 static int the_scope = NO_SCOPE;
128 void free(void *ptr);
131 extern int ccode_line;
133 extern gboolean for_cpp;
143 if (strcmp (yytext, "\n") == 0 ||
144 strcmp (yytext, "\r") == 0) {
145 out = g_strconcat ("Error: ", str, " before end of line", NULL);
146 } else if (yytext[0] == '\0') {
147 out=g_strconcat("Error: ", str, " at end of input", NULL);
149 char *tmp = g_strdup(yytext);
150 while((p=strchr(tmp, '\n')))
153 out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL);
157 fprintf(stderr, "%s:%d: %s\n", filename, line_no, out);
166 Type *type = typestack->data;
167 typestack = g_list_remove(typestack,typestack->data);
172 push_variable (char *name, int scope, int line_no, char *postfix)
175 Type *type = pop_type ();
177 type->postfix = postfix;
179 var = node_new (VARIABLE_NODE,
182 "glade_widget", glade_widget,
185 "destructor_unref", destructor_unref,
186 "destructor:steal", destructor,
187 "destructor_line", destructor_line,
188 "destructor_simple", destructor_simple,
189 "initializer:steal", initializer,
190 "initializer_line", initializer_line,
191 "initializer_simple", TRUE,
193 class_nodes = g_list_append(class_nodes, var);
194 glade_widget = FALSE;
198 push_function (int scope, int method, char *oid, char *id,
199 GString *cbuf, int line_no, int ccode_line,
200 gboolean vararg, GList *flags)
206 g_assert(scope != CLASS_SCOPE);
208 if(method == INIT_METHOD ||
209 method == CLASS_INIT_METHOD ||
210 method == CONSTRUCTOR_METHOD ||
211 method == DISPOSE_METHOD ||
212 method == FINALIZE_METHOD) {
213 type = (Type *)node_new (TYPE_NODE,
220 /* a complicated and ugly test to figure out if we have
221 the wrong number of types for a signal */
222 if((method == SIGNAL_FIRST_METHOD ||
223 method == SIGNAL_LAST_METHOD) &&
224 g_list_length(gtktypes) != g_list_length(funcargs) &&
225 !(g_list_length(funcargs) == 1 &&
226 g_list_length(gtktypes) == 2 &&
227 strcmp(gtktypes->next->data, "NONE")==0)) {
228 error_print(GOB_WARN, line_no,
229 _("The number of GTK arguments and "
230 "function arguments for a signal "
231 "don't seem to match"));
233 if(g_list_length(gtktypes) > 2) {
235 for(li = gtktypes->next; li; li = li->next) {
236 if(strcmp(li->data, "NONE")==0) {
237 error_print(GOB_ERROR, line_no,
238 _("NONE can only appear in an "
239 "argument list by itself"));
245 c_cbuf = p = cbuf->str;
246 while(p && *p && (*p==' ' || *p=='\t' || *p=='\n' || *p=='\r'))
253 node = node_new (METHOD_NODE,
258 "gtktypes:steal", gtktypes,
259 "flags:steal", flags,
261 "args:steal", funcargs,
262 "funcattrs:steal", funcattrs,
263 "onerror:steal", onerror,
264 "defreturn:steal", defreturn,
265 "cbuf:steal", c_cbuf,
267 "ccode_line", ccode_line,
269 "unique_id", method_unique_id++,
272 last_added_method = (Method *)node;
276 /*only free segment if we haven't passed it
286 class_nodes = g_list_append(class_nodes, node);
290 free_all_global_state(void)
302 g_list_foreach(gtktypes, (GFunc)g_free, NULL);
303 g_list_free(gtktypes);
306 node_list_free (funcargs);
311 push_funcarg(char *name, char *postfix)
314 Type *type = pop_type();
316 type->postfix = postfix;
318 node = node_new (FUNCARG_NODE,
321 "checks:steal", checks,
325 funcargs = g_list_append(funcargs, node);
329 push_init_arg(char *name, int is_class)
336 tn = g_strconcat(((Class *)class)->otype,":Class",NULL);
338 tn = g_strdup(((Class *)class)->otype);
340 type = node_new (TYPE_NODE,
344 node = node_new (FUNCARG_NODE,
345 "atype:steal", (Type *)type,
348 funcargs = g_list_prepend(funcargs, node);
352 push_self(char *id, gboolean constant)
357 type = node_new (TYPE_NODE,
358 "name", ((Class *)class)->otype,
359 "pointer", constant ? "const *" : "*",
361 ch = g_list_append (ch, node_new (CHECK_NODE,
362 "chtype", NULL_CHECK,
364 ch = g_list_append (ch, node_new (CHECK_NODE,
365 "chtype", TYPE_CHECK,
367 node = node_new (FUNCARG_NODE,
368 "atype:steal", (Type *)type,
372 funcargs = g_list_prepend(funcargs, node);
376 find_var_or_die(const char *id, int line)
380 for(li = class_nodes; li != NULL; li = li->next) {
382 Node *node = li->data;
383 if(node->type != VARIABLE_NODE)
386 if(strcmp(var->id, id)==0)
390 error_printf(GOB_ERROR, line, _("Variable %s not defined here"), id);
392 g_assert_not_reached();
397 set_attr_value(char *type, char *val)
399 if(strcmp(type, "attr")==0) {
405 } else if(strcmp(type, "onerror")==0) {
411 } else if(strcmp(type, "defreturn")==0) {
422 export_accessors (const char *var_name,
434 the_type = (Type *)node_copy ((Node *)type);
436 the_type = get_tree_type (gtktype, TRUE);
438 if (the_type == NULL) {
439 error_print (GOB_ERROR, line_no,
440 _("Cannot determine type of property or argument"));
445 char *get_id = g_strdup_printf ("get_%s", var_name);
446 GString *get_cbuf = g_string_new (NULL);
447 Node *node1 = node_new (TYPE_NODE,
448 "name", the_type->name,
449 "pointer", the_type->pointer,
450 "postfix", the_type->postfix,
452 Node *node3 = node_new (TYPE_NODE,
453 "name", class->class.otype,
457 g_string_sprintf (get_cbuf,
459 "g_object_get (G_OBJECT (self), \"%s\", "
463 the_type->pointer ? the_type->pointer : "",
466 typestack = g_list_prepend (typestack, node1);
467 typestack = g_list_prepend (typestack, node3);
469 push_funcarg ("self", FALSE);
471 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
472 get_id, get_cbuf, get_lineno,
473 lineno, FALSE, NULL);
477 char *set_id = g_strdup_printf ("set_%s", var_name);
478 GString *set_cbuf = g_string_new (NULL);
479 Node *node1 = node_new (TYPE_NODE,
480 "name", the_type->name,
481 "pointer", the_type->pointer,
482 "postfix", the_type->postfix,
484 Node *node2 = node_new (TYPE_NODE,
487 Node *node3 = node_new (TYPE_NODE,
488 "name", class->class.otype,
492 g_string_sprintf (set_cbuf,
493 "\tg_object_set (G_OBJECT (self), "
494 "\"%s\", val, NULL);\n",
497 typestack = g_list_prepend (typestack, node2);
498 typestack = g_list_prepend (typestack, node1);
499 typestack = g_list_prepend (typestack, node3);
501 push_funcarg ("self", FALSE);
502 push_funcarg ("val", FALSE);
504 typestack = g_list_prepend (typestack, node2);
505 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
506 set_id, set_cbuf, set_lineno,
507 lineno, FALSE, NULL);
510 node_free ((Node *)the_type);
514 get_prop_enum_flag_cast (Property *prop)
517 if (prop->extra_gtktype == NULL ||
518 /* HACK! just in case someone made this
519 * work with 2.0.0 by using the TYPE
521 ((strstr (prop->extra_gtktype, "_TYPE_") != NULL ||
522 strstr (prop->extra_gtktype, "TYPE_") == prop->extra_gtktype) &&
523 strchr (prop->extra_gtktype, ':') == NULL)) {
524 if (prop->ptype != NULL)
525 return get_type (prop->ptype, TRUE);
527 return g_strdup ("");
529 tmp = remove_sep (prop->extra_gtktype);
530 ret = g_strdup_printf ("(%s) ", tmp);
536 add_construct_glade (char * file, char * root, char * domain)
541 type = (Type *)node_new (TYPE_NODE,
545 initializer = g_strdup_printf("\t{\n"
546 "\tGtkWidget * root;\n"
547 "\t%%1$s->_priv->_glade_xml = glade_xml_new(%s, %s, %s);\n"
548 "\troot = glade_xml_get_widget(%%1$s->_priv->_glade_xml, %s);\n"
549 "\tgtk_widget_show(root);\n"
550 "\tgtk_container_add(GTK_CONTAINER(%%1$s), root);\n"
551 "\tglade_xml_signal_autoconnect_full(%%1$s->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)%%1$s);\n"
552 "}\n", file, root, domain ? domain : "NULL", root);
554 var = node_new (VARIABLE_NODE,
555 "scope", PRIVATE_SCOPE,
557 "glade_widget", FALSE,
558 "id:steal", "_glade_xml",
559 "destructor_unref", FALSE,
560 "destructor", "g_object_unref",
561 "destructor_simple", TRUE,
562 "initializer", initializer,
563 "initializer_simple", FALSE,
565 class_nodes = g_list_prepend(class_nodes, var);
569 property_link_and_export (Node *node)
571 Property *prop = (Property *)node;
575 char *get = NULL, *set = NULL;
578 if (prop->set != NULL ||
580 error_print (GOB_ERROR, prop->line_no,
581 _("Property linking requested, but "
582 "getters and setters exist"));
585 var = find_var_or_die (prop->name, prop->line_no);
586 if(var->scope == PRIVATE_SCOPE) {
587 root = "self->_priv";
588 } else if (var->scope == CLASS_SCOPE) {
589 root = "SELF_GET_CLASS(self)";
591 error_print (GOB_ERROR, prop->line_no,
592 _("Self aliases needed when autolinking to a classwide member"));
597 if (strcmp (prop->gtktype, "STRING") == 0) {
598 set = g_strdup_printf("{ char *old = %s->%s; "
599 "%s->%s = g_value_dup_string (VAL); g_free (old); }",
602 get = g_strdup_printf("g_value_set_string (VAL, %s->%s);",
604 } else if (strcmp (prop->gtktype, "OBJECT") == 0) {
606 if (prop->extra_gtktype != NULL) {
607 cast = remove_sep (prop->extra_gtktype);
609 cast = g_strdup ("void");
611 set = g_strdup_printf("{ GObject *___old = (GObject *)%s->%s; "
612 "%s->%s = (%s *)g_value_dup_object (VAL); "
613 "if (___old != NULL) { "
614 "g_object_unref (G_OBJECT (___old)); "
620 get = g_strdup_printf ("g_value_set_object (VAL, "
621 "(gpointer)%s->%s);",
624 } else if (strcmp (prop->gtktype, "BOXED") == 0) {
625 char *type = make_me_type (prop->extra_gtktype,
627 if (prop->extra_gtktype == NULL) {
628 error_print (GOB_ERROR, prop->line_no,
629 _("Property linking requested for BOXED, but "
630 "boxed_type not set"));
632 set = g_strdup_printf("{ gpointer ___old = (gpointer)%s->%s; "
633 "gpointer ___new = (gpointer)g_value_get_boxed (VAL); "
634 "if (___new != ___old) { "
635 "if (___old != NULL) g_boxed_free (%s, ___old); "
636 "if (___new != NULL) %s->%s = g_boxed_copy (%s, ___new); "
637 "else %s->%s = NULL;"
645 get = g_strdup_printf("g_value_set_boxed (VAL, %s->%s);",
651 const char *getcast = "";
652 const char *setcast = "";
653 char *to_free = NULL;
654 set_func = g_strdup_printf ("g_value_set_%s", prop->gtktype);
655 g_strdown (set_func);
656 get_func = g_strdup_printf ("g_value_get_%s", prop->gtktype);
657 g_strdown (get_func);
660 if (strcmp (prop->gtktype, "FLAGS") == 0) {
661 setcast = "(guint) ";
663 get_prop_enum_flag_cast (prop);
664 } else if (strcmp (prop->gtktype, "ENUM") == 0) {
667 get_prop_enum_flag_cast (prop);
668 } else if (strcmp (prop->gtktype, "POINTER") == 0) {
669 setcast = "(gpointer) ";
670 getcast = g_strdup_printf ("(%s%s) ",
672 prop->ptype->pointer ? prop->ptype->pointer : "");
676 set = g_strdup_printf("%s->%s = %s%s (VAL);",
680 get = g_strdup_printf("%s (VAL, %s%s->%s);",
692 "get_line", prop->line_no,
694 "set_line", prop->line_no,
699 export_accessors (prop->name,
700 prop->get != NULL, prop->get_line,
701 prop->set != NULL, prop->set_line,
712 if (strcmp (s, "BOOL") == 0) {
713 error_print (GOB_WARN, line_no,
714 _("BOOL type is deprecated, please use BOOLEAN"));
716 return g_strdup ("BOOLEAN");
723 ensure_property (void)
725 if (property == NULL)
726 property = (Property *)node_new (PROPERTY_NODE, NULL);
731 /* Line 189 of yacc.c */
734 /* Enabling traces. */
739 /* Enabling verbose error messages. */
740 #ifdef YYERROR_VERBOSE
741 # undef YYERROR_VERBOSE
742 # define YYERROR_VERBOSE 1
744 # define YYERROR_VERBOSE 0
747 /* Enabling the token table. */
748 #ifndef YYTOKEN_TABLE
749 # define YYTOKEN_TABLE 0
756 /* 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
846 #define PROTECTED 290
847 #define CLASSWIDE 291
857 #define DEFAULT_VALUE 301
861 #define FLAGS_TYPE 305
862 #define ENUM_TYPE 306
863 #define PARAM_TYPE 307
864 #define BOXED_TYPE 308
865 #define OBJECT_TYPE 309
870 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
871 typedef union YYSTYPE
874 /* Line 214 of yacc.c */
885 /* Line 214 of yacc.c */
888 # define YYSTYPE_IS_TRIVIAL 1
889 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
890 # define YYSTYPE_IS_DECLARED 1
894 /* Copy the second part of user declarations. */
897 /* Line 264 of yacc.c */
905 typedef YYTYPE_UINT8 yytype_uint8;
907 typedef unsigned char yytype_uint8;
911 typedef YYTYPE_INT8 yytype_int8;
912 #elif (defined __STDC__ || defined __C99__FUNC__ \
913 || defined __cplusplus || defined _MSC_VER)
914 typedef signed char yytype_int8;
916 typedef short int yytype_int8;
920 typedef YYTYPE_UINT16 yytype_uint16;
922 typedef unsigned short int yytype_uint16;
926 typedef YYTYPE_INT16 yytype_int16;
928 typedef short int yytype_int16;
932 # ifdef __SIZE_TYPE__
933 # define YYSIZE_T __SIZE_TYPE__
934 # elif defined size_t
935 # define YYSIZE_T size_t
936 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
937 || defined __cplusplus || defined _MSC_VER)
938 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
939 # define YYSIZE_T size_t
941 # define YYSIZE_T unsigned int
945 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
948 # if defined YYENABLE_NLS && YYENABLE_NLS
950 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
951 # define YY_(msgid) dgettext ("bison-runtime", msgid)
955 # define YY_(msgid) msgid
959 /* Suppress unused-variable warnings by "using" E. */
960 #if ! defined lint || defined __GNUC__
961 # define YYUSE(e) ((void) (e))
963 # define YYUSE(e) /* empty */
966 /* Identity function, used to suppress warnings about constant conditions. */
970 #if (defined __STDC__ || defined __C99__FUNC__ \
971 || defined __cplusplus || defined _MSC_VER)
984 #if ! defined yyoverflow || YYERROR_VERBOSE
986 /* The parser invokes alloca or malloc; define the necessary symbols. */
988 # ifdef YYSTACK_USE_ALLOCA
989 # if YYSTACK_USE_ALLOCA
991 # define YYSTACK_ALLOC __builtin_alloca
992 # elif defined __BUILTIN_VA_ARG_INCR
993 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
995 # define YYSTACK_ALLOC __alloca
996 # elif defined _MSC_VER
997 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
998 # define alloca _alloca
1000 # define YYSTACK_ALLOC alloca
1001 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1002 || defined __cplusplus || defined _MSC_VER)
1003 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1005 # define _STDLIB_H 1
1012 # ifdef YYSTACK_ALLOC
1013 /* Pacify GCC's `empty if-body' warning. */
1014 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1015 # ifndef YYSTACK_ALLOC_MAXIMUM
1016 /* The OS might guarantee only one guard page at the bottom of the stack,
1017 and a page size can be as small as 4096 bytes. So we cannot safely
1018 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1019 to allow for a few compiler-allocated temporary stack slots. */
1020 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1023 # define YYSTACK_ALLOC YYMALLOC
1024 # define YYSTACK_FREE YYFREE
1025 # ifndef YYSTACK_ALLOC_MAXIMUM
1026 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1028 # if (defined __cplusplus && ! defined _STDLIB_H \
1029 && ! ((defined YYMALLOC || defined malloc) \
1030 && (defined YYFREE || defined free)))
1031 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1033 # define _STDLIB_H 1
1037 # define YYMALLOC malloc
1038 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1039 || defined __cplusplus || defined _MSC_VER)
1040 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1044 # define YYFREE free
1045 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1046 || defined __cplusplus || defined _MSC_VER)
1047 void free (void *); /* INFRINGES ON USER NAME SPACE */
1051 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1054 #if (! defined yyoverflow \
1055 && (! defined __cplusplus \
1056 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1058 /* A type that is properly aligned for any stack member. */
1061 yytype_int16 yyss_alloc;
1065 /* The size of the maximum gap between one aligned stack and the next. */
1066 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1068 /* The size of an array large to enough to hold all stacks, each with
1070 # define YYSTACK_BYTES(N) \
1071 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1072 + YYSTACK_GAP_MAXIMUM)
1074 /* Copy COUNT objects from FROM to TO. The source and destination do
1077 # if defined __GNUC__ && 1 < __GNUC__
1078 # define YYCOPY(To, From, Count) \
1079 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1081 # define YYCOPY(To, From, Count) \
1085 for (yyi = 0; yyi < (Count); yyi++) \
1086 (To)[yyi] = (From)[yyi]; \
1092 /* Relocate STACK from its old location to the new one. The
1093 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1094 elements in the stack, and YYPTR gives the new location of the
1095 stack. Advance YYPTR to a properly aligned location for the next
1097 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1100 YYSIZE_T yynewbytes; \
1101 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1102 Stack = &yyptr->Stack_alloc; \
1103 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1104 yyptr += yynewbytes / sizeof (*yyptr); \
1110 /* YYFINAL -- State number of the termination state. */
1112 /* YYLAST -- Last index in YYTABLE. */
1115 /* YYNTOKENS -- Number of terminals. */
1116 #define YYNTOKENS 68
1117 /* YYNNTS -- Number of nonterminals. */
1119 /* YYNRULES -- Number of rules. */
1120 #define YYNRULES 198
1121 /* YYNRULES -- Number of states. */
1122 #define YYNSTATES 418
1124 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1125 #define YYUNDEFTOK 2
1126 #define YYMAXUTOK 309
1128 #define YYTRANSLATE(YYX) \
1129 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1131 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1132 static const yytype_uint8 yytranslate[] =
1134 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1135 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1136 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1137 2, 2, 2, 66, 2, 2, 2, 2, 2, 2,
1138 57, 58, 63, 2, 61, 67, 2, 2, 2, 2,
1139 2, 2, 2, 2, 2, 2, 2, 2, 2, 59,
1140 65, 60, 64, 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, 2, 2, 2, 2, 2, 2, 2,
1146 2, 2, 2, 55, 62, 56, 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, 2, 2, 2, 2,
1159 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1160 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1161 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1162 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1163 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1164 45, 46, 47, 48, 49, 50, 51, 52, 53, 54
1168 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1170 static const yytype_uint16 yyprhs[] =
1172 0, 0, 3, 7, 10, 13, 15, 17, 19, 21,
1173 23, 25, 27, 29, 31, 34, 37, 40, 43, 45,
1174 47, 49, 51, 56, 60, 66, 67, 72, 78, 84,
1175 90, 97, 105, 112, 120, 123, 125, 127, 130, 134,
1176 136, 138, 140, 142, 144, 146, 148, 150, 153, 157,
1177 160, 164, 167, 170, 172, 174, 176, 177, 183, 190,
1178 203, 213, 220, 224, 225, 237, 246, 252, 256, 257,
1179 261, 263, 265, 270, 272, 274, 278, 282, 286, 290,
1180 294, 298, 302, 306, 310, 314, 318, 322, 326, 330,
1181 334, 338, 342, 344, 350, 352, 356, 357, 361, 363,
1182 366, 368, 370, 372, 375, 378, 381, 385, 389, 392,
1183 395, 398, 400, 403, 405, 408, 410, 412, 414, 416,
1184 418, 420, 422, 424, 426, 428, 430, 432, 434, 437,
1185 440, 444, 447, 449, 453, 457, 460, 462, 467, 471,
1186 473, 476, 478, 489, 501, 511, 521, 530, 542, 551,
1187 557, 560, 565, 572, 573, 575, 578, 580, 582, 585,
1188 588, 592, 597, 602, 604, 608, 610, 614, 616, 619,
1189 623, 630, 638, 641, 643, 645, 648, 651, 655, 659,
1190 663, 667, 675, 684, 688, 690, 694, 696, 704, 713,
1191 717, 719, 727, 736, 740, 742, 744, 747, 749
1194 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1195 static const yytype_int8 yyrhs[] =
1197 69, 0, -1, 71, 72, 71, -1, 72, 71, -1,
1198 71, 72, -1, 72, -1, 24, -1, 26, -1, 29,
1199 -1, 27, -1, 28, -1, 30, -1, 31, -1, 25,
1200 -1, 71, 70, -1, 71, 113, -1, 71, 116, -1,
1201 71, 118, -1, 70, -1, 113, -1, 116, -1, 118,
1202 -1, 73, 55, 75, 56, -1, 73, 55, 56, -1,
1203 3, 21, 4, 21, 74, -1, -1, 57, 19, 58,
1204 74, -1, 57, 19, 19, 58, 74, -1, 57, 19,
1205 21, 58, 74, -1, 57, 19, 20, 58, 74, -1,
1206 57, 19, 32, 32, 58, 74, -1, 57, 19, 32,
1207 32, 32, 58, 74, -1, 57, 19, 19, 32, 58,
1208 74, -1, 57, 19, 19, 32, 32, 58, 74, -1,
1209 75, 76, -1, 76, -1, 104, -1, 19, 104, -1,
1210 19, 21, 104, -1, 81, -1, 82, -1, 84, -1,
1211 59, -1, 33, -1, 34, -1, 35, -1, 36, -1,
1212 19, 19, -1, 19, 55, 24, -1, 60, 120, -1,
1213 60, 55, 24, -1, 78, 79, -1, 79, 78, -1,
1214 79, -1, 78, -1, 19, -1, -1, 77, 93, 19,
1215 80, 59, -1, 77, 93, 19, 22, 80, 59, -1,
1216 38, 91, 90, 19, 83, 19, 55, 24, 19, 55,
1217 24, 59, -1, 38, 91, 90, 19, 83, 19, 55,
1218 24, 59, -1, 38, 91, 90, 19, 83, 19, -1,
1219 57, 19, 58, -1, -1, 37, 19, 19, 85, 19,
1220 55, 24, 19, 55, 24, 59, -1, 37, 19, 19,
1221 85, 19, 55, 24, 59, -1, 37, 19, 19, 85,
1222 59, -1, 57, 86, 58, -1, -1, 86, 61, 89,
1223 -1, 89, -1, 32, -1, 19, 57, 32, 58, -1,
1224 120, -1, 87, -1, 42, 60, 87, -1, 43, 60,
1225 87, -1, 44, 60, 120, -1, 45, 60, 120, -1,
1226 46, 60, 88, -1, 48, 60, 92, -1, 49, 60,
1227 93, -1, 50, 60, 21, -1, 50, 60, 19, -1,
1228 51, 60, 21, -1, 51, 60, 19, -1, 52, 60,
1229 21, -1, 52, 60, 19, -1, 53, 60, 21, -1,
1230 53, 60, 19, -1, 54, 60, 21, -1, 54, 60,
1231 19, -1, 19, -1, 19, 57, 19, 93, 58, -1,
1232 19, -1, 57, 92, 58, -1, -1, 19, 62, 92,
1233 -1, 19, -1, 94, 98, -1, 94, -1, 95, -1,
1234 19, -1, 5, 19, -1, 19, 5, -1, 97, 19,
1235 -1, 5, 97, 19, -1, 97, 19, 5, -1, 96,
1236 95, -1, 21, 95, -1, 5, 95, -1, 21, -1,
1237 21, 5, -1, 96, -1, 96, 5, -1, 6, -1,
1238 18, -1, 14, -1, 15, -1, 13, -1, 16, -1,
1239 17, -1, 11, -1, 12, -1, 7, -1, 8, -1,
1240 9, -1, 63, -1, 63, 5, -1, 63, 98, -1,
1241 63, 5, 98, -1, 19, 101, -1, 101, -1, 77,
1242 19, 101, -1, 19, 77, 101, -1, 77, 101, -1,
1243 99, -1, 19, 57, 102, 58, -1, 102, 61, 19,
1244 -1, 19, -1, 55, 24, -1, 59, -1, 40, 91,
1245 100, 93, 19, 57, 107, 58, 105, 103, -1, 77,
1246 40, 91, 99, 93, 19, 57, 107, 58, 105, 103,
1247 -1, 39, 77, 93, 19, 57, 107, 58, 105, 103,
1248 -1, 77, 39, 93, 19, 57, 107, 58, 105, 103,
1249 -1, 39, 93, 19, 57, 107, 58, 105, 103, -1,
1250 41, 57, 21, 58, 93, 19, 57, 107, 58, 105,
1251 103, -1, 77, 93, 19, 57, 107, 58, 105, 103,
1252 -1, 19, 57, 19, 58, 103, -1, 19, 106, -1,
1253 19, 106, 19, 106, -1, 19, 106, 19, 106, 19,
1254 106, -1, -1, 120, -1, 55, 24, -1, 6, -1,
1255 19, -1, 19, 5, -1, 5, 19, -1, 19, 61,
1256 108, -1, 19, 5, 61, 108, -1, 5, 19, 61,
1257 108, -1, 108, -1, 109, 61, 10, -1, 109, -1,
1258 109, 61, 110, -1, 110, -1, 93, 19, -1, 93,
1259 19, 22, -1, 93, 19, 57, 19, 111, 58, -1,
1260 93, 19, 22, 57, 19, 111, 58, -1, 111, 112,
1261 -1, 112, -1, 19, -1, 64, 120, -1, 65, 120,
1262 -1, 64, 60, 120, -1, 65, 60, 120, -1, 60,
1263 60, 120, -1, 66, 60, 120, -1, 9, 19, 55,
1264 114, 56, 21, 59, -1, 9, 19, 55, 114, 61,
1265 56, 21, 59, -1, 114, 61, 115, -1, 115, -1,
1266 19, 60, 120, -1, 19, -1, 48, 19, 55, 117,
1267 56, 21, 59, -1, 48, 19, 55, 117, 61, 56,
1268 21, 59, -1, 117, 61, 19, -1, 19, -1, 47,
1269 19, 55, 119, 56, 21, 59, -1, 47, 19, 55,
1270 119, 61, 56, 21, 59, -1, 119, 61, 19, -1,
1271 19, -1, 20, -1, 67, 20, -1, 23, -1, 19,
1275 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1276 static const yytype_uint16 yyrline[] =
1278 0, 704, 704, 705, 706, 707, 710, 719, 728, 737,
1279 746, 755, 764, 773, 784, 785, 786, 787, 788, 789,
1280 790, 791, 794, 799, 806, 823, 824, 832, 844, 853,
1281 865, 874, 883, 892, 903, 904, 907, 908, 917, 929,
1282 930, 931, 932, 935, 936, 937, 938, 941, 961, 985,
1283 989, 997, 998, 999, 1000, 1001, 1009, 1015, 1018, 1023,
1284 1091, 1145, 1234, 1242, 1247, 1295, 1331, 1347, 1348, 1351,
1285 1352, 1355, 1356, 1368, 1369, 1372, 1378, 1384, 1390, 1396,
1286 1402, 1408, 1415, 1421, 1427, 1433, 1439, 1445, 1451, 1457,
1287 1463, 1469, 1475, 1500, 1509, 1515, 1516, 1519, 1522, 1528,
1288 1535, 1544, 1547, 1550, 1554, 1558, 1562, 1567, 1575, 1579,
1289 1584, 1588, 1591, 1595, 1598, 1603, 1604, 1605, 1606, 1607,
1290 1608, 1609, 1610, 1611, 1614, 1615, 1616, 1619, 1620, 1621,
1291 1625, 1632, 1644, 1650, 1662, 1674, 1677, 1683, 1688, 1691,
1292 1696, 1697, 1701, 1724, 1747, 1770, 1793, 1811, 1824, 1834,
1293 1874, 1886, 1906, 1937, 1944, 1945, 1951, 1952, 1963, 1974,
1294 1985, 1995, 2005, 2015, 2018, 2019, 2022, 2023, 2026, 2029,
1295 2032, 2040, 2050, 2051, 2054, 2071, 2078, 2085, 2092, 2099,
1296 2106, 2115, 2124, 2135, 2136, 2139, 2159, 2169, 2178, 2189,
1297 2192, 2197, 2206, 2217, 2220, 2226, 2227, 2231, 2232
1301 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1302 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1303 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1304 static const char *const yytname[] =
1306 "$end", "error", "$undefined", "CLASS", "FROM", "CONST", "VOID",
1307 "STRUCT", "UNION", "ENUM", "THREEDOTS", "SIGNED", "UNSIGNED", "LONG",
1308 "SHORT", "INT", "FLOAT", "DOUBLE", "CHAR", "TOKEN", "NUMBER",
1309 "TYPETOKEN", "ARRAY_DIM", "SINGLE_CHAR", "CCODE", "CTCODE", "ADCODE",
1310 "HTCODE", "PHCODE", "HCODE", "ACODE", "ATCODE", "STRING", "PUBLIC",
1311 "PRIVATE", "PROTECTED", "CLASSWIDE", "PROPERTY", "ARGUMENT", "VIRTUAL",
1312 "SIGNAL", "OVERRIDE", "NICK", "BLURB", "MAXIMUM", "MINIMUM",
1313 "DEFAULT_VALUE", "ERROR", "FLAGS", "TYPE", "FLAGS_TYPE", "ENUM_TYPE",
1314 "PARAM_TYPE", "BOXED_TYPE", "OBJECT_TYPE", "'{'", "'}'", "'('", "')'",
1315 "';'", "'='", "','", "'|'", "'*'", "'>'", "'<'", "'!'", "'-'", "$accept",
1316 "prog", "ccode", "ccodes", "class", "classdec", "classflags",
1317 "classcode", "thing", "scope", "destructor", "initializer", "varoptions",
1318 "variable", "argument", "export", "property", "param_spec",
1319 "param_spec_list", "string", "anyval", "param_spec_value", "argtype",
1320 "flags", "flaglist", "type", "specifier_list", "spec_list", "specifier",
1321 "strunionenum", "pointer", "simplesigtype", "fullsigtype", "sigtype",
1322 "tokenlist", "codenocode", "method", "methodmods", "retcode", "funcargs",
1323 "arglist", "arglist1", "arg", "checklist", "check", "enumcode",
1324 "enumvals", "enumval", "flagcode", "flagvals", "errorcode", "errorvals",
1330 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1332 static const yytype_uint16 yytoknum[] =
1334 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1335 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1336 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1337 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1338 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1339 305, 306, 307, 308, 309, 123, 125, 40, 41, 59,
1340 61, 44, 124, 42, 62, 60, 33, 45
1344 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1345 static const yytype_uint8 yyr1[] =
1347 0, 68, 69, 69, 69, 69, 70, 70, 70, 70,
1348 70, 70, 70, 70, 71, 71, 71, 71, 71, 71,
1349 71, 71, 72, 72, 73, 74, 74, 74, 74, 74,
1350 74, 74, 74, 74, 75, 75, 76, 76, 76, 76,
1351 76, 76, 76, 77, 77, 77, 77, 78, 78, 79,
1352 79, 80, 80, 80, 80, 80, 80, 81, 81, 82,
1353 82, 82, 83, 83, 84, 84, 84, 85, 85, 86,
1354 86, 87, 87, 88, 88, 89, 89, 89, 89, 89,
1355 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
1356 89, 89, 89, 90, 90, 91, 91, 92, 92, 93,
1357 93, 94, 94, 94, 94, 94, 94, 94, 95, 95,
1358 95, 95, 95, 95, 95, 96, 96, 96, 96, 96,
1359 96, 96, 96, 96, 97, 97, 97, 98, 98, 98,
1360 98, 99, 99, 100, 100, 100, 100, 101, 102, 102,
1361 103, 103, 104, 104, 104, 104, 104, 104, 104, 104,
1362 105, 105, 105, 105, 106, 106, 107, 107, 107, 107,
1363 107, 107, 107, 107, 108, 108, 109, 109, 110, 110,
1364 110, 110, 111, 111, 112, 112, 112, 112, 112, 112,
1365 112, 113, 113, 114, 114, 115, 115, 116, 116, 117,
1366 117, 118, 118, 119, 119, 120, 120, 120, 120
1369 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1370 static const yytype_uint8 yyr2[] =
1372 0, 2, 3, 2, 2, 1, 1, 1, 1, 1,
1373 1, 1, 1, 1, 2, 2, 2, 2, 1, 1,
1374 1, 1, 4, 3, 5, 0, 4, 5, 5, 5,
1375 6, 7, 6, 7, 2, 1, 1, 2, 3, 1,
1376 1, 1, 1, 1, 1, 1, 1, 2, 3, 2,
1377 3, 2, 2, 1, 1, 1, 0, 5, 6, 12,
1378 9, 6, 3, 0, 11, 8, 5, 3, 0, 3,
1379 1, 1, 4, 1, 1, 3, 3, 3, 3, 3,
1380 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1381 3, 3, 1, 5, 1, 3, 0, 3, 1, 2,
1382 1, 1, 1, 2, 2, 2, 3, 3, 2, 2,
1383 2, 1, 2, 1, 2, 1, 1, 1, 1, 1,
1384 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
1385 3, 2, 1, 3, 3, 2, 1, 4, 3, 1,
1386 2, 1, 10, 11, 9, 9, 8, 11, 8, 5,
1387 2, 4, 6, 0, 1, 2, 1, 1, 2, 2,
1388 3, 4, 4, 1, 3, 1, 3, 1, 2, 3,
1389 6, 7, 2, 1, 1, 2, 2, 3, 3, 3,
1390 3, 7, 8, 3, 1, 3, 1, 7, 8, 3,
1391 1, 7, 8, 3, 1, 1, 2, 1, 1
1394 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1395 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1396 means the default is an error. */
1397 static const yytype_uint8 yydefact[] =
1399 0, 0, 0, 6, 13, 7, 9, 10, 8, 11,
1400 12, 0, 0, 0, 18, 0, 5, 0, 19, 20,
1401 21, 0, 0, 0, 0, 1, 14, 4, 15, 16,
1402 17, 3, 0, 0, 0, 0, 0, 2, 0, 43,
1403 44, 45, 46, 0, 96, 0, 96, 0, 23, 42,
1404 0, 35, 0, 39, 40, 41, 36, 25, 186, 0,
1405 184, 194, 0, 190, 0, 0, 0, 0, 0, 37,
1406 0, 0, 0, 0, 115, 124, 125, 126, 122, 123,
1407 119, 117, 118, 120, 121, 116, 102, 111, 0, 0,
1408 100, 101, 113, 0, 0, 0, 22, 34, 0, 96,
1409 0, 0, 24, 0, 0, 0, 0, 0, 0, 0,
1410 38, 0, 0, 68, 98, 0, 94, 0, 0, 103,
1411 110, 0, 104, 112, 109, 0, 0, 127, 99, 114,
1412 108, 105, 0, 0, 136, 0, 132, 0, 0, 0,
1413 56, 0, 198, 195, 197, 0, 185, 0, 0, 183,
1414 0, 193, 0, 0, 189, 0, 0, 0, 0, 0,
1415 0, 95, 0, 63, 106, 0, 0, 128, 129, 107,
1416 0, 0, 0, 131, 0, 135, 0, 0, 0, 0,
1417 0, 55, 56, 0, 0, 54, 53, 0, 0, 0,
1418 0, 0, 25, 196, 181, 0, 191, 0, 187, 0,
1419 0, 141, 149, 92, 0, 0, 0, 0, 0, 0,
1420 0, 0, 0, 0, 0, 0, 0, 70, 0, 66,
1421 97, 0, 0, 0, 0, 0, 115, 102, 0, 0,
1422 163, 165, 167, 130, 139, 0, 134, 133, 0, 0,
1423 0, 0, 47, 0, 0, 0, 0, 49, 51, 0,
1424 52, 57, 0, 25, 25, 25, 0, 26, 182, 192,
1425 188, 140, 0, 0, 0, 0, 0, 0, 0, 0,
1426 0, 0, 0, 0, 67, 0, 0, 0, 0, 61,
1427 0, 103, 104, 0, 168, 153, 0, 137, 0, 0,
1428 0, 0, 0, 48, 58, 153, 50, 0, 25, 27,
1429 29, 28, 0, 25, 0, 71, 75, 76, 77, 78,
1430 198, 74, 79, 73, 80, 81, 83, 82, 85, 84,
1431 87, 86, 89, 88, 91, 90, 69, 0, 93, 62,
1432 0, 153, 0, 0, 160, 169, 0, 0, 0, 164,
1433 166, 138, 0, 0, 153, 0, 0, 25, 32, 25,
1434 30, 0, 0, 65, 0, 0, 162, 161, 0, 0,
1435 0, 150, 154, 146, 153, 0, 0, 0, 148, 33,
1436 31, 0, 0, 0, 60, 144, 0, 174, 0, 0,
1437 0, 0, 0, 173, 155, 0, 0, 153, 145, 153,
1438 72, 0, 0, 0, 0, 0, 175, 0, 176, 0,
1439 170, 172, 151, 142, 0, 0, 64, 0, 171, 179,
1440 177, 178, 180, 0, 147, 143, 59, 152
1443 /* YYDEFGOTO[NTERM-NUM]. */
1444 static const yytype_int16 yydefgoto[] =
1446 -1, 13, 14, 15, 16, 17, 102, 50, 51, 52,
1447 185, 186, 187, 53, 54, 223, 55, 159, 216, 306,
1448 312, 217, 117, 72, 115, 228, 90, 91, 92, 93,
1449 128, 134, 135, 136, 235, 202, 56, 338, 361, 229,
1450 230, 231, 232, 382, 383, 18, 59, 60, 19, 64,
1454 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1456 #define YYPACT_NINF -360
1457 static const yytype_int16 yypact[] =
1459 162, -2, 6, -360, -360, -360, -360, -360, -360, -360,
1460 -360, 16, 90, 131, -360, 162, 210, 77, -360, -360,
1461 -360, 156, 126, 160, 167, -360, -360, 210, -360, -360,
1462 -360, 210, 161, 223, 153, 230, 231, 210, 226, -360,
1463 -360, -360, -360, 244, 207, 309, 207, 214, -360, -360,
1464 192, -360, 292, -360, -360, -360, -360, 215, 242, -28,
1465 -360, -360, 151, -360, 152, 255, 300, 310, 292, -360,
1466 319, 330, 336, 376, -360, -360, -360, -360, -360, -360,
1467 -360, -360, -360, -360, -360, -360, 351, 444, 393, 338,
1468 295, -360, 458, 360, 327, 365, -360, -360, 393, 207,
1469 377, 384, -360, 7, 392, 92, 399, 98, 409, 100,
1470 -360, 379, 428, 394, 390, 395, 397, 447, 472, -360,
1471 -360, 448, -360, 472, -360, 449, 423, 5, -360, 472,
1472 -360, 476, 149, 463, -360, 393, -360, 433, 473, 475,
1473 58, 184, -360, -360, -360, 477, -360, 436, 478, -360,
1474 437, -360, 479, 439, -360, 480, 159, 445, 236, -4,
1475 330, -360, 484, 450, -360, 451, 410, 295, -360, -360,
1476 452, 485, 486, -360, 69, -360, 487, 393, 453, 69,
1477 393, 115, -3, 410, 18, 454, 492, 456, 117, 455,
1478 459, 488, 215, -360, -360, 457, -360, 460, -360, 462,
1479 494, -360, -360, -360, 464, 465, 466, 467, 468, 469,
1480 470, 471, 474, 481, 482, 483, 185, -360, 489, -360,
1481 -360, 393, 493, 503, 410, 427, 490, 8, 504, 491,
1482 -360, 495, -360, -360, -360, 212, -360, -360, 496, 513,
1483 410, 514, -360, 511, 498, 497, 512, -360, -360, 115,
1484 -360, -360, 120, 215, 215, 215, 121, -360, -360, -360,
1485 -360, -360, 110, 110, 7, 7, 63, 330, 393, 119,
1486 202, 235, 274, 333, -360, 236, 515, 500, 501, 499,
1487 502, 289, 290, 393, -8, 518, 359, -360, 519, 410,
1488 505, 506, 508, -360, -360, 518, -360, 509, 215, -360,
1489 -360, -360, 510, 215, 516, -360, -360, -360, -360, -360,
1490 516, -360, -360, -360, -360, -360, -360, -360, -360, -360,
1491 -360, -360, -360, -360, -360, -360, -360, 13, -360, -360,
1492 521, 518, 393, 393, -360, 517, 527, 70, 159, -360,
1493 -360, -360, 520, 410, 518, 410, 159, 215, -360, 215,
1494 -360, 529, 522, -360, 65, 159, -360, -360, 528, 32,
1495 526, 532, -360, -360, 518, 523, 159, 524, -360, -360,
1496 -360, 525, 539, 530, -360, -360, 32, -360, 531, 27,
1497 83, 533, 56, -360, -360, 70, 159, 518, -360, 518,
1498 -360, 507, 545, 81, 7, 7, -360, 7, -360, 7,
1499 -360, -360, 551, -360, 159, 159, -360, 535, -360, -360,
1500 -360, -360, -360, 70, -360, -360, -360, -360
1503 /* YYPGOTO[NTERM-NUM]. */
1504 static const yytype_int16 yypgoto[] =
1506 -360, -360, 21, 15, 537, -360, -190, -360, 534, -27,
1507 354, 386, 398, -360, -360, -360, -360, -360, -360, -90,
1508 -360, 297, -360, -37, -155, -44, -360, -70, -360, -67,
1509 -23, 440, -360, -5, -360, -326, 85, -288, -278, -179,
1510 -262, -360, 301, 199, -359, 237, -360, 536, 238, -360,
1514 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1515 positive, shift that token. If negative, reduce the rule which
1516 number is the opposite. If zero, do what YYDEFACT says.
1517 If YYTABLE_NINF, syntax error. */
1518 #define YYTABLE_NINF -160
1519 static const yytype_int16 yytable[] =
1521 146, 89, 257, 120, 245, 220, 121, 346, 100, 94,
1522 167, 68, 363, 282, 335, 218, 181, 124, 88, 21,
1523 368, 334, 130, 401, 112, 22, 142, 143, 104, 375,
1524 144, 31, 352, 105, 401, 23, 26, 142, 143, 68,
1525 388, 144, 37, 355, 125, 280, 142, 143, 120, 336,
1526 144, 377, 26, 120, 138, 219, 366, 184, 26, 120,
1527 403, 291, 139, 299, 300, 301, -157, 133, 127, 283,
1528 356, 357, 353, 246, 145, 377, 386, 181, 414, 415,
1529 182, 247, 310, 143, 373, 145, 144, 395, 170, 142,
1530 143, 176, 378, 144, 145, 305, 379, 380, 381, 404,
1531 377, 405, 142, 143, 168, 172, 144, 402, 348, 24,
1532 342, 58, 314, 350, 400, 183, 378, 151, 184, 154,
1533 379, 380, 381, 69, 374, 360, 171, 173, 175, 304,
1534 145, 25, 32, 239, 242, 417, 241, 145, 316, 408,
1535 317, 378, 305, 397, 233, 379, 380, 381, 148, 252,
1536 145, 110, 297, 302, 152, 120, 155, 369, 121, 370,
1537 33, 308, 309, 313, 365, 1, 367, 236, 170, 237,
1538 243, 2, 58, 307, 173, 253, 311, 277, 298, 303,
1539 38, 34, 39, 40, 41, 42, 3, 4, 5, 6,
1540 7, 8, 9, 10, 39, 40, 41, 42, 43, 44,
1541 45, 46, 47, 188, 189, 190, 171, 106, 108, 11,
1542 12, 38, 107, 109, 200, 35, 191, 48, 201, 2,
1543 49, 318, 36, 319, 315, 39, 40, 41, 42, 43,
1544 44, 45, 46, 47, 3, 4, 5, 6, 7, 8,
1545 9, 10, 192, 274, 57, 65, 275, 66, 96, 61,
1546 63, 49, 28, 29, 320, 203, 321, 11, 12, 39,
1547 40, 41, 42, 70, 71, 45, 46, 47, 28, 29,
1548 287, 95, 101, 288, 28, 29, 396, 398, 204, 205,
1549 206, 207, 208, 67, 209, 210, 211, 212, 213, 214,
1550 215, 409, 410, 322, 411, 323, 412, 73, 74, 75,
1551 76, 77, 103, 78, 79, 80, 81, 82, 83, 84,
1552 85, 86, 67, 87, 73, 74, 75, 76, 77, 65,
1553 78, 79, 80, 81, 82, 83, 84, 85, 86, 111,
1554 87, 98, 99, 39, 40, 41, 42, 30, 113, 45,
1555 46, 47, 39, 40, 41, 42, 132, -159, -158, 114,
1556 332, 333, 324, 30, 325, 116, 122, 126, 127, 30,
1557 39, 40, 41, 42, 73, 74, 75, 76, 77, 339,
1558 78, 79, 80, 81, 82, 83, 84, 85, 86, 131,
1559 87, 118, 74, 75, 76, 77, 137, 78, 79, 80,
1560 81, 82, 83, 84, 85, 119, 140, 87, 73, 74,
1561 75, 76, 77, 141, 78, 79, 80, 81, 82, 83,
1562 84, 85, 86, 147, 87, 225, 226, 75, 76, 77,
1563 150, 78, 79, 80, 81, 82, 83, 84, 85, 227,
1564 153, 87, 118, 74, 75, 76, 77, 156, 78, 79,
1565 80, 81, 82, 83, 84, 85, 281, 157, 87, 123,
1566 74, 158, 160, 161, 162, 78, 79, 80, 81, 82,
1567 83, 84, 85, 129, 74, 87, 163, 164, 165, 78,
1568 79, 80, 81, 82, 83, 84, 85, 118, 74, 87,
1569 166, 169, 174, 78, 79, 80, 81, 82, 83, 84,
1570 85, 177, 178, 87, 179, 194, 196, 193, 198, 195,
1571 197, 199, 183, 221, 234, 170, 238, 222, 224, 171,
1572 240, 249, 278, 254, 184, 251, 258, 255, 261, 259,
1573 256, 260, 279, 284, 262, 263, 264, 265, 266, 267,
1574 268, 269, 290, 292, 270, 293, 296, 337, 341, 327,
1575 250, 271, 272, 273, 276, 354, 359, 376, -156, 285,
1576 384, 385, 27, 289, 330, 295, 286, 294, 328, 329,
1577 331, 371, 343, 391, 344, 345, 406, 347, 349, 407,
1578 413, 248, 326, 351, 358, 393, 0, 372, 364, 180,
1579 244, 387, 389, 390, 97, 392, 0, 340, 0, 0,
1580 0, 394, 0, 399, 416, 0, 0, 0, 0, 0,
1581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1583 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1584 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1588 static const yytype_int16 yycheck[] =
1590 103, 45, 192, 73, 183, 160, 73, 295, 52, 46,
1591 5, 38, 338, 5, 22, 19, 19, 87, 45, 21,
1592 346, 283, 92, 382, 68, 19, 19, 20, 56, 355,
1593 23, 16, 19, 61, 393, 19, 15, 19, 20, 66,
1594 366, 23, 27, 331, 88, 224, 19, 20, 118, 57,
1595 23, 19, 31, 123, 98, 59, 344, 60, 37, 129,
1596 386, 240, 99, 253, 254, 255, 58, 94, 63, 61,
1597 332, 333, 59, 55, 67, 19, 364, 19, 404, 405,
1598 22, 184, 19, 20, 19, 67, 23, 60, 19, 19,
1599 20, 135, 60, 23, 67, 32, 64, 65, 66, 387,
1600 19, 389, 19, 20, 127, 132, 23, 385, 298, 19,
1601 289, 19, 267, 303, 58, 57, 60, 19, 60, 19,
1602 64, 65, 66, 38, 59, 55, 57, 132, 133, 19,
1603 67, 0, 55, 177, 19, 413, 180, 67, 19, 58,
1604 21, 60, 32, 60, 167, 64, 65, 66, 56, 32,
1605 67, 66, 32, 32, 56, 225, 56, 347, 225, 349,
1606 4, 264, 265, 266, 343, 3, 345, 172, 19, 174,
1607 55, 9, 19, 263, 179, 58, 266, 221, 58, 58,
1608 19, 55, 33, 34, 35, 36, 24, 25, 26, 27,
1609 28, 29, 30, 31, 33, 34, 35, 36, 37, 38,
1610 39, 40, 41, 19, 20, 21, 57, 56, 56, 47,
1611 48, 19, 61, 61, 55, 55, 32, 56, 59, 9,
1612 59, 19, 55, 21, 268, 33, 34, 35, 36, 37,
1613 38, 39, 40, 41, 24, 25, 26, 27, 28, 29,
1614 30, 31, 58, 58, 21, 19, 61, 21, 56, 19,
1615 19, 59, 15, 15, 19, 19, 21, 47, 48, 33,
1616 34, 35, 36, 19, 57, 39, 40, 41, 31, 31,
1617 58, 57, 57, 61, 37, 37, 379, 380, 42, 43,
1618 44, 45, 46, 57, 48, 49, 50, 51, 52, 53,
1619 54, 394, 395, 19, 397, 21, 399, 5, 6, 7,
1620 8, 9, 60, 11, 12, 13, 14, 15, 16, 17,
1621 18, 19, 57, 21, 5, 6, 7, 8, 9, 19,
1622 11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
1623 21, 39, 40, 33, 34, 35, 36, 15, 19, 39,
1624 40, 41, 33, 34, 35, 36, 19, 58, 58, 19,
1625 61, 61, 19, 31, 21, 19, 5, 19, 63, 37,
1626 33, 34, 35, 36, 5, 6, 7, 8, 9, 10,
1627 11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
1628 21, 5, 6, 7, 8, 9, 21, 11, 12, 13,
1629 14, 15, 16, 17, 18, 19, 19, 21, 5, 6,
1630 7, 8, 9, 19, 11, 12, 13, 14, 15, 16,
1631 17, 18, 19, 21, 21, 5, 6, 7, 8, 9,
1632 21, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1633 21, 21, 5, 6, 7, 8, 9, 58, 11, 12,
1634 13, 14, 15, 16, 17, 18, 19, 19, 21, 5,
1635 6, 57, 62, 58, 57, 11, 12, 13, 14, 15,
1636 16, 17, 18, 5, 6, 21, 19, 19, 19, 11,
1637 12, 13, 14, 15, 16, 17, 18, 5, 6, 21,
1638 57, 5, 19, 11, 12, 13, 14, 15, 16, 17,
1639 18, 58, 19, 21, 19, 59, 59, 20, 59, 21,
1640 21, 21, 57, 19, 19, 19, 19, 57, 57, 57,
1641 57, 19, 19, 58, 60, 59, 59, 58, 24, 59,
1642 32, 59, 19, 19, 60, 60, 60, 60, 60, 60,
1643 60, 60, 19, 19, 60, 24, 24, 19, 19, 24,
1644 186, 60, 60, 60, 55, 24, 19, 19, 58, 58,
1645 24, 19, 15, 57, 55, 58, 61, 59, 58, 58,
1646 58, 32, 57, 24, 58, 57, 59, 58, 58, 24,
1647 19, 185, 275, 57, 57, 376, -1, 55, 58, 139,
1648 182, 58, 58, 58, 50, 55, -1, 286, -1, -1,
1649 -1, 60, -1, 60, 59, -1, -1, -1, -1, -1,
1650 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1651 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1652 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1653 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1657 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1658 symbol of state STATE-NUM. */
1659 static const yytype_uint8 yystos[] =
1661 0, 3, 9, 24, 25, 26, 27, 28, 29, 30,
1662 31, 47, 48, 69, 70, 71, 72, 73, 113, 116,
1663 118, 21, 19, 19, 19, 0, 70, 72, 113, 116,
1664 118, 71, 55, 4, 55, 55, 55, 71, 19, 33,
1665 34, 35, 36, 37, 38, 39, 40, 41, 56, 59,
1666 75, 76, 77, 81, 82, 84, 104, 21, 19, 114,
1667 115, 19, 119, 19, 117, 19, 21, 57, 77, 104,
1668 19, 57, 91, 5, 6, 7, 8, 9, 11, 12,
1669 13, 14, 15, 16, 17, 18, 19, 21, 77, 93,
1670 94, 95, 96, 97, 91, 57, 56, 76, 39, 40,
1671 93, 57, 74, 60, 56, 61, 56, 61, 56, 61,
1672 104, 19, 93, 19, 19, 92, 19, 90, 5, 19,
1673 95, 97, 5, 5, 95, 93, 19, 63, 98, 5,
1674 95, 19, 19, 77, 99, 100, 101, 21, 93, 91,
1675 19, 19, 19, 20, 23, 67, 120, 21, 56, 115,
1676 21, 19, 56, 21, 19, 56, 58, 19, 57, 85,
1677 62, 58, 57, 19, 19, 19, 57, 5, 98, 5,
1678 19, 57, 77, 101, 19, 101, 93, 58, 19, 19,
1679 99, 19, 22, 57, 60, 78, 79, 80, 19, 20,
1680 21, 32, 58, 20, 59, 21, 59, 21, 59, 21,
1681 55, 59, 103, 19, 42, 43, 44, 45, 46, 48,
1682 49, 50, 51, 52, 53, 54, 86, 89, 19, 59,
1683 92, 19, 57, 83, 57, 5, 6, 19, 93, 107,
1684 108, 109, 110, 98, 19, 102, 101, 101, 19, 93,
1685 57, 93, 19, 55, 80, 107, 55, 120, 79, 19,
1686 78, 59, 32, 58, 58, 58, 32, 74, 59, 59,
1687 59, 24, 60, 60, 60, 60, 60, 60, 60, 60,
1688 60, 60, 60, 60, 58, 61, 55, 93, 19, 19,
1689 107, 19, 5, 61, 19, 58, 61, 58, 61, 57,
1690 19, 107, 19, 24, 59, 58, 24, 32, 58, 74,
1691 74, 74, 32, 58, 19, 32, 87, 87, 120, 120,
1692 19, 87, 88, 120, 92, 93, 19, 21, 19, 21,
1693 19, 21, 19, 21, 19, 21, 89, 24, 58, 58,
1694 55, 58, 61, 61, 108, 22, 57, 19, 105, 10,
1695 110, 19, 107, 57, 58, 57, 105, 58, 74, 58,
1696 74, 57, 19, 59, 24, 105, 108, 108, 57, 19,
1697 55, 106, 120, 103, 58, 107, 105, 107, 103, 74,
1698 74, 32, 55, 19, 59, 103, 19, 19, 60, 64,
1699 65, 66, 111, 112, 24, 19, 105, 58, 103, 58,
1700 58, 24, 55, 111, 60, 60, 120, 60, 120, 60,
1701 58, 112, 106, 103, 105, 105, 59, 24, 58, 120,
1702 120, 120, 120, 19, 103, 103, 59, 106
1705 #define yyerrok (yyerrstatus = 0)
1706 #define yyclearin (yychar = YYEMPTY)
1707 #define YYEMPTY (-2)
1710 #define YYACCEPT goto yyacceptlab
1711 #define YYABORT goto yyabortlab
1712 #define YYERROR goto yyerrorlab
1715 /* Like YYERROR except do call yyerror. This remains here temporarily
1716 to ease the transition to the new meaning of YYERROR, for GCC.
1717 Once GCC version 2 has supplanted version 1, this can go. However,
1718 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1719 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1722 #define YYFAIL goto yyerrlab
1724 /* This is here to suppress warnings from the GCC cpp's
1725 -Wunused-macros. Normally we don't worry about that warning, but
1726 some users do, and we want to make it easy for users to remove
1727 YYFAIL uses, which will produce warnings from Bison 2.5. */
1730 #define YYRECOVERING() (!!yyerrstatus)
1732 #define YYBACKUP(Token, Value) \
1734 if (yychar == YYEMPTY && yylen == 1) \
1738 yytoken = YYTRANSLATE (yychar); \
1744 yyerror (YY_("syntax error: cannot back up")); \
1751 #define YYERRCODE 256
1754 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1755 If N is 0, then set CURRENT to the empty location which ends
1756 the previous symbol: RHS[0] (always defined). */
1758 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1759 #ifndef YYLLOC_DEFAULT
1760 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1764 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1765 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1766 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1767 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1771 (Current).first_line = (Current).last_line = \
1772 YYRHSLOC (Rhs, 0).last_line; \
1773 (Current).first_column = (Current).last_column = \
1774 YYRHSLOC (Rhs, 0).last_column; \
1780 /* YY_LOCATION_PRINT -- Print the location on the stream.
1781 This macro was not mandated originally: define only if we know
1782 we won't break user code: when these are the locations we know. */
1784 #ifndef YY_LOCATION_PRINT
1785 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1786 # define YY_LOCATION_PRINT(File, Loc) \
1787 fprintf (File, "%d.%d-%d.%d", \
1788 (Loc).first_line, (Loc).first_column, \
1789 (Loc).last_line, (Loc).last_column)
1791 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1796 /* YYLEX -- calling `yylex' with the right arguments. */
1799 # define YYLEX yylex (YYLEX_PARAM)
1801 # define YYLEX yylex ()
1804 /* Enable debugging if requested. */
1808 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1809 # define YYFPRINTF fprintf
1812 # define YYDPRINTF(Args) \
1818 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1822 YYFPRINTF (stderr, "%s ", Title); \
1823 yy_symbol_print (stderr, \
1825 YYFPRINTF (stderr, "\n"); \
1830 /*--------------------------------.
1831 | Print this symbol on YYOUTPUT. |
1832 `--------------------------------*/
1835 #if (defined __STDC__ || defined __C99__FUNC__ \
1836 || defined __cplusplus || defined _MSC_VER)
1838 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1841 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1844 YYSTYPE const * const yyvaluep;
1850 if (yytype < YYNTOKENS)
1851 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1863 /*--------------------------------.
1864 | Print this symbol on YYOUTPUT. |
1865 `--------------------------------*/
1867 #if (defined __STDC__ || defined __C99__FUNC__ \
1868 || defined __cplusplus || defined _MSC_VER)
1870 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1873 yy_symbol_print (yyoutput, yytype, yyvaluep)
1876 YYSTYPE const * const yyvaluep;
1879 if (yytype < YYNTOKENS)
1880 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1882 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1884 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1885 YYFPRINTF (yyoutput, ")");
1888 /*------------------------------------------------------------------.
1889 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1891 `------------------------------------------------------------------*/
1893 #if (defined __STDC__ || defined __C99__FUNC__ \
1894 || defined __cplusplus || defined _MSC_VER)
1896 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1899 yy_stack_print (yybottom, yytop)
1900 yytype_int16 *yybottom;
1901 yytype_int16 *yytop;
1904 YYFPRINTF (stderr, "Stack now");
1905 for (; yybottom <= yytop; yybottom++)
1907 int yybot = *yybottom;
1908 YYFPRINTF (stderr, " %d", yybot);
1910 YYFPRINTF (stderr, "\n");
1913 # define YY_STACK_PRINT(Bottom, Top) \
1916 yy_stack_print ((Bottom), (Top)); \
1920 /*------------------------------------------------.
1921 | Report that the YYRULE is going to be reduced. |
1922 `------------------------------------------------*/
1924 #if (defined __STDC__ || defined __C99__FUNC__ \
1925 || defined __cplusplus || defined _MSC_VER)
1927 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1930 yy_reduce_print (yyvsp, yyrule)
1935 int yynrhs = yyr2[yyrule];
1937 unsigned long int yylno = yyrline[yyrule];
1938 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1940 /* The symbols being reduced. */
1941 for (yyi = 0; yyi < yynrhs; yyi++)
1943 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1944 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1945 &(yyvsp[(yyi + 1) - (yynrhs)])
1947 YYFPRINTF (stderr, "\n");
1951 # define YY_REDUCE_PRINT(Rule) \
1954 yy_reduce_print (yyvsp, Rule); \
1957 /* Nonzero means print parse trace. It is left uninitialized so that
1958 multiple parsers can coexist. */
1960 #else /* !YYDEBUG */
1961 # define YYDPRINTF(Args)
1962 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1963 # define YY_STACK_PRINT(Bottom, Top)
1964 # define YY_REDUCE_PRINT(Rule)
1965 #endif /* !YYDEBUG */
1968 /* YYINITDEPTH -- initial size of the parser's stacks. */
1970 # define YYINITDEPTH 200
1973 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1974 if the built-in stack extension method is used).
1976 Do not make this value too large; the results are undefined if
1977 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1978 evaluated with infinite-precision integer arithmetic. */
1981 # define YYMAXDEPTH 10000
1989 # if defined __GLIBC__ && defined _STRING_H
1990 # define yystrlen strlen
1992 /* Return the length of YYSTR. */
1993 #if (defined __STDC__ || defined __C99__FUNC__ \
1994 || defined __cplusplus || defined _MSC_VER)
1996 yystrlen (const char *yystr)
2004 for (yylen = 0; yystr[yylen]; yylen++)
2012 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2013 # define yystpcpy stpcpy
2015 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2017 #if (defined __STDC__ || defined __C99__FUNC__ \
2018 || defined __cplusplus || defined _MSC_VER)
2020 yystpcpy (char *yydest, const char *yysrc)
2023 yystpcpy (yydest, yysrc)
2029 const char *yys = yysrc;
2031 while ((*yyd++ = *yys++) != '\0')
2040 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2041 quotes and backslashes, so that it's suitable for yyerror. The
2042 heuristic is that double-quoting is unnecessary unless the string
2043 contains an apostrophe, a comma, or backslash (other than
2044 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2045 null, do not copy; instead, return the length of what the result
2048 yytnamerr (char *yyres, const char *yystr)
2053 char const *yyp = yystr;
2060 goto do_not_strip_quotes;
2064 goto do_not_strip_quotes;
2077 do_not_strip_quotes: ;
2081 return yystrlen (yystr);
2083 return yystpcpy (yyres, yystr) - yyres;
2087 /* Copy into YYRESULT an error message about the unexpected token
2088 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2089 including the terminating null byte. If YYRESULT is null, do not
2090 copy anything; just return the number of bytes that would be
2091 copied. As a special case, return 0 if an ordinary "syntax error"
2092 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2093 size calculation. */
2095 yysyntax_error (char *yyresult, int yystate, int yychar)
2097 int yyn = yypact[yystate];
2099 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2103 int yytype = YYTRANSLATE (yychar);
2104 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2105 YYSIZE_T yysize = yysize0;
2107 int yysize_overflow = 0;
2108 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2109 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2113 /* This is so xgettext sees the translatable formats that are
2114 constructed on the fly. */
2115 YY_("syntax error, unexpected %s");
2116 YY_("syntax error, unexpected %s, expecting %s");
2117 YY_("syntax error, unexpected %s, expecting %s or %s");
2118 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2119 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2123 static char const yyunexpected[] = "syntax error, unexpected %s";
2124 static char const yyexpecting[] = ", expecting %s";
2125 static char const yyor[] = " or %s";
2126 char yyformat[sizeof yyunexpected
2127 + sizeof yyexpecting - 1
2128 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2129 * (sizeof yyor - 1))];
2130 char const *yyprefix = yyexpecting;
2132 /* Start YYX at -YYN if negative to avoid negative indexes in
2134 int yyxbegin = yyn < 0 ? -yyn : 0;
2136 /* Stay within bounds of both yycheck and yytname. */
2137 int yychecklim = YYLAST - yyn + 1;
2138 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2141 yyarg[0] = yytname[yytype];
2142 yyfmt = yystpcpy (yyformat, yyunexpected);
2144 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2145 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2147 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2151 yyformat[sizeof yyunexpected - 1] = '\0';
2154 yyarg[yycount++] = yytname[yyx];
2155 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2156 yysize_overflow |= (yysize1 < yysize);
2158 yyfmt = yystpcpy (yyfmt, yyprefix);
2162 yyf = YY_(yyformat);
2163 yysize1 = yysize + yystrlen (yyf);
2164 yysize_overflow |= (yysize1 < yysize);
2167 if (yysize_overflow)
2168 return YYSIZE_MAXIMUM;
2172 /* Avoid sprintf, as that infringes on the user's name space.
2173 Don't have undefined behavior even if the translation
2174 produced a string with the wrong number of "%s"s. */
2175 char *yyp = yyresult;
2177 while ((*yyp = *yyf) != '\0')
2179 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2181 yyp += yytnamerr (yyp, yyarg[yyi++]);
2194 #endif /* YYERROR_VERBOSE */
2197 /*-----------------------------------------------.
2198 | Release the memory associated to this symbol. |
2199 `-----------------------------------------------*/
2202 #if (defined __STDC__ || defined __C99__FUNC__ \
2203 || defined __cplusplus || defined _MSC_VER)
2205 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2208 yydestruct (yymsg, yytype, yyvaluep)
2218 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2228 /* Prevent warnings from -Wmissing-prototypes. */
2229 #ifdef YYPARSE_PARAM
2230 #if defined __STDC__ || defined __cplusplus
2231 int yyparse (void *YYPARSE_PARAM);
2235 #else /* ! YYPARSE_PARAM */
2236 #if defined __STDC__ || defined __cplusplus
2241 #endif /* ! YYPARSE_PARAM */
2244 /* The lookahead symbol. */
2247 /* The semantic value of the lookahead symbol. */
2250 /* Number of syntax errors so far. */
2255 /*-------------------------.
2256 | yyparse or yypush_parse. |
2257 `-------------------------*/
2259 #ifdef YYPARSE_PARAM
2260 #if (defined __STDC__ || defined __C99__FUNC__ \
2261 || defined __cplusplus || defined _MSC_VER)
2263 yyparse (void *YYPARSE_PARAM)
2266 yyparse (YYPARSE_PARAM)
2267 void *YYPARSE_PARAM;
2269 #else /* ! YYPARSE_PARAM */
2270 #if (defined __STDC__ || defined __C99__FUNC__ \
2271 || defined __cplusplus || defined _MSC_VER)
2284 /* Number of tokens to shift before error messages enabled. */
2287 /* The stacks and their tools:
2288 `yyss': related to states.
2289 `yyvs': related to semantic values.
2291 Refer to the stacks thru separate pointers, to allow yyoverflow
2292 to reallocate them elsewhere. */
2294 /* The state stack. */
2295 yytype_int16 yyssa[YYINITDEPTH];
2297 yytype_int16 *yyssp;
2299 /* The semantic value stack. */
2300 YYSTYPE yyvsa[YYINITDEPTH];
2304 YYSIZE_T yystacksize;
2308 /* Lookahead token as an internal (translated) token number. */
2310 /* The variables used to return semantic value and location from the
2315 /* Buffer for error messages, and its allocated size. */
2317 char *yymsg = yymsgbuf;
2318 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2321 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2323 /* The number of symbols on the RHS of the reduced rule.
2324 Keep to zero when no symbol should be popped. */
2330 yystacksize = YYINITDEPTH;
2332 YYDPRINTF ((stderr, "Starting parse\n"));
2337 yychar = YYEMPTY; /* Cause a token to be read. */
2339 /* Initialize stack pointers.
2340 Waste one element of value and location stack
2341 so that they stay on the same level as the state stack.
2342 The wasted elements are never initialized. */
2348 /*------------------------------------------------------------.
2349 | yynewstate -- Push a new state, which is found in yystate. |
2350 `------------------------------------------------------------*/
2352 /* In all cases, when you get here, the value and location stacks
2353 have just been pushed. So pushing a state here evens the stacks. */
2359 if (yyss + yystacksize - 1 <= yyssp)
2361 /* Get the current used size of the three stacks, in elements. */
2362 YYSIZE_T yysize = yyssp - yyss + 1;
2366 /* Give user a chance to reallocate the stack. Use copies of
2367 these so that the &'s don't force the real ones into
2369 YYSTYPE *yyvs1 = yyvs;
2370 yytype_int16 *yyss1 = yyss;
2372 /* Each stack pointer address is followed by the size of the
2373 data in use in that stack, in bytes. This used to be a
2374 conditional around just the two extra args, but that might
2375 be undefined if yyoverflow is a macro. */
2376 yyoverflow (YY_("memory exhausted"),
2377 &yyss1, yysize * sizeof (*yyssp),
2378 &yyvs1, yysize * sizeof (*yyvsp),
2384 #else /* no yyoverflow */
2385 # ifndef YYSTACK_RELOCATE
2386 goto yyexhaustedlab;
2388 /* Extend the stack our own way. */
2389 if (YYMAXDEPTH <= yystacksize)
2390 goto yyexhaustedlab;
2392 if (YYMAXDEPTH < yystacksize)
2393 yystacksize = YYMAXDEPTH;
2396 yytype_int16 *yyss1 = yyss;
2397 union yyalloc *yyptr =
2398 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2400 goto yyexhaustedlab;
2401 YYSTACK_RELOCATE (yyss_alloc, yyss);
2402 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2403 # undef YYSTACK_RELOCATE
2405 YYSTACK_FREE (yyss1);
2408 #endif /* no yyoverflow */
2410 yyssp = yyss + yysize - 1;
2411 yyvsp = yyvs + yysize - 1;
2413 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2414 (unsigned long int) yystacksize));
2416 if (yyss + yystacksize - 1 <= yyssp)
2420 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2422 if (yystate == YYFINAL)
2432 /* Do appropriate processing given the current state. Read a
2433 lookahead token if we need one and don't already have one. */
2435 /* First try to decide what to do without reference to lookahead token. */
2436 yyn = yypact[yystate];
2437 if (yyn == YYPACT_NINF)
2440 /* Not known => get a lookahead token if don't already have one. */
2442 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2443 if (yychar == YYEMPTY)
2445 YYDPRINTF ((stderr, "Reading a token: "));
2449 if (yychar <= YYEOF)
2451 yychar = yytoken = YYEOF;
2452 YYDPRINTF ((stderr, "Now at end of input.\n"));
2456 yytoken = YYTRANSLATE (yychar);
2457 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2460 /* If the proper action on seeing token YYTOKEN is to reduce or to
2461 detect an error, take that action. */
2463 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2468 if (yyn == 0 || yyn == YYTABLE_NINF)
2474 /* Count tokens shifted since error; after three, turn off error
2479 /* Shift the lookahead token. */
2480 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2482 /* Discard the shifted token. */
2491 /*-----------------------------------------------------------.
2492 | yydefault -- do the default action for the current state. |
2493 `-----------------------------------------------------------*/
2495 yyn = yydefact[yystate];
2501 /*-----------------------------.
2502 | yyreduce -- Do a reduction. |
2503 `-----------------------------*/
2505 /* yyn is the number of a rule to reduce with. */
2508 /* If YYLEN is nonzero, implement the default value of the action:
2511 Otherwise, the following line sets YYVAL to garbage.
2512 This behavior is undocumented and Bison
2513 users should not rely upon it. Assigning to YYVAL
2514 unconditionally makes the parser a bit smaller, and it avoids a
2515 GCC warning that YYVAL may be used uninitialized. */
2516 yyval = yyvsp[1-yylen];
2519 YY_REDUCE_PRINT (yyn);
2524 /* Line 1464 of yacc.c */
2531 /* Line 1464 of yacc.c */
2538 /* Line 1464 of yacc.c */
2545 /* Line 1464 of yacc.c */
2552 /* Line 1464 of yacc.c */
2555 Node *node = node_new (CCODE_NODE,
2557 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2558 "line_no", ccode_line,
2560 nodes = g_list_append(nodes,node);
2561 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2567 /* Line 1464 of yacc.c */
2570 Node *node = node_new (CCODE_NODE,
2572 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2573 "line_no", ccode_line,
2575 nodes = g_list_append(nodes,node);
2576 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2582 /* Line 1464 of yacc.c */
2585 Node *node = node_new (CCODE_NODE,
2587 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2588 "line_no", ccode_line,
2590 nodes = g_list_append(nodes,node);
2591 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2597 /* Line 1464 of yacc.c */
2600 Node *node = node_new (CCODE_NODE,
2602 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2603 "line_no", ccode_line,
2605 nodes = g_list_append(nodes,node);
2606 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2612 /* Line 1464 of yacc.c */
2615 Node *node = node_new (CCODE_NODE,
2617 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2618 "line_no", ccode_line,
2620 nodes = g_list_append(nodes,node);
2621 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2627 /* Line 1464 of yacc.c */
2630 Node *node = node_new (CCODE_NODE,
2632 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2633 "line_no", ccode_line,
2635 nodes = g_list_append(nodes,node);
2636 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2642 /* Line 1464 of yacc.c */
2645 Node *node = node_new (CCODE_NODE,
2647 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2648 "line_no", ccode_line,
2650 nodes = g_list_append(nodes,node);
2651 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2657 /* Line 1464 of yacc.c */
2660 Node *node = node_new (CCODE_NODE,
2662 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2663 "line_no", ccode_line,
2665 nodes = g_list_append(nodes,node);
2666 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2672 /* Line 1464 of yacc.c */
2679 /* Line 1464 of yacc.c */
2686 /* Line 1464 of yacc.c */
2693 /* Line 1464 of yacc.c */
2700 /* Line 1464 of yacc.c */
2707 /* Line 1464 of yacc.c */
2714 /* Line 1464 of yacc.c */
2721 /* Line 1464 of yacc.c */
2728 /* Line 1464 of yacc.c */
2731 ((Class *)class)->nodes = class_nodes;
2733 nodes = g_list_append(nodes,class);
2739 /* Line 1464 of yacc.c */
2742 ((Class *)class)->nodes = NULL;
2744 nodes = g_list_append(nodes,class);
2750 /* Line 1464 of yacc.c */
2753 class = node_new (CLASS_NODE,
2754 "otype:steal", (yyvsp[(2) - (5)].id),
2755 "ptype:steal", (yyvsp[(4) - (5)].id),
2756 "bonobo_object_class:steal", bonobo_object_class,
2757 "glade_xml", glade_xml,
2758 "interfaces:steal", interfaces,
2759 "chunk_size:steal", chunk_size,
2760 "abstract", abstract,
2762 bonobo_object_class = NULL;
2771 /* Line 1464 of yacc.c */
2774 if(strcmp((yyvsp[(2) - (4)].id),"abstract") == 0) {
2777 yyerror(_("parse error"));
2785 /* Line 1464 of yacc.c */
2788 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2789 g_free (chunk_size);
2790 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2791 } else if(strcmp((yyvsp[(2) - (5)].id),"BonoboObject") == 0) {
2792 g_free (bonobo_object_class);
2793 bonobo_object_class = g_strdup((yyvsp[(3) - (5)].id));
2795 yyerror(_("parse error"));
2803 /* Line 1464 of yacc.c */
2806 if (strcmp ((yyvsp[(2) - (5)].id), "interface") == 0) {
2807 interfaces = g_list_append (interfaces,
2808 g_strdup ((yyvsp[(3) - (5)].id)));
2810 yyerror(_("parse error"));
2818 /* Line 1464 of yacc.c */
2821 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2822 g_free (chunk_size);
2823 if(atoi((yyvsp[(3) - (5)].id)) != 0)
2824 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2828 yyerror(_("parse error"));
2836 /* Line 1464 of yacc.c */
2839 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2841 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2843 yyerror(_("parse error"));
2851 /* Line 1464 of yacc.c */
2854 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2856 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2858 yyerror(_("parse error"));
2866 /* Line 1464 of yacc.c */
2869 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2871 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2873 yyerror(_("parse error"));
2881 /* Line 1464 of yacc.c */
2884 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2886 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2888 yyerror(_("parse error"));
2896 /* Line 1464 of yacc.c */
2903 /* Line 1464 of yacc.c */
2910 /* Line 1464 of yacc.c */
2917 /* Line 1464 of yacc.c */
2920 if (strcmp ((yyvsp[(1) - (2)].id), "BonoboObject") != 0) {
2921 g_free ((yyvsp[(1) - (2)].id));
2922 yyerror (_("parse error"));
2925 g_free ((yyvsp[(1) - (2)].id));
2926 last_added_method->bonobo_object_func = TRUE;
2932 /* Line 1464 of yacc.c */
2935 if (strcmp ((yyvsp[(1) - (3)].id), "interface") != 0) {
2936 g_free ((yyvsp[(1) - (3)].id));
2937 g_free ((yyvsp[(2) - (3)].id));
2938 yyerror (_("parse error"));
2941 g_free ((yyvsp[(1) - (3)].id));
2942 node_set ((Node *)last_added_method,
2943 "interface:steal", (yyvsp[(2) - (3)].id),
2950 /* Line 1464 of yacc.c */
2957 /* Line 1464 of yacc.c */
2964 /* Line 1464 of yacc.c */
2971 /* Line 1464 of yacc.c */
2978 /* Line 1464 of yacc.c */
2980 { the_scope = PUBLIC_SCOPE; }
2985 /* Line 1464 of yacc.c */
2987 { the_scope = PRIVATE_SCOPE; }
2992 /* Line 1464 of yacc.c */
2994 { the_scope = PROTECTED_SCOPE; }
2999 /* Line 1464 of yacc.c */
3001 { the_scope = CLASS_SCOPE; }
3006 /* Line 1464 of yacc.c */
3009 if (strcmp ((yyvsp[(1) - (2)].id), "destroywith") == 0) {
3010 g_free ((yyvsp[(1) - (2)].id));
3011 destructor_unref = FALSE;
3012 destructor = (yyvsp[(2) - (2)].id);
3013 destructor_line = line_no;
3014 destructor_simple = TRUE;
3015 } else if (strcmp ((yyvsp[(1) - (2)].id), "unrefwith") == 0) {
3016 g_free ((yyvsp[(1) - (2)].id));
3017 destructor_unref = TRUE;
3018 destructor = (yyvsp[(2) - (2)].id);
3019 destructor_line = line_no;
3020 destructor_simple = TRUE;
3022 g_free ((yyvsp[(1) - (2)].id));
3023 g_free ((yyvsp[(2) - (2)].id));
3024 yyerror (_("parse error"));
3032 /* Line 1464 of yacc.c */
3035 if (strcmp ((yyvsp[(1) - (3)].id), "destroy") == 0) {
3036 g_free((yyvsp[(1) - (3)].id));
3037 destructor_unref = FALSE;
3038 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3039 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3040 destructor_line = ccode_line;
3041 destructor_simple = FALSE;
3042 } else if (strcmp ((yyvsp[(1) - (3)].id), "unref") == 0) {
3043 g_free ((yyvsp[(1) - (3)].id));
3044 destructor_unref = TRUE;
3045 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3046 g_string_free ((yyvsp[(3) - (3)].cbuf), FALSE);
3047 destructor_line = ccode_line;
3048 destructor_simple = FALSE;
3050 g_free ((yyvsp[(1) - (3)].id));
3051 g_string_free ((yyvsp[(3) - (3)].cbuf), TRUE);
3052 yyerror (_("parse error"));
3060 /* Line 1464 of yacc.c */
3063 initializer = (yyvsp[(2) - (2)].id);
3064 initializer_line = ccode_line;
3070 /* Line 1464 of yacc.c */
3073 initializer = ((yyvsp[(3) - (3)].cbuf))->str;
3074 initializer_line = ccode_line;
3075 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3081 /* Line 1464 of yacc.c */
3088 /* Line 1464 of yacc.c */
3095 /* Line 1464 of yacc.c */
3097 { destructor = NULL; }
3102 /* Line 1464 of yacc.c */
3103 #line 1000 "parse.y"
3104 { initializer = NULL; }
3109 /* Line 1464 of yacc.c */
3110 #line 1001 "parse.y"
3112 if (strcmp ((yyvsp[(1) - (1)].id), "GladeXML") == 0) {
3113 glade_widget = TRUE;
3115 yyerror(_("parse error"));
3123 /* Line 1464 of yacc.c */
3124 #line 1009 "parse.y"
3133 /* Line 1464 of yacc.c */
3134 #line 1015 "parse.y"
3136 push_variable((yyvsp[(3) - (5)].id), the_scope,(yyvsp[(1) - (5)].line), NULL);
3142 /* Line 1464 of yacc.c */
3143 #line 1018 "parse.y"
3145 push_variable((yyvsp[(3) - (6)].id), the_scope, (yyvsp[(1) - (6)].line), (yyvsp[(4) - (6)].id));
3151 /* Line 1464 of yacc.c */
3152 #line 1023 "parse.y"
3155 if(strcmp((yyvsp[(6) - (12)].id),"get")==0 &&
3156 strcmp((yyvsp[(9) - (12)].id),"set")==0) {
3157 Type *type = pop_type();
3158 g_free ((yyvsp[(6) - (12)].id));
3159 g_free ((yyvsp[(9) - (12)].id));
3160 node = node_new (ARGUMENT_NODE,
3161 "gtktype:steal", (yyvsp[(3) - (12)].id),
3162 "atype:steal", type,
3163 "flags:steal", (yyvsp[(2) - (12)].list),
3164 "name:steal", (yyvsp[(4) - (12)].id),
3165 "get:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3166 "get_line", (yyvsp[(7) - (12)].line),
3167 "set:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3168 "set_line", (yyvsp[(10) - (12)].line),
3169 "line_no", (yyvsp[(1) - (12)].line),
3172 class_nodes = g_list_append(class_nodes,node);
3174 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3175 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3177 } else if(strcmp((yyvsp[(6) - (12)].id),"set")==0 &&
3178 strcmp((yyvsp[(9) - (12)].id),"get")==0) {
3179 Type *type = pop_type();
3180 g_free ((yyvsp[(6) - (12)].id));
3181 g_free ((yyvsp[(9) - (12)].id));
3182 node = node_new (ARGUMENT_NODE,
3183 "gtktype:steal", (yyvsp[(3) - (12)].id),
3184 "atype:steal", type,
3185 "flags:steal", (yyvsp[(2) - (12)].list),
3186 "name:steal", (yyvsp[(4) - (12)].id),
3187 "get:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3188 "get_line", (yyvsp[(10) - (12)].line),
3189 "set:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3190 "set_line", (yyvsp[(7) - (12)].line),
3191 "line_no", (yyvsp[(1) - (12)].line),
3193 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3194 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3195 class_nodes = g_list_append(class_nodes,node);
3197 g_free ((yyvsp[(3) - (12)].id));
3198 g_free ((yyvsp[(4) - (12)].id));
3199 g_free ((yyvsp[(6) - (12)].id));
3200 g_free ((yyvsp[(9) - (12)].id));
3201 g_list_foreach ((yyvsp[(2) - (12)].list), (GFunc)g_free, NULL);
3202 g_list_free ((yyvsp[(2) - (12)].list));
3203 g_string_free ((yyvsp[(11) - (12)].cbuf), TRUE);
3204 g_string_free ((yyvsp[(8) - (12)].cbuf), TRUE);
3205 yyerror (_("parse error"));
3209 if ((yyvsp[(5) - (12)].id) != NULL) {
3210 Argument *arg = (Argument *)node;
3211 export_accessors (arg->name,
3212 arg->get != NULL, arg->get_line,
3213 arg->set != NULL, arg->set_line,
3217 g_free ((yyvsp[(5) - (12)].id));
3225 /* Line 1464 of yacc.c */
3226 #line 1091 "parse.y"
3229 if(strcmp((yyvsp[(6) - (9)].id), "get") == 0) {
3230 Type *type = pop_type();
3231 g_free ((yyvsp[(6) - (9)].id));
3232 node = node_new (ARGUMENT_NODE,
3233 "gtktype:steal", (yyvsp[(3) - (9)].id),
3234 "atype:steal", type,
3235 "flags:steal", (yyvsp[(2) - (9)].list),
3236 "name:steal", (yyvsp[(4) - (9)].id),
3237 "get:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3238 "get_line", (yyvsp[(7) - (9)].line),
3239 "line_no", (yyvsp[(1) - (9)].line),
3242 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3243 class_nodes = g_list_append(class_nodes, node);
3244 } else if(strcmp((yyvsp[(6) - (9)].id), "set") == 0) {
3245 Type *type = pop_type();
3246 g_free ((yyvsp[(6) - (9)].id));
3247 node = node_new (ARGUMENT_NODE,
3248 "gtktype:steal", (yyvsp[(3) - (9)].id),
3249 "atype:steal", type,
3250 "flags:steal", (yyvsp[(2) - (9)].list),
3251 "name:steal", (yyvsp[(4) - (9)].id),
3252 "set:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3253 "set_line", (yyvsp[(7) - (9)].line),
3254 "line_no", (yyvsp[(1) - (9)].line),
3257 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3258 class_nodes = g_list_append (class_nodes, node);
3260 g_free ((yyvsp[(6) - (9)].id));
3261 g_free ((yyvsp[(3) - (9)].id));
3262 g_free ((yyvsp[(4) - (9)].id));
3263 g_list_foreach ((yyvsp[(2) - (9)].list), (GFunc)g_free, NULL);
3264 g_list_free ((yyvsp[(2) - (9)].list));
3265 g_string_free ((yyvsp[(8) - (9)].cbuf), TRUE);
3266 yyerror(_("parse error"));
3270 if ((yyvsp[(5) - (9)].id) != NULL) {
3271 Argument *arg = (Argument *)node;
3272 export_accessors (arg->name,
3273 arg->get != NULL, arg->get_line,
3274 arg->set != NULL, arg->set_line,
3278 g_free ((yyvsp[(5) - (9)].id));
3285 /* Line 1464 of yacc.c */
3286 #line 1145 "parse.y"
3289 char *get, *set = NULL;
3294 if(strcmp((yyvsp[(6) - (6)].id), "link")!=0 &&
3295 strcmp((yyvsp[(6) - (6)].id), "stringlink")!=0 &&
3296 strcmp((yyvsp[(6) - (6)].id), "objectlink")!=0) {
3297 g_free((yyvsp[(6) - (6)].id));
3298 g_free((yyvsp[(3) - (6)].id));
3299 g_free((yyvsp[(4) - (6)].id));
3300 g_list_foreach((yyvsp[(2) - (6)].list),(GFunc)g_free,NULL);
3301 g_list_free((yyvsp[(2) - (6)].list));
3302 yyerror(_("parse error"));
3308 var = find_var_or_die((yyvsp[(4) - (6)].id), (yyvsp[(1) - (6)].line));
3309 if(var->scope == PRIVATE_SCOPE) {
3310 root = "self->_priv";
3311 } else if(var->scope == CLASS_SCOPE) {
3312 root = "SELF_GET_CLASS(self)";
3314 error_print(GOB_ERROR, (yyvsp[(1) - (6)].line),
3315 _("Self aliases needed when autolinking to a classwide member"));
3320 if(strcmp((yyvsp[(6) - (6)].id), "link")==0) {
3321 set = g_strdup_printf("%s->%s = ARG;",
3322 root, (yyvsp[(4) - (6)].id));
3323 } else if(strcmp((yyvsp[(6) - (6)].id), "stringlink")==0) {
3324 set = g_strdup_printf("g_free (%s->%s); "
3325 "%s->%s = g_strdup (ARG);",
3326 root, (yyvsp[(4) - (6)].id),
3327 root, (yyvsp[(4) - (6)].id));
3328 } else if(strcmp((yyvsp[(6) - (6)].id), "objectlink")==0) {
3329 set = g_strdup_printf(
3331 "g_object_ref (G_OBJECT (ARG)); "
3332 "if (%s->%s != NULL) "
3333 "g_object_unref (G_OBJECT (%s->%s)); "
3335 root, (yyvsp[(4) - (6)].id),
3336 root, (yyvsp[(4) - (6)].id),
3337 root, (yyvsp[(4) - (6)].id));
3339 g_assert_not_reached();
3342 get = g_strdup_printf("ARG = %s->%s;", root, (yyvsp[(4) - (6)].id));
3344 g_free ((yyvsp[(6) - (6)].id));
3347 type = (Type *)node_copy ((Node *)var->vtype);
3349 node = node_new (ARGUMENT_NODE,
3350 "gtktype:steal", (yyvsp[(3) - (6)].id),
3351 "atype:steal", type,
3352 "flags:steal", (yyvsp[(2) - (6)].list),
3353 "name:steal", (yyvsp[(4) - (6)].id),
3355 "get_line", (yyvsp[(1) - (6)].line),
3357 "set_line", (yyvsp[(1) - (6)].line),
3358 "line_no", (yyvsp[(1) - (6)].line),
3361 if ((yyvsp[(5) - (6)].id) != NULL) {
3362 Argument *arg = (Argument *)node;
3363 export_accessors (arg->name,
3364 arg->get != NULL, arg->get_line,
3365 arg->set != NULL, arg->set_line,
3369 g_free ((yyvsp[(5) - (6)].id));
3372 class_nodes = g_list_append (class_nodes, node);
3378 /* Line 1464 of yacc.c */
3379 #line 1234 "parse.y"
3381 if (strcmp ((yyvsp[(2) - (3)].id), "export")!=0) {
3382 g_free ((yyvsp[(2) - (3)].id));
3383 yyerror (_("parse error"));
3386 (yyval.id) = (yyvsp[(2) - (3)].id);
3392 /* Line 1464 of yacc.c */
3393 #line 1242 "parse.y"
3401 /* Line 1464 of yacc.c */
3402 #line 1247 "parse.y"
3405 node_set ((Node *)property,
3406 "line_no", (yyvsp[(1) - (11)].line),
3407 "gtktype:steal", debool ((yyvsp[(2) - (11)].id)),
3408 "name:steal", (yyvsp[(3) - (11)].id),
3410 if (strcmp ((yyvsp[(5) - (11)].id), "get") == 0 &&
3411 strcmp ((yyvsp[(8) - (11)].id), "set") == 0) {
3412 node_set ((Node *)property,
3413 "get:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3414 "get_line", (yyvsp[(6) - (11)].line),
3415 "set:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3416 "set_line", (yyvsp[(9) - (11)].line),
3418 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3419 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3420 g_free ((yyvsp[(5) - (11)].id));
3421 g_free ((yyvsp[(8) - (11)].id));
3422 } else if (strcmp ((yyvsp[(5) - (11)].id), "set") == 0 &&
3423 strcmp ((yyvsp[(8) - (11)].id), "get") == 0) {
3424 node_set ((Node *)property,
3425 "get:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3426 "get_line", (yyvsp[(9) - (11)].line),
3427 "set:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3428 "set_line", (yyvsp[(6) - (11)].line),
3430 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3431 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3432 g_free ((yyvsp[(5) - (11)].id));
3433 g_free ((yyvsp[(8) - (11)].id));
3435 g_string_free ((yyvsp[(7) - (11)].cbuf), TRUE);
3436 g_string_free ((yyvsp[(10) - (11)].cbuf), TRUE);
3437 g_free ((yyvsp[(5) - (11)].id));
3438 g_free ((yyvsp[(8) - (11)].id));
3439 node_free ((Node *)property);
3441 yyerror (_("parse error"));
3444 property_link_and_export ((Node *)property);
3445 if (property != NULL) {
3446 class_nodes = g_list_append (class_nodes,
3455 /* Line 1464 of yacc.c */
3456 #line 1295 "parse.y"
3459 node_set ((Node *)property,
3460 "line_no", (yyvsp[(1) - (8)].line),
3461 "gtktype:steal", debool ((yyvsp[(2) - (8)].id)),
3462 "name:steal", (yyvsp[(3) - (8)].id),
3464 if (strcmp ((yyvsp[(5) - (8)].id), "get") == 0) {
3465 node_set ((Node *)property,
3466 "get:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3467 "get_line", (yyvsp[(6) - (8)].line),
3469 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3470 g_free ((yyvsp[(5) - (8)].id));
3471 } else if (strcmp ((yyvsp[(5) - (8)].id), "set") == 0) {
3472 node_set ((Node *)property,
3473 "set:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3474 "set_line", (yyvsp[(6) - (8)].line),
3476 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3477 g_free ((yyvsp[(5) - (8)].id));
3479 g_string_free ((yyvsp[(7) - (8)].cbuf), TRUE);
3480 g_free ((yyvsp[(5) - (8)].id));
3481 node_free ((Node *)property);
3483 yyerror (_("parse error"));
3486 property_link_and_export ((Node *)property);
3487 if (property != NULL) {
3488 class_nodes = g_list_append (class_nodes,
3497 /* Line 1464 of yacc.c */
3498 #line 1331 "parse.y"
3501 node_set ((Node *)property,
3502 "line_no", (yyvsp[(1) - (5)].line),
3503 "gtktype:steal", debool ((yyvsp[(2) - (5)].id)),
3504 "name:steal", (yyvsp[(3) - (5)].id),
3506 property_link_and_export ((Node *)property);
3507 if (property != NULL) {
3508 class_nodes = g_list_append (class_nodes,
3517 /* Line 1464 of yacc.c */
3518 #line 1347 "parse.y"
3524 /* Line 1464 of yacc.c */
3525 #line 1348 "parse.y"
3531 /* Line 1464 of yacc.c */
3532 #line 1351 "parse.y"
3538 /* Line 1464 of yacc.c */
3539 #line 1352 "parse.y"
3545 /* Line 1464 of yacc.c */
3546 #line 1355 "parse.y"
3547 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3552 /* Line 1464 of yacc.c */
3553 #line 1356 "parse.y"
3555 if (strcmp ((yyvsp[(1) - (4)].id), "_") != 0) {
3556 g_free ((yyvsp[(1) - (4)].id));
3557 yyerror(_("parse error"));
3560 g_free ((yyvsp[(1) - (4)].id));
3561 (yyval.id) = g_strconcat ("_(", (yyvsp[(3) - (4)].id), ")", NULL);
3562 g_free ((yyvsp[(3) - (4)].id));
3568 /* Line 1464 of yacc.c */
3569 #line 1368 "parse.y"
3570 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3575 /* Line 1464 of yacc.c */
3576 #line 1369 "parse.y"
3577 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3582 /* Line 1464 of yacc.c */
3583 #line 1372 "parse.y"
3586 node_set ((Node *)property,
3587 "nick:steal", (yyvsp[(3) - (3)].id),
3594 /* Line 1464 of yacc.c */
3595 #line 1378 "parse.y"
3598 node_set ((Node *)property,
3599 "blurb:steal", (yyvsp[(3) - (3)].id),
3606 /* Line 1464 of yacc.c */
3607 #line 1384 "parse.y"
3610 node_set ((Node *)property,
3611 "maximum:steal", (yyvsp[(3) - (3)].id),
3618 /* Line 1464 of yacc.c */
3619 #line 1390 "parse.y"
3622 node_set ((Node *)property,
3623 "minimum:steal", (yyvsp[(3) - (3)].id),
3630 /* Line 1464 of yacc.c */
3631 #line 1396 "parse.y"
3634 node_set ((Node *)property,
3635 "default_value:steal", (yyvsp[(3) - (3)].id),
3642 /* Line 1464 of yacc.c */
3643 #line 1402 "parse.y"
3646 node_set ((Node *)property,
3647 "flags:steal", (yyvsp[(3) - (3)].list),
3654 /* Line 1464 of yacc.c */
3655 #line 1408 "parse.y"
3657 Type *type = pop_type ();
3659 node_set ((Node *)property,
3660 "ptype:steal", type,
3667 /* Line 1464 of yacc.c */
3668 #line 1415 "parse.y"
3671 node_set ((Node *)property,
3672 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3679 /* Line 1464 of yacc.c */
3680 #line 1421 "parse.y"
3683 node_set ((Node *)property,
3684 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3691 /* Line 1464 of yacc.c */
3692 #line 1427 "parse.y"
3695 node_set ((Node *)property,
3696 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3703 /* Line 1464 of yacc.c */
3704 #line 1433 "parse.y"
3707 node_set ((Node *)property,
3708 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3715 /* Line 1464 of yacc.c */
3716 #line 1439 "parse.y"
3719 node_set ((Node *)property,
3720 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3727 /* Line 1464 of yacc.c */
3728 #line 1445 "parse.y"
3731 node_set ((Node *)property,
3732 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3739 /* Line 1464 of yacc.c */
3740 #line 1451 "parse.y"
3743 node_set ((Node *)property,
3744 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3751 /* Line 1464 of yacc.c */
3752 #line 1457 "parse.y"
3755 node_set ((Node *)property,
3756 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3763 /* Line 1464 of yacc.c */
3764 #line 1463 "parse.y"
3767 node_set ((Node *)property,
3768 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3775 /* Line 1464 of yacc.c */
3776 #line 1469 "parse.y"
3779 node_set ((Node *)property,
3780 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3787 /* Line 1464 of yacc.c */
3788 #line 1475 "parse.y"
3791 if (strcmp ((yyvsp[(1) - (1)].id), "override") == 0) {
3792 g_free((yyvsp[(1) - (1)].id));
3793 node_set ((Node *)property,
3796 } else if (strcmp ((yyvsp[(1) - (1)].id), "link") == 0) {
3797 g_free((yyvsp[(1) - (1)].id));
3798 node_set ((Node *)property,
3801 } else if (strcmp ((yyvsp[(1) - (1)].id), "export") == 0) {
3802 g_free((yyvsp[(1) - (1)].id));
3803 node_set ((Node *)property,
3807 g_free((yyvsp[(1) - (1)].id));
3808 yyerror(_("parse error"));
3816 /* Line 1464 of yacc.c */
3817 #line 1500 "parse.y"
3819 if(strcmp((yyvsp[(3) - (5)].id),"type")!=0) {
3820 g_free((yyvsp[(1) - (5)].id));
3821 g_free((yyvsp[(3) - (5)].id));
3822 yyerror(_("parse error"));
3825 (yyval.id) = debool ((yyvsp[(1) - (5)].id));
3831 /* Line 1464 of yacc.c */
3832 #line 1509 "parse.y"
3834 (yyval.id) = debool ((yyvsp[(1) - (1)].id));
3835 typestack = g_list_prepend(typestack,NULL);
3841 /* Line 1464 of yacc.c */
3842 #line 1515 "parse.y"
3843 { (yyval.list) = (yyvsp[(2) - (3)].list); }
3848 /* Line 1464 of yacc.c */
3849 #line 1516 "parse.y"
3850 { (yyval.list) = NULL; }
3855 /* Line 1464 of yacc.c */
3856 #line 1519 "parse.y"
3858 (yyval.list) = g_list_append((yyvsp[(3) - (3)].list),(yyvsp[(1) - (3)].id));
3864 /* Line 1464 of yacc.c */
3865 #line 1522 "parse.y"
3867 (yyval.list) = g_list_append(NULL,(yyvsp[(1) - (1)].id));
3873 /* Line 1464 of yacc.c */
3874 #line 1528 "parse.y"
3876 Node *node = node_new (TYPE_NODE,
3877 "name:steal", (yyvsp[(1) - (2)].id),
3878 "pointer:steal", (yyvsp[(2) - (2)].id),
3880 typestack = g_list_prepend(typestack,node);
3886 /* Line 1464 of yacc.c */
3887 #line 1535 "parse.y"
3889 Node *node = node_new (TYPE_NODE,
3890 "name:steal", (yyvsp[(1) - (1)].id),
3892 typestack = g_list_prepend(typestack,node);
3898 /* Line 1464 of yacc.c */
3899 #line 1544 "parse.y"
3901 (yyval.id) = (yyvsp[(1) - (1)].id);
3907 /* Line 1464 of yacc.c */
3908 #line 1547 "parse.y"
3910 (yyval.id) = (yyvsp[(1) - (1)].id);
3916 /* Line 1464 of yacc.c */
3917 #line 1550 "parse.y"
3919 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3920 g_free((yyvsp[(2) - (2)].id));
3926 /* Line 1464 of yacc.c */
3927 #line 1554 "parse.y"
3929 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3930 g_free((yyvsp[(1) - (2)].id));
3936 /* Line 1464 of yacc.c */
3937 #line 1558 "parse.y"
3939 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3940 g_free((yyvsp[(2) - (2)].id));
3946 /* Line 1464 of yacc.c */
3947 #line 1562 "parse.y"
3949 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (3)].id), " ",
3950 (yyvsp[(3) - (3)].id), NULL);
3951 g_free((yyvsp[(3) - (3)].id));
3957 /* Line 1464 of yacc.c */
3958 #line 1567 "parse.y"
3960 (yyval.id) = g_strconcat((yyvsp[(1) - (3)].id), " ",
3961 (yyvsp[(2) - (3)].id), " const", NULL);
3962 g_free((yyvsp[(2) - (3)].id));
3968 /* Line 1464 of yacc.c */
3969 #line 1575 "parse.y"
3971 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3972 g_free((yyvsp[(2) - (2)].id));
3978 /* Line 1464 of yacc.c */
3979 #line 1579 "parse.y"
3981 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3982 g_free((yyvsp[(1) - (2)].id));
3983 g_free((yyvsp[(2) - (2)].id));
3989 /* Line 1464 of yacc.c */
3990 #line 1584 "parse.y"
3992 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3993 g_free((yyvsp[(2) - (2)].id));
3999 /* Line 1464 of yacc.c */
4000 #line 1588 "parse.y"
4002 (yyval.id) = (yyvsp[(1) - (1)].id);
4008 /* Line 1464 of yacc.c */
4009 #line 1591 "parse.y"
4011 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
4012 g_free((yyvsp[(1) - (2)].id));
4018 /* Line 1464 of yacc.c */
4019 #line 1595 "parse.y"
4021 (yyval.id) = g_strdup((yyvsp[(1) - (1)].id));
4027 /* Line 1464 of yacc.c */
4028 #line 1598 "parse.y"
4030 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
4036 /* Line 1464 of yacc.c */
4037 #line 1603 "parse.y"
4038 { (yyval.id) = "void"; }
4043 /* Line 1464 of yacc.c */
4044 #line 1604 "parse.y"
4045 { (yyval.id) = "char"; }
4050 /* Line 1464 of yacc.c */
4051 #line 1605 "parse.y"
4052 { (yyval.id) = "short"; }
4057 /* Line 1464 of yacc.c */
4058 #line 1606 "parse.y"
4059 { (yyval.id) = "int"; }
4064 /* Line 1464 of yacc.c */
4065 #line 1607 "parse.y"
4066 { (yyval.id) = "long"; }
4071 /* Line 1464 of yacc.c */
4072 #line 1608 "parse.y"
4073 { (yyval.id) = "float"; }
4078 /* Line 1464 of yacc.c */
4079 #line 1609 "parse.y"
4080 { (yyval.id) = "double"; }
4085 /* Line 1464 of yacc.c */
4086 #line 1610 "parse.y"
4087 { (yyval.id) = "signed"; }
4092 /* Line 1464 of yacc.c */
4093 #line 1611 "parse.y"
4094 { (yyval.id) = "unsigned"; }
4099 /* Line 1464 of yacc.c */
4100 #line 1614 "parse.y"
4101 { (yyval.id) = "struct"; }
4106 /* Line 1464 of yacc.c */
4107 #line 1615 "parse.y"
4108 { (yyval.id) = "union"; }
4113 /* Line 1464 of yacc.c */
4114 #line 1616 "parse.y"
4115 { (yyval.id) = "enum"; }
4120 /* Line 1464 of yacc.c */
4121 #line 1619 "parse.y"
4122 { (yyval.id) = g_strdup("*"); }
4127 /* Line 1464 of yacc.c */
4128 #line 1620 "parse.y"
4129 { (yyval.id) = g_strdup("* const"); }
4134 /* Line 1464 of yacc.c */
4135 #line 1621 "parse.y"
4137 (yyval.id) = g_strconcat("*", (yyvsp[(2) - (2)].id), NULL);
4138 g_free((yyvsp[(2) - (2)].id));
4144 /* Line 1464 of yacc.c */
4145 #line 1625 "parse.y"
4147 (yyval.id) = g_strconcat("* const", (yyvsp[(3) - (3)].id), NULL);
4148 g_free((yyvsp[(3) - (3)].id));
4154 /* Line 1464 of yacc.c */
4155 #line 1632 "parse.y"
4157 if(strcmp((yyvsp[(1) - (2)].id), "first")==0)
4158 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4159 else if(strcmp((yyvsp[(1) - (2)].id), "last")==0)
4160 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4162 yyerror(_("signal must be 'first' or 'last'"));
4163 g_free((yyvsp[(1) - (2)].id));
4166 g_free((yyvsp[(1) - (2)].id));
4172 /* Line 1464 of yacc.c */
4173 #line 1644 "parse.y"
4175 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4181 /* Line 1464 of yacc.c */
4182 #line 1650 "parse.y"
4184 if(strcmp((yyvsp[(2) - (3)].id),"first")==0)
4185 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4186 else if(strcmp((yyvsp[(2) - (3)].id),"last")==0)
4187 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4189 yyerror(_("signal must be 'first' or 'last'"));
4190 g_free((yyvsp[(2) - (3)].id));
4193 g_free((yyvsp[(2) - (3)].id));
4199 /* Line 1464 of yacc.c */
4200 #line 1662 "parse.y"
4202 if(strcmp((yyvsp[(1) - (3)].id),"first")==0)
4203 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4204 else if(strcmp((yyvsp[(1) - (3)].id),"last")==0)
4205 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4207 yyerror(_("signal must be 'first' or 'last'"));
4208 g_free((yyvsp[(1) - (3)].id));
4211 g_free((yyvsp[(1) - (3)].id));
4217 /* Line 1464 of yacc.c */
4218 #line 1674 "parse.y"
4220 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4226 /* Line 1464 of yacc.c */
4227 #line 1677 "parse.y"
4229 /* the_scope was default thus public */
4230 the_scope = PUBLIC_SCOPE;
4236 /* Line 1464 of yacc.c */
4237 #line 1683 "parse.y"
4239 gtktypes = g_list_prepend(gtktypes, debool ((yyvsp[(1) - (4)].id)));
4245 /* Line 1464 of yacc.c */
4246 #line 1688 "parse.y"
4248 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(3) - (3)].id)));
4254 /* Line 1464 of yacc.c */
4255 #line 1691 "parse.y"
4257 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(1) - (1)].id)));
4263 /* Line 1464 of yacc.c */
4264 #line 1696 "parse.y"
4265 { (yyval.cbuf) = (yyvsp[(2) - (2)].cbuf); }
4270 /* Line 1464 of yacc.c */
4271 #line 1697 "parse.y"
4272 { (yyval.cbuf) = NULL; }
4277 /* Line 1464 of yacc.c */
4278 #line 1701 "parse.y"
4281 yyerror(_("signal without 'self' as "
4282 "first parameter"));
4283 free_all_global_state();
4286 if(the_scope == CLASS_SCOPE) {
4287 yyerror(_("a method cannot be of class scope"));
4288 free_all_global_state();
4291 if (funcattrs != NULL) {
4292 char *error = g_strdup_printf
4293 (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4298 push_function(the_scope, (yyvsp[(3) - (10)].sigtype),NULL,
4299 (yyvsp[(5) - (10)].id), (yyvsp[(10) - (10)].cbuf),(yyvsp[(1) - (10)].line),
4300 ccode_line, vararg, (yyvsp[(2) - (10)].list));
4306 /* Line 1464 of yacc.c */
4307 #line 1724 "parse.y"
4310 yyerror(_("signal without 'self' as "
4311 "first parameter"));
4312 free_all_global_state();
4315 if(the_scope == CLASS_SCOPE) {
4316 yyerror(_("a method cannot be of class scope"));
4317 free_all_global_state();
4320 if (funcattrs != NULL) {
4321 char *error = g_strdup_printf
4322 (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4327 push_function(the_scope, (yyvsp[(4) - (11)].sigtype), NULL,
4328 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf), (yyvsp[(2) - (11)].line),
4329 ccode_line, vararg, (yyvsp[(3) - (11)].list));
4335 /* Line 1464 of yacc.c */
4336 #line 1747 "parse.y"
4339 yyerror(_("virtual method without 'self' as "
4340 "first parameter"));
4341 free_all_global_state();
4344 if(the_scope == CLASS_SCOPE) {
4345 yyerror(_("a method cannot be of class scope"));
4346 free_all_global_state();
4349 if (funcattrs != NULL) {
4350 char *error = g_strdup_printf
4351 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4356 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4357 (yyvsp[(9) - (9)].cbuf), (yyvsp[(1) - (9)].line),
4358 ccode_line, vararg, NULL);
4364 /* Line 1464 of yacc.c */
4365 #line 1770 "parse.y"
4368 yyerror(_("virtual method without 'self' as "
4369 "first parameter"));
4370 free_all_global_state();
4373 if(the_scope == CLASS_SCOPE) {
4374 yyerror(_("a method cannot be of class scope"));
4375 free_all_global_state();
4378 if (funcattrs != NULL) {
4379 char *error = g_strdup_printf
4380 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4385 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4386 (yyvsp[(9) - (9)].cbuf), (yyvsp[(2) - (9)].line),
4387 ccode_line, vararg, NULL);
4393 /* Line 1464 of yacc.c */
4394 #line 1793 "parse.y"
4397 yyerror(_("virtual method without 'szelf' as "
4398 "first parameter"));
4399 free_all_global_state();
4402 if (funcattrs != NULL) {
4403 char *error = g_strdup_printf
4404 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4409 push_function(PUBLIC_SCOPE, VIRTUAL_METHOD, NULL,
4410 (yyvsp[(3) - (8)].id), (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line),
4411 ccode_line, vararg, NULL);
4417 /* Line 1464 of yacc.c */
4418 #line 1811 "parse.y"
4420 if (funcattrs != NULL) {
4421 char *error = g_strdup_printf
4422 (_("function attribute macros ('%s' in this case) may not be used with override methods"),
4427 push_function(NO_SCOPE, OVERRIDE_METHOD, (yyvsp[(3) - (11)].id),
4428 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf),
4429 (yyvsp[(1) - (11)].line), ccode_line,
4436 /* Line 1464 of yacc.c */
4437 #line 1824 "parse.y"
4439 if(the_scope == CLASS_SCOPE) {
4440 yyerror(_("a method cannot be of class scope"));
4441 free_all_global_state();
4444 push_function(the_scope, REGULAR_METHOD, NULL, (yyvsp[(3) - (8)].id),
4445 (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line), ccode_line,
4452 /* Line 1464 of yacc.c */
4453 #line 1834 "parse.y"
4455 if(strcmp((yyvsp[(1) - (5)].id), "init")==0) {
4456 push_init_arg((yyvsp[(3) - (5)].id),FALSE);
4457 push_function(NO_SCOPE, INIT_METHOD, NULL,
4458 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4459 ccode_line, FALSE, NULL);
4460 } else if(strcmp((yyvsp[(1) - (5)].id), "class_init")==0) {
4461 push_init_arg((yyvsp[(3) - (5)].id),TRUE);
4462 push_function(NO_SCOPE, CLASS_INIT_METHOD, NULL,
4463 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4464 ccode_line, FALSE, NULL);
4465 } else if(strcmp((yyvsp[(1) - (5)].id), "constructor")==0) {
4466 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4467 push_function(NO_SCOPE, CONSTRUCTOR_METHOD, NULL,
4468 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4469 ccode_line, FALSE, NULL);
4470 } else if(strcmp((yyvsp[(1) - (5)].id), "dispose")==0) {
4471 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4472 push_function(NO_SCOPE, DISPOSE_METHOD, NULL,
4473 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4474 ccode_line, FALSE, NULL);
4475 } else if(strcmp((yyvsp[(1) - (5)].id), "finalize")==0) {
4476 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4477 push_function(NO_SCOPE, FINALIZE_METHOD, NULL,
4478 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4479 ccode_line, FALSE, NULL);
4482 g_free((yyvsp[(1) - (5)].id));
4483 g_free((yyvsp[(3) - (5)].id));
4484 g_string_free((yyvsp[(5) - (5)].cbuf),TRUE);
4485 yyerror(_("parse error "
4486 "(untyped blocks must be init, "
4487 "class_init, constructor, dispose "
4496 /* Line 1464 of yacc.c */
4497 #line 1874 "parse.y"
4499 g_free(funcattrs); funcattrs = NULL;
4500 g_free(onerror); onerror = NULL;
4501 g_free(defreturn); defreturn = NULL;
4502 if(!set_attr_value((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id))) {
4503 g_free((yyvsp[(1) - (2)].id));
4504 g_free((yyvsp[(2) - (2)].id));
4505 yyerror(_("parse error"));
4508 g_free((yyvsp[(1) - (2)].id));
4514 /* Line 1464 of yacc.c */
4515 #line 1886 "parse.y"
4517 g_free(funcattrs); funcattrs = NULL;
4518 g_free(onerror); onerror = NULL;
4519 g_free(defreturn); defreturn = NULL;
4520 if(!set_attr_value((yyvsp[(1) - (4)].id), (yyvsp[(2) - (4)].id))) {
4521 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4522 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4523 yyerror(_("parse error"));
4526 if(!set_attr_value((yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id))) {
4527 funcattrs = onerror = defreturn = NULL;
4528 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4529 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4530 yyerror(_("parse error"));
4533 g_free((yyvsp[(1) - (4)].id));
4534 g_free((yyvsp[(3) - (4)].id));
4540 /* Line 1464 of yacc.c */
4541 #line 1906 "parse.y"
4543 g_free(funcattrs); funcattrs = NULL;
4544 g_free(onerror); onerror = NULL;
4545 g_free(defreturn); defreturn = NULL;
4546 if(!set_attr_value((yyvsp[(1) - (6)].id), (yyvsp[(2) - (6)].id))) {
4547 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4548 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4549 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4550 yyerror(_("parse error"));
4553 if(!set_attr_value((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id))) {
4554 funcattrs = onerror = defreturn = NULL;
4555 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4556 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4557 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4558 yyerror(_("parse error"));
4561 if(!set_attr_value((yyvsp[(5) - (6)].id), (yyvsp[(6) - (6)].id))) {
4562 funcattrs = onerror = defreturn = NULL;
4563 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4564 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4565 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4566 yyerror(_("parse error"));
4569 g_free((yyvsp[(1) - (6)].id));
4570 g_free((yyvsp[(3) - (6)].id));
4571 g_free((yyvsp[(5) - (6)].id));
4577 /* Line 1464 of yacc.c */
4578 #line 1937 "parse.y"
4580 g_free(funcattrs); funcattrs = NULL;
4581 g_free(onerror); onerror = NULL;
4582 g_free(defreturn); defreturn = NULL;
4588 /* Line 1464 of yacc.c */
4589 #line 1944 "parse.y"
4590 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4595 /* Line 1464 of yacc.c */
4596 #line 1945 "parse.y"
4598 (yyval.id) = ((yyvsp[(2) - (2)].cbuf))->str;
4599 g_string_free((yyvsp[(2) - (2)].cbuf), FALSE);
4605 /* Line 1464 of yacc.c */
4606 #line 1951 "parse.y"
4607 { vararg = FALSE; has_self = FALSE; }
4612 /* Line 1464 of yacc.c */
4613 #line 1952 "parse.y"
4617 if(strcmp((yyvsp[(1) - (1)].id),"self")==0)
4618 push_self((yyvsp[(1) - (1)].id), FALSE);
4620 g_free((yyvsp[(1) - (1)].id));
4621 yyerror(_("parse error"));
4629 /* Line 1464 of yacc.c */
4630 #line 1963 "parse.y"
4634 if(strcmp((yyvsp[(1) - (2)].id),"self")==0)
4635 push_self((yyvsp[(1) - (2)].id), TRUE);
4637 g_free((yyvsp[(1) - (2)].id));
4638 yyerror(_("parse error"));
4646 /* Line 1464 of yacc.c */
4647 #line 1974 "parse.y"
4651 if(strcmp((yyvsp[(2) - (2)].id),"self")==0)
4652 push_self((yyvsp[(2) - (2)].id), TRUE);
4654 g_free((yyvsp[(2) - (2)].id));
4655 yyerror(_("parse error"));
4663 /* Line 1464 of yacc.c */
4664 #line 1985 "parse.y"
4667 if(strcmp((yyvsp[(1) - (3)].id),"self")==0)
4668 push_self((yyvsp[(1) - (3)].id), FALSE);
4670 g_free((yyvsp[(1) - (3)].id));
4671 yyerror(_("parse error"));
4679 /* Line 1464 of yacc.c */
4680 #line 1995 "parse.y"
4683 if(strcmp((yyvsp[(1) - (4)].id),"self")==0)
4684 push_self((yyvsp[(1) - (4)].id), TRUE);
4686 g_free((yyvsp[(1) - (4)].id));
4687 yyerror(_("parse error"));
4695 /* Line 1464 of yacc.c */
4696 #line 2005 "parse.y"
4699 if(strcmp((yyvsp[(2) - (4)].id),"self")==0)
4700 push_self((yyvsp[(2) - (4)].id), TRUE);
4702 g_free((yyvsp[(2) - (4)].id));
4703 yyerror(_("parse error"));
4711 /* Line 1464 of yacc.c */
4712 #line 2015 "parse.y"
4713 { has_self = FALSE; }
4718 /* Line 1464 of yacc.c */
4719 #line 2018 "parse.y"
4725 /* Line 1464 of yacc.c */
4726 #line 2019 "parse.y"
4732 /* Line 1464 of yacc.c */
4733 #line 2022 "parse.y"
4739 /* Line 1464 of yacc.c */
4740 #line 2023 "parse.y"
4746 /* Line 1464 of yacc.c */
4747 #line 2026 "parse.y"
4749 push_funcarg((yyvsp[(2) - (2)].id),NULL);
4755 /* Line 1464 of yacc.c */
4756 #line 2029 "parse.y"
4758 push_funcarg((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].id));
4764 /* Line 1464 of yacc.c */
4765 #line 2032 "parse.y"
4767 if(strcmp((yyvsp[(4) - (6)].id),"check")!=0) {
4768 yyerror(_("parse error"));
4771 g_free((yyvsp[(4) - (6)].id));
4772 push_funcarg((yyvsp[(2) - (6)].id),NULL);
4778 /* Line 1464 of yacc.c */
4779 #line 2040 "parse.y"
4781 if(strcmp((yyvsp[(5) - (7)].id),"check")!=0) {
4782 yyerror(_("parse error"));
4785 g_free((yyvsp[(5) - (7)].id));
4786 push_funcarg((yyvsp[(2) - (7)].id),(yyvsp[(3) - (7)].id));
4792 /* Line 1464 of yacc.c */
4793 #line 2050 "parse.y"
4799 /* Line 1464 of yacc.c */
4800 #line 2051 "parse.y"
4806 /* Line 1464 of yacc.c */
4807 #line 2054 "parse.y"
4809 if(strcmp((yyvsp[(1) - (1)].id),"type")==0) {
4810 Node *node = node_new (CHECK_NODE,
4811 "chtype", TYPE_CHECK,
4813 checks = g_list_append(checks,node);
4814 } else if(strcmp((yyvsp[(1) - (1)].id),"null")==0) {
4815 Node *node = node_new (CHECK_NODE,
4816 "chtype", NULL_CHECK,
4818 checks = g_list_append(checks,node);
4820 yyerror(_("parse error"));
4823 g_free((yyvsp[(1) - (1)].id));
4829 /* Line 1464 of yacc.c */
4830 #line 2071 "parse.y"
4832 Node *node = node_new (CHECK_NODE,
4834 "number:steal", (yyvsp[(2) - (2)].id),
4836 checks = g_list_append(checks,node);
4842 /* Line 1464 of yacc.c */
4843 #line 2078 "parse.y"
4845 Node *node = node_new (CHECK_NODE,
4847 "number:steal", (yyvsp[(2) - (2)].id),
4849 checks = g_list_append(checks,node);
4855 /* Line 1464 of yacc.c */
4856 #line 2085 "parse.y"
4858 Node *node = node_new (CHECK_NODE,
4860 "number:steal", (yyvsp[(3) - (3)].id),
4862 checks = g_list_append(checks,node);
4868 /* Line 1464 of yacc.c */
4869 #line 2092 "parse.y"
4871 Node *node = node_new (CHECK_NODE,
4873 "number:steal", (yyvsp[(3) - (3)].id),
4875 checks = g_list_append(checks,node);
4881 /* Line 1464 of yacc.c */
4882 #line 2099 "parse.y"
4884 Node *node = node_new (CHECK_NODE,
4886 "number:steal", (yyvsp[(3) - (3)].id),
4888 checks = g_list_append(checks,node);
4894 /* Line 1464 of yacc.c */
4895 #line 2106 "parse.y"
4897 Node *node = node_new (CHECK_NODE,
4899 "number:steal", (yyvsp[(3) - (3)].id),
4901 checks = g_list_append(checks,node);
4907 /* Line 1464 of yacc.c */
4908 #line 2115 "parse.y"
4910 Node *node = node_new (ENUMDEF_NODE,
4911 "etype:steal", (yyvsp[(6) - (7)].id),
4912 "prefix:steal", (yyvsp[(2) - (7)].id),
4913 "values:steal", enum_vals,
4916 nodes = g_list_append (nodes, node);
4922 /* Line 1464 of yacc.c */
4923 #line 2124 "parse.y"
4925 Node *node = node_new (ENUMDEF_NODE,
4926 "etype:steal", (yyvsp[(7) - (8)].id),
4927 "prefix:steal", (yyvsp[(2) - (8)].id),
4928 "values:steal", enum_vals,
4931 nodes = g_list_append (nodes, node);
4937 /* Line 1464 of yacc.c */
4938 #line 2135 "parse.y"
4944 /* Line 1464 of yacc.c */
4945 #line 2136 "parse.y"
4951 /* Line 1464 of yacc.c */
4952 #line 2139 "parse.y"
4955 char *num = (yyvsp[(3) - (3)].id);
4957 /* A float value, that's a bad enum */
4958 if (num[0] >= '0' &&
4960 strchr (num, '.') != NULL) {
4961 g_free ((yyvsp[(1) - (3)].id));
4963 yyerror(_("parse error (enumerator value not integer constant)"));
4967 node = node_new (ENUMVALUE_NODE,
4968 "name:steal", (yyvsp[(1) - (3)].id),
4971 enum_vals = g_list_append (enum_vals, node);
4977 /* Line 1464 of yacc.c */
4978 #line 2159 "parse.y"
4982 node = node_new (ENUMVALUE_NODE,
4983 "name:steal", (yyvsp[(1) - (1)].id),
4985 enum_vals = g_list_append (enum_vals, node);
4991 /* Line 1464 of yacc.c */
4992 #line 2169 "parse.y"
4994 Node *node = node_new (FLAGS_NODE,
4995 "ftype:steal", (yyvsp[(6) - (7)].id),
4996 "prefix:steal", (yyvsp[(2) - (7)].id),
4997 "values:steal", flag_vals,
5000 nodes = g_list_append (nodes, node);
5006 /* Line 1464 of yacc.c */
5007 #line 2178 "parse.y"
5009 Node *node = node_new (FLAGS_NODE,
5010 "ftype:steal", (yyvsp[(7) - (8)].id),
5011 "prefix:steal", (yyvsp[(2) - (8)].id),
5012 "values:steal", flag_vals,
5015 nodes = g_list_append (nodes, node);
5021 /* Line 1464 of yacc.c */
5022 #line 2189 "parse.y"
5024 flag_vals = g_list_append (flag_vals, (yyvsp[(3) - (3)].id));
5030 /* Line 1464 of yacc.c */
5031 #line 2192 "parse.y"
5033 flag_vals = g_list_append (flag_vals, (yyvsp[(1) - (1)].id));
5039 /* Line 1464 of yacc.c */
5040 #line 2197 "parse.y"
5042 Node *node = node_new (ERROR_NODE,
5043 "etype:steal", (yyvsp[(6) - (7)].id),
5044 "prefix:steal", (yyvsp[(2) - (7)].id),
5045 "values:steal", error_vals,
5048 nodes = g_list_append (nodes, node);
5054 /* Line 1464 of yacc.c */
5055 #line 2206 "parse.y"
5057 Node *node = node_new (ERROR_NODE,
5058 "etype:steal", (yyvsp[(7) - (8)].id),
5059 "prefix:steal", (yyvsp[(2) - (8)].id),
5060 "values:steal", error_vals,
5063 nodes = g_list_append (nodes, node);
5069 /* Line 1464 of yacc.c */
5070 #line 2217 "parse.y"
5072 error_vals = g_list_append (error_vals, (yyvsp[(3) - (3)].id));
5078 /* Line 1464 of yacc.c */
5079 #line 2220 "parse.y"
5081 error_vals = g_list_append (error_vals, (yyvsp[(1) - (1)].id));
5087 /* Line 1464 of yacc.c */
5088 #line 2226 "parse.y"
5089 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5094 /* Line 1464 of yacc.c */
5095 #line 2227 "parse.y"
5097 (yyval.id) = g_strconcat("-",(yyvsp[(2) - (2)].id),NULL);
5098 g_free((yyvsp[(2) - (2)].id));
5104 /* Line 1464 of yacc.c */
5105 #line 2231 "parse.y"
5106 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5111 /* Line 1464 of yacc.c */
5112 #line 2232 "parse.y"
5113 { (yyval.id) = (yyvsp[(1) - (1)].id); }
5118 /* Line 1464 of yacc.c */
5119 #line 5120 "parse.c"
5122 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5126 YY_STACK_PRINT (yyss, yyssp);
5130 /* Now `shift' the result of the reduction. Determine what state
5131 that goes to, based on the state we popped back to and the rule
5132 number reduced by. */
5136 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5137 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5138 yystate = yytable[yystate];
5140 yystate = yydefgoto[yyn - YYNTOKENS];
5145 /*------------------------------------.
5146 | yyerrlab -- here on detecting error |
5147 `------------------------------------*/
5149 /* If not already recovering from an error, report this error. */
5153 #if ! YYERROR_VERBOSE
5154 yyerror (YY_("syntax error"));
5157 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
5158 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
5160 YYSIZE_T yyalloc = 2 * yysize;
5161 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5162 yyalloc = YYSTACK_ALLOC_MAXIMUM;
5163 if (yymsg != yymsgbuf)
5164 YYSTACK_FREE (yymsg);
5165 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5167 yymsg_alloc = yyalloc;
5171 yymsg_alloc = sizeof yymsgbuf;
5175 if (0 < yysize && yysize <= yymsg_alloc)
5177 (void) yysyntax_error (yymsg, yystate, yychar);
5182 yyerror (YY_("syntax error"));
5184 goto yyexhaustedlab;
5192 if (yyerrstatus == 3)
5194 /* If just tried and failed to reuse lookahead token after an
5195 error, discard it. */
5197 if (yychar <= YYEOF)
5199 /* Return failure if at end of input. */
5200 if (yychar == YYEOF)
5205 yydestruct ("Error: discarding",
5211 /* Else will try to reuse lookahead token after shifting the error
5216 /*---------------------------------------------------.
5217 | yyerrorlab -- error raised explicitly by YYERROR. |
5218 `---------------------------------------------------*/
5221 /* Pacify compilers like GCC when the user code never invokes
5222 YYERROR and the label yyerrorlab therefore never appears in user
5224 if (/*CONSTCOND*/ 0)
5227 /* Do not reclaim the symbols of the rule which action triggered
5231 YY_STACK_PRINT (yyss, yyssp);
5236 /*-------------------------------------------------------------.
5237 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5238 `-------------------------------------------------------------*/
5240 yyerrstatus = 3; /* Each real token shifted decrements this. */
5244 yyn = yypact[yystate];
5245 if (yyn != YYPACT_NINF)
5248 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5256 /* Pop the current state because it cannot handle the error token. */
5261 yydestruct ("Error: popping",
5262 yystos[yystate], yyvsp);
5265 YY_STACK_PRINT (yyss, yyssp);
5271 /* Shift the error token. */
5272 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5278 /*-------------------------------------.
5279 | yyacceptlab -- YYACCEPT comes here. |
5280 `-------------------------------------*/
5285 /*-----------------------------------.
5286 | yyabortlab -- YYABORT comes here. |
5287 `-----------------------------------*/
5292 #if !defined(yyoverflow) || YYERROR_VERBOSE
5293 /*-------------------------------------------------.
5294 | yyexhaustedlab -- memory exhaustion comes here. |
5295 `-------------------------------------------------*/
5297 yyerror (YY_("memory exhausted"));
5303 if (yychar != YYEMPTY)
5304 yydestruct ("Cleanup: discarding lookahead",
5306 /* Do not reclaim the symbols of the rule which action triggered
5307 this YYABORT or YYACCEPT. */
5309 YY_STACK_PRINT (yyss, yyssp);
5310 while (yyssp != yyss)
5312 yydestruct ("Cleanup: popping",
5313 yystos[*yyssp], yyvsp);
5318 YYSTACK_FREE (yyss);
5321 if (yymsg != yymsgbuf)
5322 YYSTACK_FREE (yymsg);
5324 /* Make sure YYID is used. */
5325 return YYID (yyresult);
5330 /* Line 1684 of yacc.c */
5331 #line 2235 "parse.y"