parse.tab.c_shipped 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354
  1. /* A Bison parser, made by GNU Bison 2.4.3. */
  2. /* Skeleton implementation for Bison's Yacc-like parsers in C
  3. Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
  4. 2009, 2010 Free Software Foundation, Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 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. /* All symbols defined below should begin with yy or YY, to avoid
  29. infringing on user name space. This should be done even for local
  30. variables, as they might otherwise be expanded by user macros.
  31. There are some unavoidable exceptions within include files to
  32. define necessary library symbols; they are noted "INFRINGES ON
  33. USER NAME SPACE" below. */
  34. /* Identify Bison output. */
  35. #define YYBISON 1
  36. /* Bison version. */
  37. #define YYBISON_VERSION "2.4.3"
  38. /* Skeleton name. */
  39. #define YYSKELETON_NAME "yacc.c"
  40. /* Pure parsers. */
  41. #define YYPURE 0
  42. /* Push parsers. */
  43. #define YYPUSH 0
  44. /* Pull parsers. */
  45. #define YYPULL 1
  46. /* Using locations. */
  47. #define YYLSP_NEEDED 0
  48. /* Copy the first part of user declarations. */
  49. #include <assert.h>
  50. #include <stdlib.h>
  51. #include <string.h>
  52. #include "genksyms.h"
  53. static int is_typedef;
  54. static int is_extern;
  55. static char *current_name;
  56. static struct string_list *decl_spec;
  57. static void yyerror(const char *);
  58. static inline void
  59. remove_node(struct string_list **p)
  60. {
  61. struct string_list *node = *p;
  62. *p = node->next;
  63. free_node(node);
  64. }
  65. static inline void
  66. remove_list(struct string_list **pb, struct string_list **pe)
  67. {
  68. struct string_list *b = *pb, *e = *pe;
  69. *pb = e;
  70. free_list(b, e);
  71. }
  72. /* Enabling traces. */
  73. #ifndef YYDEBUG
  74. # define YYDEBUG 1
  75. #endif
  76. /* Enabling verbose error messages. */
  77. #ifdef YYERROR_VERBOSE
  78. # undef YYERROR_VERBOSE
  79. # define YYERROR_VERBOSE 1
  80. #else
  81. # define YYERROR_VERBOSE 0
  82. #endif
  83. /* Enabling the token table. */
  84. #ifndef YYTOKEN_TABLE
  85. # define YYTOKEN_TABLE 0
  86. #endif
  87. /* Tokens. */
  88. #ifndef YYTOKENTYPE
  89. # define YYTOKENTYPE
  90. /* Put the tokens into the symbol table, so that GDB and other debuggers
  91. know about them. */
  92. enum yytokentype {
  93. ASM_KEYW = 258,
  94. ATTRIBUTE_KEYW = 259,
  95. AUTO_KEYW = 260,
  96. BOOL_KEYW = 261,
  97. CHAR_KEYW = 262,
  98. CONST_KEYW = 263,
  99. DOUBLE_KEYW = 264,
  100. ENUM_KEYW = 265,
  101. EXTERN_KEYW = 266,
  102. EXTENSION_KEYW = 267,
  103. FLOAT_KEYW = 268,
  104. INLINE_KEYW = 269,
  105. INT_KEYW = 270,
  106. LONG_KEYW = 271,
  107. REGISTER_KEYW = 272,
  108. RESTRICT_KEYW = 273,
  109. SHORT_KEYW = 274,
  110. SIGNED_KEYW = 275,
  111. STATIC_KEYW = 276,
  112. STRUCT_KEYW = 277,
  113. TYPEDEF_KEYW = 278,
  114. UNION_KEYW = 279,
  115. UNSIGNED_KEYW = 280,
  116. VOID_KEYW = 281,
  117. VOLATILE_KEYW = 282,
  118. TYPEOF_KEYW = 283,
  119. EXPORT_SYMBOL_KEYW = 284,
  120. ASM_PHRASE = 285,
  121. ATTRIBUTE_PHRASE = 286,
  122. BRACE_PHRASE = 287,
  123. BRACKET_PHRASE = 288,
  124. EXPRESSION_PHRASE = 289,
  125. CHAR = 290,
  126. DOTS = 291,
  127. IDENT = 292,
  128. INT = 293,
  129. REAL = 294,
  130. STRING = 295,
  131. TYPE = 296,
  132. OTHER = 297,
  133. FILENAME = 298
  134. };
  135. #endif
  136. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  137. typedef int YYSTYPE;
  138. # define YYSTYPE_IS_TRIVIAL 1
  139. # define yystype YYSTYPE /* obsolescent; will be withdrawn */
  140. # define YYSTYPE_IS_DECLARED 1
  141. #endif
  142. /* Copy the second part of user declarations. */
  143. #ifdef short
  144. # undef short
  145. #endif
  146. #ifdef YYTYPE_UINT8
  147. typedef YYTYPE_UINT8 yytype_uint8;
  148. #else
  149. typedef unsigned char yytype_uint8;
  150. #endif
  151. #ifdef YYTYPE_INT8
  152. typedef YYTYPE_INT8 yytype_int8;
  153. #elif (defined __STDC__ || defined __C99__FUNC__ \
  154. || defined __cplusplus || defined _MSC_VER)
  155. typedef signed char yytype_int8;
  156. #else
  157. typedef short int yytype_int8;
  158. #endif
  159. #ifdef YYTYPE_UINT16
  160. typedef YYTYPE_UINT16 yytype_uint16;
  161. #else
  162. typedef unsigned short int yytype_uint16;
  163. #endif
  164. #ifdef YYTYPE_INT16
  165. typedef YYTYPE_INT16 yytype_int16;
  166. #else
  167. typedef short int yytype_int16;
  168. #endif
  169. #ifndef YYSIZE_T
  170. # ifdef __SIZE_TYPE__
  171. # define YYSIZE_T __SIZE_TYPE__
  172. # elif defined size_t
  173. # define YYSIZE_T size_t
  174. # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
  175. || defined __cplusplus || defined _MSC_VER)
  176. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  177. # define YYSIZE_T size_t
  178. # else
  179. # define YYSIZE_T unsigned int
  180. # endif
  181. #endif
  182. #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
  183. #ifndef YY_
  184. # if defined YYENABLE_NLS && YYENABLE_NLS
  185. # if ENABLE_NLS
  186. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  187. # define YY_(msgid) dgettext ("bison-runtime", msgid)
  188. # endif
  189. # endif
  190. # ifndef YY_
  191. # define YY_(msgid) msgid
  192. # endif
  193. #endif
  194. /* Suppress unused-variable warnings by "using" E. */
  195. #if ! defined lint || defined __GNUC__
  196. # define YYUSE(e) ((void) (e))
  197. #else
  198. # define YYUSE(e) /* empty */
  199. #endif
  200. /* Identity function, used to suppress warnings about constant conditions. */
  201. #ifndef lint
  202. # define YYID(n) (n)
  203. #else
  204. #if (defined __STDC__ || defined __C99__FUNC__ \
  205. || defined __cplusplus || defined _MSC_VER)
  206. static int
  207. YYID (int yyi)
  208. #else
  209. static int
  210. YYID (yyi)
  211. int yyi;
  212. #endif
  213. {
  214. return yyi;
  215. }
  216. #endif
  217. #if ! defined yyoverflow || YYERROR_VERBOSE
  218. /* The parser invokes alloca or malloc; define the necessary symbols. */
  219. # ifdef YYSTACK_USE_ALLOCA
  220. # if YYSTACK_USE_ALLOCA
  221. # ifdef __GNUC__
  222. # define YYSTACK_ALLOC __builtin_alloca
  223. # elif defined __BUILTIN_VA_ARG_INCR
  224. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  225. # elif defined _AIX
  226. # define YYSTACK_ALLOC __alloca
  227. # elif defined _MSC_VER
  228. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  229. # define alloca _alloca
  230. # else
  231. # define YYSTACK_ALLOC alloca
  232. # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
  233. || defined __cplusplus || defined _MSC_VER)
  234. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  235. # ifndef _STDLIB_H
  236. # define _STDLIB_H 1
  237. # endif
  238. # endif
  239. # endif
  240. # endif
  241. # endif
  242. # ifdef YYSTACK_ALLOC
  243. /* Pacify GCC's `empty if-body' warning. */
  244. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
  245. # ifndef YYSTACK_ALLOC_MAXIMUM
  246. /* The OS might guarantee only one guard page at the bottom of the stack,
  247. and a page size can be as small as 4096 bytes. So we cannot safely
  248. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  249. to allow for a few compiler-allocated temporary stack slots. */
  250. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  251. # endif
  252. # else
  253. # define YYSTACK_ALLOC YYMALLOC
  254. # define YYSTACK_FREE YYFREE
  255. # ifndef YYSTACK_ALLOC_MAXIMUM
  256. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  257. # endif
  258. # if (defined __cplusplus && ! defined _STDLIB_H \
  259. && ! ((defined YYMALLOC || defined malloc) \
  260. && (defined YYFREE || defined free)))
  261. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  262. # ifndef _STDLIB_H
  263. # define _STDLIB_H 1
  264. # endif
  265. # endif
  266. # ifndef YYMALLOC
  267. # define YYMALLOC malloc
  268. # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
  269. || defined __cplusplus || defined _MSC_VER)
  270. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  271. # endif
  272. # endif
  273. # ifndef YYFREE
  274. # define YYFREE free
  275. # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
  276. || defined __cplusplus || defined _MSC_VER)
  277. void free (void *); /* INFRINGES ON USER NAME SPACE */
  278. # endif
  279. # endif
  280. # endif
  281. #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
  282. #if (! defined yyoverflow \
  283. && (! defined __cplusplus \
  284. || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  285. /* A type that is properly aligned for any stack member. */
  286. union yyalloc
  287. {
  288. yytype_int16 yyss_alloc;
  289. YYSTYPE yyvs_alloc;
  290. };
  291. /* The size of the maximum gap between one aligned stack and the next. */
  292. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  293. /* The size of an array large to enough to hold all stacks, each with
  294. N elements. */
  295. # define YYSTACK_BYTES(N) \
  296. ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
  297. + YYSTACK_GAP_MAXIMUM)
  298. /* Copy COUNT objects from FROM to TO. The source and destination do
  299. not overlap. */
  300. # ifndef YYCOPY
  301. # if defined __GNUC__ && 1 < __GNUC__
  302. # define YYCOPY(To, From, Count) \
  303. __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
  304. # else
  305. # define YYCOPY(To, From, Count) \
  306. do \
  307. { \
  308. YYSIZE_T yyi; \
  309. for (yyi = 0; yyi < (Count); yyi++) \
  310. (To)[yyi] = (From)[yyi]; \
  311. } \
  312. while (YYID (0))
  313. # endif
  314. # endif
  315. /* Relocate STACK from its old location to the new one. The
  316. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  317. elements in the stack, and YYPTR gives the new location of the
  318. stack. Advance YYPTR to a properly aligned location for the next
  319. stack. */
  320. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  321. do \
  322. { \
  323. YYSIZE_T yynewbytes; \
  324. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  325. Stack = &yyptr->Stack_alloc; \
  326. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  327. yyptr += yynewbytes / sizeof (*yyptr); \
  328. } \
  329. while (YYID (0))
  330. #endif
  331. /* YYFINAL -- State number of the termination state. */
  332. #define YYFINAL 4
  333. /* YYLAST -- Last index in YYTABLE. */
  334. #define YYLAST 532
  335. /* YYNTOKENS -- Number of terminals. */
  336. #define YYNTOKENS 53
  337. /* YYNNTS -- Number of nonterminals. */
  338. #define YYNNTS 49
  339. /* YYNRULES -- Number of rules. */
  340. #define YYNRULES 132
  341. /* YYNRULES -- Number of states. */
  342. #define YYNSTATES 188
  343. /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  344. #define YYUNDEFTOK 2
  345. #define YYMAXUTOK 298
  346. #define YYTRANSLATE(YYX) \
  347. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  348. /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
  349. static const yytype_uint8 yytranslate[] =
  350. {
  351. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  352. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  353. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  354. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  355. 47, 49, 48, 2, 46, 2, 2, 2, 2, 2,
  356. 2, 2, 2, 2, 2, 2, 2, 2, 52, 44,
  357. 2, 50, 2, 2, 2, 2, 2, 2, 2, 2,
  358. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  359. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  360. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  361. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  362. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  363. 2, 2, 2, 51, 2, 45, 2, 2, 2, 2,
  364. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  365. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  366. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  367. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  368. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  369. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  370. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  371. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  372. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  373. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  374. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  375. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  376. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  377. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  378. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  379. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  380. 35, 36, 37, 38, 39, 40, 41, 42, 43
  381. };
  382. #if YYDEBUG
  383. /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  384. YYRHS. */
  385. static const yytype_uint16 yyprhs[] =
  386. {
  387. 0, 0, 3, 5, 8, 9, 12, 13, 18, 19,
  388. 23, 25, 27, 29, 31, 34, 37, 41, 42, 44,
  389. 46, 50, 55, 56, 58, 60, 63, 65, 67, 69,
  390. 71, 73, 75, 77, 79, 81, 87, 92, 95, 98,
  391. 101, 105, 109, 113, 116, 119, 122, 124, 126, 128,
  392. 130, 132, 134, 136, 138, 140, 142, 144, 147, 148,
  393. 150, 152, 155, 157, 159, 161, 163, 166, 168, 170,
  394. 175, 180, 183, 187, 191, 194, 196, 198, 200, 205,
  395. 210, 213, 217, 221, 224, 226, 230, 231, 233, 235,
  396. 239, 242, 245, 247, 248, 250, 252, 257, 262, 265,
  397. 269, 273, 277, 278, 280, 283, 287, 291, 292, 294,
  398. 296, 299, 303, 306, 307, 309, 311, 315, 318, 321,
  399. 323, 326, 327, 330, 334, 339, 341, 345, 347, 351,
  400. 354, 355, 357
  401. };
  402. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  403. static const yytype_int8 yyrhs[] =
  404. {
  405. 54, 0, -1, 55, -1, 54, 55, -1, -1, 56,
  406. 57, -1, -1, 12, 23, 58, 60, -1, -1, 23,
  407. 59, 60, -1, 60, -1, 84, -1, 99, -1, 101,
  408. -1, 1, 44, -1, 1, 45, -1, 64, 61, 44,
  409. -1, -1, 62, -1, 63, -1, 62, 46, 63, -1,
  410. 74, 100, 95, 85, -1, -1, 65, -1, 66, -1,
  411. 65, 66, -1, 67, -1, 68, -1, 5, -1, 17,
  412. -1, 21, -1, 11, -1, 14, -1, 69, -1, 73,
  413. -1, 28, 47, 65, 48, 49, -1, 28, 47, 65,
  414. 49, -1, 22, 37, -1, 24, 37, -1, 10, 37,
  415. -1, 22, 37, 87, -1, 24, 37, 87, -1, 10,
  416. 37, 96, -1, 10, 96, -1, 22, 87, -1, 24,
  417. 87, -1, 7, -1, 19, -1, 15, -1, 16, -1,
  418. 20, -1, 25, -1, 13, -1, 9, -1, 26, -1,
  419. 6, -1, 41, -1, 48, 71, -1, -1, 72, -1,
  420. 73, -1, 72, 73, -1, 8, -1, 27, -1, 31,
  421. -1, 18, -1, 70, 74, -1, 75, -1, 37, -1,
  422. 75, 47, 78, 49, -1, 75, 47, 1, 49, -1,
  423. 75, 33, -1, 47, 74, 49, -1, 47, 1, 49,
  424. -1, 70, 76, -1, 77, -1, 37, -1, 41, -1,
  425. 77, 47, 78, 49, -1, 77, 47, 1, 49, -1,
  426. 77, 33, -1, 47, 76, 49, -1, 47, 1, 49,
  427. -1, 79, 36, -1, 79, -1, 80, 46, 36, -1,
  428. -1, 80, -1, 81, -1, 80, 46, 81, -1, 65,
  429. 82, -1, 70, 82, -1, 83, -1, -1, 37, -1,
  430. 41, -1, 83, 47, 78, 49, -1, 83, 47, 1,
  431. 49, -1, 83, 33, -1, 47, 82, 49, -1, 47,
  432. 1, 49, -1, 64, 74, 32, -1, -1, 86, -1,
  433. 50, 34, -1, 51, 88, 45, -1, 51, 1, 45,
  434. -1, -1, 89, -1, 90, -1, 89, 90, -1, 64,
  435. 91, 44, -1, 1, 44, -1, -1, 92, -1, 93,
  436. -1, 92, 46, 93, -1, 76, 95, -1, 37, 94,
  437. -1, 94, -1, 52, 34, -1, -1, 95, 31, -1,
  438. 51, 97, 45, -1, 51, 97, 46, 45, -1, 98,
  439. -1, 97, 46, 98, -1, 37, -1, 37, 50, 34,
  440. -1, 30, 44, -1, -1, 30, -1, 29, 47, 37,
  441. 49, 44, -1
  442. };
  443. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  444. static const yytype_uint16 yyrline[] =
  445. {
  446. 0, 104, 104, 105, 109, 109, 115, 115, 117, 117,
  447. 119, 120, 121, 122, 123, 124, 128, 142, 143, 147,
  448. 155, 168, 174, 175, 179, 180, 184, 190, 194, 195,
  449. 196, 197, 198, 202, 203, 204, 205, 209, 211, 213,
  450. 217, 224, 231, 241, 244, 245, 249, 250, 251, 252,
  451. 253, 254, 255, 256, 257, 258, 259, 263, 268, 269,
  452. 273, 274, 278, 278, 278, 279, 287, 288, 292, 301,
  453. 303, 305, 307, 309, 316, 317, 321, 322, 323, 325,
  454. 327, 329, 331, 336, 337, 338, 342, 343, 347, 348,
  455. 353, 358, 360, 364, 365, 373, 377, 379, 381, 383,
  456. 385, 390, 399, 400, 405, 410, 411, 415, 416, 420,
  457. 421, 425, 427, 432, 433, 437, 438, 442, 443, 444,
  458. 448, 452, 453, 457, 458, 462, 463, 466, 471, 479,
  459. 483, 484, 488
  460. };
  461. #endif
  462. #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
  463. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  464. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  465. static const char *const yytname[] =
  466. {
  467. "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW",
  468. "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW",
  469. "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW",
  470. "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW",
  471. "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
  472. "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
  473. "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE",
  474. "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE",
  475. "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING",
  476. "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'",
  477. "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "$@1",
  478. "declaration1", "$@2", "$@3", "simple_declaration",
  479. "init_declarator_list_opt", "init_declarator_list", "init_declarator",
  480. "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier",
  481. "storage_class_specifier", "type_specifier", "simple_type_specifier",
  482. "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq",
  483. "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator",
  484. "direct_nested_declarator", "parameter_declaration_clause",
  485. "parameter_declaration_list_opt", "parameter_declaration_list",
  486. "parameter_declaration", "m_abstract_declarator",
  487. "direct_m_abstract_declarator", "function_definition", "initializer_opt",
  488. "initializer", "class_body", "member_specification_opt",
  489. "member_specification", "member_declaration",
  490. "member_declarator_list_opt", "member_declarator_list",
  491. "member_declarator", "member_bitfield_declarator", "attribute_opt",
  492. "enum_body", "enumerator_list", "enumerator", "asm_definition",
  493. "asm_phrase_opt", "export_definition", 0
  494. };
  495. #endif
  496. # ifdef YYPRINT
  497. /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  498. token YYLEX-NUM. */
  499. static const yytype_uint16 yytoknum[] =
  500. {
  501. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  502. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  503. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  504. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  505. 295, 296, 297, 298, 59, 125, 44, 40, 42, 41,
  506. 61, 123, 58
  507. };
  508. # endif
  509. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  510. static const yytype_uint8 yyr1[] =
  511. {
  512. 0, 53, 54, 54, 56, 55, 58, 57, 59, 57,
  513. 57, 57, 57, 57, 57, 57, 60, 61, 61, 62,
  514. 62, 63, 64, 64, 65, 65, 66, 66, 67, 67,
  515. 67, 67, 67, 68, 68, 68, 68, 68, 68, 68,
  516. 68, 68, 68, 68, 68, 68, 69, 69, 69, 69,
  517. 69, 69, 69, 69, 69, 69, 69, 70, 71, 71,
  518. 72, 72, 73, 73, 73, 73, 74, 74, 75, 75,
  519. 75, 75, 75, 75, 76, 76, 77, 77, 77, 77,
  520. 77, 77, 77, 78, 78, 78, 79, 79, 80, 80,
  521. 81, 82, 82, 83, 83, 83, 83, 83, 83, 83,
  522. 83, 84, 85, 85, 86, 87, 87, 88, 88, 89,
  523. 89, 90, 90, 91, 91, 92, 92, 93, 93, 93,
  524. 94, 95, 95, 96, 96, 97, 97, 98, 98, 99,
  525. 100, 100, 101
  526. };
  527. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  528. static const yytype_uint8 yyr2[] =
  529. {
  530. 0, 2, 1, 2, 0, 2, 0, 4, 0, 3,
  531. 1, 1, 1, 1, 2, 2, 3, 0, 1, 1,
  532. 3, 4, 0, 1, 1, 2, 1, 1, 1, 1,
  533. 1, 1, 1, 1, 1, 5, 4, 2, 2, 2,
  534. 3, 3, 3, 2, 2, 2, 1, 1, 1, 1,
  535. 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
  536. 1, 2, 1, 1, 1, 1, 2, 1, 1, 4,
  537. 4, 2, 3, 3, 2, 1, 1, 1, 4, 4,
  538. 2, 3, 3, 2, 1, 3, 0, 1, 1, 3,
  539. 2, 2, 1, 0, 1, 1, 4, 4, 2, 3,
  540. 3, 3, 0, 1, 2, 3, 3, 0, 1, 1,
  541. 2, 3, 2, 0, 1, 1, 3, 2, 2, 1,
  542. 2, 0, 2, 3, 4, 1, 3, 1, 3, 2,
  543. 0, 1, 5
  544. };
  545. /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
  546. STATE-NUM when YYTABLE doesn't specify something else to do. Zero
  547. means the default is an error. */
  548. static const yytype_uint8 yydefact[] =
  549. {
  550. 4, 4, 2, 0, 1, 3, 0, 28, 55, 46,
  551. 62, 53, 0, 31, 0, 52, 32, 48, 49, 29,
  552. 65, 47, 50, 30, 0, 8, 0, 51, 54, 63,
  553. 0, 0, 0, 64, 56, 5, 10, 17, 23, 24,
  554. 26, 27, 33, 34, 11, 12, 13, 14, 15, 39,
  555. 0, 43, 6, 37, 0, 44, 22, 38, 45, 0,
  556. 0, 129, 68, 0, 58, 0, 18, 19, 0, 130,
  557. 67, 25, 42, 127, 0, 125, 22, 40, 0, 113,
  558. 0, 0, 109, 9, 17, 41, 0, 0, 0, 0,
  559. 57, 59, 60, 16, 0, 66, 131, 101, 121, 71,
  560. 0, 0, 123, 0, 7, 112, 106, 76, 77, 0,
  561. 0, 0, 121, 75, 0, 114, 115, 119, 105, 0,
  562. 110, 130, 0, 36, 0, 73, 72, 61, 20, 102,
  563. 0, 93, 0, 84, 87, 88, 128, 124, 126, 118,
  564. 0, 76, 0, 120, 74, 117, 80, 0, 111, 0,
  565. 35, 132, 122, 0, 21, 103, 70, 94, 56, 0,
  566. 93, 90, 92, 69, 83, 0, 82, 81, 0, 0,
  567. 116, 104, 0, 95, 0, 91, 98, 0, 85, 89,
  568. 79, 78, 100, 99, 0, 0, 97, 96
  569. };
  570. /* YYDEFGOTO[NTERM-NUM]. */
  571. static const yytype_int16 yydefgoto[] =
  572. {
  573. -1, 1, 2, 3, 35, 76, 56, 36, 65, 66,
  574. 67, 79, 38, 39, 40, 41, 42, 68, 90, 91,
  575. 43, 121, 70, 112, 113, 132, 133, 134, 135, 161,
  576. 162, 44, 154, 155, 55, 80, 81, 82, 114, 115,
  577. 116, 117, 129, 51, 74, 75, 45, 98, 46
  578. };
  579. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  580. STATE-NUM. */
  581. #define YYPACT_NINF -135
  582. static const yytype_int16 yypact[] =
  583. {
  584. -135, 20, -135, 321, -135, -135, 30, -135, -135, -135,
  585. -135, -135, -28, -135, 2, -135, -135, -135, -135, -135,
  586. -135, -135, -135, -135, -6, -135, 9, -135, -135, -135,
  587. -5, 15, -17, -135, -135, -135, -135, 18, 491, -135,
  588. -135, -135, -135, -135, -135, -135, -135, -135, -135, -22,
  589. 31, -135, -135, 19, 106, -135, 491, 19, -135, 491,
  590. 50, -135, -135, 11, -3, 51, 57, -135, 18, -14,
  591. 14, -135, -135, 48, 46, -135, 491, -135, 33, 32,
  592. 59, 154, -135, -135, 18, -135, 365, 56, 60, 61,
  593. -135, -3, -135, -135, 18, -135, -135, -135, -135, -135,
  594. 202, 74, -135, -23, -135, -135, -135, 77, -135, 16,
  595. 101, 49, -135, 34, 92, 93, -135, -135, -135, 94,
  596. -135, 110, 95, -135, 97, -135, -135, -135, -135, -20,
  597. 96, 410, 99, 113, 100, -135, -135, -135, -135, -135,
  598. 103, -135, 107, -135, -135, 111, -135, 239, -135, 32,
  599. -135, -135, -135, 123, -135, -135, -135, -135, -135, 3,
  600. 52, -135, 38, -135, -135, 454, -135, -135, 117, 128,
  601. -135, -135, 134, -135, 135, -135, -135, 276, -135, -135,
  602. -135, -135, -135, -135, 137, 138, -135, -135
  603. };
  604. /* YYPGOTO[NTERM-NUM]. */
  605. static const yytype_int16 yypgoto[] =
  606. {
  607. -135, -135, 187, -135, -135, -135, -135, -50, -135, -135,
  608. 98, 0, -59, -37, -135, -135, -135, -77, -135, -135,
  609. -54, -30, -135, -90, -135, -134, -135, -135, 24, -58,
  610. -135, -135, -135, -135, -18, -135, -135, 109, -135, -135,
  611. 44, 87, 84, 148, -135, 102, -135, -135, -135
  612. };
  613. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  614. positive, shift that token. If negative, reduce the rule which
  615. number is the opposite. If zero, do what YYDEFACT says.
  616. If YYTABLE_NINF, syntax error. */
  617. #define YYTABLE_NINF -109
  618. static const yytype_int16 yytable[] =
  619. {
  620. 86, 71, 111, 37, 172, 10, 83, 69, 58, 49,
  621. 92, 152, 88, 169, 73, 20, 96, 140, 97, 142,
  622. 4, 144, 137, 50, 29, 52, 104, 61, 33, 50,
  623. 153, 53, 111, 89, 111, 77, -93, 127, 95, 85,
  624. 157, 131, 59, 185, 173, 54, 57, 99, 62, 71,
  625. 159, 64, -93, 141, 160, 62, 84, 108, 63, 64,
  626. 54, 100, 60, 109, 64, 63, 64, 146, 73, 107,
  627. 54, 176, 111, 108, 47, 48, 84, 105, 106, 109,
  628. 64, 147, 160, 160, 110, 177, 141, 87, 131, 157,
  629. 108, 102, 103, 173, 71, 93, 109, 64, 101, 159,
  630. 64, 174, 175, 94, 118, 124, 131, 78, 136, 125,
  631. 126, 7, 8, 9, 10, 11, 12, 13, 131, 15,
  632. 16, 17, 18, 19, 20, 21, 22, 23, 24, 110,
  633. 26, 27, 28, 29, 30, 143, 148, 33, 105, 149,
  634. 96, 151, 152, -22, 150, 156, 165, 34, 163, 164,
  635. -22, -107, 166, -22, -22, 119, 167, 171, -22, 7,
  636. 8, 9, 10, 11, 12, 13, 180, 15, 16, 17,
  637. 18, 19, 20, 21, 22, 23, 24, 181, 26, 27,
  638. 28, 29, 30, 182, 183, 33, 186, 187, 5, 179,
  639. 120, -22, 128, 170, 139, 34, 145, 72, -22, -108,
  640. 0, -22, -22, 130, 0, 138, -22, 7, 8, 9,
  641. 10, 11, 12, 13, 0, 15, 16, 17, 18, 19,
  642. 20, 21, 22, 23, 24, 0, 26, 27, 28, 29,
  643. 30, 0, 0, 33, 0, 0, 0, 0, -86, 0,
  644. 168, 0, 0, 34, 7, 8, 9, 10, 11, 12,
  645. 13, -86, 15, 16, 17, 18, 19, 20, 21, 22,
  646. 23, 24, 0, 26, 27, 28, 29, 30, 0, 0,
  647. 33, 0, 0, 0, 0, -86, 0, 184, 0, 0,
  648. 34, 7, 8, 9, 10, 11, 12, 13, -86, 15,
  649. 16, 17, 18, 19, 20, 21, 22, 23, 24, 0,
  650. 26, 27, 28, 29, 30, 0, 0, 33, 0, 0,
  651. 0, 0, -86, 0, 0, 0, 0, 34, 0, 0,
  652. 0, 0, 6, 0, 0, -86, 7, 8, 9, 10,
  653. 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  654. 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
  655. 31, 32, 33, 0, 0, 0, 0, 0, -22, 0,
  656. 0, 0, 34, 0, 0, -22, 0, 0, -22, -22,
  657. 7, 8, 9, 10, 11, 12, 13, 0, 15, 16,
  658. 17, 18, 19, 20, 21, 22, 23, 24, 0, 26,
  659. 27, 28, 29, 30, 0, 0, 33, 0, 0, 0,
  660. 0, 0, 0, 0, 0, 0, 34, 0, 0, 0,
  661. 0, 0, 0, 122, 123, 7, 8, 9, 10, 11,
  662. 12, 13, 0, 15, 16, 17, 18, 19, 20, 21,
  663. 22, 23, 24, 0, 26, 27, 28, 29, 30, 0,
  664. 0, 33, 0, 0, 0, 0, 0, 157, 0, 0,
  665. 0, 158, 0, 0, 0, 0, 0, 159, 64, 7,
  666. 8, 9, 10, 11, 12, 13, 0, 15, 16, 17,
  667. 18, 19, 20, 21, 22, 23, 24, 0, 26, 27,
  668. 28, 29, 30, 0, 0, 33, 0, 0, 0, 0,
  669. 178, 0, 0, 0, 0, 34, 7, 8, 9, 10,
  670. 11, 12, 13, 0, 15, 16, 17, 18, 19, 20,
  671. 21, 22, 23, 24, 0, 26, 27, 28, 29, 30,
  672. 0, 0, 33, 0, 0, 0, 0, 0, 0, 0,
  673. 0, 0, 34
  674. };
  675. static const yytype_int16 yycheck[] =
  676. {
  677. 59, 38, 79, 3, 1, 8, 56, 37, 26, 37,
  678. 64, 31, 1, 147, 37, 18, 30, 1, 32, 109,
  679. 0, 111, 45, 51, 27, 23, 76, 44, 31, 51,
  680. 50, 37, 109, 63, 111, 53, 33, 91, 68, 57,
  681. 37, 100, 47, 177, 41, 51, 37, 33, 37, 86,
  682. 47, 48, 49, 37, 131, 37, 56, 41, 47, 48,
  683. 51, 47, 47, 47, 48, 47, 48, 33, 37, 37,
  684. 51, 33, 149, 41, 44, 45, 76, 44, 45, 47,
  685. 48, 47, 159, 160, 52, 47, 37, 37, 147, 37,
  686. 41, 45, 46, 41, 131, 44, 47, 48, 50, 47,
  687. 48, 159, 160, 46, 45, 49, 165, 1, 34, 49,
  688. 49, 5, 6, 7, 8, 9, 10, 11, 177, 13,
  689. 14, 15, 16, 17, 18, 19, 20, 21, 22, 52,
  690. 24, 25, 26, 27, 28, 34, 44, 31, 44, 46,
  691. 30, 44, 31, 37, 49, 49, 46, 41, 49, 36,
  692. 44, 45, 49, 47, 48, 1, 49, 34, 52, 5,
  693. 6, 7, 8, 9, 10, 11, 49, 13, 14, 15,
  694. 16, 17, 18, 19, 20, 21, 22, 49, 24, 25,
  695. 26, 27, 28, 49, 49, 31, 49, 49, 1, 165,
  696. 81, 37, 94, 149, 107, 41, 112, 49, 44, 45,
  697. -1, 47, 48, 1, -1, 103, 52, 5, 6, 7,
  698. 8, 9, 10, 11, -1, 13, 14, 15, 16, 17,
  699. 18, 19, 20, 21, 22, -1, 24, 25, 26, 27,
  700. 28, -1, -1, 31, -1, -1, -1, -1, 36, -1,
  701. 1, -1, -1, 41, 5, 6, 7, 8, 9, 10,
  702. 11, 49, 13, 14, 15, 16, 17, 18, 19, 20,
  703. 21, 22, -1, 24, 25, 26, 27, 28, -1, -1,
  704. 31, -1, -1, -1, -1, 36, -1, 1, -1, -1,
  705. 41, 5, 6, 7, 8, 9, 10, 11, 49, 13,
  706. 14, 15, 16, 17, 18, 19, 20, 21, 22, -1,
  707. 24, 25, 26, 27, 28, -1, -1, 31, -1, -1,
  708. -1, -1, 36, -1, -1, -1, -1, 41, -1, -1,
  709. -1, -1, 1, -1, -1, 49, 5, 6, 7, 8,
  710. 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
  711. 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
  712. 29, 30, 31, -1, -1, -1, -1, -1, 37, -1,
  713. -1, -1, 41, -1, -1, 44, -1, -1, 47, 48,
  714. 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
  715. 15, 16, 17, 18, 19, 20, 21, 22, -1, 24,
  716. 25, 26, 27, 28, -1, -1, 31, -1, -1, -1,
  717. -1, -1, -1, -1, -1, -1, 41, -1, -1, -1,
  718. -1, -1, -1, 48, 49, 5, 6, 7, 8, 9,
  719. 10, 11, -1, 13, 14, 15, 16, 17, 18, 19,
  720. 20, 21, 22, -1, 24, 25, 26, 27, 28, -1,
  721. -1, 31, -1, -1, -1, -1, -1, 37, -1, -1,
  722. -1, 41, -1, -1, -1, -1, -1, 47, 48, 5,
  723. 6, 7, 8, 9, 10, 11, -1, 13, 14, 15,
  724. 16, 17, 18, 19, 20, 21, 22, -1, 24, 25,
  725. 26, 27, 28, -1, -1, 31, -1, -1, -1, -1,
  726. 36, -1, -1, -1, -1, 41, 5, 6, 7, 8,
  727. 9, 10, 11, -1, 13, 14, 15, 16, 17, 18,
  728. 19, 20, 21, 22, -1, 24, 25, 26, 27, 28,
  729. -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
  730. -1, -1, 41
  731. };
  732. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  733. symbol of state STATE-NUM. */
  734. static const yytype_uint8 yystos[] =
  735. {
  736. 0, 54, 55, 56, 0, 55, 1, 5, 6, 7,
  737. 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
  738. 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
  739. 28, 29, 30, 31, 41, 57, 60, 64, 65, 66,
  740. 67, 68, 69, 73, 84, 99, 101, 44, 45, 37,
  741. 51, 96, 23, 37, 51, 87, 59, 37, 87, 47,
  742. 47, 44, 37, 47, 48, 61, 62, 63, 70, 74,
  743. 75, 66, 96, 37, 97, 98, 58, 87, 1, 64,
  744. 88, 89, 90, 60, 64, 87, 65, 37, 1, 74,
  745. 71, 72, 73, 44, 46, 74, 30, 32, 100, 33,
  746. 47, 50, 45, 46, 60, 44, 45, 37, 41, 47,
  747. 52, 70, 76, 77, 91, 92, 93, 94, 45, 1,
  748. 90, 74, 48, 49, 49, 49, 49, 73, 63, 95,
  749. 1, 65, 78, 79, 80, 81, 34, 45, 98, 94,
  750. 1, 37, 76, 34, 76, 95, 33, 47, 44, 46,
  751. 49, 44, 31, 50, 85, 86, 49, 37, 41, 47,
  752. 70, 82, 83, 49, 36, 46, 49, 49, 1, 78,
  753. 93, 34, 1, 41, 82, 82, 33, 47, 36, 81,
  754. 49, 49, 49, 49, 1, 78, 49, 49
  755. };
  756. #define yyerrok (yyerrstatus = 0)
  757. #define yyclearin (yychar = YYEMPTY)
  758. #define YYEMPTY (-2)
  759. #define YYEOF 0
  760. #define YYACCEPT goto yyacceptlab
  761. #define YYABORT goto yyabortlab
  762. #define YYERROR goto yyerrorlab
  763. /* Like YYERROR except do call yyerror. This remains here temporarily
  764. to ease the transition to the new meaning of YYERROR, for GCC.
  765. Once GCC version 2 has supplanted version 1, this can go. However,
  766. YYFAIL appears to be in use. Nevertheless, it is formally deprecated
  767. in Bison 2.4.2's NEWS entry, where a plan to phase it out is
  768. discussed. */
  769. #define YYFAIL goto yyerrlab
  770. #if defined YYFAIL
  771. /* This is here to suppress warnings from the GCC cpp's
  772. -Wunused-macros. Normally we don't worry about that warning, but
  773. some users do, and we want to make it easy for users to remove
  774. YYFAIL uses, which will produce warnings from Bison 2.5. */
  775. #endif
  776. #define YYRECOVERING() (!!yyerrstatus)
  777. #define YYBACKUP(Token, Value) \
  778. do \
  779. if (yychar == YYEMPTY && yylen == 1) \
  780. { \
  781. yychar = (Token); \
  782. yylval = (Value); \
  783. yytoken = YYTRANSLATE (yychar); \
  784. YYPOPSTACK (1); \
  785. goto yybackup; \
  786. } \
  787. else \
  788. { \
  789. yyerror (YY_("syntax error: cannot back up")); \
  790. YYERROR; \
  791. } \
  792. while (YYID (0))
  793. #define YYTERROR 1
  794. #define YYERRCODE 256
  795. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  796. If N is 0, then set CURRENT to the empty location which ends
  797. the previous symbol: RHS[0] (always defined). */
  798. #define YYRHSLOC(Rhs, K) ((Rhs)[K])
  799. #ifndef YYLLOC_DEFAULT
  800. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  801. do \
  802. if (YYID (N)) \
  803. { \
  804. (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  805. (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  806. (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  807. (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  808. } \
  809. else \
  810. { \
  811. (Current).first_line = (Current).last_line = \
  812. YYRHSLOC (Rhs, 0).last_line; \
  813. (Current).first_column = (Current).last_column = \
  814. YYRHSLOC (Rhs, 0).last_column; \
  815. } \
  816. while (YYID (0))
  817. #endif
  818. /* YY_LOCATION_PRINT -- Print the location on the stream.
  819. This macro was not mandated originally: define only if we know
  820. we won't break user code: when these are the locations we know. */
  821. #ifndef YY_LOCATION_PRINT
  822. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  823. # define YY_LOCATION_PRINT(File, Loc) \
  824. fprintf (File, "%d.%d-%d.%d", \
  825. (Loc).first_line, (Loc).first_column, \
  826. (Loc).last_line, (Loc).last_column)
  827. # else
  828. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  829. # endif
  830. #endif
  831. /* YYLEX -- calling `yylex' with the right arguments. */
  832. #ifdef YYLEX_PARAM
  833. # define YYLEX yylex (YYLEX_PARAM)
  834. #else
  835. # define YYLEX yylex ()
  836. #endif
  837. /* Enable debugging if requested. */
  838. #if YYDEBUG
  839. # ifndef YYFPRINTF
  840. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  841. # define YYFPRINTF fprintf
  842. # endif
  843. # define YYDPRINTF(Args) \
  844. do { \
  845. if (yydebug) \
  846. YYFPRINTF Args; \
  847. } while (YYID (0))
  848. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  849. do { \
  850. if (yydebug) \
  851. { \
  852. YYFPRINTF (stderr, "%s ", Title); \
  853. yy_symbol_print (stderr, \
  854. Type, Value); \
  855. YYFPRINTF (stderr, "\n"); \
  856. } \
  857. } while (YYID (0))
  858. /*--------------------------------.
  859. | Print this symbol on YYOUTPUT. |
  860. `--------------------------------*/
  861. /*ARGSUSED*/
  862. #if (defined __STDC__ || defined __C99__FUNC__ \
  863. || defined __cplusplus || defined _MSC_VER)
  864. static void
  865. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
  866. #else
  867. static void
  868. yy_symbol_value_print (yyoutput, yytype, yyvaluep)
  869. FILE *yyoutput;
  870. int yytype;
  871. YYSTYPE const * const yyvaluep;
  872. #endif
  873. {
  874. if (!yyvaluep)
  875. return;
  876. # ifdef YYPRINT
  877. if (yytype < YYNTOKENS)
  878. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  879. # else
  880. YYUSE (yyoutput);
  881. # endif
  882. switch (yytype)
  883. {
  884. default:
  885. break;
  886. }
  887. }
  888. /*--------------------------------.
  889. | Print this symbol on YYOUTPUT. |
  890. `--------------------------------*/
  891. #if (defined __STDC__ || defined __C99__FUNC__ \
  892. || defined __cplusplus || defined _MSC_VER)
  893. static void
  894. yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
  895. #else
  896. static void
  897. yy_symbol_print (yyoutput, yytype, yyvaluep)
  898. FILE *yyoutput;
  899. int yytype;
  900. YYSTYPE const * const yyvaluep;
  901. #endif
  902. {
  903. if (yytype < YYNTOKENS)
  904. YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  905. else
  906. YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  907. yy_symbol_value_print (yyoutput, yytype, yyvaluep);
  908. YYFPRINTF (yyoutput, ")");
  909. }
  910. /*------------------------------------------------------------------.
  911. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  912. | TOP (included). |
  913. `------------------------------------------------------------------*/
  914. #if (defined __STDC__ || defined __C99__FUNC__ \
  915. || defined __cplusplus || defined _MSC_VER)
  916. static void
  917. yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
  918. #else
  919. static void
  920. yy_stack_print (yybottom, yytop)
  921. yytype_int16 *yybottom;
  922. yytype_int16 *yytop;
  923. #endif
  924. {
  925. YYFPRINTF (stderr, "Stack now");
  926. for (; yybottom <= yytop; yybottom++)
  927. {
  928. int yybot = *yybottom;
  929. YYFPRINTF (stderr, " %d", yybot);
  930. }
  931. YYFPRINTF (stderr, "\n");
  932. }
  933. # define YY_STACK_PRINT(Bottom, Top) \
  934. do { \
  935. if (yydebug) \
  936. yy_stack_print ((Bottom), (Top)); \
  937. } while (YYID (0))
  938. /*------------------------------------------------.
  939. | Report that the YYRULE is going to be reduced. |
  940. `------------------------------------------------*/
  941. #if (defined __STDC__ || defined __C99__FUNC__ \
  942. || defined __cplusplus || defined _MSC_VER)
  943. static void
  944. yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
  945. #else
  946. static void
  947. yy_reduce_print (yyvsp, yyrule)
  948. YYSTYPE *yyvsp;
  949. int yyrule;
  950. #endif
  951. {
  952. int yynrhs = yyr2[yyrule];
  953. int yyi;
  954. unsigned long int yylno = yyrline[yyrule];
  955. YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
  956. yyrule - 1, yylno);
  957. /* The symbols being reduced. */
  958. for (yyi = 0; yyi < yynrhs; yyi++)
  959. {
  960. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  961. yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
  962. &(yyvsp[(yyi + 1) - (yynrhs)])
  963. );
  964. YYFPRINTF (stderr, "\n");
  965. }
  966. }
  967. # define YY_REDUCE_PRINT(Rule) \
  968. do { \
  969. if (yydebug) \
  970. yy_reduce_print (yyvsp, Rule); \
  971. } while (YYID (0))
  972. /* Nonzero means print parse trace. It is left uninitialized so that
  973. multiple parsers can coexist. */
  974. int yydebug;
  975. #else /* !YYDEBUG */
  976. # define YYDPRINTF(Args)
  977. # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  978. # define YY_STACK_PRINT(Bottom, Top)
  979. # define YY_REDUCE_PRINT(Rule)
  980. #endif /* !YYDEBUG */
  981. /* YYINITDEPTH -- initial size of the parser's stacks. */
  982. #ifndef YYINITDEPTH
  983. # define YYINITDEPTH 200
  984. #endif
  985. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  986. if the built-in stack extension method is used).
  987. Do not make this value too large; the results are undefined if
  988. YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  989. evaluated with infinite-precision integer arithmetic. */
  990. #ifndef YYMAXDEPTH
  991. # define YYMAXDEPTH 10000
  992. #endif
  993. #if YYERROR_VERBOSE
  994. # ifndef yystrlen
  995. # if defined __GLIBC__ && defined _STRING_H
  996. # define yystrlen strlen
  997. # else
  998. /* Return the length of YYSTR. */
  999. #if (defined __STDC__ || defined __C99__FUNC__ \
  1000. || defined __cplusplus || defined _MSC_VER)
  1001. static YYSIZE_T
  1002. yystrlen (const char *yystr)
  1003. #else
  1004. static YYSIZE_T
  1005. yystrlen (yystr)
  1006. const char *yystr;
  1007. #endif
  1008. {
  1009. YYSIZE_T yylen;
  1010. for (yylen = 0; yystr[yylen]; yylen++)
  1011. continue;
  1012. return yylen;
  1013. }
  1014. # endif
  1015. # endif
  1016. # ifndef yystpcpy
  1017. # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
  1018. # define yystpcpy stpcpy
  1019. # else
  1020. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  1021. YYDEST. */
  1022. #if (defined __STDC__ || defined __C99__FUNC__ \
  1023. || defined __cplusplus || defined _MSC_VER)
  1024. static char *
  1025. yystpcpy (char *yydest, const char *yysrc)
  1026. #else
  1027. static char *
  1028. yystpcpy (yydest, yysrc)
  1029. char *yydest;
  1030. const char *yysrc;
  1031. #endif
  1032. {
  1033. char *yyd = yydest;
  1034. const char *yys = yysrc;
  1035. while ((*yyd++ = *yys++) != '\0')
  1036. continue;
  1037. return yyd - 1;
  1038. }
  1039. # endif
  1040. # endif
  1041. # ifndef yytnamerr
  1042. /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  1043. quotes and backslashes, so that it's suitable for yyerror. The
  1044. heuristic is that double-quoting is unnecessary unless the string
  1045. contains an apostrophe, a comma, or backslash (other than
  1046. backslash-backslash). YYSTR is taken from yytname. If YYRES is
  1047. null, do not copy; instead, return the length of what the result
  1048. would have been. */
  1049. static YYSIZE_T
  1050. yytnamerr (char *yyres, const char *yystr)
  1051. {
  1052. if (*yystr == '"')
  1053. {
  1054. YYSIZE_T yyn = 0;
  1055. char const *yyp = yystr;
  1056. for (;;)
  1057. switch (*++yyp)
  1058. {
  1059. case '\'':
  1060. case ',':
  1061. goto do_not_strip_quotes;
  1062. case '\\':
  1063. if (*++yyp != '\\')
  1064. goto do_not_strip_quotes;
  1065. /* Fall through. */
  1066. default:
  1067. if (yyres)
  1068. yyres[yyn] = *yyp;
  1069. yyn++;
  1070. break;
  1071. case '"':
  1072. if (yyres)
  1073. yyres[yyn] = '\0';
  1074. return yyn;
  1075. }
  1076. do_not_strip_quotes: ;
  1077. }
  1078. if (! yyres)
  1079. return yystrlen (yystr);
  1080. return yystpcpy (yyres, yystr) - yyres;
  1081. }
  1082. # endif
  1083. /* Copy into YYRESULT an error message about the unexpected token
  1084. YYCHAR while in state YYSTATE. Return the number of bytes copied,
  1085. including the terminating null byte. If YYRESULT is null, do not
  1086. copy anything; just return the number of bytes that would be
  1087. copied. As a special case, return 0 if an ordinary "syntax error"
  1088. message will do. Return YYSIZE_MAXIMUM if overflow occurs during
  1089. size calculation. */
  1090. static YYSIZE_T
  1091. yysyntax_error (char *yyresult, int yystate, int yychar)
  1092. {
  1093. int yyn = yypact[yystate];
  1094. if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
  1095. return 0;
  1096. else
  1097. {
  1098. int yytype = YYTRANSLATE (yychar);
  1099. YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
  1100. YYSIZE_T yysize = yysize0;
  1101. YYSIZE_T yysize1;
  1102. int yysize_overflow = 0;
  1103. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  1104. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  1105. int yyx;
  1106. # if 0
  1107. /* This is so xgettext sees the translatable formats that are
  1108. constructed on the fly. */
  1109. YY_("syntax error, unexpected %s");
  1110. YY_("syntax error, unexpected %s, expecting %s");
  1111. YY_("syntax error, unexpected %s, expecting %s or %s");
  1112. YY_("syntax error, unexpected %s, expecting %s or %s or %s");
  1113. YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
  1114. # endif
  1115. char *yyfmt;
  1116. char const *yyf;
  1117. static char const yyunexpected[] = "syntax error, unexpected %s";
  1118. static char const yyexpecting[] = ", expecting %s";
  1119. static char const yyor[] = " or %s";
  1120. char yyformat[sizeof yyunexpected
  1121. + sizeof yyexpecting - 1
  1122. + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
  1123. * (sizeof yyor - 1))];
  1124. char const *yyprefix = yyexpecting;
  1125. /* Start YYX at -YYN if negative to avoid negative indexes in
  1126. YYCHECK. */
  1127. int yyxbegin = yyn < 0 ? -yyn : 0;
  1128. /* Stay within bounds of both yycheck and yytname. */
  1129. int yychecklim = YYLAST - yyn + 1;
  1130. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  1131. int yycount = 1;
  1132. yyarg[0] = yytname[yytype];
  1133. yyfmt = yystpcpy (yyformat, yyunexpected);
  1134. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  1135. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
  1136. {
  1137. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  1138. {
  1139. yycount = 1;
  1140. yysize = yysize0;
  1141. yyformat[sizeof yyunexpected - 1] = '\0';
  1142. break;
  1143. }
  1144. yyarg[yycount++] = yytname[yyx];
  1145. yysize1 = yysize + yytnamerr (0, yytname[yyx]);
  1146. yysize_overflow |= (yysize1 < yysize);
  1147. yysize = yysize1;
  1148. yyfmt = yystpcpy (yyfmt, yyprefix);
  1149. yyprefix = yyor;
  1150. }
  1151. yyf = YY_(yyformat);
  1152. yysize1 = yysize + yystrlen (yyf);
  1153. yysize_overflow |= (yysize1 < yysize);
  1154. yysize = yysize1;
  1155. if (yysize_overflow)
  1156. return YYSIZE_MAXIMUM;
  1157. if (yyresult)
  1158. {
  1159. /* Avoid sprintf, as that infringes on the user's name space.
  1160. Don't have undefined behavior even if the translation
  1161. produced a string with the wrong number of "%s"s. */
  1162. char *yyp = yyresult;
  1163. int yyi = 0;
  1164. while ((*yyp = *yyf) != '\0')
  1165. {
  1166. if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
  1167. {
  1168. yyp += yytnamerr (yyp, yyarg[yyi++]);
  1169. yyf += 2;
  1170. }
  1171. else
  1172. {
  1173. yyp++;
  1174. yyf++;
  1175. }
  1176. }
  1177. }
  1178. return yysize;
  1179. }
  1180. }
  1181. #endif /* YYERROR_VERBOSE */
  1182. /*-----------------------------------------------.
  1183. | Release the memory associated to this symbol. |
  1184. `-----------------------------------------------*/
  1185. /*ARGSUSED*/
  1186. #if (defined __STDC__ || defined __C99__FUNC__ \
  1187. || defined __cplusplus || defined _MSC_VER)
  1188. static void
  1189. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
  1190. #else
  1191. static void
  1192. yydestruct (yymsg, yytype, yyvaluep)
  1193. const char *yymsg;
  1194. int yytype;
  1195. YYSTYPE *yyvaluep;
  1196. #endif
  1197. {
  1198. YYUSE (yyvaluep);
  1199. if (!yymsg)
  1200. yymsg = "Deleting";
  1201. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  1202. switch (yytype)
  1203. {
  1204. default:
  1205. break;
  1206. }
  1207. }
  1208. /* Prevent warnings from -Wmissing-prototypes. */
  1209. #ifdef YYPARSE_PARAM
  1210. #if defined __STDC__ || defined __cplusplus
  1211. int yyparse (void *YYPARSE_PARAM);
  1212. #else
  1213. int yyparse ();
  1214. #endif
  1215. #else /* ! YYPARSE_PARAM */
  1216. #if defined __STDC__ || defined __cplusplus
  1217. int yyparse (void);
  1218. #else
  1219. int yyparse ();
  1220. #endif
  1221. #endif /* ! YYPARSE_PARAM */
  1222. /* The lookahead symbol. */
  1223. int yychar;
  1224. /* The semantic value of the lookahead symbol. */
  1225. YYSTYPE yylval;
  1226. /* Number of syntax errors so far. */
  1227. int yynerrs;
  1228. /*-------------------------.
  1229. | yyparse or yypush_parse. |
  1230. `-------------------------*/
  1231. #ifdef YYPARSE_PARAM
  1232. #if (defined __STDC__ || defined __C99__FUNC__ \
  1233. || defined __cplusplus || defined _MSC_VER)
  1234. int
  1235. yyparse (void *YYPARSE_PARAM)
  1236. #else
  1237. int
  1238. yyparse (YYPARSE_PARAM)
  1239. void *YYPARSE_PARAM;
  1240. #endif
  1241. #else /* ! YYPARSE_PARAM */
  1242. #if (defined __STDC__ || defined __C99__FUNC__ \
  1243. || defined __cplusplus || defined _MSC_VER)
  1244. int
  1245. yyparse (void)
  1246. #else
  1247. int
  1248. yyparse ()
  1249. #endif
  1250. #endif
  1251. {
  1252. int yystate;
  1253. /* Number of tokens to shift before error messages enabled. */
  1254. int yyerrstatus;
  1255. /* The stacks and their tools:
  1256. `yyss': related to states.
  1257. `yyvs': related to semantic values.
  1258. Refer to the stacks thru separate pointers, to allow yyoverflow
  1259. to reallocate them elsewhere. */
  1260. /* The state stack. */
  1261. yytype_int16 yyssa[YYINITDEPTH];
  1262. yytype_int16 *yyss;
  1263. yytype_int16 *yyssp;
  1264. /* The semantic value stack. */
  1265. YYSTYPE yyvsa[YYINITDEPTH];
  1266. YYSTYPE *yyvs;
  1267. YYSTYPE *yyvsp;
  1268. YYSIZE_T yystacksize;
  1269. int yyn;
  1270. int yyresult;
  1271. /* Lookahead token as an internal (translated) token number. */
  1272. int yytoken;
  1273. /* The variables used to return semantic value and location from the
  1274. action routines. */
  1275. YYSTYPE yyval;
  1276. #if YYERROR_VERBOSE
  1277. /* Buffer for error messages, and its allocated size. */
  1278. char yymsgbuf[128];
  1279. char *yymsg = yymsgbuf;
  1280. YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
  1281. #endif
  1282. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
  1283. /* The number of symbols on the RHS of the reduced rule.
  1284. Keep to zero when no symbol should be popped. */
  1285. int yylen = 0;
  1286. yytoken = 0;
  1287. yyss = yyssa;
  1288. yyvs = yyvsa;
  1289. yystacksize = YYINITDEPTH;
  1290. YYDPRINTF ((stderr, "Starting parse\n"));
  1291. yystate = 0;
  1292. yyerrstatus = 0;
  1293. yynerrs = 0;
  1294. yychar = YYEMPTY; /* Cause a token to be read. */
  1295. /* Initialize stack pointers.
  1296. Waste one element of value and location stack
  1297. so that they stay on the same level as the state stack.
  1298. The wasted elements are never initialized. */
  1299. yyssp = yyss;
  1300. yyvsp = yyvs;
  1301. goto yysetstate;
  1302. /*------------------------------------------------------------.
  1303. | yynewstate -- Push a new state, which is found in yystate. |
  1304. `------------------------------------------------------------*/
  1305. yynewstate:
  1306. /* In all cases, when you get here, the value and location stacks
  1307. have just been pushed. So pushing a state here evens the stacks. */
  1308. yyssp++;
  1309. yysetstate:
  1310. *yyssp = yystate;
  1311. if (yyss + yystacksize - 1 <= yyssp)
  1312. {
  1313. /* Get the current used size of the three stacks, in elements. */
  1314. YYSIZE_T yysize = yyssp - yyss + 1;
  1315. #ifdef yyoverflow
  1316. {
  1317. /* Give user a chance to reallocate the stack. Use copies of
  1318. these so that the &'s don't force the real ones into
  1319. memory. */
  1320. YYSTYPE *yyvs1 = yyvs;
  1321. yytype_int16 *yyss1 = yyss;
  1322. /* Each stack pointer address is followed by the size of the
  1323. data in use in that stack, in bytes. This used to be a
  1324. conditional around just the two extra args, but that might
  1325. be undefined if yyoverflow is a macro. */
  1326. yyoverflow (YY_("memory exhausted"),
  1327. &yyss1, yysize * sizeof (*yyssp),
  1328. &yyvs1, yysize * sizeof (*yyvsp),
  1329. &yystacksize);
  1330. yyss = yyss1;
  1331. yyvs = yyvs1;
  1332. }
  1333. #else /* no yyoverflow */
  1334. # ifndef YYSTACK_RELOCATE
  1335. goto yyexhaustedlab;
  1336. # else
  1337. /* Extend the stack our own way. */
  1338. if (YYMAXDEPTH <= yystacksize)
  1339. goto yyexhaustedlab;
  1340. yystacksize *= 2;
  1341. if (YYMAXDEPTH < yystacksize)
  1342. yystacksize = YYMAXDEPTH;
  1343. {
  1344. yytype_int16 *yyss1 = yyss;
  1345. union yyalloc *yyptr =
  1346. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  1347. if (! yyptr)
  1348. goto yyexhaustedlab;
  1349. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1350. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1351. # undef YYSTACK_RELOCATE
  1352. if (yyss1 != yyssa)
  1353. YYSTACK_FREE (yyss1);
  1354. }
  1355. # endif
  1356. #endif /* no yyoverflow */
  1357. yyssp = yyss + yysize - 1;
  1358. yyvsp = yyvs + yysize - 1;
  1359. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  1360. (unsigned long int) yystacksize));
  1361. if (yyss + yystacksize - 1 <= yyssp)
  1362. YYABORT;
  1363. }
  1364. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1365. if (yystate == YYFINAL)
  1366. YYACCEPT;
  1367. goto yybackup;
  1368. /*-----------.
  1369. | yybackup. |
  1370. `-----------*/
  1371. yybackup:
  1372. /* Do appropriate processing given the current state. Read a
  1373. lookahead token if we need one and don't already have one. */
  1374. /* First try to decide what to do without reference to lookahead token. */
  1375. yyn = yypact[yystate];
  1376. if (yyn == YYPACT_NINF)
  1377. goto yydefault;
  1378. /* Not known => get a lookahead token if don't already have one. */
  1379. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  1380. if (yychar == YYEMPTY)
  1381. {
  1382. YYDPRINTF ((stderr, "Reading a token: "));
  1383. yychar = YYLEX;
  1384. }
  1385. if (yychar <= YYEOF)
  1386. {
  1387. yychar = yytoken = YYEOF;
  1388. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1389. }
  1390. else
  1391. {
  1392. yytoken = YYTRANSLATE (yychar);
  1393. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1394. }
  1395. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1396. detect an error, take that action. */
  1397. yyn += yytoken;
  1398. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1399. goto yydefault;
  1400. yyn = yytable[yyn];
  1401. if (yyn <= 0)
  1402. {
  1403. if (yyn == 0 || yyn == YYTABLE_NINF)
  1404. goto yyerrlab;
  1405. yyn = -yyn;
  1406. goto yyreduce;
  1407. }
  1408. /* Count tokens shifted since error; after three, turn off error
  1409. status. */
  1410. if (yyerrstatus)
  1411. yyerrstatus--;
  1412. /* Shift the lookahead token. */
  1413. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1414. /* Discard the shifted token. */
  1415. yychar = YYEMPTY;
  1416. yystate = yyn;
  1417. *++yyvsp = yylval;
  1418. goto yynewstate;
  1419. /*-----------------------------------------------------------.
  1420. | yydefault -- do the default action for the current state. |
  1421. `-----------------------------------------------------------*/
  1422. yydefault:
  1423. yyn = yydefact[yystate];
  1424. if (yyn == 0)
  1425. goto yyerrlab;
  1426. goto yyreduce;
  1427. /*-----------------------------.
  1428. | yyreduce -- Do a reduction. |
  1429. `-----------------------------*/
  1430. yyreduce:
  1431. /* yyn is the number of a rule to reduce with. */
  1432. yylen = yyr2[yyn];
  1433. /* If YYLEN is nonzero, implement the default value of the action:
  1434. `$$ = $1'.
  1435. Otherwise, the following line sets YYVAL to garbage.
  1436. This behavior is undocumented and Bison
  1437. users should not rely upon it. Assigning to YYVAL
  1438. unconditionally makes the parser a bit smaller, and it avoids a
  1439. GCC warning that YYVAL may be used uninitialized. */
  1440. yyval = yyvsp[1-yylen];
  1441. YY_REDUCE_PRINT (yyn);
  1442. switch (yyn)
  1443. {
  1444. case 4:
  1445. { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; ;}
  1446. break;
  1447. case 5:
  1448. { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; ;}
  1449. break;
  1450. case 6:
  1451. { is_typedef = 1; ;}
  1452. break;
  1453. case 7:
  1454. { (yyval) = (yyvsp[(4) - (4)]); ;}
  1455. break;
  1456. case 8:
  1457. { is_typedef = 1; ;}
  1458. break;
  1459. case 9:
  1460. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1461. break;
  1462. case 14:
  1463. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1464. break;
  1465. case 15:
  1466. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1467. break;
  1468. case 16:
  1469. { if (current_name) {
  1470. struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
  1471. (*(yyvsp[(3) - (3)]))->next = NULL;
  1472. add_symbol(current_name,
  1473. is_typedef ? SYM_TYPEDEF : SYM_NORMAL,
  1474. decl, is_extern);
  1475. current_name = NULL;
  1476. }
  1477. (yyval) = (yyvsp[(3) - (3)]);
  1478. ;}
  1479. break;
  1480. case 17:
  1481. { (yyval) = NULL; ;}
  1482. break;
  1483. case 19:
  1484. { struct string_list *decl = *(yyvsp[(1) - (1)]);
  1485. *(yyvsp[(1) - (1)]) = NULL;
  1486. add_symbol(current_name,
  1487. is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
  1488. current_name = NULL;
  1489. (yyval) = (yyvsp[(1) - (1)]);
  1490. ;}
  1491. break;
  1492. case 20:
  1493. { struct string_list *decl = *(yyvsp[(3) - (3)]);
  1494. *(yyvsp[(3) - (3)]) = NULL;
  1495. free_list(*(yyvsp[(2) - (3)]), NULL);
  1496. *(yyvsp[(2) - (3)]) = decl_spec;
  1497. add_symbol(current_name,
  1498. is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
  1499. current_name = NULL;
  1500. (yyval) = (yyvsp[(3) - (3)]);
  1501. ;}
  1502. break;
  1503. case 21:
  1504. { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); ;}
  1505. break;
  1506. case 22:
  1507. { decl_spec = NULL; ;}
  1508. break;
  1509. case 24:
  1510. { decl_spec = *(yyvsp[(1) - (1)]); ;}
  1511. break;
  1512. case 25:
  1513. { decl_spec = *(yyvsp[(2) - (2)]); ;}
  1514. break;
  1515. case 26:
  1516. { /* Version 2 checksumming ignores storage class, as that
  1517. is really irrelevant to the linkage. */
  1518. remove_node((yyvsp[(1) - (1)]));
  1519. (yyval) = (yyvsp[(1) - (1)]);
  1520. ;}
  1521. break;
  1522. case 31:
  1523. { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); ;}
  1524. break;
  1525. case 32:
  1526. { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); ;}
  1527. break;
  1528. case 37:
  1529. { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); ;}
  1530. break;
  1531. case 38:
  1532. { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); ;}
  1533. break;
  1534. case 39:
  1535. { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); ;}
  1536. break;
  1537. case 40:
  1538. { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
  1539. r = copy_node(i); r->tag = SYM_STRUCT;
  1540. r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
  1541. add_symbol(i->string, SYM_STRUCT, s, is_extern);
  1542. (yyval) = (yyvsp[(3) - (3)]);
  1543. ;}
  1544. break;
  1545. case 41:
  1546. { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
  1547. r = copy_node(i); r->tag = SYM_UNION;
  1548. r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
  1549. add_symbol(i->string, SYM_UNION, s, is_extern);
  1550. (yyval) = (yyvsp[(3) - (3)]);
  1551. ;}
  1552. break;
  1553. case 42:
  1554. { struct string_list *s = *(yyvsp[(3) - (3)]), *i = *(yyvsp[(2) - (3)]), *r;
  1555. r = copy_node(i); r->tag = SYM_ENUM;
  1556. r->next = (*(yyvsp[(1) - (3)]))->next; *(yyvsp[(3) - (3)]) = r; (*(yyvsp[(1) - (3)]))->next = NULL;
  1557. add_symbol(i->string, SYM_ENUM, s, is_extern);
  1558. (yyval) = (yyvsp[(3) - (3)]);
  1559. ;}
  1560. break;
  1561. case 43:
  1562. { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); ;}
  1563. break;
  1564. case 44:
  1565. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1566. break;
  1567. case 45:
  1568. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1569. break;
  1570. case 56:
  1571. { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); ;}
  1572. break;
  1573. case 57:
  1574. { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
  1575. break;
  1576. case 58:
  1577. { (yyval) = NULL; ;}
  1578. break;
  1579. case 61:
  1580. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1581. break;
  1582. case 65:
  1583. { /* restrict has no effect in prototypes so ignore it */
  1584. remove_node((yyvsp[(1) - (1)]));
  1585. (yyval) = (yyvsp[(1) - (1)]);
  1586. ;}
  1587. break;
  1588. case 66:
  1589. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1590. break;
  1591. case 68:
  1592. { if (current_name != NULL) {
  1593. error_with_pos("unexpected second declaration name");
  1594. YYERROR;
  1595. } else {
  1596. current_name = (*(yyvsp[(1) - (1)]))->string;
  1597. (yyval) = (yyvsp[(1) - (1)]);
  1598. }
  1599. ;}
  1600. break;
  1601. case 69:
  1602. { (yyval) = (yyvsp[(4) - (4)]); ;}
  1603. break;
  1604. case 70:
  1605. { (yyval) = (yyvsp[(4) - (4)]); ;}
  1606. break;
  1607. case 71:
  1608. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1609. break;
  1610. case 72:
  1611. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1612. break;
  1613. case 73:
  1614. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1615. break;
  1616. case 74:
  1617. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1618. break;
  1619. case 78:
  1620. { (yyval) = (yyvsp[(4) - (4)]); ;}
  1621. break;
  1622. case 79:
  1623. { (yyval) = (yyvsp[(4) - (4)]); ;}
  1624. break;
  1625. case 80:
  1626. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1627. break;
  1628. case 81:
  1629. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1630. break;
  1631. case 82:
  1632. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1633. break;
  1634. case 83:
  1635. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1636. break;
  1637. case 85:
  1638. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1639. break;
  1640. case 86:
  1641. { (yyval) = NULL; ;}
  1642. break;
  1643. case 89:
  1644. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1645. break;
  1646. case 90:
  1647. { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
  1648. break;
  1649. case 91:
  1650. { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
  1651. break;
  1652. case 93:
  1653. { (yyval) = NULL; ;}
  1654. break;
  1655. case 94:
  1656. { /* For version 2 checksums, we don't want to remember
  1657. private parameter names. */
  1658. remove_node((yyvsp[(1) - (1)]));
  1659. (yyval) = (yyvsp[(1) - (1)]);
  1660. ;}
  1661. break;
  1662. case 95:
  1663. { remove_node((yyvsp[(1) - (1)]));
  1664. (yyval) = (yyvsp[(1) - (1)]);
  1665. ;}
  1666. break;
  1667. case 96:
  1668. { (yyval) = (yyvsp[(4) - (4)]); ;}
  1669. break;
  1670. case 97:
  1671. { (yyval) = (yyvsp[(4) - (4)]); ;}
  1672. break;
  1673. case 98:
  1674. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1675. break;
  1676. case 99:
  1677. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1678. break;
  1679. case 100:
  1680. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1681. break;
  1682. case 101:
  1683. { struct string_list *decl = *(yyvsp[(2) - (3)]);
  1684. *(yyvsp[(2) - (3)]) = NULL;
  1685. add_symbol(current_name, SYM_NORMAL, decl, is_extern);
  1686. (yyval) = (yyvsp[(3) - (3)]);
  1687. ;}
  1688. break;
  1689. case 102:
  1690. { (yyval) = NULL; ;}
  1691. break;
  1692. case 104:
  1693. { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); ;}
  1694. break;
  1695. case 105:
  1696. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1697. break;
  1698. case 106:
  1699. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1700. break;
  1701. case 107:
  1702. { (yyval) = NULL; ;}
  1703. break;
  1704. case 110:
  1705. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1706. break;
  1707. case 111:
  1708. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1709. break;
  1710. case 112:
  1711. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1712. break;
  1713. case 113:
  1714. { (yyval) = NULL; ;}
  1715. break;
  1716. case 116:
  1717. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1718. break;
  1719. case 117:
  1720. { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); ;}
  1721. break;
  1722. case 118:
  1723. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1724. break;
  1725. case 120:
  1726. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1727. break;
  1728. case 121:
  1729. { (yyval) = NULL; ;}
  1730. break;
  1731. case 123:
  1732. { (yyval) = (yyvsp[(3) - (3)]); ;}
  1733. break;
  1734. case 124:
  1735. { (yyval) = (yyvsp[(4) - (4)]); ;}
  1736. break;
  1737. case 127:
  1738. {
  1739. const char *name = strdup((*(yyvsp[(1) - (1)]))->string);
  1740. add_symbol(name, SYM_ENUM_CONST, NULL, 0);
  1741. ;}
  1742. break;
  1743. case 128:
  1744. {
  1745. const char *name = strdup((*(yyvsp[(1) - (3)]))->string);
  1746. struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)]));
  1747. add_symbol(name, SYM_ENUM_CONST, expr, 0);
  1748. ;}
  1749. break;
  1750. case 129:
  1751. { (yyval) = (yyvsp[(2) - (2)]); ;}
  1752. break;
  1753. case 130:
  1754. { (yyval) = NULL; ;}
  1755. break;
  1756. case 132:
  1757. { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); ;}
  1758. break;
  1759. default: break;
  1760. }
  1761. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
  1762. YYPOPSTACK (yylen);
  1763. yylen = 0;
  1764. YY_STACK_PRINT (yyss, yyssp);
  1765. *++yyvsp = yyval;
  1766. /* Now `shift' the result of the reduction. Determine what state
  1767. that goes to, based on the state we popped back to and the rule
  1768. number reduced by. */
  1769. yyn = yyr1[yyn];
  1770. yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  1771. if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1772. yystate = yytable[yystate];
  1773. else
  1774. yystate = yydefgoto[yyn - YYNTOKENS];
  1775. goto yynewstate;
  1776. /*------------------------------------.
  1777. | yyerrlab -- here on detecting error |
  1778. `------------------------------------*/
  1779. yyerrlab:
  1780. /* If not already recovering from an error, report this error. */
  1781. if (!yyerrstatus)
  1782. {
  1783. ++yynerrs;
  1784. #if ! YYERROR_VERBOSE
  1785. yyerror (YY_("syntax error"));
  1786. #else
  1787. {
  1788. YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
  1789. if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
  1790. {
  1791. YYSIZE_T yyalloc = 2 * yysize;
  1792. if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
  1793. yyalloc = YYSTACK_ALLOC_MAXIMUM;
  1794. if (yymsg != yymsgbuf)
  1795. YYSTACK_FREE (yymsg);
  1796. yymsg = (char *) YYSTACK_ALLOC (yyalloc);
  1797. if (yymsg)
  1798. yymsg_alloc = yyalloc;
  1799. else
  1800. {
  1801. yymsg = yymsgbuf;
  1802. yymsg_alloc = sizeof yymsgbuf;
  1803. }
  1804. }
  1805. if (0 < yysize && yysize <= yymsg_alloc)
  1806. {
  1807. (void) yysyntax_error (yymsg, yystate, yychar);
  1808. yyerror (yymsg);
  1809. }
  1810. else
  1811. {
  1812. yyerror (YY_("syntax error"));
  1813. if (yysize != 0)
  1814. goto yyexhaustedlab;
  1815. }
  1816. }
  1817. #endif
  1818. }
  1819. if (yyerrstatus == 3)
  1820. {
  1821. /* If just tried and failed to reuse lookahead token after an
  1822. error, discard it. */
  1823. if (yychar <= YYEOF)
  1824. {
  1825. /* Return failure if at end of input. */
  1826. if (yychar == YYEOF)
  1827. YYABORT;
  1828. }
  1829. else
  1830. {
  1831. yydestruct ("Error: discarding",
  1832. yytoken, &yylval);
  1833. yychar = YYEMPTY;
  1834. }
  1835. }
  1836. /* Else will try to reuse lookahead token after shifting the error
  1837. token. */
  1838. goto yyerrlab1;
  1839. /*---------------------------------------------------.
  1840. | yyerrorlab -- error raised explicitly by YYERROR. |
  1841. `---------------------------------------------------*/
  1842. yyerrorlab:
  1843. /* Pacify compilers like GCC when the user code never invokes
  1844. YYERROR and the label yyerrorlab therefore never appears in user
  1845. code. */
  1846. if (/*CONSTCOND*/ 0)
  1847. goto yyerrorlab;
  1848. /* Do not reclaim the symbols of the rule which action triggered
  1849. this YYERROR. */
  1850. YYPOPSTACK (yylen);
  1851. yylen = 0;
  1852. YY_STACK_PRINT (yyss, yyssp);
  1853. yystate = *yyssp;
  1854. goto yyerrlab1;
  1855. /*-------------------------------------------------------------.
  1856. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  1857. `-------------------------------------------------------------*/
  1858. yyerrlab1:
  1859. yyerrstatus = 3; /* Each real token shifted decrements this. */
  1860. for (;;)
  1861. {
  1862. yyn = yypact[yystate];
  1863. if (yyn != YYPACT_NINF)
  1864. {
  1865. yyn += YYTERROR;
  1866. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  1867. {
  1868. yyn = yytable[yyn];
  1869. if (0 < yyn)
  1870. break;
  1871. }
  1872. }
  1873. /* Pop the current state because it cannot handle the error token. */
  1874. if (yyssp == yyss)
  1875. YYABORT;
  1876. yydestruct ("Error: popping",
  1877. yystos[yystate], yyvsp);
  1878. YYPOPSTACK (1);
  1879. yystate = *yyssp;
  1880. YY_STACK_PRINT (yyss, yyssp);
  1881. }
  1882. *++yyvsp = yylval;
  1883. /* Shift the error token. */
  1884. YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
  1885. yystate = yyn;
  1886. goto yynewstate;
  1887. /*-------------------------------------.
  1888. | yyacceptlab -- YYACCEPT comes here. |
  1889. `-------------------------------------*/
  1890. yyacceptlab:
  1891. yyresult = 0;
  1892. goto yyreturn;
  1893. /*-----------------------------------.
  1894. | yyabortlab -- YYABORT comes here. |
  1895. `-----------------------------------*/
  1896. yyabortlab:
  1897. yyresult = 1;
  1898. goto yyreturn;
  1899. #if !defined(yyoverflow) || YYERROR_VERBOSE
  1900. /*-------------------------------------------------.
  1901. | yyexhaustedlab -- memory exhaustion comes here. |
  1902. `-------------------------------------------------*/
  1903. yyexhaustedlab:
  1904. yyerror (YY_("memory exhausted"));
  1905. yyresult = 2;
  1906. /* Fall through. */
  1907. #endif
  1908. yyreturn:
  1909. if (yychar != YYEMPTY)
  1910. yydestruct ("Cleanup: discarding lookahead",
  1911. yytoken, &yylval);
  1912. /* Do not reclaim the symbols of the rule which action triggered
  1913. this YYABORT or YYACCEPT. */
  1914. YYPOPSTACK (yylen);
  1915. YY_STACK_PRINT (yyss, yyssp);
  1916. while (yyssp != yyss)
  1917. {
  1918. yydestruct ("Cleanup: popping",
  1919. yystos[*yyssp], yyvsp);
  1920. YYPOPSTACK (1);
  1921. }
  1922. #ifndef yyoverflow
  1923. if (yyss != yyssa)
  1924. YYSTACK_FREE (yyss);
  1925. #endif
  1926. #if YYERROR_VERBOSE
  1927. if (yymsg != yymsgbuf)
  1928. YYSTACK_FREE (yymsg);
  1929. #endif
  1930. /* Make sure YYID is used. */
  1931. return YYID (yyresult);
  1932. }
  1933. static void
  1934. yyerror(const char *e)
  1935. {
  1936. error_with_pos("%s", e);
  1937. }