1 /* A Bison parser, made by GNU Bison 2.7. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
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.
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.
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/>. */
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.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
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. */
43 /* Identify Bison output. */
47 #define YYBISON_VERSION "2.7"
50 #define YYSKELETON_NAME "yacc.c"
62 /* Substitute the variable and function names. */
63 #define yyparse stepparse
65 #define yyerror steperror
66 #define yylval steplval
67 #define yychar stepchar
68 #define yydebug stepdebug
69 #define yynerrs stepnerrs
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"
75 #include "recfile.ph" /* definitions des types d'arguments */
76 #include "recfile.pc" /* la-dedans, tout y est */
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
90 #define stepclearin yychar = -1
91 #define steperrok yyerrflag = 0
95 #define yyerrflag STEPerrflag
96 #define yyerrstatus STEPerrflag
99 /* ABV 19.12.00: merging porting modifications by POP (for WNT, AIX) */
100 #if defined(_WIN32) && !defined(MSDOS)
105 #define alloca malloc
109 // disable MSVC warnings in bison code
111 #pragma warning(disable:4244 4131 4127 4702)
112 #define YYMALLOC malloc
117 /* Line 371 of yacc.c */
118 #line 119 "step.tab.c"
121 # if defined __cplusplus && 201103L <= __cplusplus
122 # define YY_NULL nullptr
128 /* Enabling verbose error messages. */
129 #ifdef YYERROR_VERBOSE
130 # undef YYERROR_VERBOSE
131 # define YYERROR_VERBOSE 1
133 # define YYERROR_VERBOSE 0
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. */
145 extern int stepdebug;
151 /* Put the tokens into the symbol table, so that GDB and other debuggers
175 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
177 # define YYSTYPE_IS_TRIVIAL 1
178 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
179 # define YYSTYPE_IS_DECLARED 1
182 extern YYSTYPE steplval;
185 #if defined __STDC__ || defined __cplusplus
186 int stepparse (void *YYPARSE_PARAM);
190 #else /* ! YYPARSE_PARAM */
191 #if defined __STDC__ || defined __cplusplus
192 int stepparse (void);
196 #endif /* ! YYPARSE_PARAM */
198 #endif /* !YY_STEP_STEP_TAB_H_INCLUDED */
200 /* Copy the second part of user declarations. */
202 /* Line 390 of yacc.c */
203 #line 204 "step.tab.c"
210 typedef YYTYPE_UINT8 yytype_uint8;
212 typedef unsigned char yytype_uint8;
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;
221 typedef short int yytype_int8;
225 typedef YYTYPE_UINT16 yytype_uint16;
227 typedef unsigned short int yytype_uint16;
231 typedef YYTYPE_INT16 yytype_int16;
233 typedef short int yytype_int16;
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
246 # define YYSIZE_T unsigned int
250 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
253 # if defined YYENABLE_NLS && YYENABLE_NLS
255 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
256 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
260 # define YY_(Msgid) Msgid
264 /* Suppress unused-variable warnings by "using" E. */
265 #if ! defined lint || defined __GNUC__
266 # define YYUSE(E) ((void) (E))
268 # define YYUSE(E) /* empty */
271 /* Identity function, used to suppress warnings about constant conditions. */
275 #if (defined __STDC__ || defined __C99__FUNC__ \
276 || defined __cplusplus || defined _MSC_VER)
289 #if ! defined yyoverflow || YYERROR_VERBOSE
291 /* The parser invokes alloca or malloc; define the necessary symbols. */
293 # ifdef YYSTACK_USE_ALLOCA
294 # if YYSTACK_USE_ALLOCA
296 # define YYSTACK_ALLOC __builtin_alloca
297 # elif defined __BUILTIN_VA_ARG_INCR
298 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
300 # define YYSTACK_ALLOC __alloca
301 # elif defined _MSC_VER
302 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
303 # define alloca _alloca
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
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 */
329 # define YYSTACK_ALLOC YYMALLOC
330 # define YYSTACK_FREE YYFREE
331 # ifndef YYSTACK_ALLOC_MAXIMUM
332 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
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
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 */
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 */
357 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
360 #if (! defined yyoverflow \
361 && (! defined __cplusplus \
362 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
364 /* A type that is properly aligned for any stack member. */
367 yytype_int16 yyss_alloc;
371 /* The size of the maximum gap between one aligned stack and the next. */
372 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
374 /* The size of an array large to enough to hold all stacks, each with
376 # define YYSTACK_BYTES(N) \
377 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
378 + YYSTACK_GAP_MAXIMUM)
380 # define YYCOPY_NEEDED 1
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
387 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
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); \
400 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
401 /* Copy COUNT objects from SRC to DST. The source and destination do
404 # if defined __GNUC__ && 1 < __GNUC__
405 # define YYCOPY(Dst, Src, Count) \
406 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
408 # define YYCOPY(Dst, Src, Count) \
412 for (yyi = 0; yyi < (Count); yyi++) \
413 (Dst)[yyi] = (Src)[yyi]; \
418 #endif /* !YYCOPY_NEEDED */
420 /* YYFINAL -- State number of the termination state. */
422 /* YYLAST -- Last index in YYTABLE. */
425 /* YYNTOKENS -- Number of terminals. */
427 /* YYNNTS -- Number of nonterminals. */
429 /* YYNRULES -- Number of rules. */
431 /* YYNRULES -- Number of states. */
434 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
436 #define YYMAXUTOK 274
438 #define YYTRANSLATE(YYX) \
439 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
441 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
442 static const yytype_uint8 yytranslate[] =
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,
475 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
477 static const yytype_uint8 yyprhs[] =
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
486 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
487 static const yytype_int8 yyrhs[] =
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
507 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
508 static const yytype_uint8 yyrline[] =
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
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[] =
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
535 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
537 static const yytype_uint16 yytoknum[] =
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
545 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
546 static const yytype_uint8 yyr1[] =
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
555 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
556 static const yytype_uint8 yyr2[] =
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
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[] =
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,
581 /* YYDEFGOTO[NTERM-NUM]. */
582 static const yytype_int8 yydefgoto[] =
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
589 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
591 #define YYPACT_NINF -26
592 static const yytype_int8 yypact[] =
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
605 /* YYPGOTO[NTERM-NUM]. */
606 static const yytype_int8 yypgoto[] =
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
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[] =
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,
630 #define yypact_value_is_default(Yystate) \
631 (!!((Yystate) == (-26)))
633 #define yytable_value_is_error(Yytable_value) \
636 static const yytype_uint8 yycheck[] =
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,
649 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
650 symbol of state STATE-NUM. */
651 static const yytype_uint8 yystos[] =
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,
664 #define yyerrok (yyerrstatus = 0)
665 #define yyclearin (yychar = YYEMPTY)
669 #define YYACCEPT goto yyacceptlab
670 #define YYABORT goto yyabortlab
671 #define YYERROR goto yyerrorlab
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
681 #define YYFAIL goto yyerrlab
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. */
689 #define YYRECOVERING() (!!yyerrstatus)
691 #define YYBACKUP(Token, Value) \
693 if (yychar == YYEMPTY) \
697 YYPOPSTACK (yylen); \
703 yyerror (YY_("syntax error: cannot back up")); \
708 /* Error token number */
710 #define YYERRCODE 256
713 /* This macro is provided for backward compatibility. */
714 #ifndef YY_LOCATION_PRINT
715 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
719 /* YYLEX -- calling `yylex' with the right arguments. */
721 # define YYLEX yylex (YYLEX_PARAM)
723 # define YYLEX yylex ()
726 /* Enable debugging if requested. */
730 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
731 # define YYFPRINTF fprintf
734 # define YYDPRINTF(Args) \
740 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
744 YYFPRINTF (stderr, "%s ", Title); \
745 yy_symbol_print (stderr, \
747 YYFPRINTF (stderr, "\n"); \
752 /*--------------------------------.
753 | Print this symbol on YYOUTPUT. |
754 `--------------------------------*/
757 #if (defined __STDC__ || defined __C99__FUNC__ \
758 || defined __cplusplus || defined _MSC_VER)
760 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
763 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
766 YYSTYPE const * const yyvaluep;
769 FILE *yyo = yyoutput;
774 if (yytype < YYNTOKENS)
775 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
787 /*--------------------------------.
788 | Print this symbol on YYOUTPUT. |
789 `--------------------------------*/
791 #if (defined __STDC__ || defined __C99__FUNC__ \
792 || defined __cplusplus || defined _MSC_VER)
794 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
797 yy_symbol_print (yyoutput, yytype, yyvaluep)
800 YYSTYPE const * const yyvaluep;
803 if (yytype < YYNTOKENS)
804 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
806 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
808 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
809 YYFPRINTF (yyoutput, ")");
812 /*------------------------------------------------------------------.
813 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
815 `------------------------------------------------------------------*/
817 #if (defined __STDC__ || defined __C99__FUNC__ \
818 || defined __cplusplus || defined _MSC_VER)
820 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
823 yy_stack_print (yybottom, yytop)
824 yytype_int16 *yybottom;
828 YYFPRINTF (stderr, "Stack now");
829 for (; yybottom <= yytop; yybottom++)
831 int yybot = *yybottom;
832 YYFPRINTF (stderr, " %d", yybot);
834 YYFPRINTF (stderr, "\n");
837 # define YY_STACK_PRINT(Bottom, Top) \
840 yy_stack_print ((Bottom), (Top)); \
844 /*------------------------------------------------.
845 | Report that the YYRULE is going to be reduced. |
846 `------------------------------------------------*/
848 #if (defined __STDC__ || defined __C99__FUNC__ \
849 || defined __cplusplus || defined _MSC_VER)
851 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
854 yy_reduce_print (yyvsp, yyrule)
859 int yynrhs = yyr2[yyrule];
861 unsigned long int yylno = yyrline[yyrule];
862 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
864 /* The symbols being reduced. */
865 for (yyi = 0; yyi < yynrhs; yyi++)
867 YYFPRINTF (stderr, " $%d = ", yyi + 1);
868 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
869 &(yyvsp[(yyi + 1) - (yynrhs)])
871 YYFPRINTF (stderr, "\n");
875 # define YY_REDUCE_PRINT(Rule) \
878 yy_reduce_print (yyvsp, Rule); \
881 /* Nonzero means print parse trace. It is left uninitialized so that
882 multiple parsers can coexist. */
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 */
892 /* YYINITDEPTH -- initial size of the parser's stacks. */
894 # define YYINITDEPTH 200
897 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
898 if the built-in stack extension method is used).
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. */
905 # define YYMAXDEPTH 10000
912 # if defined __GLIBC__ && defined _STRING_H
913 # define yystrlen strlen
915 /* Return the length of YYSTR. */
916 #if (defined __STDC__ || defined __C99__FUNC__ \
917 || defined __cplusplus || defined _MSC_VER)
919 yystrlen (const char *yystr)
927 for (yylen = 0; yystr[yylen]; yylen++)
935 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
936 # define yystpcpy stpcpy
938 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
940 #if (defined __STDC__ || defined __C99__FUNC__ \
941 || defined __cplusplus || defined _MSC_VER)
943 yystpcpy (char *yydest, const char *yysrc)
946 yystpcpy (yydest, yysrc)
952 const char *yys = yysrc;
954 while ((*yyd++ = *yys++) != '\0')
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
971 yytnamerr (char *yyres, const char *yystr)
976 char const *yyp = yystr;
983 goto do_not_strip_quotes;
987 goto do_not_strip_quotes;
1000 do_not_strip_quotes: ;
1004 return yystrlen (yystr);
1006 return yystpcpy (yyres, yystr) - yyres;
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
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. */
1019 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1020 yytype_int16 *yyssp, int yytoken)
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
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
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.
1060 if (yytoken != YYEMPTY)
1062 int yyn = yypact[*yyssp];
1063 yyarg[yycount++] = yytname[yytoken];
1064 if (!yypact_value_is_default (yyn))
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;
1075 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1076 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1077 && !yytable_value_is_error (yytable[yyx + yyn]))
1079 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1085 yyarg[yycount++] = yytname[yyx];
1087 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1088 if (! (yysize <= yysize1
1089 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1099 # define YYCASE_(N, S) \
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"));
1113 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1114 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1119 if (*yymsg_alloc < yysize)
1121 *yymsg_alloc = 2 * yysize;
1122 if (! (yysize <= *yymsg_alloc
1123 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1124 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
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. */
1134 while ((*yyp = *yyformat) != '\0')
1135 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1137 yyp += yytnamerr (yyp, yyarg[yyi++]);
1148 #endif /* YYERROR_VERBOSE */
1150 /*-----------------------------------------------.
1151 | Release the memory associated to this symbol. |
1152 `-----------------------------------------------*/
1155 #if (defined __STDC__ || defined __C99__FUNC__ \
1156 || defined __cplusplus || defined _MSC_VER)
1158 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1161 yydestruct (yymsg, yytype, yyvaluep)
1171 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1184 /* The lookahead symbol. */
1188 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1189 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1190 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1192 #ifndef YY_INITIAL_VALUE
1193 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1196 /* The semantic value of the lookahead symbol. */
1197 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1199 /* Number of syntax errors so far. */
1207 #ifdef YYPARSE_PARAM
1208 #if (defined __STDC__ || defined __C99__FUNC__ \
1209 || defined __cplusplus || defined _MSC_VER)
1211 yyparse (void *YYPARSE_PARAM)
1214 yyparse (YYPARSE_PARAM)
1215 void *YYPARSE_PARAM;
1217 #else /* ! YYPARSE_PARAM */
1218 #if (defined __STDC__ || defined __C99__FUNC__ \
1219 || defined __cplusplus || defined _MSC_VER)
1230 /* Number of tokens to shift before error messages enabled. */
1233 /* The stacks and their tools:
1234 `yyss': related to states.
1235 `yyvs': related to semantic values.
1237 Refer to the stacks through separate pointers, to allow yyoverflow
1238 to reallocate them elsewhere. */
1240 /* The state stack. */
1241 yytype_int16 yyssa[YYINITDEPTH];
1243 yytype_int16 *yyssp;
1245 /* The semantic value stack. */
1246 YYSTYPE yyvsa[YYINITDEPTH];
1250 YYSIZE_T yystacksize;
1254 /* Lookahead token as an internal (translated) token number. */
1256 /* The variables used to return semantic value and location from the
1261 /* Buffer for error messages, and its allocated size. */
1263 char *yymsg = yymsgbuf;
1264 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1267 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1269 /* The number of symbols on the RHS of the reduced rule.
1270 Keep to zero when no symbol should be popped. */
1273 yyssp = yyss = yyssa;
1274 yyvsp = yyvs = yyvsa;
1275 yystacksize = YYINITDEPTH;
1277 YYDPRINTF ((stderr, "Starting parse\n"));
1282 yychar = YYEMPTY; /* Cause a token to be read. */
1285 /*------------------------------------------------------------.
1286 | yynewstate -- Push a new state, which is found in yystate. |
1287 `------------------------------------------------------------*/
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. */
1296 if (yyss + yystacksize - 1 <= yyssp)
1298 /* Get the current used size of the three stacks, in elements. */
1299 YYSIZE_T yysize = yyssp - yyss + 1;
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
1306 YYSTYPE *yyvs1 = yyvs;
1307 yytype_int16 *yyss1 = yyss;
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),
1321 #else /* no yyoverflow */
1322 # ifndef YYSTACK_RELOCATE
1323 goto yyexhaustedlab;
1325 /* Extend the stack our own way. */
1326 if (YYMAXDEPTH <= yystacksize)
1327 goto yyexhaustedlab;
1329 if (YYMAXDEPTH < yystacksize)
1330 yystacksize = YYMAXDEPTH;
1333 yytype_int16 *yyss1 = yyss;
1334 union yyalloc *yyptr =
1335 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1337 goto yyexhaustedlab;
1338 YYSTACK_RELOCATE (yyss_alloc, yyss);
1339 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1340 # undef YYSTACK_RELOCATE
1342 YYSTACK_FREE (yyss1);
1345 #endif /* no yyoverflow */
1347 yyssp = yyss + yysize - 1;
1348 yyvsp = yyvs + yysize - 1;
1350 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1351 (unsigned long int) yystacksize));
1353 if (yyss + yystacksize - 1 <= yyssp)
1357 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1359 if (yystate == YYFINAL)
1369 /* Do appropriate processing given the current state. Read a
1370 lookahead token if we need one and don't already have one. */
1372 /* First try to decide what to do without reference to lookahead token. */
1373 yyn = yypact[yystate];
1374 if (yypact_value_is_default (yyn))
1377 /* Not known => get a lookahead token if don't already have one. */
1379 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1380 if (yychar == YYEMPTY)
1382 YYDPRINTF ((stderr, "Reading a token: "));
1386 if (yychar <= YYEOF)
1388 yychar = yytoken = YYEOF;
1389 YYDPRINTF ((stderr, "Now at end of input.\n"));
1393 yytoken = YYTRANSLATE (yychar);
1394 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1397 /* If the proper action on seeing token YYTOKEN is to reduce or to
1398 detect an error, take that action. */
1400 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1405 if (yytable_value_is_error (yyn))
1411 /* Count tokens shifted since error; after three, turn off error
1416 /* Shift the lookahead token. */
1417 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1419 /* Discard the shifted token. */
1423 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1425 YY_IGNORE_MAYBE_UNINITIALIZED_END
1430 /*-----------------------------------------------------------.
1431 | yydefault -- do the default action for the current state. |
1432 `-----------------------------------------------------------*/
1434 yyn = yydefact[yystate];
1440 /*-----------------------------.
1441 | yyreduce -- Do a reduction. |
1442 `-----------------------------*/
1444 /* yyn is the number of a rule to reduce with. */
1447 /* If YYLEN is nonzero, implement the default value of the action:
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];
1458 YY_REDUCE_PRINT (yyn);
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 */ }
1468 /* Line 1792 of yacc.c */
1469 #line 81 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1474 /* Line 1792 of yacc.c */
1475 #line 83 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1476 { rec_typarg(rec_argIdent); rec_newarg(); }
1480 /* Line 1792 of yacc.c */
1481 #line 84 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1482 { /* deja fait par lex*/ rec_newarg(); }
1486 /* Line 1792 of yacc.c */
1487 #line 85 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1492 /* Line 1792 of yacc.c */
1493 #line 86 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
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; }
1505 /* Line 1792 of yacc.c */
1506 #line 92 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1511 /* Line 1792 of yacc.c */
1512 #line 95 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
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; }
1525 /* Line 1792 of yacc.c */
1526 #line 125 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1531 /* Line 1792 of yacc.c */
1532 #line 128 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1533 { rec_typarg(rec_argIdent); rec_newarg(); }
1537 /* Line 1792 of yacc.c */
1538 #line 134 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1543 /* Line 1792 of yacc.c */
1544 #line 137 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
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() ; }
1556 /* Line 1792 of yacc.c */
1557 #line 144 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1562 /* Line 1792 of yacc.c */
1563 #line 147 "D:/ABV/OCCT/occt7/src/StepFile/step.yacc"
1568 /* Line 1792 of yacc.c */
1569 #line 1570 "step.tab.c"
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);
1587 YY_STACK_PRINT (yyss, yyssp);
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. */
1597 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1598 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1599 yystate = yytable[yystate];
1601 yystate = yydefgoto[yyn - YYNTOKENS];
1606 /*------------------------------------.
1607 | yyerrlab -- here on detecting error |
1608 `------------------------------------*/
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);
1614 /* If not already recovering from an error, report this error. */
1618 #if ! YYERROR_VERBOSE
1619 yyerror (YY_("syntax error"));
1621 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1624 char const *yymsgp = YY_("syntax error");
1625 int yysyntax_error_status;
1626 yysyntax_error_status = YYSYNTAX_ERROR;
1627 if (yysyntax_error_status == 0)
1629 else if (yysyntax_error_status == 1)
1631 if (yymsg != yymsgbuf)
1632 YYSTACK_FREE (yymsg);
1633 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1637 yymsg_alloc = sizeof yymsgbuf;
1638 yysyntax_error_status = 2;
1642 yysyntax_error_status = YYSYNTAX_ERROR;
1647 if (yysyntax_error_status == 2)
1648 goto yyexhaustedlab;
1650 # undef YYSYNTAX_ERROR
1656 if (yyerrstatus == 3)
1658 /* If just tried and failed to reuse lookahead token after an
1659 error, discard it. */
1661 if (yychar <= YYEOF)
1663 /* Return failure if at end of input. */
1664 if (yychar == YYEOF)
1669 yydestruct ("Error: discarding",
1675 /* Else will try to reuse lookahead token after shifting the error
1680 /*---------------------------------------------------.
1681 | yyerrorlab -- error raised explicitly by YYERROR. |
1682 `---------------------------------------------------*/
1685 /* Pacify compilers like GCC when the user code never invokes
1686 YYERROR and the label yyerrorlab therefore never appears in user
1688 if (/*CONSTCOND*/ 0)
1691 /* Do not reclaim the symbols of the rule which action triggered
1695 YY_STACK_PRINT (yyss, yyssp);
1700 /*-------------------------------------------------------------.
1701 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1702 `-------------------------------------------------------------*/
1704 yyerrstatus = 3; /* Each real token shifted decrements this. */
1708 yyn = yypact[yystate];
1709 if (!yypact_value_is_default (yyn))
1712 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1720 /* Pop the current state because it cannot handle the error token. */
1725 yydestruct ("Error: popping",
1726 yystos[yystate], yyvsp);
1729 YY_STACK_PRINT (yyss, yyssp);
1732 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1734 YY_IGNORE_MAYBE_UNINITIALIZED_END
1737 /* Shift the error token. */
1738 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1744 /*-------------------------------------.
1745 | yyacceptlab -- YYACCEPT comes here. |
1746 `-------------------------------------*/
1751 /*-----------------------------------.
1752 | yyabortlab -- YYABORT comes here. |
1753 `-----------------------------------*/
1758 #if !defined yyoverflow || YYERROR_VERBOSE
1759 /*-------------------------------------------------.
1760 | yyexhaustedlab -- memory exhaustion comes here. |
1761 `-------------------------------------------------*/
1763 yyerror (YY_("memory exhausted"));
1769 if (yychar != YYEMPTY)
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",
1777 /* Do not reclaim the symbols of the rule which action triggered
1778 this YYABORT or YYACCEPT. */
1780 YY_STACK_PRINT (yyss, yyssp);
1781 while (yyssp != yyss)
1783 yydestruct ("Cleanup: popping",
1784 yystos[*yyssp], yyvsp);
1789 YYSTACK_FREE (yyss);
1792 if (yymsg != yymsgbuf)
1793 YYSTACK_FREE (yymsg);
1795 /* Make sure YYID is used. */
1796 return YYID (yyresult);