parse.c_shipped 71 KB

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