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