1 /* A Bison parser, made by GNU Bison 2.5. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2011 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.5"
50 #define YYSKELETON_NAME "yacc.c"
61 /* Using locations. */
62 #define YYLSP_NEEDED 0
64 /* Substitute the variable and function names. */
65 #define yyparse cmDependsFortran_yyparse
66 #define yylex cmDependsFortran_yylex
67 #define yyerror cmDependsFortran_yyerror
68 #define yylval cmDependsFortran_yylval
69 #define yychar cmDependsFortran_yychar
70 #define yydebug cmDependsFortran_yydebug
71 #define yynerrs cmDependsFortran_yynerrs
74 /* Copy the first part of user declarations. */
76 /* Line 268 of yacc.c */
77 #line 1 "cmDependsFortranParser.y"
79 /*============================================================================
80 CMake - Cross Platform Makefile Generator
81 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
83 Distributed under the OSI-approved BSD License (the "License");
84 see accompanying file Copyright.txt for details.
86 This software is distributed WITHOUT ANY WARRANTY; without even the
87 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
88 See the License for more information.
89 ============================================================================*/
90 /*-------------------------------------------------------------------------
91 Portions of this source have been derived from makedepf90 version 2.8.8,
93 Copyright (C) 2000--2006 Erik Edelmann <erik.edelmann@iki.fi>
95 The code was originally distributed under the GPL but permission
96 from the copyright holder has been obtained to distribute this
97 derived work under the CMake license.
98 -------------------------------------------------------------------------*/
102 This file must be translated to C and modified to build everywhere.
106 bison --yacc --name-prefix=cmDependsFortran_yy
107 --defines=cmDependsFortranParserTokens.h
108 -ocmDependsFortranParser.cxx
109 cmDependsFortranParser.y
111 Modify cmDependsFortranParser.cxx:
113 - Remove the yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"]
116 /*-------------------------------------------------------------------------*/
117 #define cmDependsFortranParser_cxx
118 #include "cmDependsFortranParser.h" /* Interface to parser object. */
119 #include "cmDependsFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */
121 #include <cmsys/String.h>
123 /* Configure the parser to use a lexer object. */
124 #define YYPARSE_PARAM yyscanner
125 #define YYLEX_PARAM yyscanner
126 #define YYERROR_VERBOSE 1
127 #define cmDependsFortran_yyerror(x) \
128 cmDependsFortranError(yyscanner, x)
130 /* Forward declare the lexer entry point. */
133 /* Helper function to forward error callback. */
134 static void cmDependsFortranError(yyscan_t yyscanner, const char* message)
136 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
137 cmDependsFortranParser_Error(parser, message);
140 static bool cmDependsFortranParserIsKeyword(const char* word,
143 return cmsysString_strcasecmp(word, keyword) == 0;
146 /* Disable some warnings in the generated code. */
148 # pragma warn -8004 /* Variable assigned a value that is not used. */
149 # pragma warn -8008 /* condition always returns true */
150 # pragma warn -8060 /* possibly incorrect assignment */
151 # pragma warn -8066 /* unreachable code */
154 # pragma warning (disable: 4102) /* Unused goto label. */
155 # pragma warning (disable: 4065) /* Switch contains default but no case. */
156 # pragma warning (disable: 4701) /* Local variable may not be initialized. */
157 # pragma warning (disable: 4702) /* Unreachable code. */
158 # pragma warning (disable: 4127) /* Conditional expression is constant. */
159 # pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */
163 /* Line 268 of yacc.c */
164 #line 165 "cmDependsFortranParser.cxx"
166 /* Enabling traces. */
171 /* Enabling verbose error messages. */
172 #ifdef YYERROR_VERBOSE
173 # undef YYERROR_VERBOSE
174 # define YYERROR_VERBOSE 1
176 # define YYERROR_VERBOSE 0
179 /* Enabling the token table. */
180 #ifndef YYTOKEN_TABLE
181 # define YYTOKEN_TABLE 0
188 /* Put the tokens into the symbol table, so that GDB and other debuggers
195 F90PPR_INCLUDE = 262,
216 UNTERMINATED_STRING = 283,
219 CPP_INCLUDE_ANGLE = 286
224 #define ASSIGNMENT_OP 259
226 #define CPP_INCLUDE 261
227 #define F90PPR_INCLUDE 262
228 #define COCO_INCLUDE 263
229 #define F90PPR_DEFINE 264
230 #define CPP_DEFINE 265
231 #define F90PPR_UNDEF 266
232 #define CPP_UNDEF 267
233 #define CPP_IFDEF 268
234 #define CPP_IFNDEF 269
238 #define CPP_ENDIF 273
239 #define F90PPR_IFDEF 274
240 #define F90PPR_IFNDEF 275
241 #define F90PPR_IF 276
242 #define F90PPR_ELSE 277
243 #define F90PPR_ELIF 278
244 #define F90PPR_ENDIF 279
247 #define CPP_TOENDL 282
248 #define UNTERMINATED_STRING 283
251 #define CPP_INCLUDE_ANGLE 286
256 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
257 typedef union YYSTYPE
260 /* Line 293 of yacc.c */
261 #line 89 "cmDependsFortranParser.y"
267 /* Line 293 of yacc.c */
268 #line 269 "cmDependsFortranParser.cxx"
270 # define YYSTYPE_IS_TRIVIAL 1
271 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
272 # define YYSTYPE_IS_DECLARED 1
276 /* Copy the second part of user declarations. */
279 /* Line 343 of yacc.c */
280 #line 281 "cmDependsFortranParser.cxx"
287 typedef YYTYPE_UINT8 yytype_uint8;
289 typedef unsigned char yytype_uint8;
293 typedef YYTYPE_INT8 yytype_int8;
294 #elif (defined __STDC__ || defined __C99__FUNC__ \
295 || defined __cplusplus || defined _MSC_VER)
296 typedef signed char yytype_int8;
298 typedef short int yytype_int8;
302 typedef YYTYPE_UINT16 yytype_uint16;
304 typedef unsigned short int yytype_uint16;
308 typedef YYTYPE_INT16 yytype_int16;
310 typedef short int yytype_int16;
314 # ifdef __SIZE_TYPE__
315 # define YYSIZE_T __SIZE_TYPE__
316 # elif defined size_t
317 # define YYSIZE_T size_t
318 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
319 || defined __cplusplus || defined _MSC_VER)
320 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
321 # define YYSIZE_T size_t
323 # define YYSIZE_T unsigned int
327 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
330 # if defined YYENABLE_NLS && YYENABLE_NLS
332 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
333 # define YY_(msgid) dgettext ("bison-runtime", msgid)
337 # define YY_(msgid) msgid
341 /* Suppress unused-variable warnings by "using" E. */
342 #if ! defined lint || defined __GNUC__
343 # define YYUSE(e) ((void) (e))
345 # define YYUSE(e) /* empty */
348 /* Identity function, used to suppress warnings about constant conditions. */
352 #if (defined __STDC__ || defined __C99__FUNC__ \
353 || defined __cplusplus || defined _MSC_VER)
366 #if ! defined yyoverflow || YYERROR_VERBOSE
368 /* The parser invokes alloca or malloc; define the necessary symbols. */
370 # ifdef YYSTACK_USE_ALLOCA
371 # if YYSTACK_USE_ALLOCA
373 # define YYSTACK_ALLOC __builtin_alloca
374 # elif defined __BUILTIN_VA_ARG_INCR
375 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
377 # define YYSTACK_ALLOC __alloca
378 # elif defined _MSC_VER
379 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
380 # define alloca _alloca
382 # define YYSTACK_ALLOC alloca
383 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
384 || defined __cplusplus || defined _MSC_VER)
385 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
386 # ifndef EXIT_SUCCESS
387 # define EXIT_SUCCESS 0
394 # ifdef YYSTACK_ALLOC
395 /* Pacify GCC's `empty if-body' warning. */
396 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
397 # ifndef YYSTACK_ALLOC_MAXIMUM
398 /* The OS might guarantee only one guard page at the bottom of the stack,
399 and a page size can be as small as 4096 bytes. So we cannot safely
400 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
401 to allow for a few compiler-allocated temporary stack slots. */
402 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
405 # define YYSTACK_ALLOC YYMALLOC
406 # define YYSTACK_FREE YYFREE
407 # ifndef YYSTACK_ALLOC_MAXIMUM
408 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
410 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
411 && ! ((defined YYMALLOC || defined malloc) \
412 && (defined YYFREE || defined free)))
413 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
414 # ifndef EXIT_SUCCESS
415 # define EXIT_SUCCESS 0
419 # define YYMALLOC malloc
420 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
421 || defined __cplusplus || defined _MSC_VER)
422 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
427 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
428 || defined __cplusplus || defined _MSC_VER)
429 void free (void *); /* INFRINGES ON USER NAME SPACE */
433 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
436 #if (! defined yyoverflow \
437 && (! defined __cplusplus \
438 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
440 /* A type that is properly aligned for any stack member. */
443 yytype_int16 yyss_alloc;
447 /* The size of the maximum gap between one aligned stack and the next. */
448 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
450 /* The size of an array large to enough to hold all stacks, each with
452 # define YYSTACK_BYTES(N) \
453 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
454 + YYSTACK_GAP_MAXIMUM)
456 # define YYCOPY_NEEDED 1
458 /* Relocate STACK from its old location to the new one. The
459 local variables YYSIZE and YYSTACKSIZE give the old and new number of
460 elements in the stack, and YYPTR gives the new location of the
461 stack. Advance YYPTR to a properly aligned location for the next
463 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
466 YYSIZE_T yynewbytes; \
467 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
468 Stack = &yyptr->Stack_alloc; \
469 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
470 yyptr += yynewbytes / sizeof (*yyptr); \
476 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
477 /* Copy COUNT objects from FROM to TO. The source and destination do
480 # if defined __GNUC__ && 1 < __GNUC__
481 # define YYCOPY(To, From, Count) \
482 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
484 # define YYCOPY(To, From, Count) \
488 for (yyi = 0; yyi < (Count); yyi++) \
489 (To)[yyi] = (From)[yyi]; \
494 #endif /* !YYCOPY_NEEDED */
496 /* YYFINAL -- State number of the termination state. */
498 /* YYLAST -- Last index in YYTABLE. */
501 /* YYNTOKENS -- Number of terminals. */
503 /* YYNNTS -- Number of nonterminals. */
505 /* YYNRULES -- Number of rules. */
507 /* YYNRULES -- Number of states. */
510 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
512 #define YYMAXUTOK 286
514 #define YYTRANSLATE(YYX) \
515 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
517 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
518 static const yytype_uint8 yytranslate[] =
520 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
546 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
547 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
548 25, 26, 27, 28, 29, 30, 31
552 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
554 static const yytype_uint8 yyprhs[] =
556 0, 0, 3, 4, 7, 9, 11, 16, 19, 24,
557 30, 38, 43, 47, 52, 57, 62, 67, 72, 76,
558 80, 84, 88, 93, 97, 99, 101, 103, 105, 107,
559 109, 111, 113, 115, 117, 119, 121, 123, 125, 127,
560 129, 131, 133, 135, 137, 139, 140, 143, 145, 147,
564 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
565 static const yytype_int8 yyrhs[] =
567 33, 0, -1, -1, 33, 34, -1, 36, -1, 35,
568 -1, 30, 4, 46, 3, -1, 30, 3, -1, 30,
569 30, 46, 3, -1, 30, 26, 30, 46, 3, -1,
570 30, 25, 30, 26, 30, 46, 3, -1, 30, 29,
571 46, 3, -1, 31, 46, 3, -1, 37, 29, 46,
572 3, -1, 38, 30, 46, 3, -1, 39, 30, 46,
573 3, -1, 40, 30, 46, 3, -1, 41, 30, 46,
574 3, -1, 42, 46, 3, -1, 43, 46, 3, -1,
575 44, 46, 3, -1, 45, 46, 3, -1, 30, 5,
576 46, 3, -1, 5, 46, 3, -1, 3, -1, 1,
577 -1, 6, -1, 7, -1, 8, -1, 10, -1, 9,
578 -1, 12, -1, 11, -1, 13, -1, 19, -1, 14,
579 -1, 20, -1, 15, -1, 21, -1, 17, -1, 23,
580 -1, 16, -1, 22, -1, 18, -1, 24, -1, -1,
581 46, 47, -1, 30, -1, 29, -1, 5, -1, 4,
582 -1, 26, -1, 25, -1, 28, -1
585 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
586 static const yytype_uint16 yyrline[] =
588 0, 111, 111, 111, 113, 113, 115, 121, 131, 161,
589 172, 185, 196, 203, 210, 216, 222, 228, 234, 239,
590 244, 249, 254, 258, 259, 260, 265, 265, 265, 266,
591 266, 267, 267, 268, 268, 269, 269, 270, 270, 271,
592 271, 272, 272, 273, 273, 274, 274, 277, 278, 279,
597 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
598 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
599 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
600 static const char *const yytname[] =
602 "$end", "error", "$undefined", "EOSTMT", "ASSIGNMENT_OP", "GARBAGE",
603 "CPP_INCLUDE", "F90PPR_INCLUDE", "COCO_INCLUDE", "F90PPR_DEFINE",
604 "CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF",
605 "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF",
606 "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF",
607 "F90PPR_ENDIF", "COMMA", "DCOLON", "CPP_TOENDL", "UNTERMINATED_STRING",
608 "STRING", "WORD", "CPP_INCLUDE_ANGLE", "$accept", "code", "stmt",
609 "assignment_stmt", "keyword_stmt", "include", "define", "undef", "ifdef",
610 "ifndef", "if", "elif", "else", "endif", "other", "misc_code", 0
615 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
617 static const yytype_uint16 yytoknum[] =
619 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
620 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
621 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
626 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
627 static const yytype_uint8 yyr1[] =
629 0, 32, 33, 33, 34, 34, 35, 36, 36, 36,
630 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
631 36, 36, 36, 36, 36, 36, 37, 37, 37, 38,
632 38, 39, 39, 40, 40, 41, 41, 42, 42, 43,
633 43, 44, 44, 45, 45, 46, 46, 47, 47, 47,
637 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
638 static const yytype_uint8 yyr2[] =
640 0, 2, 0, 2, 1, 1, 4, 2, 4, 5,
641 7, 4, 3, 4, 4, 4, 4, 4, 3, 3,
642 3, 3, 4, 3, 1, 1, 1, 1, 1, 1,
643 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
644 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
648 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
649 Performed when YYTABLE doesn't specify something else to do. Zero
650 means the default is an error. */
651 static const yytype_uint8 yydefact[] =
653 2, 0, 1, 25, 24, 45, 26, 27, 28, 30,
654 29, 32, 31, 33, 35, 37, 41, 39, 43, 34,
655 36, 38, 42, 40, 44, 0, 45, 3, 5, 4,
656 0, 0, 0, 0, 0, 45, 45, 45, 45, 0,
657 7, 45, 45, 0, 0, 45, 45, 0, 45, 45,
658 45, 45, 45, 0, 0, 0, 0, 23, 50, 49,
659 52, 51, 53, 48, 47, 46, 0, 0, 0, 45,
660 0, 0, 12, 0, 0, 0, 0, 0, 18, 19,
661 20, 21, 6, 22, 0, 0, 11, 8, 13, 14,
662 15, 16, 17, 45, 9, 0, 10
665 /* YYDEFGOTO[NTERM-NUM]. */
666 static const yytype_int8 yydefgoto[] =
668 -1, 1, 27, 28, 29, 30, 31, 32, 33, 34,
669 35, 36, 37, 38, 39, 65
672 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
674 #define YYPACT_NINF -29
675 static const yytype_int16 yypact[] =
677 -29, 39, -29, -29, -29, -29, -29, -29, -29, -29,
678 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
679 -29, -29, -29, -29, -29, 246, -29, -29, -29, -29,
680 -28, -27, -22, -17, -16, -29, -29, -29, -29, 2,
681 -29, -29, -29, -13, -12, -29, -29, 61, -29, -29,
682 -29, -29, -29, 68, 74, 80, 108, -29, -29, -29,
683 -29, -29, -29, -29, -29, -29, 114, 120, -24, -29,
684 126, 154, -29, 160, 166, 172, 200, 206, -29, -29,
685 -29, -29, -29, -29, -9, 212, -29, -29, -29, -29,
686 -29, -29, -29, -29, -29, 218, -29
689 /* YYPGOTO[NTERM-NUM]. */
690 static const yytype_int8 yypgoto[] =
692 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
693 -29, -29, -29, -29, -26, -29
696 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
697 positive, shift that token. If negative, reduce the rule which
698 number is the opposite. If YYTABLE_NINF, syntax error. */
699 #define YYTABLE_NINF -1
700 static const yytype_uint8 yytable[] =
702 47, 48, 84, 49, 0, 57, 58, 59, 50, 53,
703 54, 55, 56, 51, 52, 66, 67, 68, 69, 70,
704 71, 93, 73, 74, 75, 76, 77, 60, 61, 0,
705 62, 63, 64, 0, 0, 0, 0, 0, 0, 2,
706 3, 0, 4, 85, 5, 6, 7, 8, 9, 10,
707 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
708 21, 22, 23, 24, 72, 58, 59, 95, 0, 25,
709 26, 78, 58, 59, 0, 0, 0, 79, 58, 59,
710 0, 0, 0, 80, 58, 59, 60, 61, 0, 62,
711 63, 64, 0, 60, 61, 0, 62, 63, 64, 60,
712 61, 0, 62, 63, 64, 60, 61, 0, 62, 63,
713 64, 81, 58, 59, 0, 0, 0, 82, 58, 59,
714 0, 0, 0, 83, 58, 59, 0, 0, 0, 86,
715 58, 59, 0, 60, 61, 0, 62, 63, 64, 60,
716 61, 0, 62, 63, 64, 60, 61, 0, 62, 63,
717 64, 60, 61, 0, 62, 63, 64, 87, 58, 59,
718 0, 0, 0, 88, 58, 59, 0, 0, 0, 89,
719 58, 59, 0, 0, 0, 90, 58, 59, 0, 60,
720 61, 0, 62, 63, 64, 60, 61, 0, 62, 63,
721 64, 60, 61, 0, 62, 63, 64, 60, 61, 0,
722 62, 63, 64, 91, 58, 59, 0, 0, 0, 92,
723 58, 59, 0, 0, 0, 94, 58, 59, 0, 0,
724 0, 96, 58, 59, 0, 60, 61, 0, 62, 63,
725 64, 60, 61, 0, 62, 63, 64, 60, 61, 0,
726 62, 63, 64, 60, 61, 0, 62, 63, 64, 40,
727 41, 42, 0, 0, 0, 0, 0, 0, 0, 0,
728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
729 0, 43, 44, 0, 0, 45, 46
732 #define yypact_value_is_default(yystate) \
735 #define yytable_value_is_error(yytable_value) \
738 static const yytype_int8 yycheck[] =
740 26, 29, 26, 30, -1, 3, 4, 5, 30, 35,
741 36, 37, 38, 30, 30, 41, 42, 30, 30, 45,
742 46, 30, 48, 49, 50, 51, 52, 25, 26, -1,
743 28, 29, 30, -1, -1, -1, -1, -1, -1, 0,
744 1, -1, 3, 69, 5, 6, 7, 8, 9, 10,
745 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
746 21, 22, 23, 24, 3, 4, 5, 93, -1, 30,
747 31, 3, 4, 5, -1, -1, -1, 3, 4, 5,
748 -1, -1, -1, 3, 4, 5, 25, 26, -1, 28,
749 29, 30, -1, 25, 26, -1, 28, 29, 30, 25,
750 26, -1, 28, 29, 30, 25, 26, -1, 28, 29,
751 30, 3, 4, 5, -1, -1, -1, 3, 4, 5,
752 -1, -1, -1, 3, 4, 5, -1, -1, -1, 3,
753 4, 5, -1, 25, 26, -1, 28, 29, 30, 25,
754 26, -1, 28, 29, 30, 25, 26, -1, 28, 29,
755 30, 25, 26, -1, 28, 29, 30, 3, 4, 5,
756 -1, -1, -1, 3, 4, 5, -1, -1, -1, 3,
757 4, 5, -1, -1, -1, 3, 4, 5, -1, 25,
758 26, -1, 28, 29, 30, 25, 26, -1, 28, 29,
759 30, 25, 26, -1, 28, 29, 30, 25, 26, -1,
760 28, 29, 30, 3, 4, 5, -1, -1, -1, 3,
761 4, 5, -1, -1, -1, 3, 4, 5, -1, -1,
762 -1, 3, 4, 5, -1, 25, 26, -1, 28, 29,
763 30, 25, 26, -1, 28, 29, 30, 25, 26, -1,
764 28, 29, 30, 25, 26, -1, 28, 29, 30, 3,
765 4, 5, -1, -1, -1, -1, -1, -1, -1, -1,
766 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
767 -1, 25, 26, -1, -1, 29, 30
770 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
771 symbol of state STATE-NUM. */
772 static const yytype_uint8 yystos[] =
774 0, 33, 0, 1, 3, 5, 6, 7, 8, 9,
775 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
776 20, 21, 22, 23, 24, 30, 31, 34, 35, 36,
777 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
778 3, 4, 5, 25, 26, 29, 30, 46, 29, 30,
779 30, 30, 30, 46, 46, 46, 46, 3, 4, 5,
780 25, 26, 28, 29, 30, 47, 46, 46, 30, 30,
781 46, 46, 3, 46, 46, 46, 46, 46, 3, 3,
782 3, 3, 3, 3, 26, 46, 3, 3, 3, 3,
783 3, 3, 3, 30, 3, 46, 3
786 #define yyerrok (yyerrstatus = 0)
787 #define yyclearin (yychar = YYEMPTY)
791 #define YYACCEPT goto yyacceptlab
792 #define YYABORT goto yyabortlab
793 #define YYERROR goto yyerrorlab
796 /* Like YYERROR except do call yyerror. This remains here temporarily
797 to ease the transition to the new meaning of YYERROR, for GCC.
798 Once GCC version 2 has supplanted version 1, this can go. However,
799 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
800 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
803 #define YYFAIL goto yyerrlab
805 /* This is here to suppress warnings from the GCC cpp's
806 -Wunused-macros. Normally we don't worry about that warning, but
807 some users do, and we want to make it easy for users to remove
808 YYFAIL uses, which will produce warnings from Bison 2.5. */
811 #define YYRECOVERING() (!!yyerrstatus)
813 #define YYBACKUP(Token, Value) \
815 if (yychar == YYEMPTY && yylen == 1) \
824 yyerror (YY_("syntax error: cannot back up")); \
831 #define YYERRCODE 256
834 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
835 If N is 0, then set CURRENT to the empty location which ends
836 the previous symbol: RHS[0] (always defined). */
838 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
839 #ifndef YYLLOC_DEFAULT
840 # define YYLLOC_DEFAULT(Current, Rhs, N) \
844 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
845 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
846 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
847 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
851 (Current).first_line = (Current).last_line = \
852 YYRHSLOC (Rhs, 0).last_line; \
853 (Current).first_column = (Current).last_column = \
854 YYRHSLOC (Rhs, 0).last_column; \
860 /* This macro is provided for backward compatibility. */
862 #ifndef YY_LOCATION_PRINT
863 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
867 /* YYLEX -- calling `yylex' with the right arguments. */
870 # define YYLEX yylex (&yylval, YYLEX_PARAM)
872 # define YYLEX yylex (&yylval)
875 /* Enable debugging if requested. */
879 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
880 # define YYFPRINTF fprintf
883 # define YYDPRINTF(Args) \
889 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
893 YYFPRINTF (stderr, "%s ", Title); \
894 yy_symbol_print (stderr, \
896 YYFPRINTF (stderr, "\n"); \
901 /*--------------------------------.
902 | Print this symbol on YYOUTPUT. |
903 `--------------------------------*/
906 #if (defined __STDC__ || defined __C99__FUNC__ \
907 || defined __cplusplus || defined _MSC_VER)
909 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
912 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
915 YYSTYPE const * const yyvaluep;
921 if (yytype < YYNTOKENS)
922 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
934 /*--------------------------------.
935 | Print this symbol on YYOUTPUT. |
936 `--------------------------------*/
938 #if (defined __STDC__ || defined __C99__FUNC__ \
939 || defined __cplusplus || defined _MSC_VER)
941 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
944 yy_symbol_print (yyoutput, yytype, yyvaluep)
947 YYSTYPE const * const yyvaluep;
950 if (yytype < YYNTOKENS)
951 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
953 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
955 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
956 YYFPRINTF (yyoutput, ")");
959 /*------------------------------------------------------------------.
960 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
962 `------------------------------------------------------------------*/
964 #if (defined __STDC__ || defined __C99__FUNC__ \
965 || defined __cplusplus || defined _MSC_VER)
967 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
970 yy_stack_print (yybottom, yytop)
971 yytype_int16 *yybottom;
975 YYFPRINTF (stderr, "Stack now");
976 for (; yybottom <= yytop; yybottom++)
978 int yybot = *yybottom;
979 YYFPRINTF (stderr, " %d", yybot);
981 YYFPRINTF (stderr, "\n");
984 # define YY_STACK_PRINT(Bottom, Top) \
987 yy_stack_print ((Bottom), (Top)); \
991 /*------------------------------------------------.
992 | Report that the YYRULE is going to be reduced. |
993 `------------------------------------------------*/
995 #if (defined __STDC__ || defined __C99__FUNC__ \
996 || defined __cplusplus || defined _MSC_VER)
998 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1001 yy_reduce_print (yyvsp, yyrule)
1006 int yynrhs = yyr2[yyrule];
1008 unsigned long int yylno = yyrline[yyrule];
1009 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1011 /* The symbols being reduced. */
1012 for (yyi = 0; yyi < yynrhs; yyi++)
1014 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1015 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1016 &(yyvsp[(yyi + 1) - (yynrhs)])
1018 YYFPRINTF (stderr, "\n");
1022 # define YY_REDUCE_PRINT(Rule) \
1025 yy_reduce_print (yyvsp, Rule); \
1028 /* Nonzero means print parse trace. It is left uninitialized so that
1029 multiple parsers can coexist. */
1031 #else /* !YYDEBUG */
1032 # define YYDPRINTF(Args)
1033 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1034 # define YY_STACK_PRINT(Bottom, Top)
1035 # define YY_REDUCE_PRINT(Rule)
1036 #endif /* !YYDEBUG */
1039 /* YYINITDEPTH -- initial size of the parser's stacks. */
1041 # define YYINITDEPTH 200
1044 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1045 if the built-in stack extension method is used).
1047 Do not make this value too large; the results are undefined if
1048 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1049 evaluated with infinite-precision integer arithmetic. */
1052 # define YYMAXDEPTH 10000
1059 # if defined __GLIBC__ && defined _STRING_H
1060 # define yystrlen strlen
1062 /* Return the length of YYSTR. */
1063 #if (defined __STDC__ || defined __C99__FUNC__ \
1064 || defined __cplusplus || defined _MSC_VER)
1066 yystrlen (const char *yystr)
1074 for (yylen = 0; yystr[yylen]; yylen++)
1082 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1083 # define yystpcpy stpcpy
1085 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1087 #if (defined __STDC__ || defined __C99__FUNC__ \
1088 || defined __cplusplus || defined _MSC_VER)
1090 yystpcpy (char *yydest, const char *yysrc)
1093 yystpcpy (yydest, yysrc)
1099 const char *yys = yysrc;
1101 while ((*yyd++ = *yys++) != '\0')
1110 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1111 quotes and backslashes, so that it's suitable for yyerror. The
1112 heuristic is that double-quoting is unnecessary unless the string
1113 contains an apostrophe, a comma, or backslash (other than
1114 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1115 null, do not copy; instead, return the length of what the result
1118 yytnamerr (char *yyres, const char *yystr)
1123 char const *yyp = yystr;
1130 goto do_not_strip_quotes;
1134 goto do_not_strip_quotes;
1147 do_not_strip_quotes: ;
1151 return yystrlen (yystr);
1153 return yystpcpy (yyres, yystr) - yyres;
1157 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1158 about the unexpected token YYTOKEN for the state stack whose top is
1161 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1162 not large enough to hold the message. In that case, also set
1163 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1164 required number of bytes is too large to store. */
1166 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1167 yytype_int16 *yyssp, int yytoken)
1169 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1170 YYSIZE_T yysize = yysize0;
1172 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1173 /* Internationalized format string. */
1174 const char *yyformat = 0;
1175 /* Arguments of yyformat. */
1176 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1177 /* Number of reported tokens (one for the "unexpected", one per
1181 /* There are many possibilities here to consider:
1182 - Assume YYFAIL is not used. It's too flawed to consider. See
1183 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1184 for details. YYERROR is fine as it does not invoke this
1186 - If this state is a consistent state with a default action, then
1187 the only way this function was invoked is if the default action
1188 is an error action. In that case, don't check for expected
1189 tokens because there are none.
1190 - The only way there can be no lookahead present (in yychar) is if
1191 this state is a consistent state with a default action. Thus,
1192 detecting the absence of a lookahead is sufficient to determine
1193 that there is no unexpected or expected token to report. In that
1194 case, just report a simple "syntax error".
1195 - Don't assume there isn't a lookahead just because this state is a
1196 consistent state with a default action. There might have been a
1197 previous inconsistent state, consistent state with a non-default
1198 action, or user semantic action that manipulated yychar.
1199 - Of course, the expected token list depends on states to have
1200 correct lookahead information, and it depends on the parser not
1201 to perform extra reductions after fetching a lookahead from the
1202 scanner and before detecting a syntax error. Thus, state merging
1203 (from LALR or IELR) and default reductions corrupt the expected
1204 token list. However, the list is correct for canonical LR with
1205 one exception: it will still contain any token that will not be
1206 accepted due to an error action in a later state.
1208 if (yytoken != YYEMPTY)
1210 int yyn = yypact[*yyssp];
1211 yyarg[yycount++] = yytname[yytoken];
1212 if (!yypact_value_is_default (yyn))
1214 /* Start YYX at -YYN if negative to avoid negative indexes in
1215 YYCHECK. In other words, skip the first -YYN actions for
1216 this state because they are default actions. */
1217 int yyxbegin = yyn < 0 ? -yyn : 0;
1218 /* Stay within bounds of both yycheck and yytname. */
1219 int yychecklim = YYLAST - yyn + 1;
1220 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1223 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1224 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1225 && !yytable_value_is_error (yytable[yyx + yyn]))
1227 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1233 yyarg[yycount++] = yytname[yyx];
1234 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1235 if (! (yysize <= yysize1
1236 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1245 # define YYCASE_(N, S) \
1249 YYCASE_(0, YY_("syntax error"));
1250 YYCASE_(1, YY_("syntax error, unexpected %s"));
1251 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1252 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1253 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1254 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1258 yysize1 = yysize + yystrlen (yyformat);
1259 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1263 if (*yymsg_alloc < yysize)
1265 *yymsg_alloc = 2 * yysize;
1266 if (! (yysize <= *yymsg_alloc
1267 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1268 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1272 /* Avoid sprintf, as that infringes on the user's name space.
1273 Don't have undefined behavior even if the translation
1274 produced a string with the wrong number of "%s"s. */
1278 while ((*yyp = *yyformat) != '\0')
1279 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1281 yyp += yytnamerr (yyp, yyarg[yyi++]);
1292 #endif /* YYERROR_VERBOSE */
1294 /*-----------------------------------------------.
1295 | Release the memory associated to this symbol. |
1296 `-----------------------------------------------*/
1299 #if (defined __STDC__ || defined __C99__FUNC__ \
1300 || defined __cplusplus || defined _MSC_VER)
1302 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1305 yydestruct (yymsg, yytype, yyvaluep)
1315 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1326 /* Prevent warnings from -Wmissing-prototypes. */
1327 #ifdef YYPARSE_PARAM
1328 #if defined __STDC__ || defined __cplusplus
1329 int yyparse (void *YYPARSE_PARAM);
1333 #else /* ! YYPARSE_PARAM */
1334 #if defined __STDC__ || defined __cplusplus
1339 #endif /* ! YYPARSE_PARAM */
1346 #ifdef YYPARSE_PARAM
1347 #if (defined __STDC__ || defined __C99__FUNC__ \
1348 || defined __cplusplus || defined _MSC_VER)
1350 yyparse (void *YYPARSE_PARAM)
1353 yyparse (YYPARSE_PARAM)
1354 void *YYPARSE_PARAM;
1356 #else /* ! YYPARSE_PARAM */
1357 #if (defined __STDC__ || defined __C99__FUNC__ \
1358 || defined __cplusplus || defined _MSC_VER)
1368 /* The lookahead symbol. */
1371 /* The semantic value of the lookahead symbol. */
1374 /* Number of syntax errors so far. */
1378 /* Number of tokens to shift before error messages enabled. */
1381 /* The stacks and their tools:
1382 `yyss': related to states.
1383 `yyvs': related to semantic values.
1385 Refer to the stacks thru separate pointers, to allow yyoverflow
1386 to reallocate them elsewhere. */
1388 /* The state stack. */
1389 yytype_int16 yyssa[YYINITDEPTH];
1391 yytype_int16 *yyssp;
1393 /* The semantic value stack. */
1394 YYSTYPE yyvsa[YYINITDEPTH];
1398 YYSIZE_T yystacksize;
1402 /* Lookahead token as an internal (translated) token number. */
1404 /* The variables used to return semantic value and location from the
1409 /* Buffer for error messages, and its allocated size. */
1411 char *yymsg = yymsgbuf;
1412 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1415 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1417 /* The number of symbols on the RHS of the reduced rule.
1418 Keep to zero when no symbol should be popped. */
1424 yystacksize = YYINITDEPTH;
1426 YYDPRINTF ((stderr, "Starting parse\n"));
1431 yychar = YYEMPTY; /* Cause a token to be read. */
1433 /* Initialize stack pointers.
1434 Waste one element of value and location stack
1435 so that they stay on the same level as the state stack.
1436 The wasted elements are never initialized. */
1442 /*------------------------------------------------------------.
1443 | yynewstate -- Push a new state, which is found in yystate. |
1444 `------------------------------------------------------------*/
1446 /* In all cases, when you get here, the value and location stacks
1447 have just been pushed. So pushing a state here evens the stacks. */
1453 if (yyss + yystacksize - 1 <= yyssp)
1455 /* Get the current used size of the three stacks, in elements. */
1456 YYSIZE_T yysize = yyssp - yyss + 1;
1460 /* Give user a chance to reallocate the stack. Use copies of
1461 these so that the &'s don't force the real ones into
1463 YYSTYPE *yyvs1 = yyvs;
1464 yytype_int16 *yyss1 = yyss;
1466 /* Each stack pointer address is followed by the size of the
1467 data in use in that stack, in bytes. This used to be a
1468 conditional around just the two extra args, but that might
1469 be undefined if yyoverflow is a macro. */
1470 yyoverflow (YY_("memory exhausted"),
1471 &yyss1, yysize * sizeof (*yyssp),
1472 &yyvs1, yysize * sizeof (*yyvsp),
1478 #else /* no yyoverflow */
1479 # ifndef YYSTACK_RELOCATE
1480 goto yyexhaustedlab;
1482 /* Extend the stack our own way. */
1483 if (YYMAXDEPTH <= yystacksize)
1484 goto yyexhaustedlab;
1486 if (YYMAXDEPTH < yystacksize)
1487 yystacksize = YYMAXDEPTH;
1490 yytype_int16 *yyss1 = yyss;
1491 union yyalloc *yyptr =
1492 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1494 goto yyexhaustedlab;
1495 YYSTACK_RELOCATE (yyss_alloc, yyss);
1496 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1497 # undef YYSTACK_RELOCATE
1499 YYSTACK_FREE (yyss1);
1502 #endif /* no yyoverflow */
1504 yyssp = yyss + yysize - 1;
1505 yyvsp = yyvs + yysize - 1;
1507 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1508 (unsigned long int) yystacksize));
1510 if (yyss + yystacksize - 1 <= yyssp)
1514 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1516 if (yystate == YYFINAL)
1526 /* Do appropriate processing given the current state. Read a
1527 lookahead token if we need one and don't already have one. */
1529 /* First try to decide what to do without reference to lookahead token. */
1530 yyn = yypact[yystate];
1531 if (yypact_value_is_default (yyn))
1534 /* Not known => get a lookahead token if don't already have one. */
1536 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1537 if (yychar == YYEMPTY)
1539 YYDPRINTF ((stderr, "Reading a token: "));
1543 if (yychar <= YYEOF)
1545 yychar = yytoken = YYEOF;
1546 YYDPRINTF ((stderr, "Now at end of input.\n"));
1550 yytoken = YYTRANSLATE (yychar);
1551 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1554 /* If the proper action on seeing token YYTOKEN is to reduce or to
1555 detect an error, take that action. */
1557 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1562 if (yytable_value_is_error (yyn))
1568 /* Count tokens shifted since error; after three, turn off error
1573 /* Shift the lookahead token. */
1574 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1576 /* Discard the shifted token. */
1585 /*-----------------------------------------------------------.
1586 | yydefault -- do the default action for the current state. |
1587 `-----------------------------------------------------------*/
1589 yyn = yydefact[yystate];
1595 /*-----------------------------.
1596 | yyreduce -- Do a reduction. |
1597 `-----------------------------*/
1599 /* yyn is the number of a rule to reduce with. */
1602 /* If YYLEN is nonzero, implement the default value of the action:
1605 Otherwise, the following line sets YYVAL to garbage.
1606 This behavior is undocumented and Bison
1607 users should not rely upon it. Assigning to YYVAL
1608 unconditionally makes the parser a bit smaller, and it avoids a
1609 GCC warning that YYVAL may be used uninitialized. */
1610 yyval = yyvsp[1-yylen];
1613 YY_REDUCE_PRINT (yyn);
1618 /* Line 1806 of yacc.c */
1619 #line 116 "cmDependsFortranParser.y"
1621 free((yyvsp[(1) - (4)].string));
1627 /* Line 1806 of yacc.c */
1628 #line 122 "cmDependsFortranParser.y"
1630 if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (2)].string), "interface"))
1632 cmDependsFortranParser* parser =
1633 cmDependsFortran_yyget_extra(yyscanner);
1634 cmDependsFortranParser_SetInInterface(parser, true);
1636 free((yyvsp[(1) - (2)].string));
1642 /* Line 1806 of yacc.c */
1643 #line 132 "cmDependsFortranParser.y"
1645 if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "use"))
1647 cmDependsFortranParser* parser =
1648 cmDependsFortran_yyget_extra(yyscanner);
1649 cmDependsFortranParser_RuleUse(parser, (yyvsp[(2) - (4)].string));
1651 else if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "module"))
1653 cmDependsFortranParser* parser =
1654 cmDependsFortran_yyget_extra(yyscanner);
1655 cmDependsFortranParser_RuleModule(parser, (yyvsp[(2) - (4)].string));
1657 else if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "interface"))
1659 cmDependsFortranParser* parser =
1660 cmDependsFortran_yyget_extra(yyscanner);
1661 cmDependsFortranParser_SetInInterface(parser, true);
1663 else if (cmDependsFortranParserIsKeyword((yyvsp[(2) - (4)].string), "interface") &&
1664 cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "end"))
1666 cmDependsFortranParser* parser =
1667 cmDependsFortran_yyget_extra(yyscanner);
1668 cmDependsFortranParser_SetInInterface(parser, false);
1670 free((yyvsp[(1) - (4)].string));
1671 free((yyvsp[(2) - (4)].string));
1677 /* Line 1806 of yacc.c */
1678 #line 162 "cmDependsFortranParser.y"
1680 if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (5)].string), "use"))
1682 cmDependsFortranParser* parser =
1683 cmDependsFortran_yyget_extra(yyscanner);
1684 cmDependsFortranParser_RuleUse(parser, (yyvsp[(3) - (5)].string));
1686 free((yyvsp[(1) - (5)].string));
1687 free((yyvsp[(3) - (5)].string));
1693 /* Line 1806 of yacc.c */
1694 #line 173 "cmDependsFortranParser.y"
1696 if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (7)].string), "use") &&
1697 cmDependsFortranParserIsKeyword((yyvsp[(3) - (7)].string), "non_intrinsic") )
1699 cmDependsFortranParser* parser =
1700 cmDependsFortran_yyget_extra(yyscanner);
1701 cmDependsFortranParser_RuleUse(parser, (yyvsp[(5) - (7)].string));
1703 free((yyvsp[(1) - (7)].string));
1704 free((yyvsp[(3) - (7)].string));
1705 free((yyvsp[(5) - (7)].string));
1711 /* Line 1806 of yacc.c */
1712 #line 186 "cmDependsFortranParser.y"
1714 if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "include"))
1716 cmDependsFortranParser* parser =
1717 cmDependsFortran_yyget_extra(yyscanner);
1718 cmDependsFortranParser_RuleInclude(parser, (yyvsp[(2) - (4)].string));
1720 free((yyvsp[(1) - (4)].string));
1721 free((yyvsp[(2) - (4)].string));
1727 /* Line 1806 of yacc.c */
1728 #line 197 "cmDependsFortranParser.y"
1730 cmDependsFortranParser* parser =
1731 cmDependsFortran_yyget_extra(yyscanner);
1732 cmDependsFortranParser_RuleInclude(parser, (yyvsp[(1) - (3)].string));
1733 free((yyvsp[(1) - (3)].string));
1739 /* Line 1806 of yacc.c */
1740 #line 204 "cmDependsFortranParser.y"
1742 cmDependsFortranParser* parser =
1743 cmDependsFortran_yyget_extra(yyscanner);
1744 cmDependsFortranParser_RuleInclude(parser, (yyvsp[(2) - (4)].string));
1745 free((yyvsp[(2) - (4)].string));
1751 /* Line 1806 of yacc.c */
1752 #line 211 "cmDependsFortranParser.y"
1754 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1755 cmDependsFortranParser_RuleDefine(parser, (yyvsp[(2) - (4)].string));
1756 free((yyvsp[(2) - (4)].string));
1762 /* Line 1806 of yacc.c */
1763 #line 217 "cmDependsFortranParser.y"
1765 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1766 cmDependsFortranParser_RuleUndef(parser, (yyvsp[(2) - (4)].string));
1767 free((yyvsp[(2) - (4)].string));
1773 /* Line 1806 of yacc.c */
1774 #line 223 "cmDependsFortranParser.y"
1776 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1777 cmDependsFortranParser_RuleIfdef(parser, (yyvsp[(2) - (4)].string));
1778 free((yyvsp[(2) - (4)].string));
1784 /* Line 1806 of yacc.c */
1785 #line 229 "cmDependsFortranParser.y"
1787 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1788 cmDependsFortranParser_RuleIfndef(parser, (yyvsp[(2) - (4)].string));
1789 free((yyvsp[(2) - (4)].string));
1795 /* Line 1806 of yacc.c */
1796 #line 235 "cmDependsFortranParser.y"
1798 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1799 cmDependsFortranParser_RuleIf(parser);
1805 /* Line 1806 of yacc.c */
1806 #line 240 "cmDependsFortranParser.y"
1808 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1809 cmDependsFortranParser_RuleElif(parser);
1815 /* Line 1806 of yacc.c */
1816 #line 245 "cmDependsFortranParser.y"
1818 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1819 cmDependsFortranParser_RuleElse(parser);
1825 /* Line 1806 of yacc.c */
1826 #line 250 "cmDependsFortranParser.y"
1828 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1829 cmDependsFortranParser_RuleEndif(parser);
1835 /* Line 1806 of yacc.c */
1836 #line 255 "cmDependsFortranParser.y"
1838 free((yyvsp[(1) - (4)].string));
1844 /* Line 1806 of yacc.c */
1845 #line 277 "cmDependsFortranParser.y"
1846 { free ((yyvsp[(1) - (1)].string)); }
1851 /* Line 1806 of yacc.c */
1852 #line 278 "cmDependsFortranParser.y"
1853 { free ((yyvsp[(1) - (1)].string)); }
1858 /* Line 1806 of yacc.c */
1859 #line 1860 "cmDependsFortranParser.cxx"
1862 /* User semantic actions sometimes alter yychar, and that requires
1863 that yytoken be updated with the new translation. We take the
1864 approach of translating immediately before every use of yytoken.
1865 One alternative is translating here after every semantic action,
1866 but that translation would be missed if the semantic action invokes
1867 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1868 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1869 incorrect destructor might then be invoked immediately. In the
1870 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1871 to an incorrect destructor call or verbose syntax error message
1872 before the lookahead is translated. */
1873 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1877 YY_STACK_PRINT (yyss, yyssp);
1881 /* Now `shift' the result of the reduction. Determine what state
1882 that goes to, based on the state we popped back to and the rule
1883 number reduced by. */
1887 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1888 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1889 yystate = yytable[yystate];
1891 yystate = yydefgoto[yyn - YYNTOKENS];
1896 /*------------------------------------.
1897 | yyerrlab -- here on detecting error |
1898 `------------------------------------*/
1900 /* Make sure we have latest lookahead translation. See comments at
1901 user semantic actions for why this is necessary. */
1902 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1904 /* If not already recovering from an error, report this error. */
1908 #if ! YYERROR_VERBOSE
1909 yyerror (YY_("syntax error"));
1911 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1914 char const *yymsgp = YY_("syntax error");
1915 int yysyntax_error_status;
1916 yysyntax_error_status = YYSYNTAX_ERROR;
1917 if (yysyntax_error_status == 0)
1919 else if (yysyntax_error_status == 1)
1921 if (yymsg != yymsgbuf)
1922 YYSTACK_FREE (yymsg);
1923 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1927 yymsg_alloc = sizeof yymsgbuf;
1928 yysyntax_error_status = 2;
1932 yysyntax_error_status = YYSYNTAX_ERROR;
1937 if (yysyntax_error_status == 2)
1938 goto yyexhaustedlab;
1940 # undef YYSYNTAX_ERROR
1946 if (yyerrstatus == 3)
1948 /* If just tried and failed to reuse lookahead token after an
1949 error, discard it. */
1951 if (yychar <= YYEOF)
1953 /* Return failure if at end of input. */
1954 if (yychar == YYEOF)
1959 yydestruct ("Error: discarding",
1966 /* Else will try to reuse lookahead token after shifting the error
1971 /*---------------------------------------------------.
1972 | yyerrorlab -- error raised explicitly by YYERROR. |
1973 `---------------------------------------------------*/
1976 /* Pacify compilers like GCC when the user code never invokes
1977 YYERROR and the label yyerrorlab therefore never appears in user
1979 if (/*CONSTCOND*/ 0)
1982 /* Do not reclaim the symbols of the rule which action triggered
1986 YY_STACK_PRINT (yyss, yyssp);
1991 /*-------------------------------------------------------------.
1992 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1993 `-------------------------------------------------------------*/
1996 yyerrstatus = 3; /* Each real token shifted decrements this. */
2000 yyn = yypact[yystate];
2001 if (!yypact_value_is_default (yyn))
2004 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2012 /* Pop the current state because it cannot handle the error token. */
2017 yydestruct ("Error: popping",
2018 yystos[yystate], yyvsp);
2021 YY_STACK_PRINT (yyss, yyssp);
2027 /* Shift the error token. */
2028 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2034 /*-------------------------------------.
2035 | yyacceptlab -- YYACCEPT comes here. |
2036 `-------------------------------------*/
2041 /*-----------------------------------.
2042 | yyabortlab -- YYABORT comes here. |
2043 `-----------------------------------*/
2048 #if !defined(yyoverflow) || YYERROR_VERBOSE
2049 /*-------------------------------------------------.
2050 | yyexhaustedlab -- memory exhaustion comes here. |
2051 `-------------------------------------------------*/
2053 yyerror (YY_("memory exhausted"));
2059 if (yychar != YYEMPTY)
2061 /* Make sure we have latest lookahead translation. See comments at
2062 user semantic actions for why this is necessary. */
2063 yytoken = YYTRANSLATE (yychar);
2064 yydestruct ("Cleanup: discarding lookahead",
2067 /* Do not reclaim the symbols of the rule which action triggered
2068 this YYABORT or YYACCEPT. */
2070 YY_STACK_PRINT (yyss, yyssp);
2071 while (yyssp != yyss)
2073 yydestruct ("Cleanup: popping",
2074 yystos[*yyssp], yyvsp);
2079 YYSTACK_FREE (yyss);
2082 if (yymsg != yymsgbuf)
2083 YYSTACK_FREE (yymsg);
2085 /* Make sure YYID is used. */
2086 return YYID (yyresult);
2091 /* Line 2067 of yacc.c */
2092 #line 286 "cmDependsFortranParser.y"
2094 /* End of grammar */