The Sol Programming Language!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

parser.tab.c 99KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919
  1. /* A Bison parser, made by GNU Bison 2.7.12-4996. */
  2. /* Bison implementation for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. /* As a special exception, you may create a larger work that contains
  15. part or all of the Bison parser skeleton and distribute that work
  16. under terms of your choice, so long as that work isn't itself a
  17. parser generator using the skeleton or a modified version thereof
  18. as a parser skeleton. Alternatively, if you modify or redistribute
  19. the parser skeleton itself, you may (at your option) remove this
  20. special exception, which will cause the skeleton and the resulting
  21. Bison output files to be licensed under the GNU General Public
  22. License without this special exception.
  23. This special exception was added by the Free Software Foundation in
  24. version 2.2 of Bison. */
  25. /* C LALR(1) parser skeleton written by Richard Stallman, by
  26. simplifying the original so-called "semantic" parser. */
  27. /* All symbols defined below should begin with yy or YY, to avoid
  28. infringing on user name space. This should be done even for local
  29. variables, as they might otherwise be expanded by user macros.
  30. There are some unavoidable exceptions within include files to
  31. define necessary library symbols; they are noted "INFRINGES ON
  32. USER NAME SPACE" below. */
  33. /* Identify Bison output. */
  34. #define YYBISON 1
  35. /* Bison version. */
  36. #define YYBISON_VERSION "2.7.12-4996"
  37. /* Skeleton name. */
  38. #define YYSKELETON_NAME "yacc.c"
  39. /* Pure parsers. */
  40. #define YYPURE 2
  41. /* Push parsers. */
  42. #define YYPUSH 0
  43. /* Pull parsers. */
  44. #define YYPULL 1
  45. /* Copy the first part of user declarations. */
  46. /* Line 371 of yacc.c */
  47. #line 1 "parser.y"
  48. #include "sol.h"
  49. #include "ast.h"
  50. #include <string.h>
  51. #define YYSTYPE void *
  52. /* Line 371 of yacc.c */
  53. #line 78 "parser.tab.c"
  54. # ifndef YY_NULL
  55. # if defined __cplusplus && 201103L <= __cplusplus
  56. # define YY_NULL nullptr
  57. # else
  58. # define YY_NULL 0
  59. # endif
  60. # endif
  61. /* Enabling verbose error messages. */
  62. #ifdef YYERROR_VERBOSE
  63. # undef YYERROR_VERBOSE
  64. # define YYERROR_VERBOSE 1
  65. #else
  66. # define YYERROR_VERBOSE 0
  67. #endif
  68. /* In a future release of Bison, this section will be replaced
  69. by #include "parser.tab.h". */
  70. #ifndef YY_YY_PARSER_TAB_H_INCLUDED
  71. # define YY_YY_PARSER_TAB_H_INCLUDED
  72. /* Enabling traces. */
  73. #ifndef YYDEBUG
  74. # define YYDEBUG 1
  75. #endif
  76. #if YYDEBUG
  77. extern int yydebug;
  78. #endif
  79. /* Tokens. */
  80. #ifndef YYTOKENTYPE
  81. # define YYTOKENTYPE
  82. /* Put the tokens into the symbol table, so that GDB and other debuggers
  83. know about them. */
  84. enum yytokentype {
  85. IF = 258,
  86. THEN = 259,
  87. ELSE = 260,
  88. WHILE = 261,
  89. FOR = 262,
  90. IN = 263,
  91. DO = 264,
  92. FUNC = 265,
  93. RETURN = 266,
  94. BREAK = 267,
  95. CONTINUE = 268,
  96. END = 269,
  97. NONE = 270,
  98. IDENT = 271,
  99. INT = 272,
  100. FLOAT = 273,
  101. STRING = 274,
  102. PLUS = 275,
  103. MINUS = 276,
  104. STAR = 277,
  105. SLASH = 278,
  106. PERCENT = 279,
  107. DSTAR = 280,
  108. BAND = 281,
  109. BOR = 282,
  110. BXOR = 283,
  111. BNOT = 284,
  112. LAND = 285,
  113. LOR = 286,
  114. LNOT = 287,
  115. ASSIGN = 288,
  116. ASSIGNPLUS = 289,
  117. ASSIGNMINUS = 290,
  118. ASSIGNSTAR = 291,
  119. ASSIGNSLASH = 292,
  120. ASSIGNDSTAR = 293,
  121. ASSIGNBAND = 294,
  122. ASSIGNBOR = 295,
  123. ASSIGNBXOR = 296,
  124. EQUAL = 297,
  125. LESS = 298,
  126. GREATER = 299,
  127. LESSEQ = 300,
  128. GREATEREQ = 301,
  129. RSHIFT = 302,
  130. LSHIFT = 303,
  131. LBRACE = 304,
  132. RBRACE = 305,
  133. LPAREN = 306,
  134. RPAREN = 307,
  135. LBRACKET = 308,
  136. RBRACKET = 309,
  137. DOT = 310,
  138. COLON = 311,
  139. SEMICOLON = 312,
  140. COMMA = 313,
  141. POUND = 314
  142. };
  143. #endif
  144. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  145. typedef int YYSTYPE;
  146. # define YYSTYPE_IS_TRIVIAL 1
  147. # define yystype YYSTYPE /* obsolescent; will be withdrawn */
  148. # define YYSTYPE_IS_DECLARED 1
  149. #endif
  150. #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
  151. typedef struct YYLTYPE
  152. {
  153. int first_line;
  154. int first_column;
  155. int last_line;
  156. int last_column;
  157. } YYLTYPE;
  158. # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
  159. # define YYLTYPE_IS_DECLARED 1
  160. # define YYLTYPE_IS_TRIVIAL 1
  161. #endif
  162. #ifdef YYPARSE_PARAM
  163. #if defined __STDC__ || defined __cplusplus
  164. int yyparse (void *YYPARSE_PARAM);
  165. #else
  166. int yyparse ();
  167. #endif
  168. #else /* ! YYPARSE_PARAM */
  169. #if defined __STDC__ || defined __cplusplus
  170. int yyparse (stmt_node **program);
  171. #else
  172. int yyparse ();
  173. #endif
  174. #endif /* ! YYPARSE_PARAM */
  175. #endif /* !YY_YY_PARSER_TAB_H_INCLUDED */
  176. /* Copy the second part of user declarations. */
  177. /* Line 390 of yacc.c */
  178. #line 215 "parser.tab.c"
  179. #ifdef short
  180. # undef short
  181. #endif
  182. #ifdef YYTYPE_UINT8
  183. typedef YYTYPE_UINT8 yytype_uint8;
  184. #else
  185. typedef unsigned char yytype_uint8;
  186. #endif
  187. #ifdef YYTYPE_INT8
  188. typedef YYTYPE_INT8 yytype_int8;
  189. #elif (defined __STDC__ || defined __C99__FUNC__ \
  190. || defined __cplusplus || defined _MSC_VER)
  191. typedef signed char yytype_int8;
  192. #else
  193. typedef short int yytype_int8;
  194. #endif
  195. #ifdef YYTYPE_UINT16
  196. typedef YYTYPE_UINT16 yytype_uint16;
  197. #else
  198. typedef unsigned short int yytype_uint16;
  199. #endif
  200. #ifdef YYTYPE_INT16
  201. typedef YYTYPE_INT16 yytype_int16;
  202. #else
  203. typedef short int yytype_int16;
  204. #endif
  205. #ifndef YYSIZE_T
  206. # ifdef __SIZE_TYPE__
  207. # define YYSIZE_T __SIZE_TYPE__
  208. # elif defined size_t
  209. # define YYSIZE_T size_t
  210. # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
  211. || defined __cplusplus || defined _MSC_VER)
  212. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  213. # define YYSIZE_T size_t
  214. # else
  215. # define YYSIZE_T unsigned int
  216. # endif
  217. #endif
  218. #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
  219. #ifndef YY_
  220. # if defined YYENABLE_NLS && YYENABLE_NLS
  221. # if ENABLE_NLS
  222. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  223. # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  224. # endif
  225. # endif
  226. # ifndef YY_
  227. # define YY_(Msgid) Msgid
  228. # endif
  229. #endif
  230. #ifndef __attribute__
  231. /* This feature is available in gcc versions 2.5 and later. */
  232. # if (! defined __GNUC__ || __GNUC__ < 2 \
  233. || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
  234. # define __attribute__(Spec) /* empty */
  235. # endif
  236. #endif
  237. /* Suppress unused-variable warnings by "using" E. */
  238. #if ! defined lint || defined __GNUC__
  239. # define YYUSE(E) ((void) (E))
  240. #else
  241. # define YYUSE(E) /* empty */
  242. #endif
  243. /* Identity function, used to suppress warnings about constant conditions. */
  244. #ifndef lint
  245. # define YYID(N) (N)
  246. #else
  247. #if (defined __STDC__ || defined __C99__FUNC__ \
  248. || defined __cplusplus || defined _MSC_VER)
  249. static int
  250. YYID (int yyi)
  251. #else
  252. static int
  253. YYID (yyi)
  254. int yyi;
  255. #endif
  256. {
  257. return yyi;
  258. }
  259. #endif
  260. #if ! defined yyoverflow || YYERROR_VERBOSE
  261. /* The parser invokes alloca or malloc; define the necessary symbols. */
  262. # ifdef YYSTACK_USE_ALLOCA
  263. # if YYSTACK_USE_ALLOCA
  264. # ifdef __GNUC__
  265. # define YYSTACK_ALLOC __builtin_alloca
  266. # elif defined __BUILTIN_VA_ARG_INCR
  267. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  268. # elif defined _AIX
  269. # define YYSTACK_ALLOC __alloca
  270. # elif defined _MSC_VER
  271. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  272. # define alloca _alloca
  273. # else
  274. # define YYSTACK_ALLOC alloca
  275. # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  276. || defined __cplusplus || defined _MSC_VER)
  277. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  278. /* Use EXIT_SUCCESS as a witness for stdlib.h. */
  279. # ifndef EXIT_SUCCESS
  280. # define EXIT_SUCCESS 0
  281. # endif
  282. # endif
  283. # endif
  284. # endif
  285. # endif
  286. # ifdef YYSTACK_ALLOC
  287. /* Pacify GCC's `empty if-body' warning. */
  288. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
  289. # ifndef YYSTACK_ALLOC_MAXIMUM
  290. /* The OS might guarantee only one guard page at the bottom of the stack,
  291. and a page size can be as small as 4096 bytes. So we cannot safely
  292. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  293. to allow for a few compiler-allocated temporary stack slots. */
  294. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  295. # endif
  296. # else
  297. # define YYSTACK_ALLOC YYMALLOC
  298. # define YYSTACK_FREE YYFREE
  299. # ifndef YYSTACK_ALLOC_MAXIMUM
  300. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  301. # endif
  302. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  303. && ! ((defined YYMALLOC || defined malloc) \
  304. && (defined YYFREE || defined free)))
  305. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  306. # ifndef EXIT_SUCCESS
  307. # define EXIT_SUCCESS 0
  308. # endif
  309. # endif
  310. # ifndef YYMALLOC
  311. # define YYMALLOC malloc
  312. # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  313. || defined __cplusplus || defined _MSC_VER)
  314. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  315. # endif
  316. # endif
  317. # ifndef YYFREE
  318. # define YYFREE free
  319. # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  320. || defined __cplusplus || defined _MSC_VER)
  321. void free (void *); /* INFRINGES ON USER NAME SPACE */
  322. # endif
  323. # endif
  324. # endif
  325. #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
  326. #if (! defined yyoverflow \
  327. && (! defined __cplusplus \
  328. || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  329. && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  330. /* A type that is properly aligned for any stack member. */
  331. union yyalloc
  332. {
  333. yytype_int16 yyss_alloc;
  334. YYSTYPE yyvs_alloc;
  335. YYLTYPE yyls_alloc;
  336. };
  337. /* The size of the maximum gap between one aligned stack and the next. */
  338. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  339. /* The size of an array large to enough to hold all stacks, each with
  340. N elements. */
  341. # define YYSTACK_BYTES(N) \
  342. ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
  343. + 2 * YYSTACK_GAP_MAXIMUM)
  344. # define YYCOPY_NEEDED 1
  345. /* Relocate STACK from its old location to the new one. The
  346. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  347. elements in the stack, and YYPTR gives the new location of the
  348. stack. Advance YYPTR to a properly aligned location for the next
  349. stack. */
  350. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  351. do \
  352. { \
  353. YYSIZE_T yynewbytes; \
  354. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  355. Stack = &yyptr->Stack_alloc; \
  356. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  357. yyptr += yynewbytes / sizeof (*yyptr); \
  358. } \
  359. while (YYID (0))
  360. #endif
  361. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  362. /* Copy COUNT objects from SRC to DST. The source and destination do
  363. not overlap. */
  364. # ifndef YYCOPY
  365. # if defined __GNUC__ && 1 < __GNUC__
  366. # define YYCOPY(Dst, Src, Count) \
  367. __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
  368. # else
  369. # define YYCOPY(Dst, Src, Count) \
  370. do \
  371. { \
  372. YYSIZE_T yyi; \
  373. for (yyi = 0; yyi < (Count); yyi++) \
  374. (Dst)[yyi] = (Src)[yyi]; \
  375. } \
  376. while (YYID (0))
  377. # endif
  378. # endif
  379. #endif /* !YYCOPY_NEEDED */
  380. /* YYFINAL -- State number of the termination state. */
  381. #define YYFINAL 3
  382. /* YYLAST -- Last index in YYTABLE. */
  383. #define YYLAST 707
  384. /* YYNTOKENS -- Number of terminals. */
  385. #define YYNTOKENS 60
  386. /* YYNNTS -- Number of nonterminals. */
  387. #define YYNNTS 26
  388. /* YYNRULES -- Number of rules. */
  389. #define YYNRULES 100
  390. /* YYNRULES -- Number of states. */
  391. #define YYNSTATES 185
  392. /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  393. #define YYUNDEFTOK 2
  394. #define YYMAXUTOK 314
  395. #define YYTRANSLATE(YYX) \
  396. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  397. /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
  398. static const yytype_uint8 yytranslate[] =
  399. {
  400. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  401. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  402. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  403. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  404. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  405. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  406. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  407. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  408. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  409. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  410. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  411. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  412. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  413. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  414. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  415. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  416. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  417. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  418. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  419. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  420. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  421. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  422. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  423. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  424. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  425. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  426. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  427. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  428. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  429. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  430. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  431. 55, 56, 57, 58, 59
  432. };
  433. #if YYDEBUG
  434. /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  435. YYRHS. */
  436. static const yytype_uint16 yyprhs[] =
  437. {
  438. 0, 0, 3, 5, 8, 9, 11, 17, 25, 31,
  439. 39, 42, 44, 46, 48, 51, 55, 59, 63, 67,
  440. 71, 75, 79, 83, 87, 91, 95, 99, 103, 107,
  441. 111, 115, 119, 123, 125, 129, 133, 135, 138, 140,
  442. 144, 148, 152, 156, 160, 162, 166, 170, 172, 176,
  443. 180, 184, 186, 190, 192, 196, 200, 204, 208, 212,
  444. 214, 217, 219, 222, 224, 229, 236, 238, 246, 253,
  445. 255, 260, 264, 266, 271, 275, 277, 279, 281, 284,
  446. 286, 288, 290, 292, 296, 300, 302, 306, 307, 309,
  447. 312, 315, 316, 318, 321, 324, 325, 327, 330, 333,
  448. 339
  449. };
  450. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  451. static const yytype_int8 yyrhs[] =
  452. {
  453. 61, 0, -1, 62, -1, 62, 63, -1, -1, 64,
  454. -1, 3, 64, 4, 62, 14, -1, 3, 64, 4,
  455. 62, 5, 62, 14, -1, 6, 64, 9, 62, 14,
  456. -1, 7, 16, 8, 64, 9, 62, 14, -1, 11,
  457. 64, -1, 11, -1, 12, -1, 13, -1, 63, 57,
  458. -1, 16, 33, 64, -1, 16, 34, 64, -1, 16,
  459. 35, 64, -1, 16, 36, 64, -1, 16, 37, 64,
  460. -1, 16, 38, 64, -1, 16, 39, 64, -1, 16,
  461. 40, 64, -1, 16, 41, 64, -1, 77, 33, 64,
  462. -1, 77, 34, 64, -1, 77, 35, 64, -1, 77,
  463. 36, 64, -1, 77, 37, 64, -1, 77, 38, 64,
  464. -1, 77, 39, 64, -1, 77, 40, 64, -1, 77,
  465. 41, 64, -1, 65, -1, 65, 30, 66, -1, 65,
  466. 31, 66, -1, 66, -1, 32, 66, -1, 67, -1,
  467. 68, 42, 67, -1, 68, 43, 67, -1, 68, 44,
  468. 67, -1, 68, 45, 67, -1, 68, 46, 67, -1,
  469. 68, -1, 68, 20, 69, -1, 68, 21, 69, -1,
  470. 69, -1, 69, 22, 70, -1, 69, 23, 70, -1,
  471. 69, 24, 70, -1, 70, -1, 70, 25, 70, -1,
  472. 71, -1, 71, 26, 71, -1, 71, 27, 71, -1,
  473. 71, 28, 71, -1, 71, 48, 71, -1, 71, 47,
  474. 71, -1, 72, -1, 29, 72, -1, 73, -1, 59,
  475. 73, -1, 74, -1, 74, 51, 82, 52, -1, 74,
  476. 56, 16, 51, 82, 52, -1, 75, -1, 10, 16,
  477. 51, 83, 52, 62, 14, -1, 10, 51, 83, 52,
  478. 62, 14, -1, 76, -1, 64, 53, 64, 54, -1,
  479. 64, 55, 16, -1, 78, -1, 64, 53, 64, 54,
  480. -1, 64, 55, 16, -1, 16, -1, 79, -1, 17,
  481. -1, 21, 17, -1, 18, -1, 19, -1, 15, -1,
  482. 80, -1, 53, 82, 54, -1, 49, 84, 50, -1,
  483. 81, -1, 51, 64, 52, -1, -1, 64, -1, 82,
  484. 58, -1, 82, 64, -1, -1, 16, -1, 83, 58,
  485. -1, 83, 16, -1, -1, 85, -1, 84, 58, -1,
  486. 84, 85, -1, 53, 64, 54, 33, 64, -1, 16,
  487. 33, 64, -1
  488. };
  489. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  490. static const yytype_uint16 yyrline[] =
  491. {
  492. 0, 33, 33, 37, 48, 58, 59, 60, 61, 62,
  493. 63, 64, 65, 66, 67, 71, 72, 79, 86, 93,
  494. 100, 107, 114, 121, 128, 141, 154, 167, 180, 193,
  495. 206, 219, 232, 245, 249, 250, 251, 255, 256, 260,
  496. 261, 262, 263, 264, 265, 269, 270, 271, 275, 276,
  497. 277, 278, 282, 283, 287, 288, 289, 290, 291, 292,
  498. 296, 297, 301, 302, 306, 307, 324, 328, 336, 344,
  499. 348, 349, 360, 364, 365, 379, 380, 384, 385, 386,
  500. 387, 388, 389, 393, 394, 395, 399, 403, 404, 409,
  501. 410, 422, 423, 428, 429, 441, 442, 447, 448, 460,
  502. 465
  503. };
  504. #endif
  505. #if YYDEBUG || YYERROR_VERBOSE || 0
  506. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  507. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  508. static const char *const yytname[] =
  509. {
  510. "$end", "error", "$undefined", "IF", "THEN", "ELSE", "WHILE", "FOR",
  511. "IN", "DO", "FUNC", "RETURN", "BREAK", "CONTINUE", "END", "NONE",
  512. "IDENT", "INT", "FLOAT", "STRING", "PLUS", "MINUS", "STAR", "SLASH",
  513. "PERCENT", "DSTAR", "BAND", "BOR", "BXOR", "BNOT", "LAND", "LOR", "LNOT",
  514. "ASSIGN", "ASSIGNPLUS", "ASSIGNMINUS", "ASSIGNSTAR", "ASSIGNSLASH",
  515. "ASSIGNDSTAR", "ASSIGNBAND", "ASSIGNBOR", "ASSIGNBXOR", "EQUAL", "LESS",
  516. "GREATER", "LESSEQ", "GREATEREQ", "RSHIFT", "LSHIFT", "LBRACE", "RBRACE",
  517. "LPAREN", "RPAREN", "LBRACKET", "RBRACKET", "DOT", "COLON", "SEMICOLON",
  518. "COMMA", "POUND", "$accept", "program", "stmt_list", "stmt", "expr",
  519. "logic_expr", "ulogic_expr", "rel_expr", "term_expr", "factor_expr",
  520. "power_expr", "binary_expr", "ubinary_expr", "ulen_expr", "call_expr",
  521. "funcdecl_expr", "index_expr", "ex_index_expr", "ref_expr", "lit_expr",
  522. "gen_expr", "paren_expr", "expr_list", "ident_list", "assoc_list",
  523. "assoc_item", YY_NULL
  524. };
  525. #endif
  526. # ifdef YYPRINT
  527. /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  528. token YYLEX-NUM. */
  529. static const yytype_uint16 yytoknum[] =
  530. {
  531. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  532. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  533. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  534. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  535. 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
  536. 305, 306, 307, 308, 309, 310, 311, 312, 313, 314
  537. };
  538. # endif
  539. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  540. static const yytype_uint8 yyr1[] =
  541. {
  542. 0, 60, 61, 62, 62, 63, 63, 63, 63, 63,
  543. 63, 63, 63, 63, 63, 64, 64, 64, 64, 64,
  544. 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
  545. 64, 64, 64, 64, 65, 65, 65, 66, 66, 67,
  546. 67, 67, 67, 67, 67, 68, 68, 68, 69, 69,
  547. 69, 69, 70, 70, 71, 71, 71, 71, 71, 71,
  548. 72, 72, 73, 73, 74, 74, 74, 75, 75, 75,
  549. 76, 76, 76, 77, 77, 78, 78, 79, 79, 79,
  550. 79, 79, 79, 80, 80, 80, 81, 82, 82, 82,
  551. 82, 83, 83, 83, 83, 84, 84, 84, 84, 85,
  552. 85
  553. };
  554. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  555. static const yytype_uint8 yyr2[] =
  556. {
  557. 0, 2, 1, 2, 0, 1, 5, 7, 5, 7,
  558. 2, 1, 1, 1, 2, 3, 3, 3, 3, 3,
  559. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  560. 3, 3, 3, 1, 3, 3, 1, 2, 1, 3,
  561. 3, 3, 3, 3, 1, 3, 3, 1, 3, 3,
  562. 3, 1, 3, 1, 3, 3, 3, 3, 3, 1,
  563. 2, 1, 2, 1, 4, 6, 1, 7, 6, 1,
  564. 4, 3, 1, 4, 3, 1, 1, 1, 2, 1,
  565. 1, 1, 1, 3, 3, 1, 3, 0, 1, 2,
  566. 2, 0, 1, 2, 2, 0, 1, 2, 2, 5,
  567. 3
  568. };
  569. /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
  570. Performed when YYTABLE doesn't specify something else to do. Zero
  571. means the default is an error. */
  572. static const yytype_uint8 yydefact[] =
  573. {
  574. 4, 0, 2, 1, 0, 0, 0, 0, 11, 12,
  575. 13, 81, 75, 77, 79, 80, 0, 0, 0, 95,
  576. 0, 87, 0, 3, 5, 33, 36, 38, 44, 47,
  577. 51, 53, 59, 61, 63, 66, 69, 0, 72, 76,
  578. 82, 85, 0, 0, 0, 0, 91, 10, 0, 0,
  579. 0, 0, 0, 0, 0, 0, 0, 78, 0, 60,
  580. 37, 0, 0, 0, 96, 0, 88, 0, 62, 14,
  581. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  582. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  583. 87, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  584. 0, 4, 4, 0, 91, 92, 0, 15, 16, 17,
  585. 18, 19, 20, 21, 22, 23, 0, 0, 84, 97,
  586. 98, 86, 83, 89, 90, 0, 71, 34, 35, 45,
  587. 46, 39, 40, 41, 42, 43, 48, 49, 50, 52,
  588. 54, 55, 56, 58, 57, 0, 0, 24, 25, 26,
  589. 27, 28, 29, 30, 31, 32, 0, 0, 0, 0,
  590. 94, 4, 93, 100, 0, 70, 64, 87, 4, 6,
  591. 8, 4, 4, 0, 0, 0, 0, 0, 0, 68,
  592. 99, 65, 7, 9, 67
  593. };
  594. /* YYDEFGOTO[NTERM-NUM]. */
  595. static const yytype_int8 yydefgoto[] =
  596. {
  597. -1, 1, 2, 23, 58, 25, 26, 27, 28, 29,
  598. 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
  599. 40, 41, 67, 106, 63, 64
  600. };
  601. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  602. STATE-NUM. */
  603. #define YYPACT_NINF -98
  604. static const yytype_int16 yypact[] =
  605. {
  606. -98, 14, 378, -98, 504, 504, 46, -8, 504, -98,
  607. -98, -98, 175, -98, -98, -98, 13, 504, 504, 19,
  608. 504, 504, 504, -17, 56, 7, -98, -98, 62, 127,
  609. 45, 105, -98, -98, -15, -98, -98, 226, -98, -98,
  610. -98, -98, 3, 2, 76, 22, 69, 56, 504, 504,
  611. 504, 504, 504, 504, 504, 504, 504, -98, 56, 544,
  612. -21, 70, 504, 60, -98, 47, 56, 396, 580, -98,
  613. 504, 73, 504, 504, 504, 504, 504, 504, 504, 504,
  614. 504, 504, 504, 504, 504, 504, 504, 504, 504, 504,
  615. 504, 101, 504, 504, 504, 504, 504, 504, 504, 504,
  616. 504, -98, -98, 504, 69, -98, 28, 56, 56, 56,
  617. 56, 56, 56, 56, 56, 56, 504, 194, -98, -98,
  618. -98, -98, -98, -98, 56, 197, 277, -98, -98, 127,
  619. 127, 104, 104, 104, 104, 104, 45, 45, 45, 652,
  620. 616, 616, 616, 616, 616, 441, 78, 56, 56, 56,
  621. 56, 56, 56, 56, 56, 56, 10, 109, 24, 29,
  622. -98, -98, -98, 56, 103, 328, -98, 504, -98, -98,
  623. -98, -98, -98, 174, 504, 459, 225, 276, 327, -98,
  624. 56, -98, -98, -98, -98
  625. };
  626. /* YYPGOTO[NTERM-NUM]. */
  627. static const yytype_int16 yypgoto[] =
  628. {
  629. -98, -98, -97, -98, -2, -98, -6, 68, -98, 65,
  630. 136, 111, 120, 134, -98, -98, -98, -98, -98, -98,
  631. -98, -98, -89, 38, -98, 98
  632. };
  633. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  634. positive, shift that token. If negative, reduce the rule which
  635. number is the opposite. If YYTABLE_NINF, syntax error. */
  636. #define YYTABLE_NINF -75
  637. static const yytype_int16 yytable[] =
  638. {
  639. 24, 145, 42, 43, 156, 157, 47, 101, 45, -36,
  640. -36, 102, 60, 4, 3, 168, 5, 6, 65, 66,
  641. 7, 8, 9, 10, 169, 11, 12, 13, 14, 15,
  642. 57, 16, -36, 171, -36, 61, 90, 72, 73, 17,
  643. 69, 91, 18, 46, 160, 160, 107, 108, 109, 110,
  644. 111, 112, 113, 114, 115, 70, 70, 71, 71, 19,
  645. 117, 20, 44, 21, 173, 124, 127, 128, 125, 22,
  646. 84, 176, 62, 104, 177, 178, 61, 70, 175, 71,
  647. 161, 172, 74, 75, 103, 105, 162, 162, 66, 126,
  648. 147, 148, 149, 150, 151, 152, 153, 154, 155, 121,
  649. 70, 158, 71, 116, 76, 77, 78, 79, 80, 70,
  650. 118, 71, 4, 62, 163, 5, 6, 146, 119, 7,
  651. 8, 9, 10, 170, 11, 12, 13, 14, 15, 167,
  652. 16, 85, 86, 87, -38, -38, 174, 59, 17, 129,
  653. 130, 18, 159, 124, 131, 132, 133, 134, 135, 81,
  654. 82, 83, 88, 89, 24, 24, 68, -38, 19, -38,
  655. 20, 120, 21, 0, 0, 66, 0, 0, 22, 0,
  656. 0, 24, 180, 124, 24, 24, 24, 4, 0, 0,
  657. 5, 6, 0, 0, 7, 8, 9, 10, 179, 11,
  658. 12, 13, 14, 15, 0, 16, 140, 141, 142, 143,
  659. 144, 0, 0, 17, 0, 0, 18, 0, 48, 49,
  660. 50, 51, 52, 53, 54, 55, 56, 136, 137, 138,
  661. 139, 0, 0, 19, 0, 20, 0, 21, 4, 0,
  662. 0, 5, 6, 22, 0, 7, 8, 9, 10, 182,
  663. 11, 12, 13, 14, 15, 0, 16, 70, 164, 71,
  664. 70, 165, 71, 0, 17, 0, 0, 18, 0, 92,
  665. 93, 94, 95, 96, 97, 98, 99, 100, 0, 0,
  666. 0, 0, 0, 0, 19, 0, 20, 0, 21, 4,
  667. 0, 0, 5, 6, 22, 0, 7, 8, 9, 10,
  668. 183, 11, 12, 13, 14, 15, 0, 16, 0, 0,
  669. 0, 0, 0, 0, 0, 17, 0, 0, 18, 0,
  670. -74, -74, -74, -74, -74, -74, -74, -74, -74, 0,
  671. 0, 0, 0, 0, 0, 19, 0, 20, 0, 21,
  672. 4, 0, 0, 5, 6, 22, 0, 7, 8, 9,
  673. 10, 184, 11, 12, 13, 14, 15, 0, 16, 0,
  674. 0, 0, 0, 0, 0, 0, 17, 0, 0, 18,
  675. 0, -73, -73, -73, -73, -73, -73, -73, -73, -73,
  676. 0, 0, 0, 0, 0, 0, 19, 0, 20, 0,
  677. 21, 4, 0, 0, 5, 6, 22, 0, 7, 8,
  678. 9, 10, 0, 11, 12, 13, 14, 15, 0, 16,
  679. 0, 0, 0, 0, 0, 0, 7, 17, 0, 0,
  680. 18, 11, 12, 13, 14, 15, 0, 16, 0, 0,
  681. 0, 0, 0, 0, 0, 17, 0, 19, 18, 20,
  682. 0, 21, 0, 0, 0, 0, 0, 22, 0, 0,
  683. 0, 0, 0, 0, 0, 19, 0, 20, 0, 21,
  684. 122, 7, 0, 0, 123, 22, 11, 12, 13, 14,
  685. 15, 0, 16, 0, 0, 0, 0, 0, 0, 7,
  686. 17, 0, 0, 18, 11, 12, 13, 14, 15, 0,
  687. 16, 0, 0, 0, 0, 0, 0, 0, 17, 0,
  688. 19, 18, 20, 166, 21, 0, 0, 0, 0, 123,
  689. 22, 0, 0, 0, 0, 0, 0, 0, 19, 0,
  690. 20, 181, 21, 0, 7, 0, 0, 123, 22, 11,
  691. 12, 13, 14, 15, 0, 16, 0, 0, 0, 0,
  692. 0, 0, 0, 17, 0, 0, 18, 0, 0, 0,
  693. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  694. 0, 0, 0, 19, 0, 20, 0, 21, 0, 0,
  695. 0, 0, 0, 22, -59, -59, -59, -59, -59, -59,
  696. -59, -59, -59, 0, -59, -59, 0, 0, 0, 0,
  697. 0, 0, 0, 0, 0, 0, -59, -59, -59, -59,
  698. -59, -59, -59, 0, 0, 0, 0, -59, 0, -59,
  699. -61, -61, -61, -61, -61, -61, -61, -61, -61, 0,
  700. -61, -61, 0, 0, 0, 0, 0, 0, 0, 0,
  701. 0, 0, -61, -61, -61, -61, -61, -61, -61, 0,
  702. 0, 0, 0, -61, 0, -61, -53, -53, -53, -53,
  703. -53, -53, 85, 86, 87, 0, -53, -53, 0, 0,
  704. 0, 0, 0, 0, 0, 0, 0, 0, -53, -53,
  705. -53, -53, -53, 88, 89, 0, 0, 0, 0, -53,
  706. 0, -53, -51, -51, -51, -51, -51, 84, 0, 0,
  707. 0, 0, -51, -51, 0, 0, 0, 0, 0, 0,
  708. 0, 0, 0, 0, -51, -51, -51, -51, -51, 0,
  709. 0, 0, 0, 0, 0, -51, 0, -51
  710. };
  711. #define yypact_value_is_default(Yystate) \
  712. (!!((Yystate) == (-98)))
  713. #define yytable_value_is_error(Yytable_value) \
  714. YYID (0)
  715. static const yytype_int16 yycheck[] =
  716. {
  717. 2, 90, 4, 5, 101, 102, 8, 4, 16, 30,
  718. 31, 9, 18, 3, 0, 5, 6, 7, 20, 21,
  719. 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
  720. 17, 21, 53, 9, 55, 16, 51, 30, 31, 29,
  721. 57, 56, 32, 51, 16, 16, 48, 49, 50, 51,
  722. 52, 53, 54, 55, 56, 53, 53, 55, 55, 49,
  723. 62, 51, 16, 53, 161, 67, 72, 73, 70, 59,
  724. 25, 168, 53, 51, 171, 172, 16, 53, 167, 55,
  725. 52, 52, 20, 21, 8, 16, 58, 58, 90, 16,
  726. 92, 93, 94, 95, 96, 97, 98, 99, 100, 52,
  727. 53, 103, 55, 33, 42, 43, 44, 45, 46, 53,
  728. 50, 55, 3, 53, 116, 6, 7, 16, 58, 10,
  729. 11, 12, 13, 14, 15, 16, 17, 18, 19, 51,
  730. 21, 26, 27, 28, 30, 31, 33, 17, 29, 74,
  731. 75, 32, 104, 145, 76, 77, 78, 79, 80, 22,
  732. 23, 24, 47, 48, 156, 157, 22, 53, 49, 55,
  733. 51, 63, 53, -1, -1, 167, -1, -1, 59, -1,
  734. -1, 173, 174, 175, 176, 177, 178, 3, -1, -1,
  735. 6, 7, -1, -1, 10, 11, 12, 13, 14, 15,
  736. 16, 17, 18, 19, -1, 21, 85, 86, 87, 88,
  737. 89, -1, -1, 29, -1, -1, 32, -1, 33, 34,
  738. 35, 36, 37, 38, 39, 40, 41, 81, 82, 83,
  739. 84, -1, -1, 49, -1, 51, -1, 53, 3, -1,
  740. -1, 6, 7, 59, -1, 10, 11, 12, 13, 14,
  741. 15, 16, 17, 18, 19, -1, 21, 53, 54, 55,
  742. 53, 54, 55, -1, 29, -1, -1, 32, -1, 33,
  743. 34, 35, 36, 37, 38, 39, 40, 41, -1, -1,
  744. -1, -1, -1, -1, 49, -1, 51, -1, 53, 3,
  745. -1, -1, 6, 7, 59, -1, 10, 11, 12, 13,
  746. 14, 15, 16, 17, 18, 19, -1, 21, -1, -1,
  747. -1, -1, -1, -1, -1, 29, -1, -1, 32, -1,
  748. 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
  749. -1, -1, -1, -1, -1, 49, -1, 51, -1, 53,
  750. 3, -1, -1, 6, 7, 59, -1, 10, 11, 12,
  751. 13, 14, 15, 16, 17, 18, 19, -1, 21, -1,
  752. -1, -1, -1, -1, -1, -1, 29, -1, -1, 32,
  753. -1, 33, 34, 35, 36, 37, 38, 39, 40, 41,
  754. -1, -1, -1, -1, -1, -1, 49, -1, 51, -1,
  755. 53, 3, -1, -1, 6, 7, 59, -1, 10, 11,
  756. 12, 13, -1, 15, 16, 17, 18, 19, -1, 21,
  757. -1, -1, -1, -1, -1, -1, 10, 29, -1, -1,
  758. 32, 15, 16, 17, 18, 19, -1, 21, -1, -1,
  759. -1, -1, -1, -1, -1, 29, -1, 49, 32, 51,
  760. -1, 53, -1, -1, -1, -1, -1, 59, -1, -1,
  761. -1, -1, -1, -1, -1, 49, -1, 51, -1, 53,
  762. 54, 10, -1, -1, 58, 59, 15, 16, 17, 18,
  763. 19, -1, 21, -1, -1, -1, -1, -1, -1, 10,
  764. 29, -1, -1, 32, 15, 16, 17, 18, 19, -1,
  765. 21, -1, -1, -1, -1, -1, -1, -1, 29, -1,
  766. 49, 32, 51, 52, 53, -1, -1, -1, -1, 58,
  767. 59, -1, -1, -1, -1, -1, -1, -1, 49, -1,
  768. 51, 52, 53, -1, 10, -1, -1, 58, 59, 15,
  769. 16, 17, 18, 19, -1, 21, -1, -1, -1, -1,
  770. -1, -1, -1, 29, -1, -1, 32, -1, -1, -1,
  771. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  772. -1, -1, -1, 49, -1, 51, -1, 53, -1, -1,
  773. -1, -1, -1, 59, 20, 21, 22, 23, 24, 25,
  774. 26, 27, 28, -1, 30, 31, -1, -1, -1, -1,
  775. -1, -1, -1, -1, -1, -1, 42, 43, 44, 45,
  776. 46, 47, 48, -1, -1, -1, -1, 53, -1, 55,
  777. 20, 21, 22, 23, 24, 25, 26, 27, 28, -1,
  778. 30, 31, -1, -1, -1, -1, -1, -1, -1, -1,
  779. -1, -1, 42, 43, 44, 45, 46, 47, 48, -1,
  780. -1, -1, -1, 53, -1, 55, 20, 21, 22, 23,
  781. 24, 25, 26, 27, 28, -1, 30, 31, -1, -1,
  782. -1, -1, -1, -1, -1, -1, -1, -1, 42, 43,
  783. 44, 45, 46, 47, 48, -1, -1, -1, -1, 53,
  784. -1, 55, 20, 21, 22, 23, 24, 25, -1, -1,
  785. -1, -1, 30, 31, -1, -1, -1, -1, -1, -1,
  786. -1, -1, -1, -1, 42, 43, 44, 45, 46, -1,
  787. -1, -1, -1, -1, -1, 53, -1, 55
  788. };
  789. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  790. symbol of state STATE-NUM. */
  791. static const yytype_uint8 yystos[] =
  792. {
  793. 0, 61, 62, 0, 3, 6, 7, 10, 11, 12,
  794. 13, 15, 16, 17, 18, 19, 21, 29, 32, 49,
  795. 51, 53, 59, 63, 64, 65, 66, 67, 68, 69,
  796. 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  797. 80, 81, 64, 64, 16, 16, 51, 64, 33, 34,
  798. 35, 36, 37, 38, 39, 40, 41, 17, 64, 72,
  799. 66, 16, 53, 84, 85, 64, 64, 82, 73, 57,
  800. 53, 55, 30, 31, 20, 21, 42, 43, 44, 45,
  801. 46, 22, 23, 24, 25, 26, 27, 28, 47, 48,
  802. 51, 56, 33, 34, 35, 36, 37, 38, 39, 40,
  803. 41, 4, 9, 8, 51, 16, 83, 64, 64, 64,
  804. 64, 64, 64, 64, 64, 64, 33, 64, 50, 58,
  805. 85, 52, 54, 58, 64, 64, 16, 66, 66, 69,
  806. 69, 67, 67, 67, 67, 67, 70, 70, 70, 70,
  807. 71, 71, 71, 71, 71, 82, 16, 64, 64, 64,
  808. 64, 64, 64, 64, 64, 64, 62, 62, 64, 83,
  809. 16, 52, 58, 64, 54, 54, 52, 51, 5, 14,
  810. 14, 9, 52, 62, 33, 82, 62, 62, 62, 14,
  811. 64, 52, 14, 14, 14
  812. };
  813. #define yyerrok (yyerrstatus = 0)
  814. #define yyclearin (yychar = YYEMPTY)
  815. #define YYEMPTY (-2)
  816. #define YYEOF 0
  817. #define YYACCEPT goto yyacceptlab
  818. #define YYABORT goto yyabortlab
  819. #define YYERROR goto yyerrorlab
  820. /* Like YYERROR except do call yyerror. This remains here temporarily
  821. to ease the transition to the new meaning of YYERROR, for GCC.
  822. Once GCC version 2 has supplanted version 1, this can go. However,
  823. YYFAIL appears to be in use. Nevertheless, it is formally deprecated
  824. in Bison 2.4.2's NEWS entry, where a plan to phase it out is
  825. discussed. */
  826. #define YYFAIL goto yyerrlab
  827. #if defined YYFAIL
  828. /* This is here to suppress warnings from the GCC cpp's
  829. -Wunused-macros. Normally we don't worry about that warning, but
  830. some users do, and we want to make it easy for users to remove
  831. YYFAIL uses, which will produce warnings from Bison 2.5. */
  832. #endif
  833. #define YYRECOVERING() (!!yyerrstatus)
  834. #define YYBACKUP(Token, Value) \
  835. do \
  836. if (yychar == YYEMPTY) \
  837. { \
  838. yychar = (Token); \
  839. yylval = (Value); \
  840. YYPOPSTACK (yylen); \
  841. yystate = *yyssp; \
  842. goto yybackup; \
  843. } \
  844. else \
  845. { \
  846. yyerror (&yylloc, program, YY_("syntax error: cannot back up")); \
  847. YYERROR; \
  848. } \
  849. while (YYID (0))
  850. /* Error token number */
  851. #define YYTERROR 1
  852. #define YYERRCODE 256
  853. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  854. If N is 0, then set CURRENT to the empty location which ends
  855. the previous symbol: RHS[0] (always defined). */
  856. #ifndef YYLLOC_DEFAULT
  857. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  858. do \
  859. if (YYID (N)) \
  860. { \
  861. (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  862. (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  863. (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  864. (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  865. } \
  866. else \
  867. { \
  868. (Current).first_line = (Current).last_line = \
  869. YYRHSLOC (Rhs, 0).last_line; \
  870. (Current).first_column = (Current).last_column = \
  871. YYRHSLOC (Rhs, 0).last_column; \
  872. } \
  873. while (YYID (0))
  874. #endif
  875. #define YYRHSLOC(Rhs, K) ((Rhs)[K])
  876. /* YY_LOCATION_PRINT -- Print the location on the stream.
  877. This macro was not mandated originally: define only if we know
  878. we won't break user code: when these are the locations we know. */
  879. #ifndef YY_LOCATION_PRINT
  880. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  881. /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
  882. __attribute__((__unused__))
  883. #if (defined __STDC__ || defined __C99__FUNC__ \
  884. || defined __cplusplus || defined _MSC_VER)
  885. static unsigned
  886. yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
  887. #else
  888. static unsigned
  889. yy_location_print_ (yyo, yylocp)
  890. FILE *yyo;
  891. YYLTYPE const * const yylocp;
  892. #endif
  893. {
  894. unsigned res = 0;
  895. int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  896. if (0 <= yylocp->first_line)
  897. {
  898. res += fprintf (yyo, "%d", yylocp->first_line);
  899. if (0 <= yylocp->first_column)
  900. res += fprintf (yyo, ".%d", yylocp->first_column);
  901. }
  902. if (0 <= yylocp->last_line)
  903. {
  904. if (yylocp->first_line < yylocp->last_line)
  905. {
  906. res += fprintf (yyo, "-%d", yylocp->last_line);
  907. if (0 <= end_col)
  908. res += fprintf (yyo, ".%d", end_col);
  909. }
  910. else if (0 <= end_col && yylocp->first_column < end_col)
  911. res += fprintf (yyo, "-%d", end_col);
  912. }
  913. return res;
  914. }
  915. # define YY_LOCATION_PRINT(File, Loc) \
  916. yy_location_print_ (File, &(Loc))
  917. # else
  918. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  919. # endif
  920. #endif
  921. /* YYLEX -- calling `yylex' with the right arguments. */
  922. #ifdef YYLEX_PARAM
  923. # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
  924. #else
  925. # define YYLEX yylex (&yylval, &yylloc)
  926. #endif
  927. /* Enable debugging if requested. */
  928. #if YYDEBUG
  929. # ifndef YYFPRINTF
  930. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  931. # define YYFPRINTF fprintf
  932. # endif
  933. # define YYDPRINTF(Args) \
  934. do { \
  935. if (yydebug) \
  936. YYFPRINTF Args; \
  937. } while (YYID (0))
  938. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  939. do { \
  940. if (yydebug) \
  941. { \
  942. YYFPRINTF (stderr, "%s ", Title); \
  943. yy_symbol_print (stderr, \
  944. Type, Value, Location, program); \
  945. YYFPRINTF (stderr, "\n"); \
  946. } \
  947. } while (YYID (0))
  948. /*--------------------------------.
  949. | Print this symbol on YYOUTPUT. |
  950. `--------------------------------*/
  951. /*ARGSUSED*/
  952. #if (defined __STDC__ || defined __C99__FUNC__ \
  953. || defined __cplusplus || defined _MSC_VER)
  954. static void
  955. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, stmt_node **program)
  956. #else
  957. static void
  958. yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, program)
  959. FILE *yyoutput;
  960. int yytype;
  961. YYSTYPE const * const yyvaluep;
  962. YYLTYPE const * const yylocationp;
  963. stmt_node **program;
  964. #endif
  965. {
  966. FILE *yyo = yyoutput;
  967. YYUSE (yyo);
  968. if (!yyvaluep)
  969. return;
  970. YYUSE (yylocationp);
  971. YYUSE (program);
  972. # ifdef YYPRINT
  973. if (yytype < YYNTOKENS)
  974. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  975. # else
  976. YYUSE (yyoutput);
  977. # endif
  978. YYUSE (yytype);
  979. }
  980. /*--------------------------------.
  981. | Print this symbol on YYOUTPUT. |
  982. `--------------------------------*/
  983. #if (defined __STDC__ || defined __C99__FUNC__ \
  984. || defined __cplusplus || defined _MSC_VER)
  985. static void
  986. yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, stmt_node **program)
  987. #else
  988. static void
  989. yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, program)
  990. FILE *yyoutput;
  991. int yytype;
  992. YYSTYPE const * const yyvaluep;
  993. YYLTYPE const * const yylocationp;
  994. stmt_node **program;
  995. #endif
  996. {
  997. if (yytype < YYNTOKENS)
  998. YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  999. else
  1000. YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  1001. YY_LOCATION_PRINT (yyoutput, *yylocationp);
  1002. YYFPRINTF (yyoutput, ": ");
  1003. yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, program);
  1004. YYFPRINTF (yyoutput, ")");
  1005. }
  1006. /*------------------------------------------------------------------.
  1007. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  1008. | TOP (included). |
  1009. `------------------------------------------------------------------*/
  1010. #if (defined __STDC__ || defined __C99__FUNC__ \
  1011. || defined __cplusplus || defined _MSC_VER)
  1012. static void
  1013. yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
  1014. #else
  1015. static void
  1016. yy_stack_print (yybottom, yytop)
  1017. yytype_int16 *yybottom;
  1018. yytype_int16 *yytop;
  1019. #endif
  1020. {
  1021. YYFPRINTF (stderr, "Stack now");
  1022. for (; yybottom <= yytop; yybottom++)
  1023. {
  1024. int yybot = *yybottom;
  1025. YYFPRINTF (stderr, " %d", yybot);
  1026. }
  1027. YYFPRINTF (stderr, "\n");
  1028. }
  1029. # define YY_STACK_PRINT(Bottom, Top) \
  1030. do { \
  1031. if (yydebug) \
  1032. yy_stack_print ((Bottom), (Top)); \
  1033. } while (YYID (0))
  1034. /*------------------------------------------------.
  1035. | Report that the YYRULE is going to be reduced. |
  1036. `------------------------------------------------*/
  1037. #if (defined __STDC__ || defined __C99__FUNC__ \
  1038. || defined __cplusplus || defined _MSC_VER)
  1039. static void
  1040. yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, stmt_node **program)
  1041. #else
  1042. static void
  1043. yy_reduce_print (yyvsp, yylsp, yyrule, program)
  1044. YYSTYPE *yyvsp;
  1045. YYLTYPE *yylsp;
  1046. int yyrule;
  1047. stmt_node **program;
  1048. #endif
  1049. {
  1050. int yynrhs = yyr2[yyrule];
  1051. int yyi;
  1052. unsigned long int yylno = yyrline[yyrule];
  1053. YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
  1054. yyrule - 1, yylno);
  1055. /* The symbols being reduced. */
  1056. for (yyi = 0; yyi < yynrhs; yyi++)
  1057. {
  1058. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  1059. yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
  1060. &(yyvsp[(yyi + 1) - (yynrhs)])
  1061. , &(yylsp[(yyi + 1) - (yynrhs)]) , program);
  1062. YYFPRINTF (stderr, "\n");
  1063. }
  1064. }
  1065. # define YY_REDUCE_PRINT(Rule) \
  1066. do { \
  1067. if (yydebug) \
  1068. yy_reduce_print (yyvsp, yylsp, Rule, program); \
  1069. } while (YYID (0))
  1070. /* Nonzero means print parse trace. It is left uninitialized so that
  1071. multiple parsers can coexist. */
  1072. int yydebug;
  1073. #else /* !YYDEBUG */
  1074. # define YYDPRINTF(Args)
  1075. # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  1076. # define YY_STACK_PRINT(Bottom, Top)
  1077. # define YY_REDUCE_PRINT(Rule)
  1078. #endif /* !YYDEBUG */
  1079. /* YYINITDEPTH -- initial size of the parser's stacks. */
  1080. #ifndef YYINITDEPTH
  1081. # define YYINITDEPTH 200
  1082. #endif
  1083. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  1084. if the built-in stack extension method is used).
  1085. Do not make this value too large; the results are undefined if
  1086. YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  1087. evaluated with infinite-precision integer arithmetic. */
  1088. #ifndef YYMAXDEPTH
  1089. # define YYMAXDEPTH 10000
  1090. #endif
  1091. #if YYERROR_VERBOSE
  1092. # ifndef yystrlen
  1093. # if defined __GLIBC__ && defined _STRING_H
  1094. # define yystrlen strlen
  1095. # else
  1096. /* Return the length of YYSTR. */
  1097. #if (defined __STDC__ || defined __C99__FUNC__ \
  1098. || defined __cplusplus || defined _MSC_VER)
  1099. static YYSIZE_T
  1100. yystrlen (const char *yystr)
  1101. #else
  1102. static YYSIZE_T
  1103. yystrlen (yystr)
  1104. const char *yystr;
  1105. #endif
  1106. {
  1107. YYSIZE_T yylen;
  1108. for (yylen = 0; yystr[yylen]; yylen++)
  1109. continue;
  1110. return yylen;
  1111. }
  1112. # endif
  1113. # endif
  1114. # ifndef yystpcpy
  1115. # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
  1116. # define yystpcpy stpcpy
  1117. # else
  1118. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  1119. YYDEST. */
  1120. #if (defined __STDC__ || defined __C99__FUNC__ \
  1121. || defined __cplusplus || defined _MSC_VER)
  1122. static char *
  1123. yystpcpy (char *yydest, const char *yysrc)
  1124. #else
  1125. static char *
  1126. yystpcpy (yydest, yysrc)
  1127. char *yydest;
  1128. const char *yysrc;
  1129. #endif
  1130. {
  1131. char *yyd = yydest;
  1132. const char *yys = yysrc;
  1133. while ((*yyd++ = *yys++) != '\0')
  1134. continue;
  1135. return yyd - 1;
  1136. }
  1137. # endif
  1138. # endif
  1139. # ifndef yytnamerr
  1140. /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  1141. quotes and backslashes, so that it's suitable for yyerror. The
  1142. heuristic is that double-quoting is unnecessary unless the string
  1143. contains an apostrophe, a comma, or backslash (other than
  1144. backslash-backslash). YYSTR is taken from yytname. If YYRES is
  1145. null, do not copy; instead, return the length of what the result
  1146. would have been. */
  1147. static YYSIZE_T
  1148. yytnamerr (char *yyres, const char *yystr)
  1149. {
  1150. if (*yystr == '"')
  1151. {
  1152. YYSIZE_T yyn = 0;
  1153. char const *yyp = yystr;
  1154. for (;;)
  1155. switch (*++yyp)
  1156. {
  1157. case '\'':
  1158. case ',':
  1159. goto do_not_strip_quotes;
  1160. case '\\':
  1161. if (*++yyp != '\\')
  1162. goto do_not_strip_quotes;
  1163. /* Fall through. */
  1164. default:
  1165. if (yyres)
  1166. yyres[yyn] = *yyp;
  1167. yyn++;
  1168. break;
  1169. case '"':
  1170. if (yyres)
  1171. yyres[yyn] = '\0';
  1172. return yyn;
  1173. }
  1174. do_not_strip_quotes: ;
  1175. }
  1176. if (! yyres)
  1177. return yystrlen (yystr);
  1178. return yystpcpy (yyres, yystr) - yyres;
  1179. }
  1180. # endif
  1181. /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
  1182. about the unexpected token YYTOKEN for the state stack whose top is
  1183. YYSSP.
  1184. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
  1185. not large enough to hold the message. In that case, also set
  1186. *YYMSG_ALLOC to the required number of bytes. Return 2 if the
  1187. required number of bytes is too large to store. */
  1188. static int
  1189. yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
  1190. yytype_int16 *yyssp, int yytoken)
  1191. {
  1192. YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
  1193. YYSIZE_T yysize = yysize0;
  1194. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  1195. /* Internationalized format string. */
  1196. const char *yyformat = YY_NULL;
  1197. /* Arguments of yyformat. */
  1198. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  1199. /* Number of reported tokens (one for the "unexpected", one per
  1200. "expected"). */
  1201. int yycount = 0;
  1202. /* There are many possibilities here to consider:
  1203. - Assume YYFAIL is not used. It's too flawed to consider. See
  1204. <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
  1205. for details. YYERROR is fine as it does not invoke this
  1206. function.
  1207. - If this state is a consistent state with a default action, then
  1208. the only way this function was invoked is if the default action
  1209. is an error action. In that case, don't check for expected
  1210. tokens because there are none.
  1211. - The only way there can be no lookahead present (in yychar) is if
  1212. this state is a consistent state with a default action. Thus,
  1213. detecting the absence of a lookahead is sufficient to determine
  1214. that there is no unexpected or expected token to report. In that
  1215. case, just report a simple "syntax error".
  1216. - Don't assume there isn't a lookahead just because this state is a
  1217. consistent state with a default action. There might have been a
  1218. previous inconsistent state, consistent state with a non-default
  1219. action, or user semantic action that manipulated yychar.
  1220. - Of course, the expected token list depends on states to have
  1221. correct lookahead information, and it depends on the parser not
  1222. to perform extra reductions after fetching a lookahead from the
  1223. scanner and before detecting a syntax error. Thus, state merging
  1224. (from LALR or IELR) and default reductions corrupt the expected
  1225. token list. However, the list is correct for canonical LR with
  1226. one exception: it will still contain any token that will not be
  1227. accepted due to an error action in a later state.
  1228. */
  1229. if (yytoken != YYEMPTY)
  1230. {
  1231. int yyn = yypact[*yyssp];
  1232. yyarg[yycount++] = yytname[yytoken];
  1233. if (!yypact_value_is_default (yyn))
  1234. {
  1235. /* Start YYX at -YYN if negative to avoid negative indexes in
  1236. YYCHECK. In other words, skip the first -YYN actions for
  1237. this state because they are default actions. */
  1238. int yyxbegin = yyn < 0 ? -yyn : 0;
  1239. /* Stay within bounds of both yycheck and yytname. */
  1240. int yychecklim = YYLAST - yyn + 1;
  1241. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  1242. int yyx;
  1243. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  1244. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
  1245. && !yytable_value_is_error (yytable[yyx + yyn]))
  1246. {
  1247. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  1248. {
  1249. yycount = 1;
  1250. yysize = yysize0;
  1251. break;
  1252. }
  1253. yyarg[yycount++] = yytname[yyx];
  1254. {
  1255. YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
  1256. if (! (yysize <= yysize1
  1257. && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  1258. return 2;
  1259. yysize = yysize1;
  1260. }
  1261. }
  1262. }
  1263. }
  1264. switch (yycount)
  1265. {
  1266. # define YYCASE_(N, S) \
  1267. case N: \
  1268. yyformat = S; \
  1269. break
  1270. YYCASE_(0, YY_("syntax error"));
  1271. YYCASE_(1, YY_("syntax error, unexpected %s"));
  1272. YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
  1273. YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
  1274. YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
  1275. YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
  1276. # undef YYCASE_
  1277. }
  1278. {
  1279. YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
  1280. if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  1281. return 2;
  1282. yysize = yysize1;
  1283. }
  1284. if (*yymsg_alloc < yysize)
  1285. {
  1286. *yymsg_alloc = 2 * yysize;
  1287. if (! (yysize <= *yymsg_alloc
  1288. && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
  1289. *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
  1290. return 1;
  1291. }
  1292. /* Avoid sprintf, as that infringes on the user's name space.
  1293. Don't have undefined behavior even if the translation
  1294. produced a string with the wrong number of "%s"s. */
  1295. {
  1296. char *yyp = *yymsg;
  1297. int yyi = 0;
  1298. while ((*yyp = *yyformat) != '\0')
  1299. if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
  1300. {
  1301. yyp += yytnamerr (yyp, yyarg[yyi++]);
  1302. yyformat += 2;
  1303. }
  1304. else
  1305. {
  1306. yyp++;
  1307. yyformat++;
  1308. }
  1309. }
  1310. return 0;
  1311. }
  1312. #endif /* YYERROR_VERBOSE */
  1313. /*-----------------------------------------------.
  1314. | Release the memory associated to this symbol. |
  1315. `-----------------------------------------------*/
  1316. /*ARGSUSED*/
  1317. #if (defined __STDC__ || defined __C99__FUNC__ \
  1318. || defined __cplusplus || defined _MSC_VER)
  1319. static void
  1320. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, stmt_node **program)
  1321. #else
  1322. static void
  1323. yydestruct (yymsg, yytype, yyvaluep, yylocationp, program)
  1324. const char *yymsg;
  1325. int yytype;
  1326. YYSTYPE *yyvaluep;
  1327. YYLTYPE *yylocationp;
  1328. stmt_node **program;
  1329. #endif
  1330. {
  1331. YYUSE (yyvaluep);
  1332. YYUSE (yylocationp);
  1333. YYUSE (program);
  1334. if (!yymsg)
  1335. yymsg = "Deleting";
  1336. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  1337. YYUSE (yytype);
  1338. }
  1339. /*----------.
  1340. | yyparse. |
  1341. `----------*/
  1342. #ifdef YYPARSE_PARAM
  1343. #if (defined __STDC__ || defined __C99__FUNC__ \
  1344. || defined __cplusplus || defined _MSC_VER)
  1345. int
  1346. yyparse (void *YYPARSE_PARAM)
  1347. #else
  1348. int
  1349. yyparse (YYPARSE_PARAM)
  1350. void *YYPARSE_PARAM;
  1351. #endif
  1352. #else /* ! YYPARSE_PARAM */
  1353. #if (defined __STDC__ || defined __C99__FUNC__ \
  1354. || defined __cplusplus || defined _MSC_VER)
  1355. int
  1356. yyparse (stmt_node **program)
  1357. #else
  1358. int
  1359. yyparse (program)
  1360. stmt_node **program;
  1361. #endif
  1362. #endif
  1363. {
  1364. /* The lookahead symbol. */
  1365. int yychar;
  1366. #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
  1367. /* Suppress an incorrect diagnostic about yylval being uninitialized. */
  1368. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  1369. _Pragma ("GCC diagnostic push") \
  1370. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
  1371. _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  1372. # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  1373. _Pragma ("GCC diagnostic pop")
  1374. #else
  1375. /* Default value used for initialization, for pacifying older GCCs
  1376. or non-GCC compilers. */
  1377. static YYSTYPE yyval_default;
  1378. # define YY_INITIAL_VALUE(Value) = Value
  1379. #endif
  1380. static YYLTYPE yyloc_default
  1381. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  1382. = { 1, 1, 1, 1 }
  1383. # endif
  1384. ;
  1385. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1386. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1387. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  1388. #endif
  1389. #ifndef YY_INITIAL_VALUE
  1390. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  1391. #endif
  1392. /* The semantic value of the lookahead symbol. */
  1393. YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
  1394. /* Location data for the lookahead symbol. */
  1395. YYLTYPE yylloc = yyloc_default;
  1396. /* Number of syntax errors so far. */
  1397. int yynerrs;
  1398. int yystate;
  1399. /* Number of tokens to shift before error messages enabled. */
  1400. int yyerrstatus;
  1401. /* The stacks and their tools:
  1402. `yyss': related to states.
  1403. `yyvs': related to semantic values.
  1404. `yyls': related to locations.
  1405. Refer to the stacks through separate pointers, to allow yyoverflow
  1406. to reallocate them elsewhere. */
  1407. /* The state stack. */
  1408. yytype_int16 yyssa[YYINITDEPTH];
  1409. yytype_int16 *yyss;
  1410. yytype_int16 *yyssp;
  1411. /* The semantic value stack. */
  1412. YYSTYPE yyvsa[YYINITDEPTH];
  1413. YYSTYPE *yyvs;
  1414. YYSTYPE *yyvsp;
  1415. /* The location stack. */
  1416. YYLTYPE yylsa[YYINITDEPTH];
  1417. YYLTYPE *yyls;
  1418. YYLTYPE *yylsp;
  1419. /* The locations where the error started and ended. */
  1420. YYLTYPE yyerror_range[3];
  1421. YYSIZE_T yystacksize;
  1422. int yyn;
  1423. int yyresult;
  1424. /* Lookahead token as an internal (translated) token number. */
  1425. int yytoken = 0;
  1426. /* The variables used to return semantic value and location from the
  1427. action routines. */
  1428. YYSTYPE yyval;
  1429. YYLTYPE yyloc;
  1430. #if YYERROR_VERBOSE
  1431. /* Buffer for error messages, and its allocated size. */
  1432. char yymsgbuf[128];
  1433. char *yymsg = yymsgbuf;
  1434. YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
  1435. #endif
  1436. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
  1437. /* The number of symbols on the RHS of the reduced rule.
  1438. Keep to zero when no symbol should be popped. */
  1439. int yylen = 0;
  1440. yyssp = yyss = yyssa;
  1441. yyvsp = yyvs = yyvsa;
  1442. yylsp = yyls = yylsa;
  1443. yystacksize = YYINITDEPTH;
  1444. YYDPRINTF ((stderr, "Starting parse\n"));
  1445. yystate = 0;
  1446. yyerrstatus = 0;
  1447. yynerrs = 0;
  1448. yychar = YYEMPTY; /* Cause a token to be read. */
  1449. yylsp[0] = yylloc;
  1450. goto yysetstate;
  1451. /*------------------------------------------------------------.
  1452. | yynewstate -- Push a new state, which is found in yystate. |
  1453. `------------------------------------------------------------*/
  1454. yynewstate:
  1455. /* In all cases, when you get here, the value and location stacks
  1456. have just been pushed. So pushing a state here evens the stacks. */
  1457. yyssp++;
  1458. yysetstate:
  1459. *yyssp = yystate;
  1460. if (yyss + yystacksize - 1 <= yyssp)
  1461. {
  1462. /* Get the current used size of the three stacks, in elements. */
  1463. YYSIZE_T yysize = yyssp - yyss + 1;
  1464. #ifdef yyoverflow
  1465. {
  1466. /* Give user a chance to reallocate the stack. Use copies of
  1467. these so that the &'s don't force the real ones into
  1468. memory. */
  1469. YYSTYPE *yyvs1 = yyvs;
  1470. yytype_int16 *yyss1 = yyss;
  1471. YYLTYPE *yyls1 = yyls;
  1472. /* Each stack pointer address is followed by the size of the
  1473. data in use in that stack, in bytes. This used to be a
  1474. conditional around just the two extra args, but that might
  1475. be undefined if yyoverflow is a macro. */
  1476. yyoverflow (YY_("memory exhausted"),
  1477. &yyss1, yysize * sizeof (*yyssp),
  1478. &yyvs1, yysize * sizeof (*yyvsp),
  1479. &yyls1, yysize * sizeof (*yylsp),
  1480. &yystacksize);
  1481. yyls = yyls1;
  1482. yyss = yyss1;
  1483. yyvs = yyvs1;
  1484. }
  1485. #else /* no yyoverflow */
  1486. # ifndef YYSTACK_RELOCATE
  1487. goto yyexhaustedlab;
  1488. # else
  1489. /* Extend the stack our own way. */
  1490. if (YYMAXDEPTH <= yystacksize)
  1491. goto yyexhaustedlab;
  1492. yystacksize *= 2;
  1493. if (YYMAXDEPTH < yystacksize)
  1494. yystacksize = YYMAXDEPTH;
  1495. {
  1496. yytype_int16 *yyss1 = yyss;
  1497. union yyalloc *yyptr =
  1498. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  1499. if (! yyptr)
  1500. goto yyexhaustedlab;
  1501. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1502. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1503. YYSTACK_RELOCATE (yyls_alloc, yyls);
  1504. # undef YYSTACK_RELOCATE
  1505. if (yyss1 != yyssa)
  1506. YYSTACK_FREE (yyss1);
  1507. }
  1508. # endif
  1509. #endif /* no yyoverflow */
  1510. yyssp = yyss + yysize - 1;
  1511. yyvsp = yyvs + yysize - 1;
  1512. yylsp = yyls + yysize - 1;
  1513. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  1514. (unsigned long int) yystacksize));
  1515. if (yyss + yystacksize - 1 <= yyssp)
  1516. YYABORT;
  1517. }
  1518. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1519. if (yystate == YYFINAL)
  1520. YYACCEPT;
  1521. goto yybackup;
  1522. /*-----------.
  1523. | yybackup. |
  1524. `-----------*/
  1525. yybackup:
  1526. /* Do appropriate processing given the current state. Read a
  1527. lookahead token if we need one and don't already have one. */
  1528. /* First try to decide what to do without reference to lookahead token. */
  1529. yyn = yypact[yystate];
  1530. if (yypact_value_is_default (yyn))
  1531. goto yydefault;
  1532. /* Not known => get a lookahead token if don't already have one. */
  1533. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  1534. if (yychar == YYEMPTY)
  1535. {
  1536. YYDPRINTF ((stderr, "Reading a token: "));
  1537. yychar = YYLEX;
  1538. }
  1539. if (yychar <= YYEOF)
  1540. {
  1541. yychar = yytoken = YYEOF;
  1542. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1543. }
  1544. else
  1545. {
  1546. yytoken = YYTRANSLATE (yychar);
  1547. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1548. }
  1549. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1550. detect an error, take that action. */
  1551. yyn += yytoken;
  1552. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1553. goto yydefault;
  1554. yyn = yytable[yyn];
  1555. if (yyn <= 0)
  1556. {
  1557. if (yytable_value_is_error (yyn))
  1558. goto yyerrlab;
  1559. yyn = -yyn;
  1560. goto yyreduce;
  1561. }
  1562. /* Count tokens shifted since error; after three, turn off error
  1563. status. */
  1564. if (yyerrstatus)
  1565. yyerrstatus--;
  1566. /* Shift the lookahead token. */
  1567. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1568. /* Discard the shifted token. */
  1569. yychar = YYEMPTY;
  1570. yystate = yyn;
  1571. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1572. *++yyvsp = yylval;
  1573. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1574. *++yylsp = yylloc;
  1575. goto yynewstate;
  1576. /*-----------------------------------------------------------.
  1577. | yydefault -- do the default action for the current state. |
  1578. `-----------------------------------------------------------*/
  1579. yydefault:
  1580. yyn = yydefact[yystate];
  1581. if (yyn == 0)
  1582. goto yyerrlab;
  1583. goto yyreduce;
  1584. /*-----------------------------.
  1585. | yyreduce -- Do a reduction. |
  1586. `-----------------------------*/
  1587. yyreduce:
  1588. /* yyn is the number of a rule to reduce with. */
  1589. yylen = yyr2[yyn];
  1590. /* If YYLEN is nonzero, implement the default value of the action:
  1591. `$$ = $1'.
  1592. Otherwise, the following line sets YYVAL to garbage.
  1593. This behavior is undocumented and Bison
  1594. users should not rely upon it. Assigning to YYVAL
  1595. unconditionally makes the parser a bit smaller, and it avoids a
  1596. GCC warning that YYVAL may be used uninitialized. */
  1597. yyval = yyvsp[1-yylen];
  1598. /* Default location. */
  1599. YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  1600. YY_REDUCE_PRINT (yyn);
  1601. switch (yyn)
  1602. {
  1603. case 2:
  1604. /* Line 1787 of yacc.c */
  1605. #line 33 "parser.y"
  1606. { *program = AS_ST((yyvsp[(1) - (1)])); }
  1607. break;
  1608. case 3:
  1609. /* Line 1787 of yacc.c */
  1610. #line 37 "parser.y"
  1611. {
  1612. stmtlist_node *cur = AS_ST((yyvsp[(1) - (2)]))->stmtlist;
  1613. while(cur->next) cur = cur->next;
  1614. if(cur->stmt) {
  1615. cur->next = NEW(stmtlist_node);
  1616. cur = cur->next;
  1617. }
  1618. cur->stmt = (yyvsp[(2) - (2)]);
  1619. cur->next = NULL;
  1620. (yyval) = (yyvsp[(1) - (2)]);
  1621. }
  1622. break;
  1623. case 4:
  1624. /* Line 1787 of yacc.c */
  1625. #line 48 "parser.y"
  1626. {
  1627. (yyval) = NEW_ST();
  1628. AS_ST((yyval))->type = ST_LIST;
  1629. AS_ST((yyval))->stmtlist = NEW(stmtlist_node);
  1630. AS_ST((yyval))->stmtlist->stmt = NULL;
  1631. AS_ST((yyval))->stmtlist->next = NULL;
  1632. }
  1633. break;
  1634. case 5:
  1635. /* Line 1787 of yacc.c */
  1636. #line 58 "parser.y"
  1637. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_EXPR; AS_ST((yyval))->expr = (yyvsp[(1) - (1)]); }
  1638. break;
  1639. case 6:
  1640. /* Line 1787 of yacc.c */
  1641. #line 59 "parser.y"
  1642. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_IFELSE; AS_ST((yyval))->ifelse = NEW(ifelse_node); AS_ST((yyval))->ifelse->cond = (yyvsp[(2) - (5)]); AS_ST((yyval))->ifelse->iftrue = (yyvsp[(4) - (5)]); AS_ST((yyval))->ifelse->iffalse = NULL; }
  1643. break;
  1644. case 7:
  1645. /* Line 1787 of yacc.c */
  1646. #line 60 "parser.y"
  1647. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_IFELSE; AS_ST((yyval))->ifelse = NEW(ifelse_node); AS_ST((yyval))->ifelse->cond = (yyvsp[(2) - (7)]); AS_ST((yyval))->ifelse->iftrue = (yyvsp[(4) - (7)]); AS_ST((yyval))->ifelse->iffalse = (yyvsp[(6) - (7)]); }
  1648. break;
  1649. case 8:
  1650. /* Line 1787 of yacc.c */
  1651. #line 61 "parser.y"
  1652. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_LOOP; AS_ST((yyval))->loop = NEW(loop_node); AS_ST((yyval))->loop->cond = (yyvsp[(2) - (5)]); AS_ST((yyval))->loop->loop = (yyvsp[(4) - (5)]); }
  1653. break;
  1654. case 9:
  1655. /* Line 1787 of yacc.c */
  1656. #line 62 "parser.y"
  1657. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_ITER; AS_ST((yyval))->iter = NEW(iter_node); AS_ST((yyval))->iter->var = (yyvsp[(2) - (7)]); AS_ST((yyval))->iter->iter = (yyvsp[(4) - (7)]); AS_ST((yyval))->iter->loop = (yyvsp[(6) - (7)]); }
  1658. break;
  1659. case 10:
  1660. /* Line 1787 of yacc.c */
  1661. #line 63 "parser.y"
  1662. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_RET; AS_ST((yyval))->ret = NEW(ret_node); AS_ST((yyval))->ret->ret = (yyvsp[(2) - (2)]); }
  1663. break;
  1664. case 11:
  1665. /* Line 1787 of yacc.c */
  1666. #line 64 "parser.y"
  1667. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_RET; AS_ST((yyval))->ret = NEW(ret_node); AS_ST((yyval))->ret->ret = NULL; }
  1668. break;
  1669. case 12:
  1670. /* Line 1787 of yacc.c */
  1671. #line 65 "parser.y"
  1672. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_BREAK; }
  1673. break;
  1674. case 13:
  1675. /* Line 1787 of yacc.c */
  1676. #line 66 "parser.y"
  1677. { (yyval) = NEW_ST(); SET_LOC(AS_ST((yyval)), (yyloc)); AS_ST((yyval))->type = ST_CONT; }
  1678. break;
  1679. case 14:
  1680. /* Line 1787 of yacc.c */
  1681. #line 67 "parser.y"
  1682. { (yyval) = (yyvsp[(1) - (2)]); }
  1683. break;
  1684. case 15:
  1685. /* Line 1787 of yacc.c */
  1686. #line 71 "parser.y"
  1687. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_ASSIGN; AS_EX((yyval))->assign = NEW(assign_node); AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]); AS_EX((yyval))->assign->value = (yyvsp[(3) - (3)]); }
  1688. break;
  1689. case 16:
  1690. /* Line 1787 of yacc.c */
  1691. #line 72 "parser.y"
  1692. {
  1693. (yyval) = NEW_EX();
  1694. AS_EX((yyval))->type = EX_ASSIGN;
  1695. AS_EX((yyval))->assign = NEW(assign_node);
  1696. AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]);
  1697. MAKE_REF_BINOP(AS_EX((yyval))->assign->value, OP_ADD, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
  1698. }
  1699. break;
  1700. case 17:
  1701. /* Line 1787 of yacc.c */
  1702. #line 79 "parser.y"
  1703. {
  1704. (yyval) = NEW_EX();
  1705. AS_EX((yyval))->type = EX_ASSIGN;
  1706. AS_EX((yyval))->assign = NEW(assign_node);
  1707. AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]);
  1708. MAKE_REF_BINOP(AS_EX((yyval))->assign->value, OP_SUB, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
  1709. }
  1710. break;
  1711. case 18:
  1712. /* Line 1787 of yacc.c */
  1713. #line 86 "parser.y"
  1714. {
  1715. (yyval) = NEW_EX();
  1716. AS_EX((yyval))->type = EX_ASSIGN;
  1717. AS_EX((yyval))->assign = NEW(assign_node);
  1718. AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]);
  1719. MAKE_REF_BINOP(AS_EX((yyval))->assign->value, OP_MUL, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
  1720. }
  1721. break;
  1722. case 19:
  1723. /* Line 1787 of yacc.c */
  1724. #line 93 "parser.y"
  1725. {
  1726. (yyval) = NEW_EX();
  1727. AS_EX((yyval))->type = EX_ASSIGN;
  1728. AS_EX((yyval))->assign = NEW(assign_node);
  1729. AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]);
  1730. MAKE_REF_BINOP(AS_EX((yyval))->assign->value, OP_DIV, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
  1731. }
  1732. break;
  1733. case 20:
  1734. /* Line 1787 of yacc.c */
  1735. #line 100 "parser.y"
  1736. {
  1737. (yyval) = NEW_EX();
  1738. AS_EX((yyval))->type = EX_ASSIGN;
  1739. AS_EX((yyval))->assign = NEW(assign_node);
  1740. AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]);
  1741. MAKE_REF_BINOP(AS_EX((yyval))->assign->value, OP_POW, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
  1742. }
  1743. break;
  1744. case 21:
  1745. /* Line 1787 of yacc.c */
  1746. #line 107 "parser.y"
  1747. {
  1748. (yyval) = NEW_EX();
  1749. AS_EX((yyval))->type = EX_ASSIGN;
  1750. AS_EX((yyval))->assign = NEW(assign_node);
  1751. AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]);
  1752. MAKE_REF_BINOP(AS_EX((yyval))->assign->value, OP_BAND, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
  1753. }
  1754. break;
  1755. case 22:
  1756. /* Line 1787 of yacc.c */
  1757. #line 114 "parser.y"
  1758. {
  1759. (yyval) = NEW_EX();
  1760. AS_EX((yyval))->type = EX_ASSIGN;
  1761. AS_EX((yyval))->assign = NEW(assign_node);
  1762. AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]);
  1763. MAKE_REF_BINOP(AS_EX((yyval))->assign->value, OP_BOR, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
  1764. }
  1765. break;
  1766. case 23:
  1767. /* Line 1787 of yacc.c */
  1768. #line 121 "parser.y"
  1769. {
  1770. (yyval) = NEW_EX();
  1771. AS_EX((yyval))->type = EX_ASSIGN;
  1772. AS_EX((yyval))->assign = NEW(assign_node);
  1773. AS_EX((yyval))->assign->ident = (yyvsp[(1) - (3)]);
  1774. MAKE_REF_BINOP(AS_EX((yyval))->assign->value, OP_BXOR, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]));
  1775. }
  1776. break;
  1777. case 24:
  1778. /* Line 1787 of yacc.c */
  1779. #line 128 "parser.y"
  1780. {
  1781. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1782. yyerror("Assigning to non-indexing expression");
  1783. YYABORT;
  1784. }
  1785. (yyval) = NEW_EX();
  1786. AS_EX((yyval))->type = EX_SETINDEX;
  1787. AS_EX((yyval))->setindex = NEW(setindex_node);
  1788. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1789. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1790. AS_EX((yyval))->setindex->value = (yyvsp[(3) - (3)]);
  1791. //ex_free(AS_EX($1));
  1792. }
  1793. break;
  1794. case 25:
  1795. /* Line 1787 of yacc.c */
  1796. #line 141 "parser.y"
  1797. {
  1798. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1799. yyerror("Assigning to non-indexing expression");
  1800. YYABORT;
  1801. }
  1802. (yyval) = NEW_EX();
  1803. AS_EX((yyval))->type = EX_SETINDEX;
  1804. AS_EX((yyval))->setindex = NEW(setindex_node);
  1805. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1806. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1807. MAKE_IDX_BINOP(AS_EX((yyval))->setindex->value, OP_ADD, AS_EX((yyvsp[(1) - (3)]))->index->expr, AS_EX((yyvsp[(1) - (3)]))->index->index, (yyvsp[(3) - (3)]));
  1808. //ex_free(AS_EX($1));
  1809. }
  1810. break;
  1811. case 26:
  1812. /* Line 1787 of yacc.c */
  1813. #line 154 "parser.y"
  1814. {
  1815. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1816. yyerror("Assigning to non-indexing expression");
  1817. YYABORT;
  1818. }
  1819. (yyval) = NEW_EX();
  1820. AS_EX((yyval))->type = EX_SETINDEX;
  1821. AS_EX((yyval))->setindex = NEW(setindex_node);
  1822. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1823. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1824. MAKE_IDX_BINOP(AS_EX((yyval))->setindex->value, OP_SUB, AS_EX((yyvsp[(1) - (3)]))->index->expr, AS_EX((yyvsp[(1) - (3)]))->index->index, (yyvsp[(3) - (3)]));
  1825. //ex_free(AS_EX($1));
  1826. }
  1827. break;
  1828. case 27:
  1829. /* Line 1787 of yacc.c */
  1830. #line 167 "parser.y"
  1831. {
  1832. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1833. yyerror("Assigning to non-indexing expression");
  1834. YYABORT;
  1835. }
  1836. (yyval) = NEW_EX();
  1837. AS_EX((yyval))->type = EX_SETINDEX;
  1838. AS_EX((yyval))->setindex = NEW(setindex_node);
  1839. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1840. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1841. MAKE_IDX_BINOP(AS_EX((yyval))->setindex->value, OP_MUL, AS_EX((yyvsp[(1) - (3)]))->index->expr, AS_EX((yyvsp[(1) - (3)]))->index->index, (yyvsp[(3) - (3)]));
  1842. //ex_free(AS_EX($1));
  1843. }
  1844. break;
  1845. case 28:
  1846. /* Line 1787 of yacc.c */
  1847. #line 180 "parser.y"
  1848. {
  1849. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1850. yyerror("Assigning to non-indexing expression");
  1851. YYABORT;
  1852. }
  1853. (yyval) = NEW_EX();
  1854. AS_EX((yyval))->type = EX_SETINDEX;
  1855. AS_EX((yyval))->setindex = NEW(setindex_node);
  1856. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1857. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1858. MAKE_IDX_BINOP(AS_EX((yyval))->setindex->value, OP_DIV, AS_EX((yyvsp[(1) - (3)]))->index->expr, AS_EX((yyvsp[(1) - (3)]))->index->index, (yyvsp[(3) - (3)]));
  1859. //ex_free(AS_EX($1));
  1860. }
  1861. break;
  1862. case 29:
  1863. /* Line 1787 of yacc.c */
  1864. #line 193 "parser.y"
  1865. {
  1866. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1867. yyerror("Assigning to non-indexing expression");
  1868. YYABORT;
  1869. }
  1870. (yyval) = NEW_EX();
  1871. AS_EX((yyval))->type = EX_SETINDEX;
  1872. AS_EX((yyval))->setindex = NEW(setindex_node);
  1873. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1874. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1875. MAKE_IDX_BINOP(AS_EX((yyval))->setindex->value, OP_POW, AS_EX((yyvsp[(1) - (3)]))->index->expr, AS_EX((yyvsp[(1) - (3)]))->index->index, (yyvsp[(3) - (3)]));
  1876. //ex_free(AS_EX($1));
  1877. }
  1878. break;
  1879. case 30:
  1880. /* Line 1787 of yacc.c */
  1881. #line 206 "parser.y"
  1882. {
  1883. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1884. yyerror("Assigning to non-indexing expression");
  1885. YYABORT;
  1886. }
  1887. (yyval) = NEW_EX();
  1888. AS_EX((yyval))->type = EX_SETINDEX;
  1889. AS_EX((yyval))->setindex = NEW(setindex_node);
  1890. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1891. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1892. MAKE_IDX_BINOP(AS_EX((yyval))->setindex->value, OP_BAND, AS_EX((yyvsp[(1) - (3)]))->index->expr, AS_EX((yyvsp[(1) - (3)]))->index->index, (yyvsp[(3) - (3)]));
  1893. //ex_free(AS_EX($1));
  1894. }
  1895. break;
  1896. case 31:
  1897. /* Line 1787 of yacc.c */
  1898. #line 219 "parser.y"
  1899. {
  1900. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1901. yyerror("Assigning to non-indexing expression");
  1902. YYABORT;
  1903. }
  1904. (yyval) = NEW_EX();
  1905. AS_EX((yyval))->type = EX_SETINDEX;
  1906. AS_EX((yyval))->setindex = NEW(setindex_node);
  1907. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1908. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1909. MAKE_IDX_BINOP(AS_EX((yyval))->setindex->value, OP_BOR, AS_EX((yyvsp[(1) - (3)]))->index->expr, AS_EX((yyvsp[(1) - (3)]))->index->index, (yyvsp[(3) - (3)]));
  1910. //ex_free(AS_EX($1));
  1911. }
  1912. break;
  1913. case 32:
  1914. /* Line 1787 of yacc.c */
  1915. #line 232 "parser.y"
  1916. {
  1917. if(AS_EX((yyvsp[(1) - (3)]))->type != EX_INDEX) {
  1918. yyerror("Assigning to non-indexing expression");
  1919. YYABORT;
  1920. }
  1921. (yyval) = NEW_EX();
  1922. AS_EX((yyval))->type = EX_SETINDEX;
  1923. AS_EX((yyval))->setindex = NEW(setindex_node);
  1924. AS_EX((yyval))->setindex->expr = AS_EX((yyvsp[(1) - (3)]))->index->expr;
  1925. AS_EX((yyval))->setindex->index = AS_EX((yyvsp[(1) - (3)]))->index->index;
  1926. MAKE_IDX_BINOP(AS_EX((yyval))->setindex->value, OP_BXOR, AS_EX((yyvsp[(1) - (3)]))->index->expr, AS_EX((yyvsp[(1) - (3)]))->index->index, (yyvsp[(3) - (3)]));
  1927. //ex_free(AS_EX($1));
  1928. }
  1929. break;
  1930. case 33:
  1931. /* Line 1787 of yacc.c */
  1932. #line 245 "parser.y"
  1933. { (yyval) = (yyvsp[(1) - (1)]); }
  1934. break;
  1935. case 34:
  1936. /* Line 1787 of yacc.c */
  1937. #line 249 "parser.y"
  1938. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_LAND; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1939. break;
  1940. case 35:
  1941. /* Line 1787 of yacc.c */
  1942. #line 250 "parser.y"
  1943. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_LOR; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1944. break;
  1945. case 36:
  1946. /* Line 1787 of yacc.c */
  1947. #line 251 "parser.y"
  1948. { (yyval) = (yyvsp[(1) - (1)]); }
  1949. break;
  1950. case 37:
  1951. /* Line 1787 of yacc.c */
  1952. #line 255 "parser.y"
  1953. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_UNOP; AS_EX((yyval))->unop = NEW(unop_node); AS_EX((yyval))->unop->type = OP_LNOT; AS_EX((yyval))->unop->expr = (yyvsp[(2) - (2)]); }
  1954. break;
  1955. case 38:
  1956. /* Line 1787 of yacc.c */
  1957. #line 256 "parser.y"
  1958. { (yyval) = (yyvsp[(1) - (1)]); }
  1959. break;
  1960. case 39:
  1961. /* Line 1787 of yacc.c */
  1962. #line 260 "parser.y"
  1963. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_EQUAL; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1964. break;
  1965. case 40:
  1966. /* Line 1787 of yacc.c */
  1967. #line 261 "parser.y"
  1968. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_LESS; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1969. break;
  1970. case 41:
  1971. /* Line 1787 of yacc.c */
  1972. #line 262 "parser.y"
  1973. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_GREATER; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1974. break;
  1975. case 42:
  1976. /* Line 1787 of yacc.c */
  1977. #line 263 "parser.y"
  1978. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_LESSEQ; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1979. break;
  1980. case 43:
  1981. /* Line 1787 of yacc.c */
  1982. #line 264 "parser.y"
  1983. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_GREATEREQ; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1984. break;
  1985. case 44:
  1986. /* Line 1787 of yacc.c */
  1987. #line 265 "parser.y"
  1988. { (yyval) = (yyvsp[(1) - (1)]); }
  1989. break;
  1990. case 45:
  1991. /* Line 1787 of yacc.c */
  1992. #line 269 "parser.y"
  1993. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_ADD; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1994. break;
  1995. case 46:
  1996. /* Line 1787 of yacc.c */
  1997. #line 270 "parser.y"
  1998. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_SUB; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  1999. break;
  2000. case 47:
  2001. /* Line 1787 of yacc.c */
  2002. #line 271 "parser.y"
  2003. { (yyval) = (yyvsp[(1) - (1)]); }
  2004. break;
  2005. case 48:
  2006. /* Line 1787 of yacc.c */
  2007. #line 275 "parser.y"
  2008. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_MUL; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2009. break;
  2010. case 49:
  2011. /* Line 1787 of yacc.c */
  2012. #line 276 "parser.y"
  2013. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_DIV; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2014. break;
  2015. case 50:
  2016. /* Line 1787 of yacc.c */
  2017. #line 277 "parser.y"
  2018. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_MOD; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2019. break;
  2020. case 51:
  2021. /* Line 1787 of yacc.c */
  2022. #line 278 "parser.y"
  2023. { (yyval) = (yyvsp[(1) - (1)]); }
  2024. break;
  2025. case 52:
  2026. /* Line 1787 of yacc.c */
  2027. #line 282 "parser.y"
  2028. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_POW; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2029. break;
  2030. case 53:
  2031. /* Line 1787 of yacc.c */
  2032. #line 283 "parser.y"
  2033. { (yyval) = (yyvsp[(1) - (1)]); }
  2034. break;
  2035. case 54:
  2036. /* Line 1787 of yacc.c */
  2037. #line 287 "parser.y"
  2038. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_BAND; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2039. break;
  2040. case 55:
  2041. /* Line 1787 of yacc.c */
  2042. #line 288 "parser.y"
  2043. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_BOR; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2044. break;
  2045. case 56:
  2046. /* Line 1787 of yacc.c */
  2047. #line 289 "parser.y"
  2048. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_BXOR; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2049. break;
  2050. case 57:
  2051. /* Line 1787 of yacc.c */
  2052. #line 290 "parser.y"
  2053. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_LSHIFT; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2054. break;
  2055. case 58:
  2056. /* Line 1787 of yacc.c */
  2057. #line 291 "parser.y"
  2058. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_BINOP; AS_EX((yyval))->binop = NEW(binop_node); AS_EX((yyval))->binop->type = OP_RSHIFT; AS_EX((yyval))->binop->left = (yyvsp[(1) - (3)]); AS_EX((yyval))->binop->right = (yyvsp[(3) - (3)]); }
  2059. break;
  2060. case 59:
  2061. /* Line 1787 of yacc.c */
  2062. #line 292 "parser.y"
  2063. { (yyval) = (yyvsp[(1) - (1)]); }
  2064. break;
  2065. case 60:
  2066. /* Line 1787 of yacc.c */
  2067. #line 296 "parser.y"
  2068. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_UNOP; AS_EX((yyval))->unop = NEW(unop_node); AS_EX((yyval))->unop->type = OP_BNOT; AS_EX((yyval))->unop->expr = (yyvsp[(2) - (2)]); }
  2069. break;
  2070. case 61:
  2071. /* Line 1787 of yacc.c */
  2072. #line 297 "parser.y"
  2073. { (yyval) = (yyvsp[(1) - (1)]); }
  2074. break;
  2075. case 62:
  2076. /* Line 1787 of yacc.c */
  2077. #line 301 "parser.y"
  2078. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_UNOP; AS_EX((yyval))->unop = NEW(unop_node); AS_EX((yyval))->unop->type = OP_LEN; AS_EX((yyval))->unop->expr = (yyvsp[(2) - (2)]); }
  2079. break;
  2080. case 63:
  2081. /* Line 1787 of yacc.c */
  2082. #line 302 "parser.y"
  2083. { (yyval) = (yyvsp[(1) - (1)]); }
  2084. break;
  2085. case 64:
  2086. /* Line 1787 of yacc.c */
  2087. #line 306 "parser.y"
  2088. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_CALL; AS_EX((yyval))->call = NEW(call_node); AS_EX((yyval))->call->expr = (yyvsp[(1) - (4)]); AS_EX((yyval))->call->args = (yyvsp[(3) - (4)]); }
  2089. break;
  2090. case 65:
  2091. /* Line 1787 of yacc.c */
  2092. #line 307 "parser.y"
  2093. {
  2094. (yyval) = NEW_EX();
  2095. AS_EX((yyval))->type = EX_CALL;
  2096. AS_EX((yyval))->call = NEW(call_node);
  2097. AS_EX((yyval))->call->expr = NEW_EX();
  2098. AS_EX((yyval))->call->expr->type = EX_INDEX;
  2099. AS_EX((yyval))->call->expr->index = NEW(index_node);
  2100. AS_EX((yyval))->call->expr->index->expr = (yyvsp[(1) - (6)]);
  2101. AS_EX((yyval))->call->expr->index->index = NEW_EX();
  2102. AS_EX((yyval))->call->expr->index->index->type = EX_LIT;
  2103. AS_EX((yyval))->call->expr->index->index->lit = NEW(lit_node);
  2104. AS_EX((yyval))->call->expr->index->index->lit->type = LIT_STRING;
  2105. AS_EX((yyval))->call->expr->index->index->lit->str = (yyvsp[(3) - (6)]);
  2106. AS_EX((yyval))->call->args = NEW(exprlist_node);
  2107. AS_EX((yyval))->call->args->expr = (yyvsp[(1) - (6)]);
  2108. AS_EX((yyval))->call->args->next = (yyvsp[(5) - (6)]);
  2109. }
  2110. break;
  2111. case 66:
  2112. /* Line 1787 of yacc.c */
  2113. #line 324 "parser.y"
  2114. { (yyval) = (yyvsp[(1) - (1)]); }
  2115. break;
  2116. case 67:
  2117. /* Line 1787 of yacc.c */
  2118. #line 328 "parser.y"
  2119. {
  2120. (yyval) = NEW_EX();
  2121. AS_EX((yyval))->type = EX_FUNCDECL;
  2122. AS_EX((yyval))->funcdecl = NEW(funcdecl_node);
  2123. AS_EX((yyval))->funcdecl->name = (yyvsp[(2) - (7)]);
  2124. AS_EX((yyval))->funcdecl->args = (yyvsp[(4) - (7)]);
  2125. AS_EX((yyval))->funcdecl->body = (yyvsp[(6) - (7)]);
  2126. }
  2127. break;
  2128. case 68:
  2129. /* Line 1787 of yacc.c */
  2130. #line 336 "parser.y"
  2131. {
  2132. (yyval) = NEW_EX();
  2133. AS_EX((yyval))->type = EX_FUNCDECL;
  2134. AS_EX((yyval))->funcdecl = NEW(funcdecl_node);
  2135. AS_EX((yyval))->funcdecl->name = NULL;
  2136. AS_EX((yyval))->funcdecl->args = (yyvsp[(3) - (6)]);
  2137. AS_EX((yyval))->funcdecl->body = (yyvsp[(5) - (6)]);
  2138. }
  2139. break;
  2140. case 69:
  2141. /* Line 1787 of yacc.c */
  2142. #line 344 "parser.y"
  2143. { (yyval) = (yyvsp[(1) - (1)]); }
  2144. break;
  2145. case 70:
  2146. /* Line 1787 of yacc.c */
  2147. #line 348 "parser.y"
  2148. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_INDEX; AS_EX((yyval))->index = NEW(index_node); AS_EX((yyval))->index->expr = (yyvsp[(1) - (4)]); AS_EX((yyval))->index->index = (yyvsp[(3) - (4)]); }
  2149. break;
  2150. case 71:
  2151. /* Line 1787 of yacc.c */
  2152. #line 349 "parser.y"
  2153. {
  2154. (yyval) = NEW_EX();
  2155. AS_EX((yyval))->type = EX_INDEX;
  2156. AS_EX((yyval))->index = NEW(index_node);
  2157. AS_EX((yyval))->index->expr = (yyvsp[(1) - (3)]);
  2158. AS_EX((yyval))->index->index = NEW_EX();
  2159. AS_EX((yyval))->index->index->type = EX_LIT;
  2160. AS_EX((yyval))->index->index->lit = NEW(lit_node);
  2161. AS_EX((yyval))->index->index->lit->type = LIT_STRING;
  2162. AS_EX((yyval))->index->index->lit->str = (yyvsp[(3) - (3)]);
  2163. }
  2164. break;
  2165. case 72:
  2166. /* Line 1787 of yacc.c */
  2167. #line 360 "parser.y"
  2168. { (yyval) = (yyvsp[(1) - (1)]); }
  2169. break;
  2170. case 73:
  2171. /* Line 1787 of yacc.c */
  2172. #line 364 "parser.y"
  2173. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_INDEX; AS_EX((yyval))->index = NEW(index_node); AS_EX((yyval))->index->expr = (yyvsp[(1) - (4)]); AS_EX((yyval))->index->index = (yyvsp[(3) - (4)]); }
  2174. break;
  2175. case 74:
  2176. /* Line 1787 of yacc.c */
  2177. #line 365 "parser.y"
  2178. {
  2179. (yyval) = NEW_EX();
  2180. AS_EX((yyval))->type = EX_INDEX;
  2181. AS_EX((yyval))->index = NEW(index_node);
  2182. AS_EX((yyval))->index->expr = (yyvsp[(1) - (3)]);
  2183. AS_EX((yyval))->index->index = NEW_EX();
  2184. AS_EX((yyval))->index->index->type = EX_LIT;
  2185. AS_EX((yyval))->index->index->lit = NEW(lit_node);
  2186. AS_EX((yyval))->index->index->lit->type = LIT_STRING;
  2187. AS_EX((yyval))->index->index->lit->str = (yyvsp[(3) - (3)]);
  2188. }
  2189. break;
  2190. case 75:
  2191. /* Line 1787 of yacc.c */
  2192. #line 379 "parser.y"
  2193. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_REF; AS_EX((yyval))->ref = NEW(ref_node); AS_EX((yyval))->ref->ident = (yyvsp[(1) - (1)]); }
  2194. break;
  2195. case 76:
  2196. /* Line 1787 of yacc.c */
  2197. #line 380 "parser.y"
  2198. { (yyval) = (yyvsp[(1) - (1)]); }
  2199. break;
  2200. case 77:
  2201. /* Line 1787 of yacc.c */
  2202. #line 384 "parser.y"
  2203. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_LIT; AS_EX((yyval))->lit = NEW(lit_node); AS_EX((yyval))->lit->type = LIT_INT; AS_EX((yyval))->lit->ival = *AS((yyvsp[(1) - (1)]), long); free((yyvsp[(1) - (1)])); }
  2204. break;
  2205. case 78:
  2206. /* Line 1787 of yacc.c */
  2207. #line 385 "parser.y"
  2208. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_LIT; AS_EX((yyval))->lit = NEW(lit_node); AS_EX((yyval))->lit->type = LIT_INT; AS_EX((yyval))->lit->ival = -(*AS((yyvsp[(2) - (2)]), long)); free((yyvsp[(2) - (2)])); }
  2209. break;
  2210. case 79:
  2211. /* Line 1787 of yacc.c */
  2212. #line 386 "parser.y"
  2213. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_LIT; AS_EX((yyval))->lit = NEW(lit_node); AS_EX((yyval))->lit->type = LIT_FLOAT; AS_EX((yyval))->lit->fval = *AS((yyvsp[(1) - (1)]), double); free((yyvsp[(1) - (1)])); }
  2214. break;
  2215. case 80:
  2216. /* Line 1787 of yacc.c */
  2217. #line 387 "parser.y"
  2218. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_LIT; AS_EX((yyval))->lit = NEW(lit_node); AS_EX((yyval))->lit->type = LIT_STRING; AS_EX((yyval))->lit->str = (yyvsp[(1) - (1)]); }
  2219. break;
  2220. case 81:
  2221. /* Line 1787 of yacc.c */
  2222. #line 388 "parser.y"
  2223. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_LIT; AS_EX((yyval))->lit = NEW(lit_node); AS_EX((yyval))->lit->type = LIT_NONE; }
  2224. break;
  2225. case 82:
  2226. /* Line 1787 of yacc.c */
  2227. #line 389 "parser.y"
  2228. { (yyval) = (yyvsp[(1) - (1)]); }
  2229. break;
  2230. case 83:
  2231. /* Line 1787 of yacc.c */
  2232. #line 393 "parser.y"
  2233. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_LISTGEN; AS_EX((yyval))->listgen = NEW(listgen_node); AS_EX((yyval))->listgen->list = (yyvsp[(2) - (3)]); }
  2234. break;
  2235. case 84:
  2236. /* Line 1787 of yacc.c */
  2237. #line 394 "parser.y"
  2238. { (yyval) = NEW_EX(); AS_EX((yyval))->type = EX_MAPGEN; AS_EX((yyval))->mapgen = NEW(mapgen_node); AS_EX((yyval))->mapgen->map = (yyvsp[(2) - (3)]); }
  2239. break;
  2240. case 85:
  2241. /* Line 1787 of yacc.c */
  2242. #line 395 "parser.y"
  2243. { (yyval) = (yyvsp[(1) - (1)]); }
  2244. break;
  2245. case 86:
  2246. /* Line 1787 of yacc.c */
  2247. #line 399 "parser.y"
  2248. { (yyval) = (yyvsp[(2) - (3)]); }
  2249. break;
  2250. case 87:
  2251. /* Line 1787 of yacc.c */
  2252. #line 403 "parser.y"
  2253. { (yyval) = NULL; }
  2254. break;
  2255. case 88:
  2256. /* Line 1787 of yacc.c */
  2257. #line 404 "parser.y"
  2258. {
  2259. (yyval) = NEW(exprlist_node);
  2260. AS((yyval), exprlist_node)->expr = (yyvsp[(1) - (1)]);
  2261. AS((yyval), exprlist_node)->next = NULL;
  2262. }
  2263. break;
  2264. case 89:
  2265. /* Line 1787 of yacc.c */
  2266. #line 409 "parser.y"
  2267. { (yyval) = (yyvsp[(1) - (2)]); }
  2268. break;
  2269. case 90:
  2270. /* Line 1787 of yacc.c */
  2271. #line 410 "parser.y"
  2272. {
  2273. exprlist_node *cur = (yyvsp[(1) - (2)]);
  2274. while(cur->next) cur = cur->next;
  2275. cur->next = NEW(exprlist_node);
  2276. cur = cur->next;
  2277. cur->expr = (yyvsp[(2) - (2)]);
  2278. cur->next = NULL;
  2279. (yyval) = (yyvsp[(1) - (2)]);
  2280. }
  2281. break;
  2282. case 91:
  2283. /* Line 1787 of yacc.c */
  2284. #line 422 "parser.y"
  2285. { (yyval) = NULL; }
  2286. break;
  2287. case 92:
  2288. /* Line 1787 of yacc.c */
  2289. #line 423 "parser.y"
  2290. {
  2291. (yyval) = NEW(identlist_node);
  2292. AS((yyval), identlist_node)->ident = (yyvsp[(1) - (1)]);
  2293. AS((yyval), identlist_node)->next = NULL;
  2294. }
  2295. break;
  2296. case 93:
  2297. /* Line 1787 of yacc.c */
  2298. #line 428 "parser.y"
  2299. { (yyval) = (yyvsp[(1) - (2)]); }
  2300. break;
  2301. case 94:
  2302. /* Line 1787 of yacc.c */
  2303. #line 429 "parser.y"
  2304. {
  2305. identlist_node *cur = (yyvsp[(1) - (2)]);
  2306. while(cur->next) cur = cur->next;
  2307. cur->next = NEW(identlist_node);
  2308. cur = cur->next;
  2309. cur->ident = (yyvsp[(2) - (2)]);
  2310. cur->next = NULL;
  2311. (yyval) = (yyvsp[(1) - (2)]);
  2312. }
  2313. break;
  2314. case 95:
  2315. /* Line 1787 of yacc.c */
  2316. #line 441 "parser.y"
  2317. { (yyval) = NULL; }
  2318. break;
  2319. case 96:
  2320. /* Line 1787 of yacc.c */
  2321. #line 442 "parser.y"
  2322. {
  2323. (yyval) = NEW(assoclist_node);
  2324. AS((yyval), assoclist_node)->item = (yyvsp[(1) - (1)]);
  2325. AS((yyval), assoclist_node)->next = NULL;
  2326. }
  2327. break;
  2328. case 97:
  2329. /* Line 1787 of yacc.c */
  2330. #line 447 "parser.y"
  2331. { (yyval) = (yyvsp[(1) - (2)]); }
  2332. break;
  2333. case 98:
  2334. /* Line 1787 of yacc.c */
  2335. #line 448 "parser.y"
  2336. {
  2337. assoclist_node *cur = (yyvsp[(1) - (2)]);
  2338. while(cur->next) cur = cur->next;
  2339. cur->next = NEW(assoclist_node);
  2340. cur = cur->next;
  2341. cur->item = (yyvsp[(2) - (2)]);
  2342. cur->next = NULL;
  2343. (yyval) = (yyvsp[(1) - (2)]);
  2344. }
  2345. break;
  2346. case 99:
  2347. /* Line 1787 of yacc.c */
  2348. #line 460 "parser.y"
  2349. {
  2350. (yyval) = NEW(associtem_node);
  2351. AS((yyval), associtem_node)->key = (yyvsp[(2) - (5)]);
  2352. AS((yyval), associtem_node)->value = (yyvsp[(5) - (5)]);
  2353. }
  2354. break;
  2355. case 100:
  2356. /* Line 1787 of yacc.c */
  2357. #line 465 "parser.y"
  2358. {
  2359. (yyval) = NEW(associtem_node);
  2360. AS((yyval), associtem_node)->key = NEW_EX();
  2361. AS((yyval), associtem_node)->key->type = EX_LIT;
  2362. AS((yyval), associtem_node)->key->lit = NEW(lit_node);
  2363. AS((yyval), associtem_node)->key->lit->type = LIT_STRING;
  2364. AS((yyval), associtem_node)->key->lit->str = (yyvsp[(1) - (3)]);
  2365. AS((yyval), associtem_node)->value = (yyvsp[(3) - (3)]);
  2366. }
  2367. break;
  2368. /* Line 1787 of yacc.c */
  2369. #line 2678 "parser.tab.c"
  2370. default: break;
  2371. }
  2372. /* User semantic actions sometimes alter yychar, and that requires
  2373. that yytoken be updated with the new translation. We take the
  2374. approach of translating immediately before every use of yytoken.
  2375. One alternative is translating here after every semantic action,
  2376. but that translation would be missed if the semantic action invokes
  2377. YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
  2378. if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
  2379. incorrect destructor might then be invoked immediately. In the
  2380. case of YYERROR or YYBACKUP, subsequent parser actions might lead
  2381. to an incorrect destructor call or verbose syntax error message
  2382. before the lookahead is translated. */
  2383. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
  2384. YYPOPSTACK (yylen);
  2385. yylen = 0;
  2386. YY_STACK_PRINT (yyss, yyssp);
  2387. *++yyvsp = yyval;
  2388. *++yylsp = yyloc;
  2389. /* Now `shift' the result of the reduction. Determine what state
  2390. that goes to, based on the state we popped back to and the rule
  2391. number reduced by. */
  2392. yyn = yyr1[yyn];
  2393. yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  2394. if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  2395. yystate = yytable[yystate];
  2396. else
  2397. yystate = yydefgoto[yyn - YYNTOKENS];
  2398. goto yynewstate;
  2399. /*------------------------------------.
  2400. | yyerrlab -- here on detecting error |
  2401. `------------------------------------*/
  2402. yyerrlab:
  2403. /* Make sure we have latest lookahead translation. See comments at
  2404. user semantic actions for why this is necessary. */
  2405. yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
  2406. /* If not already recovering from an error, report this error. */
  2407. if (!yyerrstatus)
  2408. {
  2409. ++yynerrs;
  2410. #if ! YYERROR_VERBOSE
  2411. yyerror (&yylloc, program, YY_("syntax error"));
  2412. #else
  2413. # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
  2414. yyssp, yytoken)
  2415. {
  2416. char const *yymsgp = YY_("syntax error");
  2417. int yysyntax_error_status;
  2418. yysyntax_error_status = YYSYNTAX_ERROR;
  2419. if (yysyntax_error_status == 0)
  2420. yymsgp = yymsg;
  2421. else if (yysyntax_error_status == 1)
  2422. {
  2423. if (yymsg != yymsgbuf)
  2424. YYSTACK_FREE (yymsg);
  2425. yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
  2426. if (!yymsg)
  2427. {
  2428. yymsg = yymsgbuf;
  2429. yymsg_alloc = sizeof yymsgbuf;
  2430. yysyntax_error_status = 2;
  2431. }
  2432. else
  2433. {
  2434. yysyntax_error_status = YYSYNTAX_ERROR;
  2435. yymsgp = yymsg;
  2436. }
  2437. }
  2438. yyerror (&yylloc, program, yymsgp);
  2439. if (yysyntax_error_status == 2)
  2440. goto yyexhaustedlab;
  2441. }
  2442. # undef YYSYNTAX_ERROR
  2443. #endif
  2444. }
  2445. yyerror_range[1] = yylloc;
  2446. if (yyerrstatus == 3)
  2447. {
  2448. /* If just tried and failed to reuse lookahead token after an
  2449. error, discard it. */
  2450. if (yychar <= YYEOF)
  2451. {
  2452. /* Return failure if at end of input. */
  2453. if (yychar == YYEOF)
  2454. YYABORT;
  2455. }
  2456. else
  2457. {
  2458. yydestruct ("Error: discarding",
  2459. yytoken, &yylval, &yylloc, program);
  2460. yychar = YYEMPTY;
  2461. }
  2462. }
  2463. /* Else will try to reuse lookahead token after shifting the error
  2464. token. */
  2465. goto yyerrlab1;
  2466. /*---------------------------------------------------.
  2467. | yyerrorlab -- error raised explicitly by YYERROR. |
  2468. `---------------------------------------------------*/
  2469. yyerrorlab:
  2470. /* Pacify compilers like GCC when the user code never invokes
  2471. YYERROR and the label yyerrorlab therefore never appears in user
  2472. code. */
  2473. if (/*CONSTCOND*/ 0)
  2474. goto yyerrorlab;
  2475. yyerror_range[1] = yylsp[1-yylen];
  2476. /* Do not reclaim the symbols of the rule which action triggered
  2477. this YYERROR. */
  2478. YYPOPSTACK (yylen);
  2479. yylen = 0;
  2480. YY_STACK_PRINT (yyss, yyssp);
  2481. yystate = *yyssp;
  2482. goto yyerrlab1;
  2483. /*-------------------------------------------------------------.
  2484. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  2485. `-------------------------------------------------------------*/
  2486. yyerrlab1:
  2487. yyerrstatus = 3; /* Each real token shifted decrements this. */
  2488. for (;;)
  2489. {
  2490. yyn = yypact[yystate];
  2491. if (!yypact_value_is_default (yyn))
  2492. {
  2493. yyn += YYTERROR;
  2494. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  2495. {
  2496. yyn = yytable[yyn];
  2497. if (0 < yyn)
  2498. break;
  2499. }
  2500. }
  2501. /* Pop the current state because it cannot handle the error token. */
  2502. if (yyssp == yyss)
  2503. YYABORT;
  2504. yyerror_range[1] = *yylsp;
  2505. yydestruct ("Error: popping",
  2506. yystos[yystate], yyvsp, yylsp, program);
  2507. YYPOPSTACK (1);
  2508. yystate = *yyssp;
  2509. YY_STACK_PRINT (yyss, yyssp);
  2510. }
  2511. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  2512. *++yyvsp = yylval;
  2513. YY_IGNORE_MAYBE_UNINITIALIZED_END
  2514. yyerror_range[2] = yylloc;
  2515. /* Using YYLLOC is tempting, but would change the location of
  2516. the lookahead. YYLOC is available though. */
  2517. YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
  2518. *++yylsp = yyloc;
  2519. /* Shift the error token. */
  2520. YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
  2521. yystate = yyn;
  2522. goto yynewstate;
  2523. /*-------------------------------------.
  2524. | yyacceptlab -- YYACCEPT comes here. |
  2525. `-------------------------------------*/
  2526. yyacceptlab:
  2527. yyresult = 0;
  2528. goto yyreturn;
  2529. /*-----------------------------------.
  2530. | yyabortlab -- YYABORT comes here. |
  2531. `-----------------------------------*/
  2532. yyabortlab:
  2533. yyresult = 1;
  2534. goto yyreturn;
  2535. #if !defined yyoverflow || YYERROR_VERBOSE
  2536. /*-------------------------------------------------.
  2537. | yyexhaustedlab -- memory exhaustion comes here. |
  2538. `-------------------------------------------------*/
  2539. yyexhaustedlab:
  2540. yyerror (&yylloc, program, YY_("memory exhausted"));
  2541. yyresult = 2;
  2542. /* Fall through. */
  2543. #endif
  2544. yyreturn:
  2545. if (yychar != YYEMPTY)
  2546. {
  2547. /* Make sure we have latest lookahead translation. See comments at
  2548. user semantic actions for why this is necessary. */
  2549. yytoken = YYTRANSLATE (yychar);
  2550. yydestruct ("Cleanup: discarding lookahead",
  2551. yytoken, &yylval, &yylloc, program);
  2552. }
  2553. /* Do not reclaim the symbols of the rule which action triggered
  2554. this YYABORT or YYACCEPT. */
  2555. YYPOPSTACK (yylen);
  2556. YY_STACK_PRINT (yyss, yyssp);
  2557. while (yyssp != yyss)
  2558. {
  2559. yydestruct ("Cleanup: popping",
  2560. yystos[*yyssp], yyvsp, yylsp, program);
  2561. YYPOPSTACK (1);
  2562. }
  2563. #ifndef yyoverflow
  2564. if (yyss != yyssa)
  2565. YYSTACK_FREE (yyss);
  2566. #endif
  2567. #if YYERROR_VERBOSE
  2568. if (yymsg != yymsgbuf)
  2569. YYSTACK_FREE (yymsg);
  2570. #endif
  2571. /* Make sure YYID is used. */
  2572. return YYID (yyresult);
  2573. }
  2574. /* Line 2050 of yacc.c */
  2575. #line 476 "parser.y"
  2576. // TODO