]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | /* |
2 | ** Inserted at beginning of c files generated by bison | |
3 | ** REMEMBER: Change bison.reset too. | |
4 | */ | |
5 | ||
6 | /*@-allmacros@*/ | |
7 | /*@+boolint@*/ | |
8 | /*@+charint@*/ | |
9 | /*@-macroparams@*/ | |
10 | /*@-macroundef@*/ | |
11 | /*@-unreachable@*/ | |
12 | /*@-macrospec@*/ | |
13 | /*@-varuse@*/ | |
14 | /*@+ignorequals@*/ | |
15 | /*@-macrostmt@*/ | |
16 | /*@-noeffect@*/ | |
17 | /*@-shadow@*/ | |
18 | /*@-exitarg@*/ | |
19 | /*@-macroredef@*/ | |
20 | /*@-uniondef@*/ | |
21 | /*@-compdef@*/ | |
22 | /*@-matchfields@*/ | |
23 | /*@-exportlocal@*/ | |
24 | /*@-evalorderuncon@*/ | |
25 | /*@-exportheader@*/ | |
26 | /*@-typeuse@*/ | |
27 | /*@-redecl@*/ | |
28 | /*@-redef@*/ | |
29 | /*@-noparams@*/ | |
30 | /*@-ansireserved@*/ | |
31 | /*@-fielduse@*/ | |
32 | /*@-ifblock@*/ | |
33 | /*@-elseifcomplete@*/ | |
34 | /*@-whileblock@*/ | |
35 | /*@-forblock@*/ | |
36 | /*@-branchstate@*/ | |
37 | /*@-readonlytrans@*/ | |
38 | /*@-namechecks@*/ | |
39 | /*@-usedef@*/ | |
40 | /*@-systemunrecog@*/ | |
41 | /*@-dependenttrans@*/ | |
42 | /*@-unqualifiedtrans@*/ | |
43 | /*@-nullassign@*/ | |
bb7c2085 | 44 | /*@-nullpass@*/ |
45 | /*@-nullptrarith*/ | |
46 | /*@-usereleased@*/ | |
bbed3d50 | 47 | /*@-declundef@*/ |
885824d3 | 48 | |
bbed3d50 | 49 | /*drl added 11/27/2001*/ |
bb7c2085 | 50 | /*@-bounds@*/ |
e015e087 | 51 | |
52 | /*drl added 12/11/2002*/ | |
53 | /*@-type@*/ | |
54 | ||
a9ec3280 | 55 | /*@-enummemuse@*/ |
56 | ||
885824d3 | 57 | /* < end of bison.head > */ |
58 | ||
08cf8642 | 59 | /* A Bison parser, made by GNU Bison 2.3. */ |
885824d3 | 60 | |
08cf8642 | 61 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
885824d3 | 62 | |
08cf8642 | 63 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
64 | Free Software Foundation, Inc. | |
65 | ||
66 | This program is free software; you can redistribute it and/or modify | |
67 | it under the terms of the GNU General Public License as published by | |
68 | the Free Software Foundation; either version 2, or (at your option) | |
69 | any later version. | |
70 | ||
71 | This program is distributed in the hope that it will be useful, | |
72 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
73 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
74 | GNU General Public License for more details. | |
75 | ||
76 | You should have received a copy of the GNU General Public License | |
77 | along with this program; if not, write to the Free Software | |
78 | Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
79 | Boston, MA 02110-1301, USA. */ | |
80 | ||
81 | /* As a special exception, you may create a larger work that contains | |
82 | part or all of the Bison parser skeleton and distribute that work | |
83 | under terms of your choice, so long as that work isn't itself a | |
84 | parser generator using the skeleton or a modified version thereof | |
85 | as a parser skeleton. Alternatively, if you modify or redistribute | |
86 | the parser skeleton itself, you may (at your option) remove this | |
87 | special exception, which will cause the skeleton and the resulting | |
88 | Bison output files to be licensed under the GNU General Public | |
89 | License without this special exception. | |
90 | ||
91 | This special exception was added by the Free Software Foundation in | |
92 | version 2.2 of Bison. */ | |
93 | ||
94 | /* C LALR(1) parser skeleton written by Richard Stallman, by | |
95 | simplifying the original so-called "semantic" parser. */ | |
96 | ||
97 | /* All symbols defined below should begin with yy or YY, to avoid | |
98 | infringing on user name space. This should be done even for local | |
99 | variables, as they might otherwise be expanded by user macros. | |
100 | There are some unavoidable exceptions within include files to | |
101 | define necessary library symbols; they are noted "INFRINGES ON | |
102 | USER NAME SPACE" below. */ | |
103 | ||
104 | /* Identify Bison output. */ | |
105 | #define YYBISON 1 | |
106 | ||
107 | /* Bison version. */ | |
108 | #define YYBISON_VERSION "2.3" | |
109 | ||
110 | /* Skeleton name. */ | |
111 | #define YYSKELETON_NAME "yacc.c" | |
112 | ||
113 | /* Pure parsers. */ | |
114 | #define YYPURE 1 | |
115 | ||
116 | /* Using locations. */ | |
117 | #define YYLSP_NEEDED 0 | |
118 | ||
119 | /* Substitute the variable and function names. */ | |
885824d3 | 120 | #define yyparse lslparse |
08cf8642 | 121 | #define yylex lsllex |
885824d3 | 122 | #define yyerror lslerror |
08cf8642 | 123 | #define yylval lsllval |
124 | #define yychar lslchar | |
885824d3 | 125 | #define yydebug lsldebug |
126 | #define yynerrs lslnerrs | |
08cf8642 | 127 | |
128 | ||
129 | /* Tokens. */ | |
130 | #ifndef YYTOKENTYPE | |
131 | # define YYTOKENTYPE | |
132 | /* Put the tokens into the symbol table, so that GDB and other debuggers | |
133 | know about them. */ | |
134 | enum yytokentype { | |
135 | LST_SIMPLEID = 258, | |
136 | LST_LOGICALOP = 259, | |
137 | LST_EQOP = 260, | |
138 | LST_SIMPLEOP = 261, | |
139 | LST_MAPSYM = 262, | |
140 | LST_FIELDMAPSYM = 263, | |
141 | LST_MARKERSYM = 264, | |
142 | LST_ifTOKEN = 265, | |
143 | LST_thenTOKEN = 266, | |
144 | LST_elseTOKEN = 267, | |
145 | LST_LBRACKET = 268, | |
146 | LST_RBRACKET = 269, | |
147 | LST_SELECTSYM = 270, | |
148 | LST_SEPSYM = 271, | |
149 | LST_OPENSYM = 272, | |
150 | LST_CLOSESYM = 273, | |
151 | LST_COLON = 274, | |
152 | LST_COMMA = 275, | |
153 | LST_EOL = 276, | |
154 | LST_COMMENTSYM = 277, | |
155 | LST_WHITESPACE = 278, | |
156 | LST_QUANTIFIERSYM = 279, | |
157 | LST_EQUATIONSYM = 280, | |
158 | LST_EQSEPSYM = 281, | |
159 | LST_COMPOSESYM = 282, | |
160 | LST_LPAR = 283, | |
161 | LST_RPAR = 284, | |
162 | LST_assertsTOKEN = 285, | |
163 | LST_assumesTOKEN = 286, | |
164 | LST_byTOKEN = 287, | |
165 | LST_convertsTOKEN = 288, | |
166 | LST_enumerationTOKEN = 289, | |
167 | LST_equationsTOKEN = 290, | |
168 | LST_exemptingTOKEN = 291, | |
169 | LST_forTOKEN = 292, | |
170 | LST_generatedTOKEN = 293, | |
171 | LST_impliesTOKEN = 294, | |
172 | LST_includesTOKEN = 295, | |
173 | LST_introducesTOKEN = 296, | |
174 | LST_ofTOKEN = 297, | |
175 | LST_partitionedTOKEN = 298, | |
176 | LST_traitTOKEN = 299, | |
177 | LST_tupleTOKEN = 300, | |
178 | LST_unionTOKEN = 301, | |
179 | LST_BADTOKEN = 302 | |
180 | }; | |
181 | #endif | |
182 | /* Tokens. */ | |
183 | #define LST_SIMPLEID 258 | |
184 | #define LST_LOGICALOP 259 | |
185 | #define LST_EQOP 260 | |
186 | #define LST_SIMPLEOP 261 | |
187 | #define LST_MAPSYM 262 | |
188 | #define LST_FIELDMAPSYM 263 | |
189 | #define LST_MARKERSYM 264 | |
190 | #define LST_ifTOKEN 265 | |
191 | #define LST_thenTOKEN 266 | |
192 | #define LST_elseTOKEN 267 | |
193 | #define LST_LBRACKET 268 | |
194 | #define LST_RBRACKET 269 | |
195 | #define LST_SELECTSYM 270 | |
196 | #define LST_SEPSYM 271 | |
197 | #define LST_OPENSYM 272 | |
198 | #define LST_CLOSESYM 273 | |
199 | #define LST_COLON 274 | |
200 | #define LST_COMMA 275 | |
201 | #define LST_EOL 276 | |
202 | #define LST_COMMENTSYM 277 | |
203 | #define LST_WHITESPACE 278 | |
204 | #define LST_QUANTIFIERSYM 279 | |
205 | #define LST_EQUATIONSYM 280 | |
206 | #define LST_EQSEPSYM 281 | |
207 | #define LST_COMPOSESYM 282 | |
208 | #define LST_LPAR 283 | |
209 | #define LST_RPAR 284 | |
210 | #define LST_assertsTOKEN 285 | |
211 | #define LST_assumesTOKEN 286 | |
212 | #define LST_byTOKEN 287 | |
213 | #define LST_convertsTOKEN 288 | |
214 | #define LST_enumerationTOKEN 289 | |
215 | #define LST_equationsTOKEN 290 | |
216 | #define LST_exemptingTOKEN 291 | |
217 | #define LST_forTOKEN 292 | |
218 | #define LST_generatedTOKEN 293 | |
219 | #define LST_impliesTOKEN 294 | |
220 | #define LST_includesTOKEN 295 | |
221 | #define LST_introducesTOKEN 296 | |
222 | #define LST_ofTOKEN 297 | |
223 | #define LST_partitionedTOKEN 298 | |
224 | #define LST_traitTOKEN 299 | |
225 | #define LST_tupleTOKEN 300 | |
226 | #define LST_unionTOKEN 301 | |
227 | #define LST_BADTOKEN 302 | |
228 | ||
229 | ||
230 | ||
231 | ||
232 | /* Copy the first part of user declarations. */ | |
69db2541 | 233 | #line 32 "signature.y" |
885824d3 | 234 | |
235 | ||
885824d3 | 236 | # include <stdio.h> |
1b8ae690 | 237 | # include "splintMacros.nf" |
b73d1009 | 238 | # include "basic.h" |
885824d3 | 239 | # include "lslparse.h" |
240 | # include "signature.h" | |
241 | ||
4dd72714 | 242 | static void lslerror (char *); |
243 | extern int lsllex (); | |
244 | ||
885824d3 | 245 | /*@dependent@*/ /*@null@*/ lslOp importedlslOp; |
246 | ||
247 | /*@-noparams@*/ /* Can't list params since YYSTYPE isn't defined yet. */ | |
248 | static void yyprint (/*FILE *p_file, int p_type, YYSTYPE p_value */); | |
249 | /*@=noparams@*/ | |
250 | ||
251 | # define YYPRINT(file, type, value) yyprint (file, type, value) | |
252 | ||
253 | # define YYDEBUG 1 | |
254 | ||
bbed3d50 | 255 | /*@-redef@*/ |
256 | /*@-readonlytrans@*/ | |
257 | /*@-nullassign@*/ | |
885824d3 | 258 | |
259 | ||
08cf8642 | 260 | |
261 | /* Enabling traces. */ | |
262 | #ifndef YYDEBUG | |
263 | # define YYDEBUG 1 | |
264 | #endif | |
265 | ||
266 | /* Enabling verbose error messages. */ | |
267 | #ifdef YYERROR_VERBOSE | |
268 | # undef YYERROR_VERBOSE | |
269 | # define YYERROR_VERBOSE 1 | |
270 | #else | |
271 | # define YYERROR_VERBOSE 0 | |
272 | #endif | |
273 | ||
274 | /* Enabling the token table. */ | |
275 | #ifndef YYTOKEN_TABLE | |
276 | # define YYTOKEN_TABLE 0 | |
277 | #endif | |
278 | ||
279 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | |
280 | typedef union YYSTYPE | |
69db2541 | 281 | #line 71 "signature.y" |
08cf8642 | 282 | { |
885824d3 | 283 | ltoken ltok; /* a leaf is also an ltoken */ |
284 | unsigned int count; | |
285 | /*@only@*/ ltokenList ltokenList; | |
286 | /*@only@*/ opFormNode opform; | |
287 | /*@owned@*/ sigNode signature; | |
288 | /*@only@*/ nameNode name; | |
289 | /*@owned@*/ lslOp operator; | |
290 | /*@only@*/ lslOpList operators; | |
bbed3d50 | 291 | /*@-redef@*/ /*@-matchfields@*/ |
08cf8642 | 292 | } |
69db2541 | 293 | /* Line 187 of yacc.c. */ |
294 | #line 237 "signature.tab.c" | |
08cf8642 | 295 | YYSTYPE; |
296 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | |
297 | # define YYSTYPE_IS_DECLARED 1 | |
8f58355a | 298 | # define YYSTYPE_IS_TRIVIAL 1 |
885824d3 | 299 | #endif |
368f75ae | 300 | |
301 | ||
302 | ||
08cf8642 | 303 | /* Copy the second part of user declarations. */ |
368f75ae | 304 | |
368f75ae | 305 | |
08cf8642 | 306 | /* Line 216 of yacc.c. */ |
69db2541 | 307 | #line 250 "signature.tab.c" |
368f75ae | 308 | |
08cf8642 | 309 | #ifdef short |
310 | # undef short | |
368f75ae | 311 | #endif |
312 | ||
08cf8642 | 313 | #ifdef YYTYPE_UINT8 |
314 | typedef YYTYPE_UINT8 yytype_uint8; | |
315 | #else | |
316 | typedef unsigned char yytype_uint8; | |
368f75ae | 317 | #endif |
318 | ||
08cf8642 | 319 | #ifdef YYTYPE_INT8 |
320 | typedef YYTYPE_INT8 yytype_int8; | |
321 | #elif (defined __STDC__ || defined __C99__FUNC__ \ | |
322 | || defined __cplusplus || defined _MSC_VER) | |
323 | typedef signed char yytype_int8; | |
324 | #else | |
325 | typedef short int yytype_int8; | |
368f75ae | 326 | #endif |
327 | ||
08cf8642 | 328 | #ifdef YYTYPE_UINT16 |
329 | typedef YYTYPE_UINT16 yytype_uint16; | |
330 | #else | |
331 | typedef unsigned short int yytype_uint16; | |
332 | #endif | |
368f75ae | 333 | |
08cf8642 | 334 | #ifdef YYTYPE_INT16 |
335 | typedef YYTYPE_INT16 yytype_int16; | |
336 | #else | |
337 | typedef short int yytype_int16; | |
338 | #endif | |
368f75ae | 339 | |
08cf8642 | 340 | #ifndef YYSIZE_T |
341 | # ifdef __SIZE_TYPE__ | |
342 | # define YYSIZE_T __SIZE_TYPE__ | |
343 | # elif defined size_t | |
344 | # define YYSIZE_T size_t | |
345 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ | |
346 | || defined __cplusplus || defined _MSC_VER) | |
347 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | |
348 | # define YYSIZE_T size_t | |
349 | # else | |
350 | # define YYSIZE_T unsigned int | |
351 | # endif | |
352 | #endif | |
368f75ae | 353 | |
08cf8642 | 354 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
368f75ae | 355 | |
08cf8642 | 356 | #ifndef YY_ |
357 | # if YYENABLE_NLS | |
358 | # if ENABLE_NLS | |
359 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ | |
360 | # define YY_(msgid) dgettext ("bison-runtime", msgid) | |
361 | # endif | |
362 | # endif | |
363 | # ifndef YY_ | |
364 | # define YY_(msgid) msgid | |
365 | # endif | |
366 | #endif | |
368f75ae | 367 | |
08cf8642 | 368 | /* Suppress unused-variable warnings by "using" E. */ |
369 | #if ! defined lint || defined __GNUC__ | |
370 | # define YYUSE(e) ((void) (e)) | |
371 | #else | |
372 | # define YYUSE(e) /* empty */ | |
373 | #endif | |
885824d3 | 374 | |
08cf8642 | 375 | /* Identity function, used to suppress warnings about constant conditions. */ |
376 | #ifndef lint | |
377 | # define YYID(n) (n) | |
378 | #else | |
379 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
380 | || defined __cplusplus || defined _MSC_VER) | |
381 | static int | |
382 | YYID (int i) | |
383 | #else | |
384 | static int | |
385 | YYID (i) | |
386 | int i; | |
387 | #endif | |
368f75ae | 388 | { |
08cf8642 | 389 | return i; |
390 | } | |
391 | #endif | |
368f75ae | 392 | |
08cf8642 | 393 | #if ! defined yyoverflow || YYERROR_VERBOSE |
e5081f8c | 394 | |
395 | /* The parser invokes alloca or malloc; define the necessary symbols. */ | |
396 | ||
08cf8642 | 397 | # ifdef YYSTACK_USE_ALLOCA |
398 | # if YYSTACK_USE_ALLOCA | |
399 | # ifdef __GNUC__ | |
400 | # define YYSTACK_ALLOC __builtin_alloca | |
401 | # elif defined __BUILTIN_VA_ARG_INCR | |
402 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ | |
403 | # elif defined _AIX | |
404 | # define YYSTACK_ALLOC __alloca | |
405 | # elif defined _MSC_VER | |
406 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ | |
407 | # define alloca _alloca | |
e5081f8c | 408 | # else |
08cf8642 | 409 | # define YYSTACK_ALLOC alloca |
410 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | |
411 | || defined __cplusplus || defined _MSC_VER) | |
412 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
413 | # ifndef _STDLIB_H | |
414 | # define _STDLIB_H 1 | |
415 | # endif | |
e5081f8c | 416 | # endif |
417 | # endif | |
418 | # endif | |
419 | # endif | |
420 | ||
421 | # ifdef YYSTACK_ALLOC | |
08cf8642 | 422 | /* Pacify GCC's `empty if-body' warning. */ |
423 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) | |
424 | # ifndef YYSTACK_ALLOC_MAXIMUM | |
425 | /* The OS might guarantee only one guard page at the bottom of the stack, | |
426 | and a page size can be as small as 4096 bytes. So we cannot safely | |
427 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number | |
428 | to allow for a few compiler-allocated temporary stack slots. */ | |
429 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ | |
430 | # endif | |
e5081f8c | 431 | # else |
08cf8642 | 432 | # define YYSTACK_ALLOC YYMALLOC |
433 | # define YYSTACK_FREE YYFREE | |
434 | # ifndef YYSTACK_ALLOC_MAXIMUM | |
435 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM | |
436 | # endif | |
437 | # if (defined __cplusplus && ! defined _STDLIB_H \ | |
438 | && ! ((defined YYMALLOC || defined malloc) \ | |
439 | && (defined YYFREE || defined free))) | |
e5081f8c | 440 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
08cf8642 | 441 | # ifndef _STDLIB_H |
442 | # define _STDLIB_H 1 | |
443 | # endif | |
444 | # endif | |
445 | # ifndef YYMALLOC | |
446 | # define YYMALLOC malloc | |
447 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | |
448 | || defined __cplusplus || defined _MSC_VER) | |
449 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ | |
450 | # endif | |
451 | # endif | |
452 | # ifndef YYFREE | |
453 | # define YYFREE free | |
454 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | |
455 | || defined __cplusplus || defined _MSC_VER) | |
456 | void free (void *); /* INFRINGES ON USER NAME SPACE */ | |
457 | # endif | |
e5081f8c | 458 | # endif |
e5081f8c | 459 | # endif |
08cf8642 | 460 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
e5081f8c | 461 | |
462 | ||
08cf8642 | 463 | #if (! defined yyoverflow \ |
464 | && (! defined __cplusplus \ | |
465 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) | |
e5081f8c | 466 | |
467 | /* A type that is properly aligned for any stack member. */ | |
468 | union yyalloc | |
469 | { | |
08cf8642 | 470 | yytype_int16 yyss; |
e5081f8c | 471 | YYSTYPE yyvs; |
08cf8642 | 472 | }; |
e5081f8c | 473 | |
474 | /* The size of the maximum gap between one aligned stack and the next. */ | |
08cf8642 | 475 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
e5081f8c | 476 | |
477 | /* The size of an array large to enough to hold all stacks, each with | |
478 | N elements. */ | |
08cf8642 | 479 | # define YYSTACK_BYTES(N) \ |
480 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ | |
481 | + YYSTACK_GAP_MAXIMUM) | |
e5081f8c | 482 | |
483 | /* Copy COUNT objects from FROM to TO. The source and destination do | |
484 | not overlap. */ | |
485 | # ifndef YYCOPY | |
08cf8642 | 486 | # if defined __GNUC__ && 1 < __GNUC__ |
e5081f8c | 487 | # define YYCOPY(To, From, Count) \ |
488 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | |
489 | # else | |
490 | # define YYCOPY(To, From, Count) \ | |
491 | do \ | |
492 | { \ | |
08cf8642 | 493 | YYSIZE_T yyi; \ |
e5081f8c | 494 | for (yyi = 0; yyi < (Count); yyi++) \ |
495 | (To)[yyi] = (From)[yyi]; \ | |
496 | } \ | |
08cf8642 | 497 | while (YYID (0)) |
e5081f8c | 498 | # endif |
499 | # endif | |
500 | ||
501 | /* Relocate STACK from its old location to the new one. The | |
502 | local variables YYSIZE and YYSTACKSIZE give the old and new number of | |
503 | elements in the stack, and YYPTR gives the new location of the | |
504 | stack. Advance YYPTR to a properly aligned location for the next | |
505 | stack. */ | |
506 | # define YYSTACK_RELOCATE(Stack) \ | |
507 | do \ | |
508 | { \ | |
509 | YYSIZE_T yynewbytes; \ | |
510 | YYCOPY (&yyptr->Stack, Stack, yysize); \ | |
511 | Stack = &yyptr->Stack; \ | |
08cf8642 | 512 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
e5081f8c | 513 | yyptr += yynewbytes / sizeof (*yyptr); \ |
514 | } \ | |
08cf8642 | 515 | while (YYID (0)) |
d0b80d80 | 516 | |
d0b80d80 | 517 | #endif |
e5081f8c | 518 | |
08cf8642 | 519 | /* YYFINAL -- State number of the termination state. */ |
520 | #define YYFINAL 28 | |
521 | /* YYLAST -- Last index in YYTABLE. */ | |
522 | #define YYLAST 54 | |
523 | ||
524 | /* YYNTOKENS -- Number of terminals. */ | |
525 | #define YYNTOKENS 48 | |
526 | /* YYNNTS -- Number of nonterminals. */ | |
527 | #define YYNNTS 15 | |
528 | /* YYNRULES -- Number of rules. */ | |
529 | #define YYNRULES 39 | |
530 | /* YYNRULES -- Number of states. */ | |
531 | #define YYNSTATES 62 | |
532 | ||
533 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ | |
534 | #define YYUNDEFTOK 2 | |
535 | #define YYMAXUTOK 302 | |
536 | ||
537 | #define YYTRANSLATE(YYX) \ | |
538 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | |
539 | ||
540 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ | |
541 | static const yytype_uint8 yytranslate[] = | |
542 | { | |
543 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
544 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
545 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
546 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
547 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
548 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
549 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
550 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
551 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
552 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
553 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
554 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
555 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
556 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
557 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
558 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
559 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
560 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
561 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
562 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
563 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
564 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
565 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
566 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
567 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
568 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, | |
569 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | |
570 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | |
571 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | |
572 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | |
573 | 45, 46, 47 | |
574 | }; | |
575 | ||
576 | #if YYDEBUG | |
577 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | |
578 | YYRHS. */ | |
579 | static const yytype_uint8 yyprhs[] = | |
580 | { | |
581 | 0, 0, 3, 5, 7, 10, 14, 16, 18, 25, | |
582 | 27, 30, 33, 37, 41, 46, 51, 57, 61, 66, | |
583 | 71, 77, 80, 84, 88, 90, 92, 94, 95, 97, | |
584 | 99, 103, 105, 107, 111, 112, 114, 116, 120, 122 | |
585 | }; | |
586 | ||
587 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ | |
588 | static const yytype_int8 yyrhs[] = | |
589 | { | |
590 | 49, 0, -1, 50, -1, 51, -1, 50, 51, -1, | |
591 | 52, 19, 58, -1, 62, -1, 53, -1, 10, 9, | |
592 | 11, 9, 12, 9, -1, 54, -1, 9, 54, -1, | |
593 | 54, 9, -1, 9, 54, 9, -1, 17, 55, 18, | |
594 | -1, 9, 17, 55, 18, -1, 17, 55, 18, 9, | |
595 | -1, 9, 17, 55, 18, 9, -1, 13, 55, 14, | |
596 | -1, 9, 13, 55, 14, -1, 13, 55, 14, 9, | |
597 | -1, 9, 13, 55, 14, 9, -1, 15, 3, -1, | |
598 | 9, 15, 3, -1, 9, 8, 3, -1, 6, -1, | |
599 | 4, -1, 5, -1, -1, 56, -1, 9, -1, 56, | |
600 | 57, 9, -1, 20, -1, 16, -1, 59, 7, 61, | |
601 | -1, -1, 60, -1, 61, -1, 60, 20, 61, -1, | |
602 | 3, -1, 3, -1 | |
603 | }; | |
e5081f8c | 604 | |
08cf8642 | 605 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
606 | static const yytype_uint16 yyrline[] = | |
607 | { | |
608 | 0, 139, 139, 142, 147, 152, 159, 161, 166, 168, | |
609 | 170, 172, 174, 176, 178, 180, 182, 185, 188, 191, | |
610 | 194, 197, 200, 205, 210, 212, 214, 219, 220, 224, | |
611 | 226, 230, 232, 236, 241, 242, 246, 248, 252, 259 | |
612 | }; | |
d0b80d80 | 613 | #endif |
08cf8642 | 614 | |
615 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE | |
616 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. | |
617 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | |
618 | static const char *const yytname[] = | |
619 | { | |
620 | "$end", "error", "$undefined", "LST_SIMPLEID", "LST_LOGICALOP", | |
621 | "LST_EQOP", "LST_SIMPLEOP", "LST_MAPSYM", "LST_FIELDMAPSYM", | |
622 | "LST_MARKERSYM", "LST_ifTOKEN", "LST_thenTOKEN", "LST_elseTOKEN", | |
623 | "LST_LBRACKET", "LST_RBRACKET", "LST_SELECTSYM", "LST_SEPSYM", | |
624 | "LST_OPENSYM", "LST_CLOSESYM", "LST_COLON", "LST_COMMA", "LST_EOL", | |
625 | "LST_COMMENTSYM", "LST_WHITESPACE", "LST_QUANTIFIERSYM", | |
626 | "LST_EQUATIONSYM", "LST_EQSEPSYM", "LST_COMPOSESYM", "LST_LPAR", | |
627 | "LST_RPAR", "LST_assertsTOKEN", "LST_assumesTOKEN", "LST_byTOKEN", | |
628 | "LST_convertsTOKEN", "LST_enumerationTOKEN", "LST_equationsTOKEN", | |
629 | "LST_exemptingTOKEN", "LST_forTOKEN", "LST_generatedTOKEN", | |
630 | "LST_impliesTOKEN", "LST_includesTOKEN", "LST_introducesTOKEN", | |
631 | "LST_ofTOKEN", "LST_partitionedTOKEN", "LST_traitTOKEN", | |
632 | "LST_tupleTOKEN", "LST_unionTOKEN", "LST_BADTOKEN", "$accept", "top", | |
633 | "operatorList", "operator", "name", "opForm", "anyOp", "middle", | |
634 | "placeList", "separator", "signature", "domain", "sortList", "sortId", | |
635 | "opId", 0 | |
636 | }; | |
e5081f8c | 637 | #endif |
08cf8642 | 638 | |
639 | # ifdef YYPRINT | |
640 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to | |
641 | token YYLEX-NUM. */ | |
642 | static const yytype_uint16 yytoknum[] = | |
643 | { | |
644 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | |
645 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | |
646 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, | |
647 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | |
648 | 295, 296, 297, 298, 299, 300, 301, 302 | |
649 | }; | |
e5081f8c | 650 | # endif |
08cf8642 | 651 | |
652 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | |
653 | static const yytype_uint8 yyr1[] = | |
654 | { | |
655 | 0, 48, 49, 50, 50, 51, 52, 52, 53, 53, | |
656 | 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, | |
657 | 53, 53, 53, 53, 54, 54, 54, 55, 55, 56, | |
658 | 56, 57, 57, 58, 59, 59, 60, 60, 61, 62 | |
659 | }; | |
660 | ||
661 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | |
662 | static const yytype_uint8 yyr2[] = | |
663 | { | |
664 | 0, 2, 1, 1, 2, 3, 1, 1, 6, 1, | |
665 | 2, 2, 3, 3, 4, 4, 5, 3, 4, 4, | |
666 | 5, 2, 3, 3, 1, 1, 1, 0, 1, 1, | |
667 | 3, 1, 1, 3, 0, 1, 1, 3, 1, 1 | |
668 | }; | |
669 | ||
670 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | |
671 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero | |
672 | means the default is an error. */ | |
673 | static const yytype_uint8 yydefact[] = | |
674 | { | |
675 | 0, 39, 25, 26, 24, 0, 0, 27, 0, 27, | |
676 | 0, 2, 3, 0, 7, 9, 6, 0, 27, 0, | |
677 | 27, 10, 0, 29, 0, 28, 21, 0, 1, 4, | |
678 | 34, 11, 23, 0, 22, 0, 12, 0, 17, 32, | |
679 | 31, 0, 13, 38, 5, 0, 35, 36, 18, 14, | |
680 | 0, 19, 30, 15, 0, 0, 20, 16, 0, 33, | |
681 | 37, 8 | |
682 | }; | |
683 | ||
684 | /* YYDEFGOTO[NTERM-NUM]. */ | |
685 | static const yytype_int8 yydefgoto[] = | |
686 | { | |
687 | -1, 10, 11, 12, 13, 14, 15, 24, 25, 41, | |
688 | 44, 45, 46, 47, 16 | |
689 | }; | |
690 | ||
691 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | |
692 | STATE-NUM. */ | |
693 | #define YYPACT_NINF -34 | |
694 | static const yytype_int8 yypact[] = | |
695 | { | |
696 | -3, -34, -34, -34, -34, 11, -4, 2, 10, 2, | |
697 | 23, -3, -34, 6, -34, 18, -34, 26, 2, 27, | |
698 | 2, 22, 21, -34, 19, -12, -34, 16, -34, -34, | |
699 | 32, -34, -34, 24, -34, 25, -34, 28, 30, -34, | |
700 | -34, 31, 33, -34, -34, 29, 34, -34, 35, 36, | |
701 | 37, -34, -34, -34, 32, 32, -34, -34, 38, -34, | |
702 | -34, -34 | |
703 | }; | |
704 | ||
705 | /* YYPGOTO[NTERM-NUM]. */ | |
706 | static const yytype_int8 yypgoto[] = | |
707 | { | |
708 | -34, -34, -34, 39, -34, -34, 41, 0, -34, -34, | |
709 | -34, -34, -34, -33, -34 | |
710 | }; | |
711 | ||
712 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | |
713 | positive, shift that token. If negative, reduce the rule which | |
714 | number is the opposite. If zero, do what YYDEFACT says. | |
715 | If YYTABLE_NINF, syntax error. */ | |
716 | #define YYTABLE_NINF -1 | |
717 | static const yytype_uint8 yytable[] = | |
718 | { | |
719 | 1, 2, 3, 4, 39, 22, 5, 6, 40, 27, | |
720 | 7, 23, 8, 26, 9, 2, 3, 4, 33, 17, | |
721 | 35, 59, 60, 28, 18, 30, 19, 31, 20, 32, | |
722 | 34, 36, 37, 38, 42, 43, 54, 50, 48, 51, | |
723 | 52, 0, 53, 49, 56, 57, 21, 61, 0, 58, | |
724 | 29, 0, 0, 0, 55 | |
725 | }; | |
726 | ||
727 | static const yytype_int8 yycheck[] = | |
728 | { | |
729 | 3, 4, 5, 6, 16, 9, 9, 10, 20, 9, | |
730 | 13, 9, 15, 3, 17, 4, 5, 6, 18, 8, | |
731 | 20, 54, 55, 0, 13, 19, 15, 9, 17, 3, | |
732 | 3, 9, 11, 14, 18, 3, 7, 9, 14, 9, | |
733 | 9, -1, 9, 18, 9, 9, 5, 9, -1, 12, | |
734 | 11, -1, -1, -1, 20 | |
735 | }; | |
736 | ||
737 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | |
738 | symbol of state STATE-NUM. */ | |
739 | static const yytype_uint8 yystos[] = | |
740 | { | |
741 | 0, 3, 4, 5, 6, 9, 10, 13, 15, 17, | |
742 | 49, 50, 51, 52, 53, 54, 62, 8, 13, 15, | |
743 | 17, 54, 9, 9, 55, 56, 3, 55, 0, 51, | |
744 | 19, 9, 3, 55, 3, 55, 9, 11, 14, 16, | |
745 | 20, 57, 18, 3, 58, 59, 60, 61, 14, 18, | |
746 | 9, 9, 9, 9, 7, 20, 9, 9, 12, 61, | |
747 | 61, 9 | |
748 | }; | |
0866200b | 749 | |
885824d3 | 750 | #define yyerrok (yyerrstatus = 0) |
751 | #define yyclearin (yychar = YYEMPTY) | |
08cf8642 | 752 | #define YYEMPTY (-2) |
885824d3 | 753 | #define YYEOF 0 |
08cf8642 | 754 | |
bbed3d50 | 755 | #define YYACCEPT goto yyacceptlab |
08cf8642 | 756 | #define YYABORT goto yyabortlab |
757 | #define YYERROR goto yyerrorlab | |
758 | ||
759 | ||
e5081f8c | 760 | /* Like YYERROR except do call yyerror. This remains here temporarily |
761 | to ease the transition to the new meaning of YYERROR, for GCC. | |
885824d3 | 762 | Once GCC version 2 has supplanted version 1, this can go. */ |
08cf8642 | 763 | |
885824d3 | 764 | #define YYFAIL goto yyerrlab |
08cf8642 | 765 | |
885824d3 | 766 | #define YYRECOVERING() (!!yyerrstatus) |
08cf8642 | 767 | |
e5081f8c | 768 | #define YYBACKUP(Token, Value) \ |
885824d3 | 769 | do \ |
770 | if (yychar == YYEMPTY && yylen == 1) \ | |
e5081f8c | 771 | { \ |
772 | yychar = (Token); \ | |
773 | yylval = (Value); \ | |
08cf8642 | 774 | yytoken = YYTRANSLATE (yychar); \ |
775 | YYPOPSTACK (1); \ | |
885824d3 | 776 | goto yybackup; \ |
777 | } \ | |
778 | else \ | |
08cf8642 | 779 | { \ |
780 | yyerror (YY_("syntax error: cannot back up")); \ | |
e5081f8c | 781 | YYERROR; \ |
782 | } \ | |
08cf8642 | 783 | while (YYID (0)) |
784 | ||
885824d3 | 785 | |
786 | #define YYTERROR 1 | |
787 | #define YYERRCODE 256 | |
788 | ||
368f75ae | 789 | |
08cf8642 | 790 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
791 | If N is 0, then set CURRENT to the empty location which ends | |
792 | the previous symbol: RHS[0] (always defined). */ | |
885824d3 | 793 | |
08cf8642 | 794 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
e5081f8c | 795 | #ifndef YYLLOC_DEFAULT |
08cf8642 | 796 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
797 | do \ | |
798 | if (YYID (N)) \ | |
799 | { \ | |
800 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ | |
801 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ | |
802 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ | |
803 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ | |
804 | } \ | |
805 | else \ | |
806 | { \ | |
807 | (Current).first_line = (Current).last_line = \ | |
808 | YYRHSLOC (Rhs, 0).last_line; \ | |
809 | (Current).first_column = (Current).last_column = \ | |
810 | YYRHSLOC (Rhs, 0).last_column; \ | |
811 | } \ | |
812 | while (YYID (0)) | |
885824d3 | 813 | #endif |
814 | ||
368f75ae | 815 | |
08cf8642 | 816 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
817 | This macro was not mandated originally: define only if we know | |
818 | we won't break user code: when these are the locations we know. */ | |
e5081f8c | 819 | |
08cf8642 | 820 | #ifndef YY_LOCATION_PRINT |
821 | # if YYLTYPE_IS_TRIVIAL | |
822 | # define YY_LOCATION_PRINT(File, Loc) \ | |
823 | fprintf (File, "%d.%d-%d.%d", \ | |
824 | (Loc).first_line, (Loc).first_column, \ | |
825 | (Loc).last_line, (Loc).last_column) | |
826 | # else | |
827 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) | |
828 | # endif | |
829 | #endif | |
830 | ||
831 | ||
832 | /* YYLEX -- calling `yylex' with the right arguments. */ | |
368f75ae | 833 | |
08cf8642 | 834 | #ifdef YYLEX_PARAM |
835 | # define YYLEX yylex (&yylval, YYLEX_PARAM) | |
836 | #else | |
837 | # define YYLEX yylex (&yylval) | |
838 | #endif | |
e5081f8c | 839 | |
840 | /* Enable debugging if requested. */ | |
841 | #if YYDEBUG | |
842 | ||
843 | # ifndef YYFPRINTF | |
844 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ | |
845 | # define YYFPRINTF fprintf | |
846 | # endif | |
847 | ||
848 | # define YYDPRINTF(Args) \ | |
849 | do { \ | |
850 | if (yydebug) \ | |
851 | YYFPRINTF Args; \ | |
08cf8642 | 852 | } while (YYID (0)) |
853 | ||
854 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ | |
855 | do { \ | |
856 | if (yydebug) \ | |
857 | { \ | |
858 | YYFPRINTF (stderr, "%s ", Title); \ | |
859 | yy_symbol_print (stderr, \ | |
860 | Type, Value); \ | |
861 | YYFPRINTF (stderr, "\n"); \ | |
862 | } \ | |
863 | } while (YYID (0)) | |
864 | ||
865 | ||
866 | /*--------------------------------. | |
867 | | Print this symbol on YYOUTPUT. | | |
868 | `--------------------------------*/ | |
869 | ||
870 | /*ARGSUSED*/ | |
871 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
872 | || defined __cplusplus || defined _MSC_VER) | |
873 | static void | |
874 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) | |
875 | #else | |
876 | static void | |
877 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) | |
878 | FILE *yyoutput; | |
879 | int yytype; | |
880 | YYSTYPE const * const yyvaluep; | |
881 | #endif | |
882 | { | |
883 | if (!yyvaluep) | |
884 | return; | |
885 | # ifdef YYPRINT | |
886 | if (yytype < YYNTOKENS) | |
887 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | |
888 | # else | |
889 | YYUSE (yyoutput); | |
890 | # endif | |
891 | switch (yytype) | |
892 | { | |
893 | default: | |
894 | break; | |
895 | } | |
896 | } | |
897 | ||
898 | ||
899 | /*--------------------------------. | |
900 | | Print this symbol on YYOUTPUT. | | |
901 | `--------------------------------*/ | |
902 | ||
903 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
904 | || defined __cplusplus || defined _MSC_VER) | |
905 | static void | |
906 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) | |
907 | #else | |
908 | static void | |
909 | yy_symbol_print (yyoutput, yytype, yyvaluep) | |
910 | FILE *yyoutput; | |
911 | int yytype; | |
912 | YYSTYPE const * const yyvaluep; | |
913 | #endif | |
914 | { | |
915 | if (yytype < YYNTOKENS) | |
916 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); | |
917 | else | |
918 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); | |
919 | ||
920 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); | |
921 | YYFPRINTF (yyoutput, ")"); | |
922 | } | |
923 | ||
924 | /*------------------------------------------------------------------. | |
925 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | | |
926 | | TOP (included). | | |
927 | `------------------------------------------------------------------*/ | |
928 | ||
929 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
930 | || defined __cplusplus || defined _MSC_VER) | |
931 | static void | |
932 | yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) | |
933 | #else | |
934 | static void | |
935 | yy_stack_print (bottom, top) | |
936 | yytype_int16 *bottom; | |
937 | yytype_int16 *top; | |
938 | #endif | |
939 | { | |
940 | YYFPRINTF (stderr, "Stack now"); | |
941 | for (; bottom <= top; ++bottom) | |
942 | YYFPRINTF (stderr, " %d", *bottom); | |
943 | YYFPRINTF (stderr, "\n"); | |
944 | } | |
945 | ||
946 | # define YY_STACK_PRINT(Bottom, Top) \ | |
947 | do { \ | |
948 | if (yydebug) \ | |
949 | yy_stack_print ((Bottom), (Top)); \ | |
950 | } while (YYID (0)) | |
951 | ||
952 | ||
953 | /*------------------------------------------------. | |
954 | | Report that the YYRULE is going to be reduced. | | |
955 | `------------------------------------------------*/ | |
956 | ||
957 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
958 | || defined __cplusplus || defined _MSC_VER) | |
959 | static void | |
960 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) | |
961 | #else | |
962 | static void | |
963 | yy_reduce_print (yyvsp, yyrule) | |
964 | YYSTYPE *yyvsp; | |
965 | int yyrule; | |
966 | #endif | |
967 | { | |
968 | int yynrhs = yyr2[yyrule]; | |
969 | int yyi; | |
970 | unsigned long int yylno = yyrline[yyrule]; | |
971 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", | |
972 | yyrule - 1, yylno); | |
973 | /* The symbols being reduced. */ | |
974 | for (yyi = 0; yyi < yynrhs; yyi++) | |
975 | { | |
976 | fprintf (stderr, " $%d = ", yyi + 1); | |
977 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], | |
978 | &(yyvsp[(yyi + 1) - (yynrhs)]) | |
979 | ); | |
980 | fprintf (stderr, "\n"); | |
981 | } | |
982 | } | |
983 | ||
984 | # define YY_REDUCE_PRINT(Rule) \ | |
985 | do { \ | |
986 | if (yydebug) \ | |
987 | yy_reduce_print (yyvsp, Rule); \ | |
988 | } while (YYID (0)) | |
989 | ||
e5081f8c | 990 | /* Nonzero means print parse trace. It is left uninitialized so that |
991 | multiple parsers can coexist. */ | |
992 | int yydebug; | |
993 | #else /* !YYDEBUG */ | |
994 | # define YYDPRINTF(Args) | |
08cf8642 | 995 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
996 | # define YY_STACK_PRINT(Bottom, Top) | |
997 | # define YY_REDUCE_PRINT(Rule) | |
e5081f8c | 998 | #endif /* !YYDEBUG */ |
999 | ||
08cf8642 | 1000 | |
e5081f8c | 1001 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
0866200b | 1002 | #ifndef YYINITDEPTH |
e5081f8c | 1003 | # define YYINITDEPTH 200 |
0866200b | 1004 | #endif |
d0b80d80 | 1005 | |
e5081f8c | 1006 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
1007 | if the built-in stack extension method is used). | |
1008 | ||
1009 | Do not make this value too large; the results are undefined if | |
08cf8642 | 1010 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
e5081f8c | 1011 | evaluated with infinite-precision integer arithmetic. */ |
a889b5ee | 1012 | |
885824d3 | 1013 | #ifndef YYMAXDEPTH |
e5081f8c | 1014 | # define YYMAXDEPTH 10000 |
885824d3 | 1015 | #endif |
08cf8642 | 1016 | |
1ac6313d | 1017 | \f |
08cf8642 | 1018 | |
1019 | #if YYERROR_VERBOSE | |
885824d3 | 1020 | |
e5081f8c | 1021 | # ifndef yystrlen |
08cf8642 | 1022 | # if defined __GLIBC__ && defined _STRING_H |
e5081f8c | 1023 | # define yystrlen strlen |
1024 | # else | |
1025 | /* Return the length of YYSTR. */ | |
08cf8642 | 1026 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
1027 | || defined __cplusplus || defined _MSC_VER) | |
e5081f8c | 1028 | static YYSIZE_T |
e5081f8c | 1029 | yystrlen (const char *yystr) |
08cf8642 | 1030 | #else |
1031 | static YYSIZE_T | |
e5081f8c | 1032 | yystrlen (yystr) |
08cf8642 | 1033 | const char *yystr; |
1034 | #endif | |
e5081f8c | 1035 | { |
08cf8642 | 1036 | YYSIZE_T yylen; |
1037 | for (yylen = 0; yystr[yylen]; yylen++) | |
e5081f8c | 1038 | continue; |
08cf8642 | 1039 | return yylen; |
e5081f8c | 1040 | } |
1041 | # endif | |
1042 | # endif | |
1043 | ||
1044 | # ifndef yystpcpy | |
08cf8642 | 1045 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
e5081f8c | 1046 | # define yystpcpy stpcpy |
1047 | # else | |
1048 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | |
1049 | YYDEST. */ | |
08cf8642 | 1050 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
1051 | || defined __cplusplus || defined _MSC_VER) | |
e5081f8c | 1052 | static char * |
e5081f8c | 1053 | yystpcpy (char *yydest, const char *yysrc) |
08cf8642 | 1054 | #else |
1055 | static char * | |
e5081f8c | 1056 | yystpcpy (yydest, yysrc) |
08cf8642 | 1057 | char *yydest; |
1058 | const char *yysrc; | |
1059 | #endif | |
0866200b | 1060 | { |
08cf8642 | 1061 | char *yyd = yydest; |
1062 | const char *yys = yysrc; | |
a889b5ee | 1063 | |
e5081f8c | 1064 | while ((*yyd++ = *yys++) != '\0') |
1065 | continue; | |
0866200b | 1066 | |
e5081f8c | 1067 | return yyd - 1; |
1068 | } | |
1069 | # endif | |
1070 | # endif | |
885824d3 | 1071 | |
08cf8642 | 1072 | # ifndef yytnamerr |
1073 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary | |
1074 | quotes and backslashes, so that it's suitable for yyerror. The | |
1075 | heuristic is that double-quoting is unnecessary unless the string | |
1076 | contains an apostrophe, a comma, or backslash (other than | |
1077 | backslash-backslash). YYSTR is taken from yytname. If YYRES is | |
1078 | null, do not copy; instead, return the length of what the result | |
1079 | would have been. */ | |
1080 | static YYSIZE_T | |
1081 | yytnamerr (char *yyres, const char *yystr) | |
1082 | { | |
1083 | if (*yystr == '"') | |
1084 | { | |
1085 | YYSIZE_T yyn = 0; | |
1086 | char const *yyp = yystr; | |
1087 | ||
1088 | for (;;) | |
1089 | switch (*++yyp) | |
1090 | { | |
1091 | case '\'': | |
1092 | case ',': | |
1093 | goto do_not_strip_quotes; | |
1094 | ||
1095 | case '\\': | |
1096 | if (*++yyp != '\\') | |
1097 | goto do_not_strip_quotes; | |
1098 | /* Fall through. */ | |
1099 | default: | |
1100 | if (yyres) | |
1101 | yyres[yyn] = *yyp; | |
1102 | yyn++; | |
1103 | break; | |
1104 | ||
1105 | case '"': | |
1106 | if (yyres) | |
1107 | yyres[yyn] = '\0'; | |
1108 | return yyn; | |
1109 | } | |
1110 | do_not_strip_quotes: ; | |
1111 | } | |
368f75ae | 1112 | |
08cf8642 | 1113 | if (! yyres) |
1114 | return yystrlen (yystr); | |
885824d3 | 1115 | |
08cf8642 | 1116 | return yystpcpy (yyres, yystr) - yyres; |
1117 | } | |
e5081f8c | 1118 | # endif |
08cf8642 | 1119 | |
1120 | /* Copy into YYRESULT an error message about the unexpected token | |
1121 | YYCHAR while in state YYSTATE. Return the number of bytes copied, | |
1122 | including the terminating null byte. If YYRESULT is null, do not | |
1123 | copy anything; just return the number of bytes that would be | |
1124 | copied. As a special case, return 0 if an ordinary "syntax error" | |
1125 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during | |
1126 | size calculation. */ | |
1127 | static YYSIZE_T | |
1128 | yysyntax_error (char *yyresult, int yystate, int yychar) | |
1129 | { | |
1130 | int yyn = yypact[yystate]; | |
1131 | ||
1132 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) | |
1133 | return 0; | |
1134 | else | |
1135 | { | |
1136 | int yytype = YYTRANSLATE (yychar); | |
1137 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); | |
1138 | YYSIZE_T yysize = yysize0; | |
1139 | YYSIZE_T yysize1; | |
1140 | int yysize_overflow = 0; | |
1141 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | |
1142 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | |
1143 | int yyx; | |
1144 | ||
1145 | # if 0 | |
1146 | /* This is so xgettext sees the translatable formats that are | |
1147 | constructed on the fly. */ | |
1148 | YY_("syntax error, unexpected %s"); | |
1149 | YY_("syntax error, unexpected %s, expecting %s"); | |
1150 | YY_("syntax error, unexpected %s, expecting %s or %s"); | |
1151 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); | |
1152 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); | |
368f75ae | 1153 | # endif |
08cf8642 | 1154 | char *yyfmt; |
1155 | char const *yyf; | |
1156 | static char const yyunexpected[] = "syntax error, unexpected %s"; | |
1157 | static char const yyexpecting[] = ", expecting %s"; | |
1158 | static char const yyor[] = " or %s"; | |
1159 | char yyformat[sizeof yyunexpected | |
1160 | + sizeof yyexpecting - 1 | |
1161 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) | |
1162 | * (sizeof yyor - 1))]; | |
1163 | char const *yyprefix = yyexpecting; | |
1164 | ||
1165 | /* Start YYX at -YYN if negative to avoid negative indexes in | |
1166 | YYCHECK. */ | |
1167 | int yyxbegin = yyn < 0 ? -yyn : 0; | |
1168 | ||
1169 | /* Stay within bounds of both yycheck and yytname. */ | |
1170 | int yychecklim = YYLAST - yyn + 1; | |
1171 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; | |
1172 | int yycount = 1; | |
1173 | ||
1174 | yyarg[0] = yytname[yytype]; | |
1175 | yyfmt = yystpcpy (yyformat, yyunexpected); | |
1176 | ||
1177 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) | |
1178 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | |
1179 | { | |
1180 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) | |
1181 | { | |
1182 | yycount = 1; | |
1183 | yysize = yysize0; | |
1184 | yyformat[sizeof yyunexpected - 1] = '\0'; | |
1185 | break; | |
1186 | } | |
1187 | yyarg[yycount++] = yytname[yyx]; | |
1188 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); | |
1189 | yysize_overflow |= (yysize1 < yysize); | |
1190 | yysize = yysize1; | |
1191 | yyfmt = yystpcpy (yyfmt, yyprefix); | |
1192 | yyprefix = yyor; | |
1193 | } | |
1194 | ||
1195 | yyf = YY_(yyformat); | |
1196 | yysize1 = yysize + yystrlen (yyf); | |
1197 | yysize_overflow |= (yysize1 < yysize); | |
1198 | yysize = yysize1; | |
1199 | ||
1200 | if (yysize_overflow) | |
1201 | return YYSIZE_MAXIMUM; | |
1202 | ||
1203 | if (yyresult) | |
1204 | { | |
1205 | /* Avoid sprintf, as that infringes on the user's name space. | |
1206 | Don't have undefined behavior even if the translation | |
1207 | produced a string with the wrong number of "%s"s. */ | |
1208 | char *yyp = yyresult; | |
1209 | int yyi = 0; | |
1210 | while ((*yyp = *yyf) != '\0') | |
1211 | { | |
1212 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) | |
1213 | { | |
1214 | yyp += yytnamerr (yyp, yyarg[yyi++]); | |
1215 | yyf += 2; | |
1216 | } | |
1217 | else | |
1218 | { | |
1219 | yyp++; | |
1220 | yyf++; | |
1221 | } | |
1222 | } | |
1223 | } | |
1224 | return yysize; | |
1225 | } | |
1226 | } | |
1227 | #endif /* YYERROR_VERBOSE */ | |
1228 | \f | |
1229 | ||
1230 | /*-----------------------------------------------. | |
1231 | | Release the memory associated to this symbol. | | |
1232 | `-----------------------------------------------*/ | |
1233 | ||
1234 | /*ARGSUSED*/ | |
1235 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1236 | || defined __cplusplus || defined _MSC_VER) | |
1237 | static void | |
1238 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) | |
1239 | #else | |
1240 | static void | |
1241 | yydestruct (yymsg, yytype, yyvaluep) | |
1242 | const char *yymsg; | |
1243 | int yytype; | |
1244 | YYSTYPE *yyvaluep; | |
bbed3d50 | 1245 | #endif |
08cf8642 | 1246 | { |
1247 | YYUSE (yyvaluep); | |
e5081f8c | 1248 | |
08cf8642 | 1249 | if (!yymsg) |
1250 | yymsg = "Deleting"; | |
1251 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); | |
1252 | ||
1253 | switch (yytype) | |
1254 | { | |
1255 | ||
1256 | default: | |
1257 | break; | |
1258 | } | |
1259 | } | |
1260 | \f | |
1261 | ||
1262 | /* Prevent warnings from -Wmissing-prototypes. */ | |
bbed3d50 | 1263 | |
08cf8642 | 1264 | #ifdef YYPARSE_PARAM |
1265 | #if defined __STDC__ || defined __cplusplus | |
1266 | int yyparse (void *YYPARSE_PARAM); | |
1267 | #else | |
1268 | int yyparse (); | |
1269 | #endif | |
1270 | #else /* ! YYPARSE_PARAM */ | |
1271 | #if defined __STDC__ || defined __cplusplus | |
1272 | int yyparse (void); | |
368f75ae | 1273 | #else |
08cf8642 | 1274 | int yyparse (); |
368f75ae | 1275 | #endif |
08cf8642 | 1276 | #endif /* ! YYPARSE_PARAM */ |
e5081f8c | 1277 | |
e5081f8c | 1278 | |
e5081f8c | 1279 | |
8f58355a | 1280 | |
08cf8642 | 1281 | |
1282 | ||
1283 | /*----------. | |
1284 | | yyparse. | | |
1285 | `----------*/ | |
1286 | ||
1287 | #ifdef YYPARSE_PARAM | |
1288 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1289 | || defined __cplusplus || defined _MSC_VER) | |
885824d3 | 1290 | int |
08cf8642 | 1291 | yyparse (void *YYPARSE_PARAM) |
1292 | #else | |
1293 | int | |
1294 | yyparse (YYPARSE_PARAM) | |
1295 | void *YYPARSE_PARAM; | |
1296 | #endif | |
1297 | #else /* ! YYPARSE_PARAM */ | |
1298 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
1299 | || defined __cplusplus || defined _MSC_VER) | |
1300 | int | |
1301 | yyparse (void) | |
1302 | #else | |
1303 | int | |
1304 | yyparse () | |
1305 | ||
1306 | #endif | |
1307 | #endif | |
885824d3 | 1308 | { |
08cf8642 | 1309 | /* The look-ahead symbol. */ |
1310 | int yychar; | |
1311 | ||
1312 | /* The semantic value of the look-ahead symbol. */ | |
1313 | YYSTYPE yylval; | |
1314 | ||
1315 | /* Number of syntax errors so far. */ | |
1316 | int yynerrs; | |
e5081f8c | 1317 | |
08cf8642 | 1318 | int yystate; |
1319 | int yyn; | |
e5081f8c | 1320 | int yyresult; |
1321 | /* Number of tokens to shift before error messages enabled. */ | |
1322 | int yyerrstatus; | |
08cf8642 | 1323 | /* Look-ahead token as an internal (translated) token number. */ |
1324 | int yytoken = 0; | |
1325 | #if YYERROR_VERBOSE | |
1326 | /* Buffer for error messages, and its allocated size. */ | |
1327 | char yymsgbuf[128]; | |
1328 | char *yymsg = yymsgbuf; | |
1329 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | |
1330 | #endif | |
e5081f8c | 1331 | |
1332 | /* Three stacks and their tools: | |
1333 | `yyss': related to states, | |
1334 | `yyvs': related to semantic values, | |
1335 | `yyls': related to locations. | |
1336 | ||
1337 | Refer to the stacks thru separate pointers, to allow yyoverflow | |
1338 | to reallocate them elsewhere. */ | |
1339 | ||
08cf8642 | 1340 | /* The state stack. */ |
1341 | yytype_int16 yyssa[YYINITDEPTH]; | |
1342 | yytype_int16 *yyss = yyssa; | |
1343 | yytype_int16 *yyssp; | |
885824d3 | 1344 | |
e5081f8c | 1345 | /* The semantic value stack. */ |
1346 | YYSTYPE yyvsa[YYINITDEPTH]; | |
1347 | YYSTYPE *yyvs = yyvsa; | |
08cf8642 | 1348 | YYSTYPE *yyvsp; |
0866200b | 1349 | |
885824d3 | 1350 | |
885824d3 | 1351 | |
08cf8642 | 1352 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
0866200b | 1353 | |
08cf8642 | 1354 | YYSIZE_T yystacksize = YYINITDEPTH; |
368f75ae | 1355 | |
e5081f8c | 1356 | /* The variables used to return semantic value and location from the |
1357 | action routines. */ | |
1358 | YYSTYPE yyval; | |
885824d3 | 1359 | |
08cf8642 | 1360 | |
1361 | /* The number of symbols on the RHS of the reduced rule. | |
1362 | Keep to zero when no symbol should be popped. */ | |
1363 | int yylen = 0; | |
885824d3 | 1364 | |
e5081f8c | 1365 | YYDPRINTF ((stderr, "Starting parse\n")); |
885824d3 | 1366 | |
1367 | yystate = 0; | |
1368 | yyerrstatus = 0; | |
1369 | yynerrs = 0; | |
1370 | yychar = YYEMPTY; /* Cause a token to be read. */ | |
1371 | ||
1372 | /* Initialize stack pointers. | |
1373 | Waste one element of value and location stack | |
1374 | so that they stay on the same level as the state stack. | |
1375 | The wasted elements are never initialized. */ | |
1376 | ||
e5081f8c | 1377 | yyssp = yyss; |
885824d3 | 1378 | yyvsp = yyvs; |
08cf8642 | 1379 | |
e5081f8c | 1380 | goto yysetstate; |
885824d3 | 1381 | |
e5081f8c | 1382 | /*------------------------------------------------------------. |
1383 | | yynewstate -- Push a new state, which is found in yystate. | | |
1384 | `------------------------------------------------------------*/ | |
1385 | yynewstate: | |
1386 | /* In all cases, when you get here, the value and location stacks | |
08cf8642 | 1387 | have just been pushed. So pushing a state here evens the stacks. */ |
e5081f8c | 1388 | yyssp++; |
885824d3 | 1389 | |
e5081f8c | 1390 | yysetstate: |
1391 | *yyssp = yystate; | |
885824d3 | 1392 | |
08cf8642 | 1393 | if (yyss + yystacksize - 1 <= yyssp) |
885824d3 | 1394 | { |
885824d3 | 1395 | /* Get the current used size of the three stacks, in elements. */ |
e5081f8c | 1396 | YYSIZE_T yysize = yyssp - yyss + 1; |
885824d3 | 1397 | |
1398 | #ifdef yyoverflow | |
e5081f8c | 1399 | { |
08cf8642 | 1400 | /* Give user a chance to reallocate the stack. Use copies of |
e5081f8c | 1401 | these so that the &'s don't force the real ones into |
1402 | memory. */ | |
1403 | YYSTYPE *yyvs1 = yyvs; | |
08cf8642 | 1404 | yytype_int16 *yyss1 = yyss; |
1405 | ||
e5081f8c | 1406 | |
1407 | /* Each stack pointer address is followed by the size of the | |
08cf8642 | 1408 | data in use in that stack, in bytes. This used to be a |
1409 | conditional around just the two extra args, but that might | |
1410 | be undefined if yyoverflow is a macro. */ | |
1411 | yyoverflow (YY_("memory exhausted"), | |
368f75ae | 1412 | &yyss1, yysize * sizeof (*yyssp), |
1413 | &yyvs1, yysize * sizeof (*yyvsp), | |
08cf8642 | 1414 | |
368f75ae | 1415 | &yystacksize); |
08cf8642 | 1416 | |
e5081f8c | 1417 | yyss = yyss1; |
1418 | yyvs = yyvs1; | |
1419 | } | |
885824d3 | 1420 | #else /* no yyoverflow */ |
e5081f8c | 1421 | # ifndef YYSTACK_RELOCATE |
08cf8642 | 1422 | goto yyexhaustedlab; |
e5081f8c | 1423 | # else |
885824d3 | 1424 | /* Extend the stack our own way. */ |
08cf8642 | 1425 | if (YYMAXDEPTH <= yystacksize) |
1426 | goto yyexhaustedlab; | |
885824d3 | 1427 | yystacksize *= 2; |
08cf8642 | 1428 | if (YYMAXDEPTH < yystacksize) |
885824d3 | 1429 | yystacksize = YYMAXDEPTH; |
e5081f8c | 1430 | |
1431 | { | |
08cf8642 | 1432 | yytype_int16 *yyss1 = yyss; |
e5081f8c | 1433 | union yyalloc *yyptr = |
1434 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | |
1435 | if (! yyptr) | |
08cf8642 | 1436 | goto yyexhaustedlab; |
e5081f8c | 1437 | YYSTACK_RELOCATE (yyss); |
1438 | YYSTACK_RELOCATE (yyvs); | |
08cf8642 | 1439 | |
1440 | # undef YYSTACK_RELOCATE | |
e5081f8c | 1441 | if (yyss1 != yyssa) |
1442 | YYSTACK_FREE (yyss1); | |
1443 | } | |
1444 | # endif | |
885824d3 | 1445 | #endif /* no yyoverflow */ |
1446 | ||
e5081f8c | 1447 | yyssp = yyss + yysize - 1; |
1448 | yyvsp = yyvs + yysize - 1; | |
08cf8642 | 1449 | |
885824d3 | 1450 | |
e5081f8c | 1451 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
1452 | (unsigned long int) yystacksize)); | |
885824d3 | 1453 | |
08cf8642 | 1454 | if (yyss + yystacksize - 1 <= yyssp) |
885824d3 | 1455 | YYABORT; |
1456 | } | |
1457 | ||
e5081f8c | 1458 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
885824d3 | 1459 | |
1460 | goto yybackup; | |
e5081f8c | 1461 | |
e5081f8c | 1462 | /*-----------. |
1463 | | yybackup. | | |
1464 | `-----------*/ | |
1465 | yybackup: | |
885824d3 | 1466 | |
08cf8642 | 1467 | /* Do appropriate processing given the current state. Read a |
1468 | look-ahead token if we need one and don't already have one. */ | |
885824d3 | 1469 | |
08cf8642 | 1470 | /* First try to decide what to do without reference to look-ahead token. */ |
885824d3 | 1471 | yyn = yypact[yystate]; |
08cf8642 | 1472 | if (yyn == YYPACT_NINF) |
885824d3 | 1473 | goto yydefault; |
1474 | ||
08cf8642 | 1475 | /* Not known => get a look-ahead token if don't already have one. */ |
368f75ae | 1476 | |
08cf8642 | 1477 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ |
885824d3 | 1478 | if (yychar == YYEMPTY) |
1479 | { | |
e5081f8c | 1480 | YYDPRINTF ((stderr, "Reading a token: ")); |
885824d3 | 1481 | yychar = YYLEX; |
1482 | } | |
1483 | ||
08cf8642 | 1484 | if (yychar <= YYEOF) |
885824d3 | 1485 | { |
08cf8642 | 1486 | yychar = yytoken = YYEOF; |
e5081f8c | 1487 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
885824d3 | 1488 | } |
1489 | else | |
1490 | { | |
08cf8642 | 1491 | yytoken = YYTRANSLATE (yychar); |
1492 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); | |
885824d3 | 1493 | } |
1494 | ||
08cf8642 | 1495 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
1496 | detect an error, take that action. */ | |
1497 | yyn += yytoken; | |
1498 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | |
885824d3 | 1499 | goto yydefault; |
885824d3 | 1500 | yyn = yytable[yyn]; |
08cf8642 | 1501 | if (yyn <= 0) |
885824d3 | 1502 | { |
08cf8642 | 1503 | if (yyn == 0 || yyn == YYTABLE_NINF) |
885824d3 | 1504 | goto yyerrlab; |
1505 | yyn = -yyn; | |
1506 | goto yyreduce; | |
1507 | } | |
885824d3 | 1508 | |
1509 | if (yyn == YYFINAL) | |
1510 | YYACCEPT; | |
1511 | ||
e5081f8c | 1512 | /* Count tokens shifted since error; after three, turn off error |
1513 | status. */ | |
1514 | if (yyerrstatus) | |
1515 | yyerrstatus--; | |
885824d3 | 1516 | |
08cf8642 | 1517 | /* Shift the look-ahead token. */ |
1518 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | |
1519 | ||
1520 | /* Discard the shifted token unless it is eof. */ | |
1521 | if (yychar != YYEOF) | |
1522 | yychar = YYEMPTY; | |
1523 | ||
885824d3 | 1524 | yystate = yyn; |
08cf8642 | 1525 | *++yyvsp = yylval; |
1526 | ||
885824d3 | 1527 | goto yynewstate; |
1528 | ||
0866200b | 1529 | |
e5081f8c | 1530 | /*-----------------------------------------------------------. |
1531 | | yydefault -- do the default action for the current state. | | |
1532 | `-----------------------------------------------------------*/ | |
1533 | yydefault: | |
885824d3 | 1534 | yyn = yydefact[yystate]; |
1535 | if (yyn == 0) | |
1536 | goto yyerrlab; | |
e5081f8c | 1537 | goto yyreduce; |
885824d3 | 1538 | |
e5081f8c | 1539 | |
1540 | /*-----------------------------. | |
1541 | | yyreduce -- Do a reduction. | | |
1542 | `-----------------------------*/ | |
885824d3 | 1543 | yyreduce: |
e5081f8c | 1544 | /* yyn is the number of a rule to reduce with. */ |
885824d3 | 1545 | yylen = yyr2[yyn]; |
885824d3 | 1546 | |
e5081f8c | 1547 | /* If YYLEN is nonzero, implement the default value of the action: |
1548 | `$$ = $1'. | |
1549 | ||
08cf8642 | 1550 | Otherwise, the following line sets YYVAL to garbage. |
1551 | This behavior is undocumented and Bison | |
e5081f8c | 1552 | users should not rely upon it. Assigning to YYVAL |
1553 | unconditionally makes the parser a bit smaller, and it avoids a | |
1554 | GCC warning that YYVAL may be used uninitialized. */ | |
1555 | yyval = yyvsp[1-yylen]; | |
1556 | ||
e5081f8c | 1557 | |
08cf8642 | 1558 | YY_REDUCE_PRINT (yyn); |
1559 | switch (yyn) | |
885824d3 | 1560 | { |
08cf8642 | 1561 | case 2: |
69db2541 | 1562 | #line 139 "signature.y" |
08cf8642 | 1563 | { lslOpList_free ((yyvsp[(1) - (1)].operators)); ;} |
1564 | break; | |
368f75ae | 1565 | |
08cf8642 | 1566 | case 3: |
69db2541 | 1567 | #line 143 "signature.y" |
08cf8642 | 1568 | { lslOpList x = lslOpList_new (); |
1569 | g_importedlslOp = (yyvsp[(1) - (1)].operator); | |
1570 | lslOpList_add (x, (yyvsp[(1) - (1)].operator)); | |
1571 | (yyval.operators) = x; ;} | |
1572 | break; | |
8f58355a | 1573 | |
08cf8642 | 1574 | case 4: |
69db2541 | 1575 | #line 148 "signature.y" |
08cf8642 | 1576 | { lslOpList_add ((yyvsp[(1) - (2)].operators), (yyvsp[(2) - (2)].operator)); |
1577 | (yyval.operators) = (yyvsp[(1) - (2)].operators); ;} | |
1578 | break; | |
885824d3 | 1579 | |
08cf8642 | 1580 | case 5: |
69db2541 | 1581 | #line 153 "signature.y" |
08cf8642 | 1582 | { (yyval.operator) = makelslOpNode ((yyvsp[(1) - (3)].name), (yyvsp[(3) - (3)].signature)); ;} |
1583 | break; | |
1584 | ||
1585 | case 6: | |
69db2541 | 1586 | #line 160 "signature.y" |
08cf8642 | 1587 | { (yyval.name) = makeNameNodeId ((yyvsp[(1) - (1)].ltok)); ;} |
1588 | break; | |
1589 | ||
1590 | case 7: | |
69db2541 | 1591 | #line 162 "signature.y" |
08cf8642 | 1592 | { (yyval.name) = makeNameNodeForm ((yyvsp[(1) - (1)].opform)); ;} |
1593 | break; | |
1594 | ||
1595 | case 8: | |
69db2541 | 1596 | #line 167 "signature.y" |
08cf8642 | 1597 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (6)].ltok), OPF_IF, opFormUnion_createMiddle (0), ltoken_undefined); ;} |
1598 | break; | |
1599 | ||
1600 | case 9: | |
69db2541 | 1601 | #line 169 "signature.y" |
08cf8642 | 1602 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (1)].ltok), OPF_ANYOP, opFormUnion_createAnyOp ((yyvsp[(1) - (1)].ltok)), ltoken_undefined); ;} |
1603 | break; | |
1604 | ||
1605 | case 10: | |
69db2541 | 1606 | #line 171 "signature.y" |
08cf8642 | 1607 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (2)].ltok), OPF_MANYOP, opFormUnion_createAnyOp ((yyvsp[(2) - (2)].ltok)), ltoken_undefined); ;} |
1608 | break; | |
1609 | ||
1610 | case 11: | |
69db2541 | 1611 | #line 173 "signature.y" |
08cf8642 | 1612 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (2)].ltok), OPF_ANYOPM, opFormUnion_createAnyOp ((yyvsp[(1) - (2)].ltok)), ltoken_undefined); ;} |
1613 | break; | |
1614 | ||
1615 | case 12: | |
69db2541 | 1616 | #line 175 "signature.y" |
08cf8642 | 1617 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (3)].ltok), OPF_MANYOPM, opFormUnion_createAnyOp ((yyvsp[(2) - (3)].ltok)), ltoken_undefined); ;} |
1618 | break; | |
1619 | ||
1620 | case 13: | |
69db2541 | 1621 | #line 177 "signature.y" |
08cf8642 | 1622 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (3)].ltok), OPF_MIDDLE, opFormUnion_createMiddle ((yyvsp[(2) - (3)].count)), (yyvsp[(3) - (3)].ltok)); ;} |
1623 | break; | |
1624 | ||
1625 | case 14: | |
69db2541 | 1626 | #line 179 "signature.y" |
08cf8642 | 1627 | { (yyval.opform) = makeOpFormNode ((yyvsp[(2) - (4)].ltok), OPF_MMIDDLE, opFormUnion_createMiddle ((yyvsp[(3) - (4)].count)), (yyvsp[(4) - (4)].ltok)); ;} |
1628 | break; | |
1629 | ||
1630 | case 15: | |
69db2541 | 1631 | #line 181 "signature.y" |
08cf8642 | 1632 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (4)].ltok), OPF_MIDDLEM, opFormUnion_createMiddle ((yyvsp[(2) - (4)].count)), (yyvsp[(3) - (4)].ltok)); ;} |
1633 | break; | |
1634 | ||
1635 | case 16: | |
69db2541 | 1636 | #line 183 "signature.y" |
08cf8642 | 1637 | { (yyval.opform) = makeOpFormNode ((yyvsp[(2) - (5)].ltok), OPF_MMIDDLEM, |
1638 | opFormUnion_createMiddle ((yyvsp[(3) - (5)].count)), (yyvsp[(4) - (5)].ltok)); ;} | |
1639 | break; | |
1640 | ||
1641 | case 17: | |
69db2541 | 1642 | #line 186 "signature.y" |
08cf8642 | 1643 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (3)].ltok), OPF_BMIDDLE, |
1644 | opFormUnion_createMiddle ((yyvsp[(2) - (3)].count)), (yyvsp[(3) - (3)].ltok)); ;} | |
1645 | break; | |
1646 | ||
1647 | case 18: | |
69db2541 | 1648 | #line 189 "signature.y" |
08cf8642 | 1649 | { (yyval.opform) = makeOpFormNode ((yyvsp[(2) - (4)].ltok), OPF_BMMIDDLE, |
1650 | opFormUnion_createMiddle ((yyvsp[(3) - (4)].count)), (yyvsp[(4) - (4)].ltok)); ;} | |
1651 | break; | |
1652 | ||
1653 | case 19: | |
69db2541 | 1654 | #line 192 "signature.y" |
08cf8642 | 1655 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (4)].ltok), OPF_BMIDDLEM, |
1656 | opFormUnion_createMiddle ((yyvsp[(2) - (4)].count)), (yyvsp[(3) - (4)].ltok)); ;} | |
1657 | break; | |
1658 | ||
1659 | case 20: | |
69db2541 | 1660 | #line 195 "signature.y" |
08cf8642 | 1661 | { (yyval.opform) = makeOpFormNode ((yyvsp[(2) - (5)].ltok), OPF_BMMIDDLEM, |
1662 | opFormUnion_createMiddle ((yyvsp[(3) - (5)].count)), (yyvsp[(4) - (5)].ltok)); ;} | |
1663 | break; | |
1664 | ||
1665 | case 21: | |
69db2541 | 1666 | #line 198 "signature.y" |
08cf8642 | 1667 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (2)].ltok), OPF_SELECT, |
1668 | opFormUnion_createAnyOp ((yyvsp[(2) - (2)].ltok)), ltoken_undefined); ;} | |
1669 | break; | |
1670 | ||
1671 | case 22: | |
69db2541 | 1672 | #line 201 "signature.y" |
08cf8642 | 1673 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (3)].ltok), OPF_MSELECT, |
1674 | opFormUnion_createAnyOp ((yyvsp[(3) - (3)].ltok)), ltoken_undefined); ;} | |
1675 | break; | |
1676 | ||
1677 | case 23: | |
69db2541 | 1678 | #line 206 "signature.y" |
08cf8642 | 1679 | { (yyval.opform) = makeOpFormNode ((yyvsp[(1) - (3)].ltok), OPF_MMAP, |
1680 | opFormUnion_createAnyOp ((yyvsp[(3) - (3)].ltok)), ltoken_undefined); ;} | |
1681 | break; | |
1682 | ||
1683 | case 24: | |
69db2541 | 1684 | #line 211 "signature.y" |
08cf8642 | 1685 | { (yyval.ltok) = (yyvsp[(1) - (1)].ltok); ;} |
1686 | break; | |
1687 | ||
1688 | case 25: | |
69db2541 | 1689 | #line 213 "signature.y" |
08cf8642 | 1690 | { (yyval.ltok) = (yyvsp[(1) - (1)].ltok); ;} |
1691 | break; | |
1692 | ||
1693 | case 26: | |
69db2541 | 1694 | #line 215 "signature.y" |
08cf8642 | 1695 | { (yyval.ltok) = (yyvsp[(1) - (1)].ltok); ;} |
1696 | break; | |
1697 | ||
1698 | case 27: | |
69db2541 | 1699 | #line 219 "signature.y" |
08cf8642 | 1700 | { (yyval.count) = 0; ;} |
1701 | break; | |
1702 | ||
1703 | case 28: | |
69db2541 | 1704 | #line 221 "signature.y" |
08cf8642 | 1705 | { (yyval.count) = (yyvsp[(1) - (1)].count); ;} |
1706 | break; | |
1707 | ||
1708 | case 29: | |
69db2541 | 1709 | #line 225 "signature.y" |
08cf8642 | 1710 | { (yyval.count) = 1; ;} |
1711 | break; | |
1712 | ||
1713 | case 30: | |
69db2541 | 1714 | #line 227 "signature.y" |
08cf8642 | 1715 | { (yyval.count) = (yyvsp[(1) - (3)].count) + 1; ;} |
1716 | break; | |
1717 | ||
1718 | case 31: | |
69db2541 | 1719 | #line 231 "signature.y" |
08cf8642 | 1720 | { (yyval.ltok) = (yyvsp[(1) - (1)].ltok); ;} |
1721 | break; | |
1722 | ||
1723 | case 32: | |
69db2541 | 1724 | #line 233 "signature.y" |
08cf8642 | 1725 | { (yyval.ltok) = (yyvsp[(1) - (1)].ltok); ;} |
1726 | break; | |
1727 | ||
1728 | case 33: | |
69db2541 | 1729 | #line 237 "signature.y" |
08cf8642 | 1730 | { (yyval.signature) = makesigNode ((yyvsp[(2) - (3)].ltok), (yyvsp[(1) - (3)].ltokenList), (yyvsp[(3) - (3)].ltok)); ;} |
1731 | break; | |
1732 | ||
1733 | case 34: | |
69db2541 | 1734 | #line 241 "signature.y" |
08cf8642 | 1735 | { (yyval.ltokenList) = ltokenList_new (); ;} |
1736 | break; | |
1737 | ||
1738 | case 35: | |
69db2541 | 1739 | #line 243 "signature.y" |
08cf8642 | 1740 | { (yyval.ltokenList) = (yyvsp[(1) - (1)].ltokenList); ;} |
1741 | break; | |
1742 | ||
1743 | case 36: | |
69db2541 | 1744 | #line 247 "signature.y" |
08cf8642 | 1745 | { (yyval.ltokenList) = ltokenList_singleton ((yyvsp[(1) - (1)].ltok)); ;} |
1746 | break; | |
1747 | ||
1748 | case 37: | |
69db2541 | 1749 | #line 249 "signature.y" |
08cf8642 | 1750 | { (yyval.ltokenList) = ltokenList_push ((yyvsp[(1) - (3)].ltokenList), (yyvsp[(3) - (3)].ltok)); ;} |
1751 | break; | |
1752 | ||
1753 | case 38: | |
69db2541 | 1754 | #line 253 "signature.y" |
08cf8642 | 1755 | { |
1756 | (yyval.ltok) = (yyvsp[(1) - (1)].ltok); | |
1757 | ltoken_setText ((yyval.ltok), processTraitSortId (ltoken_getText ((yyvsp[(1) - (1)].ltok)))); | |
1758 | ;} | |
1759 | break; | |
1760 | ||
1761 | case 39: | |
69db2541 | 1762 | #line 260 "signature.y" |
08cf8642 | 1763 | { (yyval.ltok) = (yyvsp[(1) - (1)].ltok); ;} |
1764 | break; | |
1765 | ||
1766 | ||
1767 | /* Line 1267 of yacc.c. */ | |
69db2541 | 1768 | #line 1711 "signature.tab.c" |
08cf8642 | 1769 | default: break; |
368f75ae | 1770 | } |
08cf8642 | 1771 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
1772 | ||
1773 | YYPOPSTACK (yylen); | |
1774 | yylen = 0; | |
1775 | YY_STACK_PRINT (yyss, yyssp); | |
885824d3 | 1776 | |
1777 | *++yyvsp = yyval; | |
08cf8642 | 1778 | |
885824d3 | 1779 | |
e5081f8c | 1780 | /* Now `shift' the result of the reduction. Determine what state |
1781 | that goes to, based on the state we popped back to and the rule | |
1782 | number reduced by. */ | |
885824d3 | 1783 | |
1784 | yyn = yyr1[yyn]; | |
1785 | ||
08cf8642 | 1786 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
1787 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) | |
885824d3 | 1788 | yystate = yytable[yystate]; |
1789 | else | |
08cf8642 | 1790 | yystate = yydefgoto[yyn - YYNTOKENS]; |
885824d3 | 1791 | |
1792 | goto yynewstate; | |
1793 | ||
885824d3 | 1794 | |
e5081f8c | 1795 | /*------------------------------------. |
1796 | | yyerrlab -- here on detecting error | | |
1797 | `------------------------------------*/ | |
1798 | yyerrlab: | |
1799 | /* If not already recovering from an error, report this error. */ | |
1800 | if (!yyerrstatus) | |
885824d3 | 1801 | { |
1802 | ++yynerrs; | |
08cf8642 | 1803 | #if ! YYERROR_VERBOSE |
1804 | yyerror (YY_("syntax error")); | |
1805 | #else | |
1806 | { | |
1807 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); | |
1808 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) | |
1809 | { | |
1810 | YYSIZE_T yyalloc = 2 * yysize; | |
1811 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) | |
1812 | yyalloc = YYSTACK_ALLOC_MAXIMUM; | |
1813 | if (yymsg != yymsgbuf) | |
e5081f8c | 1814 | YYSTACK_FREE (yymsg); |
08cf8642 | 1815 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
1816 | if (yymsg) | |
1817 | yymsg_alloc = yyalloc; | |
1818 | else | |
1819 | { | |
1820 | yymsg = yymsgbuf; | |
1821 | yymsg_alloc = sizeof yymsgbuf; | |
1822 | } | |
1823 | } | |
1824 | ||
1825 | if (0 < yysize && yysize <= yymsg_alloc) | |
1826 | { | |
1827 | (void) yysyntax_error (yymsg, yystate, yychar); | |
1828 | yyerror (yymsg); | |
1829 | } | |
1830 | else | |
1831 | { | |
1832 | yyerror (YY_("syntax error")); | |
1833 | if (yysize != 0) | |
1834 | goto yyexhaustedlab; | |
1835 | } | |
1836 | } | |
1837 | #endif | |
885824d3 | 1838 | } |
d0b80d80 | 1839 | |
e5081f8c | 1840 | |
08cf8642 | 1841 | |
885824d3 | 1842 | if (yyerrstatus == 3) |
1843 | { | |
08cf8642 | 1844 | /* If just tried and failed to reuse look-ahead token after an |
e5081f8c | 1845 | error, discard it. */ |
885824d3 | 1846 | |
08cf8642 | 1847 | if (yychar <= YYEOF) |
1848 | { | |
1849 | /* Return failure if at end of input. */ | |
1850 | if (yychar == YYEOF) | |
1851 | YYABORT; | |
1852 | } | |
1853 | else | |
1854 | { | |
1855 | yydestruct ("Error: discarding", | |
1856 | yytoken, &yylval); | |
1857 | yychar = YYEMPTY; | |
1858 | } | |
885824d3 | 1859 | } |
1860 | ||
08cf8642 | 1861 | /* Else will try to reuse look-ahead token after shifting the error |
e5081f8c | 1862 | token. */ |
08cf8642 | 1863 | goto yyerrlab1; |
885824d3 | 1864 | |
368f75ae | 1865 | |
08cf8642 | 1866 | /*---------------------------------------------------. |
1867 | | yyerrorlab -- error raised explicitly by YYERROR. | | |
1868 | `---------------------------------------------------*/ | |
1869 | yyerrorlab: | |
368f75ae | 1870 | |
08cf8642 | 1871 | /* Pacify compilers like GCC when the user code never invokes |
1872 | YYERROR and the label yyerrorlab therefore never appears in user | |
1873 | code. */ | |
1874 | if (/*CONSTCOND*/ 0) | |
1875 | goto yyerrorlab; | |
368f75ae | 1876 | |
08cf8642 | 1877 | /* Do not reclaim the symbols of the rule which action triggered |
1878 | this YYERROR. */ | |
1879 | YYPOPSTACK (yylen); | |
1880 | yylen = 0; | |
1881 | YY_STACK_PRINT (yyss, yyssp); | |
1882 | yystate = *yyssp; | |
1883 | goto yyerrlab1; | |
885824d3 | 1884 | |
885824d3 | 1885 | |
08cf8642 | 1886 | /*-------------------------------------------------------------. |
1887 | | yyerrlab1 -- common code for both syntax error and YYERROR. | | |
1888 | `-------------------------------------------------------------*/ | |
1889 | yyerrlab1: | |
1890 | yyerrstatus = 3; /* Each real token shifted decrements this. */ | |
368f75ae | 1891 | |
08cf8642 | 1892 | for (;;) |
885824d3 | 1893 | { |
08cf8642 | 1894 | yyn = yypact[yystate]; |
1895 | if (yyn != YYPACT_NINF) | |
1896 | { | |
1897 | yyn += YYTERROR; | |
1898 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) | |
1899 | { | |
1900 | yyn = yytable[yyn]; | |
1901 | if (0 < yyn) | |
1902 | break; | |
1903 | } | |
1904 | } | |
885824d3 | 1905 | |
08cf8642 | 1906 | /* Pop the current state because it cannot handle the error token. */ |
1907 | if (yyssp == yyss) | |
1908 | YYABORT; | |
885824d3 | 1909 | |
885824d3 | 1910 | |
08cf8642 | 1911 | yydestruct ("Error: popping", |
1912 | yystos[yystate], yyvsp); | |
1913 | YYPOPSTACK (1); | |
1914 | yystate = *yyssp; | |
1915 | YY_STACK_PRINT (yyss, yyssp); | |
885824d3 | 1916 | } |
885824d3 | 1917 | |
1918 | if (yyn == YYFINAL) | |
1919 | YYACCEPT; | |
1920 | ||
885824d3 | 1921 | *++yyvsp = yylval; |
08cf8642 | 1922 | |
1923 | ||
1924 | /* Shift the error token. */ | |
1925 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); | |
885824d3 | 1926 | |
1927 | yystate = yyn; | |
1928 | goto yynewstate; | |
bbed3d50 | 1929 | |
bbed3d50 | 1930 | |
e5081f8c | 1931 | /*-------------------------------------. |
1932 | | yyacceptlab -- YYACCEPT comes here. | | |
1933 | `-------------------------------------*/ | |
1934 | yyacceptlab: | |
1935 | yyresult = 0; | |
1936 | goto yyreturn; | |
1937 | ||
1938 | /*-----------------------------------. | |
1939 | | yyabortlab -- YYABORT comes here. | | |
1940 | `-----------------------------------*/ | |
1941 | yyabortlab: | |
1942 | yyresult = 1; | |
1943 | goto yyreturn; | |
1944 | ||
08cf8642 | 1945 | #ifndef yyoverflow |
1946 | /*-------------------------------------------------. | |
1947 | | yyexhaustedlab -- memory exhaustion comes here. | | |
1948 | `-------------------------------------------------*/ | |
1949 | yyexhaustedlab: | |
1950 | yyerror (YY_("memory exhausted")); | |
e5081f8c | 1951 | yyresult = 2; |
1952 | /* Fall through. */ | |
08cf8642 | 1953 | #endif |
e5081f8c | 1954 | |
1955 | yyreturn: | |
08cf8642 | 1956 | if (yychar != YYEOF && yychar != YYEMPTY) |
1957 | yydestruct ("Cleanup: discarding lookahead", | |
1958 | yytoken, &yylval); | |
1959 | /* Do not reclaim the symbols of the rule which action triggered | |
1960 | this YYABORT or YYACCEPT. */ | |
1961 | YYPOPSTACK (yylen); | |
1962 | YY_STACK_PRINT (yyss, yyssp); | |
1963 | while (yyssp != yyss) | |
1964 | { | |
1965 | yydestruct ("Cleanup: popping", | |
1966 | yystos[*yyssp], yyvsp); | |
1967 | YYPOPSTACK (1); | |
1968 | } | |
e5081f8c | 1969 | #ifndef yyoverflow |
1970 | if (yyss != yyssa) | |
1971 | YYSTACK_FREE (yyss); | |
bbed3d50 | 1972 | #endif |
08cf8642 | 1973 | #if YYERROR_VERBOSE |
1974 | if (yymsg != yymsgbuf) | |
1975 | YYSTACK_FREE (yymsg); | |
1976 | #endif | |
1977 | /* Make sure YYID is used. */ | |
1978 | return YYID (yyresult); | |
885824d3 | 1979 | } |
885824d3 | 1980 | |
1981 | ||
69db2541 | 1982 | #line 263 "signature.y" |
08cf8642 | 1983 | |
1984 | ||
885824d3 | 1985 | # include "bison.reset" |
1986 | ||
1987 | extern char *yytext; | |
1988 | ||
1989 | void lslerror (char *s) | |
1990 | { | |
bbed3d50 | 1991 | llfatalbug |
1992 | (cstring_makeLiteral | |
1993 | ("There has been a problem in the parser with LSL signatures. This is believed to result " | |
1b8ae690 | 1994 | "from a problem with bison v. 1.25. Please try rebuidling Splint " |
bbed3d50 | 1995 | "using the pre-compiled grammar files by commenting out the " |
1996 | "BISON= line in the top-level Makefile.")); | |
885824d3 | 1997 | } |
1998 | ||
1999 | static void yyprint (FILE *file, int type, YYSTYPE value) | |
2000 | { | |
2001 | fprintf (file, " (%u:%u type: %d; text: %s) ", | |
2002 | ltoken_getLine (value.ltok), | |
2003 | ltoken_getCol (value.ltok), | |
2004 | type, | |
2005 | ltoken_getRawTextChars (value.ltok)); | |
2006 | } | |
2007 | ||
2008 | extern void PrintToken (ltoken tok) { | |
2009 | char *codStr; | |
2010 | ||
2011 | switch (ltoken_getCode (tok)) | |
2012 | { | |
2013 | case NOTTOKEN: codStr = "*** NOTTOKEN ***"; break; | |
2014 | case LST_QUANTIFIERSYM: codStr = "QUANTIFIERSYM"; break; | |
2015 | case LST_LOGICALOP: codStr = "LOGICALOP: "; break; | |
2016 | case LST_SELECTSYM: codStr = "LST_SELECTSYM"; break; | |
2017 | case LST_OPENSYM: codStr = "LST_OPENSYM"; break; | |
2018 | case LST_SEPSYM: codStr = "SEPSYM"; break; | |
2019 | case LST_CLOSESYM: codStr = "LST_CLOSESYM"; break; | |
2020 | case LST_SIMPLEID: codStr = "LST_SIMPLEID"; break; | |
2021 | case LST_MAPSYM: codStr = "MAPSYM"; break; | |
2022 | case LST_MARKERSYM: codStr = "LST_MARKERSYM"; break; | |
2023 | case LST_COMMENTSYM: codStr = "COMMENTSYM"; break; | |
2024 | case LST_SIMPLEOP: codStr = "SIMPLEOP"; break; | |
2025 | case LST_COLON: codStr = "LST_COLON"; break; | |
2026 | case LST_COMMA: codStr = "COMMA"; break; | |
2027 | case LST_LBRACKET: codStr = "LST_LBRACKET"; break; | |
2028 | case LST_LPAR: codStr = "LST_LPAR"; break; | |
2029 | case LST_RBRACKET: codStr = "LST_RBRACKET"; break; | |
2030 | case LST_RPAR: codStr = "LST_RPAR"; break; | |
2031 | case LST_EQOP: codStr = "LST_EQOP"; break; | |
2032 | case LST_WHITESPACE: codStr = "WHITESPACE,"; break; | |
2033 | case LST_EOL: codStr = "LST_EOL"; break; | |
2034 | case LST_elseTOKEN: codStr = "elseTOKEN"; break; | |
2035 | case LST_ifTOKEN: codStr = "ifTOKEN"; break; | |
2036 | case LST_thenTOKEN: codStr = "thenTOKEN"; break; | |
2037 | case LST_BADTOKEN: codStr = "*** BADTOKEN ***"; break; | |
2038 | case LEOFTOKEN: /* can't reach LEOFTOKEN easily */ | |
2039 | codStr = "LEOFTOKEN"; break; | |
2040 | default: | |
2041 | codStr = "*** invalid token code ***"; | |
2042 | break; | |
2043 | } /* end switch */ | |
2044 | ||
2045 | /* only used for debugging */ | |
2046 | printf ("%u:%u: Token Code (%u): %s", | |
2047 | ltoken_getLine (tok), ltoken_getCol (tok), | |
2048 | ltoken_getCode (tok), codStr); | |
2049 | if (ltoken_getRawText (tok) != 0) | |
2050 | { | |
2051 | printf (", Token String (%lu): %s\n", | |
2052 | ltoken_getRawText (tok), ltoken_getRawTextChars (tok)); | |
2053 | } | |
2054 | else printf ("\n"); | |
2055 | } | |
2056 | ||
2057 | ||
2058 | ||
2059 | ||
08cf8642 | 2060 | |
bbed3d50 | 2061 | /* |
2062 | ** Resets all flags in bison.head | |
2063 | */ | |
2064 | ||
2065 | ||
2066 | /*@=allmacros@*/ | |
2067 | /*@=boolint@*/ | |
2068 | /*@=charint@*/ | |
2069 | /*@=macroparams@*/ | |
2070 | /*@=macroundef@*/ | |
2071 | /*@=unreachable@*/ | |
2072 | /*@=macrospec@*/ | |
2073 | /*@=varuse@*/ | |
2074 | /*@=ignorequals@*/ | |
2075 | /*@=macrostmt@*/ | |
2076 | /*@=noeffect@*/ | |
2077 | /*@=shadow@*/ | |
2078 | /*@=exitarg@*/ | |
2079 | /*@=macroredef@*/ | |
2080 | /*@=uniondef@*/ | |
2081 | /*@=compdef@*/ | |
2082 | /*@=matchfields@*/ | |
2083 | /*@=exportlocal@*/ | |
2084 | /*@=evalorderuncon@*/ | |
2085 | /*@=exportheader@*/ | |
2086 | /*@=typeuse@*/ | |
2087 | /*@=redecl@*/ | |
2088 | /*@=redef@*/ | |
2089 | /*@=noparams@*/ | |
2090 | /*@=ansireserved@*/ | |
2091 | /*@=fielduse@*/ | |
2092 | /*@=ifblock@*/ | |
2093 | /*@=elseifcomplete@*/ | |
2094 | /*@=whileblock@*/ | |
2095 | /*@=forblock@*/ | |
2096 | /*@=branchstate@*/ | |
2097 | /*@=readonlytrans@*/ | |
2098 | /*@=namechecks@*/ | |
2099 | /*@=usedef@*/ | |
2100 | /*@=systemunrecog@*/ | |
2101 | /*@=dependenttrans@*/ | |
2102 | /*@=unqualifiedtrans@*/ | |
2103 | /*@=declundef@*/ | |
2104 | ||
2105 | ||
2106 | /*drl added 11/27/2001*/ | |
bb7c2085 | 2107 | /*@=bounds@*/ |
e015e087 | 2108 | |
2109 | /*drl added 12/11/2002*/ | |
2110 | /*@=type@*/ | |
a9ec3280 | 2111 | |
2112 | /*@=enummemuse@*/ |