]> git.draconx.ca Git - gob-dx.git/blob - src/parse.c
2d9d349764940ea75ec4f6ff6faf259d4b98c7a2
[gob-dx.git] / src / parse.c
1
2 /*  A Bison parser, made from parse.y
3     by GNU Bison version 1.28  */
4
5 #define YYBISON 1  /* Identify Bison output.  */
6
7 #define CLASS   257
8 #define FROM    258
9 #define CONST   259
10 #define VOID    260
11 #define STRUCT  261
12 #define UNION   262
13 #define ENUM    263
14 #define THREEDOTS       264
15 #define SIGNED  265
16 #define UNSIGNED        266
17 #define LONG    267
18 #define SHORT   268
19 #define INT     269
20 #define FLOAT   270
21 #define DOUBLE  271
22 #define CHAR    272
23 #define TOKEN   273
24 #define NUMBER  274
25 #define TYPETOKEN       275
26 #define ARRAY_DIM       276
27 #define CCODE   277
28 #define HTCODE  278
29 #define PHCODE  279
30 #define HCODE   280
31 #define ACODE   281
32 #define ATCODE  282
33 #define PUBLIC  283
34 #define PRIVATE 284
35 #define PROTECTED       285
36 #define CLASSWIDE       286
37 #define ARGUMENT        287
38 #define VIRTUAL 288
39 #define SIGNAL  289
40 #define OVERRIDE        290
41
42 #line 21 "parse.y"
43
44
45 #include "config.h"
46 #include <glib.h>
47 #include <stdio.h>
48 #include <stdlib.h>
49 #include <string.h>
50
51 #include "treefuncs.h"
52 #include "main.h"
53 #include "util.h"
54
55 #define _(x) (x)
56         
57 GList *nodes = NULL;
58
59 static GList *class_nodes = NULL;
60 Node *class = NULL;
61
62 static char *chunk_size = NULL;
63 static char *bonobo_x_class = NULL;
64 static GList *typestack = NULL;
65 static GList *funcargs = NULL;
66 static GList *checks = NULL;
67 static int has_self = FALSE;
68 static int vararg = FALSE;
69 static Method *last_added_method = NULL;
70
71 /* destructor and initializer for variables */
72 static char *destructor = NULL;
73 static int destructor_line = 0;
74 static gboolean destructor_simple = TRUE;
75 static char *initializer = NULL;
76 static int initializer_line = 0;
77
78 static char *onerror = NULL;
79 static char *defreturn = NULL;
80
81 static GList *gtktypes = NULL;
82
83 /* this can be a global as we will only do one function at a time
84    anyway */
85 static int the_scope = NO_SCOPE;
86
87 void free(void *ptr);
88 int yylex(void);
89
90 extern int ccode_line;
91 extern int line_no;
92
93 extern char *yytext;
94
95 static void
96 yyerror(char *str)
97 {
98         char *out=NULL;
99         char *p;
100         
101         if(strcmp(yytext,"\n")==0) {
102                 out=g_strconcat("Error: ",str," before newline",NULL);
103         } else if(yytext[0]=='\0') {
104                 out=g_strconcat("Error: ", str, " at end of input", NULL);
105         } else {
106                 char *tmp = g_strdup(yytext);
107                 while((p=strchr(tmp, '\n')))
108                         *p='.';
109
110                 out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL);
111                 g_free(tmp);
112         }
113
114         fprintf(stderr, "%s:%d: %s\n", filename, line_no, out);
115         g_free(out);
116         
117         exit(1);
118 }
119
120 static Type *
121 pop_type(void)
122 {
123         Type *type = typestack->data;
124         typestack = g_list_remove(typestack,typestack->data);
125         return type;
126 }
127
128 static void
129 push_variable(char *name, int scope, int line_no, char *postfix)
130 {
131         Node *var;
132         Type *type = pop_type();
133
134         type->postfix = postfix;
135         
136         var = new_variable(scope, type, name, line_no,
137                            destructor, destructor_line,
138                            destructor_simple,
139                            initializer, initializer_line);
140         class_nodes = g_list_append(class_nodes, var);
141 }
142
143 static void
144 push_function(int scope, int method, char *oid, char *id,
145               GString *cbuf, int line_no, int ccode_line,
146               gboolean vararg, GList *flags)
147 {
148         Node *node;
149         Type *type;
150         char *c_cbuf;
151
152         g_assert(scope != CLASS_SCOPE);
153        
154         if(method == INIT_METHOD || method == CLASS_INIT_METHOD) {
155                 type = (Type *)new_type(g_strdup("void"), NULL, NULL);
156         } else {
157                 type = pop_type();
158         }
159         
160         /* a complicated and ugly test to figure out if we have
161            the wrong number of types for a signal */
162         if((method == SIGNAL_FIRST_METHOD ||
163             method == SIGNAL_LAST_METHOD) &&
164            g_list_length(gtktypes) != g_list_length(funcargs) &&
165            !(g_list_length(funcargs) == 1 &&
166              g_list_length(gtktypes) == 2 &&
167              strcmp(gtktypes->next->data, "NONE")==0)) {
168                 error_print(GOB_WARN, line_no,
169                             _("The number of GTK arguments and "
170                               "function arguments for a signal "
171                               "don't seem to match"));
172         }
173         if(g_list_length(gtktypes) > 2) {
174                 GList *li;
175                 for(li = gtktypes->next; li; li = li->next) {
176                         if(strcmp(li->data, "NONE")==0) {
177                                 error_print(GOB_ERROR, line_no,
178                                             _("NONE can only appear in an "
179                                               "argument list by itself"));
180                         }
181                 }
182         }
183         if(cbuf) {
184                 char *p;
185                 c_cbuf = p = cbuf->str;
186                 while(p && *p && (*p==' ' || *p=='\t' || *p=='\n' || *p=='\r'))
187                         p++;
188                 if(!p || !*p)
189                         c_cbuf = NULL;
190         } else
191                 c_cbuf = NULL;
192
193         node = new_method(scope, method, type, oid, gtktypes, flags,
194                           id, funcargs, onerror, defreturn, c_cbuf, line_no,
195                           ccode_line, vararg, method_unique_id++,
196                           FALSE);
197
198         last_added_method = (Method *)node;
199
200         if(cbuf)
201                 g_string_free(cbuf,
202                               /*only free segment if we haven't passed it
203                                 above */
204                               c_cbuf?FALSE:TRUE);
205         gtktypes = NULL;
206         funcargs = NULL;
207
208         onerror = NULL;
209         defreturn = NULL;
210
211         class_nodes = g_list_append(class_nodes, node);
212 }
213
214 static void
215 free_all_global_state(void)
216 {
217         g_free(onerror);
218         onerror = NULL;
219         g_free(defreturn);
220         defreturn = NULL;
221
222         g_free(chunk_size);
223         chunk_size = NULL;
224         
225         g_list_foreach(gtktypes, (GFunc)g_free, NULL);
226         g_list_free(gtktypes);
227         gtktypes = NULL;
228
229         free_node_list(funcargs);
230         funcargs = NULL;
231 }
232
233 static void
234 push_funcarg(char *name, char *postfix)
235 {
236         Node *node;
237         Type *type = pop_type();
238
239         type->postfix = postfix;
240         
241         node = new_funcarg(type, name, checks);
242         checks = NULL;
243         
244         funcargs = g_list_append(funcargs, node);
245 }
246
247 static void
248 push_init_arg(char *name, int is_class)
249 {
250         Node *node;
251         Node *type;
252         char *tn;
253         
254         if(is_class)
255                 tn = g_strconcat(((Class *)class)->otype,":Class",NULL);
256         else
257                 tn = g_strdup(((Class *)class)->otype);
258
259         type = new_type(tn, g_strdup("*"), NULL);
260         node = new_funcarg((Type *)type,name,NULL);
261         funcargs = g_list_prepend(funcargs, node);
262 }
263
264 static void
265 push_self(char *id, gboolean constant)
266 {
267         Node *node;
268         Node *type;
269         GList *ch = NULL;
270         type = new_type(g_strdup(((Class *)class)->otype),
271                         g_strdup(constant ? "const *" : "*"), NULL);
272         ch = g_list_append(ch,new_check(NULL_CHECK,NULL));
273         ch = g_list_append(ch,new_check(TYPE_CHECK,NULL));
274         node = new_funcarg((Type *)type,id,ch);
275         funcargs = g_list_prepend(funcargs, node);
276 }
277
278 static Variable *
279 find_var_or_die(const char *id, int line)
280 {
281         GList *li;
282
283         for(li = class_nodes; li != NULL; li = li->next) {
284                 Variable *var;
285                 Node *node = li->data;
286                 if(node->type != VARIABLE_NODE)
287                         continue;
288                 var = li->data;
289                 if(strcmp(var->id, id)==0)
290                         return var;
291         }
292
293         error_printf(GOB_ERROR, line, _("Variable %s not defined here"), id);
294
295         g_assert_not_reached();
296         return NULL;
297 }
298
299 static gboolean
300 set_return_value(char *type, char *val)
301 {
302         if(strcmp(type, "onerror")==0) {
303                 if(!onerror) {
304                         onerror = val;
305                         return TRUE;
306                 } else
307                         return FALSE;
308         } else if(strcmp(type, "defreturn")==0) {
309                 if(!defreturn) {
310                         defreturn = val;
311                         return TRUE;
312                 } else
313                         return FALSE;
314         }
315         return FALSE;
316 }
317
318 static void
319 export_accessors (char *var_name,
320                   GString *get_cbuf,
321                   int get_lineno,
322                   GString *set_cbuf,
323                   int set_lineno,
324                   Type *type,
325                   int lineno)
326 {       
327         if (get_cbuf) {
328                 char *get_id = g_strdup_printf ("get_%s", var_name);
329                 GString *get_cbuf_copy = g_string_new (get_cbuf->str);
330                 char *tmp;
331                 Node *node1 = new_type (type->name, type->pointer, type->postfix);
332                 Node *node3 = new_type (class->class.otype, "*", NULL);
333
334                 tmp = g_strdup_printf ("\t%s%s ARG;\n", 
335                                        type->name, 
336                                        type->pointer ? type->pointer : "");
337                 get_cbuf_copy = g_string_prepend (get_cbuf_copy, tmp);
338                 g_free (tmp);
339                 
340                 tmp = g_strdup_printf ("\n\t\treturn ARG;\n");
341                 get_cbuf_copy = g_string_append (get_cbuf_copy, tmp);
342                 g_free (tmp);
343                 
344                 typestack = g_list_prepend (typestack, node1);
345                 typestack = g_list_prepend (typestack, node3);
346                 
347                 push_funcarg ("self", FALSE);
348                 
349                 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
350                                get_id, get_cbuf_copy, get_lineno,
351                                lineno, FALSE, NULL);
352         }
353         
354         if (set_cbuf) {
355                 char *set_id = g_strdup_printf ("set_%s", var_name);
356                 GString *set_cbuf_copy = g_string_new (set_cbuf->str);
357                 Node *node1 = new_type (type->name, type->pointer, type->postfix);
358                 Node *node2 = new_type ("void", NULL, NULL);
359                 Node *node3 = new_type (class->class.otype, "*", NULL);
360
361                 typestack = g_list_prepend (typestack, node2);
362                 typestack = g_list_prepend (typestack, node1);
363                 typestack = g_list_prepend (typestack, node3);
364                 
365                 push_funcarg ("self", FALSE);
366                 push_funcarg ("ARG", FALSE);
367         
368                 typestack = g_list_prepend (typestack, node2);
369                 push_function (PUBLIC_SCOPE, REGULAR_METHOD, NULL,
370                                set_id, set_cbuf_copy, set_lineno,
371                                lineno, FALSE, NULL);
372         }
373 }
374
375
376 #line 355 "parse.y"
377 typedef union {
378         char *id;
379         GString *cbuf;
380         GList *list;
381         int line;
382         int sigtype;
383 } YYSTYPE;
384 #ifndef YYDEBUG
385 #define YYDEBUG 1
386 #endif
387
388 #include <stdio.h>
389
390 #ifndef __cplusplus
391 #ifndef __STDC__
392 #define const
393 #endif
394 #endif
395
396
397
398 #define YYFINAL         274
399 #define YYFLAG          -32768
400 #define YYNTBASE        50
401
402 #define YYTRANSLATE(x) ((unsigned)(x) <= 290 ? yytranslate[x] : 89)
403
404 static const char yytranslate[] = {     0,
405      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
406      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
407      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
408      2,     2,    48,     2,     2,     2,     2,     2,     2,    39,
409     40,    44,     2,    45,    49,     2,     2,     2,     2,     2,
410      2,     2,     2,     2,     2,     2,     2,     2,    41,    47,
411     42,    46,     2,     2,     2,     2,     2,     2,     2,     2,
412      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
413      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
414      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
415      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
416      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
417      2,     2,    37,    43,    38,     2,     2,     2,     2,     2,
418      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
419      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
420      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
421      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
422      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
423      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
424      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
425      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
426      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
427      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
428      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
429      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
430      2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
431      7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
432     17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
433     27,    28,    29,    30,    31,    32,    33,    34,    35,    36
434 };
435
436 #if YYDEBUG != 0
437 static const short yyprhs[] = {     0,
438      0,     4,     7,    10,    12,    14,    16,    18,    20,    22,
439     24,    27,    29,    34,    38,    44,    45,    51,    57,    60,
440     62,    64,    67,    69,    71,    73,    75,    77,    79,    81,
441     84,    88,    91,    95,    98,   101,   103,   105,   106,   112,
442    119,   132,   142,   149,   153,   154,   160,   162,   166,   167,
443    171,   173,   176,   178,   180,   182,   185,   188,   191,   195,
444    199,   202,   205,   208,   210,   213,   215,   218,   220,   222,
445    224,   226,   228,   230,   232,   234,   236,   238,   240,   242,
446    244,   247,   250,   254,   257,   259,   263,   267,   270,   272,
447    277,   281,   283,   286,   288,   299,   311,   321,   331,   340,
448    352,   361,   367,   370,   375,   376,   378,   381,   383,   385,
449    388,   391,   395,   400,   405,   407,   411,   413,   417,   419,
450    422,   426,   433,   441,   444,   446,   448,   451,   454,   458,
451    462,   466,   470,   472,   475
452 };
453
454 static const short yyrhs[] = {    52,
455     53,    52,     0,    53,    52,     0,    52,    53,     0,    53,
456      0,    23,     0,    26,     0,    24,     0,    25,     0,    27,
457      0,    28,     0,    52,    51,     0,    51,     0,    54,    37,
458     56,    38,     0,    54,    37,    38,     0,     3,    21,     4,
459     21,    55,     0,     0,    39,    19,    19,    40,    55,     0,
460     39,    19,    20,    40,    55,     0,    56,    57,     0,    57,
461      0,    79,     0,    19,    79,     0,    62,     0,    63,     0,
462     41,     0,    29,     0,    30,     0,    31,     0,    32,     0,
463     19,    19,     0,    19,    37,    23,     0,    42,    88,     0,
464     42,    37,    23,     0,    59,    60,     0,    60,    59,     0,
465     60,     0,    59,     0,     0,    58,    68,    19,    61,    41,
466      0,    58,    68,    19,    22,    61,    41,     0,    33,    66,
467     65,    19,    64,    19,    37,    23,    19,    37,    23,    41,
468      0,    33,    66,    65,    19,    64,    19,    37,    23,    41,
469      0,    33,    66,    65,    19,    64,    19,     0,    39,    19,
470     40,     0,     0,    19,    39,    19,    68,    40,     0,    19,
471      0,    39,    67,    40,     0,     0,    19,    43,    67,     0,
472     19,     0,    69,    73,     0,    69,     0,    70,     0,    19,
473      0,     5,    19,     0,    19,     5,     0,    72,    19,     0,
474      5,    72,    19,     0,    72,    19,     5,     0,    71,    70,
475      0,    21,    70,     0,     5,    70,     0,    21,     0,    21,
476      5,     0,    71,     0,    71,     5,     0,     6,     0,    18,
477      0,    14,     0,    15,     0,    13,     0,    16,     0,    17,
478      0,    11,     0,    12,     0,     7,     0,     8,     0,     9,
479      0,    44,     0,    44,     5,     0,    44,    73,     0,    44,
480      5,    73,     0,    19,    76,     0,    76,     0,    58,    19,
481     76,     0,    19,    58,    76,     0,    58,    76,     0,    74,
482      0,    19,    39,    77,    40,     0,    77,    45,    19,     0,
483     19,     0,    37,    23,     0,    41,     0,    35,    66,    75,
484     68,    19,    39,    82,    40,    80,    78,     0,    58,    35,
485     66,    74,    68,    19,    39,    82,    40,    80,    78,     0,
486     34,    58,    68,    19,    39,    82,    40,    80,    78,     0,
487     58,    34,    68,    19,    39,    82,    40,    80,    78,     0,
488     34,    68,    19,    39,    82,    40,    80,    78,     0,    36,
489     39,    21,    40,    68,    19,    39,    82,    40,    80,    78,
490      0,    58,    68,    19,    39,    82,    40,    80,    78,     0,
491     19,    39,    19,    40,    78,     0,    19,    81,     0,    19,
492     81,    19,    81,     0,     0,    88,     0,    37,    23,     0,
493      6,     0,    19,     0,    19,     5,     0,     5,    19,     0,
494     19,    45,    83,     0,    19,     5,    45,    83,     0,     5,
495     19,    45,    83,     0,    83,     0,    84,    45,    10,     0,
496     84,     0,    84,    45,    85,     0,    85,     0,    68,    19,
497      0,    68,    19,    22,     0,    68,    19,    39,    19,    86,
498     40,     0,    68,    19,    22,    39,    19,    86,    40,     0,
499     86,    87,     0,    87,     0,    19,     0,    46,    88,     0,
500     47,    88,     0,    46,    42,    88,     0,    47,    42,    88,
501      0,    42,    42,    88,     0,    48,    42,    88,     0,    20,
502      0,    49,    20,     0,    19,     0
503 };
504
505 #endif
506
507 #if YYDEBUG != 0
508 static const short yyrline[] = { 0,
509    373,   374,   375,   376,   379,   385,   391,   397,   403,   409,
510    417,   418,   421,   426,   433,   439,   440,   452,   466,   467,
511    470,   471,   479,   480,   481,   484,   485,   486,   487,   490,
512    503,   519,   523,   531,   532,   533,   534,   535,   541,   544,
513    549,   600,   648,   731,   739,   741,   750,   756,   757,   760,
514    763,   769,   773,   780,   783,   786,   790,   794,   798,   803,
515    811,   815,   820,   824,   827,   831,   834,   839,   840,   841,
516    842,   843,   844,   845,   846,   847,   850,   851,   852,   855,
517    856,   857,   861,   868,   880,   886,   898,   910,   913,   919,
518    924,   927,   932,   933,   937,   953,   969,   985,  1001,  1012,
519   1018,  1028,  1051,  1062,  1081,  1087,  1088,  1094,  1095,  1106,
520   1117,  1128,  1138,  1148,  1158,  1161,  1162,  1165,  1166,  1169,
521   1172,  1175,  1183,  1193,  1194,  1197,  1210,  1214,  1218,  1222,
522   1226,  1230,  1236,  1237,  1241
523 };
524 #endif
525
526
527 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
528
529 static const char * const yytname[] = {   "$","error","$undefined.","CLASS",
530 "FROM","CONST","VOID","STRUCT","UNION","ENUM","THREEDOTS","SIGNED","UNSIGNED",
531 "LONG","SHORT","INT","FLOAT","DOUBLE","CHAR","TOKEN","NUMBER","TYPETOKEN","ARRAY_DIM",
532 "CCODE","HTCODE","PHCODE","HCODE","ACODE","ATCODE","PUBLIC","PRIVATE","PROTECTED",
533 "CLASSWIDE","ARGUMENT","VIRTUAL","SIGNAL","OVERRIDE","'{'","'}'","'('","')'",
534 "';'","'='","'|'","'*'","','","'>'","'<'","'!'","'-'","prog","ccode","ccodes",
535 "class","classdec","classflags","classcode","thing","scope","destructor","initializer",
536 "varoptions","variable","argument","export","argtype","flags","flaglist","type",
537 "specifier_list","spec_list","specifier","strunionenum","pointer","simplesigtype",
538 "fullsigtype","sigtype","tokenlist","codenocode","method","returnvals","retcode",
539 "funcargs","arglist","arglist1","arg","checklist","check","numtok", NULL
540 };
541 #endif
542
543 static const short yyr1[] = {     0,
544     50,    50,    50,    50,    51,    51,    51,    51,    51,    51,
545     52,    52,    53,    53,    54,    55,    55,    55,    56,    56,
546     57,    57,    57,    57,    57,    58,    58,    58,    58,    59,
547     59,    60,    60,    61,    61,    61,    61,    61,    62,    62,
548     63,    63,    63,    64,    64,    65,    65,    66,    66,    67,
549     67,    68,    68,    69,    69,    69,    69,    69,    69,    69,
550     70,    70,    70,    70,    70,    70,    70,    71,    71,    71,
551     71,    71,    71,    71,    71,    71,    72,    72,    72,    73,
552     73,    73,    73,    74,    74,    75,    75,    75,    75,    76,
553     77,    77,    78,    78,    79,    79,    79,    79,    79,    79,
554     79,    79,    80,    80,    80,    81,    81,    82,    82,    82,
555     82,    82,    82,    82,    82,    83,    83,    84,    84,    85,
556     85,    85,    85,    86,    86,    87,    87,    87,    87,    87,
557     87,    87,    88,    88,    88
558 };
559
560 static const short yyr2[] = {     0,
561      3,     2,     2,     1,     1,     1,     1,     1,     1,     1,
562      2,     1,     4,     3,     5,     0,     5,     5,     2,     1,
563      1,     2,     1,     1,     1,     1,     1,     1,     1,     2,
564      3,     2,     3,     2,     2,     1,     1,     0,     5,     6,
565     12,     9,     6,     3,     0,     5,     1,     3,     0,     3,
566      1,     2,     1,     1,     1,     2,     2,     2,     3,     3,
567      2,     2,     2,     1,     2,     1,     2,     1,     1,     1,
568      1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
569      2,     2,     3,     2,     1,     3,     3,     2,     1,     4,
570      3,     1,     2,     1,    10,    11,     9,     9,     8,    11,
571      8,     5,     2,     4,     0,     1,     2,     1,     1,     2,
572      2,     3,     4,     4,     1,     3,     1,     3,     1,     2,
573      3,     6,     7,     2,     1,     1,     2,     2,     3,     3,
574      3,     3,     1,     2,     1
575 };
576
577 static const short yydefact[] = {     0,
578      0,     5,     7,     8,     6,     9,    10,    12,     0,     4,
579      0,     0,    11,     3,     2,     0,     0,     1,     0,    26,
580     27,    28,    29,    49,     0,    49,     0,    14,    25,     0,
581     20,     0,    23,    24,    21,    16,     0,     0,     0,    22,
582      0,     0,     0,    68,    77,    78,    79,    75,    76,    72,
583     70,    71,    73,    74,    69,    55,    64,     0,     0,    53,
584     54,    66,     0,     0,     0,    13,    19,     0,    49,     0,
585      0,    15,     0,     0,    51,     0,    47,     0,     0,    56,
586     63,     0,    57,    65,    62,     0,     0,    80,    52,    67,
587     61,    58,     0,     0,    89,     0,    85,     0,     0,     0,
588     38,     0,     0,     0,     0,    48,     0,    45,    59,     0,
589      0,    81,    82,    60,     0,     0,     0,    84,     0,    88,
590      0,     0,     0,     0,     0,     0,    38,     0,     0,    37,
591     36,     0,     0,     0,     0,    94,   102,    50,     0,     0,
592      0,     0,     0,    68,    55,     0,     0,   115,   117,   119,
593     83,    92,     0,    87,    86,     0,     0,     0,     0,    30,
594      0,     0,     0,   135,   133,     0,     0,    32,    34,    35,
595     39,    16,    16,    93,     0,     0,    43,     0,    56,    57,
596      0,   120,   105,     0,    90,     0,     0,     0,     0,     0,
597     31,    40,   105,    33,   134,    17,    18,    46,    44,     0,
598    105,     0,     0,   112,   121,     0,     0,     0,   116,   118,
599     91,     0,     0,   105,     0,     0,     0,     0,   114,   113,
600      0,     0,     0,   103,   106,    99,   105,     0,     0,     0,
601    101,     0,    42,    97,     0,   126,     0,     0,     0,     0,
602      0,   125,   107,     0,     0,   105,    98,   105,     0,     0,
603      0,     0,   127,     0,   128,     0,   122,   124,   104,    95,
604      0,     0,     0,   123,   131,   129,   130,   132,   100,    96,
605     41,     0,     0,     0
606 };
607
608 static const short yydefgoto[] = {   272,
609      8,     9,    10,    11,    72,    30,    31,    32,   130,   131,
610    132,    33,    34,   141,    78,    42,    76,   146,    60,    61,
611     62,    63,    89,    95,    96,    97,   153,   137,    35,   208,
612    224,   147,   148,   149,   150,   241,   242,   225
613 };
614
615 static const short yypact[] = {   175,
616     34,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   175,   236,
617     47,   104,-32768,   236,   236,   176,    96,   236,   212,-32768,
618 -32768,-32768,-32768,   107,   158,   107,   109,-32768,-32768,   194,
619 -32768,   123,-32768,-32768,-32768,   110,   111,   124,   123,-32768,
620    135,   136,   278,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
621 -32768,-32768,-32768,-32768,-32768,   154,   346,   295,   149,   138,
622 -32768,   360,   161,   162,   163,-32768,-32768,   295,   107,   164,
623    166,-32768,   146,   177,   172,   157,   165,   197,   374,-32768,
624 -32768,   199,-32768,   374,-32768,   200,   181,     2,-32768,   374,
625 -32768,   216,   226,   203,-32768,   295,-32768,   193,   215,   217,
626     57,    74,    37,   198,   135,-32768,   219,   201,-32768,   210,
627    312,   138,-32768,-32768,   211,   220,   233,-32768,    -2,-32768,
628    234,   295,   242,    -2,   295,    -8,    -6,   312,    38,   246,
629    235,   257,   265,   275,   299,-32768,-32768,-32768,   295,   313,
630    320,   312,   329,   309,     5,   334,   314,-32768,   310,-32768,
631 -32768,-32768,   -20,-32768,-32768,   317,   349,   312,   350,-32768,
632    347,   341,   343,-32768,-32768,   361,   373,-32768,-32768,-32768,
633 -32768,   110,   110,-32768,   354,   356,   362,   357,   -18,    81,
634    295,    61,   379,   261,-32768,   381,   312,   363,   364,   366,
635 -32768,-32768,   379,-32768,-32768,-32768,-32768,-32768,-32768,   378,
636    379,   295,   295,-32768,   367,   384,    40,    37,-32768,-32768,
637 -32768,   368,   312,   379,   312,    37,    29,    37,-32768,-32768,
638    388,   114,   386,   391,-32768,-32768,   379,   371,    37,   372,
639 -32768,   376,-32768,-32768,   114,-32768,   375,    46,    62,   377,
640     72,-32768,-32768,    40,    37,   379,-32768,   379,   392,   105,
641     48,    48,-32768,    48,-32768,    48,-32768,-32768,-32768,-32768,
642     37,    37,   380,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
643 -32768,   414,   416,-32768
644 };
645
646 static const short yypgoto[] = {-32768,
647     98,    14,   409,-32768,   -67,-32768,   390,   -13,   291,   293,
648    297,-32768,-32768,-32768,-32768,   -22,   321,   -24,-32768,   -41,
649 -32768,   -40,   -79,   325,-32768,   -63,-32768,  -176,   408,  -175,
650    184,  -123,  -140,-32768,   245,   195,  -227,  -129
651 };
652
653
654 #define YYLAST          430
655
656
657 static const short yytable[] = {   168,
658     59,    81,    82,    64,   163,    39,   112,    70,   113,   180,
659    160,    58,   126,   258,    74,    85,   115,   216,   178,   185,
660     91,  -111,   258,    15,   186,   218,   202,    18,   161,   118,
661    120,   226,   151,    86,   189,   129,   116,    81,   229,   231,
662    204,   234,    81,    99,  -109,    88,   100,   232,    81,   181,
663     94,   245,   247,   154,    12,   155,   164,   165,   164,   165,
664    118,   219,   220,   212,   164,   165,   164,   165,   260,   233,
665    261,   121,   262,   135,   166,   126,   223,   136,   127,   117,
666    164,   165,   205,    16,   269,   270,   167,   252,   167,   228,
667    236,   230,   133,   134,   167,   128,   167,   157,   129,   206,
668    159,    81,    82,   254,   196,   197,    13,    17,   253,   255,
669    167,   257,    13,   237,   175,    13,    36,   238,   239,   240,
670   -110,   265,   266,   236,   267,   203,   268,    43,    44,    45,
671     46,    47,   236,    48,    49,    50,    51,    52,    53,    54,
672     55,    56,    73,    57,   264,    41,   237,    65,    71,    38,
673    238,   239,   240,    75,    77,   237,    68,    69,    83,   238,
674    239,   240,    43,    44,    45,    46,    47,    87,    48,    49,
675     50,    51,    52,    53,    54,    55,    56,     1,    57,    92,
676     93,    88,   101,    98,   102,   103,    20,    21,    22,    23,
677     20,    21,    22,    23,    19,   104,   106,     2,     3,     4,
678      5,     6,     7,   107,    20,    21,    22,    23,    24,    25,
679     26,    27,    19,    28,   105,   108,    29,   109,   110,   111,
680    114,   119,    20,    21,    22,    23,    24,    25,    26,    27,
681     37,    66,   122,   123,    29,   124,   128,   139,   152,   140,
682     20,    21,    22,    23,   115,    25,    26,    27,   142,   116,
683     38,   115,   156,   126,    20,    21,    22,    23,     2,     3,
684      4,     5,     6,     7,   116,    43,    44,    45,    46,    47,
685    209,    48,    49,    50,    51,    52,    53,    54,    55,    56,
686    158,    57,    79,    44,    45,    46,    47,   129,    48,    49,
687     50,    51,    52,    53,    54,    55,    80,   171,    57,    43,
688     44,    45,    46,    47,   172,    48,    49,    50,    51,    52,
689     53,    54,    55,    56,   173,    57,   143,   144,    45,    46,
690     47,   174,    48,    49,    50,    51,    52,    53,    54,    55,
691    145,   176,    57,    79,    44,    45,    46,    47,   177,    48,
692     49,    50,    51,    52,    53,    54,    55,   179,  -108,    57,
693     84,    44,   182,   183,   184,   187,    48,    49,    50,    51,
694     52,    53,    54,    55,    90,    44,    57,   188,   190,   191,
695     48,    49,    50,    51,    52,    53,    54,    55,    79,    44,
696     57,   192,   193,   194,    48,    49,    50,    51,    52,    53,
697     54,    55,   195,   198,    57,   199,   201,   207,   200,   211,
698    217,   213,   222,   214,   215,   221,   235,   227,   243,   244,
699    246,   248,   249,   273,   263,   274,   251,    14,   256,    67,
700    271,   170,   169,   162,   125,   138,    40,   259,   210,   250
701 };
702
703 static const short yycheck[] = {   129,
704     25,    43,    43,    26,   128,    19,     5,    32,    88,     5,
705     19,    25,    19,   241,    39,    57,    19,   193,   142,    40,
706     62,    40,   250,    10,    45,   201,    45,    14,    37,    93,
707     94,   208,   112,    58,   158,    42,    39,    79,   214,   216,
708    181,   218,    84,    68,    40,    44,    69,    19,    90,    45,
709     64,   227,   229,   117,    21,   119,    19,    20,    19,    20,
710    124,   202,   203,   187,    19,    20,    19,    20,   245,    41,
711    246,    96,   248,    37,    37,    19,    37,    41,    22,    93,
712     19,    20,    22,    37,   261,   262,    49,    42,    49,   213,
713     19,   215,    19,    20,    49,    39,    49,   122,    42,    39,
714    125,   143,   143,    42,   172,   173,     9,     4,   238,   239,
715     49,    40,    15,    42,   139,    18,    21,    46,    47,    48,
716     40,   251,   252,    19,   254,    45,   256,     5,     6,     7,
717      8,     9,    19,    11,    12,    13,    14,    15,    16,    17,
718     18,    19,    19,    21,    40,    39,    42,    39,    39,    39,
719     46,    47,    48,    19,    19,    42,    34,    35,     5,    46,
720     47,    48,     5,     6,     7,     8,     9,    19,    11,    12,
721     13,    14,    15,    16,    17,    18,    19,     3,    21,    19,
722     19,    44,    19,    21,    19,    40,    29,    30,    31,    32,
723     29,    30,    31,    32,    19,    19,    40,    23,    24,    25,
724     26,    27,    28,    39,    29,    30,    31,    32,    33,    34,
725     35,    36,    19,    38,    43,    19,    41,    19,    19,    39,
726      5,    19,    29,    30,    31,    32,    33,    34,    35,    36,
727     19,    38,    40,    19,    41,    19,    39,    19,    19,    39,
728     29,    30,    31,    32,    19,    34,    35,    36,    39,    39,
729     39,    19,    19,    19,    29,    30,    31,    32,    23,    24,
730     25,    26,    27,    28,    39,     5,     6,     7,     8,     9,
731     10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
732     39,    21,     5,     6,     7,     8,     9,    42,    11,    12,
733     13,    14,    15,    16,    17,    18,    19,    41,    21,     5,
734      6,     7,     8,     9,    40,    11,    12,    13,    14,    15,
735     16,    17,    18,    19,    40,    21,     5,     6,     7,     8,
736      9,    23,    11,    12,    13,    14,    15,    16,    17,    18,
737     19,    19,    21,     5,     6,     7,     8,     9,    19,    11,
738     12,    13,    14,    15,    16,    17,    18,    19,    40,    21,
739      5,     6,    19,    40,    45,    39,    11,    12,    13,    14,
740     15,    16,    17,    18,     5,     6,    21,    19,    19,    23,
741     11,    12,    13,    14,    15,    16,    17,    18,     5,     6,
742     21,    41,    40,    23,    11,    12,    13,    14,    15,    16,
743     17,    18,    20,    40,    21,    40,    40,    19,    37,    19,
744     23,    39,    19,    40,    39,    39,    19,    40,    23,    19,
745     40,    40,    37,     0,    23,     0,    42,     9,    42,    30,
746     41,   131,   130,   127,   100,   105,    19,   244,   184,   235
747 };
748 /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
749 #line 3 "/usr/lib/bison.simple"
750 /* This file comes from bison-1.28.  */
751
752 /* Skeleton output parser for bison,
753    Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
754
755    This program is free software; you can redistribute it and/or modify
756    it under the terms of the GNU General Public License as published by
757    the Free Software Foundation; either version 2, or (at your option)
758    any later version.
759
760    This program is distributed in the hope that it will be useful,
761    but WITHOUT ANY WARRANTY; without even the implied warranty of
762    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
763    GNU General Public License for more details.
764
765    You should have received a copy of the GNU General Public License
766    along with this program; if not, write to the Free Software
767    Foundation, Inc., 59 Temple Place - Suite 330,
768    Boston, MA 02111-1307, USA.  */
769
770 /* As a special exception, when this file is copied by Bison into a
771    Bison output file, you may use that output file without restriction.
772    This special exception was added by the Free Software Foundation
773    in version 1.24 of Bison.  */
774
775 /* This is the parser code that is written into each bison parser
776   when the %semantic_parser declaration is not specified in the grammar.
777   It was written by Richard Stallman by simplifying the hairy parser
778   used when %semantic_parser is specified.  */
779
780 #ifndef YYSTACK_USE_ALLOCA
781 #ifdef alloca
782 #define YYSTACK_USE_ALLOCA
783 #else /* alloca not defined */
784 #ifdef __GNUC__
785 #define YYSTACK_USE_ALLOCA
786 #define alloca __builtin_alloca
787 #else /* not GNU C.  */
788 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
789 #define YYSTACK_USE_ALLOCA
790 #include <alloca.h>
791 #else /* not sparc */
792 /* We think this test detects Watcom and Microsoft C.  */
793 /* This used to test MSDOS, but that is a bad idea
794    since that symbol is in the user namespace.  */
795 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
796 #if 0 /* No need for malloc.h, which pollutes the namespace;
797          instead, just don't use alloca.  */
798 #include <malloc.h>
799 #endif
800 #else /* not MSDOS, or __TURBOC__ */
801 #if defined(_AIX)
802 /* I don't know what this was needed for, but it pollutes the namespace.
803    So I turned it off.   rms, 2 May 1997.  */
804 /* #include <malloc.h>  */
805  #pragma alloca
806 #define YYSTACK_USE_ALLOCA
807 #else /* not MSDOS, or __TURBOC__, or _AIX */
808 #if 0
809 #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
810                  and on HPUX 10.  Eventually we can turn this on.  */
811 #define YYSTACK_USE_ALLOCA
812 #define alloca __builtin_alloca
813 #endif /* __hpux */
814 #endif
815 #endif /* not _AIX */
816 #endif /* not MSDOS, or __TURBOC__ */
817 #endif /* not sparc */
818 #endif /* not GNU C */
819 #endif /* alloca not defined */
820 #endif /* YYSTACK_USE_ALLOCA not defined */
821
822 #ifdef YYSTACK_USE_ALLOCA
823 #define YYSTACK_ALLOC alloca
824 #else
825 #define YYSTACK_ALLOC malloc
826 #endif
827
828 /* Note: there must be only one dollar sign in this file.
829    It is replaced by the list of actions, each action
830    as one case of the switch.  */
831
832 #define yyerrok         (yyerrstatus = 0)
833 #define yyclearin       (yychar = YYEMPTY)
834 #define YYEMPTY         -2
835 #define YYEOF           0
836 #define YYACCEPT        goto yyacceptlab
837 #define YYABORT         goto yyabortlab
838 #define YYERROR         goto yyerrlab1
839 /* Like YYERROR except do call yyerror.
840    This remains here temporarily to ease the
841    transition to the new meaning of YYERROR, for GCC.
842    Once GCC version 2 has supplanted version 1, this can go.  */
843 #define YYFAIL          goto yyerrlab
844 #define YYRECOVERING()  (!!yyerrstatus)
845 #define YYBACKUP(token, value) \
846 do                                                              \
847   if (yychar == YYEMPTY && yylen == 1)                          \
848     { yychar = (token), yylval = (value);                       \
849       yychar1 = YYTRANSLATE (yychar);                           \
850       YYPOPSTACK;                                               \
851       goto yybackup;                                            \
852     }                                                           \
853   else                                                          \
854     { yyerror ("syntax error: cannot back up"); YYERROR; }      \
855 while (0)
856
857 #define YYTERROR        1
858 #define YYERRCODE       256
859
860 #ifndef YYPURE
861 #define YYLEX           yylex()
862 #endif
863
864 #ifdef YYPURE
865 #ifdef YYLSP_NEEDED
866 #ifdef YYLEX_PARAM
867 #define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
868 #else
869 #define YYLEX           yylex(&yylval, &yylloc)
870 #endif
871 #else /* not YYLSP_NEEDED */
872 #ifdef YYLEX_PARAM
873 #define YYLEX           yylex(&yylval, YYLEX_PARAM)
874 #else
875 #define YYLEX           yylex(&yylval)
876 #endif
877 #endif /* not YYLSP_NEEDED */
878 #endif
879
880 /* If nonreentrant, generate the variables here */
881
882 #ifndef YYPURE
883
884 int     yychar;                 /*  the lookahead symbol                */
885 YYSTYPE yylval;                 /*  the semantic value of the           */
886                                 /*  lookahead symbol                    */
887
888 #ifdef YYLSP_NEEDED
889 YYLTYPE yylloc;                 /*  location data for the lookahead     */
890                                 /*  symbol                              */
891 #endif
892
893 int yynerrs;                    /*  number of parse errors so far       */
894 #endif  /* not YYPURE */
895
896 #if YYDEBUG != 0
897 int yydebug;                    /*  nonzero means print parse trace     */
898 /* Since this is uninitialized, it does not stop multiple parsers
899    from coexisting.  */
900 #endif
901
902 /*  YYINITDEPTH indicates the initial size of the parser's stacks       */
903
904 #ifndef YYINITDEPTH
905 #define YYINITDEPTH 200
906 #endif
907
908 /*  YYMAXDEPTH is the maximum size the stacks can grow to
909     (effective only if the built-in stack extension method is used).  */
910
911 #if YYMAXDEPTH == 0
912 #undef YYMAXDEPTH
913 #endif
914
915 #ifndef YYMAXDEPTH
916 #define YYMAXDEPTH 10000
917 #endif
918 \f
919 /* Define __yy_memcpy.  Note that the size argument
920    should be passed with type unsigned int, because that is what the non-GCC
921    definitions require.  With GCC, __builtin_memcpy takes an arg
922    of type size_t, but it can handle unsigned int.  */
923
924 #if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
925 #define __yy_memcpy(TO,FROM,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
926 #else                           /* not GNU C or C++ */
927 #ifndef __cplusplus
928
929 /* This is the most reliable way to avoid incompatibilities
930    in available built-in functions on various systems.  */
931 static void
932 __yy_memcpy (to, from, count)
933      char *to;
934      char *from;
935      unsigned int count;
936 {
937   register char *f = from;
938   register char *t = to;
939   register int i = count;
940
941   while (i-- > 0)
942     *t++ = *f++;
943 }
944
945 #else /* __cplusplus */
946
947 /* This is the most reliable way to avoid incompatibilities
948    in available built-in functions on various systems.  */
949 static void
950 __yy_memcpy (char *to, char *from, unsigned int count)
951 {
952   register char *t = to;
953   register char *f = from;
954   register int i = count;
955
956   while (i-- > 0)
957     *t++ = *f++;
958 }
959
960 #endif
961 #endif
962 \f
963 #line 217 "/usr/lib/bison.simple"
964
965 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
966    into yyparse.  The argument should have type void *.
967    It should actually point to an object.
968    Grammar actions can access the variable by casting it
969    to the proper pointer type.  */
970
971 #ifdef YYPARSE_PARAM
972 #ifdef __cplusplus
973 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
974 #define YYPARSE_PARAM_DECL
975 #else /* not __cplusplus */
976 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
977 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
978 #endif /* not __cplusplus */
979 #else /* not YYPARSE_PARAM */
980 #define YYPARSE_PARAM_ARG
981 #define YYPARSE_PARAM_DECL
982 #endif /* not YYPARSE_PARAM */
983
984 /* Prevent warning if -Wstrict-prototypes.  */
985 #ifdef __GNUC__
986 #ifdef YYPARSE_PARAM
987 int yyparse (void *);
988 #else
989 int yyparse (void);
990 #endif
991 #endif
992
993 int
994 yyparse(YYPARSE_PARAM_ARG)
995      YYPARSE_PARAM_DECL
996 {
997   register int yystate;
998   register int yyn;
999   register short *yyssp;
1000   register YYSTYPE *yyvsp;
1001   int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
1002   int yychar1 = 0;              /*  lookahead token as an internal (translated) token number */
1003
1004   short yyssa[YYINITDEPTH];     /*  the state stack                     */
1005   YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */
1006
1007   short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
1008   YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */
1009
1010 #ifdef YYLSP_NEEDED
1011   YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
1012   YYLTYPE *yyls = yylsa;
1013   YYLTYPE *yylsp;
1014
1015 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
1016 #else
1017 #define YYPOPSTACK   (yyvsp--, yyssp--)
1018 #endif
1019
1020   int yystacksize = YYINITDEPTH;
1021   int yyfree_stacks = 0;
1022
1023 #ifdef YYPURE
1024   int yychar;
1025   YYSTYPE yylval;
1026   int yynerrs;
1027 #ifdef YYLSP_NEEDED
1028   YYLTYPE yylloc;
1029 #endif
1030 #endif
1031
1032   YYSTYPE yyval;                /*  the variable used to return         */
1033                                 /*  semantic values from the action     */
1034                                 /*  routines                            */
1035
1036   int yylen;
1037
1038 #if YYDEBUG != 0
1039   if (yydebug)
1040     fprintf(stderr, "Starting parse\n");
1041 #endif
1042
1043   yystate = 0;
1044   yyerrstatus = 0;
1045   yynerrs = 0;
1046   yychar = YYEMPTY;             /* Cause a token to be read.  */
1047
1048   /* Initialize stack pointers.
1049      Waste one element of value and location stack
1050      so that they stay on the same level as the state stack.
1051      The wasted elements are never initialized.  */
1052
1053   yyssp = yyss - 1;
1054   yyvsp = yyvs;
1055 #ifdef YYLSP_NEEDED
1056   yylsp = yyls;
1057 #endif
1058
1059 /* Push a new state, which is found in  yystate  .  */
1060 /* In all cases, when you get here, the value and location stacks
1061    have just been pushed. so pushing a state here evens the stacks.  */
1062 yynewstate:
1063
1064   *++yyssp = yystate;
1065
1066   if (yyssp >= yyss + yystacksize - 1)
1067     {
1068       /* Give user a chance to reallocate the stack */
1069       /* Use copies of these so that the &'s don't force the real ones into memory. */
1070       YYSTYPE *yyvs1 = yyvs;
1071       short *yyss1 = yyss;
1072 #ifdef YYLSP_NEEDED
1073       YYLTYPE *yyls1 = yyls;
1074 #endif
1075
1076       /* Get the current used size of the three stacks, in elements.  */
1077       int size = yyssp - yyss + 1;
1078
1079 #ifdef yyoverflow
1080       /* Each stack pointer address is followed by the size of
1081          the data in use in that stack, in bytes.  */
1082 #ifdef YYLSP_NEEDED
1083       /* This used to be a conditional around just the two extra args,
1084          but that might be undefined if yyoverflow is a macro.  */
1085       yyoverflow("parser stack overflow",
1086                  &yyss1, size * sizeof (*yyssp),
1087                  &yyvs1, size * sizeof (*yyvsp),
1088                  &yyls1, size * sizeof (*yylsp),
1089                  &yystacksize);
1090 #else
1091       yyoverflow("parser stack overflow",
1092                  &yyss1, size * sizeof (*yyssp),
1093                  &yyvs1, size * sizeof (*yyvsp),
1094                  &yystacksize);
1095 #endif
1096
1097       yyss = yyss1; yyvs = yyvs1;
1098 #ifdef YYLSP_NEEDED
1099       yyls = yyls1;
1100 #endif
1101 #else /* no yyoverflow */
1102       /* Extend the stack our own way.  */
1103       if (yystacksize >= YYMAXDEPTH)
1104         {
1105           yyerror("parser stack overflow");
1106           if (yyfree_stacks)
1107             {
1108               free (yyss);
1109               free (yyvs);
1110 #ifdef YYLSP_NEEDED
1111               free (yyls);
1112 #endif
1113             }
1114           return 2;
1115         }
1116       yystacksize *= 2;
1117       if (yystacksize > YYMAXDEPTH)
1118         yystacksize = YYMAXDEPTH;
1119 #ifndef YYSTACK_USE_ALLOCA
1120       yyfree_stacks = 1;
1121 #endif
1122       yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
1123       __yy_memcpy ((char *)yyss, (char *)yyss1,
1124                    size * (unsigned int) sizeof (*yyssp));
1125       yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
1126       __yy_memcpy ((char *)yyvs, (char *)yyvs1,
1127                    size * (unsigned int) sizeof (*yyvsp));
1128 #ifdef YYLSP_NEEDED
1129       yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
1130       __yy_memcpy ((char *)yyls, (char *)yyls1,
1131                    size * (unsigned int) sizeof (*yylsp));
1132 #endif
1133 #endif /* no yyoverflow */
1134
1135       yyssp = yyss + size - 1;
1136       yyvsp = yyvs + size - 1;
1137 #ifdef YYLSP_NEEDED
1138       yylsp = yyls + size - 1;
1139 #endif
1140
1141 #if YYDEBUG != 0
1142       if (yydebug)
1143         fprintf(stderr, "Stack size increased to %d\n", yystacksize);
1144 #endif
1145
1146       if (yyssp >= yyss + yystacksize - 1)
1147         YYABORT;
1148     }
1149
1150 #if YYDEBUG != 0
1151   if (yydebug)
1152     fprintf(stderr, "Entering state %d\n", yystate);
1153 #endif
1154
1155   goto yybackup;
1156  yybackup:
1157
1158 /* Do appropriate processing given the current state.  */
1159 /* Read a lookahead token if we need one and don't already have one.  */
1160 /* yyresume: */
1161
1162   /* First try to decide what to do without reference to lookahead token.  */
1163
1164   yyn = yypact[yystate];
1165   if (yyn == YYFLAG)
1166     goto yydefault;
1167
1168   /* Not known => get a lookahead token if don't already have one.  */
1169
1170   /* yychar is either YYEMPTY or YYEOF
1171      or a valid token in external form.  */
1172
1173   if (yychar == YYEMPTY)
1174     {
1175 #if YYDEBUG != 0
1176       if (yydebug)
1177         fprintf(stderr, "Reading a token: ");
1178 #endif
1179       yychar = YYLEX;
1180     }
1181
1182   /* Convert token to internal form (in yychar1) for indexing tables with */
1183
1184   if (yychar <= 0)              /* This means end of input. */
1185     {
1186       yychar1 = 0;
1187       yychar = YYEOF;           /* Don't call YYLEX any more */
1188
1189 #if YYDEBUG != 0
1190       if (yydebug)
1191         fprintf(stderr, "Now at end of input.\n");
1192 #endif
1193     }
1194   else
1195     {
1196       yychar1 = YYTRANSLATE(yychar);
1197
1198 #if YYDEBUG != 0
1199       if (yydebug)
1200         {
1201           fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
1202           /* Give the individual parser a way to print the precise meaning
1203              of a token, for further debugging info.  */
1204 #ifdef YYPRINT
1205           YYPRINT (stderr, yychar, yylval);
1206 #endif
1207           fprintf (stderr, ")\n");
1208         }
1209 #endif
1210     }
1211
1212   yyn += yychar1;
1213   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
1214     goto yydefault;
1215
1216   yyn = yytable[yyn];
1217
1218   /* yyn is what to do for this token type in this state.
1219      Negative => reduce, -yyn is rule number.
1220      Positive => shift, yyn is new state.
1221        New state is final state => don't bother to shift,
1222        just return success.
1223      0, or most negative number => error.  */
1224
1225   if (yyn < 0)
1226     {
1227       if (yyn == YYFLAG)
1228         goto yyerrlab;
1229       yyn = -yyn;
1230       goto yyreduce;
1231     }
1232   else if (yyn == 0)
1233     goto yyerrlab;
1234
1235   if (yyn == YYFINAL)
1236     YYACCEPT;
1237
1238   /* Shift the lookahead token.  */
1239
1240 #if YYDEBUG != 0
1241   if (yydebug)
1242     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
1243 #endif
1244
1245   /* Discard the token being shifted unless it is eof.  */
1246   if (yychar != YYEOF)
1247     yychar = YYEMPTY;
1248
1249   *++yyvsp = yylval;
1250 #ifdef YYLSP_NEEDED
1251   *++yylsp = yylloc;
1252 #endif
1253
1254   /* count tokens shifted since error; after three, turn off error status.  */
1255   if (yyerrstatus) yyerrstatus--;
1256
1257   yystate = yyn;
1258   goto yynewstate;
1259
1260 /* Do the default action for the current state.  */
1261 yydefault:
1262
1263   yyn = yydefact[yystate];
1264   if (yyn == 0)
1265     goto yyerrlab;
1266
1267 /* Do a reduction.  yyn is the number of a rule to reduce with.  */
1268 yyreduce:
1269   yylen = yyr2[yyn];
1270   if (yylen > 0)
1271     yyval = yyvsp[1-yylen]; /* implement default value of the action */
1272
1273 #if YYDEBUG != 0
1274   if (yydebug)
1275     {
1276       int i;
1277
1278       fprintf (stderr, "Reducing via rule %d (line %d), ",
1279                yyn, yyrline[yyn]);
1280
1281       /* Print the symbols being reduced, and their result.  */
1282       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
1283         fprintf (stderr, "%s ", yytname[yyrhs[i]]);
1284       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1285     }
1286 #endif
1287
1288
1289   switch (yyn) {
1290
1291 case 1:
1292 #line 373 "parse.y"
1293 { ; ;
1294     break;}
1295 case 2:
1296 #line 374 "parse.y"
1297 { ; ;
1298     break;}
1299 case 3:
1300 #line 375 "parse.y"
1301 { ; ;
1302     break;}
1303 case 4:
1304 #line 376 "parse.y"
1305 { ; ;
1306     break;}
1307 case 5:
1308 #line 379 "parse.y"
1309 {
1310                         Node *node = new_ccode(C_CCODE,(yyvsp[0].cbuf)->str,
1311                                                ccode_line);
1312                         nodes = g_list_append(nodes,node);
1313                         g_string_free(yyvsp[0].cbuf,FALSE);
1314                                         ;
1315     break;}
1316 case 6:
1317 #line 385 "parse.y"
1318 {
1319                         Node *node = new_ccode(H_CCODE,(yyvsp[0].cbuf)->str,
1320                                                ccode_line);
1321                         nodes = g_list_append(nodes,node);
1322                         g_string_free(yyvsp[0].cbuf,FALSE);
1323                                         ;
1324     break;}
1325 case 7:
1326 #line 391 "parse.y"
1327 {
1328                         Node *node = new_ccode(HT_CCODE,(yyvsp[0].cbuf)->str,
1329                                                ccode_line);
1330                         nodes = g_list_append(nodes,node);
1331                         g_string_free(yyvsp[0].cbuf,FALSE);
1332                                         ;
1333     break;}
1334 case 8:
1335 #line 397 "parse.y"
1336 {
1337                         Node *node = new_ccode(PH_CCODE,(yyvsp[0].cbuf)->str,
1338                                                ccode_line);
1339                         nodes = g_list_append(nodes,node);
1340                         g_string_free(yyvsp[0].cbuf,FALSE);
1341                                         ;
1342     break;}
1343 case 9:
1344 #line 403 "parse.y"
1345 {
1346                         Node *node = new_ccode(A_CCODE,(yyvsp[0].cbuf)->str,
1347                                                ccode_line);
1348                         nodes = g_list_append(nodes,node);
1349                         g_string_free(yyvsp[0].cbuf,FALSE);
1350                                         ;
1351     break;}
1352 case 10:
1353 #line 409 "parse.y"
1354 {
1355                         Node *node = new_ccode(AT_CCODE,(yyvsp[0].cbuf)->str,
1356                                                ccode_line);
1357                         nodes = g_list_append(nodes,node);
1358                         g_string_free(yyvsp[0].cbuf,FALSE);
1359                                         ;
1360     break;}
1361 case 11:
1362 #line 417 "parse.y"
1363 { ; ;
1364     break;}
1365 case 12:
1366 #line 418 "parse.y"
1367 { ; ;
1368     break;}
1369 case 13:
1370 #line 421 "parse.y"
1371 {
1372                         ((Class *)class)->nodes = class_nodes;
1373                         class_nodes = NULL;
1374                         nodes = g_list_append(nodes,class);
1375                                                 ;
1376     break;}
1377 case 14:
1378 #line 426 "parse.y"
1379 {
1380                         ((Class *)class)->nodes = NULL;
1381                         class_nodes = NULL;
1382                         nodes = g_list_append(nodes,class);
1383                                                 ;
1384     break;}
1385 case 15:
1386 #line 433 "parse.y"
1387 {
1388                         class = new_class (yyvsp[-3].id, yyvsp[-1].id,
1389                                            bonobo_x_class, chunk_size, NULL);
1390                                                 ;
1391     break;}
1392 case 17:
1393 #line 440 "parse.y"
1394 {
1395                         if(strcmp(yyvsp[-3].id,"chunks") == 0) {
1396                                 g_free (chunk_size);
1397                                 chunk_size = g_strdup(yyvsp[-2].id);
1398                         } else if(strcmp(yyvsp[-3].id,"BonoboX") == 0) {
1399                                 g_free (bonobo_x_class);
1400                                 bonobo_x_class = g_strdup(yyvsp[-2].id);
1401                         } else {
1402                                 yyerror(_("parse error"));
1403                                 YYERROR;
1404                         }
1405                 ;
1406     break;}
1407 case 18:
1408 #line 452 "parse.y"
1409 {
1410                         if(strcmp(yyvsp[-3].id,"chunks") == 0) {
1411                                 g_free (chunk_size);
1412                                 if(atoi(yyvsp[-2].id) != 0)
1413                                         chunk_size = g_strdup(yyvsp[-2].id);
1414                                 else
1415                                         chunk_size = NULL;
1416                         } else {
1417                                 yyerror(_("parse error"));
1418                                 YYERROR;
1419                         }
1420                 ;
1421     break;}
1422 case 19:
1423 #line 466 "parse.y"
1424 { ; ;
1425     break;}
1426 case 20:
1427 #line 467 "parse.y"
1428 { ; ;
1429     break;}
1430 case 21:
1431 #line 470 "parse.y"
1432 { ; ;
1433     break;}
1434 case 22:
1435 #line 471 "parse.y"
1436 {
1437                         if (strcmp (yyvsp[-1].id, "BonoboX") != 0) {
1438                                 g_free(yyvsp[-1].id);
1439                                 yyerror(_("parse error"));
1440                                 YYERROR;
1441                         }
1442                         last_added_method->bonobo_x_func = TRUE;
1443                                                 ;
1444     break;}
1445 case 23:
1446 #line 479 "parse.y"
1447 { ; ;
1448     break;}
1449 case 24:
1450 #line 480 "parse.y"
1451 { ; ;
1452     break;}
1453 case 25:
1454 #line 481 "parse.y"
1455 { ; ;
1456     break;}
1457 case 26:
1458 #line 484 "parse.y"
1459 { the_scope = PUBLIC_SCOPE; ;
1460     break;}
1461 case 27:
1462 #line 485 "parse.y"
1463 { the_scope = PRIVATE_SCOPE; ;
1464     break;}
1465 case 28:
1466 #line 486 "parse.y"
1467 { the_scope = PROTECTED_SCOPE; ;
1468     break;}
1469 case 29:
1470 #line 487 "parse.y"
1471 { the_scope = CLASS_SCOPE; ;
1472     break;}
1473 case 30:
1474 #line 490 "parse.y"
1475 {
1476                         if(strcmp(yyvsp[-1].id, "destroywith")==0) {
1477                                 g_free(yyvsp[-1].id);
1478                                 destructor = yyvsp[0].id;
1479                                 destructor_line = line_no;
1480                                 destructor_simple = TRUE;
1481                         } else {
1482                                 g_free(yyvsp[-1].id);
1483                                 g_free(yyvsp[0].id);
1484                                 yyerror(_("parse error"));
1485                                 YYERROR;
1486                         }
1487                                 ;
1488     break;}
1489 case 31:
1490 #line 503 "parse.y"
1491 {
1492                         if(strcmp(yyvsp[-2].id, "destroy")==0) {
1493                                 g_free(yyvsp[-2].id);
1494                                 destructor = (yyvsp[0].cbuf)->str;
1495                                 g_string_free(yyvsp[0].cbuf, FALSE);
1496                                 destructor_line = ccode_line;
1497                                 destructor_simple = FALSE;
1498                         } else {
1499                                 g_free(yyvsp[-2].id);
1500                                 g_string_free(yyvsp[0].cbuf, TRUE);
1501                                 yyerror(_("parse error"));
1502                                 YYERROR;
1503                         }
1504                                         ;
1505     break;}
1506 case 32:
1507 #line 519 "parse.y"
1508 {
1509                         initializer = yyvsp[0].id;
1510                         initializer_line = ccode_line;
1511                                 ;
1512     break;}
1513 case 33:
1514 #line 523 "parse.y"
1515 {
1516                         initializer = (yyvsp[0].cbuf)->str;
1517                         initializer_line = ccode_line;
1518                         g_string_free(yyvsp[0].cbuf, FALSE);
1519                                 ;
1520     break;}
1521 case 34:
1522 #line 531 "parse.y"
1523 { ; ;
1524     break;}
1525 case 35:
1526 #line 532 "parse.y"
1527 { ; ;
1528     break;}
1529 case 36:
1530 #line 533 "parse.y"
1531 { destructor = NULL; ;
1532     break;}
1533 case 37:
1534 #line 534 "parse.y"
1535 { initializer = NULL; ;
1536     break;}
1537 case 38:
1538 #line 535 "parse.y"
1539 {
1540                         destructor = NULL;
1541                         initializer = NULL;
1542                                         ;
1543     break;}
1544 case 39:
1545 #line 541 "parse.y"
1546 {
1547                         push_variable(yyvsp[-2].id, the_scope,yyvsp[-4].line, NULL);
1548                                                 ;
1549     break;}
1550 case 40:
1551 #line 544 "parse.y"
1552 {
1553                         push_variable(yyvsp[-3].id, the_scope, yyvsp[-5].line, yyvsp[-2].id);
1554                                                 ;
1555     break;}
1556 case 41:
1557 #line 549 "parse.y"
1558 {
1559                         if(strcmp(yyvsp[-6].id,"get")==0 &&
1560                            strcmp(yyvsp[-3].id,"set")==0) {
1561                                 Node *node;
1562                                 Type *type = pop_type();
1563                                 g_free (yyvsp[-6].id); 
1564                                 g_free (yyvsp[-3].id);
1565                                 node = new_argument (yyvsp[-9].id, type, yyvsp[-10].list, yyvsp[-8].id,
1566                                                      (yyvsp[-4].cbuf)->str, yyvsp[-5].line,
1567                                                      (yyvsp[-1].cbuf)->str,yyvsp[-2].line,
1568                                                      yyvsp[-11].line);
1569
1570                                 class_nodes = g_list_append(class_nodes,node);
1571
1572                                 if (yyvsp[-7].id) {
1573                                         export_accessors (yyvsp[-8].id, 
1574                                                           yyvsp[-4].cbuf, yyvsp[-5].line,
1575                                                           yyvsp[-1].cbuf, yyvsp[-2].line,
1576                                                           type,
1577                                                           yyvsp[-11].line);
1578                                 } 
1579
1580                                 g_string_free (yyvsp[-4].cbuf, FALSE);
1581                                 g_string_free (yyvsp[-1].cbuf, FALSE);
1582
1583                         } else if(strcmp(yyvsp[-6].id,"set")==0 &&
1584                                 strcmp(yyvsp[-3].id,"get")==0) {
1585                                 Node *node;
1586                                 Type *type = pop_type();
1587                                 g_free (yyvsp[-6].id); 
1588                                 g_free (yyvsp[-3].id);
1589                                 node = new_argument (yyvsp[-9].id, type, yyvsp[-10].list, yyvsp[-8].id,
1590                                                      (yyvsp[-1].cbuf)->str,yyvsp[-2].line,
1591                                                      (yyvsp[-4].cbuf)->str,yyvsp[-5].line,
1592                                                      yyvsp[-11].line);
1593                                 g_string_free (yyvsp[-1].cbuf, FALSE);
1594                                 g_string_free (yyvsp[-4].cbuf, FALSE);
1595                                 class_nodes = g_list_append(class_nodes,node);
1596                         } else {
1597                                 g_free (yyvsp[-9].id); 
1598                                 g_free (yyvsp[-8].id);
1599                                 g_free (yyvsp[-6].id); 
1600                                 g_free (yyvsp[-3].id);
1601                                 g_list_foreach (yyvsp[-10].list, (GFunc)g_free, NULL);
1602                                 g_list_free (yyvsp[-10].list);
1603                                 g_string_free (yyvsp[-1].cbuf, TRUE);
1604                                 g_string_free (yyvsp[-4].cbuf, TRUE);
1605                                 yyerror (_("parse error"));
1606                                 YYERROR;
1607                         }
1608                                                 ;
1609     break;}
1610 case 42:
1611 #line 600 "parse.y"
1612 {
1613                         if(strcmp(yyvsp[-3].id, "get") == 0) {
1614                                 Node *node;
1615                                 Type *type = pop_type();
1616                                 g_free (yyvsp[-3].id);
1617                                 node = new_argument (yyvsp[-6].id, type, yyvsp[-7].list, yyvsp[-5].id,
1618                                                      (yyvsp[-1].cbuf)->str, yyvsp[-2].line,
1619                                                      NULL, 0, 
1620                                                      yyvsp[-8].line);
1621                                 if (yyvsp[-4].id) {
1622                                         export_accessors (yyvsp[-5].id, 
1623                                                           yyvsp[-1].cbuf, yyvsp[-2].line,
1624                                                           NULL, 0,
1625                                                           type,
1626                                                           yyvsp[-8].line);
1627                                 } 
1628
1629                                 g_string_free (yyvsp[-1].cbuf, FALSE);
1630                                 class_nodes = g_list_append(class_nodes, node);
1631                         } else if(strcmp(yyvsp[-3].id, "set") == 0) {
1632                                 Node *node;
1633                                 Type *type = pop_type();
1634                                 g_free (yyvsp[-3].id);
1635                                 node = new_argument (yyvsp[-6].id, type, yyvsp[-7].list, yyvsp[-5].id,
1636                                                      NULL, 0, 
1637                                                      (yyvsp[-1].cbuf)->str, yyvsp[-2].line, 
1638                                                      yyvsp[-8].line);
1639                                 if (yyvsp[-4].id) {
1640                                         export_accessors (yyvsp[-5].id, 
1641                                                           NULL, 0,
1642                                                           yyvsp[-1].cbuf, yyvsp[-2].line,
1643                                                           type,
1644                                                           yyvsp[-8].line);
1645                                 } 
1646
1647                                 g_string_free (yyvsp[-1].cbuf, FALSE);
1648                                 class_nodes = g_list_append (class_nodes, node);
1649                         } else {
1650                                 g_free (yyvsp[-3].id); 
1651                                 g_free (yyvsp[-6].id);
1652                                 g_free (yyvsp[-5].id);
1653                                 g_list_foreach (yyvsp[-7].list, (GFunc)g_free, NULL);
1654                                 g_list_free (yyvsp[-7].list);
1655                                 g_string_free (yyvsp[-1].cbuf, TRUE);
1656                                 yyerror(_("parse error"));
1657                                 YYERROR;
1658                         }
1659                                                 ;
1660     break;}
1661 case 43:
1662 #line 648 "parse.y"
1663 {
1664                         Node *node;
1665                         char *get, *set = NULL;
1666                         Variable *var;
1667                         Type *type;
1668                         char *root;
1669                         
1670                         if(strcmp(yyvsp[0].id, "link")!=0 &&
1671                            strcmp(yyvsp[0].id, "stringlink")!=0 && 
1672                            strcmp(yyvsp[0].id, "objectlink")!=0) {
1673                                 g_free(yyvsp[0].id); 
1674                                 g_free(yyvsp[-3].id);
1675                                 g_free(yyvsp[-2].id);
1676                                 g_list_foreach(yyvsp[-4].list,(GFunc)g_free,NULL);
1677                                 g_list_free(yyvsp[-4].list);
1678                                 yyerror(_("parse error"));
1679                                 YYERROR;
1680                         }
1681
1682                         type = pop_type();
1683
1684                         var = find_var_or_die(yyvsp[-2].id, yyvsp[-5].line);
1685                         if(var->scope == PRIVATE_SCOPE)
1686                                 root = "self->_priv";
1687                         else if(var->scope == CLASS_SCOPE) {
1688                                 root = "SELF_GET_CLASS(self)";
1689                                 if(no_self_alias)
1690                                         error_print(GOB_ERROR, yyvsp[-5].line,
1691                                                     _("Self aliases needed when autolinking to a classwide member"));
1692                         } else
1693                                 root = "self";
1694
1695                         if(strcmp(yyvsp[0].id, "link")==0) {
1696                                 set = g_strdup_printf("%s->%s = ARG;",
1697                                                       root, yyvsp[-2].id);
1698                         } else if(strcmp (yyvsp[0].id, "stringlink")==0) {
1699                                 set = g_strdup_printf("g_free(%s->%s); "
1700                                                       "%s->%s = g_strdup(ARG);",
1701                                                       root, yyvsp[-2].id,
1702                                                       root, yyvsp[-2].id);
1703                         } else if(strcmp (yyvsp[0].id, "objectlink")==0) {
1704                                 set = g_strdup_printf(
1705                                   "if (ARG != NULL) "
1706                                    "gtk_object_ref (GTK_OBJECT (ARG)); "
1707                                   "if (%s->%s != NULL) "
1708                                    "gtk_object_unref (GTK_OBJECT (%s->%s)); "
1709                                   "%s->%s = ARG;",
1710                                   root, yyvsp[-2].id,
1711                                   root, yyvsp[-2].id,
1712                                   root, yyvsp[-2].id);
1713                         } else {
1714                                 g_assert_not_reached();
1715                         }
1716
1717                         if(strcmp (yyvsp[0].id, "stringlink")==0) {
1718                                 get = g_strdup_printf("ARG = g_strdup(%s->%s);", root, yyvsp[-2].id);
1719                         } else
1720                                 /* For everything else, get is just straight assignment */
1721                                 get = g_strdup_printf("ARG = %s->%s;", root, yyvsp[-2].id);
1722
1723                         g_free (yyvsp[0].id);
1724
1725
1726                         if(!type)
1727                                 type = copy_type(var->vtype);
1728
1729                         node = new_argument (yyvsp[-3].id, type, yyvsp[-4].list,
1730                                              yyvsp[-2].id, 
1731                                              get, yyvsp[-5].line,
1732                                              set, yyvsp[-5].line, 
1733                                              yyvsp[-5].line);
1734                         if (yyvsp[-1].id) {
1735                                 export_accessors (yyvsp[-2].id, 
1736                                                   g_string_new (get), yyvsp[-5].line,
1737                                                   g_string_new (set), yyvsp[-5].line,
1738                                                   type,
1739                                                   yyvsp[-5].line);
1740                         } 
1741
1742                         class_nodes = g_list_append(class_nodes,node);
1743                                                 ;
1744     break;}
1745 case 44:
1746 #line 731 "parse.y"
1747 {
1748                                                   if (strcmp (yyvsp[-1].id, "export")!=0) {
1749                                                           g_free (yyvsp[-1].id); 
1750                                                           yyerror (_("parse error"));
1751                                                           YYERROR;
1752                                                   }
1753                                                   yyval.id = yyvsp[-1].id;
1754                                                 ;
1755     break;}
1756 case 45:
1757 #line 739 "parse.y"
1758 { yyval.id = NULL; ;
1759     break;}
1760 case 46:
1761 #line 741 "parse.y"
1762 {
1763                         if(strcmp(yyvsp[-2].id,"type")!=0) {
1764                                 g_free(yyvsp[-4].id);
1765                                 g_free(yyvsp[-2].id);
1766                                 yyerror(_("parse error"));
1767                                 YYERROR;
1768                         }
1769                         yyval.id = yyvsp[-4].id;
1770                                                 ;
1771     break;}
1772 case 47:
1773 #line 750 "parse.y"
1774 {
1775                         yyval.id = yyvsp[0].id;
1776                         typestack = g_list_prepend(typestack,NULL);
1777                                                 ;
1778     break;}
1779 case 48:
1780 #line 756 "parse.y"
1781 { yyval.list = yyvsp[-1].list; ;
1782     break;}
1783 case 49:
1784 #line 757 "parse.y"
1785 { yyval.list = NULL; ;
1786     break;}
1787 case 50:
1788 #line 760 "parse.y"
1789 {
1790                         yyval.list = g_list_append(yyvsp[0].list,yyvsp[-2].id);
1791                                                 ;
1792     break;}
1793 case 51:
1794 #line 763 "parse.y"
1795 {
1796                         yyval.list = g_list_append(NULL,yyvsp[0].id);
1797                                                 ;
1798     break;}
1799 case 52:
1800 #line 769 "parse.y"
1801 {
1802                         Node *node = new_type(yyvsp[-1].id, yyvsp[0].id, NULL);
1803                         typestack = g_list_prepend(typestack,node);
1804                                                         ;
1805     break;}
1806 case 53:
1807 #line 773 "parse.y"
1808 {
1809                         Node *node = new_type(yyvsp[0].id, NULL, NULL);
1810                         typestack = g_list_prepend(typestack,node);
1811                                                         ;
1812     break;}
1813 case 54:
1814 #line 780 "parse.y"
1815 {
1816                         yyval.id = yyvsp[0].id;
1817                                                         ;
1818     break;}
1819 case 55:
1820 #line 783 "parse.y"
1821 {
1822                         yyval.id = yyvsp[0].id;
1823                                                         ;
1824     break;}
1825 case 56:
1826 #line 786 "parse.y"
1827 {
1828                         yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
1829                         g_free(yyvsp[0].id);
1830                                                         ;
1831     break;}
1832 case 57:
1833 #line 790 "parse.y"
1834 {
1835                         yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
1836                         g_free(yyvsp[-1].id);
1837                                                         ;
1838     break;}
1839 case 58:
1840 #line 794 "parse.y"
1841 {
1842                         yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
1843                         g_free(yyvsp[0].id);
1844                                                         ;
1845     break;}
1846 case 59:
1847 #line 798 "parse.y"
1848 {
1849                         yyval.id = g_strconcat("const ", yyvsp[-1].id, " ",
1850                                              yyvsp[0].id, NULL);
1851                         g_free(yyvsp[0].id);
1852                                                         ;
1853     break;}
1854 case 60:
1855 #line 803 "parse.y"
1856 {
1857                         yyval.id = g_strconcat(yyvsp[-2].id, " ",
1858                                              yyvsp[-1].id, " const", NULL);
1859                         g_free(yyvsp[-1].id);
1860                                                         ;
1861     break;}
1862 case 61:
1863 #line 811 "parse.y"
1864 {
1865                         yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
1866                         g_free(yyvsp[0].id);
1867                                                         ;
1868     break;}
1869 case 62:
1870 #line 815 "parse.y"
1871 {
1872                         yyval.id = g_strconcat(yyvsp[-1].id, " ", yyvsp[0].id, NULL);
1873                         g_free(yyvsp[-1].id);
1874                         g_free(yyvsp[0].id);
1875                                                         ;
1876     break;}
1877 case 63:
1878 #line 820 "parse.y"
1879 {
1880                         yyval.id = g_strconcat("const ", yyvsp[0].id, NULL);
1881                         g_free(yyvsp[0].id);
1882                                                         ;
1883     break;}
1884 case 64:
1885 #line 824 "parse.y"
1886 {
1887                         yyval.id = yyvsp[0].id;
1888                                                         ;
1889     break;}
1890 case 65:
1891 #line 827 "parse.y"
1892 {
1893                         yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
1894                         g_free(yyvsp[-1].id);
1895                                                         ;
1896     break;}
1897 case 66:
1898 #line 831 "parse.y"
1899 {
1900                         yyval.id = g_strdup(yyvsp[0].id);
1901                                                         ;
1902     break;}
1903 case 67:
1904 #line 834 "parse.y"
1905 {
1906                         yyval.id = g_strconcat(yyvsp[-1].id, " const", NULL);
1907                                                         ;
1908     break;}
1909 case 68:
1910 #line 839 "parse.y"
1911 { yyval.id = "void"; ;
1912     break;}
1913 case 69:
1914 #line 840 "parse.y"
1915 { yyval.id = "char"; ;
1916     break;}
1917 case 70:
1918 #line 841 "parse.y"
1919 { yyval.id = "short"; ;
1920     break;}
1921 case 71:
1922 #line 842 "parse.y"
1923 { yyval.id = "int"; ;
1924     break;}
1925 case 72:
1926 #line 843 "parse.y"
1927 { yyval.id = "long"; ;
1928     break;}
1929 case 73:
1930 #line 844 "parse.y"
1931 { yyval.id = "float"; ;
1932     break;}
1933 case 74:
1934 #line 845 "parse.y"
1935 { yyval.id = "double"; ;
1936     break;}
1937 case 75:
1938 #line 846 "parse.y"
1939 { yyval.id = "signed"; ;
1940     break;}
1941 case 76:
1942 #line 847 "parse.y"
1943 { yyval.id = "unsigned"; ;
1944     break;}
1945 case 77:
1946 #line 850 "parse.y"
1947 { yyval.id = "struct"; ;
1948     break;}
1949 case 78:
1950 #line 851 "parse.y"
1951 { yyval.id = "union"; ;
1952     break;}
1953 case 79:
1954 #line 852 "parse.y"
1955 { yyval.id = "enum"; ;
1956     break;}
1957 case 80:
1958 #line 855 "parse.y"
1959 { yyval.id = g_strdup("*"); ;
1960     break;}
1961 case 81:
1962 #line 856 "parse.y"
1963 { yyval.id = g_strdup("* const"); ;
1964     break;}
1965 case 82:
1966 #line 857 "parse.y"
1967 {
1968                                 yyval.id = g_strconcat("*", yyvsp[0].id, NULL);
1969                                 g_free(yyvsp[0].id);
1970                                         ;
1971     break;}
1972 case 83:
1973 #line 861 "parse.y"
1974 {
1975                                 yyval.id = g_strconcat("* const", yyvsp[0].id, NULL);
1976                                 g_free(yyvsp[0].id);
1977                                         ;
1978     break;}
1979 case 84:
1980 #line 868 "parse.y"
1981 {
1982                         if(strcmp(yyvsp[-1].id, "first")==0)
1983                                 yyval.sigtype = SIGNAL_FIRST_METHOD;
1984                         else if(strcmp(yyvsp[-1].id, "last")==0)
1985                                 yyval.sigtype = SIGNAL_LAST_METHOD;
1986                         else {
1987                                 yyerror(_("signal must be 'first' or 'last'"));
1988                                 g_free(yyvsp[-1].id);
1989                                 YYERROR;
1990                         }
1991                         g_free(yyvsp[-1].id);
1992                                         ;
1993     break;}
1994 case 85:
1995 #line 880 "parse.y"
1996 {
1997                         yyval.sigtype = SIGNAL_LAST_METHOD;
1998                                         ;
1999     break;}
2000 case 86:
2001 #line 886 "parse.y"
2002 {
2003                         if(strcmp(yyvsp[-1].id,"first")==0)
2004                                 yyval.sigtype = SIGNAL_FIRST_METHOD;
2005                         else if(strcmp(yyvsp[-1].id,"last")==0)
2006                                 yyval.sigtype = SIGNAL_LAST_METHOD;
2007                         else {
2008                                 yyerror(_("signal must be 'first' or 'last'"));
2009                                 g_free(yyvsp[-1].id);
2010                                 YYERROR;
2011                         }
2012                         g_free(yyvsp[-1].id);
2013                                         ;
2014     break;}
2015 case 87:
2016 #line 898 "parse.y"
2017 {
2018                         if(strcmp(yyvsp[-2].id,"first")==0)
2019                                 yyval.sigtype = SIGNAL_FIRST_METHOD;
2020                         else if(strcmp(yyvsp[-2].id,"last")==0)
2021                                 yyval.sigtype = SIGNAL_LAST_METHOD;
2022                         else {
2023                                 yyerror(_("signal must be 'first' or 'last'"));
2024                                 g_free(yyvsp[-2].id);
2025                                 YYERROR;
2026                         }
2027                         g_free(yyvsp[-2].id);
2028                                         ;
2029     break;}
2030 case 88:
2031 #line 910 "parse.y"
2032 {
2033                         yyval.sigtype = SIGNAL_LAST_METHOD;
2034                                         ;
2035     break;}
2036 case 89:
2037 #line 913 "parse.y"
2038 {
2039                         /* the_scope was default thus public */
2040                         the_scope = PUBLIC_SCOPE;
2041                                         ;
2042     break;}
2043 case 90:
2044 #line 919 "parse.y"
2045 {
2046                         gtktypes = g_list_prepend(gtktypes, yyvsp[-3].id);
2047                                                 ;
2048     break;}
2049 case 91:
2050 #line 924 "parse.y"
2051 {
2052                         gtktypes = g_list_append(gtktypes, yyvsp[0].id);
2053                                                 ;
2054     break;}
2055 case 92:
2056 #line 927 "parse.y"
2057
2058                         gtktypes = g_list_append(gtktypes, yyvsp[0].id);
2059                                                 ;
2060     break;}
2061 case 93:
2062 #line 932 "parse.y"
2063 { yyval.cbuf = yyvsp[0].cbuf; ;
2064     break;}
2065 case 94:
2066 #line 933 "parse.y"
2067 { yyval.cbuf = NULL; ;
2068     break;}
2069 case 95:
2070 #line 937 "parse.y"
2071 {
2072                         if(!has_self) {
2073                                 yyerror(_("signal without 'self' as "
2074                                           "first parameter"));
2075                                 free_all_global_state();
2076                                 YYERROR;
2077                         }
2078                         if(the_scope == CLASS_SCOPE) {
2079                                 yyerror(_("a method cannot be of class scope"));
2080                                 free_all_global_state();
2081                                 YYERROR;
2082                         }
2083                         push_function(the_scope, yyvsp[-7].sigtype,NULL,
2084                                       yyvsp[-5].id, yyvsp[0].cbuf,yyvsp[-9].line,
2085                                       ccode_line, vararg, yyvsp[-8].list);
2086                                                                         ;
2087     break;}
2088 case 96:
2089 #line 953 "parse.y"
2090 {
2091                         if(!has_self) {
2092                                 yyerror(_("signal without 'self' as "
2093                                           "first parameter"));
2094                                 free_all_global_state();
2095                                 YYERROR;
2096                         }
2097                         if(the_scope == CLASS_SCOPE) {
2098                                 yyerror(_("a method cannot be of class scope"));
2099                                 free_all_global_state();
2100                                 YYERROR;
2101                         }
2102                         push_function(the_scope, yyvsp[-7].sigtype, NULL,
2103                                       yyvsp[-5].id, yyvsp[0].cbuf, yyvsp[-9].line,
2104                                       ccode_line, vararg, yyvsp[-8].list);
2105                                                                         ;
2106     break;}
2107 case 97:
2108 #line 969 "parse.y"
2109 {
2110                         if(!has_self) {
2111                                 yyerror(_("virtual method without 'self' as "
2112                                           "first parameter"));
2113                                 free_all_global_state();
2114                                 YYERROR;
2115                         }
2116                         if(the_scope == CLASS_SCOPE) {
2117                                 yyerror(_("a method cannot be of class scope"));
2118                                 free_all_global_state();
2119                                 YYERROR;
2120                         }
2121                         push_function(the_scope, VIRTUAL_METHOD, NULL, yyvsp[-5].id,
2122                                       yyvsp[0].cbuf, yyvsp[-8].line,
2123                                       ccode_line, vararg, NULL);
2124                                                                         ;
2125     break;}
2126 case 98:
2127 #line 985 "parse.y"
2128 {
2129                         if(!has_self) {
2130                                 yyerror(_("virtual method without 'self' as "
2131                                           "first parameter"));
2132                                 free_all_global_state();
2133                                 YYERROR;
2134                         }
2135                         if(the_scope == CLASS_SCOPE) {
2136                                 yyerror(_("a method cannot be of class scope"));
2137                                 free_all_global_state();
2138                                 YYERROR;
2139                         }
2140                         push_function(the_scope, VIRTUAL_METHOD, NULL, yyvsp[-5].id,
2141                                       yyvsp[0].cbuf, yyvsp[-7].line,
2142                                       ccode_line, vararg, NULL);
2143                                                                         ;
2144     break;}
2145 case 99:
2146 #line 1001 "parse.y"
2147 {
2148                         if(!has_self) {
2149                                 yyerror(_("virtual method without 'self' as "
2150                                           "first parameter"));
2151                                 free_all_global_state();
2152                                 YYERROR;
2153                         }
2154                         push_function(PUBLIC_SCOPE, VIRTUAL_METHOD, NULL,
2155                                       yyvsp[-5].id, yyvsp[0].cbuf, yyvsp[-7].line,
2156                                       ccode_line, vararg, NULL);
2157                                                                         ;
2158     break;}
2159 case 100:
2160 #line 1012 "parse.y"
2161 {
2162                         push_function(NO_SCOPE, OVERRIDE_METHOD, yyvsp[-8].id,
2163                                       yyvsp[-5].id, yyvsp[0].cbuf,
2164                                       yyvsp[-10].line, ccode_line,
2165                                       vararg, NULL);
2166                                                                         ;
2167     break;}
2168 case 101:
2169 #line 1018 "parse.y"
2170 {
2171                         if(the_scope == CLASS_SCOPE) {
2172                                 yyerror(_("a method cannot be of class scope"));
2173                                 free_all_global_state();
2174                                 YYERROR;
2175                         }
2176                         push_function(the_scope, REGULAR_METHOD, NULL, yyvsp[-5].id,
2177                                       yyvsp[0].cbuf, yyvsp[-7].line, ccode_line,
2178                                       vararg, NULL);
2179                                                                 ;
2180     break;}
2181 case 102:
2182 #line 1028 "parse.y"
2183 {
2184                         if(strcmp(yyvsp[-4].id, "init")==0) {
2185                                 push_init_arg(yyvsp[-2].id,FALSE);
2186                                 push_function(NO_SCOPE, INIT_METHOD, NULL,
2187                                               yyvsp[-4].id, yyvsp[0].cbuf, yyvsp[-3].line,
2188                                               ccode_line, FALSE, NULL);
2189                         } else if(strcmp(yyvsp[-4].id, "class_init")==0) {
2190                                 push_init_arg(yyvsp[-2].id,TRUE);
2191                                 push_function(NO_SCOPE, CLASS_INIT_METHOD, NULL,
2192                                               yyvsp[-4].id, yyvsp[0].cbuf, yyvsp[-3].line,
2193                                               ccode_line, FALSE, NULL);
2194                         } else {
2195                                 g_free(yyvsp[-4].id);
2196                                 g_free(yyvsp[-2].id);
2197                                 g_string_free(yyvsp[0].cbuf,TRUE);
2198                                 yyerror(_("parse error "
2199                                           "(untyped blocks must be init or "
2200                                           "class_init)"));
2201                                 YYERROR;
2202                         }
2203                                                 ;
2204     break;}
2205 case 103:
2206 #line 1051 "parse.y"
2207 {
2208                         g_free(onerror); onerror = NULL;
2209                         g_free(defreturn); defreturn = NULL;
2210                         if(!set_return_value(yyvsp[-1].id, yyvsp[0].id)) {
2211                                 g_free(yyvsp[-1].id);
2212                                 g_free(yyvsp[0].id);
2213                                 yyerror(_("parse error"));
2214                                 YYERROR;
2215                         }
2216                         g_free(yyvsp[-1].id);
2217                                         ;
2218     break;}
2219 case 104:
2220 #line 1062 "parse.y"
2221 {
2222                         g_free(onerror); onerror = NULL;
2223                         g_free(defreturn); defreturn = NULL;
2224                         if(!set_return_value(yyvsp[-3].id, yyvsp[-2].id)) {
2225                                 g_free(yyvsp[-3].id); g_free(yyvsp[-2].id);
2226                                 g_free(yyvsp[-1].id); g_free(yyvsp[0].id);
2227                                 yyerror(_("parse error"));
2228                                 YYERROR;
2229                         }
2230                         if(!set_return_value(yyvsp[-1].id, yyvsp[0].id)) {
2231                                 onerror = defreturn = NULL;
2232                                 g_free(yyvsp[-3].id); g_free(yyvsp[-2].id);
2233                                 g_free(yyvsp[-1].id); g_free(yyvsp[0].id);
2234                                 yyerror(_("parse error"));
2235                                 YYERROR;
2236                         }
2237                         g_free(yyvsp[-3].id);
2238                         g_free(yyvsp[-1].id);
2239                                                 ;
2240     break;}
2241 case 105:
2242 #line 1081 "parse.y"
2243 {
2244                         g_free(onerror); onerror = NULL;
2245                         g_free(defreturn); defreturn = NULL;
2246                                         ;
2247     break;}
2248 case 106:
2249 #line 1087 "parse.y"
2250 { yyval.id = yyvsp[0].id; ;
2251     break;}
2252 case 107:
2253 #line 1088 "parse.y"
2254 {
2255                         yyval.id = (yyvsp[1].cbuf)->str;
2256                         g_string_free(yyvsp[1].cbuf, FALSE);
2257                                         ;
2258     break;}
2259 case 108:
2260 #line 1094 "parse.y"
2261 { vararg = FALSE; has_self = FALSE; ;
2262     break;}
2263 case 109:
2264 #line 1095 "parse.y"
2265 {
2266                         vararg = FALSE;
2267                         has_self = TRUE;
2268                         if(strcmp(yyvsp[0].id,"self")==0)
2269                                 push_self(yyvsp[0].id, FALSE);
2270                         else {
2271                                 g_free(yyvsp[0].id);
2272                                 yyerror(_("parse error"));
2273                                 YYERROR;
2274                         }
2275                                         ;
2276     break;}
2277 case 110:
2278 #line 1106 "parse.y"
2279 {
2280                         vararg = FALSE;
2281                         has_self = TRUE;
2282                         if(strcmp(yyvsp[-1].id,"self")==0)
2283                                 push_self(yyvsp[-1].id, TRUE);
2284                         else {
2285                                 g_free(yyvsp[-1].id);
2286                                 yyerror(_("parse error"));
2287                                 YYERROR;
2288                         }
2289                                         ;
2290     break;}
2291 case 111:
2292 #line 1117 "parse.y"
2293 {
2294                         vararg = FALSE;
2295                         has_self = TRUE;
2296                         if(strcmp(yyvsp[0].id,"self")==0)
2297                                 push_self(yyvsp[0].id, TRUE);
2298                         else {
2299                                 g_free(yyvsp[0].id);
2300                                 yyerror(_("parse error"));
2301                                 YYERROR;
2302                         }
2303                                         ;
2304     break;}
2305 case 112:
2306 #line 1128 "parse.y"
2307 {
2308                         has_self = TRUE;
2309                         if(strcmp(yyvsp[-2].id,"self")==0)
2310                                 push_self(yyvsp[-2].id, FALSE);
2311                         else {
2312                                 g_free(yyvsp[-2].id);
2313                                 yyerror(_("parse error"));
2314                                 YYERROR;
2315                         }
2316                                         ;
2317     break;}
2318 case 113:
2319 #line 1138 "parse.y"
2320 {
2321                         has_self = TRUE;
2322                         if(strcmp(yyvsp[-3].id,"self")==0)
2323                                 push_self(yyvsp[-3].id, TRUE);
2324                         else {
2325                                 g_free(yyvsp[-3].id);
2326                                 yyerror(_("parse error"));
2327                                 YYERROR;
2328                         }
2329                                         ;
2330     break;}
2331 case 114:
2332 #line 1148 "parse.y"
2333 {
2334                         has_self = TRUE;
2335                         if(strcmp(yyvsp[-2].id,"self")==0)
2336                                 push_self(yyvsp[-2].id, TRUE);
2337                         else {
2338                                 g_free(yyvsp[-2].id);
2339                                 yyerror(_("parse error"));
2340                                 YYERROR;
2341                         }
2342                                         ;
2343     break;}
2344 case 115:
2345 #line 1158 "parse.y"
2346 { has_self = FALSE; ;
2347     break;}
2348 case 116:
2349 #line 1161 "parse.y"
2350 { vararg = TRUE; ;
2351     break;}
2352 case 117:
2353 #line 1162 "parse.y"
2354 { vararg = FALSE; ;
2355     break;}
2356 case 118:
2357 #line 1165 "parse.y"
2358 { ; ;
2359     break;}
2360 case 119:
2361 #line 1166 "parse.y"
2362 { ; ;
2363     break;}
2364 case 120:
2365 #line 1169 "parse.y"
2366 {
2367                         push_funcarg(yyvsp[0].id,NULL);
2368                                                                 ;
2369     break;}
2370 case 121:
2371 #line 1172 "parse.y"
2372 {
2373                         push_funcarg(yyvsp[-1].id,yyvsp[0].id);
2374                                                                 ;
2375     break;}
2376 case 122:
2377 #line 1175 "parse.y"
2378 {
2379                         if(strcmp(yyvsp[-2].id,"check")!=0) {
2380                                 yyerror(_("parse error"));
2381                                 YYERROR;
2382                         }
2383                         g_free(yyvsp[-2].id);
2384                         push_funcarg(yyvsp[-4].id,NULL);
2385                                                                 ;
2386     break;}
2387 case 123:
2388 #line 1183 "parse.y"
2389 {
2390                         if(strcmp(yyvsp[-2].id,"check")!=0) {
2391                                 yyerror(_("parse error"));
2392                                 YYERROR;
2393                         }
2394                         g_free(yyvsp[-2].id);
2395                         push_funcarg(yyvsp[-5].id,yyvsp[-4].id);
2396                                                                 ;
2397     break;}
2398 case 124:
2399 #line 1193 "parse.y"
2400 { ; ;
2401     break;}
2402 case 125:
2403 #line 1194 "parse.y"
2404 { ; ;
2405     break;}
2406 case 126:
2407 #line 1197 "parse.y"
2408 {
2409                         if(strcmp(yyvsp[0].id,"type")==0) {
2410                                 Node *node = new_check(TYPE_CHECK,NULL);
2411                                 checks = g_list_append(checks,node);
2412                         } else if(strcmp(yyvsp[0].id,"null")==0) {
2413                                 Node *node = new_check(NULL_CHECK,NULL);
2414                                 checks = g_list_append(checks,node);
2415                         } else {
2416                                 yyerror(_("parse error"));
2417                                 YYERROR;
2418                         }
2419                         g_free(yyvsp[0].id);
2420                                         ;
2421     break;}
2422 case 127:
2423 #line 1210 "parse.y"
2424 {
2425                         Node *node = new_check(GT_CHECK,yyvsp[0].id);
2426                         checks = g_list_append(checks,node);
2427                                         ;
2428     break;}
2429 case 128:
2430 #line 1214 "parse.y"
2431 {
2432                         Node *node = new_check(LT_CHECK,yyvsp[0].id);
2433                         checks = g_list_append(checks,node);
2434                                         ;
2435     break;}
2436 case 129:
2437 #line 1218 "parse.y"
2438 {
2439                         Node *node = new_check(GE_CHECK,yyvsp[0].id);
2440                         checks = g_list_append(checks,node);
2441                                         ;
2442     break;}
2443 case 130:
2444 #line 1222 "parse.y"
2445 {
2446                         Node *node = new_check(LE_CHECK,yyvsp[0].id);
2447                         checks = g_list_append(checks,node);
2448                                         ;
2449     break;}
2450 case 131:
2451 #line 1226 "parse.y"
2452 {
2453                         Node *node = new_check(EQ_CHECK,yyvsp[0].id);
2454                         checks = g_list_append(checks,node);
2455                                         ;
2456     break;}
2457 case 132:
2458 #line 1230 "parse.y"
2459 {
2460                         Node *node = new_check(NE_CHECK,yyvsp[0].id);
2461                         checks = g_list_append(checks,node);
2462                                         ;
2463     break;}
2464 case 133:
2465 #line 1236 "parse.y"
2466 { yyval.id = yyvsp[0].id; ;
2467     break;}
2468 case 134:
2469 #line 1237 "parse.y"
2470 {
2471                         yyval.id = g_strconcat("-",yyvsp[0].id,NULL);
2472                         g_free(yyvsp[0].id);
2473                                         ;
2474     break;}
2475 case 135:
2476 #line 1241 "parse.y"
2477 { yyval.id = yyvsp[0].id; ;
2478     break;}
2479 }
2480    /* the action file gets copied in in place of this dollarsign */
2481 #line 543 "/usr/lib/bison.simple"
2482 \f
2483   yyvsp -= yylen;
2484   yyssp -= yylen;
2485 #ifdef YYLSP_NEEDED
2486   yylsp -= yylen;
2487 #endif
2488
2489 #if YYDEBUG != 0
2490   if (yydebug)
2491     {
2492       short *ssp1 = yyss - 1;
2493       fprintf (stderr, "state stack now");
2494       while (ssp1 != yyssp)
2495         fprintf (stderr, " %d", *++ssp1);
2496       fprintf (stderr, "\n");
2497     }
2498 #endif
2499
2500   *++yyvsp = yyval;
2501
2502 #ifdef YYLSP_NEEDED
2503   yylsp++;
2504   if (yylen == 0)
2505     {
2506       yylsp->first_line = yylloc.first_line;
2507       yylsp->first_column = yylloc.first_column;
2508       yylsp->last_line = (yylsp-1)->last_line;
2509       yylsp->last_column = (yylsp-1)->last_column;
2510       yylsp->text = 0;
2511     }
2512   else
2513     {
2514       yylsp->last_line = (yylsp+yylen-1)->last_line;
2515       yylsp->last_column = (yylsp+yylen-1)->last_column;
2516     }
2517 #endif
2518
2519   /* Now "shift" the result of the reduction.
2520      Determine what state that goes to,
2521      based on the state we popped back to
2522      and the rule number reduced by.  */
2523
2524   yyn = yyr1[yyn];
2525
2526   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
2527   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2528     yystate = yytable[yystate];
2529   else
2530     yystate = yydefgoto[yyn - YYNTBASE];
2531
2532   goto yynewstate;
2533
2534 yyerrlab:   /* here on detecting error */
2535
2536   if (! yyerrstatus)
2537     /* If not already recovering from an error, report this error.  */
2538     {
2539       ++yynerrs;
2540
2541 #ifdef YYERROR_VERBOSE
2542       yyn = yypact[yystate];
2543
2544       if (yyn > YYFLAG && yyn < YYLAST)
2545         {
2546           int size = 0;
2547           char *msg;
2548           int x, count;
2549
2550           count = 0;
2551           /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
2552           for (x = (yyn < 0 ? -yyn : 0);
2553                x < (sizeof(yytname) / sizeof(char *)); x++)
2554             if (yycheck[x + yyn] == x)
2555               size += strlen(yytname[x]) + 15, count++;
2556           msg = (char *) malloc(size + 15);
2557           if (msg != 0)
2558             {
2559               strcpy(msg, "parse error");
2560
2561               if (count < 5)
2562                 {
2563                   count = 0;
2564                   for (x = (yyn < 0 ? -yyn : 0);
2565                        x < (sizeof(yytname) / sizeof(char *)); x++)
2566                     if (yycheck[x + yyn] == x)
2567                       {
2568                         strcat(msg, count == 0 ? ", expecting `" : " or `");
2569                         strcat(msg, yytname[x]);
2570                         strcat(msg, "'");
2571                         count++;
2572                       }
2573                 }
2574               yyerror(msg);
2575               free(msg);
2576             }
2577           else
2578             yyerror ("parse error; also virtual memory exceeded");
2579         }
2580       else
2581 #endif /* YYERROR_VERBOSE */
2582         yyerror("parse error");
2583     }
2584
2585   goto yyerrlab1;
2586 yyerrlab1:   /* here on error raised explicitly by an action */
2587
2588   if (yyerrstatus == 3)
2589     {
2590       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
2591
2592       /* return failure if at end of input */
2593       if (yychar == YYEOF)
2594         YYABORT;
2595
2596 #if YYDEBUG != 0
2597       if (yydebug)
2598         fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
2599 #endif
2600
2601       yychar = YYEMPTY;
2602     }
2603
2604   /* Else will try to reuse lookahead token
2605      after shifting the error token.  */
2606
2607   yyerrstatus = 3;              /* Each real token shifted decrements this */
2608
2609   goto yyerrhandle;
2610
2611 yyerrdefault:  /* current state does not do anything special for the error token. */
2612
2613 #if 0
2614   /* This is wrong; only states that explicitly want error tokens
2615      should shift them.  */
2616   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
2617   if (yyn) goto yydefault;
2618 #endif
2619
2620 yyerrpop:   /* pop the current state because it cannot handle the error token */
2621
2622   if (yyssp == yyss) YYABORT;
2623   yyvsp--;
2624   yystate = *--yyssp;
2625 #ifdef YYLSP_NEEDED
2626   yylsp--;
2627 #endif
2628
2629 #if YYDEBUG != 0
2630   if (yydebug)
2631     {
2632       short *ssp1 = yyss - 1;
2633       fprintf (stderr, "Error: state stack now");
2634       while (ssp1 != yyssp)
2635         fprintf (stderr, " %d", *++ssp1);
2636       fprintf (stderr, "\n");
2637     }
2638 #endif
2639
2640 yyerrhandle:
2641
2642   yyn = yypact[yystate];
2643   if (yyn == YYFLAG)
2644     goto yyerrdefault;
2645
2646   yyn += YYTERROR;
2647   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
2648     goto yyerrdefault;
2649
2650   yyn = yytable[yyn];
2651   if (yyn < 0)
2652     {
2653       if (yyn == YYFLAG)
2654         goto yyerrpop;
2655       yyn = -yyn;
2656       goto yyreduce;
2657     }
2658   else if (yyn == 0)
2659     goto yyerrpop;
2660
2661   if (yyn == YYFINAL)
2662     YYACCEPT;
2663
2664 #if YYDEBUG != 0
2665   if (yydebug)
2666     fprintf(stderr, "Shifting error token, ");
2667 #endif
2668
2669   *++yyvsp = yylval;
2670 #ifdef YYLSP_NEEDED
2671   *++yylsp = yylloc;
2672 #endif
2673
2674   yystate = yyn;
2675   goto yynewstate;
2676
2677  yyacceptlab:
2678   /* YYACCEPT comes here.  */
2679   if (yyfree_stacks)
2680     {
2681       free (yyss);
2682       free (yyvs);
2683 #ifdef YYLSP_NEEDED
2684       free (yyls);
2685 #endif
2686     }
2687   return 0;
2688
2689  yyabortlab:
2690   /* YYABORT comes here.  */
2691   if (yyfree_stacks)
2692     {
2693       free (yyss);
2694       free (yyvs);
2695 #ifdef YYLSP_NEEDED
2696       free (yyls);
2697 #endif
2698     }
2699   return 1;
2700 }
2701 #line 1244 "parse.y"
2702