parse.tab.c_shipped 72 KB

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