cmDependsFortranParser.cxx 58 KB

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