parse.tab.c_shipped 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395
  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 522
  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 133
  381. /* YYNRULES -- Number of states. */
  382. #define YYNSTATES 187
  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, 190, 192, 194, 196,
  436. 201, 206, 209, 213, 217, 220, 222, 226, 227, 229,
  437. 231, 235, 238, 241, 243, 244, 246, 248, 253, 258,
  438. 261, 265, 269, 273, 274, 276, 279, 283, 287, 288,
  439. 290, 292, 295, 299, 302, 303, 305, 307, 311, 314,
  440. 317, 319, 322, 323, 326, 330, 335, 337, 341, 343,
  441. 347, 350, 351, 353
  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, 72, 78, -1,
  465. 79, -1, 39, -1, 43, -1, 79, 49, 80, 50,
  466. -1, 79, 49, 1, 50, -1, 79, 35, -1, 49,
  467. 78, 50, -1, 49, 1, 50, -1, 81, 38, -1,
  468. 81, -1, 82, 48, 38, -1, -1, 82, -1, 83,
  469. -1, 82, 48, 83, -1, 67, 84, -1, 72, 84,
  470. -1, 85, -1, -1, 39, -1, 43, -1, 85, 49,
  471. 80, 50, -1, 85, 49, 1, 50, -1, 85, 35,
  472. -1, 49, 84, 50, -1, 49, 1, 50, -1, 66,
  473. 76, 34, -1, -1, 88, -1, 52, 36, -1, 53,
  474. 90, 47, -1, 53, 1, 47, -1, -1, 91, -1,
  475. 92, -1, 91, 92, -1, 66, 93, 46, -1, 1,
  476. 46, -1, -1, 94, -1, 95, -1, 94, 48, 95,
  477. -1, 78, 97, -1, 39, 96, -1, 96, -1, 54,
  478. 36, -1, -1, 97, 32, -1, 53, 99, 47, -1,
  479. 53, 99, 48, 47, -1, 100, -1, 99, 48, 100,
  480. -1, 39, -1, 39, 52, 36, -1, 31, 46, -1,
  481. -1, 31, -1, 30, 49, 39, 50, 46, -1
  482. };
  483. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  484. static const yytype_uint16 yyrline[] =
  485. {
  486. 0, 125, 125, 126, 130, 130, 136, 136, 138, 138,
  487. 140, 141, 142, 143, 144, 145, 149, 163, 164, 168,
  488. 176, 189, 195, 196, 200, 201, 205, 211, 215, 216,
  489. 217, 218, 219, 223, 224, 225, 226, 230, 232, 234,
  490. 238, 240, 242, 247, 250, 251, 255, 256, 257, 258,
  491. 259, 260, 261, 262, 263, 264, 265, 266, 270, 275,
  492. 276, 280, 281, 285, 285, 285, 286, 294, 295, 299,
  493. 308, 317, 319, 321, 323, 330, 331, 335, 336, 337,
  494. 339, 341, 343, 345, 350, 351, 352, 356, 357, 361,
  495. 362, 367, 372, 374, 378, 379, 387, 391, 393, 395,
  496. 397, 399, 404, 413, 414, 419, 424, 425, 429, 430,
  497. 434, 435, 439, 441, 446, 447, 451, 452, 456, 457,
  498. 458, 462, 466, 467, 471, 472, 476, 477, 480, 485,
  499. 493, 497, 498, 502
  500. };
  501. #endif
  502. #if YYDEBUG || YYERROR_VERBOSE || 0
  503. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  504. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  505. static const char *const yytname[] =
  506. {
  507. "$end", "error", "$undefined", "ASM_KEYW", "ATTRIBUTE_KEYW",
  508. "AUTO_KEYW", "BOOL_KEYW", "CHAR_KEYW", "CONST_KEYW", "DOUBLE_KEYW",
  509. "ENUM_KEYW", "EXTERN_KEYW", "EXTENSION_KEYW", "FLOAT_KEYW",
  510. "INLINE_KEYW", "INT_KEYW", "LONG_KEYW", "REGISTER_KEYW", "RESTRICT_KEYW",
  511. "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
  512. "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
  513. "VOLATILE_KEYW", "TYPEOF_KEYW", "VA_LIST_KEYW", "EXPORT_SYMBOL_KEYW",
  514. "ASM_PHRASE", "ATTRIBUTE_PHRASE", "TYPEOF_PHRASE", "BRACE_PHRASE",
  515. "BRACKET_PHRASE", "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT",
  516. "REAL", "STRING", "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','",
  517. "'('", "')'", "'*'", "'='", "'{'", "':'", "$accept", "declaration_seq",
  518. "declaration", "$@1", "declaration1", "$@2", "$@3", "simple_declaration",
  519. "init_declarator_list_opt", "init_declarator_list", "init_declarator",
  520. "decl_specifier_seq_opt", "decl_specifier_seq", "decl_specifier",
  521. "storage_class_specifier", "type_specifier", "simple_type_specifier",
  522. "ptr_operator", "cvar_qualifier_seq_opt", "cvar_qualifier_seq",
  523. "cvar_qualifier", "declarator", "direct_declarator", "nested_declarator",
  524. "direct_nested_declarator", "parameter_declaration_clause",
  525. "parameter_declaration_list_opt", "parameter_declaration_list",
  526. "parameter_declaration", "m_abstract_declarator",
  527. "direct_m_abstract_declarator", "function_definition", "initializer_opt",
  528. "initializer", "class_body", "member_specification_opt",
  529. "member_specification", "member_declaration",
  530. "member_declarator_list_opt", "member_declarator_list",
  531. "member_declarator", "member_bitfield_declarator", "attribute_opt",
  532. "enum_body", "enumerator_list", "enumerator", "asm_definition",
  533. "asm_phrase_opt", "export_definition", YY_NULL
  534. };
  535. #endif
  536. # ifdef YYPRINT
  537. /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  538. token YYLEX-NUM. */
  539. static const yytype_uint16 yytoknum[] =
  540. {
  541. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  542. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  543. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  544. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  545. 295, 296, 297, 298, 299, 300, 59, 125, 44, 40,
  546. 41, 42, 61, 123, 58
  547. };
  548. # endif
  549. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  550. static const yytype_uint8 yyr1[] =
  551. {
  552. 0, 55, 56, 56, 58, 57, 60, 59, 61, 59,
  553. 59, 59, 59, 59, 59, 59, 62, 63, 63, 64,
  554. 64, 65, 66, 66, 67, 67, 68, 68, 69, 69,
  555. 69, 69, 69, 70, 70, 70, 70, 70, 70, 70,
  556. 70, 70, 70, 70, 70, 70, 71, 71, 71, 71,
  557. 71, 71, 71, 71, 71, 71, 71, 71, 72, 73,
  558. 73, 74, 74, 75, 75, 75, 75, 76, 76, 77,
  559. 77, 77, 77, 77, 77, 78, 78, 79, 79, 79,
  560. 79, 79, 79, 79, 80, 80, 80, 81, 81, 82,
  561. 82, 83, 84, 84, 85, 85, 85, 85, 85, 85,
  562. 85, 85, 86, 87, 87, 88, 89, 89, 90, 90,
  563. 91, 91, 92, 92, 93, 93, 94, 94, 95, 95,
  564. 95, 96, 97, 97, 98, 98, 99, 99, 100, 100,
  565. 101, 102, 102, 103
  566. };
  567. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  568. static const yytype_uint8 yyr2[] =
  569. {
  570. 0, 2, 1, 2, 0, 2, 0, 4, 0, 3,
  571. 1, 1, 1, 1, 2, 2, 3, 0, 1, 1,
  572. 3, 4, 0, 1, 1, 2, 1, 1, 1, 1,
  573. 1, 1, 1, 1, 1, 4, 1, 2, 2, 2,
  574. 3, 3, 3, 2, 2, 2, 1, 1, 1, 1,
  575. 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
  576. 1, 1, 2, 1, 1, 1, 1, 2, 1, 1,
  577. 1, 4, 4, 2, 3, 2, 1, 1, 1, 4,
  578. 4, 2, 3, 3, 2, 1, 3, 0, 1, 1,
  579. 3, 2, 2, 1, 0, 1, 1, 4, 4, 2,
  580. 3, 3, 3, 0, 1, 2, 3, 3, 0, 1,
  581. 1, 2, 3, 2, 0, 1, 1, 3, 2, 2,
  582. 1, 2, 0, 2, 3, 4, 1, 3, 1, 3,
  583. 2, 0, 1, 5
  584. };
  585. /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
  586. Performed when YYTABLE doesn't specify something else to do. Zero
  587. means the default is an error. */
  588. static const yytype_uint8 yydefact[] =
  589. {
  590. 4, 4, 2, 0, 1, 3, 0, 28, 55, 46,
  591. 63, 53, 0, 31, 0, 52, 32, 48, 49, 29,
  592. 66, 47, 50, 30, 0, 8, 0, 51, 54, 64,
  593. 0, 56, 0, 0, 65, 36, 57, 5, 10, 17,
  594. 23, 24, 26, 27, 33, 34, 11, 12, 13, 14,
  595. 15, 39, 0, 43, 6, 37, 0, 44, 22, 38,
  596. 45, 0, 0, 130, 69, 70, 0, 59, 0, 18,
  597. 19, 0, 131, 68, 25, 42, 128, 0, 126, 22,
  598. 40, 0, 114, 0, 0, 110, 9, 17, 41, 94,
  599. 0, 0, 0, 58, 60, 61, 16, 0, 67, 132,
  600. 102, 122, 73, 0, 0, 124, 0, 7, 113, 107,
  601. 77, 78, 0, 0, 0, 122, 76, 0, 115, 116,
  602. 120, 106, 0, 111, 131, 95, 57, 0, 94, 91,
  603. 93, 35, 0, 74, 62, 20, 103, 0, 0, 85,
  604. 88, 89, 129, 125, 127, 119, 0, 77, 0, 121,
  605. 75, 118, 81, 0, 112, 0, 0, 96, 0, 92,
  606. 99, 0, 133, 123, 0, 21, 104, 72, 71, 84,
  607. 0, 83, 82, 0, 0, 117, 101, 100, 0, 0,
  608. 105, 86, 90, 80, 79, 98, 97
  609. };
  610. /* YYDEFGOTO[NTERM-NUM]. */
  611. static const yytype_int16 yydefgoto[] =
  612. {
  613. -1, 1, 2, 3, 37, 79, 58, 38, 68, 69,
  614. 70, 82, 40, 41, 42, 43, 44, 71, 93, 94,
  615. 45, 124, 73, 115, 116, 138, 139, 140, 141, 129,
  616. 130, 46, 165, 166, 57, 83, 84, 85, 117, 118,
  617. 119, 120, 136, 53, 77, 78, 47, 101, 48
  618. };
  619. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  620. STATE-NUM. */
  621. #define YYPACT_NINF -94
  622. static const yytype_int16 yypact[] =
  623. {
  624. -94, 15, -94, 208, -94, -94, 34, -94, -94, -94,
  625. -94, -94, -27, -94, -5, -94, -94, -94, -94, -94,
  626. -94, -94, -94, -94, -25, -94, -16, -94, -94, -94,
  627. -4, -94, 19, -24, -94, -94, -94, -94, -94, 24,
  628. 479, -94, -94, -94, -94, -94, -94, -94, -94, -94,
  629. -94, 29, 48, -94, -94, 37, 106, -94, 479, 37,
  630. -94, 479, 54, -94, -94, -94, 24, -2, 49, 53,
  631. -94, 24, -14, -11, -94, -94, 47, 38, -94, 479,
  632. -94, 51, 23, 55, 157, -94, -94, 24, -94, 393,
  633. 56, 58, 68, -94, -2, -94, -94, 24, -94, -94,
  634. -94, -94, -94, 255, 67, -94, 5, -94, -94, -94,
  635. 50, -94, 7, 69, 40, -94, -8, 83, 88, -94,
  636. -94, -94, 91, -94, 109, -94, -94, 4, 45, -94,
  637. 16, -94, 95, -94, -94, -94, -23, 92, 93, 108,
  638. 96, -94, -94, -94, -94, -94, 97, -94, 98, -94,
  639. -94, 118, -94, 301, -94, 23, 101, -94, 104, -94,
  640. -94, 347, -94, -94, 120, -94, -94, -94, -94, -94,
  641. 440, -94, -94, 111, 119, -94, -94, -94, 130, 137,
  642. -94, -94, -94, -94, -94, -94, -94
  643. };
  644. /* YYPGOTO[NTERM-NUM]. */
  645. static const yytype_int16 yypgoto[] =
  646. {
  647. -94, -94, 158, -94, -94, -94, -94, -45, -94, -94,
  648. 94, -1, -61, -29, -94, -94, -94, -79, -94, -94,
  649. -63, -7, -94, -93, -94, -92, -94, -94, -60, -57,
  650. -94, -94, -94, -94, -19, -94, -94, 110, -94, -94,
  651. 33, 82, 78, 144, -94, 99, -94, -94, -94
  652. };
  653. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  654. positive, shift that token. If negative, reduce the rule which
  655. number is the opposite. If YYTABLE_NINF, syntax error. */
  656. #define YYTABLE_NINF -110
  657. static const yytype_int16 yytable[] =
  658. {
  659. 89, 90, 39, 114, 95, 156, 10, 60, 146, 163,
  660. 128, 74, 51, 86, 55, 4, 20, 99, 54, 148,
  661. 100, 150, 63, 59, 102, 29, 52, 152, 56, 164,
  662. 34, 134, 72, 114, 107, 114, 80, 56, 103, -94,
  663. 88, 153, 89, 125, 76, 61, 147, 157, 128, 128,
  664. 111, 160, 143, 127, -94, 67, 112, 87, 67, 92,
  665. 74, 174, 110, 64, 98, 161, 111, 65, 62, 179,
  666. 158, 159, 112, 66, 67, 67, 114, 113, 87, 147,
  667. 49, 50, 52, 111, 125, 105, 106, 76, 157, 112,
  668. 56, 67, 89, 91, 127, 96, 67, 108, 109, 104,
  669. 89, 97, 121, 142, 113, 149, 131, 81, 132, 89,
  670. 182, 7, 8, 9, 10, 11, 12, 13, 133, 15,
  671. 16, 17, 18, 19, 20, 21, 22, 23, 24, 154,
  672. 26, 27, 28, 29, 30, 31, 155, 108, 34, 35,
  673. 99, 162, 167, 168, 170, -22, 169, 171, 172, 36,
  674. 163, 176, -22, -108, 177, -22, 180, -22, 122, 5,
  675. -22, 183, 7, 8, 9, 10, 11, 12, 13, 184,
  676. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  677. 185, 26, 27, 28, 29, 30, 31, 186, 175, 34,
  678. 35, 135, 145, 151, 123, 75, -22, 0, 0, 0,
  679. 36, 0, 0, -22, -109, 144, -22, 0, -22, 6,
  680. 0, -22, 0, 7, 8, 9, 10, 11, 12, 13,
  681. 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
  682. 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
  683. 34, 35, 0, 0, 0, 0, 0, -22, 0, 0,
  684. 0, 36, 0, 0, -22, 0, 137, -22, 0, -22,
  685. 7, 8, 9, 10, 11, 12, 13, 0, 15, 16,
  686. 17, 18, 19, 20, 21, 22, 23, 24, 0, 26,
  687. 27, 28, 29, 30, 31, 0, 0, 34, 35, 0,
  688. 0, 0, 0, -87, 0, 0, 0, 0, 36, 0,
  689. 0, 0, 173, 0, 0, -87, 7, 8, 9, 10,
  690. 11, 12, 13, 0, 15, 16, 17, 18, 19, 20,
  691. 21, 22, 23, 24, 0, 26, 27, 28, 29, 30,
  692. 31, 0, 0, 34, 35, 0, 0, 0, 0, -87,
  693. 0, 0, 0, 0, 36, 0, 0, 0, 178, 0,
  694. 0, -87, 7, 8, 9, 10, 11, 12, 13, 0,
  695. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  696. 0, 26, 27, 28, 29, 30, 31, 0, 0, 34,
  697. 35, 0, 0, 0, 0, -87, 0, 0, 0, 0,
  698. 36, 0, 0, 0, 0, 0, 0, -87, 7, 8,
  699. 9, 10, 11, 12, 13, 0, 15, 16, 17, 18,
  700. 19, 20, 21, 22, 23, 24, 0, 26, 27, 28,
  701. 29, 30, 31, 0, 0, 34, 35, 0, 0, 0,
  702. 0, 0, 125, 0, 0, 0, 126, 0, 0, 0,
  703. 0, 0, 127, 0, 67, 7, 8, 9, 10, 11,
  704. 12, 13, 0, 15, 16, 17, 18, 19, 20, 21,
  705. 22, 23, 24, 0, 26, 27, 28, 29, 30, 31,
  706. 0, 0, 34, 35, 0, 0, 0, 0, 181, 0,
  707. 0, 0, 0, 36, 7, 8, 9, 10, 11, 12,
  708. 13, 0, 15, 16, 17, 18, 19, 20, 21, 22,
  709. 23, 24, 0, 26, 27, 28, 29, 30, 31, 0,
  710. 0, 34, 35, 0, 0, 0, 0, 0, 0, 0,
  711. 0, 0, 36
  712. };
  713. #define yypact_value_is_default(Yystate) \
  714. (!!((Yystate) == (-94)))
  715. #define yytable_value_is_error(Yytable_value) \
  716. YYID (0)
  717. static const yytype_int16 yycheck[] =
  718. {
  719. 61, 61, 3, 82, 67, 1, 8, 26, 1, 32,
  720. 89, 40, 39, 58, 39, 0, 18, 31, 23, 112,
  721. 34, 114, 46, 39, 35, 27, 53, 35, 53, 52,
  722. 32, 94, 39, 112, 79, 114, 55, 53, 49, 35,
  723. 59, 49, 103, 39, 39, 49, 39, 43, 127, 128,
  724. 43, 35, 47, 49, 50, 51, 49, 58, 51, 66,
  725. 89, 153, 39, 39, 71, 49, 43, 43, 49, 161,
  726. 127, 128, 49, 49, 51, 51, 155, 54, 79, 39,
  727. 46, 47, 53, 43, 39, 47, 48, 39, 43, 49,
  728. 53, 51, 153, 39, 49, 46, 51, 46, 47, 52,
  729. 161, 48, 47, 36, 54, 36, 50, 1, 50, 170,
  730. 170, 5, 6, 7, 8, 9, 10, 11, 50, 13,
  731. 14, 15, 16, 17, 18, 19, 20, 21, 22, 46,
  732. 24, 25, 26, 27, 28, 29, 48, 46, 32, 33,
  733. 31, 46, 50, 50, 48, 39, 38, 50, 50, 43,
  734. 32, 50, 46, 47, 50, 49, 36, 51, 1, 1,
  735. 54, 50, 5, 6, 7, 8, 9, 10, 11, 50,
  736. 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
  737. 50, 24, 25, 26, 27, 28, 29, 50, 155, 32,
  738. 33, 97, 110, 115, 84, 51, 39, -1, -1, -1,
  739. 43, -1, -1, 46, 47, 106, 49, -1, 51, 1,
  740. -1, 54, -1, 5, 6, 7, 8, 9, 10, 11,
  741. 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
  742. 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  743. 32, 33, -1, -1, -1, -1, -1, 39, -1, -1,
  744. -1, 43, -1, -1, 46, -1, 1, 49, -1, 51,
  745. 5, 6, 7, 8, 9, 10, 11, -1, 13, 14,
  746. 15, 16, 17, 18, 19, 20, 21, 22, -1, 24,
  747. 25, 26, 27, 28, 29, -1, -1, 32, 33, -1,
  748. -1, -1, -1, 38, -1, -1, -1, -1, 43, -1,
  749. -1, -1, 1, -1, -1, 50, 5, 6, 7, 8,
  750. 9, 10, 11, -1, 13, 14, 15, 16, 17, 18,
  751. 19, 20, 21, 22, -1, 24, 25, 26, 27, 28,
  752. 29, -1, -1, 32, 33, -1, -1, -1, -1, 38,
  753. -1, -1, -1, -1, 43, -1, -1, -1, 1, -1,
  754. -1, 50, 5, 6, 7, 8, 9, 10, 11, -1,
  755. 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
  756. -1, 24, 25, 26, 27, 28, 29, -1, -1, 32,
  757. 33, -1, -1, -1, -1, 38, -1, -1, -1, -1,
  758. 43, -1, -1, -1, -1, -1, -1, 50, 5, 6,
  759. 7, 8, 9, 10, 11, -1, 13, 14, 15, 16,
  760. 17, 18, 19, 20, 21, 22, -1, 24, 25, 26,
  761. 27, 28, 29, -1, -1, 32, 33, -1, -1, -1,
  762. -1, -1, 39, -1, -1, -1, 43, -1, -1, -1,
  763. -1, -1, 49, -1, 51, 5, 6, 7, 8, 9,
  764. 10, 11, -1, 13, 14, 15, 16, 17, 18, 19,
  765. 20, 21, 22, -1, 24, 25, 26, 27, 28, 29,
  766. -1, -1, 32, 33, -1, -1, -1, -1, 38, -1,
  767. -1, -1, -1, 43, 5, 6, 7, 8, 9, 10,
  768. 11, -1, 13, 14, 15, 16, 17, 18, 19, 20,
  769. 21, 22, -1, 24, 25, 26, 27, 28, 29, -1,
  770. -1, 32, 33, -1, -1, -1, -1, -1, -1, -1,
  771. -1, -1, 43
  772. };
  773. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  774. symbol of state STATE-NUM. */
  775. static const yytype_uint8 yystos[] =
  776. {
  777. 0, 56, 57, 58, 0, 57, 1, 5, 6, 7,
  778. 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
  779. 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
  780. 28, 29, 30, 31, 32, 33, 43, 59, 62, 66,
  781. 67, 68, 69, 70, 71, 75, 86, 101, 103, 46,
  782. 47, 39, 53, 98, 23, 39, 53, 89, 61, 39,
  783. 89, 49, 49, 46, 39, 43, 49, 51, 63, 64,
  784. 65, 72, 76, 77, 68, 98, 39, 99, 100, 60,
  785. 89, 1, 66, 90, 91, 92, 62, 66, 89, 67,
  786. 83, 39, 76, 73, 74, 75, 46, 48, 76, 31,
  787. 34, 102, 35, 49, 52, 47, 48, 62, 46, 47,
  788. 39, 43, 49, 54, 72, 78, 79, 93, 94, 95,
  789. 96, 47, 1, 92, 76, 39, 43, 49, 72, 84,
  790. 85, 50, 50, 50, 75, 65, 97, 1, 80, 81,
  791. 82, 83, 36, 47, 100, 96, 1, 39, 78, 36,
  792. 78, 97, 35, 49, 46, 48, 1, 43, 84, 84,
  793. 35, 49, 46, 32, 52, 87, 88, 50, 50, 38,
  794. 48, 50, 50, 1, 80, 95, 50, 50, 1, 80,
  795. 36, 38, 83, 50, 50, 50, 50
  796. };
  797. #define yyerrok (yyerrstatus = 0)
  798. #define yyclearin (yychar = YYEMPTY)
  799. #define YYEMPTY (-2)
  800. #define YYEOF 0
  801. #define YYACCEPT goto yyacceptlab
  802. #define YYABORT goto yyabortlab
  803. #define YYERROR goto yyerrorlab
  804. /* Like YYERROR except do call yyerror. This remains here temporarily
  805. to ease the transition to the new meaning of YYERROR, for GCC.
  806. Once GCC version 2 has supplanted version 1, this can go. However,
  807. YYFAIL appears to be in use. Nevertheless, it is formally deprecated
  808. in Bison 2.4.2's NEWS entry, where a plan to phase it out is
  809. discussed. */
  810. #define YYFAIL goto yyerrlab
  811. #if defined YYFAIL
  812. /* This is here to suppress warnings from the GCC cpp's
  813. -Wunused-macros. Normally we don't worry about that warning, but
  814. some users do, and we want to make it easy for users to remove
  815. YYFAIL uses, which will produce warnings from Bison 2.5. */
  816. #endif
  817. #define YYRECOVERING() (!!yyerrstatus)
  818. #define YYBACKUP(Token, Value) \
  819. do \
  820. if (yychar == YYEMPTY) \
  821. { \
  822. yychar = (Token); \
  823. yylval = (Value); \
  824. YYPOPSTACK (yylen); \
  825. yystate = *yyssp; \
  826. goto yybackup; \
  827. } \
  828. else \
  829. { \
  830. yyerror (YY_("syntax error: cannot back up")); \
  831. YYERROR; \
  832. } \
  833. while (YYID (0))
  834. /* Error token number */
  835. #define YYTERROR 1
  836. #define YYERRCODE 256
  837. /* This macro is provided for backward compatibility. */
  838. #ifndef YY_LOCATION_PRINT
  839. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  840. #endif
  841. /* YYLEX -- calling `yylex' with the right arguments. */
  842. #ifdef YYLEX_PARAM
  843. # define YYLEX yylex (YYLEX_PARAM)
  844. #else
  845. # define YYLEX yylex ()
  846. #endif
  847. /* Enable debugging if requested. */
  848. #if YYDEBUG
  849. # ifndef YYFPRINTF
  850. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  851. # define YYFPRINTF fprintf
  852. # endif
  853. # define YYDPRINTF(Args) \
  854. do { \
  855. if (yydebug) \
  856. YYFPRINTF Args; \
  857. } while (YYID (0))
  858. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  859. do { \
  860. if (yydebug) \
  861. { \
  862. YYFPRINTF (stderr, "%s ", Title); \
  863. yy_symbol_print (stderr, \
  864. Type, Value); \
  865. YYFPRINTF (stderr, "\n"); \
  866. } \
  867. } while (YYID (0))
  868. /*--------------------------------.
  869. | Print this symbol on YYOUTPUT. |
  870. `--------------------------------*/
  871. /*ARGSUSED*/
  872. #if (defined __STDC__ || defined __C99__FUNC__ \
  873. || defined __cplusplus || defined _MSC_VER)
  874. static void
  875. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
  876. #else
  877. static void
  878. yy_symbol_value_print (yyoutput, yytype, yyvaluep)
  879. FILE *yyoutput;
  880. int yytype;
  881. YYSTYPE const * const yyvaluep;
  882. #endif
  883. {
  884. FILE *yyo = yyoutput;
  885. YYUSE (yyo);
  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 (YY_NULL, yytname[yytoken]);
  1107. YYSIZE_T yysize = yysize0;
  1108. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  1109. /* Internationalized format string. */
  1110. const char *yyformat = YY_NULL;
  1111. /* Arguments of yyformat. */
  1112. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  1113. /* Number of reported tokens (one for the "unexpected", one per
  1114. "expected"). */
  1115. int yycount = 0;
  1116. /* There are many possibilities here to consider:
  1117. - Assume YYFAIL is not used. It's too flawed to consider. See
  1118. <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
  1119. for details. YYERROR is fine as it does not invoke this
  1120. function.
  1121. - If this state is a consistent state with a default action, then
  1122. the only way this function was invoked is if the default action
  1123. is an error action. In that case, don't check for expected
  1124. tokens because there are none.
  1125. - The only way there can be no lookahead present (in yychar) is if
  1126. this state is a consistent state with a default action. Thus,
  1127. detecting the absence of a lookahead is sufficient to determine
  1128. that there is no unexpected or expected token to report. In that
  1129. case, just report a simple "syntax error".
  1130. - Don't assume there isn't a lookahead just because this state is a
  1131. consistent state with a default action. There might have been a
  1132. previous inconsistent state, consistent state with a non-default
  1133. action, or user semantic action that manipulated yychar.
  1134. - Of course, the expected token list depends on states to have
  1135. correct lookahead information, and it depends on the parser not
  1136. to perform extra reductions after fetching a lookahead from the
  1137. scanner and before detecting a syntax error. Thus, state merging
  1138. (from LALR or IELR) and default reductions corrupt the expected
  1139. token list. However, the list is correct for canonical LR with
  1140. one exception: it will still contain any token that will not be
  1141. accepted due to an error action in a later state.
  1142. */
  1143. if (yytoken != YYEMPTY)
  1144. {
  1145. int yyn = yypact[*yyssp];
  1146. yyarg[yycount++] = yytname[yytoken];
  1147. if (!yypact_value_is_default (yyn))
  1148. {
  1149. /* Start YYX at -YYN if negative to avoid negative indexes in
  1150. YYCHECK. In other words, skip the first -YYN actions for
  1151. this state because they are default actions. */
  1152. int yyxbegin = yyn < 0 ? -yyn : 0;
  1153. /* Stay within bounds of both yycheck and yytname. */
  1154. int yychecklim = YYLAST - yyn + 1;
  1155. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  1156. int yyx;
  1157. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  1158. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
  1159. && !yytable_value_is_error (yytable[yyx + yyn]))
  1160. {
  1161. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  1162. {
  1163. yycount = 1;
  1164. yysize = yysize0;
  1165. break;
  1166. }
  1167. yyarg[yycount++] = yytname[yyx];
  1168. {
  1169. YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
  1170. if (! (yysize <= yysize1
  1171. && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  1172. return 2;
  1173. yysize = yysize1;
  1174. }
  1175. }
  1176. }
  1177. }
  1178. switch (yycount)
  1179. {
  1180. # define YYCASE_(N, S) \
  1181. case N: \
  1182. yyformat = S; \
  1183. break
  1184. YYCASE_(0, YY_("syntax error"));
  1185. YYCASE_(1, YY_("syntax error, unexpected %s"));
  1186. YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
  1187. YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
  1188. YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
  1189. YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
  1190. # undef YYCASE_
  1191. }
  1192. {
  1193. YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
  1194. if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  1195. return 2;
  1196. yysize = yysize1;
  1197. }
  1198. if (*yymsg_alloc < yysize)
  1199. {
  1200. *yymsg_alloc = 2 * yysize;
  1201. if (! (yysize <= *yymsg_alloc
  1202. && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
  1203. *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
  1204. return 1;
  1205. }
  1206. /* Avoid sprintf, as that infringes on the user's name space.
  1207. Don't have undefined behavior even if the translation
  1208. produced a string with the wrong number of "%s"s. */
  1209. {
  1210. char *yyp = *yymsg;
  1211. int yyi = 0;
  1212. while ((*yyp = *yyformat) != '\0')
  1213. if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
  1214. {
  1215. yyp += yytnamerr (yyp, yyarg[yyi++]);
  1216. yyformat += 2;
  1217. }
  1218. else
  1219. {
  1220. yyp++;
  1221. yyformat++;
  1222. }
  1223. }
  1224. return 0;
  1225. }
  1226. #endif /* YYERROR_VERBOSE */
  1227. /*-----------------------------------------------.
  1228. | Release the memory associated to this symbol. |
  1229. `-----------------------------------------------*/
  1230. /*ARGSUSED*/
  1231. #if (defined __STDC__ || defined __C99__FUNC__ \
  1232. || defined __cplusplus || defined _MSC_VER)
  1233. static void
  1234. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
  1235. #else
  1236. static void
  1237. yydestruct (yymsg, yytype, yyvaluep)
  1238. const char *yymsg;
  1239. int yytype;
  1240. YYSTYPE *yyvaluep;
  1241. #endif
  1242. {
  1243. YYUSE (yyvaluep);
  1244. if (!yymsg)
  1245. yymsg = "Deleting";
  1246. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  1247. switch (yytype)
  1248. {
  1249. default:
  1250. break;
  1251. }
  1252. }
  1253. /* The lookahead symbol. */
  1254. int yychar;
  1255. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1256. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1257. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  1258. #endif
  1259. #ifndef YY_INITIAL_VALUE
  1260. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  1261. #endif
  1262. /* The semantic value of the lookahead symbol. */
  1263. YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
  1264. /* Number of syntax errors so far. */
  1265. int yynerrs;
  1266. /*----------.
  1267. | yyparse. |
  1268. `----------*/
  1269. #ifdef YYPARSE_PARAM
  1270. #if (defined __STDC__ || defined __C99__FUNC__ \
  1271. || defined __cplusplus || defined _MSC_VER)
  1272. int
  1273. yyparse (void *YYPARSE_PARAM)
  1274. #else
  1275. int
  1276. yyparse (YYPARSE_PARAM)
  1277. void *YYPARSE_PARAM;
  1278. #endif
  1279. #else /* ! YYPARSE_PARAM */
  1280. #if (defined __STDC__ || defined __C99__FUNC__ \
  1281. || defined __cplusplus || defined _MSC_VER)
  1282. int
  1283. yyparse (void)
  1284. #else
  1285. int
  1286. yyparse ()
  1287. #endif
  1288. #endif
  1289. {
  1290. int yystate;
  1291. /* Number of tokens to shift before error messages enabled. */
  1292. int yyerrstatus;
  1293. /* The stacks and their tools:
  1294. `yyss': related to states.
  1295. `yyvs': related to semantic values.
  1296. Refer to the stacks through separate pointers, to allow yyoverflow
  1297. to reallocate them elsewhere. */
  1298. /* The state stack. */
  1299. yytype_int16 yyssa[YYINITDEPTH];
  1300. yytype_int16 *yyss;
  1301. yytype_int16 *yyssp;
  1302. /* The semantic value stack. */
  1303. YYSTYPE yyvsa[YYINITDEPTH];
  1304. YYSTYPE *yyvs;
  1305. YYSTYPE *yyvsp;
  1306. YYSIZE_T yystacksize;
  1307. int yyn;
  1308. int yyresult;
  1309. /* Lookahead token as an internal (translated) token number. */
  1310. int yytoken = 0;
  1311. /* The variables used to return semantic value and location from the
  1312. action routines. */
  1313. YYSTYPE yyval;
  1314. #if YYERROR_VERBOSE
  1315. /* Buffer for error messages, and its allocated size. */
  1316. char yymsgbuf[128];
  1317. char *yymsg = yymsgbuf;
  1318. YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
  1319. #endif
  1320. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
  1321. /* The number of symbols on the RHS of the reduced rule.
  1322. Keep to zero when no symbol should be popped. */
  1323. int yylen = 0;
  1324. yyssp = yyss = yyssa;
  1325. yyvsp = yyvs = yyvsa;
  1326. yystacksize = YYINITDEPTH;
  1327. YYDPRINTF ((stderr, "Starting parse\n"));
  1328. yystate = 0;
  1329. yyerrstatus = 0;
  1330. yynerrs = 0;
  1331. yychar = YYEMPTY; /* Cause a token to be read. */
  1332. goto yysetstate;
  1333. /*------------------------------------------------------------.
  1334. | yynewstate -- Push a new state, which is found in yystate. |
  1335. `------------------------------------------------------------*/
  1336. yynewstate:
  1337. /* In all cases, when you get here, the value and location stacks
  1338. have just been pushed. So pushing a state here evens the stacks. */
  1339. yyssp++;
  1340. yysetstate:
  1341. *yyssp = yystate;
  1342. if (yyss + yystacksize - 1 <= yyssp)
  1343. {
  1344. /* Get the current used size of the three stacks, in elements. */
  1345. YYSIZE_T yysize = yyssp - yyss + 1;
  1346. #ifdef yyoverflow
  1347. {
  1348. /* Give user a chance to reallocate the stack. Use copies of
  1349. these so that the &'s don't force the real ones into
  1350. memory. */
  1351. YYSTYPE *yyvs1 = yyvs;
  1352. yytype_int16 *yyss1 = yyss;
  1353. /* Each stack pointer address is followed by the size of the
  1354. data in use in that stack, in bytes. This used to be a
  1355. conditional around just the two extra args, but that might
  1356. be undefined if yyoverflow is a macro. */
  1357. yyoverflow (YY_("memory exhausted"),
  1358. &yyss1, yysize * sizeof (*yyssp),
  1359. &yyvs1, yysize * sizeof (*yyvsp),
  1360. &yystacksize);
  1361. yyss = yyss1;
  1362. yyvs = yyvs1;
  1363. }
  1364. #else /* no yyoverflow */
  1365. # ifndef YYSTACK_RELOCATE
  1366. goto yyexhaustedlab;
  1367. # else
  1368. /* Extend the stack our own way. */
  1369. if (YYMAXDEPTH <= yystacksize)
  1370. goto yyexhaustedlab;
  1371. yystacksize *= 2;
  1372. if (YYMAXDEPTH < yystacksize)
  1373. yystacksize = YYMAXDEPTH;
  1374. {
  1375. yytype_int16 *yyss1 = yyss;
  1376. union yyalloc *yyptr =
  1377. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  1378. if (! yyptr)
  1379. goto yyexhaustedlab;
  1380. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1381. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1382. # undef YYSTACK_RELOCATE
  1383. if (yyss1 != yyssa)
  1384. YYSTACK_FREE (yyss1);
  1385. }
  1386. # endif
  1387. #endif /* no yyoverflow */
  1388. yyssp = yyss + yysize - 1;
  1389. yyvsp = yyvs + yysize - 1;
  1390. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  1391. (unsigned long int) yystacksize));
  1392. if (yyss + yystacksize - 1 <= yyssp)
  1393. YYABORT;
  1394. }
  1395. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1396. if (yystate == YYFINAL)
  1397. YYACCEPT;
  1398. goto yybackup;
  1399. /*-----------.
  1400. | yybackup. |
  1401. `-----------*/
  1402. yybackup:
  1403. /* Do appropriate processing given the current state. Read a
  1404. lookahead token if we need one and don't already have one. */
  1405. /* First try to decide what to do without reference to lookahead token. */
  1406. yyn = yypact[yystate];
  1407. if (yypact_value_is_default (yyn))
  1408. goto yydefault;
  1409. /* Not known => get a lookahead token if don't already have one. */
  1410. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  1411. if (yychar == YYEMPTY)
  1412. {
  1413. YYDPRINTF ((stderr, "Reading a token: "));
  1414. yychar = YYLEX;
  1415. }
  1416. if (yychar <= YYEOF)
  1417. {
  1418. yychar = yytoken = YYEOF;
  1419. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1420. }
  1421. else
  1422. {
  1423. yytoken = YYTRANSLATE (yychar);
  1424. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1425. }
  1426. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1427. detect an error, take that action. */
  1428. yyn += yytoken;
  1429. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1430. goto yydefault;
  1431. yyn = yytable[yyn];
  1432. if (yyn <= 0)
  1433. {
  1434. if (yytable_value_is_error (yyn))
  1435. goto yyerrlab;
  1436. yyn = -yyn;
  1437. goto yyreduce;
  1438. }
  1439. /* Count tokens shifted since error; after three, turn off error
  1440. status. */
  1441. if (yyerrstatus)
  1442. yyerrstatus--;
  1443. /* Shift the lookahead token. */
  1444. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1445. /* Discard the shifted token. */
  1446. yychar = YYEMPTY;
  1447. yystate = yyn;
  1448. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1449. *++yyvsp = yylval;
  1450. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1451. goto yynewstate;
  1452. /*-----------------------------------------------------------.
  1453. | yydefault -- do the default action for the current state. |
  1454. `-----------------------------------------------------------*/
  1455. yydefault:
  1456. yyn = yydefact[yystate];
  1457. if (yyn == 0)
  1458. goto yyerrlab;
  1459. goto yyreduce;
  1460. /*-----------------------------.
  1461. | yyreduce -- Do a reduction. |
  1462. `-----------------------------*/
  1463. yyreduce:
  1464. /* yyn is the number of a rule to reduce with. */
  1465. yylen = yyr2[yyn];
  1466. /* If YYLEN is nonzero, implement the default value of the action:
  1467. `$$ = $1'.
  1468. Otherwise, the following line sets YYVAL to garbage.
  1469. This behavior is undocumented and Bison
  1470. users should not rely upon it. Assigning to YYVAL
  1471. unconditionally makes the parser a bit smaller, and it avoids a
  1472. GCC warning that YYVAL may be used uninitialized. */
  1473. yyval = yyvsp[1-yylen];
  1474. YY_REDUCE_PRINT (yyn);
  1475. switch (yyn)
  1476. {
  1477. case 4:
  1478. { is_typedef = 0; is_extern = 0; current_name = NULL; decl_spec = NULL; }
  1479. break;
  1480. case 5:
  1481. { free_list(*(yyvsp[(2) - (2)]), NULL); *(yyvsp[(2) - (2)]) = NULL; }
  1482. break;
  1483. case 6:
  1484. { is_typedef = 1; }
  1485. break;
  1486. case 7:
  1487. { (yyval) = (yyvsp[(4) - (4)]); }
  1488. break;
  1489. case 8:
  1490. { is_typedef = 1; }
  1491. break;
  1492. case 9:
  1493. { (yyval) = (yyvsp[(3) - (3)]); }
  1494. break;
  1495. case 14:
  1496. { (yyval) = (yyvsp[(2) - (2)]); }
  1497. break;
  1498. case 15:
  1499. { (yyval) = (yyvsp[(2) - (2)]); }
  1500. break;
  1501. case 16:
  1502. { if (current_name) {
  1503. struct string_list *decl = (*(yyvsp[(3) - (3)]))->next;
  1504. (*(yyvsp[(3) - (3)]))->next = NULL;
  1505. add_symbol(current_name,
  1506. is_typedef ? SYM_TYPEDEF : SYM_NORMAL,
  1507. decl, is_extern);
  1508. current_name = NULL;
  1509. }
  1510. (yyval) = (yyvsp[(3) - (3)]);
  1511. }
  1512. break;
  1513. case 17:
  1514. { (yyval) = NULL; }
  1515. break;
  1516. case 19:
  1517. { struct string_list *decl = *(yyvsp[(1) - (1)]);
  1518. *(yyvsp[(1) - (1)]) = NULL;
  1519. add_symbol(current_name,
  1520. is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
  1521. current_name = NULL;
  1522. (yyval) = (yyvsp[(1) - (1)]);
  1523. }
  1524. break;
  1525. case 20:
  1526. { struct string_list *decl = *(yyvsp[(3) - (3)]);
  1527. *(yyvsp[(3) - (3)]) = NULL;
  1528. free_list(*(yyvsp[(2) - (3)]), NULL);
  1529. *(yyvsp[(2) - (3)]) = decl_spec;
  1530. add_symbol(current_name,
  1531. is_typedef ? SYM_TYPEDEF : SYM_NORMAL, decl, is_extern);
  1532. current_name = NULL;
  1533. (yyval) = (yyvsp[(3) - (3)]);
  1534. }
  1535. break;
  1536. case 21:
  1537. { (yyval) = (yyvsp[(4) - (4)]) ? (yyvsp[(4) - (4)]) : (yyvsp[(3) - (4)]) ? (yyvsp[(3) - (4)]) : (yyvsp[(2) - (4)]) ? (yyvsp[(2) - (4)]) : (yyvsp[(1) - (4)]); }
  1538. break;
  1539. case 22:
  1540. { decl_spec = NULL; }
  1541. break;
  1542. case 24:
  1543. { decl_spec = *(yyvsp[(1) - (1)]); }
  1544. break;
  1545. case 25:
  1546. { decl_spec = *(yyvsp[(2) - (2)]); }
  1547. break;
  1548. case 26:
  1549. { /* Version 2 checksumming ignores storage class, as that
  1550. is really irrelevant to the linkage. */
  1551. remove_node((yyvsp[(1) - (1)]));
  1552. (yyval) = (yyvsp[(1) - (1)]);
  1553. }
  1554. break;
  1555. case 31:
  1556. { is_extern = 1; (yyval) = (yyvsp[(1) - (1)]); }
  1557. break;
  1558. case 32:
  1559. { is_extern = 0; (yyval) = (yyvsp[(1) - (1)]); }
  1560. break;
  1561. case 37:
  1562. { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_STRUCT; (yyval) = (yyvsp[(2) - (2)]); }
  1563. break;
  1564. case 38:
  1565. { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_UNION; (yyval) = (yyvsp[(2) - (2)]); }
  1566. break;
  1567. case 39:
  1568. { remove_node((yyvsp[(1) - (2)])); (*(yyvsp[(2) - (2)]))->tag = SYM_ENUM; (yyval) = (yyvsp[(2) - (2)]); }
  1569. break;
  1570. case 40:
  1571. { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_STRUCT); (yyval) = (yyvsp[(3) - (3)]); }
  1572. break;
  1573. case 41:
  1574. { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_UNION); (yyval) = (yyvsp[(3) - (3)]); }
  1575. break;
  1576. case 42:
  1577. { record_compound((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), SYM_ENUM); (yyval) = (yyvsp[(3) - (3)]); }
  1578. break;
  1579. case 43:
  1580. { add_symbol(NULL, SYM_ENUM, NULL, 0); (yyval) = (yyvsp[(2) - (2)]); }
  1581. break;
  1582. case 44:
  1583. { (yyval) = (yyvsp[(2) - (2)]); }
  1584. break;
  1585. case 45:
  1586. { (yyval) = (yyvsp[(2) - (2)]); }
  1587. break;
  1588. case 57:
  1589. { (*(yyvsp[(1) - (1)]))->tag = SYM_TYPEDEF; (yyval) = (yyvsp[(1) - (1)]); }
  1590. break;
  1591. case 58:
  1592. { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
  1593. break;
  1594. case 59:
  1595. { (yyval) = NULL; }
  1596. break;
  1597. case 62:
  1598. { (yyval) = (yyvsp[(2) - (2)]); }
  1599. break;
  1600. case 66:
  1601. { /* restrict has no effect in prototypes so ignore it */
  1602. remove_node((yyvsp[(1) - (1)]));
  1603. (yyval) = (yyvsp[(1) - (1)]);
  1604. }
  1605. break;
  1606. case 67:
  1607. { (yyval) = (yyvsp[(2) - (2)]); }
  1608. break;
  1609. case 69:
  1610. { if (current_name != NULL) {
  1611. error_with_pos("unexpected second declaration name");
  1612. YYERROR;
  1613. } else {
  1614. current_name = (*(yyvsp[(1) - (1)]))->string;
  1615. (yyval) = (yyvsp[(1) - (1)]);
  1616. }
  1617. }
  1618. break;
  1619. case 70:
  1620. { if (current_name != NULL) {
  1621. error_with_pos("unexpected second declaration name");
  1622. YYERROR;
  1623. } else {
  1624. current_name = (*(yyvsp[(1) - (1)]))->string;
  1625. (yyval) = (yyvsp[(1) - (1)]);
  1626. }
  1627. }
  1628. break;
  1629. case 71:
  1630. { (yyval) = (yyvsp[(4) - (4)]); }
  1631. break;
  1632. case 72:
  1633. { (yyval) = (yyvsp[(4) - (4)]); }
  1634. break;
  1635. case 73:
  1636. { (yyval) = (yyvsp[(2) - (2)]); }
  1637. break;
  1638. case 74:
  1639. { (yyval) = (yyvsp[(3) - (3)]); }
  1640. break;
  1641. case 75:
  1642. { (yyval) = (yyvsp[(2) - (2)]); }
  1643. break;
  1644. case 79:
  1645. { (yyval) = (yyvsp[(4) - (4)]); }
  1646. break;
  1647. case 80:
  1648. { (yyval) = (yyvsp[(4) - (4)]); }
  1649. break;
  1650. case 81:
  1651. { (yyval) = (yyvsp[(2) - (2)]); }
  1652. break;
  1653. case 82:
  1654. { (yyval) = (yyvsp[(3) - (3)]); }
  1655. break;
  1656. case 83:
  1657. { (yyval) = (yyvsp[(3) - (3)]); }
  1658. break;
  1659. case 84:
  1660. { (yyval) = (yyvsp[(2) - (2)]); }
  1661. break;
  1662. case 86:
  1663. { (yyval) = (yyvsp[(3) - (3)]); }
  1664. break;
  1665. case 87:
  1666. { (yyval) = NULL; }
  1667. break;
  1668. case 90:
  1669. { (yyval) = (yyvsp[(3) - (3)]); }
  1670. break;
  1671. case 91:
  1672. { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
  1673. break;
  1674. case 92:
  1675. { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
  1676. break;
  1677. case 94:
  1678. { (yyval) = NULL; }
  1679. break;
  1680. case 95:
  1681. { /* For version 2 checksums, we don't want to remember
  1682. private parameter names. */
  1683. remove_node((yyvsp[(1) - (1)]));
  1684. (yyval) = (yyvsp[(1) - (1)]);
  1685. }
  1686. break;
  1687. case 96:
  1688. { remove_node((yyvsp[(1) - (1)]));
  1689. (yyval) = (yyvsp[(1) - (1)]);
  1690. }
  1691. break;
  1692. case 97:
  1693. { (yyval) = (yyvsp[(4) - (4)]); }
  1694. break;
  1695. case 98:
  1696. { (yyval) = (yyvsp[(4) - (4)]); }
  1697. break;
  1698. case 99:
  1699. { (yyval) = (yyvsp[(2) - (2)]); }
  1700. break;
  1701. case 100:
  1702. { (yyval) = (yyvsp[(3) - (3)]); }
  1703. break;
  1704. case 101:
  1705. { (yyval) = (yyvsp[(3) - (3)]); }
  1706. break;
  1707. case 102:
  1708. { struct string_list *decl = *(yyvsp[(2) - (3)]);
  1709. *(yyvsp[(2) - (3)]) = NULL;
  1710. add_symbol(current_name, SYM_NORMAL, decl, is_extern);
  1711. (yyval) = (yyvsp[(3) - (3)]);
  1712. }
  1713. break;
  1714. case 103:
  1715. { (yyval) = NULL; }
  1716. break;
  1717. case 105:
  1718. { remove_list((yyvsp[(2) - (2)]), &(*(yyvsp[(1) - (2)]))->next); (yyval) = (yyvsp[(2) - (2)]); }
  1719. break;
  1720. case 106:
  1721. { (yyval) = (yyvsp[(3) - (3)]); }
  1722. break;
  1723. case 107:
  1724. { (yyval) = (yyvsp[(3) - (3)]); }
  1725. break;
  1726. case 108:
  1727. { (yyval) = NULL; }
  1728. break;
  1729. case 111:
  1730. { (yyval) = (yyvsp[(2) - (2)]); }
  1731. break;
  1732. case 112:
  1733. { (yyval) = (yyvsp[(3) - (3)]); }
  1734. break;
  1735. case 113:
  1736. { (yyval) = (yyvsp[(2) - (2)]); }
  1737. break;
  1738. case 114:
  1739. { (yyval) = NULL; }
  1740. break;
  1741. case 117:
  1742. { (yyval) = (yyvsp[(3) - (3)]); }
  1743. break;
  1744. case 118:
  1745. { (yyval) = (yyvsp[(2) - (2)]) ? (yyvsp[(2) - (2)]) : (yyvsp[(1) - (2)]); }
  1746. break;
  1747. case 119:
  1748. { (yyval) = (yyvsp[(2) - (2)]); }
  1749. break;
  1750. case 121:
  1751. { (yyval) = (yyvsp[(2) - (2)]); }
  1752. break;
  1753. case 122:
  1754. { (yyval) = NULL; }
  1755. break;
  1756. case 124:
  1757. { (yyval) = (yyvsp[(3) - (3)]); }
  1758. break;
  1759. case 125:
  1760. { (yyval) = (yyvsp[(4) - (4)]); }
  1761. break;
  1762. case 128:
  1763. {
  1764. const char *name = strdup((*(yyvsp[(1) - (1)]))->string);
  1765. add_symbol(name, SYM_ENUM_CONST, NULL, 0);
  1766. }
  1767. break;
  1768. case 129:
  1769. {
  1770. const char *name = strdup((*(yyvsp[(1) - (3)]))->string);
  1771. struct string_list *expr = copy_list_range(*(yyvsp[(3) - (3)]), *(yyvsp[(2) - (3)]));
  1772. add_symbol(name, SYM_ENUM_CONST, expr, 0);
  1773. }
  1774. break;
  1775. case 130:
  1776. { (yyval) = (yyvsp[(2) - (2)]); }
  1777. break;
  1778. case 131:
  1779. { (yyval) = NULL; }
  1780. break;
  1781. case 133:
  1782. { export_symbol((*(yyvsp[(3) - (5)]))->string); (yyval) = (yyvsp[(5) - (5)]); }
  1783. break;
  1784. default: break;
  1785. }
  1786. /* User semantic actions sometimes alter yychar, and that requires
  1787. that yytoken be updated with the new translation. We take the
  1788. approach of translating immediately before every use of yytoken.
  1789. One alternative is translating here after every semantic action,
  1790. but that translation would be missed if the semantic action invokes
  1791. YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
  1792. if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
  1793. incorrect destructor might then be invoked immediately. In the
  1794. case of YYERROR or YYBACKUP, subsequent parser actions might lead
  1795. to an incorrect destructor call or verbose syntax error message
  1796. before the lookahead is translated. */
  1797. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
  1798. YYPOPSTACK (yylen);
  1799. yylen = 0;
  1800. YY_STACK_PRINT (yyss, yyssp);
  1801. *++yyvsp = yyval;
  1802. /* Now `shift' the result of the reduction. Determine what state
  1803. that goes to, based on the state we popped back to and the rule
  1804. number reduced by. */
  1805. yyn = yyr1[yyn];
  1806. yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  1807. if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1808. yystate = yytable[yystate];
  1809. else
  1810. yystate = yydefgoto[yyn - YYNTOKENS];
  1811. goto yynewstate;
  1812. /*------------------------------------.
  1813. | yyerrlab -- here on detecting error |
  1814. `------------------------------------*/
  1815. yyerrlab:
  1816. /* Make sure we have latest lookahead translation. See comments at
  1817. user semantic actions for why this is necessary. */
  1818. yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
  1819. /* If not already recovering from an error, report this error. */
  1820. if (!yyerrstatus)
  1821. {
  1822. ++yynerrs;
  1823. #if ! YYERROR_VERBOSE
  1824. yyerror (YY_("syntax error"));
  1825. #else
  1826. # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
  1827. yyssp, yytoken)
  1828. {
  1829. char const *yymsgp = YY_("syntax error");
  1830. int yysyntax_error_status;
  1831. yysyntax_error_status = YYSYNTAX_ERROR;
  1832. if (yysyntax_error_status == 0)
  1833. yymsgp = yymsg;
  1834. else if (yysyntax_error_status == 1)
  1835. {
  1836. if (yymsg != yymsgbuf)
  1837. YYSTACK_FREE (yymsg);
  1838. yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
  1839. if (!yymsg)
  1840. {
  1841. yymsg = yymsgbuf;
  1842. yymsg_alloc = sizeof yymsgbuf;
  1843. yysyntax_error_status = 2;
  1844. }
  1845. else
  1846. {
  1847. yysyntax_error_status = YYSYNTAX_ERROR;
  1848. yymsgp = yymsg;
  1849. }
  1850. }
  1851. yyerror (yymsgp);
  1852. if (yysyntax_error_status == 2)
  1853. goto yyexhaustedlab;
  1854. }
  1855. # undef YYSYNTAX_ERROR
  1856. #endif
  1857. }
  1858. if (yyerrstatus == 3)
  1859. {
  1860. /* If just tried and failed to reuse lookahead token after an
  1861. error, discard it. */
  1862. if (yychar <= YYEOF)
  1863. {
  1864. /* Return failure if at end of input. */
  1865. if (yychar == YYEOF)
  1866. YYABORT;
  1867. }
  1868. else
  1869. {
  1870. yydestruct ("Error: discarding",
  1871. yytoken, &yylval);
  1872. yychar = YYEMPTY;
  1873. }
  1874. }
  1875. /* Else will try to reuse lookahead token after shifting the error
  1876. token. */
  1877. goto yyerrlab1;
  1878. /*---------------------------------------------------.
  1879. | yyerrorlab -- error raised explicitly by YYERROR. |
  1880. `---------------------------------------------------*/
  1881. yyerrorlab:
  1882. /* Pacify compilers like GCC when the user code never invokes
  1883. YYERROR and the label yyerrorlab therefore never appears in user
  1884. code. */
  1885. if (/*CONSTCOND*/ 0)
  1886. goto yyerrorlab;
  1887. /* Do not reclaim the symbols of the rule which action triggered
  1888. this YYERROR. */
  1889. YYPOPSTACK (yylen);
  1890. yylen = 0;
  1891. YY_STACK_PRINT (yyss, yyssp);
  1892. yystate = *yyssp;
  1893. goto yyerrlab1;
  1894. /*-------------------------------------------------------------.
  1895. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  1896. `-------------------------------------------------------------*/
  1897. yyerrlab1:
  1898. yyerrstatus = 3; /* Each real token shifted decrements this. */
  1899. for (;;)
  1900. {
  1901. yyn = yypact[yystate];
  1902. if (!yypact_value_is_default (yyn))
  1903. {
  1904. yyn += YYTERROR;
  1905. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  1906. {
  1907. yyn = yytable[yyn];
  1908. if (0 < yyn)
  1909. break;
  1910. }
  1911. }
  1912. /* Pop the current state because it cannot handle the error token. */
  1913. if (yyssp == yyss)
  1914. YYABORT;
  1915. yydestruct ("Error: popping",
  1916. yystos[yystate], yyvsp);
  1917. YYPOPSTACK (1);
  1918. yystate = *yyssp;
  1919. YY_STACK_PRINT (yyss, yyssp);
  1920. }
  1921. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1922. *++yyvsp = yylval;
  1923. YY_IGNORE_MAYBE_UNINITIALIZED_END
  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. }