1 /* A Bison parser, made by GNU Bison 2.3. */
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 2, or (at your option)
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, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
61 /* Substitute the variable and function names. */
62 #define yyparse cmDependsFortran_yyparse
63 #define yylex cmDependsFortran_yylex
64 #define yyerror cmDependsFortran_yyerror
65 #define yylval cmDependsFortran_yylval
66 #define yychar cmDependsFortran_yychar
67 #define yydebug cmDependsFortran_yydebug
68 #define yynerrs cmDependsFortran_yynerrs
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
102 UNTERMINATED_STRING
= 283,
109 #define ASSIGNMENT_OP 259
111 #define CPP_INCLUDE 261
112 #define F90PPR_INCLUDE 262
113 #define COCO_INCLUDE 263
114 #define F90PPR_DEFINE 264
115 #define CPP_DEFINE 265
116 #define F90PPR_UNDEF 266
117 #define CPP_UNDEF 267
118 #define CPP_IFDEF 268
119 #define CPP_IFNDEF 269
123 #define CPP_ENDIF 273
124 #define F90PPR_IFDEF 274
125 #define F90PPR_IFNDEF 275
126 #define F90PPR_IF 276
127 #define F90PPR_ELSE 277
128 #define F90PPR_ELIF 278
129 #define F90PPR_ENDIF 279
132 #define CPP_TOENDL 282
133 #define UNTERMINATED_STRING 283
140 /* Copy the first part of user declarations. */
141 #line 1 "cmDependsFortranParser.y"
143 /*=========================================================================
145 Program: CMake - Cross-Platform Makefile Generator
146 Module: $RCSfile: cmDependsFortranParser.cxx,v $
148 Date: $Date: 2009-02-17 16:53:57 $
149 Version: $Revision: 1.19 $
151 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
152 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
154 This software is distributed WITHOUT ANY WARRANTY; without even
155 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
156 PURPOSE. See the above copyright notices for more information.
158 =========================================================================*/
159 /*-------------------------------------------------------------------------
160 Portions of this source have been derived from makedepf90 version 2.8.8,
162 Copyright (C) 2000--2006 Erik Edelmann <erik.edelmann@iki.fi>
164 The code was originally distributed under the GPL but permission
165 from the copyright holder has been obtained to distribute this
166 derived work under the CMake license.
167 -------------------------------------------------------------------------*/
171 This file must be translated to C and modified to build everywhere.
175 bison --yacc --name-prefix=cmDependsFortran_yy
176 --defines=cmDependsFortranParserTokens.h
177 -ocmDependsFortranParser.cxx
178 cmDependsFortranParser.y
180 Modify cmDependsFortranParser.cxx:
182 - Remove the yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"]
185 /*-------------------------------------------------------------------------*/
186 #define cmDependsFortranParser_cxx
187 #include "cmDependsFortranParser.h" /* Interface to parser object. */
188 #include "cmDependsFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */
190 /* Configure the parser to use a lexer object. */
191 #define YYPARSE_PARAM yyscanner
192 #define YYLEX_PARAM yyscanner
193 #define YYERROR_VERBOSE 1
194 #define cmDependsFortran_yyerror(x) \
195 cmDependsFortranError(yyscanner, x)
197 /* Forward declare the lexer entry point. */
200 /* Helper function to forward error callback. */
201 static void cmDependsFortranError(yyscan_t yyscanner
, const char* message
)
203 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
204 cmDependsFortranParser_Error(parser
, message
);
207 static char charmap
[] = {
208 '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
209 '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
210 '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
211 '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
212 '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
213 '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
214 '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
215 '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
216 '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
217 '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
218 '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
219 '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
220 '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
221 '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
222 '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
223 '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
224 '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
225 '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
226 '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
227 '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
228 '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
229 '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
230 '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
231 '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
232 '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
233 '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
234 '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
235 '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
236 '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
237 '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
238 '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
239 '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
242 inline int strcasecmpCM(const char *s1
, const char *s2
)
244 const char *cm
= charmap
;
245 unsigned char const* us1
= reinterpret_cast<unsigned char const*>(s1
);
246 unsigned char const* us2
= reinterpret_cast<unsigned char const*>(s2
);
248 while(cm
[*us1
] == cm
[*us2
++])
253 return(cm
[*us1
] - cm
[*--us2
]);
256 static bool cmDependsFortranParserIsKeyword(const char* word
,
259 return strcasecmpCM(word
, keyword
) == 0;
262 /* Disable some warnings in the generated code. */
264 # pragma warn -8004 /* Variable assigned a value that is not used. */
265 # pragma warn -8008 /* condition always returns true */
266 # pragma warn -8060 /* possibly incorrect assignment */
267 # pragma warn -8066 /* unreachable code */
270 # pragma warning (disable: 4102) /* Unused goto label. */
271 # pragma warning (disable: 4065) /* Switch contains default but no case. */
272 # pragma warning (disable: 4701) /* Local variable may not be initialized. */
273 # pragma warning (disable: 4702) /* Unreachable code. */
274 # pragma warning (disable: 4127) /* Conditional expression is constant. */
275 # pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */
279 /* Enabling traces. */
284 /* Enabling verbose error messages. */
285 #ifdef YYERROR_VERBOSE
286 # undef YYERROR_VERBOSE
287 # define YYERROR_VERBOSE 1
289 # define YYERROR_VERBOSE 0
292 /* Enabling the token table. */
293 #ifndef YYTOKEN_TABLE
294 # define YYTOKEN_TABLE 0
297 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
298 typedef union YYSTYPE
299 #line 141 "cmDependsFortranParser.y"
303 /* Line 187 of yacc.c. */
304 #line 305 "cmDependsFortranParser.cxx"
306 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
307 # define YYSTYPE_IS_DECLARED 1
308 # define YYSTYPE_IS_TRIVIAL 1
313 /* Copy the second part of user declarations. */
316 /* Line 216 of yacc.c. */
317 #line 318 "cmDependsFortranParser.cxx"
324 typedef YYTYPE_UINT8 yytype_uint8
;
326 typedef unsigned char yytype_uint8
;
330 typedef YYTYPE_INT8 yytype_int8
;
331 #elif (defined __STDC__ || defined __C99__FUNC__ \
332 || defined __cplusplus || defined _MSC_VER)
333 typedef signed char yytype_int8
;
335 typedef short int yytype_int8
;
339 typedef YYTYPE_UINT16 yytype_uint16
;
341 typedef unsigned short int yytype_uint16
;
345 typedef YYTYPE_INT16 yytype_int16
;
347 typedef short int yytype_int16
;
351 # ifdef __SIZE_TYPE__
352 # define YYSIZE_T __SIZE_TYPE__
353 # elif defined size_t
354 # define YYSIZE_T size_t
355 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
356 || defined __cplusplus || defined _MSC_VER)
357 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
358 # define YYSIZE_T size_t
360 # define YYSIZE_T unsigned int
364 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
369 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
370 # define YY_(msgid) dgettext ("bison-runtime", msgid)
374 # define YY_(msgid) msgid
378 /* Suppress unused-variable warnings by "using" E. */
379 #if ! defined lint || defined __GNUC__
380 # define YYUSE(e) ((void) (e))
382 # define YYUSE(e) /* empty */
385 /* Identity function, used to suppress warnings about constant conditions. */
389 #if (defined __STDC__ || defined __C99__FUNC__ \
390 || defined __cplusplus || defined _MSC_VER)
403 #if ! defined yyoverflow || YYERROR_VERBOSE
405 /* The parser invokes alloca or malloc; define the necessary symbols. */
407 # ifdef YYSTACK_USE_ALLOCA
408 # if YYSTACK_USE_ALLOCA
410 # define YYSTACK_ALLOC __builtin_alloca
411 # elif defined __BUILTIN_VA_ARG_INCR
412 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
414 # define YYSTACK_ALLOC __alloca
415 # elif defined _MSC_VER
416 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
417 # define alloca _alloca
419 # define YYSTACK_ALLOC alloca
420 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
421 || defined __cplusplus || defined _MSC_VER)
422 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
431 # ifdef YYSTACK_ALLOC
432 /* Pacify GCC's `empty if-body' warning. */
433 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
434 # ifndef YYSTACK_ALLOC_MAXIMUM
435 /* The OS might guarantee only one guard page at the bottom of the stack,
436 and a page size can be as small as 4096 bytes. So we cannot safely
437 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
438 to allow for a few compiler-allocated temporary stack slots. */
439 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
442 # define YYSTACK_ALLOC YYMALLOC
443 # define YYSTACK_FREE YYFREE
444 # ifndef YYSTACK_ALLOC_MAXIMUM
445 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
447 # if (defined __cplusplus && ! defined _STDLIB_H \
448 && ! ((defined YYMALLOC || defined malloc) \
449 && (defined YYFREE || defined free)))
450 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
456 # define YYMALLOC malloc
457 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
458 || defined __cplusplus || defined _MSC_VER)
459 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
464 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
465 || defined __cplusplus || defined _MSC_VER)
466 void free (void *); /* INFRINGES ON USER NAME SPACE */
470 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
473 #if (! defined yyoverflow \
474 && (! defined __cplusplus \
475 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
477 /* A type that is properly aligned for any stack member. */
484 /* The size of the maximum gap between one aligned stack and the next. */
485 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
487 /* The size of an array large to enough to hold all stacks, each with
489 # define YYSTACK_BYTES(N) \
490 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
491 + YYSTACK_GAP_MAXIMUM)
493 /* Copy COUNT objects from FROM to TO. The source and destination do
496 # if defined __GNUC__ && 1 < __GNUC__
497 # define YYCOPY(To, From, Count) \
498 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
500 # define YYCOPY(To, From, Count) \
504 for (yyi = 0; yyi < (Count); yyi++) \
505 (To)[yyi] = (From)[yyi]; \
511 /* Relocate STACK from its old location to the new one. The
512 local variables YYSIZE and YYSTACKSIZE give the old and new number of
513 elements in the stack, and YYPTR gives the new location of the
514 stack. Advance YYPTR to a properly aligned location for the next
516 # define YYSTACK_RELOCATE(Stack) \
519 YYSIZE_T yynewbytes; \
520 YYCOPY (&yyptr->Stack, Stack, yysize); \
521 Stack = &yyptr->Stack; \
522 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
523 yyptr += yynewbytes / sizeof (*yyptr); \
529 /* YYFINAL -- State number of the termination state. */
531 /* YYLAST -- Last index in YYTABLE. */
534 /* YYNTOKENS -- Number of terminals. */
536 /* YYNNTS -- Number of nonterminals. */
538 /* YYNRULES -- Number of rules. */
540 /* YYNRULES -- Number of states. */
543 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
545 #define YYMAXUTOK 285
547 #define YYTRANSLATE(YYX) \
548 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
550 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
551 static const yytype_uint8 yytranslate
[] =
553 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
571 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
572 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
573 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
574 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
575 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
579 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
580 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
581 25, 26, 27, 28, 29, 30
585 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
587 static const yytype_uint8 yyprhs
[] =
589 0, 0, 3, 4, 7, 9, 11, 16, 19, 24,
590 30, 38, 43, 48, 53, 58, 63, 68, 72, 76,
591 80, 84, 89, 93, 95, 97, 99, 101, 103, 105,
592 107, 109, 111, 113, 115, 117, 119, 121, 123, 125,
593 127, 129, 131, 133, 135, 136, 139, 141, 143, 145,
597 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
598 static const yytype_int8 yyrhs
[] =
600 32, 0, -1, -1, 32, 33, -1, 35, -1, 34,
601 -1, 30, 4, 45, 3, -1, 30, 3, -1, 30,
602 30, 45, 3, -1, 30, 26, 30, 45, 3, -1,
603 30, 25, 30, 26, 30, 45, 3, -1, 30, 29,
604 45, 3, -1, 36, 29, 45, 3, -1, 37, 30,
605 45, 3, -1, 38, 30, 45, 3, -1, 39, 30,
606 45, 3, -1, 40, 30, 45, 3, -1, 41, 45,
607 3, -1, 42, 45, 3, -1, 43, 45, 3, -1,
608 44, 45, 3, -1, 30, 5, 45, 3, -1, 5,
609 45, 3, -1, 3, -1, 1, -1, 6, -1, 7,
610 -1, 8, -1, 10, -1, 9, -1, 12, -1, 11,
611 -1, 13, -1, 19, -1, 14, -1, 20, -1, 15,
612 -1, 21, -1, 17, -1, 23, -1, 16, -1, 22,
613 -1, 18, -1, 24, -1, -1, 45, 46, -1, 30,
614 -1, 29, -1, 5, -1, 4, -1, 26, -1, 25,
618 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
619 static const yytype_uint16 yyrline
[] =
621 0, 162, 162, 162, 164, 164, 166, 172, 182, 212,
622 223, 236, 247, 254, 260, 266, 272, 278, 283, 288,
623 293, 298, 302, 303, 304, 309, 309, 309, 310, 310,
624 311, 311, 312, 312, 313, 313, 314, 314, 315, 315,
625 316, 316, 317, 317, 318, 318, 321, 322, 323, 324,
630 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
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", "error", "$undefined", "EOSTMT", "ASSIGNMENT_OP", "GARBAGE",
636 "CPP_INCLUDE", "F90PPR_INCLUDE", "COCO_INCLUDE", "F90PPR_DEFINE",
637 "CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF",
638 "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF",
639 "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF",
640 "F90PPR_ENDIF", "COMMA", "DCOLON", "CPP_TOENDL", "UNTERMINATED_STRING",
641 "STRING", "WORD", "$accept", "code", "stmt", "assignment_stmt",
642 "keyword_stmt", "include", "define", "undef", "ifdef", "ifndef", "if",
643 "elif", "else", "endif", "other", "misc_code", 0
648 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
650 static const yytype_uint16 yytoknum
[] =
652 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
653 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
654 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
659 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
660 static const yytype_uint8 yyr1
[] =
662 0, 31, 32, 32, 33, 33, 34, 35, 35, 35,
663 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
664 35, 35, 35, 35, 35, 36, 36, 36, 37, 37,
665 38, 38, 39, 39, 40, 40, 41, 41, 42, 42,
666 43, 43, 44, 44, 45, 45, 46, 46, 46, 46,
670 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
671 static const yytype_uint8 yyr2
[] =
673 0, 2, 0, 2, 1, 1, 4, 2, 4, 5,
674 7, 4, 4, 4, 4, 4, 4, 3, 3, 3,
675 3, 4, 3, 1, 1, 1, 1, 1, 1, 1,
676 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
677 1, 1, 1, 1, 0, 2, 1, 1, 1, 1,
681 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
682 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
683 means the default is an error. */
684 static const yytype_uint8 yydefact
[] =
686 2, 0, 1, 24, 23, 44, 25, 26, 27, 29,
687 28, 31, 30, 32, 34, 36, 40, 38, 42, 33,
688 35, 37, 41, 39, 43, 0, 3, 5, 4, 0,
689 0, 0, 0, 0, 44, 44, 44, 44, 0, 7,
690 44, 44, 0, 0, 44, 44, 44, 44, 44, 44,
691 44, 0, 0, 0, 0, 22, 49, 48, 51, 50,
692 52, 47, 46, 45, 0, 0, 0, 44, 0, 0,
693 0, 0, 0, 0, 0, 17, 18, 19, 20, 6,
694 21, 0, 0, 11, 8, 12, 13, 14, 15, 16,
698 /* YYDEFGOTO[NTERM-NUM]. */
699 static const yytype_int8 yydefgoto
[] =
701 -1, 1, 26, 27, 28, 29, 30, 31, 32, 33,
702 34, 35, 36, 37, 38, 63
705 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
707 #define YYPACT_NINF -35
708 static const yytype_int16 yypact
[] =
710 -35, 29, -35, -35, -35, -35, -35, -35, -35, -35,
711 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
712 -35, -35, -35, -35, -35, 241, -35, -35, -35, -25,
713 -22, -21, -13, -12, -35, -35, -35, -35, 57, -35,
714 -35, -35, -11, -10, -35, -35, -35, -35, -35, -35,
715 -35, 63, 69, 75, 103, -35, -35, -35, -35, -35,
716 -35, -35, -35, -35, 109, 115, -5, -35, 121, 149,
717 155, 161, 167, 195, 201, -35, -35, -35, -35, -35,
718 -35, -8, 207, -35, -35, -35, -35, -35, -35, -35,
722 /* YYPGOTO[NTERM-NUM]. */
723 static const yytype_int8 yypgoto
[] =
725 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
726 -35, -35, -35, -35, -34, -35
729 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
730 positive, shift that token. If negative, reduce the rule which
731 number is the opposite. If zero, do what YYDEFACT says.
732 If YYTABLE_NINF, syntax error. */
733 #define YYTABLE_NINF -1
734 static const yytype_uint8 yytable
[] =
736 51, 52, 53, 54, 46, 0, 64, 65, 47, 48,
737 68, 69, 70, 71, 72, 73, 74, 49, 50, 66,
738 67, 81, 90, 0, 0, 0, 0, 0, 0, 2,
739 3, 0, 4, 82, 5, 6, 7, 8, 9, 10,
740 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
741 21, 22, 23, 24, 0, 0, 92, 0, 0, 25,
742 55, 56, 57, 0, 0, 0, 75, 56, 57, 0,
743 0, 0, 76, 56, 57, 0, 0, 0, 77, 56,
744 57, 0, 58, 59, 0, 60, 61, 62, 58, 59,
745 0, 60, 61, 62, 58, 59, 0, 60, 61, 62,
746 58, 59, 0, 60, 61, 62, 78, 56, 57, 0,
747 0, 0, 79, 56, 57, 0, 0, 0, 80, 56,
748 57, 0, 0, 0, 83, 56, 57, 0, 58, 59,
749 0, 60, 61, 62, 58, 59, 0, 60, 61, 62,
750 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
751 61, 62, 84, 56, 57, 0, 0, 0, 85, 56,
752 57, 0, 0, 0, 86, 56, 57, 0, 0, 0,
753 87, 56, 57, 0, 58, 59, 0, 60, 61, 62,
754 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
755 61, 62, 58, 59, 0, 60, 61, 62, 88, 56,
756 57, 0, 0, 0, 89, 56, 57, 0, 0, 0,
757 91, 56, 57, 0, 0, 0, 93, 56, 57, 0,
758 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
759 61, 62, 58, 59, 0, 60, 61, 62, 58, 59,
760 0, 60, 61, 62, 39, 40, 41, 0, 0, 0,
761 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
762 0, 0, 0, 0, 0, 0, 42, 43, 0, 0,
766 static const yytype_int8 yycheck
[] =
768 34, 35, 36, 37, 29, -1, 40, 41, 30, 30,
769 44, 45, 46, 47, 48, 49, 50, 30, 30, 30,
770 30, 26, 30, -1, -1, -1, -1, -1, -1, 0,
771 1, -1, 3, 67, 5, 6, 7, 8, 9, 10,
772 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
773 21, 22, 23, 24, -1, -1, 90, -1, -1, 30,
774 3, 4, 5, -1, -1, -1, 3, 4, 5, -1,
775 -1, -1, 3, 4, 5, -1, -1, -1, 3, 4,
776 5, -1, 25, 26, -1, 28, 29, 30, 25, 26,
777 -1, 28, 29, 30, 25, 26, -1, 28, 29, 30,
778 25, 26, -1, 28, 29, 30, 3, 4, 5, -1,
779 -1, -1, 3, 4, 5, -1, -1, -1, 3, 4,
780 5, -1, -1, -1, 3, 4, 5, -1, 25, 26,
781 -1, 28, 29, 30, 25, 26, -1, 28, 29, 30,
782 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
783 29, 30, 3, 4, 5, -1, -1, -1, 3, 4,
784 5, -1, -1, -1, 3, 4, 5, -1, -1, -1,
785 3, 4, 5, -1, 25, 26, -1, 28, 29, 30,
786 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
787 29, 30, 25, 26, -1, 28, 29, 30, 3, 4,
788 5, -1, -1, -1, 3, 4, 5, -1, -1, -1,
789 3, 4, 5, -1, -1, -1, 3, 4, 5, -1,
790 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
791 29, 30, 25, 26, -1, 28, 29, 30, 25, 26,
792 -1, 28, 29, 30, 3, 4, 5, -1, -1, -1,
793 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
794 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
798 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
799 symbol of state STATE-NUM. */
800 static const yytype_uint8 yystos
[] =
802 0, 32, 0, 1, 3, 5, 6, 7, 8, 9,
803 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
804 20, 21, 22, 23, 24, 30, 33, 34, 35, 36,
805 37, 38, 39, 40, 41, 42, 43, 44, 45, 3,
806 4, 5, 25, 26, 29, 30, 29, 30, 30, 30,
807 30, 45, 45, 45, 45, 3, 4, 5, 25, 26,
808 28, 29, 30, 46, 45, 45, 30, 30, 45, 45,
809 45, 45, 45, 45, 45, 3, 3, 3, 3, 3,
810 3, 26, 45, 3, 3, 3, 3, 3, 3, 3,
814 #define yyerrok (yyerrstatus = 0)
815 #define yyclearin (yychar = YYEMPTY)
819 #define YYACCEPT goto yyacceptlab
820 #define YYABORT goto yyabortlab
821 #define YYERROR goto yyerrorlab
824 /* Like YYERROR except do call yyerror. This remains here temporarily
825 to ease the transition to the new meaning of YYERROR, for GCC.
826 Once GCC version 2 has supplanted version 1, this can go. */
828 #define YYFAIL goto yyerrlab
830 #define YYRECOVERING() (!!yyerrstatus)
832 #define YYBACKUP(Token, Value) \
834 if (yychar == YYEMPTY && yylen == 1) \
838 yytoken = YYTRANSLATE (yychar); \
844 yyerror (YY_("syntax error: cannot back up")); \
851 #define YYERRCODE 256
854 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
855 If N is 0, then set CURRENT to the empty location which ends
856 the previous symbol: RHS[0] (always defined). */
858 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
859 #ifndef YYLLOC_DEFAULT
860 # define YYLLOC_DEFAULT(Current, Rhs, N) \
864 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
865 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
866 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
867 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
871 (Current).first_line = (Current).last_line = \
872 YYRHSLOC (Rhs, 0).last_line; \
873 (Current).first_column = (Current).last_column = \
874 YYRHSLOC (Rhs, 0).last_column; \
880 /* YY_LOCATION_PRINT -- Print the location on the stream.
881 This macro was not mandated originally: define only if we know
882 we won't break user code: when these are the locations we know. */
884 #ifndef YY_LOCATION_PRINT
885 # if YYLTYPE_IS_TRIVIAL
886 # define YY_LOCATION_PRINT(File, Loc) \
887 fprintf (File, "%d.%d-%d.%d", \
888 (Loc).first_line, (Loc).first_column, \
889 (Loc).last_line, (Loc).last_column)
891 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
896 /* YYLEX -- calling `yylex' with the right arguments. */
899 # define YYLEX yylex (&yylval, YYLEX_PARAM)
901 # define YYLEX yylex (&yylval)
904 /* Enable debugging if requested. */
908 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
909 # define YYFPRINTF fprintf
912 # define YYDPRINTF(Args) \
918 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
922 YYFPRINTF (stderr, "%s ", Title); \
923 yy_symbol_print (stderr, \
925 YYFPRINTF (stderr, "\n"); \
930 /*--------------------------------.
931 | Print this symbol on YYOUTPUT. |
932 `--------------------------------*/
935 #if (defined __STDC__ || defined __C99__FUNC__ \
936 || defined __cplusplus || defined _MSC_VER)
938 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
941 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
944 YYSTYPE
const * const yyvaluep
;
950 if (yytype
< YYNTOKENS
)
951 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
963 /*--------------------------------.
964 | Print this symbol on YYOUTPUT. |
965 `--------------------------------*/
967 #if (defined __STDC__ || defined __C99__FUNC__ \
968 || defined __cplusplus || defined _MSC_VER)
970 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
973 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
976 YYSTYPE
const * const yyvaluep
;
979 if (yytype
< YYNTOKENS
)
980 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
982 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
984 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
985 YYFPRINTF (yyoutput
, ")");
988 /*------------------------------------------------------------------.
989 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
991 `------------------------------------------------------------------*/
993 #if (defined __STDC__ || defined __C99__FUNC__ \
994 || defined __cplusplus || defined _MSC_VER)
996 yy_stack_print (yytype_int16
*bottom
, yytype_int16
*top
)
999 yy_stack_print (bottom
, top
)
1000 yytype_int16
*bottom
;
1004 YYFPRINTF (stderr
, "Stack now");
1005 for (; bottom
<= top
; ++bottom
)
1006 YYFPRINTF (stderr
, " %d", *bottom
);
1007 YYFPRINTF (stderr
, "\n");
1010 # define YY_STACK_PRINT(Bottom, Top) \
1013 yy_stack_print ((Bottom), (Top)); \
1017 /*------------------------------------------------.
1018 | Report that the YYRULE is going to be reduced. |
1019 `------------------------------------------------*/
1021 #if (defined __STDC__ || defined __C99__FUNC__ \
1022 || defined __cplusplus || defined _MSC_VER)
1024 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
1027 yy_reduce_print (yyvsp
, yyrule
)
1032 int yynrhs
= yyr2
[yyrule
];
1034 unsigned long int yylno
= yyrline
[yyrule
];
1035 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1037 /* The symbols being reduced. */
1038 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1040 fprintf (stderr
, " $%d = ", yyi
+ 1);
1041 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1042 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1044 fprintf (stderr
, "\n");
1048 # define YY_REDUCE_PRINT(Rule) \
1051 yy_reduce_print (yyvsp, Rule); \
1054 /* Nonzero means print parse trace. It is left uninitialized so that
1055 multiple parsers can coexist. */
1057 #else /* !YYDEBUG */
1058 # define YYDPRINTF(Args)
1059 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1060 # define YY_STACK_PRINT(Bottom, Top)
1061 # define YY_REDUCE_PRINT(Rule)
1062 #endif /* !YYDEBUG */
1065 /* YYINITDEPTH -- initial size of the parser's stacks. */
1067 # define YYINITDEPTH 200
1070 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1071 if the built-in stack extension method is used).
1073 Do not make this value too large; the results are undefined if
1074 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1075 evaluated with infinite-precision integer arithmetic. */
1078 # define YYMAXDEPTH 10000
1086 # if defined __GLIBC__ && defined _STRING_H
1087 # define yystrlen strlen
1089 /* Return the length of YYSTR. */
1090 #if (defined __STDC__ || defined __C99__FUNC__ \
1091 || defined __cplusplus || defined _MSC_VER)
1093 yystrlen (const char *yystr
)
1101 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1109 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1110 # define yystpcpy stpcpy
1112 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1114 #if (defined __STDC__ || defined __C99__FUNC__ \
1115 || defined __cplusplus || defined _MSC_VER)
1117 yystpcpy (char *yydest
, const char *yysrc
)
1120 yystpcpy (yydest
, yysrc
)
1126 const char *yys
= yysrc
;
1128 while ((*yyd
++ = *yys
++) != '\0')
1137 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1138 quotes and backslashes, so that it's suitable for yyerror. The
1139 heuristic is that double-quoting is unnecessary unless the string
1140 contains an apostrophe, a comma, or backslash (other than
1141 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1142 null, do not copy; instead, return the length of what the result
1145 yytnamerr (char *yyres
, const char *yystr
)
1150 char const *yyp
= yystr
;
1157 goto do_not_strip_quotes
;
1161 goto do_not_strip_quotes
;
1174 do_not_strip_quotes
: ;
1178 return yystrlen (yystr
);
1180 return yystpcpy (yyres
, yystr
) - yyres
;
1184 /* Copy into YYRESULT an error message about the unexpected token
1185 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1186 including the terminating null byte. If YYRESULT is null, do not
1187 copy anything; just return the number of bytes that would be
1188 copied. As a special case, return 0 if an ordinary "syntax error"
1189 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1190 size calculation. */
1192 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1194 int yyn
= yypact
[yystate
];
1196 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1200 int yytype
= YYTRANSLATE (yychar
);
1201 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1202 YYSIZE_T yysize
= yysize0
;
1204 int yysize_overflow
= 0;
1205 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1206 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1210 /* This is so xgettext sees the translatable formats that are
1211 constructed on the fly. */
1212 YY_("syntax error, unexpected %s");
1213 YY_("syntax error, unexpected %s, expecting %s");
1214 YY_("syntax error, unexpected %s, expecting %s or %s");
1215 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1216 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1220 static char const yyunexpected
[] = "syntax error, unexpected %s";
1221 static char const yyexpecting
[] = ", expecting %s";
1222 static char const yyor
[] = " or %s";
1223 char yyformat
[sizeof yyunexpected
1224 + sizeof yyexpecting
- 1
1225 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1226 * (sizeof yyor
- 1))];
1227 char const *yyprefix
= yyexpecting
;
1229 /* Start YYX at -YYN if negative to avoid negative indexes in
1231 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1233 /* Stay within bounds of both yycheck and yytname. */
1234 int yychecklim
= YYLAST
- yyn
+ 1;
1235 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1238 yyarg
[0] = yytname
[yytype
];
1239 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1241 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1242 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1244 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1248 yyformat
[sizeof yyunexpected
- 1] = '\0';
1251 yyarg
[yycount
++] = yytname
[yyx
];
1252 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1253 yysize_overflow
|= (yysize1
< yysize
);
1255 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1259 yyf
= YY_(yyformat
);
1260 yysize1
= yysize
+ yystrlen (yyf
);
1261 yysize_overflow
|= (yysize1
< yysize
);
1264 if (yysize_overflow
)
1265 return YYSIZE_MAXIMUM
;
1269 /* Avoid sprintf, as that infringes on the user's name space.
1270 Don't have undefined behavior even if the translation
1271 produced a string with the wrong number of "%s"s. */
1272 char *yyp
= yyresult
;
1274 while ((*yyp
= *yyf
) != '\0')
1276 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1278 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1291 #endif /* YYERROR_VERBOSE */
1294 /*-----------------------------------------------.
1295 | Release the memory associated to this symbol. |
1296 `-----------------------------------------------*/
1299 #if (defined __STDC__ || defined __C99__FUNC__ \
1300 || defined __cplusplus || defined _MSC_VER)
1302 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1305 yydestruct (yymsg
, yytype
, yyvaluep
)
1315 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1326 /* Prevent warnings from -Wmissing-prototypes. */
1328 #ifdef YYPARSE_PARAM
1329 #if defined __STDC__ || defined __cplusplus
1330 int yyparse (void *YYPARSE_PARAM
);
1334 #else /* ! YYPARSE_PARAM */
1335 #if defined __STDC__ || defined __cplusplus
1340 #endif /* ! YYPARSE_PARAM */
1351 #ifdef YYPARSE_PARAM
1352 #if (defined __STDC__ || defined __C99__FUNC__ \
1353 || defined __cplusplus || defined _MSC_VER)
1355 yyparse (void *YYPARSE_PARAM
)
1358 yyparse (YYPARSE_PARAM
)
1359 void *YYPARSE_PARAM
;
1361 #else /* ! YYPARSE_PARAM */
1362 #if (defined __STDC__ || defined __C99__FUNC__ \
1363 || defined __cplusplus || defined _MSC_VER)
1373 /* The look-ahead symbol. */
1376 /* The semantic value of the look-ahead symbol. */
1379 /* Number of syntax errors so far. */
1385 /* Number of tokens to shift before error messages enabled. */
1387 /* Look-ahead token as an internal (translated) token number. */
1390 /* Buffer for error messages, and its allocated size. */
1392 char *yymsg
= yymsgbuf
;
1393 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1396 /* Three stacks and their tools:
1397 `yyss': related to states,
1398 `yyvs': related to semantic values,
1399 `yyls': related to locations.
1401 Refer to the stacks thru separate pointers, to allow yyoverflow
1402 to reallocate them elsewhere. */
1404 /* The state stack. */
1405 yytype_int16 yyssa
[YYINITDEPTH
];
1406 yytype_int16
*yyss
= yyssa
;
1407 yytype_int16
*yyssp
;
1409 /* The semantic value stack. */
1410 YYSTYPE yyvsa
[YYINITDEPTH
];
1411 YYSTYPE
*yyvs
= yyvsa
;
1416 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1418 YYSIZE_T yystacksize
= YYINITDEPTH
;
1420 /* The variables used to return semantic value and location from the
1425 /* The number of symbols on the RHS of the reduced rule.
1426 Keep to zero when no symbol should be popped. */
1429 YYDPRINTF ((stderr
, "Starting parse\n"));
1434 yychar
= YYEMPTY
; /* Cause a token to be read. */
1436 /* Initialize stack pointers.
1437 Waste one element of value and location stack
1438 so that they stay on the same level as the state stack.
1439 The wasted elements are never initialized. */
1446 /*------------------------------------------------------------.
1447 | yynewstate -- Push a new state, which is found in yystate. |
1448 `------------------------------------------------------------*/
1450 /* In all cases, when you get here, the value and location stacks
1451 have just been pushed. So pushing a state here evens the stacks. */
1457 if (yyss
+ yystacksize
- 1 <= yyssp
)
1459 /* Get the current used size of the three stacks, in elements. */
1460 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1464 /* Give user a chance to reallocate the stack. Use copies of
1465 these so that the &'s don't force the real ones into
1467 YYSTYPE
*yyvs1
= yyvs
;
1468 yytype_int16
*yyss1
= yyss
;
1471 /* Each stack pointer address is followed by the size of the
1472 data in use in that stack, in bytes. This used to be a
1473 conditional around just the two extra args, but that might
1474 be undefined if yyoverflow is a macro. */
1475 yyoverflow (YY_("memory exhausted"),
1476 &yyss1
, yysize
* sizeof (*yyssp
),
1477 &yyvs1
, yysize
* sizeof (*yyvsp
),
1484 #else /* no yyoverflow */
1485 # ifndef YYSTACK_RELOCATE
1486 goto yyexhaustedlab
;
1488 /* Extend the stack our own way. */
1489 if (YYMAXDEPTH
<= yystacksize
)
1490 goto yyexhaustedlab
;
1492 if (YYMAXDEPTH
< yystacksize
)
1493 yystacksize
= YYMAXDEPTH
;
1496 yytype_int16
*yyss1
= yyss
;
1497 union yyalloc
*yyptr
=
1498 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1500 goto yyexhaustedlab
;
1501 YYSTACK_RELOCATE (yyss
);
1502 YYSTACK_RELOCATE (yyvs
);
1504 # undef YYSTACK_RELOCATE
1506 YYSTACK_FREE (yyss1
);
1509 #endif /* no yyoverflow */
1511 yyssp
= yyss
+ yysize
- 1;
1512 yyvsp
= yyvs
+ yysize
- 1;
1515 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1516 (unsigned long int) yystacksize
));
1518 if (yyss
+ yystacksize
- 1 <= yyssp
)
1522 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1531 /* Do appropriate processing given the current state. Read a
1532 look-ahead token if we need one and don't already have one. */
1534 /* First try to decide what to do without reference to look-ahead token. */
1535 yyn
= yypact
[yystate
];
1536 if (yyn
== YYPACT_NINF
)
1539 /* Not known => get a look-ahead token if don't already have one. */
1541 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1542 if (yychar
== YYEMPTY
)
1544 YYDPRINTF ((stderr
, "Reading a token: "));
1548 if (yychar
<= YYEOF
)
1550 yychar
= yytoken
= YYEOF
;
1551 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1555 yytoken
= YYTRANSLATE (yychar
);
1556 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1559 /* If the proper action on seeing token YYTOKEN is to reduce or to
1560 detect an error, take that action. */
1562 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1567 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1576 /* Count tokens shifted since error; after three, turn off error
1581 /* Shift the look-ahead token. */
1582 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1584 /* Discard the shifted token unless it is eof. */
1585 if (yychar
!= YYEOF
)
1594 /*-----------------------------------------------------------.
1595 | yydefault -- do the default action for the current state. |
1596 `-----------------------------------------------------------*/
1598 yyn
= yydefact
[yystate
];
1604 /*-----------------------------.
1605 | yyreduce -- Do a reduction. |
1606 `-----------------------------*/
1608 /* yyn is the number of a rule to reduce with. */
1611 /* If YYLEN is nonzero, implement the default value of the action:
1614 Otherwise, the following line sets YYVAL to garbage.
1615 This behavior is undocumented and Bison
1616 users should not rely upon it. Assigning to YYVAL
1617 unconditionally makes the parser a bit smaller, and it avoids a
1618 GCC warning that YYVAL may be used uninitialized. */
1619 yyval
= yyvsp
[1-yylen
];
1622 YY_REDUCE_PRINT (yyn
);
1626 #line 167 "cmDependsFortranParser.y"
1628 free((yyvsp
[(1) - (4)].string
));
1633 #line 173 "cmDependsFortranParser.y"
1635 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (2)].string
), "interface"))
1637 cmDependsFortranParser
* parser
=
1638 cmDependsFortran_yyget_extra(yyscanner
);
1639 cmDependsFortranParser_SetInInterface(parser
, true);
1641 free((yyvsp
[(1) - (2)].string
));
1646 #line 183 "cmDependsFortranParser.y"
1648 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "use"))
1650 cmDependsFortranParser
* parser
=
1651 cmDependsFortran_yyget_extra(yyscanner
);
1652 cmDependsFortranParser_RuleUse(parser
, (yyvsp
[(2) - (4)].string
));
1654 else if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "module"))
1656 cmDependsFortranParser
* parser
=
1657 cmDependsFortran_yyget_extra(yyscanner
);
1658 cmDependsFortranParser_RuleModule(parser
, (yyvsp
[(2) - (4)].string
));
1660 else if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "interface"))
1662 cmDependsFortranParser
* parser
=
1663 cmDependsFortran_yyget_extra(yyscanner
);
1664 cmDependsFortranParser_SetInInterface(parser
, true);
1666 else if (cmDependsFortranParserIsKeyword((yyvsp
[(2) - (4)].string
), "interface") &&
1667 cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "end"))
1669 cmDependsFortranParser
* parser
=
1670 cmDependsFortran_yyget_extra(yyscanner
);
1671 cmDependsFortranParser_SetInInterface(parser
, false);
1673 free((yyvsp
[(1) - (4)].string
));
1674 free((yyvsp
[(2) - (4)].string
));
1679 #line 213 "cmDependsFortranParser.y"
1681 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (5)].string
), "use"))
1683 cmDependsFortranParser
* parser
=
1684 cmDependsFortran_yyget_extra(yyscanner
);
1685 cmDependsFortranParser_RuleUse(parser
, (yyvsp
[(3) - (5)].string
));
1687 free((yyvsp
[(1) - (5)].string
));
1688 free((yyvsp
[(3) - (5)].string
));
1693 #line 224 "cmDependsFortranParser.y"
1695 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (7)].string
), "use") &&
1696 cmDependsFortranParserIsKeyword((yyvsp
[(3) - (7)].string
), "non_intrinsic") )
1698 cmDependsFortranParser
* parser
=
1699 cmDependsFortran_yyget_extra(yyscanner
);
1700 cmDependsFortranParser_RuleUse(parser
, (yyvsp
[(5) - (7)].string
));
1702 free((yyvsp
[(1) - (7)].string
));
1703 free((yyvsp
[(3) - (7)].string
));
1704 free((yyvsp
[(5) - (7)].string
));
1709 #line 237 "cmDependsFortranParser.y"
1711 if (cmDependsFortranParserIsKeyword((yyvsp
[(1) - (4)].string
), "include"))
1713 cmDependsFortranParser
* parser
=
1714 cmDependsFortran_yyget_extra(yyscanner
);
1715 cmDependsFortranParser_RuleInclude(parser
, (yyvsp
[(2) - (4)].string
));
1717 free((yyvsp
[(1) - (4)].string
));
1718 free((yyvsp
[(2) - (4)].string
));
1723 #line 248 "cmDependsFortranParser.y"
1725 cmDependsFortranParser
* parser
=
1726 cmDependsFortran_yyget_extra(yyscanner
);
1727 cmDependsFortranParser_RuleInclude(parser
, (yyvsp
[(2) - (4)].string
));
1728 free((yyvsp
[(2) - (4)].string
));
1733 #line 255 "cmDependsFortranParser.y"
1735 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1736 cmDependsFortranParser_RuleDefine(parser
, (yyvsp
[(2) - (4)].string
));
1737 free((yyvsp
[(2) - (4)].string
));
1742 #line 261 "cmDependsFortranParser.y"
1744 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1745 cmDependsFortranParser_RuleUndef(parser
, (yyvsp
[(2) - (4)].string
));
1746 free((yyvsp
[(2) - (4)].string
));
1751 #line 267 "cmDependsFortranParser.y"
1753 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1754 cmDependsFortranParser_RuleIfdef(parser
, (yyvsp
[(2) - (4)].string
));
1755 free((yyvsp
[(2) - (4)].string
));
1760 #line 273 "cmDependsFortranParser.y"
1762 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1763 cmDependsFortranParser_RuleIfndef(parser
, (yyvsp
[(2) - (4)].string
));
1764 free((yyvsp
[(2) - (4)].string
));
1769 #line 279 "cmDependsFortranParser.y"
1771 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1772 cmDependsFortranParser_RuleIf(parser
);
1777 #line 284 "cmDependsFortranParser.y"
1779 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1780 cmDependsFortranParser_RuleElif(parser
);
1785 #line 289 "cmDependsFortranParser.y"
1787 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1788 cmDependsFortranParser_RuleElse(parser
);
1793 #line 294 "cmDependsFortranParser.y"
1795 cmDependsFortranParser
* parser
= cmDependsFortran_yyget_extra(yyscanner
);
1796 cmDependsFortranParser_RuleEndif(parser
);
1801 #line 299 "cmDependsFortranParser.y"
1803 free((yyvsp
[(1) - (4)].string
));
1808 #line 321 "cmDependsFortranParser.y"
1809 { free ((yyvsp
[(1) - (1)].string
)); }
1813 #line 322 "cmDependsFortranParser.y"
1814 { free ((yyvsp
[(1) - (1)].string
)); }
1818 /* Line 1267 of yacc.c. */
1819 #line 1820 "cmDependsFortranParser.cxx"
1822 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
1826 YY_STACK_PRINT (yyss
, yyssp
);
1831 /* Now `shift' the result of the reduction. Determine what state
1832 that goes to, based on the state we popped back to and the rule
1833 number reduced by. */
1837 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1838 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1839 yystate
= yytable
[yystate
];
1841 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1846 /*------------------------------------.
1847 | yyerrlab -- here on detecting error |
1848 `------------------------------------*/
1850 /* If not already recovering from an error, report this error. */
1854 #if ! YYERROR_VERBOSE
1855 yyerror (YY_("syntax error"));
1858 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
1859 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
1861 YYSIZE_T yyalloc
= 2 * yysize
;
1862 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
1863 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
1864 if (yymsg
!= yymsgbuf
)
1865 YYSTACK_FREE (yymsg
);
1866 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
1868 yymsg_alloc
= yyalloc
;
1872 yymsg_alloc
= sizeof yymsgbuf
;
1876 if (0 < yysize
&& yysize
<= yymsg_alloc
)
1878 (void) yysyntax_error (yymsg
, yystate
, yychar
);
1883 yyerror (YY_("syntax error"));
1885 goto yyexhaustedlab
;
1893 if (yyerrstatus
== 3)
1895 /* If just tried and failed to reuse look-ahead token after an
1896 error, discard it. */
1898 if (yychar
<= YYEOF
)
1900 /* Return failure if at end of input. */
1901 if (yychar
== YYEOF
)
1906 yydestruct ("Error: discarding",
1913 /* Else will try to reuse look-ahead token after shifting the error
1918 /*---------------------------------------------------.
1919 | yyerrorlab -- error raised explicitly by YYERROR. |
1920 `---------------------------------------------------*/
1923 /* Pacify compilers like GCC when the user code never invokes
1924 YYERROR and the label yyerrorlab therefore never appears in user
1926 if (/*CONSTCOND*/ 0)
1929 /* Do not reclaim the symbols of the rule which action triggered
1933 YY_STACK_PRINT (yyss
, yyssp
);
1938 /*-------------------------------------------------------------.
1939 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1940 `-------------------------------------------------------------*/
1943 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1947 yyn
= yypact
[yystate
];
1948 if (yyn
!= YYPACT_NINF
)
1951 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1959 /* Pop the current state because it cannot handle the error token. */
1964 yydestruct ("Error: popping",
1965 yystos
[yystate
], yyvsp
);
1968 YY_STACK_PRINT (yyss
, yyssp
);
1977 /* Shift the error token. */
1978 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
1984 /*-------------------------------------.
1985 | yyacceptlab -- YYACCEPT comes here. |
1986 `-------------------------------------*/
1991 /*-----------------------------------.
1992 | yyabortlab -- YYABORT comes here. |
1993 `-----------------------------------*/
1999 /*-------------------------------------------------.
2000 | yyexhaustedlab -- memory exhaustion comes here. |
2001 `-------------------------------------------------*/
2003 yyerror (YY_("memory exhausted"));
2009 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
2010 yydestruct ("Cleanup: discarding lookahead",
2012 /* Do not reclaim the symbols of the rule which action triggered
2013 this YYABORT or YYACCEPT. */
2015 YY_STACK_PRINT (yyss
, yyssp
);
2016 while (yyssp
!= yyss
)
2018 yydestruct ("Cleanup: popping",
2019 yystos
[*yyssp
], yyvsp
);
2024 YYSTACK_FREE (yyss
);
2027 if (yymsg
!= yymsgbuf
)
2028 YYSTACK_FREE (yymsg
);
2030 /* Make sure YYID is used. */
2031 return YYID (yyresult
);
2035 #line 330 "cmDependsFortranParser.y"
2037 /* End of grammar */