parse.tab.c_shipped 73 KB

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