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