42cf5bc1 |
1 | /* A Bison parser, made by GNU Bison 2.7. */ |
2 | |
3 | /* Bison implementation for Yacc-like parsers in C |
4 | |
5 | Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. |
6 | |
7 | This program is free software: you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation, either version 3 of the License, or |
10 | (at your option) any later version. |
11 | |
12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. |
16 | |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
19 | |
20 | /* As a special exception, you may create a larger work that contains |
21 | part or all of the Bison parser skeleton and distribute that work |
22 | under terms of your choice, so long as that work isn't itself a |
23 | parser generator using the skeleton or a modified version thereof |
24 | as a parser skeleton. Alternatively, if you modify or redistribute |
25 | the parser skeleton itself, you may (at your option) remove this |
26 | special exception, which will cause the skeleton and the resulting |
27 | Bison output files to be licensed under the GNU General Public |
28 | License without this special exception. |
29 | |
30 | This special exception was added by the Free Software Foundation in |
31 | version 2.2 of Bison. */ |
32 | |
33 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
34 | simplifying the original so-called "semantic" parser. */ |
35 | |
36 | /* All symbols defined below should begin with yy or YY, to avoid |
37 | infringing on user name space. This should be done even for local |
38 | variables, as they might otherwise be expanded by user macros. |
39 | There are some unavoidable exceptions within include files to |
40 | define necessary library symbols; they are noted "INFRINGES ON |
41 | USER NAME SPACE" below. */ |
42 | |
43 | /* Identify Bison output. */ |
44 | #define YYBISON 1 |
45 | |
46 | /* Bison version. */ |
47 | #define YYBISON_VERSION "2.7" |
48 | |
49 | /* Skeleton name. */ |
50 | #define YYSKELETON_NAME "yacc.c" |
51 | |
52 | /* Pure parsers. */ |
53 | #define YYPURE 0 |
54 | |
55 | /* Push parsers. */ |
56 | #define YYPUSH 0 |
57 | |
58 | /* Pull parsers. */ |
59 | #define YYPULL 1 |
60 | |
61 | |
62 | /* Substitute the variable and function names. */ |
63 | #define yyparse stepparse |
64 | #define yylex steplex |
65 | #define yyerror steperror |
66 | #define yylval steplval |
67 | #define yychar stepchar |
68 | #define yydebug stepdebug |
69 | #define yynerrs stepnerrs |
70 | |
71 | /* Copy the first part of user declarations. */ |
72 | /* Line 371 of yacc.c */ |
73 | #line 18 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
74 | |
75 | #include "recfile.ph" /* definitions des types d'arguments */ |
76 | #include "recfile.pc" /* la-dedans, tout y est */ |
77 | /* |
78 | #define stepparse STEPparse |
79 | #define steplex STEPlex |
80 | #define stepwrap STEPwrap |
81 | #define steprestart STEPrestart |
82 | #define steplex STEPlex |
83 | #define steplval STEPlval |
84 | #define stepval STEPval |
85 | #define stepchar STEPchar |
86 | #define stepdebug STEPdebug |
87 | #define stepnerrs STEPnerrs |
88 | #define steperror STEPerror |
89 | */ |
90 | #define stepclearin yychar = -1 |
91 | #define steperrok yyerrflag = 0 |
92 | |
93 | /* |
94 | #define stepin STEPin |
95 | #define yyerrflag STEPerrflag |
96 | #define yyerrstatus STEPerrflag |
97 | */ |
98 | |
99 | /* ABV 19.12.00: merging porting modifications by POP (for WNT, AIX) */ |
57c28b61 |
100 | #if defined(_WIN32) && !defined(MSDOS) |
101 | #define MSDOS _WIN32 |
42cf5bc1 |
102 | #endif |
103 | #if defined(_AIX) |
104 | #include <malloc.h> |
105 | #define alloca malloc |
106 | #endif |
107 | |
108 | |
109 | // disable MSVC warnings in bison code |
110 | #ifdef _MSC_VER |
111 | #pragma warning(disable:4244 4131 4127 4702) |
112 | #define YYMALLOC malloc |
113 | #define YYFREE free |
114 | #endif |
115 | |
116 | |
117 | /* Line 371 of yacc.c */ |
118 | #line 119 "step.tab.c" |
119 | |
120 | # ifndef YY_NULL |
121 | # if defined __cplusplus && 201103L <= __cplusplus |
122 | # define YY_NULL nullptr |
123 | # else |
124 | # define YY_NULL 0 |
125 | # endif |
126 | # endif |
127 | |
128 | /* Enabling verbose error messages. */ |
129 | #ifdef YYERROR_VERBOSE |
130 | # undef YYERROR_VERBOSE |
131 | # define YYERROR_VERBOSE 1 |
132 | #else |
133 | # define YYERROR_VERBOSE 0 |
134 | #endif |
135 | |
136 | /* In a future release of Bison, this section will be replaced |
137 | by #include "step.tab.h". */ |
138 | #ifndef YY_STEP_STEP_TAB_H_INCLUDED |
139 | # define YY_STEP_STEP_TAB_H_INCLUDED |
140 | /* Enabling traces. */ |
141 | #ifndef YYDEBUG |
142 | # define YYDEBUG 0 |
143 | #endif |
144 | #if YYDEBUG |
145 | extern int stepdebug; |
146 | #endif |
147 | |
148 | /* Tokens. */ |
149 | #ifndef YYTOKENTYPE |
150 | # define YYTOKENTYPE |
151 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
152 | know about them. */ |
153 | enum yytokentype { |
154 | STEP = 258, |
155 | HEADER = 259, |
156 | ENDSEC = 260, |
157 | DATA = 261, |
158 | ENDSTEP = 262, |
159 | SCOPE = 263, |
160 | ENDSCOPE = 264, |
161 | ENTITY = 265, |
162 | TYPE = 266, |
163 | INTEGER = 267, |
164 | FLOAT = 268, |
165 | IDENT = 269, |
166 | TEXT = 270, |
167 | NONDEF = 271, |
168 | ENUM = 272, |
169 | HEXA = 273, |
170 | QUID = 274 |
171 | }; |
172 | #endif |
173 | |
174 | |
175 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
176 | typedef int YYSTYPE; |
177 | # define YYSTYPE_IS_TRIVIAL 1 |
178 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
179 | # define YYSTYPE_IS_DECLARED 1 |
180 | #endif |
181 | |
182 | extern YYSTYPE steplval; |
183 | |
184 | #ifdef YYPARSE_PARAM |
185 | #if defined __STDC__ || defined __cplusplus |
186 | int stepparse (void *YYPARSE_PARAM); |
187 | #else |
188 | int stepparse (); |
189 | #endif |
190 | #else /* ! YYPARSE_PARAM */ |
191 | #if defined __STDC__ || defined __cplusplus |
192 | int stepparse (void); |
193 | #else |
194 | int stepparse (); |
195 | #endif |
196 | #endif /* ! YYPARSE_PARAM */ |
197 | |
198 | #endif /* !YY_STEP_STEP_TAB_H_INCLUDED */ |
199 | |
200 | /* Copy the second part of user declarations. */ |
201 | |
202 | /* Line 390 of yacc.c */ |
203 | #line 204 "step.tab.c" |
204 | |
205 | #ifdef short |
206 | # undef short |
207 | #endif |
208 | |
209 | #ifdef YYTYPE_UINT8 |
210 | typedef YYTYPE_UINT8 yytype_uint8; |
211 | #else |
212 | typedef unsigned char yytype_uint8; |
213 | #endif |
214 | |
215 | #ifdef YYTYPE_INT8 |
216 | typedef YYTYPE_INT8 yytype_int8; |
217 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
218 | || defined __cplusplus || defined _MSC_VER) |
219 | typedef signed char yytype_int8; |
220 | #else |
221 | typedef short int yytype_int8; |
222 | #endif |
223 | |
224 | #ifdef YYTYPE_UINT16 |
225 | typedef YYTYPE_UINT16 yytype_uint16; |
226 | #else |
227 | typedef unsigned short int yytype_uint16; |
228 | #endif |
229 | |
230 | #ifdef YYTYPE_INT16 |
231 | typedef YYTYPE_INT16 yytype_int16; |
232 | #else |
233 | typedef short int yytype_int16; |
234 | #endif |
235 | |
236 | #ifndef YYSIZE_T |
237 | # ifdef __SIZE_TYPE__ |
238 | # define YYSIZE_T __SIZE_TYPE__ |
239 | # elif defined size_t |
240 | # define YYSIZE_T size_t |
241 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
242 | || defined __cplusplus || defined _MSC_VER) |
243 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
244 | # define YYSIZE_T size_t |
245 | # else |
246 | # define YYSIZE_T unsigned int |
247 | # endif |
248 | #endif |
249 | |
250 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
251 | |
252 | #ifndef YY_ |
253 | # if defined YYENABLE_NLS && YYENABLE_NLS |
254 | # if ENABLE_NLS |
255 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
256 | # define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
257 | # endif |
258 | # endif |
259 | # ifndef YY_ |
260 | # define YY_(Msgid) Msgid |
261 | # endif |
262 | #endif |
263 | |
264 | /* Suppress unused-variable warnings by "using" E. */ |
265 | #if ! defined lint || defined __GNUC__ |
266 | # define YYUSE(E) ((void) (E)) |
267 | #else |
268 | # define YYUSE(E) /* empty */ |
269 | #endif |
270 | |
271 | /* Identity function, used to suppress warnings about constant conditions. */ |
272 | #ifndef lint |
273 | # define YYID(N) (N) |
274 | #else |
275 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
276 | || defined __cplusplus || defined _MSC_VER) |
277 | static int |
278 | YYID (int yyi) |
279 | #else |
280 | static int |
281 | YYID (yyi) |
282 | int yyi; |
283 | #endif |
284 | { |
285 | return yyi; |
286 | } |
287 | #endif |
288 | |
289 | #if ! defined yyoverflow || YYERROR_VERBOSE |
290 | |
291 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
292 | |
293 | # ifdef YYSTACK_USE_ALLOCA |
294 | # if YYSTACK_USE_ALLOCA |
295 | # ifdef __GNUC__ |
296 | # define YYSTACK_ALLOC __builtin_alloca |
297 | # elif defined __BUILTIN_VA_ARG_INCR |
298 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
299 | # elif defined _AIX |
300 | # define YYSTACK_ALLOC __alloca |
301 | # elif defined _MSC_VER |
302 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
303 | # define alloca _alloca |
304 | # else |
305 | # define YYSTACK_ALLOC alloca |
306 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
307 | || defined __cplusplus || defined _MSC_VER) |
308 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
309 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
310 | # ifndef EXIT_SUCCESS |
311 | # define EXIT_SUCCESS 0 |
312 | # endif |
313 | # endif |
314 | # endif |
315 | # endif |
316 | # endif |
317 | |
318 | # ifdef YYSTACK_ALLOC |
319 | /* Pacify GCC's `empty if-body' warning. */ |
320 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
321 | # ifndef YYSTACK_ALLOC_MAXIMUM |
322 | /* The OS might guarantee only one guard page at the bottom of the stack, |
323 | and a page size can be as small as 4096 bytes. So we cannot safely |
324 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
325 | to allow for a few compiler-allocated temporary stack slots. */ |
326 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
327 | # endif |
328 | # else |
329 | # define YYSTACK_ALLOC YYMALLOC |
330 | # define YYSTACK_FREE YYFREE |
331 | # ifndef YYSTACK_ALLOC_MAXIMUM |
332 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
333 | # endif |
334 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
335 | && ! ((defined YYMALLOC || defined malloc) \ |
336 | && (defined YYFREE || defined free))) |
337 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
338 | # ifndef EXIT_SUCCESS |
339 | # define EXIT_SUCCESS 0 |
340 | # endif |
341 | # endif |
342 | # ifndef YYMALLOC |
343 | # define YYMALLOC malloc |
344 | # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
345 | || defined __cplusplus || defined _MSC_VER) |
346 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
347 | # endif |
348 | # endif |
349 | # ifndef YYFREE |
350 | # define YYFREE free |
351 | # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ |
352 | || defined __cplusplus || defined _MSC_VER) |
353 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
354 | # endif |
355 | # endif |
356 | # endif |
357 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
358 | |
359 | |
360 | #if (! defined yyoverflow \ |
361 | && (! defined __cplusplus \ |
362 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
363 | |
364 | /* A type that is properly aligned for any stack member. */ |
365 | union yyalloc |
366 | { |
367 | yytype_int16 yyss_alloc; |
368 | YYSTYPE yyvs_alloc; |
369 | }; |
370 | |
371 | /* The size of the maximum gap between one aligned stack and the next. */ |
372 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
373 | |
374 | /* The size of an array large to enough to hold all stacks, each with |
375 | N elements. */ |
376 | # define YYSTACK_BYTES(N) \ |
377 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
378 | + YYSTACK_GAP_MAXIMUM) |
379 | |
380 | # define YYCOPY_NEEDED 1 |
381 | |
382 | /* Relocate STACK from its old location to the new one. The |
383 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
384 | elements in the stack, and YYPTR gives the new location of the |
385 | stack. Advance YYPTR to a properly aligned location for the next |
386 | stack. */ |
387 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
388 | do \ |
389 | { \ |
390 | YYSIZE_T yynewbytes; \ |
391 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
392 | Stack = &yyptr->Stack_alloc; \ |
393 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
394 | yyptr += yynewbytes / sizeof (*yyptr); \ |
395 | } \ |
396 | while (YYID (0)) |
397 | |
398 | #endif |
399 | |
400 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
401 | /* Copy COUNT objects from SRC to DST. The source and destination do |
402 | not overlap. */ |
403 | # ifndef YYCOPY |
404 | # if defined __GNUC__ && 1 < __GNUC__ |
405 | # define YYCOPY(Dst, Src, Count) \ |
406 | __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
407 | # else |
408 | # define YYCOPY(Dst, Src, Count) \ |
409 | do \ |
410 | { \ |
411 | YYSIZE_T yyi; \ |
412 | for (yyi = 0; yyi < (Count); yyi++) \ |
413 | (Dst)[yyi] = (Src)[yyi]; \ |
414 | } \ |
415 | while (YYID (0)) |
416 | # endif |
417 | # endif |
418 | #endif /* !YYCOPY_NEEDED */ |
419 | |
420 | /* YYFINAL -- State number of the termination state. */ |
421 | #define YYFINAL 7 |
422 | /* YYLAST -- Last index in YYTABLE. */ |
423 | #define YYLAST 81 |
424 | |
425 | /* YYNTOKENS -- Number of terminals. */ |
426 | #define YYNTOKENS 27 |
427 | /* YYNNTS -- Number of nonterminals. */ |
428 | #define YYNNTS 27 |
429 | /* YYNRULES -- Number of rules. */ |
430 | #define YYNRULES 49 |
431 | /* YYNRULES -- Number of states. */ |
432 | #define YYNSTATES 85 |
433 | |
434 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
435 | #define YYUNDEFTOK 2 |
436 | #define YYMAXUTOK 274 |
437 | |
438 | #define YYTRANSLATE(YYX) \ |
439 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
440 | |
441 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
442 | static const yytype_uint8 yytranslate[] = |
443 | { |
444 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
445 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
446 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
447 | 2, 2, 20, 2, 2, 2, 2, 2, 2, 2, |
448 | 22, 23, 2, 2, 24, 2, 2, 26, 2, 2, |
449 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 21, |
450 | 2, 25, 2, 2, 2, 2, 2, 2, 2, 2, |
451 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
452 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
453 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
454 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
455 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
456 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
457 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
458 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
459 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
460 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
461 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
462 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
463 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
464 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
465 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
466 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
467 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
468 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
469 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
470 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
471 | 15, 16, 17, 18, 19 |
472 | }; |
473 | |
474 | #if YYDEBUG |
475 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
476 | YYRHS. */ |
477 | static const yytype_uint8 yyprhs[] = |
478 | { |
479 | 0, 0, 3, 5, 8, 10, 13, 22, 30, 37, |
480 | 39, 41, 43, 45, 48, 52, 54, 56, 58, 60, |
481 | 62, 65, 67, 69, 71, 73, 76, 80, 83, 85, |
482 | 89, 92, 94, 97, 102, 110, 117, 119, 122, 126, |
483 | 129, 133, 135, 137, 139, 143, 145, 147, 152, 154 |
484 | }; |
485 | |
486 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
487 | static const yytype_int8 yyrhs[] = |
488 | { |
489 | 33, 0, -1, 20, -1, 28, 20, -1, 7, -1, |
490 | 7, 28, -1, 3, 4, 34, 5, 36, 43, 5, |
491 | 29, -1, 3, 4, 5, 36, 43, 5, 7, -1, |
492 | 3, 4, 5, 36, 43, 1, -1, 30, -1, 31, |
493 | -1, 32, -1, 35, -1, 34, 35, -1, 53, 41, |
494 | 21, -1, 1, -1, 6, -1, 14, -1, 19, -1, |
495 | 41, -1, 38, 41, -1, 1, -1, 11, -1, 22, |
496 | -1, 23, -1, 39, 40, -1, 39, 42, 40, -1, |
497 | 39, 1, -1, 37, -1, 42, 24, 37, -1, 42, |
498 | 1, -1, 44, -1, 43, 44, -1, 52, 25, 46, |
499 | 21, -1, 52, 25, 47, 43, 51, 46, 21, -1, |
500 | 52, 25, 47, 51, 46, 21, -1, 1, -1, 53, |
501 | 41, -1, 45, 53, 41, -1, 53, 41, -1, 22, |
502 | 45, 23, -1, 8, -1, 14, -1, 48, -1, 49, |
503 | 24, 48, -1, 26, -1, 9, -1, 9, 50, 49, |
504 | 26, -1, 10, -1, 11, -1 |
505 | }; |
506 | |
507 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
508 | static const yytype_uint8 yyrline[] = |
509 | { |
510 | 0, 64, 64, 65, 66, 67, 68, 69, 70, 71, |
511 | 71, 71, 74, 75, 77, 78, 80, 83, 84, 85, |
512 | 86, 87, 91, 94, 97, 102, 103, 104, 106, 107, |
513 | 108, 110, 111, 113, 114, 115, 116, 118, 119, 121, |
514 | 122, 124, 127, 130, 131, 133, 136, 138, 143, 146 |
515 | }; |
516 | #endif |
517 | |
518 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
519 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
520 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
521 | static const char *const yytname[] = |
522 | { |
523 | "$end", "error", "$undefined", "STEP", "HEADER", "ENDSEC", "DATA", |
524 | "ENDSTEP", "SCOPE", "ENDSCOPE", "ENTITY", "TYPE", "INTEGER", "FLOAT", |
525 | "IDENT", "TEXT", "NONDEF", "ENUM", "HEXA", "QUID", "' '", "';'", "'('", |
526 | "')'", "','", "'='", "'/'", "$accept", "finvide", "finstep", "stepf1", |
527 | "stepf2", "stepf3", "stepf", "headl", "headent", "endhead", "unarg", |
528 | "listype", "deblist", "finlist", "listarg", "arglist", "model", "bloc", |
529 | "plex", "unent", "debscop", "unid", "export", "debexp", "finscop", |
530 | "entlab", "enttype", YY_NULL |
531 | }; |
532 | #endif |
533 | |
534 | # ifdef YYPRINT |
535 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
536 | token YYLEX-NUM. */ |
537 | static const yytype_uint16 yytoknum[] = |
538 | { |
539 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
540 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
541 | 32, 59, 40, 41, 44, 61, 47 |
542 | }; |
543 | # endif |
544 | |
545 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
546 | static const yytype_uint8 yyr1[] = |
547 | { |
548 | 0, 27, 28, 28, 29, 29, 30, 31, 32, 33, |
549 | 33, 33, 34, 34, 35, 35, 36, 37, 37, 37, |
550 | 37, 37, 38, 39, 40, 41, 41, 41, 42, 42, |
551 | 42, 43, 43, 44, 44, 44, 44, 45, 45, 46, |
552 | 46, 47, 48, 49, 49, 50, 51, 51, 52, 53 |
553 | }; |
554 | |
555 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
556 | static const yytype_uint8 yyr2[] = |
557 | { |
558 | 0, 2, 1, 2, 1, 2, 8, 7, 6, 1, |
559 | 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, |
560 | 2, 1, 1, 1, 1, 2, 3, 2, 1, 3, |
561 | 2, 1, 2, 4, 7, 6, 1, 2, 3, 2, |
562 | 3, 1, 1, 1, 3, 1, 1, 4, 1, 1 |
563 | }; |
564 | |
565 | /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. |
566 | Performed when YYTABLE doesn't specify something else to do. Zero |
567 | means the default is an error. */ |
568 | static const yytype_uint8 yydefact[] = |
569 | { |
570 | 0, 0, 9, 10, 11, 0, 0, 1, 15, 0, |
571 | 49, 0, 12, 0, 16, 0, 0, 13, 23, 0, |
572 | 0, 36, 48, 0, 31, 0, 0, 21, 22, 17, |
573 | 18, 24, 28, 0, 25, 19, 0, 14, 36, 0, |
574 | 32, 0, 0, 20, 30, 0, 26, 7, 41, 0, |
575 | 0, 0, 0, 0, 21, 29, 0, 0, 33, 46, |
576 | 0, 0, 39, 4, 6, 40, 0, 37, 45, 0, |
577 | 0, 0, 2, 5, 38, 42, 43, 0, 0, 35, |
578 | 3, 0, 47, 34, 44 |
579 | }; |
580 | |
581 | /* YYDEFGOTO[NTERM-NUM]. */ |
582 | static const yytype_int8 yydefgoto[] = |
583 | { |
584 | -1, 73, 64, 2, 3, 4, 5, 11, 12, 15, |
585 | 32, 33, 19, 34, 35, 36, 23, 24, 56, 50, |
586 | 51, 76, 77, 69, 61, 25, 52 |
587 | }; |
588 | |
589 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
590 | STATE-NUM. */ |
591 | #define YYPACT_NINF -26 |
592 | static const yytype_int8 yypact[] = |
593 | { |
594 | 27, 30, -26, -26, -26, 31, 36, -26, -26, 55, |
595 | -26, 49, -26, 14, -26, 41, 55, -26, -26, 10, |
596 | 42, -26, -26, 9, -26, 37, 41, -3, -26, -26, |
597 | -26, -26, -26, 14, -26, -26, 4, -26, 65, 59, |
598 | -26, 1, 54, -26, -26, 24, -26, -26, -26, 56, |
599 | 48, 47, 14, 61, -26, -26, -7, 14, -26, 44, |
600 | 47, -5, -26, 51, -26, -26, 14, -26, -26, 58, |
601 | -5, 52, -26, 57, -26, -26, -26, -11, 53, -26, |
602 | -26, 58, -26, -26, -26 |
603 | }; |
604 | |
605 | /* YYPGOTO[NTERM-NUM]. */ |
606 | static const yytype_int8 yypgoto[] = |
607 | { |
608 | -26, -26, -26, -26, -26, -26, -26, -26, 64, 60, |
609 | 33, -26, -26, 43, -13, -26, -25, -20, -26, -12, |
610 | -26, -1, -26, -26, 21, -26, -4 |
611 | }; |
612 | |
613 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
614 | positive, shift that token. If negative, reduce the rule which |
615 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
616 | #define YYTABLE_NINF -28 |
617 | static const yytype_int8 yytable[] = |
618 | { |
619 | 20, 42, 13, 40, 10, 44, 10, 13, -27, 48, |
620 | 38, 27, 10, 81, 39, 82, 65, 49, -27, 22, |
621 | 43, 28, 40, 49, 29, 54, 60, 31, 45, 30, |
622 | 1, 7, 18, 31, 6, 28, 18, 8, 29, 62, |
623 | 40, 9, 21, 30, 67, 57, 18, 10, 21, 71, |
624 | 8, 22, 66, 74, 16, 21, 59, 22, 78, 53, |
625 | 10, 14, 41, 37, 22, -8, 47, 10, 63, 58, |
626 | 68, 72, 75, 79, 83, 17, 26, 80, 55, 46, |
627 | 84, 70 |
628 | }; |
629 | |
630 | #define yypact_value_is_default(Yystate) \ |
631 | (!!((Yystate) == (-26))) |
632 | |
633 | #define yytable_value_is_error(Yytable_value) \ |
634 | YYID (0) |
635 | |
636 | static const yytype_uint8 yycheck[] = |
637 | { |
638 | 13, 26, 6, 23, 11, 1, 11, 11, 11, 8, |
639 | 1, 1, 11, 24, 5, 26, 23, 22, 21, 10, |
640 | 33, 11, 42, 22, 14, 1, 51, 23, 24, 19, |
641 | 3, 0, 22, 23, 4, 11, 22, 1, 14, 52, |
642 | 60, 5, 1, 19, 57, 49, 22, 11, 1, 61, |
643 | 1, 10, 56, 66, 5, 1, 9, 10, 70, 5, |
644 | 11, 6, 25, 21, 10, 0, 7, 11, 7, 21, |
645 | 26, 20, 14, 21, 21, 11, 16, 20, 45, 36, |
646 | 81, 60 |
647 | }; |
648 | |
649 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
650 | symbol of state STATE-NUM. */ |
651 | static const yytype_uint8 yystos[] = |
652 | { |
653 | 0, 3, 30, 31, 32, 33, 4, 0, 1, 5, |
654 | 11, 34, 35, 53, 6, 36, 5, 35, 22, 39, |
655 | 41, 1, 10, 43, 44, 52, 36, 1, 11, 14, |
656 | 19, 23, 37, 38, 40, 41, 42, 21, 1, 5, |
657 | 44, 25, 43, 41, 1, 24, 40, 7, 8, 22, |
658 | 46, 47, 53, 5, 1, 37, 45, 53, 21, 9, |
659 | 43, 51, 41, 7, 29, 23, 53, 41, 26, 50, |
660 | 51, 46, 20, 28, 41, 14, 48, 49, 46, 21, |
661 | 20, 24, 26, 21, 48 |
662 | }; |
663 | |
664 | #define yyerrok (yyerrstatus = 0) |
665 | #define yyclearin (yychar = YYEMPTY) |
666 | #define YYEMPTY (-2) |
667 | #define YYEOF 0 |
668 | |
669 | #define YYACCEPT goto yyacceptlab |
670 | #define YYABORT goto yyabortlab |
671 | #define YYERROR goto yyerrorlab |
672 | |
673 | |
674 | /* Like YYERROR except do call yyerror. This remains here temporarily |
675 | to ease the transition to the new meaning of YYERROR, for GCC. |
676 | Once GCC version 2 has supplanted version 1, this can go. However, |
677 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
678 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
679 | discussed. */ |
680 | |
681 | #define YYFAIL goto yyerrlab |
682 | #if defined YYFAIL |
683 | /* This is here to suppress warnings from the GCC cpp's |
684 | -Wunused-macros. Normally we don't worry about that warning, but |
685 | some users do, and we want to make it easy for users to remove |
686 | YYFAIL uses, which will produce warnings from Bison 2.5. */ |
687 | #endif |
688 | |
689 | #define YYRECOVERING() (!!yyerrstatus) |
690 | |
691 | #define YYBACKUP(Token, Value) \ |
692 | do \ |
693 | if (yychar == YYEMPTY) \ |
694 | { \ |
695 | yychar = (Token); \ |
696 | yylval = (Value); \ |
697 | YYPOPSTACK (yylen); \ |
698 | yystate = *yyssp; \ |
699 | goto yybackup; \ |
700 | } \ |
701 | else \ |
702 | { \ |
703 | yyerror (YY_("syntax error: cannot back up")); \ |
704 | YYERROR; \ |
705 | } \ |
706 | while (YYID (0)) |
707 | |
708 | /* Error token number */ |
709 | #define YYTERROR 1 |
710 | #define YYERRCODE 256 |
711 | |
712 | |
713 | /* This macro is provided for backward compatibility. */ |
714 | #ifndef YY_LOCATION_PRINT |
715 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
716 | #endif |
717 | |
718 | |
719 | /* YYLEX -- calling `yylex' with the right arguments. */ |
720 | #ifdef YYLEX_PARAM |
721 | # define YYLEX yylex (YYLEX_PARAM) |
722 | #else |
723 | # define YYLEX yylex () |
724 | #endif |
725 | |
726 | /* Enable debugging if requested. */ |
727 | #if YYDEBUG |
728 | |
729 | # ifndef YYFPRINTF |
730 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
731 | # define YYFPRINTF fprintf |
732 | # endif |
733 | |
734 | # define YYDPRINTF(Args) \ |
735 | do { \ |
736 | if (yydebug) \ |
737 | YYFPRINTF Args; \ |
738 | } while (YYID (0)) |
739 | |
740 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
741 | do { \ |
742 | if (yydebug) \ |
743 | { \ |
744 | YYFPRINTF (stderr, "%s ", Title); \ |
745 | yy_symbol_print (stderr, \ |
746 | Type, Value); \ |
747 | YYFPRINTF (stderr, "\n"); \ |
748 | } \ |
749 | } while (YYID (0)) |
750 | |
751 | |
752 | /*--------------------------------. |
753 | | Print this symbol on YYOUTPUT. | |
754 | `--------------------------------*/ |
755 | |
756 | /*ARGSUSED*/ |
757 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
758 | || defined __cplusplus || defined _MSC_VER) |
759 | static void |
760 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
761 | #else |
762 | static void |
763 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
764 | FILE *yyoutput; |
765 | int yytype; |
766 | YYSTYPE const * const yyvaluep; |
767 | #endif |
768 | { |
769 | FILE *yyo = yyoutput; |
770 | YYUSE (yyo); |
771 | if (!yyvaluep) |
772 | return; |
773 | # ifdef YYPRINT |
774 | if (yytype < YYNTOKENS) |
775 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
776 | # else |
777 | YYUSE (yyoutput); |
778 | # endif |
779 | switch (yytype) |
780 | { |
781 | default: |
782 | break; |
783 | } |
784 | } |
785 | |
786 | |
787 | /*--------------------------------. |
788 | | Print this symbol on YYOUTPUT. | |
789 | `--------------------------------*/ |
790 | |
791 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
792 | || defined __cplusplus || defined _MSC_VER) |
793 | static void |
794 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
795 | #else |
796 | static void |
797 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
798 | FILE *yyoutput; |
799 | int yytype; |
800 | YYSTYPE const * const yyvaluep; |
801 | #endif |
802 | { |
803 | if (yytype < YYNTOKENS) |
804 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
805 | else |
806 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
807 | |
808 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
809 | YYFPRINTF (yyoutput, ")"); |
810 | } |
811 | |
812 | /*------------------------------------------------------------------. |
813 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
814 | | TOP (included). | |
815 | `------------------------------------------------------------------*/ |
816 | |
817 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
818 | || defined __cplusplus || defined _MSC_VER) |
819 | static void |
820 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
821 | #else |
822 | static void |
823 | yy_stack_print (yybottom, yytop) |
824 | yytype_int16 *yybottom; |
825 | yytype_int16 *yytop; |
826 | #endif |
827 | { |
828 | YYFPRINTF (stderr, "Stack now"); |
829 | for (; yybottom <= yytop; yybottom++) |
830 | { |
831 | int yybot = *yybottom; |
832 | YYFPRINTF (stderr, " %d", yybot); |
833 | } |
834 | YYFPRINTF (stderr, "\n"); |
835 | } |
836 | |
837 | # define YY_STACK_PRINT(Bottom, Top) \ |
838 | do { \ |
839 | if (yydebug) \ |
840 | yy_stack_print ((Bottom), (Top)); \ |
841 | } while (YYID (0)) |
842 | |
843 | |
844 | /*------------------------------------------------. |
845 | | Report that the YYRULE is going to be reduced. | |
846 | `------------------------------------------------*/ |
847 | |
848 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
849 | || defined __cplusplus || defined _MSC_VER) |
850 | static void |
851 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
852 | #else |
853 | static void |
854 | yy_reduce_print (yyvsp, yyrule) |
855 | YYSTYPE *yyvsp; |
856 | int yyrule; |
857 | #endif |
858 | { |
859 | int yynrhs = yyr2[yyrule]; |
860 | int yyi; |
861 | unsigned long int yylno = yyrline[yyrule]; |
862 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
863 | yyrule - 1, yylno); |
864 | /* The symbols being reduced. */ |
865 | for (yyi = 0; yyi < yynrhs; yyi++) |
866 | { |
867 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
868 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
869 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
870 | ); |
871 | YYFPRINTF (stderr, "\n"); |
872 | } |
873 | } |
874 | |
875 | # define YY_REDUCE_PRINT(Rule) \ |
876 | do { \ |
877 | if (yydebug) \ |
878 | yy_reduce_print (yyvsp, Rule); \ |
879 | } while (YYID (0)) |
880 | |
881 | /* Nonzero means print parse trace. It is left uninitialized so that |
882 | multiple parsers can coexist. */ |
883 | int yydebug; |
884 | #else /* !YYDEBUG */ |
885 | # define YYDPRINTF(Args) |
886 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
887 | # define YY_STACK_PRINT(Bottom, Top) |
888 | # define YY_REDUCE_PRINT(Rule) |
889 | #endif /* !YYDEBUG */ |
890 | |
891 | |
892 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
893 | #ifndef YYINITDEPTH |
894 | # define YYINITDEPTH 200 |
895 | #endif |
896 | |
897 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
898 | if the built-in stack extension method is used). |
899 | |
900 | Do not make this value too large; the results are undefined if |
901 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
902 | evaluated with infinite-precision integer arithmetic. */ |
903 | |
904 | #ifndef YYMAXDEPTH |
905 | # define YYMAXDEPTH 10000 |
906 | #endif |
907 | |
908 | |
909 | #if YYERROR_VERBOSE |
910 | |
911 | # ifndef yystrlen |
912 | # if defined __GLIBC__ && defined _STRING_H |
913 | # define yystrlen strlen |
914 | # else |
915 | /* Return the length of YYSTR. */ |
916 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
917 | || defined __cplusplus || defined _MSC_VER) |
918 | static YYSIZE_T |
919 | yystrlen (const char *yystr) |
920 | #else |
921 | static YYSIZE_T |
922 | yystrlen (yystr) |
923 | const char *yystr; |
924 | #endif |
925 | { |
926 | YYSIZE_T yylen; |
927 | for (yylen = 0; yystr[yylen]; yylen++) |
928 | continue; |
929 | return yylen; |
930 | } |
931 | # endif |
932 | # endif |
933 | |
934 | # ifndef yystpcpy |
935 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
936 | # define yystpcpy stpcpy |
937 | # else |
938 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
939 | YYDEST. */ |
940 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
941 | || defined __cplusplus || defined _MSC_VER) |
942 | static char * |
943 | yystpcpy (char *yydest, const char *yysrc) |
944 | #else |
945 | static char * |
946 | yystpcpy (yydest, yysrc) |
947 | char *yydest; |
948 | const char *yysrc; |
949 | #endif |
950 | { |
951 | char *yyd = yydest; |
952 | const char *yys = yysrc; |
953 | |
954 | while ((*yyd++ = *yys++) != '\0') |
955 | continue; |
956 | |
957 | return yyd - 1; |
958 | } |
959 | # endif |
960 | # endif |
961 | |
962 | # ifndef yytnamerr |
963 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
964 | quotes and backslashes, so that it's suitable for yyerror. The |
965 | heuristic is that double-quoting is unnecessary unless the string |
966 | contains an apostrophe, a comma, or backslash (other than |
967 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
968 | null, do not copy; instead, return the length of what the result |
969 | would have been. */ |
970 | static YYSIZE_T |
971 | yytnamerr (char *yyres, const char *yystr) |
972 | { |
973 | if (*yystr == '"') |
974 | { |
975 | YYSIZE_T yyn = 0; |
976 | char const *yyp = yystr; |
977 | |
978 | for (;;) |
979 | switch (*++yyp) |
980 | { |
981 | case '\'': |
982 | case ',': |
983 | goto do_not_strip_quotes; |
984 | |
985 | case '\\': |
986 | if (*++yyp != '\\') |
987 | goto do_not_strip_quotes; |
988 | /* Fall through. */ |
989 | default: |
990 | if (yyres) |
991 | yyres[yyn] = *yyp; |
992 | yyn++; |
993 | break; |
994 | |
995 | case '"': |
996 | if (yyres) |
997 | yyres[yyn] = '\0'; |
998 | return yyn; |
999 | } |
1000 | do_not_strip_quotes: ; |
1001 | } |
1002 | |
1003 | if (! yyres) |
1004 | return yystrlen (yystr); |
1005 | |
1006 | return yystpcpy (yyres, yystr) - yyres; |
1007 | } |
1008 | # endif |
1009 | |
1010 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
1011 | about the unexpected token YYTOKEN for the state stack whose top is |
1012 | YYSSP. |
1013 | |
1014 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
1015 | not large enough to hold the message. In that case, also set |
1016 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
1017 | required number of bytes is too large to store. */ |
1018 | static int |
1019 | yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
1020 | yytype_int16 *yyssp, int yytoken) |
1021 | { |
1022 | YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); |
1023 | YYSIZE_T yysize = yysize0; |
1024 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
1025 | /* Internationalized format string. */ |
1026 | const char *yyformat = YY_NULL; |
1027 | /* Arguments of yyformat. */ |
1028 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
1029 | /* Number of reported tokens (one for the "unexpected", one per |
1030 | "expected"). */ |
1031 | int yycount = 0; |
1032 | |
1033 | /* There are many possibilities here to consider: |
1034 | - Assume YYFAIL is not used. It's too flawed to consider. See |
1035 | <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> |
1036 | for details. YYERROR is fine as it does not invoke this |
1037 | function. |
1038 | - If this state is a consistent state with a default action, then |
1039 | the only way this function was invoked is if the default action |
1040 | is an error action. In that case, don't check for expected |
1041 | tokens because there are none. |
1042 | - The only way there can be no lookahead present (in yychar) is if |
1043 | this state is a consistent state with a default action. Thus, |
1044 | detecting the absence of a lookahead is sufficient to determine |
1045 | that there is no unexpected or expected token to report. In that |
1046 | case, just report a simple "syntax error". |
1047 | - Don't assume there isn't a lookahead just because this state is a |
1048 | consistent state with a default action. There might have been a |
1049 | previous inconsistent state, consistent state with a non-default |
1050 | action, or user semantic action that manipulated yychar. |
1051 | - Of course, the expected token list depends on states to have |
1052 | correct lookahead information, and it depends on the parser not |
1053 | to perform extra reductions after fetching a lookahead from the |
1054 | scanner and before detecting a syntax error. Thus, state merging |
1055 | (from LALR or IELR) and default reductions corrupt the expected |
1056 | token list. However, the list is correct for canonical LR with |
1057 | one exception: it will still contain any token that will not be |
1058 | accepted due to an error action in a later state. |
1059 | */ |
1060 | if (yytoken != YYEMPTY) |
1061 | { |
1062 | int yyn = yypact[*yyssp]; |
1063 | yyarg[yycount++] = yytname[yytoken]; |
1064 | if (!yypact_value_is_default (yyn)) |
1065 | { |
1066 | /* Start YYX at -YYN if negative to avoid negative indexes in |
1067 | YYCHECK. In other words, skip the first -YYN actions for |
1068 | this state because they are default actions. */ |
1069 | int yyxbegin = yyn < 0 ? -yyn : 0; |
1070 | /* Stay within bounds of both yycheck and yytname. */ |
1071 | int yychecklim = YYLAST - yyn + 1; |
1072 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
1073 | int yyx; |
1074 | |
1075 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1076 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
1077 | && !yytable_value_is_error (yytable[yyx + yyn])) |
1078 | { |
1079 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
1080 | { |
1081 | yycount = 1; |
1082 | yysize = yysize0; |
1083 | break; |
1084 | } |
1085 | yyarg[yycount++] = yytname[yyx]; |
1086 | { |
1087 | YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); |
1088 | if (! (yysize <= yysize1 |
1089 | && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
1090 | return 2; |
1091 | yysize = yysize1; |
1092 | } |
1093 | } |
1094 | } |
1095 | } |
1096 | |
1097 | switch (yycount) |
1098 | { |
1099 | # define YYCASE_(N, S) \ |
1100 | case N: \ |
1101 | yyformat = S; \ |
1102 | break |
1103 | YYCASE_(0, YY_("syntax error")); |
1104 | YYCASE_(1, YY_("syntax error, unexpected %s")); |
1105 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
1106 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
1107 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
1108 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
1109 | # undef YYCASE_ |
1110 | } |
1111 | |
1112 | { |
1113 | YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
1114 | if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
1115 | return 2; |
1116 | yysize = yysize1; |
1117 | } |
1118 | |
1119 | if (*yymsg_alloc < yysize) |
1120 | { |
1121 | *yymsg_alloc = 2 * yysize; |
1122 | if (! (yysize <= *yymsg_alloc |
1123 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
1124 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
1125 | return 1; |
1126 | } |
1127 | |
1128 | /* Avoid sprintf, as that infringes on the user's name space. |
1129 | Don't have undefined behavior even if the translation |
1130 | produced a string with the wrong number of "%s"s. */ |
1131 | { |
1132 | char *yyp = *yymsg; |
1133 | int yyi = 0; |
1134 | while ((*yyp = *yyformat) != '\0') |
1135 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
1136 | { |
1137 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
1138 | yyformat += 2; |
1139 | } |
1140 | else |
1141 | { |
1142 | yyp++; |
1143 | yyformat++; |
1144 | } |
1145 | } |
1146 | return 0; |
1147 | } |
1148 | #endif /* YYERROR_VERBOSE */ |
1149 | |
1150 | /*-----------------------------------------------. |
1151 | | Release the memory associated to this symbol. | |
1152 | `-----------------------------------------------*/ |
1153 | |
1154 | /*ARGSUSED*/ |
1155 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
1156 | || defined __cplusplus || defined _MSC_VER) |
1157 | static void |
1158 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
1159 | #else |
1160 | static void |
1161 | yydestruct (yymsg, yytype, yyvaluep) |
1162 | const char *yymsg; |
1163 | int yytype; |
1164 | YYSTYPE *yyvaluep; |
1165 | #endif |
1166 | { |
1167 | YYUSE (yyvaluep); |
1168 | |
1169 | if (!yymsg) |
1170 | yymsg = "Deleting"; |
1171 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
1172 | |
1173 | switch (yytype) |
1174 | { |
1175 | |
1176 | default: |
1177 | break; |
1178 | } |
1179 | } |
1180 | |
1181 | |
1182 | |
1183 | |
1184 | /* The lookahead symbol. */ |
1185 | int yychar; |
1186 | |
1187 | |
1188 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1189 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1190 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END |
1191 | #endif |
1192 | #ifndef YY_INITIAL_VALUE |
1193 | # define YY_INITIAL_VALUE(Value) /* Nothing. */ |
1194 | #endif |
1195 | |
1196 | /* The semantic value of the lookahead symbol. */ |
1197 | YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); |
1198 | |
1199 | /* Number of syntax errors so far. */ |
1200 | int yynerrs; |
1201 | |
1202 | |
1203 | /*----------. |
1204 | | yyparse. | |
1205 | `----------*/ |
1206 | |
1207 | #ifdef YYPARSE_PARAM |
1208 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
1209 | || defined __cplusplus || defined _MSC_VER) |
1210 | int |
1211 | yyparse (void *YYPARSE_PARAM) |
1212 | #else |
1213 | int |
1214 | yyparse (YYPARSE_PARAM) |
1215 | void *YYPARSE_PARAM; |
1216 | #endif |
1217 | #else /* ! YYPARSE_PARAM */ |
1218 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
1219 | || defined __cplusplus || defined _MSC_VER) |
1220 | int |
1221 | yyparse (void) |
1222 | #else |
1223 | int |
1224 | yyparse () |
1225 | |
1226 | #endif |
1227 | #endif |
1228 | { |
1229 | int yystate; |
1230 | /* Number of tokens to shift before error messages enabled. */ |
1231 | int yyerrstatus; |
1232 | |
1233 | /* The stacks and their tools: |
1234 | `yyss': related to states. |
1235 | `yyvs': related to semantic values. |
1236 | |
1237 | Refer to the stacks through separate pointers, to allow yyoverflow |
1238 | to reallocate them elsewhere. */ |
1239 | |
1240 | /* The state stack. */ |
1241 | yytype_int16 yyssa[YYINITDEPTH]; |
1242 | yytype_int16 *yyss; |
1243 | yytype_int16 *yyssp; |
1244 | |
1245 | /* The semantic value stack. */ |
1246 | YYSTYPE yyvsa[YYINITDEPTH]; |
1247 | YYSTYPE *yyvs; |
1248 | YYSTYPE *yyvsp; |
1249 | |
1250 | YYSIZE_T yystacksize; |
1251 | |
1252 | int yyn; |
1253 | int yyresult; |
1254 | /* Lookahead token as an internal (translated) token number. */ |
1255 | int yytoken = 0; |
1256 | /* The variables used to return semantic value and location from the |
1257 | action routines. */ |
1258 | YYSTYPE yyval; |
1259 | |
1260 | #if YYERROR_VERBOSE |
1261 | /* Buffer for error messages, and its allocated size. */ |
1262 | char yymsgbuf[128]; |
1263 | char *yymsg = yymsgbuf; |
1264 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
1265 | #endif |
1266 | |
1267 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
1268 | |
1269 | /* The number of symbols on the RHS of the reduced rule. |
1270 | Keep to zero when no symbol should be popped. */ |
1271 | int yylen = 0; |
1272 | |
1273 | yyssp = yyss = yyssa; |
1274 | yyvsp = yyvs = yyvsa; |
1275 | yystacksize = YYINITDEPTH; |
1276 | |
1277 | YYDPRINTF ((stderr, "Starting parse\n")); |
1278 | |
1279 | yystate = 0; |
1280 | yyerrstatus = 0; |
1281 | yynerrs = 0; |
1282 | yychar = YYEMPTY; /* Cause a token to be read. */ |
1283 | goto yysetstate; |
1284 | |
1285 | /*------------------------------------------------------------. |
1286 | | yynewstate -- Push a new state, which is found in yystate. | |
1287 | `------------------------------------------------------------*/ |
1288 | yynewstate: |
1289 | /* In all cases, when you get here, the value and location stacks |
1290 | have just been pushed. So pushing a state here evens the stacks. */ |
1291 | yyssp++; |
1292 | |
1293 | yysetstate: |
1294 | *yyssp = yystate; |
1295 | |
1296 | if (yyss + yystacksize - 1 <= yyssp) |
1297 | { |
1298 | /* Get the current used size of the three stacks, in elements. */ |
1299 | YYSIZE_T yysize = yyssp - yyss + 1; |
1300 | |
1301 | #ifdef yyoverflow |
1302 | { |
1303 | /* Give user a chance to reallocate the stack. Use copies of |
1304 | these so that the &'s don't force the real ones into |
1305 | memory. */ |
1306 | YYSTYPE *yyvs1 = yyvs; |
1307 | yytype_int16 *yyss1 = yyss; |
1308 | |
1309 | /* Each stack pointer address is followed by the size of the |
1310 | data in use in that stack, in bytes. This used to be a |
1311 | conditional around just the two extra args, but that might |
1312 | be undefined if yyoverflow is a macro. */ |
1313 | yyoverflow (YY_("memory exhausted"), |
1314 | &yyss1, yysize * sizeof (*yyssp), |
1315 | &yyvs1, yysize * sizeof (*yyvsp), |
1316 | &yystacksize); |
1317 | |
1318 | yyss = yyss1; |
1319 | yyvs = yyvs1; |
1320 | } |
1321 | #else /* no yyoverflow */ |
1322 | # ifndef YYSTACK_RELOCATE |
1323 | goto yyexhaustedlab; |
1324 | # else |
1325 | /* Extend the stack our own way. */ |
1326 | if (YYMAXDEPTH <= yystacksize) |
1327 | goto yyexhaustedlab; |
1328 | yystacksize *= 2; |
1329 | if (YYMAXDEPTH < yystacksize) |
1330 | yystacksize = YYMAXDEPTH; |
1331 | |
1332 | { |
1333 | yytype_int16 *yyss1 = yyss; |
1334 | union yyalloc *yyptr = |
1335 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
1336 | if (! yyptr) |
1337 | goto yyexhaustedlab; |
1338 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
1339 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
1340 | # undef YYSTACK_RELOCATE |
1341 | if (yyss1 != yyssa) |
1342 | YYSTACK_FREE (yyss1); |
1343 | } |
1344 | # endif |
1345 | #endif /* no yyoverflow */ |
1346 | |
1347 | yyssp = yyss + yysize - 1; |
1348 | yyvsp = yyvs + yysize - 1; |
1349 | |
1350 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
1351 | (unsigned long int) yystacksize)); |
1352 | |
1353 | if (yyss + yystacksize - 1 <= yyssp) |
1354 | YYABORT; |
1355 | } |
1356 | |
1357 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
1358 | |
1359 | if (yystate == YYFINAL) |
1360 | YYACCEPT; |
1361 | |
1362 | goto yybackup; |
1363 | |
1364 | /*-----------. |
1365 | | yybackup. | |
1366 | `-----------*/ |
1367 | yybackup: |
1368 | |
1369 | /* Do appropriate processing given the current state. Read a |
1370 | lookahead token if we need one and don't already have one. */ |
1371 | |
1372 | /* First try to decide what to do without reference to lookahead token. */ |
1373 | yyn = yypact[yystate]; |
1374 | if (yypact_value_is_default (yyn)) |
1375 | goto yydefault; |
1376 | |
1377 | /* Not known => get a lookahead token if don't already have one. */ |
1378 | |
1379 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
1380 | if (yychar == YYEMPTY) |
1381 | { |
1382 | YYDPRINTF ((stderr, "Reading a token: ")); |
1383 | yychar = YYLEX; |
1384 | } |
1385 | |
1386 | if (yychar <= YYEOF) |
1387 | { |
1388 | yychar = yytoken = YYEOF; |
1389 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
1390 | } |
1391 | else |
1392 | { |
1393 | yytoken = YYTRANSLATE (yychar); |
1394 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
1395 | } |
1396 | |
1397 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
1398 | detect an error, take that action. */ |
1399 | yyn += yytoken; |
1400 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
1401 | goto yydefault; |
1402 | yyn = yytable[yyn]; |
1403 | if (yyn <= 0) |
1404 | { |
1405 | if (yytable_value_is_error (yyn)) |
1406 | goto yyerrlab; |
1407 | yyn = -yyn; |
1408 | goto yyreduce; |
1409 | } |
1410 | |
1411 | /* Count tokens shifted since error; after three, turn off error |
1412 | status. */ |
1413 | if (yyerrstatus) |
1414 | yyerrstatus--; |
1415 | |
1416 | /* Shift the lookahead token. */ |
1417 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
1418 | |
1419 | /* Discard the shifted token. */ |
1420 | yychar = YYEMPTY; |
1421 | |
1422 | yystate = yyn; |
1423 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1424 | *++yyvsp = yylval; |
1425 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
1426 | |
1427 | goto yynewstate; |
1428 | |
1429 | |
1430 | /*-----------------------------------------------------------. |
1431 | | yydefault -- do the default action for the current state. | |
1432 | `-----------------------------------------------------------*/ |
1433 | yydefault: |
1434 | yyn = yydefact[yystate]; |
1435 | if (yyn == 0) |
1436 | goto yyerrlab; |
1437 | goto yyreduce; |
1438 | |
1439 | |
1440 | /*-----------------------------. |
1441 | | yyreduce -- Do a reduction. | |
1442 | `-----------------------------*/ |
1443 | yyreduce: |
1444 | /* yyn is the number of a rule to reduce with. */ |
1445 | yylen = yyr2[yyn]; |
1446 | |
1447 | /* If YYLEN is nonzero, implement the default value of the action: |
1448 | `$$ = $1'. |
1449 | |
1450 | Otherwise, the following line sets YYVAL to garbage. |
1451 | This behavior is undocumented and Bison |
1452 | users should not rely upon it. Assigning to YYVAL |
1453 | unconditionally makes the parser a bit smaller, and it avoids a |
1454 | GCC warning that YYVAL may be used uninitialized. */ |
1455 | yyval = yyvsp[1-yylen]; |
1456 | |
1457 | |
1458 | YY_REDUCE_PRINT (yyn); |
1459 | switch (yyn) |
1460 | { |
1461 | case 11: |
1462 | /* Line 1792 of yacc.c */ |
1463 | #line 72 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1464 | { rec_finfile(); return(0); /* fini pour celui-la */ } |
1465 | break; |
1466 | |
1467 | case 16: |
1468 | /* Line 1792 of yacc.c */ |
1469 | #line 81 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1470 | { rec_finhead(); } |
1471 | break; |
1472 | |
1473 | case 17: |
1474 | /* Line 1792 of yacc.c */ |
1475 | #line 83 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1476 | { rec_typarg(rec_argIdent); rec_newarg(); } |
1477 | break; |
1478 | |
1479 | case 18: |
1480 | /* Line 1792 of yacc.c */ |
1481 | #line 84 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1482 | { /* deja fait par lex*/ rec_newarg(); } |
1483 | break; |
1484 | |
1485 | case 19: |
1486 | /* Line 1792 of yacc.c */ |
1487 | #line 85 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1488 | { rec_newarg(); } |
1489 | break; |
1490 | |
1491 | case 20: |
1492 | /* Line 1792 of yacc.c */ |
1493 | #line 86 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1494 | { rec_newarg(); } |
1495 | break; |
1496 | |
1497 | case 21: |
1498 | /* Line 1792 of yacc.c */ |
1499 | #line 87 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1500 | { rec_typarg(rec_argMisc); rec_newarg(); |
1501 | yyerrstatus = 1; yyclearin; } |
1502 | break; |
1503 | |
1504 | case 22: |
1505 | /* Line 1792 of yacc.c */ |
1506 | #line 92 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1507 | { rec_listype(); } |
1508 | break; |
1509 | |
1510 | case 23: |
1511 | /* Line 1792 of yacc.c */ |
1512 | #line 95 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1513 | { rec_deblist(); } |
1514 | break; |
1515 | |
1516 | case 24: |
1517 | /* Line 1792 of yacc.c */ |
1518 | #line 98 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1519 | { if (modeprint > 0) |
1520 | { printf("Record no : %d -- ",nbrec+1); rec_print(currec); } |
1521 | rec_newent (); yyerrstatus = 0; } |
1522 | break; |
1523 | |
1524 | case 41: |
1525 | /* Line 1792 of yacc.c */ |
1526 | #line 125 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1527 | { scope_debut(); } |
1528 | break; |
1529 | |
1530 | case 42: |
1531 | /* Line 1792 of yacc.c */ |
1532 | #line 128 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1533 | { rec_typarg(rec_argIdent); rec_newarg(); } |
1534 | break; |
1535 | |
1536 | case 45: |
1537 | /* Line 1792 of yacc.c */ |
1538 | #line 134 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1539 | { rec_deblist(); } |
1540 | break; |
1541 | |
1542 | case 46: |
1543 | /* Line 1792 of yacc.c */ |
1544 | #line 137 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1545 | { scope_fin(); } |
1546 | break; |
1547 | |
1548 | case 47: |
1549 | /* Line 1792 of yacc.c */ |
1550 | #line 139 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1551 | { printf("*** Warning : Export List not yet processed\n"); |
1552 | rec_newent(); scope_fin() ; } |
1553 | break; |
1554 | |
1555 | case 48: |
1556 | /* Line 1792 of yacc.c */ |
1557 | #line 144 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1558 | { rec_ident(); } |
1559 | break; |
1560 | |
1561 | case 49: |
1562 | /* Line 1792 of yacc.c */ |
1563 | #line 147 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc" |
1564 | { rec_type (); } |
1565 | break; |
1566 | |
1567 | |
1568 | /* Line 1792 of yacc.c */ |
1569 | #line 1570 "step.tab.c" |
1570 | default: break; |
1571 | } |
1572 | /* User semantic actions sometimes alter yychar, and that requires |
1573 | that yytoken be updated with the new translation. We take the |
1574 | approach of translating immediately before every use of yytoken. |
1575 | One alternative is translating here after every semantic action, |
1576 | but that translation would be missed if the semantic action invokes |
1577 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
1578 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
1579 | incorrect destructor might then be invoked immediately. In the |
1580 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
1581 | to an incorrect destructor call or verbose syntax error message |
1582 | before the lookahead is translated. */ |
1583 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
1584 | |
1585 | YYPOPSTACK (yylen); |
1586 | yylen = 0; |
1587 | YY_STACK_PRINT (yyss, yyssp); |
1588 | |
1589 | *++yyvsp = yyval; |
1590 | |
1591 | /* Now `shift' the result of the reduction. Determine what state |
1592 | that goes to, based on the state we popped back to and the rule |
1593 | number reduced by. */ |
1594 | |
1595 | yyn = yyr1[yyn]; |
1596 | |
1597 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
1598 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
1599 | yystate = yytable[yystate]; |
1600 | else |
1601 | yystate = yydefgoto[yyn - YYNTOKENS]; |
1602 | |
1603 | goto yynewstate; |
1604 | |
1605 | |
1606 | /*------------------------------------. |
1607 | | yyerrlab -- here on detecting error | |
1608 | `------------------------------------*/ |
1609 | yyerrlab: |
1610 | /* Make sure we have latest lookahead translation. See comments at |
1611 | user semantic actions for why this is necessary. */ |
1612 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
1613 | |
1614 | /* If not already recovering from an error, report this error. */ |
1615 | if (!yyerrstatus) |
1616 | { |
1617 | ++yynerrs; |
1618 | #if ! YYERROR_VERBOSE |
1619 | yyerror (YY_("syntax error")); |
1620 | #else |
1621 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
1622 | yyssp, yytoken) |
1623 | { |
1624 | char const *yymsgp = YY_("syntax error"); |
1625 | int yysyntax_error_status; |
1626 | yysyntax_error_status = YYSYNTAX_ERROR; |
1627 | if (yysyntax_error_status == 0) |
1628 | yymsgp = yymsg; |
1629 | else if (yysyntax_error_status == 1) |
1630 | { |
1631 | if (yymsg != yymsgbuf) |
1632 | YYSTACK_FREE (yymsg); |
1633 | yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
1634 | if (!yymsg) |
1635 | { |
1636 | yymsg = yymsgbuf; |
1637 | yymsg_alloc = sizeof yymsgbuf; |
1638 | yysyntax_error_status = 2; |
1639 | } |
1640 | else |
1641 | { |
1642 | yysyntax_error_status = YYSYNTAX_ERROR; |
1643 | yymsgp = yymsg; |
1644 | } |
1645 | } |
1646 | yyerror (yymsgp); |
1647 | if (yysyntax_error_status == 2) |
1648 | goto yyexhaustedlab; |
1649 | } |
1650 | # undef YYSYNTAX_ERROR |
1651 | #endif |
1652 | } |
1653 | |
1654 | |
1655 | |
1656 | if (yyerrstatus == 3) |
1657 | { |
1658 | /* If just tried and failed to reuse lookahead token after an |
1659 | error, discard it. */ |
1660 | |
1661 | if (yychar <= YYEOF) |
1662 | { |
1663 | /* Return failure if at end of input. */ |
1664 | if (yychar == YYEOF) |
1665 | YYABORT; |
1666 | } |
1667 | else |
1668 | { |
1669 | yydestruct ("Error: discarding", |
1670 | yytoken, &yylval); |
1671 | yychar = YYEMPTY; |
1672 | } |
1673 | } |
1674 | |
1675 | /* Else will try to reuse lookahead token after shifting the error |
1676 | token. */ |
1677 | goto yyerrlab1; |
1678 | |
1679 | |
1680 | /*---------------------------------------------------. |
1681 | | yyerrorlab -- error raised explicitly by YYERROR. | |
1682 | `---------------------------------------------------*/ |
1683 | yyerrorlab: |
1684 | |
1685 | /* Pacify compilers like GCC when the user code never invokes |
1686 | YYERROR and the label yyerrorlab therefore never appears in user |
1687 | code. */ |
1688 | if (/*CONSTCOND*/ 0) |
1689 | goto yyerrorlab; |
1690 | |
1691 | /* Do not reclaim the symbols of the rule which action triggered |
1692 | this YYERROR. */ |
1693 | YYPOPSTACK (yylen); |
1694 | yylen = 0; |
1695 | YY_STACK_PRINT (yyss, yyssp); |
1696 | yystate = *yyssp; |
1697 | goto yyerrlab1; |
1698 | |
1699 | |
1700 | /*-------------------------------------------------------------. |
1701 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
1702 | `-------------------------------------------------------------*/ |
1703 | yyerrlab1: |
1704 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
1705 | |
1706 | for (;;) |
1707 | { |
1708 | yyn = yypact[yystate]; |
1709 | if (!yypact_value_is_default (yyn)) |
1710 | { |
1711 | yyn += YYTERROR; |
1712 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
1713 | { |
1714 | yyn = yytable[yyn]; |
1715 | if (0 < yyn) |
1716 | break; |
1717 | } |
1718 | } |
1719 | |
1720 | /* Pop the current state because it cannot handle the error token. */ |
1721 | if (yyssp == yyss) |
1722 | YYABORT; |
1723 | |
1724 | |
1725 | yydestruct ("Error: popping", |
1726 | yystos[yystate], yyvsp); |
1727 | YYPOPSTACK (1); |
1728 | yystate = *yyssp; |
1729 | YY_STACK_PRINT (yyss, yyssp); |
1730 | } |
1731 | |
1732 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1733 | *++yyvsp = yylval; |
1734 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
1735 | |
1736 | |
1737 | /* Shift the error token. */ |
1738 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
1739 | |
1740 | yystate = yyn; |
1741 | goto yynewstate; |
1742 | |
1743 | |
1744 | /*-------------------------------------. |
1745 | | yyacceptlab -- YYACCEPT comes here. | |
1746 | `-------------------------------------*/ |
1747 | yyacceptlab: |
1748 | yyresult = 0; |
1749 | goto yyreturn; |
1750 | |
1751 | /*-----------------------------------. |
1752 | | yyabortlab -- YYABORT comes here. | |
1753 | `-----------------------------------*/ |
1754 | yyabortlab: |
1755 | yyresult = 1; |
1756 | goto yyreturn; |
1757 | |
1758 | #if !defined yyoverflow || YYERROR_VERBOSE |
1759 | /*-------------------------------------------------. |
1760 | | yyexhaustedlab -- memory exhaustion comes here. | |
1761 | `-------------------------------------------------*/ |
1762 | yyexhaustedlab: |
1763 | yyerror (YY_("memory exhausted")); |
1764 | yyresult = 2; |
1765 | /* Fall through. */ |
1766 | #endif |
1767 | |
1768 | yyreturn: |
1769 | if (yychar != YYEMPTY) |
1770 | { |
1771 | /* Make sure we have latest lookahead translation. See comments at |
1772 | user semantic actions for why this is necessary. */ |
1773 | yytoken = YYTRANSLATE (yychar); |
1774 | yydestruct ("Cleanup: discarding lookahead", |
1775 | yytoken, &yylval); |
1776 | } |
1777 | /* Do not reclaim the symbols of the rule which action triggered |
1778 | this YYABORT or YYACCEPT. */ |
1779 | YYPOPSTACK (yylen); |
1780 | YY_STACK_PRINT (yyss, yyssp); |
1781 | while (yyssp != yyss) |
1782 | { |
1783 | yydestruct ("Cleanup: popping", |
1784 | yystos[*yyssp], yyvsp); |
1785 | YYPOPSTACK (1); |
1786 | } |
1787 | #ifndef yyoverflow |
1788 | if (yyss != yyssa) |
1789 | YYSTACK_FREE (yyss); |
1790 | #endif |
1791 | #if YYERROR_VERBOSE |
1792 | if (yymsg != yymsgbuf) |
1793 | YYSTACK_FREE (yymsg); |
1794 | #endif |
1795 | /* Make sure YYID is used. */ |
1796 | return YYID (yyresult); |
1797 | } |
1798 | |
1799 | |