cmFortranParser.cxx 73 KB

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