cmFortranParser.cxx 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109
  1. /* A Bison parser, made by GNU Bison 3.8.2. */
  2. /* Bison implementation for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
  4. Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <https://www.gnu.org/licenses/>. */
  15. /* As a special exception, you may create a larger work that contains
  16. part or all of the Bison parser skeleton and distribute that work
  17. under terms of your choice, so long as that work isn't itself a
  18. parser generator using the skeleton or a modified version thereof
  19. as a parser skeleton. Alternatively, if you modify or redistribute
  20. the parser skeleton itself, you may (at your option) remove this
  21. special exception, which will cause the skeleton and the resulting
  22. Bison output files to be licensed under the GNU General Public
  23. License without this special exception.
  24. This special exception was added by the Free Software Foundation in
  25. version 2.2 of Bison. */
  26. /* C LALR(1) parser skeleton written by Richard Stallman, by
  27. simplifying the original so-called "semantic" parser. */
  28. /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
  29. especially those whose name start with YY_ or yy_. They are
  30. private implementation details that can be changed or removed. */
  31. /* All symbols defined below should begin with yy or YY, to avoid
  32. infringing on user name space. This should be done even for local
  33. variables, as they might otherwise be expanded by user macros.
  34. There are some unavoidable exceptions within include files to
  35. define necessary library symbols; they are noted "INFRINGES ON
  36. USER NAME SPACE" below. */
  37. /* Identify Bison output, and Bison version. */
  38. #define YYBISON 30802
  39. /* Bison version string. */
  40. #define YYBISON_VERSION "3.8.2"
  41. /* Skeleton name. */
  42. #define YYSKELETON_NAME "yacc.c"
  43. /* Pure parsers. */
  44. #define YYPURE 1
  45. /* Push parsers. */
  46. #define YYPUSH 0
  47. /* Pull parsers. */
  48. #define YYPULL 1
  49. /* Substitute the variable and function names. */
  50. #define yyparse cmFortran_yyparse
  51. #define yylex cmFortran_yylex
  52. #define yyerror cmFortran_yyerror
  53. #define yydebug cmFortran_yydebug
  54. #define yynerrs cmFortran_yynerrs
  55. /* First part of user prologue. */
  56. #line 1 "cmFortranParser.y"
  57. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  58. file Copyright.txt or https://cmake.org/licensing for details. */
  59. /*-------------------------------------------------------------------------
  60. Portions of this source have been derived from makedepf90 version 2.8.8,
  61. Copyright (C) 2000--2006 Erik Edelmann <[email protected]>
  62. The code was originally distributed under the GPL but permission
  63. from the copyright holder has been obtained to distribute this
  64. derived work under the CMake license.
  65. -------------------------------------------------------------------------*/
  66. /*
  67. This file must be translated to C and modified to build everywhere.
  68. Run bison like this:
  69. bison --name-prefix=cmFortran_yy
  70. --defines=cmFortranParserTokens.h
  71. -ocmFortranParser.cxx
  72. cmFortranParser.y
  73. */
  74. #include "cmConfigure.h" // IWYU pragma: keep
  75. #include "cmsys/String.h"
  76. #include <stdlib.h>
  77. #include <string.h>
  78. /*-------------------------------------------------------------------------*/
  79. #define cmFortranParser_cxx
  80. #include "cmFortranParser.h" /* Interface to parser object. */
  81. /* Forward declare the lexer entry point. */
  82. YY_DECL;
  83. /* Helper function to forward error callback from parser. */
  84. static void cmFortran_yyerror(yyscan_t yyscanner, const char* message)
  85. {
  86. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  87. cmFortranParser_Error(parser, message);
  88. }
  89. /* Disable some warnings in the generated code. */
  90. #ifdef _MSC_VER
  91. # pragma warning (disable: 4102) /* Unused goto label. */
  92. # pragma warning (disable: 4065) /* Switch contains default but no case. */
  93. # pragma warning (disable: 4701) /* Local variable may not be initialized. */
  94. # pragma warning (disable: 4702) /* Unreachable code. */
  95. # pragma warning (disable: 4127) /* Conditional expression is constant. */
  96. # pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */
  97. #endif
  98. #if defined(__GNUC__) && __GNUC__ >= 8
  99. # pragma GCC diagnostic ignored "-Wconversion"
  100. # pragma GCC diagnostic ignored "-Wfree-nonheap-object"
  101. #endif
  102. #if defined(__clang__) && defined(__has_warning)
  103. # if __has_warning("-Wunused-but-set-variable")
  104. # pragma clang diagnostic ignored "-Wunused-but-set-variable"
  105. # endif
  106. #endif
  107. #line 142 "cmFortranParser.cxx"
  108. # ifndef YY_CAST
  109. # ifdef __cplusplus
  110. # define YY_CAST(Type, Val) static_cast<Type> (Val)
  111. # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
  112. # else
  113. # define YY_CAST(Type, Val) ((Type) (Val))
  114. # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
  115. # endif
  116. # endif
  117. # ifndef YY_NULLPTR
  118. # if defined __cplusplus
  119. # if 201103L <= __cplusplus
  120. # define YY_NULLPTR nullptr
  121. # else
  122. # define YY_NULLPTR 0
  123. # endif
  124. # else
  125. # define YY_NULLPTR ((void*)0)
  126. # endif
  127. # endif
  128. #include "cmFortranParserTokens.h"
  129. /* Symbol kind. */
  130. enum yysymbol_kind_t
  131. {
  132. YYSYMBOL_YYEMPTY = -2,
  133. YYSYMBOL_YYEOF = 0, /* "end of file" */
  134. YYSYMBOL_YYerror = 1, /* error */
  135. YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
  136. YYSYMBOL_EOSTMT = 3, /* EOSTMT */
  137. YYSYMBOL_ASSIGNMENT_OP = 4, /* ASSIGNMENT_OP */
  138. YYSYMBOL_GARBAGE = 5, /* GARBAGE */
  139. YYSYMBOL_CPP_LINE_DIRECTIVE = 6, /* CPP_LINE_DIRECTIVE */
  140. YYSYMBOL_CPP_INCLUDE = 7, /* CPP_INCLUDE */
  141. YYSYMBOL_F90PPR_INCLUDE = 8, /* F90PPR_INCLUDE */
  142. YYSYMBOL_COCO_INCLUDE = 9, /* COCO_INCLUDE */
  143. YYSYMBOL_F90PPR_DEFINE = 10, /* F90PPR_DEFINE */
  144. YYSYMBOL_CPP_DEFINE = 11, /* CPP_DEFINE */
  145. YYSYMBOL_F90PPR_UNDEF = 12, /* F90PPR_UNDEF */
  146. YYSYMBOL_CPP_UNDEF = 13, /* CPP_UNDEF */
  147. YYSYMBOL_CPP_IFDEF = 14, /* CPP_IFDEF */
  148. YYSYMBOL_CPP_IFNDEF = 15, /* CPP_IFNDEF */
  149. YYSYMBOL_CPP_IF = 16, /* CPP_IF */
  150. YYSYMBOL_CPP_ELSE = 17, /* CPP_ELSE */
  151. YYSYMBOL_CPP_ELIF = 18, /* CPP_ELIF */
  152. YYSYMBOL_CPP_ENDIF = 19, /* CPP_ENDIF */
  153. YYSYMBOL_F90PPR_IFDEF = 20, /* F90PPR_IFDEF */
  154. YYSYMBOL_F90PPR_IFNDEF = 21, /* F90PPR_IFNDEF */
  155. YYSYMBOL_F90PPR_IF = 22, /* F90PPR_IF */
  156. YYSYMBOL_F90PPR_ELSE = 23, /* F90PPR_ELSE */
  157. YYSYMBOL_F90PPR_ELIF = 24, /* F90PPR_ELIF */
  158. YYSYMBOL_F90PPR_ENDIF = 25, /* F90PPR_ENDIF */
  159. YYSYMBOL_COMMA = 26, /* COMMA */
  160. YYSYMBOL_COLON = 27, /* COLON */
  161. YYSYMBOL_DCOLON = 28, /* DCOLON */
  162. YYSYMBOL_LPAREN = 29, /* LPAREN */
  163. YYSYMBOL_RPAREN = 30, /* RPAREN */
  164. YYSYMBOL_UNTERMINATED_STRING = 31, /* UNTERMINATED_STRING */
  165. YYSYMBOL_STRING = 32, /* STRING */
  166. YYSYMBOL_WORD = 33, /* WORD */
  167. YYSYMBOL_CPP_INCLUDE_ANGLE = 34, /* CPP_INCLUDE_ANGLE */
  168. YYSYMBOL_END = 35, /* END */
  169. YYSYMBOL_INCLUDE = 36, /* INCLUDE */
  170. YYSYMBOL_INTERFACE = 37, /* INTERFACE */
  171. YYSYMBOL_MODULE = 38, /* MODULE */
  172. YYSYMBOL_SUBMODULE = 39, /* SUBMODULE */
  173. YYSYMBOL_USE = 40, /* USE */
  174. YYSYMBOL_YYACCEPT = 41, /* $accept */
  175. YYSYMBOL_code = 42, /* code */
  176. YYSYMBOL_stmt = 43, /* stmt */
  177. YYSYMBOL_include = 44, /* include */
  178. YYSYMBOL_define = 45, /* define */
  179. YYSYMBOL_undef = 46, /* undef */
  180. YYSYMBOL_ifdef = 47, /* ifdef */
  181. YYSYMBOL_ifndef = 48, /* ifndef */
  182. YYSYMBOL_if = 49, /* if */
  183. YYSYMBOL_elif = 50, /* elif */
  184. YYSYMBOL_else = 51, /* else */
  185. YYSYMBOL_endif = 52, /* endif */
  186. YYSYMBOL_other = 53, /* other */
  187. YYSYMBOL_misc_code = 54 /* misc_code */
  188. };
  189. typedef enum yysymbol_kind_t yysymbol_kind_t;
  190. #ifdef short
  191. # undef short
  192. #endif
  193. /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
  194. <limits.h> and (if available) <stdint.h> are included
  195. so that the code can choose integer types of a good width. */
  196. #ifndef __PTRDIFF_MAX__
  197. # include <limits.h> /* INFRINGES ON USER NAME SPACE */
  198. # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
  199. # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
  200. # define YY_STDINT_H
  201. # endif
  202. #endif
  203. /* Narrow types that promote to a signed type and that can represent a
  204. signed or unsigned integer of at least N bits. In tables they can
  205. save space and decrease cache pressure. Promoting to a signed type
  206. helps avoid bugs in integer arithmetic. */
  207. #ifdef __INT_LEAST8_MAX__
  208. typedef __INT_LEAST8_TYPE__ yytype_int8;
  209. #elif defined YY_STDINT_H
  210. typedef int_least8_t yytype_int8;
  211. #else
  212. typedef signed char yytype_int8;
  213. #endif
  214. #ifdef __INT_LEAST16_MAX__
  215. typedef __INT_LEAST16_TYPE__ yytype_int16;
  216. #elif defined YY_STDINT_H
  217. typedef int_least16_t yytype_int16;
  218. #else
  219. typedef short yytype_int16;
  220. #endif
  221. /* Work around bug in HP-UX 11.23, which defines these macros
  222. incorrectly for preprocessor constants. This workaround can likely
  223. be removed in 2023, as HPE has promised support for HP-UX 11.23
  224. (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
  225. <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
  226. #ifdef __hpux
  227. # undef UINT_LEAST8_MAX
  228. # undef UINT_LEAST16_MAX
  229. # define UINT_LEAST8_MAX 255
  230. # define UINT_LEAST16_MAX 65535
  231. #endif
  232. #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
  233. typedef __UINT_LEAST8_TYPE__ yytype_uint8;
  234. #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
  235. && UINT_LEAST8_MAX <= INT_MAX)
  236. typedef uint_least8_t yytype_uint8;
  237. #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
  238. typedef unsigned char yytype_uint8;
  239. #else
  240. typedef short yytype_uint8;
  241. #endif
  242. #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
  243. typedef __UINT_LEAST16_TYPE__ yytype_uint16;
  244. #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
  245. && UINT_LEAST16_MAX <= INT_MAX)
  246. typedef uint_least16_t yytype_uint16;
  247. #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
  248. typedef unsigned short yytype_uint16;
  249. #else
  250. typedef int yytype_uint16;
  251. #endif
  252. #ifndef YYPTRDIFF_T
  253. # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
  254. # define YYPTRDIFF_T __PTRDIFF_TYPE__
  255. # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
  256. # elif defined PTRDIFF_MAX
  257. # ifndef ptrdiff_t
  258. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  259. # endif
  260. # define YYPTRDIFF_T ptrdiff_t
  261. # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
  262. # else
  263. # define YYPTRDIFF_T long
  264. # define YYPTRDIFF_MAXIMUM LONG_MAX
  265. # endif
  266. #endif
  267. #ifndef YYSIZE_T
  268. # ifdef __SIZE_TYPE__
  269. # define YYSIZE_T __SIZE_TYPE__
  270. # elif defined size_t
  271. # define YYSIZE_T size_t
  272. # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
  273. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  274. # define YYSIZE_T size_t
  275. # else
  276. # define YYSIZE_T unsigned
  277. # endif
  278. #endif
  279. #define YYSIZE_MAXIMUM \
  280. YY_CAST (YYPTRDIFF_T, \
  281. (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
  282. ? YYPTRDIFF_MAXIMUM \
  283. : YY_CAST (YYSIZE_T, -1)))
  284. #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
  285. /* Stored state numbers (used for stacks). */
  286. typedef yytype_int8 yy_state_t;
  287. /* State numbers in computations. */
  288. typedef int yy_state_fast_t;
  289. #ifndef YY_
  290. # if defined YYENABLE_NLS && YYENABLE_NLS
  291. # if ENABLE_NLS
  292. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  293. # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  294. # endif
  295. # endif
  296. # ifndef YY_
  297. # define YY_(Msgid) Msgid
  298. # endif
  299. #endif
  300. #ifndef YY_ATTRIBUTE_PURE
  301. # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
  302. # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
  303. # else
  304. # define YY_ATTRIBUTE_PURE
  305. # endif
  306. #endif
  307. #ifndef YY_ATTRIBUTE_UNUSED
  308. # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
  309. # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
  310. # else
  311. # define YY_ATTRIBUTE_UNUSED
  312. # endif
  313. #endif
  314. /* Suppress unused-variable warnings by "using" E. */
  315. #if ! defined lint || defined __GNUC__
  316. # define YY_USE(E) ((void) (E))
  317. #else
  318. # define YY_USE(E) /* empty */
  319. #endif
  320. /* Suppress an incorrect diagnostic about yylval being uninitialized. */
  321. #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
  322. # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
  323. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  324. _Pragma ("GCC diagnostic push") \
  325. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
  326. # else
  327. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  328. _Pragma ("GCC diagnostic push") \
  329. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
  330. _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  331. # endif
  332. # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  333. _Pragma ("GCC diagnostic pop")
  334. #else
  335. # define YY_INITIAL_VALUE(Value) Value
  336. #endif
  337. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  338. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  339. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  340. #endif
  341. #ifndef YY_INITIAL_VALUE
  342. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  343. #endif
  344. #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
  345. # define YY_IGNORE_USELESS_CAST_BEGIN \
  346. _Pragma ("GCC diagnostic push") \
  347. _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
  348. # define YY_IGNORE_USELESS_CAST_END \
  349. _Pragma ("GCC diagnostic pop")
  350. #endif
  351. #ifndef YY_IGNORE_USELESS_CAST_BEGIN
  352. # define YY_IGNORE_USELESS_CAST_BEGIN
  353. # define YY_IGNORE_USELESS_CAST_END
  354. #endif
  355. #define YY_ASSERT(E) ((void) (0 && (E)))
  356. #if 1
  357. /* The parser invokes alloca or malloc; define the necessary symbols. */
  358. # ifdef YYSTACK_USE_ALLOCA
  359. # if YYSTACK_USE_ALLOCA
  360. # ifdef __GNUC__
  361. # define YYSTACK_ALLOC __builtin_alloca
  362. # elif defined __BUILTIN_VA_ARG_INCR
  363. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  364. # elif defined _AIX
  365. # define YYSTACK_ALLOC __alloca
  366. # elif defined _MSC_VER
  367. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  368. # define alloca _alloca
  369. # else
  370. # define YYSTACK_ALLOC alloca
  371. # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
  372. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  373. /* Use EXIT_SUCCESS as a witness for stdlib.h. */
  374. # ifndef EXIT_SUCCESS
  375. # define EXIT_SUCCESS 0
  376. # endif
  377. # endif
  378. # endif
  379. # endif
  380. # endif
  381. # ifdef YYSTACK_ALLOC
  382. /* Pacify GCC's 'empty if-body' warning. */
  383. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  384. # ifndef YYSTACK_ALLOC_MAXIMUM
  385. /* The OS might guarantee only one guard page at the bottom of the stack,
  386. and a page size can be as small as 4096 bytes. So we cannot safely
  387. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  388. to allow for a few compiler-allocated temporary stack slots. */
  389. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  390. # endif
  391. # else
  392. # define YYSTACK_ALLOC YYMALLOC
  393. # define YYSTACK_FREE YYFREE
  394. # ifndef YYSTACK_ALLOC_MAXIMUM
  395. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  396. # endif
  397. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  398. && ! ((defined YYMALLOC || defined malloc) \
  399. && (defined YYFREE || defined free)))
  400. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  401. # ifndef EXIT_SUCCESS
  402. # define EXIT_SUCCESS 0
  403. # endif
  404. # endif
  405. # ifndef YYMALLOC
  406. # define YYMALLOC malloc
  407. # if ! defined malloc && ! defined EXIT_SUCCESS
  408. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  409. # endif
  410. # endif
  411. # ifndef YYFREE
  412. # define YYFREE free
  413. # if ! defined free && ! defined EXIT_SUCCESS
  414. void free (void *); /* INFRINGES ON USER NAME SPACE */
  415. # endif
  416. # endif
  417. # endif
  418. #endif /* 1 */
  419. #if (! defined yyoverflow \
  420. && (! defined __cplusplus \
  421. || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  422. /* A type that is properly aligned for any stack member. */
  423. union yyalloc
  424. {
  425. yy_state_t yyss_alloc;
  426. YYSTYPE yyvs_alloc;
  427. };
  428. /* The size of the maximum gap between one aligned stack and the next. */
  429. # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
  430. /* The size of an array large to enough to hold all stacks, each with
  431. N elements. */
  432. # define YYSTACK_BYTES(N) \
  433. ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
  434. + YYSTACK_GAP_MAXIMUM)
  435. # define YYCOPY_NEEDED 1
  436. /* Relocate STACK from its old location to the new one. The
  437. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  438. elements in the stack, and YYPTR gives the new location of the
  439. stack. Advance YYPTR to a properly aligned location for the next
  440. stack. */
  441. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  442. do \
  443. { \
  444. YYPTRDIFF_T yynewbytes; \
  445. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  446. Stack = &yyptr->Stack_alloc; \
  447. yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
  448. yyptr += yynewbytes / YYSIZEOF (*yyptr); \
  449. } \
  450. while (0)
  451. #endif
  452. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  453. /* Copy COUNT objects from SRC to DST. The source and destination do
  454. not overlap. */
  455. # ifndef YYCOPY
  456. # if defined __GNUC__ && 1 < __GNUC__
  457. # define YYCOPY(Dst, Src, Count) \
  458. __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
  459. # else
  460. # define YYCOPY(Dst, Src, Count) \
  461. do \
  462. { \
  463. YYPTRDIFF_T yyi; \
  464. for (yyi = 0; yyi < (Count); yyi++) \
  465. (Dst)[yyi] = (Src)[yyi]; \
  466. } \
  467. while (0)
  468. # endif
  469. # endif
  470. #endif /* !YYCOPY_NEEDED */
  471. /* YYFINAL -- State number of the termination state. */
  472. #define YYFINAL 2
  473. /* YYLAST -- Last index in YYTABLE. */
  474. #define YYLAST 594
  475. /* YYNTOKENS -- Number of terminals. */
  476. #define YYNTOKENS 41
  477. /* YYNNTS -- Number of nonterminals. */
  478. #define YYNNTS 14
  479. /* YYNRULES -- Number of rules. */
  480. #define YYNRULES 64
  481. /* YYNSTATES -- Number of states. */
  482. #define YYNSTATES 127
  483. /* YYMAXUTOK -- Last valid token kind. */
  484. #define YYMAXUTOK 295
  485. /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
  486. as returned by yylex, with out-of-bounds checking. */
  487. #define YYTRANSLATE(YYX) \
  488. (0 <= (YYX) && (YYX) <= YYMAXUTOK \
  489. ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
  490. : YYSYMBOL_YYUNDEF)
  491. /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
  492. as returned by yylex. */
  493. static const yytype_int8 yytranslate[] =
  494. {
  495. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  496. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  497. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  498. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  499. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  500. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  501. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  502. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  503. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  504. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  505. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  506. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  507. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  508. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  509. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  510. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  511. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  512. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  513. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  514. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  515. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  516. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  517. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  518. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  519. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  520. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  521. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  522. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  523. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  524. 35, 36, 37, 38, 39, 40
  525. };
  526. #if YYDEBUG
  527. /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
  528. static const yytype_int16 yyrline[] =
  529. {
  530. 0, 106, 106, 106, 109, 113, 118, 127, 133, 140,
  531. 145, 149, 154, 166, 171, 176, 181, 186, 191, 196,
  532. 201, 206, 210, 214, 218, 222, 223, 228, 228, 228,
  533. 229, 229, 230, 230, 231, 231, 232, 232, 233, 233,
  534. 234, 234, 235, 235, 236, 236, 237, 237, 240, 241,
  535. 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
  536. 252, 253, 254, 255, 256
  537. };
  538. #endif
  539. /** Accessing symbol of state STATE. */
  540. #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
  541. #if 1
  542. /* The user-facing name of the symbol whose (internal) number is
  543. YYSYMBOL. No bounds checking. */
  544. static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
  545. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  546. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  547. static const char *const yytname[] =
  548. {
  549. "\"end of file\"", "error", "\"invalid token\"", "EOSTMT",
  550. "ASSIGNMENT_OP", "GARBAGE", "CPP_LINE_DIRECTIVE", "CPP_INCLUDE",
  551. "F90PPR_INCLUDE", "COCO_INCLUDE", "F90PPR_DEFINE", "CPP_DEFINE",
  552. "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF", "CPP_IF",
  553. "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF", "F90PPR_IFNDEF",
  554. "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF", "F90PPR_ENDIF", "COMMA",
  555. "COLON", "DCOLON", "LPAREN", "RPAREN", "UNTERMINATED_STRING", "STRING",
  556. "WORD", "CPP_INCLUDE_ANGLE", "END", "INCLUDE", "INTERFACE", "MODULE",
  557. "SUBMODULE", "USE", "$accept", "code", "stmt", "include", "define",
  558. "undef", "ifdef", "ifndef", "if", "elif", "else", "endif", "other",
  559. "misc_code", YY_NULLPTR
  560. };
  561. static const char *
  562. yysymbol_name (yysymbol_kind_t yysymbol)
  563. {
  564. return yytname[yysymbol];
  565. }
  566. #endif
  567. #define YYPACT_NINF (-39)
  568. #define yypact_value_is_default(Yyn) \
  569. ((Yyn) == YYPACT_NINF)
  570. #define YYTABLE_NINF (-1)
  571. #define yytable_value_is_error(Yyn) \
  572. 0
  573. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  574. STATE-NUM. */
  575. static const yytype_int16 yypact[] =
  576. {
  577. -39, 21, -39, 1, -39, -20, -39, -39, -39, -39,
  578. -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
  579. -39, -39, -39, -39, -39, -39, -24, -18, 20, -8,
  580. -3, 40, -39, 15, 16, 17, 19, 34, -39, -39,
  581. -39, -39, -39, -39, 59, -39, -39, -39, -39, -39,
  582. 36, 37, 38, -39, -39, -39, -39, -39, -39, 77,
  583. 115, 130, 168, 183, -39, -39, -39, -39, -39, -39,
  584. -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
  585. -39, -39, -39, 221, 236, 274, 289, -21, 26, -39,
  586. 327, 342, 380, 395, 433, 448, -39, -39, -39, -39,
  587. -39, -39, -39, -39, -39, 39, 41, 42, 486, -39,
  588. -39, -39, -39, -39, -39, 18, -39, -39, -39, 43,
  589. 501, 539, -39, -39, -39, 554, -39
  590. };
  591. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  592. Performed when YYTABLE does not specify something else to do. Zero
  593. means the default is an error. */
  594. static const yytype_int8 yydefact[] =
  595. {
  596. 2, 0, 1, 0, 25, 0, 27, 28, 29, 31,
  597. 30, 33, 32, 34, 36, 38, 42, 40, 44, 35,
  598. 37, 39, 43, 41, 45, 46, 0, 0, 0, 0,
  599. 0, 0, 3, 0, 0, 0, 0, 0, 46, 46,
  600. 46, 46, 26, 46, 0, 46, 46, 4, 46, 46,
  601. 0, 0, 0, 46, 46, 46, 46, 46, 46, 0,
  602. 0, 0, 0, 0, 15, 57, 56, 64, 62, 58,
  603. 59, 60, 61, 63, 55, 48, 49, 50, 51, 52,
  604. 53, 54, 47, 0, 0, 0, 0, 0, 0, 46,
  605. 0, 0, 0, 0, 0, 0, 21, 22, 23, 24,
  606. 14, 10, 13, 9, 6, 0, 0, 0, 0, 5,
  607. 16, 17, 18, 19, 20, 0, 46, 46, 11, 0,
  608. 0, 0, 46, 7, 12, 0, 8
  609. };
  610. /* YYPGOTO[NTERM-NUM]. */
  611. static const yytype_int8 yypgoto[] =
  612. {
  613. -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
  614. -39, -39, -38, -39
  615. };
  616. /* YYDEFGOTO[NTERM-NUM]. */
  617. static const yytype_int8 yydefgoto[] =
  618. {
  619. 0, 1, 32, 33, 34, 35, 36, 37, 38, 39,
  620. 40, 41, 44, 82
  621. };
  622. /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  623. positive, shift that token. If negative, reduce the rule whose
  624. number is the opposite. If YYTABLE_NINF, syntax error. */
  625. static const yytype_int8 yytable[] =
  626. {
  627. 59, 60, 61, 62, 42, 63, 105, 83, 84, 106,
  628. 85, 86, 43, 45, 46, 90, 91, 92, 93, 94,
  629. 95, 2, 3, 47, 4, 49, 50, 5, 6, 7,
  630. 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
  631. 18, 19, 20, 21, 22, 23, 24, 54, 119, 55,
  632. 56, 108, 57, 48, 107, 25, 26, 27, 28, 29,
  633. 30, 31, 64, 65, 66, 67, 51, 58, 52, 87,
  634. 88, 89, 115, 53, 116, 117, 122, 0, 120, 121,
  635. 96, 65, 66, 67, 125, 68, 69, 70, 71, 72,
  636. 73, 74, 75, 0, 76, 77, 78, 79, 80, 81,
  637. 0, 0, 0, 68, 69, 70, 71, 72, 73, 74,
  638. 75, 0, 76, 77, 78, 79, 80, 81, 97, 65,
  639. 66, 67, 0, 0, 0, 0, 0, 0, 0, 0,
  640. 0, 0, 0, 98, 65, 66, 67, 0, 0, 0,
  641. 0, 68, 69, 70, 71, 72, 73, 74, 75, 0,
  642. 76, 77, 78, 79, 80, 81, 68, 69, 70, 71,
  643. 72, 73, 74, 75, 0, 76, 77, 78, 79, 80,
  644. 81, 99, 65, 66, 67, 0, 0, 0, 0, 0,
  645. 0, 0, 0, 0, 0, 0, 100, 65, 66, 67,
  646. 0, 0, 0, 0, 68, 69, 70, 71, 72, 73,
  647. 74, 75, 0, 76, 77, 78, 79, 80, 81, 68,
  648. 69, 70, 71, 72, 73, 74, 75, 0, 76, 77,
  649. 78, 79, 80, 81, 101, 65, 66, 67, 0, 0,
  650. 0, 0, 0, 0, 0, 0, 0, 0, 0, 102,
  651. 65, 66, 67, 0, 0, 0, 0, 68, 69, 70,
  652. 71, 72, 73, 74, 75, 0, 76, 77, 78, 79,
  653. 80, 81, 68, 69, 70, 71, 72, 73, 74, 75,
  654. 0, 76, 77, 78, 79, 80, 81, 103, 65, 66,
  655. 67, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  656. 0, 0, 104, 65, 66, 67, 0, 0, 0, 0,
  657. 68, 69, 70, 71, 72, 73, 74, 75, 0, 76,
  658. 77, 78, 79, 80, 81, 68, 69, 70, 71, 72,
  659. 73, 74, 75, 0, 76, 77, 78, 79, 80, 81,
  660. 109, 65, 66, 67, 0, 0, 0, 0, 0, 0,
  661. 0, 0, 0, 0, 0, 110, 65, 66, 67, 0,
  662. 0, 0, 0, 68, 69, 70, 71, 72, 73, 74,
  663. 75, 0, 76, 77, 78, 79, 80, 81, 68, 69,
  664. 70, 71, 72, 73, 74, 75, 0, 76, 77, 78,
  665. 79, 80, 81, 111, 65, 66, 67, 0, 0, 0,
  666. 0, 0, 0, 0, 0, 0, 0, 0, 112, 65,
  667. 66, 67, 0, 0, 0, 0, 68, 69, 70, 71,
  668. 72, 73, 74, 75, 0, 76, 77, 78, 79, 80,
  669. 81, 68, 69, 70, 71, 72, 73, 74, 75, 0,
  670. 76, 77, 78, 79, 80, 81, 113, 65, 66, 67,
  671. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  672. 0, 114, 65, 66, 67, 0, 0, 0, 0, 68,
  673. 69, 70, 71, 72, 73, 74, 75, 0, 76, 77,
  674. 78, 79, 80, 81, 68, 69, 70, 71, 72, 73,
  675. 74, 75, 0, 76, 77, 78, 79, 80, 81, 118,
  676. 65, 66, 67, 0, 0, 0, 0, 0, 0, 0,
  677. 0, 0, 0, 0, 123, 65, 66, 67, 0, 0,
  678. 0, 0, 68, 69, 70, 71, 72, 73, 74, 75,
  679. 0, 76, 77, 78, 79, 80, 81, 68, 69, 70,
  680. 71, 72, 73, 74, 75, 0, 76, 77, 78, 79,
  681. 80, 81, 124, 65, 66, 67, 0, 0, 0, 0,
  682. 0, 0, 0, 0, 0, 0, 0, 126, 65, 66,
  683. 67, 0, 0, 0, 0, 68, 69, 70, 71, 72,
  684. 73, 74, 75, 0, 76, 77, 78, 79, 80, 81,
  685. 68, 69, 70, 71, 72, 73, 74, 75, 0, 76,
  686. 77, 78, 79, 80, 81
  687. };
  688. static const yytype_int8 yycheck[] =
  689. {
  690. 38, 39, 40, 41, 3, 43, 27, 45, 46, 30,
  691. 48, 49, 32, 37, 32, 53, 54, 55, 56, 57,
  692. 58, 0, 1, 3, 3, 33, 29, 6, 7, 8,
  693. 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
  694. 19, 20, 21, 22, 23, 24, 25, 32, 30, 33,
  695. 33, 89, 33, 33, 28, 34, 35, 36, 37, 38,
  696. 39, 40, 3, 4, 5, 6, 26, 33, 28, 33,
  697. 33, 33, 33, 33, 33, 33, 33, -1, 116, 117,
  698. 3, 4, 5, 6, 122, 26, 27, 28, 29, 30,
  699. 31, 32, 33, -1, 35, 36, 37, 38, 39, 40,
  700. -1, -1, -1, 26, 27, 28, 29, 30, 31, 32,
  701. 33, -1, 35, 36, 37, 38, 39, 40, 3, 4,
  702. 5, 6, -1, -1, -1, -1, -1, -1, -1, -1,
  703. -1, -1, -1, 3, 4, 5, 6, -1, -1, -1,
  704. -1, 26, 27, 28, 29, 30, 31, 32, 33, -1,
  705. 35, 36, 37, 38, 39, 40, 26, 27, 28, 29,
  706. 30, 31, 32, 33, -1, 35, 36, 37, 38, 39,
  707. 40, 3, 4, 5, 6, -1, -1, -1, -1, -1,
  708. -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
  709. -1, -1, -1, -1, 26, 27, 28, 29, 30, 31,
  710. 32, 33, -1, 35, 36, 37, 38, 39, 40, 26,
  711. 27, 28, 29, 30, 31, 32, 33, -1, 35, 36,
  712. 37, 38, 39, 40, 3, 4, 5, 6, -1, -1,
  713. -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
  714. 4, 5, 6, -1, -1, -1, -1, 26, 27, 28,
  715. 29, 30, 31, 32, 33, -1, 35, 36, 37, 38,
  716. 39, 40, 26, 27, 28, 29, 30, 31, 32, 33,
  717. -1, 35, 36, 37, 38, 39, 40, 3, 4, 5,
  718. 6, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  719. -1, -1, 3, 4, 5, 6, -1, -1, -1, -1,
  720. 26, 27, 28, 29, 30, 31, 32, 33, -1, 35,
  721. 36, 37, 38, 39, 40, 26, 27, 28, 29, 30,
  722. 31, 32, 33, -1, 35, 36, 37, 38, 39, 40,
  723. 3, 4, 5, 6, -1, -1, -1, -1, -1, -1,
  724. -1, -1, -1, -1, -1, 3, 4, 5, 6, -1,
  725. -1, -1, -1, 26, 27, 28, 29, 30, 31, 32,
  726. 33, -1, 35, 36, 37, 38, 39, 40, 26, 27,
  727. 28, 29, 30, 31, 32, 33, -1, 35, 36, 37,
  728. 38, 39, 40, 3, 4, 5, 6, -1, -1, -1,
  729. -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
  730. 5, 6, -1, -1, -1, -1, 26, 27, 28, 29,
  731. 30, 31, 32, 33, -1, 35, 36, 37, 38, 39,
  732. 40, 26, 27, 28, 29, 30, 31, 32, 33, -1,
  733. 35, 36, 37, 38, 39, 40, 3, 4, 5, 6,
  734. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  735. -1, 3, 4, 5, 6, -1, -1, -1, -1, 26,
  736. 27, 28, 29, 30, 31, 32, 33, -1, 35, 36,
  737. 37, 38, 39, 40, 26, 27, 28, 29, 30, 31,
  738. 32, 33, -1, 35, 36, 37, 38, 39, 40, 3,
  739. 4, 5, 6, -1, -1, -1, -1, -1, -1, -1,
  740. -1, -1, -1, -1, 3, 4, 5, 6, -1, -1,
  741. -1, -1, 26, 27, 28, 29, 30, 31, 32, 33,
  742. -1, 35, 36, 37, 38, 39, 40, 26, 27, 28,
  743. 29, 30, 31, 32, 33, -1, 35, 36, 37, 38,
  744. 39, 40, 3, 4, 5, 6, -1, -1, -1, -1,
  745. -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
  746. 6, -1, -1, -1, -1, 26, 27, 28, 29, 30,
  747. 31, 32, 33, -1, 35, 36, 37, 38, 39, 40,
  748. 26, 27, 28, 29, 30, 31, 32, 33, -1, 35,
  749. 36, 37, 38, 39, 40
  750. };
  751. /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
  752. state STATE-NUM. */
  753. static const yytype_int8 yystos[] =
  754. {
  755. 0, 42, 0, 1, 3, 6, 7, 8, 9, 10,
  756. 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  757. 21, 22, 23, 24, 25, 34, 35, 36, 37, 38,
  758. 39, 40, 43, 44, 45, 46, 47, 48, 49, 50,
  759. 51, 52, 3, 32, 53, 37, 32, 3, 33, 33,
  760. 29, 26, 28, 33, 32, 33, 33, 33, 33, 53,
  761. 53, 53, 53, 53, 3, 4, 5, 6, 26, 27,
  762. 28, 29, 30, 31, 32, 33, 35, 36, 37, 38,
  763. 39, 40, 54, 53, 53, 53, 53, 33, 33, 33,
  764. 53, 53, 53, 53, 53, 53, 3, 3, 3, 3,
  765. 3, 3, 3, 3, 3, 27, 30, 28, 53, 3,
  766. 3, 3, 3, 3, 3, 33, 33, 33, 3, 30,
  767. 53, 53, 33, 3, 3, 53, 3
  768. };
  769. /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
  770. static const yytype_int8 yyr1[] =
  771. {
  772. 0, 41, 42, 42, 43, 43, 43, 43, 43, 43,
  773. 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
  774. 43, 43, 43, 43, 43, 43, 43, 44, 44, 44,
  775. 45, 45, 46, 46, 47, 47, 48, 48, 49, 49,
  776. 50, 50, 51, 51, 52, 52, 53, 53, 54, 54,
  777. 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
  778. 54, 54, 54, 54, 54
  779. };
  780. /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
  781. static const yytype_int8 yyr2[] =
  782. {
  783. 0, 2, 0, 2, 2, 4, 4, 7, 9, 4,
  784. 4, 5, 7, 4, 4, 3, 4, 4, 4, 4,
  785. 4, 3, 3, 3, 3, 1, 2, 1, 1, 1,
  786. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  787. 1, 1, 1, 1, 1, 1, 0, 2, 1, 1,
  788. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  789. 1, 1, 1, 1, 1
  790. };
  791. enum { YYENOMEM = -2 };
  792. #define yyerrok (yyerrstatus = 0)
  793. #define yyclearin (yychar = YYEMPTY)
  794. #define YYACCEPT goto yyacceptlab
  795. #define YYABORT goto yyabortlab
  796. #define YYERROR goto yyerrorlab
  797. #define YYNOMEM goto yyexhaustedlab
  798. #define YYRECOVERING() (!!yyerrstatus)
  799. #define YYBACKUP(Token, Value) \
  800. do \
  801. if (yychar == YYEMPTY) \
  802. { \
  803. yychar = (Token); \
  804. yylval = (Value); \
  805. YYPOPSTACK (yylen); \
  806. yystate = *yyssp; \
  807. goto yybackup; \
  808. } \
  809. else \
  810. { \
  811. yyerror (yyscanner, YY_("syntax error: cannot back up")); \
  812. YYERROR; \
  813. } \
  814. while (0)
  815. /* Backward compatibility with an undocumented macro.
  816. Use YYerror or YYUNDEF. */
  817. #define YYERRCODE YYUNDEF
  818. /* Enable debugging if requested. */
  819. #if YYDEBUG
  820. # ifndef YYFPRINTF
  821. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  822. # define YYFPRINTF fprintf
  823. # endif
  824. # define YYDPRINTF(Args) \
  825. do { \
  826. if (yydebug) \
  827. YYFPRINTF Args; \
  828. } while (0)
  829. # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
  830. do { \
  831. if (yydebug) \
  832. { \
  833. YYFPRINTF (stderr, "%s ", Title); \
  834. yy_symbol_print (stderr, \
  835. Kind, Value, yyscanner); \
  836. YYFPRINTF (stderr, "\n"); \
  837. } \
  838. } while (0)
  839. /*-----------------------------------.
  840. | Print this symbol's value on YYO. |
  841. `-----------------------------------*/
  842. static void
  843. yy_symbol_value_print (FILE *yyo,
  844. yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, yyscan_t yyscanner)
  845. {
  846. FILE *yyoutput = yyo;
  847. YY_USE (yyoutput);
  848. YY_USE (yyscanner);
  849. if (!yyvaluep)
  850. return;
  851. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  852. YY_USE (yykind);
  853. YY_IGNORE_MAYBE_UNINITIALIZED_END
  854. }
  855. /*---------------------------.
  856. | Print this symbol on YYO. |
  857. `---------------------------*/
  858. static void
  859. yy_symbol_print (FILE *yyo,
  860. yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, yyscan_t yyscanner)
  861. {
  862. YYFPRINTF (yyo, "%s %s (",
  863. yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
  864. yy_symbol_value_print (yyo, yykind, yyvaluep, yyscanner);
  865. YYFPRINTF (yyo, ")");
  866. }
  867. /*------------------------------------------------------------------.
  868. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  869. | TOP (included). |
  870. `------------------------------------------------------------------*/
  871. static void
  872. yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
  873. {
  874. YYFPRINTF (stderr, "Stack now");
  875. for (; yybottom <= yytop; yybottom++)
  876. {
  877. int yybot = *yybottom;
  878. YYFPRINTF (stderr, " %d", yybot);
  879. }
  880. YYFPRINTF (stderr, "\n");
  881. }
  882. # define YY_STACK_PRINT(Bottom, Top) \
  883. do { \
  884. if (yydebug) \
  885. yy_stack_print ((Bottom), (Top)); \
  886. } while (0)
  887. /*------------------------------------------------.
  888. | Report that the YYRULE is going to be reduced. |
  889. `------------------------------------------------*/
  890. static void
  891. yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
  892. int yyrule, yyscan_t yyscanner)
  893. {
  894. int yylno = yyrline[yyrule];
  895. int yynrhs = yyr2[yyrule];
  896. int yyi;
  897. YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
  898. yyrule - 1, yylno);
  899. /* The symbols being reduced. */
  900. for (yyi = 0; yyi < yynrhs; yyi++)
  901. {
  902. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  903. yy_symbol_print (stderr,
  904. YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
  905. &yyvsp[(yyi + 1) - (yynrhs)], yyscanner);
  906. YYFPRINTF (stderr, "\n");
  907. }
  908. }
  909. # define YY_REDUCE_PRINT(Rule) \
  910. do { \
  911. if (yydebug) \
  912. yy_reduce_print (yyssp, yyvsp, Rule, yyscanner); \
  913. } while (0)
  914. /* Nonzero means print parse trace. It is left uninitialized so that
  915. multiple parsers can coexist. */
  916. int yydebug;
  917. #else /* !YYDEBUG */
  918. # define YYDPRINTF(Args) ((void) 0)
  919. # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
  920. # define YY_STACK_PRINT(Bottom, Top)
  921. # define YY_REDUCE_PRINT(Rule)
  922. #endif /* !YYDEBUG */
  923. /* YYINITDEPTH -- initial size of the parser's stacks. */
  924. #ifndef YYINITDEPTH
  925. # define YYINITDEPTH 200
  926. #endif
  927. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  928. if the built-in stack extension method is used).
  929. Do not make this value too large; the results are undefined if
  930. YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  931. evaluated with infinite-precision integer arithmetic. */
  932. #ifndef YYMAXDEPTH
  933. # define YYMAXDEPTH 10000
  934. #endif
  935. /* Context of a parse error. */
  936. typedef struct
  937. {
  938. yy_state_t *yyssp;
  939. yysymbol_kind_t yytoken;
  940. } yypcontext_t;
  941. /* Put in YYARG at most YYARGN of the expected tokens given the
  942. current YYCTX, and return the number of tokens stored in YYARG. If
  943. YYARG is null, return the number of expected tokens (guaranteed to
  944. be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
  945. Return 0 if there are more than YYARGN expected tokens, yet fill
  946. YYARG up to YYARGN. */
  947. static int
  948. yypcontext_expected_tokens (const yypcontext_t *yyctx,
  949. yysymbol_kind_t yyarg[], int yyargn)
  950. {
  951. /* Actual size of YYARG. */
  952. int yycount = 0;
  953. int yyn = yypact[+*yyctx->yyssp];
  954. if (!yypact_value_is_default (yyn))
  955. {
  956. /* Start YYX at -YYN if negative to avoid negative indexes in
  957. YYCHECK. In other words, skip the first -YYN actions for
  958. this state because they are default actions. */
  959. int yyxbegin = yyn < 0 ? -yyn : 0;
  960. /* Stay within bounds of both yycheck and yytname. */
  961. int yychecklim = YYLAST - yyn + 1;
  962. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  963. int yyx;
  964. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  965. if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
  966. && !yytable_value_is_error (yytable[yyx + yyn]))
  967. {
  968. if (!yyarg)
  969. ++yycount;
  970. else if (yycount == yyargn)
  971. return 0;
  972. else
  973. yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
  974. }
  975. }
  976. if (yyarg && yycount == 0 && 0 < yyargn)
  977. yyarg[0] = YYSYMBOL_YYEMPTY;
  978. return yycount;
  979. }
  980. #ifndef yystrlen
  981. # if defined __GLIBC__ && defined _STRING_H
  982. # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
  983. # else
  984. /* Return the length of YYSTR. */
  985. static YYPTRDIFF_T
  986. yystrlen (const char *yystr)
  987. {
  988. YYPTRDIFF_T yylen;
  989. for (yylen = 0; yystr[yylen]; yylen++)
  990. continue;
  991. return yylen;
  992. }
  993. # endif
  994. #endif
  995. #ifndef yystpcpy
  996. # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
  997. # define yystpcpy stpcpy
  998. # else
  999. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  1000. YYDEST. */
  1001. static char *
  1002. yystpcpy (char *yydest, const char *yysrc)
  1003. {
  1004. char *yyd = yydest;
  1005. const char *yys = yysrc;
  1006. while ((*yyd++ = *yys++) != '\0')
  1007. continue;
  1008. return yyd - 1;
  1009. }
  1010. # endif
  1011. #endif
  1012. #ifndef yytnamerr
  1013. /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  1014. quotes and backslashes, so that it's suitable for yyerror. The
  1015. heuristic is that double-quoting is unnecessary unless the string
  1016. contains an apostrophe, a comma, or backslash (other than
  1017. backslash-backslash). YYSTR is taken from yytname. If YYRES is
  1018. null, do not copy; instead, return the length of what the result
  1019. would have been. */
  1020. static YYPTRDIFF_T
  1021. yytnamerr (char *yyres, const char *yystr)
  1022. {
  1023. if (*yystr == '"')
  1024. {
  1025. YYPTRDIFF_T yyn = 0;
  1026. char const *yyp = yystr;
  1027. for (;;)
  1028. switch (*++yyp)
  1029. {
  1030. case '\'':
  1031. case ',':
  1032. goto do_not_strip_quotes;
  1033. case '\\':
  1034. if (*++yyp != '\\')
  1035. goto do_not_strip_quotes;
  1036. else
  1037. goto append;
  1038. append:
  1039. default:
  1040. if (yyres)
  1041. yyres[yyn] = *yyp;
  1042. yyn++;
  1043. break;
  1044. case '"':
  1045. if (yyres)
  1046. yyres[yyn] = '\0';
  1047. return yyn;
  1048. }
  1049. do_not_strip_quotes: ;
  1050. }
  1051. if (yyres)
  1052. return yystpcpy (yyres, yystr) - yyres;
  1053. else
  1054. return yystrlen (yystr);
  1055. }
  1056. #endif
  1057. static int
  1058. yy_syntax_error_arguments (const yypcontext_t *yyctx,
  1059. yysymbol_kind_t yyarg[], int yyargn)
  1060. {
  1061. /* Actual size of YYARG. */
  1062. int yycount = 0;
  1063. /* There are many possibilities here to consider:
  1064. - If this state is a consistent state with a default action, then
  1065. the only way this function was invoked is if the default action
  1066. is an error action. In that case, don't check for expected
  1067. tokens because there are none.
  1068. - The only way there can be no lookahead present (in yychar) is if
  1069. this state is a consistent state with a default action. Thus,
  1070. detecting the absence of a lookahead is sufficient to determine
  1071. that there is no unexpected or expected token to report. In that
  1072. case, just report a simple "syntax error".
  1073. - Don't assume there isn't a lookahead just because this state is a
  1074. consistent state with a default action. There might have been a
  1075. previous inconsistent state, consistent state with a non-default
  1076. action, or user semantic action that manipulated yychar.
  1077. - Of course, the expected token list depends on states to have
  1078. correct lookahead information, and it depends on the parser not
  1079. to perform extra reductions after fetching a lookahead from the
  1080. scanner and before detecting a syntax error. Thus, state merging
  1081. (from LALR or IELR) and default reductions corrupt the expected
  1082. token list. However, the list is correct for canonical LR with
  1083. one exception: it will still contain any token that will not be
  1084. accepted due to an error action in a later state.
  1085. */
  1086. if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
  1087. {
  1088. int yyn;
  1089. if (yyarg)
  1090. yyarg[yycount] = yyctx->yytoken;
  1091. ++yycount;
  1092. yyn = yypcontext_expected_tokens (yyctx,
  1093. yyarg ? yyarg + 1 : yyarg, yyargn - 1);
  1094. if (yyn == YYENOMEM)
  1095. return YYENOMEM;
  1096. else
  1097. yycount += yyn;
  1098. }
  1099. return yycount;
  1100. }
  1101. /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
  1102. about the unexpected token YYTOKEN for the state stack whose top is
  1103. YYSSP.
  1104. Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is
  1105. not large enough to hold the message. In that case, also set
  1106. *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the
  1107. required number of bytes is too large to store. */
  1108. static int
  1109. yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
  1110. const yypcontext_t *yyctx)
  1111. {
  1112. enum { YYARGS_MAX = 5 };
  1113. /* Internationalized format string. */
  1114. const char *yyformat = YY_NULLPTR;
  1115. /* Arguments of yyformat: reported tokens (one for the "unexpected",
  1116. one per "expected"). */
  1117. yysymbol_kind_t yyarg[YYARGS_MAX];
  1118. /* Cumulated lengths of YYARG. */
  1119. YYPTRDIFF_T yysize = 0;
  1120. /* Actual size of YYARG. */
  1121. int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
  1122. if (yycount == YYENOMEM)
  1123. return YYENOMEM;
  1124. switch (yycount)
  1125. {
  1126. #define YYCASE_(N, S) \
  1127. case N: \
  1128. yyformat = S; \
  1129. break
  1130. default: /* Avoid compiler warnings. */
  1131. YYCASE_(0, YY_("syntax error"));
  1132. YYCASE_(1, YY_("syntax error, unexpected %s"));
  1133. YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
  1134. YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
  1135. YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
  1136. YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
  1137. #undef YYCASE_
  1138. }
  1139. /* Compute error message size. Don't count the "%s"s, but reserve
  1140. room for the terminator. */
  1141. yysize = yystrlen (yyformat) - 2 * yycount + 1;
  1142. {
  1143. int yyi;
  1144. for (yyi = 0; yyi < yycount; ++yyi)
  1145. {
  1146. YYPTRDIFF_T yysize1
  1147. = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
  1148. if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
  1149. yysize = yysize1;
  1150. else
  1151. return YYENOMEM;
  1152. }
  1153. }
  1154. if (*yymsg_alloc < yysize)
  1155. {
  1156. *yymsg_alloc = 2 * yysize;
  1157. if (! (yysize <= *yymsg_alloc
  1158. && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
  1159. *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
  1160. return -1;
  1161. }
  1162. /* Avoid sprintf, as that infringes on the user's name space.
  1163. Don't have undefined behavior even if the translation
  1164. produced a string with the wrong number of "%s"s. */
  1165. {
  1166. char *yyp = *yymsg;
  1167. int yyi = 0;
  1168. while ((*yyp = *yyformat) != '\0')
  1169. if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
  1170. {
  1171. yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
  1172. yyformat += 2;
  1173. }
  1174. else
  1175. {
  1176. ++yyp;
  1177. ++yyformat;
  1178. }
  1179. }
  1180. return 0;
  1181. }
  1182. /*-----------------------------------------------.
  1183. | Release the memory associated to this symbol. |
  1184. `-----------------------------------------------*/
  1185. static void
  1186. yydestruct (const char *yymsg,
  1187. yysymbol_kind_t yykind, YYSTYPE *yyvaluep, yyscan_t yyscanner)
  1188. {
  1189. YY_USE (yyvaluep);
  1190. YY_USE (yyscanner);
  1191. if (!yymsg)
  1192. yymsg = "Deleting";
  1193. YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
  1194. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1195. switch (yykind)
  1196. {
  1197. case YYSYMBOL_STRING: /* STRING */
  1198. #line 100 "cmFortranParser.y"
  1199. { free(((*yyvaluep).string)); }
  1200. #line 1365 "cmFortranParser.cxx"
  1201. break;
  1202. case YYSYMBOL_WORD: /* WORD */
  1203. #line 100 "cmFortranParser.y"
  1204. { free(((*yyvaluep).string)); }
  1205. #line 1371 "cmFortranParser.cxx"
  1206. break;
  1207. case YYSYMBOL_CPP_INCLUDE_ANGLE: /* CPP_INCLUDE_ANGLE */
  1208. #line 100 "cmFortranParser.y"
  1209. { free(((*yyvaluep).string)); }
  1210. #line 1377 "cmFortranParser.cxx"
  1211. break;
  1212. default:
  1213. break;
  1214. }
  1215. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1216. }
  1217. /*----------.
  1218. | yyparse. |
  1219. `----------*/
  1220. int
  1221. yyparse (yyscan_t yyscanner)
  1222. {
  1223. /* Lookahead token kind. */
  1224. int yychar;
  1225. /* The semantic value of the lookahead symbol. */
  1226. /* Default value used for initialization, for pacifying older GCCs
  1227. or non-GCC compilers. */
  1228. YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
  1229. YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
  1230. /* Number of syntax errors so far. */
  1231. int yynerrs = 0;
  1232. yy_state_fast_t yystate = 0;
  1233. /* Number of tokens to shift before error messages enabled. */
  1234. int yyerrstatus = 0;
  1235. /* Refer to the stacks through separate pointers, to allow yyoverflow
  1236. to reallocate them elsewhere. */
  1237. /* Their size. */
  1238. YYPTRDIFF_T yystacksize = YYINITDEPTH;
  1239. /* The state stack: array, bottom, top. */
  1240. yy_state_t yyssa[YYINITDEPTH];
  1241. yy_state_t *yyss = yyssa;
  1242. yy_state_t *yyssp = yyss;
  1243. /* The semantic value stack: array, bottom, top. */
  1244. YYSTYPE yyvsa[YYINITDEPTH];
  1245. YYSTYPE *yyvs = yyvsa;
  1246. YYSTYPE *yyvsp = yyvs;
  1247. int yyn;
  1248. /* The return value of yyparse. */
  1249. int yyresult;
  1250. /* Lookahead symbol kind. */
  1251. yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  1252. /* The variables used to return semantic value and location from the
  1253. action routines. */
  1254. YYSTYPE yyval;
  1255. /* Buffer for error messages, and its allocated size. */
  1256. char yymsgbuf[128];
  1257. char *yymsg = yymsgbuf;
  1258. YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
  1259. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
  1260. /* The number of symbols on the RHS of the reduced rule.
  1261. Keep to zero when no symbol should be popped. */
  1262. int yylen = 0;
  1263. YYDPRINTF ((stderr, "Starting parse\n"));
  1264. yychar = YYEMPTY; /* Cause a token to be read. */
  1265. goto yysetstate;
  1266. /*------------------------------------------------------------.
  1267. | yynewstate -- push a new state, which is found in yystate. |
  1268. `------------------------------------------------------------*/
  1269. yynewstate:
  1270. /* In all cases, when you get here, the value and location stacks
  1271. have just been pushed. So pushing a state here evens the stacks. */
  1272. yyssp++;
  1273. /*--------------------------------------------------------------------.
  1274. | yysetstate -- set current state (the top of the stack) to yystate. |
  1275. `--------------------------------------------------------------------*/
  1276. yysetstate:
  1277. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1278. YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  1279. YY_IGNORE_USELESS_CAST_BEGIN
  1280. *yyssp = YY_CAST (yy_state_t, yystate);
  1281. YY_IGNORE_USELESS_CAST_END
  1282. YY_STACK_PRINT (yyss, yyssp);
  1283. if (yyss + yystacksize - 1 <= yyssp)
  1284. #if !defined yyoverflow && !defined YYSTACK_RELOCATE
  1285. YYNOMEM;
  1286. #else
  1287. {
  1288. /* Get the current used size of the three stacks, in elements. */
  1289. YYPTRDIFF_T yysize = yyssp - yyss + 1;
  1290. # if defined yyoverflow
  1291. {
  1292. /* Give user a chance to reallocate the stack. Use copies of
  1293. these so that the &'s don't force the real ones into
  1294. memory. */
  1295. yy_state_t *yyss1 = yyss;
  1296. YYSTYPE *yyvs1 = yyvs;
  1297. /* Each stack pointer address is followed by the size of the
  1298. data in use in that stack, in bytes. This used to be a
  1299. conditional around just the two extra args, but that might
  1300. be undefined if yyoverflow is a macro. */
  1301. yyoverflow (YY_("memory exhausted"),
  1302. &yyss1, yysize * YYSIZEOF (*yyssp),
  1303. &yyvs1, yysize * YYSIZEOF (*yyvsp),
  1304. &yystacksize);
  1305. yyss = yyss1;
  1306. yyvs = yyvs1;
  1307. }
  1308. # else /* defined YYSTACK_RELOCATE */
  1309. /* Extend the stack our own way. */
  1310. if (YYMAXDEPTH <= yystacksize)
  1311. YYNOMEM;
  1312. yystacksize *= 2;
  1313. if (YYMAXDEPTH < yystacksize)
  1314. yystacksize = YYMAXDEPTH;
  1315. {
  1316. yy_state_t *yyss1 = yyss;
  1317. union yyalloc *yyptr =
  1318. YY_CAST (union yyalloc *,
  1319. YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
  1320. if (! yyptr)
  1321. YYNOMEM;
  1322. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1323. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1324. # undef YYSTACK_RELOCATE
  1325. if (yyss1 != yyssa)
  1326. YYSTACK_FREE (yyss1);
  1327. }
  1328. # endif
  1329. yyssp = yyss + yysize - 1;
  1330. yyvsp = yyvs + yysize - 1;
  1331. YY_IGNORE_USELESS_CAST_BEGIN
  1332. YYDPRINTF ((stderr, "Stack size increased to %ld\n",
  1333. YY_CAST (long, yystacksize)));
  1334. YY_IGNORE_USELESS_CAST_END
  1335. if (yyss + yystacksize - 1 <= yyssp)
  1336. YYABORT;
  1337. }
  1338. #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
  1339. if (yystate == YYFINAL)
  1340. YYACCEPT;
  1341. goto yybackup;
  1342. /*-----------.
  1343. | yybackup. |
  1344. `-----------*/
  1345. yybackup:
  1346. /* Do appropriate processing given the current state. Read a
  1347. lookahead token if we need one and don't already have one. */
  1348. /* First try to decide what to do without reference to lookahead token. */
  1349. yyn = yypact[yystate];
  1350. if (yypact_value_is_default (yyn))
  1351. goto yydefault;
  1352. /* Not known => get a lookahead token if don't already have one. */
  1353. /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
  1354. if (yychar == YYEMPTY)
  1355. {
  1356. YYDPRINTF ((stderr, "Reading a token\n"));
  1357. yychar = yylex (&yylval, yyscanner);
  1358. }
  1359. if (yychar <= YYEOF)
  1360. {
  1361. yychar = YYEOF;
  1362. yytoken = YYSYMBOL_YYEOF;
  1363. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1364. }
  1365. else if (yychar == YYerror)
  1366. {
  1367. /* The scanner already issued an error message, process directly
  1368. to error recovery. But do not keep the error token as
  1369. lookahead, it is too special and may lead us to an endless
  1370. loop in error recovery. */
  1371. yychar = YYUNDEF;
  1372. yytoken = YYSYMBOL_YYerror;
  1373. goto yyerrlab1;
  1374. }
  1375. else
  1376. {
  1377. yytoken = YYTRANSLATE (yychar);
  1378. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1379. }
  1380. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1381. detect an error, take that action. */
  1382. yyn += yytoken;
  1383. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1384. goto yydefault;
  1385. yyn = yytable[yyn];
  1386. if (yyn <= 0)
  1387. {
  1388. if (yytable_value_is_error (yyn))
  1389. goto yyerrlab;
  1390. yyn = -yyn;
  1391. goto yyreduce;
  1392. }
  1393. /* Count tokens shifted since error; after three, turn off error
  1394. status. */
  1395. if (yyerrstatus)
  1396. yyerrstatus--;
  1397. /* Shift the lookahead token. */
  1398. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1399. yystate = yyn;
  1400. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1401. *++yyvsp = yylval;
  1402. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1403. /* Discard the shifted token. */
  1404. yychar = YYEMPTY;
  1405. goto yynewstate;
  1406. /*-----------------------------------------------------------.
  1407. | yydefault -- do the default action for the current state. |
  1408. `-----------------------------------------------------------*/
  1409. yydefault:
  1410. yyn = yydefact[yystate];
  1411. if (yyn == 0)
  1412. goto yyerrlab;
  1413. goto yyreduce;
  1414. /*-----------------------------.
  1415. | yyreduce -- do a reduction. |
  1416. `-----------------------------*/
  1417. yyreduce:
  1418. /* yyn is the number of a rule to reduce with. */
  1419. yylen = yyr2[yyn];
  1420. /* If YYLEN is nonzero, implement the default value of the action:
  1421. '$$ = $1'.
  1422. Otherwise, the following line sets YYVAL to garbage.
  1423. This behavior is undocumented and Bison
  1424. users should not rely upon it. Assigning to YYVAL
  1425. unconditionally makes the parser a bit smaller, and it avoids a
  1426. GCC warning that YYVAL may be used uninitialized. */
  1427. yyval = yyvsp[1-yylen];
  1428. YY_REDUCE_PRINT (yyn);
  1429. switch (yyn)
  1430. {
  1431. case 4: /* stmt: INTERFACE EOSTMT */
  1432. #line 109 "cmFortranParser.y"
  1433. {
  1434. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1435. cmFortranParser_SetInInterface(parser, true);
  1436. }
  1437. #line 1659 "cmFortranParser.cxx"
  1438. break;
  1439. case 5: /* stmt: USE WORD other EOSTMT */
  1440. #line 113 "cmFortranParser.y"
  1441. {
  1442. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1443. cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
  1444. free((yyvsp[-2].string));
  1445. }
  1446. #line 1669 "cmFortranParser.cxx"
  1447. break;
  1448. case 6: /* stmt: MODULE WORD other EOSTMT */
  1449. #line 118 "cmFortranParser.y"
  1450. {
  1451. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1452. if (cmsysString_strcasecmp((yyvsp[-2].string), "function") != 0 &&
  1453. cmsysString_strcasecmp((yyvsp[-2].string), "procedure") != 0 &&
  1454. cmsysString_strcasecmp((yyvsp[-2].string), "subroutine") != 0) {
  1455. cmFortranParser_RuleModule(parser, (yyvsp[-2].string));
  1456. }
  1457. free((yyvsp[-2].string));
  1458. }
  1459. #line 1683 "cmFortranParser.cxx"
  1460. break;
  1461. case 7: /* stmt: SUBMODULE LPAREN WORD RPAREN WORD other EOSTMT */
  1462. #line 127 "cmFortranParser.y"
  1463. {
  1464. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1465. cmFortranParser_RuleSubmodule(parser, (yyvsp[-4].string), (yyvsp[-2].string));
  1466. free((yyvsp[-4].string));
  1467. free((yyvsp[-2].string));
  1468. }
  1469. #line 1694 "cmFortranParser.cxx"
  1470. break;
  1471. case 8: /* stmt: SUBMODULE LPAREN WORD COLON WORD RPAREN WORD other EOSTMT */
  1472. #line 133 "cmFortranParser.y"
  1473. {
  1474. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1475. cmFortranParser_RuleSubmoduleNested(parser, (yyvsp[-6].string), (yyvsp[-4].string), (yyvsp[-2].string));
  1476. free((yyvsp[-6].string));
  1477. free((yyvsp[-4].string));
  1478. free((yyvsp[-2].string));
  1479. }
  1480. #line 1706 "cmFortranParser.cxx"
  1481. break;
  1482. case 9: /* stmt: INTERFACE WORD other EOSTMT */
  1483. #line 140 "cmFortranParser.y"
  1484. {
  1485. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1486. cmFortranParser_SetInInterface(parser, true);
  1487. free((yyvsp[-2].string));
  1488. }
  1489. #line 1716 "cmFortranParser.cxx"
  1490. break;
  1491. case 10: /* stmt: END INTERFACE other EOSTMT */
  1492. #line 145 "cmFortranParser.y"
  1493. {
  1494. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1495. cmFortranParser_SetInInterface(parser, false);
  1496. }
  1497. #line 1725 "cmFortranParser.cxx"
  1498. break;
  1499. case 11: /* stmt: USE DCOLON WORD other EOSTMT */
  1500. #line 149 "cmFortranParser.y"
  1501. {
  1502. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1503. cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
  1504. free((yyvsp[-2].string));
  1505. }
  1506. #line 1735 "cmFortranParser.cxx"
  1507. break;
  1508. case 12: /* stmt: USE COMMA WORD DCOLON WORD other EOSTMT */
  1509. #line 154 "cmFortranParser.y"
  1510. {
  1511. if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) {
  1512. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1513. cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
  1514. }
  1515. if (cmsysString_strcasecmp((yyvsp[-4].string), "intrinsic") == 0) {
  1516. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1517. cmFortranParser_RuleUseIntrinsic(parser, (yyvsp[-2].string));
  1518. }
  1519. free((yyvsp[-4].string));
  1520. free((yyvsp[-2].string));
  1521. }
  1522. #line 1752 "cmFortranParser.cxx"
  1523. break;
  1524. case 13: /* stmt: INCLUDE STRING other EOSTMT */
  1525. #line 166 "cmFortranParser.y"
  1526. {
  1527. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1528. cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
  1529. free((yyvsp[-2].string));
  1530. }
  1531. #line 1762 "cmFortranParser.cxx"
  1532. break;
  1533. case 14: /* stmt: CPP_LINE_DIRECTIVE STRING other EOSTMT */
  1534. #line 171 "cmFortranParser.y"
  1535. {
  1536. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1537. cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string));
  1538. free((yyvsp[-2].string));
  1539. }
  1540. #line 1772 "cmFortranParser.cxx"
  1541. break;
  1542. case 15: /* stmt: CPP_INCLUDE_ANGLE other EOSTMT */
  1543. #line 176 "cmFortranParser.y"
  1544. {
  1545. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1546. cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
  1547. free((yyvsp[-2].string));
  1548. }
  1549. #line 1782 "cmFortranParser.cxx"
  1550. break;
  1551. case 16: /* stmt: include STRING other EOSTMT */
  1552. #line 181 "cmFortranParser.y"
  1553. {
  1554. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1555. cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
  1556. free((yyvsp[-2].string));
  1557. }
  1558. #line 1792 "cmFortranParser.cxx"
  1559. break;
  1560. case 17: /* stmt: define WORD other EOSTMT */
  1561. #line 186 "cmFortranParser.y"
  1562. {
  1563. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1564. cmFortranParser_RuleDefine(parser, (yyvsp[-2].string));
  1565. free((yyvsp[-2].string));
  1566. }
  1567. #line 1802 "cmFortranParser.cxx"
  1568. break;
  1569. case 18: /* stmt: undef WORD other EOSTMT */
  1570. #line 191 "cmFortranParser.y"
  1571. {
  1572. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1573. cmFortranParser_RuleUndef(parser, (yyvsp[-2].string));
  1574. free((yyvsp[-2].string));
  1575. }
  1576. #line 1812 "cmFortranParser.cxx"
  1577. break;
  1578. case 19: /* stmt: ifdef WORD other EOSTMT */
  1579. #line 196 "cmFortranParser.y"
  1580. {
  1581. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1582. cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string));
  1583. free((yyvsp[-2].string));
  1584. }
  1585. #line 1822 "cmFortranParser.cxx"
  1586. break;
  1587. case 20: /* stmt: ifndef WORD other EOSTMT */
  1588. #line 201 "cmFortranParser.y"
  1589. {
  1590. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1591. cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string));
  1592. free((yyvsp[-2].string));
  1593. }
  1594. #line 1832 "cmFortranParser.cxx"
  1595. break;
  1596. case 21: /* stmt: if other EOSTMT */
  1597. #line 206 "cmFortranParser.y"
  1598. {
  1599. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1600. cmFortranParser_RuleIf(parser);
  1601. }
  1602. #line 1841 "cmFortranParser.cxx"
  1603. break;
  1604. case 22: /* stmt: elif other EOSTMT */
  1605. #line 210 "cmFortranParser.y"
  1606. {
  1607. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1608. cmFortranParser_RuleElif(parser);
  1609. }
  1610. #line 1850 "cmFortranParser.cxx"
  1611. break;
  1612. case 23: /* stmt: else other EOSTMT */
  1613. #line 214 "cmFortranParser.y"
  1614. {
  1615. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1616. cmFortranParser_RuleElse(parser);
  1617. }
  1618. #line 1859 "cmFortranParser.cxx"
  1619. break;
  1620. case 24: /* stmt: endif other EOSTMT */
  1621. #line 218 "cmFortranParser.y"
  1622. {
  1623. cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
  1624. cmFortranParser_RuleEndif(parser);
  1625. }
  1626. #line 1868 "cmFortranParser.cxx"
  1627. break;
  1628. case 48: /* misc_code: WORD */
  1629. #line 240 "cmFortranParser.y"
  1630. { free ((yyvsp[0].string)); }
  1631. #line 1874 "cmFortranParser.cxx"
  1632. break;
  1633. case 55: /* misc_code: STRING */
  1634. #line 247 "cmFortranParser.y"
  1635. { free ((yyvsp[0].string)); }
  1636. #line 1880 "cmFortranParser.cxx"
  1637. break;
  1638. #line 1884 "cmFortranParser.cxx"
  1639. default: break;
  1640. }
  1641. /* User semantic actions sometimes alter yychar, and that requires
  1642. that yytoken be updated with the new translation. We take the
  1643. approach of translating immediately before every use of yytoken.
  1644. One alternative is translating here after every semantic action,
  1645. but that translation would be missed if the semantic action invokes
  1646. YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
  1647. if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
  1648. incorrect destructor might then be invoked immediately. In the
  1649. case of YYERROR or YYBACKUP, subsequent parser actions might lead
  1650. to an incorrect destructor call or verbose syntax error message
  1651. before the lookahead is translated. */
  1652. YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
  1653. YYPOPSTACK (yylen);
  1654. yylen = 0;
  1655. *++yyvsp = yyval;
  1656. /* Now 'shift' the result of the reduction. Determine what state
  1657. that goes to, based on the state we popped back to and the rule
  1658. number reduced by. */
  1659. {
  1660. const int yylhs = yyr1[yyn] - YYNTOKENS;
  1661. const int yyi = yypgoto[yylhs] + *yyssp;
  1662. yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
  1663. ? yytable[yyi]
  1664. : yydefgoto[yylhs]);
  1665. }
  1666. goto yynewstate;
  1667. /*--------------------------------------.
  1668. | yyerrlab -- here on detecting error. |
  1669. `--------------------------------------*/
  1670. yyerrlab:
  1671. /* Make sure we have latest lookahead translation. See comments at
  1672. user semantic actions for why this is necessary. */
  1673. yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  1674. /* If not already recovering from an error, report this error. */
  1675. if (!yyerrstatus)
  1676. {
  1677. ++yynerrs;
  1678. {
  1679. yypcontext_t yyctx
  1680. = {yyssp, yytoken};
  1681. char const *yymsgp = YY_("syntax error");
  1682. int yysyntax_error_status;
  1683. yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
  1684. if (yysyntax_error_status == 0)
  1685. yymsgp = yymsg;
  1686. else if (yysyntax_error_status == -1)
  1687. {
  1688. if (yymsg != yymsgbuf)
  1689. YYSTACK_FREE (yymsg);
  1690. yymsg = YY_CAST (char *,
  1691. YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
  1692. if (yymsg)
  1693. {
  1694. yysyntax_error_status
  1695. = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
  1696. yymsgp = yymsg;
  1697. }
  1698. else
  1699. {
  1700. yymsg = yymsgbuf;
  1701. yymsg_alloc = sizeof yymsgbuf;
  1702. yysyntax_error_status = YYENOMEM;
  1703. }
  1704. }
  1705. yyerror (yyscanner, yymsgp);
  1706. if (yysyntax_error_status == YYENOMEM)
  1707. YYNOMEM;
  1708. }
  1709. }
  1710. if (yyerrstatus == 3)
  1711. {
  1712. /* If just tried and failed to reuse lookahead token after an
  1713. error, discard it. */
  1714. if (yychar <= YYEOF)
  1715. {
  1716. /* Return failure if at end of input. */
  1717. if (yychar == YYEOF)
  1718. YYABORT;
  1719. }
  1720. else
  1721. {
  1722. yydestruct ("Error: discarding",
  1723. yytoken, &yylval, yyscanner);
  1724. yychar = YYEMPTY;
  1725. }
  1726. }
  1727. /* Else will try to reuse lookahead token after shifting the error
  1728. token. */
  1729. goto yyerrlab1;
  1730. /*---------------------------------------------------.
  1731. | yyerrorlab -- error raised explicitly by YYERROR. |
  1732. `---------------------------------------------------*/
  1733. yyerrorlab:
  1734. /* Pacify compilers when the user code never invokes YYERROR and the
  1735. label yyerrorlab therefore never appears in user code. */
  1736. if (0)
  1737. YYERROR;
  1738. ++yynerrs;
  1739. /* Do not reclaim the symbols of the rule whose action triggered
  1740. this YYERROR. */
  1741. YYPOPSTACK (yylen);
  1742. yylen = 0;
  1743. YY_STACK_PRINT (yyss, yyssp);
  1744. yystate = *yyssp;
  1745. goto yyerrlab1;
  1746. /*-------------------------------------------------------------.
  1747. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  1748. `-------------------------------------------------------------*/
  1749. yyerrlab1:
  1750. yyerrstatus = 3; /* Each real token shifted decrements this. */
  1751. /* Pop stack until we find a state that shifts the error token. */
  1752. for (;;)
  1753. {
  1754. yyn = yypact[yystate];
  1755. if (!yypact_value_is_default (yyn))
  1756. {
  1757. yyn += YYSYMBOL_YYerror;
  1758. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
  1759. {
  1760. yyn = yytable[yyn];
  1761. if (0 < yyn)
  1762. break;
  1763. }
  1764. }
  1765. /* Pop the current state because it cannot handle the error token. */
  1766. if (yyssp == yyss)
  1767. YYABORT;
  1768. yydestruct ("Error: popping",
  1769. YY_ACCESSING_SYMBOL (yystate), yyvsp, yyscanner);
  1770. YYPOPSTACK (1);
  1771. yystate = *yyssp;
  1772. YY_STACK_PRINT (yyss, yyssp);
  1773. }
  1774. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1775. *++yyvsp = yylval;
  1776. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1777. /* Shift the error token. */
  1778. YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
  1779. yystate = yyn;
  1780. goto yynewstate;
  1781. /*-------------------------------------.
  1782. | yyacceptlab -- YYACCEPT comes here. |
  1783. `-------------------------------------*/
  1784. yyacceptlab:
  1785. yyresult = 0;
  1786. goto yyreturnlab;
  1787. /*-----------------------------------.
  1788. | yyabortlab -- YYABORT comes here. |
  1789. `-----------------------------------*/
  1790. yyabortlab:
  1791. yyresult = 1;
  1792. goto yyreturnlab;
  1793. /*-----------------------------------------------------------.
  1794. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
  1795. `-----------------------------------------------------------*/
  1796. yyexhaustedlab:
  1797. yyerror (yyscanner, YY_("memory exhausted"));
  1798. yyresult = 2;
  1799. goto yyreturnlab;
  1800. /*----------------------------------------------------------.
  1801. | yyreturnlab -- parsing is finished, clean up and return. |
  1802. `----------------------------------------------------------*/
  1803. yyreturnlab:
  1804. if (yychar != YYEMPTY)
  1805. {
  1806. /* Make sure we have latest lookahead translation. See comments at
  1807. user semantic actions for why this is necessary. */
  1808. yytoken = YYTRANSLATE (yychar);
  1809. yydestruct ("Cleanup: discarding lookahead",
  1810. yytoken, &yylval, yyscanner);
  1811. }
  1812. /* Do not reclaim the symbols of the rule whose action triggered
  1813. this YYABORT or YYACCEPT. */
  1814. YYPOPSTACK (yylen);
  1815. YY_STACK_PRINT (yyss, yyssp);
  1816. while (yyssp != yyss)
  1817. {
  1818. yydestruct ("Cleanup: popping",
  1819. YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yyscanner);
  1820. YYPOPSTACK (1);
  1821. }
  1822. #ifndef yyoverflow
  1823. if (yyss != yyssa)
  1824. YYSTACK_FREE (yyss);
  1825. #endif
  1826. if (yymsg != yymsgbuf)
  1827. YYSTACK_FREE (yymsg);
  1828. return yyresult;
  1829. }
  1830. #line 259 "cmFortranParser.y"
  1831. /* End of grammar */