1 /* A Bison parser, made by GNU Bison 2.7. */
\r
3 /* Bison implementation for Yacc-like parsers in C
\r
5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
\r
7 This program is free software: you can redistribute it and/or modify
\r
8 it under the terms of the GNU General Public License as published by
\r
9 the Free Software Foundation, either version 3 of the License, or
\r
10 (at your option) any later version.
\r
12 This program is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU General Public License for more details.
\r
17 You should have received a copy of the GNU General Public License
\r
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
\r
20 /* As a special exception, you may create a larger work that contains
\r
21 part or all of the Bison parser skeleton and distribute that work
\r
22 under terms of your choice, so long as that work isn't itself a
\r
23 parser generator using the skeleton or a modified version thereof
\r
24 as a parser skeleton. Alternatively, if you modify or redistribute
\r
25 the parser skeleton itself, you may (at your option) remove this
\r
26 special exception, which will cause the skeleton and the resulting
\r
27 Bison output files to be licensed under the GNU General Public
\r
28 License without this special exception.
\r
30 This special exception was added by the Free Software Foundation in
\r
31 version 2.2 of Bison. */
\r
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
\r
34 simplifying the original so-called "semantic" parser. */
\r
36 /* All symbols defined below should begin with yy or YY, to avoid
\r
37 infringing on user name space. This should be done even for local
\r
38 variables, as they might otherwise be expanded by user macros.
\r
39 There are some unavoidable exceptions within include files to
\r
40 define necessary library symbols; they are noted "INFRINGES ON
\r
41 USER NAME SPACE" below. */
\r
43 /* Identify Bison output. */
\r
46 /* Bison version. */
\r
47 #define YYBISON_VERSION "2.7"
\r
49 /* Skeleton name. */
\r
50 #define YYSKELETON_NAME "yacc.c"
\r
61 /* Substitute the type names. */
\r
62 #define YYSTYPE YYFMI1STYPE
\r
63 /* Substitute the variable and function names. */
\r
64 #define yyparse yyfmi1parse
\r
65 #define yylex yyfmi1lex
\r
66 #define yyerror yyfmi1error
\r
67 #define yylval yyfmi1lval
\r
68 #define yychar yyfmi1char
\r
69 #define yydebug yyfmi1debug
\r
70 #define yynerrs yyfmi1nerrs
\r
72 /* Copy the first part of user declarations. */
\r
82 #include "fmi1_xml_variable_name_parser.tab.h"
\r
83 #include "fmi1_xml_variable_name_lex.h"
\r
85 #define MODULE "FMI1XML"
\r
86 #include <JM/jm_portability.h>
\r
88 void yyfmi1error(yyscan_t* scanner, jm_callbacks* cb, char* name, char const *msg)
\r
90 jm_log_error(cb, MODULE, "Invalid structured ScalarVariable name \"%s\": %s", name, msg);
\r
97 # if defined __cplusplus && 201103L <= __cplusplus
\r
98 # define YY_NULL nullptr
\r
104 /* Enabling verbose error messages. */
\r
105 #ifdef YYERROR_VERBOSE
\r
106 # undef YYERROR_VERBOSE
\r
107 # define YYERROR_VERBOSE 1
\r
109 # define YYERROR_VERBOSE 1
\r
112 /* In a future release of Bison, this section will be replaced
\r
113 by #include "fmi1_xml_variable_name_parser.tab.h". */
\r
114 #ifndef YY_YYFMI1_FMI1_XML_VARIABLE_NAME_PARSER_TAB_H_INCLUDED
\r
115 # define YY_YYFMI1_FMI1_XML_VARIABLE_NAME_PARSER_TAB_H_INCLUDED
\r
116 /* Enabling traces. */
\r
117 #ifndef YYFMI1DEBUG
\r
118 # if defined YYDEBUG
\r
120 # define YYFMI1DEBUG 1
\r
122 # define YYFMI1DEBUG 0
\r
124 # else /* ! defined YYDEBUG */
\r
125 # define YYFMI1DEBUG 0
\r
126 # endif /* ! defined YYDEBUG */
\r
127 #endif /* ! defined YYFMI1DEBUG */
\r
129 extern int yyfmi1debug;
\r
133 #ifndef YYFMI1TOKENTYPE
\r
134 # define YYFMI1TOKENTYPE
\r
135 /* Put the tokens into the symbol table, so that GDB and other debuggers
\r
136 know about them. */
\r
137 enum yyfmi1tokentype {
\r
139 UNSIGNED_INTEGER = 259,
\r
146 #if ! defined YYFMI1STYPE && ! defined YYFMI1STYPE_IS_DECLARED
\r
147 typedef int YYFMI1STYPE;
\r
148 # define YYFMI1STYPE_IS_TRIVIAL 1
\r
149 # define yyfmi1stype YYFMI1STYPE /* obsolescent; will be withdrawn */
\r
150 # define YYFMI1STYPE_IS_DECLARED 1
\r
154 #ifdef YYPARSE_PARAM
\r
155 #if defined __STDC__ || defined __cplusplus
\r
156 int yyfmi1parse (void *YYPARSE_PARAM);
\r
158 int yyfmi1parse ();
\r
160 #else /* ! YYPARSE_PARAM */
\r
161 #if defined __STDC__ || defined __cplusplus
\r
162 int yyfmi1parse (void* scanner, void* cb, char* name);
\r
164 int yyfmi1parse ();
\r
166 #endif /* ! YYPARSE_PARAM */
\r
168 #endif /* !YY_YYFMI1_FMI1_XML_VARIABLE_NAME_PARSER_TAB_H_INCLUDED */
\r
170 /* Copy the second part of user declarations. */
\r
178 #ifdef YYTYPE_UINT8
\r
179 typedef YYTYPE_UINT8 yytype_uint8;
\r
181 typedef unsigned char yytype_uint8;
\r
185 typedef YYTYPE_INT8 yytype_int8;
\r
186 #elif (defined __STDC__ || defined __C99__FUNC__ \
\r
187 || defined __cplusplus || defined _MSC_VER)
\r
188 typedef signed char yytype_int8;
\r
190 typedef short int yytype_int8;
\r
193 #ifdef YYTYPE_UINT16
\r
194 typedef YYTYPE_UINT16 yytype_uint16;
\r
196 typedef unsigned short int yytype_uint16;
\r
199 #ifdef YYTYPE_INT16
\r
200 typedef YYTYPE_INT16 yytype_int16;
\r
202 typedef short int yytype_int16;
\r
206 # ifdef __SIZE_TYPE__
\r
207 # define YYSIZE_T __SIZE_TYPE__
\r
208 # elif defined size_t
\r
209 # define YYSIZE_T size_t
\r
210 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
\r
211 || defined __cplusplus || defined _MSC_VER)
\r
212 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
\r
213 # define YYSIZE_T size_t
\r
215 # define YYSIZE_T unsigned int
\r
219 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
\r
222 # if defined YYENABLE_NLS && YYENABLE_NLS
\r
224 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
\r
225 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
\r
229 # define YY_(Msgid) Msgid
\r
233 /* Suppress unused-variable warnings by "using" E. */
\r
234 #if ! defined lint || defined __GNUC__
\r
235 # define YYUSE(E) ((void) (E))
\r
237 # define YYUSE(E) /* empty */
\r
240 /* Identity function, used to suppress warnings about constant conditions. */
\r
242 # define YYID(N) (N)
\r
244 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
245 || defined __cplusplus || defined _MSC_VER)
\r
258 #if ! defined yyoverflow || YYERROR_VERBOSE
\r
260 /* The parser invokes alloca or malloc; define the necessary symbols. */
\r
262 # ifdef YYSTACK_USE_ALLOCA
\r
263 # if YYSTACK_USE_ALLOCA
\r
265 # define YYSTACK_ALLOC __builtin_alloca
\r
266 # elif defined __BUILTIN_VA_ARG_INCR
\r
267 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
\r
268 # elif defined _AIX
\r
269 # define YYSTACK_ALLOC __alloca
\r
270 # elif defined _MSC_VER
\r
271 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
\r
272 # define alloca _alloca
\r
274 # define YYSTACK_ALLOC alloca
\r
275 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
\r
276 || defined __cplusplus || defined _MSC_VER)
\r
277 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
\r
278 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
\r
279 # ifndef EXIT_SUCCESS
\r
280 # define EXIT_SUCCESS 0
\r
287 # ifdef YYSTACK_ALLOC
\r
288 /* Pacify GCC's `empty if-body' warning. */
\r
289 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
\r
290 # ifndef YYSTACK_ALLOC_MAXIMUM
\r
291 /* The OS might guarantee only one guard page at the bottom of the stack,
\r
292 and a page size can be as small as 4096 bytes. So we cannot safely
\r
293 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
\r
294 to allow for a few compiler-allocated temporary stack slots. */
\r
295 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
\r
298 # define YYSTACK_ALLOC YYMALLOC
\r
299 # define YYSTACK_FREE YYFREE
\r
300 # ifndef YYSTACK_ALLOC_MAXIMUM
\r
301 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
\r
303 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
\r
304 && ! ((defined YYMALLOC || defined malloc) \
\r
305 && (defined YYFREE || defined free)))
\r
306 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
\r
307 # ifndef EXIT_SUCCESS
\r
308 # define EXIT_SUCCESS 0
\r
312 # define YYMALLOC malloc
\r
313 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
\r
314 || defined __cplusplus || defined _MSC_VER)
\r
315 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
\r
319 # define YYFREE free
\r
320 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
\r
321 || defined __cplusplus || defined _MSC_VER)
\r
322 void free (void *); /* INFRINGES ON USER NAME SPACE */
\r
326 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
\r
329 #if (! defined yyoverflow \
\r
330 && (! defined __cplusplus \
\r
331 || (defined YYFMI1STYPE_IS_TRIVIAL && YYFMI1STYPE_IS_TRIVIAL)))
\r
333 /* A type that is properly aligned for any stack member. */
\r
336 yytype_int16 yyss_alloc;
\r
337 YYSTYPE yyvs_alloc;
\r
340 /* The size of the maximum gap between one aligned stack and the next. */
\r
341 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
\r
343 /* The size of an array large to enough to hold all stacks, each with
\r
345 # define YYSTACK_BYTES(N) \
\r
346 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
\r
347 + YYSTACK_GAP_MAXIMUM)
\r
349 # define YYCOPY_NEEDED 1
\r
351 /* Relocate STACK from its old location to the new one. The
\r
352 local variables YYSIZE and YYSTACKSIZE give the old and new number of
\r
353 elements in the stack, and YYPTR gives the new location of the
\r
354 stack. Advance YYPTR to a properly aligned location for the next
\r
356 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
\r
359 YYSIZE_T yynewbytes; \
\r
360 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
\r
361 Stack = &yyptr->Stack_alloc; \
\r
362 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
\r
363 yyptr += yynewbytes / sizeof (*yyptr); \
\r
369 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
\r
370 /* Copy COUNT objects from SRC to DST. The source and destination do
\r
373 # if defined __GNUC__ && 1 < __GNUC__
\r
374 # define YYCOPY(Dst, Src, Count) \
\r
375 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
\r
377 # define YYCOPY(Dst, Src, Count) \
\r
381 for (yyi = 0; yyi < (Count); yyi++) \
\r
382 (Dst)[yyi] = (Src)[yyi]; \
\r
387 #endif /* !YYCOPY_NEEDED */
\r
389 /* YYFINAL -- State number of the termination state. */
\r
391 /* YYLAST -- Last index in YYTABLE. */
\r
394 /* YYNTOKENS -- Number of terminals. */
\r
395 #define YYNTOKENS 12
\r
396 /* YYNNTS -- Number of nonterminals. */
\r
398 /* YYNRULES -- Number of rules. */
\r
399 #define YYNRULES 15
\r
400 /* YYNRULES -- Number of states. */
\r
401 #define YYNSTATES 27
\r
403 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
\r
404 #define YYUNDEFTOK 2
\r
405 #define YYMAXUTOK 261
\r
407 #define YYTRANSLATE(YYX) \
\r
408 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
\r
410 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
\r
411 static const yytype_uint8 yytranslate[] =
\r
413 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
416 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
417 2, 7, 2, 2, 8, 2, 9, 2, 2, 2,
\r
418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
420 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
422 2, 10, 2, 11, 2, 2, 2, 2, 2, 2,
\r
423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
426 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
438 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
\r
443 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
\r
445 static const yytype_uint8 yyprhs[] =
\r
447 0, 0, 3, 5, 9, 15, 17, 21, 23, 28,
\r
448 31, 33, 34, 37, 40, 42
\r
451 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
\r
452 static const yytype_int8 yyrhs[] =
\r
454 13, 0, -1, 14, -1, 3, 14, 7, -1, 3,
\r
455 14, 8, 4, 7, -1, 15, -1, 14, 9, 15,
\r
456 -1, 16, -1, 16, 10, 18, 11, -1, 5, 17,
\r
457 -1, 6, -1, -1, 4, 17, -1, 5, 17, -1,
\r
458 4, -1, 18, 8, 4, -1
\r
461 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
\r
462 static const yytype_uint8 yyrline[] =
\r
464 0, 58, 58, 59, 60, 64, 65, 69, 70, 74,
\r
465 75, 78, 80, 81, 85, 86
\r
469 #if YYFMI1DEBUG || YYERROR_VERBOSE || 1
\r
470 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
\r
471 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
\r
472 static const char *const yytname[] =
\r
474 "$end", "error", "$undefined", "DER", "UNSIGNED_INTEGER", "NONDIGIT",
\r
475 "Q_NAME", "')'", "','", "'.'", "'['", "']'", "$accept", "name",
\r
476 "identifier_list", "identifier", "bname", "nondigit_or_digit",
\r
477 "arrayIndices", YY_NULL
\r
482 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
\r
483 token YYLEX-NUM. */
\r
484 static const yytype_uint16 yytoknum[] =
\r
486 0, 256, 257, 258, 259, 260, 261, 41, 44, 46,
\r
491 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
\r
492 static const yytype_uint8 yyr1[] =
\r
494 0, 12, 13, 13, 13, 14, 14, 15, 15, 16,
\r
495 16, 17, 17, 17, 18, 18
\r
498 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
\r
499 static const yytype_uint8 yyr2[] =
\r
501 0, 2, 1, 3, 5, 1, 3, 1, 4, 2,
\r
505 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
\r
506 Performed when YYTABLE doesn't specify something else to do. Zero
\r
507 means the default is an error. */
\r
508 static const yytype_uint8 yydefact[] =
\r
510 0, 0, 11, 10, 0, 2, 5, 7, 0, 11,
\r
511 11, 9, 1, 0, 0, 3, 0, 12, 13, 6,
\r
512 14, 0, 0, 0, 8, 4, 15
\r
515 /* YYDEFGOTO[NTERM-NUM]. */
\r
516 static const yytype_int8 yydefgoto[] =
\r
518 -1, 4, 5, 6, 7, 11, 21
\r
521 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
\r
523 #define YYPACT_NINF -8
\r
524 static const yytype_int8 yypact[] =
\r
526 -3, 3, 6, -8, 12, 7, -8, 5, -2, 6,
\r
527 6, -8, -8, 3, 13, -8, 14, -8, -8, -8,
\r
528 -8, -7, 15, 16, -8, -8, -8
\r
531 /* YYPGOTO[NTERM-NUM]. */
\r
532 static const yytype_int8 yypgoto[] =
\r
534 -8, -8, 18, 8, -8, 4, -8
\r
537 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
\r
538 positive, shift that token. If negative, reduce the rule which
\r
539 number is the opposite. If YYTABLE_NINF, syntax error. */
\r
540 #define YYTABLE_NINF -1
\r
541 static const yytype_uint8 yytable[] =
\r
543 1, 23, 2, 3, 24, 15, 16, 13, 2, 3,
\r
544 9, 10, 12, 17, 18, 14, 13, 20, 22, 8,
\r
548 #define yypact_value_is_default(Yystate) \
\r
549 (!!((Yystate) == (-8)))
\r
551 #define yytable_value_is_error(Yytable_value) \
\r
554 static const yytype_uint8 yycheck[] =
\r
556 3, 8, 5, 6, 11, 7, 8, 9, 5, 6,
\r
557 4, 5, 0, 9, 10, 10, 9, 4, 4, 1,
\r
561 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
\r
562 symbol of state STATE-NUM. */
\r
563 static const yytype_uint8 yystos[] =
\r
565 0, 3, 5, 6, 13, 14, 15, 16, 14, 4,
\r
566 5, 17, 0, 9, 10, 7, 8, 17, 17, 15,
\r
567 4, 18, 4, 8, 11, 7, 4
\r
570 #define yyerrok (yyerrstatus = 0)
\r
571 #define yyclearin (yychar = YYEMPTY)
\r
572 #define YYEMPTY (-2)
\r
575 #define YYACCEPT goto yyacceptlab
\r
576 #define YYABORT goto yyabortlab
\r
577 #define YYERROR goto yyerrorlab
\r
580 /* Like YYERROR except do call yyerror. This remains here temporarily
\r
581 to ease the transition to the new meaning of YYERROR, for GCC.
\r
582 Once GCC version 2 has supplanted version 1, this can go. However,
\r
583 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
\r
584 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
\r
587 #define YYFAIL goto yyerrlab
\r
589 /* This is here to suppress warnings from the GCC cpp's
\r
590 -Wunused-macros. Normally we don't worry about that warning, but
\r
591 some users do, and we want to make it easy for users to remove
\r
592 YYFAIL uses, which will produce warnings from Bison 2.5. */
\r
595 #define YYRECOVERING() (!!yyerrstatus)
\r
597 #define YYBACKUP(Token, Value) \
\r
599 if (yychar == YYEMPTY) \
\r
601 yychar = (Token); \
\r
602 yylval = (Value); \
\r
603 YYPOPSTACK (yylen); \
\r
604 yystate = *yyssp; \
\r
609 yyerror (scanner, cb, name, YY_("syntax error: cannot back up")); \
\r
614 /* Error token number */
\r
616 #define YYERRCODE 256
\r
619 /* This macro is provided for backward compatibility. */
\r
620 #ifndef YY_LOCATION_PRINT
\r
621 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
\r
625 /* YYLEX -- calling `yylex' with the right arguments. */
\r
627 # define YYLEX yylex (&yylval, YYLEX_PARAM)
\r
629 # define YYLEX yylex (&yylval, scanner)
\r
632 /* Enable debugging if requested. */
\r
636 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
\r
637 # define YYFPRINTF fprintf
\r
640 # define YYDPRINTF(Args) \
\r
646 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
\r
650 YYFPRINTF (stderr, "%s ", Title); \
\r
651 yy_symbol_print (stderr, \
\r
652 Type, Value, scanner, cb, name); \
\r
653 YYFPRINTF (stderr, "\n"); \
\r
658 /*--------------------------------.
\r
659 | Print this symbol on YYOUTPUT. |
\r
660 `--------------------------------*/
\r
663 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
664 || defined __cplusplus || defined _MSC_VER)
\r
666 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* scanner, void* cb, char* name)
\r
669 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, cb, name)
\r
672 YYSTYPE const * const yyvaluep;
\r
678 FILE *yyo = yyoutput;
\r
686 if (yytype < YYNTOKENS)
\r
687 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
\r
699 /*--------------------------------.
\r
700 | Print this symbol on YYOUTPUT. |
\r
701 `--------------------------------*/
\r
703 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
704 || defined __cplusplus || defined _MSC_VER)
\r
706 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* scanner, void* cb, char* name)
\r
709 yy_symbol_print (yyoutput, yytype, yyvaluep, scanner, cb, name)
\r
712 YYSTYPE const * const yyvaluep;
\r
718 if (yytype < YYNTOKENS)
\r
719 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
\r
721 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
\r
723 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, cb, name);
\r
724 YYFPRINTF (yyoutput, ")");
\r
727 /*------------------------------------------------------------------.
\r
728 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
\r
729 | TOP (included). |
\r
730 `------------------------------------------------------------------*/
\r
732 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
733 || defined __cplusplus || defined _MSC_VER)
\r
735 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
\r
738 yy_stack_print (yybottom, yytop)
\r
739 yytype_int16 *yybottom;
\r
740 yytype_int16 *yytop;
\r
743 YYFPRINTF (stderr, "Stack now");
\r
744 for (; yybottom <= yytop; yybottom++)
\r
746 int yybot = *yybottom;
\r
747 YYFPRINTF (stderr, " %d", yybot);
\r
749 YYFPRINTF (stderr, "\n");
\r
752 # define YY_STACK_PRINT(Bottom, Top) \
\r
755 yy_stack_print ((Bottom), (Top)); \
\r
759 /*------------------------------------------------.
\r
760 | Report that the YYRULE is going to be reduced. |
\r
761 `------------------------------------------------*/
\r
763 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
764 || defined __cplusplus || defined _MSC_VER)
\r
766 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void* scanner, void* cb, char* name)
\r
769 yy_reduce_print (yyvsp, yyrule, scanner, cb, name)
\r
777 int yynrhs = yyr2[yyrule];
\r
779 unsigned long int yylno = yyrline[yyrule];
\r
780 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
\r
781 yyrule - 1, yylno);
\r
782 /* The symbols being reduced. */
\r
783 for (yyi = 0; yyi < yynrhs; yyi++)
\r
785 YYFPRINTF (stderr, " $%d = ", yyi + 1);
\r
786 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
\r
787 &(yyvsp[(yyi + 1) - (yynrhs)])
\r
788 , scanner, cb, name);
\r
789 YYFPRINTF (stderr, "\n");
\r
793 # define YY_REDUCE_PRINT(Rule) \
\r
796 yy_reduce_print (yyvsp, Rule, scanner, cb, name); \
\r
799 /* Nonzero means print parse trace. It is left uninitialized so that
\r
800 multiple parsers can coexist. */
\r
802 #else /* !YYFMI1DEBUG */
\r
803 # define YYDPRINTF(Args)
\r
804 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
\r
805 # define YY_STACK_PRINT(Bottom, Top)
\r
806 # define YY_REDUCE_PRINT(Rule)
\r
807 #endif /* !YYFMI1DEBUG */
\r
810 /* YYINITDEPTH -- initial size of the parser's stacks. */
\r
811 #ifndef YYINITDEPTH
\r
812 # define YYINITDEPTH 200
\r
815 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
\r
816 if the built-in stack extension method is used).
\r
818 Do not make this value too large; the results are undefined if
\r
819 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
\r
820 evaluated with infinite-precision integer arithmetic. */
\r
823 # define YYMAXDEPTH 10000
\r
827 #if YYERROR_VERBOSE
\r
830 # if defined __GLIBC__ && defined _STRING_H
\r
831 # define yystrlen strlen
\r
833 /* Return the length of YYSTR. */
\r
834 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
835 || defined __cplusplus || defined _MSC_VER)
\r
837 yystrlen (const char *yystr)
\r
845 for (yylen = 0; yystr[yylen]; yylen++)
\r
853 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
\r
854 # define yystpcpy stpcpy
\r
856 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
\r
858 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
859 || defined __cplusplus || defined _MSC_VER)
\r
861 yystpcpy (char *yydest, const char *yysrc)
\r
864 yystpcpy (yydest, yysrc)
\r
869 char *yyd = yydest;
\r
870 const char *yys = yysrc;
\r
872 while ((*yyd++ = *yys++) != '\0')
\r
881 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
\r
882 quotes and backslashes, so that it's suitable for yyerror. The
\r
883 heuristic is that double-quoting is unnecessary unless the string
\r
884 contains an apostrophe, a comma, or backslash (other than
\r
885 backslash-backslash). YYSTR is taken from yytname. If YYRES is
\r
886 null, do not copy; instead, return the length of what the result
\r
887 would have been. */
\r
889 yytnamerr (char *yyres, const char *yystr)
\r
894 char const *yyp = yystr;
\r
901 goto do_not_strip_quotes;
\r
904 if (*++yyp != '\\')
\r
905 goto do_not_strip_quotes;
\r
906 /* Fall through. */
\r
918 do_not_strip_quotes: ;
\r
922 return yystrlen (yystr);
\r
924 return yystpcpy (yyres, yystr) - yyres;
\r
928 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
\r
929 about the unexpected token YYTOKEN for the state stack whose top is
\r
932 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
\r
933 not large enough to hold the message. In that case, also set
\r
934 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
\r
935 required number of bytes is too large to store. */
\r
937 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
\r
938 yytype_int16 *yyssp, int yytoken)
\r
940 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
\r
941 YYSIZE_T yysize = yysize0;
\r
942 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
\r
943 /* Internationalized format string. */
\r
944 const char *yyformat = YY_NULL;
\r
945 /* Arguments of yyformat. */
\r
946 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
\r
947 /* Number of reported tokens (one for the "unexpected", one per
\r
951 /* There are many possibilities here to consider:
\r
952 - Assume YYFAIL is not used. It's too flawed to consider. See
\r
953 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
\r
954 for details. YYERROR is fine as it does not invoke this
\r
956 - If this state is a consistent state with a default action, then
\r
957 the only way this function was invoked is if the default action
\r
958 is an error action. In that case, don't check for expected
\r
959 tokens because there are none.
\r
960 - The only way there can be no lookahead present (in yychar) is if
\r
961 this state is a consistent state with a default action. Thus,
\r
962 detecting the absence of a lookahead is sufficient to determine
\r
963 that there is no unexpected or expected token to report. In that
\r
964 case, just report a simple "syntax error".
\r
965 - Don't assume there isn't a lookahead just because this state is a
\r
966 consistent state with a default action. There might have been a
\r
967 previous inconsistent state, consistent state with a non-default
\r
968 action, or user semantic action that manipulated yychar.
\r
969 - Of course, the expected token list depends on states to have
\r
970 correct lookahead information, and it depends on the parser not
\r
971 to perform extra reductions after fetching a lookahead from the
\r
972 scanner and before detecting a syntax error. Thus, state merging
\r
973 (from LALR or IELR) and default reductions corrupt the expected
\r
974 token list. However, the list is correct for canonical LR with
\r
975 one exception: it will still contain any token that will not be
\r
976 accepted due to an error action in a later state.
\r
978 if (yytoken != YYEMPTY)
\r
980 int yyn = yypact[*yyssp];
\r
981 yyarg[yycount++] = yytname[yytoken];
\r
982 if (!yypact_value_is_default (yyn))
\r
984 /* Start YYX at -YYN if negative to avoid negative indexes in
\r
985 YYCHECK. In other words, skip the first -YYN actions for
\r
986 this state because they are default actions. */
\r
987 int yyxbegin = yyn < 0 ? -yyn : 0;
\r
988 /* Stay within bounds of both yycheck and yytname. */
\r
989 int yychecklim = YYLAST - yyn + 1;
\r
990 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
\r
993 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
\r
994 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
\r
995 && !yytable_value_is_error (yytable[yyx + yyn]))
\r
997 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
\r
1003 yyarg[yycount++] = yytname[yyx];
\r
1005 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
\r
1006 if (! (yysize <= yysize1
\r
1007 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
\r
1017 # define YYCASE_(N, S) \
\r
1021 YYCASE_(0, YY_("syntax error"));
\r
1022 YYCASE_(1, YY_("syntax error, unexpected %s"));
\r
1023 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
\r
1024 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
\r
1025 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
\r
1026 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
\r
1031 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
\r
1032 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
\r
1037 if (*yymsg_alloc < yysize)
\r
1039 *yymsg_alloc = 2 * yysize;
\r
1040 if (! (yysize <= *yymsg_alloc
\r
1041 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
\r
1042 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
\r
1046 /* Avoid sprintf, as that infringes on the user's name space.
\r
1047 Don't have undefined behavior even if the translation
\r
1048 produced a string with the wrong number of "%s"s. */
\r
1050 char *yyp = *yymsg;
\r
1052 while ((*yyp = *yyformat) != '\0')
\r
1053 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
\r
1055 yyp += yytnamerr (yyp, yyarg[yyi++]);
\r
1066 #endif /* YYERROR_VERBOSE */
\r
1068 /*-----------------------------------------------.
\r
1069 | Release the memory associated to this symbol. |
\r
1070 `-----------------------------------------------*/
\r
1073 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
1074 || defined __cplusplus || defined _MSC_VER)
\r
1076 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void* scanner, void* cb, char* name)
\r
1079 yydestruct (yymsg, yytype, yyvaluep, scanner, cb, name)
\r
1080 const char *yymsg;
\r
1082 YYSTYPE *yyvaluep;
\r
1094 yymsg = "Deleting";
\r
1095 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
\r
1112 #ifdef YYPARSE_PARAM
\r
1113 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
1114 || defined __cplusplus || defined _MSC_VER)
\r
1116 yyparse (void *YYPARSE_PARAM)
\r
1119 yyparse (YYPARSE_PARAM)
\r
1120 void *YYPARSE_PARAM;
\r
1122 #else /* ! YYPARSE_PARAM */
\r
1123 #if (defined __STDC__ || defined __C99__FUNC__ \
\r
1124 || defined __cplusplus || defined _MSC_VER)
\r
1126 yyparse (void* scanner, void* cb, char* name)
\r
1129 yyparse (scanner, cb, name)
\r
1136 /* The lookahead symbol. */
\r
1140 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
\r
1141 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
\r
1142 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
\r
1143 _Pragma ("GCC diagnostic push") \
\r
1144 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
\r
1145 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
\r
1146 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
\r
1147 _Pragma ("GCC diagnostic pop")
\r
1149 /* Default value used for initialization, for pacifying older GCCs
\r
1150 or non-GCC compilers. */
\r
1151 static YYSTYPE yyval_default;
\r
1152 # define YY_INITIAL_VALUE(Value) = Value
\r
1154 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
\r
1155 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
\r
1156 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
\r
1158 #ifndef YY_INITIAL_VALUE
\r
1159 # define YY_INITIAL_VALUE(Value) /* Nothing. */
\r
1162 /* The semantic value of the lookahead symbol. */
\r
1163 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
\r
1165 /* Number of syntax errors so far. */
\r
1169 /* Number of tokens to shift before error messages enabled. */
\r
1172 /* The stacks and their tools:
\r
1173 `yyss': related to states.
\r
1174 `yyvs': related to semantic values.
\r
1176 Refer to the stacks through separate pointers, to allow yyoverflow
\r
1177 to reallocate them elsewhere. */
\r
1179 /* The state stack. */
\r
1180 yytype_int16 yyssa[YYINITDEPTH];
\r
1181 yytype_int16 *yyss;
\r
1182 yytype_int16 *yyssp;
\r
1184 /* The semantic value stack. */
\r
1185 YYSTYPE yyvsa[YYINITDEPTH];
\r
1189 YYSIZE_T yystacksize;
\r
1193 /* Lookahead token as an internal (translated) token number. */
\r
1195 /* The variables used to return semantic value and location from the
\r
1196 action routines. */
\r
1199 #if YYERROR_VERBOSE
\r
1200 /* Buffer for error messages, and its allocated size. */
\r
1201 char yymsgbuf[128];
\r
1202 char *yymsg = yymsgbuf;
\r
1203 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
\r
1206 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
\r
1208 /* The number of symbols on the RHS of the reduced rule.
\r
1209 Keep to zero when no symbol should be popped. */
\r
1212 yyssp = yyss = yyssa;
\r
1213 yyvsp = yyvs = yyvsa;
\r
1214 yystacksize = YYINITDEPTH;
\r
1216 YYDPRINTF ((stderr, "Starting parse\n"));
\r
1221 yychar = YYEMPTY; /* Cause a token to be read. */
\r
1224 /*------------------------------------------------------------.
\r
1225 | yynewstate -- Push a new state, which is found in yystate. |
\r
1226 `------------------------------------------------------------*/
\r
1228 /* In all cases, when you get here, the value and location stacks
\r
1229 have just been pushed. So pushing a state here evens the stacks. */
\r
1235 if (yyss + yystacksize - 1 <= yyssp)
\r
1237 /* Get the current used size of the three stacks, in elements. */
\r
1238 YYSIZE_T yysize = yyssp - yyss + 1;
\r
1242 /* Give user a chance to reallocate the stack. Use copies of
\r
1243 these so that the &'s don't force the real ones into
\r
1245 YYSTYPE *yyvs1 = yyvs;
\r
1246 yytype_int16 *yyss1 = yyss;
\r
1248 /* Each stack pointer address is followed by the size of the
\r
1249 data in use in that stack, in bytes. This used to be a
\r
1250 conditional around just the two extra args, but that might
\r
1251 be undefined if yyoverflow is a macro. */
\r
1252 yyoverflow (YY_("memory exhausted"),
\r
1253 &yyss1, yysize * sizeof (*yyssp),
\r
1254 &yyvs1, yysize * sizeof (*yyvsp),
\r
1260 #else /* no yyoverflow */
\r
1261 # ifndef YYSTACK_RELOCATE
\r
1262 goto yyexhaustedlab;
\r
1264 /* Extend the stack our own way. */
\r
1265 if (YYMAXDEPTH <= yystacksize)
\r
1266 goto yyexhaustedlab;
\r
1268 if (YYMAXDEPTH < yystacksize)
\r
1269 yystacksize = YYMAXDEPTH;
\r
1272 yytype_int16 *yyss1 = yyss;
\r
1273 union yyalloc *yyptr =
\r
1274 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
\r
1276 goto yyexhaustedlab;
\r
1277 YYSTACK_RELOCATE (yyss_alloc, yyss);
\r
1278 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
\r
1279 # undef YYSTACK_RELOCATE
\r
1280 if (yyss1 != yyssa)
\r
1281 YYSTACK_FREE (yyss1);
\r
1284 #endif /* no yyoverflow */
\r
1286 yyssp = yyss + yysize - 1;
\r
1287 yyvsp = yyvs + yysize - 1;
\r
1289 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
\r
1290 (unsigned long int) yystacksize));
\r
1292 if (yyss + yystacksize - 1 <= yyssp)
\r
1296 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
\r
1298 if (yystate == YYFINAL)
\r
1308 /* Do appropriate processing given the current state. Read a
\r
1309 lookahead token if we need one and don't already have one. */
\r
1311 /* First try to decide what to do without reference to lookahead token. */
\r
1312 yyn = yypact[yystate];
\r
1313 if (yypact_value_is_default (yyn))
\r
1316 /* Not known => get a lookahead token if don't already have one. */
\r
1318 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
\r
1319 if (yychar == YYEMPTY)
\r
1321 YYDPRINTF ((stderr, "Reading a token: "));
\r
1325 if (yychar <= YYEOF)
\r
1327 yychar = yytoken = YYEOF;
\r
1328 YYDPRINTF ((stderr, "Now at end of input.\n"));
\r
1332 yytoken = YYTRANSLATE (yychar);
\r
1333 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
\r
1336 /* If the proper action on seeing token YYTOKEN is to reduce or to
\r
1337 detect an error, take that action. */
\r
1339 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
\r
1341 yyn = yytable[yyn];
\r
1344 if (yytable_value_is_error (yyn))
\r
1350 /* Count tokens shifted since error; after three, turn off error
\r
1355 /* Shift the lookahead token. */
\r
1356 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
\r
1358 /* Discard the shifted token. */
\r
1362 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
\r
1363 *++yyvsp = yylval;
\r
1364 YY_IGNORE_MAYBE_UNINITIALIZED_END
\r
1369 /*-----------------------------------------------------------.
\r
1370 | yydefault -- do the default action for the current state. |
\r
1371 `-----------------------------------------------------------*/
\r
1373 yyn = yydefact[yystate];
\r
1379 /*-----------------------------.
\r
1380 | yyreduce -- Do a reduction. |
\r
1381 `-----------------------------*/
\r
1383 /* yyn is the number of a rule to reduce with. */
\r
1384 yylen = yyr2[yyn];
\r
1386 /* If YYLEN is nonzero, implement the default value of the action:
\r
1389 Otherwise, the following line sets YYVAL to garbage.
\r
1390 This behavior is undocumented and Bison
\r
1391 users should not rely upon it. Assigning to YYVAL
\r
1392 unconditionally makes the parser a bit smaller, and it avoids a
\r
1393 GCC warning that YYVAL may be used uninitialized. */
\r
1394 yyval = yyvsp[1-yylen];
\r
1397 YY_REDUCE_PRINT (yyn);
\r
1404 /* User semantic actions sometimes alter yychar, and that requires
\r
1405 that yytoken be updated with the new translation. We take the
\r
1406 approach of translating immediately before every use of yytoken.
\r
1407 One alternative is translating here after every semantic action,
\r
1408 but that translation would be missed if the semantic action invokes
\r
1409 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
\r
1410 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
\r
1411 incorrect destructor might then be invoked immediately. In the
\r
1412 case of YYERROR or YYBACKUP, subsequent parser actions might lead
\r
1413 to an incorrect destructor call or verbose syntax error message
\r
1414 before the lookahead is translated. */
\r
1415 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
\r
1417 YYPOPSTACK (yylen);
\r
1419 YY_STACK_PRINT (yyss, yyssp);
\r
1423 /* Now `shift' the result of the reduction. Determine what state
\r
1424 that goes to, based on the state we popped back to and the rule
\r
1425 number reduced by. */
\r
1429 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
\r
1430 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
\r
1431 yystate = yytable[yystate];
\r
1433 yystate = yydefgoto[yyn - YYNTOKENS];
\r
1438 /*------------------------------------.
\r
1439 | yyerrlab -- here on detecting error |
\r
1440 `------------------------------------*/
\r
1442 /* Make sure we have latest lookahead translation. See comments at
\r
1443 user semantic actions for why this is necessary. */
\r
1444 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
\r
1446 /* If not already recovering from an error, report this error. */
\r
1450 #if ! YYERROR_VERBOSE
\r
1451 yyerror (scanner, cb, name, YY_("syntax error"));
\r
1453 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
\r
1456 char const *yymsgp = YY_("syntax error");
\r
1457 int yysyntax_error_status;
\r
1458 yysyntax_error_status = YYSYNTAX_ERROR;
\r
1459 if (yysyntax_error_status == 0)
\r
1461 else if (yysyntax_error_status == 1)
\r
1463 if (yymsg != yymsgbuf)
\r
1464 YYSTACK_FREE (yymsg);
\r
1465 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
\r
1469 yymsg_alloc = sizeof yymsgbuf;
\r
1470 yysyntax_error_status = 2;
\r
1474 yysyntax_error_status = YYSYNTAX_ERROR;
\r
1478 yyerror (scanner, cb, name, yymsgp);
\r
1479 if (yysyntax_error_status == 2)
\r
1480 goto yyexhaustedlab;
\r
1482 # undef YYSYNTAX_ERROR
\r
1488 if (yyerrstatus == 3)
\r
1490 /* If just tried and failed to reuse lookahead token after an
\r
1491 error, discard it. */
\r
1493 if (yychar <= YYEOF)
\r
1495 /* Return failure if at end of input. */
\r
1496 if (yychar == YYEOF)
\r
1501 yydestruct ("Error: discarding",
\r
1502 yytoken, &yylval, scanner, cb, name);
\r
1507 /* Else will try to reuse lookahead token after shifting the error
\r
1512 /*---------------------------------------------------.
\r
1513 | yyerrorlab -- error raised explicitly by YYERROR. |
\r
1514 `---------------------------------------------------*/
\r
1517 /* Pacify compilers like GCC when the user code never invokes
\r
1518 YYERROR and the label yyerrorlab therefore never appears in user
\r
1520 if (/*CONSTCOND*/ 0)
\r
1523 /* Do not reclaim the symbols of the rule which action triggered
\r
1525 YYPOPSTACK (yylen);
\r
1527 YY_STACK_PRINT (yyss, yyssp);
\r
1532 /*-------------------------------------------------------------.
\r
1533 | yyerrlab1 -- common code for both syntax error and YYERROR. |
\r
1534 `-------------------------------------------------------------*/
\r
1536 yyerrstatus = 3; /* Each real token shifted decrements this. */
\r
1540 yyn = yypact[yystate];
\r
1541 if (!yypact_value_is_default (yyn))
\r
1544 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
\r
1546 yyn = yytable[yyn];
\r
1552 /* Pop the current state because it cannot handle the error token. */
\r
1553 if (yyssp == yyss)
\r
1557 yydestruct ("Error: popping",
\r
1558 yystos[yystate], yyvsp, scanner, cb, name);
\r
1561 YY_STACK_PRINT (yyss, yyssp);
\r
1564 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
\r
1565 *++yyvsp = yylval;
\r
1566 YY_IGNORE_MAYBE_UNINITIALIZED_END
\r
1569 /* Shift the error token. */
\r
1570 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
\r
1576 /*-------------------------------------.
\r
1577 | yyacceptlab -- YYACCEPT comes here. |
\r
1578 `-------------------------------------*/
\r
1583 /*-----------------------------------.
\r
1584 | yyabortlab -- YYABORT comes here. |
\r
1585 `-----------------------------------*/
\r
1590 #if !defined yyoverflow || YYERROR_VERBOSE
\r
1591 /*-------------------------------------------------.
\r
1592 | yyexhaustedlab -- memory exhaustion comes here. |
\r
1593 `-------------------------------------------------*/
\r
1595 yyerror (scanner, cb, name, YY_("memory exhausted"));
\r
1597 /* Fall through. */
\r
1601 if (yychar != YYEMPTY)
\r
1603 /* Make sure we have latest lookahead translation. See comments at
\r
1604 user semantic actions for why this is necessary. */
\r
1605 yytoken = YYTRANSLATE (yychar);
\r
1606 yydestruct ("Cleanup: discarding lookahead",
\r
1607 yytoken, &yylval, scanner, cb, name);
\r
1609 /* Do not reclaim the symbols of the rule which action triggered
\r
1610 this YYABORT or YYACCEPT. */
\r
1611 YYPOPSTACK (yylen);
\r
1612 YY_STACK_PRINT (yyss, yyssp);
\r
1613 while (yyssp != yyss)
\r
1615 yydestruct ("Cleanup: popping",
\r
1616 yystos[*yyssp], yyvsp, scanner, cb, name);
\r
1619 #ifndef yyoverflow
\r
1620 if (yyss != yyssa)
\r
1621 YYSTACK_FREE (yyss);
\r
1623 #if YYERROR_VERBOSE
\r
1624 if (yymsg != yymsgbuf)
\r
1625 YYSTACK_FREE (yymsg);
\r
1627 /* Make sure YYID is used. */
\r
1628 return YYID (yyresult);
\r