parse.c_shipped 74 KB

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