1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
129 #define THREEDOTS 265
140 #define TYPETOKEN 276
141 #define ARRAY_DIM 277
142 #define SINGLE_CHAR 278
152 #define PROTECTED 288
153 #define CLASSWIDE 289
163 #define DEFAULT_VALUE 299
167 #define FLAGS_TYPE 303
168 #define ENUM_TYPE 304
169 #define PARAM_TYPE 305
170 #define BOXED_TYPE 306
171 #define OBJECT_TYPE 307
176 /* Copy the first part of user declarations. */
186 #include "treefuncs.h"
190 /* FIXME: add gettext support */
195 static GList *class_nodes = NULL;
198 static GList *enum_vals = NULL;
199 static GList *flag_vals = NULL;
200 static GList *error_vals = NULL;
202 static gboolean abstract = FALSE;
203 static char *chunk_size = NULL;
204 static char *bonobo_object_class = NULL;
205 static int glade_xml = FALSE;
206 static GList *interfaces = NULL;
207 static GList *typestack = NULL;
208 static GList *funcargs = NULL;
209 static GList *checks = NULL;
210 static int has_self = FALSE;
211 static int vararg = FALSE;
212 static Method *last_added_method = NULL;
214 /* destructor and initializer for variables */
215 static gboolean destructor_unref = FALSE;
216 static char *destructor = NULL;
217 static int destructor_line = 0;
218 static gboolean destructor_simple = TRUE;
219 static char *initializer = NULL;
220 static int initializer_line = 0;
221 static int glade_widget = FALSE;
223 static char *onerror = NULL;
224 static char *defreturn = NULL;
226 static GList *gtktypes = NULL;
228 static Property *property = NULL;
230 /* this can be a global as we will only do one function at a time
232 static int the_scope = NO_SCOPE;
234 void free(void *ptr);
237 extern int ccode_line;
239 extern gboolean for_cpp;
249 if(strcmp(yytext,"\n")==0) {
250 out=g_strconcat("Error: ",str," before newline",NULL);
251 } else if(yytext[0]=='\0') {
252 out=g_strconcat("Error: ", str, " at end of input", NULL);
254 char *tmp = g_strdup(yytext);
255 while((p=strchr(tmp, '\n')))
258 out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL);
262 fprintf(stderr, "%s:%d: %s\n", filename, line_no, out);
271 Type *type = typestack->data;
272 typestack = g_list_remove(typestack,typestack->data);
277 push_variable (char *name, int scope, int line_no, char *postfix)
280 Type *type = pop_type ();
282 type->postfix = postfix;
284 var = node_new (VARIABLE_NODE,
287 "glade_widget", glade_widget,
290 "destructor_unref", destructor_unref,
291 "destructor:steal", destructor,
292 "destructor_line", destructor_line,
293 "destructor_simple", destructor_simple,
294 "initializer:steal", initializer,
295 "initializer_line", initializer_line,
296 "initializer_simple", TRUE,
298 class_nodes = g_list_append(class_nodes, var);
299 glade_widget = FALSE;
303 push_function (int scope, int method, char *oid, char *id,
304 GString *cbuf, int line_no, int ccode_line,
305 gboolean vararg, GList *flags)
311 g_assert(scope != CLASS_SCOPE);
313 if(method == INIT_METHOD || method == CLASS_INIT_METHOD) {
314 type = (Type *)node_new (TYPE_NODE,
321 /* a complicated and ugly test to figure out if we have
322 the wrong number of types for a signal */
323 if((method == SIGNAL_FIRST_METHOD ||
324 method == SIGNAL_LAST_METHOD) &&
325 g_list_length(gtktypes) != g_list_length(funcargs) &&
326 !(g_list_length(funcargs) == 1 &&
327 g_list_length(gtktypes) == 2 &&
328 strcmp(gtktypes->next->data, "NONE")==0)) {
329 error_print(GOB_WARN, line_no,
330 _("The number of GTK arguments and "
331 "function arguments for a signal "
332 "don't seem to match"));
334 if(g_list_length(gtktypes) > 2) {
336 for(li = gtktypes->next; li; li = li->next) {
337 if(strcmp(li->data, "NONE")==0) {
338 error_print(GOB_ERROR, line_no,
339 _("NONE can only appear in an "
340 "argument list by itself"));
346 c_cbuf = p = cbuf->str;
347 while(p && *p && (*p==' ' || *p=='\t' || *p=='\n' || *p=='\r'))
354 node = node_new (METHOD_NODE,
359 "gtktypes:steal", gtktypes,
360 "flags:steal", flags,
362 "args:steal", funcargs,
363 "onerror:steal", onerror,
364 "defreturn:steal", defreturn,
365 "cbuf:steal", c_cbuf,
367 "ccode_line", ccode_line,
369 "unique_id", method_unique_id++,
372 last_added_method = (Method *)node;
376 /*only free segment if we haven't passed it
385 class_nodes = g_list_append(class_nodes, node);
389 free_all_global_state(void)
399 g_list_foreach(gtktypes, (GFunc)g_free, NULL);
400 g_list_free(gtktypes);
403 node_list_free (funcargs);
408 push_funcarg(char *name, char *postfix)
411 Type *type = pop_type();
413 type->postfix = postfix;
415 node = node_new (FUNCARG_NODE,
418 "checks:steal", checks,
422 funcargs = g_list_append(funcargs, node);
426 push_init_arg(char *name, int is_class)
433 tn = g_strconcat(((Class *)class)->otype,":Class",NULL);
435 tn = g_strdup(((Class *)class)->otype);
437 type = node_new (TYPE_NODE,
441 node = node_new (FUNCARG_NODE,
442 "atype:steal", (Type *)type,
445 funcargs = g_list_prepend(funcargs, node);
449 push_self(char *id, gboolean constant)
454 type = node_new (TYPE_NODE,
455 "name", ((Class *)class)->otype,
456 "pointer", constant ? "const *" : "*",
458 ch = g_list_append (ch, node_new (CHECK_NODE,
459 "chtype", NULL_CHECK,
461 ch = g_list_append (ch, node_new (CHECK_NODE,
462 "chtype", TYPE_CHECK,
464 node = node_new (FUNCARG_NODE,
465 "atype:steal", (Type *)type,
469 funcargs = g_list_prepend(funcargs, node);
473 find_var_or_die(const char *id, int line)
477 for(li = class_nodes; li != NULL; li = li->next) {
479 Node *node = li->data;
480 if(node->type != VARIABLE_NODE)
483 if(strcmp(var->id, id)==0)
487 error_printf(GOB_ERROR, line, _("Variable %s not defined here"), id);
489 g_assert_not_reached();
494 set_return_value(char *type, char *val)
496 if(strcmp(type, "onerror")==0) {
502 } else if(strcmp(type, "defreturn")==0) {
513 export_accessors (const char *var_name,
525 the_type = (Type *)node_copy ((Node *)type);
527 the_type = get_tree_type (gtktype, TRUE);
529 if (the_type == NULL) {
530 error_print (GOB_ERROR, line_no,
531 _("Cannot determine type of property or argument"));
536 char *get_id = g_strdup_printf ("get_%s", var_name);
537 GString *get_cbuf = g_string_new (NULL);
538 Node *node1 = node_new (TYPE_NODE,
539 "name", the_type->name,
540 "pointer", the_type->pointer,
541 "postfix", the_type->postfix,
543 Node *node3 = node_new (TYPE_NODE,
544 "name", class->class.otype,
548 g_string_sprintf (get_cbuf,
550 "g_object_get (G_OBJECT (self), \"%s\", "
554 the_type->pointer ? the_type->pointer : "",
557 typestack = g_list_prepend (typestack, node1);
558 typestack = g_list_prepend (typestack, node3);
560 push_funcarg ("self", FALSE);
562 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
563 get_id, get_cbuf, get_lineno,
564 lineno, FALSE, NULL);
568 char *set_id = g_strdup_printf ("set_%s", var_name);
569 GString *set_cbuf = g_string_new (NULL);
570 Node *node1 = node_new (TYPE_NODE,
571 "name", the_type->name,
572 "pointer", the_type->pointer,
573 "postfix", the_type->postfix,
575 Node *node2 = node_new (TYPE_NODE,
578 Node *node3 = node_new (TYPE_NODE,
579 "name", class->class.otype,
583 g_string_sprintf (set_cbuf,
584 "\tg_object_set (G_OBJECT (self), "
585 "\"%s\", val, NULL);\n",
588 typestack = g_list_prepend (typestack, node2);
589 typestack = g_list_prepend (typestack, node1);
590 typestack = g_list_prepend (typestack, node3);
592 push_funcarg ("self", FALSE);
593 push_funcarg ("val", FALSE);
595 typestack = g_list_prepend (typestack, node2);
596 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
597 set_id, set_cbuf, set_lineno,
598 lineno, FALSE, NULL);
601 node_free ((Node *)the_type);
605 get_prop_enum_flag_cast (Property *prop)
608 if (prop->extra_gtktype == NULL ||
609 /* HACK! just in case someone made this
610 * work with 2.0.0 by using the TYPE
612 ((strstr (prop->extra_gtktype, "_TYPE_") != NULL ||
613 strstr (prop->extra_gtktype, "TYPE_") == prop->extra_gtktype) &&
614 strchr (prop->extra_gtktype, ':') == NULL)) {
615 if (prop->ptype != NULL)
616 return get_type (prop->ptype, TRUE);
618 return g_strdup ("");
620 tmp = remove_sep (prop->extra_gtktype);
621 ret = g_strdup_printf ("(%s) ", tmp);
627 add_construct_glade (char * file, char * root, char * domain)
631 GList * flags = NULL;
633 type = (Type *)node_new (TYPE_NODE,
637 initializer = g_strdup_printf("\t{\n"
638 "\tGtkWidget * root;\n"
639 "\t%%1$s->_priv->_glade_xml = glade_xml_new(%s, %s, %s);\n"
640 "\troot = glade_xml_get_widget(%%1$s->_priv->_glade_xml, %s);\n"
641 "\tgtk_widget_show(root);\n"
642 "\tgtk_container_add(GTK_CONTAINER(%%1$s), root);\n"
643 "\tglade_xml_signal_autoconnect_full(%%1$s->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)%%1$s);\n"
644 "}\n", file, root, domain ? domain : "NULL", root);
646 var = node_new (VARIABLE_NODE,
647 "scope", PRIVATE_SCOPE,
649 "glade_widget", FALSE,
650 "id:steal", "_glade_xml",
651 "destructor_unref", FALSE,
652 "destructor", "g_object_unref",
653 "destructor_simple", TRUE,
654 "initializer", initializer,
655 "initializer_simple", FALSE,
657 class_nodes = g_list_prepend(class_nodes, var);
661 property_link_and_export (Node *node)
663 Property *prop = (Property *)node;
667 char *get = NULL, *set = NULL;
670 if (prop->set != NULL ||
672 error_print (GOB_ERROR, prop->line_no,
673 _("Property linking requested, but "
674 "getters and setters exist"));
677 var = find_var_or_die (prop->name, prop->line_no);
678 if(var->scope == PRIVATE_SCOPE) {
679 root = "self->_priv";
680 } else if (var->scope == CLASS_SCOPE) {
681 root = "SELF_GET_CLASS(self)";
683 error_print (GOB_ERROR, prop->line_no,
684 _("Self aliases needed when autolinking to a classwide member"));
689 if (strcmp (prop->gtktype, "STRING") == 0) {
690 set = g_strdup_printf("{ char *old = %s->%s; "
691 "%s->%s = g_value_dup_string (VAL); g_free (old); }",
694 get = g_strdup_printf("g_value_set_string (VAL, %s->%s);",
696 } else if (strcmp (prop->gtktype, "OBJECT") == 0) {
698 if (prop->extra_gtktype != NULL) {
699 cast = remove_sep (prop->extra_gtktype);
701 cast = g_strdup ("void");
703 set = g_strdup_printf("{ GObject *___old = (GObject *)%s->%s; "
704 "%s->%s = (%s *)g_value_dup_object (VAL); "
705 "if (___old != NULL) { "
706 "g_object_unref (G_OBJECT (___old)); "
712 get = g_strdup_printf ("g_value_set_object (VAL, "
713 "(gpointer)%s->%s);",
716 } else if (strcmp (prop->gtktype, "BOXED") == 0) {
717 char *type = make_me_type (prop->extra_gtktype,
719 if (prop->extra_gtktype == NULL) {
720 error_print (GOB_ERROR, prop->line_no,
721 _("Property linking requested for BOXED, but "
722 "boxed_type not set"));
724 set = g_strdup_printf("{ gpointer ___old = (gpointer)%s->%s; "
725 "gpointer ___new = (gpointer)g_value_get_boxed (VAL); "
726 "if (___new != ___old) { "
727 "if (___old != NULL) g_boxed_free (%s, ___old); "
728 "if (___new != NULL) %s->%s = g_boxed_copy (%s, ___new); "
729 "else %s->%s = NULL;"
737 get = g_strdup_printf("g_value_set_boxed (VAL, %s->%s);",
743 const char *getcast = "";
744 const char *setcast = "";
745 char *to_free = NULL;
746 set_func = g_strdup_printf ("g_value_set_%s", prop->gtktype);
747 g_strdown (set_func);
748 get_func = g_strdup_printf ("g_value_get_%s", prop->gtktype);
749 g_strdown (get_func);
752 if (strcmp (prop->gtktype, "FLAGS") == 0) {
753 setcast = "(guint) ";
755 get_prop_enum_flag_cast (prop);
756 } else if (strcmp (prop->gtktype, "ENUM") == 0) {
759 get_prop_enum_flag_cast (prop);
760 } else if (strcmp (prop->gtktype, "POINTER") == 0) {
761 setcast = "(gpointer) ";
762 getcast = g_strdup_printf ("(%s%s) ",
764 prop->ptype->pointer ? prop->ptype->pointer : "");
768 set = g_strdup_printf("%s->%s = %s%s (VAL);",
772 get = g_strdup_printf("%s (VAL, %s%s->%s);",
784 "get_line", prop->line_no,
786 "set_line", prop->line_no,
791 export_accessors (prop->name,
792 prop->get != NULL, prop->get_line,
793 prop->set != NULL, prop->set_line,
804 if (strcmp (s, "BOOL") == 0) {
805 error_print (GOB_WARN, line_no,
806 _("BOOL type is deprecated, please use BOOLEAN"));
808 return g_strdup ("BOOLEAN");
815 ensure_property (void)
817 if (property == NULL)
818 property = (Property *)node_new (PROPERTY_NODE, NULL);
823 /* Enabling traces. */
828 /* Enabling verbose error messages. */
829 #ifdef YYERROR_VERBOSE
830 # undef YYERROR_VERBOSE
831 # define YYERROR_VERBOSE 1
833 # define YYERROR_VERBOSE 0
836 /* Enabling the token table. */
837 #ifndef YYTOKEN_TABLE
838 # define YYTOKEN_TABLE 0
841 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
842 typedef union YYSTYPE
851 /* Line 187 of yacc.c. */
854 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
855 # define YYSTYPE_IS_DECLARED 1
856 # define YYSTYPE_IS_TRIVIAL 1
861 /* Copy the second part of user declarations. */
864 /* Line 216 of yacc.c. */
872 typedef YYTYPE_UINT8 yytype_uint8;
874 typedef unsigned char yytype_uint8;
878 typedef YYTYPE_INT8 yytype_int8;
879 #elif (defined __STDC__ || defined __C99__FUNC__ \
880 || defined __cplusplus || defined _MSC_VER)
881 typedef signed char yytype_int8;
883 typedef short int yytype_int8;
887 typedef YYTYPE_UINT16 yytype_uint16;
889 typedef unsigned short int yytype_uint16;
893 typedef YYTYPE_INT16 yytype_int16;
895 typedef short int yytype_int16;
899 # ifdef __SIZE_TYPE__
900 # define YYSIZE_T __SIZE_TYPE__
901 # elif defined size_t
902 # define YYSIZE_T size_t
903 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
904 || defined __cplusplus || defined _MSC_VER)
905 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
906 # define YYSIZE_T size_t
908 # define YYSIZE_T unsigned int
912 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
917 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
918 # define YY_(msgid) dgettext ("bison-runtime", msgid)
922 # define YY_(msgid) msgid
926 /* Suppress unused-variable warnings by "using" E. */
927 #if ! defined lint || defined __GNUC__
928 # define YYUSE(e) ((void) (e))
930 # define YYUSE(e) /* empty */
933 /* Identity function, used to suppress warnings about constant conditions. */
937 #if (defined __STDC__ || defined __C99__FUNC__ \
938 || defined __cplusplus || defined _MSC_VER)
951 #if ! defined yyoverflow || YYERROR_VERBOSE
953 /* The parser invokes alloca or malloc; define the necessary symbols. */
955 # ifdef YYSTACK_USE_ALLOCA
956 # if YYSTACK_USE_ALLOCA
958 # define YYSTACK_ALLOC __builtin_alloca
959 # elif defined __BUILTIN_VA_ARG_INCR
960 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
962 # define YYSTACK_ALLOC __alloca
963 # elif defined _MSC_VER
964 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
965 # define alloca _alloca
967 # define YYSTACK_ALLOC alloca
968 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
969 || defined __cplusplus || defined _MSC_VER)
970 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
979 # ifdef YYSTACK_ALLOC
980 /* Pacify GCC's `empty if-body' warning. */
981 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
982 # ifndef YYSTACK_ALLOC_MAXIMUM
983 /* The OS might guarantee only one guard page at the bottom of the stack,
984 and a page size can be as small as 4096 bytes. So we cannot safely
985 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
986 to allow for a few compiler-allocated temporary stack slots. */
987 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
990 # define YYSTACK_ALLOC YYMALLOC
991 # define YYSTACK_FREE YYFREE
992 # ifndef YYSTACK_ALLOC_MAXIMUM
993 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
995 # if (defined __cplusplus && ! defined _STDLIB_H \
996 && ! ((defined YYMALLOC || defined malloc) \
997 && (defined YYFREE || defined free)))
998 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1000 # define _STDLIB_H 1
1004 # define YYMALLOC malloc
1005 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1006 || defined __cplusplus || defined _MSC_VER)
1007 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1011 # define YYFREE free
1012 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1013 || defined __cplusplus || defined _MSC_VER)
1014 void free (void *); /* INFRINGES ON USER NAME SPACE */
1018 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1021 #if (! defined yyoverflow \
1022 && (! defined __cplusplus \
1023 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1025 /* A type that is properly aligned for any stack member. */
1032 /* The size of the maximum gap between one aligned stack and the next. */
1033 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1035 /* The size of an array large to enough to hold all stacks, each with
1037 # define YYSTACK_BYTES(N) \
1038 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1039 + YYSTACK_GAP_MAXIMUM)
1041 /* Copy COUNT objects from FROM to TO. The source and destination do
1044 # if defined __GNUC__ && 1 < __GNUC__
1045 # define YYCOPY(To, From, Count) \
1046 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1048 # define YYCOPY(To, From, Count) \
1052 for (yyi = 0; yyi < (Count); yyi++) \
1053 (To)[yyi] = (From)[yyi]; \
1059 /* Relocate STACK from its old location to the new one. The
1060 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1061 elements in the stack, and YYPTR gives the new location of the
1062 stack. Advance YYPTR to a properly aligned location for the next
1064 # define YYSTACK_RELOCATE(Stack) \
1067 YYSIZE_T yynewbytes; \
1068 YYCOPY (&yyptr->Stack, Stack, yysize); \
1069 Stack = &yyptr->Stack; \
1070 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1071 yyptr += yynewbytes / sizeof (*yyptr); \
1077 /* YYFINAL -- State number of the termination state. */
1079 /* YYLAST -- Last index in YYTABLE. */
1082 /* YYNTOKENS -- Number of terminals. */
1083 #define YYNTOKENS 66
1084 /* YYNNTS -- Number of nonterminals. */
1086 /* YYNRULES -- Number of rules. */
1087 #define YYNRULES 195
1088 /* YYNRULES -- Number of states. */
1089 #define YYNSTATES 414
1091 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1092 #define YYUNDEFTOK 2
1093 #define YYMAXUTOK 307
1095 #define YYTRANSLATE(YYX) \
1096 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1098 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1099 static const yytype_uint8 yytranslate[] =
1101 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1102 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1103 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1104 2, 2, 2, 64, 2, 2, 2, 2, 2, 2,
1105 55, 56, 61, 2, 59, 65, 2, 2, 2, 2,
1106 2, 2, 2, 2, 2, 2, 2, 2, 2, 57,
1107 63, 58, 62, 2, 2, 2, 2, 2, 2, 2,
1108 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1109 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1110 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1111 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1112 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1113 2, 2, 2, 53, 60, 54, 2, 2, 2, 2,
1114 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1115 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1116 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1117 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1118 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1119 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1120 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1121 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1122 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1123 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1124 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1125 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1126 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1127 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1128 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1129 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1130 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1131 45, 46, 47, 48, 49, 50, 51, 52
1135 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1137 static const yytype_uint16 yyprhs[] =
1139 0, 0, 3, 7, 10, 13, 15, 17, 19, 21,
1140 23, 25, 27, 30, 33, 36, 39, 41, 43, 45,
1141 47, 52, 56, 62, 63, 68, 74, 80, 86, 93,
1142 101, 108, 116, 119, 121, 123, 126, 130, 132, 134,
1143 136, 138, 140, 142, 144, 146, 149, 153, 156, 160,
1144 163, 166, 168, 170, 172, 173, 179, 186, 199, 209,
1145 216, 220, 221, 233, 242, 248, 252, 253, 257, 259,
1146 261, 266, 268, 270, 274, 278, 282, 286, 290, 294,
1147 298, 302, 306, 310, 314, 318, 322, 326, 330, 334,
1148 338, 340, 346, 348, 352, 353, 357, 359, 362, 364,
1149 366, 368, 371, 374, 377, 381, 385, 388, 391, 394,
1150 396, 399, 401, 404, 406, 408, 410, 412, 414, 416,
1151 418, 420, 422, 424, 426, 428, 430, 433, 436, 440,
1152 443, 445, 449, 453, 456, 458, 463, 467, 469, 472,
1153 474, 485, 497, 507, 517, 526, 538, 547, 553, 556,
1154 561, 562, 564, 567, 569, 571, 574, 577, 581, 586,
1155 591, 593, 597, 599, 603, 605, 608, 612, 619, 627,
1156 630, 632, 634, 637, 640, 644, 648, 652, 656, 664,
1157 673, 677, 679, 683, 685, 693, 702, 706, 708, 716,
1158 725, 729, 731, 733, 736, 738
1161 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1162 static const yytype_int8 yyrhs[] =
1164 67, 0, -1, 69, 70, 69, -1, 70, 69, -1,
1165 69, 70, -1, 70, -1, 24, -1, 27, -1, 25,
1166 -1, 26, -1, 28, -1, 29, -1, 69, 68, -1,
1167 69, 111, -1, 69, 114, -1, 69, 116, -1, 68,
1168 -1, 111, -1, 114, -1, 116, -1, 71, 53, 73,
1169 54, -1, 71, 53, 54, -1, 3, 21, 4, 21,
1170 72, -1, -1, 55, 19, 56, 72, -1, 55, 19,
1171 19, 56, 72, -1, 55, 19, 21, 56, 72, -1,
1172 55, 19, 20, 56, 72, -1, 55, 19, 30, 30,
1173 56, 72, -1, 55, 19, 30, 30, 30, 56, 72,
1174 -1, 55, 19, 19, 30, 56, 72, -1, 55, 19,
1175 19, 30, 30, 56, 72, -1, 73, 74, -1, 74,
1176 -1, 102, -1, 19, 102, -1, 19, 21, 102, -1,
1177 79, -1, 80, -1, 82, -1, 57, -1, 31, -1,
1178 32, -1, 33, -1, 34, -1, 19, 19, -1, 19,
1179 53, 24, -1, 58, 118, -1, 58, 53, 24, -1,
1180 76, 77, -1, 77, 76, -1, 77, -1, 76, -1,
1181 19, -1, -1, 75, 91, 19, 78, 57, -1, 75,
1182 91, 19, 22, 78, 57, -1, 36, 89, 88, 19,
1183 81, 19, 53, 24, 19, 53, 24, 57, -1, 36,
1184 89, 88, 19, 81, 19, 53, 24, 57, -1, 36,
1185 89, 88, 19, 81, 19, -1, 55, 19, 56, -1,
1186 -1, 35, 19, 19, 83, 19, 53, 24, 19, 53,
1187 24, 57, -1, 35, 19, 19, 83, 19, 53, 24,
1188 57, -1, 35, 19, 19, 83, 57, -1, 55, 84,
1189 56, -1, -1, 84, 59, 87, -1, 87, -1, 30,
1190 -1, 19, 55, 30, 56, -1, 118, -1, 85, -1,
1191 40, 58, 85, -1, 41, 58, 85, -1, 42, 58,
1192 118, -1, 43, 58, 118, -1, 44, 58, 86, -1,
1193 46, 58, 90, -1, 47, 58, 91, -1, 48, 58,
1194 21, -1, 48, 58, 19, -1, 49, 58, 21, -1,
1195 49, 58, 19, -1, 50, 58, 21, -1, 50, 58,
1196 19, -1, 51, 58, 21, -1, 51, 58, 19, -1,
1197 52, 58, 21, -1, 52, 58, 19, -1, 19, -1,
1198 19, 55, 19, 91, 56, -1, 19, -1, 55, 90,
1199 56, -1, -1, 19, 60, 90, -1, 19, -1, 92,
1200 96, -1, 92, -1, 93, -1, 19, -1, 5, 19,
1201 -1, 19, 5, -1, 95, 19, -1, 5, 95, 19,
1202 -1, 95, 19, 5, -1, 94, 93, -1, 21, 93,
1203 -1, 5, 93, -1, 21, -1, 21, 5, -1, 94,
1204 -1, 94, 5, -1, 6, -1, 18, -1, 14, -1,
1205 15, -1, 13, -1, 16, -1, 17, -1, 11, -1,
1206 12, -1, 7, -1, 8, -1, 9, -1, 61, -1,
1207 61, 5, -1, 61, 96, -1, 61, 5, 96, -1,
1208 19, 99, -1, 99, -1, 75, 19, 99, -1, 19,
1209 75, 99, -1, 75, 99, -1, 97, -1, 19, 55,
1210 100, 56, -1, 100, 59, 19, -1, 19, -1, 53,
1211 24, -1, 57, -1, 38, 89, 98, 91, 19, 55,
1212 105, 56, 103, 101, -1, 75, 38, 89, 97, 91,
1213 19, 55, 105, 56, 103, 101, -1, 37, 75, 91,
1214 19, 55, 105, 56, 103, 101, -1, 75, 37, 91,
1215 19, 55, 105, 56, 103, 101, -1, 37, 91, 19,
1216 55, 105, 56, 103, 101, -1, 39, 55, 21, 56,
1217 91, 19, 55, 105, 56, 103, 101, -1, 75, 91,
1218 19, 55, 105, 56, 103, 101, -1, 19, 55, 19,
1219 56, 101, -1, 19, 104, -1, 19, 104, 19, 104,
1220 -1, -1, 118, -1, 53, 24, -1, 6, -1, 19,
1221 -1, 19, 5, -1, 5, 19, -1, 19, 59, 106,
1222 -1, 19, 5, 59, 106, -1, 5, 19, 59, 106,
1223 -1, 106, -1, 107, 59, 10, -1, 107, -1, 107,
1224 59, 108, -1, 108, -1, 91, 19, -1, 91, 19,
1225 22, -1, 91, 19, 55, 19, 109, 56, -1, 91,
1226 19, 22, 55, 19, 109, 56, -1, 109, 110, -1,
1227 110, -1, 19, -1, 62, 118, -1, 63, 118, -1,
1228 62, 58, 118, -1, 63, 58, 118, -1, 58, 58,
1229 118, -1, 64, 58, 118, -1, 9, 19, 53, 112,
1230 54, 21, 57, -1, 9, 19, 53, 112, 59, 54,
1231 21, 57, -1, 112, 59, 113, -1, 113, -1, 19,
1232 58, 118, -1, 19, -1, 46, 19, 53, 115, 54,
1233 21, 57, -1, 46, 19, 53, 115, 59, 54, 21,
1234 57, -1, 115, 59, 19, -1, 19, -1, 45, 19,
1235 53, 117, 54, 21, 57, -1, 45, 19, 53, 117,
1236 59, 54, 21, 57, -1, 117, 59, 19, -1, 19,
1237 -1, 20, -1, 65, 20, -1, 23, -1, 19, -1
1240 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1241 static const yytype_uint16 yyrline[] =
1243 0, 689, 689, 690, 691, 692, 695, 704, 713, 722,
1244 731, 740, 751, 752, 753, 754, 755, 756, 757, 758,
1245 761, 766, 773, 790, 791, 799, 811, 820, 832, 841,
1246 850, 859, 870, 871, 874, 875, 884, 896, 897, 898,
1247 899, 902, 903, 904, 905, 908, 928, 952, 956, 964,
1248 965, 966, 967, 968, 976, 982, 985, 990, 1058, 1112,
1249 1201, 1209, 1214, 1262, 1298, 1314, 1315, 1318, 1319, 1322,
1250 1323, 1335, 1336, 1339, 1345, 1351, 1357, 1363, 1369, 1375,
1251 1382, 1388, 1394, 1400, 1406, 1412, 1418, 1424, 1430, 1436,
1252 1442, 1467, 1476, 1482, 1483, 1486, 1489, 1495, 1502, 1511,
1253 1514, 1517, 1521, 1525, 1529, 1534, 1542, 1546, 1551, 1555,
1254 1558, 1562, 1565, 1570, 1571, 1572, 1573, 1574, 1575, 1576,
1255 1577, 1578, 1581, 1582, 1583, 1586, 1587, 1588, 1592, 1599,
1256 1611, 1617, 1629, 1641, 1644, 1650, 1655, 1658, 1663, 1664,
1257 1668, 1684, 1700, 1716, 1732, 1743, 1749, 1759, 1782, 1793,
1258 1812, 1818, 1819, 1825, 1826, 1837, 1848, 1859, 1869, 1879,
1259 1889, 1892, 1893, 1896, 1897, 1900, 1903, 1906, 1914, 1924,
1260 1925, 1928, 1945, 1952, 1959, 1966, 1973, 1980, 1989, 1998,
1261 2009, 2010, 2013, 2033, 2043, 2052, 2063, 2066, 2071, 2080,
1262 2091, 2094, 2100, 2101, 2105, 2106
1266 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1267 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1268 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1269 static const char *const yytname[] =
1271 "$end", "error", "$undefined", "CLASS", "FROM", "CONST", "VOID",
1272 "STRUCT", "UNION", "ENUM", "THREEDOTS", "SIGNED", "UNSIGNED", "LONG",
1273 "SHORT", "INT", "FLOAT", "DOUBLE", "CHAR", "TOKEN", "NUMBER",
1274 "TYPETOKEN", "ARRAY_DIM", "SINGLE_CHAR", "CCODE", "HTCODE", "PHCODE",
1275 "HCODE", "ACODE", "ATCODE", "STRING", "PUBLIC", "PRIVATE", "PROTECTED",
1276 "CLASSWIDE", "PROPERTY", "ARGUMENT", "VIRTUAL", "SIGNAL", "OVERRIDE",
1277 "NICK", "BLURB", "MAXIMUM", "MINIMUM", "DEFAULT_VALUE", "ERROR", "FLAGS",
1278 "TYPE", "FLAGS_TYPE", "ENUM_TYPE", "PARAM_TYPE", "BOXED_TYPE",
1279 "OBJECT_TYPE", "'{'", "'}'", "'('", "')'", "';'", "'='", "','", "'|'",
1280 "'*'", "'>'", "'<'", "'!'", "'-'", "$accept", "prog", "ccode", "ccodes",
1281 "class", "classdec", "classflags", "classcode", "thing", "scope",
1282 "destructor", "initializer", "varoptions", "variable", "argument",
1283 "export", "property", "param_spec", "param_spec_list", "string",
1284 "anyval", "param_spec_value", "argtype", "flags", "flaglist", "type",
1285 "specifier_list", "spec_list", "specifier", "strunionenum", "pointer",
1286 "simplesigtype", "fullsigtype", "sigtype", "tokenlist", "codenocode",
1287 "method", "returnvals", "retcode", "funcargs", "arglist", "arglist1",
1288 "arg", "checklist", "check", "enumcode", "enumvals", "enumval",
1289 "flagcode", "flagvals", "errorcode", "errorvals", "numtok", 0
1294 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1296 static const yytype_uint16 yytoknum[] =
1298 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1299 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1300 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1301 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1302 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1303 305, 306, 307, 123, 125, 40, 41, 59, 61, 44,
1304 124, 42, 62, 60, 33, 45
1308 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1309 static const yytype_uint8 yyr1[] =
1311 0, 66, 67, 67, 67, 67, 68, 68, 68, 68,
1312 68, 68, 69, 69, 69, 69, 69, 69, 69, 69,
1313 70, 70, 71, 72, 72, 72, 72, 72, 72, 72,
1314 72, 72, 73, 73, 74, 74, 74, 74, 74, 74,
1315 74, 75, 75, 75, 75, 76, 76, 77, 77, 78,
1316 78, 78, 78, 78, 78, 79, 79, 80, 80, 80,
1317 81, 81, 82, 82, 82, 83, 83, 84, 84, 85,
1318 85, 86, 86, 87, 87, 87, 87, 87, 87, 87,
1319 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
1320 87, 88, 88, 89, 89, 90, 90, 91, 91, 92,
1321 92, 92, 92, 92, 92, 92, 93, 93, 93, 93,
1322 93, 93, 93, 94, 94, 94, 94, 94, 94, 94,
1323 94, 94, 95, 95, 95, 96, 96, 96, 96, 97,
1324 97, 98, 98, 98, 98, 99, 100, 100, 101, 101,
1325 102, 102, 102, 102, 102, 102, 102, 102, 103, 103,
1326 103, 104, 104, 105, 105, 105, 105, 105, 105, 105,
1327 105, 106, 106, 107, 107, 108, 108, 108, 108, 109,
1328 109, 110, 110, 110, 110, 110, 110, 110, 111, 111,
1329 112, 112, 113, 113, 114, 114, 115, 115, 116, 116,
1330 117, 117, 118, 118, 118, 118
1333 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1334 static const yytype_uint8 yyr2[] =
1336 0, 2, 3, 2, 2, 1, 1, 1, 1, 1,
1337 1, 1, 2, 2, 2, 2, 1, 1, 1, 1,
1338 4, 3, 5, 0, 4, 5, 5, 5, 6, 7,
1339 6, 7, 2, 1, 1, 2, 3, 1, 1, 1,
1340 1, 1, 1, 1, 1, 2, 3, 2, 3, 2,
1341 2, 1, 1, 1, 0, 5, 6, 12, 9, 6,
1342 3, 0, 11, 8, 5, 3, 0, 3, 1, 1,
1343 4, 1, 1, 3, 3, 3, 3, 3, 3, 3,
1344 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1345 1, 5, 1, 3, 0, 3, 1, 2, 1, 1,
1346 1, 2, 2, 2, 3, 3, 2, 2, 2, 1,
1347 2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1348 1, 1, 1, 1, 1, 1, 2, 2, 3, 2,
1349 1, 3, 3, 2, 1, 4, 3, 1, 2, 1,
1350 10, 11, 9, 9, 8, 11, 8, 5, 2, 4,
1351 0, 1, 2, 1, 1, 2, 2, 3, 4, 4,
1352 1, 3, 1, 3, 1, 2, 3, 6, 7, 2,
1353 1, 1, 2, 2, 3, 3, 3, 3, 7, 8,
1354 3, 1, 3, 1, 7, 8, 3, 1, 7, 8,
1358 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1359 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1360 means the default is an error. */
1361 static const yytype_uint8 yydefact[] =
1363 0, 0, 0, 6, 8, 9, 7, 10, 11, 0,
1364 0, 0, 16, 0, 5, 0, 17, 18, 19, 0,
1365 0, 0, 0, 1, 12, 4, 13, 14, 15, 3,
1366 0, 0, 0, 0, 0, 2, 0, 41, 42, 43,
1367 44, 0, 94, 0, 94, 0, 21, 40, 0, 33,
1368 0, 37, 38, 39, 34, 23, 183, 0, 181, 191,
1369 0, 187, 0, 0, 0, 0, 0, 35, 0, 0,
1370 0, 0, 113, 122, 123, 124, 120, 121, 117, 115,
1371 116, 118, 119, 114, 100, 109, 0, 0, 98, 99,
1372 111, 0, 0, 0, 20, 32, 0, 94, 0, 0,
1373 22, 0, 0, 0, 0, 0, 0, 0, 36, 0,
1374 0, 66, 96, 0, 92, 0, 0, 101, 108, 0,
1375 102, 110, 107, 0, 0, 125, 97, 112, 106, 103,
1376 0, 0, 134, 0, 130, 0, 0, 0, 54, 0,
1377 195, 192, 194, 0, 182, 0, 0, 180, 0, 190,
1378 0, 0, 186, 0, 0, 0, 0, 0, 0, 93,
1379 0, 61, 104, 0, 0, 126, 127, 105, 0, 0,
1380 0, 129, 0, 133, 0, 0, 0, 0, 0, 53,
1381 54, 0, 0, 52, 51, 0, 0, 0, 0, 0,
1382 23, 193, 178, 0, 188, 0, 184, 0, 0, 139,
1383 147, 90, 0, 0, 0, 0, 0, 0, 0, 0,
1384 0, 0, 0, 0, 0, 68, 0, 64, 95, 0,
1385 0, 0, 0, 0, 113, 100, 0, 0, 160, 162,
1386 164, 128, 137, 0, 132, 131, 0, 0, 0, 0,
1387 45, 0, 0, 0, 0, 47, 49, 0, 50, 55,
1388 0, 23, 23, 23, 0, 24, 179, 189, 185, 138,
1389 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1390 0, 0, 65, 0, 0, 0, 0, 59, 0, 101,
1391 102, 0, 165, 150, 0, 135, 0, 0, 0, 0,
1392 0, 46, 56, 150, 48, 0, 23, 25, 27, 26,
1393 0, 23, 0, 69, 73, 74, 75, 76, 195, 72,
1394 77, 71, 78, 79, 81, 80, 83, 82, 85, 84,
1395 87, 86, 89, 88, 67, 0, 91, 60, 0, 150,
1396 0, 0, 157, 166, 0, 0, 0, 161, 163, 136,
1397 0, 0, 150, 0, 0, 23, 30, 23, 28, 0,
1398 0, 63, 0, 0, 159, 158, 0, 0, 0, 148,
1399 151, 144, 150, 0, 0, 0, 146, 31, 29, 0,
1400 0, 0, 58, 142, 0, 171, 0, 0, 0, 0,
1401 0, 170, 152, 0, 0, 150, 143, 150, 70, 0,
1402 0, 0, 0, 0, 172, 0, 173, 0, 167, 169,
1403 149, 140, 0, 0, 62, 0, 168, 176, 174, 175,
1407 /* YYDEFGOTO[NTERM-NUM]. */
1408 static const yytype_int16 yydefgoto[] =
1410 -1, 11, 12, 13, 14, 15, 100, 48, 49, 50,
1411 183, 184, 185, 51, 52, 221, 53, 157, 214, 304,
1412 310, 215, 115, 70, 113, 226, 88, 89, 90, 91,
1413 126, 132, 133, 134, 233, 200, 54, 336, 359, 227,
1414 228, 229, 230, 380, 381, 16, 57, 58, 17, 62,
1418 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1420 #define YYPACT_NINF -325
1421 static const yytype_int16 yypact[] =
1423 144, -5, 92, -325, -325, -325, -325, -325, -325, 98,
1424 99, 123, -325, 144, 167, 78, -325, -325, -325, 161,
1425 121, 154, 182, -325, -325, 167, -325, -325, -325, 167,
1426 148, 179, 217, 227, 228, 167, 211, -325, -325, -325,
1427 -325, 237, 229, 326, 229, 234, -325, -325, 184, -325,
1428 292, -325, -325, -325, -325, 263, 261, -31, -325, -325,
1429 147, -325, 174, 268, 283, 309, 292, -325, 317, 330,
1430 331, 373, -325, -325, -325, -325, -325, -325, -325, -325,
1431 -325, -325, -325, -325, 346, 441, 390, 333, 294, -325,
1432 455, 334, 293, 335, -325, -325, 390, 229, 357, 364,
1433 -325, 75, 372, 38, 379, 50, 389, 95, -325, 298,
1434 398, 393, 367, 378, 394, 425, 469, -325, -325, 431,
1435 -325, 469, -325, 432, 408, 5, -325, 469, -325, 459,
1436 220, 446, -325, 390, -325, 421, 460, 470, 156, 178,
1437 -325, -325, -325, 458, -325, 434, 467, -325, 435, -325,
1438 472, 437, -325, 474, 202, 442, 221, 39, 330, -325,
1439 477, 443, -325, 444, 407, 294, -325, -325, 445, 482,
1440 483, -325, -6, -325, 484, 390, 449, -6, 390, 101,
1441 31, 407, 15, 447, 487, 450, -15, 452, 453, 480,
1442 263, -325, -325, 454, -325, 456, -325, 457, 488, -325,
1443 -325, -325, 461, 462, 463, 464, 465, 466, 468, 471,
1444 473, 475, 476, 478, -23, -325, 479, -325, -325, 390,
1445 496, 497, 407, 424, 481, 14, 498, 485, -325, 486,
1446 -325, -325, -325, 201, -325, -325, 489, 499, 407, 506,
1447 -325, 503, 490, 492, 504, -325, -325, 101, -325, -325,
1448 100, 263, 263, 263, 104, -325, -325, -325, -325, -325,
1449 2, 2, 75, 75, 7, 330, 390, 208, 266, 269,
1450 274, 327, -325, 221, 511, 493, 494, 500, 495, 222,
1451 223, 390, 87, 519, 356, -325, 520, 407, 491, 501,
1452 505, -325, -325, 519, -325, 502, 263, -325, -325, -325,
1453 507, 263, 509, -325, -325, -325, -325, -325, 509, -325,
1454 -325, -325, -325, -325, -325, -325, -325, -325, -325, -325,
1455 -325, -325, -325, -325, -325, 58, -325, -325, 516, 519,
1456 390, 390, -325, 510, 523, 32, 202, -325, -325, -325,
1457 512, 407, 519, 407, 202, 263, -325, 263, -325, 513,
1458 508, -325, 71, 202, -325, -325, 533, 88, 530, 536,
1459 -325, -325, 519, 514, 202, 515, -325, -325, -325, 517,
1460 532, 521, -325, -325, 88, -325, 518, 64, 83, 522,
1461 63, -325, -325, 32, 202, 519, -325, 519, -325, 524,
1462 535, 81, 75, 75, -325, 75, -325, 75, -325, -325,
1463 -325, -325, 202, 202, -325, 525, -325, -325, -325, -325,
1464 -325, -325, -325, -325
1467 /* YYPGOTO[NTERM-NUM]. */
1468 static const yytype_int16 yypgoto[] =
1470 -325, -325, 103, 110, 549, -325, -188, -325, 527, -25,
1471 382, 347, 387, -325, -325, -325, -325, -325, -325, 22,
1472 -325, 296, -325, -35, -153, -42, -325, -68, -325, -65,
1473 -94, 440, -325, -84, -325, -324, -22, -286, 189, -177,
1474 -256, -325, 295, 204, -154, 175, -325, 526, 196, -325,
1478 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1479 positive, shift that token. If negative, reduce the rule which
1480 number is the opposite. If zero, do what YYDEFACT says.
1481 If YYTABLE_NINF, syntax error. */
1482 #define YYTABLE_NINF -157
1483 static const yytype_int16 yytable[] =
1485 144, 87, 255, 118, 243, 218, 119, 344, 98, 92,
1486 165, 66, 361, 168, 67, 250, 19, 122, 86, 280,
1487 366, 302, 128, 102, 110, 332, 308, 141, 103, 373,
1488 142, 166, 303, 272, 140, 141, 273, 303, 142, 66,
1489 386, 251, 108, 353, 123, 278, 171, 173, 118, 169,
1490 179, 140, 141, 118, 136, 142, 364, 56, 216, 118,
1491 401, 289, 137, 297, 298, 299, 125, 131, 244, 149,
1492 -154, 231, 143, 281, 354, 355, 384, 350, 411, 412,
1493 143, 245, 375, 140, 141, 358, 234, 142, 235, 182,
1494 371, 174, 146, 171, 140, 141, 217, 143, 142, 402,
1495 375, 403, 140, 141, 150, 170, 142, 375, 346, 333,
1496 340, 20, 312, 348, 152, 351, 24, 21, 22, 398,
1497 240, 376, 393, 23, 29, 377, 378, 379, 372, 143,
1498 295, 30, 24, 237, 300, 35, 239, 406, 24, 376,
1499 143, 395, 334, 377, 378, 379, 376, 1, 143, 153,
1500 377, 378, 379, 2, 241, 118, 296, 367, 119, 368,
1501 301, 306, 307, 311, 363, 31, 365, 36, 3, 4,
1502 5, 6, 7, 8, 32, 179, 2, 275, 180, 37,
1503 38, 39, 40, 41, 42, 43, 44, 45, 26, 9,
1504 10, 3, 4, 5, 6, 7, 8, 186, 187, 188,
1505 55, 104, 46, 36, 26, 47, 105, 33, 189, 27,
1506 26, 181, 9, 10, 182, 37, 38, 39, 40, 41,
1507 42, 43, 44, 45, 313, 27, 399, 314, 106, 315,
1508 63, 27, 64, 107, 190, 34, 56, 399, 94, 168,
1509 201, 47, 37, 38, 39, 40, 59, 61, 43, 44,
1510 45, 37, 38, 39, 40, 198, 68, 285, 28, 199,
1511 286, 202, 203, 204, 205, 206, 65, 207, 208, 209,
1512 210, 211, 212, 213, 28, 169, 394, 396, -156, -155,
1513 28, 330, 331, 305, 69, 316, 309, 317, 318, 93,
1514 319, 407, 408, 320, 409, 321, 410, 71, 72, 73,
1515 74, 75, 63, 76, 77, 78, 79, 80, 81, 82,
1516 83, 84, 130, 85, 37, 38, 39, 40, 99, 101,
1517 43, 44, 45, 65, 37, 38, 39, 40, 109, 96,
1518 97, 71, 72, 73, 74, 75, 111, 76, 77, 78,
1519 79, 80, 81, 82, 83, 84, 322, 85, 323, 112,
1520 114, 120, 124, 129, 154, 125, 135, 37, 38, 39,
1521 40, 71, 72, 73, 74, 75, 337, 76, 77, 78,
1522 79, 80, 81, 82, 83, 84, 138, 85, 116, 72,
1523 73, 74, 75, 139, 76, 77, 78, 79, 80, 81,
1524 82, 83, 117, 145, 85, 71, 72, 73, 74, 75,
1525 148, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1526 151, 85, 223, 224, 73, 74, 75, 155, 76, 77,
1527 78, 79, 80, 81, 82, 83, 225, 158, 85, 116,
1528 72, 73, 74, 75, 159, 76, 77, 78, 79, 80,
1529 81, 82, 83, 279, 161, 85, 121, 72, 156, 160,
1530 162, 163, 76, 77, 78, 79, 80, 81, 82, 83,
1531 127, 72, 85, 164, 167, 172, 76, 77, 78, 79,
1532 80, 81, 82, 83, 116, 72, 85, 175, 191, 176,
1533 76, 77, 78, 79, 80, 81, 82, 83, 193, 177,
1534 85, 192, 194, 195, 196, 197, 219, 181, 220, 222,
1535 169, 232, 168, 236, 238, 182, 247, 249, 252, 253,
1536 254, 256, 259, 257, 258, 276, 277, 282, 288, 260,
1537 261, 262, 263, 264, 265, 290, 266, 291, 294, 267,
1538 246, 268, 274, 269, 270, 325, 271, -153, 335, 339,
1539 352, 283, 357, 369, 287, 284, 341, 292, 293, 326,
1540 327, 329, 374, 328, 382, 383, 389, 342, 345, 405,
1541 343, 370, 25, 347, 349, 356, 248, 242, 362, 324,
1542 385, 387, 400, 388, 390, 95, 392, 178, 391, 338,
1543 397, 404, 413, 0, 0, 0, 0, 0, 0, 0,
1544 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1545 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1546 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1547 0, 0, 0, 0, 0, 0, 0, 0, 0, 147
1550 static const yytype_int16 yycheck[] =
1552 101, 43, 190, 71, 181, 158, 71, 293, 50, 44,
1553 5, 36, 336, 19, 36, 30, 21, 85, 43, 5,
1554 344, 19, 90, 54, 66, 281, 19, 20, 59, 353,
1555 23, 125, 30, 56, 19, 20, 59, 30, 23, 64,
1556 364, 56, 64, 329, 86, 222, 130, 131, 116, 55,
1557 19, 19, 20, 121, 96, 23, 342, 19, 19, 127,
1558 384, 238, 97, 251, 252, 253, 61, 92, 53, 19,
1559 56, 165, 65, 59, 330, 331, 362, 19, 402, 403,
1560 65, 182, 19, 19, 20, 53, 170, 23, 172, 58,
1561 19, 133, 54, 177, 19, 20, 57, 65, 23, 385,
1562 19, 387, 19, 20, 54, 130, 23, 19, 296, 22,
1563 287, 19, 265, 301, 19, 57, 13, 19, 19, 56,
1564 19, 58, 58, 0, 14, 62, 63, 64, 57, 65,
1565 30, 53, 29, 175, 30, 25, 178, 56, 35, 58,
1566 65, 58, 55, 62, 63, 64, 58, 3, 65, 54,
1567 62, 63, 64, 9, 53, 223, 56, 345, 223, 347,
1568 56, 262, 263, 264, 341, 4, 343, 19, 24, 25,
1569 26, 27, 28, 29, 53, 19, 9, 219, 22, 31,
1570 32, 33, 34, 35, 36, 37, 38, 39, 13, 45,
1571 46, 24, 25, 26, 27, 28, 29, 19, 20, 21,
1572 21, 54, 54, 19, 29, 57, 59, 53, 30, 13,
1573 35, 55, 45, 46, 58, 31, 32, 33, 34, 35,
1574 36, 37, 38, 39, 266, 29, 380, 19, 54, 21,
1575 19, 35, 21, 59, 56, 53, 19, 391, 54, 19,
1576 19, 57, 31, 32, 33, 34, 19, 19, 37, 38,
1577 39, 31, 32, 33, 34, 53, 19, 56, 13, 57,
1578 59, 40, 41, 42, 43, 44, 55, 46, 47, 48,
1579 49, 50, 51, 52, 29, 55, 377, 378, 56, 56,
1580 35, 59, 59, 261, 55, 19, 264, 21, 19, 55,
1581 21, 392, 393, 19, 395, 21, 397, 5, 6, 7,
1582 8, 9, 19, 11, 12, 13, 14, 15, 16, 17,
1583 18, 19, 19, 21, 31, 32, 33, 34, 55, 58,
1584 37, 38, 39, 55, 31, 32, 33, 34, 19, 37,
1585 38, 5, 6, 7, 8, 9, 19, 11, 12, 13,
1586 14, 15, 16, 17, 18, 19, 19, 21, 21, 19,
1587 19, 5, 19, 19, 56, 61, 21, 31, 32, 33,
1588 34, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1589 14, 15, 16, 17, 18, 19, 19, 21, 5, 6,
1590 7, 8, 9, 19, 11, 12, 13, 14, 15, 16,
1591 17, 18, 19, 21, 21, 5, 6, 7, 8, 9,
1592 21, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1593 21, 21, 5, 6, 7, 8, 9, 19, 11, 12,
1594 13, 14, 15, 16, 17, 18, 19, 60, 21, 5,
1595 6, 7, 8, 9, 56, 11, 12, 13, 14, 15,
1596 16, 17, 18, 19, 19, 21, 5, 6, 55, 55,
1597 19, 19, 11, 12, 13, 14, 15, 16, 17, 18,
1598 5, 6, 21, 55, 5, 19, 11, 12, 13, 14,
1599 15, 16, 17, 18, 5, 6, 21, 56, 20, 19,
1600 11, 12, 13, 14, 15, 16, 17, 18, 21, 19,
1601 21, 57, 57, 21, 57, 21, 19, 55, 55, 55,
1602 55, 19, 19, 19, 55, 58, 19, 57, 56, 56,
1603 30, 57, 24, 57, 57, 19, 19, 19, 19, 58,
1604 58, 58, 58, 58, 58, 19, 58, 24, 24, 58,
1605 183, 58, 53, 58, 58, 24, 58, 56, 19, 19,
1606 24, 56, 19, 30, 55, 59, 55, 57, 56, 56,
1607 56, 56, 19, 53, 24, 19, 24, 56, 56, 24,
1608 55, 53, 13, 56, 55, 55, 184, 180, 56, 273,
1609 56, 56, 383, 56, 53, 48, 58, 137, 374, 284,
1610 58, 57, 57, -1, -1, -1, -1, -1, -1, -1,
1611 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1612 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1613 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1614 -1, -1, -1, -1, -1, -1, -1, -1, -1, 103
1617 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1618 symbol of state STATE-NUM. */
1619 static const yytype_uint8 yystos[] =
1621 0, 3, 9, 24, 25, 26, 27, 28, 29, 45,
1622 46, 67, 68, 69, 70, 71, 111, 114, 116, 21,
1623 19, 19, 19, 0, 68, 70, 111, 114, 116, 69,
1624 53, 4, 53, 53, 53, 69, 19, 31, 32, 33,
1625 34, 35, 36, 37, 38, 39, 54, 57, 73, 74,
1626 75, 79, 80, 82, 102, 21, 19, 112, 113, 19,
1627 117, 19, 115, 19, 21, 55, 75, 102, 19, 55,
1628 89, 5, 6, 7, 8, 9, 11, 12, 13, 14,
1629 15, 16, 17, 18, 19, 21, 75, 91, 92, 93,
1630 94, 95, 89, 55, 54, 74, 37, 38, 91, 55,
1631 72, 58, 54, 59, 54, 59, 54, 59, 102, 19,
1632 91, 19, 19, 90, 19, 88, 5, 19, 93, 95,
1633 5, 5, 93, 91, 19, 61, 96, 5, 93, 19,
1634 19, 75, 97, 98, 99, 21, 91, 89, 19, 19,
1635 19, 20, 23, 65, 118, 21, 54, 113, 21, 19,
1636 54, 21, 19, 54, 56, 19, 55, 83, 60, 56,
1637 55, 19, 19, 19, 55, 5, 96, 5, 19, 55,
1638 75, 99, 19, 99, 91, 56, 19, 19, 97, 19,
1639 22, 55, 58, 76, 77, 78, 19, 20, 21, 30,
1640 56, 20, 57, 21, 57, 21, 57, 21, 53, 57,
1641 101, 19, 40, 41, 42, 43, 44, 46, 47, 48,
1642 49, 50, 51, 52, 84, 87, 19, 57, 90, 19,
1643 55, 81, 55, 5, 6, 19, 91, 105, 106, 107,
1644 108, 96, 19, 100, 99, 99, 19, 91, 55, 91,
1645 19, 53, 78, 105, 53, 118, 77, 19, 76, 57,
1646 30, 56, 56, 56, 30, 72, 57, 57, 57, 24,
1647 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
1648 58, 58, 56, 59, 53, 91, 19, 19, 105, 19,
1649 5, 59, 19, 56, 59, 56, 59, 55, 19, 105,
1650 19, 24, 57, 56, 24, 30, 56, 72, 72, 72,
1651 30, 56, 19, 30, 85, 85, 118, 118, 19, 85,
1652 86, 118, 90, 91, 19, 21, 19, 21, 19, 21,
1653 19, 21, 19, 21, 87, 24, 56, 56, 53, 56,
1654 59, 59, 106, 22, 55, 19, 103, 10, 108, 19,
1655 105, 55, 56, 55, 103, 56, 72, 56, 72, 55,
1656 19, 57, 24, 103, 106, 106, 55, 19, 53, 104,
1657 118, 101, 56, 105, 103, 105, 101, 72, 72, 30,
1658 53, 19, 57, 101, 19, 19, 58, 62, 63, 64,
1659 109, 110, 24, 19, 103, 56, 101, 56, 56, 24,
1660 53, 109, 58, 58, 118, 58, 118, 58, 56, 110,
1661 104, 101, 103, 103, 57, 24, 56, 118, 118, 118,
1665 #define yyerrok (yyerrstatus = 0)
1666 #define yyclearin (yychar = YYEMPTY)
1667 #define YYEMPTY (-2)
1670 #define YYACCEPT goto yyacceptlab
1671 #define YYABORT goto yyabortlab
1672 #define YYERROR goto yyerrorlab
1675 /* Like YYERROR except do call yyerror. This remains here temporarily
1676 to ease the transition to the new meaning of YYERROR, for GCC.
1677 Once GCC version 2 has supplanted version 1, this can go. */
1679 #define YYFAIL goto yyerrlab
1681 #define YYRECOVERING() (!!yyerrstatus)
1683 #define YYBACKUP(Token, Value) \
1685 if (yychar == YYEMPTY && yylen == 1) \
1689 yytoken = YYTRANSLATE (yychar); \
1695 yyerror (YY_("syntax error: cannot back up")); \
1702 #define YYERRCODE 256
1705 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1706 If N is 0, then set CURRENT to the empty location which ends
1707 the previous symbol: RHS[0] (always defined). */
1709 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1710 #ifndef YYLLOC_DEFAULT
1711 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1715 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1716 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1717 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1718 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1722 (Current).first_line = (Current).last_line = \
1723 YYRHSLOC (Rhs, 0).last_line; \
1724 (Current).first_column = (Current).last_column = \
1725 YYRHSLOC (Rhs, 0).last_column; \
1731 /* YY_LOCATION_PRINT -- Print the location on the stream.
1732 This macro was not mandated originally: define only if we know
1733 we won't break user code: when these are the locations we know. */
1735 #ifndef YY_LOCATION_PRINT
1736 # if YYLTYPE_IS_TRIVIAL
1737 # define YY_LOCATION_PRINT(File, Loc) \
1738 fprintf (File, "%d.%d-%d.%d", \
1739 (Loc).first_line, (Loc).first_column, \
1740 (Loc).last_line, (Loc).last_column)
1742 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1747 /* YYLEX -- calling `yylex' with the right arguments. */
1750 # define YYLEX yylex (YYLEX_PARAM)
1752 # define YYLEX yylex ()
1755 /* Enable debugging if requested. */
1759 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1760 # define YYFPRINTF fprintf
1763 # define YYDPRINTF(Args) \
1769 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1773 YYFPRINTF (stderr, "%s ", Title); \
1774 yy_symbol_print (stderr, \
1776 YYFPRINTF (stderr, "\n"); \
1781 /*--------------------------------.
1782 | Print this symbol on YYOUTPUT. |
1783 `--------------------------------*/
1786 #if (defined __STDC__ || defined __C99__FUNC__ \
1787 || defined __cplusplus || defined _MSC_VER)
1789 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1792 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1795 YYSTYPE const * const yyvaluep;
1801 if (yytype < YYNTOKENS)
1802 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1814 /*--------------------------------.
1815 | Print this symbol on YYOUTPUT. |
1816 `--------------------------------*/
1818 #if (defined __STDC__ || defined __C99__FUNC__ \
1819 || defined __cplusplus || defined _MSC_VER)
1821 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1824 yy_symbol_print (yyoutput, yytype, yyvaluep)
1827 YYSTYPE const * const yyvaluep;
1830 if (yytype < YYNTOKENS)
1831 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1833 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1835 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1836 YYFPRINTF (yyoutput, ")");
1839 /*------------------------------------------------------------------.
1840 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1842 `------------------------------------------------------------------*/
1844 #if (defined __STDC__ || defined __C99__FUNC__ \
1845 || defined __cplusplus || defined _MSC_VER)
1847 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1850 yy_stack_print (bottom, top)
1851 yytype_int16 *bottom;
1855 YYFPRINTF (stderr, "Stack now");
1856 for (; bottom <= top; ++bottom)
1857 YYFPRINTF (stderr, " %d", *bottom);
1858 YYFPRINTF (stderr, "\n");
1861 # define YY_STACK_PRINT(Bottom, Top) \
1864 yy_stack_print ((Bottom), (Top)); \
1868 /*------------------------------------------------.
1869 | Report that the YYRULE is going to be reduced. |
1870 `------------------------------------------------*/
1872 #if (defined __STDC__ || defined __C99__FUNC__ \
1873 || defined __cplusplus || defined _MSC_VER)
1875 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1878 yy_reduce_print (yyvsp, yyrule)
1883 int yynrhs = yyr2[yyrule];
1885 unsigned long int yylno = yyrline[yyrule];
1886 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1888 /* The symbols being reduced. */
1889 for (yyi = 0; yyi < yynrhs; yyi++)
1891 fprintf (stderr, " $%d = ", yyi + 1);
1892 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1893 &(yyvsp[(yyi + 1) - (yynrhs)])
1895 fprintf (stderr, "\n");
1899 # define YY_REDUCE_PRINT(Rule) \
1902 yy_reduce_print (yyvsp, Rule); \
1905 /* Nonzero means print parse trace. It is left uninitialized so that
1906 multiple parsers can coexist. */
1908 #else /* !YYDEBUG */
1909 # define YYDPRINTF(Args)
1910 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1911 # define YY_STACK_PRINT(Bottom, Top)
1912 # define YY_REDUCE_PRINT(Rule)
1913 #endif /* !YYDEBUG */
1916 /* YYINITDEPTH -- initial size of the parser's stacks. */
1918 # define YYINITDEPTH 200
1921 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1922 if the built-in stack extension method is used).
1924 Do not make this value too large; the results are undefined if
1925 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1926 evaluated with infinite-precision integer arithmetic. */
1929 # define YYMAXDEPTH 10000
1937 # if defined __GLIBC__ && defined _STRING_H
1938 # define yystrlen strlen
1940 /* Return the length of YYSTR. */
1941 #if (defined __STDC__ || defined __C99__FUNC__ \
1942 || defined __cplusplus || defined _MSC_VER)
1944 yystrlen (const char *yystr)
1952 for (yylen = 0; yystr[yylen]; yylen++)
1960 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1961 # define yystpcpy stpcpy
1963 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1965 #if (defined __STDC__ || defined __C99__FUNC__ \
1966 || defined __cplusplus || defined _MSC_VER)
1968 yystpcpy (char *yydest, const char *yysrc)
1971 yystpcpy (yydest, yysrc)
1977 const char *yys = yysrc;
1979 while ((*yyd++ = *yys++) != '\0')
1988 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1989 quotes and backslashes, so that it's suitable for yyerror. The
1990 heuristic is that double-quoting is unnecessary unless the string
1991 contains an apostrophe, a comma, or backslash (other than
1992 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1993 null, do not copy; instead, return the length of what the result
1996 yytnamerr (char *yyres, const char *yystr)
2001 char const *yyp = yystr;
2008 goto do_not_strip_quotes;
2012 goto do_not_strip_quotes;
2025 do_not_strip_quotes: ;
2029 return yystrlen (yystr);
2031 return yystpcpy (yyres, yystr) - yyres;
2035 /* Copy into YYRESULT an error message about the unexpected token
2036 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2037 including the terminating null byte. If YYRESULT is null, do not
2038 copy anything; just return the number of bytes that would be
2039 copied. As a special case, return 0 if an ordinary "syntax error"
2040 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2041 size calculation. */
2043 yysyntax_error (char *yyresult, int yystate, int yychar)
2045 int yyn = yypact[yystate];
2047 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2051 int yytype = YYTRANSLATE (yychar);
2052 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2053 YYSIZE_T yysize = yysize0;
2055 int yysize_overflow = 0;
2056 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2057 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2061 /* This is so xgettext sees the translatable formats that are
2062 constructed on the fly. */
2063 YY_("syntax error, unexpected %s");
2064 YY_("syntax error, unexpected %s, expecting %s");
2065 YY_("syntax error, unexpected %s, expecting %s or %s");
2066 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2067 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2071 static char const yyunexpected[] = "syntax error, unexpected %s";
2072 static char const yyexpecting[] = ", expecting %s";
2073 static char const yyor[] = " or %s";
2074 char yyformat[sizeof yyunexpected
2075 + sizeof yyexpecting - 1
2076 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2077 * (sizeof yyor - 1))];
2078 char const *yyprefix = yyexpecting;
2080 /* Start YYX at -YYN if negative to avoid negative indexes in
2082 int yyxbegin = yyn < 0 ? -yyn : 0;
2084 /* Stay within bounds of both yycheck and yytname. */
2085 int yychecklim = YYLAST - yyn + 1;
2086 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2089 yyarg[0] = yytname[yytype];
2090 yyfmt = yystpcpy (yyformat, yyunexpected);
2092 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2093 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2095 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2099 yyformat[sizeof yyunexpected - 1] = '\0';
2102 yyarg[yycount++] = yytname[yyx];
2103 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2104 yysize_overflow |= (yysize1 < yysize);
2106 yyfmt = yystpcpy (yyfmt, yyprefix);
2110 yyf = YY_(yyformat);
2111 yysize1 = yysize + yystrlen (yyf);
2112 yysize_overflow |= (yysize1 < yysize);
2115 if (yysize_overflow)
2116 return YYSIZE_MAXIMUM;
2120 /* Avoid sprintf, as that infringes on the user's name space.
2121 Don't have undefined behavior even if the translation
2122 produced a string with the wrong number of "%s"s. */
2123 char *yyp = yyresult;
2125 while ((*yyp = *yyf) != '\0')
2127 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2129 yyp += yytnamerr (yyp, yyarg[yyi++]);
2142 #endif /* YYERROR_VERBOSE */
2145 /*-----------------------------------------------.
2146 | Release the memory associated to this symbol. |
2147 `-----------------------------------------------*/
2150 #if (defined __STDC__ || defined __C99__FUNC__ \
2151 || defined __cplusplus || defined _MSC_VER)
2153 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2156 yydestruct (yymsg, yytype, yyvaluep)
2166 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2177 /* Prevent warnings from -Wmissing-prototypes. */
2179 #ifdef YYPARSE_PARAM
2180 #if defined __STDC__ || defined __cplusplus
2181 int yyparse (void *YYPARSE_PARAM);
2185 #else /* ! YYPARSE_PARAM */
2186 #if defined __STDC__ || defined __cplusplus
2191 #endif /* ! YYPARSE_PARAM */
2195 /* The look-ahead symbol. */
2198 /* The semantic value of the look-ahead symbol. */
2201 /* Number of syntax errors so far. */
2210 #ifdef YYPARSE_PARAM
2211 #if (defined __STDC__ || defined __C99__FUNC__ \
2212 || defined __cplusplus || defined _MSC_VER)
2214 yyparse (void *YYPARSE_PARAM)
2217 yyparse (YYPARSE_PARAM)
2218 void *YYPARSE_PARAM;
2220 #else /* ! YYPARSE_PARAM */
2221 #if (defined __STDC__ || defined __C99__FUNC__ \
2222 || defined __cplusplus || defined _MSC_VER)
2236 /* Number of tokens to shift before error messages enabled. */
2238 /* Look-ahead token as an internal (translated) token number. */
2241 /* Buffer for error messages, and its allocated size. */
2243 char *yymsg = yymsgbuf;
2244 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2247 /* Three stacks and their tools:
2248 `yyss': related to states,
2249 `yyvs': related to semantic values,
2250 `yyls': related to locations.
2252 Refer to the stacks thru separate pointers, to allow yyoverflow
2253 to reallocate them elsewhere. */
2255 /* The state stack. */
2256 yytype_int16 yyssa[YYINITDEPTH];
2257 yytype_int16 *yyss = yyssa;
2258 yytype_int16 *yyssp;
2260 /* The semantic value stack. */
2261 YYSTYPE yyvsa[YYINITDEPTH];
2262 YYSTYPE *yyvs = yyvsa;
2267 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2269 YYSIZE_T yystacksize = YYINITDEPTH;
2271 /* The variables used to return semantic value and location from the
2276 /* The number of symbols on the RHS of the reduced rule.
2277 Keep to zero when no symbol should be popped. */
2280 YYDPRINTF ((stderr, "Starting parse\n"));
2285 yychar = YYEMPTY; /* Cause a token to be read. */
2287 /* Initialize stack pointers.
2288 Waste one element of value and location stack
2289 so that they stay on the same level as the state stack.
2290 The wasted elements are never initialized. */
2297 /*------------------------------------------------------------.
2298 | yynewstate -- Push a new state, which is found in yystate. |
2299 `------------------------------------------------------------*/
2301 /* In all cases, when you get here, the value and location stacks
2302 have just been pushed. So pushing a state here evens the stacks. */
2308 if (yyss + yystacksize - 1 <= yyssp)
2310 /* Get the current used size of the three stacks, in elements. */
2311 YYSIZE_T yysize = yyssp - yyss + 1;
2315 /* Give user a chance to reallocate the stack. Use copies of
2316 these so that the &'s don't force the real ones into
2318 YYSTYPE *yyvs1 = yyvs;
2319 yytype_int16 *yyss1 = yyss;
2322 /* Each stack pointer address is followed by the size of the
2323 data in use in that stack, in bytes. This used to be a
2324 conditional around just the two extra args, but that might
2325 be undefined if yyoverflow is a macro. */
2326 yyoverflow (YY_("memory exhausted"),
2327 &yyss1, yysize * sizeof (*yyssp),
2328 &yyvs1, yysize * sizeof (*yyvsp),
2335 #else /* no yyoverflow */
2336 # ifndef YYSTACK_RELOCATE
2337 goto yyexhaustedlab;
2339 /* Extend the stack our own way. */
2340 if (YYMAXDEPTH <= yystacksize)
2341 goto yyexhaustedlab;
2343 if (YYMAXDEPTH < yystacksize)
2344 yystacksize = YYMAXDEPTH;
2347 yytype_int16 *yyss1 = yyss;
2348 union yyalloc *yyptr =
2349 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2351 goto yyexhaustedlab;
2352 YYSTACK_RELOCATE (yyss);
2353 YYSTACK_RELOCATE (yyvs);
2355 # undef YYSTACK_RELOCATE
2357 YYSTACK_FREE (yyss1);
2360 #endif /* no yyoverflow */
2362 yyssp = yyss + yysize - 1;
2363 yyvsp = yyvs + yysize - 1;
2366 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2367 (unsigned long int) yystacksize));
2369 if (yyss + yystacksize - 1 <= yyssp)
2373 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2382 /* Do appropriate processing given the current state. Read a
2383 look-ahead token if we need one and don't already have one. */
2385 /* First try to decide what to do without reference to look-ahead token. */
2386 yyn = yypact[yystate];
2387 if (yyn == YYPACT_NINF)
2390 /* Not known => get a look-ahead token if don't already have one. */
2392 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2393 if (yychar == YYEMPTY)
2395 YYDPRINTF ((stderr, "Reading a token: "));
2399 if (yychar <= YYEOF)
2401 yychar = yytoken = YYEOF;
2402 YYDPRINTF ((stderr, "Now at end of input.\n"));
2406 yytoken = YYTRANSLATE (yychar);
2407 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2410 /* If the proper action on seeing token YYTOKEN is to reduce or to
2411 detect an error, take that action. */
2413 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2418 if (yyn == 0 || yyn == YYTABLE_NINF)
2427 /* Count tokens shifted since error; after three, turn off error
2432 /* Shift the look-ahead token. */
2433 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2435 /* Discard the shifted token unless it is eof. */
2436 if (yychar != YYEOF)
2445 /*-----------------------------------------------------------.
2446 | yydefault -- do the default action for the current state. |
2447 `-----------------------------------------------------------*/
2449 yyn = yydefact[yystate];
2455 /*-----------------------------.
2456 | yyreduce -- Do a reduction. |
2457 `-----------------------------*/
2459 /* yyn is the number of a rule to reduce with. */
2462 /* If YYLEN is nonzero, implement the default value of the action:
2465 Otherwise, the following line sets YYVAL to garbage.
2466 This behavior is undocumented and Bison
2467 users should not rely upon it. Assigning to YYVAL
2468 unconditionally makes the parser a bit smaller, and it avoids a
2469 GCC warning that YYVAL may be used uninitialized. */
2470 yyval = yyvsp[1-yylen];
2473 YY_REDUCE_PRINT (yyn);
2499 Node *node = node_new (CCODE_NODE,
2501 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2502 "line_no", ccode_line,
2504 nodes = g_list_append(nodes,node);
2505 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2512 Node *node = node_new (CCODE_NODE,
2514 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2515 "line_no", ccode_line,
2517 nodes = g_list_append(nodes,node);
2518 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2525 Node *node = node_new (CCODE_NODE,
2527 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2528 "line_no", ccode_line,
2530 nodes = g_list_append(nodes,node);
2531 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2538 Node *node = node_new (CCODE_NODE,
2540 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2541 "line_no", ccode_line,
2543 nodes = g_list_append(nodes,node);
2544 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2551 Node *node = node_new (CCODE_NODE,
2553 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2554 "line_no", ccode_line,
2556 nodes = g_list_append(nodes,node);
2557 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2564 Node *node = node_new (CCODE_NODE,
2566 "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2567 "line_no", ccode_line,
2569 nodes = g_list_append(nodes,node);
2570 g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2617 ((Class *)class)->nodes = class_nodes;
2619 nodes = g_list_append(nodes,class);
2626 ((Class *)class)->nodes = NULL;
2628 nodes = g_list_append(nodes,class);
2635 class = node_new (CLASS_NODE,
2636 "otype:steal", (yyvsp[(2) - (5)].id),
2637 "ptype:steal", (yyvsp[(4) - (5)].id),
2638 "bonobo_object_class:steal", bonobo_object_class,
2639 "glade_xml", glade_xml,
2640 "interfaces:steal", interfaces,
2641 "chunk_size:steal", chunk_size,
2642 "abstract", abstract,
2644 bonobo_object_class = NULL;
2654 if(strcmp((yyvsp[(2) - (4)].id),"abstract") == 0) {
2657 yyerror(_("parse error"));
2666 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2667 g_free (chunk_size);
2668 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2669 } else if(strcmp((yyvsp[(2) - (5)].id),"BonoboObject") == 0) {
2670 g_free (bonobo_object_class);
2671 bonobo_object_class = g_strdup((yyvsp[(3) - (5)].id));
2673 yyerror(_("parse error"));
2682 if (strcmp ((yyvsp[(2) - (5)].id), "interface") == 0) {
2683 interfaces = g_list_append (interfaces,
2684 g_strdup ((yyvsp[(3) - (5)].id)));
2686 yyerror(_("parse error"));
2695 if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2696 g_free (chunk_size);
2697 if(atoi((yyvsp[(3) - (5)].id)) != 0)
2698 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2702 yyerror(_("parse error"));
2711 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2713 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2715 yyerror(_("parse error"));
2724 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2726 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2728 yyerror(_("parse error"));
2737 if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2739 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2741 yyerror(_("parse error"));
2750 if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2752 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2754 yyerror(_("parse error"));
2778 if (strcmp ((yyvsp[(1) - (2)].id), "BonoboObject") != 0) {
2779 g_free ((yyvsp[(1) - (2)].id));
2780 yyerror (_("parse error"));
2783 g_free ((yyvsp[(1) - (2)].id));
2784 last_added_method->bonobo_object_func = TRUE;
2791 if (strcmp ((yyvsp[(1) - (3)].id), "interface") != 0) {
2792 g_free ((yyvsp[(1) - (3)].id));
2793 g_free ((yyvsp[(2) - (3)].id));
2794 yyerror (_("parse error"));
2797 g_free ((yyvsp[(1) - (3)].id));
2798 node_set ((Node *)last_added_method,
2799 "interface:steal", (yyvsp[(2) - (3)].id),
2826 { the_scope = PUBLIC_SCOPE; }
2831 { the_scope = PRIVATE_SCOPE; }
2836 { the_scope = PROTECTED_SCOPE; }
2841 { the_scope = CLASS_SCOPE; }
2847 if (strcmp ((yyvsp[(1) - (2)].id), "destroywith") == 0) {
2848 g_free ((yyvsp[(1) - (2)].id));
2849 destructor_unref = FALSE;
2850 destructor = (yyvsp[(2) - (2)].id);
2851 destructor_line = line_no;
2852 destructor_simple = TRUE;
2853 } else if (strcmp ((yyvsp[(1) - (2)].id), "unrefwith") == 0) {
2854 g_free ((yyvsp[(1) - (2)].id));
2855 destructor_unref = TRUE;
2856 destructor = (yyvsp[(2) - (2)].id);
2857 destructor_line = line_no;
2858 destructor_simple = TRUE;
2860 g_free ((yyvsp[(1) - (2)].id));
2861 g_free ((yyvsp[(2) - (2)].id));
2862 yyerror (_("parse error"));
2871 if (strcmp ((yyvsp[(1) - (3)].id), "destroy") == 0) {
2872 g_free((yyvsp[(1) - (3)].id));
2873 destructor_unref = FALSE;
2874 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
2875 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
2876 destructor_line = ccode_line;
2877 destructor_simple = FALSE;
2878 } else if (strcmp ((yyvsp[(1) - (3)].id), "unref") == 0) {
2879 g_free ((yyvsp[(1) - (3)].id));
2880 destructor_unref = TRUE;
2881 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
2882 g_string_free ((yyvsp[(3) - (3)].cbuf), FALSE);
2883 destructor_line = ccode_line;
2884 destructor_simple = FALSE;
2886 g_free ((yyvsp[(1) - (3)].id));
2887 g_string_free ((yyvsp[(3) - (3)].cbuf), TRUE);
2888 yyerror (_("parse error"));
2897 initializer = (yyvsp[(2) - (2)].id);
2898 initializer_line = ccode_line;
2905 initializer = ((yyvsp[(3) - (3)].cbuf))->str;
2906 initializer_line = ccode_line;
2907 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
2923 { destructor = NULL; }
2928 { initializer = NULL; }
2934 if (strcmp ((yyvsp[(1) - (1)].id), "GladeXML") == 0) {
2935 glade_widget = TRUE;
2937 yyerror(_("parse error"));
2954 push_variable((yyvsp[(3) - (5)].id), the_scope,(yyvsp[(1) - (5)].line), NULL);
2961 push_variable((yyvsp[(3) - (6)].id), the_scope, (yyvsp[(1) - (6)].line), (yyvsp[(4) - (6)].id));
2969 if(strcmp((yyvsp[(6) - (12)].id),"get")==0 &&
2970 strcmp((yyvsp[(9) - (12)].id),"set")==0) {
2971 Type *type = pop_type();
2972 g_free ((yyvsp[(6) - (12)].id));
2973 g_free ((yyvsp[(9) - (12)].id));
2974 node = node_new (ARGUMENT_NODE,
2975 "gtktype:steal", (yyvsp[(3) - (12)].id),
2976 "atype:steal", type,
2977 "flags:steal", (yyvsp[(2) - (12)].list),
2978 "name:steal", (yyvsp[(4) - (12)].id),
2979 "get:steal", ((yyvsp[(8) - (12)].cbuf))->str,
2980 "get_line", (yyvsp[(7) - (12)].line),
2981 "set:steal", ((yyvsp[(11) - (12)].cbuf))->str,
2982 "set_line", (yyvsp[(10) - (12)].line),
2983 "line_no", (yyvsp[(1) - (12)].line),
2986 class_nodes = g_list_append(class_nodes,node);
2988 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
2989 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
2991 } else if(strcmp((yyvsp[(6) - (12)].id),"set")==0 &&
2992 strcmp((yyvsp[(9) - (12)].id),"get")==0) {
2993 Type *type = pop_type();
2994 g_free ((yyvsp[(6) - (12)].id));
2995 g_free ((yyvsp[(9) - (12)].id));
2996 node = node_new (ARGUMENT_NODE,
2997 "gtktype:steal", (yyvsp[(3) - (12)].id),
2998 "atype:steal", type,
2999 "flags:steal", (yyvsp[(2) - (12)].list),
3000 "name:steal", (yyvsp[(4) - (12)].id),
3001 "get:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3002 "get_line", (yyvsp[(10) - (12)].line),
3003 "set:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3004 "set_line", (yyvsp[(7) - (12)].line),
3005 "line_no", (yyvsp[(1) - (12)].line),
3007 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3008 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3009 class_nodes = g_list_append(class_nodes,node);
3011 g_free ((yyvsp[(3) - (12)].id));
3012 g_free ((yyvsp[(4) - (12)].id));
3013 g_free ((yyvsp[(6) - (12)].id));
3014 g_free ((yyvsp[(9) - (12)].id));
3015 g_list_foreach ((yyvsp[(2) - (12)].list), (GFunc)g_free, NULL);
3016 g_list_free ((yyvsp[(2) - (12)].list));
3017 g_string_free ((yyvsp[(11) - (12)].cbuf), TRUE);
3018 g_string_free ((yyvsp[(8) - (12)].cbuf), TRUE);
3019 yyerror (_("parse error"));
3023 if ((yyvsp[(5) - (12)].id) != NULL) {
3024 Argument *arg = (Argument *)node;
3025 export_accessors (arg->name,
3026 arg->get != NULL, arg->get_line,
3027 arg->set != NULL, arg->set_line,
3031 g_free ((yyvsp[(5) - (12)].id));
3038 #line 1058 "parse.y"
3041 if(strcmp((yyvsp[(6) - (9)].id), "get") == 0) {
3042 Type *type = pop_type();
3043 g_free ((yyvsp[(6) - (9)].id));
3044 node = node_new (ARGUMENT_NODE,
3045 "gtktype:steal", (yyvsp[(3) - (9)].id),
3046 "atype:steal", type,
3047 "flags:steal", (yyvsp[(2) - (9)].list),
3048 "name:steal", (yyvsp[(4) - (9)].id),
3049 "get:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3050 "get_line", (yyvsp[(7) - (9)].line),
3051 "line_no", (yyvsp[(1) - (9)].line),
3054 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3055 class_nodes = g_list_append(class_nodes, node);
3056 } else if(strcmp((yyvsp[(6) - (9)].id), "set") == 0) {
3057 Type *type = pop_type();
3058 g_free ((yyvsp[(6) - (9)].id));
3059 node = node_new (ARGUMENT_NODE,
3060 "gtktype:steal", (yyvsp[(3) - (9)].id),
3061 "atype:steal", type,
3062 "flags:steal", (yyvsp[(2) - (9)].list),
3063 "name:steal", (yyvsp[(4) - (9)].id),
3064 "set:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3065 "set_line", (yyvsp[(7) - (9)].line),
3066 "line_no", (yyvsp[(1) - (9)].line),
3069 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3070 class_nodes = g_list_append (class_nodes, node);
3072 g_free ((yyvsp[(6) - (9)].id));
3073 g_free ((yyvsp[(3) - (9)].id));
3074 g_free ((yyvsp[(4) - (9)].id));
3075 g_list_foreach ((yyvsp[(2) - (9)].list), (GFunc)g_free, NULL);
3076 g_list_free ((yyvsp[(2) - (9)].list));
3077 g_string_free ((yyvsp[(8) - (9)].cbuf), TRUE);
3078 yyerror(_("parse error"));
3082 if ((yyvsp[(5) - (9)].id) != NULL) {
3083 Argument *arg = (Argument *)node;
3084 export_accessors (arg->name,
3085 arg->get != NULL, arg->get_line,
3086 arg->set != NULL, arg->set_line,
3090 g_free ((yyvsp[(5) - (9)].id));
3096 #line 1112 "parse.y"
3099 char *get, *set = NULL;
3104 if(strcmp((yyvsp[(6) - (6)].id), "link")!=0 &&
3105 strcmp((yyvsp[(6) - (6)].id), "stringlink")!=0 &&
3106 strcmp((yyvsp[(6) - (6)].id), "objectlink")!=0) {
3107 g_free((yyvsp[(6) - (6)].id));
3108 g_free((yyvsp[(3) - (6)].id));
3109 g_free((yyvsp[(4) - (6)].id));
3110 g_list_foreach((yyvsp[(2) - (6)].list),(GFunc)g_free,NULL);
3111 g_list_free((yyvsp[(2) - (6)].list));
3112 yyerror(_("parse error"));
3118 var = find_var_or_die((yyvsp[(4) - (6)].id), (yyvsp[(1) - (6)].line));
3119 if(var->scope == PRIVATE_SCOPE) {
3120 root = "self->_priv";
3121 } else if(var->scope == CLASS_SCOPE) {
3122 root = "SELF_GET_CLASS(self)";
3124 error_print(GOB_ERROR, (yyvsp[(1) - (6)].line),
3125 _("Self aliases needed when autolinking to a classwide member"));
3130 if(strcmp((yyvsp[(6) - (6)].id), "link")==0) {
3131 set = g_strdup_printf("%s->%s = ARG;",
3132 root, (yyvsp[(4) - (6)].id));
3133 } else if(strcmp((yyvsp[(6) - (6)].id), "stringlink")==0) {
3134 set = g_strdup_printf("g_free (%s->%s); "
3135 "%s->%s = g_strdup (ARG);",
3136 root, (yyvsp[(4) - (6)].id),
3137 root, (yyvsp[(4) - (6)].id));
3138 } else if(strcmp((yyvsp[(6) - (6)].id), "objectlink")==0) {
3139 set = g_strdup_printf(
3141 "g_object_ref (G_OBJECT (ARG)); "
3142 "if (%s->%s != NULL) "
3143 "g_object_unref (G_OBJECT (%s->%s)); "
3145 root, (yyvsp[(4) - (6)].id),
3146 root, (yyvsp[(4) - (6)].id),
3147 root, (yyvsp[(4) - (6)].id));
3149 g_assert_not_reached();
3152 get = g_strdup_printf("ARG = %s->%s;", root, (yyvsp[(4) - (6)].id));
3154 g_free ((yyvsp[(6) - (6)].id));
3157 type = (Type *)node_copy ((Node *)var->vtype);
3159 node = node_new (ARGUMENT_NODE,
3160 "gtktype:steal", (yyvsp[(3) - (6)].id),
3161 "atype:steal", type,
3162 "flags:steal", (yyvsp[(2) - (6)].list),
3163 "name:steal", (yyvsp[(4) - (6)].id),
3165 "get_line", (yyvsp[(1) - (6)].line),
3167 "set_line", (yyvsp[(1) - (6)].line),
3168 "line_no", (yyvsp[(1) - (6)].line),
3171 if ((yyvsp[(5) - (6)].id) != NULL) {
3172 Argument *arg = (Argument *)node;
3173 export_accessors (arg->name,
3174 arg->get != NULL, arg->get_line,
3175 arg->set != NULL, arg->set_line,
3179 g_free ((yyvsp[(5) - (6)].id));
3182 class_nodes = g_list_append (class_nodes, node);
3187 #line 1201 "parse.y"
3189 if (strcmp ((yyvsp[(2) - (3)].id), "export")!=0) {
3190 g_free ((yyvsp[(2) - (3)].id));
3191 yyerror (_("parse error"));
3194 (yyval.id) = (yyvsp[(2) - (3)].id);
3199 #line 1209 "parse.y"
3206 #line 1214 "parse.y"
3209 node_set ((Node *)property,
3210 "line_no", (yyvsp[(1) - (11)].line),
3211 "gtktype:steal", debool ((yyvsp[(2) - (11)].id)),
3212 "name:steal", (yyvsp[(3) - (11)].id),
3214 if (strcmp ((yyvsp[(5) - (11)].id), "get") == 0 &&
3215 strcmp ((yyvsp[(8) - (11)].id), "set") == 0) {
3216 node_set ((Node *)property,
3217 "get:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3218 "get_line", (yyvsp[(6) - (11)].line),
3219 "set:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3220 "set_line", (yyvsp[(9) - (11)].line),
3222 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3223 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3224 g_free ((yyvsp[(5) - (11)].id));
3225 g_free ((yyvsp[(8) - (11)].id));
3226 } else if (strcmp ((yyvsp[(5) - (11)].id), "set") == 0 &&
3227 strcmp ((yyvsp[(8) - (11)].id), "get") == 0) {
3228 node_set ((Node *)property,
3229 "get:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3230 "get_line", (yyvsp[(9) - (11)].line),
3231 "set:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3232 "set_line", (yyvsp[(6) - (11)].line),
3234 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3235 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3236 g_free ((yyvsp[(5) - (11)].id));
3237 g_free ((yyvsp[(8) - (11)].id));
3239 g_string_free ((yyvsp[(7) - (11)].cbuf), TRUE);
3240 g_string_free ((yyvsp[(10) - (11)].cbuf), TRUE);
3241 g_free ((yyvsp[(5) - (11)].id));
3242 g_free ((yyvsp[(8) - (11)].id));
3243 node_free ((Node *)property);
3245 yyerror (_("parse error"));
3248 property_link_and_export ((Node *)property);
3249 if (property != NULL) {
3250 class_nodes = g_list_append (class_nodes,
3258 #line 1262 "parse.y"
3261 node_set ((Node *)property,
3262 "line_no", (yyvsp[(1) - (8)].line),
3263 "gtktype:steal", debool ((yyvsp[(2) - (8)].id)),
3264 "name:steal", (yyvsp[(3) - (8)].id),
3266 if (strcmp ((yyvsp[(5) - (8)].id), "get") == 0) {
3267 node_set ((Node *)property,
3268 "get:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3269 "get_line", (yyvsp[(6) - (8)].line),
3271 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3272 g_free ((yyvsp[(5) - (8)].id));
3273 } else if (strcmp ((yyvsp[(5) - (8)].id), "set") == 0) {
3274 node_set ((Node *)property,
3275 "set:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3276 "set_line", (yyvsp[(6) - (8)].line),
3278 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3279 g_free ((yyvsp[(5) - (8)].id));
3281 g_string_free ((yyvsp[(7) - (8)].cbuf), TRUE);
3282 g_free ((yyvsp[(5) - (8)].id));
3283 node_free ((Node *)property);
3285 yyerror (_("parse error"));
3288 property_link_and_export ((Node *)property);
3289 if (property != NULL) {
3290 class_nodes = g_list_append (class_nodes,
3298 #line 1298 "parse.y"
3301 node_set ((Node *)property,
3302 "line_no", (yyvsp[(1) - (5)].line),
3303 "gtktype:steal", debool ((yyvsp[(2) - (5)].id)),
3304 "name:steal", (yyvsp[(3) - (5)].id),
3306 property_link_and_export ((Node *)property);
3307 if (property != NULL) {
3308 class_nodes = g_list_append (class_nodes,
3316 #line 1314 "parse.y"
3321 #line 1315 "parse.y"
3326 #line 1318 "parse.y"
3331 #line 1319 "parse.y"
3336 #line 1322 "parse.y"
3337 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3341 #line 1323 "parse.y"
3343 if (strcmp ((yyvsp[(1) - (4)].id), "_") != 0) {
3344 g_free ((yyvsp[(1) - (4)].id));
3345 yyerror(_("parse error"));
3348 g_free ((yyvsp[(1) - (4)].id));
3349 (yyval.id) = g_strconcat ("_(", (yyvsp[(3) - (4)].id), ")", NULL);
3350 g_free ((yyvsp[(3) - (4)].id));
3355 #line 1335 "parse.y"
3356 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3360 #line 1336 "parse.y"
3361 { (yyval.id) = (yyvsp[(1) - (1)].id); }
3365 #line 1339 "parse.y"
3368 node_set ((Node *)property,
3369 "nick:steal", (yyvsp[(3) - (3)].id),
3375 #line 1345 "parse.y"
3378 node_set ((Node *)property,
3379 "blurb:steal", (yyvsp[(3) - (3)].id),
3385 #line 1351 "parse.y"
3388 node_set ((Node *)property,
3389 "maximum:steal", (yyvsp[(3) - (3)].id),
3395 #line 1357 "parse.y"
3398 node_set ((Node *)property,
3399 "minimum:steal", (yyvsp[(3) - (3)].id),
3405 #line 1363 "parse.y"
3408 node_set ((Node *)property,
3409 "default_value:steal", (yyvsp[(3) - (3)].id),
3415 #line 1369 "parse.y"
3418 node_set ((Node *)property,
3419 "flags:steal", (yyvsp[(3) - (3)].list),
3425 #line 1375 "parse.y"
3427 Type *type = pop_type ();
3429 node_set ((Node *)property,
3430 "ptype:steal", type,
3436 #line 1382 "parse.y"
3439 node_set ((Node *)property,
3440 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3446 #line 1388 "parse.y"
3449 node_set ((Node *)property,
3450 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3456 #line 1394 "parse.y"
3459 node_set ((Node *)property,
3460 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3466 #line 1400 "parse.y"
3469 node_set ((Node *)property,
3470 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3476 #line 1406 "parse.y"
3479 node_set ((Node *)property,
3480 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3486 #line 1412 "parse.y"
3489 node_set ((Node *)property,
3490 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3496 #line 1418 "parse.y"
3499 node_set ((Node *)property,
3500 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3506 #line 1424 "parse.y"
3509 node_set ((Node *)property,
3510 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3516 #line 1430 "parse.y"
3519 node_set ((Node *)property,
3520 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3526 #line 1436 "parse.y"
3529 node_set ((Node *)property,
3530 "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3536 #line 1442 "parse.y"
3539 if (strcmp ((yyvsp[(1) - (1)].id), "override") == 0) {
3540 g_free((yyvsp[(1) - (1)].id));
3541 node_set ((Node *)property,
3544 } else if (strcmp ((yyvsp[(1) - (1)].id), "link") == 0) {
3545 g_free((yyvsp[(1) - (1)].id));
3546 node_set ((Node *)property,
3549 } else if (strcmp ((yyvsp[(1) - (1)].id), "export") == 0) {
3550 g_free((yyvsp[(1) - (1)].id));
3551 node_set ((Node *)property,
3555 g_free((yyvsp[(1) - (1)].id));
3556 yyerror(_("parse error"));
3563 #line 1467 "parse.y"
3565 if(strcmp((yyvsp[(3) - (5)].id),"type")!=0) {
3566 g_free((yyvsp[(1) - (5)].id));
3567 g_free((yyvsp[(3) - (5)].id));
3568 yyerror(_("parse error"));
3571 (yyval.id) = debool ((yyvsp[(1) - (5)].id));
3576 #line 1476 "parse.y"
3578 (yyval.id) = debool ((yyvsp[(1) - (1)].id));
3579 typestack = g_list_prepend(typestack,NULL);
3584 #line 1482 "parse.y"
3585 { (yyval.list) = (yyvsp[(2) - (3)].list); }
3589 #line 1483 "parse.y"
3590 { (yyval.list) = NULL; }
3594 #line 1486 "parse.y"
3596 (yyval.list) = g_list_append((yyvsp[(3) - (3)].list),(yyvsp[(1) - (3)].id));
3601 #line 1489 "parse.y"
3603 (yyval.list) = g_list_append(NULL,(yyvsp[(1) - (1)].id));
3608 #line 1495 "parse.y"
3610 Node *node = node_new (TYPE_NODE,
3611 "name:steal", (yyvsp[(1) - (2)].id),
3612 "pointer:steal", (yyvsp[(2) - (2)].id),
3614 typestack = g_list_prepend(typestack,node);
3619 #line 1502 "parse.y"
3621 Node *node = node_new (TYPE_NODE,
3622 "name:steal", (yyvsp[(1) - (1)].id),
3624 typestack = g_list_prepend(typestack,node);
3629 #line 1511 "parse.y"
3631 (yyval.id) = (yyvsp[(1) - (1)].id);
3636 #line 1514 "parse.y"
3638 (yyval.id) = (yyvsp[(1) - (1)].id);
3643 #line 1517 "parse.y"
3645 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3646 g_free((yyvsp[(2) - (2)].id));
3651 #line 1521 "parse.y"
3653 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3654 g_free((yyvsp[(1) - (2)].id));
3659 #line 1525 "parse.y"
3661 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3662 g_free((yyvsp[(2) - (2)].id));
3667 #line 1529 "parse.y"
3669 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (3)].id), " ",
3670 (yyvsp[(3) - (3)].id), NULL);
3671 g_free((yyvsp[(3) - (3)].id));
3676 #line 1534 "parse.y"
3678 (yyval.id) = g_strconcat((yyvsp[(1) - (3)].id), " ",
3679 (yyvsp[(2) - (3)].id), " const", NULL);
3680 g_free((yyvsp[(2) - (3)].id));
3685 #line 1542 "parse.y"
3687 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3688 g_free((yyvsp[(2) - (2)].id));
3693 #line 1546 "parse.y"
3695 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3696 g_free((yyvsp[(1) - (2)].id));
3697 g_free((yyvsp[(2) - (2)].id));
3702 #line 1551 "parse.y"
3704 (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3705 g_free((yyvsp[(2) - (2)].id));
3710 #line 1555 "parse.y"
3712 (yyval.id) = (yyvsp[(1) - (1)].id);
3717 #line 1558 "parse.y"
3719 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3720 g_free((yyvsp[(1) - (2)].id));
3725 #line 1562 "parse.y"
3727 (yyval.id) = g_strdup((yyvsp[(1) - (1)].id));
3732 #line 1565 "parse.y"
3734 (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3739 #line 1570 "parse.y"
3740 { (yyval.id) = "void"; }
3744 #line 1571 "parse.y"
3745 { (yyval.id) = "char"; }
3749 #line 1572 "parse.y"
3750 { (yyval.id) = "short"; }
3754 #line 1573 "parse.y"
3755 { (yyval.id) = "int"; }
3759 #line 1574 "parse.y"
3760 { (yyval.id) = "long"; }
3764 #line 1575 "parse.y"
3765 { (yyval.id) = "float"; }
3769 #line 1576 "parse.y"
3770 { (yyval.id) = "double"; }
3774 #line 1577 "parse.y"
3775 { (yyval.id) = "signed"; }
3779 #line 1578 "parse.y"
3780 { (yyval.id) = "unsigned"; }
3784 #line 1581 "parse.y"
3785 { (yyval.id) = "struct"; }
3789 #line 1582 "parse.y"
3790 { (yyval.id) = "union"; }
3794 #line 1583 "parse.y"
3795 { (yyval.id) = "enum"; }
3799 #line 1586 "parse.y"
3800 { (yyval.id) = g_strdup("*"); }
3804 #line 1587 "parse.y"
3805 { (yyval.id) = g_strdup("* const"); }
3809 #line 1588 "parse.y"
3811 (yyval.id) = g_strconcat("*", (yyvsp[(2) - (2)].id), NULL);
3812 g_free((yyvsp[(2) - (2)].id));
3817 #line 1592 "parse.y"
3819 (yyval.id) = g_strconcat("* const", (yyvsp[(3) - (3)].id), NULL);
3820 g_free((yyvsp[(3) - (3)].id));
3825 #line 1599 "parse.y"
3827 if(strcmp((yyvsp[(1) - (2)].id), "first")==0)
3828 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
3829 else if(strcmp((yyvsp[(1) - (2)].id), "last")==0)
3830 (yyval.sigtype) = SIGNAL_LAST_METHOD;
3832 yyerror(_("signal must be 'first' or 'last'"));
3833 g_free((yyvsp[(1) - (2)].id));
3836 g_free((yyvsp[(1) - (2)].id));
3841 #line 1611 "parse.y"
3843 (yyval.sigtype) = SIGNAL_LAST_METHOD;
3848 #line 1617 "parse.y"
3850 if(strcmp((yyvsp[(2) - (3)].id),"first")==0)
3851 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
3852 else if(strcmp((yyvsp[(2) - (3)].id),"last")==0)
3853 (yyval.sigtype) = SIGNAL_LAST_METHOD;
3855 yyerror(_("signal must be 'first' or 'last'"));
3856 g_free((yyvsp[(2) - (3)].id));
3859 g_free((yyvsp[(2) - (3)].id));
3864 #line 1629 "parse.y"
3866 if(strcmp((yyvsp[(1) - (3)].id),"first")==0)
3867 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
3868 else if(strcmp((yyvsp[(1) - (3)].id),"last")==0)
3869 (yyval.sigtype) = SIGNAL_LAST_METHOD;
3871 yyerror(_("signal must be 'first' or 'last'"));
3872 g_free((yyvsp[(1) - (3)].id));
3875 g_free((yyvsp[(1) - (3)].id));
3880 #line 1641 "parse.y"
3882 (yyval.sigtype) = SIGNAL_LAST_METHOD;
3887 #line 1644 "parse.y"
3889 /* the_scope was default thus public */
3890 the_scope = PUBLIC_SCOPE;
3895 #line 1650 "parse.y"
3897 gtktypes = g_list_prepend(gtktypes, debool ((yyvsp[(1) - (4)].id)));
3902 #line 1655 "parse.y"
3904 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(3) - (3)].id)));
3909 #line 1658 "parse.y"
3911 gtktypes = g_list_append(gtktypes, debool ((yyvsp[(1) - (1)].id)));
3916 #line 1663 "parse.y"
3917 { (yyval.cbuf) = (yyvsp[(2) - (2)].cbuf); }
3921 #line 1664 "parse.y"
3922 { (yyval.cbuf) = NULL; }
3926 #line 1668 "parse.y"
3929 yyerror(_("signal without 'self' as "
3930 "first parameter"));
3931 free_all_global_state();
3934 if(the_scope == CLASS_SCOPE) {
3935 yyerror(_("a method cannot be of class scope"));
3936 free_all_global_state();
3939 push_function(the_scope, (yyvsp[(3) - (10)].sigtype),NULL,
3940 (yyvsp[(5) - (10)].id), (yyvsp[(10) - (10)].cbuf),(yyvsp[(1) - (10)].line),
3941 ccode_line, vararg, (yyvsp[(2) - (10)].list));
3946 #line 1684 "parse.y"
3949 yyerror(_("signal without 'self' as "
3950 "first parameter"));
3951 free_all_global_state();
3954 if(the_scope == CLASS_SCOPE) {
3955 yyerror(_("a method cannot be of class scope"));
3956 free_all_global_state();
3959 push_function(the_scope, (yyvsp[(4) - (11)].sigtype), NULL,
3960 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf), (yyvsp[(2) - (11)].line),
3961 ccode_line, vararg, (yyvsp[(3) - (11)].list));
3966 #line 1700 "parse.y"
3969 yyerror(_("virtual method without 'self' as "
3970 "first parameter"));
3971 free_all_global_state();
3974 if(the_scope == CLASS_SCOPE) {
3975 yyerror(_("a method cannot be of class scope"));
3976 free_all_global_state();
3979 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
3980 (yyvsp[(9) - (9)].cbuf), (yyvsp[(1) - (9)].line),
3981 ccode_line, vararg, NULL);
3986 #line 1716 "parse.y"
3989 yyerror(_("virtual method without 'self' as "
3990 "first parameter"));
3991 free_all_global_state();
3994 if(the_scope == CLASS_SCOPE) {
3995 yyerror(_("a method cannot be of class scope"));
3996 free_all_global_state();
3999 push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4000 (yyvsp[(9) - (9)].cbuf), (yyvsp[(2) - (9)].line),
4001 ccode_line, vararg, NULL);
4006 #line 1732 "parse.y"
4009 yyerror(_("virtual method without 'self' as "
4010 "first parameter"));
4011 free_all_global_state();
4014 push_function(PUBLIC_SCOPE, VIRTUAL_METHOD, NULL,
4015 (yyvsp[(3) - (8)].id), (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line),
4016 ccode_line, vararg, NULL);
4021 #line 1743 "parse.y"
4023 push_function(NO_SCOPE, OVERRIDE_METHOD, (yyvsp[(3) - (11)].id),
4024 (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf),
4025 (yyvsp[(1) - (11)].line), ccode_line,
4031 #line 1749 "parse.y"
4033 if(the_scope == CLASS_SCOPE) {
4034 yyerror(_("a method cannot be of class scope"));
4035 free_all_global_state();
4038 push_function(the_scope, REGULAR_METHOD, NULL, (yyvsp[(3) - (8)].id),
4039 (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line), ccode_line,
4045 #line 1759 "parse.y"
4047 if(strcmp((yyvsp[(1) - (5)].id), "init")==0) {
4048 push_init_arg((yyvsp[(3) - (5)].id),FALSE);
4049 push_function(NO_SCOPE, INIT_METHOD, NULL,
4050 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4051 ccode_line, FALSE, NULL);
4052 } else if(strcmp((yyvsp[(1) - (5)].id), "class_init")==0) {
4053 push_init_arg((yyvsp[(3) - (5)].id),TRUE);
4054 push_function(NO_SCOPE, CLASS_INIT_METHOD, NULL,
4055 (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4056 ccode_line, FALSE, NULL);
4058 g_free((yyvsp[(1) - (5)].id));
4059 g_free((yyvsp[(3) - (5)].id));
4060 g_string_free((yyvsp[(5) - (5)].cbuf),TRUE);
4061 yyerror(_("parse error "
4062 "(untyped blocks must be init or "
4070 #line 1782 "parse.y"
4072 g_free(onerror); onerror = NULL;
4073 g_free(defreturn); defreturn = NULL;
4074 if(!set_return_value((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id))) {
4075 g_free((yyvsp[(1) - (2)].id));
4076 g_free((yyvsp[(2) - (2)].id));
4077 yyerror(_("parse error"));
4080 g_free((yyvsp[(1) - (2)].id));
4085 #line 1793 "parse.y"
4087 g_free(onerror); onerror = NULL;
4088 g_free(defreturn); defreturn = NULL;
4089 if(!set_return_value((yyvsp[(1) - (4)].id), (yyvsp[(2) - (4)].id))) {
4090 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4091 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4092 yyerror(_("parse error"));
4095 if(!set_return_value((yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id))) {
4096 onerror = defreturn = NULL;
4097 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4098 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4099 yyerror(_("parse error"));
4102 g_free((yyvsp[(1) - (4)].id));
4103 g_free((yyvsp[(3) - (4)].id));
4108 #line 1812 "parse.y"
4110 g_free(onerror); onerror = NULL;
4111 g_free(defreturn); defreturn = NULL;
4116 #line 1818 "parse.y"
4117 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4121 #line 1819 "parse.y"
4123 (yyval.id) = ((yyvsp[(2) - (2)].cbuf))->str;
4124 g_string_free((yyvsp[(2) - (2)].cbuf), FALSE);
4129 #line 1825 "parse.y"
4130 { vararg = FALSE; has_self = FALSE; }
4134 #line 1826 "parse.y"
4138 if(strcmp((yyvsp[(1) - (1)].id),"self")==0)
4139 push_self((yyvsp[(1) - (1)].id), FALSE);
4141 g_free((yyvsp[(1) - (1)].id));
4142 yyerror(_("parse error"));
4149 #line 1837 "parse.y"
4153 if(strcmp((yyvsp[(1) - (2)].id),"self")==0)
4154 push_self((yyvsp[(1) - (2)].id), TRUE);
4156 g_free((yyvsp[(1) - (2)].id));
4157 yyerror(_("parse error"));
4164 #line 1848 "parse.y"
4168 if(strcmp((yyvsp[(2) - (2)].id),"self")==0)
4169 push_self((yyvsp[(2) - (2)].id), TRUE);
4171 g_free((yyvsp[(2) - (2)].id));
4172 yyerror(_("parse error"));
4179 #line 1859 "parse.y"
4182 if(strcmp((yyvsp[(1) - (3)].id),"self")==0)
4183 push_self((yyvsp[(1) - (3)].id), FALSE);
4185 g_free((yyvsp[(1) - (3)].id));
4186 yyerror(_("parse error"));
4193 #line 1869 "parse.y"
4196 if(strcmp((yyvsp[(1) - (4)].id),"self")==0)
4197 push_self((yyvsp[(1) - (4)].id), TRUE);
4199 g_free((yyvsp[(1) - (4)].id));
4200 yyerror(_("parse error"));
4207 #line 1879 "parse.y"
4210 if(strcmp((yyvsp[(2) - (4)].id),"self")==0)
4211 push_self((yyvsp[(2) - (4)].id), TRUE);
4213 g_free((yyvsp[(2) - (4)].id));
4214 yyerror(_("parse error"));
4221 #line 1889 "parse.y"
4222 { has_self = FALSE; }
4226 #line 1892 "parse.y"
4231 #line 1893 "parse.y"
4236 #line 1896 "parse.y"
4241 #line 1897 "parse.y"
4246 #line 1900 "parse.y"
4248 push_funcarg((yyvsp[(2) - (2)].id),NULL);
4253 #line 1903 "parse.y"
4255 push_funcarg((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].id));
4260 #line 1906 "parse.y"
4262 if(strcmp((yyvsp[(4) - (6)].id),"check")!=0) {
4263 yyerror(_("parse error"));
4266 g_free((yyvsp[(4) - (6)].id));
4267 push_funcarg((yyvsp[(2) - (6)].id),NULL);
4272 #line 1914 "parse.y"
4274 if(strcmp((yyvsp[(5) - (7)].id),"check")!=0) {
4275 yyerror(_("parse error"));
4278 g_free((yyvsp[(5) - (7)].id));
4279 push_funcarg((yyvsp[(2) - (7)].id),(yyvsp[(3) - (7)].id));
4284 #line 1924 "parse.y"
4289 #line 1925 "parse.y"
4294 #line 1928 "parse.y"
4296 if(strcmp((yyvsp[(1) - (1)].id),"type")==0) {
4297 Node *node = node_new (CHECK_NODE,
4298 "chtype", TYPE_CHECK,
4300 checks = g_list_append(checks,node);
4301 } else if(strcmp((yyvsp[(1) - (1)].id),"null")==0) {
4302 Node *node = node_new (CHECK_NODE,
4303 "chtype", NULL_CHECK,
4305 checks = g_list_append(checks,node);
4307 yyerror(_("parse error"));
4310 g_free((yyvsp[(1) - (1)].id));
4315 #line 1945 "parse.y"
4317 Node *node = node_new (CHECK_NODE,
4319 "number:steal", (yyvsp[(2) - (2)].id),
4321 checks = g_list_append(checks,node);
4326 #line 1952 "parse.y"
4328 Node *node = node_new (CHECK_NODE,
4330 "number:steal", (yyvsp[(2) - (2)].id),
4332 checks = g_list_append(checks,node);
4337 #line 1959 "parse.y"
4339 Node *node = node_new (CHECK_NODE,
4341 "number:steal", (yyvsp[(3) - (3)].id),
4343 checks = g_list_append(checks,node);
4348 #line 1966 "parse.y"
4350 Node *node = node_new (CHECK_NODE,
4352 "number:steal", (yyvsp[(3) - (3)].id),
4354 checks = g_list_append(checks,node);
4359 #line 1973 "parse.y"
4361 Node *node = node_new (CHECK_NODE,
4363 "number:steal", (yyvsp[(3) - (3)].id),
4365 checks = g_list_append(checks,node);
4370 #line 1980 "parse.y"
4372 Node *node = node_new (CHECK_NODE,
4374 "number:steal", (yyvsp[(3) - (3)].id),
4376 checks = g_list_append(checks,node);
4381 #line 1989 "parse.y"
4383 Node *node = node_new (ENUMDEF_NODE,
4384 "etype:steal", (yyvsp[(6) - (7)].id),
4385 "prefix:steal", (yyvsp[(2) - (7)].id),
4386 "values:steal", enum_vals,
4389 nodes = g_list_append (nodes, node);
4394 #line 1998 "parse.y"
4396 Node *node = node_new (ENUMDEF_NODE,
4397 "etype:steal", (yyvsp[(7) - (8)].id),
4398 "prefix:steal", (yyvsp[(2) - (8)].id),
4399 "values:steal", enum_vals,
4402 nodes = g_list_append (nodes, node);
4407 #line 2009 "parse.y"
4412 #line 2010 "parse.y"
4417 #line 2013 "parse.y"
4420 char *num = (yyvsp[(3) - (3)].id);
4422 /* A float value, that's a bad enum */
4423 if (num[0] >= '0' &&
4425 strchr (num, '.') != NULL) {
4426 g_free ((yyvsp[(1) - (3)].id));
4428 yyerror(_("parse error (enumerator value not integer constant)"));
4432 node = node_new (ENUMVALUE_NODE,
4433 "name:steal", (yyvsp[(1) - (3)].id),
4436 enum_vals = g_list_append (enum_vals, node);
4441 #line 2033 "parse.y"
4445 node = node_new (ENUMVALUE_NODE,
4446 "name:steal", (yyvsp[(1) - (1)].id),
4448 enum_vals = g_list_append (enum_vals, node);
4453 #line 2043 "parse.y"
4455 Node *node = node_new (FLAGS_NODE,
4456 "ftype:steal", (yyvsp[(6) - (7)].id),
4457 "prefix:steal", (yyvsp[(2) - (7)].id),
4458 "values:steal", flag_vals,
4461 nodes = g_list_append (nodes, node);
4466 #line 2052 "parse.y"
4468 Node *node = node_new (FLAGS_NODE,
4469 "ftype:steal", (yyvsp[(7) - (8)].id),
4470 "prefix:steal", (yyvsp[(2) - (8)].id),
4471 "values:steal", flag_vals,
4474 nodes = g_list_append (nodes, node);
4479 #line 2063 "parse.y"
4481 flag_vals = g_list_append (flag_vals, (yyvsp[(3) - (3)].id));
4486 #line 2066 "parse.y"
4488 flag_vals = g_list_append (flag_vals, (yyvsp[(1) - (1)].id));
4493 #line 2071 "parse.y"
4495 Node *node = node_new (ERROR_NODE,
4496 "etype:steal", (yyvsp[(6) - (7)].id),
4497 "prefix:steal", (yyvsp[(2) - (7)].id),
4498 "values:steal", error_vals,
4501 nodes = g_list_append (nodes, node);
4506 #line 2080 "parse.y"
4508 Node *node = node_new (ERROR_NODE,
4509 "etype:steal", (yyvsp[(7) - (8)].id),
4510 "prefix:steal", (yyvsp[(2) - (8)].id),
4511 "values:steal", error_vals,
4514 nodes = g_list_append (nodes, node);
4519 #line 2091 "parse.y"
4521 error_vals = g_list_append (error_vals, (yyvsp[(3) - (3)].id));
4526 #line 2094 "parse.y"
4528 error_vals = g_list_append (error_vals, (yyvsp[(1) - (1)].id));
4533 #line 2100 "parse.y"
4534 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4538 #line 2101 "parse.y"
4540 (yyval.id) = g_strconcat("-",(yyvsp[(2) - (2)].id),NULL);
4541 g_free((yyvsp[(2) - (2)].id));
4546 #line 2105 "parse.y"
4547 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4551 #line 2106 "parse.y"
4552 { (yyval.id) = (yyvsp[(1) - (1)].id); }
4556 /* Line 1267 of yacc.c. */
4557 #line 4558 "parse.c"
4560 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4564 YY_STACK_PRINT (yyss, yyssp);
4569 /* Now `shift' the result of the reduction. Determine what state
4570 that goes to, based on the state we popped back to and the rule
4571 number reduced by. */
4575 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4576 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4577 yystate = yytable[yystate];
4579 yystate = yydefgoto[yyn - YYNTOKENS];
4584 /*------------------------------------.
4585 | yyerrlab -- here on detecting error |
4586 `------------------------------------*/
4588 /* If not already recovering from an error, report this error. */
4592 #if ! YYERROR_VERBOSE
4593 yyerror (YY_("syntax error"));
4596 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4597 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4599 YYSIZE_T yyalloc = 2 * yysize;
4600 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4601 yyalloc = YYSTACK_ALLOC_MAXIMUM;
4602 if (yymsg != yymsgbuf)
4603 YYSTACK_FREE (yymsg);
4604 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4606 yymsg_alloc = yyalloc;
4610 yymsg_alloc = sizeof yymsgbuf;
4614 if (0 < yysize && yysize <= yymsg_alloc)
4616 (void) yysyntax_error (yymsg, yystate, yychar);
4621 yyerror (YY_("syntax error"));
4623 goto yyexhaustedlab;
4631 if (yyerrstatus == 3)
4633 /* If just tried and failed to reuse look-ahead token after an
4634 error, discard it. */
4636 if (yychar <= YYEOF)
4638 /* Return failure if at end of input. */
4639 if (yychar == YYEOF)
4644 yydestruct ("Error: discarding",
4650 /* Else will try to reuse look-ahead token after shifting the error
4655 /*---------------------------------------------------.
4656 | yyerrorlab -- error raised explicitly by YYERROR. |
4657 `---------------------------------------------------*/
4660 /* Pacify compilers like GCC when the user code never invokes
4661 YYERROR and the label yyerrorlab therefore never appears in user
4663 if (/*CONSTCOND*/ 0)
4666 /* Do not reclaim the symbols of the rule which action triggered
4670 YY_STACK_PRINT (yyss, yyssp);
4675 /*-------------------------------------------------------------.
4676 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4677 `-------------------------------------------------------------*/
4679 yyerrstatus = 3; /* Each real token shifted decrements this. */
4683 yyn = yypact[yystate];
4684 if (yyn != YYPACT_NINF)
4687 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4695 /* Pop the current state because it cannot handle the error token. */
4700 yydestruct ("Error: popping",
4701 yystos[yystate], yyvsp);
4704 YY_STACK_PRINT (yyss, yyssp);
4713 /* Shift the error token. */
4714 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4720 /*-------------------------------------.
4721 | yyacceptlab -- YYACCEPT comes here. |
4722 `-------------------------------------*/
4727 /*-----------------------------------.
4728 | yyabortlab -- YYABORT comes here. |
4729 `-----------------------------------*/
4735 /*-------------------------------------------------.
4736 | yyexhaustedlab -- memory exhaustion comes here. |
4737 `-------------------------------------------------*/
4739 yyerror (YY_("memory exhausted"));
4745 if (yychar != YYEOF && yychar != YYEMPTY)
4746 yydestruct ("Cleanup: discarding lookahead",
4748 /* Do not reclaim the symbols of the rule which action triggered
4749 this YYABORT or YYACCEPT. */
4751 YY_STACK_PRINT (yyss, yyssp);
4752 while (yyssp != yyss)
4754 yydestruct ("Cleanup: popping",
4755 yystos[*yyssp], yyvsp);
4760 YYSTACK_FREE (yyss);
4763 if (yymsg != yymsgbuf)
4764 YYSTACK_FREE (yymsg);
4766 /* Make sure YYID is used. */
4767 return YYID (yyresult);
4771 #line 2109 "parse.y"