parse.tab.c_shipped 73 KB

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