cmDependsFortranParser.cxx 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508
  1. /* A Bison parser, made by GNU Bison 1.875d. */
  2. /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
  3. 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA. */
  16. /* As a special exception, when this file is copied by Bison into a
  17. Bison output file, you may use that output file without restriction.
  18. This special exception was added by the Free Software Foundation
  19. in version 1.24 of Bison. */
  20. /* Written by Richard Stallman by simplifying the original so called
  21. ``semantic'' parser. */
  22. /* All symbols defined below should begin with yy or YY, to avoid
  23. infringing on user name space. This should be done even for local
  24. variables, as they might otherwise be expanded by user macros.
  25. There are some unavoidable exceptions within include files to
  26. define necessary library symbols; they are noted "INFRINGES ON
  27. USER NAME SPACE" below. */
  28. /* Identify Bison output. */
  29. #define YYBISON 1
  30. /* Skeleton name. */
  31. #define YYSKELETON_NAME "yacc.c"
  32. /* Pure parsers. */
  33. #define YYPURE 1
  34. /* Using locations. */
  35. #define YYLSP_NEEDED 0
  36. /* If NAME_PREFIX is specified substitute the variables and functions
  37. names. */
  38. #define yyparse cmDependsFortran_yyparse
  39. #define yylex cmDependsFortran_yylex
  40. #define yyerror cmDependsFortran_yyerror
  41. #define yylval cmDependsFortran_yylval
  42. #define yychar cmDependsFortran_yychar
  43. #define yydebug cmDependsFortran_yydebug
  44. #define yynerrs cmDependsFortran_yynerrs
  45. /* Tokens. */
  46. #ifndef YYTOKENTYPE
  47. # define YYTOKENTYPE
  48. /* Put the tokens into the symbol table, so that GDB and other debuggers
  49. know about them. */
  50. enum yytokentype {
  51. USE = 258,
  52. F_INCLUDE = 259,
  53. MODULE = 260,
  54. EOSTMT = 261,
  55. CPP_INCLUDE = 262,
  56. F90PPR_INCLUDE = 263,
  57. COCO_INCLUDE = 264,
  58. F90PPR_DEFINE = 265,
  59. CPP_DEFINE = 266,
  60. F90PPR_UNDEF = 267,
  61. CPP_UNDEF = 268,
  62. CPP_IFDEF = 269,
  63. CPP_IFNDEF = 270,
  64. CPP_IF = 271,
  65. CPP_ELSE = 272,
  66. CPP_ELIF = 273,
  67. CPP_ENDIF = 274,
  68. F90PPR_IFDEF = 275,
  69. F90PPR_IFNDEF = 276,
  70. F90PPR_IF = 277,
  71. F90PPR_ELSE = 278,
  72. F90PPR_ELIF = 279,
  73. F90PPR_ENDIF = 280,
  74. UNTERMINATED_STRING = 281,
  75. CPP_TOENDL = 282,
  76. STRING = 283,
  77. WORD = 284
  78. };
  79. #endif
  80. #define USE 258
  81. #define F_INCLUDE 259
  82. #define MODULE 260
  83. #define EOSTMT 261
  84. #define CPP_INCLUDE 262
  85. #define F90PPR_INCLUDE 263
  86. #define COCO_INCLUDE 264
  87. #define F90PPR_DEFINE 265
  88. #define CPP_DEFINE 266
  89. #define F90PPR_UNDEF 267
  90. #define CPP_UNDEF 268
  91. #define CPP_IFDEF 269
  92. #define CPP_IFNDEF 270
  93. #define CPP_IF 271
  94. #define CPP_ELSE 272
  95. #define CPP_ELIF 273
  96. #define CPP_ENDIF 274
  97. #define F90PPR_IFDEF 275
  98. #define F90PPR_IFNDEF 276
  99. #define F90PPR_IF 277
  100. #define F90PPR_ELSE 278
  101. #define F90PPR_ELIF 279
  102. #define F90PPR_ENDIF 280
  103. #define UNTERMINATED_STRING 281
  104. #define CPP_TOENDL 282
  105. #define STRING 283
  106. #define WORD 284
  107. /* Copy the first part of user declarations. */
  108. #line 1 "cmDependsFortranParser.y"
  109. /*=========================================================================
  110. Program: CMake - Cross-Platform Makefile Generator
  111. Module: $RCSfile$
  112. Language: C++
  113. Date: $Date$
  114. Version: $Revision$
  115. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  116. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  117. This software is distributed WITHOUT ANY WARRANTY; without even
  118. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  119. PURPOSE. See the above copyright notices for more information.
  120. =========================================================================*/
  121. /*-------------------------------------------------------------------------
  122. Portions of this source have been derived from makefdep90 version 2.6.2,
  123. Copyright (C) 2000,2001 Erik Edelmann <[email protected]>.
  124. The code was originally distributed under the GPL but permission
  125. from the copyright holder has been obtained to distribute this
  126. derived work under the CMake license.
  127. -------------------------------------------------------------------------*/
  128. /*
  129. This file must be translated to C and modified to build everywhere.
  130. Run bison like this:
  131. bison --yacc --name-prefix=cmDependsFortran_yy
  132. --defines=cmDependsFortranParserTokens.h -ocmDependsFortranParser.cxx
  133. cmDependsFortranParser.y
  134. Modify cmDependsFortranParser.cxx:
  135. - remove TABs
  136. */
  137. /*-------------------------------------------------------------------------*/
  138. #define cmDependsFortranParser_cxx
  139. #include "cmDependsFortranParser.h" /* Interface to parser object. */
  140. #include "cmDependsFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */
  141. /* Configure the parser to use a lexer object. */
  142. #define YYPARSE_PARAM yyscanner
  143. #define YYLEX_PARAM yyscanner
  144. #define YYERROR_VERBOSE 1
  145. #define cmDependsFortran_yyerror(x) \
  146. cmDependsFortranError(yyscanner, x)
  147. /* Forward declare the lexer entry point. */
  148. YY_DECL;
  149. /* Helper function to forward error callback. */
  150. static void cmDependsFortranError(yyscan_t yyscanner, const char* message)
  151. {
  152. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  153. cmDependsFortranParser_Error(parser, message);
  154. }
  155. /* Disable some warnings in the generated code. */
  156. #ifdef __BORLANDC__
  157. # pragma warn -8004 /* Variable assigned a value that is not used. */
  158. #endif
  159. #ifdef _MSC_VER
  160. # pragma warning (disable: 4102) /* Unused goto label. */
  161. # pragma warning (disable: 4065) /* Switch contains default but no case. */
  162. #endif
  163. /* Enabling traces. */
  164. #ifndef YYDEBUG
  165. # define YYDEBUG 0
  166. #endif
  167. /* Enabling verbose error messages. */
  168. #ifdef YYERROR_VERBOSE
  169. # undef YYERROR_VERBOSE
  170. # define YYERROR_VERBOSE 1
  171. #else
  172. # define YYERROR_VERBOSE 0
  173. #endif
  174. #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
  175. #line 75 "cmDependsFortranParser.y"
  176. typedef union YYSTYPE {
  177. char* string;
  178. } YYSTYPE;
  179. /* Line 191 of yacc.c. */
  180. #line 218 "cmDependsFortranParser.cxx"
  181. # define yystype YYSTYPE /* obsolescent; will be withdrawn */
  182. # define YYSTYPE_IS_DECLARED 1
  183. # define YYSTYPE_IS_TRIVIAL 1
  184. #endif
  185. /* Copy the second part of user declarations. */
  186. /* Line 214 of yacc.c. */
  187. #line 230 "cmDependsFortranParser.cxx"
  188. #if ! defined (yyoverflow) || YYERROR_VERBOSE
  189. # ifndef YYFREE
  190. # define YYFREE free
  191. # endif
  192. # ifndef YYMALLOC
  193. # define YYMALLOC malloc
  194. # endif
  195. /* The parser invokes alloca or malloc; define the necessary symbols. */
  196. # ifdef YYSTACK_USE_ALLOCA
  197. # if YYSTACK_USE_ALLOCA
  198. # define YYSTACK_ALLOC alloca
  199. # endif
  200. # else
  201. # if defined (alloca) || defined (_ALLOCA_H)
  202. # define YYSTACK_ALLOC alloca
  203. # else
  204. # ifdef __GNUC__
  205. # define YYSTACK_ALLOC __builtin_alloca
  206. # endif
  207. # endif
  208. # endif
  209. # ifdef YYSTACK_ALLOC
  210. /* Pacify GCC's `empty if-body' warning. */
  211. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  212. # else
  213. # if defined (__STDC__) || defined (__cplusplus)
  214. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  215. # define YYSIZE_T size_t
  216. # endif
  217. # define YYSTACK_ALLOC YYMALLOC
  218. # define YYSTACK_FREE YYFREE
  219. # endif
  220. #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
  221. #if (! defined (yyoverflow) \
  222. && (! defined (__cplusplus) \
  223. || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
  224. /* A type that is properly aligned for any stack member. */
  225. union yyalloc
  226. {
  227. short int yyss;
  228. YYSTYPE yyvs;
  229. };
  230. /* The size of the maximum gap between one aligned stack and the next. */
  231. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  232. /* The size of an array large to enough to hold all stacks, each with
  233. N elements. */
  234. # define YYSTACK_BYTES(N) \
  235. ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
  236. + YYSTACK_GAP_MAXIMUM)
  237. /* Copy COUNT objects from FROM to TO. The source and destination do
  238. not overlap. */
  239. # ifndef YYCOPY
  240. # if defined (__GNUC__) && 1 < __GNUC__
  241. # define YYCOPY(To, From, Count) \
  242. __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
  243. # else
  244. # define YYCOPY(To, From, Count) \
  245. do \
  246. { \
  247. register YYSIZE_T yyi; \
  248. for (yyi = 0; yyi < (Count); yyi++) \
  249. (To)[yyi] = (From)[yyi]; \
  250. } \
  251. while (0)
  252. # endif
  253. # endif
  254. /* Relocate STACK from its old location to the new one. The
  255. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  256. elements in the stack, and YYPTR gives the new location of the
  257. stack. Advance YYPTR to a properly aligned location for the next
  258. stack. */
  259. # define YYSTACK_RELOCATE(Stack) \
  260. do \
  261. { \
  262. YYSIZE_T yynewbytes; \
  263. YYCOPY (&yyptr->Stack, Stack, yysize); \
  264. Stack = &yyptr->Stack; \
  265. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  266. yyptr += yynewbytes / sizeof (*yyptr); \
  267. } \
  268. while (0)
  269. #endif
  270. #if defined (__STDC__) || defined (__cplusplus)
  271. typedef signed char yysigned_char;
  272. #else
  273. typedef short int yysigned_char;
  274. #endif
  275. /* YYFINAL -- State number of the termination state. */
  276. #define YYFINAL 2
  277. /* YYLAST -- Last index in YYTABLE. */
  278. #define YYLAST 67
  279. /* YYNTOKENS -- Number of terminals. */
  280. #define YYNTOKENS 30
  281. /* YYNNTS -- Number of nonterminals. */
  282. #define YYNNTS 15
  283. /* YYNRULES -- Number of rules. */
  284. #define YYNRULES 43
  285. /* YYNRULES -- Number of states. */
  286. #define YYNSTATES 73
  287. /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  288. #define YYUNDEFTOK 2
  289. #define YYMAXUTOK 284
  290. #define YYTRANSLATE(YYX) \
  291. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  292. /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
  293. static const unsigned char yytranslate[] =
  294. {
  295. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  296. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  297. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  298. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  299. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  300. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  301. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  302. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  303. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  304. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  305. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  306. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  307. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  308. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  309. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  310. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  311. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  312. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  313. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  314. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  315. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  316. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  317. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  318. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  319. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  320. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  321. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  322. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  323. 25, 26, 27, 28, 29
  324. };
  325. #if YYDEBUG
  326. /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  327. YYRHS. */
  328. static const unsigned char yyprhs[] =
  329. {
  330. 0, 0, 3, 4, 7, 12, 17, 22, 26, 31,
  331. 36, 41, 46, 50, 54, 58, 62, 65, 66, 68,
  332. 70, 72, 74, 76, 78, 80, 82, 84, 86, 88,
  333. 90, 92, 94, 96, 98, 100, 102, 104, 106, 108,
  334. 109, 112, 114, 116
  335. };
  336. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  337. static const yysigned_char yyrhs[] =
  338. {
  339. 31, 0, -1, -1, 31, 32, -1, 3, 29, 43,
  340. 33, -1, 34, 28, 43, 33, -1, 7, 29, 43,
  341. 33, -1, 5, 29, 33, -1, 35, 29, 43, 33,
  342. -1, 36, 29, 43, 33, -1, 37, 29, 43, 33,
  343. -1, 38, 29, 43, 33, -1, 39, 43, 33, -1,
  344. 40, 43, 33, -1, 41, 43, 33, -1, 42, 43,
  345. 33, -1, 43, 33, -1, -1, 6, -1, 4, -1,
  346. 7, -1, 8, -1, 9, -1, 11, -1, 10, -1,
  347. 13, -1, 12, -1, 14, -1, 20, -1, 15, -1,
  348. 21, -1, 16, -1, 22, -1, 18, -1, 24, -1,
  349. 17, -1, 23, -1, 19, -1, 25, -1, -1, 43,
  350. 44, -1, 29, -1, 28, -1, 26, -1
  351. };
  352. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  353. static const unsigned char yyrline[] =
  354. {
  355. 0, 93, 93, 93, 96, 102, 108, 109, 115, 121,
  356. 127, 133, 139, 144, 149, 154, 159, 162, 162, 163,
  357. 163, 163, 163, 164, 164, 165, 165, 166, 166, 167,
  358. 167, 168, 168, 169, 169, 170, 170, 171, 171, 172,
  359. 172, 175, 176, 177
  360. };
  361. #endif
  362. #if YYDEBUG || YYERROR_VERBOSE
  363. /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  364. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  365. static const char *const yytname[] =
  366. {
  367. "$end", "error", "$undefined", "USE", "F_INCLUDE", "MODULE", "EOSTMT",
  368. "CPP_INCLUDE", "F90PPR_INCLUDE", "COCO_INCLUDE", "F90PPR_DEFINE",
  369. "CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF",
  370. "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF",
  371. "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF",
  372. "F90PPR_ENDIF", "UNTERMINATED_STRING", "CPP_TOENDL", "STRING", "WORD",
  373. "$accept", "code", "stmt", "eostmt", "include", "define", "undef",
  374. "ifdef", "ifndef", "if", "elif", "else", "endif", "other", "misc_code", 0
  375. };
  376. #endif
  377. # ifdef YYPRINT
  378. /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  379. token YYLEX-NUM. */
  380. static const unsigned short int yytoknum[] =
  381. {
  382. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  383. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  384. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284
  385. };
  386. # endif
  387. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  388. static const unsigned char yyr1[] =
  389. {
  390. 0, 30, 31, 31, 32, 32, 32, 32, 32, 32,
  391. 32, 32, 32, 32, 32, 32, 32, 33, 33, 34,
  392. 34, 34, 34, 35, 35, 36, 36, 37, 37, 38,
  393. 38, 39, 39, 40, 40, 41, 41, 42, 42, 43,
  394. 43, 44, 44, 44
  395. };
  396. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  397. static const unsigned char yyr2[] =
  398. {
  399. 0, 2, 0, 2, 4, 4, 4, 3, 4, 4,
  400. 4, 4, 3, 3, 3, 3, 2, 0, 1, 1,
  401. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  402. 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
  403. 2, 1, 1, 1
  404. };
  405. /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
  406. STATE-NUM when YYTABLE doesn't specify something else to do. Zero
  407. means the default is an error. */
  408. static const unsigned char yydefact[] =
  409. {
  410. 2, 39, 1, 0, 19, 0, 20, 21, 22, 24,
  411. 23, 26, 25, 27, 29, 31, 35, 33, 37, 28,
  412. 30, 32, 36, 34, 38, 3, 0, 0, 0, 0,
  413. 0, 39, 39, 39, 39, 17, 39, 17, 39, 39,
  414. 39, 39, 39, 39, 17, 17, 17, 17, 18, 43,
  415. 42, 41, 16, 40, 17, 7, 17, 17, 17, 17,
  416. 17, 17, 12, 13, 14, 15, 4, 6, 5, 8,
  417. 9, 10, 11
  418. };
  419. /* YYDEFGOTO[NTERM-NUM]. */
  420. static const yysigned_char yydefgoto[] =
  421. {
  422. -1, 1, 25, 52, 26, 27, 28, 29, 30, 31,
  423. 32, 33, 34, 35, 53
  424. };
  425. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  426. STATE-NUM. */
  427. #define YYPACT_NINF -29
  428. static const yysigned_char yypact[] =
  429. {
  430. -29, 0, -29, -28, -29, -27, -23, -29, -29, -29,
  431. -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
  432. -29, -29, -29, -29, -29, -29, -1, 1, 3, 8,
  433. 9, -29, -29, -29, -29, 25, -29, 22, -29, -29,
  434. -29, -29, -29, -29, 25, 25, 25, 25, -29, -29,
  435. -29, -29, -29, -29, 25, -29, 25, 25, 25, 25,
  436. 25, 25, -29, -29, -29, -29, -29, -29, -29, -29,
  437. -29, -29, -29
  438. };
  439. /* YYPGOTO[NTERM-NUM]. */
  440. static const yysigned_char yypgoto[] =
  441. {
  442. -29, -29, -29, -11, -29, -29, -29, -29, -29, -29,
  443. -29, -29, -29, 24, -29
  444. };
  445. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  446. positive, shift that token. If negative, reduce the rule which
  447. number is the opposite. If zero, do what YYDEFACT says.
  448. If YYTABLE_NINF, syntax error. */
  449. #define YYTABLE_NINF -1
  450. static const unsigned char yytable[] =
  451. {
  452. 2, 36, 37, 3, 4, 5, 38, 6, 7, 8,
  453. 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
  454. 19, 20, 21, 22, 23, 24, 55, 39, 48, 0,
  455. 40, 48, 41, 62, 63, 64, 65, 42, 43, 0,
  456. 0, 0, 0, 66, 0, 67, 68, 69, 70, 71,
  457. 72, 49, 0, 50, 51, 44, 45, 46, 47, 0,
  458. 54, 0, 56, 57, 58, 59, 60, 61
  459. };
  460. static const yysigned_char yycheck[] =
  461. {
  462. 0, 29, 29, 3, 4, 5, 29, 7, 8, 9,
  463. 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
  464. 20, 21, 22, 23, 24, 25, 37, 28, 6, -1,
  465. 29, 6, 29, 44, 45, 46, 47, 29, 29, -1,
  466. -1, -1, -1, 54, -1, 56, 57, 58, 59, 60,
  467. 61, 26, -1, 28, 29, 31, 32, 33, 34, -1,
  468. 36, -1, 38, 39, 40, 41, 42, 43
  469. };
  470. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  471. symbol of state STATE-NUM. */
  472. static const unsigned char yystos[] =
  473. {
  474. 0, 31, 0, 3, 4, 5, 7, 8, 9, 10,
  475. 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  476. 21, 22, 23, 24, 25, 32, 34, 35, 36, 37,
  477. 38, 39, 40, 41, 42, 43, 29, 29, 29, 28,
  478. 29, 29, 29, 29, 43, 43, 43, 43, 6, 26,
  479. 28, 29, 33, 44, 43, 33, 43, 43, 43, 43,
  480. 43, 43, 33, 33, 33, 33, 33, 33, 33, 33,
  481. 33, 33, 33
  482. };
  483. #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
  484. # define YYSIZE_T __SIZE_TYPE__
  485. #endif
  486. #if ! defined (YYSIZE_T) && defined (size_t)
  487. # define YYSIZE_T size_t
  488. #endif
  489. #if ! defined (YYSIZE_T)
  490. # if defined (__STDC__) || defined (__cplusplus)
  491. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  492. # define YYSIZE_T size_t
  493. # endif
  494. #endif
  495. #if ! defined (YYSIZE_T)
  496. # define YYSIZE_T unsigned int
  497. #endif
  498. #define yyerrok (yyerrstatus = 0)
  499. #define yyclearin (yychar = YYEMPTY)
  500. #define YYEMPTY (-2)
  501. #define YYEOF 0
  502. #define YYACCEPT goto yyacceptlab
  503. #define YYABORT goto yyabortlab
  504. #define YYERROR goto yyerrorlab
  505. /* Like YYERROR except do call yyerror. This remains here temporarily
  506. to ease the transition to the new meaning of YYERROR, for GCC.
  507. Once GCC version 2 has supplanted version 1, this can go. */
  508. #define YYFAIL goto yyerrlab
  509. #define YYRECOVERING() (!!yyerrstatus)
  510. #define YYBACKUP(Token, Value) \
  511. do \
  512. if (yychar == YYEMPTY && yylen == 1) \
  513. { \
  514. yychar = (Token); \
  515. yylval = (Value); \
  516. yytoken = YYTRANSLATE (yychar); \
  517. YYPOPSTACK; \
  518. goto yybackup; \
  519. } \
  520. else \
  521. { \
  522. yyerror ("syntax error: cannot back up");\
  523. YYERROR; \
  524. } \
  525. while (0)
  526. #define YYTERROR 1
  527. #define YYERRCODE 256
  528. /* YYLLOC_DEFAULT -- Compute the default location (before the actions
  529. are run). */
  530. #ifndef YYLLOC_DEFAULT
  531. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  532. ((Current).first_line = (Rhs)[1].first_line, \
  533. (Current).first_column = (Rhs)[1].first_column, \
  534. (Current).last_line = (Rhs)[N].last_line, \
  535. (Current).last_column = (Rhs)[N].last_column)
  536. #endif
  537. /* YYLEX -- calling `yylex' with the right arguments. */
  538. #ifdef YYLEX_PARAM
  539. # define YYLEX yylex (&yylval, YYLEX_PARAM)
  540. #else
  541. # define YYLEX yylex (&yylval)
  542. #endif
  543. /* Enable debugging if requested. */
  544. #if YYDEBUG
  545. # ifndef YYFPRINTF
  546. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  547. # define YYFPRINTF fprintf
  548. # endif
  549. # define YYDPRINTF(Args) \
  550. do { \
  551. if (yydebug) \
  552. YYFPRINTF Args; \
  553. } while (0)
  554. # define YYDSYMPRINT(Args) \
  555. do { \
  556. if (yydebug) \
  557. yysymprint Args; \
  558. } while (0)
  559. # define YYDSYMPRINTF(Title, Token, Value, Location) \
  560. do { \
  561. if (yydebug) \
  562. { \
  563. YYFPRINTF (stderr, "%s ", Title); \
  564. yysymprint (stderr, \
  565. Token, Value); \
  566. YYFPRINTF (stderr, "\n"); \
  567. } \
  568. } while (0)
  569. /*------------------------------------------------------------------.
  570. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  571. | TOP (included). |
  572. `------------------------------------------------------------------*/
  573. #if defined (__STDC__) || defined (__cplusplus)
  574. static void
  575. yy_stack_print (short int *bottom, short int *top)
  576. #else
  577. static void
  578. yy_stack_print (bottom, top)
  579. short int *bottom;
  580. short int *top;
  581. #endif
  582. {
  583. YYFPRINTF (stderr, "Stack now");
  584. for (/* Nothing. */; bottom <= top; ++bottom)
  585. YYFPRINTF (stderr, " %d", *bottom);
  586. YYFPRINTF (stderr, "\n");
  587. }
  588. # define YY_STACK_PRINT(Bottom, Top) \
  589. do { \
  590. if (yydebug) \
  591. yy_stack_print ((Bottom), (Top)); \
  592. } while (0)
  593. /*------------------------------------------------.
  594. | Report that the YYRULE is going to be reduced. |
  595. `------------------------------------------------*/
  596. #if defined (__STDC__) || defined (__cplusplus)
  597. static void
  598. yy_reduce_print (int yyrule)
  599. #else
  600. static void
  601. yy_reduce_print (yyrule)
  602. int yyrule;
  603. #endif
  604. {
  605. int yyi;
  606. unsigned int yylno = yyrline[yyrule];
  607. YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
  608. yyrule - 1, yylno);
  609. /* Print the symbols being reduced, and their result. */
  610. for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
  611. YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  612. YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
  613. }
  614. # define YY_REDUCE_PRINT(Rule) \
  615. do { \
  616. if (yydebug) \
  617. yy_reduce_print (Rule); \
  618. } while (0)
  619. /* Nonzero means print parse trace. It is left uninitialized so that
  620. multiple parsers can coexist. */
  621. int yydebug;
  622. #else /* !YYDEBUG */
  623. # define YYDPRINTF(Args)
  624. # define YYDSYMPRINT(Args)
  625. # define YYDSYMPRINTF(Title, Token, Value, Location)
  626. # define YY_STACK_PRINT(Bottom, Top)
  627. # define YY_REDUCE_PRINT(Rule)
  628. #endif /* !YYDEBUG */
  629. /* YYINITDEPTH -- initial size of the parser's stacks. */
  630. #ifndef YYINITDEPTH
  631. # define YYINITDEPTH 200
  632. #endif
  633. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  634. if the built-in stack extension method is used).
  635. Do not make this value too large; the results are undefined if
  636. SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
  637. evaluated with infinite-precision integer arithmetic. */
  638. #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
  639. # undef YYMAXDEPTH
  640. #endif
  641. #ifndef YYMAXDEPTH
  642. # define YYMAXDEPTH 10000
  643. #endif
  644. #if YYERROR_VERBOSE
  645. # ifndef yystrlen
  646. # if defined (__GLIBC__) && defined (_STRING_H)
  647. # define yystrlen strlen
  648. # else
  649. /* Return the length of YYSTR. */
  650. static YYSIZE_T
  651. # if defined (__STDC__) || defined (__cplusplus)
  652. yystrlen (const char *yystr)
  653. # else
  654. yystrlen (yystr)
  655. const char *yystr;
  656. # endif
  657. {
  658. register const char *yys = yystr;
  659. while (*yys++ != '\0')
  660. continue;
  661. return yys - yystr - 1;
  662. }
  663. # endif
  664. # endif
  665. # ifndef yystpcpy
  666. # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
  667. # define yystpcpy stpcpy
  668. # else
  669. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  670. YYDEST. */
  671. static char *
  672. # if defined (__STDC__) || defined (__cplusplus)
  673. yystpcpy (char *yydest, const char *yysrc)
  674. # else
  675. yystpcpy (yydest, yysrc)
  676. char *yydest;
  677. const char *yysrc;
  678. # endif
  679. {
  680. register char *yyd = yydest;
  681. register const char *yys = yysrc;
  682. while ((*yyd++ = *yys++) != '\0')
  683. continue;
  684. return yyd - 1;
  685. }
  686. # endif
  687. # endif
  688. #endif /* !YYERROR_VERBOSE */
  689. #if YYDEBUG
  690. /*--------------------------------.
  691. | Print this symbol on YYOUTPUT. |
  692. `--------------------------------*/
  693. #if defined (__STDC__) || defined (__cplusplus)
  694. static void
  695. yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
  696. #else
  697. static void
  698. yysymprint (yyoutput, yytype, yyvaluep)
  699. FILE *yyoutput;
  700. int yytype;
  701. YYSTYPE *yyvaluep;
  702. #endif
  703. {
  704. /* Pacify ``unused variable'' warnings. */
  705. (void) yyvaluep;
  706. if (yytype < YYNTOKENS)
  707. {
  708. YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  709. # ifdef YYPRINT
  710. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  711. # endif
  712. }
  713. else
  714. YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  715. switch (yytype)
  716. {
  717. default:
  718. break;
  719. }
  720. YYFPRINTF (yyoutput, ")");
  721. }
  722. #endif /* ! YYDEBUG */
  723. /*-----------------------------------------------.
  724. | Release the memory associated to this symbol. |
  725. `-----------------------------------------------*/
  726. #if defined (__STDC__) || defined (__cplusplus)
  727. static void
  728. yydestruct (int yytype, YYSTYPE *yyvaluep)
  729. #else
  730. static void
  731. yydestruct (yytype, yyvaluep)
  732. int yytype;
  733. YYSTYPE *yyvaluep;
  734. #endif
  735. {
  736. /* Pacify ``unused variable'' warnings. */
  737. (void) yyvaluep;
  738. switch (yytype)
  739. {
  740. default:
  741. break;
  742. }
  743. }
  744. /* Prevent warnings from -Wmissing-prototypes. */
  745. #ifdef YYPARSE_PARAM
  746. # if defined (__STDC__) || defined (__cplusplus)
  747. int yyparse (void *YYPARSE_PARAM);
  748. # else
  749. int yyparse ();
  750. # endif
  751. #else /* ! YYPARSE_PARAM */
  752. #if defined (__STDC__) || defined (__cplusplus)
  753. int yyparse (void);
  754. #else
  755. int yyparse ();
  756. #endif
  757. #endif /* ! YYPARSE_PARAM */
  758. /*----------.
  759. | yyparse. |
  760. `----------*/
  761. #ifdef YYPARSE_PARAM
  762. # if defined (__STDC__) || defined (__cplusplus)
  763. int yyparse (void *YYPARSE_PARAM)
  764. # else
  765. int yyparse (YYPARSE_PARAM)
  766. void *YYPARSE_PARAM;
  767. # endif
  768. #else /* ! YYPARSE_PARAM */
  769. #if defined (__STDC__) || defined (__cplusplus)
  770. int
  771. yyparse (void)
  772. #else
  773. int
  774. yyparse ()
  775. #endif
  776. #endif
  777. {
  778. /* The lookahead symbol. */
  779. int yychar;
  780. /* The semantic value of the lookahead symbol. */
  781. YYSTYPE yylval;
  782. /* Number of syntax errors so far. */
  783. int yynerrs;
  784. register int yystate;
  785. register int yyn;
  786. int yyresult;
  787. /* Number of tokens to shift before error messages enabled. */
  788. int yyerrstatus;
  789. /* Lookahead token as an internal (translated) token number. */
  790. int yytoken = 0;
  791. /* Three stacks and their tools:
  792. `yyss': related to states,
  793. `yyvs': related to semantic values,
  794. `yyls': related to locations.
  795. Refer to the stacks thru separate pointers, to allow yyoverflow
  796. to reallocate them elsewhere. */
  797. /* The state stack. */
  798. short int yyssa[YYINITDEPTH];
  799. short int *yyss = yyssa;
  800. register short int *yyssp;
  801. /* The semantic value stack. */
  802. YYSTYPE yyvsa[YYINITDEPTH];
  803. YYSTYPE *yyvs = yyvsa;
  804. register YYSTYPE *yyvsp;
  805. #define YYPOPSTACK (yyvsp--, yyssp--)
  806. YYSIZE_T yystacksize = YYINITDEPTH;
  807. /* The variables used to return semantic value and location from the
  808. action routines. */
  809. YYSTYPE yyval;
  810. /* When reducing, the number of symbols on the RHS of the reduced
  811. rule. */
  812. int yylen;
  813. YYDPRINTF ((stderr, "Starting parse\n"));
  814. yystate = 0;
  815. yyerrstatus = 0;
  816. yynerrs = 0;
  817. yychar = YYEMPTY; /* Cause a token to be read. */
  818. /* Initialize stack pointers.
  819. Waste one element of value and location stack
  820. so that they stay on the same level as the state stack.
  821. The wasted elements are never initialized. */
  822. yyssp = yyss;
  823. yyvsp = yyvs;
  824. goto yysetstate;
  825. /*------------------------------------------------------------.
  826. | yynewstate -- Push a new state, which is found in yystate. |
  827. `------------------------------------------------------------*/
  828. yynewstate:
  829. /* In all cases, when you get here, the value and location stacks
  830. have just been pushed. so pushing a state here evens the stacks.
  831. */
  832. yyssp++;
  833. yysetstate:
  834. *yyssp = yystate;
  835. if (yyss + yystacksize - 1 <= yyssp)
  836. {
  837. /* Get the current used size of the three stacks, in elements. */
  838. YYSIZE_T yysize = yyssp - yyss + 1;
  839. #ifdef yyoverflow
  840. {
  841. /* Give user a chance to reallocate the stack. Use copies of
  842. these so that the &'s don't force the real ones into
  843. memory. */
  844. YYSTYPE *yyvs1 = yyvs;
  845. short int *yyss1 = yyss;
  846. /* Each stack pointer address is followed by the size of the
  847. data in use in that stack, in bytes. This used to be a
  848. conditional around just the two extra args, but that might
  849. be undefined if yyoverflow is a macro. */
  850. yyoverflow ("parser stack overflow",
  851. &yyss1, yysize * sizeof (*yyssp),
  852. &yyvs1, yysize * sizeof (*yyvsp),
  853. &yystacksize);
  854. yyss = yyss1;
  855. yyvs = yyvs1;
  856. }
  857. #else /* no yyoverflow */
  858. # ifndef YYSTACK_RELOCATE
  859. goto yyoverflowlab;
  860. # else
  861. /* Extend the stack our own way. */
  862. if (YYMAXDEPTH <= yystacksize)
  863. goto yyoverflowlab;
  864. yystacksize *= 2;
  865. if (YYMAXDEPTH < yystacksize)
  866. yystacksize = YYMAXDEPTH;
  867. {
  868. short int *yyss1 = yyss;
  869. union yyalloc *yyptr =
  870. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  871. if (! yyptr)
  872. goto yyoverflowlab;
  873. YYSTACK_RELOCATE (yyss);
  874. YYSTACK_RELOCATE (yyvs);
  875. # undef YYSTACK_RELOCATE
  876. if (yyss1 != yyssa)
  877. YYSTACK_FREE (yyss1);
  878. }
  879. # endif
  880. #endif /* no yyoverflow */
  881. yyssp = yyss + yysize - 1;
  882. yyvsp = yyvs + yysize - 1;
  883. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  884. (unsigned long int) yystacksize));
  885. if (yyss + yystacksize - 1 <= yyssp)
  886. YYABORT;
  887. }
  888. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  889. goto yybackup;
  890. /*-----------.
  891. | yybackup. |
  892. `-----------*/
  893. yybackup:
  894. /* Do appropriate processing given the current state. */
  895. /* Read a lookahead token if we need one and don't already have one. */
  896. /* yyresume: */
  897. /* First try to decide what to do without reference to lookahead token. */
  898. yyn = yypact[yystate];
  899. if (yyn == YYPACT_NINF)
  900. goto yydefault;
  901. /* Not known => get a lookahead token if don't already have one. */
  902. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  903. if (yychar == YYEMPTY)
  904. {
  905. YYDPRINTF ((stderr, "Reading a token: "));
  906. yychar = YYLEX;
  907. }
  908. if (yychar <= YYEOF)
  909. {
  910. yychar = yytoken = YYEOF;
  911. YYDPRINTF ((stderr, "Now at end of input.\n"));
  912. }
  913. else
  914. {
  915. yytoken = YYTRANSLATE (yychar);
  916. YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
  917. }
  918. /* If the proper action on seeing token YYTOKEN is to reduce or to
  919. detect an error, take that action. */
  920. yyn += yytoken;
  921. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  922. goto yydefault;
  923. yyn = yytable[yyn];
  924. if (yyn <= 0)
  925. {
  926. if (yyn == 0 || yyn == YYTABLE_NINF)
  927. goto yyerrlab;
  928. yyn = -yyn;
  929. goto yyreduce;
  930. }
  931. if (yyn == YYFINAL)
  932. YYACCEPT;
  933. /* Shift the lookahead token. */
  934. YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
  935. /* Discard the token being shifted unless it is eof. */
  936. if (yychar != YYEOF)
  937. yychar = YYEMPTY;
  938. *++yyvsp = yylval;
  939. /* Count tokens shifted since error; after three, turn off error
  940. status. */
  941. if (yyerrstatus)
  942. yyerrstatus--;
  943. yystate = yyn;
  944. goto yynewstate;
  945. /*-----------------------------------------------------------.
  946. | yydefault -- do the default action for the current state. |
  947. `-----------------------------------------------------------*/
  948. yydefault:
  949. yyn = yydefact[yystate];
  950. if (yyn == 0)
  951. goto yyerrlab;
  952. goto yyreduce;
  953. /*-----------------------------.
  954. | yyreduce -- Do a reduction. |
  955. `-----------------------------*/
  956. yyreduce:
  957. /* yyn is the number of a rule to reduce with. */
  958. yylen = yyr2[yyn];
  959. /* If YYLEN is nonzero, implement the default value of the action:
  960. `$$ = $1'.
  961. Otherwise, the following line sets YYVAL to garbage.
  962. This behavior is undocumented and Bison
  963. users should not rely upon it. Assigning to YYVAL
  964. unconditionally makes the parser a bit smaller, and it avoids a
  965. GCC warning that YYVAL may be used uninitialized. */
  966. yyval = yyvsp[1-yylen];
  967. YY_REDUCE_PRINT (yyn);
  968. switch (yyn)
  969. {
  970. case 4:
  971. #line 97 "cmDependsFortranParser.y"
  972. {
  973. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  974. cmDependsFortranParser_RuleUse(parser, yyvsp[-2].string);
  975. free(yyvsp[-2].string);
  976. }
  977. break;
  978. case 5:
  979. #line 103 "cmDependsFortranParser.y"
  980. {
  981. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  982. cmDependsFortranParser_RuleInclude(parser, yyvsp[-2].string);
  983. free(yyvsp[-2].string);
  984. }
  985. break;
  986. case 7:
  987. #line 110 "cmDependsFortranParser.y"
  988. {
  989. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  990. cmDependsFortranParser_RuleModule(parser, yyvsp[-1].string);
  991. free(yyvsp[-1].string);
  992. }
  993. break;
  994. case 8:
  995. #line 116 "cmDependsFortranParser.y"
  996. {
  997. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  998. cmDependsFortranParser_RuleDefine(parser, yyvsp[-2].string);
  999. free(yyvsp[-2].string);
  1000. }
  1001. break;
  1002. case 9:
  1003. #line 122 "cmDependsFortranParser.y"
  1004. {
  1005. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1006. cmDependsFortranParser_RuleUndef(parser, yyvsp[-2].string);
  1007. free(yyvsp[-2].string);
  1008. }
  1009. break;
  1010. case 10:
  1011. #line 128 "cmDependsFortranParser.y"
  1012. {
  1013. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1014. cmDependsFortranParser_RuleIfdef(parser, yyvsp[-2].string);
  1015. free(yyvsp[-2].string);
  1016. }
  1017. break;
  1018. case 11:
  1019. #line 134 "cmDependsFortranParser.y"
  1020. {
  1021. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1022. cmDependsFortranParser_RuleIfndef(parser, yyvsp[-2].string);
  1023. free(yyvsp[-2].string);
  1024. }
  1025. break;
  1026. case 12:
  1027. #line 140 "cmDependsFortranParser.y"
  1028. {
  1029. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1030. cmDependsFortranParser_RuleIf(parser);
  1031. }
  1032. break;
  1033. case 13:
  1034. #line 145 "cmDependsFortranParser.y"
  1035. {
  1036. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1037. cmDependsFortranParser_RuleElif(parser);
  1038. }
  1039. break;
  1040. case 14:
  1041. #line 150 "cmDependsFortranParser.y"
  1042. {
  1043. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1044. cmDependsFortranParser_RuleElse(parser);
  1045. }
  1046. break;
  1047. case 15:
  1048. #line 155 "cmDependsFortranParser.y"
  1049. {
  1050. cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner);
  1051. cmDependsFortranParser_RuleEndif(parser);
  1052. }
  1053. break;
  1054. case 41:
  1055. #line 175 "cmDependsFortranParser.y"
  1056. { free (yyvsp[0].string); }
  1057. break;
  1058. case 42:
  1059. #line 176 "cmDependsFortranParser.y"
  1060. { free (yyvsp[0].string); }
  1061. break;
  1062. }
  1063. /* Line 1010 of yacc.c. */
  1064. #line 1277 "cmDependsFortranParser.cxx"
  1065. yyvsp -= yylen;
  1066. yyssp -= yylen;
  1067. YY_STACK_PRINT (yyss, yyssp);
  1068. *++yyvsp = yyval;
  1069. /* Now `shift' the result of the reduction. Determine what state
  1070. that goes to, based on the state we popped back to and the rule
  1071. number reduced by. */
  1072. yyn = yyr1[yyn];
  1073. yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  1074. if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1075. yystate = yytable[yystate];
  1076. else
  1077. yystate = yydefgoto[yyn - YYNTOKENS];
  1078. goto yynewstate;
  1079. /*------------------------------------.
  1080. | yyerrlab -- here on detecting error |
  1081. `------------------------------------*/
  1082. yyerrlab:
  1083. /* If not already recovering from an error, report this error. */
  1084. if (!yyerrstatus)
  1085. {
  1086. ++yynerrs;
  1087. #if YYERROR_VERBOSE
  1088. yyn = yypact[yystate];
  1089. if (YYPACT_NINF < yyn && yyn < YYLAST)
  1090. {
  1091. YYSIZE_T yysize = 0;
  1092. int yytype = YYTRANSLATE (yychar);
  1093. const char* yyprefix;
  1094. char *yymsg;
  1095. int yyx;
  1096. /* Start YYX at -YYN if negative to avoid negative indexes in
  1097. YYCHECK. */
  1098. int yyxbegin = yyn < 0 ? -yyn : 0;
  1099. /* Stay within bounds of both yycheck and yytname. */
  1100. int yychecklim = YYLAST - yyn;
  1101. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  1102. int yycount = 0;
  1103. yyprefix = ", expecting ";
  1104. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  1105. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
  1106. {
  1107. yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
  1108. yycount += 1;
  1109. if (yycount == 5)
  1110. {
  1111. yysize = 0;
  1112. break;
  1113. }
  1114. }
  1115. yysize += (sizeof ("syntax error, unexpected ")
  1116. + yystrlen (yytname[yytype]));
  1117. yymsg = (char *) YYSTACK_ALLOC (yysize);
  1118. if (yymsg != 0)
  1119. {
  1120. char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
  1121. yyp = yystpcpy (yyp, yytname[yytype]);
  1122. if (yycount < 5)
  1123. {
  1124. yyprefix = ", expecting ";
  1125. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  1126. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
  1127. {
  1128. yyp = yystpcpy (yyp, yyprefix);
  1129. yyp = yystpcpy (yyp, yytname[yyx]);
  1130. yyprefix = " or ";
  1131. }
  1132. }
  1133. yyerror (yymsg);
  1134. YYSTACK_FREE (yymsg);
  1135. }
  1136. else
  1137. yyerror ("syntax error; also virtual memory exhausted");
  1138. }
  1139. else
  1140. #endif /* YYERROR_VERBOSE */
  1141. yyerror ("syntax error");
  1142. }
  1143. if (yyerrstatus == 3)
  1144. {
  1145. /* If just tried and failed to reuse lookahead token after an
  1146. error, discard it. */
  1147. if (yychar <= YYEOF)
  1148. {
  1149. /* If at end of input, pop the error token,
  1150. then the rest of the stack, then return failure. */
  1151. if (yychar == YYEOF)
  1152. for (;;)
  1153. {
  1154. YYPOPSTACK;
  1155. if (yyssp == yyss)
  1156. YYABORT;
  1157. YYDSYMPRINTF ("Error: popping", yystos[*yyssp],
  1158. yyvsp, yylsp);
  1159. yydestruct (yystos[*yyssp], yyvsp);
  1160. }
  1161. }
  1162. else
  1163. {
  1164. YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
  1165. yydestruct (yytoken, &yylval);
  1166. yychar = YYEMPTY;
  1167. }
  1168. }
  1169. /* Else will try to reuse lookahead token after shifting the error
  1170. token. */
  1171. goto yyerrlab1;
  1172. /*---------------------------------------------------.
  1173. | yyerrorlab -- error raised explicitly by YYERROR. |
  1174. `---------------------------------------------------*/
  1175. yyerrorlab:
  1176. #if defined(__GNUC__) || defined(__HP_aCC) || defined(__INTEL_COMPILER)
  1177. /* Pacify GCC when the user code never invokes YYERROR and the label
  1178. yyerrorlab therefore never appears in user code. */
  1179. if (0)
  1180. goto yyerrorlab;
  1181. #endif
  1182. yyvsp -= yylen;
  1183. yyssp -= yylen;
  1184. yystate = *yyssp;
  1185. goto yyerrlab1;
  1186. /*-------------------------------------------------------------.
  1187. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  1188. `-------------------------------------------------------------*/
  1189. yyerrlab1:
  1190. yyerrstatus = 3; /* Each real token shifted decrements this. */
  1191. for (;;)
  1192. {
  1193. yyn = yypact[yystate];
  1194. if (yyn != YYPACT_NINF)
  1195. {
  1196. yyn += YYTERROR;
  1197. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  1198. {
  1199. yyn = yytable[yyn];
  1200. if (0 < yyn)
  1201. break;
  1202. }
  1203. }
  1204. /* Pop the current state because it cannot handle the error token. */
  1205. if (yyssp == yyss)
  1206. YYABORT;
  1207. YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
  1208. yydestruct (yystos[yystate], yyvsp);
  1209. YYPOPSTACK;
  1210. yystate = *yyssp;
  1211. YY_STACK_PRINT (yyss, yyssp);
  1212. }
  1213. if (yyn == YYFINAL)
  1214. YYACCEPT;
  1215. YYDPRINTF ((stderr, "Shifting error token, "));
  1216. *++yyvsp = yylval;
  1217. yystate = yyn;
  1218. goto yynewstate;
  1219. /*-------------------------------------.
  1220. | yyacceptlab -- YYACCEPT comes here. |
  1221. `-------------------------------------*/
  1222. yyacceptlab:
  1223. yyresult = 0;
  1224. goto yyreturn;
  1225. /*-----------------------------------.
  1226. | yyabortlab -- YYABORT comes here. |
  1227. `-----------------------------------*/
  1228. yyabortlab:
  1229. yyresult = 1;
  1230. goto yyreturn;
  1231. #ifndef yyoverflow
  1232. /*----------------------------------------------.
  1233. | yyoverflowlab -- parser overflow comes here. |
  1234. `----------------------------------------------*/
  1235. yyoverflowlab:
  1236. yyerror ("parser stack overflow");
  1237. yyresult = 2;
  1238. /* Fall through. */
  1239. #endif
  1240. yyreturn:
  1241. #ifndef yyoverflow
  1242. if (yyss != yyssa)
  1243. YYSTACK_FREE (yyss);
  1244. #endif
  1245. return yyresult;
  1246. }
  1247. #line 180 "cmDependsFortranParser.y"
  1248. /* End of grammar */