1 /* A Bison parser, made by GNU Bison 2.4.1. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
44 /* Identify Bison output. */
48 #define YYBISON_VERSION "2.4.1"
51 #define YYSKELETON_NAME "yacc.c"
62 /* Using locations. */
63 #define YYLSP_NEEDED 0
65 /* Substitute the variable and function names. */
66 #define yyparse cmDependsFortran_yyparse
67 #define yylex cmDependsFortran_yylex
68 #define yyerror cmDependsFortran_yyerror
69 #define yylval cmDependsFortran_yylval
70 #define yychar cmDependsFortran_yychar
71 #define yydebug cmDependsFortran_yydebug
72 #define yynerrs cmDependsFortran_yynerrs
75 /* Copy the first part of user declarations. */
77 /* Line 189 of yacc.c */
78 #line 1 "cmDependsFortranParser.y"
80 /*=========================================================================
82 Program: CMake - Cross-Platform Makefile Generator
83 Module: $RCSfile: cmDependsFortranParser.cxx,v $
85 Date: $Date: 2009-06-12 14:46:23 $
86 Version: $Revision: 1.20 $
88 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
89 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
91 This software is distributed WITHOUT ANY WARRANTY; without even
92 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
93 PURPOSE. See the above copyright notices for more information.
95 =========================================================================*/
96 /*-------------------------------------------------------------------------
97 Portions of this source have been derived from makedepf90 version 2.8.8,
99 Copyright (C) 2000--2006 Erik Edelmann <erik.edelmann@iki.fi>
101 The code was originally distributed under the GPL but permission
102 from the copyright holder has been obtained to distribute this
103 derived work under the CMake license.
104 -------------------------------------------------------------------------*/
108 This file must be translated to C and modified to build everywhere.
112 bison --yacc --name-prefix=cmDependsFortran_yy
113 --defines=cmDependsFortranParserTokens.h
114 -ocmDependsFortranParser.cxx
115 cmDependsFortranParser.y
117 Modify cmDependsFortranParser.cxx:
119 - Remove the yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"]
122 /*-------------------------------------------------------------------------*/
123 #define cmDependsFortranParser_cxx
124 #include "cmDependsFortranParser.h" /* Interface to parser object. */
125 #include "cmDependsFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */
127 #include <cmsys/String.h>
129 /* Configure the parser to use a lexer object. */
130 #define YYPARSE_PARAM yyscanner
131 #define YYLEX_PARAM yyscanner
132 #define YYERROR_VERBOSE 1
133 #define cmDependsFortran_yyerror(x) \
134 cmDependsFortranError(yyscanner, x)
136 /* Forward declare the lexer entry point. */
139 /* Helper function to forward error callback. */
140 static void cmDependsFortranError(yyscan_t yyscanner
, const char* message
)
142 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
143 cmDependsFortranParser_Error(parser
, message
);
146 static bool cmDependsFortranParserIsKeyword(const char* word
,
149 return cmsysString_strcasecmp(word
, keyword
) == 0;
152 /* Disable some warnings in the generated code. */
154 # pragma warn -8004 /* Variable assigned a value that is not used. */
155 # pragma warn -8008 /* condition always returns true */
156 # pragma warn -8060 /* possibly incorrect assignment */
157 # pragma warn -8066 /* unreachable code */
160 # pragma warning (disable: 4102) /* Unused goto label. */
161 # pragma warning (disable: 4065) /* Switch contains default but no case. */
162 # pragma warning (disable: 4701) /* Local variable may not be initialized. */
163 # pragma warning (disable: 4702) /* Unreachable code. */
164 # pragma warning (disable: 4127) /* Conditional expression is constant. */
165 # pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */
169 /* Line 189 of yacc.c */
170 #line 172 "cmDependsFortranParser.cxx"
172 /* Enabling traces. */
177 /* Enabling verbose error messages. */
178 #ifdef YYERROR_VERBOSE
179 # undef YYERROR_VERBOSE
180 # define YYERROR_VERBOSE 1
182 # define YYERROR_VERBOSE 0
185 /* Enabling the token table. */
186 #ifndef YYTOKEN_TABLE
187 # define YYTOKEN_TABLE 0
194 /* Put the tokens into the symbol table, so that GDB and other debuggers
201 F90PPR_INCLUDE
= 262,
222 UNTERMINATED_STRING
= 283,
229 #define ASSIGNMENT_OP 259
231 #define CPP_INCLUDE 261
232 #define F90PPR_INCLUDE 262
233 #define COCO_INCLUDE 263
234 #define F90PPR_DEFINE 264
235 #define CPP_DEFINE 265
236 #define F90PPR_UNDEF 266
237 #define CPP_UNDEF 267
238 #define CPP_IFDEF 268
239 #define CPP_IFNDEF 269
243 #define CPP_ENDIF 273
244 #define F90PPR_IFDEF 274
245 #define F90PPR_IFNDEF 275
246 #define F90PPR_IF 276
247 #define F90PPR_ELSE 277
248 #define F90PPR_ELIF 278
249 #define F90PPR_ENDIF 279
252 #define CPP_TOENDL 282
253 #define UNTERMINATED_STRING 283
260 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
261 typedef union YYSTYPE
264 /* Line 214 of yacc.c */
265 #line 94 "cmDependsFortranParser.y"
271 /* Line 214 of yacc.c */
272 #line 274 "cmDependsFortranParser.cxx"
274 # define YYSTYPE_IS_TRIVIAL 1
275 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
276 # define YYSTYPE_IS_DECLARED 1
280 /* Copy the second part of user declarations. */
283 /* Line 264 of yacc.c */
284 #line 286 "cmDependsFortranParser.cxx"
291 typedef YYTYPE_UINT8 yytype_uint8
;
293 typedef unsigned char yytype_uint8
;
297 typedef YYTYPE_INT8 yytype_int8
;
298 #elif (defined __STDC__ || defined __C99__FUNC__ \
299 || defined __cplusplus || defined _MSC_VER)
300 typedef signed char yytype_int8
;
302 typedef short int yytype_int8
;
306 typedef YYTYPE_UINT16 yytype_uint16
;
308 typedef unsigned short int yytype_uint16
;
312 typedef YYTYPE_INT16 yytype_int16
;
314 typedef short int yytype_int16
;
318 # ifdef __SIZE_TYPE__
319 # define YYSIZE_T __SIZE_TYPE__
320 # elif defined size_t
321 # define YYSIZE_T size_t
322 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
323 || defined __cplusplus || defined _MSC_VER)
324 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
325 # define YYSIZE_T size_t
327 # define YYSIZE_T unsigned int
331 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
336 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
337 # define YY_(msgid) dgettext ("bison-runtime", msgid)
341 # define YY_(msgid) msgid
345 /* Suppress unused-variable warnings by "using" E. */
346 #if ! defined lint || defined __GNUC__
347 # define YYUSE(e) ((void) (e))
349 # define YYUSE(e) /* empty */
352 /* Identity function, used to suppress warnings about constant conditions. */
356 #if (defined __STDC__ || defined __C99__FUNC__ \
357 || defined __cplusplus || defined _MSC_VER)
370 #if ! defined yyoverflow || YYERROR_VERBOSE
372 /* The parser invokes alloca or malloc; define the necessary symbols. */
374 # ifdef YYSTACK_USE_ALLOCA
375 # if YYSTACK_USE_ALLOCA
377 # define YYSTACK_ALLOC __builtin_alloca
378 # elif defined __BUILTIN_VA_ARG_INCR
379 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
381 # define YYSTACK_ALLOC __alloca
382 # elif defined _MSC_VER
383 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
384 # define alloca _alloca
386 # define YYSTACK_ALLOC alloca
387 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
388 || defined __cplusplus || defined _MSC_VER)
389 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
398 # ifdef YYSTACK_ALLOC
399 /* Pacify GCC's `empty if-body' warning. */
400 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
401 # ifndef YYSTACK_ALLOC_MAXIMUM
402 /* The OS might guarantee only one guard page at the bottom of the stack,
403 and a page size can be as small as 4096 bytes. So we cannot safely
404 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
405 to allow for a few compiler-allocated temporary stack slots. */
406 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
409 # define YYSTACK_ALLOC YYMALLOC
410 # define YYSTACK_FREE YYFREE
411 # ifndef YYSTACK_ALLOC_MAXIMUM
412 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
414 # if (defined __cplusplus && ! defined _STDLIB_H \
415 && ! ((defined YYMALLOC || defined malloc) \
416 && (defined YYFREE || defined free)))
417 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
423 # define YYMALLOC malloc
424 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
425 || defined __cplusplus || defined _MSC_VER)
426 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
431 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
432 || defined __cplusplus || defined _MSC_VER)
433 void free (void *); /* INFRINGES ON USER NAME SPACE */
437 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
440 #if (! defined yyoverflow \
441 && (! defined __cplusplus \
442 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
444 /* A type that is properly aligned for any stack member. */
447 yytype_int16 yyss_alloc
;
451 /* The size of the maximum gap between one aligned stack and the next. */
452 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
454 /* The size of an array large to enough to hold all stacks, each with
456 # define YYSTACK_BYTES(N) \
457 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
458 + YYSTACK_GAP_MAXIMUM)
460 /* Copy COUNT objects from FROM to TO. The source and destination do
463 # if defined __GNUC__ && 1 < __GNUC__
464 # define YYCOPY(To, From, Count) \
465 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
467 # define YYCOPY(To, From, Count) \
471 for (yyi = 0; yyi < (Count); yyi++) \
472 (To)[yyi] = (From)[yyi]; \
478 /* Relocate STACK from its old location to the new one. The
479 local variables YYSIZE and YYSTACKSIZE give the old and new number of
480 elements in the stack, and YYPTR gives the new location of the
481 stack. Advance YYPTR to a properly aligned location for the next
483 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
486 YYSIZE_T yynewbytes; \
487 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
488 Stack = &yyptr->Stack_alloc; \
489 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
490 yyptr += yynewbytes / sizeof (*yyptr); \
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 285
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
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, 48, 53, 58, 63, 68, 72, 76,
558 80, 84, 89, 93, 95, 97, 99, 101, 103, 105,
559 107, 109, 111, 113, 115, 117, 119, 121, 123, 125,
560 127, 129, 131, 133, 135, 136, 139, 141, 143, 145,
564 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
565 static const yytype_int8 yyrhs
[] =
567 32, 0, -1, -1, 32, 33, -1, 35, -1, 34,
568 -1, 30, 4, 45, 3, -1, 30, 3, -1, 30,
569 30, 45, 3, -1, 30, 26, 30, 45, 3, -1,
570 30, 25, 30, 26, 30, 45, 3, -1, 30, 29,
571 45, 3, -1, 36, 29, 45, 3, -1, 37, 30,
572 45, 3, -1, 38, 30, 45, 3, -1, 39, 30,
573 45, 3, -1, 40, 30, 45, 3, -1, 41, 45,
574 3, -1, 42, 45, 3, -1, 43, 45, 3, -1,
575 44, 45, 3, -1, 30, 5, 45, 3, -1, 5,
576 45, 3, -1, 3, -1, 1, -1, 6, -1, 7,
577 -1, 8, -1, 10, -1, 9, -1, 12, -1, 11,
578 -1, 13, -1, 19, -1, 14, -1, 20, -1, 15,
579 -1, 21, -1, 17, -1, 23, -1, 16, -1, 22,
580 -1, 18, -1, 24, -1, -1, 45, 46, -1, 30,
581 -1, 29, -1, 5, -1, 4, -1, 26, -1, 25,
585 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
586 static const yytype_uint16 yyrline
[] =
588 0, 115, 115, 115, 117, 117, 119, 125, 135, 165,
589 176, 189, 200, 207, 213, 219, 225, 231, 236, 241,
590 246, 251, 255, 256, 257, 262, 262, 262, 263, 263,
591 264, 264, 265, 265, 266, 266, 267, 267, 268, 268,
592 269, 269, 270, 270, 271, 271, 274, 275, 276, 277,
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", "$accept", "code", "stmt", "assignment_stmt",
609 "keyword_stmt", "include", "define", "undef", "ifdef", "ifndef", "if",
610 "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, 31, 32, 32, 33, 33, 34, 35, 35, 35,
630 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
631 35, 35, 35, 35, 35, 36, 36, 36, 37, 37,
632 38, 38, 39, 39, 40, 40, 41, 41, 42, 42,
633 43, 43, 44, 44, 45, 45, 46, 46, 46, 46,
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, 4, 4, 4, 4, 4, 3, 3, 3,
642 3, 4, 3, 1, 1, 1, 1, 1, 1, 1,
643 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
644 1, 1, 1, 1, 0, 2, 1, 1, 1, 1,
648 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
649 STATE-NUM 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, 24, 23, 44, 25, 26, 27, 29,
654 28, 31, 30, 32, 34, 36, 40, 38, 42, 33,
655 35, 37, 41, 39, 43, 0, 3, 5, 4, 0,
656 0, 0, 0, 0, 44, 44, 44, 44, 0, 7,
657 44, 44, 0, 0, 44, 44, 44, 44, 44, 44,
658 44, 0, 0, 0, 0, 22, 49, 48, 51, 50,
659 52, 47, 46, 45, 0, 0, 0, 44, 0, 0,
660 0, 0, 0, 0, 0, 17, 18, 19, 20, 6,
661 21, 0, 0, 11, 8, 12, 13, 14, 15, 16,
665 /* YYDEFGOTO[NTERM-NUM]. */
666 static const yytype_int8 yydefgoto
[] =
668 -1, 1, 26, 27, 28, 29, 30, 31, 32, 33,
669 34, 35, 36, 37, 38, 63
672 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
674 #define YYPACT_NINF -35
675 static const yytype_int16 yypact
[] =
677 -35, 29, -35, -35, -35, -35, -35, -35, -35, -35,
678 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
679 -35, -35, -35, -35, -35, 241, -35, -35, -35, -25,
680 -22, -21, -13, -12, -35, -35, -35, -35, 57, -35,
681 -35, -35, -11, -10, -35, -35, -35, -35, -35, -35,
682 -35, 63, 69, 75, 103, -35, -35, -35, -35, -35,
683 -35, -35, -35, -35, 109, 115, -5, -35, 121, 149,
684 155, 161, 167, 195, 201, -35, -35, -35, -35, -35,
685 -35, -8, 207, -35, -35, -35, -35, -35, -35, -35,
689 /* YYPGOTO[NTERM-NUM]. */
690 static const yytype_int8 yypgoto
[] =
692 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
693 -35, -35, -35, -35, -34, -35
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 zero, do what YYDEFACT says.
699 If YYTABLE_NINF, syntax error. */
700 #define YYTABLE_NINF -1
701 static const yytype_uint8 yytable
[] =
703 51, 52, 53, 54, 46, 0, 64, 65, 47, 48,
704 68, 69, 70, 71, 72, 73, 74, 49, 50, 66,
705 67, 81, 90, 0, 0, 0, 0, 0, 0, 2,
706 3, 0, 4, 82, 5, 6, 7, 8, 9, 10,
707 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
708 21, 22, 23, 24, 0, 0, 92, 0, 0, 25,
709 55, 56, 57, 0, 0, 0, 75, 56, 57, 0,
710 0, 0, 76, 56, 57, 0, 0, 0, 77, 56,
711 57, 0, 58, 59, 0, 60, 61, 62, 58, 59,
712 0, 60, 61, 62, 58, 59, 0, 60, 61, 62,
713 58, 59, 0, 60, 61, 62, 78, 56, 57, 0,
714 0, 0, 79, 56, 57, 0, 0, 0, 80, 56,
715 57, 0, 0, 0, 83, 56, 57, 0, 58, 59,
716 0, 60, 61, 62, 58, 59, 0, 60, 61, 62,
717 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
718 61, 62, 84, 56, 57, 0, 0, 0, 85, 56,
719 57, 0, 0, 0, 86, 56, 57, 0, 0, 0,
720 87, 56, 57, 0, 58, 59, 0, 60, 61, 62,
721 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
722 61, 62, 58, 59, 0, 60, 61, 62, 88, 56,
723 57, 0, 0, 0, 89, 56, 57, 0, 0, 0,
724 91, 56, 57, 0, 0, 0, 93, 56, 57, 0,
725 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
726 61, 62, 58, 59, 0, 60, 61, 62, 58, 59,
727 0, 60, 61, 62, 39, 40, 41, 0, 0, 0,
728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
729 0, 0, 0, 0, 0, 0, 42, 43, 0, 0,
733 static const yytype_int8 yycheck
[] =
735 34, 35, 36, 37, 29, -1, 40, 41, 30, 30,
736 44, 45, 46, 47, 48, 49, 50, 30, 30, 30,
737 30, 26, 30, -1, -1, -1, -1, -1, -1, 0,
738 1, -1, 3, 67, 5, 6, 7, 8, 9, 10,
739 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
740 21, 22, 23, 24, -1, -1, 90, -1, -1, 30,
741 3, 4, 5, -1, -1, -1, 3, 4, 5, -1,
742 -1, -1, 3, 4, 5, -1, -1, -1, 3, 4,
743 5, -1, 25, 26, -1, 28, 29, 30, 25, 26,
744 -1, 28, 29, 30, 25, 26, -1, 28, 29, 30,
745 25, 26, -1, 28, 29, 30, 3, 4, 5, -1,
746 -1, -1, 3, 4, 5, -1, -1, -1, 3, 4,
747 5, -1, -1, -1, 3, 4, 5, -1, 25, 26,
748 -1, 28, 29, 30, 25, 26, -1, 28, 29, 30,
749 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
750 29, 30, 3, 4, 5, -1, -1, -1, 3, 4,
751 5, -1, -1, -1, 3, 4, 5, -1, -1, -1,
752 3, 4, 5, -1, 25, 26, -1, 28, 29, 30,
753 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
754 29, 30, 25, 26, -1, 28, 29, 30, 3, 4,
755 5, -1, -1, -1, 3, 4, 5, -1, -1, -1,
756 3, 4, 5, -1, -1, -1, 3, 4, 5, -1,
757 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
758 29, 30, 25, 26, -1, 28, 29, 30, 25, 26,
759 -1, 28, 29, 30, 3, 4, 5, -1, -1, -1,
760 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
761 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
765 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
766 symbol of state STATE-NUM. */
767 static const yytype_uint8 yystos
[] =
769 0, 32, 0, 1, 3, 5, 6, 7, 8, 9,
770 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
771 20, 21, 22, 23, 24, 30, 33, 34, 35, 36,
772 37, 38, 39, 40, 41, 42, 43, 44, 45, 3,
773 4, 5, 25, 26, 29, 30, 29, 30, 30, 30,
774 30, 45, 45, 45, 45, 3, 4, 5, 25, 26,
775 28, 29, 30, 46, 45, 45, 30, 30, 45, 45,
776 45, 45, 45, 45, 45, 3, 3, 3, 3, 3,
777 3, 26, 45, 3, 3, 3, 3, 3, 3, 3,
781 #define yyerrok (yyerrstatus = 0)
782 #define yyclearin (yychar = YYEMPTY)
786 #define YYACCEPT goto yyacceptlab
787 #define YYABORT goto yyabortlab
788 #define YYERROR goto yyerrorlab
791 /* Like YYERROR except do call yyerror. This remains here temporarily
792 to ease the transition to the new meaning of YYERROR, for GCC.
793 Once GCC version 2 has supplanted version 1, this can go. */
795 #define YYFAIL goto yyerrlab
797 #define YYRECOVERING() (!!yyerrstatus)
799 #define YYBACKUP(Token, Value) \
801 if (yychar == YYEMPTY && yylen == 1) \
805 yytoken = YYTRANSLATE (yychar); \
811 yyerror (YY_("syntax error: cannot back up")); \
818 #define YYERRCODE 256
821 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
822 If N is 0, then set CURRENT to the empty location which ends
823 the previous symbol: RHS[0] (always defined). */
825 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
826 #ifndef YYLLOC_DEFAULT
827 # define YYLLOC_DEFAULT(Current, Rhs, N) \
831 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
832 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
833 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
834 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
838 (Current).first_line = (Current).last_line = \
839 YYRHSLOC (Rhs, 0).last_line; \
840 (Current).first_column = (Current).last_column = \
841 YYRHSLOC (Rhs, 0).last_column; \
847 /* YY_LOCATION_PRINT -- Print the location on the stream.
848 This macro was not mandated originally: define only if we know
849 we won't break user code: when these are the locations we know. */
851 #ifndef YY_LOCATION_PRINT
852 # if YYLTYPE_IS_TRIVIAL
853 # define YY_LOCATION_PRINT(File, Loc) \
854 fprintf (File, "%d.%d-%d.%d", \
855 (Loc).first_line, (Loc).first_column, \
856 (Loc).last_line, (Loc).last_column)
858 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
863 /* YYLEX -- calling `yylex' with the right arguments. */
866 # define YYLEX yylex (&yylval, YYLEX_PARAM)
868 # define YYLEX yylex (&yylval)
871 /* Enable debugging if requested. */
875 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
876 # define YYFPRINTF fprintf
879 # define YYDPRINTF(Args) \
885 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
889 YYFPRINTF (stderr, "%s ", Title); \
890 yy_symbol_print (stderr, \
892 YYFPRINTF (stderr, "\n"); \
897 /*--------------------------------.
898 | Print this symbol on YYOUTPUT. |
899 `--------------------------------*/
902 #if (defined __STDC__ || defined __C99__FUNC__ \
903 || defined __cplusplus || defined _MSC_VER)
905 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
908 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
911 YYSTYPE
const * const yyvaluep
;
917 if (yytype
< YYNTOKENS
)
918 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
930 /*--------------------------------.
931 | Print this symbol on YYOUTPUT. |
932 `--------------------------------*/
934 #if (defined __STDC__ || defined __C99__FUNC__ \
935 || defined __cplusplus || defined _MSC_VER)
937 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
940 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
943 YYSTYPE
const * const yyvaluep
;
946 if (yytype
< YYNTOKENS
)
947 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
949 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
951 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
952 YYFPRINTF (yyoutput
, ")");
955 /*------------------------------------------------------------------.
956 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
958 `------------------------------------------------------------------*/
960 #if (defined __STDC__ || defined __C99__FUNC__ \
961 || defined __cplusplus || defined _MSC_VER)
963 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
966 yy_stack_print (yybottom
, yytop
)
967 yytype_int16
*yybottom
;
971 YYFPRINTF (stderr
, "Stack now");
972 for (; yybottom
<= yytop
; yybottom
++)
974 int yybot
= *yybottom
;
975 YYFPRINTF (stderr
, " %d", yybot
);
977 YYFPRINTF (stderr
, "\n");
980 # define YY_STACK_PRINT(Bottom, Top) \
983 yy_stack_print ((Bottom), (Top)); \
987 /*------------------------------------------------.
988 | Report that the YYRULE is going to be reduced. |
989 `------------------------------------------------*/
991 #if (defined __STDC__ || defined __C99__FUNC__ \
992 || defined __cplusplus || defined _MSC_VER)
994 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
997 yy_reduce_print (yyvsp
, yyrule
)
1002 int yynrhs
= yyr2
[yyrule
];
1004 unsigned long int yylno
= yyrline
[yyrule
];
1005 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1007 /* The symbols being reduced. */
1008 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1010 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
1011 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1012 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1014 YYFPRINTF (stderr
, "\n");
1018 # define YY_REDUCE_PRINT(Rule) \
1021 yy_reduce_print (yyvsp, Rule); \
1024 /* Nonzero means print parse trace. It is left uninitialized so that
1025 multiple parsers can coexist. */
1027 #else /* !YYDEBUG */
1028 # define YYDPRINTF(Args)
1029 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1030 # define YY_STACK_PRINT(Bottom, Top)
1031 # define YY_REDUCE_PRINT(Rule)
1032 #endif /* !YYDEBUG */
1035 /* YYINITDEPTH -- initial size of the parser's stacks. */
1037 # define YYINITDEPTH 200
1040 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1041 if the built-in stack extension method is used).
1043 Do not make this value too large; the results are undefined if
1044 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1045 evaluated with infinite-precision integer arithmetic. */
1048 # define YYMAXDEPTH 10000
1056 # if defined __GLIBC__ && defined _STRING_H
1057 # define yystrlen strlen
1059 /* Return the length of YYSTR. */
1060 #if (defined __STDC__ || defined __C99__FUNC__ \
1061 || defined __cplusplus || defined _MSC_VER)
1063 yystrlen (const char *yystr
)
1071 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1079 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1080 # define yystpcpy stpcpy
1082 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1084 #if (defined __STDC__ || defined __C99__FUNC__ \
1085 || defined __cplusplus || defined _MSC_VER)
1087 yystpcpy (char *yydest
, const char *yysrc
)
1090 yystpcpy (yydest
, yysrc
)
1096 const char *yys
= yysrc
;
1098 while ((*yyd
++ = *yys
++) != '\0')
1107 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1108 quotes and backslashes, so that it's suitable for yyerror. The
1109 heuristic is that double-quoting is unnecessary unless the string
1110 contains an apostrophe, a comma, or backslash (other than
1111 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1112 null, do not copy; instead, return the length of what the result
1115 yytnamerr (char *yyres
, const char *yystr
)
1120 char const *yyp
= yystr
;
1127 goto do_not_strip_quotes
;
1131 goto do_not_strip_quotes
;
1144 do_not_strip_quotes
: ;
1148 return yystrlen (yystr
);
1150 return yystpcpy (yyres
, yystr
) - yyres
;
1154 /* Copy into YYRESULT an error message about the unexpected token
1155 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1156 including the terminating null byte. If YYRESULT is null, do not
1157 copy anything; just return the number of bytes that would be
1158 copied. As a special case, return 0 if an ordinary "syntax error"
1159 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1160 size calculation. */
1162 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1164 int yyn
= yypact
[yystate
];
1166 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1170 int yytype
= YYTRANSLATE (yychar
);
1171 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1172 YYSIZE_T yysize
= yysize0
;
1174 int yysize_overflow
= 0;
1175 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1176 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1180 /* This is so xgettext sees the translatable formats that are
1181 constructed on the fly. */
1182 YY_("syntax error, unexpected %s");
1183 YY_("syntax error, unexpected %s, expecting %s");
1184 YY_("syntax error, unexpected %s, expecting %s or %s");
1185 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1186 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1190 static char const yyunexpected
[] = "syntax error, unexpected %s";
1191 static char const yyexpecting
[] = ", expecting %s";
1192 static char const yyor
[] = " or %s";
1193 char yyformat
[sizeof yyunexpected
1194 + sizeof yyexpecting
- 1
1195 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1196 * (sizeof yyor
- 1))];
1197 char const *yyprefix
= yyexpecting
;
1199 /* Start YYX at -YYN if negative to avoid negative indexes in
1201 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1203 /* Stay within bounds of both yycheck and yytname. */
1204 int yychecklim
= YYLAST
- yyn
+ 1;
1205 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1208 yyarg
[0] = yytname
[yytype
];
1209 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1211 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1212 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1214 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1218 yyformat
[sizeof yyunexpected
- 1] = '\0';
1221 yyarg
[yycount
++] = yytname
[yyx
];
1222 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1223 yysize_overflow
|= (yysize1
< yysize
);
1225 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1229 yyf
= YY_(yyformat
);
1230 yysize1
= yysize
+ yystrlen (yyf
);
1231 yysize_overflow
|= (yysize1
< yysize
);
1234 if (yysize_overflow
)
1235 return YYSIZE_MAXIMUM
;
1239 /* Avoid sprintf, as that infringes on the user's name space.
1240 Don't have undefined behavior even if the translation
1241 produced a string with the wrong number of "%s"s. */
1242 char *yyp
= yyresult
;
1244 while ((*yyp
= *yyf
) != '\0')
1246 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1248 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1261 #endif /* YYERROR_VERBOSE */
1264 /*-----------------------------------------------.
1265 | Release the memory associated to this symbol. |
1266 `-----------------------------------------------*/
1269 #if (defined __STDC__ || defined __C99__FUNC__ \
1270 || defined __cplusplus || defined _MSC_VER)
1272 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1275 yydestruct (yymsg
, yytype
, yyvaluep
)
1285 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1295 /* Prevent warnings from -Wmissing-prototypes. */
1296 #ifdef YYPARSE_PARAM
1297 #if defined __STDC__ || defined __cplusplus
1298 int yyparse (void *YYPARSE_PARAM
);
1302 #else /* ! YYPARSE_PARAM */
1303 #if defined __STDC__ || defined __cplusplus
1308 #endif /* ! YYPARSE_PARAM */
1314 /*-------------------------.
1315 | yyparse or yypush_parse. |
1316 `-------------------------*/
1318 #ifdef YYPARSE_PARAM
1319 #if (defined __STDC__ || defined __C99__FUNC__ \
1320 || defined __cplusplus || defined _MSC_VER)
1322 yyparse (void *YYPARSE_PARAM
)
1325 yyparse (YYPARSE_PARAM
)
1326 void *YYPARSE_PARAM
;
1328 #else /* ! YYPARSE_PARAM */
1329 #if (defined __STDC__ || defined __C99__FUNC__ \
1330 || defined __cplusplus || defined _MSC_VER)
1340 /* The lookahead symbol. */
1343 /* The semantic value of the lookahead symbol. */
1346 /* Number of syntax errors so far. */
1350 /* Number of tokens to shift before error messages enabled. */
1353 /* The stacks and their tools:
1354 `yyss': related to states.
1355 `yyvs': related to semantic values.
1357 Refer to the stacks thru separate pointers, to allow yyoverflow
1358 to reallocate them elsewhere. */
1360 /* The state stack. */
1361 yytype_int16 yyssa
[YYINITDEPTH
];
1363 yytype_int16
*yyssp
;
1365 /* The semantic value stack. */
1366 YYSTYPE yyvsa
[YYINITDEPTH
];
1370 YYSIZE_T yystacksize
;
1374 /* Lookahead token as an internal (translated) token number. */
1376 /* The variables used to return semantic value and location from the
1381 /* Buffer for error messages, and its allocated size. */
1383 char *yymsg
= yymsgbuf
;
1384 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1387 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1389 /* The number of symbols on the RHS of the reduced rule.
1390 Keep to zero when no symbol should be popped. */
1396 yystacksize
= YYINITDEPTH
;
1398 YYDPRINTF ((stderr
, "Starting parse\n"));
1403 yychar
= YYEMPTY
; /* Cause a token to be read. */
1405 /* Initialize stack pointers.
1406 Waste one element of value and location stack
1407 so that they stay on the same level as the state stack.
1408 The wasted elements are never initialized. */
1414 /*------------------------------------------------------------.
1415 | yynewstate -- Push a new state, which is found in yystate. |
1416 `------------------------------------------------------------*/
1418 /* In all cases, when you get here, the value and location stacks
1419 have just been pushed. So pushing a state here evens the stacks. */
1425 if (yyss
+ yystacksize
- 1 <= yyssp
)
1427 /* Get the current used size of the three stacks, in elements. */
1428 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1432 /* Give user a chance to reallocate the stack. Use copies of
1433 these so that the &'s don't force the real ones into
1435 YYSTYPE
*yyvs1
= yyvs
;
1436 yytype_int16
*yyss1
= yyss
;
1438 /* Each stack pointer address is followed by the size of the
1439 data in use in that stack, in bytes. This used to be a
1440 conditional around just the two extra args, but that might
1441 be undefined if yyoverflow is a macro. */
1442 yyoverflow (YY_("memory exhausted"),
1443 &yyss1
, yysize
* sizeof (*yyssp
),
1444 &yyvs1
, yysize
* sizeof (*yyvsp
),
1450 #else /* no yyoverflow */
1451 # ifndef YYSTACK_RELOCATE
1452 goto yyexhaustedlab
;
1454 /* Extend the stack our own way. */
1455 if (YYMAXDEPTH
<= yystacksize
)
1456 goto yyexhaustedlab
;
1458 if (YYMAXDEPTH
< yystacksize
)
1459 yystacksize
= YYMAXDEPTH
;
1462 yytype_int16
*yyss1
= yyss
;
1463 union yyalloc
*yyptr
=
1464 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1466 goto yyexhaustedlab
;
1467 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
1468 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
1469 # undef YYSTACK_RELOCATE
1471 YYSTACK_FREE (yyss1
);
1474 #endif /* no yyoverflow */
1476 yyssp
= yyss
+ yysize
- 1;
1477 yyvsp
= yyvs
+ yysize
- 1;
1479 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1480 (unsigned long int) yystacksize
));
1482 if (yyss
+ yystacksize
- 1 <= yyssp
)
1486 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1488 if (yystate
== YYFINAL
)
1498 /* Do appropriate processing given the current state. Read a
1499 lookahead token if we need one and don't already have one. */
1501 /* First try to decide what to do without reference to lookahead token. */
1502 yyn
= yypact
[yystate
];
1503 if (yyn
== YYPACT_NINF
)
1506 /* Not known => get a lookahead token if don't already have one. */
1508 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1509 if (yychar
== YYEMPTY
)
1511 YYDPRINTF ((stderr
, "Reading a token: "));
1515 if (yychar
<= YYEOF
)
1517 yychar
= yytoken
= YYEOF
;
1518 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1522 yytoken
= YYTRANSLATE (yychar
);
1523 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1526 /* If the proper action on seeing token YYTOKEN is to reduce or to
1527 detect an error, take that action. */
1529 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1534 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1540 /* Count tokens shifted since error; after three, turn off error
1545 /* Shift the lookahead token. */
1546 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1548 /* Discard the shifted token. */
1557 /*-----------------------------------------------------------.
1558 | yydefault -- do the default action for the current state. |
1559 `-----------------------------------------------------------*/
1561 yyn
= yydefact
[yystate
];
1567 /*-----------------------------.
1568 | yyreduce -- Do a reduction. |
1569 `-----------------------------*/
1571 /* yyn is the number of a rule to reduce with. */
1574 /* If YYLEN is nonzero, implement the default value of the action:
1577 Otherwise, the following line sets YYVAL to garbage.
1578 This behavior is undocumented and Bison
1579 users should not rely upon it. Assigning to YYVAL
1580 unconditionally makes the parser a bit smaller, and it avoids a
1581 GCC warning that YYVAL may be used uninitialized. */
1582 yyval
= yyvsp
[1-yylen
];
1585 YY_REDUCE_PRINT (yyn
);
1590 /* Line 1455 of yacc.c */
1591 #line 120 "cmDependsFortranParser.y"
1593 free((yyvsp
[(1) - (4)].string
));
1599 /* Line 1455 of yacc.c */
1600 #line 126 "cmDependsFortranParser.y"
1602 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (2)].string
), "interface"))
1604 cmDependsFortranParser
* parser
=
1605 cmDependsFortran_yyget_extra(yyscanner
);
1606 cmDependsFortranParser_SetInInterface(parser
, true);
1608 free((yyvsp
[(1) - (2)].string
));
1614 /* Line 1455 of yacc.c */
1615 #line 136 "cmDependsFortranParser.y"
1617 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "use"))
1619 cmDependsFortranParser
* parser
=
1620 cmDependsFortran_yyget_extra(yyscanner
);
1621 cmDependsFortranParser_RuleUse(parser
, (yyvsp
[(2) - (4)].string
));
1623 else if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "module"))
1625 cmDependsFortranParser
* parser
=
1626 cmDependsFortran_yyget_extra(yyscanner
);
1627 cmDependsFortranParser_RuleModule(parser
, (yyvsp
[(2) - (4)].string
));
1629 else if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "interface"))
1631 cmDependsFortranParser
* parser
=
1632 cmDependsFortran_yyget_extra(yyscanner
);
1633 cmDependsFortranParser_SetInInterface(parser
, true);
1635 else if (cmDependsFortranParserIsKeyword((yyvsp
[(2) - (4)].string
), "interface") &&
1636 cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "end"))
1638 cmDependsFortranParser
* parser
=
1639 cmDependsFortran_yyget_extra(yyscanner
);
1640 cmDependsFortranParser_SetInInterface(parser
, false);
1642 free((yyvsp
[(1) - (4)].string
));
1643 free((yyvsp
[(2) - (4)].string
));
1649 /* Line 1455 of yacc.c */
1650 #line 166 "cmDependsFortranParser.y"
1652 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (5)].string
), "use"))
1654 cmDependsFortranParser
* parser
=
1655 cmDependsFortran_yyget_extra(yyscanner
);
1656 cmDependsFortranParser_RuleUse(parser
, (yyvsp
[(3) - (5)].string
));
1658 free((yyvsp
[(1) - (5)].string
));
1659 free((yyvsp
[(3) - (5)].string
));
1665 /* Line 1455 of yacc.c */
1666 #line 177 "cmDependsFortranParser.y"
1668 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (7)].string
), "use") &&
1669 cmDependsFortranParserIsKeyword((yyvsp
[(3) - (7)].string
), "non_intrinsic") )
1671 cmDependsFortranParser
* parser
=
1672 cmDependsFortran_yyget_extra(yyscanner
);
1673 cmDependsFortranParser_RuleUse(parser
, (yyvsp
[(5) - (7)].string
));
1675 free((yyvsp
[(1) - (7)].string
));
1676 free((yyvsp
[(3) - (7)].string
));
1677 free((yyvsp
[(5) - (7)].string
));
1683 /* Line 1455 of yacc.c */
1684 #line 190 "cmDependsFortranParser.y"
1686 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "include"))
1688 cmDependsFortranParser
* parser
=
1689 cmDependsFortran_yyget_extra(yyscanner
);
1690 cmDependsFortranParser_RuleInclude(parser
, (yyvsp
[(2) - (4)].string
));
1692 free((yyvsp
[(1) - (4)].string
));
1693 free((yyvsp
[(2) - (4)].string
));
1699 /* Line 1455 of yacc.c */
1700 #line 201 "cmDependsFortranParser.y"
1702 cmDependsFortranParser
* parser
=
1703 cmDependsFortran_yyget_extra(yyscanner
);
1704 cmDependsFortranParser_RuleInclude(parser
, (yyvsp
[(2) - (4)].string
));
1705 free((yyvsp
[(2) - (4)].string
));
1711 /* Line 1455 of yacc.c */
1712 #line 208 "cmDependsFortranParser.y"
1714 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1715 cmDependsFortranParser_RuleDefine(parser
, (yyvsp
[(2) - (4)].string
));
1716 free((yyvsp
[(2) - (4)].string
));
1722 /* Line 1455 of yacc.c */
1723 #line 214 "cmDependsFortranParser.y"
1725 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1726 cmDependsFortranParser_RuleUndef(parser
, (yyvsp
[(2) - (4)].string
));
1727 free((yyvsp
[(2) - (4)].string
));
1733 /* Line 1455 of yacc.c */
1734 #line 220 "cmDependsFortranParser.y"
1736 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1737 cmDependsFortranParser_RuleIfdef(parser
, (yyvsp
[(2) - (4)].string
));
1738 free((yyvsp
[(2) - (4)].string
));
1744 /* Line 1455 of yacc.c */
1745 #line 226 "cmDependsFortranParser.y"
1747 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1748 cmDependsFortranParser_RuleIfndef(parser
, (yyvsp
[(2) - (4)].string
));
1749 free((yyvsp
[(2) - (4)].string
));
1755 /* Line 1455 of yacc.c */
1756 #line 232 "cmDependsFortranParser.y"
1758 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1759 cmDependsFortranParser_RuleIf(parser
);
1765 /* Line 1455 of yacc.c */
1766 #line 237 "cmDependsFortranParser.y"
1768 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1769 cmDependsFortranParser_RuleElif(parser
);
1775 /* Line 1455 of yacc.c */
1776 #line 242 "cmDependsFortranParser.y"
1778 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1779 cmDependsFortranParser_RuleElse(parser
);
1785 /* Line 1455 of yacc.c */
1786 #line 247 "cmDependsFortranParser.y"
1788 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1789 cmDependsFortranParser_RuleEndif(parser
);
1795 /* Line 1455 of yacc.c */
1796 #line 252 "cmDependsFortranParser.y"
1798 free((yyvsp
[(1) - (4)].string
));
1804 /* Line 1455 of yacc.c */
1805 #line 274 "cmDependsFortranParser.y"
1806 { free ((yyvsp
[(1) - (1)].string
)); }
1811 /* Line 1455 of yacc.c */
1812 #line 275 "cmDependsFortranParser.y"
1813 { free ((yyvsp
[(1) - (1)].string
)); }
1818 /* Line 1455 of yacc.c */
1819 #line 1821 "cmDependsFortranParser.cxx"
1822 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
1826 YY_STACK_PRINT (yyss
, yyssp
);
1830 /* Now `shift' the result of the reduction. Determine what state
1831 that goes to, based on the state we popped back to and the rule
1832 number reduced by. */
1836 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1837 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1838 yystate
= yytable
[yystate
];
1840 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1845 /*------------------------------------.
1846 | yyerrlab -- here on detecting error |
1847 `------------------------------------*/
1849 /* If not already recovering from an error, report this error. */
1853 #if ! YYERROR_VERBOSE
1854 yyerror (YY_("syntax error"));
1857 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
1858 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
1860 YYSIZE_T yyalloc
= 2 * yysize
;
1861 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
1862 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
1863 if (yymsg
!= yymsgbuf
)
1864 YYSTACK_FREE (yymsg
);
1865 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
1867 yymsg_alloc
= yyalloc
;
1871 yymsg_alloc
= sizeof yymsgbuf
;
1875 if (0 < yysize
&& yysize
<= yymsg_alloc
)
1877 (void) yysyntax_error (yymsg
, yystate
, yychar
);
1882 yyerror (YY_("syntax error"));
1884 goto yyexhaustedlab
;
1892 if (yyerrstatus
== 3)
1894 /* If just tried and failed to reuse lookahead token after an
1895 error, discard it. */
1897 if (yychar
<= YYEOF
)
1899 /* Return failure if at end of input. */
1900 if (yychar
== YYEOF
)
1905 yydestruct ("Error: discarding",
1912 /* Else will try to reuse lookahead token after shifting the error
1917 /*---------------------------------------------------.
1918 | yyerrorlab -- error raised explicitly by YYERROR. |
1919 `---------------------------------------------------*/
1922 /* Pacify compilers like GCC when the user code never invokes
1923 YYERROR and the label yyerrorlab therefore never appears in user
1925 if (/*CONSTCOND*/ 0)
1928 /* Do not reclaim the symbols of the rule which action triggered
1932 YY_STACK_PRINT (yyss
, yyssp
);
1937 /*-------------------------------------------------------------.
1938 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1939 `-------------------------------------------------------------*/
1942 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1946 yyn
= yypact
[yystate
];
1947 if (yyn
!= YYPACT_NINF
)
1950 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1958 /* Pop the current state because it cannot handle the error token. */
1963 yydestruct ("Error: popping",
1964 yystos
[yystate
], yyvsp
);
1967 YY_STACK_PRINT (yyss
, yyssp
);
1973 /* Shift the error token. */
1974 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
1980 /*-------------------------------------.
1981 | yyacceptlab -- YYACCEPT comes here. |
1982 `-------------------------------------*/
1987 /*-----------------------------------.
1988 | yyabortlab -- YYABORT comes here. |
1989 `-----------------------------------*/
1994 #if !defined(yyoverflow) || YYERROR_VERBOSE
1995 /*-------------------------------------------------.
1996 | yyexhaustedlab -- memory exhaustion comes here. |
1997 `-------------------------------------------------*/
1999 yyerror (YY_("memory exhausted"));
2005 if (yychar
!= YYEMPTY
)
2006 yydestruct ("Cleanup: discarding lookahead",
2008 /* Do not reclaim the symbols of the rule which action triggered
2009 this YYABORT or YYACCEPT. */
2011 YY_STACK_PRINT (yyss
, yyssp
);
2012 while (yyssp
!= yyss
)
2014 yydestruct ("Cleanup: popping",
2015 yystos
[*yyssp
], yyvsp
);
2020 YYSTACK_FREE (yyss
);
2023 if (yymsg
!= yymsgbuf
)
2024 YYSTACK_FREE (yymsg
);
2026 /* Make sure YYID is used. */
2027 return YYID (yyresult
);
2032 /* Line 1675 of yacc.c */
2033 #line 283 "cmDependsFortranParser.y"
2035 /* End of grammar */