1 | /* A Bison parser, made by GNU Bison 1.875. */ |
---|
2 | |
---|
3 | /* Skeleton parser for Yacc-like parsing with Bison, |
---|
4 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc. |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | This program is distributed in the hope that it will be useful, |
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | GNU General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU General Public License |
---|
17 | along with this program; if not, write to the Free Software |
---|
18 | Foundation, Inc., 59 Temple Place - Suite 330, |
---|
19 | Boston, MA 02111-1307, USA. */ |
---|
20 | |
---|
21 | /* As a special exception, when this file is copied by Bison into a |
---|
22 | Bison output file, you may use that output file without restriction. |
---|
23 | This special exception was added by the Free Software Foundation |
---|
24 | in version 1.24 of Bison. */ |
---|
25 | |
---|
26 | /* Written by Richard Stallman by simplifying the original so called |
---|
27 | ``semantic'' parser. */ |
---|
28 | |
---|
29 | /* All symbols defined below should begin with yy or YY, to avoid |
---|
30 | infringing on user name space. This should be done even for local |
---|
31 | variables, as they might otherwise be expanded by user macros. |
---|
32 | There are some unavoidable exceptions within include files to |
---|
33 | define necessary library symbols; they are noted "INFRINGES ON |
---|
34 | USER NAME SPACE" below. */ |
---|
35 | |
---|
36 | /* Identify Bison output. */ |
---|
37 | #define YYBISON 1 |
---|
38 | |
---|
39 | /* Skeleton name. */ |
---|
40 | #define YYSKELETON_NAME "yacc.c" |
---|
41 | |
---|
42 | /* Pure parsers. */ |
---|
43 | #define YYPURE 0 |
---|
44 | |
---|
45 | /* Using locations. */ |
---|
46 | #define YYLSP_NEEDED 0 |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | /* Tokens. */ |
---|
51 | #ifndef YYTOKENTYPE |
---|
52 | # define YYTOKENTYPE |
---|
53 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
---|
54 | know about them. */ |
---|
55 | enum yytokentype { |
---|
56 | _BANG_t = 258, |
---|
57 | _BANG_EQUALS_t = 259, |
---|
58 | _AMPER_t = 260, |
---|
59 | _AMPERAMPER_t = 261, |
---|
60 | _LPAREN_t = 262, |
---|
61 | _RPAREN_t = 263, |
---|
62 | _PLUS_EQUALS_t = 264, |
---|
63 | _COLON_t = 265, |
---|
64 | _SEMIC_t = 266, |
---|
65 | _LANGLE_t = 267, |
---|
66 | _LANGLE_EQUALS_t = 268, |
---|
67 | _EQUALS_t = 269, |
---|
68 | _RANGLE_t = 270, |
---|
69 | _RANGLE_EQUALS_t = 271, |
---|
70 | _QUESTION_EQUALS_t = 272, |
---|
71 | _LBRACKET_t = 273, |
---|
72 | _RBRACKET_t = 274, |
---|
73 | ACTIONS_t = 275, |
---|
74 | BIND_t = 276, |
---|
75 | CASE_t = 277, |
---|
76 | CLASS_t = 278, |
---|
77 | DEFAULT_t = 279, |
---|
78 | ELSE_t = 280, |
---|
79 | EXISTING_t = 281, |
---|
80 | FOR_t = 282, |
---|
81 | IF_t = 283, |
---|
82 | IGNORE_t = 284, |
---|
83 | IN_t = 285, |
---|
84 | INCLUDE_t = 286, |
---|
85 | LOCAL_t = 287, |
---|
86 | MODULE_t = 288, |
---|
87 | ON_t = 289, |
---|
88 | PIECEMEAL_t = 290, |
---|
89 | QUIETLY_t = 291, |
---|
90 | RETURN_t = 292, |
---|
91 | RULE_t = 293, |
---|
92 | SWITCH_t = 294, |
---|
93 | TOGETHER_t = 295, |
---|
94 | UPDATED_t = 296, |
---|
95 | WHILE_t = 297, |
---|
96 | _LBRACE_t = 298, |
---|
97 | _BAR_t = 299, |
---|
98 | _BARBAR_t = 300, |
---|
99 | _RBRACE_t = 301, |
---|
100 | ARG = 302, |
---|
101 | STRING = 303 |
---|
102 | }; |
---|
103 | #endif |
---|
104 | #define _BANG_t 258 |
---|
105 | #define _BANG_EQUALS_t 259 |
---|
106 | #define _AMPER_t 260 |
---|
107 | #define _AMPERAMPER_t 261 |
---|
108 | #define _LPAREN_t 262 |
---|
109 | #define _RPAREN_t 263 |
---|
110 | #define _PLUS_EQUALS_t 264 |
---|
111 | #define _COLON_t 265 |
---|
112 | #define _SEMIC_t 266 |
---|
113 | #define _LANGLE_t 267 |
---|
114 | #define _LANGLE_EQUALS_t 268 |
---|
115 | #define _EQUALS_t 269 |
---|
116 | #define _RANGLE_t 270 |
---|
117 | #define _RANGLE_EQUALS_t 271 |
---|
118 | #define _QUESTION_EQUALS_t 272 |
---|
119 | #define _LBRACKET_t 273 |
---|
120 | #define _RBRACKET_t 274 |
---|
121 | #define ACTIONS_t 275 |
---|
122 | #define BIND_t 276 |
---|
123 | #define CASE_t 277 |
---|
124 | #define CLASS_t 278 |
---|
125 | #define DEFAULT_t 279 |
---|
126 | #define ELSE_t 280 |
---|
127 | #define EXISTING_t 281 |
---|
128 | #define FOR_t 282 |
---|
129 | #define IF_t 283 |
---|
130 | #define IGNORE_t 284 |
---|
131 | #define IN_t 285 |
---|
132 | #define INCLUDE_t 286 |
---|
133 | #define LOCAL_t 287 |
---|
134 | #define MODULE_t 288 |
---|
135 | #define ON_t 289 |
---|
136 | #define PIECEMEAL_t 290 |
---|
137 | #define QUIETLY_t 291 |
---|
138 | #define RETURN_t 292 |
---|
139 | #define RULE_t 293 |
---|
140 | #define SWITCH_t 294 |
---|
141 | #define TOGETHER_t 295 |
---|
142 | #define UPDATED_t 296 |
---|
143 | #define WHILE_t 297 |
---|
144 | #define _LBRACE_t 298 |
---|
145 | #define _BAR_t 299 |
---|
146 | #define _BARBAR_t 300 |
---|
147 | #define _RBRACE_t 301 |
---|
148 | #define ARG 302 |
---|
149 | #define STRING 303 |
---|
150 | |
---|
151 | |
---|
152 | |
---|
153 | |
---|
154 | /* Copy the first part of user declarations. */ |
---|
155 | #line 96 "jamgram.y" |
---|
156 | |
---|
157 | #include "jam.h" |
---|
158 | |
---|
159 | #include "lists.h" |
---|
160 | #include "parse.h" |
---|
161 | #include "scan.h" |
---|
162 | #include "compile.h" |
---|
163 | #include "newstr.h" |
---|
164 | #include "rules.h" |
---|
165 | |
---|
166 | # define YYMAXDEPTH 10000 /* for OSF and other less endowed yaccs */ |
---|
167 | |
---|
168 | # define F0 (LIST *(*)(PARSE *, FRAME *))0 |
---|
169 | # define P0 (PARSE *)0 |
---|
170 | # define S0 (char *)0 |
---|
171 | |
---|
172 | # define pappend( l,r ) parse_make( compile_append,l,r,P0,S0,S0,0 ) |
---|
173 | # define peval( c,l,r ) parse_make( compile_eval,l,r,P0,S0,S0,c ) |
---|
174 | # define pfor( s,l,r,x ) parse_make( compile_foreach,l,r,P0,s,S0,x ) |
---|
175 | # define pif( l,r,t ) parse_make( compile_if,l,r,t,S0,S0,0 ) |
---|
176 | # define pincl( l ) parse_make( compile_include,l,P0,P0,S0,S0,0 ) |
---|
177 | # define plist( s ) parse_make( compile_list,P0,P0,P0,s,S0,0 ) |
---|
178 | # define plocal( l,r,t ) parse_make( compile_local,l,r,t,S0,S0,0 ) |
---|
179 | # define pmodule( l,r ) parse_make( compile_module,l,r,P0,S0,S0,0 ) |
---|
180 | # define pclass( l,r ) parse_make( compile_class,l,r,P0,S0,S0,0 ) |
---|
181 | # define pnull() parse_make( compile_null,P0,P0,P0,S0,S0,0 ) |
---|
182 | # define pon( l,r ) parse_make( compile_on,l,r,P0,S0,S0,0 ) |
---|
183 | # define prule( s,p ) parse_make( compile_rule,p,P0,P0,s,S0,0 ) |
---|
184 | # define prules( l,r ) parse_make( compile_rules,l,r,P0,S0,S0,0 ) |
---|
185 | # define pset( l,r,a ) parse_make( compile_set,l,r,P0,S0,S0,a ) |
---|
186 | # define pset1( l,r,t,a ) parse_make( compile_settings,l,r,t,S0,S0,a ) |
---|
187 | # define psetc( s,p,a,l ) parse_make( compile_setcomp,p,a,P0,s,S0,l ) |
---|
188 | # define psete( s,l,s1,f ) parse_make( compile_setexec,l,P0,P0,s,s1,f ) |
---|
189 | # define pswitch( l,r ) parse_make( compile_switch,l,r,P0,S0,S0,0 ) |
---|
190 | # define pwhile( l,r ) parse_make( compile_while,l,r,P0,S0,S0,0 ) |
---|
191 | |
---|
192 | # define pnode( l,r ) parse_make( F0,l,r,P0,S0,S0,0 ) |
---|
193 | # define psnode( s,l ) parse_make( F0,l,P0,P0,s,S0,0 ) |
---|
194 | |
---|
195 | |
---|
196 | |
---|
197 | /* Enabling traces. */ |
---|
198 | #ifndef YYDEBUG |
---|
199 | # define YYDEBUG 0 |
---|
200 | #endif |
---|
201 | |
---|
202 | /* Enabling verbose error messages. */ |
---|
203 | #ifdef YYERROR_VERBOSE |
---|
204 | # undef YYERROR_VERBOSE |
---|
205 | # define YYERROR_VERBOSE 1 |
---|
206 | #else |
---|
207 | # define YYERROR_VERBOSE 0 |
---|
208 | #endif |
---|
209 | |
---|
210 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
---|
211 | typedef int YYSTYPE; |
---|
212 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
---|
213 | # define YYSTYPE_IS_DECLARED 1 |
---|
214 | # define YYSTYPE_IS_TRIVIAL 1 |
---|
215 | #endif |
---|
216 | |
---|
217 | |
---|
218 | |
---|
219 | /* Copy the second part of user declarations. */ |
---|
220 | |
---|
221 | |
---|
222 | /* Line 214 of yacc.c. */ |
---|
223 | #line 223 "y.tab.c" |
---|
224 | |
---|
225 | #if ! defined (yyoverflow) || YYERROR_VERBOSE |
---|
226 | |
---|
227 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
---|
228 | |
---|
229 | # if YYSTACK_USE_ALLOCA |
---|
230 | # define YYSTACK_ALLOC alloca |
---|
231 | # else |
---|
232 | # ifndef YYSTACK_USE_ALLOCA |
---|
233 | # if defined (alloca) || defined (_ALLOCA_H) |
---|
234 | # define YYSTACK_ALLOC alloca |
---|
235 | # else |
---|
236 | # ifdef __GNUC__ |
---|
237 | # define YYSTACK_ALLOC __builtin_alloca |
---|
238 | # endif |
---|
239 | # endif |
---|
240 | # endif |
---|
241 | # endif |
---|
242 | |
---|
243 | # ifdef YYSTACK_ALLOC |
---|
244 | /* Pacify GCC's `empty if-body' warning. */ |
---|
245 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
---|
246 | # else |
---|
247 | # if defined (__STDC__) || defined (__cplusplus) |
---|
248 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
---|
249 | # define YYSIZE_T size_t |
---|
250 | # endif |
---|
251 | # define YYSTACK_ALLOC malloc |
---|
252 | # define YYSTACK_FREE free |
---|
253 | # endif |
---|
254 | #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
---|
255 | |
---|
256 | |
---|
257 | #if (! defined (yyoverflow) \ |
---|
258 | && (! defined (__cplusplus) \ |
---|
259 | || (YYSTYPE_IS_TRIVIAL))) |
---|
260 | |
---|
261 | /* A type that is properly aligned for any stack member. */ |
---|
262 | union yyalloc |
---|
263 | { |
---|
264 | short yyss; |
---|
265 | YYSTYPE yyvs; |
---|
266 | }; |
---|
267 | |
---|
268 | /* The size of the maximum gap between one aligned stack and the next. */ |
---|
269 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
---|
270 | |
---|
271 | /* The size of an array large to enough to hold all stacks, each with |
---|
272 | N elements. */ |
---|
273 | # define YYSTACK_BYTES(N) \ |
---|
274 | ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ |
---|
275 | + YYSTACK_GAP_MAXIMUM) |
---|
276 | |
---|
277 | /* Copy COUNT objects from FROM to TO. The source and destination do |
---|
278 | not overlap. */ |
---|
279 | # ifndef YYCOPY |
---|
280 | # if 1 < __GNUC__ |
---|
281 | # define YYCOPY(To, From, Count) \ |
---|
282 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
---|
283 | # else |
---|
284 | # define YYCOPY(To, From, Count) \ |
---|
285 | do \ |
---|
286 | { \ |
---|
287 | register YYSIZE_T yyi; \ |
---|
288 | for (yyi = 0; yyi < (Count); yyi++) \ |
---|
289 | (To)[yyi] = (From)[yyi]; \ |
---|
290 | } \ |
---|
291 | while (0) |
---|
292 | # endif |
---|
293 | # endif |
---|
294 | |
---|
295 | /* Relocate STACK from its old location to the new one. The |
---|
296 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
---|
297 | elements in the stack, and YYPTR gives the new location of the |
---|
298 | stack. Advance YYPTR to a properly aligned location for the next |
---|
299 | stack. */ |
---|
300 | # define YYSTACK_RELOCATE(Stack) \ |
---|
301 | do \ |
---|
302 | { \ |
---|
303 | YYSIZE_T yynewbytes; \ |
---|
304 | YYCOPY (&yyptr->Stack, Stack, yysize); \ |
---|
305 | Stack = &yyptr->Stack; \ |
---|
306 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
---|
307 | yyptr += yynewbytes / sizeof (*yyptr); \ |
---|
308 | } \ |
---|
309 | while (0) |
---|
310 | |
---|
311 | #endif |
---|
312 | |
---|
313 | #if defined (__STDC__) || defined (__cplusplus) |
---|
314 | typedef signed char yysigned_char; |
---|
315 | #else |
---|
316 | typedef short yysigned_char; |
---|
317 | #endif |
---|
318 | |
---|
319 | /* YYFINAL -- State number of the termination state. */ |
---|
320 | #define YYFINAL 43 |
---|
321 | /* YYLAST -- Last index in YYTABLE. */ |
---|
322 | #define YYLAST 261 |
---|
323 | |
---|
324 | /* YYNTOKENS -- Number of terminals. */ |
---|
325 | #define YYNTOKENS 49 |
---|
326 | /* YYNNTS -- Number of nonterminals. */ |
---|
327 | #define YYNNTS 24 |
---|
328 | /* YYNRULES -- Number of rules. */ |
---|
329 | #define YYNRULES 75 |
---|
330 | /* YYNRULES -- Number of states. */ |
---|
331 | #define YYNSTATES 159 |
---|
332 | |
---|
333 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
---|
334 | #define YYUNDEFTOK 2 |
---|
335 | #define YYMAXUTOK 303 |
---|
336 | |
---|
337 | #define YYTRANSLATE(YYX) \ |
---|
338 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
---|
339 | |
---|
340 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
---|
341 | static const unsigned char yytranslate[] = |
---|
342 | { |
---|
343 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
344 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
345 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
346 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
347 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
348 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
349 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
350 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
351 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
352 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
353 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
354 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
355 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
356 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
357 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
358 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
359 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
360 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
361 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
362 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
363 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
364 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
365 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
366 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
367 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
368 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
---|
369 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
---|
370 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
---|
371 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
---|
372 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
---|
373 | 45, 46, 47, 48 |
---|
374 | }; |
---|
375 | |
---|
376 | #if YYDEBUG |
---|
377 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
---|
378 | YYRHS. */ |
---|
379 | static const unsigned char yyprhs[] = |
---|
380 | { |
---|
381 | 0, 0, 3, 4, 6, 8, 10, 12, 15, 21, |
---|
382 | 22, 25, 27, 31, 32, 34, 35, 39, 43, 47, |
---|
383 | 52, 59, 63, 72, 78, 84, 90, 96, 102, 110, |
---|
384 | 116, 120, 121, 122, 132, 134, 136, 138, 141, 143, |
---|
385 | 147, 151, 155, 159, 163, 167, 171, 175, 179, 183, |
---|
386 | 187, 190, 194, 195, 198, 203, 205, 209, 211, 212, |
---|
387 | 215, 217, 218, 223, 226, 231, 236, 237, 240, 242, |
---|
388 | 244, 246, 248, 250, 252, 253 |
---|
389 | }; |
---|
390 | |
---|
391 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
---|
392 | static const yysigned_char yyrhs[] = |
---|
393 | { |
---|
394 | 50, 0, -1, -1, 52, -1, 53, -1, 52, -1, |
---|
395 | 57, -1, 57, 52, -1, 32, 65, 54, 11, 51, |
---|
396 | -1, -1, 14, 65, -1, 53, -1, 7, 64, 8, |
---|
397 | -1, -1, 32, -1, -1, 43, 51, 46, -1, 31, |
---|
398 | 65, 11, -1, 47, 64, 11, -1, 67, 60, 65, |
---|
399 | 11, -1, 67, 34, 65, 60, 65, 11, -1, 37, |
---|
400 | 65, 11, -1, 27, 56, 47, 30, 65, 43, 51, |
---|
401 | 46, -1, 39, 65, 43, 62, 46, -1, 28, 61, |
---|
402 | 43, 51, 46, -1, 33, 65, 43, 51, 46, -1, |
---|
403 | 23, 64, 43, 51, 46, -1, 42, 61, 43, 51, |
---|
404 | 46, -1, 28, 61, 43, 51, 46, 25, 57, -1, |
---|
405 | 56, 38, 47, 55, 57, -1, 34, 67, 57, -1, |
---|
406 | -1, -1, 20, 70, 47, 72, 43, 58, 48, 59, |
---|
407 | 46, -1, 14, -1, 9, -1, 17, -1, 24, 14, |
---|
408 | -1, 67, -1, 61, 14, 61, -1, 61, 4, 61, |
---|
409 | -1, 61, 12, 61, -1, 61, 13, 61, -1, 61, |
---|
410 | 15, 61, -1, 61, 16, 61, -1, 61, 5, 61, |
---|
411 | -1, 61, 6, 61, -1, 61, 44, 61, -1, 61, |
---|
412 | 45, 61, -1, 67, 30, 65, -1, 3, 61, -1, |
---|
413 | 7, 61, 8, -1, -1, 63, 62, -1, 22, 47, |
---|
414 | 10, 51, -1, 65, -1, 65, 10, 64, -1, 66, |
---|
415 | -1, -1, 66, 67, -1, 47, -1, -1, 18, 68, |
---|
416 | 69, 19, -1, 67, 64, -1, 34, 67, 67, 64, |
---|
417 | -1, 34, 67, 37, 65, -1, -1, 70, 71, -1, |
---|
418 | 41, -1, 40, -1, 29, -1, 36, -1, 35, -1, |
---|
419 | 26, -1, -1, 21, 65, -1 |
---|
420 | }; |
---|
421 | |
---|
422 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
---|
423 | static const unsigned short yyrline[] = |
---|
424 | { |
---|
425 | 0, 139, 139, 141, 152, 154, 158, 160, 162, 167, |
---|
426 | 170, 172, 176, 179, 182, 185, 188, 190, 192, 194, |
---|
427 | 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, |
---|
428 | 216, 219, 221, 218, 230, 232, 234, 236, 243, 245, |
---|
429 | 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, |
---|
430 | 267, 269, 281, 282, 286, 295, 297, 307, 312, 313, |
---|
431 | 317, 319, 319, 328, 330, 332, 343, 344, 348, 350, |
---|
432 | 352, 354, 356, 358, 368, 369 |
---|
433 | }; |
---|
434 | #endif |
---|
435 | |
---|
436 | #if YYDEBUG || YYERROR_VERBOSE |
---|
437 | /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
---|
438 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
---|
439 | static const char *const yytname[] = |
---|
440 | { |
---|
441 | "$end", "error", "$undefined", "_BANG_t", "_BANG_EQUALS_t", "_AMPER_t", |
---|
442 | "_AMPERAMPER_t", "_LPAREN_t", "_RPAREN_t", "_PLUS_EQUALS_t", "_COLON_t", |
---|
443 | "_SEMIC_t", "_LANGLE_t", "_LANGLE_EQUALS_t", "_EQUALS_t", "_RANGLE_t", |
---|
444 | "_RANGLE_EQUALS_t", "_QUESTION_EQUALS_t", "_LBRACKET_t", "_RBRACKET_t", |
---|
445 | "ACTIONS_t", "BIND_t", "CASE_t", "CLASS_t", "DEFAULT_t", "ELSE_t", |
---|
446 | "EXISTING_t", "FOR_t", "IF_t", "IGNORE_t", "IN_t", "INCLUDE_t", |
---|
447 | "LOCAL_t", "MODULE_t", "ON_t", "PIECEMEAL_t", "QUIETLY_t", "RETURN_t", |
---|
448 | "RULE_t", "SWITCH_t", "TOGETHER_t", "UPDATED_t", "WHILE_t", "_LBRACE_t", |
---|
449 | "_BAR_t", "_BARBAR_t", "_RBRACE_t", "ARG", "STRING", "$accept", "run", |
---|
450 | "block", "rules", "null", "assign_list_opt", "arglist_opt", "local_opt", |
---|
451 | "rule", "@1", "@2", "assign", "expr", "cases", "case", "lol", "list", |
---|
452 | "listp", "arg", "@3", "func", "eflags", "eflag", "bindlist", 0 |
---|
453 | }; |
---|
454 | #endif |
---|
455 | |
---|
456 | # ifdef YYPRINT |
---|
457 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
---|
458 | token YYLEX-NUM. */ |
---|
459 | static const unsigned short yytoknum[] = |
---|
460 | { |
---|
461 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
---|
462 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
---|
463 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
---|
464 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
---|
465 | 295, 296, 297, 298, 299, 300, 301, 302, 303 |
---|
466 | }; |
---|
467 | # endif |
---|
468 | |
---|
469 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
---|
470 | static const unsigned char yyr1[] = |
---|
471 | { |
---|
472 | 0, 49, 50, 50, 51, 51, 52, 52, 52, 53, |
---|
473 | 54, 54, 55, 55, 56, 56, 57, 57, 57, 57, |
---|
474 | 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, |
---|
475 | 57, 58, 59, 57, 60, 60, 60, 60, 61, 61, |
---|
476 | 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, |
---|
477 | 61, 61, 62, 62, 63, 64, 64, 65, 66, 66, |
---|
478 | 67, 68, 67, 69, 69, 69, 70, 70, 71, 71, |
---|
479 | 71, 71, 71, 71, 72, 72 |
---|
480 | }; |
---|
481 | |
---|
482 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
---|
483 | static const unsigned char yyr2[] = |
---|
484 | { |
---|
485 | 0, 2, 0, 1, 1, 1, 1, 2, 5, 0, |
---|
486 | 2, 1, 3, 0, 1, 0, 3, 3, 3, 4, |
---|
487 | 6, 3, 8, 5, 5, 5, 5, 5, 7, 5, |
---|
488 | 3, 0, 0, 9, 1, 1, 1, 2, 1, 3, |
---|
489 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
---|
490 | 2, 3, 0, 2, 4, 1, 3, 1, 0, 2, |
---|
491 | 1, 0, 4, 2, 4, 4, 0, 2, 1, 1, |
---|
492 | 1, 1, 1, 1, 0, 2 |
---|
493 | }; |
---|
494 | |
---|
495 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
---|
496 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
---|
497 | means the default is an error. */ |
---|
498 | static const unsigned char yydefact[] = |
---|
499 | { |
---|
500 | 2, 61, 66, 58, 15, 0, 58, 58, 58, 0, |
---|
501 | 58, 58, 0, 9, 60, 0, 3, 0, 6, 0, |
---|
502 | 0, 0, 0, 55, 57, 14, 0, 0, 0, 60, |
---|
503 | 0, 38, 0, 9, 0, 15, 0, 0, 0, 0, |
---|
504 | 5, 4, 0, 1, 0, 7, 35, 34, 36, 0, |
---|
505 | 58, 58, 0, 58, 0, 73, 70, 72, 71, 69, |
---|
506 | 68, 74, 67, 9, 58, 59, 0, 50, 0, 0, |
---|
507 | 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, |
---|
508 | 58, 17, 58, 11, 0, 9, 30, 21, 52, 9, |
---|
509 | 16, 18, 13, 37, 0, 0, 0, 63, 62, 58, |
---|
510 | 0, 0, 56, 58, 51, 40, 45, 46, 41, 42, |
---|
511 | 39, 43, 44, 0, 47, 48, 49, 10, 9, 0, |
---|
512 | 0, 0, 52, 0, 58, 15, 58, 19, 58, 58, |
---|
513 | 75, 31, 26, 0, 24, 8, 25, 0, 23, 53, |
---|
514 | 27, 0, 29, 0, 65, 64, 0, 9, 15, 9, |
---|
515 | 12, 20, 32, 0, 28, 54, 0, 22, 33 |
---|
516 | }; |
---|
517 | |
---|
518 | /* YYDEFGOTO[NTERM-NUM]. */ |
---|
519 | static const short yydefgoto[] = |
---|
520 | { |
---|
521 | -1, 15, 39, 40, 41, 84, 125, 17, 18, 146, |
---|
522 | 156, 51, 30, 121, 122, 22, 23, 24, 31, 20, |
---|
523 | 54, 21, 62, 100 |
---|
524 | }; |
---|
525 | |
---|
526 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
---|
527 | STATE-NUM. */ |
---|
528 | #define YYPACT_NINF -48 |
---|
529 | static const short yypact[] = |
---|
530 | { |
---|
531 | 179, -48, -48, -48, -15, 7, -48, -16, -48, 3, |
---|
532 | -48, -48, 7, 179, 1, 27, -48, -9, 179, 19, |
---|
533 | -3, 33, -11, 24, 3, -48, -10, 7, 7, -48, |
---|
534 | 138, 9, 30, 35, 13, 205, 53, 22, 151, 20, |
---|
535 | -48, -48, 56, -48, 23, -48, -48, -48, -48, 61, |
---|
536 | -48, -48, 3, -48, 62, -48, -48, -48, -48, -48, |
---|
537 | -48, 58, -48, 179, -48, -48, 52, -48, 164, 7, |
---|
538 | 7, 7, 7, 7, 7, 7, 7, 179, 7, 7, |
---|
539 | -48, -48, -48, -48, 72, 179, -48, -48, 68, 179, |
---|
540 | -48, -48, 85, -48, 77, 73, 8, -48, -48, -48, |
---|
541 | 50, 57, -48, -48, -48, 45, 93, 93, -48, -48, |
---|
542 | 45, -48, -48, 64, 245, 245, -48, -48, 179, 66, |
---|
543 | 67, 69, 68, 71, -48, 205, -48, -48, -48, -48, |
---|
544 | -48, -48, -48, 70, 79, -48, -48, 109, -48, -48, |
---|
545 | -48, 112, -48, 115, -48, -48, 75, 179, 205, 179, |
---|
546 | -48, -48, -48, 81, -48, -48, 82, -48, -48 |
---|
547 | }; |
---|
548 | |
---|
549 | /* YYPGOTO[NTERM-NUM]. */ |
---|
550 | static const short yypgoto[] = |
---|
551 | { |
---|
552 | -48, -48, -47, 5, 104, -48, -48, 136, -27, -48, |
---|
553 | -48, 47, 60, 36, -48, -13, -4, -48, 0, -48, |
---|
554 | -48, -48, -48, -48 |
---|
555 | }; |
---|
556 | |
---|
557 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
---|
558 | positive, shift that token. If negative, reduce the rule which |
---|
559 | number is the opposite. If zero, do what YYDEFACT says. |
---|
560 | If YYTABLE_NINF, syntax error. */ |
---|
561 | #define YYTABLE_NINF -59 |
---|
562 | static const short yytable[] = |
---|
563 | { |
---|
564 | 19, 42, 32, 33, 34, 16, 36, 37, 86, 35, |
---|
565 | 27, -58, -58, 19, 28, 1, 101, 25, 19, -58, |
---|
566 | 53, 1, -14, 45, 65, 1, 1, 43, 46, 44, |
---|
567 | 113, 52, 63, 47, 64, 19, 48, 66, 119, 80, |
---|
568 | 97, 81, 123, 49, 29, 128, 94, 95, -58, 82, |
---|
569 | 29, 102, 96, 50, 29, 29, 85, 72, 73, 55, |
---|
570 | 75, 76, 56, 19, 87, 88, 90, 91, 57, 58, |
---|
571 | 92, 135, 38, 59, 60, 93, 116, 19, 117, 99, |
---|
572 | 61, 98, 103, 118, 127, 19, 46, 67, 68, 19, |
---|
573 | 120, 47, 124, 131, 48, 130, 129, 69, 142, 133, |
---|
574 | 153, 49, 155, 132, 148, 72, 73, 74, 75, 76, |
---|
575 | 134, 141, 136, 147, 137, 138, 145, 140, 19, 149, |
---|
576 | 150, 154, 143, 152, 144, 19, 151, 157, 158, 105, |
---|
577 | 106, 107, 108, 109, 110, 111, 112, 83, 114, 115, |
---|
578 | 26, 126, 69, 70, 71, 0, 0, 19, 19, 19, |
---|
579 | 72, 73, 74, 75, 76, 69, 70, 71, 139, 0, |
---|
580 | 0, 0, 0, 72, 73, 74, 75, 76, 69, 70, |
---|
581 | 71, 0, 104, 0, 0, 0, 72, 73, 74, 75, |
---|
582 | 76, 77, 78, 79, 0, 0, 0, 0, 0, 0, |
---|
583 | 0, 0, 0, 0, 89, 78, 79, 1, 0, 2, |
---|
584 | 0, 0, 3, 0, 0, 0, 4, 5, 78, 79, |
---|
585 | 6, 7, 8, 9, 0, 0, 10, -15, 11, 0, |
---|
586 | 0, 12, 13, 1, 0, 2, 14, 0, 3, 0, |
---|
587 | 0, 0, 4, 5, 0, 0, 6, 25, 8, 9, |
---|
588 | 0, 0, 10, 0, 11, 0, 0, 12, 13, 69, |
---|
589 | 70, 71, 14, 0, 0, 0, 0, 72, 73, 74, |
---|
590 | 75, 76 |
---|
591 | }; |
---|
592 | |
---|
593 | static const short yycheck[] = |
---|
594 | { |
---|
595 | 0, 14, 6, 7, 8, 0, 10, 11, 35, 9, |
---|
596 | 3, 10, 11, 13, 7, 18, 63, 32, 18, 18, |
---|
597 | 20, 18, 38, 18, 24, 18, 18, 0, 9, 38, |
---|
598 | 77, 34, 43, 14, 10, 35, 17, 47, 85, 30, |
---|
599 | 53, 11, 89, 24, 47, 37, 50, 51, 47, 14, |
---|
600 | 47, 64, 52, 34, 47, 47, 43, 12, 13, 26, |
---|
601 | 15, 16, 29, 63, 11, 43, 46, 11, 35, 36, |
---|
602 | 47, 118, 12, 40, 41, 14, 80, 77, 82, 21, |
---|
603 | 47, 19, 30, 11, 11, 85, 9, 27, 28, 89, |
---|
604 | 22, 14, 7, 43, 17, 99, 96, 4, 125, 103, |
---|
605 | 147, 24, 149, 46, 25, 12, 13, 14, 15, 16, |
---|
606 | 46, 124, 46, 43, 47, 46, 129, 46, 118, 10, |
---|
607 | 8, 148, 126, 48, 128, 125, 11, 46, 46, 69, |
---|
608 | 70, 71, 72, 73, 74, 75, 76, 33, 78, 79, |
---|
609 | 4, 94, 4, 5, 6, -1, -1, 147, 148, 149, |
---|
610 | 12, 13, 14, 15, 16, 4, 5, 6, 122, -1, |
---|
611 | -1, -1, -1, 12, 13, 14, 15, 16, 4, 5, |
---|
612 | 6, -1, 8, -1, -1, -1, 12, 13, 14, 15, |
---|
613 | 16, 43, 44, 45, -1, -1, -1, -1, -1, -1, |
---|
614 | -1, -1, -1, -1, 43, 44, 45, 18, -1, 20, |
---|
615 | -1, -1, 23, -1, -1, -1, 27, 28, 44, 45, |
---|
616 | 31, 32, 33, 34, -1, -1, 37, 38, 39, -1, |
---|
617 | -1, 42, 43, 18, -1, 20, 47, -1, 23, -1, |
---|
618 | -1, -1, 27, 28, -1, -1, 31, 32, 33, 34, |
---|
619 | -1, -1, 37, -1, 39, -1, -1, 42, 43, 4, |
---|
620 | 5, 6, 47, -1, -1, -1, -1, 12, 13, 14, |
---|
621 | 15, 16 |
---|
622 | }; |
---|
623 | |
---|
624 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
---|
625 | symbol of state STATE-NUM. */ |
---|
626 | static const unsigned char yystos[] = |
---|
627 | { |
---|
628 | 0, 18, 20, 23, 27, 28, 31, 32, 33, 34, |
---|
629 | 37, 39, 42, 43, 47, 50, 52, 56, 57, 67, |
---|
630 | 68, 70, 64, 65, 66, 32, 56, 3, 7, 47, |
---|
631 | 61, 67, 65, 65, 65, 67, 65, 65, 61, 51, |
---|
632 | 52, 53, 64, 0, 38, 52, 9, 14, 17, 24, |
---|
633 | 34, 60, 34, 67, 69, 26, 29, 35, 36, 40, |
---|
634 | 41, 47, 71, 43, 10, 67, 47, 61, 61, 4, |
---|
635 | 5, 6, 12, 13, 14, 15, 16, 43, 44, 45, |
---|
636 | 30, 11, 14, 53, 54, 43, 57, 11, 43, 43, |
---|
637 | 46, 11, 47, 14, 65, 65, 67, 64, 19, 21, |
---|
638 | 72, 51, 64, 30, 8, 61, 61, 61, 61, 61, |
---|
639 | 61, 61, 61, 51, 61, 61, 65, 65, 11, 51, |
---|
640 | 22, 62, 63, 51, 7, 55, 60, 11, 37, 67, |
---|
641 | 65, 43, 46, 65, 46, 51, 46, 47, 46, 62, |
---|
642 | 46, 64, 57, 65, 65, 64, 58, 43, 25, 10, |
---|
643 | 8, 11, 48, 51, 57, 51, 59, 46, 46 |
---|
644 | }; |
---|
645 | |
---|
646 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) |
---|
647 | # define YYSIZE_T __SIZE_TYPE__ |
---|
648 | #endif |
---|
649 | #if ! defined (YYSIZE_T) && defined (size_t) |
---|
650 | # define YYSIZE_T size_t |
---|
651 | #endif |
---|
652 | #if ! defined (YYSIZE_T) |
---|
653 | # if defined (__STDC__) || defined (__cplusplus) |
---|
654 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
---|
655 | # define YYSIZE_T size_t |
---|
656 | # endif |
---|
657 | #endif |
---|
658 | #if ! defined (YYSIZE_T) |
---|
659 | # define YYSIZE_T unsigned int |
---|
660 | #endif |
---|
661 | |
---|
662 | #define yyerrok (yyerrstatus = 0) |
---|
663 | #define yyclearin (yychar = YYEMPTY) |
---|
664 | #define YYEMPTY (-2) |
---|
665 | #define YYEOF 0 |
---|
666 | |
---|
667 | #define YYACCEPT goto yyacceptlab |
---|
668 | #define YYABORT goto yyabortlab |
---|
669 | #define YYERROR goto yyerrlab1 |
---|
670 | |
---|
671 | /* Like YYERROR except do call yyerror. This remains here temporarily |
---|
672 | to ease the transition to the new meaning of YYERROR, for GCC. |
---|
673 | Once GCC version 2 has supplanted version 1, this can go. */ |
---|
674 | |
---|
675 | #define YYFAIL goto yyerrlab |
---|
676 | |
---|
677 | #define YYRECOVERING() (!!yyerrstatus) |
---|
678 | |
---|
679 | #define YYBACKUP(Token, Value) \ |
---|
680 | do \ |
---|
681 | if (yychar == YYEMPTY && yylen == 1) \ |
---|
682 | { \ |
---|
683 | yychar = (Token); \ |
---|
684 | yylval = (Value); \ |
---|
685 | yytoken = YYTRANSLATE (yychar); \ |
---|
686 | YYPOPSTACK; \ |
---|
687 | goto yybackup; \ |
---|
688 | } \ |
---|
689 | else \ |
---|
690 | { \ |
---|
691 | yyerror ("syntax error: cannot back up");\ |
---|
692 | YYERROR; \ |
---|
693 | } \ |
---|
694 | while (0) |
---|
695 | |
---|
696 | #define YYTERROR 1 |
---|
697 | #define YYERRCODE 256 |
---|
698 | |
---|
699 | /* YYLLOC_DEFAULT -- Compute the default location (before the actions |
---|
700 | are run). */ |
---|
701 | |
---|
702 | #ifndef YYLLOC_DEFAULT |
---|
703 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
---|
704 | Current.first_line = Rhs[1].first_line; \ |
---|
705 | Current.first_column = Rhs[1].first_column; \ |
---|
706 | Current.last_line = Rhs[N].last_line; \ |
---|
707 | Current.last_column = Rhs[N].last_column; |
---|
708 | #endif |
---|
709 | |
---|
710 | /* YYLEX -- calling `yylex' with the right arguments. */ |
---|
711 | |
---|
712 | #ifdef YYLEX_PARAM |
---|
713 | # define YYLEX yylex (YYLEX_PARAM) |
---|
714 | #else |
---|
715 | # define YYLEX yylex () |
---|
716 | #endif |
---|
717 | |
---|
718 | /* Enable debugging if requested. */ |
---|
719 | #if YYDEBUG |
---|
720 | |
---|
721 | # ifndef YYFPRINTF |
---|
722 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
---|
723 | # define YYFPRINTF fprintf |
---|
724 | # endif |
---|
725 | |
---|
726 | # define YYDPRINTF(Args) \ |
---|
727 | do { \ |
---|
728 | if (yydebug) \ |
---|
729 | YYFPRINTF Args; \ |
---|
730 | } while (0) |
---|
731 | |
---|
732 | # define YYDSYMPRINT(Args) \ |
---|
733 | do { \ |
---|
734 | if (yydebug) \ |
---|
735 | yysymprint Args; \ |
---|
736 | } while (0) |
---|
737 | |
---|
738 | # define YYDSYMPRINTF(Title, Token, Value, Location) \ |
---|
739 | do { \ |
---|
740 | if (yydebug) \ |
---|
741 | { \ |
---|
742 | YYFPRINTF (stderr, "%s ", Title); \ |
---|
743 | yysymprint (stderr, \ |
---|
744 | Token, Value); \ |
---|
745 | YYFPRINTF (stderr, "\n"); \ |
---|
746 | } \ |
---|
747 | } while (0) |
---|
748 | |
---|
749 | /*------------------------------------------------------------------. |
---|
750 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
---|
751 | | TOP (cinluded). | |
---|
752 | `------------------------------------------------------------------*/ |
---|
753 | |
---|
754 | #if defined (__STDC__) || defined (__cplusplus) |
---|
755 | static void |
---|
756 | yy_stack_print (short *bottom, short *top) |
---|
757 | #else |
---|
758 | static void |
---|
759 | yy_stack_print (bottom, top) |
---|
760 | short *bottom; |
---|
761 | short *top; |
---|
762 | #endif |
---|
763 | { |
---|
764 | YYFPRINTF (stderr, "Stack now"); |
---|
765 | for (/* Nothing. */; bottom <= top; ++bottom) |
---|
766 | YYFPRINTF (stderr, " %d", *bottom); |
---|
767 | YYFPRINTF (stderr, "\n"); |
---|
768 | } |
---|
769 | |
---|
770 | # define YY_STACK_PRINT(Bottom, Top) \ |
---|
771 | do { \ |
---|
772 | if (yydebug) \ |
---|
773 | yy_stack_print ((Bottom), (Top)); \ |
---|
774 | } while (0) |
---|
775 | |
---|
776 | |
---|
777 | /*------------------------------------------------. |
---|
778 | | Report that the YYRULE is going to be reduced. | |
---|
779 | `------------------------------------------------*/ |
---|
780 | |
---|
781 | #if defined (__STDC__) || defined (__cplusplus) |
---|
782 | static void |
---|
783 | yy_reduce_print (int yyrule) |
---|
784 | #else |
---|
785 | static void |
---|
786 | yy_reduce_print (yyrule) |
---|
787 | int yyrule; |
---|
788 | #endif |
---|
789 | { |
---|
790 | int yyi; |
---|
791 | unsigned int yylineno = yyrline[yyrule]; |
---|
792 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", |
---|
793 | yyrule - 1, yylineno); |
---|
794 | /* Print the symbols being reduced, and their result. */ |
---|
795 | for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) |
---|
796 | YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); |
---|
797 | YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); |
---|
798 | } |
---|
799 | |
---|
800 | # define YY_REDUCE_PRINT(Rule) \ |
---|
801 | do { \ |
---|
802 | if (yydebug) \ |
---|
803 | yy_reduce_print (Rule); \ |
---|
804 | } while (0) |
---|
805 | |
---|
806 | /* Nonzero means print parse trace. It is left uninitialized so that |
---|
807 | multiple parsers can coexist. */ |
---|
808 | int yydebug; |
---|
809 | #else /* !YYDEBUG */ |
---|
810 | # define YYDPRINTF(Args) |
---|
811 | # define YYDSYMPRINT(Args) |
---|
812 | # define YYDSYMPRINTF(Title, Token, Value, Location) |
---|
813 | # define YY_STACK_PRINT(Bottom, Top) |
---|
814 | # define YY_REDUCE_PRINT(Rule) |
---|
815 | #endif /* !YYDEBUG */ |
---|
816 | |
---|
817 | |
---|
818 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
---|
819 | #ifndef YYINITDEPTH |
---|
820 | # define YYINITDEPTH 200 |
---|
821 | #endif |
---|
822 | |
---|
823 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
---|
824 | if the built-in stack extension method is used). |
---|
825 | |
---|
826 | Do not make this value too large; the results are undefined if |
---|
827 | SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) |
---|
828 | evaluated with infinite-precision integer arithmetic. */ |
---|
829 | |
---|
830 | #if YYMAXDEPTH == 0 |
---|
831 | # undef YYMAXDEPTH |
---|
832 | #endif |
---|
833 | |
---|
834 | #ifndef YYMAXDEPTH |
---|
835 | # define YYMAXDEPTH 10000 |
---|
836 | #endif |
---|
837 | |
---|
838 | |
---|
839 | |
---|
840 | #if YYERROR_VERBOSE |
---|
841 | |
---|
842 | # ifndef yystrlen |
---|
843 | # if defined (__GLIBC__) && defined (_STRING_H) |
---|
844 | # define yystrlen strlen |
---|
845 | # else |
---|
846 | /* Return the length of YYSTR. */ |
---|
847 | static YYSIZE_T |
---|
848 | # if defined (__STDC__) || defined (__cplusplus) |
---|
849 | yystrlen (const char *yystr) |
---|
850 | # else |
---|
851 | yystrlen (yystr) |
---|
852 | const char *yystr; |
---|
853 | # endif |
---|
854 | { |
---|
855 | register const char *yys = yystr; |
---|
856 | |
---|
857 | while (*yys++ != '\0') |
---|
858 | continue; |
---|
859 | |
---|
860 | return yys - yystr - 1; |
---|
861 | } |
---|
862 | # endif |
---|
863 | # endif |
---|
864 | |
---|
865 | # ifndef yystpcpy |
---|
866 | # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) |
---|
867 | # define yystpcpy stpcpy |
---|
868 | # else |
---|
869 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
---|
870 | YYDEST. */ |
---|
871 | static char * |
---|
872 | # if defined (__STDC__) || defined (__cplusplus) |
---|
873 | yystpcpy (char *yydest, const char *yysrc) |
---|
874 | # else |
---|
875 | yystpcpy (yydest, yysrc) |
---|
876 | char *yydest; |
---|
877 | const char *yysrc; |
---|
878 | # endif |
---|
879 | { |
---|
880 | register char *yyd = yydest; |
---|
881 | register const char *yys = yysrc; |
---|
882 | |
---|
883 | while ((*yyd++ = *yys++) != '\0') |
---|
884 | continue; |
---|
885 | |
---|
886 | return yyd - 1; |
---|
887 | } |
---|
888 | # endif |
---|
889 | # endif |
---|
890 | |
---|
891 | #endif /* !YYERROR_VERBOSE */ |
---|
892 | |
---|
893 | |
---|
894 | |
---|
895 | #if YYDEBUG |
---|
896 | /*--------------------------------. |
---|
897 | | Print this symbol on YYOUTPUT. | |
---|
898 | `--------------------------------*/ |
---|
899 | |
---|
900 | #if defined (__STDC__) || defined (__cplusplus) |
---|
901 | static void |
---|
902 | yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) |
---|
903 | #else |
---|
904 | static void |
---|
905 | yysymprint (yyoutput, yytype, yyvaluep) |
---|
906 | FILE *yyoutput; |
---|
907 | int yytype; |
---|
908 | YYSTYPE *yyvaluep; |
---|
909 | #endif |
---|
910 | { |
---|
911 | /* Pacify ``unused variable'' warnings. */ |
---|
912 | (void) yyvaluep; |
---|
913 | |
---|
914 | if (yytype < YYNTOKENS) |
---|
915 | { |
---|
916 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
---|
917 | # ifdef YYPRINT |
---|
918 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
---|
919 | # endif |
---|
920 | } |
---|
921 | else |
---|
922 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
---|
923 | |
---|
924 | switch (yytype) |
---|
925 | { |
---|
926 | default: |
---|
927 | break; |
---|
928 | } |
---|
929 | YYFPRINTF (yyoutput, ")"); |
---|
930 | } |
---|
931 | |
---|
932 | #endif /* ! YYDEBUG */ |
---|
933 | /*-----------------------------------------------. |
---|
934 | | Release the memory associated to this symbol. | |
---|
935 | `-----------------------------------------------*/ |
---|
936 | |
---|
937 | #if defined (__STDC__) || defined (__cplusplus) |
---|
938 | static void |
---|
939 | yydestruct (int yytype, YYSTYPE *yyvaluep) |
---|
940 | #else |
---|
941 | static void |
---|
942 | yydestruct (yytype, yyvaluep) |
---|
943 | int yytype; |
---|
944 | YYSTYPE *yyvaluep; |
---|
945 | #endif |
---|
946 | { |
---|
947 | /* Pacify ``unused variable'' warnings. */ |
---|
948 | (void) yyvaluep; |
---|
949 | |
---|
950 | switch (yytype) |
---|
951 | { |
---|
952 | |
---|
953 | default: |
---|
954 | break; |
---|
955 | } |
---|
956 | } |
---|
957 | |
---|
958 | |
---|
959 | /* Prevent warnings from -Wmissing-prototypes. */ |
---|
960 | |
---|
961 | #ifdef YYPARSE_PARAM |
---|
962 | # if defined (__STDC__) || defined (__cplusplus) |
---|
963 | int yyparse (void *YYPARSE_PARAM); |
---|
964 | # else |
---|
965 | int yyparse (); |
---|
966 | # endif |
---|
967 | #else /* ! YYPARSE_PARAM */ |
---|
968 | #if defined (__STDC__) || defined (__cplusplus) |
---|
969 | int yyparse (void); |
---|
970 | #else |
---|
971 | int yyparse (); |
---|
972 | #endif |
---|
973 | #endif /* ! YYPARSE_PARAM */ |
---|
974 | |
---|
975 | |
---|
976 | |
---|
977 | /* The lookahead symbol. */ |
---|
978 | int yychar; |
---|
979 | |
---|
980 | /* The semantic value of the lookahead symbol. */ |
---|
981 | YYSTYPE yylval; |
---|
982 | |
---|
983 | /* Number of syntax errors so far. */ |
---|
984 | int yynerrs; |
---|
985 | |
---|
986 | |
---|
987 | |
---|
988 | /*----------. |
---|
989 | | yyparse. | |
---|
990 | `----------*/ |
---|
991 | |
---|
992 | #ifdef YYPARSE_PARAM |
---|
993 | # if defined (__STDC__) || defined (__cplusplus) |
---|
994 | int yyparse (void *YYPARSE_PARAM) |
---|
995 | # else |
---|
996 | int yyparse (YYPARSE_PARAM) |
---|
997 | void *YYPARSE_PARAM; |
---|
998 | # endif |
---|
999 | #else /* ! YYPARSE_PARAM */ |
---|
1000 | #if defined (__STDC__) || defined (__cplusplus) |
---|
1001 | int |
---|
1002 | yyparse (void) |
---|
1003 | #else |
---|
1004 | int |
---|
1005 | yyparse () |
---|
1006 | |
---|
1007 | #endif |
---|
1008 | #endif |
---|
1009 | { |
---|
1010 | |
---|
1011 | register int yystate; |
---|
1012 | register int yyn; |
---|
1013 | int yyresult; |
---|
1014 | /* Number of tokens to shift before error messages enabled. */ |
---|
1015 | int yyerrstatus; |
---|
1016 | /* Lookahead token as an internal (translated) token number. */ |
---|
1017 | int yytoken = 0; |
---|
1018 | |
---|
1019 | /* Three stacks and their tools: |
---|
1020 | `yyss': related to states, |
---|
1021 | `yyvs': related to semantic values, |
---|
1022 | `yyls': related to locations. |
---|
1023 | |
---|
1024 | Refer to the stacks thru separate pointers, to allow yyoverflow |
---|
1025 | to reallocate them elsewhere. */ |
---|
1026 | |
---|
1027 | /* The state stack. */ |
---|
1028 | short yyssa[YYINITDEPTH]; |
---|
1029 | short *yyss = yyssa; |
---|
1030 | register short *yyssp; |
---|
1031 | |
---|
1032 | /* The semantic value stack. */ |
---|
1033 | YYSTYPE yyvsa[YYINITDEPTH]; |
---|
1034 | YYSTYPE *yyvs = yyvsa; |
---|
1035 | register YYSTYPE *yyvsp; |
---|
1036 | |
---|
1037 | |
---|
1038 | |
---|
1039 | #define YYPOPSTACK (yyvsp--, yyssp--) |
---|
1040 | |
---|
1041 | YYSIZE_T yystacksize = YYINITDEPTH; |
---|
1042 | |
---|
1043 | /* The variables used to return semantic value and location from the |
---|
1044 | action routines. */ |
---|
1045 | YYSTYPE yyval; |
---|
1046 | |
---|
1047 | |
---|
1048 | /* When reducing, the number of symbols on the RHS of the reduced |
---|
1049 | rule. */ |
---|
1050 | int yylen; |
---|
1051 | |
---|
1052 | YYDPRINTF ((stderr, "Starting parse\n")); |
---|
1053 | |
---|
1054 | yystate = 0; |
---|
1055 | yyerrstatus = 0; |
---|
1056 | yynerrs = 0; |
---|
1057 | yychar = YYEMPTY; /* Cause a token to be read. */ |
---|
1058 | |
---|
1059 | /* Initialize stack pointers. |
---|
1060 | Waste one element of value and location stack |
---|
1061 | so that they stay on the same level as the state stack. |
---|
1062 | The wasted elements are never initialized. */ |
---|
1063 | |
---|
1064 | yyssp = yyss; |
---|
1065 | yyvsp = yyvs; |
---|
1066 | |
---|
1067 | goto yysetstate; |
---|
1068 | |
---|
1069 | /*------------------------------------------------------------. |
---|
1070 | | yynewstate -- Push a new state, which is found in yystate. | |
---|
1071 | `------------------------------------------------------------*/ |
---|
1072 | yynewstate: |
---|
1073 | /* In all cases, when you get here, the value and location stacks |
---|
1074 | have just been pushed. so pushing a state here evens the stacks. |
---|
1075 | */ |
---|
1076 | yyssp++; |
---|
1077 | |
---|
1078 | yysetstate: |
---|
1079 | *yyssp = yystate; |
---|
1080 | |
---|
1081 | if (yyss + yystacksize - 1 <= yyssp) |
---|
1082 | { |
---|
1083 | /* Get the current used size of the three stacks, in elements. */ |
---|
1084 | YYSIZE_T yysize = yyssp - yyss + 1; |
---|
1085 | |
---|
1086 | #ifdef yyoverflow |
---|
1087 | { |
---|
1088 | /* Give user a chance to reallocate the stack. Use copies of |
---|
1089 | these so that the &'s don't force the real ones into |
---|
1090 | memory. */ |
---|
1091 | YYSTYPE *yyvs1 = yyvs; |
---|
1092 | short *yyss1 = yyss; |
---|
1093 | |
---|
1094 | |
---|
1095 | /* Each stack pointer address is followed by the size of the |
---|
1096 | data in use in that stack, in bytes. This used to be a |
---|
1097 | conditional around just the two extra args, but that might |
---|
1098 | be undefined if yyoverflow is a macro. */ |
---|
1099 | yyoverflow ("parser stack overflow", |
---|
1100 | &yyss1, yysize * sizeof (*yyssp), |
---|
1101 | &yyvs1, yysize * sizeof (*yyvsp), |
---|
1102 | |
---|
1103 | &yystacksize); |
---|
1104 | |
---|
1105 | yyss = yyss1; |
---|
1106 | yyvs = yyvs1; |
---|
1107 | } |
---|
1108 | #else /* no yyoverflow */ |
---|
1109 | # ifndef YYSTACK_RELOCATE |
---|
1110 | goto yyoverflowlab; |
---|
1111 | # else |
---|
1112 | /* Extend the stack our own way. */ |
---|
1113 | if (YYMAXDEPTH <= yystacksize) |
---|
1114 | goto yyoverflowlab; |
---|
1115 | yystacksize *= 2; |
---|
1116 | if (YYMAXDEPTH < yystacksize) |
---|
1117 | yystacksize = YYMAXDEPTH; |
---|
1118 | |
---|
1119 | { |
---|
1120 | short *yyss1 = yyss; |
---|
1121 | union yyalloc *yyptr = |
---|
1122 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
---|
1123 | if (! yyptr) |
---|
1124 | goto yyoverflowlab; |
---|
1125 | YYSTACK_RELOCATE (yyss); |
---|
1126 | YYSTACK_RELOCATE (yyvs); |
---|
1127 | |
---|
1128 | # undef YYSTACK_RELOCATE |
---|
1129 | if (yyss1 != yyssa) |
---|
1130 | YYSTACK_FREE (yyss1); |
---|
1131 | } |
---|
1132 | # endif |
---|
1133 | #endif /* no yyoverflow */ |
---|
1134 | |
---|
1135 | yyssp = yyss + yysize - 1; |
---|
1136 | yyvsp = yyvs + yysize - 1; |
---|
1137 | |
---|
1138 | |
---|
1139 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
---|
1140 | (unsigned long int) yystacksize)); |
---|
1141 | |
---|
1142 | if (yyss + yystacksize - 1 <= yyssp) |
---|
1143 | YYABORT; |
---|
1144 | } |
---|
1145 | |
---|
1146 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
---|
1147 | |
---|
1148 | goto yybackup; |
---|
1149 | |
---|
1150 | /*-----------. |
---|
1151 | | yybackup. | |
---|
1152 | `-----------*/ |
---|
1153 | yybackup: |
---|
1154 | |
---|
1155 | /* Do appropriate processing given the current state. */ |
---|
1156 | /* Read a lookahead token if we need one and don't already have one. */ |
---|
1157 | /* yyresume: */ |
---|
1158 | |
---|
1159 | /* First try to decide what to do without reference to lookahead token. */ |
---|
1160 | |
---|
1161 | yyn = yypact[yystate]; |
---|
1162 | if (yyn == YYPACT_NINF) |
---|
1163 | goto yydefault; |
---|
1164 | |
---|
1165 | /* Not known => get a lookahead token if don't already have one. */ |
---|
1166 | |
---|
1167 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
---|
1168 | if (yychar == YYEMPTY) |
---|
1169 | { |
---|
1170 | YYDPRINTF ((stderr, "Reading a token: ")); |
---|
1171 | yychar = YYLEX; |
---|
1172 | } |
---|
1173 | |
---|
1174 | if (yychar <= YYEOF) |
---|
1175 | { |
---|
1176 | yychar = yytoken = YYEOF; |
---|
1177 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
---|
1178 | } |
---|
1179 | else |
---|
1180 | { |
---|
1181 | yytoken = YYTRANSLATE (yychar); |
---|
1182 | YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); |
---|
1183 | } |
---|
1184 | |
---|
1185 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
---|
1186 | detect an error, take that action. */ |
---|
1187 | yyn += yytoken; |
---|
1188 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
---|
1189 | goto yydefault; |
---|
1190 | yyn = yytable[yyn]; |
---|
1191 | if (yyn <= 0) |
---|
1192 | { |
---|
1193 | if (yyn == 0 || yyn == YYTABLE_NINF) |
---|
1194 | goto yyerrlab; |
---|
1195 | yyn = -yyn; |
---|
1196 | goto yyreduce; |
---|
1197 | } |
---|
1198 | |
---|
1199 | if (yyn == YYFINAL) |
---|
1200 | YYACCEPT; |
---|
1201 | |
---|
1202 | /* Shift the lookahead token. */ |
---|
1203 | YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); |
---|
1204 | |
---|
1205 | /* Discard the token being shifted unless it is eof. */ |
---|
1206 | if (yychar != YYEOF) |
---|
1207 | yychar = YYEMPTY; |
---|
1208 | |
---|
1209 | *++yyvsp = yylval; |
---|
1210 | |
---|
1211 | |
---|
1212 | /* Count tokens shifted since error; after three, turn off error |
---|
1213 | status. */ |
---|
1214 | if (yyerrstatus) |
---|
1215 | yyerrstatus--; |
---|
1216 | |
---|
1217 | yystate = yyn; |
---|
1218 | goto yynewstate; |
---|
1219 | |
---|
1220 | |
---|
1221 | /*-----------------------------------------------------------. |
---|
1222 | | yydefault -- do the default action for the current state. | |
---|
1223 | `-----------------------------------------------------------*/ |
---|
1224 | yydefault: |
---|
1225 | yyn = yydefact[yystate]; |
---|
1226 | if (yyn == 0) |
---|
1227 | goto yyerrlab; |
---|
1228 | goto yyreduce; |
---|
1229 | |
---|
1230 | |
---|
1231 | /*-----------------------------. |
---|
1232 | | yyreduce -- Do a reduction. | |
---|
1233 | `-----------------------------*/ |
---|
1234 | yyreduce: |
---|
1235 | /* yyn is the number of a rule to reduce with. */ |
---|
1236 | yylen = yyr2[yyn]; |
---|
1237 | |
---|
1238 | /* If YYLEN is nonzero, implement the default value of the action: |
---|
1239 | `$$ = $1'. |
---|
1240 | |
---|
1241 | Otherwise, the following line sets YYVAL to garbage. |
---|
1242 | This behavior is undocumented and Bison |
---|
1243 | users should not rely upon it. Assigning to YYVAL |
---|
1244 | unconditionally makes the parser a bit smaller, and it avoids a |
---|
1245 | GCC warning that YYVAL may be used uninitialized. */ |
---|
1246 | yyval = yyvsp[1-yylen]; |
---|
1247 | |
---|
1248 | |
---|
1249 | YY_REDUCE_PRINT (yyn); |
---|
1250 | switch (yyn) |
---|
1251 | { |
---|
1252 | case 3: |
---|
1253 | #line 142 "jamgram.y" |
---|
1254 | { parse_save( yyvsp[0].parse ); } |
---|
1255 | break; |
---|
1256 | |
---|
1257 | case 4: |
---|
1258 | #line 153 "jamgram.y" |
---|
1259 | { yyval.parse = yyvsp[0].parse; } |
---|
1260 | break; |
---|
1261 | |
---|
1262 | case 5: |
---|
1263 | #line 155 "jamgram.y" |
---|
1264 | { yyval.parse = yyvsp[0].parse; } |
---|
1265 | break; |
---|
1266 | |
---|
1267 | case 6: |
---|
1268 | #line 159 "jamgram.y" |
---|
1269 | { yyval.parse = yyvsp[0].parse; } |
---|
1270 | break; |
---|
1271 | |
---|
1272 | case 7: |
---|
1273 | #line 161 "jamgram.y" |
---|
1274 | { yyval.parse = prules( yyvsp[-1].parse, yyvsp[0].parse ); } |
---|
1275 | break; |
---|
1276 | |
---|
1277 | case 8: |
---|
1278 | #line 163 "jamgram.y" |
---|
1279 | { yyval.parse = plocal( yyvsp[-3].parse, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1280 | break; |
---|
1281 | |
---|
1282 | case 9: |
---|
1283 | #line 167 "jamgram.y" |
---|
1284 | { yyval.parse = pnull(); } |
---|
1285 | break; |
---|
1286 | |
---|
1287 | case 10: |
---|
1288 | #line 171 "jamgram.y" |
---|
1289 | { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_SET; } |
---|
1290 | break; |
---|
1291 | |
---|
1292 | case 11: |
---|
1293 | #line 173 "jamgram.y" |
---|
1294 | { yyval.parse = yyvsp[0].parse; yyval.number = ASSIGN_APPEND; } |
---|
1295 | break; |
---|
1296 | |
---|
1297 | case 12: |
---|
1298 | #line 177 "jamgram.y" |
---|
1299 | { yyval.parse = yyvsp[-1].parse; } |
---|
1300 | break; |
---|
1301 | |
---|
1302 | case 13: |
---|
1303 | #line 179 "jamgram.y" |
---|
1304 | { yyval.parse = P0; } |
---|
1305 | break; |
---|
1306 | |
---|
1307 | case 14: |
---|
1308 | #line 183 "jamgram.y" |
---|
1309 | { yyval.number = 1; } |
---|
1310 | break; |
---|
1311 | |
---|
1312 | case 15: |
---|
1313 | #line 185 "jamgram.y" |
---|
1314 | { yyval.number = 0; } |
---|
1315 | break; |
---|
1316 | |
---|
1317 | case 16: |
---|
1318 | #line 189 "jamgram.y" |
---|
1319 | { yyval.parse = yyvsp[-1].parse; } |
---|
1320 | break; |
---|
1321 | |
---|
1322 | case 17: |
---|
1323 | #line 191 "jamgram.y" |
---|
1324 | { yyval.parse = pincl( yyvsp[-1].parse ); } |
---|
1325 | break; |
---|
1326 | |
---|
1327 | case 18: |
---|
1328 | #line 193 "jamgram.y" |
---|
1329 | { yyval.parse = prule( yyvsp[-2].string, yyvsp[-1].parse ); } |
---|
1330 | break; |
---|
1331 | |
---|
1332 | case 19: |
---|
1333 | #line 195 "jamgram.y" |
---|
1334 | { yyval.parse = pset( yyvsp[-3].parse, yyvsp[-1].parse, yyvsp[-2].number ); } |
---|
1335 | break; |
---|
1336 | |
---|
1337 | case 20: |
---|
1338 | #line 197 "jamgram.y" |
---|
1339 | { yyval.parse = pset1( yyvsp[-5].parse, yyvsp[-3].parse, yyvsp[-1].parse, yyvsp[-2].number ); } |
---|
1340 | break; |
---|
1341 | |
---|
1342 | case 21: |
---|
1343 | #line 199 "jamgram.y" |
---|
1344 | { yyval.parse = yyvsp[-1].parse; } |
---|
1345 | break; |
---|
1346 | |
---|
1347 | case 22: |
---|
1348 | #line 201 "jamgram.y" |
---|
1349 | { yyval.parse = pfor( yyvsp[-5].string, yyvsp[-3].parse, yyvsp[-1].parse, yyvsp[-6].number ); } |
---|
1350 | break; |
---|
1351 | |
---|
1352 | case 23: |
---|
1353 | #line 203 "jamgram.y" |
---|
1354 | { yyval.parse = pswitch( yyvsp[-3].parse, yyvsp[-1].parse ); } |
---|
1355 | break; |
---|
1356 | |
---|
1357 | case 24: |
---|
1358 | #line 205 "jamgram.y" |
---|
1359 | { yyval.parse = pif( yyvsp[-3].parse, yyvsp[-1].parse, pnull() ); } |
---|
1360 | break; |
---|
1361 | |
---|
1362 | case 25: |
---|
1363 | #line 207 "jamgram.y" |
---|
1364 | { yyval.parse = pmodule( yyvsp[-3].parse, yyvsp[-1].parse ); } |
---|
1365 | break; |
---|
1366 | |
---|
1367 | case 26: |
---|
1368 | #line 209 "jamgram.y" |
---|
1369 | { yyval.parse = pclass( yyvsp[-3].parse, yyvsp[-1].parse ); } |
---|
1370 | break; |
---|
1371 | |
---|
1372 | case 27: |
---|
1373 | #line 211 "jamgram.y" |
---|
1374 | { yyval.parse = pwhile( yyvsp[-3].parse, yyvsp[-1].parse ); } |
---|
1375 | break; |
---|
1376 | |
---|
1377 | case 28: |
---|
1378 | #line 213 "jamgram.y" |
---|
1379 | { yyval.parse = pif( yyvsp[-5].parse, yyvsp[-3].parse, yyvsp[0].parse ); } |
---|
1380 | break; |
---|
1381 | |
---|
1382 | case 29: |
---|
1383 | #line 215 "jamgram.y" |
---|
1384 | { yyval.parse = psetc( yyvsp[-2].string, yyvsp[0].parse, yyvsp[-1].parse, yyvsp[-4].number ); } |
---|
1385 | break; |
---|
1386 | |
---|
1387 | case 30: |
---|
1388 | #line 217 "jamgram.y" |
---|
1389 | { yyval.parse = pon( yyvsp[-1].parse, yyvsp[0].parse ); } |
---|
1390 | break; |
---|
1391 | |
---|
1392 | case 31: |
---|
1393 | #line 219 "jamgram.y" |
---|
1394 | { yymode( SCAN_STRING ); } |
---|
1395 | break; |
---|
1396 | |
---|
1397 | case 32: |
---|
1398 | #line 221 "jamgram.y" |
---|
1399 | { yymode( SCAN_NORMAL ); } |
---|
1400 | break; |
---|
1401 | |
---|
1402 | case 33: |
---|
1403 | #line 223 "jamgram.y" |
---|
1404 | { yyval.parse = psete( yyvsp[-6].string,yyvsp[-5].parse,yyvsp[-2].string,yyvsp[-7].number ); } |
---|
1405 | break; |
---|
1406 | |
---|
1407 | case 34: |
---|
1408 | #line 231 "jamgram.y" |
---|
1409 | { yyval.number = ASSIGN_SET; } |
---|
1410 | break; |
---|
1411 | |
---|
1412 | case 35: |
---|
1413 | #line 233 "jamgram.y" |
---|
1414 | { yyval.number = ASSIGN_APPEND; } |
---|
1415 | break; |
---|
1416 | |
---|
1417 | case 36: |
---|
1418 | #line 235 "jamgram.y" |
---|
1419 | { yyval.number = ASSIGN_DEFAULT; } |
---|
1420 | break; |
---|
1421 | |
---|
1422 | case 37: |
---|
1423 | #line 237 "jamgram.y" |
---|
1424 | { yyval.number = ASSIGN_DEFAULT; } |
---|
1425 | break; |
---|
1426 | |
---|
1427 | case 38: |
---|
1428 | #line 244 "jamgram.y" |
---|
1429 | { yyval.parse = peval( EXPR_EXISTS, yyvsp[0].parse, pnull() ); } |
---|
1430 | break; |
---|
1431 | |
---|
1432 | case 39: |
---|
1433 | #line 246 "jamgram.y" |
---|
1434 | { yyval.parse = peval( EXPR_EQUALS, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1435 | break; |
---|
1436 | |
---|
1437 | case 40: |
---|
1438 | #line 248 "jamgram.y" |
---|
1439 | { yyval.parse = peval( EXPR_NOTEQ, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1440 | break; |
---|
1441 | |
---|
1442 | case 41: |
---|
1443 | #line 250 "jamgram.y" |
---|
1444 | { yyval.parse = peval( EXPR_LESS, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1445 | break; |
---|
1446 | |
---|
1447 | case 42: |
---|
1448 | #line 252 "jamgram.y" |
---|
1449 | { yyval.parse = peval( EXPR_LESSEQ, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1450 | break; |
---|
1451 | |
---|
1452 | case 43: |
---|
1453 | #line 254 "jamgram.y" |
---|
1454 | { yyval.parse = peval( EXPR_MORE, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1455 | break; |
---|
1456 | |
---|
1457 | case 44: |
---|
1458 | #line 256 "jamgram.y" |
---|
1459 | { yyval.parse = peval( EXPR_MOREEQ, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1460 | break; |
---|
1461 | |
---|
1462 | case 45: |
---|
1463 | #line 258 "jamgram.y" |
---|
1464 | { yyval.parse = peval( EXPR_AND, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1465 | break; |
---|
1466 | |
---|
1467 | case 46: |
---|
1468 | #line 260 "jamgram.y" |
---|
1469 | { yyval.parse = peval( EXPR_AND, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1470 | break; |
---|
1471 | |
---|
1472 | case 47: |
---|
1473 | #line 262 "jamgram.y" |
---|
1474 | { yyval.parse = peval( EXPR_OR, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1475 | break; |
---|
1476 | |
---|
1477 | case 48: |
---|
1478 | #line 264 "jamgram.y" |
---|
1479 | { yyval.parse = peval( EXPR_OR, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1480 | break; |
---|
1481 | |
---|
1482 | case 49: |
---|
1483 | #line 266 "jamgram.y" |
---|
1484 | { yyval.parse = peval( EXPR_IN, yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1485 | break; |
---|
1486 | |
---|
1487 | case 50: |
---|
1488 | #line 268 "jamgram.y" |
---|
1489 | { yyval.parse = peval( EXPR_NOT, yyvsp[0].parse, pnull() ); } |
---|
1490 | break; |
---|
1491 | |
---|
1492 | case 51: |
---|
1493 | #line 270 "jamgram.y" |
---|
1494 | { yyval.parse = yyvsp[-1].parse; } |
---|
1495 | break; |
---|
1496 | |
---|
1497 | case 52: |
---|
1498 | #line 281 "jamgram.y" |
---|
1499 | { yyval.parse = P0; } |
---|
1500 | break; |
---|
1501 | |
---|
1502 | case 53: |
---|
1503 | #line 283 "jamgram.y" |
---|
1504 | { yyval.parse = pnode( yyvsp[-1].parse, yyvsp[0].parse ); } |
---|
1505 | break; |
---|
1506 | |
---|
1507 | case 54: |
---|
1508 | #line 287 "jamgram.y" |
---|
1509 | { yyval.parse = psnode( yyvsp[-2].string, yyvsp[0].parse ); } |
---|
1510 | break; |
---|
1511 | |
---|
1512 | case 55: |
---|
1513 | #line 296 "jamgram.y" |
---|
1514 | { yyval.parse = pnode( P0, yyvsp[0].parse ); } |
---|
1515 | break; |
---|
1516 | |
---|
1517 | case 56: |
---|
1518 | #line 298 "jamgram.y" |
---|
1519 | { yyval.parse = pnode( yyvsp[0].parse, yyvsp[-2].parse ); } |
---|
1520 | break; |
---|
1521 | |
---|
1522 | case 57: |
---|
1523 | #line 308 "jamgram.y" |
---|
1524 | { yyval.parse = yyvsp[0].parse; yymode( SCAN_NORMAL ); } |
---|
1525 | break; |
---|
1526 | |
---|
1527 | case 58: |
---|
1528 | #line 312 "jamgram.y" |
---|
1529 | { yyval.parse = pnull(); yymode( SCAN_PUNCT ); } |
---|
1530 | break; |
---|
1531 | |
---|
1532 | case 59: |
---|
1533 | #line 314 "jamgram.y" |
---|
1534 | { yyval.parse = pappend( yyvsp[-1].parse, yyvsp[0].parse ); } |
---|
1535 | break; |
---|
1536 | |
---|
1537 | case 60: |
---|
1538 | #line 318 "jamgram.y" |
---|
1539 | { yyval.parse = plist( yyvsp[0].string ); } |
---|
1540 | break; |
---|
1541 | |
---|
1542 | case 61: |
---|
1543 | #line 319 "jamgram.y" |
---|
1544 | { yymode( SCAN_NORMAL ); } |
---|
1545 | break; |
---|
1546 | |
---|
1547 | case 62: |
---|
1548 | #line 320 "jamgram.y" |
---|
1549 | { yyval.parse = yyvsp[-1].parse; } |
---|
1550 | break; |
---|
1551 | |
---|
1552 | case 63: |
---|
1553 | #line 329 "jamgram.y" |
---|
1554 | { yyval.parse = prule( yyvsp[-1].string, yyvsp[0].parse ); } |
---|
1555 | break; |
---|
1556 | |
---|
1557 | case 64: |
---|
1558 | #line 331 "jamgram.y" |
---|
1559 | { yyval.parse = pon( yyvsp[-2].parse, prule( yyvsp[-1].string, yyvsp[0].parse ) ); } |
---|
1560 | break; |
---|
1561 | |
---|
1562 | case 65: |
---|
1563 | #line 333 "jamgram.y" |
---|
1564 | { yyval.parse = pon( yyvsp[-2].parse, yyvsp[0].parse ); } |
---|
1565 | break; |
---|
1566 | |
---|
1567 | case 66: |
---|
1568 | #line 343 "jamgram.y" |
---|
1569 | { yyval.number = 0; } |
---|
1570 | break; |
---|
1571 | |
---|
1572 | case 67: |
---|
1573 | #line 345 "jamgram.y" |
---|
1574 | { yyval.number = yyvsp[-1].number | yyvsp[0].number; } |
---|
1575 | break; |
---|
1576 | |
---|
1577 | case 68: |
---|
1578 | #line 349 "jamgram.y" |
---|
1579 | { yyval.number = EXEC_UPDATED; } |
---|
1580 | break; |
---|
1581 | |
---|
1582 | case 69: |
---|
1583 | #line 351 "jamgram.y" |
---|
1584 | { yyval.number = EXEC_TOGETHER; } |
---|
1585 | break; |
---|
1586 | |
---|
1587 | case 70: |
---|
1588 | #line 353 "jamgram.y" |
---|
1589 | { yyval.number = EXEC_IGNORE; } |
---|
1590 | break; |
---|
1591 | |
---|
1592 | case 71: |
---|
1593 | #line 355 "jamgram.y" |
---|
1594 | { yyval.number = EXEC_QUIETLY; } |
---|
1595 | break; |
---|
1596 | |
---|
1597 | case 72: |
---|
1598 | #line 357 "jamgram.y" |
---|
1599 | { yyval.number = EXEC_PIECEMEAL; } |
---|
1600 | break; |
---|
1601 | |
---|
1602 | case 73: |
---|
1603 | #line 359 "jamgram.y" |
---|
1604 | { yyval.number = EXEC_EXISTING; } |
---|
1605 | break; |
---|
1606 | |
---|
1607 | case 74: |
---|
1608 | #line 368 "jamgram.y" |
---|
1609 | { yyval.parse = pnull(); } |
---|
1610 | break; |
---|
1611 | |
---|
1612 | case 75: |
---|
1613 | #line 370 "jamgram.y" |
---|
1614 | { yyval.parse = yyvsp[0].parse; } |
---|
1615 | break; |
---|
1616 | |
---|
1617 | |
---|
1618 | } |
---|
1619 | |
---|
1620 | /* Line 991 of yacc.c. */ |
---|
1621 | #line 1621 "y.tab.c" |
---|
1622 | |
---|
1623 | yyvsp -= yylen; |
---|
1624 | yyssp -= yylen; |
---|
1625 | |
---|
1626 | |
---|
1627 | YY_STACK_PRINT (yyss, yyssp); |
---|
1628 | |
---|
1629 | *++yyvsp = yyval; |
---|
1630 | |
---|
1631 | |
---|
1632 | /* Now `shift' the result of the reduction. Determine what state |
---|
1633 | that goes to, based on the state we popped back to and the rule |
---|
1634 | number reduced by. */ |
---|
1635 | |
---|
1636 | yyn = yyr1[yyn]; |
---|
1637 | |
---|
1638 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
---|
1639 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
---|
1640 | yystate = yytable[yystate]; |
---|
1641 | else |
---|
1642 | yystate = yydefgoto[yyn - YYNTOKENS]; |
---|
1643 | |
---|
1644 | goto yynewstate; |
---|
1645 | |
---|
1646 | |
---|
1647 | /*------------------------------------. |
---|
1648 | | yyerrlab -- here on detecting error | |
---|
1649 | `------------------------------------*/ |
---|
1650 | yyerrlab: |
---|
1651 | /* If not already recovering from an error, report this error. */ |
---|
1652 | if (!yyerrstatus) |
---|
1653 | { |
---|
1654 | ++yynerrs; |
---|
1655 | #if YYERROR_VERBOSE |
---|
1656 | yyn = yypact[yystate]; |
---|
1657 | |
---|
1658 | if (YYPACT_NINF < yyn && yyn < YYLAST) |
---|
1659 | { |
---|
1660 | YYSIZE_T yysize = 0; |
---|
1661 | int yytype = YYTRANSLATE (yychar); |
---|
1662 | char *yymsg; |
---|
1663 | int yyx, yycount; |
---|
1664 | |
---|
1665 | yycount = 0; |
---|
1666 | /* Start YYX at -YYN if negative to avoid negative indexes in |
---|
1667 | YYCHECK. */ |
---|
1668 | for (yyx = yyn < 0 ? -yyn : 0; |
---|
1669 | yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) |
---|
1670 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
---|
1671 | yysize += yystrlen (yytname[yyx]) + 15, yycount++; |
---|
1672 | yysize += yystrlen ("syntax error, unexpected ") + 1; |
---|
1673 | yysize += yystrlen (yytname[yytype]); |
---|
1674 | yymsg = (char *) YYSTACK_ALLOC (yysize); |
---|
1675 | if (yymsg != 0) |
---|
1676 | { |
---|
1677 | char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); |
---|
1678 | yyp = yystpcpy (yyp, yytname[yytype]); |
---|
1679 | |
---|
1680 | if (yycount < 5) |
---|
1681 | { |
---|
1682 | yycount = 0; |
---|
1683 | for (yyx = yyn < 0 ? -yyn : 0; |
---|
1684 | yyx < (int) (sizeof (yytname) / sizeof (char *)); |
---|
1685 | yyx++) |
---|
1686 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
---|
1687 | { |
---|
1688 | const char *yyq = ! yycount ? ", expecting " : " or "; |
---|
1689 | yyp = yystpcpy (yyp, yyq); |
---|
1690 | yyp = yystpcpy (yyp, yytname[yyx]); |
---|
1691 | yycount++; |
---|
1692 | } |
---|
1693 | } |
---|
1694 | yyerror (yymsg); |
---|
1695 | YYSTACK_FREE (yymsg); |
---|
1696 | } |
---|
1697 | else |
---|
1698 | yyerror ("syntax error; also virtual memory exhausted"); |
---|
1699 | } |
---|
1700 | else |
---|
1701 | #endif /* YYERROR_VERBOSE */ |
---|
1702 | yyerror ("syntax error"); |
---|
1703 | } |
---|
1704 | |
---|
1705 | |
---|
1706 | |
---|
1707 | if (yyerrstatus == 3) |
---|
1708 | { |
---|
1709 | /* If just tried and failed to reuse lookahead token after an |
---|
1710 | error, discard it. */ |
---|
1711 | |
---|
1712 | /* Return failure if at end of input. */ |
---|
1713 | if (yychar == YYEOF) |
---|
1714 | { |
---|
1715 | /* Pop the error token. */ |
---|
1716 | YYPOPSTACK; |
---|
1717 | /* Pop the rest of the stack. */ |
---|
1718 | while (yyss < yyssp) |
---|
1719 | { |
---|
1720 | YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); |
---|
1721 | yydestruct (yystos[*yyssp], yyvsp); |
---|
1722 | YYPOPSTACK; |
---|
1723 | } |
---|
1724 | YYABORT; |
---|
1725 | } |
---|
1726 | |
---|
1727 | YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); |
---|
1728 | yydestruct (yytoken, &yylval); |
---|
1729 | yychar = YYEMPTY; |
---|
1730 | |
---|
1731 | } |
---|
1732 | |
---|
1733 | /* Else will try to reuse lookahead token after shifting the error |
---|
1734 | token. */ |
---|
1735 | goto yyerrlab2; |
---|
1736 | |
---|
1737 | |
---|
1738 | /*----------------------------------------------------. |
---|
1739 | | yyerrlab1 -- error raised explicitly by an action. | |
---|
1740 | `----------------------------------------------------*/ |
---|
1741 | yyerrlab1: |
---|
1742 | |
---|
1743 | /* Suppress GCC warning that yyerrlab1 is unused when no action |
---|
1744 | invokes YYERROR. */ |
---|
1745 | #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) |
---|
1746 | __attribute__ ((__unused__)) |
---|
1747 | #endif |
---|
1748 | |
---|
1749 | |
---|
1750 | goto yyerrlab2; |
---|
1751 | |
---|
1752 | |
---|
1753 | /*---------------------------------------------------------------. |
---|
1754 | | yyerrlab2 -- pop states until the error token can be shifted. | |
---|
1755 | `---------------------------------------------------------------*/ |
---|
1756 | yyerrlab2: |
---|
1757 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
---|
1758 | |
---|
1759 | for (;;) |
---|
1760 | { |
---|
1761 | yyn = yypact[yystate]; |
---|
1762 | if (yyn != YYPACT_NINF) |
---|
1763 | { |
---|
1764 | yyn += YYTERROR; |
---|
1765 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
---|
1766 | { |
---|
1767 | yyn = yytable[yyn]; |
---|
1768 | if (0 < yyn) |
---|
1769 | break; |
---|
1770 | } |
---|
1771 | } |
---|
1772 | |
---|
1773 | /* Pop the current state because it cannot handle the error token. */ |
---|
1774 | if (yyssp == yyss) |
---|
1775 | YYABORT; |
---|
1776 | |
---|
1777 | YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); |
---|
1778 | yydestruct (yystos[yystate], yyvsp); |
---|
1779 | yyvsp--; |
---|
1780 | yystate = *--yyssp; |
---|
1781 | |
---|
1782 | YY_STACK_PRINT (yyss, yyssp); |
---|
1783 | } |
---|
1784 | |
---|
1785 | if (yyn == YYFINAL) |
---|
1786 | YYACCEPT; |
---|
1787 | |
---|
1788 | YYDPRINTF ((stderr, "Shifting error token, ")); |
---|
1789 | |
---|
1790 | *++yyvsp = yylval; |
---|
1791 | |
---|
1792 | |
---|
1793 | yystate = yyn; |
---|
1794 | goto yynewstate; |
---|
1795 | |
---|
1796 | |
---|
1797 | /*-------------------------------------. |
---|
1798 | | yyacceptlab -- YYACCEPT comes here. | |
---|
1799 | `-------------------------------------*/ |
---|
1800 | yyacceptlab: |
---|
1801 | yyresult = 0; |
---|
1802 | goto yyreturn; |
---|
1803 | |
---|
1804 | /*-----------------------------------. |
---|
1805 | | yyabortlab -- YYABORT comes here. | |
---|
1806 | `-----------------------------------*/ |
---|
1807 | yyabortlab: |
---|
1808 | yyresult = 1; |
---|
1809 | goto yyreturn; |
---|
1810 | |
---|
1811 | #ifndef yyoverflow |
---|
1812 | /*----------------------------------------------. |
---|
1813 | | yyoverflowlab -- parser overflow comes here. | |
---|
1814 | `----------------------------------------------*/ |
---|
1815 | yyoverflowlab: |
---|
1816 | yyerror ("parser stack overflow"); |
---|
1817 | yyresult = 2; |
---|
1818 | /* Fall through. */ |
---|
1819 | #endif |
---|
1820 | |
---|
1821 | yyreturn: |
---|
1822 | #ifndef yyoverflow |
---|
1823 | if (yyss != yyssa) |
---|
1824 | YYSTACK_FREE (yyss); |
---|
1825 | #endif |
---|
1826 | return yyresult; |
---|
1827 | } |
---|
1828 | |
---|
1829 | |
---|
1830 | |
---|