cmDependsFortranParser.cxx 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030
  1. /* A Bison parser, made by GNU Bison 2.4.1. */
  2. /* Skeleton implementation for Bison's Yacc-like parsers in C
  3. Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
  4. Free Software Foundation, Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. /* As a special exception, you may create a larger work that contains
  16. part or all of the Bison parser skeleton and distribute that work
  17. under terms of your choice, so long as that work isn't itself a
  18. parser generator using the skeleton or a modified version thereof
  19. as a parser skeleton. Alternatively, if you modify or redistribute
  20. the parser skeleton itself, you may (at your option) remove this
  21. special exception, which will cause the skeleton and the resulting
  22. Bison output files to be licensed under the GNU General Public
  23. License without this special exception.
  24. This special exception was added by the Free Software Foundation in
  25. version 2.2 of Bison. */
  26. /* C LALR(1) parser skeleton written by Richard Stallman, by
  27. simplifying the original so-called "semantic" parser. */
  28. /* All symbols defined below should begin with yy or YY, to avoid
  29. infringing on user name space. This should be done even for local
  30. variables, as they might otherwise be expanded by user macros.
  31. There are some unavoidable exceptions within include files to
  32. define necessary library symbols; they are noted "INFRINGES ON
  33. USER NAME SPACE" below. */
  34. /* Identify Bison output. */
  35. #define YYBISON 1
  36. /* Bison version. */
  37. #define YYBISON_VERSION "2.4.1"
  38. /* Skeleton name. */
  39. #define YYSKELETON_NAME "yacc.c"
  40. /* Pure parsers. */
  41. #define YYPURE 1
  42. /* Push parsers. */
  43. #define YYPUSH 0
  44. /* Pull parsers. */
  45. #define YYPULL 1
  46. /* Using locations. */
  47. #define YYLSP_NEEDED 0
  48. /* Substitute the variable and function names. */
  49. #define yyparse cmDependsFortran_yyparse
  50. #define yylex cmDependsFortran_yylex
  51. #define yyerror cmDependsFortran_yyerror
  52. #define yylval cmDependsFortran_yylval
  53. #define yychar cmDependsFortran_yychar
  54. #define yydebug cmDependsFortran_yydebug
  55. #define yynerrs cmDependsFortran_yynerrs
  56. /* Copy the first part of user declarations. */
  57. /* Line 189 of yacc.c */
  58. #line 1 "cmDependsFortranParser.y"
  59. /*============================================================================
  60. CMake - Cross Platform Makefile Generator
  61. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  62. Distributed under the OSI-approved BSD License (the "License");
  63. see accompanying file Copyright.txt for details.
  64. This software is distributed WITHOUT ANY WARRANTY; without even the
  65. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  66. See the License for more information.
  67. ============================================================================*/
  68. /*-------------------------------------------------------------------------
  69. Portions of this source have been derived from makedepf90 version 2.8.8,
  70. Copyright (C) 2000--2006 Erik Edelmann <[email protected]>
  71. The code was originally distributed under the GPL but permission
  72. from the copyright holder has been obtained to distribute this
  73. derived work under the CMake license.
  74. -------------------------------------------------------------------------*/
  75. /*
  76. This file must be translated to C and modified to build everywhere.
  77. Run bison like this:
  78. bison --yacc --name-prefix=cmDependsFortran_yy
  79. --defines=cmDependsFortranParserTokens.h
  80. -ocmDependsFortranParser.cxx
  81. cmDependsFortranParser.y
  82. Modify cmDependsFortranParser.cxx:
  83. - remove TABs
  84. - Remove the yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"]
  85. */
  86. /*-------------------------------------------------------------------------*/
  87. #define cmDependsFortranParser_cxx
  88. #include "cmDependsFortranParser.h" /* Interface to parser object. */
  89. #include "cmDependsFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */
  90. #include <cmsys/String.h>
  91. /* Configure the parser to use a lexer object. */
  92. #define YYPARSE_PARAM yyscanner
  93. #define YYLEX_PARAM yyscanner
  94. #define YYERROR_VERBOSE 1
  95. #define cmDependsFortran_yyerror(x) \
  96. cmDependsFortranError(yyscanner, x)
  97. /* Forward declare the lexer entry point. */
  98. YY_DECL;
  99. /* Helper function to forward error callback. */
  100. static void cmDependsFortranError(yyscan_t yyscanner, const char* message)
  101. {
  102. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  103. cmDependsFortranParser_Error(parser, message);
  104. }
  105. static bool cmDependsFortranParserIsKeyword(const char* word,
  106. const char* keyword)
  107. {
  108. return cmsysString_strcasecmp(word, keyword) == 0;
  109. }
  110. /* Disable some warnings in the generated code. */
  111. #ifdef __BORLANDC__
  112. # pragma warn -8004 /* Variable assigned a value that is not used. */
  113. # pragma warn -8008 /* condition always returns true */
  114. # pragma warn -8060 /* possibly incorrect assignment */
  115. # pragma warn -8066 /* unreachable code */
  116. #endif
  117. #ifdef _MSC_VER
  118. # pragma warning (disable: 4102) /* Unused goto label. */
  119. # pragma warning (disable: 4065) /* Switch contains default but no case. */
  120. # pragma warning (disable: 4701) /* Local variable may not be initialized. */
  121. # pragma warning (disable: 4702) /* Unreachable code. */
  122. # pragma warning (disable: 4127) /* Conditional expression is constant. */
  123. # pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */
  124. #endif
  125. /* Line 189 of yacc.c */
  126. #line 172 "cmDependsFortranParser.cxx"
  127. /* Enabling traces. */
  128. #ifndef YYDEBUG
  129. # define YYDEBUG 0
  130. #endif
  131. /* Enabling verbose error messages. */
  132. #ifdef YYERROR_VERBOSE
  133. # undef YYERROR_VERBOSE
  134. # define YYERROR_VERBOSE 1
  135. #else
  136. # define YYERROR_VERBOSE 0
  137. #endif
  138. /* Enabling the token table. */
  139. #ifndef YYTOKEN_TABLE
  140. # define YYTOKEN_TABLE 0
  141. #endif
  142. /* Tokens. */
  143. #ifndef YYTOKENTYPE
  144. # define YYTOKENTYPE
  145. /* Put the tokens into the symbol table, so that GDB and other debuggers
  146. know about them. */
  147. enum yytokentype {
  148. EOSTMT = 258,
  149. ASSIGNMENT_OP = 259,
  150. GARBAGE = 260,
  151. CPP_INCLUDE = 261,
  152. F90PPR_INCLUDE = 262,
  153. COCO_INCLUDE = 263,
  154. F90PPR_DEFINE = 264,
  155. CPP_DEFINE = 265,
  156. F90PPR_UNDEF = 266,
  157. CPP_UNDEF = 267,
  158. CPP_IFDEF = 268,
  159. CPP_IFNDEF = 269,
  160. CPP_IF = 270,
  161. CPP_ELSE = 271,
  162. CPP_ELIF = 272,
  163. CPP_ENDIF = 273,
  164. F90PPR_IFDEF = 274,
  165. F90PPR_IFNDEF = 275,
  166. F90PPR_IF = 276,
  167. F90PPR_ELSE = 277,
  168. F90PPR_ELIF = 278,
  169. F90PPR_ENDIF = 279,
  170. COMMA = 280,
  171. DCOLON = 281,
  172. CPP_TOENDL = 282,
  173. UNTERMINATED_STRING = 283,
  174. STRING = 284,
  175. WORD = 285
  176. };
  177. #endif
  178. /* Tokens. */
  179. #define EOSTMT 258
  180. #define ASSIGNMENT_OP 259
  181. #define GARBAGE 260
  182. #define CPP_INCLUDE 261
  183. #define F90PPR_INCLUDE 262
  184. #define COCO_INCLUDE 263
  185. #define F90PPR_DEFINE 264
  186. #define CPP_DEFINE 265
  187. #define F90PPR_UNDEF 266
  188. #define CPP_UNDEF 267
  189. #define CPP_IFDEF 268
  190. #define CPP_IFNDEF 269
  191. #define CPP_IF 270
  192. #define CPP_ELSE 271
  193. #define CPP_ELIF 272
  194. #define CPP_ENDIF 273
  195. #define F90PPR_IFDEF 274
  196. #define F90PPR_IFNDEF 275
  197. #define F90PPR_IF 276
  198. #define F90PPR_ELSE 277
  199. #define F90PPR_ELIF 278
  200. #define F90PPR_ENDIF 279
  201. #define COMMA 280
  202. #define DCOLON 281
  203. #define CPP_TOENDL 282
  204. #define UNTERMINATED_STRING 283
  205. #define STRING 284
  206. #define WORD 285
  207. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  208. typedef union YYSTYPE
  209. {
  210. /* Line 214 of yacc.c */
  211. #line 94 "cmDependsFortranParser.y"
  212. char* string;
  213. /* Line 214 of yacc.c */
  214. #line 274 "cmDependsFortranParser.cxx"
  215. } YYSTYPE;
  216. # define YYSTYPE_IS_TRIVIAL 1
  217. # define yystype YYSTYPE /* obsolescent; will be withdrawn */
  218. # define YYSTYPE_IS_DECLARED 1
  219. #endif
  220. /* Copy the second part of user declarations. */
  221. /* Line 264 of yacc.c */
  222. #line 286 "cmDependsFortranParser.cxx"
  223. #ifdef short
  224. # undef short
  225. #endif
  226. #ifdef YYTYPE_UINT8
  227. typedef YYTYPE_UINT8 yytype_uint8;
  228. #else
  229. typedef unsigned char yytype_uint8;
  230. #endif
  231. #ifdef YYTYPE_INT8
  232. typedef YYTYPE_INT8 yytype_int8;
  233. #elif (defined __STDC__ || defined __C99__FUNC__ \
  234. || defined __cplusplus || defined _MSC_VER)
  235. typedef signed char yytype_int8;
  236. #else
  237. typedef short int yytype_int8;
  238. #endif
  239. #ifdef YYTYPE_UINT16
  240. typedef YYTYPE_UINT16 yytype_uint16;
  241. #else
  242. typedef unsigned short int yytype_uint16;
  243. #endif
  244. #ifdef YYTYPE_INT16
  245. typedef YYTYPE_INT16 yytype_int16;
  246. #else
  247. typedef short int yytype_int16;
  248. #endif
  249. #ifndef YYSIZE_T
  250. # ifdef __SIZE_TYPE__
  251. # define YYSIZE_T __SIZE_TYPE__
  252. # elif defined size_t
  253. # define YYSIZE_T size_t
  254. # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
  255. || defined __cplusplus || defined _MSC_VER)
  256. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  257. # define YYSIZE_T size_t
  258. # else
  259. # define YYSIZE_T unsigned int
  260. # endif
  261. #endif
  262. #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
  263. #ifndef YY_
  264. # if YYENABLE_NLS
  265. # if ENABLE_NLS
  266. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  267. # define YY_(msgid) dgettext ("bison-runtime", msgid)
  268. # endif
  269. # endif
  270. # ifndef YY_
  271. # define YY_(msgid) msgid
  272. # endif
  273. #endif
  274. /* Suppress unused-variable warnings by "using" E. */
  275. #if ! defined lint || defined __GNUC__
  276. # define YYUSE(e) ((void) (e))
  277. #else
  278. # define YYUSE(e) /* empty */
  279. #endif
  280. /* Identity function, used to suppress warnings about constant conditions. */
  281. #ifndef lint
  282. # define YYID(n) (n)
  283. #else
  284. #if (defined __STDC__ || defined __C99__FUNC__ \
  285. || defined __cplusplus || defined _MSC_VER)
  286. static int
  287. YYID (int yyi)
  288. #else
  289. static int
  290. YYID (yyi)
  291. int yyi;
  292. #endif
  293. {
  294. return yyi;
  295. }
  296. #endif
  297. #if ! defined yyoverflow || YYERROR_VERBOSE
  298. /* The parser invokes alloca or malloc; define the necessary symbols. */
  299. # ifdef YYSTACK_USE_ALLOCA
  300. # if YYSTACK_USE_ALLOCA
  301. # ifdef __GNUC__
  302. # define YYSTACK_ALLOC __builtin_alloca
  303. # elif defined __BUILTIN_VA_ARG_INCR
  304. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  305. # elif defined _AIX
  306. # define YYSTACK_ALLOC __alloca
  307. # elif defined _MSC_VER
  308. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  309. # define alloca _alloca
  310. # else
  311. # define YYSTACK_ALLOC alloca
  312. # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
  313. || defined __cplusplus || defined _MSC_VER)
  314. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  315. # ifndef _STDLIB_H
  316. # define _STDLIB_H 1
  317. # endif
  318. # endif
  319. # endif
  320. # endif
  321. # endif
  322. # ifdef YYSTACK_ALLOC
  323. /* Pacify GCC's `empty if-body' warning. */
  324. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
  325. # ifndef YYSTACK_ALLOC_MAXIMUM
  326. /* The OS might guarantee only one guard page at the bottom of the stack,
  327. and a page size can be as small as 4096 bytes. So we cannot safely
  328. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  329. to allow for a few compiler-allocated temporary stack slots. */
  330. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  331. # endif
  332. # else
  333. # define YYSTACK_ALLOC YYMALLOC
  334. # define YYSTACK_FREE YYFREE
  335. # ifndef YYSTACK_ALLOC_MAXIMUM
  336. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  337. # endif
  338. # if (defined __cplusplus && ! defined _STDLIB_H \
  339. && ! ((defined YYMALLOC || defined malloc) \
  340. && (defined YYFREE || defined free)))
  341. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  342. # ifndef _STDLIB_H
  343. # define _STDLIB_H 1
  344. # endif
  345. # endif
  346. # ifndef YYMALLOC
  347. # define YYMALLOC malloc
  348. # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
  349. || defined __cplusplus || defined _MSC_VER)
  350. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  351. # endif
  352. # endif
  353. # ifndef YYFREE
  354. # define YYFREE free
  355. # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
  356. || defined __cplusplus || defined _MSC_VER)
  357. void free (void *); /* INFRINGES ON USER NAME SPACE */
  358. # endif
  359. # endif
  360. # endif
  361. #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
  362. #if (! defined yyoverflow \
  363. && (! defined __cplusplus \
  364. || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  365. /* A type that is properly aligned for any stack member. */
  366. union yyalloc
  367. {
  368. yytype_int16 yyss_alloc;
  369. YYSTYPE yyvs_alloc;
  370. };
  371. /* The size of the maximum gap between one aligned stack and the next. */
  372. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  373. /* The size of an array large to enough to hold all stacks, each with
  374. N elements. */
  375. # define YYSTACK_BYTES(N) \
  376. ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
  377. + YYSTACK_GAP_MAXIMUM)
  378. /* Copy COUNT objects from FROM to TO. The source and destination do
  379. not overlap. */
  380. # ifndef YYCOPY
  381. # if defined __GNUC__ && 1 < __GNUC__
  382. # define YYCOPY(To, From, Count) \
  383. __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
  384. # else
  385. # define YYCOPY(To, From, Count) \
  386. do \
  387. { \
  388. YYSIZE_T yyi; \
  389. for (yyi = 0; yyi < (Count); yyi++) \
  390. (To)[yyi] = (From)[yyi]; \
  391. } \
  392. while (YYID (0))
  393. # endif
  394. # endif
  395. /* Relocate STACK from its old location to the new one. The
  396. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  397. elements in the stack, and YYPTR gives the new location of the
  398. stack. Advance YYPTR to a properly aligned location for the next
  399. stack. */
  400. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  401. do \
  402. { \
  403. YYSIZE_T yynewbytes; \
  404. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  405. Stack = &yyptr->Stack_alloc; \
  406. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  407. yyptr += yynewbytes / sizeof (*yyptr); \
  408. } \
  409. while (YYID (0))
  410. #endif
  411. /* YYFINAL -- State number of the termination state. */
  412. #define YYFINAL 2
  413. /* YYLAST -- Last index in YYTABLE. */
  414. #define YYLAST 271
  415. /* YYNTOKENS -- Number of terminals. */
  416. #define YYNTOKENS 31
  417. /* YYNNTS -- Number of nonterminals. */
  418. #define YYNNTS 16
  419. /* YYNRULES -- Number of rules. */
  420. #define YYNRULES 52
  421. /* YYNRULES -- Number of states. */
  422. #define YYNSTATES 94
  423. /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  424. #define YYUNDEFTOK 2
  425. #define YYMAXUTOK 285
  426. #define YYTRANSLATE(YYX) \
  427. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  428. /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
  429. static const yytype_uint8 yytranslate[] =
  430. {
  431. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  432. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  433. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  434. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  435. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  436. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  437. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  438. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  439. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  440. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  441. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  442. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  443. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  444. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  445. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  446. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  447. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  448. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  449. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  450. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  451. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  452. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  453. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  454. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  455. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  456. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  457. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  458. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  459. 25, 26, 27, 28, 29, 30
  460. };
  461. #if YYDEBUG
  462. /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  463. YYRHS. */
  464. static const yytype_uint8 yyprhs[] =
  465. {
  466. 0, 0, 3, 4, 7, 9, 11, 16, 19, 24,
  467. 30, 38, 43, 48, 53, 58, 63, 68, 72, 76,
  468. 80, 84, 89, 93, 95, 97, 99, 101, 103, 105,
  469. 107, 109, 111, 113, 115, 117, 119, 121, 123, 125,
  470. 127, 129, 131, 133, 135, 136, 139, 141, 143, 145,
  471. 147, 149, 151
  472. };
  473. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  474. static const yytype_int8 yyrhs[] =
  475. {
  476. 32, 0, -1, -1, 32, 33, -1, 35, -1, 34,
  477. -1, 30, 4, 45, 3, -1, 30, 3, -1, 30,
  478. 30, 45, 3, -1, 30, 26, 30, 45, 3, -1,
  479. 30, 25, 30, 26, 30, 45, 3, -1, 30, 29,
  480. 45, 3, -1, 36, 29, 45, 3, -1, 37, 30,
  481. 45, 3, -1, 38, 30, 45, 3, -1, 39, 30,
  482. 45, 3, -1, 40, 30, 45, 3, -1, 41, 45,
  483. 3, -1, 42, 45, 3, -1, 43, 45, 3, -1,
  484. 44, 45, 3, -1, 30, 5, 45, 3, -1, 5,
  485. 45, 3, -1, 3, -1, 1, -1, 6, -1, 7,
  486. -1, 8, -1, 10, -1, 9, -1, 12, -1, 11,
  487. -1, 13, -1, 19, -1, 14, -1, 20, -1, 15,
  488. -1, 21, -1, 17, -1, 23, -1, 16, -1, 22,
  489. -1, 18, -1, 24, -1, -1, 45, 46, -1, 30,
  490. -1, 29, -1, 5, -1, 4, -1, 26, -1, 25,
  491. -1, 28, -1
  492. };
  493. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  494. static const yytype_uint16 yyrline[] =
  495. {
  496. 0, 115, 115, 115, 117, 117, 119, 125, 135, 165,
  497. 176, 189, 200, 207, 213, 219, 225, 231, 236, 241,
  498. 246, 251, 255, 256, 257, 262, 262, 262, 263, 263,
  499. 264, 264, 265, 265, 266, 266, 267, 267, 268, 268,
  500. 269, 269, 270, 270, 271, 271, 274, 275, 276, 277,
  501. 278, 279, 280
  502. };
  503. #endif
  504. #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
  505. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  506. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  507. static const char *const yytname[] =
  508. {
  509. "$end", "error", "$undefined", "EOSTMT", "ASSIGNMENT_OP", "GARBAGE",
  510. "CPP_INCLUDE", "F90PPR_INCLUDE", "COCO_INCLUDE", "F90PPR_DEFINE",
  511. "CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF",
  512. "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF",
  513. "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF",
  514. "F90PPR_ENDIF", "COMMA", "DCOLON", "CPP_TOENDL", "UNTERMINATED_STRING",
  515. "STRING", "WORD", "$accept", "code", "stmt", "assignment_stmt",
  516. "keyword_stmt", "include", "define", "undef", "ifdef", "ifndef", "if",
  517. "elif", "else", "endif", "other", "misc_code", 0
  518. };
  519. #endif
  520. # ifdef YYPRINT
  521. /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  522. token YYLEX-NUM. */
  523. static const yytype_uint16 yytoknum[] =
  524. {
  525. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  526. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  527. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  528. 285
  529. };
  530. # endif
  531. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  532. static const yytype_uint8 yyr1[] =
  533. {
  534. 0, 31, 32, 32, 33, 33, 34, 35, 35, 35,
  535. 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
  536. 35, 35, 35, 35, 35, 36, 36, 36, 37, 37,
  537. 38, 38, 39, 39, 40, 40, 41, 41, 42, 42,
  538. 43, 43, 44, 44, 45, 45, 46, 46, 46, 46,
  539. 46, 46, 46
  540. };
  541. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  542. static const yytype_uint8 yyr2[] =
  543. {
  544. 0, 2, 0, 2, 1, 1, 4, 2, 4, 5,
  545. 7, 4, 4, 4, 4, 4, 4, 3, 3, 3,
  546. 3, 4, 3, 1, 1, 1, 1, 1, 1, 1,
  547. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  548. 1, 1, 1, 1, 0, 2, 1, 1, 1, 1,
  549. 1, 1, 1
  550. };
  551. /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
  552. STATE-NUM when YYTABLE doesn't specify something else to do. Zero
  553. means the default is an error. */
  554. static const yytype_uint8 yydefact[] =
  555. {
  556. 2, 0, 1, 24, 23, 44, 25, 26, 27, 29,
  557. 28, 31, 30, 32, 34, 36, 40, 38, 42, 33,
  558. 35, 37, 41, 39, 43, 0, 3, 5, 4, 0,
  559. 0, 0, 0, 0, 44, 44, 44, 44, 0, 7,
  560. 44, 44, 0, 0, 44, 44, 44, 44, 44, 44,
  561. 44, 0, 0, 0, 0, 22, 49, 48, 51, 50,
  562. 52, 47, 46, 45, 0, 0, 0, 44, 0, 0,
  563. 0, 0, 0, 0, 0, 17, 18, 19, 20, 6,
  564. 21, 0, 0, 11, 8, 12, 13, 14, 15, 16,
  565. 44, 9, 0, 10
  566. };
  567. /* YYDEFGOTO[NTERM-NUM]. */
  568. static const yytype_int8 yydefgoto[] =
  569. {
  570. -1, 1, 26, 27, 28, 29, 30, 31, 32, 33,
  571. 34, 35, 36, 37, 38, 63
  572. };
  573. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  574. STATE-NUM. */
  575. #define YYPACT_NINF -35
  576. static const yytype_int16 yypact[] =
  577. {
  578. -35, 29, -35, -35, -35, -35, -35, -35, -35, -35,
  579. -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
  580. -35, -35, -35, -35, -35, 241, -35, -35, -35, -25,
  581. -22, -21, -13, -12, -35, -35, -35, -35, 57, -35,
  582. -35, -35, -11, -10, -35, -35, -35, -35, -35, -35,
  583. -35, 63, 69, 75, 103, -35, -35, -35, -35, -35,
  584. -35, -35, -35, -35, 109, 115, -5, -35, 121, 149,
  585. 155, 161, 167, 195, 201, -35, -35, -35, -35, -35,
  586. -35, -8, 207, -35, -35, -35, -35, -35, -35, -35,
  587. -35, -35, 213, -35
  588. };
  589. /* YYPGOTO[NTERM-NUM]. */
  590. static const yytype_int8 yypgoto[] =
  591. {
  592. -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
  593. -35, -35, -35, -35, -34, -35
  594. };
  595. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  596. positive, shift that token. If negative, reduce the rule which
  597. number is the opposite. If zero, do what YYDEFACT says.
  598. If YYTABLE_NINF, syntax error. */
  599. #define YYTABLE_NINF -1
  600. static const yytype_uint8 yytable[] =
  601. {
  602. 51, 52, 53, 54, 46, 0, 64, 65, 47, 48,
  603. 68, 69, 70, 71, 72, 73, 74, 49, 50, 66,
  604. 67, 81, 90, 0, 0, 0, 0, 0, 0, 2,
  605. 3, 0, 4, 82, 5, 6, 7, 8, 9, 10,
  606. 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  607. 21, 22, 23, 24, 0, 0, 92, 0, 0, 25,
  608. 55, 56, 57, 0, 0, 0, 75, 56, 57, 0,
  609. 0, 0, 76, 56, 57, 0, 0, 0, 77, 56,
  610. 57, 0, 58, 59, 0, 60, 61, 62, 58, 59,
  611. 0, 60, 61, 62, 58, 59, 0, 60, 61, 62,
  612. 58, 59, 0, 60, 61, 62, 78, 56, 57, 0,
  613. 0, 0, 79, 56, 57, 0, 0, 0, 80, 56,
  614. 57, 0, 0, 0, 83, 56, 57, 0, 58, 59,
  615. 0, 60, 61, 62, 58, 59, 0, 60, 61, 62,
  616. 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
  617. 61, 62, 84, 56, 57, 0, 0, 0, 85, 56,
  618. 57, 0, 0, 0, 86, 56, 57, 0, 0, 0,
  619. 87, 56, 57, 0, 58, 59, 0, 60, 61, 62,
  620. 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
  621. 61, 62, 58, 59, 0, 60, 61, 62, 88, 56,
  622. 57, 0, 0, 0, 89, 56, 57, 0, 0, 0,
  623. 91, 56, 57, 0, 0, 0, 93, 56, 57, 0,
  624. 58, 59, 0, 60, 61, 62, 58, 59, 0, 60,
  625. 61, 62, 58, 59, 0, 60, 61, 62, 58, 59,
  626. 0, 60, 61, 62, 39, 40, 41, 0, 0, 0,
  627. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  628. 0, 0, 0, 0, 0, 0, 42, 43, 0, 0,
  629. 44, 45
  630. };
  631. static const yytype_int8 yycheck[] =
  632. {
  633. 34, 35, 36, 37, 29, -1, 40, 41, 30, 30,
  634. 44, 45, 46, 47, 48, 49, 50, 30, 30, 30,
  635. 30, 26, 30, -1, -1, -1, -1, -1, -1, 0,
  636. 1, -1, 3, 67, 5, 6, 7, 8, 9, 10,
  637. 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  638. 21, 22, 23, 24, -1, -1, 90, -1, -1, 30,
  639. 3, 4, 5, -1, -1, -1, 3, 4, 5, -1,
  640. -1, -1, 3, 4, 5, -1, -1, -1, 3, 4,
  641. 5, -1, 25, 26, -1, 28, 29, 30, 25, 26,
  642. -1, 28, 29, 30, 25, 26, -1, 28, 29, 30,
  643. 25, 26, -1, 28, 29, 30, 3, 4, 5, -1,
  644. -1, -1, 3, 4, 5, -1, -1, -1, 3, 4,
  645. 5, -1, -1, -1, 3, 4, 5, -1, 25, 26,
  646. -1, 28, 29, 30, 25, 26, -1, 28, 29, 30,
  647. 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
  648. 29, 30, 3, 4, 5, -1, -1, -1, 3, 4,
  649. 5, -1, -1, -1, 3, 4, 5, -1, -1, -1,
  650. 3, 4, 5, -1, 25, 26, -1, 28, 29, 30,
  651. 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
  652. 29, 30, 25, 26, -1, 28, 29, 30, 3, 4,
  653. 5, -1, -1, -1, 3, 4, 5, -1, -1, -1,
  654. 3, 4, 5, -1, -1, -1, 3, 4, 5, -1,
  655. 25, 26, -1, 28, 29, 30, 25, 26, -1, 28,
  656. 29, 30, 25, 26, -1, 28, 29, 30, 25, 26,
  657. -1, 28, 29, 30, 3, 4, 5, -1, -1, -1,
  658. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  659. -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
  660. 29, 30
  661. };
  662. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  663. symbol of state STATE-NUM. */
  664. static const yytype_uint8 yystos[] =
  665. {
  666. 0, 32, 0, 1, 3, 5, 6, 7, 8, 9,
  667. 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
  668. 20, 21, 22, 23, 24, 30, 33, 34, 35, 36,
  669. 37, 38, 39, 40, 41, 42, 43, 44, 45, 3,
  670. 4, 5, 25, 26, 29, 30, 29, 30, 30, 30,
  671. 30, 45, 45, 45, 45, 3, 4, 5, 25, 26,
  672. 28, 29, 30, 46, 45, 45, 30, 30, 45, 45,
  673. 45, 45, 45, 45, 45, 3, 3, 3, 3, 3,
  674. 3, 26, 45, 3, 3, 3, 3, 3, 3, 3,
  675. 30, 3, 45, 3
  676. };
  677. #define yyerrok (yyerrstatus = 0)
  678. #define yyclearin (yychar = YYEMPTY)
  679. #define YYEMPTY (-2)
  680. #define YYEOF 0
  681. #define YYACCEPT goto yyacceptlab
  682. #define YYABORT goto yyabortlab
  683. #define YYERROR goto yyerrorlab
  684. /* Like YYERROR except do call yyerror. This remains here temporarily
  685. to ease the transition to the new meaning of YYERROR, for GCC.
  686. Once GCC version 2 has supplanted version 1, this can go. */
  687. #define YYFAIL goto yyerrlab
  688. #define YYRECOVERING() (!!yyerrstatus)
  689. #define YYBACKUP(Token, Value) \
  690. do \
  691. if (yychar == YYEMPTY && yylen == 1) \
  692. { \
  693. yychar = (Token); \
  694. yylval = (Value); \
  695. yytoken = YYTRANSLATE (yychar); \
  696. YYPOPSTACK (1); \
  697. goto yybackup; \
  698. } \
  699. else \
  700. { \
  701. yyerror (YY_("syntax error: cannot back up")); \
  702. YYERROR; \
  703. } \
  704. while (YYID (0))
  705. #define YYTERROR 1
  706. #define YYERRCODE 256
  707. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  708. If N is 0, then set CURRENT to the empty location which ends
  709. the previous symbol: RHS[0] (always defined). */
  710. #define YYRHSLOC(Rhs, K) ((Rhs)[K])
  711. #ifndef YYLLOC_DEFAULT
  712. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  713. do \
  714. if (YYID (N)) \
  715. { \
  716. (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  717. (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  718. (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  719. (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  720. } \
  721. else \
  722. { \
  723. (Current).first_line = (Current).last_line = \
  724. YYRHSLOC (Rhs, 0).last_line; \
  725. (Current).first_column = (Current).last_column = \
  726. YYRHSLOC (Rhs, 0).last_column; \
  727. } \
  728. while (YYID (0))
  729. #endif
  730. /* YY_LOCATION_PRINT -- Print the location on the stream.
  731. This macro was not mandated originally: define only if we know
  732. we won't break user code: when these are the locations we know. */
  733. #ifndef YY_LOCATION_PRINT
  734. # if YYLTYPE_IS_TRIVIAL
  735. # define YY_LOCATION_PRINT(File, Loc) \
  736. fprintf (File, "%d.%d-%d.%d", \
  737. (Loc).first_line, (Loc).first_column, \
  738. (Loc).last_line, (Loc).last_column)
  739. # else
  740. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  741. # endif
  742. #endif
  743. /* YYLEX -- calling `yylex' with the right arguments. */
  744. #ifdef YYLEX_PARAM
  745. # define YYLEX yylex (&yylval, YYLEX_PARAM)
  746. #else
  747. # define YYLEX yylex (&yylval)
  748. #endif
  749. /* Enable debugging if requested. */
  750. #if YYDEBUG
  751. # ifndef YYFPRINTF
  752. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  753. # define YYFPRINTF fprintf
  754. # endif
  755. # define YYDPRINTF(Args) \
  756. do { \
  757. if (yydebug) \
  758. YYFPRINTF Args; \
  759. } while (YYID (0))
  760. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  761. do { \
  762. if (yydebug) \
  763. { \
  764. YYFPRINTF (stderr, "%s ", Title); \
  765. yy_symbol_print (stderr, \
  766. Type, Value); \
  767. YYFPRINTF (stderr, "\n"); \
  768. } \
  769. } while (YYID (0))
  770. /*--------------------------------.
  771. | Print this symbol on YYOUTPUT. |
  772. `--------------------------------*/
  773. /*ARGSUSED*/
  774. #if (defined __STDC__ || defined __C99__FUNC__ \
  775. || defined __cplusplus || defined _MSC_VER)
  776. static void
  777. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
  778. #else
  779. static void
  780. yy_symbol_value_print (yyoutput, yytype, yyvaluep)
  781. FILE *yyoutput;
  782. int yytype;
  783. YYSTYPE const * const yyvaluep;
  784. #endif
  785. {
  786. if (!yyvaluep)
  787. return;
  788. # ifdef YYPRINT
  789. if (yytype < YYNTOKENS)
  790. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  791. # else
  792. YYUSE (yyoutput);
  793. # endif
  794. switch (yytype)
  795. {
  796. default:
  797. break;
  798. }
  799. }
  800. /*--------------------------------.
  801. | Print this symbol on YYOUTPUT. |
  802. `--------------------------------*/
  803. #if (defined __STDC__ || defined __C99__FUNC__ \
  804. || defined __cplusplus || defined _MSC_VER)
  805. static void
  806. yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
  807. #else
  808. static void
  809. yy_symbol_print (yyoutput, yytype, yyvaluep)
  810. FILE *yyoutput;
  811. int yytype;
  812. YYSTYPE const * const yyvaluep;
  813. #endif
  814. {
  815. if (yytype < YYNTOKENS)
  816. YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  817. else
  818. YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  819. yy_symbol_value_print (yyoutput, yytype, yyvaluep);
  820. YYFPRINTF (yyoutput, ")");
  821. }
  822. /*------------------------------------------------------------------.
  823. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  824. | TOP (included). |
  825. `------------------------------------------------------------------*/
  826. #if (defined __STDC__ || defined __C99__FUNC__ \
  827. || defined __cplusplus || defined _MSC_VER)
  828. static void
  829. yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
  830. #else
  831. static void
  832. yy_stack_print (yybottom, yytop)
  833. yytype_int16 *yybottom;
  834. yytype_int16 *yytop;
  835. #endif
  836. {
  837. YYFPRINTF (stderr, "Stack now");
  838. for (; yybottom <= yytop; yybottom++)
  839. {
  840. int yybot = *yybottom;
  841. YYFPRINTF (stderr, " %d", yybot);
  842. }
  843. YYFPRINTF (stderr, "\n");
  844. }
  845. # define YY_STACK_PRINT(Bottom, Top) \
  846. do { \
  847. if (yydebug) \
  848. yy_stack_print ((Bottom), (Top)); \
  849. } while (YYID (0))
  850. /*------------------------------------------------.
  851. | Report that the YYRULE is going to be reduced. |
  852. `------------------------------------------------*/
  853. #if (defined __STDC__ || defined __C99__FUNC__ \
  854. || defined __cplusplus || defined _MSC_VER)
  855. static void
  856. yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
  857. #else
  858. static void
  859. yy_reduce_print (yyvsp, yyrule)
  860. YYSTYPE *yyvsp;
  861. int yyrule;
  862. #endif
  863. {
  864. int yynrhs = yyr2[yyrule];
  865. int yyi;
  866. unsigned long int yylno = yyrline[yyrule];
  867. YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
  868. yyrule - 1, yylno);
  869. /* The symbols being reduced. */
  870. for (yyi = 0; yyi < yynrhs; yyi++)
  871. {
  872. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  873. yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
  874. &(yyvsp[(yyi + 1) - (yynrhs)])
  875. );
  876. YYFPRINTF (stderr, "\n");
  877. }
  878. }
  879. # define YY_REDUCE_PRINT(Rule) \
  880. do { \
  881. if (yydebug) \
  882. yy_reduce_print (yyvsp, Rule); \
  883. } while (YYID (0))
  884. /* Nonzero means print parse trace. It is left uninitialized so that
  885. multiple parsers can coexist. */
  886. int yydebug;
  887. #else /* !YYDEBUG */
  888. # define YYDPRINTF(Args)
  889. # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  890. # define YY_STACK_PRINT(Bottom, Top)
  891. # define YY_REDUCE_PRINT(Rule)
  892. #endif /* !YYDEBUG */
  893. /* YYINITDEPTH -- initial size of the parser's stacks. */
  894. #ifndef YYINITDEPTH
  895. # define YYINITDEPTH 200
  896. #endif
  897. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  898. if the built-in stack extension method is used).
  899. Do not make this value too large; the results are undefined if
  900. YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  901. evaluated with infinite-precision integer arithmetic. */
  902. #ifndef YYMAXDEPTH
  903. # define YYMAXDEPTH 10000
  904. #endif
  905. #if YYERROR_VERBOSE
  906. # ifndef yystrlen
  907. # if defined __GLIBC__ && defined _STRING_H
  908. # define yystrlen strlen
  909. # else
  910. /* Return the length of YYSTR. */
  911. #if (defined __STDC__ || defined __C99__FUNC__ \
  912. || defined __cplusplus || defined _MSC_VER)
  913. static YYSIZE_T
  914. yystrlen (const char *yystr)
  915. #else
  916. static YYSIZE_T
  917. yystrlen (yystr)
  918. const char *yystr;
  919. #endif
  920. {
  921. YYSIZE_T yylen;
  922. for (yylen = 0; yystr[yylen]; yylen++)
  923. continue;
  924. return yylen;
  925. }
  926. # endif
  927. # endif
  928. # ifndef yystpcpy
  929. # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
  930. # define yystpcpy stpcpy
  931. # else
  932. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  933. YYDEST. */
  934. #if (defined __STDC__ || defined __C99__FUNC__ \
  935. || defined __cplusplus || defined _MSC_VER)
  936. static char *
  937. yystpcpy (char *yydest, const char *yysrc)
  938. #else
  939. static char *
  940. yystpcpy (yydest, yysrc)
  941. char *yydest;
  942. const char *yysrc;
  943. #endif
  944. {
  945. char *yyd = yydest;
  946. const char *yys = yysrc;
  947. while ((*yyd++ = *yys++) != '\0')
  948. continue;
  949. return yyd - 1;
  950. }
  951. # endif
  952. # endif
  953. # ifndef yytnamerr
  954. /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  955. quotes and backslashes, so that it's suitable for yyerror. The
  956. heuristic is that double-quoting is unnecessary unless the string
  957. contains an apostrophe, a comma, or backslash (other than
  958. backslash-backslash). YYSTR is taken from yytname. If YYRES is
  959. null, do not copy; instead, return the length of what the result
  960. would have been. */
  961. static YYSIZE_T
  962. yytnamerr (char *yyres, const char *yystr)
  963. {
  964. if (*yystr == '"')
  965. {
  966. YYSIZE_T yyn = 0;
  967. char const *yyp = yystr;
  968. for (;;)
  969. switch (*++yyp)
  970. {
  971. case '\'':
  972. case ',':
  973. goto do_not_strip_quotes;
  974. case '\\':
  975. if (*++yyp != '\\')
  976. goto do_not_strip_quotes;
  977. /* Fall through. */
  978. default:
  979. if (yyres)
  980. yyres[yyn] = *yyp;
  981. yyn++;
  982. break;
  983. case '"':
  984. if (yyres)
  985. yyres[yyn] = '\0';
  986. return yyn;
  987. }
  988. do_not_strip_quotes: ;
  989. }
  990. if (! yyres)
  991. return yystrlen (yystr);
  992. return yystpcpy (yyres, yystr) - yyres;
  993. }
  994. # endif
  995. /* Copy into YYRESULT an error message about the unexpected token
  996. YYCHAR while in state YYSTATE. Return the number of bytes copied,
  997. including the terminating null byte. If YYRESULT is null, do not
  998. copy anything; just return the number of bytes that would be
  999. copied. As a special case, return 0 if an ordinary "syntax error"
  1000. message will do. Return YYSIZE_MAXIMUM if overflow occurs during
  1001. size calculation. */
  1002. static YYSIZE_T
  1003. yysyntax_error (char *yyresult, int yystate, int yychar)
  1004. {
  1005. int yyn = yypact[yystate];
  1006. if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
  1007. return 0;
  1008. else
  1009. {
  1010. int yytype = YYTRANSLATE (yychar);
  1011. YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
  1012. YYSIZE_T yysize = yysize0;
  1013. YYSIZE_T yysize1;
  1014. int yysize_overflow = 0;
  1015. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  1016. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  1017. int yyx;
  1018. # if 0
  1019. /* This is so xgettext sees the translatable formats that are
  1020. constructed on the fly. */
  1021. YY_("syntax error, unexpected %s");
  1022. YY_("syntax error, unexpected %s, expecting %s");
  1023. YY_("syntax error, unexpected %s, expecting %s or %s");
  1024. YY_("syntax error, unexpected %s, expecting %s or %s or %s");
  1025. YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
  1026. # endif
  1027. char *yyfmt;
  1028. char const *yyf;
  1029. static char const yyunexpected[] = "syntax error, unexpected %s";
  1030. static char const yyexpecting[] = ", expecting %s";
  1031. static char const yyor[] = " or %s";
  1032. char yyformat[sizeof yyunexpected
  1033. + sizeof yyexpecting - 1
  1034. + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
  1035. * (sizeof yyor - 1))];
  1036. char const *yyprefix = yyexpecting;
  1037. /* Start YYX at -YYN if negative to avoid negative indexes in
  1038. YYCHECK. */
  1039. int yyxbegin = yyn < 0 ? -yyn : 0;
  1040. /* Stay within bounds of both yycheck and yytname. */
  1041. int yychecklim = YYLAST - yyn + 1;
  1042. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  1043. int yycount = 1;
  1044. yyarg[0] = yytname[yytype];
  1045. yyfmt = yystpcpy (yyformat, yyunexpected);
  1046. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  1047. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
  1048. {
  1049. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  1050. {
  1051. yycount = 1;
  1052. yysize = yysize0;
  1053. yyformat[sizeof yyunexpected - 1] = '\0';
  1054. break;
  1055. }
  1056. yyarg[yycount++] = yytname[yyx];
  1057. yysize1 = yysize + yytnamerr (0, yytname[yyx]);
  1058. yysize_overflow |= (yysize1 < yysize);
  1059. yysize = yysize1;
  1060. yyfmt = yystpcpy (yyfmt, yyprefix);
  1061. yyprefix = yyor;
  1062. }
  1063. yyf = YY_(yyformat);
  1064. yysize1 = yysize + yystrlen (yyf);
  1065. yysize_overflow |= (yysize1 < yysize);
  1066. yysize = yysize1;
  1067. if (yysize_overflow)
  1068. return YYSIZE_MAXIMUM;
  1069. if (yyresult)
  1070. {
  1071. /* Avoid sprintf, as that infringes on the user's name space.
  1072. Don't have undefined behavior even if the translation
  1073. produced a string with the wrong number of "%s"s. */
  1074. char *yyp = yyresult;
  1075. int yyi = 0;
  1076. while ((*yyp = *yyf) != '\0')
  1077. {
  1078. if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
  1079. {
  1080. yyp += yytnamerr (yyp, yyarg[yyi++]);
  1081. yyf += 2;
  1082. }
  1083. else
  1084. {
  1085. yyp++;
  1086. yyf++;
  1087. }
  1088. }
  1089. }
  1090. return yysize;
  1091. }
  1092. }
  1093. #endif /* YYERROR_VERBOSE */
  1094. /*-----------------------------------------------.
  1095. | Release the memory associated to this symbol. |
  1096. `-----------------------------------------------*/
  1097. /*ARGSUSED*/
  1098. #if (defined __STDC__ || defined __C99__FUNC__ \
  1099. || defined __cplusplus || defined _MSC_VER)
  1100. static void
  1101. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
  1102. #else
  1103. static void
  1104. yydestruct (yymsg, yytype, yyvaluep)
  1105. const char *yymsg;
  1106. int yytype;
  1107. YYSTYPE *yyvaluep;
  1108. #endif
  1109. {
  1110. YYUSE (yyvaluep);
  1111. if (!yymsg)
  1112. yymsg = "Deleting";
  1113. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  1114. switch (yytype)
  1115. {
  1116. default:
  1117. break;
  1118. }
  1119. }
  1120. /* Prevent warnings from -Wmissing-prototypes. */
  1121. #ifdef YYPARSE_PARAM
  1122. #if defined __STDC__ || defined __cplusplus
  1123. int yyparse (void *YYPARSE_PARAM);
  1124. #else
  1125. int yyparse ();
  1126. #endif
  1127. #else /* ! YYPARSE_PARAM */
  1128. #if defined __STDC__ || defined __cplusplus
  1129. int yyparse (void);
  1130. #else
  1131. int yyparse ();
  1132. #endif
  1133. #endif /* ! YYPARSE_PARAM */
  1134. /*-------------------------.
  1135. | yyparse or yypush_parse. |
  1136. `-------------------------*/
  1137. #ifdef YYPARSE_PARAM
  1138. #if (defined __STDC__ || defined __C99__FUNC__ \
  1139. || defined __cplusplus || defined _MSC_VER)
  1140. int
  1141. yyparse (void *YYPARSE_PARAM)
  1142. #else
  1143. int
  1144. yyparse (YYPARSE_PARAM)
  1145. void *YYPARSE_PARAM;
  1146. #endif
  1147. #else /* ! YYPARSE_PARAM */
  1148. #if (defined __STDC__ || defined __C99__FUNC__ \
  1149. || defined __cplusplus || defined _MSC_VER)
  1150. int
  1151. yyparse (void)
  1152. #else
  1153. int
  1154. yyparse ()
  1155. #endif
  1156. #endif
  1157. {
  1158. /* The lookahead symbol. */
  1159. int yychar;
  1160. /* The semantic value of the lookahead symbol. */
  1161. YYSTYPE yylval;
  1162. /* Number of syntax errors so far. */
  1163. int yynerrs;
  1164. int yystate;
  1165. /* Number of tokens to shift before error messages enabled. */
  1166. int yyerrstatus;
  1167. /* The stacks and their tools:
  1168. `yyss': related to states.
  1169. `yyvs': related to semantic values.
  1170. Refer to the stacks thru separate pointers, to allow yyoverflow
  1171. to reallocate them elsewhere. */
  1172. /* The state stack. */
  1173. yytype_int16 yyssa[YYINITDEPTH];
  1174. yytype_int16 *yyss;
  1175. yytype_int16 *yyssp;
  1176. /* The semantic value stack. */
  1177. YYSTYPE yyvsa[YYINITDEPTH];
  1178. YYSTYPE *yyvs;
  1179. YYSTYPE *yyvsp;
  1180. YYSIZE_T yystacksize;
  1181. int yyn;
  1182. int yyresult;
  1183. /* Lookahead token as an internal (translated) token number. */
  1184. int yytoken;
  1185. /* The variables used to return semantic value and location from the
  1186. action routines. */
  1187. YYSTYPE yyval;
  1188. #if YYERROR_VERBOSE
  1189. /* Buffer for error messages, and its allocated size. */
  1190. char yymsgbuf[128];
  1191. char *yymsg = yymsgbuf;
  1192. YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
  1193. #endif
  1194. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
  1195. /* The number of symbols on the RHS of the reduced rule.
  1196. Keep to zero when no symbol should be popped. */
  1197. int yylen = 0;
  1198. yytoken = 0;
  1199. yyss = yyssa;
  1200. yyvs = yyvsa;
  1201. yystacksize = YYINITDEPTH;
  1202. YYDPRINTF ((stderr, "Starting parse\n"));
  1203. yystate = 0;
  1204. yyerrstatus = 0;
  1205. yynerrs = 0;
  1206. yychar = YYEMPTY; /* Cause a token to be read. */
  1207. /* Initialize stack pointers.
  1208. Waste one element of value and location stack
  1209. so that they stay on the same level as the state stack.
  1210. The wasted elements are never initialized. */
  1211. yyssp = yyss;
  1212. yyvsp = yyvs;
  1213. goto yysetstate;
  1214. /*------------------------------------------------------------.
  1215. | yynewstate -- Push a new state, which is found in yystate. |
  1216. `------------------------------------------------------------*/
  1217. yynewstate:
  1218. /* In all cases, when you get here, the value and location stacks
  1219. have just been pushed. So pushing a state here evens the stacks. */
  1220. yyssp++;
  1221. yysetstate:
  1222. *yyssp = yystate;
  1223. if (yyss + yystacksize - 1 <= yyssp)
  1224. {
  1225. /* Get the current used size of the three stacks, in elements. */
  1226. YYSIZE_T yysize = yyssp - yyss + 1;
  1227. #ifdef yyoverflow
  1228. {
  1229. /* Give user a chance to reallocate the stack. Use copies of
  1230. these so that the &'s don't force the real ones into
  1231. memory. */
  1232. YYSTYPE *yyvs1 = yyvs;
  1233. yytype_int16 *yyss1 = yyss;
  1234. /* Each stack pointer address is followed by the size of the
  1235. data in use in that stack, in bytes. This used to be a
  1236. conditional around just the two extra args, but that might
  1237. be undefined if yyoverflow is a macro. */
  1238. yyoverflow (YY_("memory exhausted"),
  1239. &yyss1, yysize * sizeof (*yyssp),
  1240. &yyvs1, yysize * sizeof (*yyvsp),
  1241. &yystacksize);
  1242. yyss = yyss1;
  1243. yyvs = yyvs1;
  1244. }
  1245. #else /* no yyoverflow */
  1246. # ifndef YYSTACK_RELOCATE
  1247. goto yyexhaustedlab;
  1248. # else
  1249. /* Extend the stack our own way. */
  1250. if (YYMAXDEPTH <= yystacksize)
  1251. goto yyexhaustedlab;
  1252. yystacksize *= 2;
  1253. if (YYMAXDEPTH < yystacksize)
  1254. yystacksize = YYMAXDEPTH;
  1255. {
  1256. yytype_int16 *yyss1 = yyss;
  1257. union yyalloc *yyptr =
  1258. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  1259. if (! yyptr)
  1260. goto yyexhaustedlab;
  1261. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1262. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1263. # undef YYSTACK_RELOCATE
  1264. if (yyss1 != yyssa)
  1265. YYSTACK_FREE (yyss1);
  1266. }
  1267. # endif
  1268. #endif /* no yyoverflow */
  1269. yyssp = yyss + yysize - 1;
  1270. yyvsp = yyvs + yysize - 1;
  1271. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  1272. (unsigned long int) yystacksize));
  1273. if (yyss + yystacksize - 1 <= yyssp)
  1274. YYABORT;
  1275. }
  1276. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1277. if (yystate == YYFINAL)
  1278. YYACCEPT;
  1279. goto yybackup;
  1280. /*-----------.
  1281. | yybackup. |
  1282. `-----------*/
  1283. yybackup:
  1284. /* Do appropriate processing given the current state. Read a
  1285. lookahead token if we need one and don't already have one. */
  1286. /* First try to decide what to do without reference to lookahead token. */
  1287. yyn = yypact[yystate];
  1288. if (yyn == YYPACT_NINF)
  1289. goto yydefault;
  1290. /* Not known => get a lookahead token if don't already have one. */
  1291. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  1292. if (yychar == YYEMPTY)
  1293. {
  1294. YYDPRINTF ((stderr, "Reading a token: "));
  1295. yychar = YYLEX;
  1296. }
  1297. if (yychar <= YYEOF)
  1298. {
  1299. yychar = yytoken = YYEOF;
  1300. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1301. }
  1302. else
  1303. {
  1304. yytoken = YYTRANSLATE (yychar);
  1305. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1306. }
  1307. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1308. detect an error, take that action. */
  1309. yyn += yytoken;
  1310. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1311. goto yydefault;
  1312. yyn = yytable[yyn];
  1313. if (yyn <= 0)
  1314. {
  1315. if (yyn == 0 || yyn == YYTABLE_NINF)
  1316. goto yyerrlab;
  1317. yyn = -yyn;
  1318. goto yyreduce;
  1319. }
  1320. /* Count tokens shifted since error; after three, turn off error
  1321. status. */
  1322. if (yyerrstatus)
  1323. yyerrstatus--;
  1324. /* Shift the lookahead token. */
  1325. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1326. /* Discard the shifted token. */
  1327. yychar = YYEMPTY;
  1328. yystate = yyn;
  1329. *++yyvsp = yylval;
  1330. goto yynewstate;
  1331. /*-----------------------------------------------------------.
  1332. | yydefault -- do the default action for the current state. |
  1333. `-----------------------------------------------------------*/
  1334. yydefault:
  1335. yyn = yydefact[yystate];
  1336. if (yyn == 0)
  1337. goto yyerrlab;
  1338. goto yyreduce;
  1339. /*-----------------------------.
  1340. | yyreduce -- Do a reduction. |
  1341. `-----------------------------*/
  1342. yyreduce:
  1343. /* yyn is the number of a rule to reduce with. */
  1344. yylen = yyr2[yyn];
  1345. /* If YYLEN is nonzero, implement the default value of the action:
  1346. `$$ = $1'.
  1347. Otherwise, the following line sets YYVAL to garbage.
  1348. This behavior is undocumented and Bison
  1349. users should not rely upon it. Assigning to YYVAL
  1350. unconditionally makes the parser a bit smaller, and it avoids a
  1351. GCC warning that YYVAL may be used uninitialized. */
  1352. yyval = yyvsp[1-yylen];
  1353. YY_REDUCE_PRINT (yyn);
  1354. switch (yyn)
  1355. {
  1356. case 6:
  1357. /* Line 1455 of yacc.c */
  1358. #line 120 "cmDependsFortranParser.y"
  1359. {
  1360. free((yyvsp[(1) - (4)].string));
  1361. }
  1362. break;
  1363. case 7:
  1364. /* Line 1455 of yacc.c */
  1365. #line 126 "cmDependsFortranParser.y"
  1366. {
  1367. if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (2)].string), "interface"))
  1368. {
  1369. cmDependsFortranParser* parser =
  1370. cmDependsFortran_yyget_extra(yyscanner);
  1371. cmDependsFortranParser_SetInInterface(parser, true);
  1372. }
  1373. free((yyvsp[(1) - (2)].string));
  1374. }
  1375. break;
  1376. case 8:
  1377. /* Line 1455 of yacc.c */
  1378. #line 136 "cmDependsFortranParser.y"
  1379. {
  1380. if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "use"))
  1381. {
  1382. cmDependsFortranParser* parser =
  1383. cmDependsFortran_yyget_extra(yyscanner);
  1384. cmDependsFortranParser_RuleUse(parser, (yyvsp[(2) - (4)].string));
  1385. }
  1386. else if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "module"))
  1387. {
  1388. cmDependsFortranParser* parser =
  1389. cmDependsFortran_yyget_extra(yyscanner);
  1390. cmDependsFortranParser_RuleModule(parser, (yyvsp[(2) - (4)].string));
  1391. }
  1392. else if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "interface"))
  1393. {
  1394. cmDependsFortranParser* parser =
  1395. cmDependsFortran_yyget_extra(yyscanner);
  1396. cmDependsFortranParser_SetInInterface(parser, true);
  1397. }
  1398. else if (cmDependsFortranParserIsKeyword((yyvsp[(2) - (4)].string), "interface") &&
  1399. cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "end"))
  1400. {
  1401. cmDependsFortranParser* parser =
  1402. cmDependsFortran_yyget_extra(yyscanner);
  1403. cmDependsFortranParser_SetInInterface(parser, false);
  1404. }
  1405. free((yyvsp[(1) - (4)].string));
  1406. free((yyvsp[(2) - (4)].string));
  1407. }
  1408. break;
  1409. case 9:
  1410. /* Line 1455 of yacc.c */
  1411. #line 166 "cmDependsFortranParser.y"
  1412. {
  1413. if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (5)].string), "use"))
  1414. {
  1415. cmDependsFortranParser* parser =
  1416. cmDependsFortran_yyget_extra(yyscanner);
  1417. cmDependsFortranParser_RuleUse(parser, (yyvsp[(3) - (5)].string));
  1418. }
  1419. free((yyvsp[(1) - (5)].string));
  1420. free((yyvsp[(3) - (5)].string));
  1421. }
  1422. break;
  1423. case 10:
  1424. /* Line 1455 of yacc.c */
  1425. #line 177 "cmDependsFortranParser.y"
  1426. {
  1427. if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (7)].string), "use") &&
  1428. cmDependsFortranParserIsKeyword((yyvsp[(3) - (7)].string), "non_intrinsic") )
  1429. {
  1430. cmDependsFortranParser* parser =
  1431. cmDependsFortran_yyget_extra(yyscanner);
  1432. cmDependsFortranParser_RuleUse(parser, (yyvsp[(5) - (7)].string));
  1433. }
  1434. free((yyvsp[(1) - (7)].string));
  1435. free((yyvsp[(3) - (7)].string));
  1436. free((yyvsp[(5) - (7)].string));
  1437. }
  1438. break;
  1439. case 11:
  1440. /* Line 1455 of yacc.c */
  1441. #line 190 "cmDependsFortranParser.y"
  1442. {
  1443. if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "include"))
  1444. {
  1445. cmDependsFortranParser* parser =
  1446. cmDependsFortran_yyget_extra(yyscanner);
  1447. cmDependsFortranParser_RuleInclude(parser, (yyvsp[(2) - (4)].string));
  1448. }
  1449. free((yyvsp[(1) - (4)].string));
  1450. free((yyvsp[(2) - (4)].string));
  1451. }
  1452. break;
  1453. case 12:
  1454. /* Line 1455 of yacc.c */
  1455. #line 201 "cmDependsFortranParser.y"
  1456. {
  1457. cmDependsFortranParser* parser =
  1458. cmDependsFortran_yyget_extra(yyscanner);
  1459. cmDependsFortranParser_RuleInclude(parser, (yyvsp[(2) - (4)].string));
  1460. free((yyvsp[(2) - (4)].string));
  1461. }
  1462. break;
  1463. case 13:
  1464. /* Line 1455 of yacc.c */
  1465. #line 208 "cmDependsFortranParser.y"
  1466. {
  1467. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1468. cmDependsFortranParser_RuleDefine(parser, (yyvsp[(2) - (4)].string));
  1469. free((yyvsp[(2) - (4)].string));
  1470. }
  1471. break;
  1472. case 14:
  1473. /* Line 1455 of yacc.c */
  1474. #line 214 "cmDependsFortranParser.y"
  1475. {
  1476. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1477. cmDependsFortranParser_RuleUndef(parser, (yyvsp[(2) - (4)].string));
  1478. free((yyvsp[(2) - (4)].string));
  1479. }
  1480. break;
  1481. case 15:
  1482. /* Line 1455 of yacc.c */
  1483. #line 220 "cmDependsFortranParser.y"
  1484. {
  1485. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1486. cmDependsFortranParser_RuleIfdef(parser, (yyvsp[(2) - (4)].string));
  1487. free((yyvsp[(2) - (4)].string));
  1488. }
  1489. break;
  1490. case 16:
  1491. /* Line 1455 of yacc.c */
  1492. #line 226 "cmDependsFortranParser.y"
  1493. {
  1494. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1495. cmDependsFortranParser_RuleIfndef(parser, (yyvsp[(2) - (4)].string));
  1496. free((yyvsp[(2) - (4)].string));
  1497. }
  1498. break;
  1499. case 17:
  1500. /* Line 1455 of yacc.c */
  1501. #line 232 "cmDependsFortranParser.y"
  1502. {
  1503. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1504. cmDependsFortranParser_RuleIf(parser);
  1505. }
  1506. break;
  1507. case 18:
  1508. /* Line 1455 of yacc.c */
  1509. #line 237 "cmDependsFortranParser.y"
  1510. {
  1511. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1512. cmDependsFortranParser_RuleElif(parser);
  1513. }
  1514. break;
  1515. case 19:
  1516. /* Line 1455 of yacc.c */
  1517. #line 242 "cmDependsFortranParser.y"
  1518. {
  1519. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1520. cmDependsFortranParser_RuleElse(parser);
  1521. }
  1522. break;
  1523. case 20:
  1524. /* Line 1455 of yacc.c */
  1525. #line 247 "cmDependsFortranParser.y"
  1526. {
  1527. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1528. cmDependsFortranParser_RuleEndif(parser);
  1529. }
  1530. break;
  1531. case 21:
  1532. /* Line 1455 of yacc.c */
  1533. #line 252 "cmDependsFortranParser.y"
  1534. {
  1535. free((yyvsp[(1) - (4)].string));
  1536. }
  1537. break;
  1538. case 46:
  1539. /* Line 1455 of yacc.c */
  1540. #line 274 "cmDependsFortranParser.y"
  1541. { free ((yyvsp[(1) - (1)].string)); }
  1542. break;
  1543. case 47:
  1544. /* Line 1455 of yacc.c */
  1545. #line 275 "cmDependsFortranParser.y"
  1546. { free ((yyvsp[(1) - (1)].string)); }
  1547. break;
  1548. /* Line 1455 of yacc.c */
  1549. #line 1821 "cmDependsFortranParser.cxx"
  1550. default: break;
  1551. }
  1552. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
  1553. YYPOPSTACK (yylen);
  1554. yylen = 0;
  1555. YY_STACK_PRINT (yyss, yyssp);
  1556. *++yyvsp = yyval;
  1557. /* Now `shift' the result of the reduction. Determine what state
  1558. that goes to, based on the state we popped back to and the rule
  1559. number reduced by. */
  1560. yyn = yyr1[yyn];
  1561. yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  1562. if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1563. yystate = yytable[yystate];
  1564. else
  1565. yystate = yydefgoto[yyn - YYNTOKENS];
  1566. goto yynewstate;
  1567. /*------------------------------------.
  1568. | yyerrlab -- here on detecting error |
  1569. `------------------------------------*/
  1570. yyerrlab:
  1571. /* If not already recovering from an error, report this error. */
  1572. if (!yyerrstatus)
  1573. {
  1574. ++yynerrs;
  1575. #if ! YYERROR_VERBOSE
  1576. yyerror (YY_("syntax error"));
  1577. #else
  1578. {
  1579. YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
  1580. if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
  1581. {
  1582. YYSIZE_T yyalloc = 2 * yysize;
  1583. if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
  1584. yyalloc = YYSTACK_ALLOC_MAXIMUM;
  1585. if (yymsg != yymsgbuf)
  1586. YYSTACK_FREE (yymsg);
  1587. yymsg = (char *) YYSTACK_ALLOC (yyalloc);
  1588. if (yymsg)
  1589. yymsg_alloc = yyalloc;
  1590. else
  1591. {
  1592. yymsg = yymsgbuf;
  1593. yymsg_alloc = sizeof yymsgbuf;
  1594. }
  1595. }
  1596. if (0 < yysize && yysize <= yymsg_alloc)
  1597. {
  1598. (void) yysyntax_error (yymsg, yystate, yychar);
  1599. yyerror (yymsg);
  1600. }
  1601. else
  1602. {
  1603. yyerror (YY_("syntax error"));
  1604. if (yysize != 0)
  1605. goto yyexhaustedlab;
  1606. }
  1607. }
  1608. #endif
  1609. }
  1610. if (yyerrstatus == 3)
  1611. {
  1612. /* If just tried and failed to reuse lookahead token after an
  1613. error, discard it. */
  1614. if (yychar <= YYEOF)
  1615. {
  1616. /* Return failure if at end of input. */
  1617. if (yychar == YYEOF)
  1618. YYABORT;
  1619. }
  1620. else
  1621. {
  1622. yydestruct ("Error: discarding",
  1623. yytoken, &yylval);
  1624. yychar = YYEMPTY;
  1625. }
  1626. }
  1627. #if 0
  1628. /* Else will try to reuse lookahead token after shifting the error
  1629. token. */
  1630. goto yyerrlab1;
  1631. /*---------------------------------------------------.
  1632. | yyerrorlab -- error raised explicitly by YYERROR. |
  1633. `---------------------------------------------------*/
  1634. yyerrorlab:
  1635. /* Pacify compilers like GCC when the user code never invokes
  1636. YYERROR and the label yyerrorlab therefore never appears in user
  1637. code. */
  1638. if (/*CONSTCOND*/ 0)
  1639. goto yyerrorlab;
  1640. /* Do not reclaim the symbols of the rule which action triggered
  1641. this YYERROR. */
  1642. YYPOPSTACK (yylen);
  1643. yylen = 0;
  1644. YY_STACK_PRINT (yyss, yyssp);
  1645. yystate = *yyssp;
  1646. goto yyerrlab1;
  1647. /*-------------------------------------------------------------.
  1648. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  1649. `-------------------------------------------------------------*/
  1650. yyerrlab1:
  1651. #endif
  1652. yyerrstatus = 3; /* Each real token shifted decrements this. */
  1653. for (;;)
  1654. {
  1655. yyn = yypact[yystate];
  1656. if (yyn != YYPACT_NINF)
  1657. {
  1658. yyn += YYTERROR;
  1659. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  1660. {
  1661. yyn = yytable[yyn];
  1662. if (0 < yyn)
  1663. break;
  1664. }
  1665. }
  1666. /* Pop the current state because it cannot handle the error token. */
  1667. if (yyssp == yyss)
  1668. YYABORT;
  1669. yydestruct ("Error: popping",
  1670. yystos[yystate], yyvsp);
  1671. YYPOPSTACK (1);
  1672. yystate = *yyssp;
  1673. YY_STACK_PRINT (yyss, yyssp);
  1674. }
  1675. *++yyvsp = yylval;
  1676. /* Shift the error token. */
  1677. YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
  1678. yystate = yyn;
  1679. goto yynewstate;
  1680. /*-------------------------------------.
  1681. | yyacceptlab -- YYACCEPT comes here. |
  1682. `-------------------------------------*/
  1683. yyacceptlab:
  1684. yyresult = 0;
  1685. goto yyreturn;
  1686. /*-----------------------------------.
  1687. | yyabortlab -- YYABORT comes here. |
  1688. `-----------------------------------*/
  1689. yyabortlab:
  1690. yyresult = 1;
  1691. goto yyreturn;
  1692. #if !defined(yyoverflow) || YYERROR_VERBOSE
  1693. /*-------------------------------------------------.
  1694. | yyexhaustedlab -- memory exhaustion comes here. |
  1695. `-------------------------------------------------*/
  1696. yyexhaustedlab:
  1697. yyerror (YY_("memory exhausted"));
  1698. yyresult = 2;
  1699. /* Fall through. */
  1700. #endif
  1701. yyreturn:
  1702. if (yychar != YYEMPTY)
  1703. yydestruct ("Cleanup: discarding lookahead",
  1704. yytoken, &yylval);
  1705. /* Do not reclaim the symbols of the rule which action triggered
  1706. this YYABORT or YYACCEPT. */
  1707. YYPOPSTACK (yylen);
  1708. YY_STACK_PRINT (yyss, yyssp);
  1709. while (yyssp != yyss)
  1710. {
  1711. yydestruct ("Cleanup: popping",
  1712. yystos[*yyssp], yyvsp);
  1713. YYPOPSTACK (1);
  1714. }
  1715. #ifndef yyoverflow
  1716. if (yyss != yyssa)
  1717. YYSTACK_FREE (yyss);
  1718. #endif
  1719. #if YYERROR_VERBOSE
  1720. if (yymsg != yymsgbuf)
  1721. YYSTACK_FREE (yymsg);
  1722. #endif
  1723. /* Make sure YYID is used. */
  1724. return YYID (yyresult);
  1725. }
  1726. /* Line 1675 of yacc.c */
  1727. #line 283 "cmDependsFortranParser.y"
  1728. /* End of grammar */