cmDependsFortranParser.cxx 44 KB

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