Year 2 compilers coureswork

C.tab.c 67KB

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