]> git.draconx.ca Git - gob-dx.git/blob - src/parse.c
Release 2.0.8
[gob-dx.git] / src / parse.c
1 /* A Bison parser, made from parse.y
2    by GNU bison 1.35.  */
3
4 #define YYBISON 1  /* Identify Bison output.  */
5
6 # define        CLASS   257
7 # define        FROM    258
8 # define        CONST   259
9 # define        VOID    260
10 # define        STRUCT  261
11 # define        UNION   262
12 # define        ENUM    263
13 # define        THREEDOTS       264
14 # define        SIGNED  265
15 # define        UNSIGNED        266
16 # define        LONG    267
17 # define        SHORT   268
18 # define        INT     269
19 # define        FLOAT   270
20 # define        DOUBLE  271
21 # define        CHAR    272
22 # define        TOKEN   273
23 # define        NUMBER  274
24 # define        TYPETOKEN       275
25 # define        ARRAY_DIM       276
26 # define        SINGLE_CHAR     277
27 # define        CCODE   278
28 # define        HTCODE  279
29 # define        PHCODE  280
30 # define        HCODE   281
31 # define        ACODE   282
32 # define        ATCODE  283
33 # define        STRING  284
34 # define        PUBLIC  285
35 # define        PRIVATE 286
36 # define        PROTECTED       287
37 # define        CLASSWIDE       288
38 # define        PROPERTY        289
39 # define        ARGUMENT        290
40 # define        VIRTUAL 291
41 # define        SIGNAL  292
42 # define        OVERRIDE        293
43 # define        NICK    294
44 # define        BLURB   295
45 # define        MAXIMUM 296
46 # define        MINIMUM 297
47 # define        DEFAULT_VALUE   298
48 # define        ERROR   299
49 # define        FLAGS   300
50 # define        TYPE    301
51 # define        FLAGS_TYPE      302
52 # define        ENUM_TYPE       303
53 # define        PARAM_TYPE      304
54 # define        BOXED_TYPE      305
55 # define        OBJECT_TYPE     306
56
57 #line 22 "parse.y"
58
59
60 #include "config.h"
61 #include <glib.h>
62 #include <stdio.h>
63 #include <stdlib.h>
64 #include <string.h>
65
66 #include "treefuncs.h"
67 #include "main.h"
68 #include "util.h"
69
70 /* FIXME: add gettext support */
71 #define _(x) (x)
72         
73 GList *nodes = NULL;
74
75 static GList *class_nodes = NULL;
76 Node *class = NULL;
77 GList *enums = NULL;
78 static GList *enum_vals = NULL;
79 static GList *flag_vals = NULL;
80 static GList *error_vals = NULL;
81
82 static char *chunk_size = NULL;
83 static char *bonobo_object_class = NULL;
84 static GList *interfaces = NULL;
85 static GList *typestack = NULL;
86 static GList *funcargs = NULL;
87 static GList *checks = NULL;
88 static int has_self = FALSE;
89 static int vararg = FALSE;
90 static Method *last_added_method = NULL;
91
92 /* destructor and initializer for variables */
93 static gboolean destructor_unref = FALSE;
94 static char *destructor = NULL;
95 static int destructor_line = 0;
96 static gboolean destructor_simple = TRUE;
97 static char *initializer = NULL;
98 static int initializer_line = 0;
99
100 static char *onerror = NULL;
101 static char *defreturn = NULL;
102
103 static GList *gtktypes = NULL;
104
105 static Property *property = NULL;
106
107 /* this can be a global as we will only do one function at a time
108    anyway */
109 static int the_scope = NO_SCOPE;
110
111 void free(void *ptr);
112 int yylex(void);
113
114 extern int ccode_line;
115 extern int line_no;
116
117 extern char *yytext;
118
119 static void
120 yyerror(char *str)
121 {
122         char *out=NULL;
123         char *p;
124         
125         if(strcmp(yytext,"\n")==0) {
126                 out=g_strconcat("Error: ",str," before newline",NULL);
127         } else if(yytext[0]=='\0') {
128                 out=g_strconcat("Error: ", str, " at end of input", NULL);
129         } else {
130                 char *tmp = g_strdup(yytext);
131                 while((p=strchr(tmp, '\n')))
132                         *p='.';
133
134                 out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL);
135                 g_free(tmp);
136         }
137
138         fprintf(stderr, "%s:%d: %s\n", filename, line_no, out);
139         g_free(out);
140         
141         exit(1);
142 }
143
144 static Type *
145 pop_type(void)
146 {
147         Type *type = typestack->data;
148         typestack = g_list_remove(typestack,typestack->data);
149         return type;
150 }
151
152 static void
153 push_variable (char *name, int scope, int line_no, char *postfix)
154 {
155         Node *var;
156         Type *type = pop_type ();
157
158         type->postfix = postfix;
159         
160         var = node_new (VARIABLE_NODE,
161                         "scope", scope,
162                         "vtype:steal", type,
163                         "id:steal", name,
164                         "line_no", line_no,
165                         "destructor_unref", destructor_unref,
166                         "destructor:steal", destructor,
167                         "destructor_line", destructor_line,
168                         "destructor_simple", destructor_simple,
169                         "initializer:steal", initializer,
170                         "initializer_line", initializer_line,
171                         NULL);
172         class_nodes = g_list_append(class_nodes, var);
173 }
174
175 static void
176 push_function (int scope, int method, char *oid, char *id,
177                GString *cbuf, int line_no, int ccode_line,
178                gboolean vararg, GList *flags)
179 {
180         Node *node;
181         Type *type;
182         char *c_cbuf;
183
184         g_assert(scope != CLASS_SCOPE);
185        
186         if(method == INIT_METHOD || method == CLASS_INIT_METHOD) {
187                 type = (Type *)node_new (TYPE_NODE,
188                                          "name", "void",
189                                          NULL);
190         } else {
191                 type = pop_type();
192         }
193         
194         /* a complicated and ugly test to figure out if we have
195            the wrong number of types for a signal */
196         if((method == SIGNAL_FIRST_METHOD ||
197             method == SIGNAL_LAST_METHOD) &&
198            g_list_length(gtktypes) != g_list_length(funcargs) &&
199            !(g_list_length(funcargs) == 1 &&
200              g_list_length(gtktypes) == 2 &&
201              strcmp(gtktypes->next->data, "NONE")==0)) {
202                 error_print(GOB_WARN, line_no,
203                             _("The number of GTK arguments and "
204                               "function arguments for a signal "
205                               "don't seem to match"));
206         }
207         if(g_list_length(gtktypes) > 2) {
208                 GList *li;
209                 for(li = gtktypes->next; li; li = li->next) {
210                         if(strcmp(li->data, "NONE")==0) {
211                                 error_print(GOB_ERROR, line_no,
212                                             _("NONE can only appear in an "
213                                               "argument list by itself"));
214                         }
215                 }
216         }
217         if(cbuf) {
218                 char *p;
219                 c_cbuf = p = cbuf->str;
220                 while(p && *p && (*p==' ' || *p=='\t' || *p=='\n' || *p=='\r'))
221                         p++;
222                 if(!p || !*p)
223                         c_cbuf = NULL;
224         } else
225                 c_cbuf = NULL;
226
227         node = node_new (METHOD_NODE,
228                          "scope", scope,
229                          "method", method,
230                          "mtype:steal", type,
231                          "otype:steal", oid,
232                          "gtktypes:steal", gtktypes,
233                          "flags:steal", flags,
234                          "id:steal", id,
235                          "args:steal", funcargs,
236                          "onerror:steal", onerror,
237                          "defreturn:steal", defreturn,
238                          "cbuf:steal", c_cbuf,
239                          "line_no", line_no,
240                          "ccode_line", ccode_line,
241                          "vararg", vararg,
242                          "unique_id", method_unique_id++,
243                          NULL);
244
245         last_added_method = (Method *)node;
246
247         if(cbuf)
248                 g_string_free(cbuf,
249                               /*only free segment if we haven't passed it
250                                 above */
251                               c_cbuf?FALSE:TRUE);
252         gtktypes = NULL;
253         funcargs = NULL;
254
255         onerror = NULL;
256         defreturn = NULL;
257
258         class_nodes = g_list_append(class_nodes, node);
259 }
260
261 static void
262 free_all_global_state(void)
263 {
264         g_free(onerror);
265         onerror = NULL;
266         g_free(defreturn);
267         defreturn = NULL;
268
269         g_free(chunk_size);
270         chunk_size = NULL;
271         
272         g_list_foreach(gtktypes, (GFunc)g_free, NULL);
273         g_list_free(gtktypes);
274         gtktypes = NULL;
275
276         node_list_free (funcargs);
277         funcargs = NULL;
278 }
279
280 static void
281 push_funcarg(char *name, char *postfix)
282 {
283         Node *node;
284         Type *type = pop_type();
285
286         type->postfix = postfix;
287         
288         node = node_new (FUNCARG_NODE,
289                          "atype:steal", type,
290                          "name:steal", name,
291                          "checks:steal", checks,
292                          NULL);
293         checks = NULL;
294         
295         funcargs = g_list_append(funcargs, node);
296 }
297
298 static void
299 push_init_arg(char *name, int is_class)
300 {
301         Node *node;
302         Node *type;
303         char *tn;
304         
305         if(is_class)
306                 tn = g_strconcat(((Class *)class)->otype,":Class",NULL);
307         else
308                 tn = g_strdup(((Class *)class)->otype);
309
310         type = node_new (TYPE_NODE,
311                          "name:steal", tn,
312                          "pointer", "*",
313                          NULL);
314         node = node_new (FUNCARG_NODE,
315                          "atype:steal", (Type *)type,
316                          "name:steal", name,
317                          NULL);
318         funcargs = g_list_prepend(funcargs, node);
319 }
320
321 static void
322 push_self(char *id, gboolean constant)
323 {
324         Node *node;
325         Node *type;
326         GList *ch = NULL;
327         type = node_new (TYPE_NODE,
328                          "name", ((Class *)class)->otype,
329                          "pointer", constant ? "const *" : "*",
330                          NULL);
331         ch = g_list_append (ch, node_new (CHECK_NODE,
332                                           "chtype", NULL_CHECK,
333                                           NULL));
334         ch = g_list_append (ch, node_new (CHECK_NODE,
335                                           "chtype", TYPE_CHECK,
336                                           NULL));
337         node = node_new (FUNCARG_NODE,
338                          "atype:steal", (Type *)type,
339                          "name:steal", id,
340                          "checks:steal", ch,
341                          NULL);
342         funcargs = g_list_prepend(funcargs, node);
343 }
344
345 static Variable *
346 find_var_or_die(const char *id, int line)
347 {
348         GList *li;
349
350         for(li = class_nodes; li != NULL; li = li->next) {
351                 Variable *var;
352                 Node *node = li->data;
353                 if(node->type != VARIABLE_NODE)
354                         continue;
355                 var = li->data;
356                 if(strcmp(var->id, id)==0)
357                         return var;
358         }
359
360         error_printf(GOB_ERROR, line, _("Variable %s not defined here"), id);
361
362         g_assert_not_reached();
363         return NULL;
364 }
365
366 static gboolean
367 set_return_value(char *type, char *val)
368 {
369         if(strcmp(type, "onerror")==0) {
370                 if(!onerror) {
371                         onerror = val;
372                         return TRUE;
373                 } else
374                         return FALSE;
375         } else if(strcmp(type, "defreturn")==0) {
376                 if(!defreturn) {
377                         defreturn = val;
378                         return TRUE;
379                 } else
380                         return FALSE;
381         }
382         return FALSE;
383 }
384
385 static void
386 export_accessors (const char *var_name,
387                   gboolean do_get,
388                   int get_lineno,
389                   gboolean do_set,
390                   int set_lineno,
391                   Type *type,
392                   const char *gtktype,
393                   int lineno)
394 {       
395         Type *the_type;
396
397         if (type != NULL)
398                 the_type = (Type *)node_copy ((Node *)type);
399         else
400                 the_type = get_tree_type (gtktype, TRUE);
401
402         if (the_type == NULL) {
403                 error_print (GOB_ERROR, line_no,
404                              _("Cannot determine type of property or argument"));
405                 return;
406         }
407
408         if (do_get) {
409                 char *get_id = g_strdup_printf ("get_%s", var_name);
410                 GString *get_cbuf = g_string_new (NULL);
411                 Node *node1 = node_new (TYPE_NODE,
412                                         "name", the_type->name,
413                                         "pointer", the_type->pointer,
414                                         "postfix", the_type->postfix,
415                                         NULL);
416                 Node *node3 = node_new (TYPE_NODE,
417                                         "name", class->class.otype,
418                                         "pointer", "*",
419                                         NULL);
420
421                 g_string_sprintf (get_cbuf,
422                                   "\t%s%s val; "
423                                   "g_object_get (G_OBJECT (self), \"%s\", "
424                                   "&val, NULL); "
425                                   "return val;\n",
426                                   the_type->name, 
427                                   the_type->pointer ? the_type->pointer : "",
428                                   var_name);
429                 
430                 typestack = g_list_prepend (typestack, node1);
431                 typestack = g_list_prepend (typestack, node3);
432                 
433                 push_funcarg ("self", FALSE);
434                 
435                 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
436                                get_id, get_cbuf, get_lineno,
437                                lineno, FALSE, NULL);
438         }
439         
440         if (do_set) {
441                 char *set_id = g_strdup_printf ("set_%s", var_name);
442                 GString *set_cbuf = g_string_new (NULL);
443                 Node *node1 = node_new (TYPE_NODE, 
444                                         "name", the_type->name,
445                                         "pointer", the_type->pointer,
446                                         "postfix", the_type->postfix,
447                                         NULL);
448                 Node *node2 = node_new (TYPE_NODE, 
449                                         "name", "void",
450                                         NULL);
451                 Node *node3 = node_new (TYPE_NODE, 
452                                         "name", class->class.otype,
453                                         "pointer", "*",
454                                         NULL);
455
456                 g_string_sprintf (set_cbuf,
457                                   "\tg_object_set (G_OBJECT (self), "
458                                   "\"%s\", val, NULL);\n",
459                                   var_name);
460
461                 typestack = g_list_prepend (typestack, node2);
462                 typestack = g_list_prepend (typestack, node1);
463                 typestack = g_list_prepend (typestack, node3);
464                 
465                 push_funcarg ("self", FALSE);
466                 push_funcarg ("val", FALSE);
467         
468                 typestack = g_list_prepend (typestack, node2);
469                 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
470                                set_id, set_cbuf, set_lineno,
471                                lineno, FALSE, NULL);
472         }
473
474         node_free ((Node *)the_type);
475 }
476
477 static char *
478 get_prop_enum_flag_cast (Property *prop)
479 {
480         char *tmp, *ret;
481         if (prop->extra_gtktype == NULL ||
482         /* HACK!  just in case someone made this
483          * work with 2.0.0 by using the TYPE
484          * macro directly */
485             ((strstr (prop->extra_gtktype, "_TYPE_") != NULL ||
486               strstr (prop->extra_gtktype, "TYPE_") == prop->extra_gtktype) &&
487              strchr (prop->extra_gtktype, ':') == NULL)) {
488                 if (prop->ptype != NULL)
489                         return get_type (prop->ptype, TRUE);
490                 else
491                         return g_strdup ("");
492         }
493         tmp = remove_sep (prop->extra_gtktype);
494         ret = g_strdup_printf ("(%s) ", tmp);
495         g_free (tmp);
496         return ret;
497 }
498
499 static void
500 property_link_and_export (Node *node)
501 {
502         Property *prop = (Property *)node;
503
504         if (prop->link) {
505                 const char *root;
506                 char *get = NULL, *set = NULL;
507                 Variable *var;
508
509                 if (prop->set != NULL ||
510                     prop->get != NULL) {        
511                         error_print (GOB_ERROR, prop->line_no,
512                                      _("Property linking requested, but "
513                                        "getters and setters exist"));
514                 }
515
516                 var = find_var_or_die (prop->name, prop->line_no);
517                 if(var->scope == PRIVATE_SCOPE) {
518                         root = "self->_priv";
519                 } else if (var->scope == CLASS_SCOPE) {
520                         root = "SELF_GET_CLASS(self)";
521                         if (no_self_alias)
522                                 error_print (GOB_ERROR, prop->line_no,
523                                              _("Self aliases needed when autolinking to a classwide member"));
524                 } else {
525                         root = "self";
526                 }
527
528                 if (strcmp (prop->gtktype, "STRING") == 0) {
529                         set = g_strdup_printf("{ char *old = %s->%s; "
530                                               "%s->%s = g_value_dup_string (VAL); g_free (old); }",
531                                               root, prop->name,
532                                               root, prop->name);
533                         get = g_strdup_printf("g_value_set_string (VAL, %s->%s);",
534                                               root, prop->name);
535                 } else if (strcmp (prop->gtktype, "OBJECT") == 0) {
536                         char *cast;
537                         if (prop->extra_gtktype != NULL) {
538                                 cast = remove_sep (prop->extra_gtktype);
539                         } else {
540                                 cast = g_strdup ("void");
541                         }
542                         set = g_strdup_printf("{ GObject *___old = (GObject *)%s->%s; "
543                                               "%s->%s = (%s *)g_value_dup_object (VAL); "
544                                               "if (___old != NULL) { "
545                                                 "g_object_unref (G_OBJECT (___old)); "
546                                               "} "
547                                               "}",
548                                               root, prop->name,
549                                               root, prop->name,
550                                               cast);
551                         get = g_strdup_printf ("g_value_set_object (VAL, "
552                                                "(gpointer)%s->%s);",
553                                                root, prop->name);
554                         g_free (cast);
555                 } else if (strcmp (prop->gtktype, "BOXED") == 0) {
556                         char *type = make_me_type (prop->extra_gtktype,
557                                                    "G_TYPE_BOXED");
558                         if (prop->extra_gtktype == NULL) {
559                                 error_print (GOB_ERROR, prop->line_no,
560                                              _("Property linking requested for BOXED, but "
561                                                "boxed_type not set"));
562                         }
563                         set = g_strdup_printf("{ gpointer ___old = (gpointer)%s->%s; "
564                                               "gpointer ___new = (gpointer)g_value_get_boxed (VAL); "
565                                               "if (___new != ___old) { "
566                                                 "if (___old != NULL) g_boxed_free (%s, ___old); "
567                                                 "if (___new != NULL) %s->%s = g_boxed_copy (%s, ___new); "
568                                                 "else %s->%s = NULL;"
569                                               "} "
570                                               "}",
571                                               root, prop->name,
572                                               type,
573                                               root, prop->name,
574                                               type,
575                                               root, prop->name);
576                         get = g_strdup_printf("g_value_set_boxed (VAL, %s->%s);",
577                                               root, prop->name);
578                         g_free (type);
579                 } else {
580                         char *set_func;
581                         char *get_func;
582                         const char *getcast = "";
583                         const char *setcast = "";
584                         char *to_free = NULL;
585                         set_func = g_strdup_printf ("g_value_set_%s", prop->gtktype);
586                         g_strdown (set_func);
587                         get_func = g_strdup_printf ("g_value_get_%s", prop->gtktype);
588                         g_strdown (get_func);
589
590                         if (strcmp (prop->gtktype, "FLAGS") == 0) {
591                                 setcast = "(guint) ";
592                                 getcast = to_free =
593                                         get_prop_enum_flag_cast (prop);
594                         } else if (strcmp (prop->gtktype, "ENUM") == 0) {
595                                 setcast = "(gint) ";
596                                 getcast = to_free =
597                                         get_prop_enum_flag_cast (prop);
598                         }
599
600                         set = g_strdup_printf("%s->%s = %s%s (VAL);",
601                                               root, prop->name,
602                                               getcast,
603                                               get_func);
604                         get = g_strdup_printf("%s (VAL, %s%s->%s);",
605                                               set_func,
606                                               setcast,  
607                                               root, prop->name);
608
609                         g_free (get_func);
610                         g_free (set_func);
611                         g_free (to_free);
612                 }
613
614                 node_set (node,
615                           "get:steal", get,
616                           "get_line", prop->line_no,
617                           "set:steal", set,
618                           "set_line", prop->line_no,
619                           NULL);
620         }
621
622         if (prop->export) {
623                 export_accessors (prop->name,
624                                   prop->get != NULL, prop->get_line,
625                                   prop->set != NULL,  prop->set_line,
626                                   prop->ptype,
627                                   prop->gtktype,
628                                   prop->line_no);
629         } 
630 }
631
632
633 static char *
634 debool (char *s)
635 {
636         if (strcmp (s, "BOOL") == 0) {
637                 error_print (GOB_WARN, line_no,
638                             _("BOOL type is deprecated, please use BOOLEAN"));
639                 g_free (s);
640                 return g_strdup ("BOOLEAN");
641         } else {
642                 return s;
643         }
644 }
645
646 static void
647 ensure_property (void)
648 {
649         if (property == NULL)
650                 property = (Property *)node_new (PROPERTY_NODE, NULL);
651 }
652
653
654 #line 619 "parse.y"
655 #ifndef YYSTYPE
656 typedef union {
657         char *id;
658         GString *cbuf;
659         GList *list;
660         int line;
661         int sigtype;
662 } yystype;
663 # define YYSTYPE yystype
664 # define YYSTYPE_IS_TRIVIAL 1
665 #endif
666 #ifndef YYDEBUG
667 # define YYDEBUG 1
668 #endif
669
670
671
672 #define YYFINAL         398
673 #define YYFLAG          -32768
674 #define YYNTBASE        66
675
676 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
677 #define YYTRANSLATE(x) ((unsigned)(x) <= 306 ? yytranslate[x] : 118)
678
679 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
680 static const char yytranslate[] =
681 {
682        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
683        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
684        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
685        2,     2,     2,    64,     2,     2,     2,     2,     2,     2,
686       55,    56,    61,     2,    59,    65,     2,     2,     2,     2,
687        2,     2,     2,     2,     2,     2,     2,     2,     2,    57,
688       63,    58,    62,     2,     2,     2,     2,     2,     2,     2,
689        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
690        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
691        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
692        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
693        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
694        2,     2,     2,    53,    60,    54,     2,     2,     2,     2,
695        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
696        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
697        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
698        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
699        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
700        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
701        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
702        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
703        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
704        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
705        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
706        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
707        2,     2,     2,     2,     2,     2,     1,     3,     4,     5,
708        6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
709       16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
710       26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
711       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
712       46,    47,    48,    49,    50,    51,    52
713 };
714
715 #if YYDEBUG
716 static const short yyprhs[] =
717 {
718        0,     0,     4,     7,    10,    12,    14,    16,    18,    20,
719       22,    24,    27,    30,    33,    36,    38,    40,    42,    44,
720       49,    53,    59,    60,    66,    72,    78,    81,    83,    85,
721       88,    92,    94,    96,    98,   100,   102,   104,   106,   108,
722      111,   115,   118,   122,   125,   128,   130,   132,   133,   139,
723      146,   159,   169,   176,   180,   181,   193,   202,   208,   212,
724      213,   217,   219,   221,   226,   228,   230,   234,   238,   242,
725      246,   250,   254,   258,   262,   266,   270,   274,   278,   282,
726      286,   290,   294,   298,   300,   306,   308,   312,   313,   317,
727      319,   322,   324,   326,   328,   331,   334,   337,   341,   345,
728      348,   351,   354,   356,   359,   361,   364,   366,   368,   370,
729      372,   374,   376,   378,   380,   382,   384,   386,   388,   390,
730      393,   396,   400,   403,   405,   409,   413,   416,   418,   423,
731      427,   429,   432,   434,   445,   457,   467,   477,   486,   498,
732      507,   513,   516,   521,   522,   524,   527,   529,   531,   534,
733      537,   541,   546,   551,   553,   557,   559,   563,   565,   568,
734      572,   579,   587,   590,   592,   594,   597,   600,   604,   608,
735      612,   616,   624,   633,   637,   639,   643,   645,   653,   662,
736      666,   668,   676,   685,   689,   691,   693,   696,   698
737 };
738 static const short yyrhs[] =
739 {
740       68,    69,    68,     0,    69,    68,     0,    68,    69,     0,
741       69,     0,    24,     0,    27,     0,    25,     0,    26,     0,
742       28,     0,    29,     0,    68,    67,     0,    68,   110,     0,
743       68,   113,     0,    68,   115,     0,    67,     0,   110,     0,
744      113,     0,   115,     0,    70,    53,    72,    54,     0,    70,
745       53,    54,     0,     3,    21,     4,    21,    71,     0,     0,
746       55,    19,    19,    56,    71,     0,    55,    19,    21,    56,
747       71,     0,    55,    19,    20,    56,    71,     0,    72,    73,
748        0,    73,     0,   101,     0,    19,   101,     0,    19,    21,
749      101,     0,    78,     0,    79,     0,    81,     0,    57,     0,
750       31,     0,    32,     0,    33,     0,    34,     0,    19,    19,
751        0,    19,    53,    24,     0,    58,   117,     0,    58,    53,
752       24,     0,    75,    76,     0,    76,    75,     0,    76,     0,
753       75,     0,     0,    74,    90,    19,    77,    57,     0,    74,
754       90,    19,    22,    77,    57,     0,    36,    88,    87,    19,
755       80,    19,    53,    24,    19,    53,    24,    57,     0,    36,
756       88,    87,    19,    80,    19,    53,    24,    57,     0,    36,
757       88,    87,    19,    80,    19,     0,    55,    19,    56,     0,
758        0,    35,    19,    19,    82,    19,    53,    24,    19,    53,
759       24,    57,     0,    35,    19,    19,    82,    19,    53,    24,
760       57,     0,    35,    19,    19,    82,    57,     0,    55,    83,
761       56,     0,     0,    83,    59,    86,     0,    86,     0,    30,
762        0,    19,    55,    30,    56,     0,   117,     0,    84,     0,
763       40,    58,    84,     0,    41,    58,    84,     0,    42,    58,
764      117,     0,    43,    58,   117,     0,    44,    58,    85,     0,
765       46,    58,    89,     0,    47,    58,    90,     0,    48,    58,
766       21,     0,    48,    58,    19,     0,    49,    58,    21,     0,
767       49,    58,    19,     0,    50,    58,    21,     0,    50,    58,
768       19,     0,    51,    58,    21,     0,    51,    58,    19,     0,
769       52,    58,    21,     0,    52,    58,    19,     0,    19,     0,
770       19,    55,    19,    90,    56,     0,    19,     0,    55,    89,
771       56,     0,     0,    19,    60,    89,     0,    19,     0,    91,
772       95,     0,    91,     0,    92,     0,    19,     0,     5,    19,
773        0,    19,     5,     0,    94,    19,     0,     5,    94,    19,
774        0,    94,    19,     5,     0,    93,    92,     0,    21,    92,
775        0,     5,    92,     0,    21,     0,    21,     5,     0,    93,
776        0,    93,     5,     0,     6,     0,    18,     0,    14,     0,
777       15,     0,    13,     0,    16,     0,    17,     0,    11,     0,
778       12,     0,     7,     0,     8,     0,     9,     0,    61,     0,
779       61,     5,     0,    61,    95,     0,    61,     5,    95,     0,
780       19,    98,     0,    98,     0,    74,    19,    98,     0,    19,
781       74,    98,     0,    74,    98,     0,    96,     0,    19,    55,
782       99,    56,     0,    99,    59,    19,     0,    19,     0,    53,
783       24,     0,    57,     0,    38,    88,    97,    90,    19,    55,
784      104,    56,   102,   100,     0,    74,    38,    88,    96,    90,
785       19,    55,   104,    56,   102,   100,     0,    37,    74,    90,
786       19,    55,   104,    56,   102,   100,     0,    74,    37,    90,
787       19,    55,   104,    56,   102,   100,     0,    37,    90,    19,
788       55,   104,    56,   102,   100,     0,    39,    55,    21,    56,
789       90,    19,    55,   104,    56,   102,   100,     0,    74,    90,
790       19,    55,   104,    56,   102,   100,     0,    19,    55,    19,
791       56,   100,     0,    19,   103,     0,    19,   103,    19,   103,
792        0,     0,   117,     0,    53,    24,     0,     6,     0,    19,
793        0,    19,     5,     0,     5,    19,     0,    19,    59,   105,
794        0,    19,     5,    59,   105,     0,     5,    19,    59,   105,
795        0,   105,     0,   106,    59,    10,     0,   106,     0,   106,
796       59,   107,     0,   107,     0,    90,    19,     0,    90,    19,
797       22,     0,    90,    19,    55,    19,   108,    56,     0,    90,
798       19,    22,    55,    19,   108,    56,     0,   108,   109,     0,
799      109,     0,    19,     0,    62,   117,     0,    63,   117,     0,
800       62,    58,   117,     0,    63,    58,   117,     0,    58,    58,
801      117,     0,    64,    58,   117,     0,     9,    19,    53,   111,
802       54,    21,    57,     0,     9,    19,    53,   111,    59,    54,
803       21,    57,     0,   111,    59,   112,     0,   112,     0,    19,
804       58,   117,     0,    19,     0,    46,    19,    53,   114,    54,
805       21,    57,     0,    46,    19,    53,   114,    59,    54,    21,
806       57,     0,   114,    59,    19,     0,    19,     0,    45,    19,
807       53,   116,    54,    21,    57,     0,    45,    19,    53,   116,
808       59,    54,    21,    57,     0,   116,    59,    19,     0,    19,
809        0,    20,     0,    65,    20,     0,    23,     0,    19,     0
810 };
811
812 #endif
813
814 #if YYDEBUG
815 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
816 static const short yyrline[] =
817 {
818        0,   640,   641,   642,   643,   646,   655,   664,   673,   682,
819      691,   702,   703,   704,   705,   706,   707,   708,   709,   712,
820      717,   724,   738,   739,   751,   760,   774,   775,   778,   779,
821      788,   800,   801,   802,   803,   806,   807,   808,   809,   812,
822      832,   856,   860,   868,   869,   870,   871,   872,   878,   881,
823      886,   954,  1008,  1097,  1105,  1110,  1158,  1194,  1210,  1211,
824     1214,  1215,  1218,  1219,  1231,  1232,  1235,  1241,  1247,  1253,
825     1259,  1265,  1271,  1278,  1284,  1290,  1296,  1302,  1308,  1314,
826     1320,  1326,  1332,  1338,  1358,  1367,  1373,  1374,  1377,  1380,
827     1386,  1393,  1402,  1405,  1408,  1412,  1416,  1420,  1425,  1433,
828     1437,  1442,  1446,  1449,  1453,  1456,  1461,  1462,  1463,  1464,
829     1465,  1466,  1467,  1468,  1469,  1472,  1473,  1474,  1477,  1478,
830     1479,  1483,  1490,  1502,  1508,  1520,  1532,  1535,  1541,  1546,
831     1549,  1554,  1555,  1559,  1575,  1591,  1607,  1623,  1634,  1640,
832     1650,  1673,  1684,  1703,  1709,  1710,  1716,  1717,  1728,  1739,
833     1750,  1760,  1770,  1780,  1783,  1784,  1787,  1788,  1791,  1794,
834     1797,  1805,  1815,  1816,  1819,  1836,  1843,  1850,  1857,  1864,
835     1871,  1880,  1889,  1900,  1901,  1904,  1924,  1934,  1943,  1954,
836     1957,  1962,  1971,  1982,  1985,  1991,  1992,  1996,  1997
837 };
838 #endif
839
840
841 #if (YYDEBUG) || defined YYERROR_VERBOSE
842
843 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
844 static const char *const yytname[] =
845 {
846   "$", "error", "$undefined.", "CLASS", "FROM", "CONST", "VOID", "STRUCT", 
847   "UNION", "ENUM", "THREEDOTS", "SIGNED", "UNSIGNED", "LONG", "SHORT", 
848   "INT", "FLOAT", "DOUBLE", "CHAR", "TOKEN", "NUMBER", "TYPETOKEN", 
849   "ARRAY_DIM", "SINGLE_CHAR", "CCODE", "HTCODE", "PHCODE", "HCODE", 
850   "ACODE", "ATCODE", "STRING", "PUBLIC", "PRIVATE", "PROTECTED", 
851   "CLASSWIDE", "PROPERTY", "ARGUMENT", "VIRTUAL", "SIGNAL", "OVERRIDE", 
852   "NICK", "BLURB", "MAXIMUM", "MINIMUM", "DEFAULT_VALUE", "ERROR", 
853   "FLAGS", "TYPE", "FLAGS_TYPE", "ENUM_TYPE", "PARAM_TYPE", "BOXED_TYPE", 
854   "OBJECT_TYPE", "'{'", "'}'", "'('", "')'", "';'", "'='", "','", "'|'", 
855   "'*'", "'>'", "'<'", "'!'", "'-'", "prog", "ccode", "ccodes", "class", 
856   "classdec", "classflags", "classcode", "thing", "scope", "destructor", 
857   "initializer", "varoptions", "variable", "argument", "export", 
858   "property", "param_spec", "param_spec_list", "string", "anyval", 
859   "param_spec_value", "argtype", "flags", "flaglist", "type", 
860   "specifier_list", "spec_list", "specifier", "strunionenum", "pointer", 
861   "simplesigtype", "fullsigtype", "sigtype", "tokenlist", "codenocode", 
862   "method", "returnvals", "retcode", "funcargs", "arglist", "arglist1", 
863   "arg", "checklist", "check", "enumcode", "enumvals", "enumval", 
864   "flagcode", "flagvals", "errorcode", "errorvals", "numtok", 0
865 };
866 #endif
867
868 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
869 static const short yyr1[] =
870 {
871        0,    66,    66,    66,    66,    67,    67,    67,    67,    67,
872       67,    68,    68,    68,    68,    68,    68,    68,    68,    69,
873       69,    70,    71,    71,    71,    71,    72,    72,    73,    73,
874       73,    73,    73,    73,    73,    74,    74,    74,    74,    75,
875       75,    76,    76,    77,    77,    77,    77,    77,    78,    78,
876       79,    79,    79,    80,    80,    81,    81,    81,    82,    82,
877       83,    83,    84,    84,    85,    85,    86,    86,    86,    86,
878       86,    86,    86,    86,    86,    86,    86,    86,    86,    86,
879       86,    86,    86,    86,    87,    87,    88,    88,    89,    89,
880       90,    90,    91,    91,    91,    91,    91,    91,    91,    92,
881       92,    92,    92,    92,    92,    92,    93,    93,    93,    93,
882       93,    93,    93,    93,    93,    94,    94,    94,    95,    95,
883       95,    95,    96,    96,    97,    97,    97,    97,    98,    99,
884       99,   100,   100,   101,   101,   101,   101,   101,   101,   101,
885      101,   102,   102,   102,   103,   103,   104,   104,   104,   104,
886      104,   104,   104,   104,   105,   105,   106,   106,   107,   107,
887      107,   107,   108,   108,   109,   109,   109,   109,   109,   109,
888      109,   110,   110,   111,   111,   112,   112,   113,   113,   114,
889      114,   115,   115,   116,   116,   117,   117,   117,   117
890 };
891
892 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
893 static const short yyr2[] =
894 {
895        0,     3,     2,     2,     1,     1,     1,     1,     1,     1,
896        1,     2,     2,     2,     2,     1,     1,     1,     1,     4,
897        3,     5,     0,     5,     5,     5,     2,     1,     1,     2,
898        3,     1,     1,     1,     1,     1,     1,     1,     1,     2,
899        3,     2,     3,     2,     2,     1,     1,     0,     5,     6,
900       12,     9,     6,     3,     0,    11,     8,     5,     3,     0,
901        3,     1,     1,     4,     1,     1,     3,     3,     3,     3,
902        3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
903        3,     3,     3,     1,     5,     1,     3,     0,     3,     1,
904        2,     1,     1,     1,     2,     2,     2,     3,     3,     2,
905        2,     2,     1,     2,     1,     2,     1,     1,     1,     1,
906        1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
907        2,     3,     2,     1,     3,     3,     2,     1,     4,     3,
908        1,     2,     1,    10,    11,     9,     9,     8,    11,     8,
909        5,     2,     4,     0,     1,     2,     1,     1,     2,     2,
910        3,     4,     4,     1,     3,     1,     3,     1,     2,     3,
911        6,     7,     2,     1,     1,     2,     2,     3,     3,     3,
912        3,     7,     8,     3,     1,     3,     1,     7,     8,     3,
913        1,     7,     8,     3,     1,     1,     2,     1,     1
914 };
915
916 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
917    doesn't specify something else to do.  Zero means the default is an
918    error. */
919 static const short yydefact[] =
920 {
921        0,     0,     0,     5,     7,     8,     6,     9,    10,     0,
922        0,    15,     0,     4,     0,    16,    17,    18,     0,     0,
923        0,     0,    11,     3,    12,    13,    14,     2,     0,     0,
924        0,     0,     0,     1,     0,    35,    36,    37,    38,     0,
925       87,     0,    87,     0,    20,    34,     0,    27,     0,    31,
926       32,    33,    28,    22,   176,     0,   174,   184,     0,   180,
927        0,     0,     0,     0,     0,    29,     0,     0,     0,     0,
928      106,   115,   116,   117,   113,   114,   110,   108,   109,   111,
929      112,   107,    93,   102,     0,     0,    91,    92,   104,     0,
930        0,     0,    19,    26,     0,    87,     0,     0,    21,     0,
931        0,     0,     0,     0,     0,     0,    30,     0,     0,    59,
932       89,     0,    85,     0,     0,    94,   101,     0,    95,   103,
933      100,     0,     0,   118,    90,   105,    99,    96,     0,     0,
934      127,     0,   123,     0,     0,     0,    47,     0,   188,   185,
935      187,     0,   175,     0,     0,   173,     0,   183,     0,     0,
936      179,     0,     0,     0,     0,     0,     0,    86,     0,    54,
937       97,     0,     0,   119,   120,    98,     0,     0,     0,   122,
938        0,   126,     0,     0,     0,     0,     0,     0,    47,     0,
939        0,    46,    45,     0,     0,     0,     0,   186,   171,     0,
940      181,     0,   177,     0,     0,   132,   140,    83,     0,     0,
941        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
942        0,    61,     0,    57,    88,     0,     0,     0,     0,     0,
943      106,    93,     0,     0,   153,   155,   157,   121,   130,     0,
944      125,   124,     0,     0,     0,     0,    39,     0,     0,     0,
945        0,    41,    43,    44,    48,    22,    22,    22,   172,   182,
946      178,   131,     0,     0,     0,     0,     0,     0,     0,     0,
947        0,     0,     0,     0,    58,     0,     0,     0,     0,    52,
948        0,    94,    95,     0,   158,   143,     0,   128,     0,     0,
949        0,     0,     0,    40,    49,   143,    42,    23,    25,    24,
950        0,    62,    66,    67,    68,    69,   188,    65,    70,    64,
951       71,    72,    74,    73,    76,    75,    78,    77,    80,    79,
952       82,    81,    60,     0,    84,    53,     0,   143,     0,     0,
953      150,   159,     0,     0,     0,   154,   156,   129,     0,     0,
954      143,     0,     0,     0,     0,    56,     0,     0,   152,   151,
955        0,     0,     0,   141,   144,   137,   143,     0,     0,     0,
956      139,     0,     0,     0,    51,   135,     0,   164,     0,     0,
957        0,     0,     0,   163,   145,     0,     0,   143,   136,   143,
958       63,     0,     0,     0,     0,     0,   165,     0,   166,     0,
959      160,   162,   142,   133,     0,     0,    55,     0,   161,   169,
960      167,   168,   170,   138,   134,    50,     0,     0,     0
961 };
962
963 static const short yydefgoto[] =
964 {
965      396,    11,    12,    13,    14,    98,    46,    47,    48,   181,
966      182,   183,    49,    50,   217,    51,   155,   210,   292,   298,
967      211,   113,    68,   111,   222,    86,    87,    88,    89,   124,
968      130,   131,   132,   229,   196,    52,   324,   343,   223,   224,
969      225,   226,   362,   363,    15,    55,    56,    16,    60,    17,
970       58,   344
971 };
972
973 static const short yypact[] =
974 {
975      137,    16,    24,-32768,-32768,-32768,-32768,-32768,-32768,    45,
976       99,-32768,   137,   170,    72,-32768,-32768,-32768,   106,    73,
977       81,    98,-32768,   170,-32768,-32768,-32768,   170,   154,   111,
978      151,   183,   186,   170,   215,-32768,-32768,-32768,-32768,   187,
979      158,   310,   158,   182,-32768,-32768,   188,-32768,   276,-32768,
980   -32768,-32768,-32768,   195,   210,    69,-32768,-32768,   113,-32768,
981      115,   214,   301,   190,   276,-32768,   248,   252,   254,   357,
982   -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
983   -32768,-32768,   269,   425,   374,   267,   235,-32768,   439,   284,
984      444,   290,-32768,-32768,   374,   158,   293,   311,-32768,    74,
985      315,    76,   316,    84,   339,    90,-32768,   321,   348,   329,
986      334,   345,   356,   399,   453,-32768,-32768,   409,-32768,   453,
987   -32768,   413,   378,     2,-32768,   453,-32768,   429,   224,   416,
988   -32768,   374,-32768,   392,   428,   430,   126,   220,-32768,-32768,
989   -32768,   441,-32768,   405,   451,-32768,   422,-32768,   452,   423,
990   -32768,   460,   -32,   427,   258,    21,   252,-32768,   464,   431,
991   -32768,   432,   391,   235,-32768,-32768,   433,   465,   466,-32768,
992       -6,-32768,   470,   374,   435,    -6,   374,    26,     0,   391,
993        7,   434,   472,   436,   438,   440,   442,-32768,-32768,   443,
994   -32768,   445,-32768,   446,   471,-32768,-32768,-32768,   447,   448,
995      449,   450,   454,   455,   456,   457,   458,   459,   461,   462,
996       91,-32768,   468,-32768,-32768,   374,   478,   480,   391,   408,
997      467,     6,   482,   469,-32768,   463,-32768,-32768,-32768,   112,
998   -32768,-32768,   473,   485,   391,   490,-32768,   486,   474,   476,
999      487,-32768,-32768,-32768,-32768,   195,   195,   195,-32768,-32768,
1000   -32768,-32768,     1,     1,    74,    74,     9,   252,   374,   139,
1001      157,   191,   209,   212,-32768,   258,   494,   477,   479,   481,
1002      483,   121,   144,   374,    94,   505,   340,-32768,   507,   391,
1003      475,   484,   488,-32768,-32768,   505,-32768,-32768,-32768,-32768,
1004      489,-32768,-32768,-32768,-32768,-32768,   489,-32768,-32768,-32768,
1005   -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
1006   -32768,-32768,-32768,    47,-32768,-32768,   503,   505,   374,   374,
1007   -32768,   491,   510,    27,   -32,-32768,-32768,-32768,   492,   391,
1008      505,   391,   -32,   506,   496,-32768,    54,   -32,-32768,-32768,
1009      518,    57,   514,   522,-32768,-32768,   505,   495,   -32,   497,
1010   -32768,   498,   521,   499,-32768,-32768,    57,-32768,   500,    64,
1011       66,   501,    50,-32768,-32768,    27,   -32,   505,-32768,   505,
1012   -32768,   493,   523,    79,    74,    74,-32768,    74,-32768,    74,
1013   -32768,-32768,-32768,-32768,   -32,   -32,-32768,   504,-32768,-32768,
1014   -32768,-32768,-32768,-32768,-32768,-32768,   542,   555,-32768
1015 };
1016
1017 static const short yypgoto[] =
1018 {
1019   -32768,   202,   104,   544,-32768,    17,-32768,   511,   -29,   380,
1020      379,   385,-32768,-32768,-32768,-32768,-32768,-32768,   -52,-32768,
1021      299,-32768,   -27,  -152,   -40,-32768,   -66,-32768,   -60,  -107,
1022      437,-32768,   -93,-32768,  -314,   -20,  -279,   200,  -177,  -218,
1023   -32768,   291,   213,  -266,   205,-32768,   502,   232,-32768,   239,
1024   -32768,   -99
1025 };
1026
1027
1028 #define YYLAST          603
1029
1030
1031 static const short yytable[] =
1032 {
1033      142,    85,   239,   116,   214,    64,   332,   163,    96,   117,
1034      345,   272,    84,   166,    65,    90,   164,   120,   350,   177,
1035      290,   194,   126,   355,   108,   195,   138,   139,   296,   139,
1036      140,   291,   140,    64,   368,   169,   171,    18,   337,   291,
1037      212,   270,   106,    19,   121,   236,   138,   139,   116,   167,
1038      140,   348,   383,   116,   134,   320,   227,   281,   180,   116,
1039      240,   129,  -147,   123,    20,   273,   334,   366,   135,   357,
1040      393,   394,   141,   353,   141,   230,   357,   231,   213,   237,
1041      342,   241,   169,   138,   139,   138,   139,   140,   384,   140,
1042      385,   172,   141,   138,   139,    54,   381,   140,   357,   168,
1043      338,   339,   328,   147,   335,   300,   380,   381,   358,   150,
1044       29,   354,   359,   360,   361,   358,   321,    27,    21,   359,
1045      360,   361,   375,   100,   377,    28,    30,    33,   101,   141,
1046      144,   141,    53,   233,    31,   388,   235,   358,   148,   141,
1047        1,   359,   360,   361,   151,   177,     2,   264,   178,   322,
1048      265,    32,   347,   116,   349,   294,   295,   299,   302,   117,
1049      303,     3,     4,     5,     6,     7,     8,   102,   277,   104,
1050       54,   278,   103,    34,   105,   267,   304,  -149,   305,     2,
1051      318,   179,     9,    10,   180,    35,    36,    37,    38,    39,
1052       40,    41,    42,    43,     3,     4,     5,     6,     7,     8,
1053     -148,   293,    57,   319,   297,    59,    66,    34,    44,   107,
1054      306,    45,   307,    67,    22,     9,    10,    24,   301,    35,
1055       36,    37,    38,    39,    40,    41,    42,    43,   308,    22,
1056      309,   310,    24,   311,    61,    22,    62,    91,    24,   184,
1057      185,   186,    92,   166,    25,    45,    35,    36,    37,    38,
1058       97,    26,    41,    42,    43,    35,    36,    37,    38,    25,
1059      376,   378,   287,   288,   289,    25,    26,   109,    99,    63,
1060       63,   110,    26,   112,   118,   389,   390,   197,   391,   167,
1061      392,    69,    70,    71,    72,    73,   122,    74,    75,    76,
1062       77,    78,    79,    80,    81,    82,   123,    83,   198,   199,
1063      200,   201,   202,   127,   203,   204,   205,   206,   207,   208,
1064      209,   133,   136,    94,    95,    69,    70,    71,    72,    73,
1065       61,    74,    75,    76,    77,    78,    79,    80,    81,    82,
1066      137,    83,    35,    36,    37,    38,   143,   146,    41,    42,
1067       43,    35,    36,    37,    38,    69,    70,    71,    72,    73,
1068      325,    74,    75,    76,    77,    78,    79,    80,    81,    82,
1069      149,    83,   114,    70,    71,    72,    73,   153,    74,    75,
1070       76,    77,    78,    79,    80,    81,   115,   152,    83,    69,
1071       70,    71,    72,    73,   154,    74,    75,    76,    77,    78,
1072       79,    80,    81,    82,   156,    83,   219,   220,    71,    72,
1073       73,   157,    74,    75,    76,    77,    78,    79,    80,    81,
1074      221,   158,    83,   114,    70,    71,    72,    73,   159,    74,
1075       75,    76,    77,    78,    79,    80,    81,   271,   160,    83,
1076      119,    70,   161,   162,   165,   170,    74,    75,    76,    77,
1077       78,    79,    80,    81,   125,    70,    83,   174,   173,   175,
1078       74,    75,    76,    77,    78,    79,    80,    81,   114,    70,
1079       83,   187,   188,   128,    74,    75,    76,    77,    78,    79,
1080       80,    81,   189,   191,    83,    35,    36,    37,    38,   190,
1081      192,   193,   179,   215,   228,   166,   216,   218,   167,   232,
1082      234,   177,   180,   244,   245,   251,   246,   268,   247,   269,
1083      248,   274,   249,   250,   280,   252,   253,   254,   255,   282,
1084      283,   286,   256,   257,   258,   259,   260,   261,   313,   262,
1085      263,   266,   276,  -146,   323,   275,   327,   336,   279,   341,
1086      329,   284,   285,   314,   316,   315,   351,   356,   364,   317,
1087      330,   365,   397,   331,   333,   371,   340,   387,   346,   352,
1088      386,   367,   372,   369,   370,   398,    23,    93,   374,   379,
1089      242,   395,   243,   238,   312,   382,     0,   326,     0,   373,
1090        0,     0,   176,     0,     0,     0,     0,     0,     0,     0,
1091        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1092        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1093        0,     0,     0,   145
1094 };
1095
1096 static const short yycheck[] =
1097 {
1098       99,    41,   179,    69,   156,    34,   285,     5,    48,    69,
1099      324,     5,    41,    19,    34,    42,   123,    83,   332,    19,
1100       19,    53,    88,   337,    64,    57,    19,    20,    19,    20,
1101       23,    30,    23,    62,   348,   128,   129,    21,   317,    30,
1102       19,   218,    62,    19,    84,    19,    19,    20,   114,    55,
1103       23,   330,   366,   119,    94,   273,   163,   234,    58,   125,
1104       53,    90,    56,    61,    19,    59,    19,   346,    95,    19,
1105      384,   385,    65,    19,    65,   168,    19,   170,    57,    53,
1106       53,   180,   175,    19,    20,    19,    20,    23,   367,    23,
1107      369,   131,    65,    19,    20,    19,   362,    23,    19,   128,
1108      318,   319,   279,    19,    57,   257,    56,   373,    58,    19,
1109        4,    57,    62,    63,    64,    58,    22,    13,    19,    62,
1110       63,    64,    58,    54,    58,    53,    53,    23,    59,    65,
1111       54,    65,    21,   173,    53,    56,   176,    58,    54,    65,
1112        3,    62,    63,    64,    54,    19,     9,    56,    22,    55,
1113       59,    53,   329,   219,   331,   254,   255,   256,    19,   219,
1114       21,    24,    25,    26,    27,    28,    29,    54,    56,    54,
1115       19,    59,    59,    19,    59,   215,    19,    56,    21,     9,
1116       59,    55,    45,    46,    58,    31,    32,    33,    34,    35,
1117       36,    37,    38,    39,    24,    25,    26,    27,    28,    29,
1118       56,   253,    19,    59,   256,    19,    19,    19,    54,    19,
1119       19,    57,    21,    55,    12,    45,    46,    12,   258,    31,
1120       32,    33,    34,    35,    36,    37,    38,    39,    19,    27,
1121       21,    19,    27,    21,    19,    33,    21,    55,    33,    19,
1122       20,    21,    54,    19,    12,    57,    31,    32,    33,    34,
1123       55,    12,    37,    38,    39,    31,    32,    33,    34,    27,
1124      359,   360,   245,   246,   247,    33,    27,    19,    58,    55,
1125       55,    19,    33,    19,     5,   374,   375,    19,   377,    55,
1126      379,     5,     6,     7,     8,     9,    19,    11,    12,    13,
1127       14,    15,    16,    17,    18,    19,    61,    21,    40,    41,
1128       42,    43,    44,    19,    46,    47,    48,    49,    50,    51,
1129       52,    21,    19,    37,    38,     5,     6,     7,     8,     9,
1130       19,    11,    12,    13,    14,    15,    16,    17,    18,    19,
1131       19,    21,    31,    32,    33,    34,    21,    21,    37,    38,
1132       39,    31,    32,    33,    34,     5,     6,     7,     8,     9,
1133       10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
1134       21,    21,     5,     6,     7,     8,     9,    19,    11,    12,
1135       13,    14,    15,    16,    17,    18,    19,    56,    21,     5,
1136        6,     7,     8,     9,    55,    11,    12,    13,    14,    15,
1137       16,    17,    18,    19,    60,    21,     5,     6,     7,     8,
1138        9,    56,    11,    12,    13,    14,    15,    16,    17,    18,
1139       19,    55,    21,     5,     6,     7,     8,     9,    19,    11,
1140       12,    13,    14,    15,    16,    17,    18,    19,    19,    21,
1141        5,     6,    19,    55,     5,    19,    11,    12,    13,    14,
1142       15,    16,    17,    18,     5,     6,    21,    19,    56,    19,
1143       11,    12,    13,    14,    15,    16,    17,    18,     5,     6,
1144       21,    20,    57,    19,    11,    12,    13,    14,    15,    16,
1145       17,    18,    21,    21,    21,    31,    32,    33,    34,    57,
1146       57,    21,    55,    19,    19,    19,    55,    55,    55,    19,
1147       55,    19,    58,    57,    56,    24,    56,    19,    56,    19,
1148       57,    19,    57,    57,    19,    58,    58,    58,    58,    19,
1149       24,    24,    58,    58,    58,    58,    58,    58,    24,    58,
1150       58,    53,    59,    56,    19,    56,    19,    24,    55,    19,
1151       55,    57,    56,    56,    53,    56,    30,    19,    24,    56,
1152       56,    19,     0,    55,    55,    24,    55,    24,    56,    53,
1153       57,    56,    53,    56,    56,     0,    12,    46,    58,    58,
1154      181,    57,   182,   178,   265,   365,    -1,   276,    -1,   356,
1155       -1,    -1,   135,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1156       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1157       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1158       -1,    -1,    -1,   101
1159 };
1160 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
1161 #line 3 "/usr/share/bison/bison.simple"
1162
1163 /* Skeleton output parser for bison,
1164
1165    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
1166    Foundation, Inc.
1167
1168    This program is free software; you can redistribute it and/or modify
1169    it under the terms of the GNU General Public License as published by
1170    the Free Software Foundation; either version 2, or (at your option)
1171    any later version.
1172
1173    This program is distributed in the hope that it will be useful,
1174    but WITHOUT ANY WARRANTY; without even the implied warranty of
1175    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1176    GNU General Public License for more details.
1177
1178    You should have received a copy of the GNU General Public License
1179    along with this program; if not, write to the Free Software
1180    Foundation, Inc., 59 Temple Place - Suite 330,
1181    Boston, MA 02111-1307, USA.  */
1182
1183 /* As a special exception, when this file is copied by Bison into a
1184    Bison output file, you may use that output file without restriction.
1185    This special exception was added by the Free Software Foundation
1186    in version 1.24 of Bison.  */
1187
1188 /* This is the parser code that is written into each bison parser when
1189    the %semantic_parser declaration is not specified in the grammar.
1190    It was written by Richard Stallman by simplifying the hairy parser
1191    used when %semantic_parser is specified.  */
1192
1193 /* All symbols defined below should begin with yy or YY, to avoid
1194    infringing on user name space.  This should be done even for local
1195    variables, as they might otherwise be expanded by user macros.
1196    There are some unavoidable exceptions within include files to
1197    define necessary library symbols; they are noted "INFRINGES ON
1198    USER NAME SPACE" below.  */
1199
1200 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
1201
1202 /* The parser invokes alloca or malloc; define the necessary symbols.  */
1203
1204 # if YYSTACK_USE_ALLOCA
1205 #  define YYSTACK_ALLOC alloca
1206 # else
1207 #  ifndef YYSTACK_USE_ALLOCA
1208 #   if defined (alloca) || defined (_ALLOCA_H)
1209 #    define YYSTACK_ALLOC alloca
1210 #   else
1211 #    ifdef __GNUC__
1212 #     define YYSTACK_ALLOC __builtin_alloca
1213 #    endif
1214 #   endif
1215 #  endif
1216 # endif
1217
1218 # ifdef YYSTACK_ALLOC
1219    /* Pacify GCC's `empty if-body' warning. */
1220 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1221 # else
1222 #  if defined (__STDC__) || defined (__cplusplus)
1223 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1224 #   define YYSIZE_T size_t
1225 #  endif
1226 #  define YYSTACK_ALLOC malloc
1227 #  define YYSTACK_FREE free
1228 # endif
1229 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
1230
1231
1232 #if (! defined (yyoverflow) \
1233      && (! defined (__cplusplus) \
1234          || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1235
1236 /* A type that is properly aligned for any stack member.  */
1237 union yyalloc
1238 {
1239   short yyss;
1240   YYSTYPE yyvs;
1241 # if YYLSP_NEEDED
1242   YYLTYPE yyls;
1243 # endif
1244 };
1245
1246 /* The size of the maximum gap between one aligned stack and the next.  */
1247 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
1248
1249 /* The size of an array large to enough to hold all stacks, each with
1250    N elements.  */
1251 # if YYLSP_NEEDED
1252 #  define YYSTACK_BYTES(N) \
1253      ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))      \
1254       + 2 * YYSTACK_GAP_MAX)
1255 # else
1256 #  define YYSTACK_BYTES(N) \
1257      ((N) * (sizeof (short) + sizeof (YYSTYPE))                         \
1258       + YYSTACK_GAP_MAX)
1259 # endif
1260
1261 /* Copy COUNT objects from FROM to TO.  The source and destination do
1262    not overlap.  */
1263 # ifndef YYCOPY
1264 #  if 1 < __GNUC__
1265 #   define YYCOPY(To, From, Count) \
1266       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1267 #  else
1268 #   define YYCOPY(To, From, Count)              \
1269       do                                        \
1270         {                                       \
1271           register YYSIZE_T yyi;                \
1272           for (yyi = 0; yyi < (Count); yyi++)   \
1273             (To)[yyi] = (From)[yyi];            \
1274         }                                       \
1275       while (0)
1276 #  endif
1277 # endif
1278
1279 /* Relocate STACK from its old location to the new one.  The
1280    local variables YYSIZE and YYSTACKSIZE give the old and new number of
1281    elements in the stack, and YYPTR gives the new location of the
1282    stack.  Advance YYPTR to a properly aligned location for the next
1283    stack.  */
1284 # define YYSTACK_RELOCATE(Stack)                                        \
1285     do                                                                  \
1286       {                                                                 \
1287         YYSIZE_T yynewbytes;                                            \
1288         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
1289         Stack = &yyptr->Stack;                                          \
1290         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;   \
1291         yyptr += yynewbytes / sizeof (*yyptr);                          \
1292       }                                                                 \
1293     while (0)
1294
1295 #endif
1296
1297
1298 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
1299 # define YYSIZE_T __SIZE_TYPE__
1300 #endif
1301 #if ! defined (YYSIZE_T) && defined (size_t)
1302 # define YYSIZE_T size_t
1303 #endif
1304 #if ! defined (YYSIZE_T)
1305 # if defined (__STDC__) || defined (__cplusplus)
1306 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1307 #  define YYSIZE_T size_t
1308 # endif
1309 #endif
1310 #if ! defined (YYSIZE_T)
1311 # define YYSIZE_T unsigned int
1312 #endif
1313
1314 #define yyerrok         (yyerrstatus = 0)
1315 #define yyclearin       (yychar = YYEMPTY)
1316 #define YYEMPTY         -2
1317 #define YYEOF           0
1318 #define YYACCEPT        goto yyacceptlab
1319 #define YYABORT         goto yyabortlab
1320 #define YYERROR         goto yyerrlab1
1321 /* Like YYERROR except do call yyerror.  This remains here temporarily
1322    to ease the transition to the new meaning of YYERROR, for GCC.
1323    Once GCC version 2 has supplanted version 1, this can go.  */
1324 #define YYFAIL          goto yyerrlab
1325 #define YYRECOVERING()  (!!yyerrstatus)
1326 #define YYBACKUP(Token, Value)                                  \
1327 do                                                              \
1328   if (yychar == YYEMPTY && yylen == 1)                          \
1329     {                                                           \
1330       yychar = (Token);                                         \
1331       yylval = (Value);                                         \
1332       yychar1 = YYTRANSLATE (yychar);                           \
1333       YYPOPSTACK;                                               \
1334       goto yybackup;                                            \
1335     }                                                           \
1336   else                                                          \
1337     {                                                           \
1338       yyerror ("syntax error: cannot back up");                 \
1339       YYERROR;                                                  \
1340     }                                                           \
1341 while (0)
1342
1343 #define YYTERROR        1
1344 #define YYERRCODE       256
1345
1346
1347 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
1348    are run).
1349
1350    When YYLLOC_DEFAULT is run, CURRENT is set the location of the
1351    first token.  By default, to implement support for ranges, extend
1352    its range to the last symbol.  */
1353
1354 #ifndef YYLLOC_DEFAULT
1355 # define YYLLOC_DEFAULT(Current, Rhs, N)        \
1356    Current.last_line   = Rhs[N].last_line;      \
1357    Current.last_column = Rhs[N].last_column;
1358 #endif
1359
1360
1361 /* YYLEX -- calling `yylex' with the right arguments.  */
1362
1363 #if YYPURE
1364 # if YYLSP_NEEDED
1365 #  ifdef YYLEX_PARAM
1366 #   define YYLEX                yylex (&yylval, &yylloc, YYLEX_PARAM)
1367 #  else
1368 #   define YYLEX                yylex (&yylval, &yylloc)
1369 #  endif
1370 # else /* !YYLSP_NEEDED */
1371 #  ifdef YYLEX_PARAM
1372 #   define YYLEX                yylex (&yylval, YYLEX_PARAM)
1373 #  else
1374 #   define YYLEX                yylex (&yylval)
1375 #  endif
1376 # endif /* !YYLSP_NEEDED */
1377 #else /* !YYPURE */
1378 # define YYLEX                  yylex ()
1379 #endif /* !YYPURE */
1380
1381
1382 /* Enable debugging if requested.  */
1383 #if YYDEBUG
1384
1385 # ifndef YYFPRINTF
1386 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1387 #  define YYFPRINTF fprintf
1388 # endif
1389
1390 # define YYDPRINTF(Args)                        \
1391 do {                                            \
1392   if (yydebug)                                  \
1393     YYFPRINTF Args;                             \
1394 } while (0)
1395 /* Nonzero means print parse trace.  It is left uninitialized so that
1396    multiple parsers can coexist.  */
1397 int yydebug;
1398 #else /* !YYDEBUG */
1399 # define YYDPRINTF(Args)
1400 #endif /* !YYDEBUG */
1401
1402 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1403 #ifndef YYINITDEPTH
1404 # define YYINITDEPTH 200
1405 #endif
1406
1407 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1408    if the built-in stack extension method is used).
1409
1410    Do not make this value too large; the results are undefined if
1411    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1412    evaluated with infinite-precision integer arithmetic.  */
1413
1414 #if YYMAXDEPTH == 0
1415 # undef YYMAXDEPTH
1416 #endif
1417
1418 #ifndef YYMAXDEPTH
1419 # define YYMAXDEPTH 10000
1420 #endif
1421 \f
1422 #ifdef YYERROR_VERBOSE
1423
1424 # ifndef yystrlen
1425 #  if defined (__GLIBC__) && defined (_STRING_H)
1426 #   define yystrlen strlen
1427 #  else
1428 /* Return the length of YYSTR.  */
1429 static YYSIZE_T
1430 #   if defined (__STDC__) || defined (__cplusplus)
1431 yystrlen (const char *yystr)
1432 #   else
1433 yystrlen (yystr)
1434      const char *yystr;
1435 #   endif
1436 {
1437   register const char *yys = yystr;
1438
1439   while (*yys++ != '\0')
1440     continue;
1441
1442   return yys - yystr - 1;
1443 }
1444 #  endif
1445 # endif
1446
1447 # ifndef yystpcpy
1448 #  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1449 #   define yystpcpy stpcpy
1450 #  else
1451 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1452    YYDEST.  */
1453 static char *
1454 #   if defined (__STDC__) || defined (__cplusplus)
1455 yystpcpy (char *yydest, const char *yysrc)
1456 #   else
1457 yystpcpy (yydest, yysrc)
1458      char *yydest;
1459      const char *yysrc;
1460 #   endif
1461 {
1462   register char *yyd = yydest;
1463   register const char *yys = yysrc;
1464
1465   while ((*yyd++ = *yys++) != '\0')
1466     continue;
1467
1468   return yyd - 1;
1469 }
1470 #  endif
1471 # endif
1472 #endif
1473 \f
1474 #line 315 "/usr/share/bison/bison.simple"
1475
1476
1477 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
1478    into yyparse.  The argument should have type void *.
1479    It should actually point to an object.
1480    Grammar actions can access the variable by casting it
1481    to the proper pointer type.  */
1482
1483 #ifdef YYPARSE_PARAM
1484 # if defined (__STDC__) || defined (__cplusplus)
1485 #  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1486 #  define YYPARSE_PARAM_DECL
1487 # else
1488 #  define YYPARSE_PARAM_ARG YYPARSE_PARAM
1489 #  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1490 # endif
1491 #else /* !YYPARSE_PARAM */
1492 # define YYPARSE_PARAM_ARG
1493 # define YYPARSE_PARAM_DECL
1494 #endif /* !YYPARSE_PARAM */
1495
1496 /* Prevent warning if -Wstrict-prototypes.  */
1497 #ifdef __GNUC__
1498 # ifdef YYPARSE_PARAM
1499 int yyparse (void *);
1500 # else
1501 int yyparse (void);
1502 # endif
1503 #endif
1504
1505 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
1506    variables are global, or local to YYPARSE.  */
1507
1508 #define YY_DECL_NON_LSP_VARIABLES                       \
1509 /* The lookahead symbol.  */                            \
1510 int yychar;                                             \
1511                                                         \
1512 /* The semantic value of the lookahead symbol. */       \
1513 YYSTYPE yylval;                                         \
1514                                                         \
1515 /* Number of parse errors so far.  */                   \
1516 int yynerrs;
1517
1518 #if YYLSP_NEEDED
1519 # define YY_DECL_VARIABLES                      \
1520 YY_DECL_NON_LSP_VARIABLES                       \
1521                                                 \
1522 /* Location data for the lookahead symbol.  */  \
1523 YYLTYPE yylloc;
1524 #else
1525 # define YY_DECL_VARIABLES                      \
1526 YY_DECL_NON_LSP_VARIABLES
1527 #endif
1528
1529
1530 /* If nonreentrant, generate the variables here. */
1531
1532 #if !YYPURE
1533 YY_DECL_VARIABLES
1534 #endif  /* !YYPURE */
1535
1536 int
1537 yyparse (YYPARSE_PARAM_ARG)
1538      YYPARSE_PARAM_DECL
1539 {
1540   /* If reentrant, generate the variables here. */
1541 #if YYPURE
1542   YY_DECL_VARIABLES
1543 #endif  /* !YYPURE */
1544
1545   register int yystate;
1546   register int yyn;
1547   int yyresult;
1548   /* Number of tokens to shift before error messages enabled.  */
1549   int yyerrstatus;
1550   /* Lookahead token as an internal (translated) token number.  */
1551   int yychar1 = 0;
1552
1553   /* Three stacks and their tools:
1554      `yyss': related to states,
1555      `yyvs': related to semantic values,
1556      `yyls': related to locations.
1557
1558      Refer to the stacks thru separate pointers, to allow yyoverflow
1559      to reallocate them elsewhere.  */
1560
1561   /* The state stack. */
1562   short yyssa[YYINITDEPTH];
1563   short *yyss = yyssa;
1564   register short *yyssp;
1565
1566   /* The semantic value stack.  */
1567   YYSTYPE yyvsa[YYINITDEPTH];
1568   YYSTYPE *yyvs = yyvsa;
1569   register YYSTYPE *yyvsp;
1570
1571 #if YYLSP_NEEDED
1572   /* The location stack.  */
1573   YYLTYPE yylsa[YYINITDEPTH];
1574   YYLTYPE *yyls = yylsa;
1575   YYLTYPE *yylsp;
1576 #endif
1577
1578 #if YYLSP_NEEDED
1579 # define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
1580 #else
1581 # define YYPOPSTACK   (yyvsp--, yyssp--)
1582 #endif
1583
1584   YYSIZE_T yystacksize = YYINITDEPTH;
1585
1586
1587   /* The variables used to return semantic value and location from the
1588      action routines.  */
1589   YYSTYPE yyval;
1590 #if YYLSP_NEEDED
1591   YYLTYPE yyloc;
1592 #endif
1593
1594   /* When reducing, the number of symbols on the RHS of the reduced
1595      rule. */
1596   int yylen;
1597
1598   YYDPRINTF ((stderr, "Starting parse\n"));
1599
1600   yystate = 0;
1601   yyerrstatus = 0;
1602   yynerrs = 0;
1603   yychar = YYEMPTY;             /* Cause a token to be read.  */
1604
1605   /* Initialize stack pointers.
1606      Waste one element of value and location stack
1607      so that they stay on the same level as the state stack.
1608      The wasted elements are never initialized.  */
1609
1610   yyssp = yyss;
1611   yyvsp = yyvs;
1612 #if YYLSP_NEEDED
1613   yylsp = yyls;
1614 #endif
1615   goto yysetstate;
1616
1617 /*------------------------------------------------------------.
1618 | yynewstate -- Push a new state, which is found in yystate.  |
1619 `------------------------------------------------------------*/
1620  yynewstate:
1621   /* In all cases, when you get here, the value and location stacks
1622      have just been pushed. so pushing a state here evens the stacks.
1623      */
1624   yyssp++;
1625
1626  yysetstate:
1627   *yyssp = yystate;
1628
1629   if (yyssp >= yyss + yystacksize - 1)
1630     {
1631       /* Get the current used size of the three stacks, in elements.  */
1632       YYSIZE_T yysize = yyssp - yyss + 1;
1633
1634 #ifdef yyoverflow
1635       {
1636         /* Give user a chance to reallocate the stack. Use copies of
1637            these so that the &'s don't force the real ones into
1638            memory.  */
1639         YYSTYPE *yyvs1 = yyvs;
1640         short *yyss1 = yyss;
1641
1642         /* Each stack pointer address is followed by the size of the
1643            data in use in that stack, in bytes.  */
1644 # if YYLSP_NEEDED
1645         YYLTYPE *yyls1 = yyls;
1646         /* This used to be a conditional around just the two extra args,
1647            but that might be undefined if yyoverflow is a macro.  */
1648         yyoverflow ("parser stack overflow",
1649                     &yyss1, yysize * sizeof (*yyssp),
1650                     &yyvs1, yysize * sizeof (*yyvsp),
1651                     &yyls1, yysize * sizeof (*yylsp),
1652                     &yystacksize);
1653         yyls = yyls1;
1654 # else
1655         yyoverflow ("parser stack overflow",
1656                     &yyss1, yysize * sizeof (*yyssp),
1657                     &yyvs1, yysize * sizeof (*yyvsp),
1658                     &yystacksize);
1659 # endif
1660         yyss = yyss1;
1661         yyvs = yyvs1;
1662       }
1663 #else /* no yyoverflow */
1664 # ifndef YYSTACK_RELOCATE
1665       goto yyoverflowlab;
1666 # else
1667       /* Extend the stack our own way.  */
1668       if (yystacksize >= YYMAXDEPTH)
1669         goto yyoverflowlab;
1670       yystacksize *= 2;
1671       if (yystacksize > YYMAXDEPTH)
1672         yystacksize = YYMAXDEPTH;
1673
1674       {
1675         short *yyss1 = yyss;
1676         union yyalloc *yyptr =
1677           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1678         if (! yyptr)
1679           goto yyoverflowlab;
1680         YYSTACK_RELOCATE (yyss);
1681         YYSTACK_RELOCATE (yyvs);
1682 # if YYLSP_NEEDED
1683         YYSTACK_RELOCATE (yyls);
1684 # endif
1685 # undef YYSTACK_RELOCATE
1686         if (yyss1 != yyssa)
1687           YYSTACK_FREE (yyss1);
1688       }
1689 # endif
1690 #endif /* no yyoverflow */
1691
1692       yyssp = yyss + yysize - 1;
1693       yyvsp = yyvs + yysize - 1;
1694 #if YYLSP_NEEDED
1695       yylsp = yyls + yysize - 1;
1696 #endif
1697
1698       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1699                   (unsigned long int) yystacksize));
1700
1701       if (yyssp >= yyss + yystacksize - 1)
1702         YYABORT;
1703     }
1704
1705   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1706
1707   goto yybackup;
1708
1709
1710 /*-----------.
1711 | yybackup.  |
1712 `-----------*/
1713 yybackup:
1714
1715 /* Do appropriate processing given the current state.  */
1716 /* Read a lookahead token if we need one and don't already have one.  */
1717 /* yyresume: */
1718
1719   /* First try to decide what to do without reference to lookahead token.  */
1720
1721   yyn = yypact[yystate];
1722   if (yyn == YYFLAG)
1723     goto yydefault;
1724
1725   /* Not known => get a lookahead token if don't already have one.  */
1726
1727   /* yychar is either YYEMPTY or YYEOF
1728      or a valid token in external form.  */
1729
1730   if (yychar == YYEMPTY)
1731     {
1732       YYDPRINTF ((stderr, "Reading a token: "));
1733       yychar = YYLEX;
1734     }
1735
1736   /* Convert token to internal form (in yychar1) for indexing tables with */
1737
1738   if (yychar <= 0)              /* This means end of input. */
1739     {
1740       yychar1 = 0;
1741       yychar = YYEOF;           /* Don't call YYLEX any more */
1742
1743       YYDPRINTF ((stderr, "Now at end of input.\n"));
1744     }
1745   else
1746     {
1747       yychar1 = YYTRANSLATE (yychar);
1748
1749 #if YYDEBUG
1750      /* We have to keep this `#if YYDEBUG', since we use variables
1751         which are defined only if `YYDEBUG' is set.  */
1752       if (yydebug)
1753         {
1754           YYFPRINTF (stderr, "Next token is %d (%s",
1755                      yychar, yytname[yychar1]);
1756           /* Give the individual parser a way to print the precise
1757              meaning of a token, for further debugging info.  */
1758 # ifdef YYPRINT
1759           YYPRINT (stderr, yychar, yylval);
1760 # endif
1761           YYFPRINTF (stderr, ")\n");
1762         }
1763 #endif
1764     }
1765
1766   yyn += yychar1;
1767   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1768     goto yydefault;
1769
1770   yyn = yytable[yyn];
1771
1772   /* yyn is what to do for this token type in this state.
1773      Negative => reduce, -yyn is rule number.
1774      Positive => shift, yyn is new state.
1775        New state is final state => don't bother to shift,
1776        just return success.
1777      0, or most negative number => error.  */
1778
1779   if (yyn < 0)
1780     {
1781       if (yyn == YYFLAG)
1782         goto yyerrlab;
1783       yyn = -yyn;
1784       goto yyreduce;
1785     }
1786   else if (yyn == 0)
1787     goto yyerrlab;
1788
1789   if (yyn == YYFINAL)
1790     YYACCEPT;
1791
1792   /* Shift the lookahead token.  */
1793   YYDPRINTF ((stderr, "Shifting token %d (%s), ",
1794               yychar, yytname[yychar1]));
1795
1796   /* Discard the token being shifted unless it is eof.  */
1797   if (yychar != YYEOF)
1798     yychar = YYEMPTY;
1799
1800   *++yyvsp = yylval;
1801 #if YYLSP_NEEDED
1802   *++yylsp = yylloc;
1803 #endif
1804
1805   /* Count tokens shifted since error; after three, turn off error
1806      status.  */
1807   if (yyerrstatus)
1808     yyerrstatus--;
1809
1810   yystate = yyn;
1811   goto yynewstate;
1812
1813
1814 /*-----------------------------------------------------------.
1815 | yydefault -- do the default action for the current state.  |
1816 `-----------------------------------------------------------*/
1817 yydefault:
1818   yyn = yydefact[yystate];
1819   if (yyn == 0)
1820     goto yyerrlab;
1821   goto yyreduce;
1822
1823
1824 /*-----------------------------.
1825 | yyreduce -- Do a reduction.  |
1826 `-----------------------------*/
1827 yyreduce:
1828   /* yyn is the number of a rule to reduce with.  */
1829   yylen = yyr2[yyn];
1830
1831   /* If YYLEN is nonzero, implement the default value of the action:
1832      `$$ = $1'.
1833
1834      Otherwise, the following line sets YYVAL to the semantic value of
1835      the lookahead token.  This behavior is undocumented and Bison
1836      users should not rely upon it.  Assigning to YYVAL
1837      unconditionally makes the parser a bit smaller, and it avoids a
1838      GCC warning that YYVAL may be used uninitialized.  */
1839   yyval = yyvsp[1-yylen];
1840
1841 #if YYLSP_NEEDED
1842   /* Similarly for the default location.  Let the user run additional
1843      commands if for instance locations are ranges.  */
1844   yyloc = yylsp[1-yylen];
1845   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1846 #endif
1847
1848 #if YYDEBUG
1849   /* We have to keep this `#if YYDEBUG', since we use variables which
1850      are defined only if `YYDEBUG' is set.  */
1851   if (yydebug)
1852     {
1853       int yyi;
1854
1855       YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1856                  yyn, yyrline[yyn]);
1857
1858       /* Print the symbols being reduced, and their result.  */
1859       for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
1860         YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1861       YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1862     }
1863 #endif
1864
1865   switch (yyn) {
1866
1867 case 1:
1868 #line 640 "parse.y"
1869 { ; }
1870     break;
1871 case 2:
1872 #line 641 "parse.y"
1873 { ; }
1874     break;
1875 case 3:
1876 #line 642 "parse.y"
1877 { ; }
1878     break;
1879 case 4:
1880 #line 643 "parse.y"
1881 { ; }
1882     break;
1883 case 5:
1884 #line 646 "parse.y"
1885 {
1886                         Node *node = node_new (CCODE_NODE,
1887                                                "cctype", C_CCODE,
1888                                                "cbuf:steal", (yyvsp[0].cbuf)->str,
1889                                                "line_no", ccode_line,
1890                                                NULL);
1891                         nodes = g_list_append(nodes,node);
1892                         g_string_free(yyvsp[0].cbuf,FALSE);
1893                                         }
1894     break;
1895 case 6:
1896 #line 655 "parse.y"
1897 {
1898                         Node *node = node_new (CCODE_NODE,
1899                                                "cctype", H_CCODE,
1900                                                "cbuf:steal", (yyvsp[0].cbuf)->str,
1901                                                "line_no", ccode_line,
1902                                                NULL);
1903                         nodes = g_list_append(nodes,node);
1904                         g_string_free(yyvsp[0].cbuf,FALSE);
1905                                         }
1906     break;
1907 case 7:
1908 #line 664 "parse.y"
1909 {
1910                         Node *node = node_new (CCODE_NODE,
1911                                                "cctype", HT_CCODE,
1912                                                "cbuf:steal", (yyvsp[0].cbuf)->str,
1913                                                "line_no", ccode_line,
1914                                                NULL);
1915                         nodes = g_list_append(nodes,node);
1916                         g_string_free(yyvsp[0].cbuf,FALSE);
1917                                         }
1918     break;
1919 case 8:
1920 #line 673 "parse.y"
1921 {
1922                         Node *node = node_new (CCODE_NODE,
1923                                                "cctype", PH_CCODE,
1924                                                "cbuf:steal", (yyvsp[0].cbuf)->str,
1925                                                "line_no", ccode_line,
1926                                                NULL);
1927                         nodes = g_list_append(nodes,node);
1928                         g_string_free(yyvsp[0].cbuf,FALSE);
1929                                         }
1930     break;
1931 case 9:
1932 #line 682 "parse.y"
1933 {
1934                         Node *node = node_new (CCODE_NODE,
1935                                                "cctype", A_CCODE,
1936                                                "cbuf:steal", (yyvsp[0].cbuf)->str,
1937                                                "line_no", ccode_line,
1938                                                NULL);
1939                         nodes = g_list_append(nodes,node);
1940                         g_string_free(yyvsp[0].cbuf,FALSE);
1941                                         }
1942     break;
1943 case 10:
1944 #line 691 "parse.y"
1945 {
1946                         Node *node = node_new (CCODE_NODE,
1947                                                "cctype", AT_CCODE,
1948                                                "cbuf:steal", (yyvsp[0].cbuf)->str,
1949                                                "line_no", ccode_line,
1950                                                NULL);
1951                         nodes = g_list_append(nodes,node);
1952                         g_string_free(yyvsp[0].cbuf,FALSE);
1953                                         }
1954     break;
1955 case 11:
1956 #line 702 "parse.y"
1957 { ; }
1958     break;
1959 case 12:
1960 #line 703 "parse.y"
1961 { ; }
1962     break;
1963 case 13:
1964 #line 704 "parse.y"
1965 { ; }
1966     break;
1967 case 14:
1968 #line 705 "parse.y"
1969 { ; }
1970     break;
1971 case 15:
1972 #line 706 "parse.y"
1973 { ; }
1974     break;
1975 case 16:
1976 #line 707 "parse.y"
1977 { ; }
1978     break;
1979 case 17:
1980 #line 708 "parse.y"
1981 { ; }
1982     break;
1983 case 18:
1984 #line 709 "parse.y"
1985 { ; }
1986     break;
1987 case 19:
1988 #line 712 "parse.y"
1989 {
1990                         ((Class *)class)->nodes = class_nodes;
1991                         class_nodes = NULL;
1992                         nodes = g_list_append(nodes,class);
1993                                                 }
1994     break;
1995 case 20:
1996 #line 717 "parse.y"
1997 {
1998                         ((Class *)class)->nodes = NULL;
1999                         class_nodes = NULL;
2000                         nodes = g_list_append(nodes,class);
2001                                                 }
2002     break;
2003 case 21:
2004 #line 724 "parse.y"
2005 {
2006                         class = node_new (CLASS_NODE,
2007                                           "otype:steal", yyvsp[-3].id,
2008                                           "ptype:steal", yyvsp[-1].id,
2009                                           "bonobo_object_class:steal", bonobo_object_class,
2010                                           "interfaces:steal", interfaces,
2011                                           "chunk_size:steal", chunk_size,
2012                                           NULL);
2013                         bonobo_object_class = NULL;
2014                         chunk_size = NULL;
2015                         interfaces = NULL;
2016                                                 }
2017     break;
2018 case 23:
2019 #line 739 "parse.y"
2020 {
2021                         if(strcmp(yyvsp[-3].id,"chunks") == 0) {
2022                                 g_free (chunk_size);
2023                                 chunk_size = g_strdup(yyvsp[-2].id);
2024                         } else if(strcmp(yyvsp[-3].id,"BonoboObject") == 0) {
2025                                 g_free (bonobo_object_class);
2026                                 bonobo_object_class = g_strdup(yyvsp[-2].id);
2027                         } else {
2028                                 yyerror(_("parse error"));
2029                                 YYERROR;
2030                         }
2031                 }
2032     break;
2033 case 24:
2034 #line 751 "parse.y"
2035 {
2036                         if (strcmp (yyvsp[-3].id, "interface") == 0) {
2037                                 interfaces = g_list_append (interfaces,
2038                                                             g_strdup (yyvsp[-2].id));
2039                         } else {
2040                                 yyerror(_("parse error"));
2041                                 YYERROR;
2042                         }
2043                 }
2044     break;
2045 case 25:
2046 #line 760 "parse.y"
2047 {
2048                         if(strcmp(yyvsp[-3].id,"chunks") == 0) {
2049                                 g_free (chunk_size);
2050                                 if(atoi(yyvsp[-2].id) != 0)
2051                                         chunk_size = g_strdup(yyvsp[-2].id);
2052                                 else
2053                                         chunk_size = NULL;
2054                         } else {
2055                                 yyerror(_("parse error"));
2056                                 YYERROR;
2057                         }
2058                 }
2059     break;
2060 case 26:
2061 #line 774 "parse.y"
2062 { ; }
2063     break;
2064 case 27:
2065 #line 775 "parse.y"
2066 { ; }
2067     break;
2068 case 28:
2069 #line 778 "parse.y"
2070 { ; }
2071     break;
2072 case 29:
2073 #line 779 "parse.y"
2074 {
2075                         if (strcmp (yyvsp[-1].id, "BonoboObject") != 0) {
2076                                 g_free (yyvsp[-1].id);
2077                                 yyerror (_("parse error"));
2078                                 YYERROR;
2079                         }
2080                         g_free (yyvsp[-1].id);
2081                         last_added_method->bonobo_object_func = TRUE;
2082                                                 }
2083     break;
2084 case 30:
2085 #line 788 "parse.y"
2086 {
2087                         if (strcmp (yyvsp[-2].id, "interface") != 0) {
2088                                 g_free (yyvsp[-2].id);
2089                                 g_free (yyvsp[-1].id);
2090                                 yyerror (_("parse error"));
2091                                 YYERROR;
2092                         }
2093                         g_free (yyvsp[-2].id);
2094                         node_set ((Node *)last_added_method,
2095                                   "interface:steal", yyvsp[-1].id,
2096                                   NULL);
2097                                                 }
2098     break;
2099 case 31:
2100 #line 800 "parse.y"
2101 { ; }
2102     break;
2103 case 32:
2104 #line 801 "parse.y"
2105 { ; }
2106     break;
2107 case 33:
2108 #line 802 "parse.y"
2109 { ; }
2110     break;
2111 case 34:
2112 #line 803 "parse.y"
2113 { ; }
2114     break;
2115 case 35:
2116 #line 806 "parse.y"
2117 { the_scope = PUBLIC_SCOPE; }
2118     break;
2119 case 36:
2120 #line 807 "parse.y"
2121 { the_scope = PRIVATE_SCOPE; }
2122     break;
2123 case 37:
2124 #line 808 "parse.y"
2125 { the_scope = PROTECTED_SCOPE; }
2126     break;
2127 case 38:
2128 #line 809 "parse.y"
2129 { the_scope = CLASS_SCOPE; }
2130     break;
2131 case 39:
2132 #line 812 "parse.y"
2133 {
2134                         if (strcmp (yyvsp[-1].id, "destroywith") == 0) {
2135                                 g_free (yyvsp[-1].id);
2136                                 destructor_unref = FALSE;
2137                                 destructor = yyvsp[0].id;
2138                                 destructor_line = line_no;
2139                                 destructor_simple = TRUE;
2140                         } else if (strcmp (yyvsp[-1].id, "unrefwith") == 0) {
2141                                 g_free (yyvsp[-1].id);
2142                                 destructor_unref = TRUE;
2143                                 destructor = yyvsp[0].id;
2144                                 destructor_line = line_no;
2145                                 destructor_simple = TRUE;
2146                         } else {
2147                                 g_free (yyvsp[-1].id);
2148                                 g_free (yyvsp[0].id);
2149                                 yyerror (_("parse error"));
2150                                 YYERROR;
2151                         }
2152                                 }
2153     break;
2154 case 40:
2155 #line 832 "parse.y"
2156 {
2157                         if (strcmp (yyvsp[-2].id, "destroy") == 0) {
2158                                 g_free(yyvsp[-2].id);
2159                                 destructor_unref = FALSE;
2160                                 destructor = (yyvsp[0].cbuf)->str;
2161                                 g_string_free(yyvsp[0].cbuf, FALSE);
2162                                 destructor_line = ccode_line;
2163                                 destructor_simple = FALSE;
2164                         } else if (strcmp (yyvsp[-2].id, "unref") == 0) {
2165                                 g_free (yyvsp[-2].id);
2166                                 destructor_unref = TRUE;
2167                                 destructor = (yyvsp[0].cbuf)->str;
2168                                 g_string_free (yyvsp[0].cbuf, FALSE);
2169                                 destructor_line = ccode_line;
2170                                 destructor_simple = FALSE;
2171                         } else {
2172                                 g_free (yyvsp[-2].id);
2173                                 g_string_free (yyvsp[0].cbuf, TRUE);
2174                                 yyerror (_("parse error"));
2175                                 YYERROR;
2176                         }
2177                                         }
2178     break;
2179 case 41:
2180 #line 856 "parse.y"
2181 {
2182                         initializer = yyvsp[0].id;
2183                         initializer_line = ccode_line;
2184                                 }
2185     break;
2186 case 42:
2187 #line 860 "parse.y"
2188 {
2189                         initializer = (yyvsp[0].cbuf)->str;
2190                         initializer_line = ccode_line;
2191                         g_string_free(yyvsp[0].cbuf, FALSE);
2192                                 }
2193     break;
2194 case 43:
2195 #line 868 "parse.y"
2196 { ; }
2197     break;
2198 case 44:
2199 #line 869 "parse.y"
2200 { ; }
2201     break;
2202 case 45:
2203 #line 870 "parse.y"
2204 { destructor = NULL; }
2205     break;
2206 case 46:
2207 #line 871 "parse.y"
2208 { initializer = NULL; }
2209     break;
2210 case 47:
2211 #line 872 "parse.y"
2212 {
2213                         destructor = NULL;
2214                         initializer = NULL;
2215                                         }
2216     break;
2217 case 48:
2218 #line 878 "parse.y"
2219 {
2220                         push_variable(yyvsp[-2].id, the_scope,yyvsp[-4].line, NULL);
2221                                                 }
2222     break;
2223 case 49:
2224 #line 881 "parse.y"
2225 {
2226                         push_variable(yyvsp[-3].id, the_scope, yyvsp[-5].line, yyvsp[-2].id);
2227                                                 }
2228     break;
2229 case 50:
2230 #line 886 "parse.y"
2231 {
2232                         Node *node = NULL;
2233                         if(strcmp(yyvsp[-6].id,"get")==0 &&
2234                            strcmp(yyvsp[-3].id,"set")==0) {
2235                                 Type *type = pop_type();
2236                                 g_free (yyvsp[-6].id); 
2237                                 g_free (yyvsp[-3].id);
2238                                 node = node_new (ARGUMENT_NODE,
2239                                                  "gtktype:steal", yyvsp[-9].id,
2240                                                  "atype:steal", type,
2241                                                  "flags:steal", yyvsp[-10].list,
2242                                                  "name:steal", yyvsp[-8].id,
2243                                                  "get:steal", (yyvsp[-4].cbuf)->str,
2244                                                  "get_line", yyvsp[-5].line,
2245                                                  "set:steal", (yyvsp[-1].cbuf)->str,
2246                                                  "set_line", yyvsp[-2].line,
2247                                                  "line_no", yyvsp[-11].line,
2248                                                  NULL);
2249
2250                                 class_nodes = g_list_append(class_nodes,node);
2251
2252                                 g_string_free (yyvsp[-4].cbuf, FALSE);
2253                                 g_string_free (yyvsp[-1].cbuf, FALSE);
2254
2255                         } else if(strcmp(yyvsp[-6].id,"set")==0 &&
2256                                 strcmp(yyvsp[-3].id,"get")==0) {
2257                                 Type *type = pop_type();
2258                                 g_free (yyvsp[-6].id); 
2259                                 g_free (yyvsp[-3].id);
2260                                 node = node_new (ARGUMENT_NODE,
2261                                                  "gtktype:steal", yyvsp[-9].id,
2262                                                  "atype:steal", type,
2263                                                  "flags:steal", yyvsp[-10].list,
2264                                                  "name:steal", yyvsp[-8].id,
2265                                                  "get:steal", (yyvsp[-1].cbuf)->str,
2266                                                  "get_line", yyvsp[-2].line,
2267                                                  "set:steal", (yyvsp[-4].cbuf)->str,
2268                                                  "set_line", yyvsp[-5].line,
2269                                                  "line_no", yyvsp[-11].line,
2270                                                  NULL);
2271                                 g_string_free (yyvsp[-1].cbuf, FALSE);
2272                                 g_string_free (yyvsp[-4].cbuf, FALSE);
2273                                 class_nodes = g_list_append(class_nodes,node);
2274                         } else {
2275                                 g_free (yyvsp[-9].id); 
2276                                 g_free (yyvsp[-8].id);
2277                                 g_free (yyvsp[-6].id); 
2278                                 g_free (yyvsp[-3].id);
2279                                 g_list_foreach (yyvsp[-10].list, (GFunc)g_free, NULL);
2280                                 g_list_free (yyvsp[-10].list);
2281                                 g_string_free (yyvsp[-1].cbuf, TRUE);
2282                                 g_string_free (yyvsp[-4].cbuf, TRUE);
2283                                 yyerror (_("parse error"));
2284                                 YYERROR;
2285                         }
2286
2287                         if (yyvsp[-7].id != NULL) {
2288                                 Argument *arg = (Argument *)node;
2289                                 export_accessors (arg->name,
2290                                                   arg->get != NULL, arg->get_line,
2291                                                   arg->set != NULL, arg->set_line,
2292                                                   arg->atype,
2293                                                   arg->gtktype,
2294                                                   arg->line_no);
2295                                 g_free (yyvsp[-7].id);
2296                         } 
2297
2298                                                 }
2299     break;
2300 case 51:
2301 #line 954 "parse.y"
2302 {
2303                         Node *node = NULL;
2304                         if(strcmp(yyvsp[-3].id, "get") == 0) {
2305                                 Type *type = pop_type();
2306                                 g_free (yyvsp[-3].id);
2307                                 node = node_new (ARGUMENT_NODE,
2308                                                  "gtktype:steal", yyvsp[-6].id,
2309                                                  "atype:steal", type,
2310                                                  "flags:steal", yyvsp[-7].list,
2311                                                  "name:steal", yyvsp[-5].id,
2312                                                  "get:steal", (yyvsp[-1].cbuf)->str,
2313                                                  "get_line", yyvsp[-2].line,
2314                                                  "line_no", yyvsp[-8].line,
2315                                                  NULL);
2316
2317                                 g_string_free (yyvsp[-1].cbuf, FALSE);
2318                                 class_nodes = g_list_append(class_nodes, node);
2319                         } else if(strcmp(yyvsp[-3].id, "set") == 0) {
2320                                 Type *type = pop_type();
2321                                 g_free (yyvsp[-3].id);
2322                                 node = node_new (ARGUMENT_NODE,
2323                                                  "gtktype:steal", yyvsp[-6].id,
2324                                                  "atype:steal", type,
2325                                                  "flags:steal", yyvsp[-7].list,
2326                                                  "name:steal", yyvsp[-5].id,
2327                                                  "set:steal", (yyvsp[-1].cbuf)->str,
2328                                                  "set_line", yyvsp[-2].line,
2329                                                  "line_no", yyvsp[-8].line,
2330                                                  NULL);
2331
2332                                 g_string_free (yyvsp[-1].cbuf, FALSE);
2333                                 class_nodes = g_list_append (class_nodes, node);
2334                         } else {
2335                                 g_free (yyvsp[-3].id); 
2336                                 g_free (yyvsp[-6].id);
2337                                 g_free (yyvsp[-5].id);
2338                                 g_list_foreach (yyvsp[-7].list, (GFunc)g_free, NULL);
2339                                 g_list_free (yyvsp[-7].list);
2340                                 g_string_free (yyvsp[-1].cbuf, TRUE);
2341                                 yyerror(_("parse error"));
2342                                 YYERROR;
2343                         }
2344
2345                         if (yyvsp[-4].id != NULL) {
2346                                 Argument *arg = (Argument *)node;
2347                                 export_accessors (arg->name,
2348                                                   arg->get != NULL, arg->get_line,
2349                                                   arg->set != NULL, arg->set_line,
2350                                                   arg->atype,
2351                                                   arg->gtktype,
2352                                                   arg->line_no);
2353                                 g_free (yyvsp[-4].id);
2354                         } 
2355                                                 }
2356     break;
2357 case 52:
2358 #line 1008 "parse.y"
2359 {
2360                         Node *node;
2361                         char *get, *set = NULL;
2362                         Variable *var;
2363                         Type *type;
2364                         const char *root;
2365                         
2366                         if(strcmp(yyvsp[0].id, "link")!=0 &&
2367                            strcmp(yyvsp[0].id, "stringlink")!=0 && 
2368                            strcmp(yyvsp[0].id, "objectlink")!=0) {
2369                                 g_free(yyvsp[0].id); 
2370                                 g_free(yyvsp[-3].id);
2371                                 g_free(yyvsp[-2].id);
2372                                 g_list_foreach(yyvsp[-4].list,(GFunc)g_free,NULL);
2373                                 g_list_free(yyvsp[-4].list);
2374                                 yyerror(_("parse error"));
2375                                 YYERROR;
2376                         }
2377
2378                         type = pop_type();
2379
2380                         var = find_var_or_die(yyvsp[-2].id, yyvsp[-5].line);
2381                         if(var->scope == PRIVATE_SCOPE) {
2382                                 root = "self->_priv";
2383                         } else if(var->scope == CLASS_SCOPE) {
2384                                 root = "SELF_GET_CLASS(self)";
2385                                 if(no_self_alias)
2386                                         error_print(GOB_ERROR, yyvsp[-5].line,
2387                                                     _("Self aliases needed when autolinking to a classwide member"));
2388                         } else {
2389                                 root = "self";
2390                         }
2391
2392                         if(strcmp(yyvsp[0].id, "link")==0) {
2393                                 set = g_strdup_printf("%s->%s = ARG;",
2394                                                       root, yyvsp[-2].id);
2395                         } else if(strcmp(yyvsp[0].id, "stringlink")==0) {
2396                                 set = g_strdup_printf("g_free (%s->%s); "
2397                                                       "%s->%s = g_strdup (ARG);",
2398                                                       root, yyvsp[-2].id,
2399                                                       root, yyvsp[-2].id);
2400                         } else if(strcmp(yyvsp[0].id, "objectlink")==0) {
2401                                 set = g_strdup_printf(
2402                                   "if (ARG != NULL) "
2403                                    "g_object_ref (G_OBJECT (ARG)); "
2404                                   "if (%s->%s != NULL) "
2405                                    "g_object_unref (G_OBJECT (%s->%s)); "
2406                                   "%s->%s = ARG;",
2407                                   root, yyvsp[-2].id,
2408                                   root, yyvsp[-2].id,
2409                                   root, yyvsp[-2].id);
2410                         } else {
2411                                 g_assert_not_reached();
2412                         }
2413
2414                         get = g_strdup_printf("ARG = %s->%s;", root, yyvsp[-2].id);
2415   
2416                         g_free (yyvsp[0].id);
2417
2418                         if (type == NULL)
2419                                 type = (Type *)node_copy ((Node *)var->vtype);
2420
2421                         node = node_new (ARGUMENT_NODE,
2422                                          "gtktype:steal", yyvsp[-3].id,
2423                                          "atype:steal", type,
2424                                          "flags:steal", yyvsp[-4].list,
2425                                          "name:steal", yyvsp[-2].id,
2426                                          "get:steal", get,
2427                                          "get_line", yyvsp[-5].line,
2428                                          "set:steal", set,
2429                                          "set_line", yyvsp[-5].line,
2430                                          "line_no", yyvsp[-5].line,
2431                                          NULL);
2432
2433                         if (yyvsp[-1].id != NULL) {
2434                                 Argument *arg = (Argument *)node;
2435                                 export_accessors (arg->name,
2436                                                   arg->get != NULL, arg->get_line,
2437                                                   arg->set != NULL, arg->set_line,
2438                                                   arg->atype,
2439                                                   arg->gtktype,
2440                                                   arg->line_no);
2441                                 g_free (yyvsp[-1].id);
2442                         } 
2443
2444                         class_nodes = g_list_append (class_nodes, node);
2445                                                 }
2446     break;
2447 case 53:
2448 #line 1097 "parse.y"
2449 {
2450                         if (strcmp (yyvsp[-1].id, "export")!=0) {
2451                                 g_free (yyvsp[-1].id); 
2452                                 yyerror (_("parse error"));
2453                                 YYERROR;
2454                         }
2455                         yyval.id = yyvsp[-1].id;
2456                                                 }
2457     break;
2458 case 54:
2459 #line 1105 "parse.y"
2460 {
2461                         yyval.id = NULL;
2462                                                 }
2463     break;
2464 case 55:
2465 #line 1110 "parse.y"
2466 {
2467                         ensure_property ();
2468                         node_set ((Node *)property,
2469                                   "line_no", yyvsp[-10].line,
2470                                   "gtktype:steal", debool (yyvsp[-9].id),
2471                                   "name:steal", yyvsp[-8].id,
2472                                   NULL);
2473                         if (strcmp (yyvsp[-6].id, "get") == 0 &&
2474                             strcmp (yyvsp[-3].id, "set") == 0) {
2475                                 node_set ((Node *)property,
2476                                           "get:steal", (yyvsp[-4].cbuf)->str,
2477                                           "get_line", yyvsp[-5].line,
2478                                           "set:steal", (yyvsp[-1].cbuf)->str,
2479                                           "set_line", yyvsp[-2].line,
2480                                           NULL);
2481                                 g_string_free (yyvsp[-4].cbuf, FALSE);
2482                                 g_string_free (yyvsp[-1].cbuf, FALSE);
2483                                 g_free (yyvsp[-6].id); 
2484                                 g_free (yyvsp[-3].id);
2485                         } else if (strcmp (yyvsp[-6].id, "set") == 0 &&
2486                                    strcmp (yyvsp[-3].id, "get") == 0) {
2487                                 node_set ((Node *)property,
2488                                           "get:steal", (yyvsp[-1].cbuf)->str,
2489                                           "get_line", yyvsp[-2].line,
2490                                           "set:steal", (yyvsp[-4].cbuf)->str,
2491                                           "set_line", yyvsp[-5].line,
2492                                           NULL);
2493                                 g_string_free (yyvsp[-4].cbuf, FALSE);
2494                                 g_string_free (yyvsp[-1].cbuf, FALSE);
2495                                 g_free (yyvsp[-6].id); 
2496                                 g_free (yyvsp[-3].id);
2497                         } else {
2498                                 g_string_free (yyvsp[-4].cbuf, TRUE);
2499                                 g_string_free (yyvsp[-1].cbuf, TRUE);
2500                                 g_free (yyvsp[-6].id); 
2501                                 g_free (yyvsp[-3].id);
2502                                 node_free ((Node *)property);
2503                                 property = NULL;
2504                                 yyerror (_("parse error"));
2505                                 YYERROR;
2506                         }
2507                         property_link_and_export ((Node *)property);
2508                         if (property != NULL) {
2509                                 class_nodes = g_list_append (class_nodes,
2510                                                              property);
2511                                 property = NULL;
2512                         }
2513                 }
2514     break;
2515 case 56:
2516 #line 1158 "parse.y"
2517 {
2518                         ensure_property ();
2519                         node_set ((Node *)property,
2520                                   "line_no", yyvsp[-7].line,
2521                                   "gtktype:steal", debool (yyvsp[-6].id),
2522                                   "name:steal", yyvsp[-5].id,
2523                                   NULL);
2524                         if (strcmp (yyvsp[-3].id, "get") == 0) {
2525                                 node_set ((Node *)property,
2526                                           "get:steal", (yyvsp[-1].cbuf)->str,
2527                                           "get_line", yyvsp[-2].line,
2528                                           NULL);
2529                                 g_string_free (yyvsp[-1].cbuf, FALSE);
2530                                 g_free (yyvsp[-3].id); 
2531                         } else if (strcmp (yyvsp[-3].id, "set") == 0) {
2532                                 node_set ((Node *)property,
2533                                           "set:steal", (yyvsp[-1].cbuf)->str,
2534                                           "set_line", yyvsp[-2].line,
2535                                           NULL);
2536                                 g_string_free (yyvsp[-1].cbuf, FALSE);
2537                                 g_free (yyvsp[-3].id); 
2538                         } else {
2539                                 g_string_free (yyvsp[-1].cbuf, TRUE);
2540                                 g_free (yyvsp[-3].id); 
2541                                 node_free ((Node *)property);
2542                                 property = NULL;
2543                                 yyerror (_("parse error"));
2544                                 YYERROR;
2545                         }
2546                         property_link_and_export ((Node *)property);
2547                         if (property != NULL) {
2548                                 class_nodes = g_list_append (class_nodes,
2549                                                              property);
2550                                 property = NULL;
2551                         }
2552                 }
2553     break;
2554 case 57:
2555 #line 1194 "parse.y"
2556 {
2557                         ensure_property ();
2558                         node_set ((Node *)property,
2559                                   "line_no", yyvsp[-4].line,
2560                                   "gtktype:steal", debool (yyvsp[-3].id),
2561                                   "name:steal", yyvsp[-2].id,
2562                                   NULL);
2563                         property_link_and_export ((Node *)property);
2564                         if (property != NULL) {
2565                                 class_nodes = g_list_append (class_nodes,
2566                                                              property);
2567                                 property = NULL;
2568                         }
2569                 }
2570     break;
2571 case 58:
2572 #line 1210 "parse.y"
2573 { ; }
2574     break;
2575 case 59:
2576 #line 1211 "parse.y"
2577 { ; }
2578     break;
2579 case 60:
2580 #line 1214 "parse.y"
2581 { ; }
2582     break;
2583 case 61:
2584 #line 1215 "parse.y"
2585 { ; }
2586     break;
2587 case 62:
2588 #line 1218 "parse.y"
2589 { yyval.id = yyvsp[0].id; }
2590     break;
2591 case 63:
2592 #line 1219 "parse.y"
2593 {
2594                         if (strcmp (yyvsp[-3].id, "_") != 0) {
2595                                 g_free (yyvsp[-3].id);
2596                                 yyerror(_("parse error"));
2597                                 YYERROR;
2598                         }
2599                         g_free (yyvsp[-3].id);
2600                         yyval.id = g_strconcat ("_(", yyvsp[-1].id, ")", NULL);
2601                         g_free (yyvsp[-1].id);
2602                 }
2603     break;
2604 case 64:
2605 #line 1231 "parse.y"
2606 { yyval.id = yyvsp[0].id; }
2607     break;
2608 case 65:
2609 #line 1232 "parse.y"
2610 { yyval.id = yyvsp[0].id; }
2611     break;
2612 case 66:
2613 #line 1235 "parse.y"
2614 {
2615                 ensure_property ();
2616                 node_set ((Node *)property,
2617                           "nick:steal", yyvsp[0].id,
2618                           NULL);
2619                   }
2620     break;
2621 case 67:
2622 #line 1241 "parse.y"
2623 {
2624                 ensure_property ();
2625                 node_set ((Node *)property,
2626                           "blurb:steal", yyvsp[0].id,
2627                           NULL);
2628                   }
2629     break;
2630 case 68:
2631 #line 1247 "parse.y"
2632 {
2633                 ensure_property ();
2634                 node_set ((Node *)property,
2635                           "maximum:steal", yyvsp[0].id,
2636                           NULL);
2637                   }
2638     break;
2639 case 69:
2640 #line 1253 "parse.y"
2641 {
2642                 ensure_property ();
2643                 node_set ((Node *)property,
2644                           "minimum:steal", yyvsp[0].id,
2645                           NULL);
2646                   }
2647     break;
2648 case 70:
2649 #line 1259 "parse.y"
2650 {
2651                 ensure_property ();
2652                 node_set ((Node *)property,
2653                           "default_value:steal", yyvsp[0].id,
2654                           NULL);
2655                   }
2656     break;
2657 case 71:
2658 #line 1265 "parse.y"
2659 {
2660                 ensure_property ();
2661                 node_set ((Node *)property,
2662                           "flags:steal", yyvsp[0].list,
2663                           NULL);
2664                   }
2665     break;
2666 case 72:
2667 #line 1271 "parse.y"
2668 {
2669                 Type *type = pop_type ();
2670                 ensure_property ();
2671                 node_set ((Node *)property,
2672                           "ptype:steal", type,
2673                           NULL);
2674                   }
2675     break;
2676 case 73:
2677 #line 1278 "parse.y"
2678 {
2679                 ensure_property ();
2680                 node_set ((Node *)property,
2681                           "extra_gtktype:steal", yyvsp[0].id,
2682                           NULL);
2683                   }
2684     break;
2685 case 74:
2686 #line 1284 "parse.y"
2687 {
2688                 ensure_property ();
2689                 node_set ((Node *)property,
2690                           "extra_gtktype:steal", yyvsp[0].id,
2691                           NULL);
2692                   }
2693     break;
2694 case 75:
2695 #line 1290 "parse.y"
2696 {
2697                 ensure_property ();
2698                 node_set ((Node *)property,
2699                           "extra_gtktype:steal", yyvsp[0].id,
2700                           NULL);
2701                   }
2702     break;
2703 case 76:
2704 #line 1296 "parse.y"
2705 {
2706                 ensure_property ();
2707                 node_set ((Node *)property,
2708                           "extra_gtktype:steal", yyvsp[0].id,
2709                           NULL);
2710                   }
2711     break;
2712 case 77:
2713 #line 1302 "parse.y"
2714 {
2715                 ensure_property ();
2716                 node_set ((Node *)property,
2717                           "extra_gtktype:steal", yyvsp[0].id,
2718                           NULL);
2719                   }
2720     break;
2721 case 78:
2722 #line 1308 "parse.y"
2723 {
2724                 ensure_property ();
2725                 node_set ((Node *)property,
2726                           "extra_gtktype:steal", yyvsp[0].id,
2727                           NULL);
2728                   }
2729     break;
2730 case 79:
2731 #line 1314 "parse.y"
2732 {
2733                 ensure_property ();
2734                 node_set ((Node *)property,
2735                           "extra_gtktype:steal", yyvsp[0].id,
2736                           NULL);
2737                   }
2738     break;
2739 case 80:
2740 #line 1320 "parse.y"
2741 {
2742                 ensure_property ();
2743                 node_set ((Node *)property,
2744                           "extra_gtktype:steal", yyvsp[0].id,
2745                           NULL);
2746                   }
2747     break;
2748 case 81:
2749 #line 1326 "parse.y"
2750 {
2751                 ensure_property ();
2752                 node_set ((Node *)property,
2753                           "extra_gtktype:steal", yyvsp[0].id,
2754                           NULL);
2755                   }
2756     break;
2757 case 82:
2758 #line 1332 "parse.y"
2759 {
2760                 ensure_property ();
2761                 node_set ((Node *)property,
2762                           "extra_gtktype:steal", yyvsp[0].id,
2763                           NULL);
2764                   }
2765     break;
2766 case 83:
2767 #line 1338 "parse.y"
2768 {
2769                 ensure_property ();
2770                 if (strcmp (yyvsp[0].id, "link") == 0) {
2771                         g_free(yyvsp[0].id);
2772                         node_set ((Node *)property,
2773                                   "link", TRUE,
2774                                   NULL);
2775                 } else if (strcmp (yyvsp[0].id, "export") == 0) {
2776                         g_free(yyvsp[0].id);
2777                         node_set ((Node *)property,
2778                                   "export", TRUE,
2779                                   NULL);
2780                 } else {
2781                         g_free(yyvsp[0].id);
2782                         yyerror(_("parse error"));
2783                         YYERROR;
2784                 }
2785                   }
2786     break;
2787 case 84:
2788 #line 1358 "parse.y"
2789 {
2790                         if(strcmp(yyvsp[-2].id,"type")!=0) {
2791                                 g_free(yyvsp[-4].id);
2792                                 g_free(yyvsp[-2].id);
2793                                 yyerror(_("parse error"));
2794                                 YYERROR;
2795                         }
2796                         yyval.id = debool (yyvsp[-4].id);
2797                                                 }
2798     break;
2799 case 85:
2800 #line 1367 "parse.y"
2801 {
2802                         yyval.id = debool (yyvsp[0].id);
2803                         typestack = g_list_prepend(typestack,NULL);
2804                                                 }
2805     break;
2806 case 86:
2807 #line 1373 "parse.y"
2808 { yyval.list = yyvsp[-1].list; }
2809     break;
2810 case 87:
2811 #line 1374 "parse.y"
2812 { yyval.list = NULL; }
2813     break;
2814 case 88:
2815 #line 1377 "parse.y"
2816 {
2817                         yyval.list = g_list_append(yyvsp[0].list,yyvsp[-2].id);
2818                                                 }
2819     break;
2820 case 89:
2821 #line 1380 "parse.y"
2822 {
2823                         yyval.list = g_list_append(NULL,yyvsp[0].id);
2824                                                 }
2825     break;
2826 case 90:
2827 #line 1386 "parse.y"
2828 {
2829                         Node *node = node_new (TYPE_NODE, 
2830                                                "name:steal", yyvsp[-1].id,
2831                                                "pointer:steal", yyvsp[0].id,
2832                                                NULL);
2833                         typestack = g_list_prepend(typestack,node);
2834                                                         }
2835     break;
2836 case 91:
2837 #line 1393 "parse.y"
2838 {
2839                         Node *node = node_new (TYPE_NODE, 
2840                                                "name:steal", yyvsp[0].id,
2841                                                NULL);
2842                         typestack = g_list_prepend(typestack,node);
2843                                                         }
2844     break;
2845 case 92:
2846 #line 1402 "parse.y"
2847 {
2848                         yyval.id = yyvsp[0].id;
2849                                                         }
2850     break;
2851 case 93:
2852 #line 1405 "parse.y"
2853 {
2854                         yyval.id = yyvsp[0].id;
2855                                                         }
2856     break;
2857 case 94:
2858 #line 1408 "parse.y"
2859 {
2860                         yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
2861                         g_free(yyvsp[0].id);
2862                                                         }
2863     break;
2864 case 95:
2865 #line 1412 "parse.y"
2866 {
2867                         yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
2868                         g_free(yyvsp[-1].id);
2869                                                         }
2870     break;
2871 case 96:
2872 #line 1416 "parse.y"
2873 {
2874                         yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
2875                         g_free(yyvsp[0].id);
2876                                                         }
2877     break;
2878 case 97:
2879 #line 1420 "parse.y"
2880 {
2881                         yyval.id = g_strconcat("const ", yyvsp[-1].id, " ",
2882                                              yyvsp[0].id, NULL);
2883                         g_free(yyvsp[0].id);
2884                                                         }
2885     break;
2886 case 98:
2887 #line 1425 "parse.y"
2888 {
2889                         yyval.id = g_strconcat(yyvsp[-2].id, " ",
2890                                              yyvsp[-1].id, " const", NULL);
2891                         g_free(yyvsp[-1].id);
2892                                                         }
2893     break;
2894 case 99:
2895 #line 1433 "parse.y"
2896 {
2897                         yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
2898                         g_free(yyvsp[0].id);
2899                                                         }
2900     break;
2901 case 100:
2902 #line 1437 "parse.y"
2903 {
2904                         yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
2905                         g_free(yyvsp[-1].id);
2906                         g_free(yyvsp[0].id);
2907                                                         }
2908     break;
2909 case 101:
2910 #line 1442 "parse.y"
2911 {
2912                         yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
2913                         g_free(yyvsp[0].id);
2914                                                         }
2915     break;
2916 case 102:
2917 #line 1446 "parse.y"
2918 {
2919                         yyval.id = yyvsp[0].id;
2920                                                         }
2921     break;
2922 case 103:
2923 #line 1449 "parse.y"
2924 {
2925                         yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
2926                         g_free(yyvsp[-1].id);
2927                                                         }
2928     break;
2929 case 104:
2930 #line 1453 "parse.y"
2931 {
2932                         yyval.id = g_strdup(yyvsp[0].id);
2933                                                         }
2934     break;
2935 case 105:
2936 #line 1456 "parse.y"
2937 {
2938                         yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
2939                                                         }
2940     break;
2941 case 106:
2942 #line 1461 "parse.y"
2943 { yyval.id = "void"; }
2944     break;
2945 case 107:
2946 #line 1462 "parse.y"
2947 { yyval.id = "char"; }
2948     break;
2949 case 108:
2950 #line 1463 "parse.y"
2951 { yyval.id = "short"; }
2952     break;
2953 case 109:
2954 #line 1464 "parse.y"
2955 { yyval.id = "int"; }
2956     break;
2957 case 110:
2958 #line 1465 "parse.y"
2959 { yyval.id = "long"; }
2960     break;
2961 case 111:
2962 #line 1466 "parse.y"
2963 { yyval.id = "float"; }
2964     break;
2965 case 112:
2966 #line 1467 "parse.y"
2967 { yyval.id = "double"; }
2968     break;
2969 case 113:
2970 #line 1468 "parse.y"
2971 { yyval.id = "signed"; }
2972     break;
2973 case 114:
2974 #line 1469 "parse.y"
2975 { yyval.id = "unsigned"; }
2976     break;
2977 case 115:
2978 #line 1472 "parse.y"
2979 { yyval.id = "struct"; }
2980     break;
2981 case 116:
2982 #line 1473 "parse.y"
2983 { yyval.id = "union"; }
2984     break;
2985 case 117:
2986 #line 1474 "parse.y"
2987 { yyval.id = "enum"; }
2988     break;
2989 case 118:
2990 #line 1477 "parse.y"
2991 { yyval.id = g_strdup("*"); }
2992     break;
2993 case 119:
2994 #line 1478 "parse.y"
2995 { yyval.id = g_strdup("* const"); }
2996     break;
2997 case 120:
2998 #line 1479 "parse.y"
2999 {
3000                                 yyval.id = g_strconcat("*", yyvsp[0].id, NULL);
3001                                 g_free(yyvsp[0].id);
3002                                         }
3003     break;
3004 case 121:
3005 #line 1483 "parse.y"
3006 {
3007                                 yyval.id = g_strconcat("* const", yyvsp[0].id, NULL);
3008                                 g_free(yyvsp[0].id);
3009                                         }
3010     break;
3011 case 122:
3012 #line 1490 "parse.y"
3013 {
3014                         if(strcmp(yyvsp[-1].id, "first")==0)
3015                                 yyval.sigtype = SIGNAL_FIRST_METHOD;
3016                         else if(strcmp(yyvsp[-1].id, "last")==0)
3017                                 yyval.sigtype = SIGNAL_LAST_METHOD;
3018                         else {
3019                                 yyerror(_("signal must be 'first' or 'last'"));
3020                                 g_free(yyvsp[-1].id);
3021                                 YYERROR;
3022                         }
3023                         g_free(yyvsp[-1].id);
3024                                         }
3025     break;
3026 case 123:
3027 #line 1502 "parse.y"
3028 {
3029                         yyval.sigtype = SIGNAL_LAST_METHOD;
3030                                         }
3031     break;
3032 case 124:
3033 #line 1508 "parse.y"
3034 {
3035                         if(strcmp(yyvsp[-1].id,"first")==0)
3036                                 yyval.sigtype = SIGNAL_FIRST_METHOD;
3037                         else if(strcmp(yyvsp[-1].id,"last")==0)
3038                                 yyval.sigtype = SIGNAL_LAST_METHOD;
3039                         else {
3040                                 yyerror(_("signal must be 'first' or 'last'"));
3041                                 g_free(yyvsp[-1].id);
3042                                 YYERROR;
3043                         }
3044                         g_free(yyvsp[-1].id);
3045                                         }
3046     break;
3047 case 125:
3048 #line 1520 "parse.y"
3049 {
3050                         if(strcmp(yyvsp[-2].id,"first")==0)
3051                                 yyval.sigtype = SIGNAL_FIRST_METHOD;
3052                         else if(strcmp(yyvsp[-2].id,"last")==0)
3053                                 yyval.sigtype = SIGNAL_LAST_METHOD;
3054                         else {
3055                                 yyerror(_("signal must be 'first' or 'last'"));
3056                                 g_free(yyvsp[-2].id);
3057                                 YYERROR;
3058                         }
3059                         g_free(yyvsp[-2].id);
3060                                         }
3061     break;
3062 case 126:
3063 #line 1532 "parse.y"
3064 {
3065                         yyval.sigtype = SIGNAL_LAST_METHOD;
3066                                         }
3067     break;
3068 case 127:
3069 #line 1535 "parse.y"
3070 {
3071                         /* the_scope was default thus public */
3072                         the_scope = PUBLIC_SCOPE;
3073                                         }
3074     break;
3075 case 128:
3076 #line 1541 "parse.y"
3077 {
3078                         gtktypes = g_list_prepend(gtktypes, debool (yyvsp[-3].id));
3079                                                 }
3080     break;
3081 case 129:
3082 #line 1546 "parse.y"
3083 {
3084                         gtktypes = g_list_append(gtktypes, debool (yyvsp[0].id));
3085                                                 }
3086     break;
3087 case 130:
3088 #line 1549 "parse.y"
3089
3090                         gtktypes = g_list_append(gtktypes, debool (yyvsp[0].id));
3091                                                 }
3092     break;
3093 case 131:
3094 #line 1554 "parse.y"
3095 { yyval.cbuf = yyvsp[0].cbuf; }
3096     break;
3097 case 132:
3098 #line 1555 "parse.y"
3099 { yyval.cbuf = NULL; }
3100     break;
3101 case 133:
3102 #line 1559 "parse.y"
3103 {
3104                         if(!has_self) {
3105                                 yyerror(_("signal without 'self' as "
3106                                           "first parameter"));
3107                                 free_all_global_state();
3108                                 YYERROR;
3109                         }
3110                         if(the_scope == CLASS_SCOPE) {
3111                                 yyerror(_("a method cannot be of class scope"));
3112                                 free_all_global_state();
3113                                 YYERROR;
3114                         }
3115                         push_function(the_scope, yyvsp[-7].sigtype,NULL,
3116                                       yyvsp[-5].id, yyvsp[0].cbuf,yyvsp[-9].line,
3117                                       ccode_line, vararg, yyvsp[-8].list);
3118                                                                         }
3119     break;
3120 case 134:
3121 #line 1575 "parse.y"
3122 {
3123                         if(!has_self) {
3124                                 yyerror(_("signal without 'self' as "
3125                                           "first parameter"));
3126                                 free_all_global_state();
3127                                 YYERROR;
3128                         }
3129                         if(the_scope == CLASS_SCOPE) {
3130                                 yyerror(_("a method cannot be of class scope"));
3131                                 free_all_global_state();
3132                                 YYERROR;
3133                         }
3134                         push_function(the_scope, yyvsp[-7].sigtype, NULL,
3135                                       yyvsp[-5].id, yyvsp[0].cbuf, yyvsp[-9].line,
3136                                       ccode_line, vararg, yyvsp[-8].list);
3137                                                                         }
3138     break;
3139 case 135:
3140 #line 1591 "parse.y"
3141 {
3142                         if(!has_self) {
3143                                 yyerror(_("virtual method without 'self' as "
3144                                           "first parameter"));
3145                                 free_all_global_state();
3146                                 YYERROR;
3147                         }
3148                         if(the_scope == CLASS_SCOPE) {
3149                                 yyerror(_("a method cannot be of class scope"));
3150                                 free_all_global_state();
3151                                 YYERROR;
3152                         }
3153                         push_function(the_scope, VIRTUAL_METHOD, NULL, yyvsp[-5].id,
3154                                       yyvsp[0].cbuf, yyvsp[-8].line,
3155                                       ccode_line, vararg, NULL);
3156                                                                         }
3157     break;
3158 case 136:
3159 #line 1607 "parse.y"
3160 {
3161                         if(!has_self) {
3162                                 yyerror(_("virtual method without 'self' as "
3163                                           "first parameter"));
3164                                 free_all_global_state();
3165                                 YYERROR;
3166                         }
3167                         if(the_scope == CLASS_SCOPE) {
3168                                 yyerror(_("a method cannot be of class scope"));
3169                                 free_all_global_state();
3170                                 YYERROR;
3171                         }
3172                         push_function(the_scope, VIRTUAL_METHOD, NULL, yyvsp[-5].id,
3173                                       yyvsp[0].cbuf, yyvsp[-7].line,
3174                                       ccode_line, vararg, NULL);
3175                                                                         }
3176     break;
3177 case 137:
3178 #line 1623 "parse.y"
3179 {
3180                         if(!has_self) {
3181                                 yyerror(_("virtual method without 'self' as "
3182                                           "first parameter"));
3183                                 free_all_global_state();
3184                                 YYERROR;
3185                         }
3186                         push_function(PUBLIC_SCOPE, VIRTUAL_METHOD, NULL,
3187                                       yyvsp[-5].id, yyvsp[0].cbuf, yyvsp[-7].line,
3188                                       ccode_line, vararg, NULL);
3189                                                                         }
3190     break;
3191 case 138:
3192 #line 1634 "parse.y"
3193 {
3194                         push_function(NO_SCOPE, OVERRIDE_METHOD, yyvsp[-8].id,
3195                                       yyvsp[-5].id, yyvsp[0].cbuf,
3196                                       yyvsp[-10].line, ccode_line,
3197                                       vararg, NULL);
3198                                                                         }
3199     break;
3200 case 139:
3201 #line 1640 "parse.y"
3202 {
3203                         if(the_scope == CLASS_SCOPE) {
3204                                 yyerror(_("a method cannot be of class scope"));
3205                                 free_all_global_state();
3206                                 YYERROR;
3207                         }
3208                         push_function(the_scope, REGULAR_METHOD, NULL, yyvsp[-5].id,
3209                                       yyvsp[0].cbuf, yyvsp[-7].line, ccode_line,
3210                                       vararg, NULL);
3211                                                                 }
3212     break;
3213 case 140:
3214 #line 1650 "parse.y"
3215 {
3216                         if(strcmp(yyvsp[-4].id, "init")==0) {
3217                                 push_init_arg(yyvsp[-2].id,FALSE);
3218                                 push_function(NO_SCOPE, INIT_METHOD, NULL,
3219                                               yyvsp[-4].id, yyvsp[0].cbuf, yyvsp[-3].line,
3220                                               ccode_line, FALSE, NULL);
3221                         } else if(strcmp(yyvsp[-4].id, "class_init")==0) {
3222                                 push_init_arg(yyvsp[-2].id,TRUE);
3223                                 push_function(NO_SCOPE, CLASS_INIT_METHOD, NULL,
3224                                               yyvsp[-4].id, yyvsp[0].cbuf, yyvsp[-3].line,
3225                                               ccode_line, FALSE, NULL);
3226                         } else {
3227                                 g_free(yyvsp[-4].id);
3228                                 g_free(yyvsp[-2].id);
3229                                 g_string_free(yyvsp[0].cbuf,TRUE);
3230                                 yyerror(_("parse error "
3231                                           "(untyped blocks must be init or "
3232                                           "class_init)"));
3233                                 YYERROR;
3234                         }
3235                                                 }
3236     break;
3237 case 141:
3238 #line 1673 "parse.y"
3239 {
3240                         g_free(onerror); onerror = NULL;
3241                         g_free(defreturn); defreturn = NULL;
3242                         if(!set_return_value(yyvsp[-1].id, yyvsp[0].id)) {
3243                                 g_free(yyvsp[-1].id);
3244                                 g_free(yyvsp[0].id);
3245                                 yyerror(_("parse error"));
3246                                 YYERROR;
3247                         }
3248                         g_free(yyvsp[-1].id);
3249                                         }
3250     break;
3251 case 142:
3252 #line 1684 "parse.y"
3253 {
3254                         g_free(onerror); onerror = NULL;
3255                         g_free(defreturn); defreturn = NULL;
3256                         if(!set_return_value(yyvsp[-3].id, yyvsp[-2].id)) {
3257                                 g_free(yyvsp[-3].id); g_free(yyvsp[-2].id);
3258                                 g_free(yyvsp[-1].id); g_free(yyvsp[0].id);
3259                                 yyerror(_("parse error"));
3260                                 YYERROR;
3261                         }
3262                         if(!set_return_value(yyvsp[-1].id, yyvsp[0].id)) {
3263                                 onerror = defreturn = NULL;
3264                                 g_free(yyvsp[-3].id); g_free(yyvsp[-2].id);
3265                                 g_free(yyvsp[-1].id); g_free(yyvsp[0].id);
3266                                 yyerror(_("parse error"));
3267                                 YYERROR;
3268                         }
3269                         g_free(yyvsp[-3].id);
3270                         g_free(yyvsp[-1].id);
3271                                                 }
3272     break;
3273 case 143:
3274 #line 1703 "parse.y"
3275 {
3276                         g_free(onerror); onerror = NULL;
3277                         g_free(defreturn); defreturn = NULL;
3278                                         }
3279     break;
3280 case 144:
3281 #line 1709 "parse.y"
3282 { yyval.id = yyvsp[0].id; }
3283     break;
3284 case 145:
3285 #line 1710 "parse.y"
3286 {
3287                         yyval.id = (yyvsp[0].cbuf)->str;
3288                         g_string_free(yyvsp[0].cbuf, FALSE);
3289                                         }
3290     break;
3291 case 146:
3292 #line 1716 "parse.y"
3293 { vararg = FALSE; has_self = FALSE; }
3294     break;
3295 case 147:
3296 #line 1717 "parse.y"
3297 {
3298                         vararg = FALSE;
3299                         has_self = TRUE;
3300                         if(strcmp(yyvsp[0].id,"self")==0)
3301                                 push_self(yyvsp[0].id, FALSE);
3302                         else {
3303                                 g_free(yyvsp[0].id);
3304                                 yyerror(_("parse error"));
3305                                 YYERROR;
3306                         }
3307                                         }
3308     break;
3309 case 148:
3310 #line 1728 "parse.y"
3311 {
3312                         vararg = FALSE;
3313                         has_self = TRUE;
3314                         if(strcmp(yyvsp[-1].id,"self")==0)
3315                                 push_self(yyvsp[-1].id, TRUE);
3316                         else {
3317                                 g_free(yyvsp[-1].id);
3318                                 yyerror(_("parse error"));
3319                                 YYERROR;
3320                         }
3321                                         }
3322     break;
3323 case 149:
3324 #line 1739 "parse.y"
3325 {
3326                         vararg = FALSE;
3327                         has_self = TRUE;
3328                         if(strcmp(yyvsp[0].id,"self")==0)
3329                                 push_self(yyvsp[0].id, TRUE);
3330                         else {
3331                                 g_free(yyvsp[0].id);
3332                                 yyerror(_("parse error"));
3333                                 YYERROR;
3334                         }
3335                                         }
3336     break;
3337 case 150:
3338 #line 1750 "parse.y"
3339 {
3340                         has_self = TRUE;
3341                         if(strcmp(yyvsp[-2].id,"self")==0)
3342                                 push_self(yyvsp[-2].id, FALSE);
3343                         else {
3344                                 g_free(yyvsp[-2].id);
3345                                 yyerror(_("parse error"));
3346                                 YYERROR;
3347                         }
3348                                         }
3349     break;
3350 case 151:
3351 #line 1760 "parse.y"
3352 {
3353                         has_self = TRUE;
3354                         if(strcmp(yyvsp[-3].id,"self")==0)
3355                                 push_self(yyvsp[-3].id, TRUE);
3356                         else {
3357                                 g_free(yyvsp[-3].id);
3358                                 yyerror(_("parse error"));
3359                                 YYERROR;
3360                         }
3361                                         }
3362     break;
3363 case 152:
3364 #line 1770 "parse.y"
3365 {
3366                         has_self = TRUE;
3367                         if(strcmp(yyvsp[-2].id,"self")==0)
3368                                 push_self(yyvsp[-2].id, TRUE);
3369                         else {
3370                                 g_free(yyvsp[-2].id);
3371                                 yyerror(_("parse error"));
3372                                 YYERROR;
3373                         }
3374                                         }
3375     break;
3376 case 153:
3377 #line 1780 "parse.y"
3378 { has_self = FALSE; }
3379     break;
3380 case 154:
3381 #line 1783 "parse.y"
3382 { vararg = TRUE; }
3383     break;
3384 case 155:
3385 #line 1784 "parse.y"
3386 { vararg = FALSE; }
3387     break;
3388 case 156:
3389 #line 1787 "parse.y"
3390 { ; }
3391     break;
3392 case 157:
3393 #line 1788 "parse.y"
3394 { ; }
3395     break;
3396 case 158:
3397 #line 1791 "parse.y"
3398 {
3399                         push_funcarg(yyvsp[0].id,NULL);
3400                                                                 }
3401     break;
3402 case 159:
3403 #line 1794 "parse.y"
3404 {
3405                         push_funcarg(yyvsp[-1].id,yyvsp[0].id);
3406                                                                 }
3407     break;
3408 case 160:
3409 #line 1797 "parse.y"
3410 {
3411                         if(strcmp(yyvsp[-2].id,"check")!=0) {
3412                                 yyerror(_("parse error"));
3413                                 YYERROR;
3414                         }
3415                         g_free(yyvsp[-2].id);
3416                         push_funcarg(yyvsp[-4].id,NULL);
3417                                                                 }
3418     break;
3419 case 161:
3420 #line 1805 "parse.y"
3421 {
3422                         if(strcmp(yyvsp[-2].id,"check")!=0) {
3423                                 yyerror(_("parse error"));
3424                                 YYERROR;
3425                         }
3426                         g_free(yyvsp[-2].id);
3427                         push_funcarg(yyvsp[-5].id,yyvsp[-4].id);
3428                                                                 }
3429     break;
3430 case 162:
3431 #line 1815 "parse.y"
3432 { ; }
3433     break;
3434 case 163:
3435 #line 1816 "parse.y"
3436 { ; }
3437     break;
3438 case 164:
3439 #line 1819 "parse.y"
3440 {
3441                         if(strcmp(yyvsp[0].id,"type")==0) {
3442                                 Node *node = node_new (CHECK_NODE,
3443                                                        "chtype", TYPE_CHECK,
3444                                                        NULL);
3445                                 checks = g_list_append(checks,node);
3446                         } else if(strcmp(yyvsp[0].id,"null")==0) {
3447                                 Node *node = node_new (CHECK_NODE,
3448                                                        "chtype", NULL_CHECK,
3449                                                        NULL);
3450                                 checks = g_list_append(checks,node);
3451                         } else {
3452                                 yyerror(_("parse error"));
3453                                 YYERROR;
3454                         }
3455                         g_free(yyvsp[0].id);
3456                                         }
3457     break;
3458 case 165:
3459 #line 1836 "parse.y"
3460 {
3461                         Node *node = node_new (CHECK_NODE,
3462                                                "chtype", GT_CHECK,
3463                                                "number:steal", yyvsp[0].id,
3464                                                NULL);
3465                         checks = g_list_append(checks,node);
3466                                         }
3467     break;
3468 case 166:
3469 #line 1843 "parse.y"
3470 {
3471                         Node *node = node_new (CHECK_NODE,
3472                                                "chtype", LT_CHECK,
3473                                                "number:steal", yyvsp[0].id,
3474                                                NULL);
3475                         checks = g_list_append(checks,node);
3476                                         }
3477     break;
3478 case 167:
3479 #line 1850 "parse.y"
3480 {
3481                         Node *node = node_new (CHECK_NODE,
3482                                                "chtype", GE_CHECK,
3483                                                "number:steal", yyvsp[0].id,
3484                                                NULL);
3485                         checks = g_list_append(checks,node);
3486                                         }
3487     break;
3488 case 168:
3489 #line 1857 "parse.y"
3490 {
3491                         Node *node = node_new (CHECK_NODE,
3492                                                "chtype", LE_CHECK,
3493                                                "number:steal", yyvsp[0].id,
3494                                                NULL);
3495                         checks = g_list_append(checks,node);
3496                                         }
3497     break;
3498 case 169:
3499 #line 1864 "parse.y"
3500 {
3501                         Node *node = node_new (CHECK_NODE,
3502                                                "chtype", EQ_CHECK,
3503                                                "number:steal", yyvsp[0].id,
3504                                                NULL);
3505                         checks = g_list_append(checks,node);
3506                                         }
3507     break;
3508 case 170:
3509 #line 1871 "parse.y"
3510 {
3511                         Node *node = node_new (CHECK_NODE,
3512                                                "chtype", NE_CHECK,
3513                                                "number:steal", yyvsp[0].id,
3514                                                NULL);
3515                         checks = g_list_append(checks,node);
3516                                         }
3517     break;
3518 case 171:
3519 #line 1880 "parse.y"
3520 {
3521                         Node *node = node_new (ENUMDEF_NODE,
3522                                                "etype:steal", yyvsp[-1].id,
3523                                                "prefix:steal", yyvsp[-5].id,
3524                                                "values:steal", enum_vals,
3525                                                NULL);
3526                         enum_vals = NULL;
3527                         nodes = g_list_append (nodes, node);
3528                         }
3529     break;
3530 case 172:
3531 #line 1889 "parse.y"
3532 {
3533                         Node *node = node_new (ENUMDEF_NODE,
3534                                                "etype:steal", yyvsp[-1].id,
3535                                                "prefix:steal", yyvsp[-6].id,
3536                                                "values:steal", enum_vals,
3537                                                NULL);
3538                         enum_vals = NULL;
3539                         nodes = g_list_append (nodes, node);
3540                         }
3541     break;
3542 case 173:
3543 #line 1900 "parse.y"
3544 {;}
3545     break;
3546 case 174:
3547 #line 1901 "parse.y"
3548 {;}
3549     break;
3550 case 175:
3551 #line 1904 "parse.y"
3552 {
3553                         Node *node;
3554                         char *num = yyvsp[0].id;
3555
3556                         /* A float value, that's a bad enum */
3557                         if (num[0] >= '0' &&
3558                             num[0] <= '9' &&
3559                             strchr (num, '.') != NULL) {
3560                                 g_free (yyvsp[-2].id);
3561                                 g_free (num);
3562                                 yyerror(_("parse error (enumerator value not integer constant)"));
3563                                 YYERROR;
3564                         }
3565                        
3566                         node = node_new (ENUMVALUE_NODE,
3567                                          "name:steal", yyvsp[-2].id,
3568                                          "value:steal", num,
3569                                          NULL);
3570                         enum_vals = g_list_append (enum_vals, node);
3571                         }
3572     break;
3573 case 176:
3574 #line 1924 "parse.y"
3575 {
3576                         Node *node;
3577
3578                         node = node_new (ENUMVALUE_NODE,
3579                                          "name:steal", yyvsp[0].id,
3580                                          NULL);
3581                         enum_vals = g_list_append (enum_vals, node);
3582         }
3583     break;
3584 case 177:
3585 #line 1934 "parse.y"
3586 {
3587                         Node *node = node_new (FLAGS_NODE,
3588                                                "ftype:steal", yyvsp[-1].id,
3589                                                "prefix:steal", yyvsp[-5].id,
3590                                                "values:steal", flag_vals,
3591                                                NULL);
3592                         flag_vals = NULL;
3593                         nodes = g_list_append (nodes, node);
3594                         }
3595     break;
3596 case 178:
3597 #line 1943 "parse.y"
3598 {
3599                         Node *node = node_new (FLAGS_NODE,
3600                                                "ftype:steal", yyvsp[-1].id,
3601                                                "prefix:steal", yyvsp[-6].id,
3602                                                "values:steal", flag_vals,
3603                                                NULL);
3604                         flag_vals = NULL;
3605                         nodes = g_list_append (nodes, node);
3606                         }
3607     break;
3608 case 179:
3609 #line 1954 "parse.y"
3610 {
3611                         flag_vals = g_list_append (flag_vals, yyvsp[0].id);
3612                 }
3613     break;
3614 case 180:
3615 #line 1957 "parse.y"
3616 {
3617                         flag_vals = g_list_append (flag_vals, yyvsp[0].id);
3618                 }
3619     break;
3620 case 181:
3621 #line 1962 "parse.y"
3622 {
3623                         Node *node = node_new (ERROR_NODE,
3624                                                "etype:steal", yyvsp[-1].id,
3625                                                "prefix:steal", yyvsp[-5].id,
3626                                                "values:steal", error_vals,
3627                                                NULL);
3628                         error_vals = NULL;
3629                         nodes = g_list_append (nodes, node);
3630                         }
3631     break;
3632 case 182:
3633 #line 1971 "parse.y"
3634 {
3635                         Node *node = node_new (ERROR_NODE,
3636                                                "etype:steal", yyvsp[-1].id,
3637                                                "prefix:steal", yyvsp[-6].id,
3638                                                "values:steal", error_vals,
3639                                                NULL);
3640                         error_vals = NULL;
3641                         nodes = g_list_append (nodes, node);
3642                         }
3643     break;
3644 case 183:
3645 #line 1982 "parse.y"
3646 {
3647                         error_vals = g_list_append (error_vals, yyvsp[0].id);
3648                 }
3649     break;
3650 case 184:
3651 #line 1985 "parse.y"
3652 {
3653                         error_vals = g_list_append (error_vals, yyvsp[0].id);
3654                 }
3655     break;
3656 case 185:
3657 #line 1991 "parse.y"
3658 { yyval.id = yyvsp[0].id; }
3659     break;
3660 case 186:
3661 #line 1992 "parse.y"
3662 {
3663                         yyval.id = g_strconcat("-",yyvsp[0].id,NULL);
3664                         g_free(yyvsp[0].id);
3665                                         }
3666     break;
3667 case 187:
3668 #line 1996 "parse.y"
3669 { yyval.id = yyvsp[0].id; }
3670     break;
3671 case 188:
3672 #line 1997 "parse.y"
3673 { yyval.id = yyvsp[0].id; }
3674     break;
3675 }
3676
3677 #line 705 "/usr/share/bison/bison.simple"
3678
3679 \f
3680   yyvsp -= yylen;
3681   yyssp -= yylen;
3682 #if YYLSP_NEEDED
3683   yylsp -= yylen;
3684 #endif
3685
3686 #if YYDEBUG
3687   if (yydebug)
3688     {
3689       short *yyssp1 = yyss - 1;
3690       YYFPRINTF (stderr, "state stack now");
3691       while (yyssp1 != yyssp)
3692         YYFPRINTF (stderr, " %d", *++yyssp1);
3693       YYFPRINTF (stderr, "\n");
3694     }
3695 #endif
3696
3697   *++yyvsp = yyval;
3698 #if YYLSP_NEEDED
3699   *++yylsp = yyloc;
3700 #endif
3701
3702   /* Now `shift' the result of the reduction.  Determine what state
3703      that goes to, based on the state we popped back to and the rule
3704      number reduced by.  */
3705
3706   yyn = yyr1[yyn];
3707
3708   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
3709   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3710     yystate = yytable[yystate];
3711   else
3712     yystate = yydefgoto[yyn - YYNTBASE];
3713
3714   goto yynewstate;
3715
3716
3717 /*------------------------------------.
3718 | yyerrlab -- here on detecting error |
3719 `------------------------------------*/
3720 yyerrlab:
3721   /* If not already recovering from an error, report this error.  */
3722   if (!yyerrstatus)
3723     {
3724       ++yynerrs;
3725
3726 #ifdef YYERROR_VERBOSE
3727       yyn = yypact[yystate];
3728
3729       if (yyn > YYFLAG && yyn < YYLAST)
3730         {
3731           YYSIZE_T yysize = 0;
3732           char *yymsg;
3733           int yyx, yycount;
3734
3735           yycount = 0;
3736           /* Start YYX at -YYN if negative to avoid negative indexes in
3737              YYCHECK.  */
3738           for (yyx = yyn < 0 ? -yyn : 0;
3739                yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
3740             if (yycheck[yyx + yyn] == yyx)
3741               yysize += yystrlen (yytname[yyx]) + 15, yycount++;
3742           yysize += yystrlen ("parse error, unexpected ") + 1;
3743           yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
3744           yymsg = (char *) YYSTACK_ALLOC (yysize);
3745           if (yymsg != 0)
3746             {
3747               char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
3748               yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
3749
3750               if (yycount < 5)
3751                 {
3752                   yycount = 0;
3753                   for (yyx = yyn < 0 ? -yyn : 0;
3754                        yyx < (int) (sizeof (yytname) / sizeof (char *));
3755                        yyx++)
3756                     if (yycheck[yyx + yyn] == yyx)
3757                       {
3758                         const char *yyq = ! yycount ? ", expecting " : " or ";
3759                         yyp = yystpcpy (yyp, yyq);
3760                         yyp = yystpcpy (yyp, yytname[yyx]);
3761                         yycount++;
3762                       }
3763                 }
3764               yyerror (yymsg);
3765               YYSTACK_FREE (yymsg);
3766             }
3767           else
3768             yyerror ("parse error; also virtual memory exhausted");
3769         }
3770       else
3771 #endif /* defined (YYERROR_VERBOSE) */
3772         yyerror ("parse error");
3773     }
3774   goto yyerrlab1;
3775
3776
3777 /*--------------------------------------------------.
3778 | yyerrlab1 -- error raised explicitly by an action |
3779 `--------------------------------------------------*/
3780 yyerrlab1:
3781   if (yyerrstatus == 3)
3782     {
3783       /* If just tried and failed to reuse lookahead token after an
3784          error, discard it.  */
3785
3786       /* return failure if at end of input */
3787       if (yychar == YYEOF)
3788         YYABORT;
3789       YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
3790                   yychar, yytname[yychar1]));
3791       yychar = YYEMPTY;
3792     }
3793
3794   /* Else will try to reuse lookahead token after shifting the error
3795      token.  */
3796
3797   yyerrstatus = 3;              /* Each real token shifted decrements this */
3798
3799   goto yyerrhandle;
3800
3801
3802 /*-------------------------------------------------------------------.
3803 | yyerrdefault -- current state does not do anything special for the |
3804 | error token.                                                       |
3805 `-------------------------------------------------------------------*/
3806 yyerrdefault:
3807 #if 0
3808   /* This is wrong; only states that explicitly want error tokens
3809      should shift them.  */
3810
3811   /* If its default is to accept any token, ok.  Otherwise pop it.  */
3812   yyn = yydefact[yystate];
3813   if (yyn)
3814     goto yydefault;
3815 #endif
3816
3817
3818 /*---------------------------------------------------------------.
3819 | yyerrpop -- pop the current state because it cannot handle the |
3820 | error token                                                    |
3821 `---------------------------------------------------------------*/
3822 yyerrpop:
3823   if (yyssp == yyss)
3824     YYABORT;
3825   yyvsp--;
3826   yystate = *--yyssp;
3827 #if YYLSP_NEEDED
3828   yylsp--;
3829 #endif
3830
3831 #if YYDEBUG
3832   if (yydebug)
3833     {
3834       short *yyssp1 = yyss - 1;
3835       YYFPRINTF (stderr, "Error: state stack now");
3836       while (yyssp1 != yyssp)
3837         YYFPRINTF (stderr, " %d", *++yyssp1);
3838       YYFPRINTF (stderr, "\n");
3839     }
3840 #endif
3841
3842 /*--------------.
3843 | yyerrhandle.  |
3844 `--------------*/
3845 yyerrhandle:
3846   yyn = yypact[yystate];
3847   if (yyn == YYFLAG)
3848     goto yyerrdefault;
3849
3850   yyn += YYTERROR;
3851   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
3852     goto yyerrdefault;
3853
3854   yyn = yytable[yyn];
3855   if (yyn < 0)
3856     {
3857       if (yyn == YYFLAG)
3858         goto yyerrpop;
3859       yyn = -yyn;
3860       goto yyreduce;
3861     }
3862   else if (yyn == 0)
3863     goto yyerrpop;
3864
3865   if (yyn == YYFINAL)
3866     YYACCEPT;
3867
3868   YYDPRINTF ((stderr, "Shifting error token, "));
3869
3870   *++yyvsp = yylval;
3871 #if YYLSP_NEEDED
3872   *++yylsp = yylloc;
3873 #endif
3874
3875   yystate = yyn;
3876   goto yynewstate;
3877
3878
3879 /*-------------------------------------.
3880 | yyacceptlab -- YYACCEPT comes here.  |
3881 `-------------------------------------*/
3882 yyacceptlab:
3883   yyresult = 0;
3884   goto yyreturn;
3885
3886 /*-----------------------------------.
3887 | yyabortlab -- YYABORT comes here.  |
3888 `-----------------------------------*/
3889 yyabortlab:
3890   yyresult = 1;
3891   goto yyreturn;
3892
3893 /*---------------------------------------------.
3894 | yyoverflowab -- parser overflow comes here.  |
3895 `---------------------------------------------*/
3896 yyoverflowlab:
3897   yyerror ("parser stack overflow");
3898   yyresult = 2;
3899   /* Fall through.  */
3900
3901 yyreturn:
3902 #ifndef yyoverflow
3903   if (yyss != yyssa)
3904     YYSTACK_FREE (yyss);
3905 #endif
3906   return yyresult;
3907 }
3908 #line 2000 "parse.y"
3909