]> git.draconx.ca Git - gob-dx.git/blob - src/parse.c
3f02d38bbf918263c141abb08eb8bb95757356d8
[gob-dx.git] / src / parse.c
1
2 /* A Bison parser, made by GNU Bison 2.4.1.  */
3
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5    
6       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7    Free Software Foundation, Inc.
8    
9    This program is free software: you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21
22 /* As a special exception, you may create a larger work that contains
23    part or all of the Bison parser skeleton and distribute that work
24    under terms of your choice, so long as that work isn't itself a
25    parser generator using the skeleton or a modified version thereof
26    as a parser skeleton.  Alternatively, if you modify or redistribute
27    the parser skeleton itself, you may (at your option) remove this
28    special exception, which will cause the skeleton and the resulting
29    Bison output files to be licensed under the GNU General Public
30    License without this special exception.
31    
32    This special exception was added by the Free Software Foundation in
33    version 2.2 of Bison.  */
34
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36    simplifying the original so-called "semantic" parser.  */
37
38 /* All symbols defined below should begin with yy or YY, to avoid
39    infringing on user name space.  This should be done even for local
40    variables, as they might otherwise be expanded by user macros.
41    There are some unavoidable exceptions within include files to
42    define necessary library symbols; they are noted "INFRINGES ON
43    USER NAME SPACE" below.  */
44
45 /* Identify Bison output.  */
46 #define YYBISON 1
47
48 /* Bison version.  */
49 #define YYBISON_VERSION "2.4.1"
50
51 /* Skeleton name.  */
52 #define YYSKELETON_NAME "yacc.c"
53
54 /* Pure parsers.  */
55 #define YYPURE 0
56
57 /* Push parsers.  */
58 #define YYPUSH 0
59
60 /* Pull parsers.  */
61 #define YYPULL 1
62
63 /* Using locations.  */
64 #define YYLSP_NEEDED 0
65
66
67
68 /* Copy the first part of user declarations.  */
69
70 /* Line 189 of yacc.c  */
71 #line 23 "parse.y"
72
73
74 #include "config.h"
75 #include <glib.h>
76 #include <stdio.h>
77 #include <stdlib.h>
78 #include <string.h>
79
80 #include "treefuncs.h"
81 #include "main.h"
82 #include "util.h"
83
84 /* FIXME: add gettext support */
85 #define _(x) (x)
86         
87 GList *nodes = NULL;
88
89 static GList *class_nodes = NULL;
90 Node *class = NULL;
91 GList *enums = NULL;
92 static GList *enum_vals = NULL;
93 static GList *flag_vals = NULL;
94 static GList *error_vals = NULL;
95
96 static gboolean abstract = FALSE;
97 static char *chunk_size = NULL;
98 static char *bonobo_object_class = NULL;
99 static int glade_xml = FALSE;
100 static GList *interfaces = NULL;
101 static GList *typestack = NULL;
102 static GList *funcargs = NULL;
103 static GList *checks = NULL;
104 static int has_self = FALSE;
105 static int vararg = FALSE;
106 static Method *last_added_method = NULL;
107
108 /* destructor and initializer for variables */
109 static gboolean destructor_unref = FALSE;
110 static char *destructor = NULL;
111 static int destructor_line = 0;
112 static gboolean destructor_simple = TRUE;
113 static char *initializer = NULL;
114 static int initializer_line = 0;
115 static int glade_widget = FALSE;
116
117 static char *funcattrs = NULL;
118 static char *onerror = NULL;
119 static char *defreturn = NULL;
120
121 static GList *gtktypes = NULL;
122
123 static Property *property = NULL;
124
125 /* this can be a global as we will only do one function at a time
126    anyway */
127 static int the_scope = NO_SCOPE;
128
129 void free(void *ptr);
130 int yylex(void);
131
132 extern int ccode_line;
133 extern int line_no;
134 extern gboolean for_cpp;
135
136 extern char *yytext;
137
138 static void
139 yyerror(char *str)
140 {
141         char *out=NULL;
142         char *p;
143         
144         if (strcmp (yytext, "\n") == 0 ||
145             strcmp (yytext, "\r") == 0) {
146                 out = g_strconcat ("Error: ", str, " before end of line", NULL);
147         } else if (yytext[0] == '\0') {
148                 out=g_strconcat("Error: ", str, " at end of input", NULL);
149         } else {
150                 char *tmp = g_strdup(yytext);
151                 while((p=strchr(tmp, '\n')))
152                         *p='.';
153
154                 out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL);
155                 g_free(tmp);
156         }
157
158         fprintf(stderr, "%s:%d: %s\n", filename, line_no, out);
159         g_free(out);
160         
161         exit(1);
162 }
163
164 static Type *
165 pop_type(void)
166 {
167         Type *type = typestack->data;
168         typestack = g_list_remove(typestack,typestack->data);
169         return type;
170 }
171
172 static void
173 push_variable (char *name, int scope, int line_no, char *postfix)
174 {
175         Node *var;
176         Type *type = pop_type ();
177
178         type->postfix = postfix;
179         
180         var = node_new (VARIABLE_NODE,
181                         "scope", scope,
182                         "vtype:steal", type,
183                         "glade_widget", glade_widget,
184                         "id:steal", name,
185                         "line_no", line_no,
186                         "destructor_unref", destructor_unref,
187                         "destructor:steal", destructor,
188                         "destructor_line", destructor_line,
189                         "destructor_simple", destructor_simple,
190                         "initializer:steal", initializer,
191                         "initializer_line", initializer_line,
192                         "initializer_simple", TRUE,
193                         NULL);
194         class_nodes = g_list_append(class_nodes, var);
195         glade_widget = FALSE;
196 }
197
198 static void
199 push_function (int scope, int method, char *oid, char *id,
200                GString *cbuf, int line_no, int ccode_line,
201                gboolean vararg, GList *flags)
202 {
203         Node *node;
204         Type *type;
205         char *c_cbuf;
206
207         g_assert(scope != CLASS_SCOPE);
208        
209         if(method == INIT_METHOD ||
210            method == CLASS_INIT_METHOD ||
211            method == CONSTRUCTOR_METHOD ||
212            method == DISPOSE_METHOD ||
213            method == FINALIZE_METHOD) {
214                 type = (Type *)node_new (TYPE_NODE,
215                                          "name", "void",
216                                          NULL);
217         } else {
218                 type = pop_type();
219         }
220         
221         /* a complicated and ugly test to figure out if we have
222            the wrong number of types for a signal */
223         if((method == SIGNAL_FIRST_METHOD ||
224             method == SIGNAL_LAST_METHOD) &&
225            g_list_length(gtktypes) != g_list_length(funcargs) &&
226            !(g_list_length(funcargs) == 1 &&
227              g_list_length(gtktypes) == 2 &&
228              strcmp(gtktypes->next->data, "NONE")==0)) {
229                 error_print(GOB_WARN, line_no,
230                             _("The number of GTK arguments and "
231                               "function arguments for a signal "
232                               "don't seem to match"));
233         }
234         if(g_list_length(gtktypes) > 2) {
235                 GList *li;
236                 for(li = gtktypes->next; li; li = li->next) {
237                         if(strcmp(li->data, "NONE")==0) {
238                                 error_print(GOB_ERROR, line_no,
239                                             _("NONE can only appear in an "
240                                               "argument list by itself"));
241                         }
242                 }
243         }
244         if(cbuf) {
245                 char *p;
246                 c_cbuf = p = cbuf->str;
247                 while(p && *p && (*p==' ' || *p=='\t' || *p=='\n' || *p=='\r'))
248                         p++;
249                 if(!p || !*p)
250                         c_cbuf = NULL;
251         } else
252                 c_cbuf = NULL;
253
254         node = node_new (METHOD_NODE,
255                          "scope", scope,
256                          "method", method,
257                          "mtype:steal", type,
258                          "otype:steal", oid,
259                          "gtktypes:steal", gtktypes,
260                          "flags:steal", flags,
261                          "id:steal", id,
262                          "args:steal", funcargs,
263                          "funcattrs:steal", funcattrs,
264                          "onerror:steal", onerror,
265                          "defreturn:steal", defreturn,
266                          "cbuf:steal", c_cbuf,
267                          "line_no", line_no,
268                          "ccode_line", ccode_line,
269                          "vararg", vararg,
270                          "unique_id", method_unique_id++,
271                          NULL);
272
273         last_added_method = (Method *)node;
274
275         if(cbuf)
276                 g_string_free(cbuf,
277                               /*only free segment if we haven't passed it
278                                 above */
279                               c_cbuf?FALSE:TRUE);
280         gtktypes = NULL;
281         funcargs = NULL;
282
283         funcattrs = NULL;
284         onerror = NULL;
285         defreturn = NULL;
286
287         class_nodes = g_list_append(class_nodes, node);
288 }
289
290 static void
291 free_all_global_state(void)
292 {
293         g_free(funcattrs);
294         funcattrs = NULL;
295         g_free(onerror);
296         onerror = NULL;
297         g_free(defreturn);
298         defreturn = NULL;
299
300         g_free(chunk_size);
301         chunk_size = NULL;
302         
303         g_list_foreach(gtktypes, (GFunc)g_free, NULL);
304         g_list_free(gtktypes);
305         gtktypes = NULL;
306
307         node_list_free (funcargs);
308         funcargs = NULL;
309 }
310
311 static void
312 push_funcarg(char *name, char *postfix)
313 {
314         Node *node;
315         Type *type = pop_type();
316
317         type->postfix = postfix;
318         
319         node = node_new (FUNCARG_NODE,
320                          "atype:steal", type,
321                          "name:steal", name,
322                          "checks:steal", checks,
323                          NULL);
324         checks = NULL;
325         
326         funcargs = g_list_append(funcargs, node);
327 }
328
329 static void
330 push_init_arg(char *name, int is_class)
331 {
332         Node *node;
333         Node *type;
334         char *tn;
335         
336         if(is_class)
337                 tn = g_strconcat(((Class *)class)->otype,":Class",NULL);
338         else
339                 tn = g_strdup(((Class *)class)->otype);
340
341         type = node_new (TYPE_NODE,
342                          "name:steal", tn,
343                          "pointer", "*",
344                          NULL);
345         node = node_new (FUNCARG_NODE,
346                          "atype:steal", (Type *)type,
347                          "name:steal", name,
348                          NULL);
349         funcargs = g_list_prepend(funcargs, node);
350 }
351
352 static void
353 push_self(char *id, gboolean constant)
354 {
355         Node *node;
356         Node *type;
357         GList *ch = NULL;
358         type = node_new (TYPE_NODE,
359                          "name", ((Class *)class)->otype,
360                          "pointer", constant ? "const *" : "*",
361                          NULL);
362         ch = g_list_append (ch, node_new (CHECK_NODE,
363                                           "chtype", NULL_CHECK,
364                                           NULL));
365         ch = g_list_append (ch, node_new (CHECK_NODE,
366                                           "chtype", TYPE_CHECK,
367                                           NULL));
368         node = node_new (FUNCARG_NODE,
369                          "atype:steal", (Type *)type,
370                          "name:steal", id,
371                          "checks:steal", ch,
372                          NULL);
373         funcargs = g_list_prepend(funcargs, node);
374 }
375
376 static Variable *
377 find_var_or_die(const char *id, int line)
378 {
379         GList *li;
380
381         for(li = class_nodes; li != NULL; li = li->next) {
382                 Variable *var;
383                 Node *node = li->data;
384                 if(node->type != VARIABLE_NODE)
385                         continue;
386                 var = li->data;
387                 if(strcmp(var->id, id)==0)
388                         return var;
389         }
390
391         error_printf(GOB_ERROR, line, _("Variable %s not defined here"), id);
392
393         g_assert_not_reached();
394         return NULL;
395 }
396
397 static gboolean
398 set_attr_value(char *type, char *val)
399 {
400         if(strcmp(type, "attr")==0) {
401                 if(!funcattrs) {
402                         funcattrs = val;
403                         return TRUE;
404                 } else
405                         return FALSE;
406         } else if(strcmp(type, "onerror")==0) {
407                 if(!onerror) {
408                         onerror = val;
409                         return TRUE;
410                 } else
411                         return FALSE;
412         } else if(strcmp(type, "defreturn")==0) {
413                 if(!defreturn) {
414                         defreturn = val;
415                         return TRUE;
416                 } else
417                         return FALSE;
418         }
419         return FALSE;
420 }
421
422 static void
423 export_accessors (const char *var_name,
424                   gboolean do_get,
425                   int get_lineno,
426                   gboolean do_set,
427                   int set_lineno,
428                   Type *type,
429                   const char *gtktype,
430                   int lineno)
431 {       
432         Type *the_type;
433
434         if (type != NULL)
435                 the_type = (Type *)node_copy ((Node *)type);
436         else
437                 the_type = get_tree_type (gtktype, TRUE);
438
439         if (the_type == NULL) {
440                 error_print (GOB_ERROR, line_no,
441                              _("Cannot determine type of property or argument"));
442                 return;
443         }
444
445         if (do_get) {
446                 char *get_id = g_strdup_printf ("get_%s", var_name);
447                 GString *get_cbuf = g_string_new (NULL);
448                 Node *node1 = node_new (TYPE_NODE,
449                                         "name", the_type->name,
450                                         "pointer", the_type->pointer,
451                                         "postfix", the_type->postfix,
452                                         NULL);
453                 Node *node3 = node_new (TYPE_NODE,
454                                         "name", class->class.otype,
455                                         "pointer", "*",
456                                         NULL);
457
458                 g_string_sprintf (get_cbuf,
459                                   "\t%s%s val; "
460                                   "g_object_get (G_OBJECT (self), \"%s\", "
461                                   "&val, NULL); "
462                                   "return val;\n",
463                                   the_type->name, 
464                                   the_type->pointer ? the_type->pointer : "",
465                                   var_name);
466                 
467                 typestack = g_list_prepend (typestack, node1);
468                 typestack = g_list_prepend (typestack, node3);
469                 
470                 push_funcarg ("self", FALSE);
471                 
472                 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
473                                get_id, get_cbuf, get_lineno,
474                                lineno, FALSE, NULL);
475         }
476         
477         if (do_set) {
478                 char *set_id = g_strdup_printf ("set_%s", var_name);
479                 GString *set_cbuf = g_string_new (NULL);
480                 Node *node1 = node_new (TYPE_NODE, 
481                                         "name", the_type->name,
482                                         "pointer", the_type->pointer,
483                                         "postfix", the_type->postfix,
484                                         NULL);
485                 Node *node2 = node_new (TYPE_NODE, 
486                                         "name", "void",
487                                         NULL);
488                 Node *node3 = node_new (TYPE_NODE, 
489                                         "name", class->class.otype,
490                                         "pointer", "*",
491                                         NULL);
492
493                 g_string_sprintf (set_cbuf,
494                                   "\tg_object_set (G_OBJECT (self), "
495                                   "\"%s\", val, NULL);\n",
496                                   var_name);
497
498                 typestack = g_list_prepend (typestack, node2);
499                 typestack = g_list_prepend (typestack, node1);
500                 typestack = g_list_prepend (typestack, node3);
501                 
502                 push_funcarg ("self", FALSE);
503                 push_funcarg ("val", FALSE);
504         
505                 typestack = g_list_prepend (typestack, node2);
506                 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
507                                set_id, set_cbuf, set_lineno,
508                                lineno, FALSE, NULL);
509         }
510
511         node_free ((Node *)the_type);
512 }
513
514 static char *
515 get_prop_enum_flag_cast (Property *prop)
516 {
517         char *tmp, *ret;
518         if (prop->extra_gtktype == NULL ||
519         /* HACK!  just in case someone made this
520          * work with 2.0.0 by using the TYPE
521          * macro directly */
522             ((strstr (prop->extra_gtktype, "_TYPE_") != NULL ||
523               strstr (prop->extra_gtktype, "TYPE_") == prop->extra_gtktype) &&
524              strchr (prop->extra_gtktype, ':') == NULL)) {
525                 if (prop->ptype != NULL)
526                         return get_type (prop->ptype, TRUE);
527                 else
528                         return g_strdup ("");
529         }
530         tmp = remove_sep (prop->extra_gtktype);
531         ret = g_strdup_printf ("(%s) ", tmp);
532         g_free (tmp);
533         return ret;
534 }
535
536 static void
537 add_construct_glade (char * file, char * root, char * domain)
538 {
539         Node *var;
540         Type * type;
541         
542         type = (Type *)node_new (TYPE_NODE,
543                                  "name", "GladeXML",
544                                  "pointer", "*",
545                                  NULL);
546         initializer = g_strdup_printf("\t{\n"
547                                       "\tGtkWidget * root;\n"
548                                       "\t%%1$s->_priv->_glade_xml = glade_xml_new(%s, %s, %s);\n"
549                                       "\troot = glade_xml_get_widget(%%1$s->_priv->_glade_xml, %s);\n"
550                                       "\tgtk_widget_show(root);\n"
551                                       "\tgtk_container_add(GTK_CONTAINER(%%1$s), root);\n"
552                                       "\tglade_xml_signal_autoconnect_full(%%1$s->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)%%1$s);\n"
553                                       "}\n", file, root, domain ? domain : "NULL", root);
554         
555         var = node_new (VARIABLE_NODE,
556                         "scope", PRIVATE_SCOPE,
557                         "vtype:steal", type,
558                         "glade_widget", FALSE,
559                         "id:steal", "_glade_xml",
560                         "destructor_unref", FALSE,
561                         "destructor", "g_object_unref", 
562                         "destructor_simple", TRUE,
563                         "initializer", initializer,
564                         "initializer_simple", FALSE,
565                         NULL);
566         class_nodes = g_list_prepend(class_nodes, var);
567 }
568
569 static void
570 property_link_and_export (Node *node)
571 {
572         Property *prop = (Property *)node;
573
574         if (prop->link) {
575                 const char *root;
576                 char *get = NULL, *set = NULL;
577                 Variable *var;
578
579                 if (prop->set != NULL ||
580                     prop->get != NULL) {        
581                         error_print (GOB_ERROR, prop->line_no,
582                                      _("Property linking requested, but "
583                                        "getters and setters exist"));
584                 }
585
586                 var = find_var_or_die (prop->name, prop->line_no);
587                 if(var->scope == PRIVATE_SCOPE) {
588                         root = "self->_priv";
589                 } else if (var->scope == CLASS_SCOPE) {
590                         root = "SELF_GET_CLASS(self)";
591                         if (no_self_alias)
592                                 error_print (GOB_ERROR, prop->line_no,
593                                              _("Self aliases needed when autolinking to a classwide member"));
594                 } else {
595                         root = "self";
596                 }
597
598                 if (strcmp (prop->gtktype, "STRING") == 0) {
599                         set = g_strdup_printf("{ char *old = %s->%s; "
600                                               "%s->%s = g_value_dup_string (VAL); g_free (old); }",
601                                               root, prop->name,
602                                               root, prop->name);
603                         get = g_strdup_printf("g_value_set_string (VAL, %s->%s);",
604                                               root, prop->name);
605                 } else if (strcmp (prop->gtktype, "OBJECT") == 0) {
606                         char *cast;
607                         if (prop->extra_gtktype != NULL) {
608                                 cast = remove_sep (prop->extra_gtktype);
609                         } else {
610                                 cast = g_strdup ("void");
611                         }
612                         set = g_strdup_printf("{ GObject *___old = (GObject *)%s->%s; "
613                                               "%s->%s = (%s *)g_value_dup_object (VAL); "
614                                               "if (___old != NULL) { "
615                                                 "g_object_unref (G_OBJECT (___old)); "
616                                               "} "
617                                               "}",
618                                               root, prop->name,
619                                               root, prop->name,
620                                               cast);
621                         get = g_strdup_printf ("g_value_set_object (VAL, "
622                                                "(gpointer)%s->%s);",
623                                                root, prop->name);
624                         g_free (cast);
625                 } else if (strcmp (prop->gtktype, "BOXED") == 0) {
626                         char *type = make_me_type (prop->extra_gtktype,
627                                                    "G_TYPE_BOXED");
628                         if (prop->extra_gtktype == NULL) {
629                                 error_print (GOB_ERROR, prop->line_no,
630                                              _("Property linking requested for BOXED, but "
631                                                "boxed_type not set"));
632                         }
633                         set = g_strdup_printf("{ gpointer ___old = (gpointer)%s->%s; "
634                                               "gpointer ___new = (gpointer)g_value_get_boxed (VAL); "
635                                               "if (___new != ___old) { "
636                                                 "if (___old != NULL) g_boxed_free (%s, ___old); "
637                                                 "if (___new != NULL) %s->%s = g_boxed_copy (%s, ___new); "
638                                                 "else %s->%s = NULL;"
639                                               "} "
640                                               "}",
641                                               root, prop->name,
642                                               type,
643                                               root, prop->name,
644                                               type,
645                                               root, prop->name);
646                         get = g_strdup_printf("g_value_set_boxed (VAL, %s->%s);",
647                                               root, prop->name);
648                         g_free (type);
649                 } else {
650                         char *set_func;
651                         char *get_func;
652                         const char *getcast = "";
653                         const char *setcast = "";
654                         char *to_free = NULL;
655                         set_func = g_strdup_printf ("g_value_set_%s", prop->gtktype);
656                         g_strdown (set_func);
657                         get_func = g_strdup_printf ("g_value_get_%s", prop->gtktype);
658                         g_strdown (get_func);
659
660                         if (for_cpp) {
661                                 if (strcmp (prop->gtktype, "FLAGS") == 0) {
662                                         setcast = "(guint) ";
663                                         getcast = to_free =
664                                                 get_prop_enum_flag_cast (prop);
665                                 } else if (strcmp (prop->gtktype, "ENUM") == 0) {
666                                         setcast = "(gint) ";
667                                         getcast = to_free =
668                                                 get_prop_enum_flag_cast (prop);
669                                }  else if (strcmp (prop->gtktype, "POINTER") == 0) {
670                                        setcast = "(gpointer) ";
671                                        getcast = g_strdup_printf ("(%s%s) ",
672                                                                   prop->ptype->name,
673                                                                   prop->ptype->pointer ? prop->ptype->pointer : "");
674                                 }
675                         }
676
677                         set = g_strdup_printf("%s->%s = %s%s (VAL);",
678                                               root, prop->name,
679                                               getcast,
680                                               get_func);
681                         get = g_strdup_printf("%s (VAL, %s%s->%s);",
682                                               set_func,
683                                               setcast,  
684                                               root, prop->name);
685
686                         g_free (get_func);
687                         g_free (set_func);
688                         g_free (to_free);
689                 }
690
691                 node_set (node,
692                           "get:steal", get,
693                           "get_line", prop->line_no,
694                           "set:steal", set,
695                           "set_line", prop->line_no,
696                           NULL);
697         }
698
699         if (prop->export) {
700                 export_accessors (prop->name,
701                                   prop->get != NULL, prop->get_line,
702                                   prop->set != NULL,  prop->set_line,
703                                   prop->ptype,
704                                   prop->gtktype,
705                                   prop->line_no);
706         } 
707 }
708
709
710 static char *
711 debool (char *s)
712 {
713         if (strcmp (s, "BOOL") == 0) {
714                 error_print (GOB_WARN, line_no,
715                             _("BOOL type is deprecated, please use BOOLEAN"));
716                 g_free (s);
717                 return g_strdup ("BOOLEAN");
718         } else {
719                 return s;
720         }
721 }
722
723 static void
724 ensure_property (void)
725 {
726         if (property == NULL)
727                 property = (Property *)node_new (PROPERTY_NODE, NULL);
728 }
729
730
731
732 /* Line 189 of yacc.c  */
733 #line 734 "parse.c"
734
735 /* Enabling traces.  */
736 #ifndef YYDEBUG
737 # define YYDEBUG 1
738 #endif
739
740 /* Enabling verbose error messages.  */
741 #ifdef YYERROR_VERBOSE
742 # undef YYERROR_VERBOSE
743 # define YYERROR_VERBOSE 1
744 #else
745 # define YYERROR_VERBOSE 0
746 #endif
747
748 /* Enabling the token table.  */
749 #ifndef YYTOKEN_TABLE
750 # define YYTOKEN_TABLE 0
751 #endif
752
753
754 /* Tokens.  */
755 #ifndef YYTOKENTYPE
756 # define YYTOKENTYPE
757    /* Put the tokens into the symbol table, so that GDB and other debuggers
758       know about them.  */
759    enum yytokentype {
760      CLASS = 258,
761      FROM = 259,
762      CONST = 260,
763      VOID = 261,
764      STRUCT = 262,
765      UNION = 263,
766      ENUM = 264,
767      THREEDOTS = 265,
768      SIGNED = 266,
769      UNSIGNED = 267,
770      LONG = 268,
771      SHORT = 269,
772      INT = 270,
773      FLOAT = 271,
774      DOUBLE = 272,
775      CHAR = 273,
776      TOKEN = 274,
777      NUMBER = 275,
778      TYPETOKEN = 276,
779      ARRAY_DIM = 277,
780      SINGLE_CHAR = 278,
781      CCODE = 279,
782      ADCODE = 280,
783      HTCODE = 281,
784      PHCODE = 282,
785      HCODE = 283,
786      ACODE = 284,
787      ATCODE = 285,
788      STRING = 286,
789      PUBLIC = 287,
790      PRIVATE = 288,
791      PROTECTED = 289,
792      CLASSWIDE = 290,
793      PROPERTY = 291,
794      ARGUMENT = 292,
795      VIRTUAL = 293,
796      SIGNAL = 294,
797      OVERRIDE = 295,
798      NICK = 296,
799      BLURB = 297,
800      MAXIMUM = 298,
801      MINIMUM = 299,
802      DEFAULT_VALUE = 300,
803      ERROR = 301,
804      FLAGS = 302,
805      TYPE = 303,
806      FLAGS_TYPE = 304,
807      ENUM_TYPE = 305,
808      PARAM_TYPE = 306,
809      BOXED_TYPE = 307,
810      OBJECT_TYPE = 308
811    };
812 #endif
813 /* Tokens.  */
814 #define CLASS 258
815 #define FROM 259
816 #define CONST 260
817 #define VOID 261
818 #define STRUCT 262
819 #define UNION 263
820 #define ENUM 264
821 #define THREEDOTS 265
822 #define SIGNED 266
823 #define UNSIGNED 267
824 #define LONG 268
825 #define SHORT 269
826 #define INT 270
827 #define FLOAT 271
828 #define DOUBLE 272
829 #define CHAR 273
830 #define TOKEN 274
831 #define NUMBER 275
832 #define TYPETOKEN 276
833 #define ARRAY_DIM 277
834 #define SINGLE_CHAR 278
835 #define CCODE 279
836 #define ADCODE 280
837 #define HTCODE 281
838 #define PHCODE 282
839 #define HCODE 283
840 #define ACODE 284
841 #define ATCODE 285
842 #define STRING 286
843 #define PUBLIC 287
844 #define PRIVATE 288
845 #define PROTECTED 289
846 #define CLASSWIDE 290
847 #define PROPERTY 291
848 #define ARGUMENT 292
849 #define VIRTUAL 293
850 #define SIGNAL 294
851 #define OVERRIDE 295
852 #define NICK 296
853 #define BLURB 297
854 #define MAXIMUM 298
855 #define MINIMUM 299
856 #define DEFAULT_VALUE 300
857 #define ERROR 301
858 #define FLAGS 302
859 #define TYPE 303
860 #define FLAGS_TYPE 304
861 #define ENUM_TYPE 305
862 #define PARAM_TYPE 306
863 #define BOXED_TYPE 307
864 #define OBJECT_TYPE 308
865
866
867
868
869 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
870 typedef union YYSTYPE
871 {
872
873 /* Line 214 of yacc.c  */
874 #line 683 "parse.y"
875
876         char *id;
877         GString *cbuf;
878         GList *list;
879         int line;
880         int sigtype;
881
882
883
884 /* Line 214 of yacc.c  */
885 #line 886 "parse.c"
886 } YYSTYPE;
887 # define YYSTYPE_IS_TRIVIAL 1
888 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
889 # define YYSTYPE_IS_DECLARED 1
890 #endif
891
892
893 /* Copy the second part of user declarations.  */
894
895
896 /* Line 264 of yacc.c  */
897 #line 898 "parse.c"
898
899 #ifdef short
900 # undef short
901 #endif
902
903 #ifdef YYTYPE_UINT8
904 typedef YYTYPE_UINT8 yytype_uint8;
905 #else
906 typedef unsigned char yytype_uint8;
907 #endif
908
909 #ifdef YYTYPE_INT8
910 typedef YYTYPE_INT8 yytype_int8;
911 #elif (defined __STDC__ || defined __C99__FUNC__ \
912      || defined __cplusplus || defined _MSC_VER)
913 typedef signed char yytype_int8;
914 #else
915 typedef short int yytype_int8;
916 #endif
917
918 #ifdef YYTYPE_UINT16
919 typedef YYTYPE_UINT16 yytype_uint16;
920 #else
921 typedef unsigned short int yytype_uint16;
922 #endif
923
924 #ifdef YYTYPE_INT16
925 typedef YYTYPE_INT16 yytype_int16;
926 #else
927 typedef short int yytype_int16;
928 #endif
929
930 #ifndef YYSIZE_T
931 # ifdef __SIZE_TYPE__
932 #  define YYSIZE_T __SIZE_TYPE__
933 # elif defined size_t
934 #  define YYSIZE_T size_t
935 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
936      || defined __cplusplus || defined _MSC_VER)
937 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
938 #  define YYSIZE_T size_t
939 # else
940 #  define YYSIZE_T unsigned int
941 # endif
942 #endif
943
944 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
945
946 #ifndef YY_
947 # if YYENABLE_NLS
948 #  if ENABLE_NLS
949 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
950 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
951 #  endif
952 # endif
953 # ifndef YY_
954 #  define YY_(msgid) msgid
955 # endif
956 #endif
957
958 /* Suppress unused-variable warnings by "using" E.  */
959 #if ! defined lint || defined __GNUC__
960 # define YYUSE(e) ((void) (e))
961 #else
962 # define YYUSE(e) /* empty */
963 #endif
964
965 /* Identity function, used to suppress warnings about constant conditions.  */
966 #ifndef lint
967 # define YYID(n) (n)
968 #else
969 #if (defined __STDC__ || defined __C99__FUNC__ \
970      || defined __cplusplus || defined _MSC_VER)
971 static int
972 YYID (int yyi)
973 #else
974 static int
975 YYID (yyi)
976     int yyi;
977 #endif
978 {
979   return yyi;
980 }
981 #endif
982
983 #if ! defined yyoverflow || YYERROR_VERBOSE
984
985 /* The parser invokes alloca or malloc; define the necessary symbols.  */
986
987 # ifdef YYSTACK_USE_ALLOCA
988 #  if YYSTACK_USE_ALLOCA
989 #   ifdef __GNUC__
990 #    define YYSTACK_ALLOC __builtin_alloca
991 #   elif defined __BUILTIN_VA_ARG_INCR
992 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
993 #   elif defined _AIX
994 #    define YYSTACK_ALLOC __alloca
995 #   elif defined _MSC_VER
996 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
997 #    define alloca _alloca
998 #   else
999 #    define YYSTACK_ALLOC alloca
1000 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1001      || defined __cplusplus || defined _MSC_VER)
1002 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1003 #     ifndef _STDLIB_H
1004 #      define _STDLIB_H 1
1005 #     endif
1006 #    endif
1007 #   endif
1008 #  endif
1009 # endif
1010
1011 # ifdef YYSTACK_ALLOC
1012    /* Pacify GCC's `empty if-body' warning.  */
1013 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
1014 #  ifndef YYSTACK_ALLOC_MAXIMUM
1015     /* The OS might guarantee only one guard page at the bottom of the stack,
1016        and a page size can be as small as 4096 bytes.  So we cannot safely
1017        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
1018        to allow for a few compiler-allocated temporary stack slots.  */
1019 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1020 #  endif
1021 # else
1022 #  define YYSTACK_ALLOC YYMALLOC
1023 #  define YYSTACK_FREE YYFREE
1024 #  ifndef YYSTACK_ALLOC_MAXIMUM
1025 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1026 #  endif
1027 #  if (defined __cplusplus && ! defined _STDLIB_H \
1028        && ! ((defined YYMALLOC || defined malloc) \
1029              && (defined YYFREE || defined free)))
1030 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1031 #   ifndef _STDLIB_H
1032 #    define _STDLIB_H 1
1033 #   endif
1034 #  endif
1035 #  ifndef YYMALLOC
1036 #   define YYMALLOC malloc
1037 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1038      || defined __cplusplus || defined _MSC_VER)
1039 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1040 #   endif
1041 #  endif
1042 #  ifndef YYFREE
1043 #   define YYFREE free
1044 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1045      || defined __cplusplus || defined _MSC_VER)
1046 void free (void *); /* INFRINGES ON USER NAME SPACE */
1047 #   endif
1048 #  endif
1049 # endif
1050 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1051
1052
1053 #if (! defined yyoverflow \
1054      && (! defined __cplusplus \
1055          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1056
1057 /* A type that is properly aligned for any stack member.  */
1058 union yyalloc
1059 {
1060   yytype_int16 yyss_alloc;
1061   YYSTYPE yyvs_alloc;
1062 };
1063
1064 /* The size of the maximum gap between one aligned stack and the next.  */
1065 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1066
1067 /* The size of an array large to enough to hold all stacks, each with
1068    N elements.  */
1069 # define YYSTACK_BYTES(N) \
1070      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
1071       + YYSTACK_GAP_MAXIMUM)
1072
1073 /* Copy COUNT objects from FROM to TO.  The source and destination do
1074    not overlap.  */
1075 # ifndef YYCOPY
1076 #  if defined __GNUC__ && 1 < __GNUC__
1077 #   define YYCOPY(To, From, Count) \
1078       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1079 #  else
1080 #   define YYCOPY(To, From, Count)              \
1081       do                                        \
1082         {                                       \
1083           YYSIZE_T yyi;                         \
1084           for (yyi = 0; yyi < (Count); yyi++)   \
1085             (To)[yyi] = (From)[yyi];            \
1086         }                                       \
1087       while (YYID (0))
1088 #  endif
1089 # endif
1090
1091 /* Relocate STACK from its old location to the new one.  The
1092    local variables YYSIZE and YYSTACKSIZE give the old and new number of
1093    elements in the stack, and YYPTR gives the new location of the
1094    stack.  Advance YYPTR to a properly aligned location for the next
1095    stack.  */
1096 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
1097     do                                                                  \
1098       {                                                                 \
1099         YYSIZE_T yynewbytes;                                            \
1100         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
1101         Stack = &yyptr->Stack_alloc;                                    \
1102         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1103         yyptr += yynewbytes / sizeof (*yyptr);                          \
1104       }                                                                 \
1105     while (YYID (0))
1106
1107 #endif
1108
1109 /* YYFINAL -- State number of the termination state.  */
1110 #define YYFINAL  24
1111 /* YYLAST -- Last index in YYTABLE.  */
1112 #define YYLAST   640
1113
1114 /* YYNTOKENS -- Number of terminals.  */
1115 #define YYNTOKENS  67
1116 /* YYNNTS -- Number of nonterminals.  */
1117 #define YYNNTS  53
1118 /* YYNRULES -- Number of rules.  */
1119 #define YYNRULES  197
1120 /* YYNRULES -- Number of states.  */
1121 #define YYNSTATES  417
1122
1123 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
1124 #define YYUNDEFTOK  2
1125 #define YYMAXUTOK   308
1126
1127 #define YYTRANSLATE(YYX)                                                \
1128   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1129
1130 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
1131 static const yytype_uint8 yytranslate[] =
1132 {
1133        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1134        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1135        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1136        2,     2,     2,    65,     2,     2,     2,     2,     2,     2,
1137       56,    57,    62,     2,    60,    66,     2,     2,     2,     2,
1138        2,     2,     2,     2,     2,     2,     2,     2,     2,    58,
1139       64,    59,    63,     2,     2,     2,     2,     2,     2,     2,
1140        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1141        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1142        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1143        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1144        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1145        2,     2,     2,    54,    61,    55,     2,     2,     2,     2,
1146        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1147        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1148        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1149        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1150        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1151        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1152        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1153        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1154        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1155        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1156        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1157        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
1158        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
1159        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
1160       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
1161       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
1162       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
1163       45,    46,    47,    48,    49,    50,    51,    52,    53
1164 };
1165
1166 #if YYDEBUG
1167 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1168    YYRHS.  */
1169 static const yytype_uint16 yyprhs[] =
1170 {
1171        0,     0,     3,     7,    10,    13,    15,    17,    19,    21,
1172       23,    25,    27,    29,    32,    35,    38,    41,    43,    45,
1173       47,    49,    54,    58,    64,    65,    70,    76,    82,    88,
1174       95,   103,   110,   118,   121,   123,   125,   128,   132,   134,
1175      136,   138,   140,   142,   144,   146,   148,   151,   155,   158,
1176      162,   165,   168,   170,   172,   174,   175,   181,   188,   201,
1177      211,   218,   222,   223,   235,   244,   250,   254,   255,   259,
1178      261,   263,   268,   270,   272,   276,   280,   284,   288,   292,
1179      296,   300,   304,   308,   312,   316,   320,   324,   328,   332,
1180      336,   340,   342,   348,   350,   354,   355,   359,   361,   364,
1181      366,   368,   370,   373,   376,   379,   383,   387,   390,   393,
1182      396,   398,   401,   403,   406,   408,   410,   412,   414,   416,
1183      418,   420,   422,   424,   426,   428,   430,   432,   435,   438,
1184      442,   445,   447,   451,   455,   458,   460,   465,   469,   471,
1185      474,   476,   487,   499,   509,   519,   528,   540,   549,   555,
1186      558,   563,   570,   571,   573,   576,   578,   580,   583,   586,
1187      590,   595,   600,   602,   606,   608,   612,   614,   617,   621,
1188      628,   636,   639,   641,   643,   646,   649,   653,   657,   661,
1189      665,   673,   682,   686,   688,   692,   694,   702,   711,   715,
1190      717,   725,   734,   738,   740,   742,   745,   747
1191 };
1192
1193 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
1194 static const yytype_int8 yyrhs[] =
1195 {
1196       68,     0,    -1,    70,    71,    70,    -1,    71,    70,    -1,
1197       70,    71,    -1,    71,    -1,    24,    -1,    25,    -1,    28,
1198       -1,    26,    -1,    27,    -1,    29,    -1,    30,    -1,    70,
1199       69,    -1,    70,   112,    -1,    70,   115,    -1,    70,   117,
1200       -1,    69,    -1,   112,    -1,   115,    -1,   117,    -1,    72,
1201       54,    74,    55,    -1,    72,    54,    55,    -1,     3,    21,
1202        4,    21,    73,    -1,    -1,    56,    19,    57,    73,    -1,
1203       56,    19,    19,    57,    73,    -1,    56,    19,    21,    57,
1204       73,    -1,    56,    19,    20,    57,    73,    -1,    56,    19,
1205       31,    31,    57,    73,    -1,    56,    19,    31,    31,    31,
1206       57,    73,    -1,    56,    19,    19,    31,    57,    73,    -1,
1207       56,    19,    19,    31,    31,    57,    73,    -1,    74,    75,
1208       -1,    75,    -1,   103,    -1,    19,   103,    -1,    19,    21,
1209      103,    -1,    80,    -1,    81,    -1,    83,    -1,    58,    -1,
1210       32,    -1,    33,    -1,    34,    -1,    35,    -1,    19,    19,
1211       -1,    19,    54,    24,    -1,    59,   119,    -1,    59,    54,
1212       24,    -1,    77,    78,    -1,    78,    77,    -1,    78,    -1,
1213       77,    -1,    19,    -1,    -1,    76,    92,    19,    79,    58,
1214       -1,    76,    92,    19,    22,    79,    58,    -1,    37,    90,
1215       89,    19,    82,    19,    54,    24,    19,    54,    24,    58,
1216       -1,    37,    90,    89,    19,    82,    19,    54,    24,    58,
1217       -1,    37,    90,    89,    19,    82,    19,    -1,    56,    19,
1218       57,    -1,    -1,    36,    19,    19,    84,    19,    54,    24,
1219       19,    54,    24,    58,    -1,    36,    19,    19,    84,    19,
1220       54,    24,    58,    -1,    36,    19,    19,    84,    58,    -1,
1221       56,    85,    57,    -1,    -1,    85,    60,    88,    -1,    88,
1222       -1,    31,    -1,    19,    56,    31,    57,    -1,   119,    -1,
1223       86,    -1,    41,    59,    86,    -1,    42,    59,    86,    -1,
1224       43,    59,   119,    -1,    44,    59,   119,    -1,    45,    59,
1225       87,    -1,    47,    59,    91,    -1,    48,    59,    92,    -1,
1226       49,    59,    21,    -1,    49,    59,    19,    -1,    50,    59,
1227       21,    -1,    50,    59,    19,    -1,    51,    59,    21,    -1,
1228       51,    59,    19,    -1,    52,    59,    21,    -1,    52,    59,
1229       19,    -1,    53,    59,    21,    -1,    53,    59,    19,    -1,
1230       19,    -1,    19,    56,    19,    92,    57,    -1,    19,    -1,
1231       56,    91,    57,    -1,    -1,    19,    61,    91,    -1,    19,
1232       -1,    93,    97,    -1,    93,    -1,    94,    -1,    19,    -1,
1233        5,    19,    -1,    19,     5,    -1,    96,    19,    -1,     5,
1234       96,    19,    -1,    96,    19,     5,    -1,    95,    94,    -1,
1235       21,    94,    -1,     5,    94,    -1,    21,    -1,    21,     5,
1236       -1,    95,    -1,    95,     5,    -1,     6,    -1,    18,    -1,
1237       14,    -1,    15,    -1,    13,    -1,    16,    -1,    17,    -1,
1238       11,    -1,    12,    -1,     7,    -1,     8,    -1,     9,    -1,
1239       62,    -1,    62,     5,    -1,    62,    97,    -1,    62,     5,
1240       97,    -1,    19,   100,    -1,   100,    -1,    76,    19,   100,
1241       -1,    19,    76,   100,    -1,    76,   100,    -1,    98,    -1,
1242       19,    56,   101,    57,    -1,   101,    60,    19,    -1,    19,
1243       -1,    54,    24,    -1,    58,    -1,    39,    90,    99,    92,
1244       19,    56,   106,    57,   104,   102,    -1,    76,    39,    90,
1245       98,    92,    19,    56,   106,    57,   104,   102,    -1,    38,
1246       76,    92,    19,    56,   106,    57,   104,   102,    -1,    76,
1247       38,    92,    19,    56,   106,    57,   104,   102,    -1,    38,
1248       92,    19,    56,   106,    57,   104,   102,    -1,    40,    56,
1249       21,    57,    92,    19,    56,   106,    57,   104,   102,    -1,
1250       76,    92,    19,    56,   106,    57,   104,   102,    -1,    19,
1251       56,    19,    57,   102,    -1,    19,   105,    -1,    19,   105,
1252       19,   105,    -1,    19,   105,    19,   105,    19,   105,    -1,
1253       -1,   119,    -1,    54,    24,    -1,     6,    -1,    19,    -1,
1254       19,     5,    -1,     5,    19,    -1,    19,    60,   107,    -1,
1255       19,     5,    60,   107,    -1,     5,    19,    60,   107,    -1,
1256      107,    -1,   108,    60,    10,    -1,   108,    -1,   108,    60,
1257      109,    -1,   109,    -1,    92,    19,    -1,    92,    19,    22,
1258       -1,    92,    19,    56,    19,   110,    57,    -1,    92,    19,
1259       22,    56,    19,   110,    57,    -1,   110,   111,    -1,   111,
1260       -1,    19,    -1,    63,   119,    -1,    64,   119,    -1,    63,
1261       59,   119,    -1,    64,    59,   119,    -1,    59,    59,   119,
1262       -1,    65,    59,   119,    -1,     9,    19,    54,   113,    55,
1263       21,    58,    -1,     9,    19,    54,   113,    60,    55,    21,
1264       58,    -1,   113,    60,   114,    -1,   114,    -1,    19,    59,
1265      119,    -1,    19,    -1,    47,    19,    54,   116,    55,    21,
1266       58,    -1,    47,    19,    54,   116,    60,    55,    21,    58,
1267       -1,   116,    60,    19,    -1,    19,    -1,    46,    19,    54,
1268      118,    55,    21,    58,    -1,    46,    19,    54,   118,    60,
1269       55,    21,    58,    -1,   118,    60,    19,    -1,    19,    -1,
1270       20,    -1,    66,    20,    -1,    23,    -1,    19,    -1
1271 };
1272
1273 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
1274 static const yytype_uint16 yyrline[] =
1275 {
1276        0,   704,   704,   705,   706,   707,   710,   719,   728,   737,
1277      746,   755,   764,   775,   776,   777,   778,   779,   780,   781,
1278      782,   785,   790,   797,   814,   815,   823,   835,   844,   856,
1279      865,   874,   883,   894,   895,   898,   899,   908,   920,   921,
1280      922,   923,   926,   927,   928,   929,   932,   952,   976,   980,
1281      988,   989,   990,   991,   992,  1000,  1006,  1009,  1014,  1082,
1282     1136,  1225,  1233,  1238,  1286,  1322,  1338,  1339,  1342,  1343,
1283     1346,  1347,  1359,  1360,  1363,  1369,  1375,  1381,  1387,  1393,
1284     1399,  1406,  1412,  1418,  1424,  1430,  1436,  1442,  1448,  1454,
1285     1460,  1466,  1491,  1500,  1506,  1507,  1510,  1513,  1519,  1526,
1286     1535,  1538,  1541,  1545,  1549,  1553,  1558,  1566,  1570,  1575,
1287     1579,  1582,  1586,  1589,  1594,  1595,  1596,  1597,  1598,  1599,
1288     1600,  1601,  1602,  1605,  1606,  1607,  1610,  1611,  1612,  1616,
1289     1623,  1635,  1641,  1653,  1665,  1668,  1674,  1679,  1682,  1687,
1290     1688,  1692,  1715,  1738,  1761,  1784,  1802,  1815,  1825,  1865,
1291     1877,  1897,  1928,  1935,  1936,  1942,  1943,  1954,  1965,  1976,
1292     1986,  1996,  2006,  2009,  2010,  2013,  2014,  2017,  2020,  2023,
1293     2031,  2041,  2042,  2045,  2062,  2069,  2076,  2083,  2090,  2097,
1294     2106,  2115,  2126,  2127,  2130,  2150,  2160,  2169,  2180,  2183,
1295     2188,  2197,  2208,  2211,  2217,  2218,  2222,  2223
1296 };
1297 #endif
1298
1299 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1300 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1301    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
1302 static const char *const yytname[] =
1303 {
1304   "$end", "error", "$undefined", "CLASS", "FROM", "CONST", "VOID",
1305   "STRUCT", "UNION", "ENUM", "THREEDOTS", "SIGNED", "UNSIGNED", "LONG",
1306   "SHORT", "INT", "FLOAT", "DOUBLE", "CHAR", "TOKEN", "NUMBER",
1307   "TYPETOKEN", "ARRAY_DIM", "SINGLE_CHAR", "CCODE", "ADCODE", "HTCODE",
1308   "PHCODE", "HCODE", "ACODE", "ATCODE", "STRING", "PUBLIC", "PRIVATE",
1309   "PROTECTED", "CLASSWIDE", "PROPERTY", "ARGUMENT", "VIRTUAL", "SIGNAL",
1310   "OVERRIDE", "NICK", "BLURB", "MAXIMUM", "MINIMUM", "DEFAULT_VALUE",
1311   "ERROR", "FLAGS", "TYPE", "FLAGS_TYPE", "ENUM_TYPE", "PARAM_TYPE",
1312   "BOXED_TYPE", "OBJECT_TYPE", "'{'", "'}'", "'('", "')'", "';'", "'='",
1313   "','", "'|'", "'*'", "'>'", "'<'", "'!'", "'-'", "$accept", "prog",
1314   "ccode", "ccodes", "class", "classdec", "classflags", "classcode",
1315   "thing", "scope", "destructor", "initializer", "varoptions", "variable",
1316   "argument", "export", "property", "param_spec", "param_spec_list",
1317   "string", "anyval", "param_spec_value", "argtype", "flags", "flaglist",
1318   "type", "specifier_list", "spec_list", "specifier", "strunionenum",
1319   "pointer", "simplesigtype", "fullsigtype", "sigtype", "tokenlist",
1320   "codenocode", "method", "methodmods", "retcode", "funcargs", "arglist",
1321   "arglist1", "arg", "checklist", "check", "enumcode", "enumvals",
1322   "enumval", "flagcode", "flagvals", "errorcode", "errorvals", "numtok", 0
1323 };
1324 #endif
1325
1326 # ifdef YYPRINT
1327 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1328    token YYLEX-NUM.  */
1329 static const yytype_uint16 yytoknum[] =
1330 {
1331        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
1332      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
1333      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
1334      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
1335      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
1336      305,   306,   307,   308,   123,   125,    40,    41,    59,    61,
1337       44,   124,    42,    62,    60,    33,    45
1338 };
1339 # endif
1340
1341 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
1342 static const yytype_uint8 yyr1[] =
1343 {
1344        0,    67,    68,    68,    68,    68,    69,    69,    69,    69,
1345       69,    69,    69,    70,    70,    70,    70,    70,    70,    70,
1346       70,    71,    71,    72,    73,    73,    73,    73,    73,    73,
1347       73,    73,    73,    74,    74,    75,    75,    75,    75,    75,
1348       75,    75,    76,    76,    76,    76,    77,    77,    78,    78,
1349       79,    79,    79,    79,    79,    79,    80,    80,    81,    81,
1350       81,    82,    82,    83,    83,    83,    84,    84,    85,    85,
1351       86,    86,    87,    87,    88,    88,    88,    88,    88,    88,
1352       88,    88,    88,    88,    88,    88,    88,    88,    88,    88,
1353       88,    88,    89,    89,    90,    90,    91,    91,    92,    92,
1354       93,    93,    93,    93,    93,    93,    93,    94,    94,    94,
1355       94,    94,    94,    94,    95,    95,    95,    95,    95,    95,
1356       95,    95,    95,    96,    96,    96,    97,    97,    97,    97,
1357       98,    98,    99,    99,    99,    99,   100,   101,   101,   102,
1358      102,   103,   103,   103,   103,   103,   103,   103,   103,   104,
1359      104,   104,   104,   105,   105,   106,   106,   106,   106,   106,
1360      106,   106,   106,   107,   107,   108,   108,   109,   109,   109,
1361      109,   110,   110,   111,   111,   111,   111,   111,   111,   111,
1362      112,   112,   113,   113,   114,   114,   115,   115,   116,   116,
1363      117,   117,   118,   118,   119,   119,   119,   119
1364 };
1365
1366 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
1367 static const yytype_uint8 yyr2[] =
1368 {
1369        0,     2,     3,     2,     2,     1,     1,     1,     1,     1,
1370        1,     1,     1,     2,     2,     2,     2,     1,     1,     1,
1371        1,     4,     3,     5,     0,     4,     5,     5,     5,     6,
1372        7,     6,     7,     2,     1,     1,     2,     3,     1,     1,
1373        1,     1,     1,     1,     1,     1,     2,     3,     2,     3,
1374        2,     2,     1,     1,     1,     0,     5,     6,    12,     9,
1375        6,     3,     0,    11,     8,     5,     3,     0,     3,     1,
1376        1,     4,     1,     1,     3,     3,     3,     3,     3,     3,
1377        3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
1378        3,     1,     5,     1,     3,     0,     3,     1,     2,     1,
1379        1,     1,     2,     2,     2,     3,     3,     2,     2,     2,
1380        1,     2,     1,     2,     1,     1,     1,     1,     1,     1,
1381        1,     1,     1,     1,     1,     1,     1,     2,     2,     3,
1382        2,     1,     3,     3,     2,     1,     4,     3,     1,     2,
1383        1,    10,    11,     9,     9,     8,    11,     8,     5,     2,
1384        4,     6,     0,     1,     2,     1,     1,     2,     2,     3,
1385        4,     4,     1,     3,     1,     3,     1,     2,     3,     6,
1386        7,     2,     1,     1,     2,     2,     3,     3,     3,     3,
1387        7,     8,     3,     1,     3,     1,     7,     8,     3,     1,
1388        7,     8,     3,     1,     1,     2,     1,     1
1389 };
1390
1391 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1392    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
1393    means the default is an error.  */
1394 static const yytype_uint8 yydefact[] =
1395 {
1396        0,     0,     0,     6,     7,     9,    10,     8,    11,    12,
1397        0,     0,     0,    17,     0,     5,     0,    18,    19,    20,
1398        0,     0,     0,     0,     1,    13,     4,    14,    15,    16,
1399        3,     0,     0,     0,     0,     0,     2,     0,    42,    43,
1400       44,    45,     0,    95,     0,    95,     0,    22,    41,     0,
1401       34,     0,    38,    39,    40,    35,    24,   185,     0,   183,
1402      193,     0,   189,     0,     0,     0,     0,     0,    36,     0,
1403        0,     0,     0,   114,   123,   124,   125,   121,   122,   118,
1404      116,   117,   119,   120,   115,   101,   110,     0,     0,    99,
1405      100,   112,     0,     0,     0,    21,    33,     0,    95,     0,
1406        0,    23,     0,     0,     0,     0,     0,     0,     0,    37,
1407        0,     0,    67,    97,     0,    93,     0,     0,   102,   109,
1408        0,   103,   111,   108,     0,     0,   126,    98,   113,   107,
1409      104,     0,     0,   135,     0,   131,     0,     0,     0,    55,
1410        0,   197,   194,   196,     0,   184,     0,     0,   182,     0,
1411      192,     0,     0,   188,     0,     0,     0,     0,     0,     0,
1412       94,     0,    62,   105,     0,     0,   127,   128,   106,     0,
1413        0,     0,   130,     0,   134,     0,     0,     0,     0,     0,
1414       54,    55,     0,     0,    53,    52,     0,     0,     0,     0,
1415        0,    24,   195,   180,     0,   190,     0,   186,     0,     0,
1416      140,   148,    91,     0,     0,     0,     0,     0,     0,     0,
1417        0,     0,     0,     0,     0,     0,    69,     0,    65,    96,
1418        0,     0,     0,     0,     0,   114,   101,     0,     0,   162,
1419      164,   166,   129,   138,     0,   133,   132,     0,     0,     0,
1420        0,    46,     0,     0,     0,     0,    48,    50,     0,    51,
1421       56,     0,    24,    24,    24,     0,    25,   181,   191,   187,
1422      139,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1423        0,     0,     0,    66,     0,     0,     0,     0,    60,     0,
1424      102,   103,     0,   167,   152,     0,   136,     0,     0,     0,
1425        0,     0,    47,    57,   152,    49,     0,    24,    26,    28,
1426       27,     0,    24,     0,    70,    74,    75,    76,    77,   197,
1427       73,    78,    72,    79,    80,    82,    81,    84,    83,    86,
1428       85,    88,    87,    90,    89,    68,     0,    92,    61,     0,
1429      152,     0,     0,   159,   168,     0,     0,     0,   163,   165,
1430      137,     0,     0,   152,     0,     0,    24,    31,    24,    29,
1431        0,     0,    64,     0,     0,   161,   160,     0,     0,     0,
1432      149,   153,   145,   152,     0,     0,     0,   147,    32,    30,
1433        0,     0,     0,    59,   143,     0,   173,     0,     0,     0,
1434        0,     0,   172,   154,     0,     0,   152,   144,   152,    71,
1435        0,     0,     0,     0,     0,   174,     0,   175,     0,   169,
1436      171,   150,   141,     0,     0,    63,     0,   170,   178,   176,
1437      177,   179,     0,   146,   142,    58,   151
1438 };
1439
1440 /* YYDEFGOTO[NTERM-NUM].  */
1441 static const yytype_int16 yydefgoto[] =
1442 {
1443       -1,    12,    13,    14,    15,    16,   101,    49,    50,    51,
1444      184,   185,   186,    52,    53,   222,    54,   158,   215,   305,
1445      311,   216,   116,    71,   114,   227,    89,    90,    91,    92,
1446      127,   133,   134,   135,   234,   201,    55,   337,   360,   228,
1447      229,   230,   231,   381,   382,    17,    58,    59,    18,    63,
1448       19,    61,   361
1449 };
1450
1451 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1452    STATE-NUM.  */
1453 #define YYPACT_NINF -326
1454 static const yytype_int16 yypact[] =
1455 {
1456      145,    13,    77,  -326,  -326,  -326,  -326,  -326,  -326,  -326,
1457      108,   196,   146,  -326,   145,   205,   168,  -326,  -326,  -326,
1458      264,   173,   221,   232,  -326,  -326,   205,  -326,  -326,  -326,
1459      205,   161,   259,   276,   283,   301,   205,   222,  -326,  -326,
1460     -326,  -326,   309,   273,   327,   273,   281,  -326,  -326,   170,
1461     -326,   292,  -326,  -326,  -326,  -326,   291,   290,   -27,  -326,
1462     -326,    40,  -326,   127,   294,   250,   332,   292,  -326,   333,
1463      334,   335,   375,  -326,  -326,  -326,  -326,  -326,  -326,  -326,
1464     -326,  -326,  -326,  -326,  -326,   350,   443,   392,   337,   295,
1465     -326,   457,   339,   239,   357,  -326,  -326,   392,   273,   366,
1466      376,  -326,    27,   381,    71,   391,    95,   398,   124,  -326,
1467      372,   417,   390,   389,   394,   396,   434,   471,  -326,  -326,
1468      446,  -326,   471,  -326,   447,   411,     4,  -326,   471,  -326,
1469      474,   231,   461,  -326,   392,  -326,   424,   472,   475,   122,
1470      192,  -326,  -326,  -326,   470,  -326,   435,   476,  -326,   437,
1471     -326,   477,   438,  -326,   478,   163,   444,   274,     0,   334,
1472     -326,   482,   448,  -326,   449,   409,   295,  -326,  -326,   450,
1473      483,   484,  -326,     6,  -326,   488,   392,   452,     6,   392,
1474       64,    38,   409,    32,   451,   490,   453,    80,   455,   456,
1475      485,   291,  -326,  -326,   459,  -326,   460,  -326,   462,   491,
1476     -326,  -326,  -326,   463,   464,   465,   466,   467,   468,   469,
1477      473,   479,   480,   481,   486,   -30,  -326,   487,  -326,  -326,
1478      392,   495,   500,   409,   426,   489,    11,   502,   492,  -326,
1479      493,  -326,  -326,  -326,   126,  -326,  -326,   494,   510,   409,
1480      511,  -326,   507,   496,   498,   509,  -326,  -326,    64,  -326,
1481     -326,   187,   291,   291,   291,   189,  -326,  -326,  -326,  -326,
1482     -326,    85,    85,    27,    27,    18,   334,   392,    -6,   219,
1483      226,   260,   293,  -326,   274,   512,   499,   501,   497,   503,
1484      128,   179,   392,   100,   515,   358,  -326,   516,   409,   505,
1485      506,   508,  -326,  -326,   515,  -326,   513,   291,  -326,  -326,
1486     -326,   514,   291,   517,  -326,  -326,  -326,  -326,  -326,   517,
1487     -326,  -326,  -326,  -326,  -326,  -326,  -326,  -326,  -326,  -326,
1488     -326,  -326,  -326,  -326,  -326,  -326,    12,  -326,  -326,   518,
1489      515,   392,   392,  -326,   519,   524,    69,   163,  -326,  -326,
1490     -326,   520,   409,   515,   409,   163,   291,  -326,   291,  -326,
1491      521,   522,  -326,    61,   163,  -326,  -326,   525,    66,   523,
1492      529,  -326,  -326,   515,   526,   163,   527,  -326,  -326,  -326,
1493      528,   533,   532,  -326,  -326,    66,  -326,   530,    83,   101,
1494      531,    75,  -326,  -326,    69,   163,   515,  -326,   515,  -326,
1495      504,   535,    88,    27,    27,  -326,    27,  -326,    27,  -326,
1496     -326,   546,  -326,   163,   163,  -326,   534,  -326,  -326,  -326,
1497     -326,  -326,    69,  -326,  -326,  -326,  -326
1498 };
1499
1500 /* YYPGOTO[NTERM-NUM].  */
1501 static const yytype_int16 yypgoto[] =
1502 {
1503     -326,  -326,    -4,   102,   552,  -326,  -189,  -326,   538,   -26,
1504      352,   383,   387,  -326,  -326,  -326,  -326,  -326,  -326,     5,
1505     -326,   298,  -326,   -24,  -154,   -43,  -326,   -69,  -326,   -66,
1506      -57,   431,  -326,   -96,  -326,  -325,   -23,  -287,  -297,  -178,
1507     -259,  -326,   289,   203,  -216,   154,  -326,   536,   212,  -326,
1508      223,  -326,  -102
1509 };
1510
1511 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
1512    positive, shift that token.  If negative, reduce the rule which
1513    number is the opposite.  If zero, do what YYDEFACT says.
1514    If YYTABLE_NINF, syntax error.  */
1515 #define YYTABLE_NINF -159
1516 static const yytype_int16 yytable[] =
1517 {
1518      145,    88,   256,   119,   244,   219,   120,   345,    99,   166,
1519       25,    67,   362,   315,    68,   316,   281,   123,    87,   217,
1520      367,    93,   129,   333,   111,   169,    25,   273,   103,   374,
1521      274,   351,    25,   104,    20,   172,   174,   309,   142,    67,
1522      387,   143,   109,   354,   124,   279,   141,   142,   119,   304,
1523      143,   141,   142,   119,   137,   143,   365,   180,   218,   119,
1524      402,   290,   170,   298,   299,   300,   126,   132,  -156,   167,
1525      352,   282,   355,   356,   138,   235,   385,   236,   413,   414,
1526      372,   246,   172,   241,   144,   376,   245,   401,   141,   142,
1527       57,   175,   143,   144,   376,   105,    21,   183,   144,   403,
1528      106,   404,   141,   142,   303,   171,   143,   376,   347,   232,
1529      341,   251,   313,   349,   150,   416,   304,    30,   242,   373,
1530      141,   142,   334,   359,   143,   377,   147,    22,    36,   378,
1531      379,   380,   399,   238,   377,   144,   240,   252,   378,   379,
1532      380,   180,   394,   153,   181,   407,    24,   377,     1,   144,
1533      151,   378,   379,   380,     2,   119,   335,   368,   120,   369,
1534      396,   307,   308,   312,   364,   400,   366,   144,    27,     3,
1535        4,     5,     6,     7,     8,     9,   400,   276,   182,   154,
1536       37,   183,   107,   286,    27,  -158,   287,   108,   331,    37,
1537       27,    10,    11,    38,    39,    40,    41,    42,    43,    44,
1538       45,    46,    38,    39,    40,    41,    42,    43,    44,    45,
1539       46,   187,   188,   189,     2,    23,    47,   199,   296,    48,
1540      301,   200,    31,   190,   314,    95,    28,    33,    48,     3,
1541        4,     5,     6,     7,     8,     9,  -157,    29,   317,   332,
1542      318,    64,    28,    65,   297,   319,   302,   320,    28,   191,
1543      169,    10,    11,    29,    38,    39,    40,    41,   131,    29,
1544       44,    45,    46,    38,    39,    40,    41,   306,    32,    64,
1545      310,    38,    39,    40,    41,    34,   395,   397,    66,   321,
1546       56,   322,    38,    39,    40,    41,    35,   170,    44,    45,
1547       46,   408,   409,   202,   410,    57,   411,    72,    73,    74,
1548       75,    76,    60,    77,    78,    79,    80,    81,    82,    83,
1549       84,    85,   323,    86,   324,   203,   204,   205,   206,   207,
1550       62,   208,   209,   210,   211,   212,   213,   214,    69,    70,
1551       97,    98,    72,    73,    74,    75,    76,    94,    77,    78,
1552       79,    80,    81,    82,    83,    84,    85,   100,    86,   102,
1553       66,   110,   112,   113,   115,   121,   125,   126,   130,    38,
1554       39,    40,    41,    72,    73,    74,    75,    76,   338,    77,
1555       78,    79,    80,    81,    82,    83,    84,    85,   136,    86,
1556      117,    73,    74,    75,    76,   139,    77,    78,    79,    80,
1557       81,    82,    83,    84,   118,   140,    86,    72,    73,    74,
1558       75,    76,   146,    77,    78,    79,    80,    81,    82,    83,
1559       84,    85,   149,    86,   224,   225,    74,    75,    76,   152,
1560       77,    78,    79,    80,    81,    82,    83,    84,   226,   155,
1561       86,   117,    73,    74,    75,    76,   156,    77,    78,    79,
1562       80,    81,    82,    83,    84,   280,   157,    86,   122,    73,
1563      159,   160,   161,   162,    77,    78,    79,    80,    81,    82,
1564       83,    84,   128,    73,    86,   163,   164,   165,    77,    78,
1565       79,    80,    81,    82,    83,    84,   117,    73,    86,   168,
1566      173,   176,    77,    78,    79,    80,    81,    82,    83,    84,
1567      192,   177,    86,   193,   178,   195,   197,   194,   196,   198,
1568      182,   220,   233,   169,   221,   223,   170,   237,   239,   248,
1569      183,   250,   253,   254,   277,   260,   255,   257,   258,   278,
1570      259,   283,   261,   262,   263,   264,   265,   266,   267,   289,
1571      291,   292,   268,   295,   336,   340,   326,   249,   269,   270,
1572      271,   275,   353,   358,   375,   272,  -155,   383,   384,   284,
1573      288,   329,   370,   285,   293,   294,   327,   390,   328,   406,
1574      330,   342,   405,   343,   344,   412,    26,   247,   243,   179,
1575      346,   348,   325,   350,   339,   357,   371,   363,   392,     0,
1576        0,     0,     0,   386,   388,   389,   391,    96,     0,   393,
1577      398,     0,   415,     0,     0,     0,     0,     0,     0,     0,
1578        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1579        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1580        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1581        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1582      148
1583 };
1584
1585 static const yytype_int16 yycheck[] =
1586 {
1587      102,    44,   191,    72,   182,   159,    72,   294,    51,     5,
1588       14,    37,   337,    19,    37,    21,     5,    86,    44,    19,
1589      345,    45,    91,   282,    67,    19,    30,    57,    55,   354,
1590       60,    19,    36,    60,    21,   131,   132,    19,    20,    65,
1591      365,    23,    65,   330,    87,   223,    19,    20,   117,    31,
1592       23,    19,    20,   122,    97,    23,   343,    19,    58,   128,
1593      385,   239,    56,   252,   253,   254,    62,    93,    57,   126,
1594       58,    60,   331,   332,    98,   171,   363,   173,   403,   404,
1595       19,   183,   178,    19,    66,    19,    54,   384,    19,    20,
1596       19,   134,    23,    66,    19,    55,    19,    59,    66,   386,
1597       60,   388,    19,    20,    19,   131,    23,    19,   297,   166,
1598      288,    31,   266,   302,    19,   412,    31,    15,    54,    58,
1599       19,    20,    22,    54,    23,    59,    55,    19,    26,    63,
1600       64,    65,    57,   176,    59,    66,   179,    57,    63,    64,
1601       65,    19,    59,    19,    22,    57,     0,    59,     3,    66,
1602       55,    63,    64,    65,     9,   224,    56,   346,   224,   348,
1603       59,   263,   264,   265,   342,   381,   344,    66,    14,    24,
1604       25,    26,    27,    28,    29,    30,   392,   220,    56,    55,
1605       19,    59,    55,    57,    30,    57,    60,    60,    60,    19,
1606       36,    46,    47,    32,    33,    34,    35,    36,    37,    38,
1607       39,    40,    32,    33,    34,    35,    36,    37,    38,    39,
1608       40,    19,    20,    21,     9,    19,    55,    54,    31,    58,
1609       31,    58,    54,    31,   267,    55,    14,    54,    58,    24,
1610       25,    26,    27,    28,    29,    30,    57,    14,    19,    60,
1611       21,    19,    30,    21,    57,    19,    57,    21,    36,    57,
1612       19,    46,    47,    30,    32,    33,    34,    35,    19,    36,
1613       38,    39,    40,    32,    33,    34,    35,   262,     4,    19,
1614      265,    32,    33,    34,    35,    54,   378,   379,    56,    19,
1615       21,    21,    32,    33,    34,    35,    54,    56,    38,    39,
1616       40,   393,   394,    19,   396,    19,   398,     5,     6,     7,
1617        8,     9,    19,    11,    12,    13,    14,    15,    16,    17,
1618       18,    19,    19,    21,    21,    41,    42,    43,    44,    45,
1619       19,    47,    48,    49,    50,    51,    52,    53,    19,    56,
1620       38,    39,     5,     6,     7,     8,     9,    56,    11,    12,
1621       13,    14,    15,    16,    17,    18,    19,    56,    21,    59,
1622       56,    19,    19,    19,    19,     5,    19,    62,    19,    32,
1623       33,    34,    35,     5,     6,     7,     8,     9,    10,    11,
1624       12,    13,    14,    15,    16,    17,    18,    19,    21,    21,
1625        5,     6,     7,     8,     9,    19,    11,    12,    13,    14,
1626       15,    16,    17,    18,    19,    19,    21,     5,     6,     7,
1627        8,     9,    21,    11,    12,    13,    14,    15,    16,    17,
1628       18,    19,    21,    21,     5,     6,     7,     8,     9,    21,
1629       11,    12,    13,    14,    15,    16,    17,    18,    19,    57,
1630       21,     5,     6,     7,     8,     9,    19,    11,    12,    13,
1631       14,    15,    16,    17,    18,    19,    56,    21,     5,     6,
1632       61,    57,    56,    19,    11,    12,    13,    14,    15,    16,
1633       17,    18,     5,     6,    21,    19,    19,    56,    11,    12,
1634       13,    14,    15,    16,    17,    18,     5,     6,    21,     5,
1635       19,    57,    11,    12,    13,    14,    15,    16,    17,    18,
1636       20,    19,    21,    58,    19,    58,    58,    21,    21,    21,
1637       56,    19,    19,    19,    56,    56,    56,    19,    56,    19,
1638       59,    58,    57,    57,    19,    24,    31,    58,    58,    19,
1639       58,    19,    59,    59,    59,    59,    59,    59,    59,    19,
1640       19,    24,    59,    24,    19,    19,    24,   185,    59,    59,
1641       59,    54,    24,    19,    19,    59,    57,    24,    19,    57,
1642       56,    54,    31,    60,    58,    57,    57,    24,    57,    24,
1643       57,    56,    58,    57,    56,    19,    14,   184,   181,   138,
1644       57,    57,   274,    56,   285,    56,    54,    57,   375,    -1,
1645       -1,    -1,    -1,    57,    57,    57,    54,    49,    -1,    59,
1646       59,    -1,    58,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1647       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1648       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1649       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1650       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1651      104
1652 };
1653
1654 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1655    symbol of state STATE-NUM.  */
1656 static const yytype_uint8 yystos[] =
1657 {
1658        0,     3,     9,    24,    25,    26,    27,    28,    29,    30,
1659       46,    47,    68,    69,    70,    71,    72,   112,   115,   117,
1660       21,    19,    19,    19,     0,    69,    71,   112,   115,   117,
1661       70,    54,     4,    54,    54,    54,    70,    19,    32,    33,
1662       34,    35,    36,    37,    38,    39,    40,    55,    58,    74,
1663       75,    76,    80,    81,    83,   103,    21,    19,   113,   114,
1664       19,   118,    19,   116,    19,    21,    56,    76,   103,    19,
1665       56,    90,     5,     6,     7,     8,     9,    11,    12,    13,
1666       14,    15,    16,    17,    18,    19,    21,    76,    92,    93,
1667       94,    95,    96,    90,    56,    55,    75,    38,    39,    92,
1668       56,    73,    59,    55,    60,    55,    60,    55,    60,   103,
1669       19,    92,    19,    19,    91,    19,    89,     5,    19,    94,
1670       96,     5,     5,    94,    92,    19,    62,    97,     5,    94,
1671       19,    19,    76,    98,    99,   100,    21,    92,    90,    19,
1672       19,    19,    20,    23,    66,   119,    21,    55,   114,    21,
1673       19,    55,    21,    19,    55,    57,    19,    56,    84,    61,
1674       57,    56,    19,    19,    19,    56,     5,    97,     5,    19,
1675       56,    76,   100,    19,   100,    92,    57,    19,    19,    98,
1676       19,    22,    56,    59,    77,    78,    79,    19,    20,    21,
1677       31,    57,    20,    58,    21,    58,    21,    58,    21,    54,
1678       58,   102,    19,    41,    42,    43,    44,    45,    47,    48,
1679       49,    50,    51,    52,    53,    85,    88,    19,    58,    91,
1680       19,    56,    82,    56,     5,     6,    19,    92,   106,   107,
1681      108,   109,    97,    19,   101,   100,   100,    19,    92,    56,
1682       92,    19,    54,    79,   106,    54,   119,    78,    19,    77,
1683       58,    31,    57,    57,    57,    31,    73,    58,    58,    58,
1684       24,    59,    59,    59,    59,    59,    59,    59,    59,    59,
1685       59,    59,    59,    57,    60,    54,    92,    19,    19,   106,
1686       19,     5,    60,    19,    57,    60,    57,    60,    56,    19,
1687      106,    19,    24,    58,    57,    24,    31,    57,    73,    73,
1688       73,    31,    57,    19,    31,    86,    86,   119,   119,    19,
1689       86,    87,   119,    91,    92,    19,    21,    19,    21,    19,
1690       21,    19,    21,    19,    21,    88,    24,    57,    57,    54,
1691       57,    60,    60,   107,    22,    56,    19,   104,    10,   109,
1692       19,   106,    56,    57,    56,   104,    57,    73,    57,    73,
1693       56,    19,    58,    24,   104,   107,   107,    56,    19,    54,
1694      105,   119,   102,    57,   106,   104,   106,   102,    73,    73,
1695       31,    54,    19,    58,   102,    19,    19,    59,    63,    64,
1696       65,   110,   111,    24,    19,   104,    57,   102,    57,    57,
1697       24,    54,   110,    59,    59,   119,    59,   119,    59,    57,
1698      111,   105,   102,   104,   104,    58,    24,    57,   119,   119,
1699      119,   119,    19,   102,   102,    58,   105
1700 };
1701
1702 #define yyerrok         (yyerrstatus = 0)
1703 #define yyclearin       (yychar = YYEMPTY)
1704 #define YYEMPTY         (-2)
1705 #define YYEOF           0
1706
1707 #define YYACCEPT        goto yyacceptlab
1708 #define YYABORT         goto yyabortlab
1709 #define YYERROR         goto yyerrorlab
1710
1711
1712 /* Like YYERROR except do call yyerror.  This remains here temporarily
1713    to ease the transition to the new meaning of YYERROR, for GCC.
1714    Once GCC version 2 has supplanted version 1, this can go.  */
1715
1716 #define YYFAIL          goto yyerrlab
1717
1718 #define YYRECOVERING()  (!!yyerrstatus)
1719
1720 #define YYBACKUP(Token, Value)                                  \
1721 do                                                              \
1722   if (yychar == YYEMPTY && yylen == 1)                          \
1723     {                                                           \
1724       yychar = (Token);                                         \
1725       yylval = (Value);                                         \
1726       yytoken = YYTRANSLATE (yychar);                           \
1727       YYPOPSTACK (1);                                           \
1728       goto yybackup;                                            \
1729     }                                                           \
1730   else                                                          \
1731     {                                                           \
1732       yyerror (YY_("syntax error: cannot back up")); \
1733       YYERROR;                                                  \
1734     }                                                           \
1735 while (YYID (0))
1736
1737
1738 #define YYTERROR        1
1739 #define YYERRCODE       256
1740
1741
1742 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1743    If N is 0, then set CURRENT to the empty location which ends
1744    the previous symbol: RHS[0] (always defined).  */
1745
1746 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1747 #ifndef YYLLOC_DEFAULT
1748 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
1749     do                                                                  \
1750       if (YYID (N))                                                    \
1751         {                                                               \
1752           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
1753           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
1754           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
1755           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
1756         }                                                               \
1757       else                                                              \
1758         {                                                               \
1759           (Current).first_line   = (Current).last_line   =              \
1760             YYRHSLOC (Rhs, 0).last_line;                                \
1761           (Current).first_column = (Current).last_column =              \
1762             YYRHSLOC (Rhs, 0).last_column;                              \
1763         }                                                               \
1764     while (YYID (0))
1765 #endif
1766
1767
1768 /* YY_LOCATION_PRINT -- Print the location on the stream.
1769    This macro was not mandated originally: define only if we know
1770    we won't break user code: when these are the locations we know.  */
1771
1772 #ifndef YY_LOCATION_PRINT
1773 # if YYLTYPE_IS_TRIVIAL
1774 #  define YY_LOCATION_PRINT(File, Loc)                  \
1775      fprintf (File, "%d.%d-%d.%d",                      \
1776               (Loc).first_line, (Loc).first_column,     \
1777               (Loc).last_line,  (Loc).last_column)
1778 # else
1779 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1780 # endif
1781 #endif
1782
1783
1784 /* YYLEX -- calling `yylex' with the right arguments.  */
1785
1786 #ifdef YYLEX_PARAM
1787 # define YYLEX yylex (YYLEX_PARAM)
1788 #else
1789 # define YYLEX yylex ()
1790 #endif
1791
1792 /* Enable debugging if requested.  */
1793 #if YYDEBUG
1794
1795 # ifndef YYFPRINTF
1796 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1797 #  define YYFPRINTF fprintf
1798 # endif
1799
1800 # define YYDPRINTF(Args)                        \
1801 do {                                            \
1802   if (yydebug)                                  \
1803     YYFPRINTF Args;                             \
1804 } while (YYID (0))
1805
1806 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
1807 do {                                                                      \
1808   if (yydebug)                                                            \
1809     {                                                                     \
1810       YYFPRINTF (stderr, "%s ", Title);                                   \
1811       yy_symbol_print (stderr,                                            \
1812                   Type, Value); \
1813       YYFPRINTF (stderr, "\n");                                           \
1814     }                                                                     \
1815 } while (YYID (0))
1816
1817
1818 /*--------------------------------.
1819 | Print this symbol on YYOUTPUT.  |
1820 `--------------------------------*/
1821
1822 /*ARGSUSED*/
1823 #if (defined __STDC__ || defined __C99__FUNC__ \
1824      || defined __cplusplus || defined _MSC_VER)
1825 static void
1826 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1827 #else
1828 static void
1829 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1830     FILE *yyoutput;
1831     int yytype;
1832     YYSTYPE const * const yyvaluep;
1833 #endif
1834 {
1835   if (!yyvaluep)
1836     return;
1837 # ifdef YYPRINT
1838   if (yytype < YYNTOKENS)
1839     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1840 # else
1841   YYUSE (yyoutput);
1842 # endif
1843   switch (yytype)
1844     {
1845       default:
1846         break;
1847     }
1848 }
1849
1850
1851 /*--------------------------------.
1852 | Print this symbol on YYOUTPUT.  |
1853 `--------------------------------*/
1854
1855 #if (defined __STDC__ || defined __C99__FUNC__ \
1856      || defined __cplusplus || defined _MSC_VER)
1857 static void
1858 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1859 #else
1860 static void
1861 yy_symbol_print (yyoutput, yytype, yyvaluep)
1862     FILE *yyoutput;
1863     int yytype;
1864     YYSTYPE const * const yyvaluep;
1865 #endif
1866 {
1867   if (yytype < YYNTOKENS)
1868     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1869   else
1870     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1871
1872   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1873   YYFPRINTF (yyoutput, ")");
1874 }
1875
1876 /*------------------------------------------------------------------.
1877 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1878 | TOP (included).                                                   |
1879 `------------------------------------------------------------------*/
1880
1881 #if (defined __STDC__ || defined __C99__FUNC__ \
1882      || defined __cplusplus || defined _MSC_VER)
1883 static void
1884 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1885 #else
1886 static void
1887 yy_stack_print (yybottom, yytop)
1888     yytype_int16 *yybottom;
1889     yytype_int16 *yytop;
1890 #endif
1891 {
1892   YYFPRINTF (stderr, "Stack now");
1893   for (; yybottom <= yytop; yybottom++)
1894     {
1895       int yybot = *yybottom;
1896       YYFPRINTF (stderr, " %d", yybot);
1897     }
1898   YYFPRINTF (stderr, "\n");
1899 }
1900
1901 # define YY_STACK_PRINT(Bottom, Top)                            \
1902 do {                                                            \
1903   if (yydebug)                                                  \
1904     yy_stack_print ((Bottom), (Top));                           \
1905 } while (YYID (0))
1906
1907
1908 /*------------------------------------------------.
1909 | Report that the YYRULE is going to be reduced.  |
1910 `------------------------------------------------*/
1911
1912 #if (defined __STDC__ || defined __C99__FUNC__ \
1913      || defined __cplusplus || defined _MSC_VER)
1914 static void
1915 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1916 #else
1917 static void
1918 yy_reduce_print (yyvsp, yyrule)
1919     YYSTYPE *yyvsp;
1920     int yyrule;
1921 #endif
1922 {
1923   int yynrhs = yyr2[yyrule];
1924   int yyi;
1925   unsigned long int yylno = yyrline[yyrule];
1926   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1927              yyrule - 1, yylno);
1928   /* The symbols being reduced.  */
1929   for (yyi = 0; yyi < yynrhs; yyi++)
1930     {
1931       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1932       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1933                        &(yyvsp[(yyi + 1) - (yynrhs)])
1934                                        );
1935       YYFPRINTF (stderr, "\n");
1936     }
1937 }
1938
1939 # define YY_REDUCE_PRINT(Rule)          \
1940 do {                                    \
1941   if (yydebug)                          \
1942     yy_reduce_print (yyvsp, Rule); \
1943 } while (YYID (0))
1944
1945 /* Nonzero means print parse trace.  It is left uninitialized so that
1946    multiple parsers can coexist.  */
1947 int yydebug;
1948 #else /* !YYDEBUG */
1949 # define YYDPRINTF(Args)
1950 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1951 # define YY_STACK_PRINT(Bottom, Top)
1952 # define YY_REDUCE_PRINT(Rule)
1953 #endif /* !YYDEBUG */
1954
1955
1956 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1957 #ifndef YYINITDEPTH
1958 # define YYINITDEPTH 200
1959 #endif
1960
1961 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1962    if the built-in stack extension method is used).
1963
1964    Do not make this value too large; the results are undefined if
1965    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1966    evaluated with infinite-precision integer arithmetic.  */
1967
1968 #ifndef YYMAXDEPTH
1969 # define YYMAXDEPTH 10000
1970 #endif
1971
1972 \f
1973
1974 #if YYERROR_VERBOSE
1975
1976 # ifndef yystrlen
1977 #  if defined __GLIBC__ && defined _STRING_H
1978 #   define yystrlen strlen
1979 #  else
1980 /* Return the length of YYSTR.  */
1981 #if (defined __STDC__ || defined __C99__FUNC__ \
1982      || defined __cplusplus || defined _MSC_VER)
1983 static YYSIZE_T
1984 yystrlen (const char *yystr)
1985 #else
1986 static YYSIZE_T
1987 yystrlen (yystr)
1988     const char *yystr;
1989 #endif
1990 {
1991   YYSIZE_T yylen;
1992   for (yylen = 0; yystr[yylen]; yylen++)
1993     continue;
1994   return yylen;
1995 }
1996 #  endif
1997 # endif
1998
1999 # ifndef yystpcpy
2000 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2001 #   define yystpcpy stpcpy
2002 #  else
2003 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2004    YYDEST.  */
2005 #if (defined __STDC__ || defined __C99__FUNC__ \
2006      || defined __cplusplus || defined _MSC_VER)
2007 static char *
2008 yystpcpy (char *yydest, const char *yysrc)
2009 #else
2010 static char *
2011 yystpcpy (yydest, yysrc)
2012     char *yydest;
2013     const char *yysrc;
2014 #endif
2015 {
2016   char *yyd = yydest;
2017   const char *yys = yysrc;
2018
2019   while ((*yyd++ = *yys++) != '\0')
2020     continue;
2021
2022   return yyd - 1;
2023 }
2024 #  endif
2025 # endif
2026
2027 # ifndef yytnamerr
2028 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2029    quotes and backslashes, so that it's suitable for yyerror.  The
2030    heuristic is that double-quoting is unnecessary unless the string
2031    contains an apostrophe, a comma, or backslash (other than
2032    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
2033    null, do not copy; instead, return the length of what the result
2034    would have been.  */
2035 static YYSIZE_T
2036 yytnamerr (char *yyres, const char *yystr)
2037 {
2038   if (*yystr == '"')
2039     {
2040       YYSIZE_T yyn = 0;
2041       char const *yyp = yystr;
2042
2043       for (;;)
2044         switch (*++yyp)
2045           {
2046           case '\'':
2047           case ',':
2048             goto do_not_strip_quotes;
2049
2050           case '\\':
2051             if (*++yyp != '\\')
2052               goto do_not_strip_quotes;
2053             /* Fall through.  */
2054           default:
2055             if (yyres)
2056               yyres[yyn] = *yyp;
2057             yyn++;
2058             break;
2059
2060           case '"':
2061             if (yyres)
2062               yyres[yyn] = '\0';
2063             return yyn;
2064           }
2065     do_not_strip_quotes: ;
2066     }
2067
2068   if (! yyres)
2069     return yystrlen (yystr);
2070
2071   return yystpcpy (yyres, yystr) - yyres;
2072 }
2073 # endif
2074
2075 /* Copy into YYRESULT an error message about the unexpected token
2076    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
2077    including the terminating null byte.  If YYRESULT is null, do not
2078    copy anything; just return the number of bytes that would be
2079    copied.  As a special case, return 0 if an ordinary "syntax error"
2080    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
2081    size calculation.  */
2082 static YYSIZE_T
2083 yysyntax_error (char *yyresult, int yystate, int yychar)
2084 {
2085   int yyn = yypact[yystate];
2086
2087   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
2088     return 0;
2089   else
2090     {
2091       int yytype = YYTRANSLATE (yychar);
2092       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
2093       YYSIZE_T yysize = yysize0;
2094       YYSIZE_T yysize1;
2095       int yysize_overflow = 0;
2096       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
2097       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
2098       int yyx;
2099
2100 # if 0
2101       /* This is so xgettext sees the translatable formats that are
2102          constructed on the fly.  */
2103       YY_("syntax error, unexpected %s");
2104       YY_("syntax error, unexpected %s, expecting %s");
2105       YY_("syntax error, unexpected %s, expecting %s or %s");
2106       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2107       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2108 # endif
2109       char *yyfmt;
2110       char const *yyf;
2111       static char const yyunexpected[] = "syntax error, unexpected %s";
2112       static char const yyexpecting[] = ", expecting %s";
2113       static char const yyor[] = " or %s";
2114       char yyformat[sizeof yyunexpected
2115                     + sizeof yyexpecting - 1
2116                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
2117                        * (sizeof yyor - 1))];
2118       char const *yyprefix = yyexpecting;
2119
2120       /* Start YYX at -YYN if negative to avoid negative indexes in
2121          YYCHECK.  */
2122       int yyxbegin = yyn < 0 ? -yyn : 0;
2123
2124       /* Stay within bounds of both yycheck and yytname.  */
2125       int yychecklim = YYLAST - yyn + 1;
2126       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
2127       int yycount = 1;
2128
2129       yyarg[0] = yytname[yytype];
2130       yyfmt = yystpcpy (yyformat, yyunexpected);
2131
2132       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
2133         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2134           {
2135             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
2136               {
2137                 yycount = 1;
2138                 yysize = yysize0;
2139                 yyformat[sizeof yyunexpected - 1] = '\0';
2140                 break;
2141               }
2142             yyarg[yycount++] = yytname[yyx];
2143             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
2144             yysize_overflow |= (yysize1 < yysize);
2145             yysize = yysize1;
2146             yyfmt = yystpcpy (yyfmt, yyprefix);
2147             yyprefix = yyor;
2148           }
2149
2150       yyf = YY_(yyformat);
2151       yysize1 = yysize + yystrlen (yyf);
2152       yysize_overflow |= (yysize1 < yysize);
2153       yysize = yysize1;
2154
2155       if (yysize_overflow)
2156         return YYSIZE_MAXIMUM;
2157
2158       if (yyresult)
2159         {
2160           /* Avoid sprintf, as that infringes on the user's name space.
2161              Don't have undefined behavior even if the translation
2162              produced a string with the wrong number of "%s"s.  */
2163           char *yyp = yyresult;
2164           int yyi = 0;
2165           while ((*yyp = *yyf) != '\0')
2166             {
2167               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
2168                 {
2169                   yyp += yytnamerr (yyp, yyarg[yyi++]);
2170                   yyf += 2;
2171                 }
2172               else
2173                 {
2174                   yyp++;
2175                   yyf++;
2176                 }
2177             }
2178         }
2179       return yysize;
2180     }
2181 }
2182 #endif /* YYERROR_VERBOSE */
2183 \f
2184
2185 /*-----------------------------------------------.
2186 | Release the memory associated to this symbol.  |
2187 `-----------------------------------------------*/
2188
2189 /*ARGSUSED*/
2190 #if (defined __STDC__ || defined __C99__FUNC__ \
2191      || defined __cplusplus || defined _MSC_VER)
2192 static void
2193 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2194 #else
2195 static void
2196 yydestruct (yymsg, yytype, yyvaluep)
2197     const char *yymsg;
2198     int yytype;
2199     YYSTYPE *yyvaluep;
2200 #endif
2201 {
2202   YYUSE (yyvaluep);
2203
2204   if (!yymsg)
2205     yymsg = "Deleting";
2206   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2207
2208   switch (yytype)
2209     {
2210
2211       default:
2212         break;
2213     }
2214 }
2215
2216 /* Prevent warnings from -Wmissing-prototypes.  */
2217 #ifdef YYPARSE_PARAM
2218 #if defined __STDC__ || defined __cplusplus
2219 int yyparse (void *YYPARSE_PARAM);
2220 #else
2221 int yyparse ();
2222 #endif
2223 #else /* ! YYPARSE_PARAM */
2224 #if defined __STDC__ || defined __cplusplus
2225 int yyparse (void);
2226 #else
2227 int yyparse ();
2228 #endif
2229 #endif /* ! YYPARSE_PARAM */
2230
2231
2232 /* The lookahead symbol.  */
2233 int yychar;
2234
2235 /* The semantic value of the lookahead symbol.  */
2236 YYSTYPE yylval;
2237
2238 /* Number of syntax errors so far.  */
2239 int yynerrs;
2240
2241
2242
2243 /*-------------------------.
2244 | yyparse or yypush_parse.  |
2245 `-------------------------*/
2246
2247 #ifdef YYPARSE_PARAM
2248 #if (defined __STDC__ || defined __C99__FUNC__ \
2249      || defined __cplusplus || defined _MSC_VER)
2250 int
2251 yyparse (void *YYPARSE_PARAM)
2252 #else
2253 int
2254 yyparse (YYPARSE_PARAM)
2255     void *YYPARSE_PARAM;
2256 #endif
2257 #else /* ! YYPARSE_PARAM */
2258 #if (defined __STDC__ || defined __C99__FUNC__ \
2259      || defined __cplusplus || defined _MSC_VER)
2260 int
2261 yyparse (void)
2262 #else
2263 int
2264 yyparse ()
2265
2266 #endif
2267 #endif
2268 {
2269
2270
2271     int yystate;
2272     /* Number of tokens to shift before error messages enabled.  */
2273     int yyerrstatus;
2274
2275     /* The stacks and their tools:
2276        `yyss': related to states.
2277        `yyvs': related to semantic values.
2278
2279        Refer to the stacks thru separate pointers, to allow yyoverflow
2280        to reallocate them elsewhere.  */
2281
2282     /* The state stack.  */
2283     yytype_int16 yyssa[YYINITDEPTH];
2284     yytype_int16 *yyss;
2285     yytype_int16 *yyssp;
2286
2287     /* The semantic value stack.  */
2288     YYSTYPE yyvsa[YYINITDEPTH];
2289     YYSTYPE *yyvs;
2290     YYSTYPE *yyvsp;
2291
2292     YYSIZE_T yystacksize;
2293
2294   int yyn;
2295   int yyresult;
2296   /* Lookahead token as an internal (translated) token number.  */
2297   int yytoken;
2298   /* The variables used to return semantic value and location from the
2299      action routines.  */
2300   YYSTYPE yyval;
2301
2302 #if YYERROR_VERBOSE
2303   /* Buffer for error messages, and its allocated size.  */
2304   char yymsgbuf[128];
2305   char *yymsg = yymsgbuf;
2306   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2307 #endif
2308
2309 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
2310
2311   /* The number of symbols on the RHS of the reduced rule.
2312      Keep to zero when no symbol should be popped.  */
2313   int yylen = 0;
2314
2315   yytoken = 0;
2316   yyss = yyssa;
2317   yyvs = yyvsa;
2318   yystacksize = YYINITDEPTH;
2319
2320   YYDPRINTF ((stderr, "Starting parse\n"));
2321
2322   yystate = 0;
2323   yyerrstatus = 0;
2324   yynerrs = 0;
2325   yychar = YYEMPTY; /* Cause a token to be read.  */
2326
2327   /* Initialize stack pointers.
2328      Waste one element of value and location stack
2329      so that they stay on the same level as the state stack.
2330      The wasted elements are never initialized.  */
2331   yyssp = yyss;
2332   yyvsp = yyvs;
2333
2334   goto yysetstate;
2335
2336 /*------------------------------------------------------------.
2337 | yynewstate -- Push a new state, which is found in yystate.  |
2338 `------------------------------------------------------------*/
2339  yynewstate:
2340   /* In all cases, when you get here, the value and location stacks
2341      have just been pushed.  So pushing a state here evens the stacks.  */
2342   yyssp++;
2343
2344  yysetstate:
2345   *yyssp = yystate;
2346
2347   if (yyss + yystacksize - 1 <= yyssp)
2348     {
2349       /* Get the current used size of the three stacks, in elements.  */
2350       YYSIZE_T yysize = yyssp - yyss + 1;
2351
2352 #ifdef yyoverflow
2353       {
2354         /* Give user a chance to reallocate the stack.  Use copies of
2355            these so that the &'s don't force the real ones into
2356            memory.  */
2357         YYSTYPE *yyvs1 = yyvs;
2358         yytype_int16 *yyss1 = yyss;
2359
2360         /* Each stack pointer address is followed by the size of the
2361            data in use in that stack, in bytes.  This used to be a
2362            conditional around just the two extra args, but that might
2363            be undefined if yyoverflow is a macro.  */
2364         yyoverflow (YY_("memory exhausted"),
2365                     &yyss1, yysize * sizeof (*yyssp),
2366                     &yyvs1, yysize * sizeof (*yyvsp),
2367                     &yystacksize);
2368
2369         yyss = yyss1;
2370         yyvs = yyvs1;
2371       }
2372 #else /* no yyoverflow */
2373 # ifndef YYSTACK_RELOCATE
2374       goto yyexhaustedlab;
2375 # else
2376       /* Extend the stack our own way.  */
2377       if (YYMAXDEPTH <= yystacksize)
2378         goto yyexhaustedlab;
2379       yystacksize *= 2;
2380       if (YYMAXDEPTH < yystacksize)
2381         yystacksize = YYMAXDEPTH;
2382
2383       {
2384         yytype_int16 *yyss1 = yyss;
2385         union yyalloc *yyptr =
2386           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2387         if (! yyptr)
2388           goto yyexhaustedlab;
2389         YYSTACK_RELOCATE (yyss_alloc, yyss);
2390         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2391 #  undef YYSTACK_RELOCATE
2392         if (yyss1 != yyssa)
2393           YYSTACK_FREE (yyss1);
2394       }
2395 # endif
2396 #endif /* no yyoverflow */
2397
2398       yyssp = yyss + yysize - 1;
2399       yyvsp = yyvs + yysize - 1;
2400
2401       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2402                   (unsigned long int) yystacksize));
2403
2404       if (yyss + yystacksize - 1 <= yyssp)
2405         YYABORT;
2406     }
2407
2408   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2409
2410   if (yystate == YYFINAL)
2411     YYACCEPT;
2412
2413   goto yybackup;
2414
2415 /*-----------.
2416 | yybackup.  |
2417 `-----------*/
2418 yybackup:
2419
2420   /* Do appropriate processing given the current state.  Read a
2421      lookahead token if we need one and don't already have one.  */
2422
2423   /* First try to decide what to do without reference to lookahead token.  */
2424   yyn = yypact[yystate];
2425   if (yyn == YYPACT_NINF)
2426     goto yydefault;
2427
2428   /* Not known => get a lookahead token if don't already have one.  */
2429
2430   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
2431   if (yychar == YYEMPTY)
2432     {
2433       YYDPRINTF ((stderr, "Reading a token: "));
2434       yychar = YYLEX;
2435     }
2436
2437   if (yychar <= YYEOF)
2438     {
2439       yychar = yytoken = YYEOF;
2440       YYDPRINTF ((stderr, "Now at end of input.\n"));
2441     }
2442   else
2443     {
2444       yytoken = YYTRANSLATE (yychar);
2445       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2446     }
2447
2448   /* If the proper action on seeing token YYTOKEN is to reduce or to
2449      detect an error, take that action.  */
2450   yyn += yytoken;
2451   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2452     goto yydefault;
2453   yyn = yytable[yyn];
2454   if (yyn <= 0)
2455     {
2456       if (yyn == 0 || yyn == YYTABLE_NINF)
2457         goto yyerrlab;
2458       yyn = -yyn;
2459       goto yyreduce;
2460     }
2461
2462   /* Count tokens shifted since error; after three, turn off error
2463      status.  */
2464   if (yyerrstatus)
2465     yyerrstatus--;
2466
2467   /* Shift the lookahead token.  */
2468   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2469
2470   /* Discard the shifted token.  */
2471   yychar = YYEMPTY;
2472
2473   yystate = yyn;
2474   *++yyvsp = yylval;
2475
2476   goto yynewstate;
2477
2478
2479 /*-----------------------------------------------------------.
2480 | yydefault -- do the default action for the current state.  |
2481 `-----------------------------------------------------------*/
2482 yydefault:
2483   yyn = yydefact[yystate];
2484   if (yyn == 0)
2485     goto yyerrlab;
2486   goto yyreduce;
2487
2488
2489 /*-----------------------------.
2490 | yyreduce -- Do a reduction.  |
2491 `-----------------------------*/
2492 yyreduce:
2493   /* yyn is the number of a rule to reduce with.  */
2494   yylen = yyr2[yyn];
2495
2496   /* If YYLEN is nonzero, implement the default value of the action:
2497      `$$ = $1'.
2498
2499      Otherwise, the following line sets YYVAL to garbage.
2500      This behavior is undocumented and Bison
2501      users should not rely upon it.  Assigning to YYVAL
2502      unconditionally makes the parser a bit smaller, and it avoids a
2503      GCC warning that YYVAL may be used uninitialized.  */
2504   yyval = yyvsp[1-yylen];
2505
2506
2507   YY_REDUCE_PRINT (yyn);
2508   switch (yyn)
2509     {
2510         case 2:
2511
2512 /* Line 1455 of yacc.c  */
2513 #line 704 "parse.y"
2514     { ; }
2515     break;
2516
2517   case 3:
2518
2519 /* Line 1455 of yacc.c  */
2520 #line 705 "parse.y"
2521     { ; }
2522     break;
2523
2524   case 4:
2525
2526 /* Line 1455 of yacc.c  */
2527 #line 706 "parse.y"
2528     { ; }
2529     break;
2530
2531   case 5:
2532
2533 /* Line 1455 of yacc.c  */
2534 #line 707 "parse.y"
2535     { ; }
2536     break;
2537
2538   case 6:
2539
2540 /* Line 1455 of yacc.c  */
2541 #line 710 "parse.y"
2542     {
2543                         Node *node = node_new (CCODE_NODE,
2544                                                "cctype", C_CCODE,
2545                                                "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2546                                                "line_no", ccode_line,
2547                                                NULL);
2548                         nodes = g_list_append(nodes,node);
2549                         g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2550                                         }
2551     break;
2552
2553   case 7:
2554
2555 /* Line 1455 of yacc.c  */
2556 #line 719 "parse.y"
2557     {
2558                         Node *node = node_new (CCODE_NODE,
2559                                                "cctype", AD_CCODE,
2560                                                "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2561                                                "line_no", ccode_line,
2562                                                NULL);
2563                         nodes = g_list_append(nodes,node);
2564                         g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2565                                         }
2566     break;
2567
2568   case 8:
2569
2570 /* Line 1455 of yacc.c  */
2571 #line 728 "parse.y"
2572     {
2573                         Node *node = node_new (CCODE_NODE,
2574                                                "cctype", H_CCODE,
2575                                                "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2576                                                "line_no", ccode_line,
2577                                                NULL);
2578                         nodes = g_list_append(nodes,node);
2579                         g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2580                                         }
2581     break;
2582
2583   case 9:
2584
2585 /* Line 1455 of yacc.c  */
2586 #line 737 "parse.y"
2587     {
2588                         Node *node = node_new (CCODE_NODE,
2589                                                "cctype", HT_CCODE,
2590                                                "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2591                                                "line_no", ccode_line,
2592                                                NULL);
2593                         nodes = g_list_append(nodes,node);
2594                         g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2595                                         }
2596     break;
2597
2598   case 10:
2599
2600 /* Line 1455 of yacc.c  */
2601 #line 746 "parse.y"
2602     {
2603                         Node *node = node_new (CCODE_NODE,
2604                                                "cctype", PH_CCODE,
2605                                                "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2606                                                "line_no", ccode_line,
2607                                                NULL);
2608                         nodes = g_list_append(nodes,node);
2609                         g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2610                                         }
2611     break;
2612
2613   case 11:
2614
2615 /* Line 1455 of yacc.c  */
2616 #line 755 "parse.y"
2617     {
2618                         Node *node = node_new (CCODE_NODE,
2619                                                "cctype", A_CCODE,
2620                                                "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2621                                                "line_no", ccode_line,
2622                                                NULL);
2623                         nodes = g_list_append(nodes,node);
2624                         g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2625                                         }
2626     break;
2627
2628   case 12:
2629
2630 /* Line 1455 of yacc.c  */
2631 #line 764 "parse.y"
2632     {
2633                         Node *node = node_new (CCODE_NODE,
2634                                                "cctype", AT_CCODE,
2635                                                "cbuf:steal", ((yyvsp[(1) - (1)].cbuf))->str,
2636                                                "line_no", ccode_line,
2637                                                NULL);
2638                         nodes = g_list_append(nodes,node);
2639                         g_string_free((yyvsp[(1) - (1)].cbuf),FALSE);
2640                                         }
2641     break;
2642
2643   case 13:
2644
2645 /* Line 1455 of yacc.c  */
2646 #line 775 "parse.y"
2647     { ; }
2648     break;
2649
2650   case 14:
2651
2652 /* Line 1455 of yacc.c  */
2653 #line 776 "parse.y"
2654     { ; }
2655     break;
2656
2657   case 15:
2658
2659 /* Line 1455 of yacc.c  */
2660 #line 777 "parse.y"
2661     { ; }
2662     break;
2663
2664   case 16:
2665
2666 /* Line 1455 of yacc.c  */
2667 #line 778 "parse.y"
2668     { ; }
2669     break;
2670
2671   case 17:
2672
2673 /* Line 1455 of yacc.c  */
2674 #line 779 "parse.y"
2675     { ; }
2676     break;
2677
2678   case 18:
2679
2680 /* Line 1455 of yacc.c  */
2681 #line 780 "parse.y"
2682     { ; }
2683     break;
2684
2685   case 19:
2686
2687 /* Line 1455 of yacc.c  */
2688 #line 781 "parse.y"
2689     { ; }
2690     break;
2691
2692   case 20:
2693
2694 /* Line 1455 of yacc.c  */
2695 #line 782 "parse.y"
2696     { ; }
2697     break;
2698
2699   case 21:
2700
2701 /* Line 1455 of yacc.c  */
2702 #line 785 "parse.y"
2703     {
2704                         ((Class *)class)->nodes = class_nodes;
2705                         class_nodes = NULL;
2706                         nodes = g_list_append(nodes,class);
2707                                                 }
2708     break;
2709
2710   case 22:
2711
2712 /* Line 1455 of yacc.c  */
2713 #line 790 "parse.y"
2714     {
2715                         ((Class *)class)->nodes = NULL;
2716                         class_nodes = NULL;
2717                         nodes = g_list_append(nodes,class);
2718                                                 }
2719     break;
2720
2721   case 23:
2722
2723 /* Line 1455 of yacc.c  */
2724 #line 797 "parse.y"
2725     {
2726                         class = node_new (CLASS_NODE,
2727                                           "otype:steal", (yyvsp[(2) - (5)].id),
2728                                           "ptype:steal", (yyvsp[(4) - (5)].id),
2729                                           "bonobo_object_class:steal", bonobo_object_class,
2730                                           "glade_xml", glade_xml,
2731                                           "interfaces:steal", interfaces,
2732                                           "chunk_size:steal", chunk_size,
2733                                           "abstract", abstract,
2734                                           NULL);
2735                         bonobo_object_class = NULL;
2736                         glade_xml = FALSE;
2737                         chunk_size = NULL;
2738                         interfaces = NULL;
2739                                                 }
2740     break;
2741
2742   case 25:
2743
2744 /* Line 1455 of yacc.c  */
2745 #line 815 "parse.y"
2746     {
2747                         if(strcmp((yyvsp[(2) - (4)].id),"abstract") == 0) {
2748                                 abstract = TRUE;
2749                         } else {
2750                                 yyerror(_("parse error"));
2751                                 YYERROR;
2752                         }
2753                 }
2754     break;
2755
2756   case 26:
2757
2758 /* Line 1455 of yacc.c  */
2759 #line 823 "parse.y"
2760     {
2761                         if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2762                                 g_free (chunk_size);
2763                                 chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2764                         } else if(strcmp((yyvsp[(2) - (5)].id),"BonoboObject") == 0) {
2765                                 g_free (bonobo_object_class);
2766                                 bonobo_object_class = g_strdup((yyvsp[(3) - (5)].id));
2767                         } else {
2768                                 yyerror(_("parse error"));
2769                                 YYERROR;
2770                         }
2771                 }
2772     break;
2773
2774   case 27:
2775
2776 /* Line 1455 of yacc.c  */
2777 #line 835 "parse.y"
2778     {
2779                         if (strcmp ((yyvsp[(2) - (5)].id), "interface") == 0) {
2780                                 interfaces = g_list_append (interfaces,
2781                                                             g_strdup ((yyvsp[(3) - (5)].id)));
2782                         } else {
2783                                 yyerror(_("parse error"));
2784                                 YYERROR;
2785                         }
2786                 }
2787     break;
2788
2789   case 28:
2790
2791 /* Line 1455 of yacc.c  */
2792 #line 844 "parse.y"
2793     {
2794                         if(strcmp((yyvsp[(2) - (5)].id),"chunks") == 0) {
2795                                 g_free (chunk_size);
2796                                 if(atoi((yyvsp[(3) - (5)].id)) != 0)
2797                                         chunk_size = g_strdup((yyvsp[(3) - (5)].id));
2798                                 else
2799                                         chunk_size = NULL;
2800                         } else {
2801                                 yyerror(_("parse error"));
2802                                 YYERROR;
2803                         }
2804                 }
2805     break;
2806
2807   case 29:
2808
2809 /* Line 1455 of yacc.c  */
2810 #line 856 "parse.y"
2811     {
2812                         if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2813                                 glade_xml = TRUE;
2814                                 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2815                         } else {
2816                                 yyerror(_("parse error"));
2817                                 YYERROR;
2818                         }
2819                 }
2820     break;
2821
2822   case 30:
2823
2824 /* Line 1455 of yacc.c  */
2825 #line 865 "parse.y"
2826     {
2827                         if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2828                                 glade_xml = TRUE;
2829                                 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2830                         } else {
2831                                 yyerror(_("parse error"));
2832                                 YYERROR;
2833                         }
2834                 }
2835     break;
2836
2837   case 31:
2838
2839 /* Line 1455 of yacc.c  */
2840 #line 874 "parse.y"
2841     {
2842                         if (strcmp ((yyvsp[(2) - (6)].id), "GladeXML") == 0) {
2843                                 glade_xml = TRUE;
2844                                 add_construct_glade((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id), NULL);
2845                         } else {
2846                                 yyerror(_("parse error"));
2847                                 YYERROR;
2848                         }
2849                 }
2850     break;
2851
2852   case 32:
2853
2854 /* Line 1455 of yacc.c  */
2855 #line 883 "parse.y"
2856     {
2857                         if (strcmp ((yyvsp[(2) - (7)].id), "GladeXML") == 0) {
2858                                 glade_xml = TRUE;
2859                                 add_construct_glade((yyvsp[(3) - (7)].id), (yyvsp[(4) - (7)].id), (yyvsp[(5) - (7)].id));
2860                         } else {
2861                                 yyerror(_("parse error"));
2862                                 YYERROR;
2863                         }
2864                 }
2865     break;
2866
2867   case 33:
2868
2869 /* Line 1455 of yacc.c  */
2870 #line 894 "parse.y"
2871     { ; }
2872     break;
2873
2874   case 34:
2875
2876 /* Line 1455 of yacc.c  */
2877 #line 895 "parse.y"
2878     { ; }
2879     break;
2880
2881   case 35:
2882
2883 /* Line 1455 of yacc.c  */
2884 #line 898 "parse.y"
2885     { ; }
2886     break;
2887
2888   case 36:
2889
2890 /* Line 1455 of yacc.c  */
2891 #line 899 "parse.y"
2892     {
2893                         if (strcmp ((yyvsp[(1) - (2)].id), "BonoboObject") != 0) {
2894                                 g_free ((yyvsp[(1) - (2)].id));
2895                                 yyerror (_("parse error"));
2896                                 YYERROR;
2897                         }
2898                         g_free ((yyvsp[(1) - (2)].id));
2899                         last_added_method->bonobo_object_func = TRUE;
2900                                                 }
2901     break;
2902
2903   case 37:
2904
2905 /* Line 1455 of yacc.c  */
2906 #line 908 "parse.y"
2907     {
2908                         if (strcmp ((yyvsp[(1) - (3)].id), "interface") != 0) {
2909                                 g_free ((yyvsp[(1) - (3)].id));
2910                                 g_free ((yyvsp[(2) - (3)].id));
2911                                 yyerror (_("parse error"));
2912                                 YYERROR;
2913                         }
2914                         g_free ((yyvsp[(1) - (3)].id));
2915                         node_set ((Node *)last_added_method,
2916                                   "interface:steal", (yyvsp[(2) - (3)].id),
2917                                   NULL);
2918                                                 }
2919     break;
2920
2921   case 38:
2922
2923 /* Line 1455 of yacc.c  */
2924 #line 920 "parse.y"
2925     { ; }
2926     break;
2927
2928   case 39:
2929
2930 /* Line 1455 of yacc.c  */
2931 #line 921 "parse.y"
2932     { ; }
2933     break;
2934
2935   case 40:
2936
2937 /* Line 1455 of yacc.c  */
2938 #line 922 "parse.y"
2939     { ; }
2940     break;
2941
2942   case 41:
2943
2944 /* Line 1455 of yacc.c  */
2945 #line 923 "parse.y"
2946     { ; }
2947     break;
2948
2949   case 42:
2950
2951 /* Line 1455 of yacc.c  */
2952 #line 926 "parse.y"
2953     { the_scope = PUBLIC_SCOPE; }
2954     break;
2955
2956   case 43:
2957
2958 /* Line 1455 of yacc.c  */
2959 #line 927 "parse.y"
2960     { the_scope = PRIVATE_SCOPE; }
2961     break;
2962
2963   case 44:
2964
2965 /* Line 1455 of yacc.c  */
2966 #line 928 "parse.y"
2967     { the_scope = PROTECTED_SCOPE; }
2968     break;
2969
2970   case 45:
2971
2972 /* Line 1455 of yacc.c  */
2973 #line 929 "parse.y"
2974     { the_scope = CLASS_SCOPE; }
2975     break;
2976
2977   case 46:
2978
2979 /* Line 1455 of yacc.c  */
2980 #line 932 "parse.y"
2981     {
2982                         if (strcmp ((yyvsp[(1) - (2)].id), "destroywith") == 0) {
2983                                 g_free ((yyvsp[(1) - (2)].id));
2984                                 destructor_unref = FALSE;
2985                                 destructor = (yyvsp[(2) - (2)].id);
2986                                 destructor_line = line_no;
2987                                 destructor_simple = TRUE;
2988                         } else if (strcmp ((yyvsp[(1) - (2)].id), "unrefwith") == 0) {
2989                                 g_free ((yyvsp[(1) - (2)].id));
2990                                 destructor_unref = TRUE;
2991                                 destructor = (yyvsp[(2) - (2)].id);
2992                                 destructor_line = line_no;
2993                                 destructor_simple = TRUE;
2994                         } else {
2995                                 g_free ((yyvsp[(1) - (2)].id));
2996                                 g_free ((yyvsp[(2) - (2)].id));
2997                                 yyerror (_("parse error"));
2998                                 YYERROR;
2999                         }
3000                                 }
3001     break;
3002
3003   case 47:
3004
3005 /* Line 1455 of yacc.c  */
3006 #line 952 "parse.y"
3007     {
3008                         if (strcmp ((yyvsp[(1) - (3)].id), "destroy") == 0) {
3009                                 g_free((yyvsp[(1) - (3)].id));
3010                                 destructor_unref = FALSE;
3011                                 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3012                                 g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3013                                 destructor_line = ccode_line;
3014                                 destructor_simple = FALSE;
3015                         } else if (strcmp ((yyvsp[(1) - (3)].id), "unref") == 0) {
3016                                 g_free ((yyvsp[(1) - (3)].id));
3017                                 destructor_unref = TRUE;
3018                                 destructor = ((yyvsp[(3) - (3)].cbuf))->str;
3019                                 g_string_free ((yyvsp[(3) - (3)].cbuf), FALSE);
3020                                 destructor_line = ccode_line;
3021                                 destructor_simple = FALSE;
3022                         } else {
3023                                 g_free ((yyvsp[(1) - (3)].id));
3024                                 g_string_free ((yyvsp[(3) - (3)].cbuf), TRUE);
3025                                 yyerror (_("parse error"));
3026                                 YYERROR;
3027                         }
3028                                         }
3029     break;
3030
3031   case 48:
3032
3033 /* Line 1455 of yacc.c  */
3034 #line 976 "parse.y"
3035     {
3036                         initializer = (yyvsp[(2) - (2)].id);
3037                         initializer_line = ccode_line;
3038                                 }
3039     break;
3040
3041   case 49:
3042
3043 /* Line 1455 of yacc.c  */
3044 #line 980 "parse.y"
3045     {
3046                         initializer = ((yyvsp[(3) - (3)].cbuf))->str;
3047                         initializer_line = ccode_line;
3048                         g_string_free((yyvsp[(3) - (3)].cbuf), FALSE);
3049                                 }
3050     break;
3051
3052   case 50:
3053
3054 /* Line 1455 of yacc.c  */
3055 #line 988 "parse.y"
3056     { ; }
3057     break;
3058
3059   case 51:
3060
3061 /* Line 1455 of yacc.c  */
3062 #line 989 "parse.y"
3063     { ; }
3064     break;
3065
3066   case 52:
3067
3068 /* Line 1455 of yacc.c  */
3069 #line 990 "parse.y"
3070     { destructor = NULL; }
3071     break;
3072
3073   case 53:
3074
3075 /* Line 1455 of yacc.c  */
3076 #line 991 "parse.y"
3077     { initializer = NULL; }
3078     break;
3079
3080   case 54:
3081
3082 /* Line 1455 of yacc.c  */
3083 #line 992 "parse.y"
3084     {
3085                         if (strcmp ((yyvsp[(1) - (1)].id), "GladeXML") == 0) {
3086                                 glade_widget = TRUE;
3087                         } else {
3088                                 yyerror(_("parse error"));
3089                                 YYERROR;
3090                         }
3091                                         }
3092     break;
3093
3094   case 55:
3095
3096 /* Line 1455 of yacc.c  */
3097 #line 1000 "parse.y"
3098     {
3099                         destructor = NULL;
3100                         initializer = NULL;
3101                                         }
3102     break;
3103
3104   case 56:
3105
3106 /* Line 1455 of yacc.c  */
3107 #line 1006 "parse.y"
3108     {
3109                         push_variable((yyvsp[(3) - (5)].id), the_scope,(yyvsp[(1) - (5)].line), NULL);
3110                                                 }
3111     break;
3112
3113   case 57:
3114
3115 /* Line 1455 of yacc.c  */
3116 #line 1009 "parse.y"
3117     {
3118                         push_variable((yyvsp[(3) - (6)].id), the_scope, (yyvsp[(1) - (6)].line), (yyvsp[(4) - (6)].id));
3119                                                 }
3120     break;
3121
3122   case 58:
3123
3124 /* Line 1455 of yacc.c  */
3125 #line 1014 "parse.y"
3126     {
3127                         Node *node = NULL;
3128                         if(strcmp((yyvsp[(6) - (12)].id),"get")==0 &&
3129                            strcmp((yyvsp[(9) - (12)].id),"set")==0) {
3130                                 Type *type = pop_type();
3131                                 g_free ((yyvsp[(6) - (12)].id)); 
3132                                 g_free ((yyvsp[(9) - (12)].id));
3133                                 node = node_new (ARGUMENT_NODE,
3134                                                  "gtktype:steal", (yyvsp[(3) - (12)].id),
3135                                                  "atype:steal", type,
3136                                                  "flags:steal", (yyvsp[(2) - (12)].list),
3137                                                  "name:steal", (yyvsp[(4) - (12)].id),
3138                                                  "get:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3139                                                  "get_line", (yyvsp[(7) - (12)].line),
3140                                                  "set:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3141                                                  "set_line", (yyvsp[(10) - (12)].line),
3142                                                  "line_no", (yyvsp[(1) - (12)].line),
3143                                                  NULL);
3144
3145                                 class_nodes = g_list_append(class_nodes,node);
3146
3147                                 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3148                                 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3149
3150                         } else if(strcmp((yyvsp[(6) - (12)].id),"set")==0 &&
3151                                 strcmp((yyvsp[(9) - (12)].id),"get")==0) {
3152                                 Type *type = pop_type();
3153                                 g_free ((yyvsp[(6) - (12)].id)); 
3154                                 g_free ((yyvsp[(9) - (12)].id));
3155                                 node = node_new (ARGUMENT_NODE,
3156                                                  "gtktype:steal", (yyvsp[(3) - (12)].id),
3157                                                  "atype:steal", type,
3158                                                  "flags:steal", (yyvsp[(2) - (12)].list),
3159                                                  "name:steal", (yyvsp[(4) - (12)].id),
3160                                                  "get:steal", ((yyvsp[(11) - (12)].cbuf))->str,
3161                                                  "get_line", (yyvsp[(10) - (12)].line),
3162                                                  "set:steal", ((yyvsp[(8) - (12)].cbuf))->str,
3163                                                  "set_line", (yyvsp[(7) - (12)].line),
3164                                                  "line_no", (yyvsp[(1) - (12)].line),
3165                                                  NULL);
3166                                 g_string_free ((yyvsp[(11) - (12)].cbuf), FALSE);
3167                                 g_string_free ((yyvsp[(8) - (12)].cbuf), FALSE);
3168                                 class_nodes = g_list_append(class_nodes,node);
3169                         } else {
3170                                 g_free ((yyvsp[(3) - (12)].id)); 
3171                                 g_free ((yyvsp[(4) - (12)].id));
3172                                 g_free ((yyvsp[(6) - (12)].id)); 
3173                                 g_free ((yyvsp[(9) - (12)].id));
3174                                 g_list_foreach ((yyvsp[(2) - (12)].list), (GFunc)g_free, NULL);
3175                                 g_list_free ((yyvsp[(2) - (12)].list));
3176                                 g_string_free ((yyvsp[(11) - (12)].cbuf), TRUE);
3177                                 g_string_free ((yyvsp[(8) - (12)].cbuf), TRUE);
3178                                 yyerror (_("parse error"));
3179                                 YYERROR;
3180                         }
3181
3182                         if ((yyvsp[(5) - (12)].id) != NULL) {
3183                                 Argument *arg = (Argument *)node;
3184                                 export_accessors (arg->name,
3185                                                   arg->get != NULL, arg->get_line,
3186                                                   arg->set != NULL, arg->set_line,
3187                                                   arg->atype,
3188                                                   arg->gtktype,
3189                                                   arg->line_no);
3190                                 g_free ((yyvsp[(5) - (12)].id));
3191                         } 
3192
3193                                                 }
3194     break;
3195
3196   case 59:
3197
3198 /* Line 1455 of yacc.c  */
3199 #line 1082 "parse.y"
3200     {
3201                         Node *node = NULL;
3202                         if(strcmp((yyvsp[(6) - (9)].id), "get") == 0) {
3203                                 Type *type = pop_type();
3204                                 g_free ((yyvsp[(6) - (9)].id));
3205                                 node = node_new (ARGUMENT_NODE,
3206                                                  "gtktype:steal", (yyvsp[(3) - (9)].id),
3207                                                  "atype:steal", type,
3208                                                  "flags:steal", (yyvsp[(2) - (9)].list),
3209                                                  "name:steal", (yyvsp[(4) - (9)].id),
3210                                                  "get:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3211                                                  "get_line", (yyvsp[(7) - (9)].line),
3212                                                  "line_no", (yyvsp[(1) - (9)].line),
3213                                                  NULL);
3214
3215                                 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3216                                 class_nodes = g_list_append(class_nodes, node);
3217                         } else if(strcmp((yyvsp[(6) - (9)].id), "set") == 0) {
3218                                 Type *type = pop_type();
3219                                 g_free ((yyvsp[(6) - (9)].id));
3220                                 node = node_new (ARGUMENT_NODE,
3221                                                  "gtktype:steal", (yyvsp[(3) - (9)].id),
3222                                                  "atype:steal", type,
3223                                                  "flags:steal", (yyvsp[(2) - (9)].list),
3224                                                  "name:steal", (yyvsp[(4) - (9)].id),
3225                                                  "set:steal", ((yyvsp[(8) - (9)].cbuf))->str,
3226                                                  "set_line", (yyvsp[(7) - (9)].line),
3227                                                  "line_no", (yyvsp[(1) - (9)].line),
3228                                                  NULL);
3229
3230                                 g_string_free ((yyvsp[(8) - (9)].cbuf), FALSE);
3231                                 class_nodes = g_list_append (class_nodes, node);
3232                         } else {
3233                                 g_free ((yyvsp[(6) - (9)].id)); 
3234                                 g_free ((yyvsp[(3) - (9)].id));
3235                                 g_free ((yyvsp[(4) - (9)].id));
3236                                 g_list_foreach ((yyvsp[(2) - (9)].list), (GFunc)g_free, NULL);
3237                                 g_list_free ((yyvsp[(2) - (9)].list));
3238                                 g_string_free ((yyvsp[(8) - (9)].cbuf), TRUE);
3239                                 yyerror(_("parse error"));
3240                                 YYERROR;
3241                         }
3242
3243                         if ((yyvsp[(5) - (9)].id) != NULL) {
3244                                 Argument *arg = (Argument *)node;
3245                                 export_accessors (arg->name,
3246                                                   arg->get != NULL, arg->get_line,
3247                                                   arg->set != NULL, arg->set_line,
3248                                                   arg->atype,
3249                                                   arg->gtktype,
3250                                                   arg->line_no);
3251                                 g_free ((yyvsp[(5) - (9)].id));
3252                         } 
3253                                                 }
3254     break;
3255
3256   case 60:
3257
3258 /* Line 1455 of yacc.c  */
3259 #line 1136 "parse.y"
3260     {
3261                         Node *node;
3262                         char *get, *set = NULL;
3263                         Variable *var;
3264                         Type *type;
3265                         const char *root;
3266                         
3267                         if(strcmp((yyvsp[(6) - (6)].id), "link")!=0 &&
3268                            strcmp((yyvsp[(6) - (6)].id), "stringlink")!=0 && 
3269                            strcmp((yyvsp[(6) - (6)].id), "objectlink")!=0) {
3270                                 g_free((yyvsp[(6) - (6)].id)); 
3271                                 g_free((yyvsp[(3) - (6)].id));
3272                                 g_free((yyvsp[(4) - (6)].id));
3273                                 g_list_foreach((yyvsp[(2) - (6)].list),(GFunc)g_free,NULL);
3274                                 g_list_free((yyvsp[(2) - (6)].list));
3275                                 yyerror(_("parse error"));
3276                                 YYERROR;
3277                         }
3278
3279                         type = pop_type();
3280
3281                         var = find_var_or_die((yyvsp[(4) - (6)].id), (yyvsp[(1) - (6)].line));
3282                         if(var->scope == PRIVATE_SCOPE) {
3283                                 root = "self->_priv";
3284                         } else if(var->scope == CLASS_SCOPE) {
3285                                 root = "SELF_GET_CLASS(self)";
3286                                 if(no_self_alias)
3287                                         error_print(GOB_ERROR, (yyvsp[(1) - (6)].line),
3288                                                     _("Self aliases needed when autolinking to a classwide member"));
3289                         } else {
3290                                 root = "self";
3291                         }
3292
3293                         if(strcmp((yyvsp[(6) - (6)].id), "link")==0) {
3294                                 set = g_strdup_printf("%s->%s = ARG;",
3295                                                       root, (yyvsp[(4) - (6)].id));
3296                         } else if(strcmp((yyvsp[(6) - (6)].id), "stringlink")==0) {
3297                                 set = g_strdup_printf("g_free (%s->%s); "
3298                                                       "%s->%s = g_strdup (ARG);",
3299                                                       root, (yyvsp[(4) - (6)].id),
3300                                                       root, (yyvsp[(4) - (6)].id));
3301                         } else if(strcmp((yyvsp[(6) - (6)].id), "objectlink")==0) {
3302                                 set = g_strdup_printf(
3303                                   "if (ARG != NULL) "
3304                                    "g_object_ref (G_OBJECT (ARG)); "
3305                                   "if (%s->%s != NULL) "
3306                                    "g_object_unref (G_OBJECT (%s->%s)); "
3307                                   "%s->%s = ARG;",
3308                                   root, (yyvsp[(4) - (6)].id),
3309                                   root, (yyvsp[(4) - (6)].id),
3310                                   root, (yyvsp[(4) - (6)].id));
3311                         } else {
3312                                 g_assert_not_reached();
3313                         }
3314
3315                         get = g_strdup_printf("ARG = %s->%s;", root, (yyvsp[(4) - (6)].id));
3316   
3317                         g_free ((yyvsp[(6) - (6)].id));
3318
3319                         if (type == NULL)
3320                                 type = (Type *)node_copy ((Node *)var->vtype);
3321
3322                         node = node_new (ARGUMENT_NODE,
3323                                          "gtktype:steal", (yyvsp[(3) - (6)].id),
3324                                          "atype:steal", type,
3325                                          "flags:steal", (yyvsp[(2) - (6)].list),
3326                                          "name:steal", (yyvsp[(4) - (6)].id),
3327                                          "get:steal", get,
3328                                          "get_line", (yyvsp[(1) - (6)].line),
3329                                          "set:steal", set,
3330                                          "set_line", (yyvsp[(1) - (6)].line),
3331                                          "line_no", (yyvsp[(1) - (6)].line),
3332                                          NULL);
3333
3334                         if ((yyvsp[(5) - (6)].id) != NULL) {
3335                                 Argument *arg = (Argument *)node;
3336                                 export_accessors (arg->name,
3337                                                   arg->get != NULL, arg->get_line,
3338                                                   arg->set != NULL, arg->set_line,
3339                                                   arg->atype,
3340                                                   arg->gtktype,
3341                                                   arg->line_no);
3342                                 g_free ((yyvsp[(5) - (6)].id));
3343                         } 
3344
3345                         class_nodes = g_list_append (class_nodes, node);
3346                                                 }
3347     break;
3348
3349   case 61:
3350
3351 /* Line 1455 of yacc.c  */
3352 #line 1225 "parse.y"
3353     {
3354                         if (strcmp ((yyvsp[(2) - (3)].id), "export")!=0) {
3355                                 g_free ((yyvsp[(2) - (3)].id)); 
3356                                 yyerror (_("parse error"));
3357                                 YYERROR;
3358                         }
3359                         (yyval.id) = (yyvsp[(2) - (3)].id);
3360                                                 }
3361     break;
3362
3363   case 62:
3364
3365 /* Line 1455 of yacc.c  */
3366 #line 1233 "parse.y"
3367     {
3368                         (yyval.id) = NULL;
3369                                                 }
3370     break;
3371
3372   case 63:
3373
3374 /* Line 1455 of yacc.c  */
3375 #line 1238 "parse.y"
3376     {
3377                         ensure_property ();
3378                         node_set ((Node *)property,
3379                                   "line_no", (yyvsp[(1) - (11)].line),
3380                                   "gtktype:steal", debool ((yyvsp[(2) - (11)].id)),
3381                                   "name:steal", (yyvsp[(3) - (11)].id),
3382                                   NULL);
3383                         if (strcmp ((yyvsp[(5) - (11)].id), "get") == 0 &&
3384                             strcmp ((yyvsp[(8) - (11)].id), "set") == 0) {
3385                                 node_set ((Node *)property,
3386                                           "get:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3387                                           "get_line", (yyvsp[(6) - (11)].line),
3388                                           "set:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3389                                           "set_line", (yyvsp[(9) - (11)].line),
3390                                           NULL);
3391                                 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3392                                 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3393                                 g_free ((yyvsp[(5) - (11)].id)); 
3394                                 g_free ((yyvsp[(8) - (11)].id));
3395                         } else if (strcmp ((yyvsp[(5) - (11)].id), "set") == 0 &&
3396                                    strcmp ((yyvsp[(8) - (11)].id), "get") == 0) {
3397                                 node_set ((Node *)property,
3398                                           "get:steal", ((yyvsp[(10) - (11)].cbuf))->str,
3399                                           "get_line", (yyvsp[(9) - (11)].line),
3400                                           "set:steal", ((yyvsp[(7) - (11)].cbuf))->str,
3401                                           "set_line", (yyvsp[(6) - (11)].line),
3402                                           NULL);
3403                                 g_string_free ((yyvsp[(7) - (11)].cbuf), FALSE);
3404                                 g_string_free ((yyvsp[(10) - (11)].cbuf), FALSE);
3405                                 g_free ((yyvsp[(5) - (11)].id)); 
3406                                 g_free ((yyvsp[(8) - (11)].id));
3407                         } else {
3408                                 g_string_free ((yyvsp[(7) - (11)].cbuf), TRUE);
3409                                 g_string_free ((yyvsp[(10) - (11)].cbuf), TRUE);
3410                                 g_free ((yyvsp[(5) - (11)].id)); 
3411                                 g_free ((yyvsp[(8) - (11)].id));
3412                                 node_free ((Node *)property);
3413                                 property = NULL;
3414                                 yyerror (_("parse error"));
3415                                 YYERROR;
3416                         }
3417                         property_link_and_export ((Node *)property);
3418                         if (property != NULL) {
3419                                 class_nodes = g_list_append (class_nodes,
3420                                                              property);
3421                                 property = NULL;
3422                         }
3423                 }
3424     break;
3425
3426   case 64:
3427
3428 /* Line 1455 of yacc.c  */
3429 #line 1286 "parse.y"
3430     {
3431                         ensure_property ();
3432                         node_set ((Node *)property,
3433                                   "line_no", (yyvsp[(1) - (8)].line),
3434                                   "gtktype:steal", debool ((yyvsp[(2) - (8)].id)),
3435                                   "name:steal", (yyvsp[(3) - (8)].id),
3436                                   NULL);
3437                         if (strcmp ((yyvsp[(5) - (8)].id), "get") == 0) {
3438                                 node_set ((Node *)property,
3439                                           "get:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3440                                           "get_line", (yyvsp[(6) - (8)].line),
3441                                           NULL);
3442                                 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3443                                 g_free ((yyvsp[(5) - (8)].id)); 
3444                         } else if (strcmp ((yyvsp[(5) - (8)].id), "set") == 0) {
3445                                 node_set ((Node *)property,
3446                                           "set:steal", ((yyvsp[(7) - (8)].cbuf))->str,
3447                                           "set_line", (yyvsp[(6) - (8)].line),
3448                                           NULL);
3449                                 g_string_free ((yyvsp[(7) - (8)].cbuf), FALSE);
3450                                 g_free ((yyvsp[(5) - (8)].id)); 
3451                         } else {
3452                                 g_string_free ((yyvsp[(7) - (8)].cbuf), TRUE);
3453                                 g_free ((yyvsp[(5) - (8)].id)); 
3454                                 node_free ((Node *)property);
3455                                 property = NULL;
3456                                 yyerror (_("parse error"));
3457                                 YYERROR;
3458                         }
3459                         property_link_and_export ((Node *)property);
3460                         if (property != NULL) {
3461                                 class_nodes = g_list_append (class_nodes,
3462                                                              property);
3463                                 property = NULL;
3464                         }
3465                 }
3466     break;
3467
3468   case 65:
3469
3470 /* Line 1455 of yacc.c  */
3471 #line 1322 "parse.y"
3472     {
3473                         ensure_property ();
3474                         node_set ((Node *)property,
3475                                   "line_no", (yyvsp[(1) - (5)].line),
3476                                   "gtktype:steal", debool ((yyvsp[(2) - (5)].id)),
3477                                   "name:steal", (yyvsp[(3) - (5)].id),
3478                                   NULL);
3479                         property_link_and_export ((Node *)property);
3480                         if (property != NULL) {
3481                                 class_nodes = g_list_append (class_nodes,
3482                                                              property);
3483                                 property = NULL;
3484                         }
3485                 }
3486     break;
3487
3488   case 66:
3489
3490 /* Line 1455 of yacc.c  */
3491 #line 1338 "parse.y"
3492     { ; }
3493     break;
3494
3495   case 67:
3496
3497 /* Line 1455 of yacc.c  */
3498 #line 1339 "parse.y"
3499     { ; }
3500     break;
3501
3502   case 68:
3503
3504 /* Line 1455 of yacc.c  */
3505 #line 1342 "parse.y"
3506     { ; }
3507     break;
3508
3509   case 69:
3510
3511 /* Line 1455 of yacc.c  */
3512 #line 1343 "parse.y"
3513     { ; }
3514     break;
3515
3516   case 70:
3517
3518 /* Line 1455 of yacc.c  */
3519 #line 1346 "parse.y"
3520     { (yyval.id) = (yyvsp[(1) - (1)].id); }
3521     break;
3522
3523   case 71:
3524
3525 /* Line 1455 of yacc.c  */
3526 #line 1347 "parse.y"
3527     {
3528                         if (strcmp ((yyvsp[(1) - (4)].id), "_") != 0) {
3529                                 g_free ((yyvsp[(1) - (4)].id));
3530                                 yyerror(_("parse error"));
3531                                 YYERROR;
3532                         }
3533                         g_free ((yyvsp[(1) - (4)].id));
3534                         (yyval.id) = g_strconcat ("_(", (yyvsp[(3) - (4)].id), ")", NULL);
3535                         g_free ((yyvsp[(3) - (4)].id));
3536                 }
3537     break;
3538
3539   case 72:
3540
3541 /* Line 1455 of yacc.c  */
3542 #line 1359 "parse.y"
3543     { (yyval.id) = (yyvsp[(1) - (1)].id); }
3544     break;
3545
3546   case 73:
3547
3548 /* Line 1455 of yacc.c  */
3549 #line 1360 "parse.y"
3550     { (yyval.id) = (yyvsp[(1) - (1)].id); }
3551     break;
3552
3553   case 74:
3554
3555 /* Line 1455 of yacc.c  */
3556 #line 1363 "parse.y"
3557     {
3558                 ensure_property ();
3559                 node_set ((Node *)property,
3560                           "nick:steal", (yyvsp[(3) - (3)].id),
3561                           NULL);
3562                   }
3563     break;
3564
3565   case 75:
3566
3567 /* Line 1455 of yacc.c  */
3568 #line 1369 "parse.y"
3569     {
3570                 ensure_property ();
3571                 node_set ((Node *)property,
3572                           "blurb:steal", (yyvsp[(3) - (3)].id),
3573                           NULL);
3574                   }
3575     break;
3576
3577   case 76:
3578
3579 /* Line 1455 of yacc.c  */
3580 #line 1375 "parse.y"
3581     {
3582                 ensure_property ();
3583                 node_set ((Node *)property,
3584                           "maximum:steal", (yyvsp[(3) - (3)].id),
3585                           NULL);
3586                   }
3587     break;
3588
3589   case 77:
3590
3591 /* Line 1455 of yacc.c  */
3592 #line 1381 "parse.y"
3593     {
3594                 ensure_property ();
3595                 node_set ((Node *)property,
3596                           "minimum:steal", (yyvsp[(3) - (3)].id),
3597                           NULL);
3598                   }
3599     break;
3600
3601   case 78:
3602
3603 /* Line 1455 of yacc.c  */
3604 #line 1387 "parse.y"
3605     {
3606                 ensure_property ();
3607                 node_set ((Node *)property,
3608                           "default_value:steal", (yyvsp[(3) - (3)].id),
3609                           NULL);
3610                   }
3611     break;
3612
3613   case 79:
3614
3615 /* Line 1455 of yacc.c  */
3616 #line 1393 "parse.y"
3617     {
3618                 ensure_property ();
3619                 node_set ((Node *)property,
3620                           "flags:steal", (yyvsp[(3) - (3)].list),
3621                           NULL);
3622                   }
3623     break;
3624
3625   case 80:
3626
3627 /* Line 1455 of yacc.c  */
3628 #line 1399 "parse.y"
3629     {
3630                 Type *type = pop_type ();
3631                 ensure_property ();
3632                 node_set ((Node *)property,
3633                           "ptype:steal", type,
3634                           NULL);
3635                   }
3636     break;
3637
3638   case 81:
3639
3640 /* Line 1455 of yacc.c  */
3641 #line 1406 "parse.y"
3642     {
3643                 ensure_property ();
3644                 node_set ((Node *)property,
3645                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3646                           NULL);
3647                   }
3648     break;
3649
3650   case 82:
3651
3652 /* Line 1455 of yacc.c  */
3653 #line 1412 "parse.y"
3654     {
3655                 ensure_property ();
3656                 node_set ((Node *)property,
3657                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3658                           NULL);
3659                   }
3660     break;
3661
3662   case 83:
3663
3664 /* Line 1455 of yacc.c  */
3665 #line 1418 "parse.y"
3666     {
3667                 ensure_property ();
3668                 node_set ((Node *)property,
3669                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3670                           NULL);
3671                   }
3672     break;
3673
3674   case 84:
3675
3676 /* Line 1455 of yacc.c  */
3677 #line 1424 "parse.y"
3678     {
3679                 ensure_property ();
3680                 node_set ((Node *)property,
3681                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3682                           NULL);
3683                   }
3684     break;
3685
3686   case 85:
3687
3688 /* Line 1455 of yacc.c  */
3689 #line 1430 "parse.y"
3690     {
3691                 ensure_property ();
3692                 node_set ((Node *)property,
3693                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3694                           NULL);
3695                   }
3696     break;
3697
3698   case 86:
3699
3700 /* Line 1455 of yacc.c  */
3701 #line 1436 "parse.y"
3702     {
3703                 ensure_property ();
3704                 node_set ((Node *)property,
3705                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3706                           NULL);
3707                   }
3708     break;
3709
3710   case 87:
3711
3712 /* Line 1455 of yacc.c  */
3713 #line 1442 "parse.y"
3714     {
3715                 ensure_property ();
3716                 node_set ((Node *)property,
3717                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3718                           NULL);
3719                   }
3720     break;
3721
3722   case 88:
3723
3724 /* Line 1455 of yacc.c  */
3725 #line 1448 "parse.y"
3726     {
3727                 ensure_property ();
3728                 node_set ((Node *)property,
3729                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3730                           NULL);
3731                   }
3732     break;
3733
3734   case 89:
3735
3736 /* Line 1455 of yacc.c  */
3737 #line 1454 "parse.y"
3738     {
3739                 ensure_property ();
3740                 node_set ((Node *)property,
3741                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3742                           NULL);
3743                   }
3744     break;
3745
3746   case 90:
3747
3748 /* Line 1455 of yacc.c  */
3749 #line 1460 "parse.y"
3750     {
3751                 ensure_property ();
3752                 node_set ((Node *)property,
3753                           "extra_gtktype:steal", (yyvsp[(3) - (3)].id),
3754                           NULL);
3755                   }
3756     break;
3757
3758   case 91:
3759
3760 /* Line 1455 of yacc.c  */
3761 #line 1466 "parse.y"
3762     {
3763                 ensure_property ();
3764                 if (strcmp ((yyvsp[(1) - (1)].id), "override") == 0) {
3765                         g_free((yyvsp[(1) - (1)].id));
3766                         node_set ((Node *)property,
3767                                   "override", TRUE,
3768                                   NULL);
3769                 } else if (strcmp ((yyvsp[(1) - (1)].id), "link") == 0) {
3770                         g_free((yyvsp[(1) - (1)].id));
3771                         node_set ((Node *)property,
3772                                   "link", TRUE,
3773                                   NULL);
3774                 } else if (strcmp ((yyvsp[(1) - (1)].id), "export") == 0) {
3775                         g_free((yyvsp[(1) - (1)].id));
3776                         node_set ((Node *)property,
3777                                   "export", TRUE,
3778                                   NULL);
3779                 } else {
3780                         g_free((yyvsp[(1) - (1)].id));
3781                         yyerror(_("parse error"));
3782                         YYERROR;
3783                 }
3784                   }
3785     break;
3786
3787   case 92:
3788
3789 /* Line 1455 of yacc.c  */
3790 #line 1491 "parse.y"
3791     {
3792                         if(strcmp((yyvsp[(3) - (5)].id),"type")!=0) {
3793                                 g_free((yyvsp[(1) - (5)].id));
3794                                 g_free((yyvsp[(3) - (5)].id));
3795                                 yyerror(_("parse error"));
3796                                 YYERROR;
3797                         }
3798                         (yyval.id) = debool ((yyvsp[(1) - (5)].id));
3799                                                 }
3800     break;
3801
3802   case 93:
3803
3804 /* Line 1455 of yacc.c  */
3805 #line 1500 "parse.y"
3806     {
3807                         (yyval.id) = debool ((yyvsp[(1) - (1)].id));
3808                         typestack = g_list_prepend(typestack,NULL);
3809                                                 }
3810     break;
3811
3812   case 94:
3813
3814 /* Line 1455 of yacc.c  */
3815 #line 1506 "parse.y"
3816     { (yyval.list) = (yyvsp[(2) - (3)].list); }
3817     break;
3818
3819   case 95:
3820
3821 /* Line 1455 of yacc.c  */
3822 #line 1507 "parse.y"
3823     { (yyval.list) = NULL; }
3824     break;
3825
3826   case 96:
3827
3828 /* Line 1455 of yacc.c  */
3829 #line 1510 "parse.y"
3830     {
3831                         (yyval.list) = g_list_append((yyvsp[(3) - (3)].list),(yyvsp[(1) - (3)].id));
3832                                                 }
3833     break;
3834
3835   case 97:
3836
3837 /* Line 1455 of yacc.c  */
3838 #line 1513 "parse.y"
3839     {
3840                         (yyval.list) = g_list_append(NULL,(yyvsp[(1) - (1)].id));
3841                                                 }
3842     break;
3843
3844   case 98:
3845
3846 /* Line 1455 of yacc.c  */
3847 #line 1519 "parse.y"
3848     {
3849                         Node *node = node_new (TYPE_NODE, 
3850                                                "name:steal", (yyvsp[(1) - (2)].id),
3851                                                "pointer:steal", (yyvsp[(2) - (2)].id),
3852                                                NULL);
3853                         typestack = g_list_prepend(typestack,node);
3854                                                         }
3855     break;
3856
3857   case 99:
3858
3859 /* Line 1455 of yacc.c  */
3860 #line 1526 "parse.y"
3861     {
3862                         Node *node = node_new (TYPE_NODE, 
3863                                                "name:steal", (yyvsp[(1) - (1)].id),
3864                                                NULL);
3865                         typestack = g_list_prepend(typestack,node);
3866                                                         }
3867     break;
3868
3869   case 100:
3870
3871 /* Line 1455 of yacc.c  */
3872 #line 1535 "parse.y"
3873     {
3874                         (yyval.id) = (yyvsp[(1) - (1)].id);
3875                                                         }
3876     break;
3877
3878   case 101:
3879
3880 /* Line 1455 of yacc.c  */
3881 #line 1538 "parse.y"
3882     {
3883                         (yyval.id) = (yyvsp[(1) - (1)].id);
3884                                                         }
3885     break;
3886
3887   case 102:
3888
3889 /* Line 1455 of yacc.c  */
3890 #line 1541 "parse.y"
3891     {
3892                         (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3893                         g_free((yyvsp[(2) - (2)].id));
3894                                                         }
3895     break;
3896
3897   case 103:
3898
3899 /* Line 1455 of yacc.c  */
3900 #line 1545 "parse.y"
3901     {
3902                         (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3903                         g_free((yyvsp[(1) - (2)].id));
3904                                                         }
3905     break;
3906
3907   case 104:
3908
3909 /* Line 1455 of yacc.c  */
3910 #line 1549 "parse.y"
3911     {
3912                         (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3913                         g_free((yyvsp[(2) - (2)].id));
3914                                                         }
3915     break;
3916
3917   case 105:
3918
3919 /* Line 1455 of yacc.c  */
3920 #line 1553 "parse.y"
3921     {
3922                         (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (3)].id), " ",
3923                                              (yyvsp[(3) - (3)].id), NULL);
3924                         g_free((yyvsp[(3) - (3)].id));
3925                                                         }
3926     break;
3927
3928   case 106:
3929
3930 /* Line 1455 of yacc.c  */
3931 #line 1558 "parse.y"
3932     {
3933                         (yyval.id) = g_strconcat((yyvsp[(1) - (3)].id), " ",
3934                                              (yyvsp[(2) - (3)].id), " const", NULL);
3935                         g_free((yyvsp[(2) - (3)].id));
3936                                                         }
3937     break;
3938
3939   case 107:
3940
3941 /* Line 1455 of yacc.c  */
3942 #line 1566 "parse.y"
3943     {
3944                         (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3945                         g_free((yyvsp[(2) - (2)].id));
3946                                                         }
3947     break;
3948
3949   case 108:
3950
3951 /* Line 1455 of yacc.c  */
3952 #line 1570 "parse.y"
3953     {
3954                         (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " ", (yyvsp[(2) - (2)].id), NULL);
3955                         g_free((yyvsp[(1) - (2)].id));
3956                         g_free((yyvsp[(2) - (2)].id));
3957                                                         }
3958     break;
3959
3960   case 109:
3961
3962 /* Line 1455 of yacc.c  */
3963 #line 1575 "parse.y"
3964     {
3965                         (yyval.id) = g_strconcat("const ", (yyvsp[(2) - (2)].id), NULL);
3966                         g_free((yyvsp[(2) - (2)].id));
3967                                                         }
3968     break;
3969
3970   case 110:
3971
3972 /* Line 1455 of yacc.c  */
3973 #line 1579 "parse.y"
3974     {
3975                         (yyval.id) = (yyvsp[(1) - (1)].id);
3976                                                         }
3977     break;
3978
3979   case 111:
3980
3981 /* Line 1455 of yacc.c  */
3982 #line 1582 "parse.y"
3983     {
3984                         (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
3985                         g_free((yyvsp[(1) - (2)].id));
3986                                                         }
3987     break;
3988
3989   case 112:
3990
3991 /* Line 1455 of yacc.c  */
3992 #line 1586 "parse.y"
3993     {
3994                         (yyval.id) = g_strdup((yyvsp[(1) - (1)].id));
3995                                                         }
3996     break;
3997
3998   case 113:
3999
4000 /* Line 1455 of yacc.c  */
4001 #line 1589 "parse.y"
4002     {
4003                         (yyval.id) = g_strconcat((yyvsp[(1) - (2)].id), " const", NULL);
4004                                                         }
4005     break;
4006
4007   case 114:
4008
4009 /* Line 1455 of yacc.c  */
4010 #line 1594 "parse.y"
4011     { (yyval.id) = "void"; }
4012     break;
4013
4014   case 115:
4015
4016 /* Line 1455 of yacc.c  */
4017 #line 1595 "parse.y"
4018     { (yyval.id) = "char"; }
4019     break;
4020
4021   case 116:
4022
4023 /* Line 1455 of yacc.c  */
4024 #line 1596 "parse.y"
4025     { (yyval.id) = "short"; }
4026     break;
4027
4028   case 117:
4029
4030 /* Line 1455 of yacc.c  */
4031 #line 1597 "parse.y"
4032     { (yyval.id) = "int"; }
4033     break;
4034
4035   case 118:
4036
4037 /* Line 1455 of yacc.c  */
4038 #line 1598 "parse.y"
4039     { (yyval.id) = "long"; }
4040     break;
4041
4042   case 119:
4043
4044 /* Line 1455 of yacc.c  */
4045 #line 1599 "parse.y"
4046     { (yyval.id) = "float"; }
4047     break;
4048
4049   case 120:
4050
4051 /* Line 1455 of yacc.c  */
4052 #line 1600 "parse.y"
4053     { (yyval.id) = "double"; }
4054     break;
4055
4056   case 121:
4057
4058 /* Line 1455 of yacc.c  */
4059 #line 1601 "parse.y"
4060     { (yyval.id) = "signed"; }
4061     break;
4062
4063   case 122:
4064
4065 /* Line 1455 of yacc.c  */
4066 #line 1602 "parse.y"
4067     { (yyval.id) = "unsigned"; }
4068     break;
4069
4070   case 123:
4071
4072 /* Line 1455 of yacc.c  */
4073 #line 1605 "parse.y"
4074     { (yyval.id) = "struct"; }
4075     break;
4076
4077   case 124:
4078
4079 /* Line 1455 of yacc.c  */
4080 #line 1606 "parse.y"
4081     { (yyval.id) = "union"; }
4082     break;
4083
4084   case 125:
4085
4086 /* Line 1455 of yacc.c  */
4087 #line 1607 "parse.y"
4088     { (yyval.id) = "enum"; }
4089     break;
4090
4091   case 126:
4092
4093 /* Line 1455 of yacc.c  */
4094 #line 1610 "parse.y"
4095     { (yyval.id) = g_strdup("*"); }
4096     break;
4097
4098   case 127:
4099
4100 /* Line 1455 of yacc.c  */
4101 #line 1611 "parse.y"
4102     { (yyval.id) = g_strdup("* const"); }
4103     break;
4104
4105   case 128:
4106
4107 /* Line 1455 of yacc.c  */
4108 #line 1612 "parse.y"
4109     {
4110                                 (yyval.id) = g_strconcat("*", (yyvsp[(2) - (2)].id), NULL);
4111                                 g_free((yyvsp[(2) - (2)].id));
4112                                         }
4113     break;
4114
4115   case 129:
4116
4117 /* Line 1455 of yacc.c  */
4118 #line 1616 "parse.y"
4119     {
4120                                 (yyval.id) = g_strconcat("* const", (yyvsp[(3) - (3)].id), NULL);
4121                                 g_free((yyvsp[(3) - (3)].id));
4122                                         }
4123     break;
4124
4125   case 130:
4126
4127 /* Line 1455 of yacc.c  */
4128 #line 1623 "parse.y"
4129     {
4130                         if(strcmp((yyvsp[(1) - (2)].id), "first")==0)
4131                                 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4132                         else if(strcmp((yyvsp[(1) - (2)].id), "last")==0)
4133                                 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4134                         else {
4135                                 yyerror(_("signal must be 'first' or 'last'"));
4136                                 g_free((yyvsp[(1) - (2)].id));
4137                                 YYERROR;
4138                         }
4139                         g_free((yyvsp[(1) - (2)].id));
4140                                         }
4141     break;
4142
4143   case 131:
4144
4145 /* Line 1455 of yacc.c  */
4146 #line 1635 "parse.y"
4147     {
4148                         (yyval.sigtype) = SIGNAL_LAST_METHOD;
4149                                         }
4150     break;
4151
4152   case 132:
4153
4154 /* Line 1455 of yacc.c  */
4155 #line 1641 "parse.y"
4156     {
4157                         if(strcmp((yyvsp[(2) - (3)].id),"first")==0)
4158                                 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4159                         else if(strcmp((yyvsp[(2) - (3)].id),"last")==0)
4160                                 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4161                         else {
4162                                 yyerror(_("signal must be 'first' or 'last'"));
4163                                 g_free((yyvsp[(2) - (3)].id));
4164                                 YYERROR;
4165                         }
4166                         g_free((yyvsp[(2) - (3)].id));
4167                                         }
4168     break;
4169
4170   case 133:
4171
4172 /* Line 1455 of yacc.c  */
4173 #line 1653 "parse.y"
4174     {
4175                         if(strcmp((yyvsp[(1) - (3)].id),"first")==0)
4176                                 (yyval.sigtype) = SIGNAL_FIRST_METHOD;
4177                         else if(strcmp((yyvsp[(1) - (3)].id),"last")==0)
4178                                 (yyval.sigtype) = SIGNAL_LAST_METHOD;
4179                         else {
4180                                 yyerror(_("signal must be 'first' or 'last'"));
4181                                 g_free((yyvsp[(1) - (3)].id));
4182                                 YYERROR;
4183                         }
4184                         g_free((yyvsp[(1) - (3)].id));
4185                                         }
4186     break;
4187
4188   case 134:
4189
4190 /* Line 1455 of yacc.c  */
4191 #line 1665 "parse.y"
4192     {
4193                         (yyval.sigtype) = SIGNAL_LAST_METHOD;
4194                                         }
4195     break;
4196
4197   case 135:
4198
4199 /* Line 1455 of yacc.c  */
4200 #line 1668 "parse.y"
4201     {
4202                         /* the_scope was default thus public */
4203                         the_scope = PUBLIC_SCOPE;
4204                                         }
4205     break;
4206
4207   case 136:
4208
4209 /* Line 1455 of yacc.c  */
4210 #line 1674 "parse.y"
4211     {
4212                         gtktypes = g_list_prepend(gtktypes, debool ((yyvsp[(1) - (4)].id)));
4213                                                 }
4214     break;
4215
4216   case 137:
4217
4218 /* Line 1455 of yacc.c  */
4219 #line 1679 "parse.y"
4220     {
4221                         gtktypes = g_list_append(gtktypes, debool ((yyvsp[(3) - (3)].id)));
4222                                                 }
4223     break;
4224
4225   case 138:
4226
4227 /* Line 1455 of yacc.c  */
4228 #line 1682 "parse.y"
4229     { 
4230                         gtktypes = g_list_append(gtktypes, debool ((yyvsp[(1) - (1)].id)));
4231                                                 }
4232     break;
4233
4234   case 139:
4235
4236 /* Line 1455 of yacc.c  */
4237 #line 1687 "parse.y"
4238     { (yyval.cbuf) = (yyvsp[(2) - (2)].cbuf); }
4239     break;
4240
4241   case 140:
4242
4243 /* Line 1455 of yacc.c  */
4244 #line 1688 "parse.y"
4245     { (yyval.cbuf) = NULL; }
4246     break;
4247
4248   case 141:
4249
4250 /* Line 1455 of yacc.c  */
4251 #line 1692 "parse.y"
4252     {
4253                         if(!has_self) {
4254                                 yyerror(_("signal without 'self' as "
4255                                           "first parameter"));
4256                                 free_all_global_state();
4257                                 YYERROR;
4258                         }
4259                         if(the_scope == CLASS_SCOPE) {
4260                                 yyerror(_("a method cannot be of class scope"));
4261                                 free_all_global_state();
4262                                 YYERROR;
4263                         }
4264                         if (funcattrs != NULL) {
4265                                 char *error = g_strdup_printf
4266                                         (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4267                                          funcattrs);
4268                                 yyerror (error);
4269                                 YYERROR;
4270                         }
4271                         push_function(the_scope, (yyvsp[(3) - (10)].sigtype),NULL,
4272                                       (yyvsp[(5) - (10)].id), (yyvsp[(10) - (10)].cbuf),(yyvsp[(1) - (10)].line),
4273                                       ccode_line, vararg, (yyvsp[(2) - (10)].list));
4274                                                                         }
4275     break;
4276
4277   case 142:
4278
4279 /* Line 1455 of yacc.c  */
4280 #line 1715 "parse.y"
4281     {
4282                         if(!has_self) {
4283                                 yyerror(_("signal without 'self' as "
4284                                           "first parameter"));
4285                                 free_all_global_state();
4286                                 YYERROR;
4287                         }
4288                         if(the_scope == CLASS_SCOPE) {
4289                                 yyerror(_("a method cannot be of class scope"));
4290                                 free_all_global_state();
4291                                 YYERROR;
4292                         }
4293                         if (funcattrs != NULL) {
4294                                 char *error = g_strdup_printf
4295                                         (_("function attribute macros ('%s' in this case) may not be used with signal methods"),
4296                                          funcattrs);
4297                                 yyerror (error);
4298                                 YYERROR;
4299                         }
4300                         push_function(the_scope, (yyvsp[(4) - (11)].sigtype), NULL,
4301                                       (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf), (yyvsp[(2) - (11)].line),
4302                                       ccode_line, vararg, (yyvsp[(3) - (11)].list));
4303                                                                         }
4304     break;
4305
4306   case 143:
4307
4308 /* Line 1455 of yacc.c  */
4309 #line 1738 "parse.y"
4310     {
4311                         if(!has_self) {
4312                                 yyerror(_("virtual method without 'self' as "
4313                                           "first parameter"));
4314                                 free_all_global_state();
4315                                 YYERROR;
4316                         }
4317                         if(the_scope == CLASS_SCOPE) {
4318                                 yyerror(_("a method cannot be of class scope"));
4319                                 free_all_global_state();
4320                                 YYERROR;
4321                         }
4322                         if (funcattrs != NULL) {
4323                                 char *error = g_strdup_printf
4324                                         (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4325                                          funcattrs);
4326                                 yyerror (error);
4327                                 YYERROR;
4328                         }
4329                         push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4330                                       (yyvsp[(9) - (9)].cbuf), (yyvsp[(1) - (9)].line),
4331                                       ccode_line, vararg, NULL);
4332                                                                         }
4333     break;
4334
4335   case 144:
4336
4337 /* Line 1455 of yacc.c  */
4338 #line 1761 "parse.y"
4339     {
4340                         if(!has_self) {
4341                                 yyerror(_("virtual method without 'self' as "
4342                                           "first parameter"));
4343                                 free_all_global_state();
4344                                 YYERROR;
4345                         }
4346                         if(the_scope == CLASS_SCOPE) {
4347                                 yyerror(_("a method cannot be of class scope"));
4348                                 free_all_global_state();
4349                                 YYERROR;
4350                         }
4351                         if (funcattrs != NULL) {
4352                                 char *error = g_strdup_printf
4353                                         (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4354                                          funcattrs);
4355                                 yyerror (error);
4356                                 YYERROR;
4357                         }
4358                         push_function(the_scope, VIRTUAL_METHOD, NULL, (yyvsp[(4) - (9)].id),
4359                                       (yyvsp[(9) - (9)].cbuf), (yyvsp[(2) - (9)].line),
4360                                       ccode_line, vararg, NULL);
4361                                                                         }
4362     break;
4363
4364   case 145:
4365
4366 /* Line 1455 of yacc.c  */
4367 #line 1784 "parse.y"
4368     {
4369                         if(!has_self) {
4370                                 yyerror(_("virtual method without 'szelf' as "
4371                                           "first parameter"));
4372                                 free_all_global_state();
4373                                 YYERROR;
4374                         }
4375                         if (funcattrs != NULL) {
4376                                 char *error = g_strdup_printf
4377                                         (_("function attribute macros ('%s' in this case) may not be used with virtual methods"),
4378                                          funcattrs);
4379                                 yyerror (error);
4380                                 YYERROR;
4381                         }
4382                         push_function(PUBLIC_SCOPE, VIRTUAL_METHOD, NULL,
4383                                       (yyvsp[(3) - (8)].id), (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line),
4384                                       ccode_line, vararg, NULL);
4385                                                                         }
4386     break;
4387
4388   case 146:
4389
4390 /* Line 1455 of yacc.c  */
4391 #line 1802 "parse.y"
4392     {
4393                         if (funcattrs != NULL) {
4394                                 char *error = g_strdup_printf
4395                                         (_("function attribute macros ('%s' in this case) may not be used with override methods"),
4396                                          funcattrs);
4397                                 yyerror (error);
4398                                 YYERROR;
4399                         }
4400                         push_function(NO_SCOPE, OVERRIDE_METHOD, (yyvsp[(3) - (11)].id),
4401                                       (yyvsp[(6) - (11)].id), (yyvsp[(11) - (11)].cbuf),
4402                                       (yyvsp[(1) - (11)].line), ccode_line,
4403                                       vararg, NULL);
4404                                                                         }
4405     break;
4406
4407   case 147:
4408
4409 /* Line 1455 of yacc.c  */
4410 #line 1815 "parse.y"
4411     {
4412                         if(the_scope == CLASS_SCOPE) {
4413                                 yyerror(_("a method cannot be of class scope"));
4414                                 free_all_global_state();
4415                                 YYERROR;
4416                         }
4417                         push_function(the_scope, REGULAR_METHOD, NULL, (yyvsp[(3) - (8)].id),
4418                                       (yyvsp[(8) - (8)].cbuf), (yyvsp[(1) - (8)].line), ccode_line,
4419                                       vararg, NULL);
4420                                                                 }
4421     break;
4422
4423   case 148:
4424
4425 /* Line 1455 of yacc.c  */
4426 #line 1825 "parse.y"
4427     {
4428                         if(strcmp((yyvsp[(1) - (5)].id), "init")==0) {
4429                                 push_init_arg((yyvsp[(3) - (5)].id),FALSE);
4430                                 push_function(NO_SCOPE, INIT_METHOD, NULL,
4431                                               (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4432                                               ccode_line, FALSE, NULL);
4433                         } else if(strcmp((yyvsp[(1) - (5)].id), "class_init")==0) {
4434                                 push_init_arg((yyvsp[(3) - (5)].id),TRUE);
4435                                 push_function(NO_SCOPE, CLASS_INIT_METHOD, NULL,
4436                                               (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4437                                               ccode_line, FALSE, NULL);
4438                         } else if(strcmp((yyvsp[(1) - (5)].id), "constructor")==0) {
4439                                 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4440                                 push_function(NO_SCOPE, CONSTRUCTOR_METHOD, NULL,
4441                                               (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4442                                               ccode_line, FALSE, NULL);
4443                         } else if(strcmp((yyvsp[(1) - (5)].id), "dispose")==0) {
4444                                 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4445                                 push_function(NO_SCOPE, DISPOSE_METHOD, NULL,
4446                                               (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4447                                               ccode_line, FALSE, NULL);
4448                         } else if(strcmp((yyvsp[(1) - (5)].id), "finalize")==0) {
4449                                 push_init_arg((yyvsp[(3) - (5)].id), FALSE);
4450                                 push_function(NO_SCOPE, FINALIZE_METHOD, NULL,
4451                                               (yyvsp[(1) - (5)].id), (yyvsp[(5) - (5)].cbuf), (yyvsp[(2) - (5)].line),
4452                                               ccode_line, FALSE, NULL);
4453
4454                         } else {
4455                                 g_free((yyvsp[(1) - (5)].id));
4456                                 g_free((yyvsp[(3) - (5)].id));
4457                                 g_string_free((yyvsp[(5) - (5)].cbuf),TRUE);
4458                                 yyerror(_("parse error "
4459                                           "(untyped blocks must be init, "
4460                                           "class_init, constructor, dispose "
4461                                           "or finalize)"));
4462                                 YYERROR;
4463                         }
4464                                                 }
4465     break;
4466
4467   case 149:
4468
4469 /* Line 1455 of yacc.c  */
4470 #line 1865 "parse.y"
4471     {
4472                         g_free(funcattrs); funcattrs = NULL;
4473                         g_free(onerror); onerror = NULL;
4474                         g_free(defreturn); defreturn = NULL;
4475                         if(!set_attr_value((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id))) {
4476                                 g_free((yyvsp[(1) - (2)].id));
4477                                 g_free((yyvsp[(2) - (2)].id));
4478                                 yyerror(_("parse error"));
4479                                 YYERROR;
4480                         }
4481                         g_free((yyvsp[(1) - (2)].id));
4482                                         }
4483     break;
4484
4485   case 150:
4486
4487 /* Line 1455 of yacc.c  */
4488 #line 1877 "parse.y"
4489     {
4490                         g_free(funcattrs); funcattrs = NULL;
4491                         g_free(onerror); onerror = NULL;
4492                         g_free(defreturn); defreturn = NULL;
4493                         if(!set_attr_value((yyvsp[(1) - (4)].id), (yyvsp[(2) - (4)].id))) {
4494                                 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4495                                 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4496                                 yyerror(_("parse error"));
4497                                 YYERROR;
4498                         }
4499                         if(!set_attr_value((yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id))) {
4500                                 funcattrs = onerror = defreturn = NULL;
4501                                 g_free((yyvsp[(1) - (4)].id)); g_free((yyvsp[(2) - (4)].id));
4502                                 g_free((yyvsp[(3) - (4)].id)); g_free((yyvsp[(4) - (4)].id));
4503                                 yyerror(_("parse error"));
4504                                 YYERROR;
4505                         }
4506                         g_free((yyvsp[(1) - (4)].id));
4507                         g_free((yyvsp[(3) - (4)].id));
4508                                                 }
4509     break;
4510
4511   case 151:
4512
4513 /* Line 1455 of yacc.c  */
4514 #line 1897 "parse.y"
4515     {
4516                         g_free(funcattrs); funcattrs = NULL;
4517                         g_free(onerror); onerror = NULL;
4518                         g_free(defreturn); defreturn = NULL;
4519                         if(!set_attr_value((yyvsp[(1) - (6)].id), (yyvsp[(2) - (6)].id))) {
4520                                 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4521                                 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4522                                 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4523                                 yyerror(_("parse error"));
4524                                 YYERROR;
4525                         }
4526                         if(!set_attr_value((yyvsp[(3) - (6)].id), (yyvsp[(4) - (6)].id))) {
4527                                 funcattrs = onerror = defreturn = NULL;
4528                                 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4529                                 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4530                                 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4531                                 yyerror(_("parse error"));
4532                                 YYERROR;
4533                         }
4534                         if(!set_attr_value((yyvsp[(5) - (6)].id), (yyvsp[(6) - (6)].id))) {
4535                                 funcattrs = onerror = defreturn = NULL;
4536                                 g_free((yyvsp[(1) - (6)].id)); g_free((yyvsp[(2) - (6)].id));
4537                                 g_free((yyvsp[(3) - (6)].id)); g_free((yyvsp[(4) - (6)].id));
4538                                 g_free((yyvsp[(5) - (6)].id)); g_free((yyvsp[(6) - (6)].id));
4539                                 yyerror(_("parse error"));
4540                                 YYERROR;
4541                         }
4542                         g_free((yyvsp[(1) - (6)].id));
4543                         g_free((yyvsp[(3) - (6)].id));
4544                         g_free((yyvsp[(5) - (6)].id));
4545                                                 }
4546     break;
4547
4548   case 152:
4549
4550 /* Line 1455 of yacc.c  */
4551 #line 1928 "parse.y"
4552     {
4553                         g_free(funcattrs); funcattrs = NULL;
4554                         g_free(onerror); onerror = NULL;
4555                         g_free(defreturn); defreturn = NULL;
4556                                         }
4557     break;
4558
4559   case 153:
4560
4561 /* Line 1455 of yacc.c  */
4562 #line 1935 "parse.y"
4563     { (yyval.id) = (yyvsp[(1) - (1)].id); }
4564     break;
4565
4566   case 154:
4567
4568 /* Line 1455 of yacc.c  */
4569 #line 1936 "parse.y"
4570     {
4571                         (yyval.id) = ((yyvsp[(2) - (2)].cbuf))->str;
4572                         g_string_free((yyvsp[(2) - (2)].cbuf), FALSE);
4573                                         }
4574     break;
4575
4576   case 155:
4577
4578 /* Line 1455 of yacc.c  */
4579 #line 1942 "parse.y"
4580     { vararg = FALSE; has_self = FALSE; }
4581     break;
4582
4583   case 156:
4584
4585 /* Line 1455 of yacc.c  */
4586 #line 1943 "parse.y"
4587     {
4588                         vararg = FALSE;
4589                         has_self = TRUE;
4590                         if(strcmp((yyvsp[(1) - (1)].id),"self")==0)
4591                                 push_self((yyvsp[(1) - (1)].id), FALSE);
4592                         else {
4593                                 g_free((yyvsp[(1) - (1)].id));
4594                                 yyerror(_("parse error"));
4595                                 YYERROR;
4596                         }
4597                                         }
4598     break;
4599
4600   case 157:
4601
4602 /* Line 1455 of yacc.c  */
4603 #line 1954 "parse.y"
4604     {
4605                         vararg = FALSE;
4606                         has_self = TRUE;
4607                         if(strcmp((yyvsp[(1) - (2)].id),"self")==0)
4608                                 push_self((yyvsp[(1) - (2)].id), TRUE);
4609                         else {
4610                                 g_free((yyvsp[(1) - (2)].id));
4611                                 yyerror(_("parse error"));
4612                                 YYERROR;
4613                         }
4614                                         }
4615     break;
4616
4617   case 158:
4618
4619 /* Line 1455 of yacc.c  */
4620 #line 1965 "parse.y"
4621     {
4622                         vararg = FALSE;
4623                         has_self = TRUE;
4624                         if(strcmp((yyvsp[(2) - (2)].id),"self")==0)
4625                                 push_self((yyvsp[(2) - (2)].id), TRUE);
4626                         else {
4627                                 g_free((yyvsp[(2) - (2)].id));
4628                                 yyerror(_("parse error"));
4629                                 YYERROR;
4630                         }
4631                                         }
4632     break;
4633
4634   case 159:
4635
4636 /* Line 1455 of yacc.c  */
4637 #line 1976 "parse.y"
4638     {
4639                         has_self = TRUE;
4640                         if(strcmp((yyvsp[(1) - (3)].id),"self")==0)
4641                                 push_self((yyvsp[(1) - (3)].id), FALSE);
4642                         else {
4643                                 g_free((yyvsp[(1) - (3)].id));
4644                                 yyerror(_("parse error"));
4645                                 YYERROR;
4646                         }
4647                                         }
4648     break;
4649
4650   case 160:
4651
4652 /* Line 1455 of yacc.c  */
4653 #line 1986 "parse.y"
4654     {
4655                         has_self = TRUE;
4656                         if(strcmp((yyvsp[(1) - (4)].id),"self")==0)
4657                                 push_self((yyvsp[(1) - (4)].id), TRUE);
4658                         else {
4659                                 g_free((yyvsp[(1) - (4)].id));
4660                                 yyerror(_("parse error"));
4661                                 YYERROR;
4662                         }
4663                                         }
4664     break;
4665
4666   case 161:
4667
4668 /* Line 1455 of yacc.c  */
4669 #line 1996 "parse.y"
4670     {
4671                         has_self = TRUE;
4672                         if(strcmp((yyvsp[(2) - (4)].id),"self")==0)
4673                                 push_self((yyvsp[(2) - (4)].id), TRUE);
4674                         else {
4675                                 g_free((yyvsp[(2) - (4)].id));
4676                                 yyerror(_("parse error"));
4677                                 YYERROR;
4678                         }
4679                                         }
4680     break;
4681
4682   case 162:
4683
4684 /* Line 1455 of yacc.c  */
4685 #line 2006 "parse.y"
4686     { has_self = FALSE; }
4687     break;
4688
4689   case 163:
4690
4691 /* Line 1455 of yacc.c  */
4692 #line 2009 "parse.y"
4693     { vararg = TRUE; }
4694     break;
4695
4696   case 164:
4697
4698 /* Line 1455 of yacc.c  */
4699 #line 2010 "parse.y"
4700     { vararg = FALSE; }
4701     break;
4702
4703   case 165:
4704
4705 /* Line 1455 of yacc.c  */
4706 #line 2013 "parse.y"
4707     { ; }
4708     break;
4709
4710   case 166:
4711
4712 /* Line 1455 of yacc.c  */
4713 #line 2014 "parse.y"
4714     { ; }
4715     break;
4716
4717   case 167:
4718
4719 /* Line 1455 of yacc.c  */
4720 #line 2017 "parse.y"
4721     {
4722                         push_funcarg((yyvsp[(2) - (2)].id),NULL);
4723                                                                 }
4724     break;
4725
4726   case 168:
4727
4728 /* Line 1455 of yacc.c  */
4729 #line 2020 "parse.y"
4730     {
4731                         push_funcarg((yyvsp[(2) - (3)].id),(yyvsp[(3) - (3)].id));
4732                                                                 }
4733     break;
4734
4735   case 169:
4736
4737 /* Line 1455 of yacc.c  */
4738 #line 2023 "parse.y"
4739     {
4740                         if(strcmp((yyvsp[(4) - (6)].id),"check")!=0) {
4741                                 yyerror(_("parse error"));
4742                                 YYERROR;
4743                         }
4744                         g_free((yyvsp[(4) - (6)].id));
4745                         push_funcarg((yyvsp[(2) - (6)].id),NULL);
4746                                                                 }
4747     break;
4748
4749   case 170:
4750
4751 /* Line 1455 of yacc.c  */
4752 #line 2031 "parse.y"
4753     {
4754                         if(strcmp((yyvsp[(5) - (7)].id),"check")!=0) {
4755                                 yyerror(_("parse error"));
4756                                 YYERROR;
4757                         }
4758                         g_free((yyvsp[(5) - (7)].id));
4759                         push_funcarg((yyvsp[(2) - (7)].id),(yyvsp[(3) - (7)].id));
4760                                                                 }
4761     break;
4762
4763   case 171:
4764
4765 /* Line 1455 of yacc.c  */
4766 #line 2041 "parse.y"
4767     { ; }
4768     break;
4769
4770   case 172:
4771
4772 /* Line 1455 of yacc.c  */
4773 #line 2042 "parse.y"
4774     { ; }
4775     break;
4776
4777   case 173:
4778
4779 /* Line 1455 of yacc.c  */
4780 #line 2045 "parse.y"
4781     {
4782                         if(strcmp((yyvsp[(1) - (1)].id),"type")==0) {
4783                                 Node *node = node_new (CHECK_NODE,
4784                                                        "chtype", TYPE_CHECK,
4785                                                        NULL);
4786                                 checks = g_list_append(checks,node);
4787                         } else if(strcmp((yyvsp[(1) - (1)].id),"null")==0) {
4788                                 Node *node = node_new (CHECK_NODE,
4789                                                        "chtype", NULL_CHECK,
4790                                                        NULL);
4791                                 checks = g_list_append(checks,node);
4792                         } else {
4793                                 yyerror(_("parse error"));
4794                                 YYERROR;
4795                         }
4796                         g_free((yyvsp[(1) - (1)].id));
4797                                         }
4798     break;
4799
4800   case 174:
4801
4802 /* Line 1455 of yacc.c  */
4803 #line 2062 "parse.y"
4804     {
4805                         Node *node = node_new (CHECK_NODE,
4806                                                "chtype", GT_CHECK,
4807                                                "number:steal", (yyvsp[(2) - (2)].id),
4808                                                NULL);
4809                         checks = g_list_append(checks,node);
4810                                         }
4811     break;
4812
4813   case 175:
4814
4815 /* Line 1455 of yacc.c  */
4816 #line 2069 "parse.y"
4817     {
4818                         Node *node = node_new (CHECK_NODE,
4819                                                "chtype", LT_CHECK,
4820                                                "number:steal", (yyvsp[(2) - (2)].id),
4821                                                NULL);
4822                         checks = g_list_append(checks,node);
4823                                         }
4824     break;
4825
4826   case 176:
4827
4828 /* Line 1455 of yacc.c  */
4829 #line 2076 "parse.y"
4830     {
4831                         Node *node = node_new (CHECK_NODE,
4832                                                "chtype", GE_CHECK,
4833                                                "number:steal", (yyvsp[(3) - (3)].id),
4834                                                NULL);
4835                         checks = g_list_append(checks,node);
4836                                         }
4837     break;
4838
4839   case 177:
4840
4841 /* Line 1455 of yacc.c  */
4842 #line 2083 "parse.y"
4843     {
4844                         Node *node = node_new (CHECK_NODE,
4845                                                "chtype", LE_CHECK,
4846                                                "number:steal", (yyvsp[(3) - (3)].id),
4847                                                NULL);
4848                         checks = g_list_append(checks,node);
4849                                         }
4850     break;
4851
4852   case 178:
4853
4854 /* Line 1455 of yacc.c  */
4855 #line 2090 "parse.y"
4856     {
4857                         Node *node = node_new (CHECK_NODE,
4858                                                "chtype", EQ_CHECK,
4859                                                "number:steal", (yyvsp[(3) - (3)].id),
4860                                                NULL);
4861                         checks = g_list_append(checks,node);
4862                                         }
4863     break;
4864
4865   case 179:
4866
4867 /* Line 1455 of yacc.c  */
4868 #line 2097 "parse.y"
4869     {
4870                         Node *node = node_new (CHECK_NODE,
4871                                                "chtype", NE_CHECK,
4872                                                "number:steal", (yyvsp[(3) - (3)].id),
4873                                                NULL);
4874                         checks = g_list_append(checks,node);
4875                                         }
4876     break;
4877
4878   case 180:
4879
4880 /* Line 1455 of yacc.c  */
4881 #line 2106 "parse.y"
4882     {
4883                         Node *node = node_new (ENUMDEF_NODE,
4884                                                "etype:steal", (yyvsp[(6) - (7)].id),
4885                                                "prefix:steal", (yyvsp[(2) - (7)].id),
4886                                                "values:steal", enum_vals,
4887                                                NULL);
4888                         enum_vals = NULL;
4889                         nodes = g_list_append (nodes, node);
4890                         }
4891     break;
4892
4893   case 181:
4894
4895 /* Line 1455 of yacc.c  */
4896 #line 2115 "parse.y"
4897     {
4898                         Node *node = node_new (ENUMDEF_NODE,
4899                                                "etype:steal", (yyvsp[(7) - (8)].id),
4900                                                "prefix:steal", (yyvsp[(2) - (8)].id),
4901                                                "values:steal", enum_vals,
4902                                                NULL);
4903                         enum_vals = NULL;
4904                         nodes = g_list_append (nodes, node);
4905                         }
4906     break;
4907
4908   case 182:
4909
4910 /* Line 1455 of yacc.c  */
4911 #line 2126 "parse.y"
4912     {;}
4913     break;
4914
4915   case 183:
4916
4917 /* Line 1455 of yacc.c  */
4918 #line 2127 "parse.y"
4919     {;}
4920     break;
4921
4922   case 184:
4923
4924 /* Line 1455 of yacc.c  */
4925 #line 2130 "parse.y"
4926     {
4927                         Node *node;
4928                         char *num = (yyvsp[(3) - (3)].id);
4929
4930                         /* A float value, that's a bad enum */
4931                         if (num[0] >= '0' &&
4932                             num[0] <= '9' &&
4933                             strchr (num, '.') != NULL) {
4934                                 g_free ((yyvsp[(1) - (3)].id));
4935                                 g_free (num);
4936                                 yyerror(_("parse error (enumerator value not integer constant)"));
4937                                 YYERROR;
4938                         }
4939                        
4940                         node = node_new (ENUMVALUE_NODE,
4941                                          "name:steal", (yyvsp[(1) - (3)].id),
4942                                          "value:steal", num,
4943                                          NULL);
4944                         enum_vals = g_list_append (enum_vals, node);
4945                         }
4946     break;
4947
4948   case 185:
4949
4950 /* Line 1455 of yacc.c  */
4951 #line 2150 "parse.y"
4952     {
4953                         Node *node;
4954
4955                         node = node_new (ENUMVALUE_NODE,
4956                                          "name:steal", (yyvsp[(1) - (1)].id),
4957                                          NULL);
4958                         enum_vals = g_list_append (enum_vals, node);
4959         }
4960     break;
4961
4962   case 186:
4963
4964 /* Line 1455 of yacc.c  */
4965 #line 2160 "parse.y"
4966     {
4967                         Node *node = node_new (FLAGS_NODE,
4968                                                "ftype:steal", (yyvsp[(6) - (7)].id),
4969                                                "prefix:steal", (yyvsp[(2) - (7)].id),
4970                                                "values:steal", flag_vals,
4971                                                NULL);
4972                         flag_vals = NULL;
4973                         nodes = g_list_append (nodes, node);
4974                         }
4975     break;
4976
4977   case 187:
4978
4979 /* Line 1455 of yacc.c  */
4980 #line 2169 "parse.y"
4981     {
4982                         Node *node = node_new (FLAGS_NODE,
4983                                                "ftype:steal", (yyvsp[(7) - (8)].id),
4984                                                "prefix:steal", (yyvsp[(2) - (8)].id),
4985                                                "values:steal", flag_vals,
4986                                                NULL);
4987                         flag_vals = NULL;
4988                         nodes = g_list_append (nodes, node);
4989                         }
4990     break;
4991
4992   case 188:
4993
4994 /* Line 1455 of yacc.c  */
4995 #line 2180 "parse.y"
4996     {
4997                         flag_vals = g_list_append (flag_vals, (yyvsp[(3) - (3)].id));
4998                 }
4999     break;
5000
5001   case 189:
5002
5003 /* Line 1455 of yacc.c  */
5004 #line 2183 "parse.y"
5005     {
5006                         flag_vals = g_list_append (flag_vals, (yyvsp[(1) - (1)].id));
5007                 }
5008     break;
5009
5010   case 190:
5011
5012 /* Line 1455 of yacc.c  */
5013 #line 2188 "parse.y"
5014     {
5015                         Node *node = node_new (ERROR_NODE,
5016                                                "etype:steal", (yyvsp[(6) - (7)].id),
5017                                                "prefix:steal", (yyvsp[(2) - (7)].id),
5018                                                "values:steal", error_vals,
5019                                                NULL);
5020                         error_vals = NULL;
5021                         nodes = g_list_append (nodes, node);
5022                         }
5023     break;
5024
5025   case 191:
5026
5027 /* Line 1455 of yacc.c  */
5028 #line 2197 "parse.y"
5029     {
5030                         Node *node = node_new (ERROR_NODE,
5031                                                "etype:steal", (yyvsp[(7) - (8)].id),
5032                                                "prefix:steal", (yyvsp[(2) - (8)].id),
5033                                                "values:steal", error_vals,
5034                                                NULL);
5035                         error_vals = NULL;
5036                         nodes = g_list_append (nodes, node);
5037                         }
5038     break;
5039
5040   case 192:
5041
5042 /* Line 1455 of yacc.c  */
5043 #line 2208 "parse.y"
5044     {
5045                         error_vals = g_list_append (error_vals, (yyvsp[(3) - (3)].id));
5046                 }
5047     break;
5048
5049   case 193:
5050
5051 /* Line 1455 of yacc.c  */
5052 #line 2211 "parse.y"
5053     {
5054                         error_vals = g_list_append (error_vals, (yyvsp[(1) - (1)].id));
5055                 }
5056     break;
5057
5058   case 194:
5059
5060 /* Line 1455 of yacc.c  */
5061 #line 2217 "parse.y"
5062     { (yyval.id) = (yyvsp[(1) - (1)].id); }
5063     break;
5064
5065   case 195:
5066
5067 /* Line 1455 of yacc.c  */
5068 #line 2218 "parse.y"
5069     {
5070                         (yyval.id) = g_strconcat("-",(yyvsp[(2) - (2)].id),NULL);
5071                         g_free((yyvsp[(2) - (2)].id));
5072                                         }
5073     break;
5074
5075   case 196:
5076
5077 /* Line 1455 of yacc.c  */
5078 #line 2222 "parse.y"
5079     { (yyval.id) = (yyvsp[(1) - (1)].id); }
5080     break;
5081
5082   case 197:
5083
5084 /* Line 1455 of yacc.c  */
5085 #line 2223 "parse.y"
5086     { (yyval.id) = (yyvsp[(1) - (1)].id); }
5087     break;
5088
5089
5090
5091 /* Line 1455 of yacc.c  */
5092 #line 5093 "parse.c"
5093       default: break;
5094     }
5095   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5096
5097   YYPOPSTACK (yylen);
5098   yylen = 0;
5099   YY_STACK_PRINT (yyss, yyssp);
5100
5101   *++yyvsp = yyval;
5102
5103   /* Now `shift' the result of the reduction.  Determine what state
5104      that goes to, based on the state we popped back to and the rule
5105      number reduced by.  */
5106
5107   yyn = yyr1[yyn];
5108
5109   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5110   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5111     yystate = yytable[yystate];
5112   else
5113     yystate = yydefgoto[yyn - YYNTOKENS];
5114
5115   goto yynewstate;
5116
5117
5118 /*------------------------------------.
5119 | yyerrlab -- here on detecting error |
5120 `------------------------------------*/
5121 yyerrlab:
5122   /* If not already recovering from an error, report this error.  */
5123   if (!yyerrstatus)
5124     {
5125       ++yynerrs;
5126 #if ! YYERROR_VERBOSE
5127       yyerror (YY_("syntax error"));
5128 #else
5129       {
5130         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
5131         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
5132           {
5133             YYSIZE_T yyalloc = 2 * yysize;
5134             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
5135               yyalloc = YYSTACK_ALLOC_MAXIMUM;
5136             if (yymsg != yymsgbuf)
5137               YYSTACK_FREE (yymsg);
5138             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
5139             if (yymsg)
5140               yymsg_alloc = yyalloc;
5141             else
5142               {
5143                 yymsg = yymsgbuf;
5144                 yymsg_alloc = sizeof yymsgbuf;
5145               }
5146           }
5147
5148         if (0 < yysize && yysize <= yymsg_alloc)
5149           {
5150             (void) yysyntax_error (yymsg, yystate, yychar);
5151             yyerror (yymsg);
5152           }
5153         else
5154           {
5155             yyerror (YY_("syntax error"));
5156             if (yysize != 0)
5157               goto yyexhaustedlab;
5158           }
5159       }
5160 #endif
5161     }
5162
5163
5164
5165   if (yyerrstatus == 3)
5166     {
5167       /* If just tried and failed to reuse lookahead token after an
5168          error, discard it.  */
5169
5170       if (yychar <= YYEOF)
5171         {
5172           /* Return failure if at end of input.  */
5173           if (yychar == YYEOF)
5174             YYABORT;
5175         }
5176       else
5177         {
5178           yydestruct ("Error: discarding",
5179                       yytoken, &yylval);
5180           yychar = YYEMPTY;
5181         }
5182     }
5183
5184   /* Else will try to reuse lookahead token after shifting the error
5185      token.  */
5186   goto yyerrlab1;
5187
5188
5189 /*---------------------------------------------------.
5190 | yyerrorlab -- error raised explicitly by YYERROR.  |
5191 `---------------------------------------------------*/
5192 yyerrorlab:
5193
5194   /* Pacify compilers like GCC when the user code never invokes
5195      YYERROR and the label yyerrorlab therefore never appears in user
5196      code.  */
5197   if (/*CONSTCOND*/ 0)
5198      goto yyerrorlab;
5199
5200   /* Do not reclaim the symbols of the rule which action triggered
5201      this YYERROR.  */
5202   YYPOPSTACK (yylen);
5203   yylen = 0;
5204   YY_STACK_PRINT (yyss, yyssp);
5205   yystate = *yyssp;
5206   goto yyerrlab1;
5207
5208
5209 /*-------------------------------------------------------------.
5210 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
5211 `-------------------------------------------------------------*/
5212 yyerrlab1:
5213   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
5214
5215   for (;;)
5216     {
5217       yyn = yypact[yystate];
5218       if (yyn != YYPACT_NINF)
5219         {
5220           yyn += YYTERROR;
5221           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5222             {
5223               yyn = yytable[yyn];
5224               if (0 < yyn)
5225                 break;
5226             }
5227         }
5228
5229       /* Pop the current state because it cannot handle the error token.  */
5230       if (yyssp == yyss)
5231         YYABORT;
5232
5233
5234       yydestruct ("Error: popping",
5235                   yystos[yystate], yyvsp);
5236       YYPOPSTACK (1);
5237       yystate = *yyssp;
5238       YY_STACK_PRINT (yyss, yyssp);
5239     }
5240
5241   *++yyvsp = yylval;
5242
5243
5244   /* Shift the error token.  */
5245   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5246
5247   yystate = yyn;
5248   goto yynewstate;
5249
5250
5251 /*-------------------------------------.
5252 | yyacceptlab -- YYACCEPT comes here.  |
5253 `-------------------------------------*/
5254 yyacceptlab:
5255   yyresult = 0;
5256   goto yyreturn;
5257
5258 /*-----------------------------------.
5259 | yyabortlab -- YYABORT comes here.  |
5260 `-----------------------------------*/
5261 yyabortlab:
5262   yyresult = 1;
5263   goto yyreturn;
5264
5265 #if !defined(yyoverflow) || YYERROR_VERBOSE
5266 /*-------------------------------------------------.
5267 | yyexhaustedlab -- memory exhaustion comes here.  |
5268 `-------------------------------------------------*/
5269 yyexhaustedlab:
5270   yyerror (YY_("memory exhausted"));
5271   yyresult = 2;
5272   /* Fall through.  */
5273 #endif
5274
5275 yyreturn:
5276   if (yychar != YYEMPTY)
5277      yydestruct ("Cleanup: discarding lookahead",
5278                  yytoken, &yylval);
5279   /* Do not reclaim the symbols of the rule which action triggered
5280      this YYABORT or YYACCEPT.  */
5281   YYPOPSTACK (yylen);
5282   YY_STACK_PRINT (yyss, yyssp);
5283   while (yyssp != yyss)
5284     {
5285       yydestruct ("Cleanup: popping",
5286                   yystos[*yyssp], yyvsp);
5287       YYPOPSTACK (1);
5288     }
5289 #ifndef yyoverflow
5290   if (yyss != yyssa)
5291     YYSTACK_FREE (yyss);
5292 #endif
5293 #if YYERROR_VERBOSE
5294   if (yymsg != yymsgbuf)
5295     YYSTACK_FREE (yymsg);
5296 #endif
5297   /* Make sure YYID is used.  */
5298   return YYID (yyresult);
5299 }
5300
5301
5302
5303 /* Line 1675 of yacc.c  */
5304 #line 2226 "parse.y"
5305
5306