1 /* A Bison parser, made by GNU Bison 2.7. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.7"
50 #define YYSKELETON_NAME "yacc.c"
64 /* Copy the first part of user declarations. */
65 /* Line 371 of yacc.c */
75 #include "treefuncs.h"
79 /* FIXME: add gettext support */
84 static GList *class_nodes = NULL;
87 static GList *enum_vals = NULL;
88 static GList *flag_vals = NULL;
89 static GList *error_vals = NULL;
91 static gboolean abstract = FALSE;
92 static char *chunk_size = NULL;
93 static char *bonobo_object_class = NULL;
94 static int glade_xml = FALSE;
95 static GList *interfaces = NULL;
96 static GList *typestack = NULL;
97 static GList *funcargs = NULL;
98 static GList *checks = NULL;
99 static int has_self = FALSE;
100 static int vararg = FALSE;
101 static Method *last_added_method = NULL;
103 /* destructor and initializer for variables */
104 static gboolean destructor_unref = FALSE;
105 static char *destructor = NULL;
106 static int destructor_line = 0;
107 static gboolean destructor_simple = TRUE;
108 static char *initializer = NULL;
109 static int initializer_line = 0;
110 static int glade_widget = FALSE;
112 static char *funcattrs = NULL;
113 static char *onerror = NULL;
114 static char *defreturn = NULL;
116 static GList *gtktypes = NULL;
117 static char *signal_name=NULL;
119 static Property *property = NULL;
121 /* this can be a global as we will only do one function at a time
123 static int the_scope = NO_SCOPE;
125 void free(void *ptr);
128 extern int ccode_line;
130 extern gboolean for_cpp;
140 if (strcmp (yytext, "\n") == 0 ||
141 strcmp (yytext, "\r") == 0) {
142 out = g_strconcat ("Error: ", str, " before end of line", NULL);
143 } else if (yytext[0] == '\0') {
144 out=g_strconcat("Error: ", str, " at end of input", NULL);
146 char *tmp = g_strdup(yytext);
147 while((p=strchr(tmp, '\n')))
150 out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL);
154 fprintf(stderr, "%s:%d: %s\n", filename, line_no, out);
163 Type *type = typestack->data;
164 typestack = g_list_remove(typestack,typestack->data);
169 push_variable (char *name, int scope, int line_no, char *postfix)
172 Type *type = pop_type ();
174 type->postfix = postfix;
176 var = node_new (VARIABLE_NODE,
179 "glade_widget", glade_widget,
182 "destructor_unref", destructor_unref,
183 "destructor:steal", destructor,
184 "destructor_line", destructor_line,
185 "destructor_simple", destructor_simple,
186 "initializer:steal", initializer,
187 "initializer_line", initializer_line,
188 "initializer_simple", TRUE,
190 class_nodes = g_list_append(class_nodes, var);
191 glade_widget = FALSE;
195 push_function (int scope, int method, char *oid, char *id,
196 GString *cbuf, int line_no, int ccode_line,
197 gboolean vararg, GList *flags)
203 g_assert(scope != CLASS_SCOPE);
205 if(method == INIT_METHOD ||
206 method == CLASS_INIT_METHOD ||
207 method == CONSTRUCTOR_METHOD ||
208 method == DISPOSE_METHOD ||
209 method == FINALIZE_METHOD) {
210 type = (Type *)node_new (TYPE_NODE,
217 /* a complicated and ugly test to figure out if we have
218 the wrong number of types for a signal */
219 if((method == SIGNAL_FIRST_METHOD ||
220 method == SIGNAL_LAST_METHOD) &&
221 g_list_length(gtktypes) != g_list_length(funcargs) &&
222 !(g_list_length(funcargs) == 1 &&
223 g_list_length(gtktypes) == 2 &&
224 strcmp(gtktypes->next->data, "NONE")==0)) {
225 error_print(GOB_WARN, line_no,
226 _("The number of GTK arguments and "
227 "function arguments for a signal "
228 "don't seem to match"));
230 if(g_list_length(gtktypes) > 2) {
232 for(li = gtktypes->next; li; li = li->next) {
233 if(strcmp(li->data, "NONE")==0) {
234 error_print(GOB_ERROR, line_no,
235 _("NONE can only appear in an "
236 "argument list by itself"));
242 c_cbuf = p = cbuf->str;
243 while(p && *p && (*p==' ' || *p=='\t' || *p=='\n' || *p=='\r'))
250 if (signal_name == NULL )
252 GString * buffer=g_string_new("");
253 g_string_printf(buffer, "\"%s\"", id);
254 signal_name = buffer->str;
255 g_string_free(buffer, FALSE);
257 node = node_new (METHOD_NODE,
262 "gtktypes:steal", gtktypes,
263 "flags:steal", flags,
265 "signal_name:steal", signal_name,
266 "args:steal", funcargs,
267 "funcattrs:steal", funcattrs,
268 "onerror:steal", onerror,
269 "defreturn:steal", defreturn,
270 "cbuf:steal", c_cbuf,
272 "ccode_line", ccode_line,
274 "unique_id", method_unique_id++,
277 last_added_method = (Method *)node;
281 /*only free segment if we haven't passed it
291 class_nodes = g_list_append(class_nodes, node);
295 free_all_global_state(void)
307 g_list_foreach(gtktypes, (GFunc)g_free, NULL);
308 g_list_free(gtktypes);
311 node_list_free (funcargs);
316 push_funcarg(char *name, char *postfix)
319 Type *type = pop_type();
321 type->postfix = postfix;
323 node = node_new (FUNCARG_NODE,
326 "checks:steal", checks,
330 funcargs = g_list_append(funcargs, node);
334 push_init_arg(char *name, int is_class)
341 tn = g_strconcat(((Class *)class)->otype,":Class",NULL);
343 tn = g_strdup(((Class *)class)->otype);
345 type = node_new (TYPE_NODE,
349 node = node_new (FUNCARG_NODE,
350 "atype:steal", (Type *)type,
353 funcargs = g_list_prepend(funcargs, node);
357 push_self(char *id, gboolean constant)
362 type = node_new (TYPE_NODE,
363 "name", ((Class *)class)->otype,
364 "pointer", constant ? "const *" : "*",
366 ch = g_list_append (ch, node_new (CHECK_NODE,
367 "chtype", NULL_CHECK,
369 ch = g_list_append (ch, node_new (CHECK_NODE,
370 "chtype", TYPE_CHECK,
372 node = node_new (FUNCARG_NODE,
373 "atype:steal", (Type *)type,
377 funcargs = g_list_prepend(funcargs, node);
381 find_var_or_die(const char *id, int line)
385 for(li = class_nodes; li != NULL; li = li->next) {
387 Node *node = li->data;
388 if(node->type != VARIABLE_NODE)
391 if(strcmp(var->id, id)==0)
395 error_printf(GOB_ERROR, line, _("Variable %s not defined here"), id);
397 g_assert_not_reached();
402 set_attr_value(char *type, char *val)
404 if(strcmp(type, "attr")==0) {
410 } else if(strcmp(type, "onerror")==0) {
416 } else if(strcmp(type, "defreturn")==0) {
427 export_accessors (const char *var_name,
439 the_type = (Type *)node_copy ((Node *)type);
441 the_type = get_tree_type (gtktype, TRUE);
443 if (the_type == NULL) {
444 error_print (GOB_ERROR, line_no,
445 _("Cannot determine type of property or argument"));
450 char *get_id = g_strdup_printf ("get_%s", var_name);
451 GString *get_cbuf = g_string_new (NULL);
452 Node *node1 = node_new (TYPE_NODE,
453 "name", the_type->name,
454 "pointer", the_type->pointer,
455 "postfix", the_type->postfix,
457 Node *node3 = node_new (TYPE_NODE,
458 "name", class->class.otype,
462 g_string_sprintf (get_cbuf,
464 "g_object_get (G_OBJECT (self), \"%s\", "
468 the_type->pointer ? the_type->pointer : "",
471 typestack = g_list_prepend (typestack, node1);
472 typestack = g_list_prepend (typestack, node3);
474 push_funcarg ("self", FALSE);
476 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
477 get_id, get_cbuf, get_lineno,
478 lineno, FALSE, NULL);
482 char *set_id = g_strdup_printf ("set_%s", var_name);
483 GString *set_cbuf = g_string_new (NULL);
484 Node *node1 = node_new (TYPE_NODE,
485 "name", the_type->name,
486 "pointer", the_type->pointer,
487 "postfix", the_type->postfix,
489 Node *node2 = node_new (TYPE_NODE,
492 Node *node3 = node_new (TYPE_NODE,
493 "name", class->class.otype,
497 g_string_sprintf (set_cbuf,
498 "\tg_object_set (G_OBJECT (self), "
499 "\"%s\", val, NULL);\n",
502 typestack = g_list_prepend (typestack, node2);
503 typestack = g_list_prepend (typestack, node1);
504 typestack = g_list_prepend (typestack, node3);
506 push_funcarg ("self", FALSE);
507 push_funcarg ("val", FALSE);
509 typestack = g_list_prepend (typestack, node2);
510 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
511 set_id, set_cbuf, set_lineno,
512 lineno, FALSE, NULL);
515 node_free ((Node *)the_type);
519 get_prop_enum_flag_cast (Property *prop)
522 if (prop->extra_gtktype == NULL ||
523 /* HACK! just in case someone made this
524 * work with 2.0.0 by using the TYPE
526 ((strstr (prop->extra_gtktype, "_TYPE_") != NULL ||
527 strstr (prop->extra_gtktype, "TYPE_") == prop->extra_gtktype) &&
528 strchr (prop->extra_gtktype, ':') == NULL)) {
529 if (prop->ptype != NULL)
530 return get_type (prop->ptype, TRUE);
532 return g_strdup ("");
534 tmp = remove_sep (prop->extra_gtktype);
535 ret = g_strdup_printf ("(%s) ", tmp);
541 add_construct_glade (char * file, char * root, char * domain)
546 type = (Type *)node_new (TYPE_NODE,
550 initializer = g_strdup_printf("\t{\n"
551 "\tGtkWidget * root;\n"
552 "\t%%1$s->_priv->_glade_xml = glade_xml_new(%s, %s, %s);\n"
553 "\troot = glade_xml_get_widget(%%1$s->_priv->_glade_xml, %s);\n"
554 "\tgtk_widget_show(root);\n"
555 "\tgtk_container_add(GTK_CONTAINER(%%1$s), root);\n"
556 "\tglade_xml_signal_autoconnect_full(%%1$s->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)%%1$s);\n"
557 "}\n", file, root, domain ? domain : "NULL", root);
559 var = node_new (VARIABLE_NODE,
560 "scope", PRIVATE_SCOPE,
562 "glade_widget", FALSE,
563 "id:steal", "_glade_xml",
564 "destructor_unref", FALSE,
565 "destructor", "g_object_unref",
566 "destructor_simple", TRUE,
567 "initializer", initializer,
568 "initializer_simple", FALSE,
570 class_nodes = g_list_prepend(class_nodes, var);
574 property_link_and_export (Node *node)
576 Property *prop = (Property *)node;
580 char *get = NULL, *set = NULL;
583 if (prop->set != NULL ||
585 error_print (GOB_ERROR, prop->line_no,
586 _("Property linking requested, but "
587 "getters and setters exist"));
590 var = find_var_or_die (prop->name, prop->line_no);
591 if(var->scope == PRIVATE_SCOPE) {
592 root = "self->_priv";
593 } else if (var->scope == CLASS_SCOPE) {
594 root = "SELF_GET_CLASS(self)";
596 error_print (GOB_ERROR, prop->line_no,
597 _("Self aliases needed when autolinking to a classwide member"));
602 if (strcmp (prop->gtktype, "STRING") == 0) {
603 set = g_strdup_printf("{ char *old = %s->%s; "
604 "%s->%s = g_value_dup_string (VAL); g_free (old); }",
607 get = g_strdup_printf("g_value_set_string (VAL, %s->%s);",
609 } else if (strcmp (prop->gtktype, "OBJECT") == 0) {
611 if (prop->extra_gtktype != NULL) {
612 cast = remove_sep (prop->extra_gtktype);
614 cast = g_strdup ("void");
616 set = g_strdup_printf("{ GObject *___old = (GObject *)%s->%s; "
617 "%s->%s = (%s *)g_value_dup_object (VAL); "
618 "if (___old != NULL) { "
619 "g_object_unref (G_OBJECT (___old)); "
625 get = g_strdup_printf ("g_value_set_object (VAL, "
626 "(gpointer)%s->%s);",
629 } else if (strcmp (prop->gtktype, "BOXED") == 0) {
630 char *type = make_me_type (prop->extra_gtktype,
632 if (prop->extra_gtktype == NULL) {
633 error_print (GOB_ERROR, prop->line_no,
634 _("Property linking requested for BOXED, but "
635 "boxed_type not set"));
637 set = g_strdup_printf("{ gpointer ___old = (gpointer)%s->%s; "
638 "gpointer ___new = (gpointer)g_value_get_boxed (VAL); "
639 "if (___new != ___old) { "
640 "if (___old != NULL) g_boxed_free (%s, ___old); "
641 "if (___new != NULL) %s->%s = g_boxed_copy (%s, ___new); "
642 "else %s->%s = NULL;"
650 get = g_strdup_printf("g_value_set_boxed (VAL, %s->%s);",
656 const char *getcast = "";
657 const char *setcast = "";
658 char *to_free = NULL;
659 set_func = g_strdup_printf ("g_value_set_%s", prop->gtktype);
660 g_strdown (set_func);
661 get_func = g_strdup_printf ("g_value_get_%s", prop->gtktype);
662 g_strdown (get_func);
665 if (strcmp (prop->gtktype, "FLAGS") == 0) {
666 setcast = "(guint) ";
668 get_prop_enum_flag_cast (prop);
669 } else if (strcmp (prop->gtktype, "ENUM") == 0) {
672 get_prop_enum_flag_cast (prop);
673 } else if (strcmp (prop->gtktype, "POINTER") == 0) {
674 setcast = "(gpointer) ";
675 getcast = g_strdup_printf ("(%s%s) ",
677 prop->ptype->pointer ? prop->ptype->pointer : "");
681 set = g_strdup_printf("%s->%s = %s%s (VAL);",
685 get = g_strdup_printf("%s (VAL, %s%s->%s);",
697 "get_line", prop->line_no,
699 "set_line", prop->line_no,
704 export_accessors (prop->name,
705 prop->get != NULL, prop->get_line,
706 prop->set != NULL, prop->set_line,
717 if (strcmp (s, "BOOL") == 0) {
718 error_print (GOB_WARN, line_no,
719 _("BOOL type is deprecated, please use BOOLEAN"));
721 return g_strdup ("BOOLEAN");
728 ensure_property (void)
730 if (property == NULL)
731 property = (Property *)node_new (PROPERTY_NODE, NULL);
735 /* Line 371 of yacc.c */
739 # if defined __cplusplus && 201103L <= __cplusplus
740 # define YY_NULL nullptr
746 /* Enabling verbose error messages. */
747 #ifdef YYERROR_VERBOSE
748 # undef YYERROR_VERBOSE
749 # define YYERROR_VERBOSE 1
751 # define YYERROR_VERBOSE 0
754 /* In a future release of Bison, this section will be replaced
755 by #include "y.tab.h". */
756 #ifndef YY_YY_PARSE_H_INCLUDED
757 # define YY_YY_PARSE_H_INCLUDED
758 /* Enabling traces. */
769 /* Put the tokens into the symbol table, so that GDB and other debuggers
835 #define THREEDOTS 265
846 #define TYPETOKEN 276
847 #define ARRAY_DIM 277
848 #define SINGLE_CHAR 278
860 #define PROTECTED 290
861 #define CLASSWIDE 291
872 #define DEFAULT_VALUE 302
876 #define FLAGS_TYPE 306
877 #define ENUM_TYPE 307
878 #define PARAM_TYPE 308
879 #define BOXED_TYPE 309
880 #define OBJECT_TYPE 310
884 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
885 typedef union YYSTYPE
887 /* Line 387 of yacc.c */
897 /* Line 387 of yacc.c */
900 # define YYSTYPE_IS_TRIVIAL 1
901 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
902 # define YYSTYPE_IS_DECLARED 1
905 extern YYSTYPE yylval;
908 #if defined __STDC__ || defined __cplusplus
909 int yyparse (void *YYPARSE_PARAM);
913 #else /* ! YYPARSE_PARAM */
914 #if defined __STDC__ || defined __cplusplus
919 #endif /* ! YYPARSE_PARAM */
921 #endif /* !YY_YY_PARSE_H_INCLUDED */
923 /* Copy the second part of user declarations. */
925 /* Line 390 of yacc.c */
933 typedef YYTYPE_UINT8 yytype_uint8;
935 typedef unsigned char yytype_uint8;
939 typedef YYTYPE_INT8 yytype_int8;
940 #elif (defined __STDC__ || defined __C99__FUNC__ \
941 || defined __cplusplus || defined _MSC_VER)
942 typedef signed char yytype_int8;
944 typedef short int yytype_int8;
948 typedef YYTYPE_UINT16 yytype_uint16;
950 typedef unsigned short int yytype_uint16;
954 typedef YYTYPE_INT16 yytype_int16;
956 typedef short int yytype_int16;
960 # ifdef __SIZE_TYPE__
961 # define YYSIZE_T __SIZE_TYPE__
962 # elif defined size_t
963 # define YYSIZE_T size_t
964 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
965 || defined __cplusplus || defined _MSC_VER)
966 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
967 # define YYSIZE_T size_t
969 # define YYSIZE_T unsigned int
973 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
976 # if defined YYENABLE_NLS && YYENABLE_NLS
978 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
979 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
983 # define YY_(Msgid) Msgid
987 /* Suppress unused-variable warnings by "using" E. */
988 #if ! defined lint || defined __GNUC__
989 # define YYUSE(E) ((void) (E))
991 # define YYUSE(E) /* empty */
994 /* Identity function, used to suppress warnings about constant conditions. */
998 #if (defined __STDC__ || defined __C99__FUNC__ \
999 || defined __cplusplus || defined _MSC_VER)
1012 #if ! defined yyoverflow || YYERROR_VERBOSE
1014 /* The parser invokes alloca or malloc; define the necessary symbols. */
1016 # ifdef YYSTACK_USE_ALLOCA
1017 # if YYSTACK_USE_ALLOCA
1019 # define YYSTACK_ALLOC __builtin_alloca
1020 # elif defined __BUILTIN_VA_ARG_INCR
1021 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1023 # define YYSTACK_ALLOC __alloca
1024 # elif defined _MSC_VER
1025 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1026 # define alloca _alloca
1028 # define YYSTACK_ALLOC alloca
1029 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1030 || defined __cplusplus || defined _MSC_VER)
1031 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1032 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1033 # ifndef EXIT_SUCCESS
1034 # define EXIT_SUCCESS 0
1041 # ifdef YYSTACK_ALLOC
1042 /* Pacify GCC's `empty if-body' warning. */
1043 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1044 # ifndef YYSTACK_ALLOC_MAXIMUM
1045 /* The OS might guarantee only one guard page at the bottom of the stack,
1046 and a page size can be as small as 4096 bytes. So we cannot safely
1047 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1048 to allow for a few compiler-allocated temporary stack slots. */
1049 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1052 # define YYSTACK_ALLOC YYMALLOC
1053 # define YYSTACK_FREE YYFREE
1054 # ifndef YYSTACK_ALLOC_MAXIMUM
1055 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1057 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1058 && ! ((defined YYMALLOC || defined malloc) \
1059 && (defined YYFREE || defined free)))
1060 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1061 # ifndef EXIT_SUCCESS
1062 # define EXIT_SUCCESS 0
1066 # define YYMALLOC malloc
1067 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1068 || defined __cplusplus || defined _MSC_VER)
1069 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1073 # define YYFREE free
1074 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
1075 || defined __cplusplus || defined _MSC_VER)
1076 void free (void *); /* INFRINGES ON USER NAME SPACE */
1080 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1083 #if (! defined yyoverflow \
1084 && (! defined __cplusplus \
1085 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1087 /* A type that is properly aligned for any stack member. */
1090 yytype_int16 yyss_alloc;
1094 /* The size of the maximum gap between one aligned stack and the next. */
1095 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1097 /* The size of an array large to enough to hold all stacks, each with
1099 # define YYSTACK_BYTES(N) \
1100 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1101 + YYSTACK_GAP_MAXIMUM)
1103 # define YYCOPY_NEEDED 1
1105 /* Relocate STACK from its old location to the new one. The
1106 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1107 elements in the stack, and YYPTR gives the new location of the
1108 stack. Advance YYPTR to a properly aligned location for the next
1110 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1113 YYSIZE_T yynewbytes; \
1114 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1115 Stack = &yyptr->Stack_alloc; \
1116 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1117 yyptr += yynewbytes / sizeof (*yyptr); \
1123 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1124 /* Copy COUNT objects from SRC to DST. The source and destination do
1127 # if defined __GNUC__ && 1 < __GNUC__
1128 # define YYCOPY(Dst, Src, Count) \
1129 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
1131 # define YYCOPY(Dst, Src, Count) \
1135 for (yyi = 0; yyi < (Count); yyi++) \
1136 (Dst)[yyi] = (Src)[yyi]; \
1141 #endif /* !YYCOPY_NEEDED */
1143 /* YYFINAL -- State number of the termination state. */
1145 /* YYLAST -- Last index in YYTABLE. */
1148 /* YYNTOKENS -- Number of terminals. */
1149 #define YYNTOKENS 69
1150 /* YYNNTS -- Number of nonterminals. */
1152 /* YYNRULES -- Number of rules. */
1153 #define YYNRULES 200
1154 /* YYNRULES -- Number of states. */
1155 #define YYNSTATES 425
1157 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1158 #define YYUNDEFTOK 2
1159 #define YYMAXUTOK 310
1161 #define YYTRANSLATE(YYX) \
1162 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1164 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1165 static const yytype_uint8 yytranslate[] =
1167 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1168 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1169 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1170 2, 2, 2, 67, 2, 2, 2, 2, 2, 2,
1171 58, 59, 64, 2, 62, 68, 2, 2, 2, 2,
1172 2, 2, 2, 2, 2, 2, 2, 2, 2, 60,
1173 66, 61, 65, 2, 2, 2, 2, 2, 2, 2,
1174 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1175 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1176 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1177 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1178 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1179 2, 2, 2, 56, 63, 57, 2, 2, 2, 2,
1180 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1181 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1182 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1183 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1184 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1187 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1190 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1191 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1192 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1193 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1194 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1195 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1196 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1197 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1202 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1204 static const yytype_uint16 yyprhs[] =
1206 0, 0, 3, 7, 10, 13, 15, 17, 19, 21,
1207 23, 25, 27, 29, 31, 34, 37, 40, 43, 45,
1208 47, 49, 51, 56, 60, 66, 67, 72, 78, 84,
1209 90, 97, 105, 112, 120, 123, 125, 127, 130, 134,
1210 136, 138, 140, 142, 144, 146, 148, 150, 153, 157,
1211 160, 164, 167, 170, 172, 174, 176, 177, 183, 190,
1212 203, 213, 220, 224, 225, 237, 246, 252, 256, 257,
1213 261, 263, 265, 270, 272, 274, 278, 282, 286, 290,
1214 294, 298, 302, 306, 310, 314, 318, 322, 326, 330,
1215 334, 338, 342, 346, 348, 354, 356, 360, 361, 365,
1216 367, 370, 372, 374, 376, 379, 382, 385, 389, 393,
1217 396, 399, 402, 404, 407, 409, 412, 414, 416, 418,
1218 420, 422, 424, 426, 428, 430, 432, 434, 436, 438,
1219 441, 444, 448, 451, 453, 457, 461, 464, 466, 471,
1220 477, 481, 483, 486, 488, 499, 511, 521, 531, 540,
1221 552, 561, 567, 570, 575, 582, 583, 585, 588, 590,
1222 592, 595, 598, 602, 607, 612, 614, 618, 620, 624,
1223 626, 629, 633, 640, 648, 651, 653, 655, 658, 661,
1224 665, 669, 673, 677, 685, 694, 698, 700, 704, 706,
1225 714, 723, 727, 729, 737, 746, 750, 752, 754, 757,
1229 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1230 static const yytype_int8 yyrhs[] =
1232 70, 0, -1, 72, 73, 72, -1, 73, 72, -1,
1233 72, 73, -1, 73, -1, 24, -1, 26, -1, 29,
1234 -1, 27, -1, 28, -1, 30, -1, 31, -1, 25,
1235 -1, 72, 71, -1, 72, 114, -1, 72, 117, -1,
1236 72, 119, -1, 71, -1, 114, -1, 117, -1, 119,
1237 -1, 74, 56, 76, 57, -1, 74, 56, 57, -1,
1238 3, 21, 4, 21, 75, -1, -1, 58, 19, 59,
1239 75, -1, 58, 19, 19, 59, 75, -1, 58, 19,
1240 21, 59, 75, -1, 58, 19, 20, 59, 75, -1,
1241 58, 19, 32, 32, 59, 75, -1, 58, 19, 32,
1242 32, 32, 59, 75, -1, 58, 19, 19, 32, 59,
1243 75, -1, 58, 19, 19, 32, 32, 59, 75, -1,
1244 76, 77, -1, 77, -1, 105, -1, 19, 105, -1,
1245 19, 21, 105, -1, 82, -1, 83, -1, 85, -1,
1246 60, -1, 33, -1, 34, -1, 35, -1, 36, -1,
1247 19, 19, -1, 19, 56, 24, -1, 61, 121, -1,
1248 61, 56, 24, -1, 79, 80, -1, 80, 79, -1,
1249 80, -1, 79, -1, 19, -1, -1, 78, 94, 19,
1250 81, 60, -1, 78, 94, 19, 22, 81, 60, -1,
1251 38, 92, 91, 19, 84, 19, 56, 24, 19, 56,
1252 24, 60, -1, 38, 92, 91, 19, 84, 19, 56,
1253 24, 60, -1, 38, 92, 91, 19, 84, 19, -1,
1254 58, 19, 59, -1, -1, 37, 19, 19, 86, 19,
1255 56, 24, 19, 56, 24, 60, -1, 37, 19, 19,
1256 86, 19, 56, 24, 60, -1, 37, 19, 19, 86,
1257 60, -1, 58, 87, 59, -1, -1, 87, 62, 90,
1258 -1, 90, -1, 32, -1, 19, 58, 32, 59, -1,
1259 121, -1, 88, -1, 42, 61, 88, -1, 43, 61,
1260 88, -1, 44, 61, 88, -1, 45, 61, 121, -1,
1261 46, 61, 121, -1, 47, 61, 89, -1, 49, 61,
1262 93, -1, 50, 61, 94, -1, 51, 61, 21, -1,
1263 51, 61, 19, -1, 52, 61, 21, -1, 52, 61,
1264 19, -1, 53, 61, 21, -1, 53, 61, 19, -1,
1265 54, 61, 21, -1, 54, 61, 19, -1, 55, 61,
1266 21, -1, 55, 61, 19, -1, 19, -1, 19, 58,
1267 19, 94, 59, -1, 19, -1, 58, 93, 59, -1,
1268 -1, 19, 63, 93, -1, 19, -1, 95, 99, -1,
1269 95, -1, 96, -1, 19, -1, 5, 19, -1, 19,
1270 5, -1, 98, 19, -1, 5, 98, 19, -1, 98,
1271 19, 5, -1, 97, 96, -1, 21, 96, -1, 5,
1272 96, -1, 21, -1, 21, 5, -1, 97, -1, 97,
1273 5, -1, 6, -1, 18, -1, 14, -1, 15, -1,
1274 13, -1, 16, -1, 17, -1, 11, -1, 12, -1,
1275 7, -1, 8, -1, 9, -1, 64, -1, 64, 5,
1276 -1, 64, 99, -1, 64, 5, 99, -1, 19, 102,
1277 -1, 102, -1, 78, 19, 102, -1, 19, 78, 102,
1278 -1, 78, 102, -1, 100, -1, 19, 58, 103, 59,
1279 -1, 19, 32, 58, 103, 59, -1, 103, 62, 19,
1280 -1, 19, -1, 56, 24, -1, 60, -1, 40, 92,
1281 101, 94, 19, 58, 108, 59, 106, 104, -1, 78,
1282 40, 92, 100, 94, 19, 58, 108, 59, 106, 104,
1283 -1, 39, 78, 94, 19, 58, 108, 59, 106, 104,
1284 -1, 78, 39, 94, 19, 58, 108, 59, 106, 104,
1285 -1, 39, 94, 19, 58, 108, 59, 106, 104, -1,
1286 41, 58, 21, 59, 94, 19, 58, 108, 59, 106,
1287 104, -1, 78, 94, 19, 58, 108, 59, 106, 104,
1288 -1, 19, 58, 19, 59, 104, -1, 19, 107, -1,
1289 19, 107, 19, 107, -1, 19, 107, 19, 107, 19,
1290 107, -1, -1, 121, -1, 56, 24, -1, 6, -1,
1291 19, -1, 19, 5, -1, 5, 19, -1, 19, 62,
1292 109, -1, 19, 5, 62, 109, -1, 5, 19, 62,
1293 109, -1, 109, -1, 110, 62, 10, -1, 110, -1,
1294 110, 62, 111, -1, 111, -1, 94, 19, -1, 94,
1295 19, 22, -1, 94, 19, 58, 19, 112, 59, -1,
1296 94, 19, 22, 58, 19, 112, 59, -1, 112, 113,
1297 -1, 113, -1, 19, -1, 65, 121, -1, 66, 121,
1298 -1, 65, 61, 121, -1, 66, 61, 121, -1, 61,
1299 61, 121, -1, 67, 61, 121, -1, 9, 19, 56,
1300 115, 57, 21, 60, -1, 9, 19, 56, 115, 62,
1301 57, 21, 60, -1, 115, 62, 116, -1, 116, -1,
1302 19, 61, 121, -1, 19, -1, 49, 19, 56, 118,
1303 57, 21, 60, -1, 49, 19, 56, 118, 62, 57,
1304 21, 60, -1, 118, 62, 19, -1, 19, -1, 48,
1305 19, 56, 120, 57, 21, 60, -1, 48, 19, 56,
1306 120, 62, 57, 21, 60, -1, 120, 62, 19, -1,
1307 19, -1, 20, -1, 68, 20, -1, 23, -1, 19,
1311 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1312 static const yytype_uint16 yyrline[] =
1314 0, 713, 713, 714, 715, 716, 719, 728, 737, 746,
1315 755, 764, 773, 782, 793, 794, 795, 796, 797, 798,
1316 799, 800, 803, 808, 815, 832, 833, 841, 853, 862,
1317 874, 883, 892, 901, 912, 913, 916, 917, 926, 938,
1318 939, 940, 941, 944, 945, 946, 947, 950, 970, 994,
1319 998, 1006, 1007, 1008, 1009, 1010, 1018, 1024, 1027, 1032,
1320 1100, 1154, 1243, 1251, 1256, 1304, 1340, 1356, 1357, 1360,
1321 1361, 1364, 1365, 1377, 1378, 1381, 1387, 1393, 1399, 1405,
1322 1411, 1417, 1423, 1430, 1436, 1442, 1448, 1454, 1460, 1466,
1323 1472, 1478, 1484, 1490, 1515, 1524, 1530, 1531, 1534, 1537,
1324 1543, 1550, 1559, 1562, 1565, 1569, 1573, 1577, 1582, 1590,
1325 1594, 1599, 1603, 1606, 1610, 1613, 1618, 1619, 1620, 1621,
1326 1622, 1623, 1624, 1625, 1626, 1629, 1630, 1631, 1634, 1635,
1327 1636, 1640, 1647, 1659, 1665, 1677, 1689, 1692, 1698, 1701,
1328 1707, 1710, 1715, 1716, 1720, 1743, 1766, 1789, 1812, 1830,
1329 1843, 1853, 1893, 1905, 1925, 1956, 1963, 1964, 1970, 1971,
1330 1982, 1993, 2004, 2014, 2024, 2034, 2037, 2038, 2041, 2042,
1331 2045, 2048, 2051, 2059, 2069, 2070, 2073, 2090, 2097, 2104,
1332 2111, 2118, 2125, 2134, 2143, 2154, 2155, 2158, 2178, 2188,
1333 2197, 2208, 2211, 2216, 2225, 2236, 2239, 2245, 2246, 2250,
1338 #if YYDEBUG || YYERROR_VERBOSE || 0
1339 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1340 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1341 static const char *const yytname[] =
1343 "$end", "error", "$undefined", "CLASS", "FROM", "CONST", "VOID",
1344 "STRUCT", "UNION", "ENUM", "THREEDOTS", "SIGNED", "UNSIGNED", "LONG",
1345 "SHORT", "INT", "FLOAT", "DOUBLE", "CHAR", "TOKEN", "NUMBER",
1346 "TYPETOKEN", "ARRAY_DIM", "SINGLE_CHAR", "CCODE", "CTCODE", "ADCODE",
1347 "HTCODE", "PHCODE", "HCODE", "ACODE", "ATCODE", "STRING", "PUBLIC",
1348 "PRIVATE", "PROTECTED", "CLASSWIDE", "PROPERTY", "ARGUMENT", "VIRTUAL",
1349 "SIGNAL", "OVERRIDE", "NAME", "NICK", "BLURB", "MAXIMUM", "MINIMUM",
1350 "DEFAULT_VALUE", "ERROR", "FLAGS", "TYPE", "FLAGS_TYPE", "ENUM_TYPE",
1351 "PARAM_TYPE", "BOXED_TYPE", "OBJECT_TYPE", "'{'", "'}'", "'('", "')'",
1352 "';'", "'='", "','", "'|'", "'*'", "'>'", "'<'", "'!'", "'-'", "$accept",
1353 "prog", "ccode", "ccodes", "class", "classdec", "classflags",
1354 "classcode", "thing", "scope", "destructor", "initializer", "varoptions",
1355 "variable", "argument", "export", "property", "param_spec",
1356 "param_spec_list", "string", "anyval", "param_spec_value", "argtype",
1357 "flags", "flaglist", "type", "specifier_list", "spec_list", "specifier",
1358 "strunionenum", "pointer", "simplesigtype", "fullsigtype", "sigtype",
1359 "tokenlist", "codenocode", "method", "methodmods", "retcode", "funcargs",
1360 "arglist", "arglist1", "arg", "checklist", "check", "enumcode",
1361 "enumvals", "enumval", "flagcode", "flagvals", "errorcode", "errorvals",
1367 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1369 static const yytype_uint16 yytoknum[] =
1371 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1372 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1373 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1374 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1375 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1376 305, 306, 307, 308, 309, 310, 123, 125, 40, 41,
1377 59, 61, 44, 124, 42, 62, 60, 33, 45
1381 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1382 static const yytype_uint8 yyr1[] =
1384 0, 69, 70, 70, 70, 70, 71, 71, 71, 71,
1385 71, 71, 71, 71, 72, 72, 72, 72, 72, 72,
1386 72, 72, 73, 73, 74, 75, 75, 75, 75, 75,
1387 75, 75, 75, 75, 76, 76, 77, 77, 77, 77,
1388 77, 77, 77, 78, 78, 78, 78, 79, 79, 80,
1389 80, 81, 81, 81, 81, 81, 81, 82, 82, 83,
1390 83, 83, 84, 84, 85, 85, 85, 86, 86, 87,
1391 87, 88, 88, 89, 89, 90, 90, 90, 90, 90,
1392 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
1393 90, 90, 90, 90, 91, 91, 92, 92, 93, 93,
1394 94, 94, 95, 95, 95, 95, 95, 95, 95, 96,
1395 96, 96, 96, 96, 96, 96, 97, 97, 97, 97,
1396 97, 97, 97, 97, 97, 98, 98, 98, 99, 99,
1397 99, 99, 100, 100, 101, 101, 101, 101, 102, 102,
1398 103, 103, 104, 104, 105, 105, 105, 105, 105, 105,
1399 105, 105, 106, 106, 106, 106, 107, 107, 108, 108,
1400 108, 108, 108, 108, 108, 108, 109, 109, 110, 110,
1401 111, 111, 111, 111, 112, 112, 113, 113, 113, 113,
1402 113, 113, 113, 114, 114, 115, 115, 116, 116, 117,
1403 117, 118, 118, 119, 119, 120, 120, 121, 121, 121,
1407 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1408 static const yytype_uint8 yyr2[] =
1410 0, 2, 3, 2, 2, 1, 1, 1, 1, 1,
1411 1, 1, 1, 1, 2, 2, 2, 2, 1, 1,
1412 1, 1, 4, 3, 5, 0, 4, 5, 5, 5,
1413 6, 7, 6, 7, 2, 1, 1, 2, 3, 1,
1414 1, 1, 1, 1, 1, 1, 1, 2, 3, 2,
1415 3, 2, 2, 1, 1, 1, 0, 5, 6, 12,
1416 9, 6, 3, 0, 11, 8, 5, 3, 0, 3,
1417 1, 1, 4, 1, 1, 3, 3, 3, 3, 3,
1418 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1419 3, 3, 3, 1, 5, 1, 3, 0, 3, 1,
1420 2, 1, 1, 1, 2, 2, 2, 3, 3, 2,
1421 2, 2, 1, 2, 1, 2, 1, 1, 1, 1,
1422 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1423 2, 3, 2, 1, 3, 3, 2, 1, 4, 5,
1424 3, 1, 2, 1, 10, 11, 9, 9, 8, 11,
1425 8, 5, 2, 4, 6, 0, 1, 2, 1, 1,
1426 2, 2, 3, 4, 4, 1, 3, 1, 3, 1,
1427 2, 3, 6, 7, 2, 1, 1, 2, 2, 3,
1428 3, 3, 3, 7, 8, 3, 1, 3, 1, 7,
1429 8, 3, 1, 7, 8, 3, 1, 1, 2, 1,
1433 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1434 Performed when YYTABLE doesn't specify something else to do. Zero
1435 means the default is an error. */
1436 static const yytype_uint8 yydefact[] =
1438 0, 0, 0, 6, 13, 7, 9, 10, 8, 11,
1439 12, 0, 0, 0, 18, 0, 5, 0, 19, 20,
1440 21, 0, 0, 0, 0, 1, 14, 4, 15, 16,
1441 17, 3, 0, 0, 0, 0, 0, 2, 0, 43,
1442 44, 45, 46, 0, 97, 0, 97, 0, 23, 42,
1443 0, 35, 0, 39, 40, 41, 36, 25, 188, 0,
1444 186, 196, 0, 192, 0, 0, 0, 0, 0, 37,
1445 0, 0, 0, 0, 116, 125, 126, 127, 123, 124,
1446 120, 118, 119, 121, 122, 117, 103, 112, 0, 0,
1447 101, 102, 114, 0, 0, 0, 22, 34, 0, 97,
1448 0, 0, 24, 0, 0, 0, 0, 0, 0, 0,
1449 38, 0, 0, 68, 99, 0, 95, 0, 0, 104,
1450 111, 0, 105, 113, 110, 0, 0, 128, 100, 115,
1451 109, 106, 0, 0, 137, 0, 133, 0, 0, 0,
1452 56, 0, 200, 197, 199, 0, 187, 0, 0, 185,
1453 0, 195, 0, 0, 191, 0, 0, 0, 0, 0,
1454 0, 96, 0, 63, 107, 0, 0, 129, 130, 108,
1455 0, 0, 0, 0, 132, 0, 136, 0, 0, 0,
1456 0, 0, 55, 56, 0, 0, 54, 53, 0, 0,
1457 0, 0, 0, 25, 198, 183, 0, 193, 0, 189,
1458 0, 0, 143, 151, 93, 0, 0, 0, 0, 0,
1459 0, 0, 0, 0, 0, 0, 0, 0, 0, 70,
1460 0, 66, 98, 0, 0, 0, 0, 0, 116, 103,
1461 0, 0, 165, 167, 169, 131, 0, 141, 0, 135,
1462 134, 0, 0, 0, 0, 47, 0, 0, 0, 0,
1463 49, 51, 0, 52, 57, 0, 25, 25, 25, 0,
1464 26, 184, 194, 190, 142, 0, 0, 0, 0, 0,
1465 0, 0, 0, 0, 0, 0, 0, 0, 67, 0,
1466 0, 0, 0, 61, 0, 104, 105, 0, 170, 155,
1467 0, 0, 138, 0, 0, 0, 0, 0, 48, 58,
1468 155, 50, 0, 25, 27, 29, 28, 0, 25, 0,
1469 71, 75, 76, 77, 78, 79, 200, 74, 80, 73,
1470 81, 82, 84, 83, 86, 85, 88, 87, 90, 89,
1471 92, 91, 69, 0, 94, 62, 0, 155, 0, 0,
1472 162, 171, 0, 0, 0, 166, 168, 139, 140, 0,
1473 0, 155, 0, 0, 25, 32, 25, 30, 0, 0,
1474 65, 0, 0, 164, 163, 0, 0, 0, 152, 156,
1475 148, 155, 0, 0, 0, 150, 33, 31, 0, 0,
1476 0, 60, 146, 0, 176, 0, 0, 0, 0, 0,
1477 175, 157, 0, 0, 155, 147, 155, 72, 0, 0,
1478 0, 0, 0, 177, 0, 178, 0, 172, 174, 153,
1479 144, 0, 0, 64, 0, 173, 181, 179, 180, 182,
1480 0, 149, 145, 59, 154
1483 /* YYDEFGOTO[NTERM-NUM]. */
1484 static const yytype_int16 yydefgoto[] =
1486 -1, 13, 14, 15, 16, 17, 102, 50, 51, 52,
1487 186, 187, 188, 53, 54, 225, 55, 159, 218, 311,
1488 318, 219, 117, 72, 115, 230, 90, 91, 92, 93,
1489 128, 134, 135, 136, 238, 203, 56, 344, 368, 231,
1490 232, 233, 234, 389, 390, 18, 59, 60, 19, 64,
1494 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1496 #define YYPACT_NINF -334
1497 static const yytype_int16 yypact[] =
1499 169, 10, 22, -334, -334, -334, -334, -334, -334, -334,
1500 -334, 82, 99, 133, -334, 169, 220, 96, -334, -334,
1501 -334, 181, 134, 135, 145, -334, -334, 220, -334, -334,
1502 -334, 220, 170, 205, 183, 212, 213, 220, 237, -334,
1503 -334, -334, -334, 223, 196, 341, 196, 203, -334, -334,
1504 200, -334, 324, -334, -334, -334, -334, 204, 192, -30,
1505 -334, -334, 102, -334, 125, 208, 332, 256, 324, -334,
1506 262, 263, 278, 390, -334, -334, -334, -334, -334, -334,
1507 -334, -334, -334, -334, -334, -334, 300, 458, 407, 292,
1508 257, -334, 472, 315, 274, 246, -334, -334, 407, 196,
1509 325, 342, -334, 76, 348, 68, 349, 69, 372, 73,
1510 -334, 351, 381, 359, 364, 375, 386, 432, 486, -334,
1511 -334, 442, -334, 486, -334, 446, 408, 4, -334, 486,
1512 -334, 462, 255, 449, -334, 407, -334, 421, 463, 475,
1513 3, 154, -334, -334, -334, 461, -334, 435, 484, -334,
1514 436, -334, 485, 448, -334, 488, 128, 452, 273, 7,
1515 263, -334, 492, 454, -334, 455, 424, 257, -334, -334,
1516 -2, 456, 496, 497, -334, 27, -334, 498, 407, 460,
1517 27, 407, 92, -6, 424, -5, 459, 500, 464, 65,
1518 466, 467, 489, 204, -334, -334, 468, -334, 469, -334,
1519 470, 499, -334, -334, -334, 471, 473, 474, 476, 477,
1520 478, 479, 480, 481, 482, 483, 487, 490, 153, -334,
1521 491, -334, -334, 407, 503, 508, 424, 441, 493, 14,
1522 512, 494, -334, 495, -334, -334, 496, -334, 161, -334,
1523 -334, 501, 514, 424, 517, -334, 521, 502, 504, 522,
1524 -334, -334, 92, -334, -334, 80, 204, 204, 204, 121,
1525 -334, -334, -334, -334, -334, 144, 144, 144, 76, 76,
1526 16, 263, 407, 195, 275, 281, 285, 293, -334, 273,
1527 525, 505, 506, 510, 509, 162, 163, 407, 88, 531,
1528 373, 193, -334, 535, 424, 511, 513, 515, -334, -334,
1529 531, -334, 516, 204, -334, -334, -334, 518, 204, 520,
1530 -334, -334, -334, -334, -334, -334, 520, -334, -334, -334,
1531 -334, -334, -334, -334, -334, -334, -334, -334, -334, -334,
1532 -334, -334, -334, 9, -334, -334, 532, 531, 407, 407,
1533 -334, 523, 536, 30, 128, -334, -334, -334, -334, 524,
1534 424, 531, 424, 128, 204, -334, 204, -334, 526, 528,
1535 -334, 23, 128, -334, -334, 541, 75, 537, 548, -334,
1536 -334, 531, 527, 128, 529, -334, -334, -334, 530, 546,
1537 534, -334, -334, 75, -334, 519, 70, 86, 533, 62,
1538 -334, -334, 30, 128, 531, -334, 531, -334, 538, 547,
1539 84, 76, 76, -334, 76, -334, 76, -334, -334, 555,
1540 -334, 128, 128, -334, 539, -334, -334, -334, -334, -334,
1541 30, -334, -334, -334, -334
1544 /* YYPGOTO[NTERM-NUM]. */
1545 static const yytype_int16 yypgoto[] =
1547 -334, -334, 146, 165, 561, -334, -186, -334, 542, -28,
1548 392, 396, 402, -334, -334, -334, -334, -334, -334, -233,
1549 -334, 308, -334, -34, -155, -44, -334, -71, -334, -69,
1550 -47, 457, -334, -18, 355, -333, 94, -294, -285, -181,
1551 -264, -334, 303, 214, -281, 228, -334, 507, 248, -334,
1555 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1556 positive, shift that token. If negative, reduce the rule which
1557 number is the opposite. If YYTABLE_NINF, syntax error. */
1558 #define YYTABLE_NINF -162
1559 static const yytype_int16 yytable[] =
1561 146, 89, 120, 248, 121, 222, 353, 260, 100, 167,
1562 68, 370, 94, 182, 142, 143, 124, 88, 144, 286,
1563 375, 130, 182, 340, 112, 183, 220, 104, 359, 382,
1564 171, 21, 105, 312, 313, 316, 143, 317, 68, 144,
1565 395, 22, 380, 362, 125, 284, 170, 120, 310, 142,
1566 143, 249, 120, 144, 138, 185, 172, 373, 120, 171,
1567 410, 184, 296, 145, 185, 139, 133, 221, 127, 360,
1568 304, 305, 306, -159, 363, 364, 287, 393, 421, 422,
1569 168, 384, 250, 381, 145, 172, 367, 58, 151, 142,
1570 143, 177, 154, 144, 384, 142, 143, 255, 145, 144,
1571 411, 23, 412, 384, 173, 142, 143, 409, 408, 144,
1572 341, 245, 302, 349, 174, 176, 320, 355, 24, 408,
1573 235, 407, 357, 385, 256, 148, 152, 386, 387, 388,
1574 155, 402, 69, 25, 242, 424, 385, 244, 145, 303,
1575 386, 387, 388, 415, 145, 385, 342, 404, 246, 386,
1576 387, 388, 32, 307, 145, 239, 120, 240, 121, 106,
1577 110, 26, 174, 309, 107, 314, 315, 319, 376, 372,
1578 377, 374, 1, 189, 190, 191, 310, 26, 2, 281,
1579 308, 31, 108, 26, 201, 33, 192, 109, 202, 38,
1580 34, 35, 37, 3, 4, 5, 6, 7, 8, 9,
1581 10, 36, 58, 39, 40, 41, 42, 43, 44, 45,
1582 46, 47, 278, 193, 322, 279, 323, 11, 12, 38,
1583 292, -161, -160, 293, 338, 339, 57, 48, 321, 2,
1584 49, 61, 63, 39, 40, 41, 42, 43, 44, 45,
1585 46, 47, 70, 28, 3, 4, 5, 6, 7, 8,
1586 9, 10, 347, 103, 71, 293, 65, 96, 66, 28,
1587 49, 95, 101, 29, 30, 28, 67, 137, 11, 12,
1588 39, 40, 41, 42, 170, 111, 45, 46, 47, 29,
1589 30, 113, 114, 403, 405, 29, 30, 171, 39, 40,
1590 41, 42, 204, 132, 324, 67, 325, 116, 416, 417,
1591 326, 418, 327, 419, 328, 122, 329, 39, 40, 41,
1592 42, 126, 330, 172, 331, 205, 206, 207, 208, 209,
1593 210, 127, 211, 212, 213, 214, 215, 216, 217, 73,
1594 74, 75, 76, 77, 131, 78, 79, 80, 81, 82,
1595 83, 84, 85, 86, 140, 87, 73, 74, 75, 76,
1596 77, 65, 78, 79, 80, 81, 82, 83, 84, 85,
1597 86, 141, 87, 98, 99, 39, 40, 41, 42, 147,
1598 150, 45, 46, 47, 39, 40, 41, 42, 73, 74,
1599 75, 76, 77, 345, 78, 79, 80, 81, 82, 83,
1600 84, 85, 86, 153, 87, 118, 74, 75, 76, 77,
1601 157, 78, 79, 80, 81, 82, 83, 84, 85, 119,
1602 156, 87, 73, 74, 75, 76, 77, 158, 78, 79,
1603 80, 81, 82, 83, 84, 85, 86, 160, 87, 227,
1604 228, 75, 76, 77, 161, 78, 79, 80, 81, 82,
1605 83, 84, 85, 229, 162, 87, 118, 74, 75, 76,
1606 77, 163, 78, 79, 80, 81, 82, 83, 84, 85,
1607 285, 164, 87, 123, 74, 165, 166, 169, 175, 78,
1608 79, 80, 81, 82, 83, 84, 85, 129, 74, 87,
1609 178, 194, 179, 78, 79, 80, 81, 82, 83, 84,
1610 85, 118, 74, 87, 180, 195, 197, 78, 79, 80,
1611 81, 82, 83, 84, 85, 196, 198, 87, 199, 200,
1612 184, 223, 224, 226, 236, 237, 170, 241, 243, 252,
1613 185, 259, 282, 264, 254, 257, 258, 283, 261, 262,
1614 263, 288, 265, 295, 266, 267, 297, 268, 269, 270,
1615 271, 272, 273, 274, 275, 298, 301, 280, 276, 333,
1616 343, 277, -158, 289, 348, 366, 361, 290, 378, 294,
1617 383, 391, 299, 300, 334, 335, 336, 392, 337, 350,
1618 398, 414, 351, 352, 420, 354, 27, 356, 358, 253,
1619 401, 365, 251, 371, 379, 247, 394, 332, 396, 397,
1620 399, 291, 97, 346, 406, 0, 181, 400, 413, 423,
1621 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1625 #define yypact_value_is_default(Yystate) \
1626 (!!((Yystate) == (-334)))
1628 #define yytable_value_is_error(Yytable_value) \
1631 static const yytype_int16 yycheck[] =
1633 103, 45, 73, 184, 73, 160, 300, 193, 52, 5,
1634 38, 344, 46, 19, 19, 20, 87, 45, 23, 5,
1635 353, 92, 19, 287, 68, 22, 19, 57, 19, 362,
1636 32, 21, 62, 266, 267, 19, 20, 270, 66, 23,
1637 373, 19, 19, 337, 88, 226, 19, 118, 32, 19,
1638 20, 56, 123, 23, 98, 61, 58, 351, 129, 32,
1639 393, 58, 243, 68, 61, 99, 94, 60, 64, 60,
1640 256, 257, 258, 59, 338, 339, 62, 371, 411, 412,
1641 127, 19, 185, 60, 68, 58, 56, 19, 19, 19,
1642 20, 135, 19, 23, 19, 19, 20, 32, 68, 23,
1643 394, 19, 396, 19, 132, 19, 20, 392, 389, 23,
1644 22, 19, 32, 294, 132, 133, 271, 303, 19, 400,
1645 167, 59, 308, 61, 59, 57, 57, 65, 66, 67,
1646 57, 61, 38, 0, 178, 420, 61, 181, 68, 59,
1647 65, 66, 67, 59, 68, 61, 58, 61, 56, 65,
1648 66, 67, 56, 32, 68, 173, 227, 175, 227, 57,
1649 66, 15, 180, 19, 62, 268, 269, 270, 354, 350,
1650 356, 352, 3, 19, 20, 21, 32, 31, 9, 223,
1651 59, 16, 57, 37, 56, 4, 32, 62, 60, 19,
1652 56, 56, 27, 24, 25, 26, 27, 28, 29, 30,
1653 31, 56, 19, 33, 34, 35, 36, 37, 38, 39,
1654 40, 41, 59, 59, 19, 62, 21, 48, 49, 19,
1655 59, 59, 59, 62, 62, 62, 21, 57, 272, 9,
1656 60, 19, 19, 33, 34, 35, 36, 37, 38, 39,
1657 40, 41, 19, 15, 24, 25, 26, 27, 28, 29,
1658 30, 31, 59, 61, 58, 62, 19, 57, 21, 31,
1659 60, 58, 58, 15, 15, 37, 58, 21, 48, 49,
1660 33, 34, 35, 36, 19, 19, 39, 40, 41, 31,
1661 31, 19, 19, 386, 387, 37, 37, 32, 33, 34,
1662 35, 36, 19, 19, 19, 58, 21, 19, 401, 402,
1663 19, 404, 21, 406, 19, 5, 21, 33, 34, 35,
1664 36, 19, 19, 58, 21, 42, 43, 44, 45, 46,
1665 47, 64, 49, 50, 51, 52, 53, 54, 55, 5,
1666 6, 7, 8, 9, 19, 11, 12, 13, 14, 15,
1667 16, 17, 18, 19, 19, 21, 5, 6, 7, 8,
1668 9, 19, 11, 12, 13, 14, 15, 16, 17, 18,
1669 19, 19, 21, 39, 40, 33, 34, 35, 36, 21,
1670 21, 39, 40, 41, 33, 34, 35, 36, 5, 6,
1671 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1672 17, 18, 19, 21, 21, 5, 6, 7, 8, 9,
1673 19, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1674 59, 21, 5, 6, 7, 8, 9, 58, 11, 12,
1675 13, 14, 15, 16, 17, 18, 19, 63, 21, 5,
1676 6, 7, 8, 9, 59, 11, 12, 13, 14, 15,
1677 16, 17, 18, 19, 58, 21, 5, 6, 7, 8,
1678 9, 19, 11, 12, 13, 14, 15, 16, 17, 18,
1679 19, 19, 21, 5, 6, 19, 58, 5, 19, 11,
1680 12, 13, 14, 15, 16, 17, 18, 5, 6, 21,
1681 59, 20, 19, 11, 12, 13, 14, 15, 16, 17,
1682 18, 5, 6, 21, 19, 60, 60, 11, 12, 13,
1683 14, 15, 16, 17, 18, 21, 21, 21, 60, 21,
1684 58, 19, 58, 58, 58, 19, 19, 19, 58, 19,
1685 61, 32, 19, 24, 60, 59, 59, 19, 60, 60,
1686 60, 19, 61, 19, 61, 61, 19, 61, 61, 61,
1687 61, 61, 61, 61, 61, 24, 24, 56, 61, 24,
1688 19, 61, 59, 59, 19, 19, 24, 62, 32, 58,
1689 19, 24, 60, 59, 59, 59, 56, 19, 59, 58,
1690 24, 24, 59, 58, 19, 59, 15, 59, 58, 187,
1691 61, 58, 186, 59, 56, 183, 59, 279, 59, 59,
1692 56, 236, 50, 290, 61, -1, 139, 383, 60, 60,
1693 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1697 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1698 symbol of state STATE-NUM. */
1699 static const yytype_uint8 yystos[] =
1701 0, 3, 9, 24, 25, 26, 27, 28, 29, 30,
1702 31, 48, 49, 70, 71, 72, 73, 74, 114, 117,
1703 119, 21, 19, 19, 19, 0, 71, 73, 114, 117,
1704 119, 72, 56, 4, 56, 56, 56, 72, 19, 33,
1705 34, 35, 36, 37, 38, 39, 40, 41, 57, 60,
1706 76, 77, 78, 82, 83, 85, 105, 21, 19, 115,
1707 116, 19, 120, 19, 118, 19, 21, 58, 78, 105,
1708 19, 58, 92, 5, 6, 7, 8, 9, 11, 12,
1709 13, 14, 15, 16, 17, 18, 19, 21, 78, 94,
1710 95, 96, 97, 98, 92, 58, 57, 77, 39, 40,
1711 94, 58, 75, 61, 57, 62, 57, 62, 57, 62,
1712 105, 19, 94, 19, 19, 93, 19, 91, 5, 19,
1713 96, 98, 5, 5, 96, 94, 19, 64, 99, 5,
1714 96, 19, 19, 78, 100, 101, 102, 21, 94, 92,
1715 19, 19, 19, 20, 23, 68, 121, 21, 57, 116,
1716 21, 19, 57, 21, 19, 57, 59, 19, 58, 86,
1717 63, 59, 58, 19, 19, 19, 58, 5, 99, 5,
1718 19, 32, 58, 78, 102, 19, 102, 94, 59, 19,
1719 19, 100, 19, 22, 58, 61, 79, 80, 81, 19,
1720 20, 21, 32, 59, 20, 60, 21, 60, 21, 60,
1721 21, 56, 60, 104, 19, 42, 43, 44, 45, 46,
1722 47, 49, 50, 51, 52, 53, 54, 55, 87, 90,
1723 19, 60, 93, 19, 58, 84, 58, 5, 6, 19,
1724 94, 108, 109, 110, 111, 99, 58, 19, 103, 102,
1725 102, 19, 94, 58, 94, 19, 56, 81, 108, 56,
1726 121, 80, 19, 79, 60, 32, 59, 59, 59, 32,
1727 75, 60, 60, 60, 24, 61, 61, 61, 61, 61,
1728 61, 61, 61, 61, 61, 61, 61, 61, 59, 62,
1729 56, 94, 19, 19, 108, 19, 5, 62, 19, 59,
1730 62, 103, 59, 62, 58, 19, 108, 19, 24, 60,
1731 59, 24, 32, 59, 75, 75, 75, 32, 59, 19,
1732 32, 88, 88, 88, 121, 121, 19, 88, 89, 121,
1733 93, 94, 19, 21, 19, 21, 19, 21, 19, 21,
1734 19, 21, 90, 24, 59, 59, 56, 59, 62, 62,
1735 109, 22, 58, 19, 106, 10, 111, 59, 19, 108,
1736 58, 59, 58, 106, 59, 75, 59, 75, 58, 19,
1737 60, 24, 106, 109, 109, 58, 19, 56, 107, 121,
1738 104, 59, 108, 106, 108, 104, 75, 75, 32, 56,
1739 19, 60, 104, 19, 19, 61, 65, 66, 67, 112,
1740 113, 24, 19, 106, 59, 104, 59, 59, 24, 56,
1741 112, 61, 61, 121, 61, 121, 61, 59, 113, 107,
1742 104, 106, 106, 60, 24, 59, 121, 121, 121, 121,
1743 19, 104, 104, 60, 107
1746 #define yyerrok (yyerrstatus = 0)
1747 #define yyclearin (yychar = YYEMPTY)
1748 #define YYEMPTY (-2)
1751 #define YYACCEPT goto yyacceptlab
1752 #define YYABORT goto yyabortlab
1753 #define YYERROR goto yyerrorlab
1756 /* Like YYERROR except do call yyerror. This remains here temporarily
1757 to ease the transition to the new meaning of YYERROR, for GCC.
1758 Once GCC version 2 has supplanted version 1, this can go. However,
1759 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1760 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1763 #define YYFAIL goto yyerrlab
1765 /* This is here to suppress warnings from the GCC cpp's
1766 -Wunused-macros. Normally we don't worry about that warning, but
1767 some users do, and we want to make it easy for users to remove
1768 YYFAIL uses, which will produce warnings from Bison 2.5. */
1771 #define YYRECOVERING() (!!yyerrstatus)
1773 #define YYBACKUP(Token, Value) \
1775 if (yychar == YYEMPTY) \
1779 YYPOPSTACK (yylen); \
1785 yyerror (YY_("syntax error: cannot back up")); \
1790 /* Error token number */
1792 #define YYERRCODE 256
1795 /* This macro is provided for backward compatibility. */
1796 #ifndef YY_LOCATION_PRINT
1797 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1801 /* YYLEX -- calling `yylex' with the right arguments. */
1803 # define YYLEX yylex (YYLEX_PARAM)
1805 # define YYLEX yylex ()
1808 /* Enable debugging if requested. */
1812 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1813 # define YYFPRINTF fprintf
1816 # define YYDPRINTF(Args) \
1822 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1826 YYFPRINTF (stderr, "%s ", Title); \
1827 yy_symbol_print (stderr, \
1829 YYFPRINTF (stderr, "\n"); \
1834 /*--------------------------------.
1835 | Print this symbol on YYOUTPUT. |
1836 `--------------------------------*/
1839 #if (defined __STDC__ || defined __C99__FUNC__ \
1840 || defined __cplusplus || defined _MSC_VER)
1842 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1845 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1848 YYSTYPE const * const yyvaluep;
1851 FILE *yyo = yyoutput;
1856 if (yytype < YYNTOKENS)
1857 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1869 /*--------------------------------.
1870 | Print this symbol on YYOUTPUT. |
1871 `--------------------------------*/
1873 #if (defined __STDC__ || defined __C99__FUNC__ \
1874 || defined __cplusplus || defined _MSC_VER)
1876 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1879 yy_symbol_print (yyoutput, yytype, yyvaluep)
1882 YYSTYPE const * const yyvaluep;
1885 if (yytype < YYNTOKENS)
1886 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1888 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1890 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1891 YYFPRINTF (yyoutput, ")");
1894 /*------------------------------------------------------------------.
1895 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1897 `------------------------------------------------------------------*/
1899 #if (defined __STDC__ || defined __C99__FUNC__ \
1900 || defined __cplusplus || defined _MSC_VER)
1902 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1905 yy_stack_print (yybottom, yytop)
1906 yytype_int16 *yybottom;
1907 yytype_int16 *yytop;
1910 YYFPRINTF (stderr, "Stack now");
1911 for (; yybottom <= yytop; yybottom++)
1913 int yybot = *yybottom;
1914 YYFPRINTF (stderr, " %d", yybot);
1916 YYFPRINTF (stderr, "\n");
1919 # define YY_STACK_PRINT(Bottom, Top) \
1922 yy_stack_print ((Bottom), (Top)); \
1926 /*------------------------------------------------.
1927 | Report that the YYRULE is going to be reduced. |
1928 `------------------------------------------------*/
1930 #if (defined __STDC__ || defined __C99__FUNC__ \
1931 || defined __cplusplus || defined _MSC_VER)
1933 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1936 yy_reduce_print (yyvsp, yyrule)
1941 int yynrhs = yyr2[yyrule];
1943 unsigned long int yylno = yyrline[yyrule];
1944 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1946 /* The symbols being reduced. */
1947 for (yyi = 0; yyi < yynrhs; yyi++)
1949 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1950 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1951 &(yyvsp[(yyi + 1) - (yynrhs)])
1953 YYFPRINTF (stderr, "\n");
1957 # define YY_REDUCE_PRINT(Rule) \
1960 yy_reduce_print (yyvsp, Rule); \
1963 /* Nonzero means print parse trace. It is left uninitialized so that
1964 multiple parsers can coexist. */
1966 #else /* !YYDEBUG */
1967 # define YYDPRINTF(Args)
1968 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1969 # define YY_STACK_PRINT(Bottom, Top)
1970 # define YY_REDUCE_PRINT(Rule)
1971 #endif /* !YYDEBUG */
1974 /* YYINITDEPTH -- initial size of the parser's stacks. */
1976 # define YYINITDEPTH 200
1979 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1980 if the built-in stack extension method is used).
1982 Do not make this value too large; the results are undefined if
1983 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1984 evaluated with infinite-precision integer arithmetic. */
1987 # define YYMAXDEPTH 10000
1994 # if defined __GLIBC__ && defined _STRING_H
1995 # define yystrlen strlen
1997 /* Return the length of YYSTR. */
1998 #if (defined __STDC__ || defined __C99__FUNC__ \
1999 || defined __cplusplus || defined _MSC_VER)
2001 yystrlen (const char *yystr)
2009 for (yylen = 0; yystr[yylen]; yylen++)
2017 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2018 # define yystpcpy stpcpy
2020 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2022 #if (defined __STDC__ || defined __C99__FUNC__ \
2023 || defined __cplusplus || defined _MSC_VER)
2025 yystpcpy (char *yydest, const char *yysrc)
2028 yystpcpy (yydest, yysrc)
2034 const char *yys = yysrc;
2036 while ((*yyd++ = *yys++) != '\0')
2045 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2046 quotes and backslashes, so that it's suitable for yyerror. The
2047 heuristic is that double-quoting is unnecessary unless the string
2048 contains an apostrophe, a comma, or backslash (other than
2049 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2050 null, do not copy; instead, return the length of what the result
2053 yytnamerr (char *yyres, const char *yystr)
2058 char const *yyp = yystr;
2065 goto do_not_strip_quotes;
2069 goto do_not_strip_quotes;
2082 do_not_strip_quotes: ;
2086 return yystrlen (yystr);
2088 return yystpcpy (yyres, yystr) - yyres;
2092 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
2093 about the unexpected token YYTOKEN for the state stack whose top is
2096 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
2097 not large enough to hold the message. In that case, also set
2098 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
2099 required number of bytes is too large to store. */
2101 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
2102 yytype_int16 *yyssp, int yytoken)
2104 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
2105 YYSIZE_T yysize = yysize0;
2106 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2107 /* Internationalized format string. */
2108 const char *yyformat = YY_NULL;
2109 /* Arguments of yyformat. */
2110 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2111 /* Number of reported tokens (one for the "unexpected", one per
2115 /* There are many possibilities here to consider:
2116 - Assume YYFAIL is not used. It's too flawed to consider. See
2117 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
2118 for details. YYERROR is fine as it does not invoke this
2120 - If this state is a consistent state with a default action, then
2121 the only way this function was invoked is if the default action
2122 is an error action. In that case, don't check for expected
2123 tokens because there are none.
2124 - The only way there can be no lookahead present (in yychar) is if
2125 this state is a consistent state with a default action. Thus,
2126 detecting the absence of a lookahead is sufficient to determine
2127 that there is no unexpected or expected token to report. In that
2128 case, just report a simple "syntax error".
2129 - Don't assume there isn't a lookahead just because this state is a
2130 consistent state with a default action. There might have been a
2131 previous inconsistent state, consistent state with a non-default
2132 action, or user semantic action that manipulated yychar.
2133 - Of course, the expected token list depends on states to have
2134 correct lookahead information, and it depends on the parser not
2135 to perform extra reductions after fetching a lookahead from the
2136 scanner and before detecting a syntax error. Thus, state merging
2137 (from LALR or IELR) and default reductions corrupt the expected
2138 token list. However, the list is correct for canonical LR with
2139 one exception: it will still contain any token that will not be
2140 accepted due to an error action in a later state.
2142 if (yytoken != YYEMPTY)
2144 int yyn = yypact[*yyssp];
2145 yyarg[yycount++] = yytname[yytoken];
2146 if (!yypact_value_is_default (yyn))
2148 /* Start YYX at -YYN if negative to avoid negative indexes in
2149 YYCHECK. In other words, skip the first -YYN actions for
2150 this state because they are default actions. */
2151 int yyxbegin = yyn < 0 ? -yyn : 0;
2152 /* Stay within bounds of both yycheck and yytname. */
2153 int yychecklim = YYLAST - yyn + 1;
2154 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2157 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2158 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
2159 && !yytable_value_is_error (yytable[yyx + yyn]))
2161 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2167 yyarg[yycount++] = yytname[yyx];
2169 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
2170 if (! (yysize <= yysize1
2171 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2181 # define YYCASE_(N, S) \
2185 YYCASE_(0, YY_("syntax error"));
2186 YYCASE_(1, YY_("syntax error, unexpected %s"));
2187 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2188 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2189 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2190 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2195 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
2196 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2201 if (*yymsg_alloc < yysize)
2203 *yymsg_alloc = 2 * yysize;
2204 if (! (yysize <= *yymsg_alloc
2205 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2206 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2210 /* Avoid sprintf, as that infringes on the user's name space.
2211 Don't have undefined behavior even if the translation
2212 produced a string with the wrong number of "%s"s. */
2216 while ((*yyp = *yyformat) != '\0')
2217 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2219 yyp += yytnamerr (yyp, yyarg[yyi++]);
2230 #endif /* YYERROR_VERBOSE */
2232 /*-----------------------------------------------.
2233 | Release the memory associated to this symbol. |
2234 `-----------------------------------------------*/
2237 #if (defined __STDC__ || defined __C99__FUNC__ \
2238 || defined __cplusplus || defined _MSC_VER)
2240 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2243 yydestruct (yymsg, yytype, yyvaluep)
2253 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2266 /* The lookahead symbol. */
2270 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2271 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2272 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
2274 #ifndef YY_INITIAL_VALUE
2275 # define YY_INITIAL_VALUE(Value) /* Nothing. */
2278 /* The semantic value of the lookahead symbol. */
2279 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
2281 /* Number of syntax errors so far. */
2289 #ifdef YYPARSE_PARAM
2290 #if (defined __STDC__ || defined __C99__FUNC__ \
2291 || defined __cplusplus || defined _MSC_VER)
2293 yyparse (void *YYPARSE_PARAM)
2296 yyparse (YYPARSE_PARAM)
2297 void *YYPARSE_PARAM;
2299 #else /* ! YYPARSE_PARAM */
2300 #if (defined __STDC__ || defined __C99__FUNC__ \
2301 || defined __cplusplus || defined _MSC_VER)
2312 /* Number of tokens to shift before error messages enabled. */
2315 /* The stacks and their tools:
2316 `yyss': related to states.
2317 `yyvs': related to semantic values.
2319 Refer to the stacks through separate pointers, to allow yyoverflow
2320 to reallocate them elsewhere. */
2322 /* The state stack. */
2323 yytype_int16 yyssa[YYINITDEPTH];
2325 yytype_int16 *yyssp;
2327 /* The semantic value stack. */
2328 YYSTYPE yyvsa[YYINITDEPTH];
2332 YYSIZE_T yystacksize;
2336 /* Lookahead token as an internal (translated) token number. */
2338 /* The variables used to return semantic value and location from the
2343 /* Buffer for error messages, and its allocated size. */
2345 char *yymsg = yymsgbuf;
2346 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2349 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2351 /* The number of symbols on the RHS of the reduced rule.
2352 Keep to zero when no symbol should be popped. */
2355 yyssp = yyss = yyssa;
2356 yyvsp = yyvs = yyvsa;
2357 yystacksize = YYINITDEPTH;
2359 YYDPRINTF ((stderr, "Starting parse\n"));
2364 yychar = YYEMPTY; /* Cause a token to be read. */
2367 /*------------------------------------------------------------.
2368 | yynewstate -- Push a new state, which is found in yystate. |
2369 `------------------------------------------------------------*/
2371 /* In all cases, when you get here, the value and location stacks
2372 have just been pushed. So pushing a state here evens the stacks. */
2378 if (yyss + yystacksize - 1 <= yyssp)
2380 /* Get the current used size of the three stacks, in elements. */
2381 YYSIZE_T yysize = yyssp - yyss + 1;
2385 /* Give user a chance to reallocate the stack. Use copies of
2386 these so that the &'s don't force the real ones into
2388 YYSTYPE *yyvs1 = yyvs;
2389 yytype_int16 *yyss1 = yyss;
2391 /* Each stack pointer address is followed by the size of the
2392 data in use in that stack, in bytes. This used to be a
2393 conditional around just the two extra args, but that might
2394 be undefined if yyoverflow is a macro. */
2395 yyoverflow (YY_("memory exhausted"),
2396 &yyss1, yysize * sizeof (*yyssp),
2397 &yyvs1, yysize * sizeof (*yyvsp),
2403 #else /* no yyoverflow */
2404 # ifndef YYSTACK_RELOCATE
2405 goto yyexhaustedlab;
2407 /* Extend the stack our own way. */
2408 if (YYMAXDEPTH <= yystacksize)
2409 goto yyexhaustedlab;
2411 if (YYMAXDEPTH < yystacksize)
2412 yystacksize = YYMAXDEPTH;
2415 yytype_int16 *yyss1 = yyss;
2416 union yyalloc *yyptr =
2417 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2419 goto yyexhaustedlab;
2420 YYSTACK_RELOCATE (yyss_alloc, yyss);
2421 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2422 # undef YYSTACK_RELOCATE
2424 YYSTACK_FREE (yyss1);
2427 #endif /* no yyoverflow */
2429 yyssp = yyss + yysize - 1;
2430 yyvsp = yyvs + yysize - 1;
2432 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2433 (unsigned long int) yystacksize));
2435 if (yyss + yystacksize - 1 <= yyssp)
2439 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2441 if (yystate == YYFINAL)
2451 /* Do appropriate processing given the current state. Read a
2452 lookahead token if we need one and don't already have one. */
2454 /* First try to decide what to do without reference to lookahead token. */
2455 yyn = yypact[yystate];
2456 if (yypact_value_is_default (yyn))
2459 /* Not known => get a lookahead token if don't already have one. */
2461 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2462 if (yychar == YYEMPTY)
2464 YYDPRINTF ((stderr, "Reading a token: "));
2468 if (yychar <= YYEOF)
2470 yychar = yytoken = YYEOF;
2471 YYDPRINTF ((stderr, "Now at end of input.\n"));
2475 yytoken = YYTRANSLATE (yychar);
2476 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2479 /* If the proper action on seeing token YYTOKEN is to reduce or to
2480 detect an error, take that action. */
2482 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2487 if (yytable_value_is_error (yyn))
2493 /* Count tokens shifted since error; after three, turn off error
2498 /* Shift the lookahead token. */
2499 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2501 /* Discard the shifted token. */
2505 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2507 YY_IGNORE_MAYBE_UNINITIALIZED_END
2512 /*-----------------------------------------------------------.
2513 | yydefault -- do the default action for the current state. |
2514 `-----------------------------------------------------------*/
2516 yyn = yydefact[yystate];
2522 /*-----------------------------.
2523 | yyreduce -- Do a reduction. |
2524 `-----------------------------*/
2526 /* yyn is the number of a rule to reduce with. */
2529 /* If YYLEN is nonzero, implement the default value of the action:
2532 Otherwise, the following line sets YYVAL to garbage.
2533 This behavior is undocumented and Bison
2534 users should not rely upon it. Assigning to YYVAL
2535 unconditionally makes the parser a bit smaller, and it avoids a
2536 GCC warning that YYVAL may be used uninitialized. */
2537 yyval = yyvsp[1-yylen];
2540 YY_REDUCE_PRINT (yyn);
2544 /* Line 1792 of yacc.c */
2550 /* Line 1792 of yacc.c */
2556 /* Line 1792 of yacc.c */
2562 /* Line 1792 of yacc.c */
2568 /* Line 1792 of yacc.c */
2571 Node *node = node_new (CCODE_NODE,
2573 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2574 "line_no", ccode_line,
2576 nodes = g_list_append(nodes,node);
2577 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2582 /* Line 1792 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);
2596 /* Line 1792 of yacc.c */
2599 Node *node = node_new (CCODE_NODE,
2601 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2602 "line_no", ccode_line,
2604 nodes = g_list_append(nodes,node);
2605 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2610 /* Line 1792 of yacc.c */
2613 Node *node = node_new (CCODE_NODE,
2615 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2616 "line_no", ccode_line,
2618 nodes = g_list_append(nodes,node);
2619 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2624 /* Line 1792 of yacc.c */
2627 Node *node = node_new (CCODE_NODE,
2629 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2630 "line_no", ccode_line,
2632 nodes = g_list_append(nodes,node);
2633 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2638 /* Line 1792 of yacc.c */
2641 Node *node = node_new (CCODE_NODE,
2643 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2644 "line_no", ccode_line,
2646 nodes = g_list_append(nodes,node);
2647 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2652 /* Line 1792 of yacc.c */
2655 Node *node = node_new (CCODE_NODE,
2657 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2658 "line_no", ccode_line,
2660 nodes = g_list_append(nodes,node);
2661 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2666 /* Line 1792 of yacc.c */
2669 Node *node = node_new (CCODE_NODE,
2671 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2672 "line_no", ccode_line,
2674 nodes = g_list_append(nodes,node);
2675 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2680 /* Line 1792 of yacc.c */
2686 /* Line 1792 of yacc.c */
2692 /* Line 1792 of yacc.c */
2698 /* Line 1792 of yacc.c */
2704 /* Line 1792 of yacc.c */
2710 /* Line 1792 of yacc.c */
2716 /* Line 1792 of yacc.c */
2722 /* Line 1792 of yacc.c */
2728 /* Line 1792 of yacc.c */
2731 ((Class *)class)->nodes = class_nodes;
2733 nodes = g_list_append(nodes,class);
2738 /* Line 1792 of yacc.c */
2741 ((Class *)class)->nodes = NULL;
2743 nodes = g_list_append(nodes,class);
2748 /* Line 1792 of yacc.c */
2751 class = node_new (CLASS_NODE,
2752 "otype:steal", (yyvsp[(2) - (5)].id),
2753 "ptype:steal", (yyvsp[(4) - (5)].id),
2754 "bonobo_object_class:steal", bonobo_object_class,
2755 "glade_xml", glade_xml,
2756 "interfaces:steal", interfaces,
2757 "chunk_size:steal", chunk_size,
2758 "abstract", abstract,
2760 bonobo_object_class = NULL;
2768 /* Line 1792 of yacc.c */
2771 if(strcmp((yyvsp[(2) - (4)].id),"abstract") == 0) {
2774 yyerror(_("parse error"));
2781 /* Line 1792 of yacc.c */
2784 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2785 g_free (chunk_size);
2786 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2787 } else if(strcmp((yyvsp[(2) - (5)].id),"BonoboObject") == 0) {
2788 g_free (bonobo_object_class);
2789 bonobo_object_class = g_strdup((yyvsp[(3) - (5)].id));
2791 yyerror(_("parse error"));
2798 /* Line 1792 of yacc.c */
2801 if (strcmp ((yyvsp[(2) - (5)].id), "interface") == 0) {
2802 interfaces = g_list_append (interfaces,
2803 g_strdup ((yyvsp[(3) - (5)].id)));
2805 yyerror(_("parse error"));
2812 /* Line 1792 of yacc.c */
2815 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2816 g_free (chunk_size);
2817 if(atoi((yyvsp[(3) - (5)].id)) != 0)
2818 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2822 yyerror(_("parse error"));
2829 /* Line 1792 of yacc.c */
2832 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2834 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2836 yyerror(_("parse error"));
2843 /* Line 1792 of yacc.c */
2846 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2848 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2850 yyerror(_("parse error"));
2857 /* Line 1792 of yacc.c */
2860 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2862 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2864 yyerror(_("parse error"));
2871 /* Line 1792 of yacc.c */
2874 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2876 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2878 yyerror(_("parse error"));
2885 /* Line 1792 of yacc.c */
2891 /* Line 1792 of yacc.c */
2897 /* Line 1792 of yacc.c */
2903 /* Line 1792 of yacc.c */
2906 if (strcmp ((yyvsp[(1) - (2)].id), "BonoboObject") != 0) {
2907 g_free ((yyvsp[(1) - (2)].id));
2908 yyerror (_("parse error"));
2911 g_free ((yyvsp[(1) - (2)].id));
2912 last_added_method->bonobo_object_func = TRUE;
2917 /* Line 1792 of yacc.c */
2920 if (strcmp ((yyvsp[(1) - (3)].id), "interface") != 0) {
2921 g_free ((yyvsp[(1) - (3)].id));
2922 g_free ((yyvsp[(2) - (3)].id));
2923 yyerror (_("parse error"));
2926 g_free ((yyvsp[(1) - (3)].id));
2927 node_set ((Node *)last_added_method,
2928 "interface:steal", (yyvsp[(2) - (3)].id),
2934 /* Line 1792 of yacc.c */
2940 /* Line 1792 of yacc.c */
2946 /* Line 1792 of yacc.c */
2952 /* Line 1792 of yacc.c */
2958 /* Line 1792 of yacc.c */
2960 { the_scope = PUBLIC_SCOPE; }
2964 /* Line 1792 of yacc.c */
2966 { the_scope = PRIVATE_SCOPE; }
2970 /* Line 1792 of yacc.c */
2972 { the_scope = PROTECTED_SCOPE; }
2976 /* Line 1792 of yacc.c */
2978 { the_scope = CLASS_SCOPE; }
2982 /* Line 1792 of yacc.c */
2985 if (strcmp ((yyvsp[(1) - (2)].id), "destroywith") == 0) {
2986 g_free ((yyvsp[(1) - (2)].id));
2987 destructor_unref = FALSE;
2988 destructor = (yyvsp[(2) - (2)].id);
2989 destructor_line = line_no;
2990 destructor_simple = TRUE;
2991 } else if (strcmp ((yyvsp[(1) - (2)].id), "unrefwith") == 0) {
2992 g_free ((yyvsp[(1) - (2)].id));
2993 destructor_unref = TRUE;
2994 destructor = (yyvsp[(2) - (2)].id);
2995 destructor_line = line_no;
2996 destructor_simple = TRUE;
2998 g_free ((yyvsp[(1) - (2)].id));
2999 g_free ((yyvsp[(2) - (2)].id));
3000 yyerror (_("parse error"));
3007 /* Line 1792 of yacc.c */
3010 if (strcmp ((yyvsp[(1) - (3)].id), "destroy") == 0) {
3011 g_free((yyvsp[(1) - (3)].id));
3012 destructor_unref = FALSE;
3013 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3014 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3015 destructor_line = ccode_line;
3016 destructor_simple = FALSE;
3017 } else if (strcmp ((yyvsp[(1) - (3)].id), "unref") == 0) {
3018 g_free ((yyvsp[(1) - (3)].id));
3019 destructor_unref = TRUE;
3020 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3021 g_string_free ((yyvsp[(3) - (3)].cbuf), FALSE);
3022 destructor_line = ccode_line;
3023 destructor_simple = FALSE;
3025 g_free ((yyvsp[(1) - (3)].id));
3026 g_string_free ((yyvsp[(3) - (3)].cbuf), TRUE);
3027 yyerror (_("parse error"));
3034 /* Line 1792 of yacc.c */
3037 initializer = (yyvsp[(2) - (2)].id);
3038 initializer_line = ccode_line;
3043 /* Line 1792 of yacc.c */
3046 initializer = ((yyvsp[(3) - (3)].cbuf))->str;
3047 initializer_line = ccode_line;
3048 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3053 /* Line 1792 of yacc.c */
3054 #line 1006 "parse.y"
3059 /* Line 1792 of yacc.c */
3060 #line 1007 "parse.y"
3065 /* Line 1792 of yacc.c */
3066 #line 1008 "parse.y"
3067 { destructor = NULL; }
3071 /* Line 1792 of yacc.c */
3072 #line 1009 "parse.y"
3073 { initializer = NULL; }
3077 /* Line 1792 of yacc.c */
3078 #line 1010 "parse.y"
3080 if (strcmp ((yyvsp[(1) - (1)].id), "GladeXML") == 0) {
3081 glade_widget = TRUE;
3083 yyerror(_("parse error"));
3090 /* Line 1792 of yacc.c */
3091 #line 1018 "parse.y"
3099 /* Line 1792 of yacc.c */
3100 #line 1024 "parse.y"
3102 push_variable((yyvsp[(3) - (5)].id), the_scope,(yyvsp[(1) - (5)].line), NULL);
3107 /* Line 1792 of yacc.c */
3108 #line 1027 "parse.y"
3110 push_variable((yyvsp[(3) - (6)].id), the_scope, (yyvsp[(1) - (6)].line), (yyvsp[(4) - (6)].id));
3115 /* Line 1792 of yacc.c */
3116 #line 1032 "parse.y"
3119 if(strcmp((yyvsp[(6) - (12)].id),"get")==0 &&
3120 strcmp((yyvsp[(9) - (12)].id),"set")==0) {
3121 Type *type = pop_type();
3122 g_free ((yyvsp[(6) - (12)].id));
3123 g_free ((yyvsp[(9) - (12)].id));
3124 node = node_new (ARGUMENT_NODE,
3125 "gtktype:steal", (yyvsp[(3) - (12)].id),
3126 "atype:steal", type,
3127 "flags:steal", (yyvsp[(2) - (12)].list),
3128 "name:steal", (yyvsp[(4) - (12)].id),
3129 "get:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3130 "get_line", (yyvsp[(7) - (12)].line),
3131 "set:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3132 "set_line", (yyvsp[(10) - (12)].line),
3133 "line_no", (yyvsp[(1) - (12)].line),
3136 class_nodes = g_list_append(class_nodes,node);
3138 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3139 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3141 } else if(strcmp((yyvsp[(6) - (12)].id),"set")==0 &&
3142 strcmp((yyvsp[(9) - (12)].id),"get")==0) {
3143 Type *type = pop_type();
3144 g_free ((yyvsp[(6) - (12)].id));
3145 g_free ((yyvsp[(9) - (12)].id));
3146 node = node_new (ARGUMENT_NODE,
3147 "gtktype:steal", (yyvsp[(3) - (12)].id),
3148 "atype:steal", type,
3149 "flags:steal", (yyvsp[(2) - (12)].list),
3150 "name:steal", (yyvsp[(4) - (12)].id),
3151 "get:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3152 "get_line", (yyvsp[(10) - (12)].line),
3153 "set:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3154 "set_line", (yyvsp[(7) - (12)].line),
3155 "line_no", (yyvsp[(1) - (12)].line),
3157 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3158 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3159 class_nodes = g_list_append(class_nodes,node);
3161 g_free ((yyvsp[(3) - (12)].id));
3162 g_free ((yyvsp[(4) - (12)].id));
3163 g_free ((yyvsp[(6) - (12)].id));
3164 g_free ((yyvsp[(9) - (12)].id));
3165 g_list_foreach ((yyvsp[(2) - (12)].list), (GFunc)g_free, NULL);
3166 g_list_free ((yyvsp[(2) - (12)].list));
3167 g_string_free ((yyvsp[(11) - (12)].cbuf), TRUE);
3168 g_string_free ((yyvsp[(8) - (12)].cbuf), TRUE);
3169 yyerror (_("parse error"));
3173 if ((yyvsp[(5) - (12)].id) != NULL) {
3174 Argument *arg = (Argument *)node;
3175 export_accessors (arg->name,
3176 arg->get != NULL, arg->get_line,
3177 arg->set != NULL, arg->set_line,
3181 g_free ((yyvsp[(5) - (12)].id));
3188 /* Line 1792 of yacc.c */
3189 #line 1100 "parse.y"
3192 if(strcmp((yyvsp[(6) - (9)].id), "get") == 0) {
3193 Type *type = pop_type();
3194 g_free ((yyvsp[(6) - (9)].id));
3195 node = node_new (ARGUMENT_NODE,
3196 "gtktype:steal", (yyvsp[(3) - (9)].id),
3197 "atype:steal", type,
3198 "flags:steal", (yyvsp[(2) - (9)].list),
3199 "name:steal", (yyvsp[(4) - (9)].id),
3200 "get:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3201 "get_line", (yyvsp[(7) - (9)].line),
3202 "line_no", (yyvsp[(1) - (9)].line),
3205 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3206 class_nodes = g_list_append(class_nodes, node);
3207 } else if(strcmp((yyvsp[(6) - (9)].id), "set") == 0) {
3208 Type *type = pop_type();
3209 g_free ((yyvsp[(6) - (9)].id));
3210 node = node_new (ARGUMENT_NODE,
3211 "gtktype:steal", (yyvsp[(3) - (9)].id),
3212 "atype:steal", type,
3213 "flags:steal", (yyvsp[(2) - (9)].list),
3214 "name:steal", (yyvsp[(4) - (9)].id),
3215 "set:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3216 "set_line", (yyvsp[(7) - (9)].line),
3217 "line_no", (yyvsp[(1) - (9)].line),
3220 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3221 class_nodes = g_list_append (class_nodes, node);
3223 g_free ((yyvsp[(6) - (9)].id));
3224 g_free ((yyvsp[(3) - (9)].id));
3225 g_free ((yyvsp[(4) - (9)].id));
3226 g_list_foreach ((yyvsp[(2) - (9)].list), (GFunc)g_free, NULL);
3227 g_list_free ((yyvsp[(2) - (9)].list));
3228 g_string_free ((yyvsp[(8) - (9)].cbuf), TRUE);
3229 yyerror(_("parse error"));
3233 if ((yyvsp[(5) - (9)].id) != NULL) {
3234 Argument *arg = (Argument *)node;
3235 export_accessors (arg->name,
3236 arg->get != NULL, arg->get_line,
3237 arg->set != NULL, arg->set_line,
3241 g_free ((yyvsp[(5) - (9)].id));
3247 /* Line 1792 of yacc.c */
3248 #line 1154 "parse.y"
3251 char *get, *set = NULL;
3256 if(strcmp((yyvsp[(6) - (6)].id), "link")!=0 &&
3257 strcmp((yyvsp[(6) - (6)].id), "stringlink")!=0 &&
3258 strcmp((yyvsp[(6) - (6)].id), "objectlink")!=0) {
3259 g_free((yyvsp[(6) - (6)].id));
3260 g_free((yyvsp[(3) - (6)].id));
3261 g_free((yyvsp[(4) - (6)].id));
3262 g_list_foreach((yyvsp[(2) - (6)].list),(GFunc)g_free,NULL);
3263 g_list_free((yyvsp[(2) - (6)].list));
3264 yyerror(_("parse error"));
3270 var = find_var_or_die((yyvsp[(4) - (6)].id), (yyvsp[(1) - (6)].line));
3271 if(var->scope == PRIVATE_SCOPE) {
3272 root = "self->_priv";
3273 } else if(var->scope == CLASS_SCOPE) {
3274 root = "SELF_GET_CLASS(self)";
3276 error_print(GOB_ERROR, (yyvsp[(1) - (6)].line),
3277 _("Self aliases needed when autolinking to a classwide member"));
3282 if(strcmp((yyvsp[(6) - (6)].id), "link")==0) {
3283 set = g_strdup_printf("%s->%s = ARG;",
3284 root, (yyvsp[(4) - (6)].id));
3285 } else if(strcmp((yyvsp[(6) - (6)].id), "stringlink")==0) {
3286 set = g_strdup_printf("g_free (%s->%s); "
3287 "%s->%s = g_strdup (ARG);",
3288 root, (yyvsp[(4) - (6)].id),
3289 root, (yyvsp[(4) - (6)].id));
3290 } else if(strcmp((yyvsp[(6) - (6)].id), "objectlink")==0) {
3291 set = g_strdup_printf(
3293 "g_object_ref (G_OBJECT (ARG)); "
3294 "if (%s->%s != NULL) "
3295 "g_object_unref (G_OBJECT (%s->%s)); "
3297 root, (yyvsp[(4) - (6)].id),
3298 root, (yyvsp[(4) - (6)].id),
3299 root, (yyvsp[(4) - (6)].id));
3301 g_assert_not_reached();
3304 get = g_strdup_printf("ARG = %s->%s;", root, (yyvsp[(4) - (6)].id));
3306 g_free ((yyvsp[(6) - (6)].id));
3309 type = (Type *)node_copy ((Node *)var->vtype);
3311 node = node_new (ARGUMENT_NODE,
3312 "gtktype:steal", (yyvsp[(3) - (6)].id),
3313 "atype:steal", type,
3314 "flags:steal", (yyvsp[(2) - (6)].list),
3315 "name:steal", (yyvsp[(4) - (6)].id),
3317 "get_line", (yyvsp[(1) - (6)].line),
3319 "set_line", (yyvsp[(1) - (6)].line),
3320 "line_no", (yyvsp[(1) - (6)].line),
3323 if ((yyvsp[(5) - (6)].id) != NULL) {
3324 Argument *arg = (Argument *)node;
3325 export_accessors (arg->name,
3326 arg->get != NULL, arg->get_line,
3327 arg->set != NULL, arg->set_line,
3331 g_free ((yyvsp[(5) - (6)].id));
3334 class_nodes = g_list_append (class_nodes, node);
3339 /* Line 1792 of yacc.c */
3340 #line 1243 "parse.y"
3342 if (strcmp ((yyvsp[(2) - (3)].id), "export")!=0) {
3343 g_free ((yyvsp[(2) - (3)].id));
3344 yyerror (_("parse error"));
3347 (yyval.id) = (yyvsp[(2) - (3)].id);
3352 /* Line 1792 of yacc.c */
3353 #line 1251 "parse.y"
3360 /* Line 1792 of yacc.c */
3361 #line 1256 "parse.y"
3364 node_set ((Node *)property,
3365 "line_no", (yyvsp[(1) - (11)].line),
3366 "gtktype:steal", debool ((yyvsp[(2) - (11)].id)),
3367 "name:steal", (yyvsp[(3) - (11)].id),
3369 if (strcmp ((yyvsp[(5) - (11)].id), "get") == 0 &&
3370 strcmp ((yyvsp[(8) - (11)].id), "set") == 0) {
3371 node_set ((Node *)property,
3372 "get:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3373 "get_line", (yyvsp[(6) - (11)].line),
3374 "set:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3375 "set_line", (yyvsp[(9) - (11)].line),
3377 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3378 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3379 g_free ((yyvsp[(5) - (11)].id));
3380 g_free ((yyvsp[(8) - (11)].id));
3381 } else if (strcmp ((yyvsp[(5) - (11)].id), "set") == 0 &&
3382 strcmp ((yyvsp[(8) - (11)].id), "get") == 0) {
3383 node_set ((Node *)property,
3384 "get:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3385 "get_line", (yyvsp[(9) - (11)].line),
3386 "set:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3387 "set_line", (yyvsp[(6) - (11)].line),
3389 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3390 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3391 g_free ((yyvsp[(5) - (11)].id));
3392 g_free ((yyvsp[(8) - (11)].id));
3394 g_string_free ((yyvsp[(7) - (11)].cbuf), TRUE);
3395 g_string_free ((yyvsp[(10) - (11)].cbuf), TRUE);
3396 g_free ((yyvsp[(5) - (11)].id));
3397 g_free ((yyvsp[(8) - (11)].id));
3398 node_free ((Node *)property);
3400 yyerror (_("parse error"));
3403 property_link_and_export ((Node *)property);
3404 if (property != NULL) {
3405 class_nodes = g_list_append (class_nodes,
3413 /* Line 1792 of yacc.c */
3414 #line 1304 "parse.y"
3417 node_set ((Node *)property,
3418 "line_no", (yyvsp[(1) - (8)].line),
3419 "gtktype:steal", debool ((yyvsp[(2) - (8)].id)),
3420 "name:steal", (yyvsp[(3) - (8)].id),
3422 if (strcmp ((yyvsp[(5) - (8)].id), "get") == 0) {
3423 node_set ((Node *)property,
3424 "get:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3425 "get_line", (yyvsp[(6) - (8)].line),
3427 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3428 g_free ((yyvsp[(5) - (8)].id));
3429 } else if (strcmp ((yyvsp[(5) - (8)].id), "set") == 0) {
3430 node_set ((Node *)property,
3431 "set:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3432 "set_line", (yyvsp[(6) - (8)].line),
3434 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3435 g_free ((yyvsp[(5) - (8)].id));
3437 g_string_free ((yyvsp[(7) - (8)].cbuf), TRUE);
3438 g_free ((yyvsp[(5) - (8)].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,
3454 /* Line 1792 of yacc.c */
3455 #line 1340 "parse.y"
3458 node_set ((Node *)property,
3459 "line_no", (yyvsp[(1) - (5)].line),
3460 "gtktype:steal", debool ((yyvsp[(2) - (5)].id)),
3461 "name:steal", (yyvsp[(3) - (5)].id),
3463 property_link_and_export ((Node *)property);
3464 if (property != NULL) {
3465 class_nodes = g_list_append (class_nodes,
3473 /* Line 1792 of yacc.c */
3474 #line 1356 "parse.y"
3479 /* Line 1792 of yacc.c */
3480 #line 1357 "parse.y"
3485 /* Line 1792 of yacc.c */
3486 #line 1360 "parse.y"
3491 /* Line 1792 of yacc.c */
3492 #line 1361 "parse.y"
3497 /* Line 1792 of yacc.c */
3498 #line 1364 "parse.y"
3499 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3503 /* Line 1792 of yacc.c */
3504 #line 1365 "parse.y"
3506 if (strcmp ((yyvsp[(1) - (4)].id), "_") != 0) {
3507 g_free ((yyvsp[(1) - (4)].id));
3508 yyerror(_("parse error"));
3511 g_free ((yyvsp[(1) - (4)].id));
3512 (yyval.id) = g_strconcat ("_(", (yyvsp[(3) - (4)].id), ")", NULL);
3513 g_free ((yyvsp[(3) - (4)].id));
3518 /* Line 1792 of yacc.c */
3519 #line 1377 "parse.y"
3520 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3524 /* Line 1792 of yacc.c */
3525 #line 1378 "parse.y"
3526 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3530 /* Line 1792 of yacc.c */
3531 #line 1381 "parse.y"
3534 node_set ((Node *)property,
3535 "canonical_name:steal", gob_str_delete_quotes((yyvsp[(3) - (3)].id)),
3541 /* Line 1792 of yacc.c */
3542 #line 1387 "parse.y"
3545 node_set ((Node *)property,
3546 "nick:steal", (yyvsp[(3) - (3)].id),
3552 /* Line 1792 of yacc.c */
3553 #line 1393 "parse.y"
3556 node_set ((Node *)property,
3557 "blurb:steal", (yyvsp[(3) - (3)].id),
3563 /* Line 1792 of yacc.c */
3564 #line 1399 "parse.y"
3567 node_set ((Node *)property,
3568 "maximum:steal", (yyvsp[(3) - (3)].id),
3574 /* Line 1792 of yacc.c */
3575 #line 1405 "parse.y"
3578 node_set ((Node *)property,
3579 "minimum:steal", (yyvsp[(3) - (3)].id),
3585 /* Line 1792 of yacc.c */
3586 #line 1411 "parse.y"
3589 node_set ((Node *)property,
3590 "default_value:steal", (yyvsp[(3) - (3)].id),
3596 /* Line 1792 of yacc.c */
3597 #line 1417 "parse.y"
3600 node_set ((Node *)property,
3601 "flags:steal", (yyvsp[(3) - (3)].list),
3607 /* Line 1792 of yacc.c */
3608 #line 1423 "parse.y"
3610 Type *type = pop_type ();
3612 node_set ((Node *)property,
3613 "ptype:steal", type,
3619 /* Line 1792 of yacc.c */
3620 #line 1430 "parse.y"
3623 node_set ((Node *)property,
3624 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3630 /* Line 1792 of yacc.c */
3631 #line 1436 "parse.y"
3634 node_set ((Node *)property,
3635 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3641 /* Line 1792 of yacc.c */
3642 #line 1442 "parse.y"
3645 node_set ((Node *)property,
3646 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3652 /* Line 1792 of yacc.c */
3653 #line 1448 "parse.y"
3656 node_set ((Node *)property,
3657 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3663 /* Line 1792 of yacc.c */
3664 #line 1454 "parse.y"
3667 node_set ((Node *)property,
3668 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3674 /* Line 1792 of yacc.c */
3675 #line 1460 "parse.y"
3678 node_set ((Node *)property,
3679 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3685 /* Line 1792 of yacc.c */
3686 #line 1466 "parse.y"
3689 node_set ((Node *)property,
3690 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3696 /* Line 1792 of yacc.c */
3697 #line 1472 "parse.y"
3700 node_set ((Node *)property,
3701 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3707 /* Line 1792 of yacc.c */
3708 #line 1478 "parse.y"
3711 node_set ((Node *)property,
3712 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3718 /* Line 1792 of yacc.c */
3719 #line 1484 "parse.y"
3722 node_set ((Node *)property,
3723 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3729 /* Line 1792 of yacc.c */
3730 #line 1490 "parse.y"
3733 if (strcmp ((yyvsp[(1) - (1)].id), "override") == 0) {
3734 g_free((yyvsp[(1) - (1)].id));
3735 node_set ((Node *)property,
3738 } else if (strcmp ((yyvsp[(1) - (1)].id), "link") == 0) {
3739 g_free((yyvsp[(1) - (1)].id));
3740 node_set ((Node *)property,
3743 } else if (strcmp ((yyvsp[(1) - (1)].id), "export") == 0) {
3744 g_free((yyvsp[(1) - (1)].id));
3745 node_set ((Node *)property,
3749 g_free((yyvsp[(1) - (1)].id));
3750 yyerror(_("parse error"));
3757 /* Line 1792 of yacc.c */
3758 #line 1515 "parse.y"
3760 if(strcmp((yyvsp[(3) - (5)].id),"type")!=0) {
3761 g_free((yyvsp[(1) - (5)].id));
3762 g_free((yyvsp[(3) - (5)].id));
3763 yyerror(_("parse error"));
3766 (yyval.id) = debool ((yyvsp[(1) - (5)].id));
3771 /* Line 1792 of yacc.c */
3772 #line 1524 "parse.y"
3774 (yyval.id) = debool ((yyvsp[(1) - (1)].id));
3775 typestack = g_list_prepend(typestack,NULL);
3780 /* Line 1792 of yacc.c */
3781 #line 1530 "parse.y"
3782 { (yyval.list) = (yyvsp[(2) - (3)].list); }
3786 /* Line 1792 of yacc.c */
3787 #line 1531 "parse.y"
3788 { (yyval.list) = NULL; }
3792 /* Line 1792 of yacc.c */
3793 #line 1534 "parse.y"
3795 (yyval.list) = g_list_append((yyvsp[(3) - (3)].list),(yyvsp[(1) - (3)].id));
3800 /* Line 1792 of yacc.c */
3801 #line 1537 "parse.y"
3803 (yyval.list) = g_list_append(NULL,(yyvsp[(1) - (1)].id));
3808 /* Line 1792 of yacc.c */
3809 #line 1543 "parse.y"
3811 Node *node = node_new (TYPE_NODE,
3812 "name:steal", (yyvsp[(1) - (2)].id),
3813 "pointer:steal", (yyvsp[(2) - (2)].id),
3815 typestack = g_list_prepend(typestack,node);
3820 /* Line 1792 of yacc.c */
3821 #line 1550 "parse.y"
3823 Node *node = node_new (TYPE_NODE,
3824 "name:steal", (yyvsp[(1) - (1)].id),
3826 typestack = g_list_prepend(typestack,node);
3831 /* Line 1792 of yacc.c */
3832 #line 1559 "parse.y"
3834 (yyval.id) = (yyvsp[(1) - (1)].id);
3839 /* Line 1792 of yacc.c */
3840 #line 1562 "parse.y"
3842 (yyval.id) = (yyvsp[(1) - (1)].id);
3847 /* Line 1792 of yacc.c */
3848 #line 1565 "parse.y"
3850 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3851 g_free((yyvsp[(2) - (2)].id));
3856 /* Line 1792 of yacc.c */
3857 #line 1569 "parse.y"
3859 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3860 g_free((yyvsp[(1) - (2)].id));
3865 /* Line 1792 of yacc.c */
3866 #line 1573 "parse.y"
3868 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3869 g_free((yyvsp[(2) - (2)].id));
3874 /* Line 1792 of yacc.c */
3875 #line 1577 "parse.y"
3877 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (3)].id), " ",
3878 (yyvsp[(3) - (3)].id), NULL);
3879 g_free((yyvsp[(3) - (3)].id));
3884 /* Line 1792 of yacc.c */
3885 #line 1582 "parse.y"
3887 (yyval.id) = g_strconcat((yyvsp[(1) - (3)].id), " ",
3888 (yyvsp[(2) - (3)].id), " const", NULL);
3889 g_free((yyvsp[(2) - (3)].id));
3894 /* Line 1792 of yacc.c */
3895 #line 1590 "parse.y"
3897 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3898 g_free((yyvsp[(2) - (2)].id));
3903 /* Line 1792 of yacc.c */
3904 #line 1594 "parse.y"
3906 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3907 g_free((yyvsp[(1) - (2)].id));
3908 g_free((yyvsp[(2) - (2)].id));
3913 /* Line 1792 of yacc.c */
3914 #line 1599 "parse.y"
3916 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3917 g_free((yyvsp[(2) - (2)].id));
3922 /* Line 1792 of yacc.c */
3923 #line 1603 "parse.y"
3925 (yyval.id) = (yyvsp[(1) - (1)].id);
3930 /* Line 1792 of yacc.c */
3931 #line 1606 "parse.y"
3933 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3934 g_free((yyvsp[(1) - (2)].id));
3939 /* Line 1792 of yacc.c */
3940 #line 1610 "parse.y"
3942 (yyval.id) = g_strdup((yyvsp[(1) - (1)].id));
3947 /* Line 1792 of yacc.c */
3948 #line 1613 "parse.y"
3950 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3955 /* Line 1792 of yacc.c */
3956 #line 1618 "parse.y"
3957 { (yyval.id) = "void"; }
3961 /* Line 1792 of yacc.c */
3962 #line 1619 "parse.y"
3963 { (yyval.id) = "char"; }
3967 /* Line 1792 of yacc.c */
3968 #line 1620 "parse.y"
3969 { (yyval.id) = "short"; }
3973 /* Line 1792 of yacc.c */
3974 #line 1621 "parse.y"
3975 { (yyval.id) = "int"; }
3979 /* Line 1792 of yacc.c */
3980 #line 1622 "parse.y"
3981 { (yyval.id) = "long"; }
3985 /* Line 1792 of yacc.c */
3986 #line 1623 "parse.y"
3987 { (yyval.id) = "float"; }
3991 /* Line 1792 of yacc.c */
3992 #line 1624 "parse.y"
3993 { (yyval.id) = "double"; }
3997 /* Line 1792 of yacc.c */
3998 #line 1625 "parse.y"
3999 { (yyval.id) = "signed"; }
4003 /* Line 1792 of yacc.c */
4004 #line 1626 "parse.y"
4005 { (yyval.id) = "unsigned"; }
4009 /* Line 1792 of yacc.c */
4010 #line 1629 "parse.y"
4011 { (yyval.id) = "struct"; }
4015 /* Line 1792 of yacc.c */
4016 #line 1630 "parse.y"
4017 { (yyval.id) = "union"; }
4021 /* Line 1792 of yacc.c */
4022 #line 1631 "parse.y"
4023 { (yyval.id) = "enum"; }
4027 /* Line 1792 of yacc.c */
4028 #line 1634 "parse.y"
4029 { (yyval.id) = g_strdup("*"); }
4033 /* Line 1792 of yacc.c */
4034 #line 1635 "parse.y"
4035 { (yyval.id) = g_strdup("* const"); }
4039 /* Line 1792 of yacc.c */
4040 #line 1636 "parse.y"
4042 (yyval.id) = g_strconcat("*", (yyvsp[(2) - (2)].id), NULL);
4043 g_free((yyvsp[(2) - (2)].id));
4048 /* Line 1792 of yacc.c */
4049 #line 1640 "parse.y"
4051 (yyval.id) = g_strconcat("* const", (yyvsp[(3) - (3)].id), NULL);
4052 g_free((yyvsp[(3) - (3)].id));
4057 /* Line 1792 of yacc.c */
4058 #line 1647 "parse.y"
4060 if(strcmp((yyvsp[(1) - (2)].id), "first")==0)
4061 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4062 else if(strcmp((yyvsp[(1) - (2)].id), "last")==0)
4063 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4065 yyerror(_("signal must be 'first' or 'last'"));
4066 g_free((yyvsp[(1) - (2)].id));
4069 g_free((yyvsp[(1) - (2)].id));
4074 /* Line 1792 of yacc.c */
4075 #line 1659 "parse.y"
4077 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4082 /* Line 1792 of yacc.c */
4083 #line 1665 "parse.y"
4085 if(strcmp((yyvsp[(2) - (3)].id),"first")==0)
4086 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4087 else if(strcmp((yyvsp[(2) - (3)].id),"last")==0)
4088 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4090 yyerror(_("signal must be 'first' or 'last'"));
4091 g_free((yyvsp[(2) - (3)].id));
4094 g_free((yyvsp[(2) - (3)].id));
4099 /* Line 1792 of yacc.c */
4100 #line 1677 "parse.y"
4102 if(strcmp((yyvsp[(1) - (3)].id),"first")==0)
4103 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4104 else if(strcmp((yyvsp[(1) - (3)].id),"last")==0)
4105 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4107 yyerror(_("signal must be 'first' or 'last'"));
4108 g_free((yyvsp[(1) - (3)].id));
4111 g_free((yyvsp[(1) - (3)].id));
4116 /* Line 1792 of yacc.c */
4117 #line 1689 "parse.y"
4119 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4124 /* Line 1792 of yacc.c */
4125 #line 1692 "parse.y"
4127 /* the_scope was default thus public */
4128 the_scope = PUBLIC_SCOPE;
4133 /* Line 1792 of yacc.c */
4134 #line 1698 "parse.y"
4136 gtktypes = g_list_prepend(gtktypes, debool ((yyvsp[(1) - (4)].id)));
4141 /* Line 1792 of yacc.c */
4142 #line 1701 "parse.y"
4144 gtktypes = g_list_prepend(gtktypes, debool ((yyvsp[(1) - (5)].id)));
4145 signal_name=(yyvsp[(2) - (5)].id);
4150 /* Line 1792 of yacc.c */
4151 #line 1707 "parse.y"
4153 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(3) - (3)].id)));
4158 /* Line 1792 of yacc.c */
4159 #line 1710 "parse.y"
4161 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(1) - (1)].id)));
4166 /* Line 1792 of yacc.c */
4167 #line 1715 "parse.y"
4168 { (yyval.cbuf) = (yyvsp[(2) - (2)].cbuf); }
4172 /* Line 1792 of yacc.c */
4173 #line 1716 "parse.y"
4174 { (yyval.cbuf) = NULL; }
4178 /* Line 1792 of yacc.c */
4179 #line 1720 "parse.y"
4182 yyerror(_("signal without 'self' as "
4183 "first parameter"));
4184 free_all_global_state();
4187 if(the_scope == CLASS_SCOPE) {
4188 yyerror(_("a method cannot be of class scope"));
4189 free_all_global_state();
4192 if (funcattrs != NULL) {
4193 char *error = g_strdup_printf
4194 (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4199 push_function(the_scope, (yyvsp[(3) - (10)].sigtype),NULL,
4200 (yyvsp[(5) - (10)].id), (yyvsp[(10) - (10)].cbuf),(yyvsp[(1) - (10)].line),
4201 ccode_line, vararg, (yyvsp[(2) - (10)].list));
4206 /* Line 1792 of yacc.c */
4207 #line 1743 "parse.y"
4210 yyerror(_("signal without 'self' as "
4211 "first parameter"));
4212 free_all_global_state();
4215 if(the_scope == CLASS_SCOPE) {
4216 yyerror(_("a method cannot be of class scope"));
4217 free_all_global_state();
4220 if (funcattrs != NULL) {
4221 char *error = g_strdup_printf
4222 (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4227 push_function(the_scope, (yyvsp[(4) - (11)].sigtype), NULL,
4228 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf), (yyvsp[(2) - (11)].line),
4229 ccode_line, vararg, (yyvsp[(3) - (11)].list));
4234 /* Line 1792 of yacc.c */
4235 #line 1766 "parse.y"
4238 yyerror(_("virtual method without 'self' as "
4239 "first parameter"));
4240 free_all_global_state();
4243 if(the_scope == CLASS_SCOPE) {
4244 yyerror(_("a method cannot be of class scope"));
4245 free_all_global_state();
4248 if (funcattrs != NULL) {
4249 char *error = g_strdup_printf
4250 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4255 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4256 (yyvsp[(9) - (9)].cbuf), (yyvsp[(1) - (9)].line),
4257 ccode_line, vararg, NULL);
4262 /* Line 1792 of yacc.c */
4263 #line 1789 "parse.y"
4266 yyerror(_("virtual method without 'self' as "
4267 "first parameter"));
4268 free_all_global_state();
4271 if(the_scope == CLASS_SCOPE) {
4272 yyerror(_("a method cannot be of class scope"));
4273 free_all_global_state();
4276 if (funcattrs != NULL) {
4277 char *error = g_strdup_printf
4278 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4283 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4284 (yyvsp[(9) - (9)].cbuf), (yyvsp[(2) - (9)].line),
4285 ccode_line, vararg, NULL);
4290 /* Line 1792 of yacc.c */
4291 #line 1812 "parse.y"
4294 yyerror(_("virtual method without 'szelf' as "
4295 "first parameter"));
4296 free_all_global_state();
4299 if (funcattrs != NULL) {
4300 char *error = g_strdup_printf
4301 (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4306 push_function(PUBLIC_SCOPE, VIRTUAL_METHOD, NULL,
4307 (yyvsp[(3) - (8)].id), (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line),
4308 ccode_line, vararg, NULL);
4313 /* Line 1792 of yacc.c */
4314 #line 1830 "parse.y"
4316 if (funcattrs != NULL) {
4317 char *error = g_strdup_printf
4318 (_("function attribute macros ('%s' in this case) may not be used with override methods"),
4323 push_function(NO_SCOPE, OVERRIDE_METHOD, (yyvsp[(3) - (11)].id),
4324 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf),
4325 (yyvsp[(1) - (11)].line), ccode_line,
4331 /* Line 1792 of yacc.c */
4332 #line 1843 "parse.y"
4334 if(the_scope == CLASS_SCOPE) {
4335 yyerror(_("a method cannot be of class scope"));
4336 free_all_global_state();
4339 push_function(the_scope, REGULAR_METHOD, NULL, (yyvsp[(3) - (8)].id),
4340 (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line), ccode_line,
4346 /* Line 1792 of yacc.c */
4347 #line 1853 "parse.y"
4349 if(strcmp((yyvsp[(1) - (5)].id), "init")==0) {
4350 push_init_arg((yyvsp[(3) - (5)].id),FALSE);
4351 push_function(NO_SCOPE, INIT_METHOD, NULL,
4352 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4353 ccode_line, FALSE, NULL);
4354 } else if(strcmp((yyvsp[(1) - (5)].id), "class_init")==0) {
4355 push_init_arg((yyvsp[(3) - (5)].id),TRUE);
4356 push_function(NO_SCOPE, CLASS_INIT_METHOD, NULL,
4357 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4358 ccode_line, FALSE, NULL);
4359 } else if(strcmp((yyvsp[(1) - (5)].id), "constructor")==0) {
4360 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4361 push_function(NO_SCOPE, CONSTRUCTOR_METHOD, NULL,
4362 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4363 ccode_line, FALSE, NULL);
4364 } else if(strcmp((yyvsp[(1) - (5)].id), "dispose")==0) {
4365 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4366 push_function(NO_SCOPE, DISPOSE_METHOD, NULL,
4367 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4368 ccode_line, FALSE, NULL);
4369 } else if(strcmp((yyvsp[(1) - (5)].id), "finalize")==0) {
4370 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4371 push_function(NO_SCOPE, FINALIZE_METHOD, NULL,
4372 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4373 ccode_line, FALSE, NULL);
4376 g_free((yyvsp[(1) - (5)].id));
4377 g_free((yyvsp[(3) - (5)].id));
4378 g_string_free((yyvsp[(5) - (5)].cbuf),TRUE);
4379 yyerror(_("parse error "
4380 "(untyped blocks must be init, "
4381 "class_init, constructor, dispose "
4389 /* Line 1792 of yacc.c */
4390 #line 1893 "parse.y"
4392 g_free(funcattrs); funcattrs = NULL;
4393 g_free(onerror); onerror = NULL;
4394 g_free(defreturn); defreturn = NULL;
4395 if(!set_attr_value((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id))) {
4396 g_free((yyvsp[(1) - (2)].id));
4397 g_free((yyvsp[(2) - (2)].id));
4398 yyerror(_("parse error"));
4401 g_free((yyvsp[(1) - (2)].id));
4406 /* Line 1792 of yacc.c */
4407 #line 1905 "parse.y"
4409 g_free(funcattrs); funcattrs = NULL;
4410 g_free(onerror); onerror = NULL;
4411 g_free(defreturn); defreturn = NULL;
4412 if(!set_attr_value((yyvsp[(1) - (4)].id), (yyvsp[(2) - (4)].id))) {
4413 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4414 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4415 yyerror(_("parse error"));
4418 if(!set_attr_value((yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id))) {
4419 funcattrs = onerror = defreturn = NULL;
4420 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4421 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4422 yyerror(_("parse error"));
4425 g_free((yyvsp[(1) - (4)].id));
4426 g_free((yyvsp[(3) - (4)].id));
4431 /* Line 1792 of yacc.c */
4432 #line 1925 "parse.y"
4434 g_free(funcattrs); funcattrs = NULL;
4435 g_free(onerror); onerror = NULL;
4436 g_free(defreturn); defreturn = NULL;
4437 if(!set_attr_value((yyvsp[(1) - (6)].id), (yyvsp[(2) - (6)].id))) {
4438 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4439 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4440 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4441 yyerror(_("parse error"));
4444 if(!set_attr_value((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id))) {
4445 funcattrs = onerror = defreturn = NULL;
4446 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4447 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4448 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4449 yyerror(_("parse error"));
4452 if(!set_attr_value((yyvsp[(5) - (6)].id), (yyvsp[(6) - (6)].id))) {
4453 funcattrs = onerror = defreturn = NULL;
4454 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4455 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4456 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4457 yyerror(_("parse error"));
4460 g_free((yyvsp[(1) - (6)].id));
4461 g_free((yyvsp[(3) - (6)].id));
4462 g_free((yyvsp[(5) - (6)].id));
4467 /* Line 1792 of yacc.c */
4468 #line 1956 "parse.y"
4470 g_free(funcattrs); funcattrs = NULL;
4471 g_free(onerror); onerror = NULL;
4472 g_free(defreturn); defreturn = NULL;
4477 /* Line 1792 of yacc.c */
4478 #line 1963 "parse.y"
4479 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4483 /* Line 1792 of yacc.c */
4484 #line 1964 "parse.y"
4486 (yyval.id) = ((yyvsp[(2) - (2)].cbuf))->str;
4487 g_string_free((yyvsp[(2) - (2)].cbuf), FALSE);
4492 /* Line 1792 of yacc.c */
4493 #line 1970 "parse.y"
4494 { vararg = FALSE; has_self = FALSE; }
4498 /* Line 1792 of yacc.c */
4499 #line 1971 "parse.y"
4503 if(strcmp((yyvsp[(1) - (1)].id),"self")==0)
4504 push_self((yyvsp[(1) - (1)].id), FALSE);
4506 g_free((yyvsp[(1) - (1)].id));
4507 yyerror(_("parse error"));
4514 /* Line 1792 of yacc.c */
4515 #line 1982 "parse.y"
4519 if(strcmp((yyvsp[(1) - (2)].id),"self")==0)
4520 push_self((yyvsp[(1) - (2)].id), TRUE);
4522 g_free((yyvsp[(1) - (2)].id));
4523 yyerror(_("parse error"));
4530 /* Line 1792 of yacc.c */
4531 #line 1993 "parse.y"
4535 if(strcmp((yyvsp[(2) - (2)].id),"self")==0)
4536 push_self((yyvsp[(2) - (2)].id), TRUE);
4538 g_free((yyvsp[(2) - (2)].id));
4539 yyerror(_("parse error"));
4546 /* Line 1792 of yacc.c */
4547 #line 2004 "parse.y"
4550 if(strcmp((yyvsp[(1) - (3)].id),"self")==0)
4551 push_self((yyvsp[(1) - (3)].id), FALSE);
4553 g_free((yyvsp[(1) - (3)].id));
4554 yyerror(_("parse error"));
4561 /* Line 1792 of yacc.c */
4562 #line 2014 "parse.y"
4565 if(strcmp((yyvsp[(1) - (4)].id),"self")==0)
4566 push_self((yyvsp[(1) - (4)].id), TRUE);
4568 g_free((yyvsp[(1) - (4)].id));
4569 yyerror(_("parse error"));
4576 /* Line 1792 of yacc.c */
4577 #line 2024 "parse.y"
4580 if(strcmp((yyvsp[(2) - (4)].id),"self")==0)
4581 push_self((yyvsp[(2) - (4)].id), TRUE);
4583 g_free((yyvsp[(2) - (4)].id));
4584 yyerror(_("parse error"));
4591 /* Line 1792 of yacc.c */
4592 #line 2034 "parse.y"
4593 { has_self = FALSE; }
4597 /* Line 1792 of yacc.c */
4598 #line 2037 "parse.y"
4603 /* Line 1792 of yacc.c */
4604 #line 2038 "parse.y"
4609 /* Line 1792 of yacc.c */
4610 #line 2041 "parse.y"
4615 /* Line 1792 of yacc.c */
4616 #line 2042 "parse.y"
4621 /* Line 1792 of yacc.c */
4622 #line 2045 "parse.y"
4624 push_funcarg((yyvsp[(2) - (2)].id),NULL);
4629 /* Line 1792 of yacc.c */
4630 #line 2048 "parse.y"
4632 push_funcarg((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].id));
4637 /* Line 1792 of yacc.c */
4638 #line 2051 "parse.y"
4640 if(strcmp((yyvsp[(4) - (6)].id),"check")!=0) {
4641 yyerror(_("parse error"));
4644 g_free((yyvsp[(4) - (6)].id));
4645 push_funcarg((yyvsp[(2) - (6)].id),NULL);
4650 /* Line 1792 of yacc.c */
4651 #line 2059 "parse.y"
4653 if(strcmp((yyvsp[(5) - (7)].id),"check")!=0) {
4654 yyerror(_("parse error"));
4657 g_free((yyvsp[(5) - (7)].id));
4658 push_funcarg((yyvsp[(2) - (7)].id),(yyvsp[(3) - (7)].id));
4663 /* Line 1792 of yacc.c */
4664 #line 2069 "parse.y"
4669 /* Line 1792 of yacc.c */
4670 #line 2070 "parse.y"
4675 /* Line 1792 of yacc.c */
4676 #line 2073 "parse.y"
4678 if(strcmp((yyvsp[(1) - (1)].id),"type")==0) {
4679 Node *node = node_new (CHECK_NODE,
4680 "chtype", TYPE_CHECK,
4682 checks = g_list_append(checks,node);
4683 } else if(strcmp((yyvsp[(1) - (1)].id),"null")==0) {
4684 Node *node = node_new (CHECK_NODE,
4685 "chtype", NULL_CHECK,
4687 checks = g_list_append(checks,node);
4689 yyerror(_("parse error"));
4692 g_free((yyvsp[(1) - (1)].id));
4697 /* Line 1792 of yacc.c */
4698 #line 2090 "parse.y"
4700 Node *node = node_new (CHECK_NODE,
4702 "number:steal", (yyvsp[(2) - (2)].id),
4704 checks = g_list_append(checks,node);
4709 /* Line 1792 of yacc.c */
4710 #line 2097 "parse.y"
4712 Node *node = node_new (CHECK_NODE,
4714 "number:steal", (yyvsp[(2) - (2)].id),
4716 checks = g_list_append(checks,node);
4721 /* Line 1792 of yacc.c */
4722 #line 2104 "parse.y"
4724 Node *node = node_new (CHECK_NODE,
4726 "number:steal", (yyvsp[(3) - (3)].id),
4728 checks = g_list_append(checks,node);
4733 /* Line 1792 of yacc.c */
4734 #line 2111 "parse.y"
4736 Node *node = node_new (CHECK_NODE,
4738 "number:steal", (yyvsp[(3) - (3)].id),
4740 checks = g_list_append(checks,node);
4745 /* Line 1792 of yacc.c */
4746 #line 2118 "parse.y"
4748 Node *node = node_new (CHECK_NODE,
4750 "number:steal", (yyvsp[(3) - (3)].id),
4752 checks = g_list_append(checks,node);
4757 /* Line 1792 of yacc.c */
4758 #line 2125 "parse.y"
4760 Node *node = node_new (CHECK_NODE,
4762 "number:steal", (yyvsp[(3) - (3)].id),
4764 checks = g_list_append(checks,node);
4769 /* Line 1792 of yacc.c */
4770 #line 2134 "parse.y"
4772 Node *node = node_new (ENUMDEF_NODE,
4773 "etype:steal", (yyvsp[(6) - (7)].id),
4774 "prefix:steal", (yyvsp[(2) - (7)].id),
4775 "values:steal", enum_vals,
4778 nodes = g_list_append (nodes, node);
4783 /* Line 1792 of yacc.c */
4784 #line 2143 "parse.y"
4786 Node *node = node_new (ENUMDEF_NODE,
4787 "etype:steal", (yyvsp[(7) - (8)].id),
4788 "prefix:steal", (yyvsp[(2) - (8)].id),
4789 "values:steal", enum_vals,
4792 nodes = g_list_append (nodes, node);
4797 /* Line 1792 of yacc.c */
4798 #line 2154 "parse.y"
4803 /* Line 1792 of yacc.c */
4804 #line 2155 "parse.y"
4809 /* Line 1792 of yacc.c */
4810 #line 2158 "parse.y"
4813 char *num = (yyvsp[(3) - (3)].id);
4815 /* A float value, that's a bad enum */
4816 if (num[0] >= '0' &&
4818 strchr (num, '.') != NULL) {
4819 g_free ((yyvsp[(1) - (3)].id));
4821 yyerror(_("parse error (enumerator value not integer constant)"));
4825 node = node_new (ENUMVALUE_NODE,
4826 "name:steal", (yyvsp[(1) - (3)].id),
4829 enum_vals = g_list_append (enum_vals, node);
4834 /* Line 1792 of yacc.c */
4835 #line 2178 "parse.y"
4839 node = node_new (ENUMVALUE_NODE,
4840 "name:steal", (yyvsp[(1) - (1)].id),
4842 enum_vals = g_list_append (enum_vals, node);
4847 /* Line 1792 of yacc.c */
4848 #line 2188 "parse.y"
4850 Node *node = node_new (FLAGS_NODE,
4851 "ftype:steal", (yyvsp[(6) - (7)].id),
4852 "prefix:steal", (yyvsp[(2) - (7)].id),
4853 "values:steal", flag_vals,
4856 nodes = g_list_append (nodes, node);
4861 /* Line 1792 of yacc.c */
4862 #line 2197 "parse.y"
4864 Node *node = node_new (FLAGS_NODE,
4865 "ftype:steal", (yyvsp[(7) - (8)].id),
4866 "prefix:steal", (yyvsp[(2) - (8)].id),
4867 "values:steal", flag_vals,
4870 nodes = g_list_append (nodes, node);
4875 /* Line 1792 of yacc.c */
4876 #line 2208 "parse.y"
4878 flag_vals = g_list_append (flag_vals, (yyvsp[(3) - (3)].id));
4883 /* Line 1792 of yacc.c */
4884 #line 2211 "parse.y"
4886 flag_vals = g_list_append (flag_vals, (yyvsp[(1) - (1)].id));
4891 /* Line 1792 of yacc.c */
4892 #line 2216 "parse.y"
4894 Node *node = node_new (ERROR_NODE,
4895 "etype:steal", (yyvsp[(6) - (7)].id),
4896 "prefix:steal", (yyvsp[(2) - (7)].id),
4897 "values:steal", error_vals,
4900 nodes = g_list_append (nodes, node);
4905 /* Line 1792 of yacc.c */
4906 #line 2225 "parse.y"
4908 Node *node = node_new (ERROR_NODE,
4909 "etype:steal", (yyvsp[(7) - (8)].id),
4910 "prefix:steal", (yyvsp[(2) - (8)].id),
4911 "values:steal", error_vals,
4914 nodes = g_list_append (nodes, node);
4919 /* Line 1792 of yacc.c */
4920 #line 2236 "parse.y"
4922 error_vals = g_list_append (error_vals, (yyvsp[(3) - (3)].id));
4927 /* Line 1792 of yacc.c */
4928 #line 2239 "parse.y"
4930 error_vals = g_list_append (error_vals, (yyvsp[(1) - (1)].id));
4935 /* Line 1792 of yacc.c */
4936 #line 2245 "parse.y"
4937 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4941 /* Line 1792 of yacc.c */
4942 #line 2246 "parse.y"
4944 (yyval.id) = g_strconcat("-",(yyvsp[(2) - (2)].id),NULL);
4945 g_free((yyvsp[(2) - (2)].id));
4950 /* Line 1792 of yacc.c */
4951 #line 2250 "parse.y"
4952 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4956 /* Line 1792 of yacc.c */
4957 #line 2251 "parse.y"
4958 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4962 /* Line 1792 of yacc.c */
4963 #line 4964 "parse.c"
4966 /* User semantic actions sometimes alter yychar, and that requires
4967 that yytoken be updated with the new translation. We take the
4968 approach of translating immediately before every use of yytoken.
4969 One alternative is translating here after every semantic action,
4970 but that translation would be missed if the semantic action invokes
4971 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
4972 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
4973 incorrect destructor might then be invoked immediately. In the
4974 case of YYERROR or YYBACKUP, subsequent parser actions might lead
4975 to an incorrect destructor call or verbose syntax error message
4976 before the lookahead is translated. */
4977 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4981 YY_STACK_PRINT (yyss, yyssp);
4985 /* Now `shift' the result of the reduction. Determine what state
4986 that goes to, based on the state we popped back to and the rule
4987 number reduced by. */
4991 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4992 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4993 yystate = yytable[yystate];
4995 yystate = yydefgoto[yyn - YYNTOKENS];
5000 /*------------------------------------.
5001 | yyerrlab -- here on detecting error |
5002 `------------------------------------*/
5004 /* Make sure we have latest lookahead translation. See comments at
5005 user semantic actions for why this is necessary. */
5006 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5008 /* If not already recovering from an error, report this error. */
5012 #if ! YYERROR_VERBOSE
5013 yyerror (YY_("syntax error"));
5015 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5018 char const *yymsgp = YY_("syntax error");
5019 int yysyntax_error_status;
5020 yysyntax_error_status = YYSYNTAX_ERROR;
5021 if (yysyntax_error_status == 0)
5023 else if (yysyntax_error_status == 1)
5025 if (yymsg != yymsgbuf)
5026 YYSTACK_FREE (yymsg);
5027 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5031 yymsg_alloc = sizeof yymsgbuf;
5032 yysyntax_error_status = 2;
5036 yysyntax_error_status = YYSYNTAX_ERROR;
5041 if (yysyntax_error_status == 2)
5042 goto yyexhaustedlab;
5044 # undef YYSYNTAX_ERROR
5050 if (yyerrstatus == 3)
5052 /* If just tried and failed to reuse lookahead token after an
5053 error, discard it. */
5055 if (yychar <= YYEOF)
5057 /* Return failure if at end of input. */
5058 if (yychar == YYEOF)
5063 yydestruct ("Error: discarding",
5069 /* Else will try to reuse lookahead token after shifting the error
5074 /*---------------------------------------------------.
5075 | yyerrorlab -- error raised explicitly by YYERROR. |
5076 `---------------------------------------------------*/
5079 /* Pacify compilers like GCC when the user code never invokes
5080 YYERROR and the label yyerrorlab therefore never appears in user
5082 if (/*CONSTCOND*/ 0)
5085 /* Do not reclaim the symbols of the rule which action triggered
5089 YY_STACK_PRINT (yyss, yyssp);
5094 /*-------------------------------------------------------------.
5095 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5096 `-------------------------------------------------------------*/
5098 yyerrstatus = 3; /* Each real token shifted decrements this. */
5102 yyn = yypact[yystate];
5103 if (!yypact_value_is_default (yyn))
5106 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5114 /* Pop the current state because it cannot handle the error token. */
5119 yydestruct ("Error: popping",
5120 yystos[yystate], yyvsp);
5123 YY_STACK_PRINT (yyss, yyssp);
5126 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
5128 YY_IGNORE_MAYBE_UNINITIALIZED_END
5131 /* Shift the error token. */
5132 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5138 /*-------------------------------------.
5139 | yyacceptlab -- YYACCEPT comes here. |
5140 `-------------------------------------*/
5145 /*-----------------------------------.
5146 | yyabortlab -- YYABORT comes here. |
5147 `-----------------------------------*/
5152 #if !defined yyoverflow || YYERROR_VERBOSE
5153 /*-------------------------------------------------.
5154 | yyexhaustedlab -- memory exhaustion comes here. |
5155 `-------------------------------------------------*/
5157 yyerror (YY_("memory exhausted"));
5163 if (yychar != YYEMPTY)
5165 /* Make sure we have latest lookahead translation. See comments at
5166 user semantic actions for why this is necessary. */
5167 yytoken = YYTRANSLATE (yychar);
5168 yydestruct ("Cleanup: discarding lookahead",
5171 /* Do not reclaim the symbols of the rule which action triggered
5172 this YYABORT or YYACCEPT. */
5174 YY_STACK_PRINT (yyss, yyssp);
5175 while (yyssp != yyss)
5177 yydestruct ("Cleanup: popping",
5178 yystos[*yyssp], yyvsp);
5183 YYSTACK_FREE (yyss);
5186 if (yymsg != yymsgbuf)
5187 YYSTACK_FREE (yymsg);
5189 /* Make sure YYID is used. */
5190 return YYID (yyresult);
5194 /* Line 2055 of yacc.c */
5195 #line 2254 "parse.y"