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