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