1 /* A Bison parser, made by GNU Bison 3.8.2. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
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 <https://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 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
41 /* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
48 /* Identify Bison output, and Bison version. */
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.8.2"
55 #define YYSKELETON_NAME "yacc.c"
67 /* Substitute the variable and function names. */
68 #define yyparse cmFortran_yyparse
69 #define yylex cmFortran_yylex
70 #define yyerror cmFortran_yyerror
71 #define yydebug cmFortran_yydebug
72 #define yynerrs cmFortran_yynerrs
74 /* First part of user prologue. */
75 #line 1 "cmFortranParser.y"
77 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
78 file Copyright.txt or https://cmake.org/licensing for details. */
79 /*-------------------------------------------------------------------------
80 Portions of this source have been derived from makedepf90 version 2.8.8,
82 Copyright (C) 2000--2006 Erik Edelmann <erik.edelmann@iki.fi>
84 The code was originally distributed under the GPL but permission
85 from the copyright holder has been obtained to distribute this
86 derived work under the CMake license.
87 -------------------------------------------------------------------------*/
91 This file must be translated to C and modified to build everywhere.
95 bison --name-prefix=cmFortran_yy
96 --defines=cmFortranParserTokens.h
102 #include "cmConfigure.h" // IWYU pragma: keep
104 #include "cmsys/String.h"
108 /*-------------------------------------------------------------------------*/
109 #define cmFortranParser_cxx
110 #include "cmFortranParser.h" /* Interface to parser object. */
112 /* Forward declare the lexer entry point. */
115 /* Helper function to forward error callback from parser. */
116 static void cmFortran_yyerror(yyscan_t yyscanner, const char* message)
118 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
119 cmFortranParser_Error(parser, message);
122 /* Disable some warnings in the generated code. */
124 # pragma warning (disable: 4102) /* Unused goto label. */
125 # pragma warning (disable: 4065) /* Switch contains default but no case. */
126 # pragma warning (disable: 4701) /* Local variable may not be initialized. */
127 # pragma warning (disable: 4702) /* Unreachable code. */
128 # pragma warning (disable: 4127) /* Conditional expression is constant. */
129 # pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */
131 #if defined(__GNUC__) && __GNUC__ >= 8
132 # pragma GCC diagnostic ignored "-Wconversion"
133 # pragma GCC diagnostic ignored "-Wfree-nonheap-object"
135 #if defined(__clang__) && defined(__has_warning)
136 # if __has_warning("-Wunused-but-set-variable")
137 # pragma clang diagnostic ignored "-Wunused-but-set-variable"
141 #line 142 "cmFortranParser.cxx"
145 # define YY_CAST(Type, Val) static_cast<Type> (Val)
146 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
148 # define YY_CAST(Type, Val) ((Type) (Val))
149 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
153 # if defined __cplusplus
154 # if 201103L <= __cplusplus
155 # define YY_NULLPTR nullptr
157 # define YY_NULLPTR 0
160 # define YY_NULLPTR ((void*)0)
164 #include "cmFortranParserTokens.h"
168 YYSYMBOL_YYEMPTY = -2,
169 YYSYMBOL_YYEOF = 0, /* "end of file" */
170 YYSYMBOL_YYerror = 1, /* error */
171 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
172 YYSYMBOL_EOSTMT = 3, /* EOSTMT */
173 YYSYMBOL_ASSIGNMENT_OP = 4, /* ASSIGNMENT_OP */
174 YYSYMBOL_GARBAGE = 5, /* GARBAGE */
175 YYSYMBOL_CPP_LINE_DIRECTIVE = 6, /* CPP_LINE_DIRECTIVE */
176 YYSYMBOL_CPP_INCLUDE = 7, /* CPP_INCLUDE */
177 YYSYMBOL_F90PPR_INCLUDE = 8, /* F90PPR_INCLUDE */
178 YYSYMBOL_COCO_INCLUDE = 9, /* COCO_INCLUDE */
179 YYSYMBOL_F90PPR_DEFINE = 10, /* F90PPR_DEFINE */
180 YYSYMBOL_CPP_DEFINE = 11, /* CPP_DEFINE */
181 YYSYMBOL_F90PPR_UNDEF = 12, /* F90PPR_UNDEF */
182 YYSYMBOL_CPP_UNDEF = 13, /* CPP_UNDEF */
183 YYSYMBOL_CPP_IFDEF = 14, /* CPP_IFDEF */
184 YYSYMBOL_CPP_IFNDEF = 15, /* CPP_IFNDEF */
185 YYSYMBOL_CPP_IF = 16, /* CPP_IF */
186 YYSYMBOL_CPP_ELSE = 17, /* CPP_ELSE */
187 YYSYMBOL_CPP_ELIF = 18, /* CPP_ELIF */
188 YYSYMBOL_CPP_ENDIF = 19, /* CPP_ENDIF */
189 YYSYMBOL_F90PPR_IFDEF = 20, /* F90PPR_IFDEF */
190 YYSYMBOL_F90PPR_IFNDEF = 21, /* F90PPR_IFNDEF */
191 YYSYMBOL_F90PPR_IF = 22, /* F90PPR_IF */
192 YYSYMBOL_F90PPR_ELSE = 23, /* F90PPR_ELSE */
193 YYSYMBOL_F90PPR_ELIF = 24, /* F90PPR_ELIF */
194 YYSYMBOL_F90PPR_ENDIF = 25, /* F90PPR_ENDIF */
195 YYSYMBOL_COMMA = 26, /* COMMA */
196 YYSYMBOL_COLON = 27, /* COLON */
197 YYSYMBOL_DCOLON = 28, /* DCOLON */
198 YYSYMBOL_LPAREN = 29, /* LPAREN */
199 YYSYMBOL_RPAREN = 30, /* RPAREN */
200 YYSYMBOL_UNTERMINATED_STRING = 31, /* UNTERMINATED_STRING */
201 YYSYMBOL_STRING = 32, /* STRING */
202 YYSYMBOL_WORD = 33, /* WORD */
203 YYSYMBOL_CPP_INCLUDE_ANGLE = 34, /* CPP_INCLUDE_ANGLE */
204 YYSYMBOL_END = 35, /* END */
205 YYSYMBOL_INCLUDE = 36, /* INCLUDE */
206 YYSYMBOL_INTERFACE = 37, /* INTERFACE */
207 YYSYMBOL_MODULE = 38, /* MODULE */
208 YYSYMBOL_SUBMODULE = 39, /* SUBMODULE */
209 YYSYMBOL_USE = 40, /* USE */
210 YYSYMBOL_YYACCEPT = 41, /* $accept */
211 YYSYMBOL_code = 42, /* code */
212 YYSYMBOL_stmt = 43, /* stmt */
213 YYSYMBOL_include = 44, /* include */
214 YYSYMBOL_define = 45, /* define */
215 YYSYMBOL_undef = 46, /* undef */
216 YYSYMBOL_ifdef = 47, /* ifdef */
217 YYSYMBOL_ifndef = 48, /* ifndef */
218 YYSYMBOL_if = 49, /* if */
219 YYSYMBOL_elif = 50, /* elif */
220 YYSYMBOL_else = 51, /* else */
221 YYSYMBOL_endif = 52, /* endif */
222 YYSYMBOL_other = 53, /* other */
223 YYSYMBOL_misc_code = 54 /* misc_code */
225 typedef enum yysymbol_kind_t yysymbol_kind_t;
234 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
235 <limits.h> and (if available) <stdint.h> are included
236 so that the code can choose integer types of a good width. */
238 #ifndef __PTRDIFF_MAX__
239 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
240 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
241 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
246 /* Narrow types that promote to a signed type and that can represent a
247 signed or unsigned integer of at least N bits. In tables they can
248 save space and decrease cache pressure. Promoting to a signed type
249 helps avoid bugs in integer arithmetic. */
251 #ifdef __INT_LEAST8_MAX__
252 typedef __INT_LEAST8_TYPE__ yytype_int8;
253 #elif defined YY_STDINT_H
254 typedef int_least8_t yytype_int8;
256 typedef signed char yytype_int8;
259 #ifdef __INT_LEAST16_MAX__
260 typedef __INT_LEAST16_TYPE__ yytype_int16;
261 #elif defined YY_STDINT_H
262 typedef int_least16_t yytype_int16;
264 typedef short yytype_int16;
267 /* Work around bug in HP-UX 11.23, which defines these macros
268 incorrectly for preprocessor constants. This workaround can likely
269 be removed in 2023, as HPE has promised support for HP-UX 11.23
270 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
271 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
273 # undef UINT_LEAST8_MAX
274 # undef UINT_LEAST16_MAX
275 # define UINT_LEAST8_MAX 255
276 # define UINT_LEAST16_MAX 65535
279 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
280 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
281 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
282 && UINT_LEAST8_MAX <= INT_MAX)
283 typedef uint_least8_t yytype_uint8;
284 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
285 typedef unsigned char yytype_uint8;
287 typedef short yytype_uint8;
290 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
291 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
292 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
293 && UINT_LEAST16_MAX <= INT_MAX)
294 typedef uint_least16_t yytype_uint16;
295 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
296 typedef unsigned short yytype_uint16;
298 typedef int yytype_uint16;
302 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
303 # define YYPTRDIFF_T __PTRDIFF_TYPE__
304 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
305 # elif defined PTRDIFF_MAX
307 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
309 # define YYPTRDIFF_T ptrdiff_t
310 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
312 # define YYPTRDIFF_T long
313 # define YYPTRDIFF_MAXIMUM LONG_MAX
318 # ifdef __SIZE_TYPE__
319 # define YYSIZE_T __SIZE_TYPE__
320 # elif defined size_t
321 # define YYSIZE_T size_t
322 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
323 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
324 # define YYSIZE_T size_t
326 # define YYSIZE_T unsigned
330 #define YYSIZE_MAXIMUM \
331 YY_CAST (YYPTRDIFF_T, \
332 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
333 ? YYPTRDIFF_MAXIMUM \
334 : YY_CAST (YYSIZE_T, -1)))
336 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
339 /* Stored state numbers (used for stacks). */
340 typedef yytype_int8 yy_state_t;
342 /* State numbers in computations. */
343 typedef int yy_state_fast_t;
346 # if defined YYENABLE_NLS && YYENABLE_NLS
348 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
349 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
353 # define YY_(Msgid) Msgid
358 #ifndef YY_ATTRIBUTE_PURE
359 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
360 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
362 # define YY_ATTRIBUTE_PURE
366 #ifndef YY_ATTRIBUTE_UNUSED
367 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
368 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
370 # define YY_ATTRIBUTE_UNUSED
374 /* Suppress unused-variable warnings by "using" E. */
375 #if ! defined lint || defined __GNUC__
376 # define YY_USE(E) ((void) (E))
378 # define YY_USE(E) /* empty */
381 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
382 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
383 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
384 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
385 _Pragma ("GCC diagnostic push") \
386 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
388 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
389 _Pragma ("GCC diagnostic push") \
390 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
391 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
393 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
394 _Pragma ("GCC diagnostic pop")
396 # define YY_INITIAL_VALUE(Value) Value
398 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
399 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
400 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
402 #ifndef YY_INITIAL_VALUE
403 # define YY_INITIAL_VALUE(Value) /* Nothing. */
406 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
407 # define YY_IGNORE_USELESS_CAST_BEGIN \
408 _Pragma ("GCC diagnostic push") \
409 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
410 # define YY_IGNORE_USELESS_CAST_END \
411 _Pragma ("GCC diagnostic pop")
413 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
414 # define YY_IGNORE_USELESS_CAST_BEGIN
415 # define YY_IGNORE_USELESS_CAST_END
419 #define YY_ASSERT(E) ((void) (0 && (E)))
423 /* The parser invokes alloca or malloc; define the necessary symbols. */
425 # ifdef YYSTACK_USE_ALLOCA
426 # if YYSTACK_USE_ALLOCA
428 # define YYSTACK_ALLOC __builtin_alloca
429 # elif defined __BUILTIN_VA_ARG_INCR
430 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
432 # define YYSTACK_ALLOC __alloca
433 # elif defined _MSC_VER
434 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
435 # define alloca _alloca
437 # define YYSTACK_ALLOC alloca
438 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
439 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
440 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
441 # ifndef EXIT_SUCCESS
442 # define EXIT_SUCCESS 0
449 # ifdef YYSTACK_ALLOC
450 /* Pacify GCC's 'empty if-body' warning. */
451 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
452 # ifndef YYSTACK_ALLOC_MAXIMUM
453 /* The OS might guarantee only one guard page at the bottom of the stack,
454 and a page size can be as small as 4096 bytes. So we cannot safely
455 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
456 to allow for a few compiler-allocated temporary stack slots. */
457 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
460 # define YYSTACK_ALLOC YYMALLOC
461 # define YYSTACK_FREE YYFREE
462 # ifndef YYSTACK_ALLOC_MAXIMUM
463 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
465 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
466 && ! ((defined YYMALLOC || defined malloc) \
467 && (defined YYFREE || defined free)))
468 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
469 # ifndef EXIT_SUCCESS
470 # define EXIT_SUCCESS 0
474 # define YYMALLOC malloc
475 # if ! defined malloc && ! defined EXIT_SUCCESS
476 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
481 # if ! defined free && ! defined EXIT_SUCCESS
482 void free (void *); /* INFRINGES ON USER NAME SPACE */
488 #if (! defined yyoverflow \
489 && (! defined __cplusplus \
490 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
492 /* A type that is properly aligned for any stack member. */
495 yy_state_t yyss_alloc;
499 /* The size of the maximum gap between one aligned stack and the next. */
500 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
502 /* The size of an array large to enough to hold all stacks, each with
504 # define YYSTACK_BYTES(N) \
505 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
506 + YYSTACK_GAP_MAXIMUM)
508 # define YYCOPY_NEEDED 1
510 /* Relocate STACK from its old location to the new one. The
511 local variables YYSIZE and YYSTACKSIZE give the old and new number of
512 elements in the stack, and YYPTR gives the new location of the
513 stack. Advance YYPTR to a properly aligned location for the next
515 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
518 YYPTRDIFF_T yynewbytes; \
519 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
520 Stack = &yyptr->Stack_alloc; \
521 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
522 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
528 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
529 /* Copy COUNT objects from SRC to DST. The source and destination do
532 # if defined __GNUC__ && 1 < __GNUC__
533 # define YYCOPY(Dst, Src, Count) \
534 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
536 # define YYCOPY(Dst, Src, Count) \
540 for (yyi = 0; yyi < (Count); yyi++) \
541 (Dst)[yyi] = (Src)[yyi]; \
546 #endif /* !YYCOPY_NEEDED */
548 /* YYFINAL -- State number of the termination state. */
550 /* YYLAST -- Last index in YYTABLE. */
553 /* YYNTOKENS -- Number of terminals. */
555 /* YYNNTS -- Number of nonterminals. */
557 /* YYNRULES -- Number of rules. */
559 /* YYNSTATES -- Number of states. */
560 #define YYNSTATES 121
562 /* YYMAXUTOK -- Last valid token kind. */
563 #define YYMAXUTOK 295
566 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
567 as returned by yylex, with out-of-bounds checking. */
568 #define YYTRANSLATE(YYX) \
569 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
570 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
573 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
574 as returned by yylex. */
575 static const yytype_int8 yytranslate[] =
577 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
581 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
594 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
595 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
596 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
597 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
598 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
599 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
600 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
601 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
602 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
603 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
604 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
605 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
606 35, 36, 37, 38, 39, 40
610 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
611 static const yytype_uint8 yyrline[] =
613 0, 106, 106, 106, 109, 113, 118, 123, 129, 136,
614 141, 145, 150, 162, 167, 172, 177, 182, 187, 192,
615 197, 202, 206, 210, 214, 218, 219, 224, 224, 224,
616 225, 225, 226, 226, 227, 227, 228, 228, 229, 229,
617 230, 230, 231, 231, 232, 232, 233, 233, 236, 237,
618 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
619 248, 249, 250, 251, 252
623 /** Accessing symbol of state STATE. */
624 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
627 /* The user-facing name of the symbol whose (internal) number is
628 YYSYMBOL. No bounds checking. */
629 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
631 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
632 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
633 static const char *const yytname[] =
635 "\"end of file\"", "error", "\"invalid token\"", "EOSTMT",
636 "ASSIGNMENT_OP", "GARBAGE", "CPP_LINE_DIRECTIVE", "CPP_INCLUDE",
637 "F90PPR_INCLUDE", "COCO_INCLUDE", "F90PPR_DEFINE", "CPP_DEFINE",
638 "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF", "CPP_IF",
639 "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF", "F90PPR_IFNDEF",
640 "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF", "F90PPR_ENDIF", "COMMA",
641 "COLON", "DCOLON", "LPAREN", "RPAREN", "UNTERMINATED_STRING", "STRING",
642 "WORD", "CPP_INCLUDE_ANGLE", "END", "INCLUDE", "INTERFACE", "MODULE",
643 "SUBMODULE", "USE", "$accept", "code", "stmt", "include", "define",
644 "undef", "ifdef", "ifndef", "if", "elif", "else", "endif", "other",
645 "misc_code", YY_NULLPTR
649 yysymbol_name (yysymbol_kind_t yysymbol)
651 return yytname[yysymbol];
655 #define YYPACT_NINF (-39)
657 #define yypact_value_is_default(Yyn) \
658 ((Yyn) == YYPACT_NINF)
660 #define YYTABLE_NINF (-1)
662 #define yytable_value_is_error(Yyn) \
665 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
667 static const yytype_int16 yypact[] =
669 -39, 21, -39, 5, -39, -23, -39, -39, -39, -39,
670 -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
671 -39, -39, -39, -39, -39, -39, -25, -19, 20, -8,
672 -15, -22, -39, -6, 14, 15, 16, 17, -39, -39,
673 -39, -39, -39, -39, 59, 49, 51, -39, 63, 64,
674 35, 36, 37, -39, -39, -39, -39, -39, -39, 74,
675 112, 127, 165, 180, -39, -39, -39, -39, -39, -39,
676 -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
677 -39, -39, -39, -39, -39, -39, -39, -20, 43, -39,
678 218, 233, 271, 286, 324, 339, -39, -39, -39, -39,
679 -39, 39, 40, 41, 377, -39, -39, -39, -39, -39,
680 -39, 46, 78, -39, -39, 50, -39, 392, 79, -39,
684 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
685 Performed when YYTABLE does not specify something else to do. Zero
686 means the default is an error. */
687 static const yytype_int8 yydefact[] =
689 2, 0, 1, 0, 25, 0, 27, 28, 29, 31,
690 30, 33, 32, 34, 36, 38, 42, 40, 44, 35,
691 37, 39, 43, 41, 45, 46, 0, 0, 0, 0,
692 0, 0, 3, 0, 0, 0, 0, 0, 46, 46,
693 46, 46, 26, 46, 0, 0, 0, 4, 0, 0,
694 0, 0, 0, 46, 46, 46, 46, 46, 46, 0,
695 0, 0, 0, 0, 15, 57, 56, 64, 62, 58,
696 59, 60, 61, 63, 55, 48, 49, 50, 51, 52,
697 53, 54, 47, 10, 13, 9, 6, 0, 0, 46,
698 0, 0, 0, 0, 0, 0, 21, 22, 23, 24,
699 14, 0, 0, 0, 0, 5, 16, 17, 18, 19,
700 20, 0, 0, 46, 11, 0, 7, 0, 0, 12,
704 /* YYPGOTO[NTERM-NUM]. */
705 static const yytype_int8 yypgoto[] =
707 -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
711 /* YYDEFGOTO[NTERM-NUM]. */
712 static const yytype_int8 yydefgoto[] =
714 0, 1, 32, 33, 34, 35, 36, 37, 38, 39,
718 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
719 positive, shift that token. If negative, reduce the rule whose
720 number is the opposite. If YYTABLE_NINF, syntax error. */
721 static const yytype_int8 yytable[] =
723 59, 60, 61, 62, 51, 63, 52, 101, 42, 43,
724 102, 53, 45, 46, 50, 90, 91, 92, 93, 94,
725 95, 2, 3, 47, 4, 49, 54, 5, 6, 7,
726 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
727 18, 19, 20, 21, 22, 23, 24, 55, 56, 57,
728 58, 104, 83, 48, 84, 25, 26, 27, 28, 29,
729 30, 31, 64, 65, 66, 67, 85, 86, 87, 88,
730 89, 103, 111, 112, 113, 117, 115, 96, 65, 66,
731 67, 116, 120, 118, 0, 68, 69, 70, 71, 72,
732 73, 74, 75, 0, 76, 77, 78, 79, 80, 81,
733 68, 69, 70, 71, 72, 73, 74, 75, 0, 76,
734 77, 78, 79, 80, 81, 97, 65, 66, 67, 0,
735 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
736 98, 65, 66, 67, 0, 0, 0, 0, 68, 69,
737 70, 71, 72, 73, 74, 75, 0, 76, 77, 78,
738 79, 80, 81, 68, 69, 70, 71, 72, 73, 74,
739 75, 0, 76, 77, 78, 79, 80, 81, 99, 65,
740 66, 67, 0, 0, 0, 0, 0, 0, 0, 0,
741 0, 0, 0, 100, 65, 66, 67, 0, 0, 0,
742 0, 68, 69, 70, 71, 72, 73, 74, 75, 0,
743 76, 77, 78, 79, 80, 81, 68, 69, 70, 71,
744 72, 73, 74, 75, 0, 76, 77, 78, 79, 80,
745 81, 105, 65, 66, 67, 0, 0, 0, 0, 0,
746 0, 0, 0, 0, 0, 0, 106, 65, 66, 67,
747 0, 0, 0, 0, 68, 69, 70, 71, 72, 73,
748 74, 75, 0, 76, 77, 78, 79, 80, 81, 68,
749 69, 70, 71, 72, 73, 74, 75, 0, 76, 77,
750 78, 79, 80, 81, 107, 65, 66, 67, 0, 0,
751 0, 0, 0, 0, 0, 0, 0, 0, 0, 108,
752 65, 66, 67, 0, 0, 0, 0, 68, 69, 70,
753 71, 72, 73, 74, 75, 0, 76, 77, 78, 79,
754 80, 81, 68, 69, 70, 71, 72, 73, 74, 75,
755 0, 76, 77, 78, 79, 80, 81, 109, 65, 66,
756 67, 0, 0, 0, 0, 0, 0, 0, 0, 0,
757 0, 0, 110, 65, 66, 67, 0, 0, 0, 0,
758 68, 69, 70, 71, 72, 73, 74, 75, 0, 76,
759 77, 78, 79, 80, 81, 68, 69, 70, 71, 72,
760 73, 74, 75, 0, 76, 77, 78, 79, 80, 81,
761 114, 65, 66, 67, 0, 0, 0, 0, 0, 0,
762 0, 0, 0, 0, 0, 119, 65, 66, 67, 0,
763 0, 0, 0, 68, 69, 70, 71, 72, 73, 74,
764 75, 0, 76, 77, 78, 79, 80, 81, 68, 69,
765 70, 71, 72, 73, 74, 75, 0, 76, 77, 78,
769 static const yytype_int8 yycheck[] =
771 38, 39, 40, 41, 26, 43, 28, 27, 3, 32,
772 30, 33, 37, 32, 29, 53, 54, 55, 56, 57,
773 58, 0, 1, 3, 3, 33, 32, 6, 7, 8,
774 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
775 19, 20, 21, 22, 23, 24, 25, 33, 33, 33,
776 33, 89, 3, 33, 3, 34, 35, 36, 37, 38,
777 39, 40, 3, 4, 5, 6, 3, 3, 33, 33,
778 33, 28, 33, 33, 33, 113, 30, 3, 4, 5,
779 6, 3, 3, 33, -1, 26, 27, 28, 29, 30,
780 31, 32, 33, -1, 35, 36, 37, 38, 39, 40,
781 26, 27, 28, 29, 30, 31, 32, 33, -1, 35,
782 36, 37, 38, 39, 40, 3, 4, 5, 6, -1,
783 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
784 3, 4, 5, 6, -1, -1, -1, -1, 26, 27,
785 28, 29, 30, 31, 32, 33, -1, 35, 36, 37,
786 38, 39, 40, 26, 27, 28, 29, 30, 31, 32,
787 33, -1, 35, 36, 37, 38, 39, 40, 3, 4,
788 5, 6, -1, -1, -1, -1, -1, -1, -1, -1,
789 -1, -1, -1, 3, 4, 5, 6, -1, -1, -1,
790 -1, 26, 27, 28, 29, 30, 31, 32, 33, -1,
791 35, 36, 37, 38, 39, 40, 26, 27, 28, 29,
792 30, 31, 32, 33, -1, 35, 36, 37, 38, 39,
793 40, 3, 4, 5, 6, -1, -1, -1, -1, -1,
794 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
795 -1, -1, -1, -1, 26, 27, 28, 29, 30, 31,
796 32, 33, -1, 35, 36, 37, 38, 39, 40, 26,
797 27, 28, 29, 30, 31, 32, 33, -1, 35, 36,
798 37, 38, 39, 40, 3, 4, 5, 6, -1, -1,
799 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
800 4, 5, 6, -1, -1, -1, -1, 26, 27, 28,
801 29, 30, 31, 32, 33, -1, 35, 36, 37, 38,
802 39, 40, 26, 27, 28, 29, 30, 31, 32, 33,
803 -1, 35, 36, 37, 38, 39, 40, 3, 4, 5,
804 6, -1, -1, -1, -1, -1, -1, -1, -1, -1,
805 -1, -1, 3, 4, 5, 6, -1, -1, -1, -1,
806 26, 27, 28, 29, 30, 31, 32, 33, -1, 35,
807 36, 37, 38, 39, 40, 26, 27, 28, 29, 30,
808 31, 32, 33, -1, 35, 36, 37, 38, 39, 40,
809 3, 4, 5, 6, -1, -1, -1, -1, -1, -1,
810 -1, -1, -1, -1, -1, 3, 4, 5, 6, -1,
811 -1, -1, -1, 26, 27, 28, 29, 30, 31, 32,
812 33, -1, 35, 36, 37, 38, 39, 40, 26, 27,
813 28, 29, 30, 31, 32, 33, -1, 35, 36, 37,
817 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
819 static const yytype_int8 yystos[] =
821 0, 42, 0, 1, 3, 6, 7, 8, 9, 10,
822 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
823 21, 22, 23, 24, 25, 34, 35, 36, 37, 38,
824 39, 40, 43, 44, 45, 46, 47, 48, 49, 50,
825 51, 52, 3, 32, 53, 37, 32, 3, 33, 33,
826 29, 26, 28, 33, 32, 33, 33, 33, 33, 53,
827 53, 53, 53, 53, 3, 4, 5, 6, 26, 27,
828 28, 29, 30, 31, 32, 33, 35, 36, 37, 38,
829 39, 40, 54, 3, 3, 3, 3, 33, 33, 33,
830 53, 53, 53, 53, 53, 53, 3, 3, 3, 3,
831 3, 27, 30, 28, 53, 3, 3, 3, 3, 3,
832 3, 33, 33, 33, 3, 30, 3, 53, 33, 3,
836 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
837 static const yytype_int8 yyr1[] =
839 0, 41, 42, 42, 43, 43, 43, 43, 43, 43,
840 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
841 43, 43, 43, 43, 43, 43, 43, 44, 44, 44,
842 45, 45, 46, 46, 47, 47, 48, 48, 49, 49,
843 50, 50, 51, 51, 52, 52, 53, 53, 54, 54,
844 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
848 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
849 static const yytype_int8 yyr2[] =
851 0, 2, 0, 2, 2, 4, 3, 6, 8, 3,
852 3, 5, 7, 3, 4, 3, 4, 4, 4, 4,
853 4, 3, 3, 3, 3, 1, 2, 1, 1, 1,
854 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
855 1, 1, 1, 1, 1, 1, 0, 2, 1, 1,
856 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
861 enum { YYENOMEM = -2 };
863 #define yyerrok (yyerrstatus = 0)
864 #define yyclearin (yychar = YYEMPTY)
866 #define YYACCEPT goto yyacceptlab
867 #define YYABORT goto yyabortlab
868 #define YYERROR goto yyerrorlab
869 #define YYNOMEM goto yyexhaustedlab
872 #define YYRECOVERING() (!!yyerrstatus)
874 #define YYBACKUP(Token, Value) \
876 if (yychar == YYEMPTY) \
880 YYPOPSTACK (yylen); \
886 yyerror (yyscanner, YY_("syntax error: cannot back up")); \
891 /* Backward compatibility with an undocumented macro.
892 Use YYerror or YYUNDEF. */
893 #define YYERRCODE YYUNDEF
896 /* Enable debugging if requested. */
900 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
901 # define YYFPRINTF fprintf
904 # define YYDPRINTF(Args) \
913 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
917 YYFPRINTF (stderr, "%s ", Title); \
918 yy_symbol_print (stderr, \
919 Kind, Value, yyscanner); \
920 YYFPRINTF (stderr, "\n"); \
925 /*-----------------------------------.
926 | Print this symbol's value on YYO. |
927 `-----------------------------------*/
930 yy_symbol_value_print (FILE *yyo,
931 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, yyscan_t yyscanner)
933 FILE *yyoutput = yyo;
938 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
940 YY_IGNORE_MAYBE_UNINITIALIZED_END
944 /*---------------------------.
945 | Print this symbol on YYO. |
946 `---------------------------*/
949 yy_symbol_print (FILE *yyo,
950 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, yyscan_t yyscanner)
952 YYFPRINTF (yyo, "%s %s (",
953 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
955 yy_symbol_value_print (yyo, yykind, yyvaluep, yyscanner);
956 YYFPRINTF (yyo, ")");
959 /*------------------------------------------------------------------.
960 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
962 `------------------------------------------------------------------*/
965 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
967 YYFPRINTF (stderr, "Stack now");
968 for (; yybottom <= yytop; yybottom++)
970 int yybot = *yybottom;
971 YYFPRINTF (stderr, " %d", yybot);
973 YYFPRINTF (stderr, "\n");
976 # define YY_STACK_PRINT(Bottom, Top) \
979 yy_stack_print ((Bottom), (Top)); \
983 /*------------------------------------------------.
984 | Report that the YYRULE is going to be reduced. |
985 `------------------------------------------------*/
988 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
989 int yyrule, yyscan_t yyscanner)
991 int yylno = yyrline[yyrule];
992 int yynrhs = yyr2[yyrule];
994 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
996 /* The symbols being reduced. */
997 for (yyi = 0; yyi < yynrhs; yyi++)
999 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1000 yy_symbol_print (stderr,
1001 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1002 &yyvsp[(yyi + 1) - (yynrhs)], yyscanner);
1003 YYFPRINTF (stderr, "\n");
1007 # define YY_REDUCE_PRINT(Rule) \
1010 yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \
1013 /* Nonzero means print parse trace. It is left uninitialized so that
1014 multiple parsers can coexist. */
1016 #else /* !YYDEBUG */
1017 # define YYDPRINTF(Args) ((void) 0)
1018 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1019 # define YY_STACK_PRINT(Bottom, Top)
1020 # define YY_REDUCE_PRINT(Rule)
1021 #endif /* !YYDEBUG */
1024 /* YYINITDEPTH -- initial size of the parser's stacks. */
1026 # define YYINITDEPTH 200
1029 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1030 if the built-in stack extension method is used).
1032 Do not make this value too large; the results are undefined if
1033 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1034 evaluated with infinite-precision integer arithmetic. */
1037 # define YYMAXDEPTH 10000
1041 /* Context of a parse error. */
1045 yysymbol_kind_t yytoken;
1048 /* Put in YYARG at most YYARGN of the expected tokens given the
1049 current YYCTX, and return the number of tokens stored in YYARG. If
1050 YYARG is null, return the number of expected tokens (guaranteed to
1051 be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
1052 Return 0 if there are more than YYARGN expected tokens, yet fill
1053 YYARG up to YYARGN. */
1055 yypcontext_expected_tokens (const yypcontext_t *yyctx,
1056 yysymbol_kind_t yyarg[], int yyargn)
1058 /* Actual size of YYARG. */
1060 int yyn = yypact[+*yyctx->yyssp];
1061 if (!yypact_value_is_default (yyn))
1063 /* Start YYX at -YYN if negative to avoid negative indexes in
1064 YYCHECK. In other words, skip the first -YYN actions for
1065 this state because they are default actions. */
1066 int yyxbegin = yyn < 0 ? -yyn : 0;
1067 /* Stay within bounds of both yycheck and yytname. */
1068 int yychecklim = YYLAST - yyn + 1;
1069 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1071 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1072 if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
1073 && !yytable_value_is_error (yytable[yyx + yyn]))
1077 else if (yycount == yyargn)
1080 yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
1083 if (yyarg && yycount == 0 && 0 < yyargn)
1084 yyarg[0] = YYSYMBOL_YYEMPTY;
1092 # if defined __GLIBC__ && defined _STRING_H
1093 # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
1095 /* Return the length of YYSTR. */
1097 yystrlen (const char *yystr)
1100 for (yylen = 0; yystr[yylen]; yylen++)
1108 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1109 # define yystpcpy stpcpy
1111 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1114 yystpcpy (char *yydest, const char *yysrc)
1117 const char *yys = yysrc;
1119 while ((*yyd++ = *yys++) != '\0')
1128 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1129 quotes and backslashes, so that it's suitable for yyerror. The
1130 heuristic is that double-quoting is unnecessary unless the string
1131 contains an apostrophe, a comma, or backslash (other than
1132 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1133 null, do not copy; instead, return the length of what the result
1136 yytnamerr (char *yyres, const char *yystr)
1140 YYPTRDIFF_T yyn = 0;
1141 char const *yyp = yystr;
1147 goto do_not_strip_quotes;
1151 goto do_not_strip_quotes;
1167 do_not_strip_quotes: ;
1171 return yystpcpy (yyres, yystr) - yyres;
1173 return yystrlen (yystr);
1179 yy_syntax_error_arguments (const yypcontext_t *yyctx,
1180 yysymbol_kind_t yyarg[], int yyargn)
1182 /* Actual size of YYARG. */
1184 /* There are many possibilities here to consider:
1185 - If this state is a consistent state with a default action, then
1186 the only way this function was invoked is if the default action
1187 is an error action. In that case, don't check for expected
1188 tokens because there are none.
1189 - The only way there can be no lookahead present (in yychar) is if
1190 this state is a consistent state with a default action. Thus,
1191 detecting the absence of a lookahead is sufficient to determine
1192 that there is no unexpected or expected token to report. In that
1193 case, just report a simple "syntax error".
1194 - Don't assume there isn't a lookahead just because this state is a
1195 consistent state with a default action. There might have been a
1196 previous inconsistent state, consistent state with a non-default
1197 action, or user semantic action that manipulated yychar.
1198 - Of course, the expected token list depends on states to have
1199 correct lookahead information, and it depends on the parser not
1200 to perform extra reductions after fetching a lookahead from the
1201 scanner and before detecting a syntax error. Thus, state merging
1202 (from LALR or IELR) and default reductions corrupt the expected
1203 token list. However, the list is correct for canonical LR with
1204 one exception: it will still contain any token that will not be
1205 accepted due to an error action in a later state.
1207 if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
1211 yyarg[yycount] = yyctx->yytoken;
1213 yyn = yypcontext_expected_tokens (yyctx,
1214 yyarg ? yyarg + 1 : yyarg, yyargn - 1);
1215 if (yyn == YYENOMEM)
1223 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1224 about the unexpected token YYTOKEN for the state stack whose top is
1227 Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
1228 not large enough to hold the message. In that case, also set
1229 *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
1230 required number of bytes is too large to store. */
1232 yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
1233 const yypcontext_t *yyctx)
1235 enum { YYARGS_MAX = 5 };
1236 /* Internationalized format string. */
1237 const char *yyformat = YY_NULLPTR;
1238 /* Arguments of yyformat: reported tokens (one for the "unexpected",
1239 one per "expected"). */
1240 yysymbol_kind_t yyarg[YYARGS_MAX];
1241 /* Cumulated lengths of YYARG. */
1242 YYPTRDIFF_T yysize = 0;
1244 /* Actual size of YYARG. */
1245 int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
1246 if (yycount == YYENOMEM)
1251 #define YYCASE_(N, S) \
1255 default: /* Avoid compiler warnings. */
1256 YYCASE_(0, YY_("syntax error"));
1257 YYCASE_(1, YY_("syntax error, unexpected %s"));
1258 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1259 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1260 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1261 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1265 /* Compute error message size. Don't count the "%s"s, but reserve
1266 room for the terminator. */
1267 yysize = yystrlen (yyformat) - 2 * yycount + 1;
1270 for (yyi = 0; yyi < yycount; ++yyi)
1273 = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
1274 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1281 if (*yymsg_alloc < yysize)
1283 *yymsg_alloc = 2 * yysize;
1284 if (! (yysize <= *yymsg_alloc
1285 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1286 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1290 /* Avoid sprintf, as that infringes on the user's name space.
1291 Don't have undefined behavior even if the translation
1292 produced a string with the wrong number of "%s"s. */
1296 while ((*yyp = *yyformat) != '\0')
1297 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1299 yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
1312 /*-----------------------------------------------.
1313 | Release the memory associated to this symbol. |
1314 `-----------------------------------------------*/
1317 yydestruct (const char *yymsg,
1318 yysymbol_kind_t yykind, YYSTYPE *yyvaluep, yyscan_t yyscanner)
1324 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
1326 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1329 case YYSYMBOL_STRING: /* STRING */
1330 #line 100 "cmFortranParser.y"
1331 { free(((*yyvaluep).string)); }
1332 #line 1333 "cmFortranParser.cxx"
1335 case YYSYMBOL_WORD: /* WORD */
1336 #line 100 "cmFortranParser.y"
1337 { free(((*yyvaluep).string)); }
1338 #line 1339 "cmFortranParser.cxx"
1341 case YYSYMBOL_CPP_INCLUDE_ANGLE: /* CPP_INCLUDE_ANGLE */
1342 #line 100 "cmFortranParser.y"
1343 { free(((*yyvaluep).string)); }
1344 #line 1345 "cmFortranParser.cxx"
1350 YY_IGNORE_MAYBE_UNINITIALIZED_END
1363 yyparse (yyscan_t yyscanner)
1365 /* Lookahead token kind. */
1369 /* The semantic value of the lookahead symbol. */
1370 /* Default value used for initialization, for pacifying older GCCs
1371 or non-GCC compilers. */
1372 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1373 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1375 /* Number of syntax errors so far. */
1378 yy_state_fast_t yystate = 0;
1379 /* Number of tokens to shift before error messages enabled. */
1380 int yyerrstatus = 0;
1382 /* Refer to the stacks through separate pointers, to allow yyoverflow
1383 to reallocate them elsewhere. */
1386 YYPTRDIFF_T yystacksize = YYINITDEPTH;
1388 /* The state stack: array, bottom, top. */
1389 yy_state_t yyssa[YYINITDEPTH];
1390 yy_state_t *yyss = yyssa;
1391 yy_state_t *yyssp = yyss;
1393 /* The semantic value stack: array, bottom, top. */
1394 YYSTYPE yyvsa[YYINITDEPTH];
1395 YYSTYPE *yyvs = yyvsa;
1396 YYSTYPE *yyvsp = yyvs;
1399 /* The return value of yyparse. */
1401 /* Lookahead symbol kind. */
1402 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
1403 /* The variables used to return semantic value and location from the
1407 /* Buffer for error messages, and its allocated size. */
1409 char *yymsg = yymsgbuf;
1410 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
1412 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1414 /* The number of symbols on the RHS of the reduced rule.
1415 Keep to zero when no symbol should be popped. */
1418 YYDPRINTF ((stderr, "Starting parse\n"));
1420 yychar = YYEMPTY; /* Cause a token to be read. */
1425 /*------------------------------------------------------------.
1426 | yynewstate -- push a new state, which is found in yystate. |
1427 `------------------------------------------------------------*/
1429 /* In all cases, when you get here, the value and location stacks
1430 have just been pushed. So pushing a state here evens the stacks. */
1434 /*--------------------------------------------------------------------.
1435 | yysetstate -- set current state (the top of the stack) to yystate. |
1436 `--------------------------------------------------------------------*/
1438 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1439 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1440 YY_IGNORE_USELESS_CAST_BEGIN
1441 *yyssp = YY_CAST (yy_state_t, yystate);
1442 YY_IGNORE_USELESS_CAST_END
1443 YY_STACK_PRINT (yyss, yyssp);
1445 if (yyss + yystacksize - 1 <= yyssp)
1446 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1450 /* Get the current used size of the three stacks, in elements. */
1451 YYPTRDIFF_T yysize = yyssp - yyss + 1;
1453 # if defined yyoverflow
1455 /* Give user a chance to reallocate the stack. Use copies of
1456 these so that the &'s don't force the real ones into
1458 yy_state_t *yyss1 = yyss;
1459 YYSTYPE *yyvs1 = yyvs;
1461 /* Each stack pointer address is followed by the size of the
1462 data in use in that stack, in bytes. This used to be a
1463 conditional around just the two extra args, but that might
1464 be undefined if yyoverflow is a macro. */
1465 yyoverflow (YY_("memory exhausted"),
1466 &yyss1, yysize * YYSIZEOF (*yyssp),
1467 &yyvs1, yysize * YYSIZEOF (*yyvsp),
1472 # else /* defined YYSTACK_RELOCATE */
1473 /* Extend the stack our own way. */
1474 if (YYMAXDEPTH <= yystacksize)
1477 if (YYMAXDEPTH < yystacksize)
1478 yystacksize = YYMAXDEPTH;
1481 yy_state_t *yyss1 = yyss;
1482 union yyalloc *yyptr =
1483 YY_CAST (union yyalloc *,
1484 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1487 YYSTACK_RELOCATE (yyss_alloc, yyss);
1488 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1489 # undef YYSTACK_RELOCATE
1491 YYSTACK_FREE (yyss1);
1495 yyssp = yyss + yysize - 1;
1496 yyvsp = yyvs + yysize - 1;
1498 YY_IGNORE_USELESS_CAST_BEGIN
1499 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1500 YY_CAST (long, yystacksize)));
1501 YY_IGNORE_USELESS_CAST_END
1503 if (yyss + yystacksize - 1 <= yyssp)
1506 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1509 if (yystate == YYFINAL)
1519 /* Do appropriate processing given the current state. Read a
1520 lookahead token if we need one and don't already have one. */
1522 /* First try to decide what to do without reference to lookahead token. */
1523 yyn = yypact[yystate];
1524 if (yypact_value_is_default (yyn))
1527 /* Not known => get a lookahead token if don't already have one. */
1529 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
1530 if (yychar == YYEMPTY)
1532 YYDPRINTF ((stderr, "Reading a token\n"));
1533 yychar = yylex (&yylval, yyscanner);
1536 if (yychar <= YYEOF)
1539 yytoken = YYSYMBOL_YYEOF;
1540 YYDPRINTF ((stderr, "Now at end of input.\n"));
1542 else if (yychar == YYerror)
1544 /* The scanner already issued an error message, process directly
1545 to error recovery. But do not keep the error token as
1546 lookahead, it is too special and may lead us to an endless
1547 loop in error recovery. */
1549 yytoken = YYSYMBOL_YYerror;
1554 yytoken = YYTRANSLATE (yychar);
1555 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1558 /* If the proper action on seeing token YYTOKEN is to reduce or to
1559 detect an error, take that action. */
1561 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1566 if (yytable_value_is_error (yyn))
1572 /* Count tokens shifted since error; after three, turn off error
1577 /* Shift the lookahead token. */
1578 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1580 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1582 YY_IGNORE_MAYBE_UNINITIALIZED_END
1584 /* Discard the shifted token. */
1589 /*-----------------------------------------------------------.
1590 | yydefault -- do the default action for the current state. |
1591 `-----------------------------------------------------------*/
1593 yyn = yydefact[yystate];
1599 /*-----------------------------.
1600 | yyreduce -- do a reduction. |
1601 `-----------------------------*/
1603 /* yyn is the number of a rule to reduce with. */
1606 /* If YYLEN is nonzero, implement the default value of the action:
1609 Otherwise, the following line sets YYVAL to garbage.
1610 This behavior is undocumented and Bison
1611 users should not rely upon it. Assigning to YYVAL
1612 unconditionally makes the parser a bit smaller, and it avoids a
1613 GCC warning that YYVAL may be used uninitialized. */
1614 yyval = yyvsp[1-yylen];
1617 YY_REDUCE_PRINT (yyn);
1620 case 4: /* stmt: INTERFACE EOSTMT */
1621 #line 109 "cmFortranParser.y"
1623 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1624 cmFortranParser_SetInInterface(parser, true);
1626 #line 1627 "cmFortranParser.cxx"
1629 case 5: /* stmt: USE WORD other EOSTMT */
1630 #line 113 "cmFortranParser.y"
1632 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1633 cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
1634 free((yyvsp[-2].string));
1636 #line 1637 "cmFortranParser.cxx"
1639 case 6: /* stmt: MODULE WORD EOSTMT */
1640 #line 118 "cmFortranParser.y"
1642 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1643 cmFortranParser_RuleModule(parser, (yyvsp[-1].string));
1644 free((yyvsp[-1].string));
1646 #line 1647 "cmFortranParser.cxx"
1649 case 7: /* stmt: SUBMODULE LPAREN WORD RPAREN WORD EOSTMT */
1650 #line 123 "cmFortranParser.y"
1652 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1653 cmFortranParser_RuleSubmodule(parser, (yyvsp[-3].string), (yyvsp[-1].string));
1654 free((yyvsp[-3].string));
1655 free((yyvsp[-1].string));
1657 #line 1658 "cmFortranParser.cxx"
1660 case 8: /* stmt: SUBMODULE LPAREN WORD COLON WORD RPAREN WORD EOSTMT */
1661 #line 129 "cmFortranParser.y"
1663 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1664 cmFortranParser_RuleSubmoduleNested(parser, (yyvsp[-5].string), (yyvsp[-3].string), (yyvsp[-1].string));
1665 free((yyvsp[-5].string));
1666 free((yyvsp[-3].string));
1667 free((yyvsp[-1].string));
1669 #line 1670 "cmFortranParser.cxx"
1672 case 9: /* stmt: INTERFACE WORD EOSTMT */
1673 #line 136 "cmFortranParser.y"
1675 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1676 cmFortranParser_SetInInterface(parser, true);
1677 free((yyvsp[-1].string));
1679 #line 1680 "cmFortranParser.cxx"
1682 case 10: /* stmt: END INTERFACE EOSTMT */
1683 #line 141 "cmFortranParser.y"
1685 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1686 cmFortranParser_SetInInterface(parser, false);
1688 #line 1689 "cmFortranParser.cxx"
1691 case 11: /* stmt: USE DCOLON WORD other EOSTMT */
1692 #line 145 "cmFortranParser.y"
1694 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1695 cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
1696 free((yyvsp[-2].string));
1698 #line 1699 "cmFortranParser.cxx"
1701 case 12: /* stmt: USE COMMA WORD DCOLON WORD other EOSTMT */
1702 #line 150 "cmFortranParser.y"
1704 if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) {
1705 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1706 cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
1708 if (cmsysString_strcasecmp((yyvsp[-4].string), "intrinsic") == 0) {
1709 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1710 cmFortranParser_RuleUseIntrinsic(parser, (yyvsp[-2].string));
1712 free((yyvsp[-4].string));
1713 free((yyvsp[-2].string));
1715 #line 1716 "cmFortranParser.cxx"
1718 case 13: /* stmt: INCLUDE STRING EOSTMT */
1719 #line 162 "cmFortranParser.y"
1721 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1722 cmFortranParser_RuleInclude(parser, (yyvsp[-1].string));
1723 free((yyvsp[-1].string));
1725 #line 1726 "cmFortranParser.cxx"
1728 case 14: /* stmt: CPP_LINE_DIRECTIVE STRING other EOSTMT */
1729 #line 167 "cmFortranParser.y"
1731 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1732 cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string));
1733 free((yyvsp[-2].string));
1735 #line 1736 "cmFortranParser.cxx"
1738 case 15: /* stmt: CPP_INCLUDE_ANGLE other EOSTMT */
1739 #line 172 "cmFortranParser.y"
1741 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1742 cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
1743 free((yyvsp[-2].string));
1745 #line 1746 "cmFortranParser.cxx"
1748 case 16: /* stmt: include STRING other EOSTMT */
1749 #line 177 "cmFortranParser.y"
1751 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1752 cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
1753 free((yyvsp[-2].string));
1755 #line 1756 "cmFortranParser.cxx"
1758 case 17: /* stmt: define WORD other EOSTMT */
1759 #line 182 "cmFortranParser.y"
1761 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1762 cmFortranParser_RuleDefine(parser, (yyvsp[-2].string));
1763 free((yyvsp[-2].string));
1765 #line 1766 "cmFortranParser.cxx"
1768 case 18: /* stmt: undef WORD other EOSTMT */
1769 #line 187 "cmFortranParser.y"
1771 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1772 cmFortranParser_RuleUndef(parser, (yyvsp[-2].string));
1773 free((yyvsp[-2].string));
1775 #line 1776 "cmFortranParser.cxx"
1778 case 19: /* stmt: ifdef WORD other EOSTMT */
1779 #line 192 "cmFortranParser.y"
1781 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1782 cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string));
1783 free((yyvsp[-2].string));
1785 #line 1786 "cmFortranParser.cxx"
1788 case 20: /* stmt: ifndef WORD other EOSTMT */
1789 #line 197 "cmFortranParser.y"
1791 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1792 cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string));
1793 free((yyvsp[-2].string));
1795 #line 1796 "cmFortranParser.cxx"
1798 case 21: /* stmt: if other EOSTMT */
1799 #line 202 "cmFortranParser.y"
1801 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1802 cmFortranParser_RuleIf(parser);
1804 #line 1805 "cmFortranParser.cxx"
1807 case 22: /* stmt: elif other EOSTMT */
1808 #line 206 "cmFortranParser.y"
1810 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1811 cmFortranParser_RuleElif(parser);
1813 #line 1814 "cmFortranParser.cxx"
1816 case 23: /* stmt: else other EOSTMT */
1817 #line 210 "cmFortranParser.y"
1819 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1820 cmFortranParser_RuleElse(parser);
1822 #line 1823 "cmFortranParser.cxx"
1825 case 24: /* stmt: endif other EOSTMT */
1826 #line 214 "cmFortranParser.y"
1828 cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
1829 cmFortranParser_RuleEndif(parser);
1831 #line 1832 "cmFortranParser.cxx"
1834 case 48: /* misc_code: WORD */
1835 #line 236 "cmFortranParser.y"
1836 { free ((yyvsp[0].string)); }
1837 #line 1838 "cmFortranParser.cxx"
1840 case 55: /* misc_code: STRING */
1841 #line 243 "cmFortranParser.y"
1842 { free ((yyvsp[0].string)); }
1843 #line 1844 "cmFortranParser.cxx"
1847 #line 1848 "cmFortranParser.cxx"
1851 /* User semantic actions sometimes alter yychar, and that requires
1852 that yytoken be updated with the new translation. We take the
1853 approach of translating immediately before every use of yytoken.
1854 One alternative is translating here after every semantic action,
1855 but that translation would be missed if the semantic action invokes
1856 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1857 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1858 incorrect destructor might then be invoked immediately. In the
1859 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1860 to an incorrect destructor call or verbose syntax error message
1861 before the lookahead is translated. */
1862 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1869 /* Now 'shift' the result of the reduction. Determine what state
1870 that goes to, based on the state we popped back to and the rule
1871 number reduced by. */
1873 const int yylhs = yyr1[yyn] - YYNTOKENS;
1874 const int yyi = yypgoto[yylhs] + *yyssp;
1875 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1877 : yydefgoto[yylhs]);
1883 /*--------------------------------------.
1884 | yyerrlab -- here on detecting error. |
1885 `--------------------------------------*/
1887 /* Make sure we have latest lookahead translation. See comments at
1888 user semantic actions for why this is necessary. */
1889 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1890 /* If not already recovering from an error, report this error. */
1897 char const *yymsgp = YY_("syntax error");
1898 int yysyntax_error_status;
1899 yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
1900 if (yysyntax_error_status == 0)
1902 else if (yysyntax_error_status == -1)
1904 if (yymsg != yymsgbuf)
1905 YYSTACK_FREE (yymsg);
1906 yymsg = YY_CAST (char *,
1907 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
1910 yysyntax_error_status
1911 = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
1917 yymsg_alloc = sizeof yymsgbuf;
1918 yysyntax_error_status = YYENOMEM;
1921 yyerror (yyscanner, yymsgp);
1922 if (yysyntax_error_status == YYENOMEM)
1927 if (yyerrstatus == 3)
1929 /* If just tried and failed to reuse lookahead token after an
1930 error, discard it. */
1932 if (yychar <= YYEOF)
1934 /* Return failure if at end of input. */
1935 if (yychar == YYEOF)
1940 yydestruct ("Error: discarding",
1941 yytoken, &yylval, yyscanner);
1946 /* Else will try to reuse lookahead token after shifting the error
1951 /*---------------------------------------------------.
1952 | yyerrorlab -- error raised explicitly by YYERROR. |
1953 `---------------------------------------------------*/
1955 /* Pacify compilers when the user code never invokes YYERROR and the
1956 label yyerrorlab therefore never appears in user code. */
1961 /* Do not reclaim the symbols of the rule whose action triggered
1965 YY_STACK_PRINT (yyss, yyssp);
1970 /*-------------------------------------------------------------.
1971 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1972 `-------------------------------------------------------------*/
1974 yyerrstatus = 3; /* Each real token shifted decrements this. */
1976 /* Pop stack until we find a state that shifts the error token. */
1979 yyn = yypact[yystate];
1980 if (!yypact_value_is_default (yyn))
1982 yyn += YYSYMBOL_YYerror;
1983 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
1991 /* Pop the current state because it cannot handle the error token. */
1996 yydestruct ("Error: popping",
1997 YY_ACCESSING_SYMBOL (yystate), yyvsp, yyscanner);
2000 YY_STACK_PRINT (yyss, yyssp);
2003 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2005 YY_IGNORE_MAYBE_UNINITIALIZED_END
2008 /* Shift the error token. */
2009 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
2015 /*-------------------------------------.
2016 | yyacceptlab -- YYACCEPT comes here. |
2017 `-------------------------------------*/
2023 /*-----------------------------------.
2024 | yyabortlab -- YYABORT comes here. |
2025 `-----------------------------------*/
2031 /*-----------------------------------------------------------.
2032 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
2033 `-----------------------------------------------------------*/
2035 yyerror (yyscanner, YY_("memory exhausted"));
2040 /*----------------------------------------------------------.
2041 | yyreturnlab -- parsing is finished, clean up and return. |
2042 `----------------------------------------------------------*/
2044 if (yychar != YYEMPTY)
2046 /* Make sure we have latest lookahead translation. See comments at
2047 user semantic actions for why this is necessary. */
2048 yytoken = YYTRANSLATE (yychar);
2049 yydestruct ("Cleanup: discarding lookahead",
2050 yytoken, &yylval, yyscanner);
2052 /* Do not reclaim the symbols of the rule whose action triggered
2053 this YYABORT or YYACCEPT. */
2055 YY_STACK_PRINT (yyss, yyssp);
2056 while (yyssp != yyss)
2058 yydestruct ("Cleanup: popping",
2059 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yyscanner);
2064 YYSTACK_FREE (yyss);
2066 if (yymsg != yymsgbuf)
2067 YYSTACK_FREE (yymsg);
2071 #line 255 "cmFortranParser.y"
2073 /* End of grammar */