]>
Commit | Line | Data |
---|---|---|
f9d504b6 | 1 | diff -ur bacisrc.old/ccomp/lex.c bacisrc/ccomp/lex.c |
2 | --- bacisrc.old/ccomp/lex.c 2005-11-06 13:40:54.054437774 +0100 | |
3 | +++ bacisrc/ccomp/lex.c 2005-10-27 15:02:05.000000000 +0200 | |
4 | @@ -2287,6 +2287,9 @@ | |
5 | /* | |
6 | * | |
7 | * $Log$ | |
8 | + * Revision 2.15 2005/10/26 20:03:23 bynum | |
9 | + * remove extraneous test in get_escape | |
10 | + * | |
11 | * Revision 2.14 2004/04/13 15:39:50 bynum | |
12 | * add \r case to get rid of errors when reading MS-DOS/WIN source files | |
13 | * | |
14 | diff -ur bacisrc.old/pascomp/bapascal.l bacisrc/pascomp/bapascal.l | |
15 | --- bacisrc.old/pascomp/bapascal.l 2004-04-15 13:31:24.000000000 +0200 | |
16 | +++ bacisrc/pascomp/bapascal.l 2005-10-27 15:02:05.000000000 +0200 | |
17 | @@ -388,7 +388,7 @@ | |
18 | } | |
19 | } while (reading); | |
20 | } | |
21 | - return ((esc < 256) ? esc : 0x20); | |
22 | + return esc; | |
23 | } | |
24 | ||
25 | void get_string(char termch) | |
26 | @@ -437,6 +437,9 @@ | |
27 | /* | |
28 | * | |
29 | * $Log$ | |
30 | + * Revision 2.11 2005/10/27 12:56:33 bynum | |
31 | + * remove extraneous test in get_escape | |
32 | + * | |
33 | * Revision 2.10 2004/04/13 15:43:15 bynum | |
34 | * add \r case to get rid of errors when readin MS-DOS/WIN prepared source | |
35 | * | |
36 | diff -ur bacisrc.old/pascomp/bapascal.y bacisrc/pascomp/bapascal.y | |
37 | --- bacisrc.old/pascomp/bapascal.y 2004-04-15 13:31:24.000000000 +0200 | |
38 | +++ bacisrc/pascomp/bapascal.y 2005-10-27 15:02:05.000000000 +0200 | |
39 | @@ -1077,10 +1077,6 @@ | |
40 | (tab[last_pf].adr == SP_WRITELN))){ | |
41 | emit1(WRITE_RAWSTRING,tmp); | |
42 | } | |
43 | - else if (first_stringerr){ | |
44 | - yyerror("RAW STRING parameter not allowed"); | |
45 | - first_stringerr = 0; | |
46 | - } | |
47 | parmct++; | |
48 | } | |
49 | ; | |
50 | @@ -1101,7 +1097,7 @@ | |
51 | else{ | |
52 | pfstack[toppfs].tix = last_pf = last_pfv; | |
53 | pfstack[toppfs].pct = parmct = 0; | |
54 | - first_stringerr = first_parmcterr = 1; | |
55 | + first_parmcterr = 1; | |
56 | if (tab[last_pf].lev != -1){ /* regular proc call */ | |
57 | if ((tab[last_pf].mon)&&(tab[prt].mon)&& | |
58 | (tab[last_pf].mon != tab[prt].mon)) | |
59 | @@ -1492,7 +1488,7 @@ | |
60 | else{ /* legal func call */ | |
61 | pfstack[toppfs].tix = last_pf = last_pfv; | |
62 | pfstack[toppfs].pct = parmct = 0; | |
63 | - first_stringerr = first_parmcterr = 1; | |
64 | + first_parmcterr = 1; | |
65 | if (tab[last_pf].lev != -1){ /* regular proc call */ | |
66 | if ((tab[last_pf].mon)&&(tab[prt].mon)&& | |
67 | (tab[last_pf].mon != tab[prt].mon)) | |
68 | @@ -1773,6 +1769,9 @@ | |
69 | /* | |
70 | * | |
71 | * $Log$ | |
72 | + * Revision 2.17 2005/10/27 12:58:24 bynum | |
73 | + * remove first_stringerr, correct minor errors | |
74 | + * | |
75 | * Revision 2.16 2003/05/13 14:01:23 bynum | |
76 | * add boolean initializers, fix proc nesting | |
77 | * | |
78 | diff -ur bacisrc.old/pascomp/gram.c bacisrc/pascomp/gram.c | |
79 | --- bacisrc.old/pascomp/gram.c 2004-04-15 13:31:24.000000000 +0200 | |
80 | +++ bacisrc/pascomp/gram.c 2005-10-27 15:02:05.000000000 +0200 | |
81 | @@ -1,62 +1,171 @@ | |
82 | -/* A Bison parser, made from bapascal.y | |
83 | - by GNU bison 1.35. */ | |
84 | +/* A Bison parser, made by GNU Bison 1.875. */ | |
85 | ||
86 | -#define YYBISON 1 /* Identify Bison output. */ | |
87 | +/* Skeleton parser for Yacc-like parsing with Bison, | |
88 | + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. | |
89 | ||
90 | -# define UNSIGNED_INT 257 | |
91 | -# define STRING 258 | |
92 | -# define RAWSTRING 259 | |
93 | -# define STRINGCONCAT 260 | |
94 | -# define STRINGCOMPARE 261 | |
95 | -# define STRINGCOPY 262 | |
96 | -# define STRINGLENGTH 263 | |
97 | -# define SSCANF 264 | |
98 | -# define SPRINTF 265 | |
99 | -# define IDENTIFIER 266 | |
100 | -# define CHAR 267 | |
101 | -# define INT 268 | |
102 | -# define NE 269 | |
103 | -# define LE 270 | |
104 | -# define GE 271 | |
105 | -# define BECOMES 272 | |
106 | -# define DIV 273 | |
107 | -# define MOD 274 | |
108 | -# define OR 275 | |
109 | -# define AND 276 | |
110 | -# define NOT 277 | |
111 | -# define DOTDOT 278 | |
112 | -# define IF 279 | |
113 | -# define THEN 280 | |
114 | -# define ELSE 281 | |
115 | -# define CASE 282 | |
116 | -# define OF 283 | |
117 | -# define REPEAT 284 | |
118 | -# define UNTIL 285 | |
119 | -# define WHILE 286 | |
120 | -# define DO 287 | |
121 | -# define FOR 288 | |
122 | -# define TO 289 | |
123 | -# define CBEGIN 290 | |
124 | -# define SBEGIN 291 | |
125 | -# define END 292 | |
126 | -# define CEND 293 | |
127 | -# define CONST 294 | |
128 | -# define VAR 295 | |
129 | -# define TYPE 296 | |
130 | -# define ARRAY 297 | |
131 | -# define FUNCTION 298 | |
132 | -# define MONITOR 299 | |
133 | -# define PROCEDURE 300 | |
134 | -# define PROGRAM 301 | |
135 | -# define INCLUDE 302 | |
136 | -# define ATOMIC 303 | |
137 | -# define FNSTRING 304 | |
138 | -# define SEND 305 | |
139 | -# define RECEIVE 306 | |
140 | -# define BROADCAST 307 | |
141 | -# define EXTERNAL 308 | |
142 | -# define LOWER_THAN_ELSE 309 | |
143 | + This program is free software; you can redistribute it and/or modify | |
144 | + it under the terms of the GNU General Public License as published by | |
145 | + the Free Software Foundation; either version 2, or (at your option) | |
146 | + any later version. | |
147 | + | |
148 | + This program is distributed in the hope that it will be useful, | |
149 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
150 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
151 | + GNU General Public License for more details. | |
152 | + | |
153 | + You should have received a copy of the GNU General Public License | |
154 | + along with this program; if not, write to the Free Software | |
155 | + Foundation, Inc., 59 Temple Place - Suite 330, | |
156 | + Boston, MA 02111-1307, USA. */ | |
157 | + | |
158 | +/* As a special exception, when this file is copied by Bison into a | |
159 | + Bison output file, you may use that output file without restriction. | |
160 | + This special exception was added by the Free Software Foundation | |
161 | + in version 1.24 of Bison. */ | |
162 | + | |
163 | +/* Written by Richard Stallman by simplifying the original so called | |
164 | + ``semantic'' parser. */ | |
165 | + | |
166 | +/* All symbols defined below should begin with yy or YY, to avoid | |
167 | + infringing on user name space. This should be done even for local | |
168 | + variables, as they might otherwise be expanded by user macros. | |
169 | + There are some unavoidable exceptions within include files to | |
170 | + define necessary library symbols; they are noted "INFRINGES ON | |
171 | + USER NAME SPACE" below. */ | |
172 | + | |
173 | +/* Identify Bison output. */ | |
174 | +#define YYBISON 1 | |
175 | + | |
176 | +/* Skeleton name. */ | |
177 | +#define YYSKELETON_NAME "yacc.c" | |
178 | ||
179 | +/* Pure parsers. */ | |
180 | +#define YYPURE 0 | |
181 | + | |
182 | +/* Using locations. */ | |
183 | +#define YYLSP_NEEDED 0 | |
184 | + | |
185 | + | |
186 | + | |
187 | +/* Tokens. */ | |
188 | +#ifndef YYTOKENTYPE | |
189 | +# define YYTOKENTYPE | |
190 | + /* Put the tokens into the symbol table, so that GDB and other debuggers | |
191 | + know about them. */ | |
192 | + enum yytokentype { | |
193 | + UNSIGNED_INT = 258, | |
194 | + STRING = 259, | |
195 | + RAWSTRING = 260, | |
196 | + STRINGCONCAT = 261, | |
197 | + STRINGCOMPARE = 262, | |
198 | + STRINGCOPY = 263, | |
199 | + STRINGLENGTH = 264, | |
200 | + SSCANF = 265, | |
201 | + SPRINTF = 266, | |
202 | + IDENTIFIER = 267, | |
203 | + CHAR = 268, | |
204 | + INT = 269, | |
205 | + NE = 270, | |
206 | + LE = 271, | |
207 | + GE = 272, | |
208 | + BECOMES = 273, | |
209 | + DIV = 274, | |
210 | + MOD = 275, | |
211 | + OR = 276, | |
212 | + AND = 277, | |
213 | + NOT = 278, | |
214 | + DOTDOT = 279, | |
215 | + IF = 280, | |
216 | + THEN = 281, | |
217 | + ELSE = 282, | |
218 | + CASE = 283, | |
219 | + OF = 284, | |
220 | + REPEAT = 285, | |
221 | + UNTIL = 286, | |
222 | + WHILE = 287, | |
223 | + DO = 288, | |
224 | + FOR = 289, | |
225 | + TO = 290, | |
226 | + CBEGIN = 291, | |
227 | + SBEGIN = 292, | |
228 | + END = 293, | |
229 | + CEND = 294, | |
230 | + CONST = 295, | |
231 | + VAR = 296, | |
232 | + TYPE = 297, | |
233 | + ARRAY = 298, | |
234 | + FUNCTION = 299, | |
235 | + MONITOR = 300, | |
236 | + PROCEDURE = 301, | |
237 | + PROGRAM = 302, | |
238 | + INCLUDE = 303, | |
239 | + ATOMIC = 304, | |
240 | + FNSTRING = 305, | |
241 | + SEND = 306, | |
242 | + RECEIVE = 307, | |
243 | + BROADCAST = 308, | |
244 | + EXTERNAL = 309, | |
245 | + LOWER_THAN_ELSE = 310 | |
246 | + }; | |
247 | +#endif | |
248 | +#define UNSIGNED_INT 258 | |
249 | +#define STRING 259 | |
250 | +#define RAWSTRING 260 | |
251 | +#define STRINGCONCAT 261 | |
252 | +#define STRINGCOMPARE 262 | |
253 | +#define STRINGCOPY 263 | |
254 | +#define STRINGLENGTH 264 | |
255 | +#define SSCANF 265 | |
256 | +#define SPRINTF 266 | |
257 | +#define IDENTIFIER 267 | |
258 | +#define CHAR 268 | |
259 | +#define INT 269 | |
260 | +#define NE 270 | |
261 | +#define LE 271 | |
262 | +#define GE 272 | |
263 | +#define BECOMES 273 | |
264 | +#define DIV 274 | |
265 | +#define MOD 275 | |
266 | +#define OR 276 | |
267 | +#define AND 277 | |
268 | +#define NOT 278 | |
269 | +#define DOTDOT 279 | |
270 | +#define IF 280 | |
271 | +#define THEN 281 | |
272 | +#define ELSE 282 | |
273 | +#define CASE 283 | |
274 | +#define OF 284 | |
275 | +#define REPEAT 285 | |
276 | +#define UNTIL 286 | |
277 | +#define WHILE 287 | |
278 | +#define DO 288 | |
279 | +#define FOR 289 | |
280 | +#define TO 290 | |
281 | +#define CBEGIN 291 | |
282 | +#define SBEGIN 292 | |
283 | +#define END 293 | |
284 | +#define CEND 294 | |
285 | +#define CONST 295 | |
286 | +#define VAR 296 | |
287 | +#define TYPE 297 | |
288 | +#define ARRAY 298 | |
289 | +#define FUNCTION 299 | |
290 | +#define MONITOR 300 | |
291 | +#define PROCEDURE 301 | |
292 | +#define PROGRAM 302 | |
293 | +#define INCLUDE 303 | |
294 | +#define ATOMIC 304 | |
295 | +#define FNSTRING 305 | |
296 | +#define SEND 306 | |
297 | +#define RECEIVE 307 | |
298 | +#define BROADCAST 308 | |
299 | +#define EXTERNAL 309 | |
300 | +#define LOWER_THAN_ELSE 310 | |
301 | + | |
302 | + | |
303 | + | |
304 | + | |
305 | +/* Copy the first part of user declarations. */ | |
306 | #line 1 "bapascal.y" | |
307 | ||
308 | /* yacc grammar for BenAri Concurrent Pascal */ | |
309 | @@ -183,25 +292,153 @@ | |
310 | #define emit_push_addr(x) (\ | |
311 | emit2(((x).normal ? LOAD_ADDR : LOAD_VALUE), (x).lev, (x).adr)) | |
312 | ||
313 | -#ifndef YYSTYPE | |
314 | -# define YYSTYPE int | |
315 | -# define YYSTYPE_IS_TRIVIAL 1 | |
316 | -#endif | |
317 | + | |
318 | + | |
319 | +/* Enabling traces. */ | |
320 | #ifndef YYDEBUG | |
321 | # define YYDEBUG 1 | |
322 | #endif | |
323 | ||
324 | +/* Enabling verbose error messages. */ | |
325 | +#ifdef YYERROR_VERBOSE | |
326 | +# undef YYERROR_VERBOSE | |
327 | +# define YYERROR_VERBOSE 1 | |
328 | +#else | |
329 | +# define YYERROR_VERBOSE 0 | |
330 | +#endif | |
331 | + | |
332 | +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) | |
333 | +typedef int YYSTYPE; | |
334 | +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ | |
335 | +# define YYSTYPE_IS_DECLARED 1 | |
336 | +# define YYSTYPE_IS_TRIVIAL 1 | |
337 | +#endif | |
338 | + | |
339 | + | |
340 | + | |
341 | +/* Copy the second part of user declarations. */ | |
342 | + | |
343 | + | |
344 | +/* Line 214 of yacc.c. */ | |
345 | +#line 323 "y.tab.c" | |
346 | + | |
347 | +#if ! defined (yyoverflow) || YYERROR_VERBOSE | |
348 | + | |
349 | +/* The parser invokes alloca or malloc; define the necessary symbols. */ | |
350 | + | |
351 | +# if YYSTACK_USE_ALLOCA | |
352 | +# define YYSTACK_ALLOC alloca | |
353 | +# else | |
354 | +# ifndef YYSTACK_USE_ALLOCA | |
355 | +# if defined (alloca) || defined (_ALLOCA_H) | |
356 | +# define YYSTACK_ALLOC alloca | |
357 | +# else | |
358 | +# ifdef __GNUC__ | |
359 | +# define YYSTACK_ALLOC __builtin_alloca | |
360 | +# endif | |
361 | +# endif | |
362 | +# endif | |
363 | +# endif | |
364 | ||
365 | +# ifdef YYSTACK_ALLOC | |
366 | + /* Pacify GCC's `empty if-body' warning. */ | |
367 | +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) | |
368 | +# else | |
369 | +# if defined (__STDC__) || defined (__cplusplus) | |
370 | +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
371 | +# define YYSIZE_T size_t | |
372 | +# endif | |
373 | +# define YYSTACK_ALLOC malloc | |
374 | +# define YYSTACK_FREE free | |
375 | +# endif | |
376 | +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ | |
377 | ||
378 | -#define YYFINAL 368 | |
379 | -#define YYFLAG -32768 | |
380 | -#define YYNTBASE 71 | |
381 | ||
382 | -/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ | |
383 | -#define YYTRANSLATE(x) ((unsigned)(x) <= 309 ? yytranslate[x] : 192) | |
384 | +#if (! defined (yyoverflow) \ | |
385 | + && (! defined (__cplusplus) \ | |
386 | + || (YYSTYPE_IS_TRIVIAL))) | |
387 | ||
388 | -/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ | |
389 | -static const char yytranslate[] = | |
390 | +/* A type that is properly aligned for any stack member. */ | |
391 | +union yyalloc | |
392 | +{ | |
393 | + short yyss; | |
394 | + YYSTYPE yyvs; | |
395 | + }; | |
396 | + | |
397 | +/* The size of the maximum gap between one aligned stack and the next. */ | |
398 | +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) | |
399 | + | |
400 | +/* The size of an array large to enough to hold all stacks, each with | |
401 | + N elements. */ | |
402 | +# define YYSTACK_BYTES(N) \ | |
403 | + ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ | |
404 | + + YYSTACK_GAP_MAXIMUM) | |
405 | + | |
406 | +/* Copy COUNT objects from FROM to TO. The source and destination do | |
407 | + not overlap. */ | |
408 | +# ifndef YYCOPY | |
409 | +# if 1 < __GNUC__ | |
410 | +# define YYCOPY(To, From, Count) \ | |
411 | + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | |
412 | +# else | |
413 | +# define YYCOPY(To, From, Count) \ | |
414 | + do \ | |
415 | + { \ | |
416 | + register YYSIZE_T yyi; \ | |
417 | + for (yyi = 0; yyi < (Count); yyi++) \ | |
418 | + (To)[yyi] = (From)[yyi]; \ | |
419 | + } \ | |
420 | + while (0) | |
421 | +# endif | |
422 | +# endif | |
423 | + | |
424 | +/* Relocate STACK from its old location to the new one. The | |
425 | + local variables YYSIZE and YYSTACKSIZE give the old and new number of | |
426 | + elements in the stack, and YYPTR gives the new location of the | |
427 | + stack. Advance YYPTR to a properly aligned location for the next | |
428 | + stack. */ | |
429 | +# define YYSTACK_RELOCATE(Stack) \ | |
430 | + do \ | |
431 | + { \ | |
432 | + YYSIZE_T yynewbytes; \ | |
433 | + YYCOPY (&yyptr->Stack, Stack, yysize); \ | |
434 | + Stack = &yyptr->Stack; \ | |
435 | + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | |
436 | + yyptr += yynewbytes / sizeof (*yyptr); \ | |
437 | + } \ | |
438 | + while (0) | |
439 | + | |
440 | +#endif | |
441 | + | |
442 | +#if defined (__STDC__) || defined (__cplusplus) | |
443 | + typedef signed char yysigned_char; | |
444 | +#else | |
445 | + typedef short yysigned_char; | |
446 | +#endif | |
447 | + | |
448 | +/* YYFINAL -- State number of the termination state. */ | |
449 | +#define YYFINAL 3 | |
450 | +/* YYLAST -- Last index in YYTABLE. */ | |
451 | +#define YYLAST 545 | |
452 | + | |
453 | +/* YYNTOKENS -- Number of terminals. */ | |
454 | +#define YYNTOKENS 71 | |
455 | +/* YYNNTS -- Number of nonterminals. */ | |
456 | +#define YYNNTS 122 | |
457 | +/* YYNRULES -- Number of rules. */ | |
458 | +#define YYNRULES 217 | |
459 | +/* YYNRULES -- Number of states. */ | |
460 | +#define YYNSTATES 368 | |
461 | + | |
462 | +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ | |
463 | +#define YYUNDEFTOK 2 | |
464 | +#define YYMAXUTOK 310 | |
465 | + | |
466 | +#define YYTRANSLATE(YYX) \ | |
467 | + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | |
468 | + | |
469 | +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ | |
470 | +static const unsigned char yytranslate[] = | |
471 | { | |
472 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
473 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
474 | @@ -228,144 +465,146 @@ | |
475 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
476 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
477 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
478 | - 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, | |
479 | - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, | |
480 | - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, | |
481 | - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, | |
482 | - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, | |
483 | - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55 | |
484 | + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, | |
485 | + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | |
486 | + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | |
487 | + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | |
488 | + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | |
489 | + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, | |
490 | + 55 | |
491 | }; | |
492 | ||
493 | #if YYDEBUG | |
494 | -static const short yyprhs[] = | |
495 | -{ | |
496 | - 0, 0, 3, 7, 10, 11, 13, 16, 18, 20, | |
497 | - 22, 24, 26, 28, 30, 32, 34, 36, 41, 44, | |
498 | - 46, 48, 50, 56, 58, 61, 65, 69, 72, 73, | |
499 | - 75, 78, 80, 82, 84, 86, 88, 90, 92, 95, | |
500 | - 98, 101, 105, 109, 111, 115, 117, 120, 123, 125, | |
501 | - 128, 131, 133, 135, 139, 143, 145, 149, 151, 153, | |
502 | - 155, 157, 165, 169, 171, 174, 177, 178, 183, 187, | |
503 | - 191, 193, 198, 200, 204, 206, 207, 210, 212, 216, | |
504 | - 220, 223, 227, 228, 230, 233, 236, 239, 243, 248, | |
505 | - 251, 252, 256, 260, 262, 264, 266, 268, 272, 277, | |
506 | - 281, 286, 290, 292, 294, 296, 300, 302, 304, 308, | |
507 | - 310, 313, 316, 317, 319, 321, 323, 325, 328, 333, | |
508 | - 338, 343, 346, 350, 353, 356, 358, 360, 362, 364, | |
509 | - 367, 372, 376, 378, 381, 385, 388, 392, 393, 397, | |
510 | - 401, 403, 405, 407, 409, 410, 412, 414, 416, 418, | |
511 | - 420, 426, 429, 432, 435, 439, 443, 447, 449, 453, | |
512 | - 458, 464, 466, 470, 472, 476, 478, 480, 482, 484, | |
513 | - 486, 488, 490, 493, 496, 500, 502, 504, 506, 508, | |
514 | - 510, 514, 516, 518, 520, 522, 524, 526, 528, 530, | |
515 | - 534, 537, 541, 543, 545, 547, 548, 550, 552, 554, | |
516 | - 556, 560, 563, 567, 571, 575, 581, 586, 592, 594, | |
517 | - 598, 603, 605, 609, 611, 616, 618 | |
518 | +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | |
519 | + YYRHS. */ | |
520 | +static const unsigned short yyprhs[] = | |
521 | +{ | |
522 | + 0, 0, 3, 6, 10, 13, 14, 16, 19, 21, | |
523 | + 23, 25, 27, 29, 31, 33, 35, 37, 39, 44, | |
524 | + 47, 49, 51, 53, 59, 61, 64, 68, 72, 75, | |
525 | + 76, 78, 81, 83, 85, 87, 89, 91, 93, 95, | |
526 | + 98, 101, 104, 108, 112, 114, 118, 120, 123, 126, | |
527 | + 128, 131, 134, 136, 138, 142, 146, 148, 152, 154, | |
528 | + 156, 158, 160, 168, 172, 174, 177, 180, 181, 186, | |
529 | + 190, 194, 196, 201, 203, 207, 209, 210, 213, 215, | |
530 | + 219, 223, 226, 230, 231, 233, 236, 239, 242, 246, | |
531 | + 251, 254, 255, 259, 263, 265, 267, 269, 271, 275, | |
532 | + 280, 284, 289, 293, 295, 297, 299, 303, 305, 307, | |
533 | + 311, 313, 316, 319, 320, 322, 324, 326, 328, 331, | |
534 | + 336, 341, 346, 349, 353, 356, 359, 361, 363, 365, | |
535 | + 367, 370, 375, 379, 381, 384, 388, 391, 395, 396, | |
536 | + 400, 404, 406, 408, 410, 412, 413, 415, 417, 419, | |
537 | + 421, 423, 429, 432, 435, 438, 442, 446, 450, 452, | |
538 | + 456, 461, 467, 469, 473, 475, 479, 481, 483, 485, | |
539 | + 487, 489, 491, 493, 496, 499, 503, 505, 507, 509, | |
540 | + 511, 513, 517, 519, 521, 523, 525, 527, 529, 531, | |
541 | + 533, 537, 540, 544, 546, 548, 550, 551, 553, 555, | |
542 | + 557, 559, 563, 566, 570, 574, 578, 584, 589, 595, | |
543 | + 597, 601, 606, 608, 612, 614, 619, 621 | |
544 | }; | |
545 | + | |
546 | +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ | |
547 | static const short yyrhs[] = | |
548 | { | |
549 | - 72, 73, 0, 72, 73, 82, 0, 72, 82, 0, | |
550 | - 0, 74, 0, 73, 74, 0, 88, 0, 112, 0, | |
551 | - 129, 0, 95, 0, 90, 0, 106, 0, 75, 0, | |
552 | - 76, 0, 77, 0, 80, 0, 78, 41, 107, 56, | |
553 | - 0, 78, 79, 0, 54, 0, 115, 0, 120, 0, | |
554 | - 78, 130, 81, 38, 56, 0, 79, 0, 81, 79, | |
555 | - 0, 83, 135, 57, 0, 84, 56, 85, 0, 47, | |
556 | - 191, 0, 0, 86, 0, 86, 87, 0, 87, 0, | |
557 | - 88, 0, 90, 0, 95, 0, 106, 0, 112, 0, | |
558 | - 129, 0, 89, 5, 0, 58, 48, 0, 89, 50, | |
559 | - 0, 40, 91, 56, 0, 91, 56, 92, 0, 92, | |
560 | - 0, 191, 59, 93, 0, 94, 0, 60, 94, 0, | |
561 | - 61, 94, 0, 190, 0, 60, 190, 0, 61, 190, | |
562 | - 0, 13, 0, 3, 0, 42, 96, 56, 0, 96, | |
563 | - 56, 97, 0, 97, 0, 191, 59, 98, 0, 99, | |
564 | - 0, 100, 0, 105, 0, 190, 0, 43, 62, 101, | |
565 | - 63, 104, 29, 98, 0, 101, 64, 102, 0, 102, | |
566 | - 0, 103, 93, 0, 93, 24, 0, 0, 4, 62, | |
567 | - 93, 63, 0, 41, 107, 56, 0, 107, 56, 108, | |
568 | - 0, 108, 0, 109, 65, 98, 111, 0, 110, 0, | |
569 | - 110, 64, 191, 0, 191, 0, 0, 18, 93, 0, | |
570 | - 113, 0, 114, 135, 56, 0, 119, 135, 56, 0, | |
571 | - 115, 85, 0, 116, 117, 56, 0, 0, 49, 0, | |
572 | - 118, 123, 0, 46, 12, 0, 120, 85, 0, 116, | |
573 | - 121, 56, 0, 122, 123, 65, 190, 0, 44, 12, | |
574 | - 0, 0, 66, 124, 67, 0, 124, 56, 125, 0, | |
575 | - 125, 0, 126, 0, 127, 0, 128, 0, 109, 65, | |
576 | - 190, 0, 41, 109, 65, 190, 0, 109, 65, 4, | |
577 | - 0, 130, 131, 132, 56, 0, 45, 191, 56, 0, | |
578 | - 85, 0, 38, 0, 133, 0, 134, 136, 38, 0, | |
579 | - 37, 0, 133, 0, 136, 56, 137, 0, 137, 0, | |
580 | - 1, 56, 0, 1, 38, 0, 0, 133, 0, 148, | |
581 | - 0, 150, 0, 156, 0, 138, 139, 0, 138, 139, | |
582 | - 140, 137, 0, 141, 142, 33, 137, 0, 143, 136, | |
583 | - 31, 167, 0, 145, 137, 0, 147, 136, 39, 0, | |
584 | - 25, 167, 0, 26, 137, 0, 27, 0, 32, 0, | |
585 | - 167, 0, 30, 0, 34, 190, 0, 146, 35, 167, | |
586 | - 33, 0, 144, 18, 167, 0, 36, 0, 149, 167, | |
587 | - 0, 186, 18, 167, 0, 190, 18, 0, 154, 155, | |
588 | - 151, 0, 0, 66, 152, 67, 0, 152, 64, 153, | |
589 | - 0, 153, 0, 167, 0, 5, 0, 190, 0, 0, | |
590 | - 157, 0, 159, 0, 160, 0, 163, 0, 164, 0, | |
591 | - 51, 158, 64, 167, 67, 0, 66, 162, 0, 66, | |
592 | - 167, 0, 53, 181, 0, 6, 158, 161, 0, 64, | |
593 | - 167, 67, 0, 64, 162, 67, 0, 5, 0, 8, | |
594 | - 158, 161, 0, 165, 64, 166, 67, 0, 11, 66, | |
595 | - 167, 64, 162, 0, 167, 0, 166, 64, 167, 0, | |
596 | - 169, 0, 170, 168, 169, 0, 59, 0, 68, 0, | |
597 | - 69, 0, 16, 0, 17, 0, 15, 0, 172, 0, | |
598 | - 60, 172, 0, 61, 172, 0, 170, 171, 172, 0, | |
599 | - 169, 0, 60, 0, 61, 0, 21, 0, 175, 0, | |
600 | - 173, 174, 175, 0, 172, 0, 70, 0, 19, 0, | |
601 | - 20, 0, 22, 0, 176, 0, 94, 0, 13, 0, | |
602 | - 66, 167, 67, 0, 23, 175, 0, 154, 177, 151, | |
603 | - 0, 178, 0, 186, 0, 189, 0, 0, 179, 0, | |
604 | - 180, 0, 182, 0, 183, 0, 7, 158, 161, 0, | |
605 | - 9, 181, 0, 66, 167, 67, 0, 66, 5, 67, | |
606 | - 0, 52, 158, 67, 0, 52, 158, 64, 167, 67, | |
607 | - 0, 184, 64, 185, 67, 0, 10, 66, 167, 64, | |
608 | - 162, 0, 167, 0, 185, 64, 167, 0, 187, 62, | |
609 | - 188, 63, 0, 190, 0, 188, 64, 167, 0, 167, | |
610 | - 0, 14, 66, 167, 67, 0, 12, 0, 12, 0 | |
611 | + 72, 0, -1, 73, 74, -1, 73, 74, 83, -1, | |
612 | + 73, 83, -1, -1, 75, -1, 74, 75, -1, 89, | |
613 | + -1, 113, -1, 130, -1, 96, -1, 91, -1, 107, | |
614 | + -1, 76, -1, 77, -1, 78, -1, 81, -1, 79, | |
615 | + 41, 108, 56, -1, 79, 80, -1, 54, -1, 116, | |
616 | + -1, 121, -1, 79, 131, 82, 38, 56, -1, 80, | |
617 | + -1, 82, 80, -1, 84, 136, 57, -1, 85, 56, | |
618 | + 86, -1, 47, 192, -1, -1, 87, -1, 87, 88, | |
619 | + -1, 88, -1, 89, -1, 91, -1, 96, -1, 107, | |
620 | + -1, 113, -1, 130, -1, 90, 5, -1, 58, 48, | |
621 | + -1, 90, 50, -1, 40, 92, 56, -1, 92, 56, | |
622 | + 93, -1, 93, -1, 192, 59, 94, -1, 95, -1, | |
623 | + 60, 95, -1, 61, 95, -1, 191, -1, 60, 191, | |
624 | + -1, 61, 191, -1, 13, -1, 3, -1, 42, 97, | |
625 | + 56, -1, 97, 56, 98, -1, 98, -1, 192, 59, | |
626 | + 99, -1, 100, -1, 101, -1, 106, -1, 191, -1, | |
627 | + 43, 62, 102, 63, 105, 29, 99, -1, 102, 64, | |
628 | + 103, -1, 103, -1, 104, 94, -1, 94, 24, -1, | |
629 | + -1, 4, 62, 94, 63, -1, 41, 108, 56, -1, | |
630 | + 108, 56, 109, -1, 109, -1, 110, 65, 99, 112, | |
631 | + -1, 111, -1, 111, 64, 192, -1, 192, -1, -1, | |
632 | + 18, 94, -1, 114, -1, 115, 136, 56, -1, 120, | |
633 | + 136, 56, -1, 116, 86, -1, 117, 118, 56, -1, | |
634 | + -1, 49, -1, 119, 124, -1, 46, 12, -1, 121, | |
635 | + 86, -1, 117, 122, 56, -1, 123, 124, 65, 191, | |
636 | + -1, 44, 12, -1, -1, 66, 125, 67, -1, 125, | |
637 | + 56, 126, -1, 126, -1, 127, -1, 128, -1, 129, | |
638 | + -1, 110, 65, 191, -1, 41, 110, 65, 191, -1, | |
639 | + 110, 65, 4, -1, 131, 132, 133, 56, -1, 45, | |
640 | + 192, 56, -1, 86, -1, 38, -1, 134, -1, 135, | |
641 | + 137, 38, -1, 37, -1, 134, -1, 137, 56, 138, | |
642 | + -1, 138, -1, 1, 56, -1, 1, 38, -1, -1, | |
643 | + 134, -1, 149, -1, 151, -1, 157, -1, 139, 140, | |
644 | + -1, 139, 140, 141, 138, -1, 142, 143, 33, 138, | |
645 | + -1, 144, 137, 31, 168, -1, 146, 138, -1, 148, | |
646 | + 137, 39, -1, 25, 168, -1, 26, 138, -1, 27, | |
647 | + -1, 32, -1, 168, -1, 30, -1, 34, 191, -1, | |
648 | + 147, 35, 168, 33, -1, 145, 18, 168, -1, 36, | |
649 | + -1, 150, 168, -1, 187, 18, 168, -1, 191, 18, | |
650 | + -1, 155, 156, 152, -1, -1, 66, 153, 67, -1, | |
651 | + 153, 64, 154, -1, 154, -1, 168, -1, 5, -1, | |
652 | + 191, -1, -1, 158, -1, 160, -1, 161, -1, 164, | |
653 | + -1, 165, -1, 51, 159, 64, 168, 67, -1, 66, | |
654 | + 163, -1, 66, 168, -1, 53, 182, -1, 6, 159, | |
655 | + 162, -1, 64, 168, 67, -1, 64, 163, 67, -1, | |
656 | + 5, -1, 8, 159, 162, -1, 166, 64, 167, 67, | |
657 | + -1, 11, 66, 168, 64, 163, -1, 168, -1, 167, | |
658 | + 64, 168, -1, 170, -1, 171, 169, 170, -1, 59, | |
659 | + -1, 68, -1, 69, -1, 16, -1, 17, -1, 15, | |
660 | + -1, 173, -1, 60, 173, -1, 61, 173, -1, 171, | |
661 | + 172, 173, -1, 170, -1, 60, -1, 61, -1, 21, | |
662 | + -1, 176, -1, 174, 175, 176, -1, 173, -1, 70, | |
663 | + -1, 19, -1, 20, -1, 22, -1, 177, -1, 95, | |
664 | + -1, 13, -1, 66, 168, 67, -1, 23, 176, -1, | |
665 | + 155, 178, 152, -1, 179, -1, 187, -1, 190, -1, | |
666 | + -1, 180, -1, 181, -1, 183, -1, 184, -1, 7, | |
667 | + 159, 162, -1, 9, 182, -1, 66, 168, 67, -1, | |
668 | + 66, 5, 67, -1, 52, 159, 67, -1, 52, 159, | |
669 | + 64, 168, 67, -1, 185, 64, 186, 67, -1, 10, | |
670 | + 66, 168, 64, 163, -1, 168, -1, 186, 64, 168, | |
671 | + -1, 188, 62, 189, 63, -1, 191, -1, 189, 64, | |
672 | + 168, -1, 168, -1, 14, 66, 168, 67, -1, 12, | |
673 | + -1, 12, -1 | |
674 | }; | |
675 | ||
676 | -#endif | |
677 | - | |
678 | -#if YYDEBUG | |
679 | -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | |
680 | -static const short yyrline[] = | |
681 | +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | |
682 | +static const unsigned short yyrline[] = | |
683 | { | |
684 | - 0, 145, 158, 165, 174, 188, 189, 192, 193, 194, | |
685 | - 195, 196, 197, 198, 201, 202, 203, 206, 210, 216, | |
686 | - 220, 222, 226, 235, 236, 239, 260, 269, 282, 283, | |
687 | - 286, 287, 290, 291, 292, 293, 294, 295, 298, 310, | |
688 | - 316, 328, 331, 332, 335, 343, 345, 347, 349, 351, | |
689 | - 359, 367, 371, 375, 378, 379, 382, 401, 402, 403, | |
690 | - 406, 431, 475, 477, 480, 497, 507, 511, 526, 529, | |
691 | - 530, 533, 598, 601, 602, 605, 607, 615, 618, 625, | |
692 | - 634, 642, 649, 651, 656, 659, 676, 684, 691, 703, | |
693 | - 720, 722, 726, 727, 730, 731, 732, 735, 759, 783, | |
694 | - 803, 814, 833, 840, 846, 849, 852, 862, 865, 866, | |
695 | - 867, 869, 873, 874, 875, 876, 877, 878, 880, 882, | |
696 | - 884, 886, 888, 892, 896, 900, 904, 908, 912, 916, | |
697 | - 930, 940, 949, 961, 977, 995, 1020, 1056, 1057, 1060, | |
698 | - 1061, 1064, 1073, 1088, 1092, 1119, 1120, 1121, 1122, 1123, | |
699 | - 1126, 1153, 1155, 1169, 1183, 1196, 1208, 1212, 1225, 1238, | |
700 | - 1246, 1257, 1269, 1283, 1284, 1301, 1302, 1303, 1304, 1305, | |
701 | - 1306, 1309, 1310, 1319, 1330, 1353, 1357, 1358, 1359, 1362, | |
702 | - 1363, 1390, 1394, 1395, 1396, 1397, 1400, 1401, 1409, 1417, | |
703 | - 1418, 1431, 1481, 1482, 1483, 1486, 1507, 1508, 1509, 1510, | |
704 | - 1513, 1532, 1551, 1562, 1574, 1588, 1613, 1628, 1639, 1648, | |
705 | - 1659, 1672, 1703, 1713, 1725, 1732, 1736 | |
706 | + 0, 145, 145, 158, 165, 175, 188, 189, 192, 193, | |
707 | + 194, 195, 196, 197, 198, 201, 202, 203, 206, 210, | |
708 | + 216, 220, 222, 226, 235, 236, 239, 260, 269, 282, | |
709 | + 283, 286, 287, 290, 291, 292, 293, 294, 295, 298, | |
710 | + 310, 316, 328, 331, 332, 335, 343, 345, 347, 349, | |
711 | + 351, 359, 367, 371, 375, 378, 379, 382, 401, 402, | |
712 | + 403, 406, 431, 475, 477, 480, 497, 508, 511, 526, | |
713 | + 529, 530, 533, 598, 601, 602, 606, 607, 615, 618, | |
714 | + 625, 634, 642, 650, 651, 656, 659, 676, 684, 691, | |
715 | + 703, 721, 722, 726, 727, 730, 731, 732, 735, 759, | |
716 | + 783, 803, 814, 833, 840, 846, 849, 852, 862, 865, | |
717 | + 866, 867, 869, 873, 874, 875, 876, 877, 878, 880, | |
718 | + 882, 884, 886, 888, 892, 896, 900, 904, 908, 912, | |
719 | + 916, 930, 940, 949, 961, 977, 995, 1020, 1056, 1057, | |
720 | + 1060, 1061, 1064, 1073, 1084, 1089, 1115, 1116, 1117, 1118, | |
721 | + 1119, 1122, 1149, 1151, 1165, 1179, 1192, 1204, 1208, 1221, | |
722 | + 1234, 1242, 1253, 1265, 1279, 1280, 1297, 1298, 1299, 1300, | |
723 | + 1301, 1302, 1305, 1306, 1315, 1326, 1349, 1353, 1354, 1355, | |
724 | + 1358, 1359, 1386, 1390, 1391, 1392, 1393, 1396, 1397, 1405, | |
725 | + 1413, 1414, 1427, 1477, 1478, 1479, 1483, 1503, 1504, 1505, | |
726 | + 1506, 1509, 1528, 1547, 1558, 1570, 1584, 1609, 1624, 1635, | |
727 | + 1644, 1655, 1668, 1699, 1709, 1721, 1728, 1732 | |
728 | }; | |
729 | #endif | |
730 | ||
731 | - | |
732 | -#if (YYDEBUG) || defined YYERROR_VERBOSE | |
733 | - | |
734 | -/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ | |
735 | +#if YYDEBUG || YYERROR_VERBOSE | |
736 | +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. | |
737 | + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | |
738 | static const char *const yytname[] = | |
739 | { | |
740 | - "$", "error", "$undefined.", "UNSIGNED_INT", "STRING", "RAWSTRING", | |
741 | + "$end", "error", "$undefined", "UNSIGNED_INT", "STRING", "RAWSTRING", | |
742 | "STRINGCONCAT", "STRINGCOMPARE", "STRINGCOPY", "STRINGLENGTH", "SSCANF", | |
743 | "SPRINTF", "IDENTIFIER", "CHAR", "INT", "NE", "LE", "GE", "BECOMES", | |
744 | "DIV", "MOD", "OR", "AND", "NOT", "DOTDOT", "IF", "THEN", "ELSE", | |
745 | @@ -374,24 +613,24 @@ | |
746 | "MONITOR", "PROCEDURE", "PROGRAM", "INCLUDE", "ATOMIC", "FNSTRING", | |
747 | "SEND", "RECEIVE", "BROADCAST", "EXTERNAL", "LOWER_THAN_ELSE", "';'", | |
748 | "'.'", "'#'", "'='", "'+'", "'-'", "'['", "']'", "','", "':'", "'('", | |
749 | - "')'", "'<'", "'>'", "'*'", "program", "init_outerscope", "outer_decls", | |
750 | - "outer_decl", "extern_decl", "extern_var_decl", "extern_proc_decl", | |
751 | - "the_external", "proc_or_func_proto", "extern_mon_decl", "proto_list", | |
752 | - "pgm_decl", "pgm_hdg_decls", "pgm_heading", "opt_declarations", | |
753 | - "declarations", "declaration", "include_dcl_part", "start_include", | |
754 | - "const_dcl_part", "const_defs", "const_def", "constant", "unsigned_num", | |
755 | - "type_dcl_part", "type_defs", "type_def", "type", "simple_type", | |
756 | - "struct_type", "index_type", "dimension", "low", "last_atab", | |
757 | - "string_type", "var_dcl_part", "variable_dcls", "variable_dcl", | |
758 | - "newident_list", "new_id_list", "opt_initializer", "proc_dcl_part", | |
759 | - "proc_or_func", "proc_hdg_decl", "proc_proto", "opt_atomic", | |
760 | - "proc_heading", "proc_id", "func_hdg_decl", "func_proto", | |
761 | - "func_heading", "func_id", "formal_params", "formal_p_sects", | |
762 | - "formal_p_sect", "param_group", "var_param_group", "string_param_group", | |
763 | - "mon_dcl_part", "mon_heading", "mon_decl", "opt_stmt_part", | |
764 | - "compound_stmt", "the_begin", "statement_part", "statements", | |
765 | - "statement", "if_expr", "then_stmt", "the_else", "the_while", | |
766 | - "while_expr", "the_repeat", "for_id", "for_header", | |
767 | + "')'", "'<'", "'>'", "'*'", "$accept", "program", "init_outerscope", | |
768 | + "outer_decls", "outer_decl", "extern_decl", "extern_var_decl", | |
769 | + "extern_proc_decl", "the_external", "proc_or_func_proto", | |
770 | + "extern_mon_decl", "proto_list", "pgm_decl", "pgm_hdg_decls", | |
771 | + "pgm_heading", "opt_declarations", "declarations", "declaration", | |
772 | + "include_dcl_part", "start_include", "const_dcl_part", "const_defs", | |
773 | + "const_def", "constant", "unsigned_num", "type_dcl_part", "type_defs", | |
774 | + "type_def", "type", "simple_type", "struct_type", "index_type", | |
775 | + "dimension", "low", "last_atab", "string_type", "var_dcl_part", | |
776 | + "variable_dcls", "variable_dcl", "newident_list", "new_id_list", | |
777 | + "opt_initializer", "proc_dcl_part", "proc_or_func", "proc_hdg_decl", | |
778 | + "proc_proto", "opt_atomic", "proc_heading", "proc_id", "func_hdg_decl", | |
779 | + "func_proto", "func_heading", "func_id", "formal_params", | |
780 | + "formal_p_sects", "formal_p_sect", "param_group", "var_param_group", | |
781 | + "string_param_group", "mon_dcl_part", "mon_heading", "mon_decl", | |
782 | + "opt_stmt_part", "compound_stmt", "the_begin", "statement_part", | |
783 | + "statements", "statement", "if_expr", "then_stmt", "the_else", | |
784 | + "the_while", "while_expr", "the_repeat", "for_id", "for_header", | |
785 | "for_id_becomes_expr", "cbegin", "assignment", "id_becomes", | |
786 | "procedure_call", "actual_params", "actuals_list", "actual_param", | |
787 | "pfv_id", "check_proc", "special_proc_call", "send_call", | |
788 | @@ -406,282 +645,304 @@ | |
789 | }; | |
790 | #endif | |
791 | ||
792 | -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | |
793 | -static const short yyr1[] = | |
794 | +# ifdef YYPRINT | |
795 | +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to | |
796 | + token YYLEX-NUM. */ | |
797 | +static const unsigned short yytoknum[] = | |
798 | +{ | |
799 | + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | |
800 | + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | |
801 | + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, | |
802 | + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | |
803 | + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, | |
804 | + 305, 306, 307, 308, 309, 310, 59, 46, 35, 61, | |
805 | + 43, 45, 91, 93, 44, 58, 40, 41, 60, 62, | |
806 | + 42 | |
807 | +}; | |
808 | +# endif | |
809 | + | |
810 | +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | |
811 | +static const unsigned char yyr1[] = | |
812 | { | |
813 | - 0, 71, 71, 71, 72, 73, 73, 74, 74, 74, | |
814 | - 74, 74, 74, 74, 75, 75, 75, 76, 77, 78, | |
815 | - 79, 79, 80, 81, 81, 82, 83, 84, 85, 85, | |
816 | - 86, 86, 87, 87, 87, 87, 87, 87, 88, 89, | |
817 | - 88, 90, 91, 91, 92, 93, 93, 93, 93, 93, | |
818 | - 93, 93, 94, 95, 96, 96, 97, 98, 98, 98, | |
819 | - 99, 100, 101, 101, 102, 103, 104, 105, 106, 107, | |
820 | - 107, 108, 109, 110, 110, 111, 111, 112, 113, 113, | |
821 | - 114, 115, 116, 116, 117, 118, 119, 120, 121, 122, | |
822 | - 123, 123, 124, 124, 125, 125, 125, 126, 127, 128, | |
823 | - 129, 130, 131, 132, 132, 133, 134, 135, 136, 136, | |
824 | - 136, 136, 137, 137, 137, 137, 137, 137, 137, 137, | |
825 | - 137, 137, 137, 138, 139, 140, 141, 142, 143, 144, | |
826 | - 145, 146, 147, 148, 148, 149, 150, 151, 151, 152, | |
827 | - 152, 153, 153, 154, 155, 156, 156, 156, 156, 156, | |
828 | - 157, 158, 158, 159, 160, 161, 161, 162, 163, 164, | |
829 | - 165, 166, 166, 167, 167, 168, 168, 168, 168, 168, | |
830 | - 168, 169, 169, 169, 169, 170, 171, 171, 171, 172, | |
831 | - 172, 173, 174, 174, 174, 174, 175, 175, 175, 175, | |
832 | - 175, 176, 176, 176, 176, 177, 178, 178, 178, 178, | |
833 | - 179, 180, 181, 181, 182, 182, 183, 184, 185, 185, | |
834 | - 186, 187, 188, 188, 189, 190, 191 | |
835 | + 0, 71, 72, 72, 72, 73, 74, 74, 75, 75, | |
836 | + 75, 75, 75, 75, 75, 76, 76, 76, 77, 78, | |
837 | + 79, 80, 80, 81, 82, 82, 83, 84, 85, 86, | |
838 | + 86, 87, 87, 88, 88, 88, 88, 88, 88, 89, | |
839 | + 90, 89, 91, 92, 92, 93, 94, 94, 94, 94, | |
840 | + 94, 94, 94, 95, 96, 97, 97, 98, 99, 99, | |
841 | + 99, 100, 101, 102, 102, 103, 104, 105, 106, 107, | |
842 | + 108, 108, 109, 110, 111, 111, 112, 112, 113, 114, | |
843 | + 114, 115, 116, 117, 117, 118, 119, 120, 121, 122, | |
844 | + 123, 124, 124, 125, 125, 126, 126, 126, 127, 128, | |
845 | + 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, | |
846 | + 137, 137, 137, 138, 138, 138, 138, 138, 138, 138, | |
847 | + 138, 138, 138, 138, 139, 140, 141, 142, 143, 144, | |
848 | + 145, 146, 147, 148, 149, 149, 150, 151, 152, 152, | |
849 | + 153, 153, 154, 154, 155, 156, 157, 157, 157, 157, | |
850 | + 157, 158, 159, 159, 160, 161, 162, 162, 163, 164, | |
851 | + 165, 166, 167, 167, 168, 168, 169, 169, 169, 169, | |
852 | + 169, 169, 170, 170, 170, 170, 171, 172, 172, 172, | |
853 | + 173, 173, 174, 175, 175, 175, 175, 176, 176, 176, | |
854 | + 176, 176, 177, 177, 177, 177, 178, 179, 179, 179, | |
855 | + 179, 180, 181, 182, 182, 183, 183, 184, 185, 186, | |
856 | + 186, 187, 188, 189, 189, 190, 191, 192 | |
857 | }; | |
858 | ||
859 | -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | |
860 | -static const short yyr2[] = | |
861 | +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | |
862 | +static const unsigned char yyr2[] = | |
863 | { | |
864 | - 0, 2, 3, 2, 0, 1, 2, 1, 1, 1, | |
865 | - 1, 1, 1, 1, 1, 1, 1, 4, 2, 1, | |
866 | - 1, 1, 5, 1, 2, 3, 3, 2, 0, 1, | |
867 | - 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, | |
868 | - 2, 3, 3, 1, 3, 1, 2, 2, 1, 2, | |
869 | - 2, 1, 1, 3, 3, 1, 3, 1, 1, 1, | |
870 | - 1, 7, 3, 1, 2, 2, 0, 4, 3, 3, | |
871 | - 1, 4, 1, 3, 1, 0, 2, 1, 3, 3, | |
872 | - 2, 3, 0, 1, 2, 2, 2, 3, 4, 2, | |
873 | - 0, 3, 3, 1, 1, 1, 1, 3, 4, 3, | |
874 | - 4, 3, 1, 1, 1, 3, 1, 1, 3, 1, | |
875 | - 2, 2, 0, 1, 1, 1, 1, 2, 4, 4, | |
876 | - 4, 2, 3, 2, 2, 1, 1, 1, 1, 2, | |
877 | - 4, 3, 1, 2, 3, 2, 3, 0, 3, 3, | |
878 | - 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, | |
879 | - 5, 2, 2, 2, 3, 3, 3, 1, 3, 4, | |
880 | - 5, 1, 3, 1, 3, 1, 1, 1, 1, 1, | |
881 | - 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, | |
882 | - 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, | |
883 | - 2, 3, 1, 1, 1, 0, 1, 1, 1, 1, | |
884 | - 3, 2, 3, 3, 3, 5, 4, 5, 1, 3, | |
885 | - 4, 1, 3, 1, 4, 1, 1 | |
886 | + 0, 2, 2, 3, 2, 0, 1, 2, 1, 1, | |
887 | + 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, | |
888 | + 1, 1, 1, 5, 1, 2, 3, 3, 2, 0, | |
889 | + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, | |
890 | + 2, 2, 3, 3, 1, 3, 1, 2, 2, 1, | |
891 | + 2, 2, 1, 1, 3, 3, 1, 3, 1, 1, | |
892 | + 1, 1, 7, 3, 1, 2, 2, 0, 4, 3, | |
893 | + 3, 1, 4, 1, 3, 1, 0, 2, 1, 3, | |
894 | + 3, 2, 3, 0, 1, 2, 2, 2, 3, 4, | |
895 | + 2, 0, 3, 3, 1, 1, 1, 1, 3, 4, | |
896 | + 3, 4, 3, 1, 1, 1, 3, 1, 1, 3, | |
897 | + 1, 2, 2, 0, 1, 1, 1, 1, 2, 4, | |
898 | + 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, | |
899 | + 2, 4, 3, 1, 2, 3, 2, 3, 0, 3, | |
900 | + 3, 1, 1, 1, 1, 0, 1, 1, 1, 1, | |
901 | + 1, 5, 2, 2, 2, 3, 3, 3, 1, 3, | |
902 | + 4, 5, 1, 3, 1, 3, 1, 1, 1, 1, | |
903 | + 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, | |
904 | + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, | |
905 | + 3, 2, 3, 1, 1, 1, 0, 1, 1, 1, | |
906 | + 1, 3, 2, 3, 3, 3, 5, 4, 5, 1, | |
907 | + 3, 4, 1, 3, 1, 4, 1, 1 | |
908 | }; | |
909 | ||
910 | -/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE | |
911 | - doesn't specify something else to do. Zero means the default is an | |
912 | - error. */ | |
913 | -static const short yydefact[] = | |
914 | -{ | |
915 | - 4, 82, 0, 0, 0, 0, 0, 83, 19, 0, | |
916 | - 82, 5, 13, 14, 15, 82, 16, 3, 0, 0, | |
917 | - 7, 0, 11, 10, 12, 8, 77, 0, 82, 0, | |
918 | - 0, 82, 9, 28, 216, 0, 43, 0, 0, 70, | |
919 | - 0, 72, 74, 0, 55, 0, 0, 27, 39, 6, | |
920 | - 2, 0, 18, 20, 21, 82, 106, 107, 0, 0, | |
921 | - 82, 38, 40, 0, 80, 29, 31, 32, 33, 34, | |
922 | - 35, 36, 37, 0, 0, 0, 90, 0, 90, 0, | |
923 | - 86, 102, 0, 41, 0, 68, 0, 0, 53, 0, | |
924 | - 101, 0, 23, 82, 0, 0, 0, 0, 215, 0, | |
925 | - 128, 126, 0, 132, 0, 0, 113, 0, 109, 0, | |
926 | - 0, 0, 0, 112, 0, 0, 114, 0, 115, 144, | |
927 | - 116, 145, 146, 147, 148, 149, 0, 0, 0, 143, | |
928 | - 25, 26, 78, 30, 89, 85, 81, 0, 84, 87, | |
929 | - 0, 79, 103, 0, 104, 42, 52, 51, 0, 0, | |
930 | - 44, 45, 48, 69, 0, 0, 75, 57, 58, 59, | |
931 | - 60, 73, 54, 56, 17, 0, 24, 111, 110, 0, | |
932 | - 0, 0, 0, 0, 0, 0, 188, 0, 0, 0, | |
933 | - 0, 0, 0, 187, 195, 123, 163, 0, 171, 0, | |
934 | - 179, 186, 192, 196, 197, 198, 199, 0, 193, 194, | |
935 | - 143, 129, 0, 0, 153, 105, 112, 112, 117, 0, | |
936 | - 127, 0, 0, 121, 0, 0, 133, 137, 0, 0, | |
937 | - 0, 135, 0, 0, 0, 93, 94, 95, 96, 0, | |
938 | - 100, 46, 49, 47, 50, 0, 0, 0, 71, 22, | |
939 | - 157, 151, 152, 0, 154, 158, 0, 0, 201, 0, | |
940 | - 0, 190, 0, 172, 173, 0, 137, 170, 168, 169, | |
941 | - 178, 165, 176, 177, 166, 167, 0, 0, 183, 184, | |
942 | - 185, 182, 0, 0, 0, 0, 0, 108, 124, 125, | |
943 | - 112, 112, 0, 131, 0, 122, 0, 136, 0, 161, | |
944 | - 134, 213, 0, 0, 0, 0, 91, 88, 0, 0, | |
945 | - 0, 63, 0, 76, 0, 0, 0, 200, 0, 0, | |
946 | - 0, 204, 189, 191, 164, 0, 174, 180, 208, 0, | |
947 | - 0, 203, 202, 118, 119, 120, 130, 142, 0, 140, | |
948 | - 141, 0, 159, 210, 0, 0, 99, 97, 92, 67, | |
949 | - 65, 66, 0, 64, 156, 155, 160, 0, 214, 0, | |
950 | - 0, 206, 150, 0, 138, 162, 212, 98, 0, 62, | |
951 | - 207, 205, 209, 139, 0, 61, 0, 0, 0 | |
952 | +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | |
953 | + STATE-NUM when YYTABLE doesn't specify something else to do. Zero | |
954 | + means the default is an error. */ | |
955 | +static const unsigned char yydefact[] = | |
956 | +{ | |
957 | + 5, 0, 83, 1, 0, 0, 0, 0, 0, 84, | |
958 | + 20, 0, 83, 6, 14, 15, 16, 83, 17, 4, | |
959 | + 0, 0, 8, 0, 12, 11, 13, 9, 78, 0, | |
960 | + 83, 0, 0, 83, 10, 29, 217, 0, 44, 0, | |
961 | + 0, 71, 0, 73, 75, 0, 56, 0, 0, 28, | |
962 | + 40, 7, 3, 0, 19, 21, 22, 83, 107, 108, | |
963 | + 0, 0, 83, 39, 41, 0, 81, 30, 32, 33, | |
964 | + 34, 35, 36, 37, 38, 0, 0, 0, 91, 0, | |
965 | + 91, 0, 87, 103, 0, 42, 0, 69, 0, 0, | |
966 | + 54, 0, 102, 0, 24, 83, 0, 0, 0, 0, | |
967 | + 216, 0, 129, 127, 0, 133, 0, 0, 114, 0, | |
968 | + 110, 0, 0, 0, 0, 113, 0, 0, 115, 0, | |
969 | + 116, 145, 117, 146, 147, 148, 149, 150, 0, 0, | |
970 | + 0, 144, 26, 27, 79, 31, 90, 86, 82, 0, | |
971 | + 85, 88, 0, 80, 104, 0, 105, 43, 53, 52, | |
972 | + 0, 0, 45, 46, 49, 70, 0, 0, 76, 58, | |
973 | + 59, 60, 61, 74, 55, 57, 18, 0, 25, 112, | |
974 | + 111, 0, 0, 0, 0, 0, 0, 0, 189, 0, | |
975 | + 0, 0, 0, 0, 0, 188, 196, 124, 164, 0, | |
976 | + 172, 0, 180, 187, 193, 197, 198, 199, 200, 0, | |
977 | + 194, 195, 144, 130, 0, 0, 154, 106, 113, 113, | |
978 | + 118, 0, 128, 0, 0, 122, 0, 0, 134, 138, | |
979 | + 0, 0, 0, 136, 0, 0, 0, 94, 95, 96, | |
980 | + 97, 0, 101, 47, 50, 48, 51, 0, 0, 0, | |
981 | + 72, 23, 158, 152, 153, 0, 155, 159, 0, 0, | |
982 | + 202, 0, 0, 191, 0, 173, 174, 0, 138, 171, | |
983 | + 169, 170, 179, 166, 177, 178, 167, 168, 0, 0, | |
984 | + 184, 185, 186, 183, 0, 0, 0, 0, 0, 109, | |
985 | + 125, 126, 113, 113, 0, 132, 0, 123, 0, 137, | |
986 | + 0, 162, 135, 214, 0, 0, 0, 0, 92, 89, | |
987 | + 0, 0, 0, 64, 0, 77, 0, 0, 0, 201, | |
988 | + 0, 0, 0, 205, 190, 192, 165, 0, 175, 181, | |
989 | + 209, 0, 0, 204, 203, 119, 120, 121, 131, 143, | |
990 | + 0, 141, 142, 0, 160, 211, 0, 0, 100, 98, | |
991 | + 93, 68, 66, 67, 0, 65, 157, 156, 161, 0, | |
992 | + 215, 0, 0, 207, 151, 0, 139, 163, 213, 99, | |
993 | + 0, 63, 208, 206, 210, 140, 0, 62 | |
994 | }; | |
995 | ||
996 | +/* YYDEFGOTO[NTERM-NUM]. */ | |
997 | static const short yydefgoto[] = | |
998 | { | |
999 | - 366, 1, 10, 11, 12, 13, 14, 15, 52, 16, | |
1000 | - 93, 17, 18, 19, 64, 65, 66, 67, 21, 68, | |
1001 | - 35, 36, 299, 183, 69, 43, 44, 156, 157, 158, | |
1002 | - 300, 301, 302, 358, 159, 70, 38, 39, 40, 41, | |
1003 | - 238, 71, 26, 27, 28, 29, 75, 76, 30, 31, | |
1004 | - 77, 78, 138, 224, 225, 226, 227, 228, 72, 33, | |
1005 | - 82, 143, 106, 58, 59, 107, 108, 109, 208, 280, | |
1006 | - 110, 209, 111, 112, 113, 114, 115, 116, 117, 118, | |
1007 | - 287, 328, 329, 184, 217, 120, 121, 170, 122, 123, | |
1008 | - 244, 241, 124, 125, 126, 288, 330, 266, 186, 187, | |
1009 | - 267, 188, 189, 272, 190, 191, 256, 192, 193, 194, | |
1010 | - 204, 195, 196, 197, 319, 198, 128, 292, 199, 200, | |
1011 | - 42 | |
1012 | + -1, 1, 2, 12, 13, 14, 15, 16, 17, 54, | |
1013 | + 18, 95, 19, 20, 21, 66, 67, 68, 69, 23, | |
1014 | + 70, 37, 38, 301, 185, 71, 45, 46, 158, 159, | |
1015 | + 160, 302, 303, 304, 360, 161, 72, 40, 41, 42, | |
1016 | + 43, 240, 73, 28, 29, 30, 31, 77, 78, 32, | |
1017 | + 33, 79, 80, 140, 226, 227, 228, 229, 230, 74, | |
1018 | + 35, 84, 145, 108, 60, 61, 109, 110, 111, 210, | |
1019 | + 282, 112, 211, 113, 114, 115, 116, 117, 118, 119, | |
1020 | + 120, 289, 330, 331, 186, 219, 122, 123, 172, 124, | |
1021 | + 125, 246, 243, 126, 127, 128, 290, 332, 268, 188, | |
1022 | + 189, 269, 190, 191, 274, 192, 193, 258, 194, 195, | |
1023 | + 196, 206, 197, 198, 199, 321, 200, 130, 294, 201, | |
1024 | + 202, 44 | |
1025 | }; | |
1026 | ||
1027 | +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | |
1028 | + STATE-NUM. */ | |
1029 | +#define YYPACT_NINF -238 | |
1030 | static const short yypact[] = | |
1031 | { | |
1032 | - -32768, 224, 38, 38, 38, 38, 38,-32768,-32768, -32, | |
1033 | - 88,-32768,-32768,-32768,-32768, 190,-32768,-32768, 77, 85, | |
1034 | - -32768, 20,-32768,-32768,-32768,-32768,-32768, 77, 170, 78, | |
1035 | - 77, 170,-32768, 160,-32768, 87,-32768, 6, 103,-32768, | |
1036 | - 74, 99,-32768, 114,-32768, 127, 147,-32768,-32768,-32768, | |
1037 | - -32768, 38,-32768,-32768,-32768, 172,-32768,-32768, 366, 167, | |
1038 | - 170,-32768,-32768, 158,-32768, 160,-32768,-32768,-32768,-32768, | |
1039 | - -32768,-32768,-32768, 222, 228, 191, 182, 193, 182, 194, | |
1040 | - -32768,-32768, -1, 38, 71, 38, 101, 38, 38, 101, | |
1041 | - -32768, 197,-32768, 96, -17, 189, 189, 201,-32768, 304, | |
1042 | - -32768,-32768, 256,-32768, 189, 204,-32768, 5,-32768, 248, | |
1043 | - 304, 400, 257, 492, 245, 427,-32768, 304,-32768,-32768, | |
1044 | - -32768,-32768,-32768,-32768,-32768,-32768, 223, 273, 230, 0, | |
1045 | - -32768,-32768,-32768,-32768,-32768,-32768,-32768, 23,-32768,-32768, | |
1046 | - 229,-32768,-32768, 237,-32768,-32768,-32768,-32768, 83, 83, | |
1047 | - -32768,-32768,-32768,-32768, 233, 234, 279,-32768,-32768,-32768, | |
1048 | - -32768,-32768,-32768,-32768, 38, 242,-32768,-32768,-32768, 185, | |
1049 | - 236, 236, 304, 189, 204, 238,-32768, 239, 331, 189, | |
1050 | - 331, 331, 304,-32768,-32768,-32768, 425, 428, 26, 32, | |
1051 | - -32768,-32768,-32768,-32768,-32768,-32768,-32768, 244,-32768,-32768, | |
1052 | - 240,-32768, 255, 249,-32768,-32768, 492, 492, 285, 270, | |
1053 | - -32768, -9, 304,-32768, 304, 67,-32768, 254, 304, 304, | |
1054 | - 304,-32768, 38, 258, 53,-32768,-32768,-32768,-32768, 256, | |
1055 | - -32768,-32768,-32768,-32768,-32768, 71, 71, 71,-32768,-32768, | |
1056 | - -32768,-32768,-32768, 185,-32768,-32768, 260, 236,-32768, 304, | |
1057 | - 304,-32768, 18, 26, 26, 259, 254,-32768,-32768,-32768, | |
1058 | - -32768,-32768,-32768,-32768,-32768,-32768, 304, 331,-32768,-32768, | |
1059 | - -32768,-32768, 331, 304, 304, 262, 263,-32768,-32768,-32768, | |
1060 | - 492, 492, 304,-32768, 288,-32768, 276,-32768, 97,-32768, | |
1061 | - -32768,-32768, 166, 266, 68, 23,-32768,-32768, 269, 298, | |
1062 | - 169,-32768, 71,-32768, 268, 272, 320,-32768, 282, 280, | |
1063 | - 304,-32768,-32768,-32768, 47, 57, 26,-32768,-32768, 120, | |
1064 | - 281,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 129,-32768, | |
1065 | - -32768, 304,-32768,-32768, 304, 256,-32768,-32768,-32768,-32768, | |
1066 | - -32768,-32768, 71,-32768,-32768,-32768,-32768, 320,-32768, 283, | |
1067 | - 304,-32768,-32768, 276,-32768,-32768,-32768,-32768, 322,-32768, | |
1068 | - -32768,-32768,-32768,-32768, 101,-32768, 333, 349,-32768 | |
1069 | + -238, 21, 224, -238, 24, 24, 24, 24, 24, -238, | |
1070 | + -238, 97, 88, -238, -238, -238, -238, 98, -238, -238, | |
1071 | + 69, 107, -238, 11, -238, -238, -238, -238, -238, 69, | |
1072 | + 170, 147, 69, 170, -238, 160, -238, 126, -238, 100, | |
1073 | + 140, -238, 138, 152, -238, 165, -238, 174, 178, -238, | |
1074 | + -238, -238, -238, 24, -238, -238, -238, 175, -238, -238, | |
1075 | + 366, 182, 170, -238, -238, 179, -238, 160, -238, -238, | |
1076 | + -238, -238, -238, -238, -238, 228, 235, 192, 183, 194, | |
1077 | + 183, 197, -238, -238, 176, 24, 71, 24, 35, 24, | |
1078 | + 24, 35, -238, 199, -238, -1, -16, 201, 201, 202, | |
1079 | + -238, 304, -238, -238, 258, -238, 201, 208, -238, 58, | |
1080 | + -238, 254, 304, 400, 257, 492, 252, 427, -238, 304, | |
1081 | + -238, -238, -238, -238, -238, -238, -238, -238, 227, 274, | |
1082 | + 231, 0, -238, -238, -238, -238, -238, -238, -238, 83, | |
1083 | + -238, -238, 229, -238, -238, 239, -238, -238, -238, -238, | |
1084 | + 105, 105, -238, -238, -238, -238, 234, 236, 279, -238, | |
1085 | + -238, -238, -238, -238, -238, -238, 24, 244, -238, -238, | |
1086 | + -238, 185, 238, 238, 304, 201, 208, 237, -238, 242, | |
1087 | + 331, 201, 331, 331, 304, -238, -238, -238, 425, 428, | |
1088 | + 32, 50, -238, -238, -238, -238, -238, -238, -238, 240, | |
1089 | + -238, -238, 243, -238, 248, 249, -238, -238, 492, 492, | |
1090 | + 292, 287, -238, 12, 304, -238, 304, 66, -238, 255, | |
1091 | + 304, 304, 304, -238, 24, 259, 51, -238, -238, -238, | |
1092 | + -238, 258, -238, -238, -238, -238, -238, 71, 71, 71, | |
1093 | + -238, -238, -238, -238, -238, 185, -238, -238, 261, 238, | |
1094 | + -238, 304, 304, -238, 74, 32, 32, 256, 255, -238, | |
1095 | + -238, -238, -238, -238, -238, -238, -238, -238, 304, 331, | |
1096 | + -238, -238, -238, -238, 331, 304, 304, 262, 263, -238, | |
1097 | + -238, -238, 492, 492, 304, -238, 289, -238, 276, -238, | |
1098 | + 94, -238, -238, -238, 166, 266, 38, 83, -238, -238, | |
1099 | + 269, 302, 168, -238, 71, -238, 268, 272, 328, -238, | |
1100 | + 282, 280, 304, -238, -238, -238, 4, 25, 32, -238, | |
1101 | + -238, 103, 281, -238, -238, -238, -238, -238, -238, -238, | |
1102 | + 119, -238, -238, 304, -238, -238, 304, 258, -238, -238, | |
1103 | + -238, -238, -238, -238, 71, -238, -238, -238, -238, 328, | |
1104 | + -238, 283, 304, -238, -238, 276, -238, -238, -238, -238, | |
1105 | + 320, -238, -238, -238, -238, -238, 35, -238 | |
1106 | }; | |
1107 | ||
1108 | +/* YYPGOTO[NTERM-NUM]. */ | |
1109 | static const short yypgoto[] = | |
1110 | { | |
1111 | - -32768,-32768,-32768, 342,-32768,-32768,-32768,-32768, -44,-32768, | |
1112 | - -32768, 343,-32768,-32768, 9,-32768, 290, 137,-32768, 157, | |
1113 | - -32768, 274, -75, -82, 165,-32768, 271, -88,-32768,-32768, | |
1114 | - -32768, 16,-32768,-32768,-32768, 173, 309, -70, -130,-32768, | |
1115 | - -32768, 175,-32768,-32768, 4,-32768,-32768,-32768,-32768, 8, | |
1116 | - -32768,-32768, 284,-32768, 66,-32768,-32768,-32768, 181, 348, | |
1117 | - -32768,-32768, 11,-32768, 186, 25, -108,-32768,-32768,-32768, | |
1118 | - -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, | |
1119 | - 110,-32768, 15, -55,-32768,-32768,-32768, -92,-32768,-32768, | |
1120 | - -144, -235,-32768,-32768,-32768,-32768, -93,-32768, 105, 107, | |
1121 | - -32768, -167,-32768,-32768, -168,-32768,-32768,-32768,-32768,-32768, | |
1122 | - 195,-32768,-32768,-32768,-32768, -38,-32768,-32768,-32768, -58, | |
1123 | - 28 | |
1124 | + -238, -238, -238, -238, 339, -238, -238, -238, -238, -46, | |
1125 | + -238, -238, 340, -238, -238, 47, -238, 286, 33, -238, | |
1126 | + 111, -238, 270, -77, -84, 132, -238, 267, -90, -238, | |
1127 | + -238, -238, 14, -238, -238, -238, 162, 306, -72, -132, | |
1128 | + -238, -238, 164, -238, -238, 2, -238, -238, -238, -238, | |
1129 | + 6, -238, -238, 288, -238, 63, -238, -238, -238, 173, | |
1130 | + 344, -238, -238, 9, -238, 155, 23, -110, -238, -238, | |
1131 | + -238, -238, -238, -238, -238, -238, -238, -238, -238, -238, | |
1132 | + -238, 104, -238, 8, -57, -238, -238, -238, -94, -238, | |
1133 | + -238, -146, -237, -238, -238, -238, -238, -95, -238, 101, | |
1134 | + 108, -238, -169, -238, -238, -170, -238, -238, -238, -238, | |
1135 | + -238, 190, -238, -238, -238, -238, -40, -238, -238, -238, | |
1136 | + -60, 26 | |
1137 | }; | |
1138 | ||
1139 | - | |
1140 | -#define YYLAST 545 | |
1141 | - | |
1142 | - | |
1143 | +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | |
1144 | + positive, shift that token. If negative, reduce the rule which | |
1145 | + number is the opposite. If zero, do what YYDEFACT says. | |
1146 | + If YYTABLE_NINF, syntax error. */ | |
1147 | +#define YYTABLE_NINF -213 | |
1148 | static const short yytable[] = | |
1149 | { | |
1150 | - 129, 163, 151, 119, 171, 213, 185, 223, 304, 150, | |
1151 | - 251, 92, 202, 253, 254, 153, 48, 210, 221, 53, | |
1152 | - 127, 167, 282, 54, 216, 61, 152, 245, 160, 57, | |
1153 | - 37, 160, 45, 46, 47, 34, 56, 142, 57, 168, | |
1154 | - 80, 57, 81, 205, 201, -181, -181, 206, -181, 166, | |
1155 | - 34, 268, 269, 129, 270, 129, 119, 129, 119, 53, | |
1156 | - 119, 206, -211, 54, 222, 84, 231, 233, -175, 131, | |
1157 | - 62, 346, 336, 127, 146, 127, 242, 127, 260, 246, | |
1158 | - 98, 247, 310, 98, 147, 311, 146, 252, -1, 255, | |
1159 | - 232, 234, 293, 144, 153, 98, -181, 53, 277, 278, | |
1160 | - 316, 54, 271, 307, 317, 154, 285, -175, -175, 295, | |
1161 | - 276, 37, 360, 98, 56, 161, 45, 262, 263, 283, | |
1162 | - 296, 284, 73, 206, 74, 289, 290, 291, 2, 3, | |
1163 | - 4, 148, 149, 5, 165, 6, 211, 7, 20, 86, | |
1164 | - 215, 60, 8, 83, 155, 7, 9, 20, 129, 129, | |
1165 | - 305, 119, 119, 151, 151, 151, 308, 309, 22, 85, | |
1166 | - 298, 331, 303, 87, 332, 223, 23, 22, 127, 127, | |
1167 | - 88, 297, 323, 324, 24, 23, 25, 152, 152, 152, | |
1168 | - 318, 320, 32, 24, 350, 25, 89, 351, 146, 325, | |
1169 | - 240, 32, 173, 353, 174, 175, 354, 98, 176, 177, | |
1170 | - 2, 3, 4, 90, -82, 5, -82, -28, 178, 7, | |
1171 | - 2, 3, 4, 63, 132, 5, 79, 349, 9, 7, | |
1172 | - 151, 7, 129, 129, 130, 119, 119, 343, 9, 333, | |
1173 | - 334, 51, 341, 342, 134, 5, 337, 179, 355, 7, | |
1174 | - 135, 356, 127, 127, 152, 180, 181, 136, 137, 139, | |
1175 | - 141, 182, 146, 164, 275, 169, 173, 362, 174, 175, | |
1176 | - 151, 98, 176, 177, 2, 3, 4, 172, 98, 5, | |
1177 | - 203, 6, 178, 7, 207, 212, 365, 357, 8, 146, | |
1178 | - 214, 327, 9, 173, 152, 174, 175, 218, 98, 176, | |
1179 | - 177, 219, 220, 230, 229, 235, 236, 237, 239, 178, | |
1180 | - 243, 179, -211, 281, 249, 250, 160, 146, 273, 180, | |
1181 | - 181, 173, 279, 174, 175, 182, 98, 176, 177, 274, | |
1182 | - 286, 326, 340, 294, 306, 240, 312, 178, 179, 321, | |
1183 | - 322, 335, 339, 367, 146, 344, 180, 181, 173, 345, | |
1184 | - 174, 175, 182, 98, 176, 177, 347, 348, 352, 368, | |
1185 | - 361, 364, 49, 50, 178, 133, 179, 145, 359, 162, | |
1186 | - 91, 338, 140, 55, 180, 181, 313, 94, 363, 248, | |
1187 | - 182, 314, 95, 315, 96, 0, 0, 97, 98, 0, | |
1188 | - 0, 0, 0, 179, 0, 0, 0, 0, 0, 0, | |
1189 | - 0, 99, 0, 0, 0, 0, 100, 182, 101, 0, | |
1190 | - 102, 94, 103, 56, -112, 0, 95, 0, 96, 0, | |
1191 | - 0, 97, 98, 0, 0, 0, 0, 104, 0, 105, | |
1192 | - 0, 0, -112, 0, 0, 99, 0, 0, 94, 0, | |
1193 | - 100, -112, 101, 95, 102, 96, 103, 56, 97, 98, | |
1194 | - -175, -175, -175, 257, 258, 259, -175, 0, 0, 260, | |
1195 | - 0, 104, 99, 105, 0, 0, -112, 100, 0, 101, | |
1196 | - 0, 102, 0, 103, 56, 0, -112, 0, 0, 0, | |
1197 | - 0, 0, 0, 0, 0, 0, 0, 0, 104, 0, | |
1198 | - 105, 0, 0, -112, -175, -175, -175, 261, 262, 263, | |
1199 | - 0, 0, 0, -175, -175, 0, 264, 265, 95, 0, | |
1200 | - 96, 0, 0, 97, 98, 0, 0, 0, 0, 0, | |
1201 | - 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, | |
1202 | - 0, 0, 100, 0, 101, 0, 102, 0, 103, 56, | |
1203 | + 131, 165, 153, 121, 173, 215, 187, 225, 306, 152, | |
1204 | + 253, 94, 204, 255, 256, 155, 63, 212, 223, 55, | |
1205 | + 129, 3, 169, 56, 218, -176, 154, 247, 162, 59, | |
1206 | + 39, 162, 47, 48, 49, 22, 36, 167, 59, 156, | |
1207 | + 170, 59, 338, 284, 203, 22, 262, 100, 9, 168, | |
1208 | + 100, -182, -182, 131, -182, 131, 121, 131, 121, 55, | |
1209 | + 121, 64, -212, 56, -176, -176, 233, 235, 208, 270, | |
1210 | + 271, 348, 272, 129, 148, 129, 244, 129, 157, 248, | |
1211 | + 82, 249, 83, 100, 149, 264, 265, 254, -2, 257, | |
1212 | + 234, 236, 295, 146, 155, 36, 207, 55, 279, 280, | |
1213 | + 318, 56, -182, 309, 319, 287, 58, 297, 148, 133, | |
1214 | + 278, 39, 362, 24, 208, 163, 47, 100, 298, 285, | |
1215 | + 273, 286, 208, 24, 224, 291, 292, 293, 4, 5, | |
1216 | + 6, 150, 151, 7, 25, 8, 213, 9, 312, 53, | |
1217 | + 217, 313, 10, 7, 25, 50, 11, 9, 131, 131, | |
1218 | + 307, 121, 121, 153, 153, 153, 310, 311, 333, 86, | |
1219 | + 300, 334, 305, 62, 26, 225, 27, 352, 129, 129, | |
1220 | + 353, 299, 325, 326, 26, 34, 27, 154, 154, 154, | |
1221 | + 320, 322, 85, 355, 65, 34, 356, 81, 148, 327, | |
1222 | + 242, 75, 175, 76, 176, 177, 87, 100, 178, 179, | |
1223 | + 4, 5, 6, 88, -83, 7, -83, -29, 180, 9, | |
1224 | + 4, 5, 6, 58, 144, 7, 89, 351, 11, 9, | |
1225 | + 153, 90, 131, 131, 9, 121, 121, 345, 11, 335, | |
1226 | + 336, 343, 344, 91, 92, 134, 339, 181, 357, 132, | |
1227 | + 136, 358, 129, 129, 154, 182, 183, 137, 138, 139, | |
1228 | + 141, 184, 148, 143, 277, 166, 175, 364, 176, 177, | |
1229 | + 153, 100, 178, 179, 4, 5, 6, 171, 174, 7, | |
1230 | + 100, 8, 180, 9, 205, 214, 367, 359, 10, 148, | |
1231 | + 209, 329, 11, 175, 154, 176, 177, 216, 100, 178, | |
1232 | + 179, 220, 221, 222, 231, 232, 237, 239, 238, 180, | |
1233 | + 241, 181, 245, 251, 275, -212, 162, 148, 252, 182, | |
1234 | + 183, 175, 276, 176, 177, 184, 100, 178, 179, 281, | |
1235 | + 283, 288, 328, 314, 296, 308, 342, 180, 181, 323, | |
1236 | + 324, 337, 341, 242, 148, 346, 182, 183, 175, 347, | |
1237 | + 176, 177, 184, 100, 178, 179, 349, 350, 354, 366, | |
1238 | + 363, 51, 52, 135, 180, 147, 181, 164, 361, 93, | |
1239 | + 340, 57, 315, 365, 182, 183, 250, 96, 142, 316, | |
1240 | + 184, 0, 97, 0, 98, 0, 317, 99, 100, 0, | |
1241 | + 0, 0, 0, 181, 0, 0, 0, 0, 0, 0, | |
1242 | + 0, 101, 0, 0, 0, 0, 102, 184, 103, 0, | |
1243 | + 104, 96, 105, 58, -113, 0, 97, 0, 98, 0, | |
1244 | + 0, 99, 100, 0, 0, 0, 0, 106, 0, 107, | |
1245 | + 0, 0, -113, 0, 0, 101, 0, 0, 96, 0, | |
1246 | + 102, -113, 103, 97, 104, 98, 105, 58, 99, 100, | |
1247 | + -176, -176, -176, 259, 260, 261, -176, 0, 0, 262, | |
1248 | + 0, 106, 101, 107, 0, 0, -113, 102, 0, 103, | |
1249 | + 0, 104, 0, 105, 58, 0, -113, 0, 0, 0, | |
1250 | + 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, | |
1251 | + 107, 0, 0, -113, -176, -176, -176, 263, 264, 265, | |
1252 | + 0, 0, 0, -176, -176, 0, 266, 267, 97, 0, | |
1253 | + 98, 0, 0, 99, 100, 0, 0, 0, 0, 0, | |
1254 | + 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, | |
1255 | + 0, 0, 102, 0, 103, 0, 104, 0, 105, 58, | |
1256 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
1257 | - 0, 0, 0, 104, 0, 105 | |
1258 | + 0, 0, 0, 106, 0, 107 | |
1259 | }; | |
1260 | ||
1261 | static const short yycheck[] = | |
1262 | { | |
1263 | - 58, 89, 84, 58, 96, 113, 99, 137, 243, 84, | |
1264 | - 178, 55, 104, 180, 181, 85, 48, 110, 18, 15, | |
1265 | - 58, 38, 31, 15, 117, 5, 84, 171, 86, 18, | |
1266 | - 2, 89, 4, 5, 6, 12, 37, 38, 27, 56, | |
1267 | - 31, 30, 33, 38, 102, 19, 20, 56, 22, 93, | |
1268 | - 12, 19, 20, 111, 22, 113, 111, 115, 113, 55, | |
1269 | - 115, 56, 62, 55, 41, 59, 148, 149, 21, 60, | |
1270 | - 50, 306, 4, 111, 3, 113, 169, 115, 21, 172, | |
1271 | - 12, 173, 64, 12, 13, 67, 3, 179, 0, 182, | |
1272 | - 148, 149, 222, 82, 164, 12, 70, 93, 206, 207, | |
1273 | - 267, 93, 70, 247, 272, 4, 39, 60, 61, 56, | |
1274 | - 203, 83, 347, 12, 37, 87, 88, 60, 61, 212, | |
1275 | - 67, 214, 44, 56, 46, 218, 219, 220, 40, 41, | |
1276 | - 42, 60, 61, 45, 38, 47, 111, 49, 1, 65, | |
1277 | - 115, 56, 54, 56, 43, 49, 58, 10, 206, 207, | |
1278 | - 243, 206, 207, 235, 236, 237, 249, 250, 1, 56, | |
1279 | - 235, 64, 237, 64, 67, 295, 1, 10, 206, 207, | |
1280 | - 56, 229, 280, 281, 1, 10, 1, 235, 236, 237, | |
1281 | - 273, 274, 1, 10, 64, 10, 59, 67, 3, 282, | |
1282 | - 5, 10, 7, 64, 9, 10, 67, 12, 13, 14, | |
1283 | - 40, 41, 42, 56, 44, 45, 46, 37, 23, 49, | |
1284 | - 40, 41, 42, 27, 56, 45, 30, 310, 58, 49, | |
1285 | - 302, 49, 280, 281, 57, 280, 281, 302, 58, 63, | |
1286 | - 64, 41, 63, 64, 12, 45, 294, 52, 331, 49, | |
1287 | - 12, 334, 280, 281, 302, 60, 61, 56, 66, 56, | |
1288 | - 56, 66, 3, 56, 5, 66, 7, 350, 9, 10, | |
1289 | - 342, 12, 13, 14, 40, 41, 42, 66, 12, 45, | |
1290 | - 66, 47, 23, 49, 26, 18, 364, 335, 54, 3, | |
1291 | - 35, 5, 58, 7, 342, 9, 10, 64, 12, 13, | |
1292 | - 14, 18, 62, 56, 65, 62, 62, 18, 56, 23, | |
1293 | - 64, 52, 62, 33, 66, 66, 364, 3, 64, 60, | |
1294 | - 61, 7, 27, 9, 10, 66, 12, 13, 14, 64, | |
1295 | - 66, 33, 24, 65, 64, 5, 67, 23, 52, 67, | |
1296 | - 67, 65, 63, 0, 3, 67, 60, 61, 7, 67, | |
1297 | - 9, 10, 66, 12, 13, 14, 64, 67, 67, 0, | |
1298 | - 67, 29, 10, 10, 23, 65, 52, 83, 342, 88, | |
1299 | - 51, 295, 78, 15, 60, 61, 256, 1, 353, 174, | |
1300 | - 66, 266, 6, 266, 8, -1, -1, 11, 12, -1, | |
1301 | + 60, 91, 86, 60, 98, 115, 101, 139, 245, 86, | |
1302 | + 180, 57, 106, 182, 183, 87, 5, 112, 18, 17, | |
1303 | + 60, 0, 38, 17, 119, 21, 86, 173, 88, 20, | |
1304 | + 4, 91, 6, 7, 8, 2, 12, 38, 29, 4, | |
1305 | + 56, 32, 4, 31, 104, 12, 21, 12, 49, 95, | |
1306 | + 12, 19, 20, 113, 22, 115, 113, 117, 115, 57, | |
1307 | + 117, 50, 62, 57, 60, 61, 150, 151, 56, 19, | |
1308 | + 20, 308, 22, 113, 3, 115, 171, 117, 43, 174, | |
1309 | + 33, 175, 35, 12, 13, 60, 61, 181, 0, 184, | |
1310 | + 150, 151, 224, 84, 166, 12, 38, 95, 208, 209, | |
1311 | + 269, 95, 70, 249, 274, 39, 37, 56, 3, 62, | |
1312 | + 205, 85, 349, 2, 56, 89, 90, 12, 67, 214, | |
1313 | + 70, 216, 56, 12, 41, 220, 221, 222, 40, 41, | |
1314 | + 42, 60, 61, 45, 2, 47, 113, 49, 64, 41, | |
1315 | + 117, 67, 54, 45, 12, 48, 58, 49, 208, 209, | |
1316 | + 245, 208, 209, 237, 238, 239, 251, 252, 64, 59, | |
1317 | + 237, 67, 239, 56, 2, 297, 2, 64, 208, 209, | |
1318 | + 67, 231, 282, 283, 12, 2, 12, 237, 238, 239, | |
1319 | + 275, 276, 56, 64, 29, 12, 67, 32, 3, 284, | |
1320 | + 5, 44, 7, 46, 9, 10, 56, 12, 13, 14, | |
1321 | + 40, 41, 42, 65, 44, 45, 46, 37, 23, 49, | |
1322 | + 40, 41, 42, 37, 38, 45, 64, 312, 58, 49, | |
1323 | + 304, 56, 282, 283, 49, 282, 283, 304, 58, 63, | |
1324 | + 64, 63, 64, 59, 56, 56, 296, 52, 333, 57, | |
1325 | + 12, 336, 282, 283, 304, 60, 61, 12, 56, 66, | |
1326 | + 56, 66, 3, 56, 5, 56, 7, 352, 9, 10, | |
1327 | + 344, 12, 13, 14, 40, 41, 42, 66, 66, 45, | |
1328 | + 12, 47, 23, 49, 66, 18, 366, 337, 54, 3, | |
1329 | + 26, 5, 58, 7, 344, 9, 10, 35, 12, 13, | |
1330 | + 14, 64, 18, 62, 65, 56, 62, 18, 62, 23, | |
1331 | + 56, 52, 64, 66, 64, 62, 366, 3, 66, 60, | |
1332 | + 61, 7, 64, 9, 10, 66, 12, 13, 14, 27, | |
1333 | + 33, 66, 33, 67, 65, 64, 24, 23, 52, 67, | |
1334 | + 67, 65, 63, 5, 3, 67, 60, 61, 7, 67, | |
1335 | + 9, 10, 66, 12, 13, 14, 64, 67, 67, 29, | |
1336 | + 67, 12, 12, 67, 23, 85, 52, 90, 344, 53, | |
1337 | + 297, 17, 258, 355, 60, 61, 176, 1, 80, 268, | |
1338 | + 66, -1, 6, -1, 8, -1, 268, 11, 12, -1, | |
1339 | -1, -1, -1, 52, -1, -1, -1, -1, -1, -1, | |
1340 | -1, 25, -1, -1, -1, -1, 30, 66, 32, -1, | |
1341 | 34, 1, 36, 37, 38, -1, 6, -1, 8, -1, | |
1342 | @@ -700,144 +961,50 @@ | |
1343 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | |
1344 | -1, -1, -1, 51, -1, 53 | |
1345 | }; | |
1346 | -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ | |
1347 | -#line 3 "/usr/share/bison/bison.simple" | |
1348 | - | |
1349 | -/* Skeleton output parser for bison, | |
1350 | - | |
1351 | - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software | |
1352 | - Foundation, Inc. | |
1353 | - | |
1354 | - This program is free software; you can redistribute it and/or modify | |
1355 | - it under the terms of the GNU General Public License as published by | |
1356 | - the Free Software Foundation; either version 2, or (at your option) | |
1357 | - any later version. | |
1358 | - | |
1359 | - This program is distributed in the hope that it will be useful, | |
1360 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | |
1361 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
1362 | - GNU General Public License for more details. | |
1363 | - | |
1364 | - You should have received a copy of the GNU General Public License | |
1365 | - along with this program; if not, write to the Free Software | |
1366 | - Foundation, Inc., 59 Temple Place - Suite 330, | |
1367 | - Boston, MA 02111-1307, USA. */ | |
1368 | ||
1369 | -/* As a special exception, when this file is copied by Bison into a | |
1370 | - Bison output file, you may use that output file without restriction. | |
1371 | - This special exception was added by the Free Software Foundation | |
1372 | - in version 1.24 of Bison. */ | |
1373 | - | |
1374 | -/* This is the parser code that is written into each bison parser when | |
1375 | - the %semantic_parser declaration is not specified in the grammar. | |
1376 | - It was written by Richard Stallman by simplifying the hairy parser | |
1377 | - used when %semantic_parser is specified. */ | |
1378 | - | |
1379 | -/* All symbols defined below should begin with yy or YY, to avoid | |
1380 | - infringing on user name space. This should be done even for local | |
1381 | - variables, as they might otherwise be expanded by user macros. | |
1382 | - There are some unavoidable exceptions within include files to | |
1383 | - define necessary library symbols; they are noted "INFRINGES ON | |
1384 | - USER NAME SPACE" below. */ | |
1385 | - | |
1386 | -#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) | |
1387 | - | |
1388 | -/* The parser invokes alloca or malloc; define the necessary symbols. */ | |
1389 | - | |
1390 | -# if YYSTACK_USE_ALLOCA | |
1391 | -# define YYSTACK_ALLOC alloca | |
1392 | -# else | |
1393 | -# ifndef YYSTACK_USE_ALLOCA | |
1394 | -# if defined (alloca) || defined (_ALLOCA_H) | |
1395 | -# define YYSTACK_ALLOC alloca | |
1396 | -# else | |
1397 | -# ifdef __GNUC__ | |
1398 | -# define YYSTACK_ALLOC __builtin_alloca | |
1399 | -# endif | |
1400 | -# endif | |
1401 | -# endif | |
1402 | -# endif | |
1403 | - | |
1404 | -# ifdef YYSTACK_ALLOC | |
1405 | - /* Pacify GCC's `empty if-body' warning. */ | |
1406 | -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) | |
1407 | -# else | |
1408 | -# if defined (__STDC__) || defined (__cplusplus) | |
1409 | -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
1410 | -# define YYSIZE_T size_t | |
1411 | -# endif | |
1412 | -# define YYSTACK_ALLOC malloc | |
1413 | -# define YYSTACK_FREE free | |
1414 | -# endif | |
1415 | -#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ | |
1416 | - | |
1417 | - | |
1418 | -#if (! defined (yyoverflow) \ | |
1419 | - && (! defined (__cplusplus) \ | |
1420 | - || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) | |
1421 | - | |
1422 | -/* A type that is properly aligned for any stack member. */ | |
1423 | -union yyalloc | |
1424 | -{ | |
1425 | - short yyss; | |
1426 | - YYSTYPE yyvs; | |
1427 | -# if YYLSP_NEEDED | |
1428 | - YYLTYPE yyls; | |
1429 | -# endif | |
1430 | +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | |
1431 | + symbol of state STATE-NUM. */ | |
1432 | +static const unsigned char yystos[] = | |
1433 | +{ | |
1434 | + 0, 72, 73, 0, 40, 41, 42, 45, 47, 49, | |
1435 | + 54, 58, 74, 75, 76, 77, 78, 79, 81, 83, | |
1436 | + 84, 85, 89, 90, 91, 96, 107, 113, 114, 115, | |
1437 | + 116, 117, 120, 121, 130, 131, 12, 92, 93, 192, | |
1438 | + 108, 109, 110, 111, 192, 97, 98, 192, 192, 192, | |
1439 | + 48, 75, 83, 41, 80, 116, 121, 131, 37, 134, | |
1440 | + 135, 136, 56, 5, 50, 136, 86, 87, 88, 89, | |
1441 | + 91, 96, 107, 113, 130, 44, 46, 118, 119, 122, | |
1442 | + 123, 136, 86, 86, 132, 56, 59, 56, 65, 64, | |
1443 | + 56, 59, 56, 108, 80, 82, 1, 6, 8, 11, | |
1444 | + 12, 25, 30, 32, 34, 36, 51, 53, 134, 137, | |
1445 | + 138, 139, 142, 144, 145, 146, 147, 148, 149, 150, | |
1446 | + 151, 155, 157, 158, 160, 161, 164, 165, 166, 187, | |
1447 | + 188, 191, 57, 86, 56, 88, 12, 12, 56, 66, | |
1448 | + 124, 56, 124, 56, 38, 133, 134, 93, 3, 13, | |
1449 | + 60, 61, 94, 95, 191, 109, 4, 43, 99, 100, | |
1450 | + 101, 106, 191, 192, 98, 99, 56, 38, 80, 38, | |
1451 | + 56, 66, 159, 159, 66, 7, 9, 10, 13, 14, | |
1452 | + 23, 52, 60, 61, 66, 95, 155, 168, 170, 171, | |
1453 | + 173, 174, 176, 177, 179, 180, 181, 183, 184, 185, | |
1454 | + 187, 190, 191, 191, 159, 66, 182, 38, 56, 26, | |
1455 | + 140, 143, 168, 137, 18, 138, 35, 137, 168, 156, | |
1456 | + 64, 18, 62, 18, 41, 110, 125, 126, 127, 128, | |
1457 | + 129, 65, 56, 95, 191, 95, 191, 62, 62, 18, | |
1458 | + 112, 56, 5, 163, 168, 64, 162, 162, 168, 159, | |
1459 | + 182, 66, 66, 176, 159, 173, 173, 168, 178, 15, | |
1460 | + 16, 17, 21, 59, 60, 61, 68, 69, 169, 172, | |
1461 | + 19, 20, 22, 70, 175, 64, 64, 5, 168, 138, | |
1462 | + 138, 27, 141, 33, 31, 168, 168, 39, 66, 152, | |
1463 | + 167, 168, 168, 168, 189, 110, 65, 56, 67, 191, | |
1464 | + 94, 94, 102, 103, 104, 94, 163, 168, 64, 162, | |
1465 | + 168, 168, 64, 67, 67, 152, 170, 171, 173, 176, | |
1466 | + 168, 186, 168, 67, 67, 138, 138, 168, 33, 5, | |
1467 | + 153, 154, 168, 64, 67, 63, 64, 65, 4, 191, | |
1468 | + 126, 63, 24, 63, 64, 94, 67, 67, 163, 64, | |
1469 | + 67, 168, 64, 67, 67, 64, 67, 168, 168, 191, | |
1470 | + 105, 103, 163, 67, 168, 154, 29, 99 | |
1471 | }; | |
1472 | ||
1473 | -/* The size of the maximum gap between one aligned stack and the next. */ | |
1474 | -# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) | |
1475 | - | |
1476 | -/* The size of an array large to enough to hold all stacks, each with | |
1477 | - N elements. */ | |
1478 | -# if YYLSP_NEEDED | |
1479 | -# define YYSTACK_BYTES(N) \ | |
1480 | - ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ | |
1481 | - + 2 * YYSTACK_GAP_MAX) | |
1482 | -# else | |
1483 | -# define YYSTACK_BYTES(N) \ | |
1484 | - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ | |
1485 | - + YYSTACK_GAP_MAX) | |
1486 | -# endif | |
1487 | - | |
1488 | -/* Copy COUNT objects from FROM to TO. The source and destination do | |
1489 | - not overlap. */ | |
1490 | -# ifndef YYCOPY | |
1491 | -# if 1 < __GNUC__ | |
1492 | -# define YYCOPY(To, From, Count) \ | |
1493 | - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | |
1494 | -# else | |
1495 | -# define YYCOPY(To, From, Count) \ | |
1496 | - do \ | |
1497 | - { \ | |
1498 | - register YYSIZE_T yyi; \ | |
1499 | - for (yyi = 0; yyi < (Count); yyi++) \ | |
1500 | - (To)[yyi] = (From)[yyi]; \ | |
1501 | - } \ | |
1502 | - while (0) | |
1503 | -# endif | |
1504 | -# endif | |
1505 | - | |
1506 | -/* Relocate STACK from its old location to the new one. The | |
1507 | - local variables YYSIZE and YYSTACKSIZE give the old and new number of | |
1508 | - elements in the stack, and YYPTR gives the new location of the | |
1509 | - stack. Advance YYPTR to a properly aligned location for the next | |
1510 | - stack. */ | |
1511 | -# define YYSTACK_RELOCATE(Stack) \ | |
1512 | - do \ | |
1513 | - { \ | |
1514 | - YYSIZE_T yynewbytes; \ | |
1515 | - YYCOPY (&yyptr->Stack, Stack, yysize); \ | |
1516 | - Stack = &yyptr->Stack; \ | |
1517 | - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ | |
1518 | - yyptr += yynewbytes / sizeof (*yyptr); \ | |
1519 | - } \ | |
1520 | - while (0) | |
1521 | - | |
1522 | -#endif | |
1523 | - | |
1524 | - | |
1525 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) | |
1526 | # define YYSIZE_T __SIZE_TYPE__ | |
1527 | #endif | |
1528 | @@ -856,29 +1023,34 @@ | |
1529 | ||
1530 | #define yyerrok (yyerrstatus = 0) | |
1531 | #define yyclearin (yychar = YYEMPTY) | |
1532 | -#define YYEMPTY -2 | |
1533 | +#define YYEMPTY (-2) | |
1534 | #define YYEOF 0 | |
1535 | + | |
1536 | #define YYACCEPT goto yyacceptlab | |
1537 | -#define YYABORT goto yyabortlab | |
1538 | +#define YYABORT goto yyabortlab | |
1539 | #define YYERROR goto yyerrlab1 | |
1540 | + | |
1541 | /* Like YYERROR except do call yyerror. This remains here temporarily | |
1542 | to ease the transition to the new meaning of YYERROR, for GCC. | |
1543 | Once GCC version 2 has supplanted version 1, this can go. */ | |
1544 | + | |
1545 | #define YYFAIL goto yyerrlab | |
1546 | + | |
1547 | #define YYRECOVERING() (!!yyerrstatus) | |
1548 | + | |
1549 | #define YYBACKUP(Token, Value) \ | |
1550 | do \ | |
1551 | if (yychar == YYEMPTY && yylen == 1) \ | |
1552 | { \ | |
1553 | yychar = (Token); \ | |
1554 | yylval = (Value); \ | |
1555 | - yychar1 = YYTRANSLATE (yychar); \ | |
1556 | + yytoken = YYTRANSLATE (yychar); \ | |
1557 | YYPOPSTACK; \ | |
1558 | goto yybackup; \ | |
1559 | } \ | |
1560 | else \ | |
1561 | { \ | |
1562 | - yyerror ("syntax error: cannot back up"); \ | |
1563 | + yyerror ("syntax error: cannot back up");\ | |
1564 | YYERROR; \ | |
1565 | } \ | |
1566 | while (0) | |
1567 | @@ -886,41 +1058,24 @@ | |
1568 | #define YYTERROR 1 | |
1569 | #define YYERRCODE 256 | |
1570 | ||
1571 | - | |
1572 | /* YYLLOC_DEFAULT -- Compute the default location (before the actions | |
1573 | - are run). | |
1574 | - | |
1575 | - When YYLLOC_DEFAULT is run, CURRENT is set the location of the | |
1576 | - first token. By default, to implement support for ranges, extend | |
1577 | - its range to the last symbol. */ | |
1578 | + are run). */ | |
1579 | ||
1580 | #ifndef YYLLOC_DEFAULT | |
1581 | -# define YYLLOC_DEFAULT(Current, Rhs, N) \ | |
1582 | - Current.last_line = Rhs[N].last_line; \ | |
1583 | - Current.last_column = Rhs[N].last_column; | |
1584 | +# define YYLLOC_DEFAULT(Current, Rhs, N) \ | |
1585 | + Current.first_line = Rhs[1].first_line; \ | |
1586 | + Current.first_column = Rhs[1].first_column; \ | |
1587 | + Current.last_line = Rhs[N].last_line; \ | |
1588 | + Current.last_column = Rhs[N].last_column; | |
1589 | #endif | |
1590 | ||
1591 | - | |
1592 | /* YYLEX -- calling `yylex' with the right arguments. */ | |
1593 | ||
1594 | -#if YYPURE | |
1595 | -# if YYLSP_NEEDED | |
1596 | -# ifdef YYLEX_PARAM | |
1597 | -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) | |
1598 | -# else | |
1599 | -# define YYLEX yylex (&yylval, &yylloc) | |
1600 | -# endif | |
1601 | -# else /* !YYLSP_NEEDED */ | |
1602 | -# ifdef YYLEX_PARAM | |
1603 | -# define YYLEX yylex (&yylval, YYLEX_PARAM) | |
1604 | -# else | |
1605 | -# define YYLEX yylex (&yylval) | |
1606 | -# endif | |
1607 | -# endif /* !YYLSP_NEEDED */ | |
1608 | -#else /* !YYPURE */ | |
1609 | -# define YYLEX yylex () | |
1610 | -#endif /* !YYPURE */ | |
1611 | - | |
1612 | +#ifdef YYLEX_PARAM | |
1613 | +# define YYLEX yylex (YYLEX_PARAM) | |
1614 | +#else | |
1615 | +# define YYLEX yylex () | |
1616 | +#endif | |
1617 | ||
1618 | /* Enable debugging if requested. */ | |
1619 | #if YYDEBUG | |
1620 | @@ -935,13 +1090,93 @@ | |
1621 | if (yydebug) \ | |
1622 | YYFPRINTF Args; \ | |
1623 | } while (0) | |
1624 | + | |
1625 | +# define YYDSYMPRINT(Args) \ | |
1626 | +do { \ | |
1627 | + if (yydebug) \ | |
1628 | + yysymprint Args; \ | |
1629 | +} while (0) | |
1630 | + | |
1631 | +# define YYDSYMPRINTF(Title, Token, Value, Location) \ | |
1632 | +do { \ | |
1633 | + if (yydebug) \ | |
1634 | + { \ | |
1635 | + YYFPRINTF (stderr, "%s ", Title); \ | |
1636 | + yysymprint (stderr, \ | |
1637 | + Token, Value); \ | |
1638 | + YYFPRINTF (stderr, "\n"); \ | |
1639 | + } \ | |
1640 | +} while (0) | |
1641 | + | |
1642 | +/*------------------------------------------------------------------. | |
1643 | +| yy_stack_print -- Print the state stack from its BOTTOM up to its | | |
1644 | +| TOP (cinluded). | | |
1645 | +`------------------------------------------------------------------*/ | |
1646 | + | |
1647 | +#if defined (__STDC__) || defined (__cplusplus) | |
1648 | +static void | |
1649 | +yy_stack_print (short *bottom, short *top) | |
1650 | +#else | |
1651 | +static void | |
1652 | +yy_stack_print (bottom, top) | |
1653 | + short *bottom; | |
1654 | + short *top; | |
1655 | +#endif | |
1656 | +{ | |
1657 | + YYFPRINTF (stderr, "Stack now"); | |
1658 | + for (/* Nothing. */; bottom <= top; ++bottom) | |
1659 | + YYFPRINTF (stderr, " %d", *bottom); | |
1660 | + YYFPRINTF (stderr, "\n"); | |
1661 | +} | |
1662 | + | |
1663 | +# define YY_STACK_PRINT(Bottom, Top) \ | |
1664 | +do { \ | |
1665 | + if (yydebug) \ | |
1666 | + yy_stack_print ((Bottom), (Top)); \ | |
1667 | +} while (0) | |
1668 | + | |
1669 | + | |
1670 | +/*------------------------------------------------. | |
1671 | +| Report that the YYRULE is going to be reduced. | | |
1672 | +`------------------------------------------------*/ | |
1673 | + | |
1674 | +#if defined (__STDC__) || defined (__cplusplus) | |
1675 | +static void | |
1676 | +yy_reduce_print (int yyrule) | |
1677 | +#else | |
1678 | +static void | |
1679 | +yy_reduce_print (yyrule) | |
1680 | + int yyrule; | |
1681 | +#endif | |
1682 | +{ | |
1683 | + int yyi; | |
1684 | + unsigned int yylineno = yyrline[yyrule]; | |
1685 | + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", | |
1686 | + yyrule - 1, yylineno); | |
1687 | + /* Print the symbols being reduced, and their result. */ | |
1688 | + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) | |
1689 | + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); | |
1690 | + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); | |
1691 | +} | |
1692 | + | |
1693 | +# define YY_REDUCE_PRINT(Rule) \ | |
1694 | +do { \ | |
1695 | + if (yydebug) \ | |
1696 | + yy_reduce_print (Rule); \ | |
1697 | +} while (0) | |
1698 | + | |
1699 | /* Nonzero means print parse trace. It is left uninitialized so that | |
1700 | multiple parsers can coexist. */ | |
1701 | int yydebug; | |
1702 | #else /* !YYDEBUG */ | |
1703 | # define YYDPRINTF(Args) | |
1704 | +# define YYDSYMPRINT(Args) | |
1705 | +# define YYDSYMPRINTF(Title, Token, Value, Location) | |
1706 | +# define YY_STACK_PRINT(Bottom, Top) | |
1707 | +# define YY_REDUCE_PRINT(Rule) | |
1708 | #endif /* !YYDEBUG */ | |
1709 | ||
1710 | + | |
1711 | /* YYINITDEPTH -- initial size of the parser's stacks. */ | |
1712 | #ifndef YYINITDEPTH | |
1713 | # define YYINITDEPTH 200 | |
1714 | @@ -961,8 +1196,10 @@ | |
1715 | #ifndef YYMAXDEPTH | |
1716 | # define YYMAXDEPTH 10000 | |
1717 | #endif | |
1718 | + | |
1719 | \f | |
1720 | -#ifdef YYERROR_VERBOSE | |
1721 | + | |
1722 | +#if YYERROR_VERBOSE | |
1723 | ||
1724 | # ifndef yystrlen | |
1725 | # if defined (__GLIBC__) && defined (_STRING_H) | |
1726 | @@ -1012,86 +1249,134 @@ | |
1727 | } | |
1728 | # endif | |
1729 | # endif | |
1730 | -#endif | |
1731 | + | |
1732 | +#endif /* !YYERROR_VERBOSE */ | |
1733 | + | |
1734 | \f | |
1735 | -#line 315 "/usr/share/bison/bison.simple" | |
1736 | ||
1737 | +#if YYDEBUG | |
1738 | +/*--------------------------------. | |
1739 | +| Print this symbol on YYOUTPUT. | | |
1740 | +`--------------------------------*/ | |
1741 | + | |
1742 | +#if defined (__STDC__) || defined (__cplusplus) | |
1743 | +static void | |
1744 | +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) | |
1745 | +#else | |
1746 | +static void | |
1747 | +yysymprint (yyoutput, yytype, yyvaluep) | |
1748 | + FILE *yyoutput; | |
1749 | + int yytype; | |
1750 | + YYSTYPE *yyvaluep; | |
1751 | +#endif | |
1752 | +{ | |
1753 | + /* Pacify ``unused variable'' warnings. */ | |
1754 | + (void) yyvaluep; | |
1755 | + | |
1756 | + if (yytype < YYNTOKENS) | |
1757 | + { | |
1758 | + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); | |
1759 | +# ifdef YYPRINT | |
1760 | + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | |
1761 | +# endif | |
1762 | + } | |
1763 | + else | |
1764 | + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); | |
1765 | + | |
1766 | + switch (yytype) | |
1767 | + { | |
1768 | + default: | |
1769 | + break; | |
1770 | + } | |
1771 | + YYFPRINTF (yyoutput, ")"); | |
1772 | +} | |
1773 | + | |
1774 | +#endif /* ! YYDEBUG */ | |
1775 | +/*-----------------------------------------------. | |
1776 | +| Release the memory associated to this symbol. | | |
1777 | +`-----------------------------------------------*/ | |
1778 | + | |
1779 | +#if defined (__STDC__) || defined (__cplusplus) | |
1780 | +static void | |
1781 | +yydestruct (int yytype, YYSTYPE *yyvaluep) | |
1782 | +#else | |
1783 | +static void | |
1784 | +yydestruct (yytype, yyvaluep) | |
1785 | + int yytype; | |
1786 | + YYSTYPE *yyvaluep; | |
1787 | +#endif | |
1788 | +{ | |
1789 | + /* Pacify ``unused variable'' warnings. */ | |
1790 | + (void) yyvaluep; | |
1791 | + | |
1792 | + switch (yytype) | |
1793 | + { | |
1794 | + | |
1795 | + default: | |
1796 | + break; | |
1797 | + } | |
1798 | +} | |
1799 | +\f | |
1800 | ||
1801 | -/* The user can define YYPARSE_PARAM as the name of an argument to be passed | |
1802 | - into yyparse. The argument should have type void *. | |
1803 | - It should actually point to an object. | |
1804 | - Grammar actions can access the variable by casting it | |
1805 | - to the proper pointer type. */ | |
1806 | +/* Prevent warnings from -Wmissing-prototypes. */ | |
1807 | ||
1808 | #ifdef YYPARSE_PARAM | |
1809 | # if defined (__STDC__) || defined (__cplusplus) | |
1810 | -# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM | |
1811 | -# define YYPARSE_PARAM_DECL | |
1812 | +int yyparse (void *YYPARSE_PARAM); | |
1813 | # else | |
1814 | -# define YYPARSE_PARAM_ARG YYPARSE_PARAM | |
1815 | -# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; | |
1816 | +int yyparse (); | |
1817 | # endif | |
1818 | -#else /* !YYPARSE_PARAM */ | |
1819 | -# define YYPARSE_PARAM_ARG | |
1820 | -# define YYPARSE_PARAM_DECL | |
1821 | -#endif /* !YYPARSE_PARAM */ | |
1822 | - | |
1823 | -/* Prevent warning if -Wstrict-prototypes. */ | |
1824 | -#ifdef __GNUC__ | |
1825 | -# ifdef YYPARSE_PARAM | |
1826 | -int yyparse (void *); | |
1827 | -# else | |
1828 | +#else /* ! YYPARSE_PARAM */ | |
1829 | +#if defined (__STDC__) || defined (__cplusplus) | |
1830 | int yyparse (void); | |
1831 | -# endif | |
1832 | +#else | |
1833 | +int yyparse (); | |
1834 | #endif | |
1835 | +#endif /* ! YYPARSE_PARAM */ | |
1836 | ||
1837 | -/* YY_DECL_VARIABLES -- depending whether we use a pure parser, | |
1838 | - variables are global, or local to YYPARSE. */ | |
1839 | ||
1840 | -#define YY_DECL_NON_LSP_VARIABLES \ | |
1841 | -/* The lookahead symbol. */ \ | |
1842 | -int yychar; \ | |
1843 | - \ | |
1844 | -/* The semantic value of the lookahead symbol. */ \ | |
1845 | -YYSTYPE yylval; \ | |
1846 | - \ | |
1847 | -/* Number of parse errors so far. */ \ | |
1848 | -int yynerrs; | |
1849 | ||
1850 | -#if YYLSP_NEEDED | |
1851 | -# define YY_DECL_VARIABLES \ | |
1852 | -YY_DECL_NON_LSP_VARIABLES \ | |
1853 | - \ | |
1854 | -/* Location data for the lookahead symbol. */ \ | |
1855 | -YYLTYPE yylloc; | |
1856 | -#else | |
1857 | -# define YY_DECL_VARIABLES \ | |
1858 | -YY_DECL_NON_LSP_VARIABLES | |
1859 | -#endif | |
1860 | +/* The lookahead symbol. */ | |
1861 | +int yychar; | |
1862 | ||
1863 | +/* The semantic value of the lookahead symbol. */ | |
1864 | +YYSTYPE yylval; | |
1865 | ||
1866 | -/* If nonreentrant, generate the variables here. */ | |
1867 | +/* Number of syntax errors so far. */ | |
1868 | +int yynerrs; | |
1869 | ||
1870 | -#if !YYPURE | |
1871 | -YY_DECL_VARIABLES | |
1872 | -#endif /* !YYPURE */ | |
1873 | ||
1874 | + | |
1875 | +/*----------. | |
1876 | +| yyparse. | | |
1877 | +`----------*/ | |
1878 | + | |
1879 | +#ifdef YYPARSE_PARAM | |
1880 | +# if defined (__STDC__) || defined (__cplusplus) | |
1881 | +int yyparse (void *YYPARSE_PARAM) | |
1882 | +# else | |
1883 | +int yyparse (YYPARSE_PARAM) | |
1884 | + void *YYPARSE_PARAM; | |
1885 | +# endif | |
1886 | +#else /* ! YYPARSE_PARAM */ | |
1887 | +#if defined (__STDC__) || defined (__cplusplus) | |
1888 | int | |
1889 | -yyparse (YYPARSE_PARAM_ARG) | |
1890 | - YYPARSE_PARAM_DECL | |
1891 | -{ | |
1892 | - /* If reentrant, generate the variables here. */ | |
1893 | -#if YYPURE | |
1894 | - YY_DECL_VARIABLES | |
1895 | -#endif /* !YYPURE */ | |
1896 | +yyparse (void) | |
1897 | +#else | |
1898 | +int | |
1899 | +yyparse () | |
1900 | ||
1901 | +#endif | |
1902 | +#endif | |
1903 | +{ | |
1904 | + | |
1905 | register int yystate; | |
1906 | register int yyn; | |
1907 | int yyresult; | |
1908 | /* Number of tokens to shift before error messages enabled. */ | |
1909 | int yyerrstatus; | |
1910 | /* Lookahead token as an internal (translated) token number. */ | |
1911 | - int yychar1 = 0; | |
1912 | + int yytoken = 0; | |
1913 | ||
1914 | /* Three stacks and their tools: | |
1915 | `yyss': related to states, | |
1916 | @@ -1101,7 +1386,7 @@ | |
1917 | Refer to the stacks thru separate pointers, to allow yyoverflow | |
1918 | to reallocate them elsewhere. */ | |
1919 | ||
1920 | - /* The state stack. */ | |
1921 | + /* The state stack. */ | |
1922 | short yyssa[YYINITDEPTH]; | |
1923 | short *yyss = yyssa; | |
1924 | register short *yyssp; | |
1925 | @@ -1111,31 +1396,19 @@ | |
1926 | YYSTYPE *yyvs = yyvsa; | |
1927 | register YYSTYPE *yyvsp; | |
1928 | ||
1929 | -#if YYLSP_NEEDED | |
1930 | - /* The location stack. */ | |
1931 | - YYLTYPE yylsa[YYINITDEPTH]; | |
1932 | - YYLTYPE *yyls = yylsa; | |
1933 | - YYLTYPE *yylsp; | |
1934 | -#endif | |
1935 | ||
1936 | -#if YYLSP_NEEDED | |
1937 | -# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) | |
1938 | -#else | |
1939 | -# define YYPOPSTACK (yyvsp--, yyssp--) | |
1940 | -#endif | |
1941 | ||
1942 | - YYSIZE_T yystacksize = YYINITDEPTH; | |
1943 | +#define YYPOPSTACK (yyvsp--, yyssp--) | |
1944 | ||
1945 | + YYSIZE_T yystacksize = YYINITDEPTH; | |
1946 | ||
1947 | /* The variables used to return semantic value and location from the | |
1948 | action routines. */ | |
1949 | YYSTYPE yyval; | |
1950 | -#if YYLSP_NEEDED | |
1951 | - YYLTYPE yyloc; | |
1952 | -#endif | |
1953 | + | |
1954 | ||
1955 | /* When reducing, the number of symbols on the RHS of the reduced | |
1956 | - rule. */ | |
1957 | + rule. */ | |
1958 | int yylen; | |
1959 | ||
1960 | YYDPRINTF ((stderr, "Starting parse\n")); | |
1961 | @@ -1152,9 +1425,7 @@ | |
1962 | ||
1963 | yyssp = yyss; | |
1964 | yyvsp = yyvs; | |
1965 | -#if YYLSP_NEEDED | |
1966 | - yylsp = yyls; | |
1967 | -#endif | |
1968 | + | |
1969 | goto yysetstate; | |
1970 | ||
1971 | /*------------------------------------------------------------. | |
1972 | @@ -1169,7 +1440,7 @@ | |
1973 | yysetstate: | |
1974 | *yyssp = yystate; | |
1975 | ||
1976 | - if (yyssp >= yyss + yystacksize - 1) | |
1977 | + if (yyss + yystacksize - 1 <= yyssp) | |
1978 | { | |
1979 | /* Get the current used size of the three stacks, in elements. */ | |
1980 | YYSIZE_T yysize = yyssp - yyss + 1; | |
1981 | @@ -1182,24 +1453,17 @@ | |
1982 | YYSTYPE *yyvs1 = yyvs; | |
1983 | short *yyss1 = yyss; | |
1984 | ||
1985 | + | |
1986 | /* Each stack pointer address is followed by the size of the | |
1987 | - data in use in that stack, in bytes. */ | |
1988 | -# if YYLSP_NEEDED | |
1989 | - YYLTYPE *yyls1 = yyls; | |
1990 | - /* This used to be a conditional around just the two extra args, | |
1991 | - but that might be undefined if yyoverflow is a macro. */ | |
1992 | - yyoverflow ("parser stack overflow", | |
1993 | - &yyss1, yysize * sizeof (*yyssp), | |
1994 | - &yyvs1, yysize * sizeof (*yyvsp), | |
1995 | - &yyls1, yysize * sizeof (*yylsp), | |
1996 | - &yystacksize); | |
1997 | - yyls = yyls1; | |
1998 | -# else | |
1999 | + data in use in that stack, in bytes. This used to be a | |
2000 | + conditional around just the two extra args, but that might | |
2001 | + be undefined if yyoverflow is a macro. */ | |
2002 | yyoverflow ("parser stack overflow", | |
2003 | &yyss1, yysize * sizeof (*yyssp), | |
2004 | &yyvs1, yysize * sizeof (*yyvsp), | |
2005 | + | |
2006 | &yystacksize); | |
2007 | -# endif | |
2008 | + | |
2009 | yyss = yyss1; | |
2010 | yyvs = yyvs1; | |
2011 | } | |
2012 | @@ -1208,10 +1472,10 @@ | |
2013 | goto yyoverflowlab; | |
2014 | # else | |
2015 | /* Extend the stack our own way. */ | |
2016 | - if (yystacksize >= YYMAXDEPTH) | |
2017 | + if (YYMAXDEPTH <= yystacksize) | |
2018 | goto yyoverflowlab; | |
2019 | yystacksize *= 2; | |
2020 | - if (yystacksize > YYMAXDEPTH) | |
2021 | + if (YYMAXDEPTH < yystacksize) | |
2022 | yystacksize = YYMAXDEPTH; | |
2023 | ||
2024 | { | |
2025 | @@ -1222,10 +1486,8 @@ | |
2026 | goto yyoverflowlab; | |
2027 | YYSTACK_RELOCATE (yyss); | |
2028 | YYSTACK_RELOCATE (yyvs); | |
2029 | -# if YYLSP_NEEDED | |
2030 | - YYSTACK_RELOCATE (yyls); | |
2031 | -# endif | |
2032 | -# undef YYSTACK_RELOCATE | |
2033 | + | |
2034 | +# undef YYSTACK_RELOCATE | |
2035 | if (yyss1 != yyssa) | |
2036 | YYSTACK_FREE (yyss1); | |
2037 | } | |
2038 | @@ -1234,14 +1496,12 @@ | |
2039 | ||
2040 | yyssp = yyss + yysize - 1; | |
2041 | yyvsp = yyvs + yysize - 1; | |
2042 | -#if YYLSP_NEEDED | |
2043 | - yylsp = yyls + yysize - 1; | |
2044 | -#endif | |
2045 | + | |
2046 | ||
2047 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", | |
2048 | (unsigned long int) yystacksize)); | |
2049 | ||
2050 | - if (yyssp >= yyss + yystacksize - 1) | |
2051 | + if (yyss + yystacksize - 1 <= yyssp) | |
2052 | YYABORT; | |
2053 | } | |
2054 | ||
2055 | @@ -1249,7 +1509,6 @@ | |
2056 | ||
2057 | goto yybackup; | |
2058 | ||
2059 | - | |
2060 | /*-----------. | |
2061 | | yybackup. | | |
2062 | `-----------*/ | |
2063 | @@ -1262,88 +1521,55 @@ | |
2064 | /* First try to decide what to do without reference to lookahead token. */ | |
2065 | ||
2066 | yyn = yypact[yystate]; | |
2067 | - if (yyn == YYFLAG) | |
2068 | + if (yyn == YYPACT_NINF) | |
2069 | goto yydefault; | |
2070 | ||
2071 | /* Not known => get a lookahead token if don't already have one. */ | |
2072 | ||
2073 | - /* yychar is either YYEMPTY or YYEOF | |
2074 | - or a valid token in external form. */ | |
2075 | - | |
2076 | + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ | |
2077 | if (yychar == YYEMPTY) | |
2078 | { | |
2079 | YYDPRINTF ((stderr, "Reading a token: ")); | |
2080 | yychar = YYLEX; | |
2081 | } | |
2082 | ||
2083 | - /* Convert token to internal form (in yychar1) for indexing tables with */ | |
2084 | - | |
2085 | - if (yychar <= 0) /* This means end of input. */ | |
2086 | + if (yychar <= YYEOF) | |
2087 | { | |
2088 | - yychar1 = 0; | |
2089 | - yychar = YYEOF; /* Don't call YYLEX any more */ | |
2090 | - | |
2091 | + yychar = yytoken = YYEOF; | |
2092 | YYDPRINTF ((stderr, "Now at end of input.\n")); | |
2093 | } | |
2094 | else | |
2095 | { | |
2096 | - yychar1 = YYTRANSLATE (yychar); | |
2097 | - | |
2098 | -#if YYDEBUG | |
2099 | - /* We have to keep this `#if YYDEBUG', since we use variables | |
2100 | - which are defined only if `YYDEBUG' is set. */ | |
2101 | - if (yydebug) | |
2102 | - { | |
2103 | - YYFPRINTF (stderr, "Next token is %d (%s", | |
2104 | - yychar, yytname[yychar1]); | |
2105 | - /* Give the individual parser a way to print the precise | |
2106 | - meaning of a token, for further debugging info. */ | |
2107 | -# ifdef YYPRINT | |
2108 | - YYPRINT (stderr, yychar, yylval); | |
2109 | -# endif | |
2110 | - YYFPRINTF (stderr, ")\n"); | |
2111 | - } | |
2112 | -#endif | |
2113 | + yytoken = YYTRANSLATE (yychar); | |
2114 | + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); | |
2115 | } | |
2116 | ||
2117 | - yyn += yychar1; | |
2118 | - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) | |
2119 | + /* If the proper action on seeing token YYTOKEN is to reduce or to | |
2120 | + detect an error, take that action. */ | |
2121 | + yyn += yytoken; | |
2122 | + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | |
2123 | goto yydefault; | |
2124 | - | |
2125 | yyn = yytable[yyn]; | |
2126 | - | |
2127 | - /* yyn is what to do for this token type in this state. | |
2128 | - Negative => reduce, -yyn is rule number. | |
2129 | - Positive => shift, yyn is new state. | |
2130 | - New state is final state => don't bother to shift, | |
2131 | - just return success. | |
2132 | - 0, or most negative number => error. */ | |
2133 | - | |
2134 | - if (yyn < 0) | |
2135 | + if (yyn <= 0) | |
2136 | { | |
2137 | - if (yyn == YYFLAG) | |
2138 | + if (yyn == 0 || yyn == YYTABLE_NINF) | |
2139 | goto yyerrlab; | |
2140 | yyn = -yyn; | |
2141 | goto yyreduce; | |
2142 | } | |
2143 | - else if (yyn == 0) | |
2144 | - goto yyerrlab; | |
2145 | ||
2146 | if (yyn == YYFINAL) | |
2147 | YYACCEPT; | |
2148 | ||
2149 | /* Shift the lookahead token. */ | |
2150 | - YYDPRINTF ((stderr, "Shifting token %d (%s), ", | |
2151 | - yychar, yytname[yychar1])); | |
2152 | + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); | |
2153 | ||
2154 | /* Discard the token being shifted unless it is eof. */ | |
2155 | if (yychar != YYEOF) | |
2156 | yychar = YYEMPTY; | |
2157 | ||
2158 | *++yyvsp = yylval; | |
2159 | -#if YYLSP_NEEDED | |
2160 | - *++yylsp = yylloc; | |
2161 | -#endif | |
2162 | + | |
2163 | ||
2164 | /* Count tokens shifted since error; after three, turn off error | |
2165 | status. */ | |
2166 | @@ -1374,42 +1600,20 @@ | |
2167 | /* If YYLEN is nonzero, implement the default value of the action: | |
2168 | `$$ = $1'. | |
2169 | ||
2170 | - Otherwise, the following line sets YYVAL to the semantic value of | |
2171 | - the lookahead token. This behavior is undocumented and Bison | |
2172 | + Otherwise, the following line sets YYVAL to garbage. | |
2173 | + This behavior is undocumented and Bison | |
2174 | users should not rely upon it. Assigning to YYVAL | |
2175 | unconditionally makes the parser a bit smaller, and it avoids a | |
2176 | GCC warning that YYVAL may be used uninitialized. */ | |
2177 | yyval = yyvsp[1-yylen]; | |
2178 | ||
2179 | -#if YYLSP_NEEDED | |
2180 | - /* Similarly for the default location. Let the user run additional | |
2181 | - commands if for instance locations are ranges. */ | |
2182 | - yyloc = yylsp[1-yylen]; | |
2183 | - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); | |
2184 | -#endif | |
2185 | - | |
2186 | -#if YYDEBUG | |
2187 | - /* We have to keep this `#if YYDEBUG', since we use variables which | |
2188 | - are defined only if `YYDEBUG' is set. */ | |
2189 | - if (yydebug) | |
2190 | - { | |
2191 | - int yyi; | |
2192 | - | |
2193 | - YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", | |
2194 | - yyn, yyrline[yyn]); | |
2195 | - | |
2196 | - /* Print the symbols being reduced, and their result. */ | |
2197 | - for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) | |
2198 | - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); | |
2199 | - YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); | |
2200 | - } | |
2201 | -#endif | |
2202 | - | |
2203 | - switch (yyn) { | |
2204 | ||
2205 | -case 1: | |
2206 | + YY_REDUCE_PRINT (yyn); | |
2207 | + switch (yyn) | |
2208 | + { | |
2209 | + case 2: | |
2210 | #line 146 "bapascal.y" | |
2211 | -{ | |
2212 | + { | |
2213 | int i; | |
2214 | tab[ob_tix].adr = lc; /* outerblock entry pt */ | |
2215 | for (i = 0; i <= mon; i++){ | |
2216 | @@ -1422,27 +1626,30 @@ | |
2217 | process_var_inits(level); | |
2218 | } | |
2219 | break; | |
2220 | -case 2: | |
2221 | + | |
2222 | + case 3: | |
2223 | #line 159 "bapascal.y" | |
2224 | -{ | |
2225 | + { | |
2226 | if (!making_objfile&&!main_declared) | |
2227 | yyerror("No 'main' function declared"); | |
2228 | if (main_declared) | |
2229 | emit(SHORTRET); | |
2230 | } | |
2231 | break; | |
2232 | -case 3: | |
2233 | + | |
2234 | + case 4: | |
2235 | #line 166 "bapascal.y" | |
2236 | -{ | |
2237 | + { | |
2238 | if (!making_objfile&&!main_declared) | |
2239 | yyerror("No 'main' function declared"); | |
2240 | if (main_declared) | |
2241 | emit(SHORTRET); | |
2242 | } | |
2243 | break; | |
2244 | -case 4: | |
2245 | + | |
2246 | + case 5: | |
2247 | #line 175 "bapascal.y" | |
2248 | -{ | |
2249 | + { | |
2250 | level = 0; | |
2251 | enter(outerblock_name,outerblock,level,level); | |
2252 | ob_tix = last_tab; | |
2253 | @@ -1454,40 +1661,47 @@ | |
2254 | display[last_btab] = level; | |
2255 | } | |
2256 | break; | |
2257 | -case 17: | |
2258 | + | |
2259 | + case 18: | |
2260 | #line 207 "bapascal.y" | |
2261 | -{ external = 0; } | |
2262 | + { external = 0; } | |
2263 | break; | |
2264 | -case 18: | |
2265 | + | |
2266 | + case 19: | |
2267 | #line 211 "bapascal.y" | |
2268 | -{ | |
2269 | + { | |
2270 | external = 0; | |
2271 | } | |
2272 | break; | |
2273 | -case 19: | |
2274 | + | |
2275 | + case 20: | |
2276 | #line 217 "bapascal.y" | |
2277 | -{ external = 1; } | |
2278 | + { external = 1; } | |
2279 | break; | |
2280 | -case 20: | |
2281 | + | |
2282 | + case 21: | |
2283 | #line 221 "bapascal.y" | |
2284 | -{ leave_block(&level); } | |
2285 | + { leave_block(&level); } | |
2286 | break; | |
2287 | -case 21: | |
2288 | + | |
2289 | + case 22: | |
2290 | #line 223 "bapascal.y" | |
2291 | -{ leave_block(&level); } | |
2292 | + { leave_block(&level); } | |
2293 | break; | |
2294 | -case 22: | |
2295 | + | |
2296 | + case 23: | |
2297 | #line 227 "bapascal.y" | |
2298 | -{ | |
2299 | + { | |
2300 | tab[yyvsp[-3]].adr = -1; | |
2301 | in_mon_decl = 0; | |
2302 | external = 0; | |
2303 | leave_block(&level); | |
2304 | } | |
2305 | break; | |
2306 | -case 25: | |
2307 | + | |
2308 | + case 26: | |
2309 | #line 240 "bapascal.y" | |
2310 | -{ | |
2311 | + { | |
2312 | int i; | |
2313 | emit(HALT); | |
2314 | /* need to backpatch location of outer block code */ | |
2315 | @@ -1505,18 +1719,20 @@ | |
2316 | process_var_inits(level-1); | |
2317 | } | |
2318 | break; | |
2319 | -case 26: | |
2320 | + | |
2321 | + case 27: | |
2322 | #line 261 "bapascal.y" | |
2323 | -{ | |
2324 | + { | |
2325 | tab[yyvsp[-2]].adr = lc; /* main pgm entry point */ | |
2326 | process_var_inits(level); /* process any var inits */ | |
2327 | outer_call_lc = lc; /* loc of SHORTCALL instr */ | |
2328 | emit(SHORTCALL); /* target addr is backpatched later */ | |
2329 | } | |
2330 | break; | |
2331 | -case 27: | |
2332 | + | |
2333 | + case 28: | |
2334 | #line 270 "bapascal.y" | |
2335 | -{ /* pgm name is last symbol in outer scope */ | |
2336 | + { /* pgm name is last symbol in outer scope */ | |
2337 | yyval = yyvsp[0]; | |
2338 | main_declared = 1; | |
2339 | external = 0; | |
2340 | @@ -1527,9 +1743,10 @@ | |
2341 | btab[last_btab].lastpar = last_tab; /* no parms */ | |
2342 | } | |
2343 | break; | |
2344 | -case 38: | |
2345 | + | |
2346 | + case 39: | |
2347 | #line 299 "bapascal.y" | |
2348 | -{ | |
2349 | + { | |
2350 | if (strcmp(laststring,infile[curr_infile].fname) == 0) | |
2351 | yyerror("Recursive file inclusion"); | |
2352 | else { | |
2353 | @@ -1539,15 +1756,17 @@ | |
2354 | in_include = 0; | |
2355 | } | |
2356 | break; | |
2357 | -case 39: | |
2358 | + | |
2359 | + case 40: | |
2360 | #line 311 "bapascal.y" | |
2361 | -{ | |
2362 | + { | |
2363 | in_include = 1; | |
2364 | } | |
2365 | break; | |
2366 | -case 40: | |
2367 | + | |
2368 | + case 41: | |
2369 | #line 317 "bapascal.y" | |
2370 | -{ | |
2371 | + { | |
2372 | if (strcmp(laststring,infile[curr_infile].fname) == 0) | |
2373 | yyerror("Recursive file inclusion"); | |
2374 | else { | |
2375 | @@ -1557,33 +1776,39 @@ | |
2376 | in_include = 0; | |
2377 | } | |
2378 | break; | |
2379 | -case 44: | |
2380 | + | |
2381 | + case 45: | |
2382 | #line 336 "bapascal.y" | |
2383 | -{ | |
2384 | + { | |
2385 | tab[last_tab].typ = consttype; | |
2386 | tab[last_tab].adr = yyvsp[0]; | |
2387 | tab[last_tab].ref = 0; | |
2388 | } | |
2389 | break; | |
2390 | -case 45: | |
2391 | + | |
2392 | + case 46: | |
2393 | #line 344 "bapascal.y" | |
2394 | -{ consttype = ints; } | |
2395 | + { consttype = ints; } | |
2396 | break; | |
2397 | -case 46: | |
2398 | + | |
2399 | + case 47: | |
2400 | #line 346 "bapascal.y" | |
2401 | -{ yyval = yyvsp[0]; consttype = ints; } | |
2402 | + { yyval = yyvsp[0]; consttype = ints; } | |
2403 | break; | |
2404 | -case 47: | |
2405 | + | |
2406 | + case 48: | |
2407 | #line 348 "bapascal.y" | |
2408 | -{ yyval = - yyvsp[0]; consttype = ints; } | |
2409 | + { yyval = - yyvsp[0]; consttype = ints; } | |
2410 | break; | |
2411 | -case 48: | |
2412 | + | |
2413 | + case 49: | |
2414 | #line 350 "bapascal.y" | |
2415 | -{ yyval = get_constant(lastident,level,&consttype); } | |
2416 | + { yyval = get_constant(lastident,level,&consttype); } | |
2417 | break; | |
2418 | -case 49: | |
2419 | + | |
2420 | + case 50: | |
2421 | #line 352 "bapascal.y" | |
2422 | -{ yyval = get_constant(lastident,level,&consttype); | |
2423 | + { yyval = get_constant(lastident,level,&consttype); | |
2424 | if (consttype != ints) { | |
2425 | sprintf(pbuf,"Identifier '%s' not INTEGER type",lastident); | |
2426 | yyerror(pbuf); | |
2427 | @@ -1591,9 +1816,10 @@ | |
2428 | } | |
2429 | } | |
2430 | break; | |
2431 | -case 50: | |
2432 | + | |
2433 | + case 51: | |
2434 | #line 360 "bapascal.y" | |
2435 | -{ yyval = - get_constant(lastident,level,&consttype); | |
2436 | + { yyval = - get_constant(lastident,level,&consttype); | |
2437 | if (consttype != ints) { | |
2438 | sprintf(pbuf,"Identifier '%s' not INTEGER type",lastident); | |
2439 | yyerror(pbuf); | |
2440 | @@ -1601,17 +1827,20 @@ | |
2441 | } | |
2442 | } | |
2443 | break; | |
2444 | -case 51: | |
2445 | + | |
2446 | + case 52: | |
2447 | #line 368 "bapascal.y" | |
2448 | -{ consttype = chars; yyval = laststring[0]; } | |
2449 | + { consttype = chars; yyval = laststring[0]; } | |
2450 | break; | |
2451 | -case 52: | |
2452 | + | |
2453 | + case 53: | |
2454 | #line 372 "bapascal.y" | |
2455 | -{yyval = strtoi(numbertext,numberbase);} | |
2456 | + {yyval = strtoi(numbertext,numberbase);} | |
2457 | break; | |
2458 | -case 56: | |
2459 | + | |
2460 | + case 57: | |
2461 | #line 383 "bapascal.y" | |
2462 | -{ | |
2463 | + { | |
2464 | tab[yyvsp[-2]].obj = type; | |
2465 | if (expr[yyvsp[0]].typ == arrays) { | |
2466 | tab[yyvsp[-2]].typ = arrays; | |
2467 | @@ -1628,9 +1857,10 @@ | |
2468 | free_expr(yyvsp[0]); | |
2469 | } | |
2470 | break; | |
2471 | -case 60: | |
2472 | + | |
2473 | + case 61: | |
2474 | #line 407 "bapascal.y" | |
2475 | -{ | |
2476 | + { | |
2477 | if (yyvsp[0] != 0) { | |
2478 | if ((tab[yyvsp[0]].obj != type)||(tab[yyvsp[0]].typ == notyp)){ | |
2479 | sprintf(pbuf,"Identifier '%s' is not a valid type",lastident); | |
2480 | @@ -1652,9 +1882,10 @@ | |
2481 | yyval = NO_EXPR; | |
2482 | } | |
2483 | break; | |
2484 | -case 61: | |
2485 | + | |
2486 | + case 62: | |
2487 | #line 432 "bapascal.y" | |
2488 | -{ | |
2489 | + { | |
2490 | int i; | |
2491 | TYPES eltyp; | |
2492 | int elsize,elref,last; | |
2493 | @@ -1695,9 +1926,10 @@ | |
2494 | free_expr(yyvsp[0]); | |
2495 | } | |
2496 | break; | |
2497 | -case 64: | |
2498 | + | |
2499 | + case 65: | |
2500 | #line 481 "bapascal.y" | |
2501 | -{ | |
2502 | + { | |
2503 | if (consttype != atab[last_atab].inxtyp) | |
2504 | yyerror("Array index type mismatch"); | |
2505 | else { | |
2506 | @@ -1712,9 +1944,10 @@ | |
2507 | yyval = last_atab; | |
2508 | } | |
2509 | break; | |
2510 | -case 65: | |
2511 | + | |
2512 | + case 66: | |
2513 | #line 498 "bapascal.y" | |
2514 | -{ | |
2515 | + { | |
2516 | if (last_atab == AMAX) | |
2517 | cfatal("Array table full with %d entries",AMAX); | |
2518 | atab[++last_atab].inxtyp = consttype; | |
2519 | @@ -1722,13 +1955,15 @@ | |
2520 | yyval = last_atab; /* pass the array start up the parse tree */ | |
2521 | } | |
2522 | break; | |
2523 | -case 66: | |
2524 | + | |
2525 | + case 67: | |
2526 | #line 508 "bapascal.y" | |
2527 | -{ yyval = last_atab; } | |
2528 | + { yyval = last_atab; } | |
2529 | break; | |
2530 | -case 67: | |
2531 | + | |
2532 | + case 68: | |
2533 | #line 512 "bapascal.y" | |
2534 | -{ | |
2535 | + { | |
2536 | yyval = new_expr(); | |
2537 | if (consttype != ints) | |
2538 | yyerror("Size of 'string' type must be an integer"); | |
2539 | @@ -1741,9 +1976,10 @@ | |
2540 | } | |
2541 | } | |
2542 | break; | |
2543 | -case 71: | |
2544 | + | |
2545 | + case 72: | |
2546 | #line 534 "bapascal.y" | |
2547 | -{ | |
2548 | + { | |
2549 | int i,vartyp,varref,varsize,dx = btab[display[level]].vsize; | |
2550 | int val; | |
2551 | if (yyvsp[0] != NO_EXPR) { | |
2552 | @@ -1806,66 +2042,76 @@ | |
2553 | free_expr(yyvsp[-1]); free_expr(yyvsp[0]); | |
2554 | } | |
2555 | break; | |
2556 | -case 74: | |
2557 | + | |
2558 | + case 75: | |
2559 | #line 602 "bapascal.y" | |
2560 | -{ yyval = yyvsp[0]; } | |
2561 | + { yyval = yyvsp[0]; } | |
2562 | break; | |
2563 | -case 75: | |
2564 | + | |
2565 | + case 76: | |
2566 | #line 606 "bapascal.y" | |
2567 | -{ yyval = NO_EXPR; } | |
2568 | + { yyval = NO_EXPR; } | |
2569 | break; | |
2570 | -case 76: | |
2571 | + | |
2572 | + case 77: | |
2573 | #line 608 "bapascal.y" | |
2574 | -{ | |
2575 | + { | |
2576 | yyval = new_expr(); | |
2577 | expr[yyval].typ = consttype; | |
2578 | expr[yyval].adr = yyvsp[0]; | |
2579 | } | |
2580 | break; | |
2581 | -case 78: | |
2582 | + | |
2583 | + case 79: | |
2584 | #line 619 "bapascal.y" | |
2585 | -{ | |
2586 | + { | |
2587 | if (tab[yyvsp[-2]].mon) emit(EXITMON); | |
2588 | emit(EXIT_PROC); | |
2589 | leave_block(&level); | |
2590 | in_proc_decl = 0; | |
2591 | } | |
2592 | break; | |
2593 | -case 79: | |
2594 | + | |
2595 | + case 80: | |
2596 | #line 626 "bapascal.y" | |
2597 | -{ | |
2598 | + { | |
2599 | if (tab[yyvsp[-2]].mon) emit(EXITMON); | |
2600 | emit(EXIT_FCN); | |
2601 | leave_block(&level); | |
2602 | in_proc_decl = 0; | |
2603 | } | |
2604 | break; | |
2605 | -case 80: | |
2606 | + | |
2607 | + case 81: | |
2608 | #line 635 "bapascal.y" | |
2609 | -{ | |
2610 | + { | |
2611 | tab[yyvsp[-1]].adr = (external? -1 : lc); | |
2612 | if (tab[yyvsp[-1]].mon) emit1(ENTERMON,tab[yyvsp[-1]].mon); | |
2613 | process_var_inits(level); | |
2614 | } | |
2615 | break; | |
2616 | -case 81: | |
2617 | + | |
2618 | + case 82: | |
2619 | #line 643 "bapascal.y" | |
2620 | -{ | |
2621 | + { | |
2622 | yyval = yyvsp[-1]; | |
2623 | tab[yyvsp[-1]].atomic = atomic; | |
2624 | } | |
2625 | break; | |
2626 | -case 82: | |
2627 | + | |
2628 | + case 83: | |
2629 | #line 650 "bapascal.y" | |
2630 | -{ atomic = FALSE; } | |
2631 | + { atomic = FALSE; } | |
2632 | break; | |
2633 | -case 83: | |
2634 | + | |
2635 | + case 84: | |
2636 | #line 652 "bapascal.y" | |
2637 | -{ atomic = TRUE; } | |
2638 | + { atomic = TRUE; } | |
2639 | break; | |
2640 | -case 85: | |
2641 | + | |
2642 | + case 86: | |
2643 | #line 660 "bapascal.y" | |
2644 | -{ int vis_level,real_level; | |
2645 | + { int vis_level,real_level; | |
2646 | in_proc_decl = 1; | |
2647 | if (in_mon_decl) { | |
2648 | real_level = level; | |
2649 | @@ -1880,24 +2126,27 @@ | |
2650 | enter_block(&last_btab,&level,prt); | |
2651 | } | |
2652 | break; | |
2653 | -case 86: | |
2654 | + | |
2655 | + case 87: | |
2656 | #line 677 "bapascal.y" | |
2657 | -{ | |
2658 | + { | |
2659 | tab[yyvsp[-1]].adr = (external? -1 : lc); | |
2660 | if (tab[yyvsp[-1]].mon) emit1(ENTERMON,tab[yyvsp[-1]].mon); | |
2661 | process_var_inits(level); | |
2662 | } | |
2663 | break; | |
2664 | -case 87: | |
2665 | + | |
2666 | + case 88: | |
2667 | #line 685 "bapascal.y" | |
2668 | -{ | |
2669 | + { | |
2670 | tab[yyvsp[-1]].atomic = atomic; | |
2671 | yyval = yyvsp[-1]; | |
2672 | } | |
2673 | break; | |
2674 | -case 88: | |
2675 | + | |
2676 | + case 89: | |
2677 | #line 692 "bapascal.y" | |
2678 | -{ TYPES ft = tab[yyvsp[0]].typ; | |
2679 | + { TYPES ft = tab[yyvsp[0]].typ; | |
2680 | if (tab[yyvsp[0]].obj != type){ | |
2681 | sprintf(pbuf,"'%s' is not a valid type",tab[yyvsp[0]].name); | |
2682 | yyerror(pbuf); | |
2683 | @@ -1907,9 +2156,10 @@ | |
2684 | tab[yyvsp[-3]].typ = tab[yyvsp[0]].typ; | |
2685 | } | |
2686 | break; | |
2687 | -case 89: | |
2688 | + | |
2689 | + case 90: | |
2690 | #line 704 "bapascal.y" | |
2691 | -{ int vis_level,real_level; | |
2692 | + { int vis_level,real_level; | |
2693 | in_proc_decl = 1; | |
2694 | if (in_mon_decl) { | |
2695 | real_level = level; | |
2696 | @@ -1924,17 +2174,20 @@ | |
2697 | enter_block(&last_btab,&level,prt); | |
2698 | } | |
2699 | break; | |
2700 | -case 90: | |
2701 | + | |
2702 | + case 91: | |
2703 | #line 721 "bapascal.y" | |
2704 | -{ btab[display[level]].lastpar = last_tab;} | |
2705 | + { btab[display[level]].lastpar = last_tab;} | |
2706 | break; | |
2707 | -case 91: | |
2708 | + | |
2709 | + case 92: | |
2710 | #line 723 "bapascal.y" | |
2711 | -{ btab[display[level]].lastpar = last_tab;} | |
2712 | + { btab[display[level]].lastpar = last_tab;} | |
2713 | break; | |
2714 | -case 97: | |
2715 | + | |
2716 | + case 98: | |
2717 | #line 736 "bapascal.y" | |
2718 | -{ int i,dx,dv,j,elem_size,stack_dx; | |
2719 | + { int i,dx,dv,j,elem_size,stack_dx; | |
2720 | if (tab[yyvsp[0]].obj != type) { | |
2721 | sprintf(pbuf,"'%s' is not a valid type",tab[yyvsp[0]].name); | |
2722 | yyerror(pbuf); | |
2723 | @@ -1956,9 +2209,10 @@ | |
2724 | btab[j].vsize = dx + dv; | |
2725 | } | |
2726 | break; | |
2727 | -case 98: | |
2728 | + | |
2729 | + case 99: | |
2730 | #line 760 "bapascal.y" | |
2731 | -{ int i,dx,dv,j,elem_size; | |
2732 | + { int i,dx,dv,j,elem_size; | |
2733 | if (tab[yyvsp[0]].obj != type) { | |
2734 | sprintf(pbuf,"'%s' is not a valid type",tab[yyvsp[0]].name); | |
2735 | yyerror(pbuf); | |
2736 | @@ -1980,9 +2234,10 @@ | |
2737 | btab[j].vsize = dx + dv; | |
2738 | } | |
2739 | break; | |
2740 | -case 99: | |
2741 | + | |
2742 | + case 100: | |
2743 | #line 784 "bapascal.y" | |
2744 | -{ int i,dx,dv,j,stack_dx; | |
2745 | + { int i,dx,dv,j,stack_dx; | |
2746 | j = display[level]; | |
2747 | stack_dx = 1; /* strings always pass by reference */ | |
2748 | dx = btab[j].vsize; | |
2749 | @@ -2000,9 +2255,10 @@ | |
2750 | btab[j].vsize = dx + dv; | |
2751 | } | |
2752 | break; | |
2753 | -case 100: | |
2754 | + | |
2755 | + case 101: | |
2756 | #line 804 "bapascal.y" | |
2757 | -{ | |
2758 | + { | |
2759 | if (tab[mtab[mon]].obj == monitor) { | |
2760 | /* don't do the following for ext_monitor objects */ | |
2761 | /* main pgm will CALL_MONINIT, even if no init code */ | |
2762 | @@ -2011,9 +2267,10 @@ | |
2763 | leave_block(&level); | |
2764 | } | |
2765 | break; | |
2766 | -case 101: | |
2767 | + | |
2768 | + case 102: | |
2769 | #line 815 "bapascal.y" | |
2770 | -{ | |
2771 | + { | |
2772 | if (mon == MAXMON) | |
2773 | cfatal("No more than %d monitors can be declared",MAXMON); | |
2774 | if (level > 1) { | |
2775 | @@ -2030,24 +2287,27 @@ | |
2776 | btab[last_btab].lastpar = last_tab; /* no parms */ | |
2777 | } | |
2778 | break; | |
2779 | -case 102: | |
2780 | + | |
2781 | + case 103: | |
2782 | #line 834 "bapascal.y" | |
2783 | -{ | |
2784 | + { | |
2785 | in_mon_decl = 0; /* optional declarations are over */ | |
2786 | in_mon_init = 1; /* could have some init code */ | |
2787 | } | |
2788 | break; | |
2789 | -case 103: | |
2790 | + | |
2791 | + case 104: | |
2792 | #line 841 "bapascal.y" | |
2793 | -{ | |
2794 | + { | |
2795 | tab[mtab[mon]].adr = lc; | |
2796 | process_var_inits(level); | |
2797 | in_mon_init = 0; | |
2798 | } | |
2799 | break; | |
2800 | -case 106: | |
2801 | + | |
2802 | + case 107: | |
2803 | #line 853 "bapascal.y" | |
2804 | -{ | |
2805 | + { | |
2806 | if (in_mon_init) { /* beginning of the mon init code */ | |
2807 | tab[mtab[mon]].adr = lc; | |
2808 | process_var_inits(level); | |
2809 | @@ -2055,65 +2315,80 @@ | |
2810 | } | |
2811 | } | |
2812 | break; | |
2813 | -case 110: | |
2814 | + | |
2815 | + case 111: | |
2816 | #line 868 "bapascal.y" | |
2817 | -{ yyerrok; } | |
2818 | + { yyerrok; } | |
2819 | break; | |
2820 | -case 111: | |
2821 | + | |
2822 | + case 112: | |
2823 | #line 870 "bapascal.y" | |
2824 | -{ yyerrok; } | |
2825 | + { yyerrok; } | |
2826 | break; | |
2827 | -case 117: | |
2828 | + | |
2829 | + case 118: | |
2830 | #line 879 "bapascal.y" | |
2831 | -{ code[yyvsp[-1]].y = yyvsp[0]; } | |
2832 | + { code[yyvsp[-1]].y = yyvsp[0]; } | |
2833 | break; | |
2834 | -case 118: | |
2835 | + | |
2836 | + case 119: | |
2837 | #line 881 "bapascal.y" | |
2838 | -{ code[yyvsp[-3]].y = yyvsp[-1]; code[yyvsp[-2]].y = lc; } | |
2839 | + { code[yyvsp[-3]].y = yyvsp[-1]; code[yyvsp[-2]].y = lc; } | |
2840 | break; | |
2841 | -case 119: | |
2842 | + | |
2843 | + case 120: | |
2844 | #line 883 "bapascal.y" | |
2845 | -{ emit1(JUMP,yyvsp[-3]); code[yyvsp[-2]].y = lc; } | |
2846 | + { emit1(JUMP,yyvsp[-3]); code[yyvsp[-2]].y = lc; } | |
2847 | break; | |
2848 | -case 120: | |
2849 | + | |
2850 | + case 121: | |
2851 | #line 885 "bapascal.y" | |
2852 | -{ gen_exprval(yyvsp[0]); emit1(JZER,yyvsp[-3]); free_expr(yyvsp[0]); } | |
2853 | + { gen_exprval(yyvsp[0]); emit1(JZER,yyvsp[-3]); free_expr(yyvsp[0]); } | |
2854 | break; | |
2855 | -case 121: | |
2856 | + | |
2857 | + case 122: | |
2858 | #line 887 "bapascal.y" | |
2859 | -{ emit1(ENDFOR,1+yyvsp[-1]); code[yyvsp[-1]].y = lc; } | |
2860 | + { emit1(ENDFOR,1+yyvsp[-1]); code[yyvsp[-1]].y = lc; } | |
2861 | break; | |
2862 | -case 122: | |
2863 | + | |
2864 | + case 123: | |
2865 | #line 889 "bapascal.y" | |
2866 | -{ if (level == 1) emit(COEND); in_cobegin = 0; } | |
2867 | + { if (level == 1) emit(COEND); in_cobegin = 0; } | |
2868 | break; | |
2869 | -case 123: | |
2870 | + | |
2871 | + case 124: | |
2872 | #line 893 "bapascal.y" | |
2873 | -{ gen_exprval(yyvsp[0]); yyval = lc; emit(JZER); free_expr(yyvsp[0]); } | |
2874 | + { gen_exprval(yyvsp[0]); yyval = lc; emit(JZER); free_expr(yyvsp[0]); } | |
2875 | break; | |
2876 | -case 124: | |
2877 | + | |
2878 | + case 125: | |
2879 | #line 897 "bapascal.y" | |
2880 | -{ yyval = lc; } | |
2881 | + { yyval = lc; } | |
2882 | break; | |
2883 | -case 125: | |
2884 | + | |
2885 | + case 126: | |
2886 | #line 901 "bapascal.y" | |
2887 | -{ emit(JUMP); yyval = lc; } | |
2888 | + { emit(JUMP); yyval = lc; } | |
2889 | break; | |
2890 | -case 126: | |
2891 | + | |
2892 | + case 127: | |
2893 | #line 905 "bapascal.y" | |
2894 | -{ yyval = lc; } | |
2895 | + { yyval = lc; } | |
2896 | break; | |
2897 | -case 127: | |
2898 | + | |
2899 | + case 128: | |
2900 | #line 909 "bapascal.y" | |
2901 | -{ gen_exprval(yyvsp[0]); free_expr(yyvsp[0]); yyval = lc; emit(JZER);} | |
2902 | + { gen_exprval(yyvsp[0]); free_expr(yyvsp[0]); yyval = lc; emit(JZER);} | |
2903 | break; | |
2904 | -case 128: | |
2905 | + | |
2906 | + case 129: | |
2907 | #line 913 "bapascal.y" | |
2908 | -{ yyval = lc; } | |
2909 | + { yyval = lc; } | |
2910 | break; | |
2911 | -case 129: | |
2912 | + | |
2913 | + case 130: | |
2914 | #line 917 "bapascal.y" | |
2915 | -{ | |
2916 | + { | |
2917 | yyval = yyvsp[0]; | |
2918 | if (tab[yyvsp[0]].obj != variable) | |
2919 | yyerror("FOR loop index must be a VARIABLE"); | |
2920 | @@ -2125,9 +2400,10 @@ | |
2921 | yyerror("FOR loop index must be of type INTEGER, BOOLEAN, or CHAR"); | |
2922 | } | |
2923 | break; | |
2924 | -case 130: | |
2925 | + | |
2926 | + case 131: | |
2927 | #line 931 "bapascal.y" | |
2928 | -{ | |
2929 | + { | |
2930 | if (expr[yyvsp[-3]].typ != expr[yyvsp[-1]].typ) | |
2931 | yyerror("Type mismatch in FOR loop limits"); | |
2932 | gen_exprval(yyvsp[-1]); | |
2933 | @@ -2135,18 +2411,20 @@ | |
2934 | free_expr(yyvsp[-3]); free_expr(yyvsp[-1]); | |
2935 | } | |
2936 | break; | |
2937 | -case 131: | |
2938 | + | |
2939 | + case 132: | |
2940 | #line 941 "bapascal.y" | |
2941 | -{ | |
2942 | + { | |
2943 | if ((tab[yyvsp[-2]].typ != expr[yyvsp[0]].typ)&&(tab[yyvsp[-2]].typ != notyp)) | |
2944 | yyerror("Type mismatch in FOR loop limits"); | |
2945 | gen_exprval(yyvsp[0]); | |
2946 | yyval = yyvsp[0]; /* pass expr index back to previous rule for type chk*/ | |
2947 | } | |
2948 | break; | |
2949 | -case 132: | |
2950 | + | |
2951 | + case 133: | |
2952 | #line 950 "bapascal.y" | |
2953 | -{ | |
2954 | + { | |
2955 | if (level != 1) | |
2956 | yyerror("COBEGIN-COEND block allowed only in main program"); | |
2957 | else if (in_cobegin) | |
2958 | @@ -2156,9 +2434,10 @@ | |
2959 | in_cobegin = 1; | |
2960 | } | |
2961 | break; | |
2962 | -case 133: | |
2963 | + | |
2964 | + case 134: | |
2965 | #line 962 "bapascal.y" | |
2966 | -{ | |
2967 | + { | |
2968 | gen_exprval(yyvsp[0]); | |
2969 | if (tab[yyvsp[-1]].typ == expr[yyvsp[0]].typ) { | |
2970 | if ((tab[yyvsp[-1]].typ == sems)||(tab[yyvsp[-1]].typ == bsems)|| | |
2971 | @@ -2174,9 +2453,10 @@ | |
2972 | free_expr(yyvsp[0]); | |
2973 | } | |
2974 | break; | |
2975 | -case 134: | |
2976 | + | |
2977 | + case 135: | |
2978 | #line 978 "bapascal.y" | |
2979 | -{ | |
2980 | + { | |
2981 | gen_exprval(yyvsp[0]); | |
2982 | if (expr[yyvsp[-2]].typ == expr[yyvsp[0]].typ) { | |
2983 | if ((expr[yyvsp[-2]].typ == sems)||(expr[yyvsp[-2]].typ == bsems)|| | |
2984 | @@ -2192,9 +2472,10 @@ | |
2985 | free_expr(yyvsp[-2]); free_expr(yyvsp[0]); | |
2986 | } | |
2987 | break; | |
2988 | -case 135: | |
2989 | + | |
2990 | + case 136: | |
2991 | #line 996 "bapascal.y" | |
2992 | -{ | |
2993 | + { | |
2994 | switch (tab[yyvsp[-1]].obj) { | |
2995 | case ext_variable: | |
2996 | case variable: | |
2997 | @@ -2217,9 +2498,10 @@ | |
2998 | } /* switch */ | |
2999 | } | |
3000 | break; | |
3001 | -case 136: | |
3002 | + | |
3003 | + case 137: | |
3004 | #line 1021 "bapascal.y" | |
3005 | -{ int k; | |
3006 | + { int k; | |
3007 | if ((tab[yyvsp[-2]].obj == procedure)|| | |
3008 | (tab[yyvsp[-2]].obj == ext_procedure)) { | |
3009 | if (tab[yyvsp[-2]].lev == -1) { /* std proc unfinished business */ | |
3010 | @@ -2253,9 +2535,10 @@ | |
3011 | } | |
3012 | } | |
3013 | break; | |
3014 | -case 141: | |
3015 | + | |
3016 | + case 142: | |
3017 | #line 1065 "bapascal.y" | |
3018 | -{ | |
3019 | + { | |
3020 | parmct = ++pfstack[toppfs].pct; | |
3021 | if (tab[last_pf].lev == -1) | |
3022 | stdproc_parm(last_pf,yyvsp[0],parmct); | |
3023 | @@ -2264,28 +2547,27 @@ | |
3024 | free_expr(yyvsp[0]); | |
3025 | } | |
3026 | break; | |
3027 | -case 142: | |
3028 | + | |
3029 | + case 143: | |
3030 | #line 1074 "bapascal.y" | |
3031 | -{ int tmp = store_string(laststring,&stab_size); | |
3032 | + { int tmp = store_string(laststring,&stab_size); | |
3033 | if ((tab[last_pf].lev == -1)&& | |
3034 | ((tab[last_pf].adr == SP_WRITE)|| | |
3035 | (tab[last_pf].adr == SP_WRITELN))){ | |
3036 | emit1(WRITE_RAWSTRING,tmp); | |
3037 | } | |
3038 | - else if (first_stringerr){ | |
3039 | - yyerror("RAW STRING parameter not allowed"); | |
3040 | - first_stringerr = 0; | |
3041 | - } | |
3042 | parmct++; | |
3043 | } | |
3044 | break; | |
3045 | -case 143: | |
3046 | -#line 1089 "bapascal.y" | |
3047 | -{ yyval = last_pfv = yyvsp[0]; } | |
3048 | + | |
3049 | + case 144: | |
3050 | +#line 1085 "bapascal.y" | |
3051 | + { yyval = last_pfv = yyvsp[0]; } | |
3052 | break; | |
3053 | -case 144: | |
3054 | -#line 1093 "bapascal.y" | |
3055 | -{ | |
3056 | + | |
3057 | + case 145: | |
3058 | +#line 1089 "bapascal.y" | |
3059 | + { | |
3060 | if ((tab[last_pfv].obj == procedure)|| | |
3061 | (tab[last_pfv].obj == ext_procedure)){ | |
3062 | if ((++toppfs) > 0){ | |
3063 | @@ -2296,7 +2578,7 @@ | |
3064 | else{ | |
3065 | pfstack[toppfs].tix = last_pf = last_pfv; | |
3066 | pfstack[toppfs].pct = parmct = 0; | |
3067 | - first_stringerr = first_parmcterr = 1; | |
3068 | + first_parmcterr = 1; | |
3069 | if (tab[last_pf].lev != -1){ /* regular proc call */ | |
3070 | if ((tab[last_pf].mon)&&(tab[prt].mon)&& | |
3071 | (tab[last_pf].mon != tab[prt].mon)) | |
3072 | @@ -2310,9 +2592,10 @@ | |
3073 | } | |
3074 | } | |
3075 | break; | |
3076 | -case 150: | |
3077 | -#line 1127 "bapascal.y" | |
3078 | -{ | |
3079 | + | |
3080 | + case 151: | |
3081 | +#line 1123 "bapascal.y" | |
3082 | + { | |
3083 | yyval = new_expr(); | |
3084 | expr[yyval].obj = function; | |
3085 | expr[yyval].typ = ints; | |
3086 | @@ -2337,13 +2620,15 @@ | |
3087 | free_expr(yyvsp[-3]); free_expr(yyvsp[-1]); | |
3088 | } | |
3089 | break; | |
3090 | -case 151: | |
3091 | -#line 1154 "bapascal.y" | |
3092 | -{ yyval = yyvsp[0]; } | |
3093 | - break; | |
3094 | -case 152: | |
3095 | -#line 1156 "bapascal.y" | |
3096 | -{ | |
3097 | + | |
3098 | + case 152: | |
3099 | +#line 1150 "bapascal.y" | |
3100 | + { yyval = yyvsp[0]; } | |
3101 | + break; | |
3102 | + | |
3103 | + case 153: | |
3104 | +#line 1152 "bapascal.y" | |
3105 | + { | |
3106 | if (expr[yyvsp[0]].typ == strings) { | |
3107 | /* left parm is a string. If it's not an array elt, */ | |
3108 | /* put the address of the string n the stack */ | |
3109 | @@ -2355,9 +2640,10 @@ | |
3110 | yyval = yyvsp[0]; | |
3111 | } | |
3112 | break; | |
3113 | -case 153: | |
3114 | -#line 1170 "bapascal.y" | |
3115 | -{ | |
3116 | + | |
3117 | + case 154: | |
3118 | +#line 1166 "bapascal.y" | |
3119 | + { | |
3120 | if (expr[yyvsp[0]].typ == rawstrings) /* raw str message */ | |
3121 | emit1(BROADCAST_RAWSTRING,expr[yyvsp[0]].adr); | |
3122 | else if (expr[yyvsp[0]].typ == strings) /* msg is a string var */ | |
3123 | @@ -2369,9 +2655,10 @@ | |
3124 | free_expr(yyvsp[0]); | |
3125 | } | |
3126 | break; | |
3127 | -case 154: | |
3128 | -#line 1184 "bapascal.y" | |
3129 | -{ | |
3130 | + | |
3131 | + case 155: | |
3132 | +#line 1180 "bapascal.y" | |
3133 | + { | |
3134 | if (expr[yyvsp[-1]].typ != strings) | |
3135 | yyerror("left parameter is not of type 'string'"); | |
3136 | yyval = NO_EXPR; /* for free_expr() call up the parse tree */ | |
3137 | @@ -2382,9 +2669,10 @@ | |
3138 | free_expr(yyvsp[-1]); free_expr(yyvsp[0]); | |
3139 | } | |
3140 | break; | |
3141 | -case 155: | |
3142 | -#line 1197 "bapascal.y" | |
3143 | -{ | |
3144 | + | |
3145 | + case 156: | |
3146 | +#line 1193 "bapascal.y" | |
3147 | + { | |
3148 | if (expr[yyvsp[-1]].typ != strings) { | |
3149 | yyerror("right parameter is not of type 'string'"); | |
3150 | } | |
3151 | @@ -2396,13 +2684,15 @@ | |
3152 | } | |
3153 | } | |
3154 | break; | |
3155 | -case 156: | |
3156 | -#line 1209 "bapascal.y" | |
3157 | -{ yyval = yyvsp[-1]; } | |
3158 | + | |
3159 | + case 157: | |
3160 | +#line 1205 "bapascal.y" | |
3161 | + { yyval = yyvsp[-1]; } | |
3162 | break; | |
3163 | -case 157: | |
3164 | -#line 1213 "bapascal.y" | |
3165 | -{ | |
3166 | + | |
3167 | + case 158: | |
3168 | +#line 1209 "bapascal.y" | |
3169 | + { | |
3170 | yyval = new_expr(); | |
3171 | expr[yyval].obj = variable; | |
3172 | expr[yyval].typ = rawstrings; | |
3173 | @@ -2412,9 +2702,10 @@ | |
3174 | expr[yyval].tix = -1; | |
3175 | } | |
3176 | break; | |
3177 | -case 158: | |
3178 | -#line 1226 "bapascal.y" | |
3179 | -{ | |
3180 | + | |
3181 | + case 159: | |
3182 | +#line 1222 "bapascal.y" | |
3183 | + { | |
3184 | if (expr[yyvsp[-1]].typ != strings) | |
3185 | yyerror("left parameter is not of type 'string'"); | |
3186 | yyval = NO_EXPR; /* for free_expr() call up the parse tree */ | |
3187 | @@ -2425,17 +2716,19 @@ | |
3188 | free_expr(yyvsp[-1]); free_expr(yyvsp[0]); | |
3189 | } | |
3190 | break; | |
3191 | -case 159: | |
3192 | -#line 1239 "bapascal.y" | |
3193 | -{ | |
3194 | + | |
3195 | + case 160: | |
3196 | +#line 1235 "bapascal.y" | |
3197 | + { | |
3198 | /* push the parm count for interp's SPRINTF_OP to use */ | |
3199 | emit1(PUSH_LIT,sprintf_cnt); | |
3200 | emit1(SPRINTF_OP,yyvsp[-3]); | |
3201 | } | |
3202 | break; | |
3203 | -case 160: | |
3204 | -#line 1247 "bapascal.y" | |
3205 | -{ | |
3206 | + | |
3207 | + case 161: | |
3208 | +#line 1243 "bapascal.y" | |
3209 | + { | |
3210 | if (expr[yyvsp[-2]].typ != strings) | |
3211 | yyerror("Leftmost sprintf parameter must be of type 'string'"); | |
3212 | yyval = expr[yyvsp[0]].adr; /* pass raw string index up the tree */ | |
3213 | @@ -2444,9 +2737,10 @@ | |
3214 | sprintf_cnt = 0; | |
3215 | } | |
3216 | break; | |
3217 | -case 161: | |
3218 | -#line 1258 "bapascal.y" | |
3219 | -{ | |
3220 | + | |
3221 | + case 162: | |
3222 | +#line 1254 "bapascal.y" | |
3223 | + { | |
3224 | if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != strings)) | |
3225 | yyerror( | |
3226 | "sprintf parameter must be either of type 'int' or type 'string'"); | |
3227 | @@ -2458,9 +2752,10 @@ | |
3228 | free_expr(yyvsp[0]); | |
3229 | } | |
3230 | break; | |
3231 | -case 162: | |
3232 | -#line 1270 "bapascal.y" | |
3233 | -{ | |
3234 | + | |
3235 | + case 163: | |
3236 | +#line 1266 "bapascal.y" | |
3237 | + { | |
3238 | if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != strings)) | |
3239 | yyerror( | |
3240 | "sprintf parameter must be either of type 'int' or type 'string'"); | |
3241 | @@ -2472,9 +2767,10 @@ | |
3242 | free_expr(yyvsp[0]); | |
3243 | } | |
3244 | break; | |
3245 | -case 164: | |
3246 | -#line 1285 "bapascal.y" | |
3247 | -{ | |
3248 | + | |
3249 | + case 165: | |
3250 | +#line 1281 "bapascal.y" | |
3251 | + { | |
3252 | gen_exprval(yyvsp[0]); | |
3253 | if (expr[yyvsp[-2]].typ == expr[yyvsp[0]].typ){ | |
3254 | if ((expr[yyvsp[-2]].typ == ints)||(expr[yyvsp[-2]].typ == bools)|| | |
3255 | @@ -2489,33 +2785,40 @@ | |
3256 | free_expr(yyvsp[0]); | |
3257 | } | |
3258 | break; | |
3259 | -case 165: | |
3260 | + | |
3261 | + case 166: | |
3262 | +#line 1297 "bapascal.y" | |
3263 | + { yyval = TEST_EQ; } | |
3264 | + break; | |
3265 | + | |
3266 | + case 167: | |
3267 | +#line 1298 "bapascal.y" | |
3268 | + { yyval = TEST_LT; } | |
3269 | + break; | |
3270 | + | |
3271 | + case 168: | |
3272 | +#line 1299 "bapascal.y" | |
3273 | + { yyval = TEST_GT; } | |
3274 | + break; | |
3275 | + | |
3276 | + case 169: | |
3277 | +#line 1300 "bapascal.y" | |
3278 | + { yyval = TEST_LE; } | |
3279 | + break; | |
3280 | + | |
3281 | + case 170: | |
3282 | #line 1301 "bapascal.y" | |
3283 | -{ yyval = TEST_EQ; } | |
3284 | + { yyval = TEST_GE; } | |
3285 | break; | |
3286 | -case 166: | |
3287 | + | |
3288 | + case 171: | |
3289 | #line 1302 "bapascal.y" | |
3290 | -{ yyval = TEST_LT; } | |
3291 | + { yyval = TEST_NE; } | |
3292 | break; | |
3293 | -case 167: | |
3294 | -#line 1303 "bapascal.y" | |
3295 | -{ yyval = TEST_GT; } | |
3296 | - break; | |
3297 | -case 168: | |
3298 | -#line 1304 "bapascal.y" | |
3299 | -{ yyval = TEST_LE; } | |
3300 | - break; | |
3301 | -case 169: | |
3302 | -#line 1305 "bapascal.y" | |
3303 | -{ yyval = TEST_GE; } | |
3304 | - break; | |
3305 | -case 170: | |
3306 | -#line 1306 "bapascal.y" | |
3307 | -{ yyval = TEST_NE; } | |
3308 | - break; | |
3309 | -case 172: | |
3310 | -#line 1311 "bapascal.y" | |
3311 | -{ | |
3312 | + | |
3313 | + case 173: | |
3314 | +#line 1307 "bapascal.y" | |
3315 | + { | |
3316 | yyval = yyvsp[0]; | |
3317 | gen_exprval(yyval); | |
3318 | if ((expr[yyval].typ != ints)&&(expr[yyval].typ != notyp)){ | |
3319 | @@ -2524,9 +2827,10 @@ | |
3320 | } | |
3321 | } | |
3322 | break; | |
3323 | -case 173: | |
3324 | -#line 1320 "bapascal.y" | |
3325 | -{ | |
3326 | + | |
3327 | + case 174: | |
3328 | +#line 1316 "bapascal.y" | |
3329 | + { | |
3330 | yyval = yyvsp[0]; | |
3331 | gen_exprval(yyval); | |
3332 | if ((expr[yyval].typ != ints)&&(expr[yyval].typ != notyp)){ | |
3333 | @@ -2537,9 +2841,10 @@ | |
3334 | emit(NEGATE); | |
3335 | } | |
3336 | break; | |
3337 | -case 174: | |
3338 | -#line 1331 "bapascal.y" | |
3339 | -{ | |
3340 | + | |
3341 | + case 175: | |
3342 | +#line 1327 "bapascal.y" | |
3343 | + { | |
3344 | gen_exprval(yyvsp[0]); | |
3345 | switch (yyvsp[-1]) { | |
3346 | case DO_OR: | |
3347 | @@ -2560,25 +2865,30 @@ | |
3348 | free_expr(yyvsp[0]); | |
3349 | } | |
3350 | break; | |
3351 | -case 175: | |
3352 | + | |
3353 | + case 176: | |
3354 | +#line 1350 "bapascal.y" | |
3355 | + { gen_exprval(yyvsp[0]); } | |
3356 | + break; | |
3357 | + | |
3358 | + case 177: | |
3359 | +#line 1353 "bapascal.y" | |
3360 | + { yyval = DO_ADD; } | |
3361 | + break; | |
3362 | + | |
3363 | + case 178: | |
3364 | #line 1354 "bapascal.y" | |
3365 | -{ gen_exprval(yyvsp[0]); } | |
3366 | + { yyval = DO_SUB; } | |
3367 | break; | |
3368 | -case 176: | |
3369 | -#line 1357 "bapascal.y" | |
3370 | -{ yyval = DO_ADD; } | |
3371 | - break; | |
3372 | -case 177: | |
3373 | -#line 1358 "bapascal.y" | |
3374 | -{ yyval = DO_SUB; } | |
3375 | - break; | |
3376 | -case 178: | |
3377 | -#line 1359 "bapascal.y" | |
3378 | -{ yyval = DO_OR; } | |
3379 | + | |
3380 | + case 179: | |
3381 | +#line 1355 "bapascal.y" | |
3382 | + { yyval = DO_OR; } | |
3383 | break; | |
3384 | -case 180: | |
3385 | -#line 1364 "bapascal.y" | |
3386 | -{ | |
3387 | + | |
3388 | + case 181: | |
3389 | +#line 1360 "bapascal.y" | |
3390 | + { | |
3391 | gen_exprval(yyvsp[0]); | |
3392 | switch(yyvsp[-1]) { | |
3393 | case DO_AND: | |
3394 | @@ -2603,29 +2913,35 @@ | |
3395 | free_expr(yyvsp[0]); | |
3396 | } | |
3397 | break; | |
3398 | -case 181: | |
3399 | + | |
3400 | + case 182: | |
3401 | +#line 1387 "bapascal.y" | |
3402 | + { gen_exprval(yyvsp[0]); } | |
3403 | + break; | |
3404 | + | |
3405 | + case 183: | |
3406 | +#line 1390 "bapascal.y" | |
3407 | + { yyval = DO_MUL; } | |
3408 | + break; | |
3409 | + | |
3410 | + case 184: | |
3411 | #line 1391 "bapascal.y" | |
3412 | -{ gen_exprval(yyvsp[0]); } | |
3413 | + { yyval = DO_DIV; } | |
3414 | break; | |
3415 | -case 182: | |
3416 | -#line 1394 "bapascal.y" | |
3417 | -{ yyval = DO_MUL; } | |
3418 | - break; | |
3419 | -case 183: | |
3420 | -#line 1395 "bapascal.y" | |
3421 | -{ yyval = DO_DIV; } | |
3422 | - break; | |
3423 | -case 184: | |
3424 | -#line 1396 "bapascal.y" | |
3425 | -{ yyval = DO_MOD; } | |
3426 | - break; | |
3427 | -case 185: | |
3428 | -#line 1397 "bapascal.y" | |
3429 | -{ yyval = DO_AND; } | |
3430 | + | |
3431 | + case 185: | |
3432 | +#line 1392 "bapascal.y" | |
3433 | + { yyval = DO_MOD; } | |
3434 | break; | |
3435 | -case 187: | |
3436 | -#line 1402 "bapascal.y" | |
3437 | -{ | |
3438 | + | |
3439 | + case 186: | |
3440 | +#line 1393 "bapascal.y" | |
3441 | + { yyval = DO_AND; } | |
3442 | + break; | |
3443 | + | |
3444 | + case 188: | |
3445 | +#line 1398 "bapascal.y" | |
3446 | + { | |
3447 | yyval = new_expr(); | |
3448 | expr[yyval].obj = constant; | |
3449 | expr[yyval].adr = yyvsp[0]; | |
3450 | @@ -2633,9 +2949,10 @@ | |
3451 | expr[yyval].lev = level; | |
3452 | } | |
3453 | break; | |
3454 | -case 188: | |
3455 | -#line 1410 "bapascal.y" | |
3456 | -{ | |
3457 | + | |
3458 | + case 189: | |
3459 | +#line 1406 "bapascal.y" | |
3460 | + { | |
3461 | yyval = new_expr(); | |
3462 | expr[yyval].obj = constant; | |
3463 | expr[yyval].adr = laststring[0]; | |
3464 | @@ -2643,13 +2960,15 @@ | |
3465 | expr[yyval].lev = level; | |
3466 | } | |
3467 | break; | |
3468 | -case 189: | |
3469 | -#line 1417 "bapascal.y" | |
3470 | -{ yyval = yyvsp[-1];} | |
3471 | + | |
3472 | + case 190: | |
3473 | +#line 1413 "bapascal.y" | |
3474 | + { yyval = yyvsp[-1];} | |
3475 | break; | |
3476 | -case 190: | |
3477 | -#line 1419 "bapascal.y" | |
3478 | -{ | |
3479 | + | |
3480 | + case 191: | |
3481 | +#line 1415 "bapascal.y" | |
3482 | + { | |
3483 | yyval = yyvsp[0]; | |
3484 | gen_exprval(yyval); | |
3485 | if (expr[yyval].typ == bools) | |
3486 | @@ -2660,9 +2979,10 @@ | |
3487 | } | |
3488 | } | |
3489 | break; | |
3490 | -case 191: | |
3491 | -#line 1432 "bapascal.y" | |
3492 | -{ int k; | |
3493 | + | |
3494 | + case 192: | |
3495 | +#line 1428 "bapascal.y" | |
3496 | + { int k; | |
3497 | yyval = new_expr(); | |
3498 | expr[yyval].obj = tab[yyvsp[-2]].obj; | |
3499 | expr[yyval].typ = tab[yyvsp[-2]].typ; | |
3500 | @@ -2712,9 +3032,10 @@ | |
3501 | } | |
3502 | } | |
3503 | break; | |
3504 | -case 195: | |
3505 | -#line 1487 "bapascal.y" | |
3506 | -{ | |
3507 | + | |
3508 | + case 196: | |
3509 | +#line 1483 "bapascal.y" | |
3510 | + { | |
3511 | if ((tab[last_pfv].obj == function)|| | |
3512 | (tab[last_pfv].obj == ext_function)) { | |
3513 | if ((++toppfs) == MAXPFNEST) | |
3514 | @@ -2722,7 +3043,7 @@ | |
3515 | else{ /* legal func call */ | |
3516 | pfstack[toppfs].tix = last_pf = last_pfv; | |
3517 | pfstack[toppfs].pct = parmct = 0; | |
3518 | - first_stringerr = first_parmcterr = 1; | |
3519 | + first_parmcterr = 1; | |
3520 | if (tab[last_pf].lev != -1){ /* regular proc call */ | |
3521 | if ((tab[last_pf].mon)&&(tab[prt].mon)&& | |
3522 | (tab[last_pf].mon != tab[prt].mon)) | |
3523 | @@ -2733,9 +3054,10 @@ | |
3524 | } /* if func */ | |
3525 | } | |
3526 | break; | |
3527 | -case 200: | |
3528 | -#line 1514 "bapascal.y" | |
3529 | -{ | |
3530 | + | |
3531 | + case 201: | |
3532 | +#line 1510 "bapascal.y" | |
3533 | + { | |
3534 | if (expr[yyvsp[-1]].typ != strings) | |
3535 | yyerror("left parameter is not of type 'string'"); | |
3536 | yyval = new_expr(); | |
3537 | @@ -2752,9 +3074,10 @@ | |
3538 | free_expr(yyvsp[0]); | |
3539 | } | |
3540 | break; | |
3541 | -case 201: | |
3542 | -#line 1533 "bapascal.y" | |
3543 | -{ | |
3544 | + | |
3545 | + case 202: | |
3546 | +#line 1529 "bapascal.y" | |
3547 | + { | |
3548 | yyval = new_expr(); | |
3549 | expr[yyval].obj = function; | |
3550 | expr[yyval].typ = ints; | |
3551 | @@ -2771,9 +3094,10 @@ | |
3552 | free_expr(yyvsp[0]); | |
3553 | } | |
3554 | break; | |
3555 | -case 202: | |
3556 | -#line 1552 "bapascal.y" | |
3557 | -{ | |
3558 | + | |
3559 | + case 203: | |
3560 | +#line 1548 "bapascal.y" | |
3561 | + { | |
3562 | if (expr[yyvsp[-1]].typ == strings) { | |
3563 | if (!expr[yyvsp[-1]].arelt) | |
3564 | /* addr of array ref is already on the stack */ | |
3565 | @@ -2784,9 +3108,10 @@ | |
3566 | /* parent rule will free_expr($2) */ | |
3567 | } | |
3568 | break; | |
3569 | -case 203: | |
3570 | -#line 1563 "bapascal.y" | |
3571 | -{ | |
3572 | + | |
3573 | + case 204: | |
3574 | +#line 1559 "bapascal.y" | |
3575 | + { | |
3576 | yyval = new_expr(); | |
3577 | expr[yyval].obj = variable; | |
3578 | expr[yyval].typ = rawstrings; | |
3579 | @@ -2796,9 +3121,10 @@ | |
3580 | expr[yyval].tix = -1; | |
3581 | } | |
3582 | break; | |
3583 | -case 204: | |
3584 | -#line 1575 "bapascal.y" | |
3585 | -{ | |
3586 | + | |
3587 | + case 205: | |
3588 | +#line 1571 "bapascal.y" | |
3589 | + { | |
3590 | if (expr[yyvsp[-1]].typ != strings) | |
3591 | yyerror("Left parameter must be of type 'string'"); | |
3592 | emit(RECEIVE_OP); | |
3593 | @@ -2812,9 +3138,10 @@ | |
3594 | expr[yyval].adr = expr[yyval].lev = -1; | |
3595 | } | |
3596 | break; | |
3597 | -case 205: | |
3598 | -#line 1589 "bapascal.y" | |
3599 | -{ | |
3600 | + | |
3601 | + case 206: | |
3602 | +#line 1585 "bapascal.y" | |
3603 | + { | |
3604 | if (expr[yyvsp[-3]].typ != strings) | |
3605 | yyerror("Left parameter must be of type 'string'"); | |
3606 | /* implements receive(string,int&) call */ | |
3607 | @@ -2837,9 +3164,10 @@ | |
3608 | expr[yyval].adr = expr[yyval].lev = -1; | |
3609 | } | |
3610 | break; | |
3611 | -case 206: | |
3612 | -#line 1614 "bapascal.y" | |
3613 | -{ | |
3614 | + | |
3615 | + case 207: | |
3616 | +#line 1610 "bapascal.y" | |
3617 | + { | |
3618 | yyval = new_expr(); | |
3619 | expr[yyval].obj = function; | |
3620 | expr[yyval].typ = ints; | |
3621 | @@ -2852,9 +3180,10 @@ | |
3622 | emit1(SSCANF_OP,yyvsp[-3]); | |
3623 | } | |
3624 | break; | |
3625 | -case 207: | |
3626 | -#line 1629 "bapascal.y" | |
3627 | -{ | |
3628 | + | |
3629 | + case 208: | |
3630 | +#line 1625 "bapascal.y" | |
3631 | + { | |
3632 | if (expr[yyvsp[-2]].typ != strings) | |
3633 | yyerror("Leftmost sscanf parameter must be of type 'string'"); | |
3634 | yyval = expr[yyvsp[0]].adr; /* pass rawstring index up the tree */ | |
3635 | @@ -2863,9 +3192,10 @@ | |
3636 | sscanf_cnt = 0; | |
3637 | } | |
3638 | break; | |
3639 | -case 208: | |
3640 | -#line 1640 "bapascal.y" | |
3641 | -{ | |
3642 | + | |
3643 | + case 209: | |
3644 | +#line 1636 "bapascal.y" | |
3645 | + { | |
3646 | if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != strings)) | |
3647 | yyerror( | |
3648 | "sscanf parameter must be either of type 'int' or type 'string'"); | |
3649 | @@ -2874,9 +3204,10 @@ | |
3650 | free_expr(yyvsp[0]); | |
3651 | } | |
3652 | break; | |
3653 | -case 209: | |
3654 | -#line 1649 "bapascal.y" | |
3655 | -{ | |
3656 | + | |
3657 | + case 210: | |
3658 | +#line 1645 "bapascal.y" | |
3659 | + { | |
3660 | if ((expr[yyvsp[0]].typ != ints)&&(expr[yyvsp[0]].typ != strings)) | |
3661 | yyerror( | |
3662 | "sscanf parameter must be either of type 'int' or type 'string'"); | |
3663 | @@ -2885,9 +3216,10 @@ | |
3664 | free_expr(yyvsp[0]); | |
3665 | } | |
3666 | break; | |
3667 | -case 210: | |
3668 | -#line 1660 "bapascal.y" | |
3669 | -{ | |
3670 | + | |
3671 | + case 211: | |
3672 | +#line 1656 "bapascal.y" | |
3673 | + { | |
3674 | expr[yyvsp[-3]].ref = sizeof(int)*atab[last_aref].elsize; | |
3675 | expr[yyvsp[-3]].arelt = 1; | |
3676 | expr[yyvsp[-3]].typ = last_eltyp; | |
3677 | @@ -2898,9 +3230,10 @@ | |
3678 | } | |
3679 | } | |
3680 | break; | |
3681 | -case 211: | |
3682 | -#line 1673 "bapascal.y" | |
3683 | -{ | |
3684 | + | |
3685 | + case 212: | |
3686 | +#line 1669 "bapascal.y" | |
3687 | + { | |
3688 | if (tab[yyvsp[0]].typ != arrays) { | |
3689 | sprintf(pbuf,"'%s' is not of type ARRAY",tab[yyvsp[0]].name); | |
3690 | yyerror(pbuf); | |
3691 | @@ -2929,9 +3262,10 @@ | |
3692 | expr[yyval].normal = tab[yyvsp[0]].normal; | |
3693 | } | |
3694 | break; | |
3695 | -case 212: | |
3696 | -#line 1704 "bapascal.y" | |
3697 | -{ | |
3698 | + | |
3699 | + case 213: | |
3700 | +#line 1700 "bapascal.y" | |
3701 | + { | |
3702 | gen_exprval(yyvsp[0]); | |
3703 | last_aref = arstack[topars].aref; | |
3704 | last_eltyp = arstack[topars].eltyp; | |
3705 | @@ -2941,9 +3275,10 @@ | |
3706 | free_expr(yyvsp[0]); | |
3707 | } | |
3708 | break; | |
3709 | -case 213: | |
3710 | -#line 1714 "bapascal.y" | |
3711 | -{ | |
3712 | + | |
3713 | + case 214: | |
3714 | +#line 1710 "bapascal.y" | |
3715 | + { | |
3716 | gen_exprval(yyvsp[0]); | |
3717 | last_aref = arstack[topars].aref; | |
3718 | last_eltyp = arstack[topars].eltyp; | |
3719 | @@ -2953,47 +3288,39 @@ | |
3720 | free_expr(yyvsp[0]); | |
3721 | } | |
3722 | break; | |
3723 | -case 214: | |
3724 | -#line 1726 "bapascal.y" | |
3725 | -{ | |
3726 | + | |
3727 | + case 215: | |
3728 | +#line 1722 "bapascal.y" | |
3729 | + { | |
3730 | expr[yyvsp[-1]].typ = ints; | |
3731 | yyval = yyvsp[-1]; | |
3732 | } | |
3733 | break; | |
3734 | -case 215: | |
3735 | -#line 1733 "bapascal.y" | |
3736 | -{ yyval = loc(lastident,level); } | |
3737 | + | |
3738 | + case 216: | |
3739 | +#line 1729 "bapascal.y" | |
3740 | + { yyval = loc(lastident,level); } | |
3741 | break; | |
3742 | -case 216: | |
3743 | -#line 1737 "bapascal.y" | |
3744 | -{ yyval = enter(lastident,constant,level,level); } | |
3745 | + | |
3746 | + case 217: | |
3747 | +#line 1733 "bapascal.y" | |
3748 | + { yyval = enter(lastident,constant,level,level); } | |
3749 | break; | |
3750 | -} | |
3751 | ||
3752 | -#line 705 "/usr/share/bison/bison.simple" | |
3753 | ||
3754 | + } | |
3755 | + | |
3756 | +/* Line 991 of yacc.c. */ | |
3757 | +#line 3314 "y.tab.c" | |
3758 | \f | |
3759 | yyvsp -= yylen; | |
3760 | yyssp -= yylen; | |
3761 | -#if YYLSP_NEEDED | |
3762 | - yylsp -= yylen; | |
3763 | -#endif | |
3764 | ||
3765 | -#if YYDEBUG | |
3766 | - if (yydebug) | |
3767 | - { | |
3768 | - short *yyssp1 = yyss - 1; | |
3769 | - YYFPRINTF (stderr, "state stack now"); | |
3770 | - while (yyssp1 != yyssp) | |
3771 | - YYFPRINTF (stderr, " %d", *++yyssp1); | |
3772 | - YYFPRINTF (stderr, "\n"); | |
3773 | - } | |
3774 | -#endif | |
3775 | + | |
3776 | + YY_STACK_PRINT (yyss, yyssp); | |
3777 | ||
3778 | *++yyvsp = yyval; | |
3779 | -#if YYLSP_NEEDED | |
3780 | - *++yylsp = yyloc; | |
3781 | -#endif | |
3782 | + | |
3783 | ||
3784 | /* Now `shift' the result of the reduction. Determine what state | |
3785 | that goes to, based on the state we popped back to and the rule | |
3786 | @@ -3001,11 +3328,11 @@ | |
3787 | ||
3788 | yyn = yyr1[yyn]; | |
3789 | ||
3790 | - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; | |
3791 | - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) | |
3792 | + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; | |
3793 | + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) | |
3794 | yystate = yytable[yystate]; | |
3795 | else | |
3796 | - yystate = yydefgoto[yyn - YYNTBASE]; | |
3797 | + yystate = yydefgoto[yyn - YYNTOKENS]; | |
3798 | ||
3799 | goto yynewstate; | |
3800 | ||
3801 | @@ -3018,13 +3345,13 @@ | |
3802 | if (!yyerrstatus) | |
3803 | { | |
3804 | ++yynerrs; | |
3805 | - | |
3806 | -#ifdef YYERROR_VERBOSE | |
3807 | +#if YYERROR_VERBOSE | |
3808 | yyn = yypact[yystate]; | |
3809 | ||
3810 | - if (yyn > YYFLAG && yyn < YYLAST) | |
3811 | + if (YYPACT_NINF < yyn && yyn < YYLAST) | |
3812 | { | |
3813 | YYSIZE_T yysize = 0; | |
3814 | + int yytype = YYTRANSLATE (yychar); | |
3815 | char *yymsg; | |
3816 | int yyx, yycount; | |
3817 | ||
3818 | @@ -3033,15 +3360,15 @@ | |
3819 | YYCHECK. */ | |
3820 | for (yyx = yyn < 0 ? -yyn : 0; | |
3821 | yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) | |
3822 | - if (yycheck[yyx + yyn] == yyx) | |
3823 | + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | |
3824 | yysize += yystrlen (yytname[yyx]) + 15, yycount++; | |
3825 | - yysize += yystrlen ("parse error, unexpected ") + 1; | |
3826 | - yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); | |
3827 | + yysize += yystrlen ("syntax error, unexpected ") + 1; | |
3828 | + yysize += yystrlen (yytname[yytype]); | |
3829 | yymsg = (char *) YYSTACK_ALLOC (yysize); | |
3830 | if (yymsg != 0) | |
3831 | { | |
3832 | - char *yyp = yystpcpy (yymsg, "parse error, unexpected "); | |
3833 | - yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); | |
3834 | + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); | |
3835 | + yyp = yystpcpy (yyp, yytname[yytype]); | |
3836 | ||
3837 | if (yycount < 5) | |
3838 | { | |
3839 | @@ -3049,7 +3376,7 @@ | |
3840 | for (yyx = yyn < 0 ? -yyn : 0; | |
3841 | yyx < (int) (sizeof (yytname) / sizeof (char *)); | |
3842 | yyx++) | |
3843 | - if (yycheck[yyx + yyn] == yyx) | |
3844 | + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | |
3845 | { | |
3846 | const char *yyq = ! yycount ? ", expecting " : " or "; | |
3847 | yyp = yystpcpy (yyp, yyq); | |
3848 | @@ -3061,102 +3388,93 @@ | |
3849 | YYSTACK_FREE (yymsg); | |
3850 | } | |
3851 | else | |
3852 | - yyerror ("parse error; also virtual memory exhausted"); | |
3853 | + yyerror ("syntax error; also virtual memory exhausted"); | |
3854 | } | |
3855 | else | |
3856 | -#endif /* defined (YYERROR_VERBOSE) */ | |
3857 | - yyerror ("parse error"); | |
3858 | +#endif /* YYERROR_VERBOSE */ | |
3859 | + yyerror ("syntax error"); | |
3860 | } | |
3861 | - goto yyerrlab1; | |
3862 | ||
3863 | ||
3864 | -/*--------------------------------------------------. | |
3865 | -| yyerrlab1 -- error raised explicitly by an action | | |
3866 | -`--------------------------------------------------*/ | |
3867 | -yyerrlab1: | |
3868 | + | |
3869 | if (yyerrstatus == 3) | |
3870 | { | |
3871 | /* If just tried and failed to reuse lookahead token after an | |
3872 | error, discard it. */ | |
3873 | ||
3874 | - /* return failure if at end of input */ | |
3875 | + /* Return failure if at end of input. */ | |
3876 | if (yychar == YYEOF) | |
3877 | - YYABORT; | |
3878 | - YYDPRINTF ((stderr, "Discarding token %d (%s).\n", | |
3879 | - yychar, yytname[yychar1])); | |
3880 | + { | |
3881 | + /* Pop the error token. */ | |
3882 | + YYPOPSTACK; | |
3883 | + /* Pop the rest of the stack. */ | |
3884 | + while (yyss < yyssp) | |
3885 | + { | |
3886 | + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); | |
3887 | + yydestruct (yystos[*yyssp], yyvsp); | |
3888 | + YYPOPSTACK; | |
3889 | + } | |
3890 | + YYABORT; | |
3891 | + } | |
3892 | + | |
3893 | + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); | |
3894 | + yydestruct (yytoken, &yylval); | |
3895 | yychar = YYEMPTY; | |
3896 | + | |
3897 | } | |
3898 | ||
3899 | /* Else will try to reuse lookahead token after shifting the error | |
3900 | token. */ | |
3901 | + goto yyerrlab2; | |
3902 | ||
3903 | - yyerrstatus = 3; /* Each real token shifted decrements this */ | |
3904 | ||
3905 | - goto yyerrhandle; | |
3906 | +/*----------------------------------------------------. | |
3907 | +| yyerrlab1 -- error raised explicitly by an action. | | |
3908 | +`----------------------------------------------------*/ | |
3909 | +yyerrlab1: | |
3910 | ||
3911 | + /* Suppress GCC warning that yyerrlab1 is unused when no action | |
3912 | + invokes YYERROR. */ | |
3913 | +#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \ | |
3914 | + && !defined __cplusplus | |
3915 | + __attribute__ ((__unused__)) | |
3916 | +#endif | |
3917 | ||
3918 | -/*-------------------------------------------------------------------. | |
3919 | -| yyerrdefault -- current state does not do anything special for the | | |
3920 | -| error token. | | |
3921 | -`-------------------------------------------------------------------*/ | |
3922 | -yyerrdefault: | |
3923 | -#if 0 | |
3924 | - /* This is wrong; only states that explicitly want error tokens | |
3925 | - should shift them. */ | |
3926 | ||
3927 | - /* If its default is to accept any token, ok. Otherwise pop it. */ | |
3928 | - yyn = yydefact[yystate]; | |
3929 | - if (yyn) | |
3930 | - goto yydefault; | |
3931 | -#endif | |
3932 | + goto yyerrlab2; | |
3933 | ||
3934 | ||
3935 | /*---------------------------------------------------------------. | |
3936 | -| yyerrpop -- pop the current state because it cannot handle the | | |
3937 | -| error token | | |
3938 | +| yyerrlab2 -- pop states until the error token can be shifted. | | |
3939 | `---------------------------------------------------------------*/ | |
3940 | -yyerrpop: | |
3941 | - if (yyssp == yyss) | |
3942 | - YYABORT; | |
3943 | - yyvsp--; | |
3944 | - yystate = *--yyssp; | |
3945 | -#if YYLSP_NEEDED | |
3946 | - yylsp--; | |
3947 | -#endif | |
3948 | +yyerrlab2: | |
3949 | + yyerrstatus = 3; /* Each real token shifted decrements this. */ | |
3950 | ||
3951 | -#if YYDEBUG | |
3952 | - if (yydebug) | |
3953 | + for (;;) | |
3954 | { | |
3955 | - short *yyssp1 = yyss - 1; | |
3956 | - YYFPRINTF (stderr, "Error: state stack now"); | |
3957 | - while (yyssp1 != yyssp) | |
3958 | - YYFPRINTF (stderr, " %d", *++yyssp1); | |
3959 | - YYFPRINTF (stderr, "\n"); | |
3960 | - } | |
3961 | -#endif | |
3962 | + yyn = yypact[yystate]; | |
3963 | + if (yyn != YYPACT_NINF) | |
3964 | + { | |
3965 | + yyn += YYTERROR; | |
3966 | + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) | |
3967 | + { | |
3968 | + yyn = yytable[yyn]; | |
3969 | + if (0 < yyn) | |
3970 | + break; | |
3971 | + } | |
3972 | + } | |
3973 | ||
3974 | -/*--------------. | |
3975 | -| yyerrhandle. | | |
3976 | -`--------------*/ | |
3977 | -yyerrhandle: | |
3978 | - yyn = yypact[yystate]; | |
3979 | - if (yyn == YYFLAG) | |
3980 | - goto yyerrdefault; | |
3981 | + /* Pop the current state because it cannot handle the error token. */ | |
3982 | + if (yyssp == yyss) | |
3983 | + YYABORT; | |
3984 | ||
3985 | - yyn += YYTERROR; | |
3986 | - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) | |
3987 | - goto yyerrdefault; | |
3988 | + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); | |
3989 | + yydestruct (yystos[yystate], yyvsp); | |
3990 | + yyvsp--; | |
3991 | + yystate = *--yyssp; | |
3992 | ||
3993 | - yyn = yytable[yyn]; | |
3994 | - if (yyn < 0) | |
3995 | - { | |
3996 | - if (yyn == YYFLAG) | |
3997 | - goto yyerrpop; | |
3998 | - yyn = -yyn; | |
3999 | - goto yyreduce; | |
4000 | + YY_STACK_PRINT (yyss, yyssp); | |
4001 | } | |
4002 | - else if (yyn == 0) | |
4003 | - goto yyerrpop; | |
4004 | ||
4005 | if (yyn == YYFINAL) | |
4006 | YYACCEPT; | |
4007 | @@ -3164,9 +3482,7 @@ | |
4008 | YYDPRINTF ((stderr, "Shifting error token, ")); | |
4009 | ||
4010 | *++yyvsp = yylval; | |
4011 | -#if YYLSP_NEEDED | |
4012 | - *++yylsp = yylloc; | |
4013 | -#endif | |
4014 | + | |
4015 | ||
4016 | yystate = yyn; | |
4017 | goto yynewstate; | |
4018 | @@ -3186,13 +3502,15 @@ | |
4019 | yyresult = 1; | |
4020 | goto yyreturn; | |
4021 | ||
4022 | -/*---------------------------------------------. | |
4023 | -| yyoverflowab -- parser overflow comes here. | | |
4024 | -`---------------------------------------------*/ | |
4025 | +#ifndef yyoverflow | |
4026 | +/*----------------------------------------------. | |
4027 | +| yyoverflowlab -- parser overflow comes here. | | |
4028 | +`----------------------------------------------*/ | |
4029 | yyoverflowlab: | |
4030 | yyerror ("parser stack overflow"); | |
4031 | yyresult = 2; | |
4032 | /* Fall through. */ | |
4033 | +#endif | |
4034 | ||
4035 | yyreturn: | |
4036 | #ifndef yyoverflow | |
4037 | @@ -3201,7 +3519,9 @@ | |
4038 | #endif | |
4039 | return yyresult; | |
4040 | } | |
4041 | -#line 1741 "bapascal.y" | |
4042 | + | |
4043 | + | |
4044 | +#line 1737 "bapascal.y" | |
4045 | /*start of routines*/ | |
4046 | ||
4047 | void process_var_inits(int levl) | |
4048 | @@ -3237,6 +3557,9 @@ | |
4049 | /* | |
4050 | * | |
4051 | * $Log$ | |
4052 | + * Revision 2.17 2005/10/27 12:58:24 bynum | |
4053 | + * remove first_stringerr, correct minor errors | |
4054 | + * | |
4055 | * Revision 2.16 2003/05/13 14:01:23 bynum | |
4056 | * add boolean initializers, fix proc nesting | |
4057 | * | |
4058 | @@ -3345,3 +3668,4 @@ | |
4059 | * | |
4060 | * | |
4061 | */ | |
4062 | + | |
4063 | diff -ur bacisrc.old/pascomp/lex.c bacisrc/pascomp/lex.c | |
4064 | --- bacisrc.old/pascomp/lex.c 2004-04-15 13:31:24.000000000 +0200 | |
4065 | +++ bacisrc/pascomp/lex.c 2005-10-27 15:02:05.000000000 +0200 | |
4066 | @@ -9,9 +9,6 @@ | |
4067 | #define YY_FLEX_MINOR_VERSION 5 | |
4068 | ||
4069 | #include <stdio.h> | |
4070 | -#if !defined(DOS) | |
4071 | -#include <unistd.h> | |
4072 | -#endif | |
4073 | ||
4074 | ||
4075 | /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ | |
4076 | @@ -25,6 +22,9 @@ | |
4077 | #ifdef __cplusplus | |
4078 | ||
4079 | #include <stdlib.h> | |
4080 | +#if !defined(DOS) | |
4081 | +#include <unistd.h> | |
4082 | +#endif | |
4083 | ||
4084 | /* Use prototypes in function declarations. */ | |
4085 | #define YY_USE_PROTOS | |
4086 | @@ -714,7 +714,7 @@ | |
4087 | YY_DECL | |
4088 | { | |
4089 | register yy_state_type yy_current_state; | |
4090 | - register char *yy_cp = NULL, *yy_bp = NULL; | |
4091 | + register char *yy_cp, *yy_bp; | |
4092 | register int yy_act; | |
4093 | ||
4094 | #line 91 "bapascal.l" | |
4095 | @@ -1600,7 +1600,6 @@ | |
4096 | #endif /* ifndef YY_NO_UNPUT */ | |
4097 | ||
4098 | ||
4099 | -#ifndef YY_NO_INPUT | |
4100 | #ifdef __cplusplus | |
4101 | static int yyinput() | |
4102 | #else | |
4103 | @@ -1672,7 +1671,7 @@ | |
4104 | ||
4105 | return c; | |
4106 | } | |
4107 | -#endif /* YY_NO_INPUT */ | |
4108 | + | |
4109 | ||
4110 | #ifdef YY_USE_PROTOS | |
4111 | void yyrestart( FILE *input_file ) | |
4112 | @@ -1783,6 +1782,11 @@ | |
4113 | } | |
4114 | ||
4115 | ||
4116 | +#ifndef YY_ALWAYS_INTERACTIVE | |
4117 | +#ifndef YY_NEVER_INTERACTIVE | |
4118 | +extern int isatty YY_PROTO(( int )); | |
4119 | +#endif | |
4120 | +#endif | |
4121 | ||
4122 | #ifdef YY_USE_PROTOS | |
4123 | void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) | |
4124 | @@ -2251,7 +2255,7 @@ | |
4125 | } | |
4126 | } while (reading); | |
4127 | } | |
4128 | - return ((esc < 256) ? esc : 0x20); | |
4129 | + return esc; | |
4130 | } | |
4131 | ||
4132 | void get_string(char termch) | |
4133 | @@ -2300,6 +2304,9 @@ | |
4134 | /* | |
4135 | * | |
4136 | * $Log$ | |
4137 | + * Revision 2.11 2005/10/27 12:56:33 bynum | |
4138 | + * remove extraneous test in get_escape | |
4139 | + * | |
4140 | * Revision 2.10 2004/04/13 15:43:15 bynum | |
4141 | * add \r case to get rid of errors when readin MS-DOS/WIN prepared source | |
4142 | * | |
4143 | diff -ur bacisrc.old/pascomp/ytab.h bacisrc/pascomp/ytab.h | |
4144 | --- bacisrc.old/pascomp/ytab.h 2004-04-15 13:31:24.000000000 +0200 | |
4145 | +++ bacisrc/pascomp/ytab.h 2005-10-27 15:02:05.000000000 +0200 | |
4146 | @@ -1,65 +1,154 @@ | |
4147 | -#ifndef BISON_Y_TAB_H | |
4148 | -# define BISON_Y_TAB_H | |
4149 | +/* A Bison parser, made by GNU Bison 1.875. */ | |
4150 | ||
4151 | -# ifndef YYSTYPE | |
4152 | -# define YYSTYPE int | |
4153 | -# define YYSTYPE_IS_TRIVIAL 1 | |
4154 | -# endif | |
4155 | -# define UNSIGNED_INT 257 | |
4156 | -# define STRING 258 | |
4157 | -# define RAWSTRING 259 | |
4158 | -# define STRINGCONCAT 260 | |
4159 | -# define STRINGCOMPARE 261 | |
4160 | -# define STRINGCOPY 262 | |
4161 | -# define STRINGLENGTH 263 | |
4162 | -# define SSCANF 264 | |
4163 | -# define SPRINTF 265 | |
4164 | -# define IDENTIFIER 266 | |
4165 | -# define CHAR 267 | |
4166 | -# define INT 268 | |
4167 | -# define NE 269 | |
4168 | -# define LE 270 | |
4169 | -# define GE 271 | |
4170 | -# define BECOMES 272 | |
4171 | -# define DIV 273 | |
4172 | -# define MOD 274 | |
4173 | -# define OR 275 | |
4174 | -# define AND 276 | |
4175 | -# define NOT 277 | |
4176 | -# define DOTDOT 278 | |
4177 | -# define IF 279 | |
4178 | -# define THEN 280 | |
4179 | -# define ELSE 281 | |
4180 | -# define CASE 282 | |
4181 | -# define OF 283 | |
4182 | -# define REPEAT 284 | |
4183 | -# define UNTIL 285 | |
4184 | -# define WHILE 286 | |
4185 | -# define DO 287 | |
4186 | -# define FOR 288 | |
4187 | -# define TO 289 | |
4188 | -# define CBEGIN 290 | |
4189 | -# define SBEGIN 291 | |
4190 | -# define END 292 | |
4191 | -# define CEND 293 | |
4192 | -# define CONST 294 | |
4193 | -# define VAR 295 | |
4194 | -# define TYPE 296 | |
4195 | -# define ARRAY 297 | |
4196 | -# define FUNCTION 298 | |
4197 | -# define MONITOR 299 | |
4198 | -# define PROCEDURE 300 | |
4199 | -# define PROGRAM 301 | |
4200 | -# define INCLUDE 302 | |
4201 | -# define ATOMIC 303 | |
4202 | -# define FNSTRING 304 | |
4203 | -# define SEND 305 | |
4204 | -# define RECEIVE 306 | |
4205 | -# define BROADCAST 307 | |
4206 | -# define EXTERNAL 308 | |
4207 | -# define LOWER_THAN_ELSE 309 | |
4208 | +/* Skeleton parser for Yacc-like parsing with Bison, | |
4209 | + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. | |
4210 | ||
4211 | + This program is free software; you can redistribute it and/or modify | |
4212 | + it under the terms of the GNU General Public License as published by | |
4213 | + the Free Software Foundation; either version 2, or (at your option) | |
4214 | + any later version. | |
4215 | + | |
4216 | + This program is distributed in the hope that it will be useful, | |
4217 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
4218 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
4219 | + GNU General Public License for more details. | |
4220 | + | |
4221 | + You should have received a copy of the GNU General Public License | |
4222 | + along with this program; if not, write to the Free Software | |
4223 | + Foundation, Inc., 59 Temple Place - Suite 330, | |
4224 | + Boston, MA 02111-1307, USA. */ | |
4225 | + | |
4226 | +/* As a special exception, when this file is copied by Bison into a | |
4227 | + Bison output file, you may use that output file without restriction. | |
4228 | + This special exception was added by the Free Software Foundation | |
4229 | + in version 1.24 of Bison. */ | |
4230 | + | |
4231 | +/* Tokens. */ | |
4232 | +#ifndef YYTOKENTYPE | |
4233 | +# define YYTOKENTYPE | |
4234 | + /* Put the tokens into the symbol table, so that GDB and other debuggers | |
4235 | + know about them. */ | |
4236 | + enum yytokentype { | |
4237 | + UNSIGNED_INT = 258, | |
4238 | + STRING = 259, | |
4239 | + RAWSTRING = 260, | |
4240 | + STRINGCONCAT = 261, | |
4241 | + STRINGCOMPARE = 262, | |
4242 | + STRINGCOPY = 263, | |
4243 | + STRINGLENGTH = 264, | |
4244 | + SSCANF = 265, | |
4245 | + SPRINTF = 266, | |
4246 | + IDENTIFIER = 267, | |
4247 | + CHAR = 268, | |
4248 | + INT = 269, | |
4249 | + NE = 270, | |
4250 | + LE = 271, | |
4251 | + GE = 272, | |
4252 | + BECOMES = 273, | |
4253 | + DIV = 274, | |
4254 | + MOD = 275, | |
4255 | + OR = 276, | |
4256 | + AND = 277, | |
4257 | + NOT = 278, | |
4258 | + DOTDOT = 279, | |
4259 | + IF = 280, | |
4260 | + THEN = 281, | |
4261 | + ELSE = 282, | |
4262 | + CASE = 283, | |
4263 | + OF = 284, | |
4264 | + REPEAT = 285, | |
4265 | + UNTIL = 286, | |
4266 | + WHILE = 287, | |
4267 | + DO = 288, | |
4268 | + FOR = 289, | |
4269 | + TO = 290, | |
4270 | + CBEGIN = 291, | |
4271 | + SBEGIN = 292, | |
4272 | + END = 293, | |
4273 | + CEND = 294, | |
4274 | + CONST = 295, | |
4275 | + VAR = 296, | |
4276 | + TYPE = 297, | |
4277 | + ARRAY = 298, | |
4278 | + FUNCTION = 299, | |
4279 | + MONITOR = 300, | |
4280 | + PROCEDURE = 301, | |
4281 | + PROGRAM = 302, | |
4282 | + INCLUDE = 303, | |
4283 | + ATOMIC = 304, | |
4284 | + FNSTRING = 305, | |
4285 | + SEND = 306, | |
4286 | + RECEIVE = 307, | |
4287 | + BROADCAST = 308, | |
4288 | + EXTERNAL = 309, | |
4289 | + LOWER_THAN_ELSE = 310 | |
4290 | + }; | |
4291 | +#endif | |
4292 | +#define UNSIGNED_INT 258 | |
4293 | +#define STRING 259 | |
4294 | +#define RAWSTRING 260 | |
4295 | +#define STRINGCONCAT 261 | |
4296 | +#define STRINGCOMPARE 262 | |
4297 | +#define STRINGCOPY 263 | |
4298 | +#define STRINGLENGTH 264 | |
4299 | +#define SSCANF 265 | |
4300 | +#define SPRINTF 266 | |
4301 | +#define IDENTIFIER 267 | |
4302 | +#define CHAR 268 | |
4303 | +#define INT 269 | |
4304 | +#define NE 270 | |
4305 | +#define LE 271 | |
4306 | +#define GE 272 | |
4307 | +#define BECOMES 273 | |
4308 | +#define DIV 274 | |
4309 | +#define MOD 275 | |
4310 | +#define OR 276 | |
4311 | +#define AND 277 | |
4312 | +#define NOT 278 | |
4313 | +#define DOTDOT 279 | |
4314 | +#define IF 280 | |
4315 | +#define THEN 281 | |
4316 | +#define ELSE 282 | |
4317 | +#define CASE 283 | |
4318 | +#define OF 284 | |
4319 | +#define REPEAT 285 | |
4320 | +#define UNTIL 286 | |
4321 | +#define WHILE 287 | |
4322 | +#define DO 288 | |
4323 | +#define FOR 289 | |
4324 | +#define TO 290 | |
4325 | +#define CBEGIN 291 | |
4326 | +#define SBEGIN 292 | |
4327 | +#define END 293 | |
4328 | +#define CEND 294 | |
4329 | +#define CONST 295 | |
4330 | +#define VAR 296 | |
4331 | +#define TYPE 297 | |
4332 | +#define ARRAY 298 | |
4333 | +#define FUNCTION 299 | |
4334 | +#define MONITOR 300 | |
4335 | +#define PROCEDURE 301 | |
4336 | +#define PROGRAM 302 | |
4337 | +#define INCLUDE 303 | |
4338 | +#define ATOMIC 304 | |
4339 | +#define FNSTRING 305 | |
4340 | +#define SEND 306 | |
4341 | +#define RECEIVE 307 | |
4342 | +#define BROADCAST 308 | |
4343 | +#define EXTERNAL 309 | |
4344 | +#define LOWER_THAN_ELSE 310 | |
4345 | + | |
4346 | + | |
4347 | + | |
4348 | + | |
4349 | +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) | |
4350 | +typedef int YYSTYPE; | |
4351 | +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ | |
4352 | +# define YYSTYPE_IS_DECLARED 1 | |
4353 | +# define YYSTYPE_IS_TRIVIAL 1 | |
4354 | +#endif | |
4355 | ||
4356 | extern YYSTYPE yylval; | |
4357 | ||
4358 | -#endif /* not BISON_Y_TAB_H */ | |
4359 | + | |
4360 | + |