ENH: check in almost building VMS stuff with VMSBuild directory since the bootstrap...
[cmake.git] / Source / cmDependsFortranParser.cxx
blob01c0d60b7c2721ea8e90d7915f76e0a3706676bc
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)
11 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, 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. */
47 #define YYBISON 1
49 /* Bison version. */
50 #define YYBISON_VERSION "2.3"
52 /* Skeleton name. */
53 #define YYSKELETON_NAME "yacc.c"
55 /* Pure parsers. */
56 #define YYPURE 1
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
71 /* Tokens. */
72 #ifndef YYTOKENTYPE
73 # define YYTOKENTYPE
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
75 know about them. */
76 enum yytokentype {
77 EOSTMT = 258,
78 ASSIGNMENT_OP = 259,
79 GARBAGE = 260,
80 CPP_INCLUDE = 261,
81 F90PPR_INCLUDE = 262,
82 COCO_INCLUDE = 263,
83 F90PPR_DEFINE = 264,
84 CPP_DEFINE = 265,
85 F90PPR_UNDEF = 266,
86 CPP_UNDEF = 267,
87 CPP_IFDEF = 268,
88 CPP_IFNDEF = 269,
89 CPP_IF = 270,
90 CPP_ELSE = 271,
91 CPP_ELIF = 272,
92 CPP_ENDIF = 273,
93 F90PPR_IFDEF = 274,
94 F90PPR_IFNDEF = 275,
95 F90PPR_IF = 276,
96 F90PPR_ELSE = 277,
97 F90PPR_ELIF = 278,
98 F90PPR_ENDIF = 279,
99 COMMA = 280,
100 DCOLON = 281,
101 CPP_TOENDL = 282,
102 UNTERMINATED_STRING = 283,
103 STRING = 284,
104 WORD = 285
106 #endif
107 /* Tokens. */
108 #define EOSTMT 258
109 #define ASSIGNMENT_OP 259
110 #define GARBAGE 260
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
120 #define CPP_IF 270
121 #define CPP_ELSE 271
122 #define CPP_ELIF 272
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
130 #define COMMA 280
131 #define DCOLON 281
132 #define CPP_TOENDL 282
133 #define UNTERMINATED_STRING 283
134 #define STRING 284
135 #define WORD 285
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 $
147 Language: C++
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.
173 Run bison like this:
175 bison --yacc --name-prefix=cmDependsFortran_yy
176 --defines=cmDependsFortranParserTokens.h
177 -ocmDependsFortranParser.cxx
178 cmDependsFortranParser.y
180 Modify cmDependsFortranParser.cxx:
181 - remove TABs
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. */
198 YY_DECL;
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++])
249 if(*us1++ == '\0')
251 return(0);
253 return(cm[*us1] - cm[*--us2]);
256 static bool cmDependsFortranParserIsKeyword(const char* word,
257 const char* keyword)
259 return strcasecmpCM(word, keyword) == 0;
262 /* Disable some warnings in the generated code. */
263 #ifdef __BORLANDC__
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 */
268 #endif
269 #ifdef _MSC_VER
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. */
276 #endif
279 /* Enabling traces. */
280 #ifndef YYDEBUG
281 # define YYDEBUG 0
282 #endif
284 /* Enabling verbose error messages. */
285 #ifdef YYERROR_VERBOSE
286 # undef YYERROR_VERBOSE
287 # define YYERROR_VERBOSE 1
288 #else
289 # define YYERROR_VERBOSE 0
290 #endif
292 /* Enabling the token table. */
293 #ifndef YYTOKEN_TABLE
294 # define YYTOKEN_TABLE 0
295 #endif
297 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
298 typedef union YYSTYPE
299 #line 141 "cmDependsFortranParser.y"
301 char* string;
303 /* Line 187 of yacc.c. */
304 #line 305 "cmDependsFortranParser.cxx"
305 YYSTYPE;
306 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
307 # define YYSTYPE_IS_DECLARED 1
308 # define YYSTYPE_IS_TRIVIAL 1
309 #endif
313 /* Copy the second part of user declarations. */
316 /* Line 216 of yacc.c. */
317 #line 318 "cmDependsFortranParser.cxx"
319 #ifdef short
320 # undef short
321 #endif
323 #ifdef YYTYPE_UINT8
324 typedef YYTYPE_UINT8 yytype_uint8;
325 #else
326 typedef unsigned char yytype_uint8;
327 #endif
329 #ifdef YYTYPE_INT8
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;
334 #else
335 typedef short int yytype_int8;
336 #endif
338 #ifdef YYTYPE_UINT16
339 typedef YYTYPE_UINT16 yytype_uint16;
340 #else
341 typedef unsigned short int yytype_uint16;
342 #endif
344 #ifdef YYTYPE_INT16
345 typedef YYTYPE_INT16 yytype_int16;
346 #else
347 typedef short int yytype_int16;
348 #endif
350 #ifndef YYSIZE_T
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
359 # else
360 # define YYSIZE_T unsigned int
361 # endif
362 #endif
364 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
366 #ifndef YY_
367 # if YYENABLE_NLS
368 # if ENABLE_NLS
369 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
370 # define YY_(msgid) dgettext ("bison-runtime", msgid)
371 # endif
372 # endif
373 # ifndef YY_
374 # define YY_(msgid) msgid
375 # endif
376 #endif
378 /* Suppress unused-variable warnings by "using" E. */
379 #if ! defined lint || defined __GNUC__
380 # define YYUSE(e) ((void) (e))
381 #else
382 # define YYUSE(e) /* empty */
383 #endif
385 /* Identity function, used to suppress warnings about constant conditions. */
386 #ifndef lint
387 # define YYID(n) (n)
388 #else
389 #if (defined __STDC__ || defined __C99__FUNC__ \
390 || defined __cplusplus || defined _MSC_VER)
391 static int
392 YYID (int i)
393 #else
394 static int
395 YYID (i)
396 int i;
397 #endif
399 return i;
401 #endif
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
409 # ifdef __GNUC__
410 # define YYSTACK_ALLOC __builtin_alloca
411 # elif defined __BUILTIN_VA_ARG_INCR
412 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
413 # elif defined _AIX
414 # define YYSTACK_ALLOC __alloca
415 # elif defined _MSC_VER
416 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
417 # define alloca _alloca
418 # else
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 */
423 # ifndef _STDLIB_H
424 # define _STDLIB_H 1
425 # endif
426 # endif
427 # endif
428 # endif
429 # endif
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 */
440 # endif
441 # else
442 # define YYSTACK_ALLOC YYMALLOC
443 # define YYSTACK_FREE YYFREE
444 # ifndef YYSTACK_ALLOC_MAXIMUM
445 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
446 # endif
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 */
451 # ifndef _STDLIB_H
452 # define _STDLIB_H 1
453 # endif
454 # endif
455 # ifndef YYMALLOC
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 */
460 # endif
461 # endif
462 # ifndef YYFREE
463 # define YYFREE free
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 */
467 # endif
468 # endif
469 # endif
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. */
478 union yyalloc
480 yytype_int16 yyss;
481 YYSTYPE yyvs;
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
488 N elements. */
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
494 not overlap. */
495 # ifndef YYCOPY
496 # if defined __GNUC__ && 1 < __GNUC__
497 # define YYCOPY(To, From, Count) \
498 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
499 # else
500 # define YYCOPY(To, From, Count) \
501 do \
503 YYSIZE_T yyi; \
504 for (yyi = 0; yyi < (Count); yyi++) \
505 (To)[yyi] = (From)[yyi]; \
507 while (YYID (0))
508 # endif
509 # endif
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
515 stack. */
516 # define YYSTACK_RELOCATE(Stack) \
517 do \
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); \
525 while (YYID (0))
527 #endif
529 /* YYFINAL -- State number of the termination state. */
530 #define YYFINAL 2
531 /* YYLAST -- Last index in YYTABLE. */
532 #define YYLAST 271
534 /* YYNTOKENS -- Number of terminals. */
535 #define YYNTOKENS 31
536 /* YYNNTS -- Number of nonterminals. */
537 #define YYNNTS 16
538 /* YYNRULES -- Number of rules. */
539 #define YYNRULES 52
540 /* YYNRULES -- Number of states. */
541 #define YYNSTATES 94
543 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
544 #define YYUNDEFTOK 2
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
584 #if YYDEBUG
585 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
586 YYRHS. */
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,
594 147, 149, 151
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,
615 -1, 28, -1
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,
626 325, 326, 327
628 #endif
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
645 #endif
647 # ifdef YYPRINT
648 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
649 token YYLEX-NUM. */
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,
657 # endif
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,
667 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,
678 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,
695 44, 9, 0, 10
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
706 STATE-NUM. */
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,
719 -35, -35, 213, -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,
763 44, 45
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,
795 29, 30
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,
811 30, 3, 45, 3
814 #define yyerrok (yyerrstatus = 0)
815 #define yyclearin (yychar = YYEMPTY)
816 #define YYEMPTY (-2)
817 #define YYEOF 0
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) \
833 do \
834 if (yychar == YYEMPTY && yylen == 1) \
836 yychar = (Token); \
837 yylval = (Value); \
838 yytoken = YYTRANSLATE (yychar); \
839 YYPOPSTACK (1); \
840 goto yybackup; \
842 else \
844 yyerror (YY_("syntax error: cannot back up")); \
845 YYERROR; \
847 while (YYID (0))
850 #define YYTERROR 1
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) \
861 do \
862 if (YYID (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; \
869 else \
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; \
876 while (YYID (0))
877 #endif
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)
890 # else
891 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
892 # endif
893 #endif
896 /* YYLEX -- calling `yylex' with the right arguments. */
898 #ifdef YYLEX_PARAM
899 # define YYLEX yylex (&yylval, YYLEX_PARAM)
900 #else
901 # define YYLEX yylex (&yylval)
902 #endif
904 /* Enable debugging if requested. */
905 #if YYDEBUG
907 # ifndef YYFPRINTF
908 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
909 # define YYFPRINTF fprintf
910 # endif
912 # define YYDPRINTF(Args) \
913 do { \
914 if (yydebug) \
915 YYFPRINTF Args; \
916 } while (YYID (0))
918 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
919 do { \
920 if (yydebug) \
922 YYFPRINTF (stderr, "%s ", Title); \
923 yy_symbol_print (stderr, \
924 Type, Value); \
925 YYFPRINTF (stderr, "\n"); \
927 } while (YYID (0))
930 /*--------------------------------.
931 | Print this symbol on YYOUTPUT. |
932 `--------------------------------*/
934 /*ARGSUSED*/
935 #if (defined __STDC__ || defined __C99__FUNC__ \
936 || defined __cplusplus || defined _MSC_VER)
937 static void
938 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
939 #else
940 static void
941 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
942 FILE *yyoutput;
943 int yytype;
944 YYSTYPE const * const yyvaluep;
945 #endif
947 if (!yyvaluep)
948 return;
949 # ifdef YYPRINT
950 if (yytype < YYNTOKENS)
951 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
952 # else
953 YYUSE (yyoutput);
954 # endif
955 switch (yytype)
957 default:
958 break;
963 /*--------------------------------.
964 | Print this symbol on YYOUTPUT. |
965 `--------------------------------*/
967 #if (defined __STDC__ || defined __C99__FUNC__ \
968 || defined __cplusplus || defined _MSC_VER)
969 static void
970 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
971 #else
972 static void
973 yy_symbol_print (yyoutput, yytype, yyvaluep)
974 FILE *yyoutput;
975 int yytype;
976 YYSTYPE const * const yyvaluep;
977 #endif
979 if (yytype < YYNTOKENS)
980 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
981 else
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 |
990 | TOP (included). |
991 `------------------------------------------------------------------*/
993 #if (defined __STDC__ || defined __C99__FUNC__ \
994 || defined __cplusplus || defined _MSC_VER)
995 static void
996 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
997 #else
998 static void
999 yy_stack_print (bottom, top)
1000 yytype_int16 *bottom;
1001 yytype_int16 *top;
1002 #endif
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) \
1011 do { \
1012 if (yydebug) \
1013 yy_stack_print ((Bottom), (Top)); \
1014 } while (YYID (0))
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)
1023 static void
1024 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1025 #else
1026 static void
1027 yy_reduce_print (yyvsp, yyrule)
1028 YYSTYPE *yyvsp;
1029 int yyrule;
1030 #endif
1032 int yynrhs = yyr2[yyrule];
1033 int yyi;
1034 unsigned long int yylno = yyrline[yyrule];
1035 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1036 yyrule - 1, yylno);
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) \
1049 do { \
1050 if (yydebug) \
1051 yy_reduce_print (yyvsp, Rule); \
1052 } while (YYID (0))
1054 /* Nonzero means print parse trace. It is left uninitialized so that
1055 multiple parsers can coexist. */
1056 int yydebug;
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. */
1066 #ifndef YYINITDEPTH
1067 # define YYINITDEPTH 200
1068 #endif
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. */
1077 #ifndef YYMAXDEPTH
1078 # define YYMAXDEPTH 10000
1079 #endif
1083 #if YYERROR_VERBOSE
1085 # ifndef yystrlen
1086 # if defined __GLIBC__ && defined _STRING_H
1087 # define yystrlen strlen
1088 # else
1089 /* Return the length of YYSTR. */
1090 #if (defined __STDC__ || defined __C99__FUNC__ \
1091 || defined __cplusplus || defined _MSC_VER)
1092 static YYSIZE_T
1093 yystrlen (const char *yystr)
1094 #else
1095 static YYSIZE_T
1096 yystrlen (yystr)
1097 const char *yystr;
1098 #endif
1100 YYSIZE_T yylen;
1101 for (yylen = 0; yystr[yylen]; yylen++)
1102 continue;
1103 return yylen;
1105 # endif
1106 # endif
1108 # ifndef yystpcpy
1109 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1110 # define yystpcpy stpcpy
1111 # else
1112 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1113 YYDEST. */
1114 #if (defined __STDC__ || defined __C99__FUNC__ \
1115 || defined __cplusplus || defined _MSC_VER)
1116 static char *
1117 yystpcpy (char *yydest, const char *yysrc)
1118 #else
1119 static char *
1120 yystpcpy (yydest, yysrc)
1121 char *yydest;
1122 const char *yysrc;
1123 #endif
1125 char *yyd = yydest;
1126 const char *yys = yysrc;
1128 while ((*yyd++ = *yys++) != '\0')
1129 continue;
1131 return yyd - 1;
1133 # endif
1134 # endif
1136 # ifndef yytnamerr
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
1143 would have been. */
1144 static YYSIZE_T
1145 yytnamerr (char *yyres, const char *yystr)
1147 if (*yystr == '"')
1149 YYSIZE_T yyn = 0;
1150 char const *yyp = yystr;
1152 for (;;)
1153 switch (*++yyp)
1155 case '\'':
1156 case ',':
1157 goto do_not_strip_quotes;
1159 case '\\':
1160 if (*++yyp != '\\')
1161 goto do_not_strip_quotes;
1162 /* Fall through. */
1163 default:
1164 if (yyres)
1165 yyres[yyn] = *yyp;
1166 yyn++;
1167 break;
1169 case '"':
1170 if (yyres)
1171 yyres[yyn] = '\0';
1172 return yyn;
1174 do_not_strip_quotes: ;
1177 if (! yyres)
1178 return yystrlen (yystr);
1180 return yystpcpy (yyres, yystr) - yyres;
1182 # endif
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. */
1191 static YYSIZE_T
1192 yysyntax_error (char *yyresult, int yystate, int yychar)
1194 int yyn = yypact[yystate];
1196 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1197 return 0;
1198 else
1200 int yytype = YYTRANSLATE (yychar);
1201 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1202 YYSIZE_T yysize = yysize0;
1203 YYSIZE_T yysize1;
1204 int yysize_overflow = 0;
1205 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1206 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1207 int yyx;
1209 # if 0
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");
1217 # endif
1218 char *yyfmt;
1219 char const *yyf;
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
1230 YYCHECK. */
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;
1236 int yycount = 1;
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)
1246 yycount = 1;
1247 yysize = yysize0;
1248 yyformat[sizeof yyunexpected - 1] = '\0';
1249 break;
1251 yyarg[yycount++] = yytname[yyx];
1252 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1253 yysize_overflow |= (yysize1 < yysize);
1254 yysize = yysize1;
1255 yyfmt = yystpcpy (yyfmt, yyprefix);
1256 yyprefix = yyor;
1259 yyf = YY_(yyformat);
1260 yysize1 = yysize + yystrlen (yyf);
1261 yysize_overflow |= (yysize1 < yysize);
1262 yysize = yysize1;
1264 if (yysize_overflow)
1265 return YYSIZE_MAXIMUM;
1267 if (yyresult)
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;
1273 int yyi = 0;
1274 while ((*yyp = *yyf) != '\0')
1276 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1278 yyp += yytnamerr (yyp, yyarg[yyi++]);
1279 yyf += 2;
1281 else
1283 yyp++;
1284 yyf++;
1288 return yysize;
1291 #endif /* YYERROR_VERBOSE */
1294 /*-----------------------------------------------.
1295 | Release the memory associated to this symbol. |
1296 `-----------------------------------------------*/
1298 /*ARGSUSED*/
1299 #if (defined __STDC__ || defined __C99__FUNC__ \
1300 || defined __cplusplus || defined _MSC_VER)
1301 static void
1302 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1303 #else
1304 static void
1305 yydestruct (yymsg, yytype, yyvaluep)
1306 const char *yymsg;
1307 int yytype;
1308 YYSTYPE *yyvaluep;
1309 #endif
1311 YYUSE (yyvaluep);
1313 if (!yymsg)
1314 yymsg = "Deleting";
1315 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1317 switch (yytype)
1320 default:
1321 break;
1326 /* Prevent warnings from -Wmissing-prototypes. */
1328 #ifdef YYPARSE_PARAM
1329 #if defined __STDC__ || defined __cplusplus
1330 int yyparse (void *YYPARSE_PARAM);
1331 #else
1332 int yyparse ();
1333 #endif
1334 #else /* ! YYPARSE_PARAM */
1335 #if defined __STDC__ || defined __cplusplus
1336 int yyparse (void);
1337 #else
1338 int yyparse ();
1339 #endif
1340 #endif /* ! YYPARSE_PARAM */
1347 /*----------.
1348 | yyparse. |
1349 `----------*/
1351 #ifdef YYPARSE_PARAM
1352 #if (defined __STDC__ || defined __C99__FUNC__ \
1353 || defined __cplusplus || defined _MSC_VER)
1355 yyparse (void *YYPARSE_PARAM)
1356 #else
1358 yyparse (YYPARSE_PARAM)
1359 void *YYPARSE_PARAM;
1360 #endif
1361 #else /* ! YYPARSE_PARAM */
1362 #if (defined __STDC__ || defined __C99__FUNC__ \
1363 || defined __cplusplus || defined _MSC_VER)
1365 yyparse (void)
1366 #else
1368 yyparse ()
1370 #endif
1371 #endif
1373 /* The look-ahead symbol. */
1374 int yychar;
1376 /* The semantic value of the look-ahead symbol. */
1377 YYSTYPE yylval;
1379 /* Number of syntax errors so far. */
1380 int yynerrs;
1382 int yystate;
1383 int yyn;
1384 int yyresult;
1385 /* Number of tokens to shift before error messages enabled. */
1386 int yyerrstatus;
1387 /* Look-ahead token as an internal (translated) token number. */
1388 int yytoken = 0;
1389 #if YYERROR_VERBOSE
1390 /* Buffer for error messages, and its allocated size. */
1391 char yymsgbuf[128];
1392 char *yymsg = yymsgbuf;
1393 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1394 #endif
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;
1412 YYSTYPE *yyvsp;
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
1421 action routines. */
1422 YYSTYPE yyval;
1425 /* The number of symbols on the RHS of the reduced rule.
1426 Keep to zero when no symbol should be popped. */
1427 int yylen = 0;
1429 YYDPRINTF ((stderr, "Starting parse\n"));
1431 yystate = 0;
1432 yyerrstatus = 0;
1433 yynerrs = 0;
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. */
1441 yyssp = yyss;
1442 yyvsp = yyvs;
1444 goto yysetstate;
1446 /*------------------------------------------------------------.
1447 | yynewstate -- Push a new state, which is found in yystate. |
1448 `------------------------------------------------------------*/
1449 yynewstate:
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. */
1452 yyssp++;
1454 yysetstate:
1455 *yyssp = yystate;
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;
1462 #ifdef yyoverflow
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
1466 memory. */
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),
1479 &yystacksize);
1481 yyss = yyss1;
1482 yyvs = yyvs1;
1484 #else /* no yyoverflow */
1485 # ifndef YYSTACK_RELOCATE
1486 goto yyexhaustedlab;
1487 # else
1488 /* Extend the stack our own way. */
1489 if (YYMAXDEPTH <= yystacksize)
1490 goto yyexhaustedlab;
1491 yystacksize *= 2;
1492 if (YYMAXDEPTH < yystacksize)
1493 yystacksize = YYMAXDEPTH;
1496 yytype_int16 *yyss1 = yyss;
1497 union yyalloc *yyptr =
1498 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1499 if (! yyptr)
1500 goto yyexhaustedlab;
1501 YYSTACK_RELOCATE (yyss);
1502 YYSTACK_RELOCATE (yyvs);
1504 # undef YYSTACK_RELOCATE
1505 if (yyss1 != yyssa)
1506 YYSTACK_FREE (yyss1);
1508 # endif
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)
1519 YYABORT;
1522 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1524 goto yybackup;
1526 /*-----------.
1527 | yybackup. |
1528 `-----------*/
1529 yybackup:
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)
1537 goto yydefault;
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: "));
1545 yychar = YYLEX;
1548 if (yychar <= YYEOF)
1550 yychar = yytoken = YYEOF;
1551 YYDPRINTF ((stderr, "Now at end of input.\n"));
1553 else
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. */
1561 yyn += yytoken;
1562 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1563 goto yydefault;
1564 yyn = yytable[yyn];
1565 if (yyn <= 0)
1567 if (yyn == 0 || yyn == YYTABLE_NINF)
1568 goto yyerrlab;
1569 yyn = -yyn;
1570 goto yyreduce;
1573 if (yyn == YYFINAL)
1574 YYACCEPT;
1576 /* Count tokens shifted since error; after three, turn off error
1577 status. */
1578 if (yyerrstatus)
1579 yyerrstatus--;
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)
1586 yychar = YYEMPTY;
1588 yystate = yyn;
1589 *++yyvsp = yylval;
1591 goto yynewstate;
1594 /*-----------------------------------------------------------.
1595 | yydefault -- do the default action for the current state. |
1596 `-----------------------------------------------------------*/
1597 yydefault:
1598 yyn = yydefact[yystate];
1599 if (yyn == 0)
1600 goto yyerrlab;
1601 goto yyreduce;
1604 /*-----------------------------.
1605 | yyreduce -- Do a reduction. |
1606 `-----------------------------*/
1607 yyreduce:
1608 /* yyn is the number of a rule to reduce with. */
1609 yylen = yyr2[yyn];
1611 /* If YYLEN is nonzero, implement the default value of the action:
1612 `$$ = $1'.
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);
1623 switch (yyn)
1625 case 6:
1626 #line 167 "cmDependsFortranParser.y"
1628 free((yyvsp[(1) - (4)].string));
1630 break;
1632 case 7:
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));
1643 break;
1645 case 8:
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));
1676 break;
1678 case 9:
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));
1690 break;
1692 case 10:
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));
1706 break;
1708 case 11:
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));
1720 break;
1722 case 12:
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));
1730 break;
1732 case 13:
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));
1739 break;
1741 case 14:
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));
1748 break;
1750 case 15:
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));
1757 break;
1759 case 16:
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));
1766 break;
1768 case 17:
1769 #line 279 "cmDependsFortranParser.y"
1771 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1772 cmDependsFortranParser_RuleIf(parser);
1774 break;
1776 case 18:
1777 #line 284 "cmDependsFortranParser.y"
1779 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1780 cmDependsFortranParser_RuleElif(parser);
1782 break;
1784 case 19:
1785 #line 289 "cmDependsFortranParser.y"
1787 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1788 cmDependsFortranParser_RuleElse(parser);
1790 break;
1792 case 20:
1793 #line 294 "cmDependsFortranParser.y"
1795 cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
1796 cmDependsFortranParser_RuleEndif(parser);
1798 break;
1800 case 21:
1801 #line 299 "cmDependsFortranParser.y"
1803 free((yyvsp[(1) - (4)].string));
1805 break;
1807 case 46:
1808 #line 321 "cmDependsFortranParser.y"
1809 { free ((yyvsp[(1) - (1)].string)); }
1810 break;
1812 case 47:
1813 #line 322 "cmDependsFortranParser.y"
1814 { free ((yyvsp[(1) - (1)].string)); }
1815 break;
1818 /* Line 1267 of yacc.c. */
1819 #line 1820 "cmDependsFortranParser.cxx"
1820 default: break;
1822 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1824 YYPOPSTACK (yylen);
1825 yylen = 0;
1826 YY_STACK_PRINT (yyss, yyssp);
1828 *++yyvsp = yyval;
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. */
1835 yyn = yyr1[yyn];
1837 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1838 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1839 yystate = yytable[yystate];
1840 else
1841 yystate = yydefgoto[yyn - YYNTOKENS];
1843 goto yynewstate;
1846 /*------------------------------------.
1847 | yyerrlab -- here on detecting error |
1848 `------------------------------------*/
1849 yyerrlab:
1850 /* If not already recovering from an error, report this error. */
1851 if (!yyerrstatus)
1853 ++yynerrs;
1854 #if ! YYERROR_VERBOSE
1855 yyerror (YY_("syntax error"));
1856 #else
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);
1867 if (yymsg)
1868 yymsg_alloc = yyalloc;
1869 else
1871 yymsg = yymsgbuf;
1872 yymsg_alloc = sizeof yymsgbuf;
1876 if (0 < yysize && yysize <= yymsg_alloc)
1878 (void) yysyntax_error (yymsg, yystate, yychar);
1879 yyerror (yymsg);
1881 else
1883 yyerror (YY_("syntax error"));
1884 if (yysize != 0)
1885 goto yyexhaustedlab;
1888 #endif
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)
1902 YYABORT;
1904 else
1906 yydestruct ("Error: discarding",
1907 yytoken, &yylval);
1908 yychar = YYEMPTY;
1912 #if 0
1913 /* Else will try to reuse look-ahead token after shifting the error
1914 token. */
1915 goto yyerrlab1;
1918 /*---------------------------------------------------.
1919 | yyerrorlab -- error raised explicitly by YYERROR. |
1920 `---------------------------------------------------*/
1921 yyerrorlab:
1923 /* Pacify compilers like GCC when the user code never invokes
1924 YYERROR and the label yyerrorlab therefore never appears in user
1925 code. */
1926 if (/*CONSTCOND*/ 0)
1927 goto yyerrorlab;
1929 /* Do not reclaim the symbols of the rule which action triggered
1930 this YYERROR. */
1931 YYPOPSTACK (yylen);
1932 yylen = 0;
1933 YY_STACK_PRINT (yyss, yyssp);
1934 yystate = *yyssp;
1935 goto yyerrlab1;
1938 /*-------------------------------------------------------------.
1939 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1940 `-------------------------------------------------------------*/
1941 yyerrlab1:
1942 #endif
1943 yyerrstatus = 3; /* Each real token shifted decrements this. */
1945 for (;;)
1947 yyn = yypact[yystate];
1948 if (yyn != YYPACT_NINF)
1950 yyn += YYTERROR;
1951 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1953 yyn = yytable[yyn];
1954 if (0 < yyn)
1955 break;
1959 /* Pop the current state because it cannot handle the error token. */
1960 if (yyssp == yyss)
1961 YYABORT;
1964 yydestruct ("Error: popping",
1965 yystos[yystate], yyvsp);
1966 YYPOPSTACK (1);
1967 yystate = *yyssp;
1968 YY_STACK_PRINT (yyss, yyssp);
1971 if (yyn == YYFINAL)
1972 YYACCEPT;
1974 *++yyvsp = yylval;
1977 /* Shift the error token. */
1978 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1980 yystate = yyn;
1981 goto yynewstate;
1984 /*-------------------------------------.
1985 | yyacceptlab -- YYACCEPT comes here. |
1986 `-------------------------------------*/
1987 yyacceptlab:
1988 yyresult = 0;
1989 goto yyreturn;
1991 /*-----------------------------------.
1992 | yyabortlab -- YYABORT comes here. |
1993 `-----------------------------------*/
1994 yyabortlab:
1995 yyresult = 1;
1996 goto yyreturn;
1998 #ifndef yyoverflow
1999 /*-------------------------------------------------.
2000 | yyexhaustedlab -- memory exhaustion comes here. |
2001 `-------------------------------------------------*/
2002 yyexhaustedlab:
2003 yyerror (YY_("memory exhausted"));
2004 yyresult = 2;
2005 /* Fall through. */
2006 #endif
2008 yyreturn:
2009 if (yychar != YYEOF && yychar != YYEMPTY)
2010 yydestruct ("Cleanup: discarding lookahead",
2011 yytoken, &yylval);
2012 /* Do not reclaim the symbols of the rule which action triggered
2013 this YYABORT or YYACCEPT. */
2014 YYPOPSTACK (yylen);
2015 YY_STACK_PRINT (yyss, yyssp);
2016 while (yyssp != yyss)
2018 yydestruct ("Cleanup: popping",
2019 yystos[*yyssp], yyvsp);
2020 YYPOPSTACK (1);
2022 #ifndef yyoverflow
2023 if (yyss != yyssa)
2024 YYSTACK_FREE (yyss);
2025 #endif
2026 #if YYERROR_VERBOSE
2027 if (yymsg != yymsgbuf)
2028 YYSTACK_FREE (yymsg);
2029 #endif
2030 /* Make sure YYID is used. */
2031 return YYID (yyresult);
2035 #line 330 "cmDependsFortranParser.y"
2037 /* End of grammar */