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