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