cmdgram.cpp 143 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369
  1. /* A Bison parser, made by GNU Bison 3.8.2. */
  2. /* Bison implementation for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
  4. Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <https://www.gnu.org/licenses/>. */
  15. /* As a special exception, you may create a larger work that contains
  16. part or all of the Bison parser skeleton and distribute that work
  17. under terms of your choice, so long as that work isn't itself a
  18. parser generator using the skeleton or a modified version thereof
  19. as a parser skeleton. Alternatively, if you modify or redistribute
  20. the parser skeleton itself, you may (at your option) remove this
  21. special exception, which will cause the skeleton and the resulting
  22. Bison output files to be licensed under the GNU General Public
  23. License without this special exception.
  24. This special exception was added by the Free Software Foundation in
  25. version 2.2 of Bison. */
  26. /* C LALR(1) parser skeleton written by Richard Stallman, by
  27. simplifying the original so-called "semantic" parser. */
  28. /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
  29. especially those whose name start with YY_ or yy_. They are
  30. private implementation details that can be changed or removed. */
  31. /* All symbols defined below should begin with yy or YY, to avoid
  32. infringing on user name space. This should be done even for local
  33. variables, as they might otherwise be expanded by user macros.
  34. There are some unavoidable exceptions within include files to
  35. define necessary library symbols; they are noted "INFRINGES ON
  36. USER NAME SPACE" below. */
  37. /* Identify Bison output, and Bison version. */
  38. #define YYBISON 30802
  39. /* Bison version string. */
  40. #define YYBISON_VERSION "3.8.2"
  41. /* Skeleton name. */
  42. #define YYSKELETON_NAME "yacc.c"
  43. /* Pure parsers. */
  44. #define YYPURE 0
  45. /* Push parsers. */
  46. #define YYPUSH 0
  47. /* Pull parsers. */
  48. #define YYPULL 1
  49. /* Substitute the variable and function names. */
  50. #define yyparse CMDparse
  51. #define yylex CMDlex
  52. #define yyerror CMDerror
  53. #define yydebug CMDdebug
  54. #define yynerrs CMDnerrs
  55. #define yylval CMDlval
  56. #define yychar CMDchar
  57. #define yylloc CMDlloc
  58. /* First part of user prologue. */
  59. #line 4 "CMDgram.y"
  60. // bison --defines=cmdgram.h --verbose -o cmdgram.cpp -p CMD CMDgram.y
  61. // Make sure we don't get gram.h twice.
  62. #define _CMDGRAM_H_
  63. #include <stdlib.h>
  64. #include <stdio.h>
  65. #include "console/console.h"
  66. #include "console/torquescript/compiler.h"
  67. #include "console/consoleInternal.h"
  68. #include "core/strings/stringFunctions.h"
  69. #ifndef YYDEBUG
  70. #define YYDEBUG 0
  71. #endif
  72. #define YYSSIZE 350
  73. int outtext(char *fmt, ...);
  74. extern int serrors;
  75. extern Vector<String> lines;
  76. #define nil 0
  77. #undef YY_ARGS
  78. #define YY_ARGS(x) x
  79. int CMDlex();
  80. void CMDerror(const char *, ...);
  81. #ifdef alloca
  82. #undef alloca
  83. #endif
  84. #define alloca dMalloc
  85. template< typename T >
  86. struct Token
  87. {
  88. T value;
  89. U32 lineNumber;
  90. };
  91. #line 49 "CMDgram.y"
  92. /* Reserved Word Definitions */
  93. #line 60 "CMDgram.y"
  94. /* Constants and Identifier Definitions */
  95. #line 74 "CMDgram.y"
  96. /* Operator Definitions */
  97. #line 134 "CMDgram.c"
  98. # ifndef YY_CAST
  99. # ifdef __cplusplus
  100. # define YY_CAST(Type, Val) static_cast<Type> (Val)
  101. # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
  102. # else
  103. # define YY_CAST(Type, Val) ((Type) (Val))
  104. # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
  105. # endif
  106. # endif
  107. # ifndef YY_NULLPTR
  108. # if defined __cplusplus
  109. # if 201103L <= __cplusplus
  110. # define YY_NULLPTR nullptr
  111. # else
  112. # define YY_NULLPTR 0
  113. # endif
  114. # else
  115. # define YY_NULLPTR ((void*)0)
  116. # endif
  117. # endif
  118. #include "CMDgram.h"
  119. /* Symbol kind. */
  120. enum yysymbol_kind_t
  121. {
  122. YYSYMBOL_YYEMPTY = -2,
  123. YYSYMBOL_YYEOF = 0, /* "end of file" */
  124. YYSYMBOL_YYerror = 1, /* error */
  125. YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
  126. YYSYMBOL_rwDEFINE = 3, /* rwDEFINE */
  127. YYSYMBOL_rwENDDEF = 4, /* rwENDDEF */
  128. YYSYMBOL_rwDECLARE = 5, /* rwDECLARE */
  129. YYSYMBOL_rwDECLARESINGLETON = 6, /* rwDECLARESINGLETON */
  130. YYSYMBOL_rwBREAK = 7, /* rwBREAK */
  131. YYSYMBOL_rwELSE = 8, /* rwELSE */
  132. YYSYMBOL_rwCONTINUE = 9, /* rwCONTINUE */
  133. YYSYMBOL_rwGLOBAL = 10, /* rwGLOBAL */
  134. YYSYMBOL_rwIF = 11, /* rwIF */
  135. YYSYMBOL_rwNIL = 12, /* rwNIL */
  136. YYSYMBOL_rwRETURN = 13, /* rwRETURN */
  137. YYSYMBOL_rwWHILE = 14, /* rwWHILE */
  138. YYSYMBOL_rwDO = 15, /* rwDO */
  139. YYSYMBOL_rwENDIF = 16, /* rwENDIF */
  140. YYSYMBOL_rwENDWHILE = 17, /* rwENDWHILE */
  141. YYSYMBOL_rwENDFOR = 18, /* rwENDFOR */
  142. YYSYMBOL_rwDEFAULT = 19, /* rwDEFAULT */
  143. YYSYMBOL_rwFOR = 20, /* rwFOR */
  144. YYSYMBOL_rwFOREACH = 21, /* rwFOREACH */
  145. YYSYMBOL_rwFOREACHSTR = 22, /* rwFOREACHSTR */
  146. YYSYMBOL_rwIN = 23, /* rwIN */
  147. YYSYMBOL_rwDATABLOCK = 24, /* rwDATABLOCK */
  148. YYSYMBOL_rwSWITCH = 25, /* rwSWITCH */
  149. YYSYMBOL_rwCASE = 26, /* rwCASE */
  150. YYSYMBOL_rwSWITCHSTR = 27, /* rwSWITCHSTR */
  151. YYSYMBOL_rwCASEOR = 28, /* rwCASEOR */
  152. YYSYMBOL_rwPACKAGE = 29, /* rwPACKAGE */
  153. YYSYMBOL_rwNAMESPACE = 30, /* rwNAMESPACE */
  154. YYSYMBOL_rwCLASS = 31, /* rwCLASS */
  155. YYSYMBOL_rwASSERT = 32, /* rwASSERT */
  156. YYSYMBOL_ILLEGAL_TOKEN = 33, /* ILLEGAL_TOKEN */
  157. YYSYMBOL_CHRCONST = 34, /* CHRCONST */
  158. YYSYMBOL_INTCONST = 35, /* INTCONST */
  159. YYSYMBOL_TTAG = 36, /* TTAG */
  160. YYSYMBOL_VAR = 37, /* VAR */
  161. YYSYMBOL_IDENT = 38, /* IDENT */
  162. YYSYMBOL_TYPEIDENT = 39, /* TYPEIDENT */
  163. YYSYMBOL_DOCBLOCK = 40, /* DOCBLOCK */
  164. YYSYMBOL_STRATOM = 41, /* STRATOM */
  165. YYSYMBOL_TAGATOM = 42, /* TAGATOM */
  166. YYSYMBOL_FLTCONST = 43, /* FLTCONST */
  167. YYSYMBOL_44_ = 44, /* '+' */
  168. YYSYMBOL_45_ = 45, /* '-' */
  169. YYSYMBOL_46_ = 46, /* '*' */
  170. YYSYMBOL_47_ = 47, /* '/' */
  171. YYSYMBOL_48_ = 48, /* '<' */
  172. YYSYMBOL_49_ = 49, /* '>' */
  173. YYSYMBOL_50_ = 50, /* '=' */
  174. YYSYMBOL_51_ = 51, /* '.' */
  175. YYSYMBOL_52_ = 52, /* '|' */
  176. YYSYMBOL_53_ = 53, /* '&' */
  177. YYSYMBOL_54_ = 54, /* '%' */
  178. YYSYMBOL_55_ = 55, /* '(' */
  179. YYSYMBOL_56_ = 56, /* ')' */
  180. YYSYMBOL_57_ = 57, /* ',' */
  181. YYSYMBOL_58_ = 58, /* ':' */
  182. YYSYMBOL_59_ = 59, /* ';' */
  183. YYSYMBOL_60_ = 60, /* '{' */
  184. YYSYMBOL_61_ = 61, /* '}' */
  185. YYSYMBOL_62_ = 62, /* '^' */
  186. YYSYMBOL_63_ = 63, /* '~' */
  187. YYSYMBOL_64_ = 64, /* '!' */
  188. YYSYMBOL_65_ = 65, /* '@' */
  189. YYSYMBOL_opINTNAME = 66, /* opINTNAME */
  190. YYSYMBOL_opINTNAMER = 67, /* opINTNAMER */
  191. YYSYMBOL_opMINUSMINUS = 68, /* opMINUSMINUS */
  192. YYSYMBOL_opPLUSPLUS = 69, /* opPLUSPLUS */
  193. YYSYMBOL_STMT_SEP = 70, /* STMT_SEP */
  194. YYSYMBOL_opSHL = 71, /* opSHL */
  195. YYSYMBOL_opSHR = 72, /* opSHR */
  196. YYSYMBOL_opPLASN = 73, /* opPLASN */
  197. YYSYMBOL_opMIASN = 74, /* opMIASN */
  198. YYSYMBOL_opMLASN = 75, /* opMLASN */
  199. YYSYMBOL_opDVASN = 76, /* opDVASN */
  200. YYSYMBOL_opMODASN = 77, /* opMODASN */
  201. YYSYMBOL_opANDASN = 78, /* opANDASN */
  202. YYSYMBOL_opXORASN = 79, /* opXORASN */
  203. YYSYMBOL_opORASN = 80, /* opORASN */
  204. YYSYMBOL_opSLASN = 81, /* opSLASN */
  205. YYSYMBOL_opSRASN = 82, /* opSRASN */
  206. YYSYMBOL_opCAT = 83, /* opCAT */
  207. YYSYMBOL_opEQ = 84, /* opEQ */
  208. YYSYMBOL_opNE = 85, /* opNE */
  209. YYSYMBOL_opGE = 86, /* opGE */
  210. YYSYMBOL_opLE = 87, /* opLE */
  211. YYSYMBOL_opAND = 88, /* opAND */
  212. YYSYMBOL_opOR = 89, /* opOR */
  213. YYSYMBOL_opSTREQ = 90, /* opSTREQ */
  214. YYSYMBOL_opCOLONCOLON = 91, /* opCOLONCOLON */
  215. YYSYMBOL_92_ = 92, /* '[' */
  216. YYSYMBOL_opMDASN = 93, /* opMDASN */
  217. YYSYMBOL_opNDASN = 94, /* opNDASN */
  218. YYSYMBOL_opNTASN = 95, /* opNTASN */
  219. YYSYMBOL_96_ = 96, /* '?' */
  220. YYSYMBOL_opSTRNE = 97, /* opSTRNE */
  221. YYSYMBOL_UNARY = 98, /* UNARY */
  222. YYSYMBOL_99_ = 99, /* ']' */
  223. YYSYMBOL_YYACCEPT = 100, /* $accept */
  224. YYSYMBOL_start = 101, /* start */
  225. YYSYMBOL_decl_list = 102, /* decl_list */
  226. YYSYMBOL_decl = 103, /* decl */
  227. YYSYMBOL_package_decl = 104, /* package_decl */
  228. YYSYMBOL_fn_decl_list = 105, /* fn_decl_list */
  229. YYSYMBOL_statement_list = 106, /* statement_list */
  230. YYSYMBOL_stmt = 107, /* stmt */
  231. YYSYMBOL_fn_decl_stmt = 108, /* fn_decl_stmt */
  232. YYSYMBOL_var_list_decl = 109, /* var_list_decl */
  233. YYSYMBOL_var_list = 110, /* var_list */
  234. YYSYMBOL_datablock_decl = 111, /* datablock_decl */
  235. YYSYMBOL_object_decl = 112, /* object_decl */
  236. YYSYMBOL_parent_block = 113, /* parent_block */
  237. YYSYMBOL_object_name = 114, /* object_name */
  238. YYSYMBOL_object_args = 115, /* object_args */
  239. YYSYMBOL_object_declare_block = 116, /* object_declare_block */
  240. YYSYMBOL_object_decl_list = 117, /* object_decl_list */
  241. YYSYMBOL_stmt_block = 118, /* stmt_block */
  242. YYSYMBOL_switch_stmt = 119, /* switch_stmt */
  243. YYSYMBOL_case_block = 120, /* case_block */
  244. YYSYMBOL_case_expr = 121, /* case_expr */
  245. YYSYMBOL_if_stmt = 122, /* if_stmt */
  246. YYSYMBOL_while_stmt = 123, /* while_stmt */
  247. YYSYMBOL_for_stmt = 124, /* for_stmt */
  248. YYSYMBOL_foreach_stmt = 125, /* foreach_stmt */
  249. YYSYMBOL_expression_stmt = 126, /* expression_stmt */
  250. YYSYMBOL_expr = 127, /* expr */
  251. YYSYMBOL_slot_acc = 128, /* slot_acc */
  252. YYSYMBOL_intslot_acc = 129, /* intslot_acc */
  253. YYSYMBOL_class_name_expr = 130, /* class_name_expr */
  254. YYSYMBOL_assign_op_struct = 131, /* assign_op_struct */
  255. YYSYMBOL_stmt_expr = 132, /* stmt_expr */
  256. YYSYMBOL_funcall_expr = 133, /* funcall_expr */
  257. YYSYMBOL_assert_expr = 134, /* assert_expr */
  258. YYSYMBOL_expr_list_decl = 135, /* expr_list_decl */
  259. YYSYMBOL_expr_list = 136, /* expr_list */
  260. YYSYMBOL_slot_assign_list_opt = 137, /* slot_assign_list_opt */
  261. YYSYMBOL_slot_assign_list = 138, /* slot_assign_list */
  262. YYSYMBOL_slot_assign = 139, /* slot_assign */
  263. YYSYMBOL_aidx_expr = 140 /* aidx_expr */
  264. };
  265. typedef enum yysymbol_kind_t yysymbol_kind_t;
  266. #ifdef short
  267. # undef short
  268. #endif
  269. /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
  270. <limits.h> and (if available) <stdint.h> are included
  271. so that the code can choose integer types of a good width. */
  272. #ifndef __PTRDIFF_MAX__
  273. # include <limits.h> /* INFRINGES ON USER NAME SPACE */
  274. # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
  275. # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
  276. # define YY_STDINT_H
  277. # endif
  278. #endif
  279. /* Narrow types that promote to a signed type and that can represent a
  280. signed or unsigned integer of at least N bits. In tables they can
  281. save space and decrease cache pressure. Promoting to a signed type
  282. helps avoid bugs in integer arithmetic. */
  283. #ifdef __INT_LEAST8_MAX__
  284. typedef __INT_LEAST8_TYPE__ yytype_int8;
  285. #elif defined YY_STDINT_H
  286. typedef int_least8_t yytype_int8;
  287. #else
  288. typedef signed char yytype_int8;
  289. #endif
  290. #ifdef __INT_LEAST16_MAX__
  291. typedef __INT_LEAST16_TYPE__ yytype_int16;
  292. #elif defined YY_STDINT_H
  293. typedef int_least16_t yytype_int16;
  294. #else
  295. typedef short yytype_int16;
  296. #endif
  297. /* Work around bug in HP-UX 11.23, which defines these macros
  298. incorrectly for preprocessor constants. This workaround can likely
  299. be removed in 2023, as HPE has promised support for HP-UX 11.23
  300. (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
  301. <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
  302. #ifdef __hpux
  303. # undef UINT_LEAST8_MAX
  304. # undef UINT_LEAST16_MAX
  305. # define UINT_LEAST8_MAX 255
  306. # define UINT_LEAST16_MAX 65535
  307. #endif
  308. #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
  309. typedef __UINT_LEAST8_TYPE__ yytype_uint8;
  310. #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
  311. && UINT_LEAST8_MAX <= INT_MAX)
  312. typedef uint_least8_t yytype_uint8;
  313. #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
  314. typedef unsigned char yytype_uint8;
  315. #else
  316. typedef short yytype_uint8;
  317. #endif
  318. #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
  319. typedef __UINT_LEAST16_TYPE__ yytype_uint16;
  320. #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
  321. && UINT_LEAST16_MAX <= INT_MAX)
  322. typedef uint_least16_t yytype_uint16;
  323. #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
  324. typedef unsigned short yytype_uint16;
  325. #else
  326. typedef int yytype_uint16;
  327. #endif
  328. #ifndef YYPTRDIFF_T
  329. # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
  330. # define YYPTRDIFF_T __PTRDIFF_TYPE__
  331. # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
  332. # elif defined PTRDIFF_MAX
  333. # ifndef ptrdiff_t
  334. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  335. # endif
  336. # define YYPTRDIFF_T ptrdiff_t
  337. # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
  338. # else
  339. # define YYPTRDIFF_T long
  340. # define YYPTRDIFF_MAXIMUM LONG_MAX
  341. # endif
  342. #endif
  343. #ifndef YYSIZE_T
  344. # ifdef __SIZE_TYPE__
  345. # define YYSIZE_T __SIZE_TYPE__
  346. # elif defined size_t
  347. # define YYSIZE_T size_t
  348. # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
  349. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  350. # define YYSIZE_T size_t
  351. # else
  352. # define YYSIZE_T unsigned
  353. # endif
  354. #endif
  355. #define YYSIZE_MAXIMUM \
  356. YY_CAST (YYPTRDIFF_T, \
  357. (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
  358. ? YYPTRDIFF_MAXIMUM \
  359. : YY_CAST (YYSIZE_T, -1)))
  360. #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
  361. /* Stored state numbers (used for stacks). */
  362. typedef yytype_int16 yy_state_t;
  363. /* State numbers in computations. */
  364. typedef int yy_state_fast_t;
  365. #ifndef YY_
  366. # if defined YYENABLE_NLS && YYENABLE_NLS
  367. # if ENABLE_NLS
  368. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  369. # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  370. # endif
  371. # endif
  372. # ifndef YY_
  373. # define YY_(Msgid) Msgid
  374. # endif
  375. #endif
  376. #ifndef YY_ATTRIBUTE_PURE
  377. # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
  378. # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
  379. # else
  380. # define YY_ATTRIBUTE_PURE
  381. # endif
  382. #endif
  383. #ifndef YY_ATTRIBUTE_UNUSED
  384. # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
  385. # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
  386. # else
  387. # define YY_ATTRIBUTE_UNUSED
  388. # endif
  389. #endif
  390. /* Suppress unused-variable warnings by "using" E. */
  391. #if ! defined lint || defined __GNUC__
  392. # define YY_USE(E) ((void) (E))
  393. #else
  394. # define YY_USE(E) /* empty */
  395. #endif
  396. /* Suppress an incorrect diagnostic about yylval being uninitialized. */
  397. #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
  398. # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
  399. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  400. _Pragma ("GCC diagnostic push") \
  401. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
  402. # else
  403. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  404. _Pragma ("GCC diagnostic push") \
  405. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
  406. _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  407. # endif
  408. # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  409. _Pragma ("GCC diagnostic pop")
  410. #else
  411. # define YY_INITIAL_VALUE(Value) Value
  412. #endif
  413. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  414. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  415. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  416. #endif
  417. #ifndef YY_INITIAL_VALUE
  418. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  419. #endif
  420. #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
  421. # define YY_IGNORE_USELESS_CAST_BEGIN \
  422. _Pragma ("GCC diagnostic push") \
  423. _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
  424. # define YY_IGNORE_USELESS_CAST_END \
  425. _Pragma ("GCC diagnostic pop")
  426. #endif
  427. #ifndef YY_IGNORE_USELESS_CAST_BEGIN
  428. # define YY_IGNORE_USELESS_CAST_BEGIN
  429. # define YY_IGNORE_USELESS_CAST_END
  430. #endif
  431. #define YY_ASSERT(E) ((void) (0 && (E)))
  432. #if 1
  433. /* The parser invokes alloca or malloc; define the necessary symbols. */
  434. # ifdef YYSTACK_USE_ALLOCA
  435. # if YYSTACK_USE_ALLOCA
  436. # ifdef __GNUC__
  437. # define YYSTACK_ALLOC __builtin_alloca
  438. # elif defined __BUILTIN_VA_ARG_INCR
  439. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  440. # elif defined _AIX
  441. # define YYSTACK_ALLOC __alloca
  442. # elif defined _MSC_VER
  443. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  444. # define alloca _alloca
  445. # else
  446. # define YYSTACK_ALLOC alloca
  447. # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
  448. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  449. /* Use EXIT_SUCCESS as a witness for stdlib.h. */
  450. # ifndef EXIT_SUCCESS
  451. # define EXIT_SUCCESS 0
  452. # endif
  453. # endif
  454. # endif
  455. # endif
  456. # endif
  457. # ifdef YYSTACK_ALLOC
  458. /* Pacify GCC's 'empty if-body' warning. */
  459. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  460. # ifndef YYSTACK_ALLOC_MAXIMUM
  461. /* The OS might guarantee only one guard page at the bottom of the stack,
  462. and a page size can be as small as 4096 bytes. So we cannot safely
  463. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  464. to allow for a few compiler-allocated temporary stack slots. */
  465. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  466. # endif
  467. # else
  468. # define YYSTACK_ALLOC YYMALLOC
  469. # define YYSTACK_FREE YYFREE
  470. # ifndef YYSTACK_ALLOC_MAXIMUM
  471. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  472. # endif
  473. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  474. && ! ((defined YYMALLOC || defined malloc) \
  475. && (defined YYFREE || defined free)))
  476. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  477. # ifndef EXIT_SUCCESS
  478. # define EXIT_SUCCESS 0
  479. # endif
  480. # endif
  481. # ifndef YYMALLOC
  482. # define YYMALLOC malloc
  483. # if ! defined malloc && ! defined EXIT_SUCCESS
  484. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  485. # endif
  486. # endif
  487. # ifndef YYFREE
  488. # define YYFREE free
  489. # if ! defined free && ! defined EXIT_SUCCESS
  490. void free (void *); /* INFRINGES ON USER NAME SPACE */
  491. # endif
  492. # endif
  493. # endif
  494. #endif /* 1 */
  495. #if (! defined yyoverflow \
  496. && (! defined __cplusplus \
  497. || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  498. && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  499. /* A type that is properly aligned for any stack member. */
  500. union yyalloc
  501. {
  502. yy_state_t yyss_alloc;
  503. YYSTYPE yyvs_alloc;
  504. YYLTYPE yyls_alloc;
  505. };
  506. /* The size of the maximum gap between one aligned stack and the next. */
  507. # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
  508. /* The size of an array large to enough to hold all stacks, each with
  509. N elements. */
  510. # define YYSTACK_BYTES(N) \
  511. ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
  512. + YYSIZEOF (YYLTYPE)) \
  513. + 2 * YYSTACK_GAP_MAXIMUM)
  514. # define YYCOPY_NEEDED 1
  515. /* Relocate STACK from its old location to the new one. The
  516. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  517. elements in the stack, and YYPTR gives the new location of the
  518. stack. Advance YYPTR to a properly aligned location for the next
  519. stack. */
  520. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  521. do \
  522. { \
  523. YYPTRDIFF_T yynewbytes; \
  524. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  525. Stack = &yyptr->Stack_alloc; \
  526. yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
  527. yyptr += yynewbytes / YYSIZEOF (*yyptr); \
  528. } \
  529. while (0)
  530. #endif
  531. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  532. /* Copy COUNT objects from SRC to DST. The source and destination do
  533. not overlap. */
  534. # ifndef YYCOPY
  535. # if defined __GNUC__ && 1 < __GNUC__
  536. # define YYCOPY(Dst, Src, Count) \
  537. __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
  538. # else
  539. # define YYCOPY(Dst, Src, Count) \
  540. do \
  541. { \
  542. YYPTRDIFF_T yyi; \
  543. for (yyi = 0; yyi < (Count); yyi++) \
  544. (Dst)[yyi] = (Src)[yyi]; \
  545. } \
  546. while (0)
  547. # endif
  548. # endif
  549. #endif /* !YYCOPY_NEEDED */
  550. /* YYFINAL -- State number of the termination state. */
  551. #define YYFINAL 3
  552. /* YYLAST -- Last index in YYTABLE. */
  553. #define YYLAST 2858
  554. /* YYNTOKENS -- Number of terminals. */
  555. #define YYNTOKENS 100
  556. /* YYNNTS -- Number of nonterminals. */
  557. #define YYNNTS 41
  558. /* YYNRULES -- Number of rules. */
  559. #define YYNRULES 162
  560. /* YYNSTATES -- Number of states. */
  561. #define YYNSTATES 380
  562. /* YYMAXUTOK -- Last valid token kind. */
  563. #define YYMAXUTOK 329
  564. /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
  565. as returned by yylex, with out-of-bounds checking. */
  566. #define YYTRANSLATE(YYX) \
  567. (0 <= (YYX) && (YYX) <= YYMAXUTOK \
  568. ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
  569. : YYSYMBOL_YYUNDEF)
  570. /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
  571. as returned by yylex. */
  572. static const yytype_int8 yytranslate[] =
  573. {
  574. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  575. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  576. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  577. 2, 2, 2, 64, 2, 2, 2, 54, 53, 2,
  578. 55, 56, 46, 44, 57, 45, 51, 47, 2, 2,
  579. 2, 2, 2, 2, 2, 2, 2, 2, 58, 59,
  580. 48, 50, 49, 96, 65, 2, 2, 2, 2, 2,
  581. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  582. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  583. 2, 92, 2, 99, 62, 2, 2, 2, 2, 2,
  584. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  585. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  586. 2, 2, 2, 60, 52, 61, 63, 2, 2, 2,
  587. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  588. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  589. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  590. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  591. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  592. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  593. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  594. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  595. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  596. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  597. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  598. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  599. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  600. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  601. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  602. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  603. 35, 36, 37, 38, 39, 40, 41, 42, 43, 66,
  604. 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
  605. 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
  606. 87, 88, 89, 90, 91, 93, 94, 95, 97, 98
  607. };
  608. #if YYDEBUG
  609. /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
  610. static const yytype_int16 yyrline[] =
  611. {
  612. 0, 166, 166, 172, 173, 178, 180, 182, 187, 192,
  613. 194, 200, 201, 206, 207, 208, 209, 210, 211, 212,
  614. 214, 216, 218, 220, 222, 224, 226, 231, 233, 239,
  615. 240, 245, 247, 252, 257, 259, 261, 263, 265, 267,
  616. 273, 274, 280, 281, 287, 288, 294, 295, 297, 299,
  617. 304, 306, 311, 313, 318, 320, 325, 327, 329, 334,
  618. 336, 341, 343, 348, 350, 355, 357, 359, 361, 363,
  619. 365, 367, 369, 374, 376, 381, 386, 388, 390, 392,
  620. 394, 396, 398, 400, 402, 404, 406, 408, 410, 412,
  621. 414, 416, 418, 420, 422, 424, 426, 428, 430, 432,
  622. 434, 436, 438, 440, 442, 444, 446, 448, 450, 452,
  623. 454, 456, 458, 460, 462, 484, 486, 491, 493, 498,
  624. 500, 505, 507, 509, 511, 513, 515, 517, 519, 521,
  625. 523, 525, 527, 532, 534, 536, 538, 540, 542, 544,
  626. 546, 548, 550, 555, 557, 559, 569, 571, 577, 578,
  627. 583, 585, 591, 592, 597, 599, 604, 606, 608, 610,
  628. 612, 617, 619
  629. };
  630. #endif
  631. /** Accessing symbol of state STATE. */
  632. #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
  633. #if 1
  634. /* The user-facing name of the symbol whose (internal) number is
  635. YYSYMBOL. No bounds checking. */
  636. static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
  637. static const char *
  638. yysymbol_name (yysymbol_kind_t yysymbol)
  639. {
  640. static const char *const yy_sname[] =
  641. {
  642. "end of file", "error", "invalid token", "rwDEFINE", "rwENDDEF",
  643. "rwDECLARE", "rwDECLARESINGLETON", "rwBREAK", "rwELSE", "rwCONTINUE",
  644. "rwGLOBAL", "rwIF", "rwNIL", "rwRETURN", "rwWHILE", "rwDO", "rwENDIF",
  645. "rwENDWHILE", "rwENDFOR", "rwDEFAULT", "rwFOR", "rwFOREACH",
  646. "rwFOREACHSTR", "rwIN", "rwDATABLOCK", "rwSWITCH", "rwCASE",
  647. "rwSWITCHSTR", "rwCASEOR", "rwPACKAGE", "rwNAMESPACE", "rwCLASS",
  648. "rwASSERT", "ILLEGAL_TOKEN", "CHRCONST", "INTCONST", "TTAG", "VAR",
  649. "IDENT", "TYPEIDENT", "DOCBLOCK", "STRATOM", "TAGATOM", "FLTCONST",
  650. "'+'", "'-'", "'*'", "'/'", "'<'", "'>'", "'='", "'.'", "'|'", "'&'",
  651. "'%'", "'('", "')'", "','", "':'", "';'", "'{'", "'}'", "'^'", "'~'",
  652. "'!'", "'@'", "opINTNAME", "opINTNAMER", "opMINUSMINUS", "opPLUSPLUS",
  653. "STMT_SEP", "opSHL", "opSHR", "opPLASN", "opMIASN", "opMLASN", "opDVASN",
  654. "opMODASN", "opANDASN", "opXORASN", "opORASN", "opSLASN", "opSRASN",
  655. "opCAT", "opEQ", "opNE", "opGE", "opLE", "opAND", "opOR", "opSTREQ",
  656. "opCOLONCOLON", "'['", "opMDASN", "opNDASN", "opNTASN", "'?'", "opSTRNE",
  657. "UNARY", "']'", "$accept", "start", "decl_list", "decl", "package_decl",
  658. "fn_decl_list", "statement_list", "stmt", "fn_decl_stmt",
  659. "var_list_decl", "var_list", "datablock_decl", "object_decl",
  660. "parent_block", "object_name", "object_args", "object_declare_block",
  661. "object_decl_list", "stmt_block", "switch_stmt", "case_block",
  662. "case_expr", "if_stmt", "while_stmt", "for_stmt", "foreach_stmt",
  663. "expression_stmt", "expr", "slot_acc", "intslot_acc", "class_name_expr",
  664. "assign_op_struct", "stmt_expr", "funcall_expr", "assert_expr",
  665. "expr_list_decl", "expr_list", "slot_assign_list_opt",
  666. "slot_assign_list", "slot_assign", "aidx_expr", YY_NULLPTR
  667. };
  668. return yy_sname[yysymbol];
  669. }
  670. #endif
  671. #define YYPACT_NINF (-310)
  672. #define yypact_value_is_default(Yyn) \
  673. ((Yyn) == YYPACT_NINF)
  674. #define YYTABLE_NINF (-76)
  675. #define yytable_value_is_error(Yyn) \
  676. 0
  677. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  678. STATE-NUM. */
  679. static const yytype_int16 yypact[] =
  680. {
  681. -310, 31, 397, -310, 4, 2, 2, -3, 32, 27,
  682. 167, 34, 489, 40, 41, 43, 2, 44, 47, 66,
  683. 55, -310, 67, 115, -33, -310, -310, -310, -310, 1002,
  684. 1002, 1002, 1002, 1002, -310, -310, -310, -310, -310, -310,
  685. -310, -310, -310, -310, -310, 59, 2465, 2727, -310, 71,
  686. -310, -310, -12, -310, 1002, 81, 82, -310, -310, 1002,
  687. -310, -310, -310, 1115, -310, 1002, -310, -310, 124, 708,
  688. 108, 129, 97, 1002, 1002, 107, 1002, 1002, 1002, -310,
  689. -310, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002, 1002,
  690. 1002, 1002, -310, 1002, 133, -34, -34, 1169, -34, -34,
  691. -310, 1002, 1002, 1002, 1002, 1002, 1002, 137, 1002, 1002,
  692. 1002, 1002, 1002, 2, 2, 1002, 1002, 1002, 1002, 1002,
  693. 1002, 1002, 1002, 1002, 1002, 1002, 750, -310, 141, 143,
  694. 1223, 9, 1002, 1277, -310, 1331, 549, 127, 792, 1385,
  695. 156, 162, 1002, 1439, 1493, 183, 1007, 1061, 2465, 2465,
  696. 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465, 2465,
  697. -39, 2465, 131, 149, 159, -310, 292, 292, -34, -34,
  698. 2722, 2722, -43, 2606, 2664, -34, 2635, 2786, -310, -310,
  699. 39, 39, 2693, 2693, 2722, 2722, 2577, 2548, 2786, 1547,
  700. 2786, 1002, 2465, -310, 142, 154, 160, -310, 1002, 158,
  701. 2465, 158, 489, 489, -310, -310, 1002, 319, 1601, 834,
  702. 1002, 1002, 1655, 157, 161, 5, -310, -310, 179, 1002,
  703. -310, 1002, 2747, -310, 1002, 1002, 1002, 1002, 1002, -31,
  704. 165, 190, 141, 135, 197, 171, 171, 231, -310, 1709,
  705. 489, 1763, 876, 918, 1817, 1871, 1925, 184, 217, 217,
  706. 187, -310, 194, 1979, 2465, 1002, -310, 2465, 199, 200,
  707. -38, 2519, -310, -310, -310, 204, 158, -310, 1002, 205,
  708. 211, 489, -310, -310, 489, 489, 2033, 489, 2087, 960,
  709. 489, 489, 193, 1002, 207, 210, -310, -310, -310, 2465,
  710. -310, -310, -310, 594, 214, 171, 149, 216, 222, -310,
  711. -310, -310, 489, -310, 489, 489, 2141, -310, -310, 70,
  712. -5, 2465, -310, -310, -310, -310, 221, 213, 213, -310,
  713. -310, -310, 489, 233, -30, 246, 224, 70, -310, 1002,
  714. -310, 639, 226, 228, 227, 23, 213, 229, -310, 1002,
  715. 1002, 1002, -29, 230, -310, 2465, 444, -310, 213, -310,
  716. -310, 235, 23, -310, 2195, 2249, -23, 1002, 1002, -310,
  717. 237, -310, 236, -310, -310, -310, 248, 2303, -19, -310,
  718. -310, 1002, -310, 249, 684, 2357, 1002, -310, 2411, -310
  719. };
  720. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  721. Performed when YYTABLE does not specify something else to do. Zero
  722. means the default is an error. */
  723. static const yytype_uint8 yydefact[] =
  724. {
  725. 3, 0, 2, 1, 0, 0, 0, 108, 0, 0,
  726. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  727. 0, 107, 88, 113, 111, 26, 112, 105, 106, 0,
  728. 0, 0, 0, 0, 4, 7, 5, 6, 17, 135,
  729. 18, 13, 14, 15, 16, 0, 0, 109, 110, 76,
  730. 133, 134, 0, 119, 0, 0, 0, 19, 20, 0,
  731. 108, 88, 21, 0, 76, 0, 11, 53, 0, 0,
  732. 0, 0, 0, 0, 0, 0, 0, 0, 0, 122,
  733. 121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  734. 0, 0, 138, 148, 0, 86, 87, 0, 104, 103,
  735. 23, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  736. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  737. 0, 0, 0, 0, 0, 0, 0, 140, 29, 0,
  738. 0, 42, 42, 0, 22, 0, 0, 0, 0, 0,
  739. 0, 0, 0, 0, 0, 0, 0, 0, 136, 123,
  740. 124, 125, 126, 127, 128, 129, 130, 131, 132, 161,
  741. 0, 150, 0, 149, 0, 77, 82, 83, 84, 85,
  742. 90, 91, 115, 81, 80, 79, 78, 102, 117, 118,
  743. 97, 98, 94, 95, 92, 93, 99, 96, 100, 0,
  744. 101, 0, 141, 31, 0, 30, 0, 120, 42, 40,
  745. 43, 40, 0, 0, 52, 12, 0, 0, 0, 0,
  746. 0, 0, 40, 0, 0, 0, 9, 146, 0, 0,
  747. 24, 0, 114, 143, 0, 148, 148, 0, 0, 0,
  748. 0, 0, 29, 0, 0, 44, 44, 61, 63, 0,
  749. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  750. 0, 10, 0, 0, 162, 0, 139, 151, 0, 0,
  751. 0, 89, 142, 11, 32, 0, 40, 41, 0, 0,
  752. 0, 0, 64, 72, 0, 0, 0, 0, 0, 0,
  753. 0, 0, 0, 0, 0, 0, 8, 147, 25, 137,
  754. 144, 145, 116, 0, 0, 44, 45, 35, 39, 62,
  755. 71, 70, 0, 68, 0, 0, 0, 73, 74, 152,
  756. 0, 59, 54, 55, 27, 11, 0, 46, 46, 69,
  757. 67, 66, 0, 0, 0, 0, 0, 153, 154, 0,
  758. 11, 0, 37, 0, 0, 48, 47, 0, 65, 0,
  759. 0, 0, 0, 0, 155, 60, 56, 28, 46, 50,
  760. 34, 0, 49, 38, 0, 0, 0, 0, 0, 33,
  761. 0, 58, 0, 51, 158, 156, 0, 0, 0, 11,
  762. 36, 0, 157, 0, 57, 0, 0, 159, 0, 160
  763. };
  764. /* YYPGOTO[NTERM-NUM]. */
  765. static const yytype_int16 yypgoto[] =
  766. {
  767. -310, -310, -310, -310, -310, -310, -256, -1, -140, 64,
  768. -310, -310, -94, -188, -121, -230, -309, -28, 30, -310,
  769. -246, -310, -310, -310, -310, -310, -310, 38, -310, -310,
  770. 19, -45, -2, -310, -310, -138, -187, -310, 0, -300,
  771. -190
  772. };
  773. /* YYDEFGOTO[NTERM-NUM]. */
  774. static const yytype_int16 yydefgoto[] =
  775. {
  776. 0, 1, 2, 34, 35, 215, 136, 67, 37, 194,
  777. 195, 38, 39, 235, 199, 269, 334, 335, 68, 40,
  778. 284, 310, 41, 42, 43, 44, 45, 46, 47, 48,
  779. 55, 92, 64, 50, 51, 162, 163, 326, 336, 328,
  780. 160
  781. };
  782. /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  783. positive, shift that token. If negative, reduce the rule whose
  784. number is the opposite. If YYTABLE_NINF, syntax error. */
  785. static const yytype_int16 yytable[] =
  786. {
  787. 49, 36, 127, 285, 229, 216, 270, 293, 4, 337,
  788. 49, 201, 226, 236, 5, 6, 60, 107, 221, 221,
  789. 340, 357, 93, 329, 247, 56, 224, 344, 5, 6,
  790. 262, 3, 113, 114, 221, 72, 344, 260, 221, 362,
  791. 53, 20, 52, 128, 21, 61, 23, 24, 63, 227,
  792. 26, 27, 28, 330, 29, 30, 57, 54, 94, 331,
  793. 222, 292, 341, 358, 31, 316, 250, 95, 96, 97,
  794. 98, 99, 32, 33, 346, 251, 366, 233, 295, 129,
  795. 373, 296, 59, 101, 102, 103, 104, 258, 259, 65,
  796. 107, 58, 130, 110, 323, 69, 70, 133, 71, 73,
  797. 361, 198, 74, 135, 75, 113, 114, 139, 324, 325,
  798. 76, 143, 144, 374, 146, 147, 148, 77, 100, 149,
  799. 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
  800. -75, 161, 178, 179, 49, 205, 131, 132, 137, 166,
  801. 167, 168, 169, 170, 171, 140, 173, 174, 175, 176,
  802. 177, 356, 142, 180, 181, 182, 183, 184, 185, 186,
  803. 187, 188, 189, 190, 192, 78, 141, 145, 368, 200,
  804. 200, 164, 5, 6, 60, 172, 208, 256, 193, 210,
  805. 212, 196, 206, 79, 80, 211, 4, 223, 81, 82,
  806. 83, 84, 85, 86, 87, 88, 89, 90, 230, 20,
  807. 49, 49, 21, 61, 23, 24, 224, 91, 26, 27,
  808. 28, 231, 29, 30, 225, 232, 234, 248, 5, 6,
  809. 252, 249, 31, 333, 333, 263, 62, 264, 268, 161,
  810. 32, 33, 237, 238, 266, 267, 200, 323, 49, 271,
  811. 282, 351, 333, 283, 239, 241, 286, 244, 245, 246,
  812. 287, 324, 325, 309, 333, 290, 291, 253, 351, 254,
  813. 294, 297, 257, 161, 161, 159, 261, 298, 312, 49,
  814. 273, 313, 49, 49, 315, 49, 317, 332, 49, 49,
  815. 276, 278, 318, 339, 342, 343, 348, 349, 350, 359,
  816. 353, 49, 205, 289, 363, 369, 265, 370, 371, 376,
  817. 49, 299, 49, 49, 300, 301, 161, 303, 352, 327,
  818. 307, 308, 0, 0, 0, 0, 0, 306, 0, 0,
  819. 49, 311, 0, 0, 5, 6, 60, 0, 0, 49,
  820. 205, 0, 319, 0, 320, 321, 0, 0, 103, 104,
  821. 0, 0, 0, 107, 49, 205, 110, 0, 0, 0,
  822. 0, 20, 338, 0, 21, 61, 23, 24, 113, 114,
  823. 26, 27, 28, 0, 29, 30, 0, 345, 0, 0,
  824. 0, 0, 49, 205, 31, 240, 0, 354, 355, 159,
  825. 0, 0, 32, 33, 0, 0, 0, 0, 0, 0,
  826. 0, 0, 0, 0, 0, 367, 159, 0, 0, 0,
  827. 4, 0, 5, 6, 7, 0, 8, 0, 9, 375,
  828. 10, 11, 12, 0, 378, 0, 0, 13, 14, 15,
  829. 0, 16, 17, 0, 18, 0, 19, 0, 0, 20,
  830. 0, 0, 21, 22, 23, 24, 0, 25, 26, 27,
  831. 28, 0, 29, 30, 0, 0, 0, 0, 0, 5,
  832. 6, 7, 31, 8, 0, 9, 0, 10, 11, 12,
  833. 32, 33, 0, 360, 13, 14, 15, 0, 16, 17,
  834. 283, 18, 0, 0, 0, 0, 20, 0, 0, 21,
  835. 22, 23, 24, 0, 25, 26, 27, 28, 0, 29,
  836. 30, 0, 0, 0, 5, 6, 7, 0, 8, 31,
  837. 9, 0, 10, 11, 12, 0, 0, 32, 33, 13,
  838. 14, 15, 0, 16, 17, 0, 18, 0, 0, 0,
  839. 0, 20, 0, 0, 21, 22, 23, 24, 0, 25,
  840. 26, 27, 28, 0, 29, 30, 0, 0, 0, 0,
  841. 0, 0, 0, 0, 31, 0, 0, 0, 0, 66,
  842. 0, 0, 32, 33, 5, 6, 7, 0, 8, 0,
  843. 9, 0, 10, 11, 12, 0, 0, 0, 0, 13,
  844. 14, 15, 0, 16, 17, 0, 18, 0, 0, 0,
  845. 0, 20, 0, 0, 21, 22, 23, 24, 0, 25,
  846. 26, 27, 28, 0, 29, 30, 0, 0, 0, 5,
  847. 6, 7, 0, 8, 31, 9, 0, 10, 11, 12,
  848. 204, 0, 32, 33, 13, 14, 15, 0, 16, 17,
  849. 0, 18, 0, 0, 0, 0, 20, 0, 0, 21,
  850. 22, 23, 24, 0, 25, 26, 27, 28, 0, 29,
  851. 30, 0, 0, 0, 5, 6, 7, 0, 8, 31,
  852. 9, 0, 10, 11, 12, 314, 0, 32, 33, 13,
  853. 14, 15, 0, 16, 17, 0, 18, 0, 0, 0,
  854. 0, 20, 0, 0, 21, 22, 23, 24, 0, 25,
  855. 26, 27, 28, 0, 29, 30, 0, 0, 0, 5,
  856. 6, 7, 0, 8, 31, 9, 0, 10, 11, 12,
  857. 347, 0, 32, 33, 13, 14, 15, 0, 16, 17,
  858. 0, 18, 0, 5, 6, 60, 20, 0, 0, 21,
  859. 22, 23, 24, 0, 25, 26, 27, 28, 0, 29,
  860. 30, 0, 0, 0, 0, 0, 0, 0, 0, 31,
  861. 20, 0, 0, 21, 61, 23, 24, 32, 33, 26,
  862. 27, 28, 0, 29, 30, 5, 6, 60, 0, 0,
  863. 0, 0, 0, 31, 0, 0, 0, 138, 0, 0,
  864. 0, 32, 33, 0, 0, 0, 0, 0, 0, 0,
  865. 0, 0, 20, 0, 0, 21, 61, 23, 24, 0,
  866. 0, 26, 27, 28, 0, 29, 30, 5, 6, 60,
  867. 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
  868. 191, 0, 0, 32, 33, 0, 0, 0, 0, 0,
  869. 0, 0, 0, 0, 20, 0, 0, 21, 61, 23,
  870. 24, 0, 0, 26, 27, 28, 0, 29, 30, 5,
  871. 6, 60, 0, 0, 0, 0, 0, 31, 0, 0,
  872. 0, 207, 0, 0, 0, 32, 33, 0, 0, 0,
  873. 0, 0, 0, 0, 0, 0, 20, 0, 0, 21,
  874. 61, 23, 24, 0, 0, 26, 27, 28, 0, 29,
  875. 30, 5, 6, 60, 0, 0, 0, 0, 0, 31,
  876. 0, 0, 0, 243, 0, 0, 0, 32, 33, 0,
  877. 0, 0, 0, 0, 0, 0, 0, 0, 20, 0,
  878. 0, 21, 61, 23, 24, 0, 0, 26, 27, 28,
  879. 0, 29, 30, 5, 6, 60, 0, 0, 0, 0,
  880. 0, 31, 275, 0, 0, 0, 0, 0, 0, 32,
  881. 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  882. 20, 0, 0, 21, 61, 23, 24, 0, 0, 26,
  883. 27, 28, 0, 29, 30, 5, 6, 60, 0, 0,
  884. 0, 0, 0, 31, 277, 0, 0, 0, 0, 0,
  885. 0, 32, 33, 0, 0, 0, 0, 0, 0, 0,
  886. 0, 0, 20, 0, 0, 21, 61, 23, 24, 0,
  887. 0, 26, 27, 28, 0, 29, 30, 5, 6, 60,
  888. 0, 0, 0, 0, 0, 31, 305, 0, 0, 0,
  889. 0, 0, 0, 32, 33, 0, 0, 0, 0, 0,
  890. 0, 0, 0, 0, 20, 0, 0, 21, 61, 23,
  891. 24, 0, 0, 26, 27, 28, 0, 29, 30, 0,
  892. 0, 101, 102, 103, 104, 105, 106, 31, 107, 108,
  893. 109, 110, 0, 217, 218, 32, 33, 0, 0, 111,
  894. 0, 0, 112, 113, 114, 0, 0, 0, 115, 116,
  895. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  896. 0, 117, 118, 119, 120, 121, 122, 123, 0, 0,
  897. 0, 0, 0, 124, 125, 101, 102, 103, 104, 105,
  898. 106, 0, 107, 108, 109, 110, 0, 0, 219, 0,
  899. 220, 0, 0, 111, 0, 0, 112, 113, 114, 0,
  900. 0, 0, 115, 116, 0, 0, 0, 0, 0, 0,
  901. 0, 0, 0, 0, 0, 117, 118, 119, 120, 121,
  902. 122, 123, 0, 0, 0, 0, 0, 124, 125, 101,
  903. 102, 103, 104, 105, 106, 0, 107, 108, 109, 110,
  904. 0, 0, 0, 0, 134, 0, 0, 111, 0, 0,
  905. 112, 113, 114, 0, 0, 0, 115, 116, 0, 0,
  906. 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
  907. 118, 119, 120, 121, 122, 123, 0, 0, 0, 0,
  908. 0, 124, 125, 101, 102, 103, 104, 105, 106, 0,
  909. 107, 108, 109, 110, 0, 165, 0, 0, 0, 0,
  910. 0, 111, 0, 0, 112, 113, 114, 0, 0, 0,
  911. 115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
  912. 0, 0, 0, 117, 118, 119, 120, 121, 122, 123,
  913. 0, 0, 0, 0, 0, 124, 125, 101, 102, 103,
  914. 104, 105, 106, 0, 107, 108, 109, 110, 0, 197,
  915. 0, 0, 0, 0, 0, 111, 0, 0, 112, 113,
  916. 114, 0, 0, 0, 115, 116, 0, 0, 0, 0,
  917. 0, 0, 0, 0, 0, 0, 0, 117, 118, 119,
  918. 120, 121, 122, 123, 0, 0, 0, 0, 0, 124,
  919. 125, 101, 102, 103, 104, 105, 106, 0, 107, 108,
  920. 109, 110, 0, 202, 0, 0, 0, 0, 0, 111,
  921. 0, 0, 112, 113, 114, 0, 0, 0, 115, 116,
  922. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  923. 0, 117, 118, 119, 120, 121, 122, 123, 0, 0,
  924. 0, 0, 0, 124, 125, 101, 102, 103, 104, 105,
  925. 106, 0, 107, 108, 109, 110, 0, 203, 0, 0,
  926. 0, 0, 0, 111, 0, 0, 112, 113, 114, 0,
  927. 0, 0, 115, 116, 0, 0, 0, 0, 0, 0,
  928. 0, 0, 0, 0, 0, 117, 118, 119, 120, 121,
  929. 122, 123, 0, 0, 0, 0, 0, 124, 125, 101,
  930. 102, 103, 104, 105, 106, 0, 107, 108, 109, 110,
  931. 0, 0, 0, 0, 209, 0, 0, 111, 0, 0,
  932. 112, 113, 114, 0, 0, 0, 115, 116, 0, 0,
  933. 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
  934. 118, 119, 120, 121, 122, 123, 0, 0, 0, 0,
  935. 0, 124, 125, 101, 102, 103, 104, 105, 106, 0,
  936. 107, 108, 109, 110, 0, 213, 0, 0, 0, 0,
  937. 0, 111, 0, 0, 112, 113, 114, 0, 0, 0,
  938. 115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
  939. 0, 0, 0, 117, 118, 119, 120, 121, 122, 123,
  940. 0, 0, 0, 0, 0, 124, 125, 101, 102, 103,
  941. 104, 105, 106, 0, 107, 108, 109, 110, 0, 214,
  942. 0, 0, 0, 0, 0, 111, 0, 0, 112, 113,
  943. 114, 0, 0, 0, 115, 116, 0, 0, 0, 0,
  944. 0, 0, 0, 0, 0, 0, 0, 117, 118, 119,
  945. 120, 121, 122, 123, 0, 0, 0, 0, 0, 124,
  946. 125, 101, 102, 103, 104, 105, 106, 0, 107, 108,
  947. 109, 110, 0, 0, 0, 228, 0, 0, 0, 111,
  948. 0, 0, 112, 113, 114, 0, 0, 0, 115, 116,
  949. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  950. 0, 117, 118, 119, 120, 121, 122, 123, 0, 0,
  951. 0, 0, 0, 124, 125, 101, 102, 103, 104, 105,
  952. 106, 0, 107, 108, 109, 110, 0, 0, 0, 0,
  953. 242, 0, 0, 111, 0, 0, 112, 113, 114, 0,
  954. 0, 0, 115, 116, 0, 0, 0, 0, 0, 0,
  955. 0, 0, 0, 0, 0, 117, 118, 119, 120, 121,
  956. 122, 123, 0, 0, 0, 0, 0, 124, 125, 101,
  957. 102, 103, 104, 105, 106, 0, 107, 108, 109, 110,
  958. 0, 0, 0, 234, 0, 0, 0, 111, 0, 0,
  959. 112, 113, 114, 0, 0, 0, 115, 116, 0, 0,
  960. 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
  961. 118, 119, 120, 121, 122, 123, 0, 0, 0, 0,
  962. 0, 124, 125, 101, 102, 103, 104, 105, 106, 0,
  963. 107, 108, 109, 110, 0, 272, 0, 0, 0, 0,
  964. 0, 111, 0, 0, 112, 113, 114, 0, 0, 0,
  965. 115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
  966. 0, 0, 0, 117, 118, 119, 120, 121, 122, 123,
  967. 0, 0, 0, 0, 0, 124, 125, 101, 102, 103,
  968. 104, 105, 106, 0, 107, 108, 109, 110, 0, 274,
  969. 0, 0, 0, 0, 0, 111, 0, 0, 112, 113,
  970. 114, 0, 0, 0, 115, 116, 0, 0, 0, 0,
  971. 0, 0, 0, 0, 0, 0, 0, 117, 118, 119,
  972. 120, 121, 122, 123, 0, 0, 0, 0, 0, 124,
  973. 125, 101, 102, 103, 104, 105, 106, 0, 107, 108,
  974. 109, 110, 0, 0, 0, 0, 279, 0, 0, 111,
  975. 0, 0, 112, 113, 114, 0, 0, 0, 115, 116,
  976. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  977. 0, 117, 118, 119, 120, 121, 122, 123, 0, 0,
  978. 0, 0, 0, 124, 125, 101, 102, 103, 104, 105,
  979. 106, 0, 107, 108, 109, 110, 0, 280, 0, 0,
  980. 0, 0, 0, 111, 0, 0, 112, 113, 114, 0,
  981. 0, 0, 115, 116, 0, 0, 0, 0, 0, 0,
  982. 0, 0, 0, 0, 0, 117, 118, 119, 120, 121,
  983. 122, 123, 0, 0, 0, 0, 0, 124, 125, 101,
  984. 102, 103, 104, 105, 106, 0, 107, 108, 109, 110,
  985. 0, 281, 0, 0, 0, 0, 0, 111, 0, 0,
  986. 112, 113, 114, 0, 0, 0, 115, 116, 0, 0,
  987. 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
  988. 118, 119, 120, 121, 122, 123, 0, 0, 0, 0,
  989. 0, 124, 125, 101, 102, 103, 104, 105, 106, 0,
  990. 107, 108, 109, 110, 0, 0, 0, 0, 288, 0,
  991. 0, 111, 0, 0, 112, 113, 114, 0, 0, 0,
  992. 115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
  993. 0, 0, 0, 117, 118, 119, 120, 121, 122, 123,
  994. 0, 0, 0, 0, 0, 124, 125, 101, 102, 103,
  995. 104, 105, 106, 0, 107, 108, 109, 110, 0, 302,
  996. 0, 0, 0, 0, 0, 111, 0, 0, 112, 113,
  997. 114, 0, 0, 0, 115, 116, 0, 0, 0, 0,
  998. 0, 0, 0, 0, 0, 0, 0, 117, 118, 119,
  999. 120, 121, 122, 123, 0, 0, 0, 0, 0, 124,
  1000. 125, 101, 102, 103, 104, 105, 106, 0, 107, 108,
  1001. 109, 110, 0, 304, 0, 0, 0, 0, 0, 111,
  1002. 0, 0, 112, 113, 114, 0, 0, 0, 115, 116,
  1003. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1004. 0, 117, 118, 119, 120, 121, 122, 123, 0, 0,
  1005. 0, 0, 0, 124, 125, 101, 102, 103, 104, 105,
  1006. 106, 0, 107, 108, 109, 110, 0, 322, 0, 0,
  1007. 0, 0, 0, 111, 0, 0, 112, 113, 114, 0,
  1008. 0, 0, 115, 116, 0, 0, 0, 0, 0, 0,
  1009. 0, 0, 0, 0, 0, 117, 118, 119, 120, 121,
  1010. 122, 123, 0, 0, 0, 0, 0, 124, 125, 101,
  1011. 102, 103, 104, 105, 106, 0, 107, 108, 109, 110,
  1012. 0, 0, 0, 0, 364, 0, 0, 111, 0, 0,
  1013. 112, 113, 114, 0, 0, 0, 115, 116, 0, 0,
  1014. 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
  1015. 118, 119, 120, 121, 122, 123, 0, 0, 0, 0,
  1016. 0, 124, 125, 101, 102, 103, 104, 105, 106, 0,
  1017. 107, 108, 109, 110, 0, 0, 0, 0, 365, 0,
  1018. 0, 111, 0, 0, 112, 113, 114, 0, 0, 0,
  1019. 115, 116, 0, 0, 0, 0, 0, 0, 0, 0,
  1020. 0, 0, 0, 117, 118, 119, 120, 121, 122, 123,
  1021. 0, 0, 0, 0, 0, 124, 125, 101, 102, 103,
  1022. 104, 105, 106, 0, 107, 108, 109, 110, 0, 0,
  1023. 0, 0, 372, 0, 0, 111, 0, 0, 112, 113,
  1024. 114, 0, 0, 0, 115, 116, 0, 0, 0, 0,
  1025. 0, 0, 0, 0, 0, 0, 0, 117, 118, 119,
  1026. 120, 121, 122, 123, 0, 0, 0, 0, 0, 124,
  1027. 125, 101, 102, 103, 104, 105, 106, 0, 107, 108,
  1028. 109, 110, 0, 0, 0, 0, 377, 0, 0, 111,
  1029. 0, 0, 112, 113, 114, 0, 0, 0, 115, 116,
  1030. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1031. 0, 117, 118, 119, 120, 121, 122, 123, 0, 0,
  1032. 0, 0, 0, 124, 125, 101, 102, 103, 104, 105,
  1033. 106, 0, 107, 108, 109, 110, 0, 0, 0, 0,
  1034. 379, 0, 0, 111, 0, 0, 112, 113, 114, 0,
  1035. 0, 0, 115, 116, 0, 0, 0, 0, 0, 0,
  1036. 0, 0, 0, 0, 0, 117, 118, 119, 120, 121,
  1037. 122, 123, 0, 0, 0, 0, 0, 124, 125, 101,
  1038. 102, 103, 104, 105, 106, 0, 107, 108, 109, 110,
  1039. 0, 0, 0, 0, 0, 0, 0, 111, 0, 0,
  1040. 112, 113, 114, 0, 0, 0, 115, 116, 0, 0,
  1041. 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
  1042. 118, 119, 120, 121, 122, 123, 0, 0, 0, 0,
  1043. 0, 124, 125, 101, 102, 103, 104, 105, 106, 0,
  1044. 107, 108, 109, 110, 0, 0, 0, 0, 0, 0,
  1045. 0, 111, 0, 0, 112, 113, 114, 0, 0, 0,
  1046. 115, 116, 101, 102, 103, 104, 105, 106, 0, 107,
  1047. 108, 109, 110, 117, 118, 119, 120, 121, 122, 123,
  1048. 111, 0, 0, 112, 113, 114, 125, 0, 0, 115,
  1049. 116, 101, 102, 103, 104, 105, 106, 0, 107, 108,
  1050. 109, 110, 117, 118, 119, 120, 121, 0, 123, 111,
  1051. 0, 0, 112, 113, 114, 125, 0, 0, 115, 116,
  1052. 101, 102, 103, 104, 105, 106, 0, 107, 0, 109,
  1053. 110, 117, 118, 119, 120, 0, 0, 123, 111, 0,
  1054. 0, 112, 113, 114, 125, 0, 0, 115, 116, 101,
  1055. 102, 103, 104, 105, 106, 0, 107, 0, 109, 110,
  1056. 117, 118, 119, 120, 0, 0, 123, 0, 0, 0,
  1057. 112, 113, 114, 125, 0, 0, 115, 116, 101, 102,
  1058. 103, 104, 105, 106, 0, 107, 0, 0, 110, 117,
  1059. 118, 119, 120, 0, 0, 123, 0, 0, 0, 112,
  1060. 113, 114, 125, 0, 0, 115, 116, 101, 102, 103,
  1061. 104, 105, 106, 0, 107, 0, 0, 110, 117, 118,
  1062. 119, 120, 0, 0, 123, 0, 0, 0, 112, 113,
  1063. 114, 125, 0, 0, 115, 116, 101, 102, 103, 104,
  1064. 0, 0, 0, 107, 0, 0, 110, 126, 0, 119,
  1065. 120, 0, 0, 123, 0, 0, 0, 112, 113, 114,
  1066. 125, 0, 0, 115, 116, 79, 80, 255, 0, 0,
  1067. 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
  1068. 0, 0, 123, 0, 0, 79, 80, 0, 0, 125,
  1069. 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
  1070. 101, 102, 103, 104, 0, 0, 0, 107, 0, 0,
  1071. 110, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1072. 0, 0, 113, 114, 0, 0, 0, 115, 116
  1073. };
  1074. static const yytype_int16 yycheck[] =
  1075. {
  1076. 2, 2, 47, 249, 191, 145, 236, 263, 3, 318,
  1077. 12, 132, 55, 201, 5, 6, 7, 51, 57, 57,
  1078. 50, 50, 55, 28, 212, 6, 57, 327, 5, 6,
  1079. 61, 0, 66, 67, 57, 16, 336, 227, 57, 348,
  1080. 38, 32, 38, 55, 35, 36, 37, 38, 10, 92,
  1081. 41, 42, 43, 58, 45, 46, 59, 55, 91, 315,
  1082. 99, 99, 92, 92, 55, 295, 61, 29, 30, 31,
  1083. 32, 33, 63, 64, 330, 215, 99, 198, 266, 91,
  1084. 99, 268, 55, 44, 45, 46, 47, 225, 226, 55,
  1085. 51, 59, 54, 54, 24, 55, 55, 59, 55, 55,
  1086. 346, 92, 55, 65, 38, 66, 67, 69, 38, 39,
  1087. 55, 73, 74, 369, 76, 77, 78, 50, 59, 81,
  1088. 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
  1089. 59, 93, 113, 114, 136, 136, 55, 55, 14, 101,
  1090. 102, 103, 104, 105, 106, 37, 108, 109, 110, 111,
  1091. 112, 341, 55, 115, 116, 117, 118, 119, 120, 121,
  1092. 122, 123, 124, 125, 126, 50, 37, 60, 358, 131,
  1093. 132, 38, 5, 6, 7, 38, 138, 222, 37, 23,
  1094. 142, 38, 55, 68, 69, 23, 3, 56, 73, 74,
  1095. 75, 76, 77, 78, 79, 80, 81, 82, 56, 32,
  1096. 202, 203, 35, 36, 37, 38, 57, 92, 41, 42,
  1097. 43, 57, 45, 46, 55, 55, 58, 60, 5, 6,
  1098. 41, 60, 55, 317, 318, 60, 59, 37, 57, 191,
  1099. 63, 64, 202, 203, 99, 38, 198, 24, 240, 8,
  1100. 56, 335, 336, 26, 206, 207, 59, 209, 210, 211,
  1101. 56, 38, 39, 60, 348, 56, 56, 219, 352, 221,
  1102. 56, 56, 224, 225, 226, 227, 228, 56, 61, 271,
  1103. 240, 61, 274, 275, 60, 277, 60, 56, 280, 281,
  1104. 242, 243, 60, 50, 38, 61, 60, 59, 61, 59,
  1105. 61, 293, 293, 255, 59, 58, 232, 61, 50, 50,
  1106. 302, 271, 304, 305, 274, 275, 268, 277, 336, 309,
  1107. 280, 281, -1, -1, -1, -1, -1, 279, -1, -1,
  1108. 322, 283, -1, -1, 5, 6, 7, -1, -1, 331,
  1109. 331, -1, 302, -1, 304, 305, -1, -1, 46, 47,
  1110. -1, -1, -1, 51, 346, 346, 54, -1, -1, -1,
  1111. -1, 32, 322, -1, 35, 36, 37, 38, 66, 67,
  1112. 41, 42, 43, -1, 45, 46, -1, 329, -1, -1,
  1113. -1, -1, 374, 374, 55, 56, -1, 339, 340, 341,
  1114. -1, -1, 63, 64, -1, -1, -1, -1, -1, -1,
  1115. -1, -1, -1, -1, -1, 357, 358, -1, -1, -1,
  1116. 3, -1, 5, 6, 7, -1, 9, -1, 11, 371,
  1117. 13, 14, 15, -1, 376, -1, -1, 20, 21, 22,
  1118. -1, 24, 25, -1, 27, -1, 29, -1, -1, 32,
  1119. -1, -1, 35, 36, 37, 38, -1, 40, 41, 42,
  1120. 43, -1, 45, 46, -1, -1, -1, -1, -1, 5,
  1121. 6, 7, 55, 9, -1, 11, -1, 13, 14, 15,
  1122. 63, 64, -1, 19, 20, 21, 22, -1, 24, 25,
  1123. 26, 27, -1, -1, -1, -1, 32, -1, -1, 35,
  1124. 36, 37, 38, -1, 40, 41, 42, 43, -1, 45,
  1125. 46, -1, -1, -1, 5, 6, 7, -1, 9, 55,
  1126. 11, -1, 13, 14, 15, -1, -1, 63, 64, 20,
  1127. 21, 22, -1, 24, 25, -1, 27, -1, -1, -1,
  1128. -1, 32, -1, -1, 35, 36, 37, 38, -1, 40,
  1129. 41, 42, 43, -1, 45, 46, -1, -1, -1, -1,
  1130. -1, -1, -1, -1, 55, -1, -1, -1, -1, 60,
  1131. -1, -1, 63, 64, 5, 6, 7, -1, 9, -1,
  1132. 11, -1, 13, 14, 15, -1, -1, -1, -1, 20,
  1133. 21, 22, -1, 24, 25, -1, 27, -1, -1, -1,
  1134. -1, 32, -1, -1, 35, 36, 37, 38, -1, 40,
  1135. 41, 42, 43, -1, 45, 46, -1, -1, -1, 5,
  1136. 6, 7, -1, 9, 55, 11, -1, 13, 14, 15,
  1137. 61, -1, 63, 64, 20, 21, 22, -1, 24, 25,
  1138. -1, 27, -1, -1, -1, -1, 32, -1, -1, 35,
  1139. 36, 37, 38, -1, 40, 41, 42, 43, -1, 45,
  1140. 46, -1, -1, -1, 5, 6, 7, -1, 9, 55,
  1141. 11, -1, 13, 14, 15, 61, -1, 63, 64, 20,
  1142. 21, 22, -1, 24, 25, -1, 27, -1, -1, -1,
  1143. -1, 32, -1, -1, 35, 36, 37, 38, -1, 40,
  1144. 41, 42, 43, -1, 45, 46, -1, -1, -1, 5,
  1145. 6, 7, -1, 9, 55, 11, -1, 13, 14, 15,
  1146. 61, -1, 63, 64, 20, 21, 22, -1, 24, 25,
  1147. -1, 27, -1, 5, 6, 7, 32, -1, -1, 35,
  1148. 36, 37, 38, -1, 40, 41, 42, 43, -1, 45,
  1149. 46, -1, -1, -1, -1, -1, -1, -1, -1, 55,
  1150. 32, -1, -1, 35, 36, 37, 38, 63, 64, 41,
  1151. 42, 43, -1, 45, 46, 5, 6, 7, -1, -1,
  1152. -1, -1, -1, 55, -1, -1, -1, 59, -1, -1,
  1153. -1, 63, 64, -1, -1, -1, -1, -1, -1, -1,
  1154. -1, -1, 32, -1, -1, 35, 36, 37, 38, -1,
  1155. -1, 41, 42, 43, -1, 45, 46, 5, 6, 7,
  1156. -1, -1, -1, -1, -1, 55, -1, -1, -1, -1,
  1157. 60, -1, -1, 63, 64, -1, -1, -1, -1, -1,
  1158. -1, -1, -1, -1, 32, -1, -1, 35, 36, 37,
  1159. 38, -1, -1, 41, 42, 43, -1, 45, 46, 5,
  1160. 6, 7, -1, -1, -1, -1, -1, 55, -1, -1,
  1161. -1, 59, -1, -1, -1, 63, 64, -1, -1, -1,
  1162. -1, -1, -1, -1, -1, -1, 32, -1, -1, 35,
  1163. 36, 37, 38, -1, -1, 41, 42, 43, -1, 45,
  1164. 46, 5, 6, 7, -1, -1, -1, -1, -1, 55,
  1165. -1, -1, -1, 59, -1, -1, -1, 63, 64, -1,
  1166. -1, -1, -1, -1, -1, -1, -1, -1, 32, -1,
  1167. -1, 35, 36, 37, 38, -1, -1, 41, 42, 43,
  1168. -1, 45, 46, 5, 6, 7, -1, -1, -1, -1,
  1169. -1, 55, 56, -1, -1, -1, -1, -1, -1, 63,
  1170. 64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1171. 32, -1, -1, 35, 36, 37, 38, -1, -1, 41,
  1172. 42, 43, -1, 45, 46, 5, 6, 7, -1, -1,
  1173. -1, -1, -1, 55, 56, -1, -1, -1, -1, -1,
  1174. -1, 63, 64, -1, -1, -1, -1, -1, -1, -1,
  1175. -1, -1, 32, -1, -1, 35, 36, 37, 38, -1,
  1176. -1, 41, 42, 43, -1, 45, 46, 5, 6, 7,
  1177. -1, -1, -1, -1, -1, 55, 56, -1, -1, -1,
  1178. -1, -1, -1, 63, 64, -1, -1, -1, -1, -1,
  1179. -1, -1, -1, -1, 32, -1, -1, 35, 36, 37,
  1180. 38, -1, -1, 41, 42, 43, -1, 45, 46, -1,
  1181. -1, 44, 45, 46, 47, 48, 49, 55, 51, 52,
  1182. 53, 54, -1, 56, 57, 63, 64, -1, -1, 62,
  1183. -1, -1, 65, 66, 67, -1, -1, -1, 71, 72,
  1184. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1185. -1, 84, 85, 86, 87, 88, 89, 90, -1, -1,
  1186. -1, -1, -1, 96, 97, 44, 45, 46, 47, 48,
  1187. 49, -1, 51, 52, 53, 54, -1, -1, 57, -1,
  1188. 59, -1, -1, 62, -1, -1, 65, 66, 67, -1,
  1189. -1, -1, 71, 72, -1, -1, -1, -1, -1, -1,
  1190. -1, -1, -1, -1, -1, 84, 85, 86, 87, 88,
  1191. 89, 90, -1, -1, -1, -1, -1, 96, 97, 44,
  1192. 45, 46, 47, 48, 49, -1, 51, 52, 53, 54,
  1193. -1, -1, -1, -1, 59, -1, -1, 62, -1, -1,
  1194. 65, 66, 67, -1, -1, -1, 71, 72, -1, -1,
  1195. -1, -1, -1, -1, -1, -1, -1, -1, -1, 84,
  1196. 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
  1197. -1, 96, 97, 44, 45, 46, 47, 48, 49, -1,
  1198. 51, 52, 53, 54, -1, 56, -1, -1, -1, -1,
  1199. -1, 62, -1, -1, 65, 66, 67, -1, -1, -1,
  1200. 71, 72, -1, -1, -1, -1, -1, -1, -1, -1,
  1201. -1, -1, -1, 84, 85, 86, 87, 88, 89, 90,
  1202. -1, -1, -1, -1, -1, 96, 97, 44, 45, 46,
  1203. 47, 48, 49, -1, 51, 52, 53, 54, -1, 56,
  1204. -1, -1, -1, -1, -1, 62, -1, -1, 65, 66,
  1205. 67, -1, -1, -1, 71, 72, -1, -1, -1, -1,
  1206. -1, -1, -1, -1, -1, -1, -1, 84, 85, 86,
  1207. 87, 88, 89, 90, -1, -1, -1, -1, -1, 96,
  1208. 97, 44, 45, 46, 47, 48, 49, -1, 51, 52,
  1209. 53, 54, -1, 56, -1, -1, -1, -1, -1, 62,
  1210. -1, -1, 65, 66, 67, -1, -1, -1, 71, 72,
  1211. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1212. -1, 84, 85, 86, 87, 88, 89, 90, -1, -1,
  1213. -1, -1, -1, 96, 97, 44, 45, 46, 47, 48,
  1214. 49, -1, 51, 52, 53, 54, -1, 56, -1, -1,
  1215. -1, -1, -1, 62, -1, -1, 65, 66, 67, -1,
  1216. -1, -1, 71, 72, -1, -1, -1, -1, -1, -1,
  1217. -1, -1, -1, -1, -1, 84, 85, 86, 87, 88,
  1218. 89, 90, -1, -1, -1, -1, -1, 96, 97, 44,
  1219. 45, 46, 47, 48, 49, -1, 51, 52, 53, 54,
  1220. -1, -1, -1, -1, 59, -1, -1, 62, -1, -1,
  1221. 65, 66, 67, -1, -1, -1, 71, 72, -1, -1,
  1222. -1, -1, -1, -1, -1, -1, -1, -1, -1, 84,
  1223. 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
  1224. -1, 96, 97, 44, 45, 46, 47, 48, 49, -1,
  1225. 51, 52, 53, 54, -1, 56, -1, -1, -1, -1,
  1226. -1, 62, -1, -1, 65, 66, 67, -1, -1, -1,
  1227. 71, 72, -1, -1, -1, -1, -1, -1, -1, -1,
  1228. -1, -1, -1, 84, 85, 86, 87, 88, 89, 90,
  1229. -1, -1, -1, -1, -1, 96, 97, 44, 45, 46,
  1230. 47, 48, 49, -1, 51, 52, 53, 54, -1, 56,
  1231. -1, -1, -1, -1, -1, 62, -1, -1, 65, 66,
  1232. 67, -1, -1, -1, 71, 72, -1, -1, -1, -1,
  1233. -1, -1, -1, -1, -1, -1, -1, 84, 85, 86,
  1234. 87, 88, 89, 90, -1, -1, -1, -1, -1, 96,
  1235. 97, 44, 45, 46, 47, 48, 49, -1, 51, 52,
  1236. 53, 54, -1, -1, -1, 58, -1, -1, -1, 62,
  1237. -1, -1, 65, 66, 67, -1, -1, -1, 71, 72,
  1238. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1239. -1, 84, 85, 86, 87, 88, 89, 90, -1, -1,
  1240. -1, -1, -1, 96, 97, 44, 45, 46, 47, 48,
  1241. 49, -1, 51, 52, 53, 54, -1, -1, -1, -1,
  1242. 59, -1, -1, 62, -1, -1, 65, 66, 67, -1,
  1243. -1, -1, 71, 72, -1, -1, -1, -1, -1, -1,
  1244. -1, -1, -1, -1, -1, 84, 85, 86, 87, 88,
  1245. 89, 90, -1, -1, -1, -1, -1, 96, 97, 44,
  1246. 45, 46, 47, 48, 49, -1, 51, 52, 53, 54,
  1247. -1, -1, -1, 58, -1, -1, -1, 62, -1, -1,
  1248. 65, 66, 67, -1, -1, -1, 71, 72, -1, -1,
  1249. -1, -1, -1, -1, -1, -1, -1, -1, -1, 84,
  1250. 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
  1251. -1, 96, 97, 44, 45, 46, 47, 48, 49, -1,
  1252. 51, 52, 53, 54, -1, 56, -1, -1, -1, -1,
  1253. -1, 62, -1, -1, 65, 66, 67, -1, -1, -1,
  1254. 71, 72, -1, -1, -1, -1, -1, -1, -1, -1,
  1255. -1, -1, -1, 84, 85, 86, 87, 88, 89, 90,
  1256. -1, -1, -1, -1, -1, 96, 97, 44, 45, 46,
  1257. 47, 48, 49, -1, 51, 52, 53, 54, -1, 56,
  1258. -1, -1, -1, -1, -1, 62, -1, -1, 65, 66,
  1259. 67, -1, -1, -1, 71, 72, -1, -1, -1, -1,
  1260. -1, -1, -1, -1, -1, -1, -1, 84, 85, 86,
  1261. 87, 88, 89, 90, -1, -1, -1, -1, -1, 96,
  1262. 97, 44, 45, 46, 47, 48, 49, -1, 51, 52,
  1263. 53, 54, -1, -1, -1, -1, 59, -1, -1, 62,
  1264. -1, -1, 65, 66, 67, -1, -1, -1, 71, 72,
  1265. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1266. -1, 84, 85, 86, 87, 88, 89, 90, -1, -1,
  1267. -1, -1, -1, 96, 97, 44, 45, 46, 47, 48,
  1268. 49, -1, 51, 52, 53, 54, -1, 56, -1, -1,
  1269. -1, -1, -1, 62, -1, -1, 65, 66, 67, -1,
  1270. -1, -1, 71, 72, -1, -1, -1, -1, -1, -1,
  1271. -1, -1, -1, -1, -1, 84, 85, 86, 87, 88,
  1272. 89, 90, -1, -1, -1, -1, -1, 96, 97, 44,
  1273. 45, 46, 47, 48, 49, -1, 51, 52, 53, 54,
  1274. -1, 56, -1, -1, -1, -1, -1, 62, -1, -1,
  1275. 65, 66, 67, -1, -1, -1, 71, 72, -1, -1,
  1276. -1, -1, -1, -1, -1, -1, -1, -1, -1, 84,
  1277. 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
  1278. -1, 96, 97, 44, 45, 46, 47, 48, 49, -1,
  1279. 51, 52, 53, 54, -1, -1, -1, -1, 59, -1,
  1280. -1, 62, -1, -1, 65, 66, 67, -1, -1, -1,
  1281. 71, 72, -1, -1, -1, -1, -1, -1, -1, -1,
  1282. -1, -1, -1, 84, 85, 86, 87, 88, 89, 90,
  1283. -1, -1, -1, -1, -1, 96, 97, 44, 45, 46,
  1284. 47, 48, 49, -1, 51, 52, 53, 54, -1, 56,
  1285. -1, -1, -1, -1, -1, 62, -1, -1, 65, 66,
  1286. 67, -1, -1, -1, 71, 72, -1, -1, -1, -1,
  1287. -1, -1, -1, -1, -1, -1, -1, 84, 85, 86,
  1288. 87, 88, 89, 90, -1, -1, -1, -1, -1, 96,
  1289. 97, 44, 45, 46, 47, 48, 49, -1, 51, 52,
  1290. 53, 54, -1, 56, -1, -1, -1, -1, -1, 62,
  1291. -1, -1, 65, 66, 67, -1, -1, -1, 71, 72,
  1292. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1293. -1, 84, 85, 86, 87, 88, 89, 90, -1, -1,
  1294. -1, -1, -1, 96, 97, 44, 45, 46, 47, 48,
  1295. 49, -1, 51, 52, 53, 54, -1, 56, -1, -1,
  1296. -1, -1, -1, 62, -1, -1, 65, 66, 67, -1,
  1297. -1, -1, 71, 72, -1, -1, -1, -1, -1, -1,
  1298. -1, -1, -1, -1, -1, 84, 85, 86, 87, 88,
  1299. 89, 90, -1, -1, -1, -1, -1, 96, 97, 44,
  1300. 45, 46, 47, 48, 49, -1, 51, 52, 53, 54,
  1301. -1, -1, -1, -1, 59, -1, -1, 62, -1, -1,
  1302. 65, 66, 67, -1, -1, -1, 71, 72, -1, -1,
  1303. -1, -1, -1, -1, -1, -1, -1, -1, -1, 84,
  1304. 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
  1305. -1, 96, 97, 44, 45, 46, 47, 48, 49, -1,
  1306. 51, 52, 53, 54, -1, -1, -1, -1, 59, -1,
  1307. -1, 62, -1, -1, 65, 66, 67, -1, -1, -1,
  1308. 71, 72, -1, -1, -1, -1, -1, -1, -1, -1,
  1309. -1, -1, -1, 84, 85, 86, 87, 88, 89, 90,
  1310. -1, -1, -1, -1, -1, 96, 97, 44, 45, 46,
  1311. 47, 48, 49, -1, 51, 52, 53, 54, -1, -1,
  1312. -1, -1, 59, -1, -1, 62, -1, -1, 65, 66,
  1313. 67, -1, -1, -1, 71, 72, -1, -1, -1, -1,
  1314. -1, -1, -1, -1, -1, -1, -1, 84, 85, 86,
  1315. 87, 88, 89, 90, -1, -1, -1, -1, -1, 96,
  1316. 97, 44, 45, 46, 47, 48, 49, -1, 51, 52,
  1317. 53, 54, -1, -1, -1, -1, 59, -1, -1, 62,
  1318. -1, -1, 65, 66, 67, -1, -1, -1, 71, 72,
  1319. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1320. -1, 84, 85, 86, 87, 88, 89, 90, -1, -1,
  1321. -1, -1, -1, 96, 97, 44, 45, 46, 47, 48,
  1322. 49, -1, 51, 52, 53, 54, -1, -1, -1, -1,
  1323. 59, -1, -1, 62, -1, -1, 65, 66, 67, -1,
  1324. -1, -1, 71, 72, -1, -1, -1, -1, -1, -1,
  1325. -1, -1, -1, -1, -1, 84, 85, 86, 87, 88,
  1326. 89, 90, -1, -1, -1, -1, -1, 96, 97, 44,
  1327. 45, 46, 47, 48, 49, -1, 51, 52, 53, 54,
  1328. -1, -1, -1, -1, -1, -1, -1, 62, -1, -1,
  1329. 65, 66, 67, -1, -1, -1, 71, 72, -1, -1,
  1330. -1, -1, -1, -1, -1, -1, -1, -1, -1, 84,
  1331. 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
  1332. -1, 96, 97, 44, 45, 46, 47, 48, 49, -1,
  1333. 51, 52, 53, 54, -1, -1, -1, -1, -1, -1,
  1334. -1, 62, -1, -1, 65, 66, 67, -1, -1, -1,
  1335. 71, 72, 44, 45, 46, 47, 48, 49, -1, 51,
  1336. 52, 53, 54, 84, 85, 86, 87, 88, 89, 90,
  1337. 62, -1, -1, 65, 66, 67, 97, -1, -1, 71,
  1338. 72, 44, 45, 46, 47, 48, 49, -1, 51, 52,
  1339. 53, 54, 84, 85, 86, 87, 88, -1, 90, 62,
  1340. -1, -1, 65, 66, 67, 97, -1, -1, 71, 72,
  1341. 44, 45, 46, 47, 48, 49, -1, 51, -1, 53,
  1342. 54, 84, 85, 86, 87, -1, -1, 90, 62, -1,
  1343. -1, 65, 66, 67, 97, -1, -1, 71, 72, 44,
  1344. 45, 46, 47, 48, 49, -1, 51, -1, 53, 54,
  1345. 84, 85, 86, 87, -1, -1, 90, -1, -1, -1,
  1346. 65, 66, 67, 97, -1, -1, 71, 72, 44, 45,
  1347. 46, 47, 48, 49, -1, 51, -1, -1, 54, 84,
  1348. 85, 86, 87, -1, -1, 90, -1, -1, -1, 65,
  1349. 66, 67, 97, -1, -1, 71, 72, 44, 45, 46,
  1350. 47, 48, 49, -1, 51, -1, -1, 54, 84, 85,
  1351. 86, 87, -1, -1, 90, -1, -1, -1, 65, 66,
  1352. 67, 97, -1, -1, 71, 72, 44, 45, 46, 47,
  1353. -1, -1, -1, 51, -1, -1, 54, 50, -1, 86,
  1354. 87, -1, -1, 90, -1, -1, -1, 65, 66, 67,
  1355. 97, -1, -1, 71, 72, 68, 69, 50, -1, -1,
  1356. 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
  1357. -1, -1, 90, -1, -1, 68, 69, -1, -1, 97,
  1358. 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
  1359. 44, 45, 46, 47, -1, -1, -1, 51, -1, -1,
  1360. 54, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1361. -1, -1, 66, 67, -1, -1, -1, 71, 72
  1362. };
  1363. /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
  1364. state STATE-NUM. */
  1365. static const yytype_uint8 yystos[] =
  1366. {
  1367. 0, 101, 102, 0, 3, 5, 6, 7, 9, 11,
  1368. 13, 14, 15, 20, 21, 22, 24, 25, 27, 29,
  1369. 32, 35, 36, 37, 38, 40, 41, 42, 43, 45,
  1370. 46, 55, 63, 64, 103, 104, 107, 108, 111, 112,
  1371. 119, 122, 123, 124, 125, 126, 127, 128, 129, 132,
  1372. 133, 134, 38, 38, 55, 130, 130, 59, 59, 55,
  1373. 7, 36, 59, 127, 132, 55, 60, 107, 118, 55,
  1374. 55, 55, 130, 55, 55, 38, 55, 50, 50, 68,
  1375. 69, 73, 74, 75, 76, 77, 78, 79, 80, 81,
  1376. 82, 92, 131, 55, 91, 127, 127, 127, 127, 127,
  1377. 59, 44, 45, 46, 47, 48, 49, 51, 52, 53,
  1378. 54, 62, 65, 66, 67, 71, 72, 84, 85, 86,
  1379. 87, 88, 89, 90, 96, 97, 50, 131, 55, 91,
  1380. 127, 55, 55, 127, 59, 127, 106, 14, 59, 127,
  1381. 37, 37, 55, 127, 127, 60, 127, 127, 127, 127,
  1382. 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
  1383. 140, 127, 135, 136, 38, 56, 127, 127, 127, 127,
  1384. 127, 127, 38, 127, 127, 127, 127, 127, 130, 130,
  1385. 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
  1386. 127, 60, 127, 37, 109, 110, 38, 56, 92, 114,
  1387. 127, 114, 56, 56, 61, 107, 55, 59, 127, 59,
  1388. 23, 23, 127, 56, 56, 105, 108, 56, 57, 57,
  1389. 59, 57, 99, 56, 57, 55, 55, 92, 58, 136,
  1390. 56, 57, 55, 114, 58, 113, 113, 118, 118, 127,
  1391. 56, 127, 59, 59, 127, 127, 127, 113, 60, 60,
  1392. 61, 108, 41, 127, 127, 50, 131, 127, 135, 135,
  1393. 140, 127, 61, 60, 37, 109, 99, 38, 57, 115,
  1394. 115, 8, 56, 118, 56, 56, 127, 56, 127, 59,
  1395. 56, 56, 56, 26, 120, 120, 59, 56, 59, 127,
  1396. 56, 56, 99, 106, 56, 113, 136, 56, 56, 118,
  1397. 118, 118, 56, 118, 56, 56, 127, 118, 118, 60,
  1398. 121, 127, 61, 61, 61, 60, 115, 60, 60, 118,
  1399. 118, 118, 56, 24, 38, 39, 137, 138, 139, 28,
  1400. 58, 106, 56, 112, 116, 117, 138, 116, 118, 50,
  1401. 50, 92, 38, 61, 139, 127, 106, 61, 60, 59,
  1402. 61, 112, 117, 61, 127, 127, 140, 50, 92, 59,
  1403. 19, 120, 116, 59, 59, 59, 99, 127, 140, 58,
  1404. 61, 50, 59, 99, 106, 127, 50, 59, 127, 59
  1405. };
  1406. /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
  1407. static const yytype_uint8 yyr1[] =
  1408. {
  1409. 0, 100, 101, 102, 102, 103, 103, 103, 104, 105,
  1410. 105, 106, 106, 107, 107, 107, 107, 107, 107, 107,
  1411. 107, 107, 107, 107, 107, 107, 107, 108, 108, 109,
  1412. 109, 110, 110, 111, 112, 112, 112, 112, 112, 112,
  1413. 113, 113, 114, 114, 115, 115, 116, 116, 116, 116,
  1414. 117, 117, 118, 118, 119, 119, 120, 120, 120, 121,
  1415. 121, 122, 122, 123, 123, 124, 124, 124, 124, 124,
  1416. 124, 124, 124, 125, 125, 126, 127, 127, 127, 127,
  1417. 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
  1418. 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
  1419. 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
  1420. 127, 127, 127, 127, 127, 128, 128, 129, 129, 130,
  1421. 130, 131, 131, 131, 131, 131, 131, 131, 131, 131,
  1422. 131, 131, 131, 132, 132, 132, 132, 132, 132, 132,
  1423. 132, 132, 132, 133, 133, 133, 134, 134, 135, 135,
  1424. 136, 136, 137, 137, 138, 138, 139, 139, 139, 139,
  1425. 139, 140, 140
  1426. };
  1427. /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
  1428. static const yytype_int8 yyr2[] =
  1429. {
  1430. 0, 2, 1, 0, 2, 1, 1, 1, 6, 1,
  1431. 2, 0, 2, 1, 1, 1, 1, 1, 1, 2,
  1432. 2, 2, 3, 2, 4, 6, 1, 8, 10, 0,
  1433. 1, 1, 3, 10, 10, 7, 12, 9, 10, 7,
  1434. 0, 2, 0, 1, 0, 2, 0, 1, 1, 2,
  1435. 2, 3, 3, 1, 7, 7, 4, 7, 5, 1,
  1436. 3, 5, 7, 5, 6, 9, 8, 8, 7, 8,
  1437. 7, 7, 6, 7, 7, 1, 1, 3, 3, 3,
  1438. 3, 3, 3, 3, 3, 3, 2, 2, 1, 5,
  1439. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  1440. 3, 3, 3, 2, 2, 1, 1, 1, 1, 1,
  1441. 1, 1, 1, 1, 4, 3, 6, 3, 3, 1,
  1442. 3, 1, 1, 2, 2, 2, 2, 2, 2, 2,
  1443. 2, 2, 2, 1, 1, 1, 3, 6, 2, 5,
  1444. 2, 3, 5, 4, 6, 6, 4, 6, 0, 1,
  1445. 1, 3, 0, 1, 1, 2, 4, 5, 4, 7,
  1446. 8, 1, 3
  1447. };
  1448. enum { YYENOMEM = -2 };
  1449. #define yyerrok (yyerrstatus = 0)
  1450. #define yyclearin (yychar = YYEMPTY)
  1451. #define YYACCEPT goto yyacceptlab
  1452. #define YYABORT goto yyabortlab
  1453. #define YYERROR goto yyerrorlab
  1454. #define YYNOMEM goto yyexhaustedlab
  1455. #define YYRECOVERING() (!!yyerrstatus)
  1456. #define YYBACKUP(Token, Value) \
  1457. do \
  1458. if (yychar == YYEMPTY) \
  1459. { \
  1460. yychar = (Token); \
  1461. yylval = (Value); \
  1462. YYPOPSTACK (yylen); \
  1463. yystate = *yyssp; \
  1464. goto yybackup; \
  1465. } \
  1466. else \
  1467. { \
  1468. yyerror (YY_("syntax error: cannot back up")); \
  1469. YYERROR; \
  1470. } \
  1471. while (0)
  1472. /* Backward compatibility with an undocumented macro.
  1473. Use YYerror or YYUNDEF. */
  1474. #define YYERRCODE YYUNDEF
  1475. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  1476. If N is 0, then set CURRENT to the empty location which ends
  1477. the previous symbol: RHS[0] (always defined). */
  1478. #ifndef YYLLOC_DEFAULT
  1479. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  1480. do \
  1481. if (N) \
  1482. { \
  1483. (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  1484. (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  1485. (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  1486. (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  1487. } \
  1488. else \
  1489. { \
  1490. (Current).first_line = (Current).last_line = \
  1491. YYRHSLOC (Rhs, 0).last_line; \
  1492. (Current).first_column = (Current).last_column = \
  1493. YYRHSLOC (Rhs, 0).last_column; \
  1494. } \
  1495. while (0)
  1496. #endif
  1497. #define YYRHSLOC(Rhs, K) ((Rhs)[K])
  1498. /* Enable debugging if requested. */
  1499. #if YYDEBUG
  1500. # ifndef YYFPRINTF
  1501. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  1502. # define YYFPRINTF fprintf
  1503. # endif
  1504. # define YYDPRINTF(Args) \
  1505. do { \
  1506. if (yydebug) \
  1507. YYFPRINTF Args; \
  1508. } while (0)
  1509. /* YYLOCATION_PRINT -- Print the location on the stream.
  1510. This macro was not mandated originally: define only if we know
  1511. we won't break user code: when these are the locations we know. */
  1512. # ifndef YYLOCATION_PRINT
  1513. # if defined YY_LOCATION_PRINT
  1514. /* Temporary convenience wrapper in case some people defined the
  1515. undocumented and private YY_LOCATION_PRINT macros. */
  1516. # define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc))
  1517. # elif defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  1518. /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
  1519. YY_ATTRIBUTE_UNUSED
  1520. static int
  1521. yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
  1522. {
  1523. int res = 0;
  1524. int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  1525. if (0 <= yylocp->first_line)
  1526. {
  1527. res += YYFPRINTF (yyo, "%d", yylocp->first_line);
  1528. if (0 <= yylocp->first_column)
  1529. res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
  1530. }
  1531. if (0 <= yylocp->last_line)
  1532. {
  1533. if (yylocp->first_line < yylocp->last_line)
  1534. {
  1535. res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
  1536. if (0 <= end_col)
  1537. res += YYFPRINTF (yyo, ".%d", end_col);
  1538. }
  1539. else if (0 <= end_col && yylocp->first_column < end_col)
  1540. res += YYFPRINTF (yyo, "-%d", end_col);
  1541. }
  1542. return res;
  1543. }
  1544. # define YYLOCATION_PRINT yy_location_print_
  1545. /* Temporary convenience wrapper in case some people defined the
  1546. undocumented and private YY_LOCATION_PRINT macros. */
  1547. # define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc))
  1548. # else
  1549. # define YYLOCATION_PRINT(File, Loc) ((void) 0)
  1550. /* Temporary convenience wrapper in case some people defined the
  1551. undocumented and private YY_LOCATION_PRINT macros. */
  1552. # define YY_LOCATION_PRINT YYLOCATION_PRINT
  1553. # endif
  1554. # endif /* !defined YYLOCATION_PRINT */
  1555. # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
  1556. do { \
  1557. if (yydebug) \
  1558. { \
  1559. YYFPRINTF (stderr, "%s ", Title); \
  1560. yy_symbol_print (stderr, \
  1561. Kind, Value, Location); \
  1562. YYFPRINTF (stderr, "\n"); \
  1563. } \
  1564. } while (0)
  1565. /*-----------------------------------.
  1566. | Print this symbol's value on YYO. |
  1567. `-----------------------------------*/
  1568. static void
  1569. yy_symbol_value_print (FILE *yyo,
  1570. yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
  1571. {
  1572. FILE *yyoutput = yyo;
  1573. YY_USE (yyoutput);
  1574. YY_USE (yylocationp);
  1575. if (!yyvaluep)
  1576. return;
  1577. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1578. YY_USE (yykind);
  1579. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1580. }
  1581. /*---------------------------.
  1582. | Print this symbol on YYO. |
  1583. `---------------------------*/
  1584. static void
  1585. yy_symbol_print (FILE *yyo,
  1586. yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
  1587. {
  1588. YYFPRINTF (yyo, "%s %s (",
  1589. yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
  1590. YYLOCATION_PRINT (yyo, yylocationp);
  1591. YYFPRINTF (yyo, ": ");
  1592. yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp);
  1593. YYFPRINTF (yyo, ")");
  1594. }
  1595. /*------------------------------------------------------------------.
  1596. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  1597. | TOP (included). |
  1598. `------------------------------------------------------------------*/
  1599. static void
  1600. yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
  1601. {
  1602. YYFPRINTF (stderr, "Stack now");
  1603. for (; yybottom <= yytop; yybottom++)
  1604. {
  1605. int yybot = *yybottom;
  1606. YYFPRINTF (stderr, " %d", yybot);
  1607. }
  1608. YYFPRINTF (stderr, "\n");
  1609. }
  1610. # define YY_STACK_PRINT(Bottom, Top) \
  1611. do { \
  1612. if (yydebug) \
  1613. yy_stack_print ((Bottom), (Top)); \
  1614. } while (0)
  1615. /*------------------------------------------------.
  1616. | Report that the YYRULE is going to be reduced. |
  1617. `------------------------------------------------*/
  1618. static void
  1619. yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
  1620. int yyrule)
  1621. {
  1622. int yylno = yyrline[yyrule];
  1623. int yynrhs = yyr2[yyrule];
  1624. int yyi;
  1625. YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
  1626. yyrule - 1, yylno);
  1627. /* The symbols being reduced. */
  1628. for (yyi = 0; yyi < yynrhs; yyi++)
  1629. {
  1630. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  1631. yy_symbol_print (stderr,
  1632. YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
  1633. &yyvsp[(yyi + 1) - (yynrhs)],
  1634. &(yylsp[(yyi + 1) - (yynrhs)]));
  1635. YYFPRINTF (stderr, "\n");
  1636. }
  1637. }
  1638. # define YY_REDUCE_PRINT(Rule) \
  1639. do { \
  1640. if (yydebug) \
  1641. yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
  1642. } while (0)
  1643. /* Nonzero means print parse trace. It is left uninitialized so that
  1644. multiple parsers can coexist. */
  1645. int yydebug;
  1646. #else /* !YYDEBUG */
  1647. # define YYDPRINTF(Args) ((void) 0)
  1648. # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
  1649. # define YY_STACK_PRINT(Bottom, Top)
  1650. # define YY_REDUCE_PRINT(Rule)
  1651. #endif /* !YYDEBUG */
  1652. /* YYINITDEPTH -- initial size of the parser's stacks. */
  1653. #ifndef YYINITDEPTH
  1654. # define YYINITDEPTH 200
  1655. #endif
  1656. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  1657. if the built-in stack extension method is used).
  1658. Do not make this value too large; the results are undefined if
  1659. YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  1660. evaluated with infinite-precision integer arithmetic. */
  1661. #ifndef YYMAXDEPTH
  1662. # define YYMAXDEPTH 10000
  1663. #endif
  1664. /* Context of a parse error. */
  1665. typedef struct
  1666. {
  1667. yy_state_t *yyssp;
  1668. yysymbol_kind_t yytoken;
  1669. YYLTYPE *yylloc;
  1670. } yypcontext_t;
  1671. /* Put in YYARG at most YYARGN of the expected tokens given the
  1672. current YYCTX, and return the number of tokens stored in YYARG. If
  1673. YYARG is null, return the number of expected tokens (guaranteed to
  1674. be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
  1675. Return 0 if there are more than YYARGN expected tokens, yet fill
  1676. YYARG up to YYARGN. */
  1677. static int
  1678. yypcontext_expected_tokens (const yypcontext_t *yyctx,
  1679. yysymbol_kind_t yyarg[], int yyargn)
  1680. {
  1681. /* Actual size of YYARG. */
  1682. int yycount = 0;
  1683. int yyn = yypact[+*yyctx->yyssp];
  1684. if (!yypact_value_is_default (yyn))
  1685. {
  1686. /* Start YYX at -YYN if negative to avoid negative indexes in
  1687. YYCHECK. In other words, skip the first -YYN actions for
  1688. this state because they are default actions. */
  1689. int yyxbegin = yyn < 0 ? -yyn : 0;
  1690. /* Stay within bounds of both yycheck and yytname. */
  1691. int yychecklim = YYLAST - yyn + 1;
  1692. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  1693. int yyx;
  1694. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  1695. if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror
  1696. && !yytable_value_is_error (yytable[yyx + yyn]))
  1697. {
  1698. if (!yyarg)
  1699. ++yycount;
  1700. else if (yycount == yyargn)
  1701. return 0;
  1702. else
  1703. yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
  1704. }
  1705. }
  1706. if (yyarg && yycount == 0 && 0 < yyargn)
  1707. yyarg[0] = YYSYMBOL_YYEMPTY;
  1708. return yycount;
  1709. }
  1710. /* The kind of the lookahead of this context. */
  1711. static yysymbol_kind_t
  1712. yypcontext_token (const yypcontext_t *yyctx) YY_ATTRIBUTE_UNUSED;
  1713. static yysymbol_kind_t
  1714. yypcontext_token (const yypcontext_t *yyctx)
  1715. {
  1716. return yyctx->yytoken;
  1717. }
  1718. /* The location of the lookahead of this context. */
  1719. static YYLTYPE *
  1720. yypcontext_location (const yypcontext_t *yyctx) YY_ATTRIBUTE_UNUSED;
  1721. static YYLTYPE *
  1722. yypcontext_location (const yypcontext_t *yyctx)
  1723. {
  1724. return yyctx->yylloc;
  1725. }
  1726. /* User defined function to report a syntax error. */
  1727. static int
  1728. yyreport_syntax_error (const yypcontext_t *yyctx);
  1729. /*-----------------------------------------------.
  1730. | Release the memory associated to this symbol. |
  1731. `-----------------------------------------------*/
  1732. static void
  1733. yydestruct (const char *yymsg,
  1734. yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
  1735. {
  1736. YY_USE (yyvaluep);
  1737. YY_USE (yylocationp);
  1738. if (!yymsg)
  1739. yymsg = "Deleting";
  1740. YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
  1741. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1742. YY_USE (yykind);
  1743. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1744. }
  1745. /* Lookahead token kind. */
  1746. int yychar;
  1747. /* The semantic value of the lookahead symbol. */
  1748. YYSTYPE yylval;
  1749. /* Location data for the lookahead symbol. */
  1750. YYLTYPE yylloc
  1751. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  1752. = { 1, 1, 1, 1 }
  1753. # endif
  1754. ;
  1755. /* Number of syntax errors so far. */
  1756. int yynerrs;
  1757. /*----------.
  1758. | yyparse. |
  1759. `----------*/
  1760. int
  1761. yyparse (void)
  1762. {
  1763. yy_state_fast_t yystate = 0;
  1764. /* Number of tokens to shift before error messages enabled. */
  1765. int yyerrstatus = 0;
  1766. /* Refer to the stacks through separate pointers, to allow yyoverflow
  1767. to reallocate them elsewhere. */
  1768. /* Their size. */
  1769. YYPTRDIFF_T yystacksize = YYINITDEPTH;
  1770. /* The state stack: array, bottom, top. */
  1771. yy_state_t yyssa[YYINITDEPTH];
  1772. yy_state_t *yyss = yyssa;
  1773. yy_state_t *yyssp = yyss;
  1774. /* The semantic value stack: array, bottom, top. */
  1775. YYSTYPE yyvsa[YYINITDEPTH];
  1776. YYSTYPE *yyvs = yyvsa;
  1777. YYSTYPE *yyvsp = yyvs;
  1778. /* The location stack: array, bottom, top. */
  1779. YYLTYPE yylsa[YYINITDEPTH];
  1780. YYLTYPE *yyls = yylsa;
  1781. YYLTYPE *yylsp = yyls;
  1782. int yyn;
  1783. /* The return value of yyparse. */
  1784. int yyresult;
  1785. /* Lookahead symbol kind. */
  1786. yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  1787. /* The variables used to return semantic value and location from the
  1788. action routines. */
  1789. YYSTYPE yyval;
  1790. YYLTYPE yyloc;
  1791. /* The locations where the error started and ended. */
  1792. YYLTYPE yyerror_range[3];
  1793. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
  1794. /* The number of symbols on the RHS of the reduced rule.
  1795. Keep to zero when no symbol should be popped. */
  1796. int yylen = 0;
  1797. YYDPRINTF ((stderr, "Starting parse\n"));
  1798. yychar = YYEMPTY; /* Cause a token to be read. */
  1799. yylsp[0] = yylloc;
  1800. goto yysetstate;
  1801. /*------------------------------------------------------------.
  1802. | yynewstate -- push a new state, which is found in yystate. |
  1803. `------------------------------------------------------------*/
  1804. yynewstate:
  1805. /* In all cases, when you get here, the value and location stacks
  1806. have just been pushed. So pushing a state here evens the stacks. */
  1807. yyssp++;
  1808. /*--------------------------------------------------------------------.
  1809. | yysetstate -- set current state (the top of the stack) to yystate. |
  1810. `--------------------------------------------------------------------*/
  1811. yysetstate:
  1812. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1813. YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  1814. YY_IGNORE_USELESS_CAST_BEGIN
  1815. *yyssp = YY_CAST (yy_state_t, yystate);
  1816. YY_IGNORE_USELESS_CAST_END
  1817. YY_STACK_PRINT (yyss, yyssp);
  1818. if (yyss + yystacksize - 1 <= yyssp)
  1819. #if !defined yyoverflow && !defined YYSTACK_RELOCATE
  1820. YYNOMEM;
  1821. #else
  1822. {
  1823. /* Get the current used size of the three stacks, in elements. */
  1824. YYPTRDIFF_T yysize = yyssp - yyss + 1;
  1825. # if defined yyoverflow
  1826. {
  1827. /* Give user a chance to reallocate the stack. Use copies of
  1828. these so that the &'s don't force the real ones into
  1829. memory. */
  1830. yy_state_t *yyss1 = yyss;
  1831. YYSTYPE *yyvs1 = yyvs;
  1832. YYLTYPE *yyls1 = yyls;
  1833. /* Each stack pointer address is followed by the size of the
  1834. data in use in that stack, in bytes. This used to be a
  1835. conditional around just the two extra args, but that might
  1836. be undefined if yyoverflow is a macro. */
  1837. yyoverflow (YY_("memory exhausted"),
  1838. &yyss1, yysize * YYSIZEOF (*yyssp),
  1839. &yyvs1, yysize * YYSIZEOF (*yyvsp),
  1840. &yyls1, yysize * YYSIZEOF (*yylsp),
  1841. &yystacksize);
  1842. yyss = yyss1;
  1843. yyvs = yyvs1;
  1844. yyls = yyls1;
  1845. }
  1846. # else /* defined YYSTACK_RELOCATE */
  1847. /* Extend the stack our own way. */
  1848. if (YYMAXDEPTH <= yystacksize)
  1849. YYNOMEM;
  1850. yystacksize *= 2;
  1851. if (YYMAXDEPTH < yystacksize)
  1852. yystacksize = YYMAXDEPTH;
  1853. {
  1854. yy_state_t *yyss1 = yyss;
  1855. union yyalloc *yyptr =
  1856. YY_CAST (union yyalloc *,
  1857. YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
  1858. if (! yyptr)
  1859. YYNOMEM;
  1860. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1861. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1862. YYSTACK_RELOCATE (yyls_alloc, yyls);
  1863. # undef YYSTACK_RELOCATE
  1864. if (yyss1 != yyssa)
  1865. YYSTACK_FREE (yyss1);
  1866. }
  1867. # endif
  1868. yyssp = yyss + yysize - 1;
  1869. yyvsp = yyvs + yysize - 1;
  1870. yylsp = yyls + yysize - 1;
  1871. YY_IGNORE_USELESS_CAST_BEGIN
  1872. YYDPRINTF ((stderr, "Stack size increased to %ld\n",
  1873. YY_CAST (long, yystacksize)));
  1874. YY_IGNORE_USELESS_CAST_END
  1875. if (yyss + yystacksize - 1 <= yyssp)
  1876. YYABORT;
  1877. }
  1878. #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
  1879. if (yystate == YYFINAL)
  1880. YYACCEPT;
  1881. goto yybackup;
  1882. /*-----------.
  1883. | yybackup. |
  1884. `-----------*/
  1885. yybackup:
  1886. /* Do appropriate processing given the current state. Read a
  1887. lookahead token if we need one and don't already have one. */
  1888. /* First try to decide what to do without reference to lookahead token. */
  1889. yyn = yypact[yystate];
  1890. if (yypact_value_is_default (yyn))
  1891. goto yydefault;
  1892. /* Not known => get a lookahead token if don't already have one. */
  1893. /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
  1894. if (yychar == YYEMPTY)
  1895. {
  1896. YYDPRINTF ((stderr, "Reading a token\n"));
  1897. yychar = yylex ();
  1898. }
  1899. if (yychar <= YYEOF)
  1900. {
  1901. yychar = YYEOF;
  1902. yytoken = YYSYMBOL_YYEOF;
  1903. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1904. }
  1905. else if (yychar == YYerror)
  1906. {
  1907. /* The scanner already issued an error message, process directly
  1908. to error recovery. But do not keep the error token as
  1909. lookahead, it is too special and may lead us to an endless
  1910. loop in error recovery. */
  1911. yychar = YYUNDEF;
  1912. yytoken = YYSYMBOL_YYerror;
  1913. yyerror_range[1] = yylloc;
  1914. goto yyerrlab1;
  1915. }
  1916. else
  1917. {
  1918. yytoken = YYTRANSLATE (yychar);
  1919. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1920. }
  1921. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1922. detect an error, take that action. */
  1923. yyn += yytoken;
  1924. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1925. goto yydefault;
  1926. yyn = yytable[yyn];
  1927. if (yyn <= 0)
  1928. {
  1929. if (yytable_value_is_error (yyn))
  1930. goto yyerrlab;
  1931. yyn = -yyn;
  1932. goto yyreduce;
  1933. }
  1934. /* Count tokens shifted since error; after three, turn off error
  1935. status. */
  1936. if (yyerrstatus)
  1937. yyerrstatus--;
  1938. /* Shift the lookahead token. */
  1939. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1940. yystate = yyn;
  1941. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1942. *++yyvsp = yylval;
  1943. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1944. *++yylsp = yylloc;
  1945. /* Discard the shifted token. */
  1946. yychar = YYEMPTY;
  1947. goto yynewstate;
  1948. /*-----------------------------------------------------------.
  1949. | yydefault -- do the default action for the current state. |
  1950. `-----------------------------------------------------------*/
  1951. yydefault:
  1952. yyn = yydefact[yystate];
  1953. if (yyn == 0)
  1954. goto yyerrlab;
  1955. goto yyreduce;
  1956. /*-----------------------------.
  1957. | yyreduce -- do a reduction. |
  1958. `-----------------------------*/
  1959. yyreduce:
  1960. /* yyn is the number of a rule to reduce with. */
  1961. yylen = yyr2[yyn];
  1962. /* If YYLEN is nonzero, implement the default value of the action:
  1963. '$$ = $1'.
  1964. Otherwise, the following line sets YYVAL to garbage.
  1965. This behavior is undocumented and Bison
  1966. users should not rely upon it. Assigning to YYVAL
  1967. unconditionally makes the parser a bit smaller, and it avoids a
  1968. GCC warning that YYVAL may be used uninitialized. */
  1969. yyval = yyvsp[1-yylen];
  1970. /* Default location. */
  1971. YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  1972. yyerror_range[1] = yyloc;
  1973. YY_REDUCE_PRINT (yyn);
  1974. switch (yyn)
  1975. {
  1976. case 2: /* start: decl_list */
  1977. #line 167 "CMDgram.y"
  1978. { }
  1979. #line 2198 "CMDgram.c"
  1980. break;
  1981. case 3: /* decl_list: %empty */
  1982. #line 172 "CMDgram.y"
  1983. { (yyval.stmt) = nil; }
  1984. #line 2204 "CMDgram.c"
  1985. break;
  1986. case 4: /* decl_list: decl_list decl */
  1987. #line 174 "CMDgram.y"
  1988. { if(!Script::gStatementList) { Script::gStatementList = (yyvsp[0].stmt); } else { Script::gStatementList->append((yyvsp[0].stmt)); } }
  1989. #line 2210 "CMDgram.c"
  1990. break;
  1991. case 5: /* decl: stmt */
  1992. #line 179 "CMDgram.y"
  1993. { (yyval.stmt) = (yyvsp[0].stmt); }
  1994. #line 2216 "CMDgram.c"
  1995. break;
  1996. case 6: /* decl: fn_decl_stmt */
  1997. #line 181 "CMDgram.y"
  1998. { (yyval.stmt) = (yyvsp[0].stmt); }
  1999. #line 2222 "CMDgram.c"
  2000. break;
  2001. case 7: /* decl: package_decl */
  2002. #line 183 "CMDgram.y"
  2003. { (yyval.stmt) = (yyvsp[0].stmt); }
  2004. #line 2228 "CMDgram.c"
  2005. break;
  2006. case 8: /* package_decl: rwPACKAGE IDENT '{' fn_decl_list '}' ';' */
  2007. #line 188 "CMDgram.y"
  2008. { (yyval.stmt) = (yyvsp[-2].stmt); for(StmtNode *walk = ((yyvsp[-2].stmt));walk;walk = walk->getNext() ) walk->setPackage((yyvsp[-4].s).value); }
  2009. #line 2234 "CMDgram.c"
  2010. break;
  2011. case 9: /* fn_decl_list: fn_decl_stmt */
  2012. #line 193 "CMDgram.y"
  2013. { (yyval.stmt) = (yyvsp[0].stmt); }
  2014. #line 2240 "CMDgram.c"
  2015. break;
  2016. case 10: /* fn_decl_list: fn_decl_list fn_decl_stmt */
  2017. #line 195 "CMDgram.y"
  2018. { (yyval.stmt) = (yyvsp[-1].stmt); ((yyvsp[-1].stmt))->append((yyvsp[0].stmt)); }
  2019. #line 2246 "CMDgram.c"
  2020. break;
  2021. case 11: /* statement_list: %empty */
  2022. #line 200 "CMDgram.y"
  2023. { (yyval.stmt) = nil; }
  2024. #line 2252 "CMDgram.c"
  2025. break;
  2026. case 12: /* statement_list: statement_list stmt */
  2027. #line 202 "CMDgram.y"
  2028. { if(!(yyvsp[-1].stmt)) { (yyval.stmt) = (yyvsp[0].stmt); } else { ((yyvsp[-1].stmt))->append((yyvsp[0].stmt)); (yyval.stmt) = (yyvsp[-1].stmt); } }
  2029. #line 2258 "CMDgram.c"
  2030. break;
  2031. case 19: /* stmt: rwBREAK ';' */
  2032. #line 213 "CMDgram.y"
  2033. { (yyval.stmt) = BreakStmtNode::alloc( (yyvsp[-1].i).lineNumber ); }
  2034. #line 2264 "CMDgram.c"
  2035. break;
  2036. case 20: /* stmt: rwCONTINUE ';' */
  2037. #line 215 "CMDgram.y"
  2038. { (yyval.stmt) = ContinueStmtNode::alloc( (yyvsp[-1].i).lineNumber ); }
  2039. #line 2270 "CMDgram.c"
  2040. break;
  2041. case 21: /* stmt: rwRETURN ';' */
  2042. #line 217 "CMDgram.y"
  2043. { (yyval.stmt) = ReturnStmtNode::alloc( (yyvsp[-1].i).lineNumber, NULL ); }
  2044. #line 2276 "CMDgram.c"
  2045. break;
  2046. case 22: /* stmt: rwRETURN expr ';' */
  2047. #line 219 "CMDgram.y"
  2048. { (yyval.stmt) = ReturnStmtNode::alloc( (yyvsp[-2].i).lineNumber, (yyvsp[-1].expr) ); }
  2049. #line 2282 "CMDgram.c"
  2050. break;
  2051. case 23: /* stmt: expression_stmt ';' */
  2052. #line 221 "CMDgram.y"
  2053. { (yyval.stmt) = (yyvsp[-1].stmt); }
  2054. #line 2288 "CMDgram.c"
  2055. break;
  2056. case 24: /* stmt: TTAG '=' expr ';' */
  2057. #line 223 "CMDgram.y"
  2058. { (yyval.stmt) = TTagSetStmtNode::alloc( (yyvsp[-3].s).lineNumber, (yyvsp[-3].s).value, (yyvsp[-1].expr), NULL ); }
  2059. #line 2294 "CMDgram.c"
  2060. break;
  2061. case 25: /* stmt: TTAG '=' expr ',' expr ';' */
  2062. #line 225 "CMDgram.y"
  2063. { (yyval.stmt) = TTagSetStmtNode::alloc( (yyvsp[-5].s).lineNumber, (yyvsp[-5].s).value, (yyvsp[-3].expr), (yyvsp[-1].expr) ); }
  2064. #line 2300 "CMDgram.c"
  2065. break;
  2066. case 26: /* stmt: DOCBLOCK */
  2067. #line 227 "CMDgram.y"
  2068. { (yyval.stmt) = StrConstNode::alloc( (yyvsp[0].str).lineNumber, (yyvsp[0].str).value, false, true ); }
  2069. #line 2306 "CMDgram.c"
  2070. break;
  2071. case 27: /* fn_decl_stmt: rwDEFINE IDENT '(' var_list_decl ')' '{' statement_list '}' */
  2072. #line 232 "CMDgram.y"
  2073. { (yyval.stmt) = FunctionDeclStmtNode::alloc( (yyvsp[-7].i).lineNumber, (yyvsp[-6].s).value, NULL, (yyvsp[-4].var), (yyvsp[-1].stmt) ); }
  2074. #line 2312 "CMDgram.c"
  2075. break;
  2076. case 28: /* fn_decl_stmt: rwDEFINE IDENT opCOLONCOLON IDENT '(' var_list_decl ')' '{' statement_list '}' */
  2077. #line 234 "CMDgram.y"
  2078. { (yyval.stmt) = FunctionDeclStmtNode::alloc( (yyvsp[-9].i).lineNumber, (yyvsp[-6].s).value, (yyvsp[-8].s).value, (yyvsp[-4].var), (yyvsp[-1].stmt) ); }
  2079. #line 2318 "CMDgram.c"
  2080. break;
  2081. case 29: /* var_list_decl: %empty */
  2082. #line 239 "CMDgram.y"
  2083. { (yyval.var) = NULL; }
  2084. #line 2324 "CMDgram.c"
  2085. break;
  2086. case 30: /* var_list_decl: var_list */
  2087. #line 241 "CMDgram.y"
  2088. { (yyval.var) = (yyvsp[0].var); }
  2089. #line 2330 "CMDgram.c"
  2090. break;
  2091. case 31: /* var_list: VAR */
  2092. #line 246 "CMDgram.y"
  2093. { (yyval.var) = VarNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value, NULL ); }
  2094. #line 2336 "CMDgram.c"
  2095. break;
  2096. case 32: /* var_list: var_list ',' VAR */
  2097. #line 248 "CMDgram.y"
  2098. { (yyval.var) = (yyvsp[-2].var); ((StmtNode*)((yyvsp[-2].var)))->append((StmtNode*)VarNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value, NULL ) ); }
  2099. #line 2342 "CMDgram.c"
  2100. break;
  2101. case 33: /* datablock_decl: rwDATABLOCK class_name_expr '(' expr parent_block ')' '{' slot_assign_list_opt '}' ';' */
  2102. #line 253 "CMDgram.y"
  2103. { (yyval.stmt) = ObjectDeclNode::alloc( (yyvsp[-9].i).lineNumber, (yyvsp[-8].expr), (yyvsp[-6].expr), NULL, (yyvsp[-5].s).value, (yyvsp[-2].slist), NULL, true, false, false); }
  2104. #line 2348 "CMDgram.c"
  2105. break;
  2106. case 34: /* object_decl: rwDECLARE class_name_expr '(' object_name parent_block object_args ')' '{' object_declare_block '}' */
  2107. #line 258 "CMDgram.y"
  2108. { (yyval.od) = ObjectDeclNode::alloc( (yyvsp[-9].i).lineNumber, (yyvsp[-8].expr), (yyvsp[-6].expr), (yyvsp[-4].expr), (yyvsp[-5].s).value, (yyvsp[-1].odcl).slots, (yyvsp[-1].odcl).decls, false, false, false); }
  2109. #line 2354 "CMDgram.c"
  2110. break;
  2111. case 35: /* object_decl: rwDECLARE class_name_expr '(' object_name parent_block object_args ')' */
  2112. #line 260 "CMDgram.y"
  2113. { (yyval.od) = ObjectDeclNode::alloc( (yyvsp[-6].i).lineNumber, (yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr), (yyvsp[-2].s).value, NULL, NULL, false, false, false); }
  2114. #line 2360 "CMDgram.c"
  2115. break;
  2116. case 36: /* object_decl: rwDECLARE class_name_expr '(' '[' object_name ']' parent_block object_args ')' '{' object_declare_block '}' */
  2117. #line 262 "CMDgram.y"
  2118. { (yyval.od) = ObjectDeclNode::alloc( (yyvsp[-11].i).lineNumber, (yyvsp[-10].expr), (yyvsp[-7].expr), (yyvsp[-4].expr), (yyvsp[-5].s).value, (yyvsp[-1].odcl).slots, (yyvsp[-1].odcl).decls, false, true, false); }
  2119. #line 2366 "CMDgram.c"
  2120. break;
  2121. case 37: /* object_decl: rwDECLARE class_name_expr '(' '[' object_name ']' parent_block object_args ')' */
  2122. #line 264 "CMDgram.y"
  2123. { (yyval.od) = ObjectDeclNode::alloc( (yyvsp[-8].i).lineNumber, (yyvsp[-7].expr), (yyvsp[-4].expr), (yyvsp[-1].expr), (yyvsp[-2].s).value, NULL, NULL, false, true, false); }
  2124. #line 2372 "CMDgram.c"
  2125. break;
  2126. case 38: /* object_decl: rwDECLARESINGLETON class_name_expr '(' object_name parent_block object_args ')' '{' object_declare_block '}' */
  2127. #line 266 "CMDgram.y"
  2128. { (yyval.od) = ObjectDeclNode::alloc( (yyvsp[-9].i).lineNumber, (yyvsp[-8].expr), (yyvsp[-6].expr), (yyvsp[-4].expr), (yyvsp[-5].s).value, (yyvsp[-1].odcl).slots, (yyvsp[-1].odcl).decls, false, false, true); }
  2129. #line 2378 "CMDgram.c"
  2130. break;
  2131. case 39: /* object_decl: rwDECLARESINGLETON class_name_expr '(' object_name parent_block object_args ')' */
  2132. #line 268 "CMDgram.y"
  2133. { (yyval.od) = ObjectDeclNode::alloc( (yyvsp[-6].i).lineNumber, (yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr), (yyvsp[-2].s).value, NULL, NULL, false, false, true); }
  2134. #line 2384 "CMDgram.c"
  2135. break;
  2136. case 40: /* parent_block: %empty */
  2137. #line 273 "CMDgram.y"
  2138. { (yyval.s).value = NULL; }
  2139. #line 2390 "CMDgram.c"
  2140. break;
  2141. case 41: /* parent_block: ':' IDENT */
  2142. #line 275 "CMDgram.y"
  2143. { (yyval.s) = (yyvsp[0].s); }
  2144. #line 2396 "CMDgram.c"
  2145. break;
  2146. case 42: /* object_name: %empty */
  2147. #line 280 "CMDgram.y"
  2148. { (yyval.expr) = StrConstNode::alloc( CodeBlock::smCurrentParser->getCurrentLine(), "", false); }
  2149. #line 2402 "CMDgram.c"
  2150. break;
  2151. case 43: /* object_name: expr */
  2152. #line 282 "CMDgram.y"
  2153. { (yyval.expr) = (yyvsp[0].expr); }
  2154. #line 2408 "CMDgram.c"
  2155. break;
  2156. case 44: /* object_args: %empty */
  2157. #line 287 "CMDgram.y"
  2158. { (yyval.expr) = NULL; }
  2159. #line 2414 "CMDgram.c"
  2160. break;
  2161. case 45: /* object_args: ',' expr_list */
  2162. #line 289 "CMDgram.y"
  2163. { (yyval.expr) = (yyvsp[0].expr); }
  2164. #line 2420 "CMDgram.c"
  2165. break;
  2166. case 46: /* object_declare_block: %empty */
  2167. #line 294 "CMDgram.y"
  2168. { (yyval.odcl).slots = NULL; (yyval.odcl).decls = NULL; }
  2169. #line 2426 "CMDgram.c"
  2170. break;
  2171. case 47: /* object_declare_block: slot_assign_list */
  2172. #line 296 "CMDgram.y"
  2173. { (yyval.odcl).slots = (yyvsp[0].slist); (yyval.odcl).decls = NULL; }
  2174. #line 2432 "CMDgram.c"
  2175. break;
  2176. case 48: /* object_declare_block: object_decl_list */
  2177. #line 298 "CMDgram.y"
  2178. { (yyval.odcl).slots = NULL; (yyval.odcl).decls = (yyvsp[0].od); }
  2179. #line 2438 "CMDgram.c"
  2180. break;
  2181. case 49: /* object_declare_block: slot_assign_list object_decl_list */
  2182. #line 300 "CMDgram.y"
  2183. { (yyval.odcl).slots = (yyvsp[-1].slist); (yyval.odcl).decls = (yyvsp[0].od); }
  2184. #line 2444 "CMDgram.c"
  2185. break;
  2186. case 50: /* object_decl_list: object_decl ';' */
  2187. #line 305 "CMDgram.y"
  2188. { (yyval.od) = (yyvsp[-1].od); }
  2189. #line 2450 "CMDgram.c"
  2190. break;
  2191. case 51: /* object_decl_list: object_decl_list object_decl ';' */
  2192. #line 307 "CMDgram.y"
  2193. { (yyvsp[-2].od)->append((yyvsp[-1].od)); (yyval.od) = (yyvsp[-2].od); }
  2194. #line 2456 "CMDgram.c"
  2195. break;
  2196. case 52: /* stmt_block: '{' statement_list '}' */
  2197. #line 312 "CMDgram.y"
  2198. { (yyval.stmt) = (yyvsp[-1].stmt); }
  2199. #line 2462 "CMDgram.c"
  2200. break;
  2201. case 53: /* stmt_block: stmt */
  2202. #line 314 "CMDgram.y"
  2203. { (yyval.stmt) = (yyvsp[0].stmt); }
  2204. #line 2468 "CMDgram.c"
  2205. break;
  2206. case 54: /* switch_stmt: rwSWITCH '(' expr ')' '{' case_block '}' */
  2207. #line 319 "CMDgram.y"
  2208. { (yyval.stmt) = (yyvsp[-1].ifnode); (yyvsp[-1].ifnode)->propagateSwitchExpr((yyvsp[-4].expr), false); }
  2209. #line 2474 "CMDgram.c"
  2210. break;
  2211. case 55: /* switch_stmt: rwSWITCHSTR '(' expr ')' '{' case_block '}' */
  2212. #line 321 "CMDgram.y"
  2213. { (yyval.stmt) = (yyvsp[-1].ifnode); (yyvsp[-1].ifnode)->propagateSwitchExpr((yyvsp[-4].expr), true); }
  2214. #line 2480 "CMDgram.c"
  2215. break;
  2216. case 56: /* case_block: rwCASE case_expr ':' statement_list */
  2217. #line 326 "CMDgram.y"
  2218. { (yyval.ifnode) = IfStmtNode::alloc( (yyvsp[-3].i).lineNumber, (yyvsp[-2].expr), (yyvsp[0].stmt), NULL, false); }
  2219. #line 2486 "CMDgram.c"
  2220. break;
  2221. case 57: /* case_block: rwCASE case_expr ':' statement_list rwDEFAULT ':' statement_list */
  2222. #line 328 "CMDgram.y"
  2223. { (yyval.ifnode) = IfStmtNode::alloc( (yyvsp[-6].i).lineNumber, (yyvsp[-5].expr), (yyvsp[-3].stmt), (yyvsp[0].stmt), false); }
  2224. #line 2492 "CMDgram.c"
  2225. break;
  2226. case 58: /* case_block: rwCASE case_expr ':' statement_list case_block */
  2227. #line 330 "CMDgram.y"
  2228. { (yyval.ifnode) = IfStmtNode::alloc( (yyvsp[-4].i).lineNumber, (yyvsp[-3].expr), (yyvsp[-1].stmt), (yyvsp[0].ifnode), true); }
  2229. #line 2498 "CMDgram.c"
  2230. break;
  2231. case 59: /* case_expr: expr */
  2232. #line 335 "CMDgram.y"
  2233. { (yyval.expr) = (yyvsp[0].expr);}
  2234. #line 2504 "CMDgram.c"
  2235. break;
  2236. case 60: /* case_expr: case_expr rwCASEOR expr */
  2237. #line 337 "CMDgram.y"
  2238. { ((yyvsp[-2].expr))->append((yyvsp[0].expr)); (yyval.expr)=(yyvsp[-2].expr); }
  2239. #line 2510 "CMDgram.c"
  2240. break;
  2241. case 61: /* if_stmt: rwIF '(' expr ')' stmt_block */
  2242. #line 342 "CMDgram.y"
  2243. { (yyval.stmt) = IfStmtNode::alloc((yyvsp[-4].i).lineNumber, (yyvsp[-2].expr), (yyvsp[0].stmt), NULL, false); }
  2244. #line 2516 "CMDgram.c"
  2245. break;
  2246. case 62: /* if_stmt: rwIF '(' expr ')' stmt_block rwELSE stmt_block */
  2247. #line 344 "CMDgram.y"
  2248. { (yyval.stmt) = IfStmtNode::alloc((yyvsp[-6].i).lineNumber, (yyvsp[-4].expr), (yyvsp[-2].stmt), (yyvsp[0].stmt), false); }
  2249. #line 2522 "CMDgram.c"
  2250. break;
  2251. case 63: /* while_stmt: rwWHILE '(' expr ')' stmt_block */
  2252. #line 349 "CMDgram.y"
  2253. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-4].i).lineNumber, nil, (yyvsp[-2].expr), nil, (yyvsp[0].stmt), false); }
  2254. #line 2528 "CMDgram.c"
  2255. break;
  2256. case 64: /* while_stmt: rwDO stmt_block rwWHILE '(' expr ')' */
  2257. #line 351 "CMDgram.y"
  2258. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-3].i).lineNumber, nil, (yyvsp[-1].expr), nil, (yyvsp[-4].stmt), true); }
  2259. #line 2534 "CMDgram.c"
  2260. break;
  2261. case 65: /* for_stmt: rwFOR '(' expr ';' expr ';' expr ')' stmt_block */
  2262. #line 356 "CMDgram.y"
  2263. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-8].i).lineNumber, (yyvsp[-6].expr), (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].stmt), false); }
  2264. #line 2540 "CMDgram.c"
  2265. break;
  2266. case 66: /* for_stmt: rwFOR '(' expr ';' expr ';' ')' stmt_block */
  2267. #line 358 "CMDgram.y"
  2268. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-7].i).lineNumber, (yyvsp[-5].expr), (yyvsp[-3].expr), NULL, (yyvsp[0].stmt), false); }
  2269. #line 2546 "CMDgram.c"
  2270. break;
  2271. case 67: /* for_stmt: rwFOR '(' expr ';' ';' expr ')' stmt_block */
  2272. #line 360 "CMDgram.y"
  2273. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-7].i).lineNumber, (yyvsp[-5].expr), NULL, (yyvsp[-2].expr), (yyvsp[0].stmt), false); }
  2274. #line 2552 "CMDgram.c"
  2275. break;
  2276. case 68: /* for_stmt: rwFOR '(' expr ';' ';' ')' stmt_block */
  2277. #line 362 "CMDgram.y"
  2278. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-6].i).lineNumber, (yyvsp[-4].expr), NULL, NULL, (yyvsp[0].stmt), false); }
  2279. #line 2558 "CMDgram.c"
  2280. break;
  2281. case 69: /* for_stmt: rwFOR '(' ';' expr ';' expr ')' stmt_block */
  2282. #line 364 "CMDgram.y"
  2283. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-7].i).lineNumber, NULL, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].stmt), false); }
  2284. #line 2564 "CMDgram.c"
  2285. break;
  2286. case 70: /* for_stmt: rwFOR '(' ';' expr ';' ')' stmt_block */
  2287. #line 366 "CMDgram.y"
  2288. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-6].i).lineNumber, NULL, (yyvsp[-3].expr), NULL, (yyvsp[0].stmt), false); }
  2289. #line 2570 "CMDgram.c"
  2290. break;
  2291. case 71: /* for_stmt: rwFOR '(' ';' ';' expr ')' stmt_block */
  2292. #line 368 "CMDgram.y"
  2293. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-6].i).lineNumber, NULL, NULL, (yyvsp[-2].expr), (yyvsp[0].stmt), false); }
  2294. #line 2576 "CMDgram.c"
  2295. break;
  2296. case 72: /* for_stmt: rwFOR '(' ';' ';' ')' stmt_block */
  2297. #line 370 "CMDgram.y"
  2298. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-5].i).lineNumber, NULL, NULL, NULL, (yyvsp[0].stmt), false); }
  2299. #line 2582 "CMDgram.c"
  2300. break;
  2301. case 73: /* foreach_stmt: rwFOREACH '(' VAR rwIN expr ')' stmt_block */
  2302. #line 375 "CMDgram.y"
  2303. { (yyval.stmt) = IterStmtNode::alloc( (yyvsp[-6].i).lineNumber, (yyvsp[-4].s).value, (yyvsp[-2].expr), (yyvsp[0].stmt), false ); }
  2304. #line 2588 "CMDgram.c"
  2305. break;
  2306. case 74: /* foreach_stmt: rwFOREACHSTR '(' VAR rwIN expr ')' stmt_block */
  2307. #line 377 "CMDgram.y"
  2308. { (yyval.stmt) = IterStmtNode::alloc( (yyvsp[-6].i).lineNumber, (yyvsp[-4].s).value, (yyvsp[-2].expr), (yyvsp[0].stmt), true ); }
  2309. #line 2594 "CMDgram.c"
  2310. break;
  2311. case 75: /* expression_stmt: stmt_expr */
  2312. #line 382 "CMDgram.y"
  2313. { (yyval.stmt) = (yyvsp[0].expr); }
  2314. #line 2600 "CMDgram.c"
  2315. break;
  2316. case 76: /* expr: stmt_expr */
  2317. #line 387 "CMDgram.y"
  2318. { (yyval.expr) = (yyvsp[0].expr); }
  2319. #line 2606 "CMDgram.c"
  2320. break;
  2321. case 77: /* expr: '(' expr ')' */
  2322. #line 389 "CMDgram.y"
  2323. { (yyval.expr) = (yyvsp[-1].expr); }
  2324. #line 2612 "CMDgram.c"
  2325. break;
  2326. case 78: /* expr: expr '^' expr */
  2327. #line 391 "CMDgram.y"
  2328. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2329. #line 2618 "CMDgram.c"
  2330. break;
  2331. case 79: /* expr: expr '%' expr */
  2332. #line 393 "CMDgram.y"
  2333. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2334. #line 2624 "CMDgram.c"
  2335. break;
  2336. case 80: /* expr: expr '&' expr */
  2337. #line 395 "CMDgram.y"
  2338. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2339. #line 2630 "CMDgram.c"
  2340. break;
  2341. case 81: /* expr: expr '|' expr */
  2342. #line 397 "CMDgram.y"
  2343. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2344. #line 2636 "CMDgram.c"
  2345. break;
  2346. case 82: /* expr: expr '+' expr */
  2347. #line 399 "CMDgram.y"
  2348. { (yyval.expr) = FloatBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2349. #line 2642 "CMDgram.c"
  2350. break;
  2351. case 83: /* expr: expr '-' expr */
  2352. #line 401 "CMDgram.y"
  2353. { (yyval.expr) = FloatBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2354. #line 2648 "CMDgram.c"
  2355. break;
  2356. case 84: /* expr: expr '*' expr */
  2357. #line 403 "CMDgram.y"
  2358. { (yyval.expr) = FloatBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2359. #line 2654 "CMDgram.c"
  2360. break;
  2361. case 85: /* expr: expr '/' expr */
  2362. #line 405 "CMDgram.y"
  2363. { (yyval.expr) = FloatBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2364. #line 2660 "CMDgram.c"
  2365. break;
  2366. case 86: /* expr: '-' expr */
  2367. #line 407 "CMDgram.y"
  2368. { (yyval.expr) = FloatUnaryExprNode::alloc( (yyvsp[-1].i).lineNumber, (yyvsp[-1].i).value, (yyvsp[0].expr)); }
  2369. #line 2666 "CMDgram.c"
  2370. break;
  2371. case 87: /* expr: '*' expr */
  2372. #line 409 "CMDgram.y"
  2373. { (yyval.expr) = TTagDerefNode::alloc( (yyvsp[-1].i).lineNumber, (yyvsp[0].expr) ); }
  2374. #line 2672 "CMDgram.c"
  2375. break;
  2376. case 88: /* expr: TTAG */
  2377. #line 411 "CMDgram.y"
  2378. { (yyval.expr) = TTagExprNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value ); }
  2379. #line 2678 "CMDgram.c"
  2380. break;
  2381. case 89: /* expr: expr '?' expr ':' expr */
  2382. #line 413 "CMDgram.y"
  2383. { (yyval.expr) = ConditionalExprNode::alloc( (yyvsp[-4].expr)->dbgLineNumber, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2384. #line 2684 "CMDgram.c"
  2385. break;
  2386. case 90: /* expr: expr '<' expr */
  2387. #line 415 "CMDgram.y"
  2388. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2389. #line 2690 "CMDgram.c"
  2390. break;
  2391. case 91: /* expr: expr '>' expr */
  2392. #line 417 "CMDgram.y"
  2393. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2394. #line 2696 "CMDgram.c"
  2395. break;
  2396. case 92: /* expr: expr opGE expr */
  2397. #line 419 "CMDgram.y"
  2398. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2399. #line 2702 "CMDgram.c"
  2400. break;
  2401. case 93: /* expr: expr opLE expr */
  2402. #line 421 "CMDgram.y"
  2403. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2404. #line 2708 "CMDgram.c"
  2405. break;
  2406. case 94: /* expr: expr opEQ expr */
  2407. #line 423 "CMDgram.y"
  2408. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2409. #line 2714 "CMDgram.c"
  2410. break;
  2411. case 95: /* expr: expr opNE expr */
  2412. #line 425 "CMDgram.y"
  2413. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2414. #line 2720 "CMDgram.c"
  2415. break;
  2416. case 96: /* expr: expr opOR expr */
  2417. #line 427 "CMDgram.y"
  2418. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2419. #line 2726 "CMDgram.c"
  2420. break;
  2421. case 97: /* expr: expr opSHL expr */
  2422. #line 429 "CMDgram.y"
  2423. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2424. #line 2732 "CMDgram.c"
  2425. break;
  2426. case 98: /* expr: expr opSHR expr */
  2427. #line 431 "CMDgram.y"
  2428. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2429. #line 2738 "CMDgram.c"
  2430. break;
  2431. case 99: /* expr: expr opAND expr */
  2432. #line 433 "CMDgram.y"
  2433. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2434. #line 2744 "CMDgram.c"
  2435. break;
  2436. case 100: /* expr: expr opSTREQ expr */
  2437. #line 435 "CMDgram.y"
  2438. { (yyval.expr) = StreqExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-2].expr), (yyvsp[0].expr), true); }
  2439. #line 2750 "CMDgram.c"
  2440. break;
  2441. case 101: /* expr: expr opSTRNE expr */
  2442. #line 437 "CMDgram.y"
  2443. { (yyval.expr) = StreqExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-2].expr), (yyvsp[0].expr), false); }
  2444. #line 2756 "CMDgram.c"
  2445. break;
  2446. case 102: /* expr: expr '@' expr */
  2447. #line 439 "CMDgram.y"
  2448. { (yyval.expr) = StrcatExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-2].expr), (yyvsp[0].expr), (yyvsp[-1].i).value); }
  2449. #line 2762 "CMDgram.c"
  2450. break;
  2451. case 103: /* expr: '!' expr */
  2452. #line 441 "CMDgram.y"
  2453. { (yyval.expr) = IntUnaryExprNode::alloc((yyvsp[-1].i).lineNumber, (yyvsp[-1].i).value, (yyvsp[0].expr)); }
  2454. #line 2768 "CMDgram.c"
  2455. break;
  2456. case 104: /* expr: '~' expr */
  2457. #line 443 "CMDgram.y"
  2458. { (yyval.expr) = IntUnaryExprNode::alloc((yyvsp[-1].i).lineNumber, (yyvsp[-1].i).value, (yyvsp[0].expr)); }
  2459. #line 2774 "CMDgram.c"
  2460. break;
  2461. case 105: /* expr: TAGATOM */
  2462. #line 445 "CMDgram.y"
  2463. { (yyval.expr) = StrConstNode::alloc( (yyvsp[0].str).lineNumber, (yyvsp[0].str).value, true); }
  2464. #line 2780 "CMDgram.c"
  2465. break;
  2466. case 106: /* expr: FLTCONST */
  2467. #line 447 "CMDgram.y"
  2468. { (yyval.expr) = FloatNode::alloc( (yyvsp[0].f).lineNumber, (yyvsp[0].f).value ); }
  2469. #line 2786 "CMDgram.c"
  2470. break;
  2471. case 107: /* expr: INTCONST */
  2472. #line 449 "CMDgram.y"
  2473. { (yyval.expr) = IntNode::alloc( (yyvsp[0].i).lineNumber, (yyvsp[0].i).value ); }
  2474. #line 2792 "CMDgram.c"
  2475. break;
  2476. case 108: /* expr: rwBREAK */
  2477. #line 451 "CMDgram.y"
  2478. { (yyval.expr) = ConstantNode::alloc( (yyvsp[0].i).lineNumber, StringTable->insert("break")); }
  2479. #line 2798 "CMDgram.c"
  2480. break;
  2481. case 109: /* expr: slot_acc */
  2482. #line 453 "CMDgram.y"
  2483. { (yyval.expr) = SlotAccessNode::alloc( (yyvsp[0].slot).lineNumber, (yyvsp[0].slot).object, (yyvsp[0].slot).array, (yyvsp[0].slot).slotName ); }
  2484. #line 2804 "CMDgram.c"
  2485. break;
  2486. case 110: /* expr: intslot_acc */
  2487. #line 455 "CMDgram.y"
  2488. { (yyval.expr) = InternalSlotAccessNode::alloc( (yyvsp[0].intslot).lineNumber, (yyvsp[0].intslot).object, (yyvsp[0].intslot).slotExpr, (yyvsp[0].intslot).recurse); }
  2489. #line 2810 "CMDgram.c"
  2490. break;
  2491. case 111: /* expr: IDENT */
  2492. #line 457 "CMDgram.y"
  2493. { (yyval.expr) = ConstantNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value ); }
  2494. #line 2816 "CMDgram.c"
  2495. break;
  2496. case 112: /* expr: STRATOM */
  2497. #line 459 "CMDgram.y"
  2498. { (yyval.expr) = StrConstNode::alloc( (yyvsp[0].str).lineNumber, (yyvsp[0].str).value, false); }
  2499. #line 2822 "CMDgram.c"
  2500. break;
  2501. case 113: /* expr: VAR */
  2502. #line 461 "CMDgram.y"
  2503. { (yyval.expr) = (ExprNode*)VarNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value, NULL); }
  2504. #line 2828 "CMDgram.c"
  2505. break;
  2506. case 114: /* expr: VAR '[' aidx_expr ']' */
  2507. #line 463 "CMDgram.y"
  2508. { (yyval.expr) = (ExprNode*)VarNode::alloc( (yyvsp[-3].s).lineNumber, (yyvsp[-3].s).value, (yyvsp[-1].expr) ); }
  2509. #line 2834 "CMDgram.c"
  2510. break;
  2511. case 115: /* slot_acc: expr '.' IDENT */
  2512. #line 485 "CMDgram.y"
  2513. { (yyval.slot).lineNumber = (yyvsp[-2].expr)->dbgLineNumber; (yyval.slot).object = (yyvsp[-2].expr); (yyval.slot).slotName = (yyvsp[0].s).value; (yyval.slot).array = NULL; }
  2514. #line 2840 "CMDgram.c"
  2515. break;
  2516. case 116: /* slot_acc: expr '.' IDENT '[' aidx_expr ']' */
  2517. #line 487 "CMDgram.y"
  2518. { (yyval.slot).lineNumber = (yyvsp[-5].expr)->dbgLineNumber; (yyval.slot).object = (yyvsp[-5].expr); (yyval.slot).slotName = (yyvsp[-3].s).value; (yyval.slot).array = (yyvsp[-1].expr); }
  2519. #line 2846 "CMDgram.c"
  2520. break;
  2521. case 117: /* intslot_acc: expr opINTNAME class_name_expr */
  2522. #line 492 "CMDgram.y"
  2523. { (yyval.intslot).lineNumber = (yyvsp[-2].expr)->dbgLineNumber; (yyval.intslot).object = (yyvsp[-2].expr); (yyval.intslot).slotExpr = (yyvsp[0].expr); (yyval.intslot).recurse = false; }
  2524. #line 2852 "CMDgram.c"
  2525. break;
  2526. case 118: /* intslot_acc: expr opINTNAMER class_name_expr */
  2527. #line 494 "CMDgram.y"
  2528. { (yyval.intslot).lineNumber = (yyvsp[-2].expr)->dbgLineNumber; (yyval.intslot).object = (yyvsp[-2].expr); (yyval.intslot).slotExpr = (yyvsp[0].expr); (yyval.intslot).recurse = true; }
  2529. #line 2858 "CMDgram.c"
  2530. break;
  2531. case 119: /* class_name_expr: IDENT */
  2532. #line 499 "CMDgram.y"
  2533. { (yyval.expr) = ConstantNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value ); }
  2534. #line 2864 "CMDgram.c"
  2535. break;
  2536. case 120: /* class_name_expr: '(' expr ')' */
  2537. #line 501 "CMDgram.y"
  2538. { (yyval.expr) = (yyvsp[-1].expr); }
  2539. #line 2870 "CMDgram.c"
  2540. break;
  2541. case 121: /* assign_op_struct: opPLUSPLUS */
  2542. #line 506 "CMDgram.y"
  2543. { (yyval.asn).lineNumber = (yyvsp[0].i).lineNumber; (yyval.asn).token = opPLUSPLUS; (yyval.asn).expr = FloatNode::alloc( (yyvsp[0].i).lineNumber, 1 ); }
  2544. #line 2876 "CMDgram.c"
  2545. break;
  2546. case 122: /* assign_op_struct: opMINUSMINUS */
  2547. #line 508 "CMDgram.y"
  2548. { (yyval.asn).lineNumber = (yyvsp[0].i).lineNumber; (yyval.asn).token = opMINUSMINUS; (yyval.asn).expr = FloatNode::alloc( (yyvsp[0].i).lineNumber, 1 ); }
  2549. #line 2882 "CMDgram.c"
  2550. break;
  2551. case 123: /* assign_op_struct: opPLASN expr */
  2552. #line 510 "CMDgram.y"
  2553. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '+'; (yyval.asn).expr = (yyvsp[0].expr); }
  2554. #line 2888 "CMDgram.c"
  2555. break;
  2556. case 124: /* assign_op_struct: opMIASN expr */
  2557. #line 512 "CMDgram.y"
  2558. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '-'; (yyval.asn).expr = (yyvsp[0].expr); }
  2559. #line 2894 "CMDgram.c"
  2560. break;
  2561. case 125: /* assign_op_struct: opMLASN expr */
  2562. #line 514 "CMDgram.y"
  2563. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '*'; (yyval.asn).expr = (yyvsp[0].expr); }
  2564. #line 2900 "CMDgram.c"
  2565. break;
  2566. case 126: /* assign_op_struct: opDVASN expr */
  2567. #line 516 "CMDgram.y"
  2568. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '/'; (yyval.asn).expr = (yyvsp[0].expr); }
  2569. #line 2906 "CMDgram.c"
  2570. break;
  2571. case 127: /* assign_op_struct: opMODASN expr */
  2572. #line 518 "CMDgram.y"
  2573. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '%'; (yyval.asn).expr = (yyvsp[0].expr); }
  2574. #line 2912 "CMDgram.c"
  2575. break;
  2576. case 128: /* assign_op_struct: opANDASN expr */
  2577. #line 520 "CMDgram.y"
  2578. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '&'; (yyval.asn).expr = (yyvsp[0].expr); }
  2579. #line 2918 "CMDgram.c"
  2580. break;
  2581. case 129: /* assign_op_struct: opXORASN expr */
  2582. #line 522 "CMDgram.y"
  2583. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '^'; (yyval.asn).expr = (yyvsp[0].expr); }
  2584. #line 2924 "CMDgram.c"
  2585. break;
  2586. case 130: /* assign_op_struct: opORASN expr */
  2587. #line 524 "CMDgram.y"
  2588. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '|'; (yyval.asn).expr = (yyvsp[0].expr); }
  2589. #line 2930 "CMDgram.c"
  2590. break;
  2591. case 131: /* assign_op_struct: opSLASN expr */
  2592. #line 526 "CMDgram.y"
  2593. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = opSHL; (yyval.asn).expr = (yyvsp[0].expr); }
  2594. #line 2936 "CMDgram.c"
  2595. break;
  2596. case 132: /* assign_op_struct: opSRASN expr */
  2597. #line 528 "CMDgram.y"
  2598. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = opSHR; (yyval.asn).expr = (yyvsp[0].expr); }
  2599. #line 2942 "CMDgram.c"
  2600. break;
  2601. case 133: /* stmt_expr: funcall_expr */
  2602. #line 533 "CMDgram.y"
  2603. { (yyval.expr) = (yyvsp[0].expr); }
  2604. #line 2948 "CMDgram.c"
  2605. break;
  2606. case 134: /* stmt_expr: assert_expr */
  2607. #line 535 "CMDgram.y"
  2608. { (yyval.expr) = (yyvsp[0].expr); }
  2609. #line 2954 "CMDgram.c"
  2610. break;
  2611. case 135: /* stmt_expr: object_decl */
  2612. #line 537 "CMDgram.y"
  2613. { (yyval.expr) = (yyvsp[0].od); }
  2614. #line 2960 "CMDgram.c"
  2615. break;
  2616. case 136: /* stmt_expr: VAR '=' expr */
  2617. #line 539 "CMDgram.y"
  2618. { (yyval.expr) = AssignExprNode::alloc( (yyvsp[-2].s).lineNumber, (yyvsp[-2].s).value, NULL, (yyvsp[0].expr)); }
  2619. #line 2966 "CMDgram.c"
  2620. break;
  2621. case 137: /* stmt_expr: VAR '[' aidx_expr ']' '=' expr */
  2622. #line 541 "CMDgram.y"
  2623. { (yyval.expr) = AssignExprNode::alloc( (yyvsp[-5].s).lineNumber, (yyvsp[-5].s).value, (yyvsp[-3].expr), (yyvsp[0].expr)); }
  2624. #line 2972 "CMDgram.c"
  2625. break;
  2626. case 138: /* stmt_expr: VAR assign_op_struct */
  2627. #line 543 "CMDgram.y"
  2628. { (yyval.expr) = AssignOpExprNode::alloc( (yyvsp[-1].s).lineNumber, (yyvsp[-1].s).value, NULL, (yyvsp[0].asn).expr, (yyvsp[0].asn).token); }
  2629. #line 2978 "CMDgram.c"
  2630. break;
  2631. case 139: /* stmt_expr: VAR '[' aidx_expr ']' assign_op_struct */
  2632. #line 545 "CMDgram.y"
  2633. { (yyval.expr) = AssignOpExprNode::alloc( (yyvsp[-4].s).lineNumber, (yyvsp[-4].s).value, (yyvsp[-2].expr), (yyvsp[0].asn).expr, (yyvsp[0].asn).token); }
  2634. #line 2984 "CMDgram.c"
  2635. break;
  2636. case 140: /* stmt_expr: slot_acc assign_op_struct */
  2637. #line 547 "CMDgram.y"
  2638. { (yyval.expr) = SlotAssignOpNode::alloc( (yyvsp[-1].slot).lineNumber, (yyvsp[-1].slot).object, (yyvsp[-1].slot).slotName, (yyvsp[-1].slot).array, (yyvsp[0].asn).token, (yyvsp[0].asn).expr); }
  2639. #line 2990 "CMDgram.c"
  2640. break;
  2641. case 141: /* stmt_expr: slot_acc '=' expr */
  2642. #line 549 "CMDgram.y"
  2643. { (yyval.expr) = SlotAssignNode::alloc( (yyvsp[-2].slot).lineNumber, (yyvsp[-2].slot).object, (yyvsp[-2].slot).array, (yyvsp[-2].slot).slotName, (yyvsp[0].expr)); }
  2644. #line 2996 "CMDgram.c"
  2645. break;
  2646. case 142: /* stmt_expr: slot_acc '=' '{' expr_list '}' */
  2647. #line 551 "CMDgram.y"
  2648. { (yyval.expr) = SlotAssignNode::alloc( (yyvsp[-4].slot).lineNumber, (yyvsp[-4].slot).object, (yyvsp[-4].slot).array, (yyvsp[-4].slot).slotName, (yyvsp[-1].expr)); }
  2649. #line 3002 "CMDgram.c"
  2650. break;
  2651. case 143: /* funcall_expr: IDENT '(' expr_list_decl ')' */
  2652. #line 556 "CMDgram.y"
  2653. { (yyval.expr) = FuncCallExprNode::alloc( (yyvsp[-3].s).lineNumber, (yyvsp[-3].s).value, NULL, (yyvsp[-1].expr), false); }
  2654. #line 3008 "CMDgram.c"
  2655. break;
  2656. case 144: /* funcall_expr: IDENT opCOLONCOLON IDENT '(' expr_list_decl ')' */
  2657. #line 558 "CMDgram.y"
  2658. { (yyval.expr) = FuncCallExprNode::alloc( (yyvsp[-5].s).lineNumber, (yyvsp[-3].s).value, (yyvsp[-5].s).value, (yyvsp[-1].expr), false); }
  2659. #line 3014 "CMDgram.c"
  2660. break;
  2661. case 145: /* funcall_expr: expr '.' IDENT '(' expr_list_decl ')' */
  2662. #line 560 "CMDgram.y"
  2663. { (yyvsp[-5].expr)->append((yyvsp[-1].expr)); (yyval.expr) = FuncCallExprNode::alloc( (yyvsp[-5].expr)->dbgLineNumber, (yyvsp[-3].s).value, NULL, (yyvsp[-5].expr), true); }
  2664. #line 3020 "CMDgram.c"
  2665. break;
  2666. case 146: /* assert_expr: rwASSERT '(' expr ')' */
  2667. #line 570 "CMDgram.y"
  2668. { (yyval.expr) = AssertCallExprNode::alloc( (yyvsp[-3].i).lineNumber, (yyvsp[-1].expr), NULL ); }
  2669. #line 3026 "CMDgram.c"
  2670. break;
  2671. case 147: /* assert_expr: rwASSERT '(' expr ',' STRATOM ')' */
  2672. #line 572 "CMDgram.y"
  2673. { (yyval.expr) = AssertCallExprNode::alloc( (yyvsp[-5].i).lineNumber, (yyvsp[-3].expr), (yyvsp[-1].str).value ); }
  2674. #line 3032 "CMDgram.c"
  2675. break;
  2676. case 148: /* expr_list_decl: %empty */
  2677. #line 577 "CMDgram.y"
  2678. { (yyval.expr) = NULL; }
  2679. #line 3038 "CMDgram.c"
  2680. break;
  2681. case 149: /* expr_list_decl: expr_list */
  2682. #line 579 "CMDgram.y"
  2683. { (yyval.expr) = (yyvsp[0].expr); }
  2684. #line 3044 "CMDgram.c"
  2685. break;
  2686. case 150: /* expr_list: expr */
  2687. #line 584 "CMDgram.y"
  2688. { (yyval.expr) = (yyvsp[0].expr); }
  2689. #line 3050 "CMDgram.c"
  2690. break;
  2691. case 151: /* expr_list: expr_list ',' expr */
  2692. #line 586 "CMDgram.y"
  2693. { ((yyvsp[-2].expr))->append((yyvsp[0].expr)); (yyval.expr) = (yyvsp[-2].expr); }
  2694. #line 3056 "CMDgram.c"
  2695. break;
  2696. case 152: /* slot_assign_list_opt: %empty */
  2697. #line 591 "CMDgram.y"
  2698. { (yyval.slist) = NULL; }
  2699. #line 3062 "CMDgram.c"
  2700. break;
  2701. case 153: /* slot_assign_list_opt: slot_assign_list */
  2702. #line 593 "CMDgram.y"
  2703. { (yyval.slist) = (yyvsp[0].slist); }
  2704. #line 3068 "CMDgram.c"
  2705. break;
  2706. case 154: /* slot_assign_list: slot_assign */
  2707. #line 598 "CMDgram.y"
  2708. { (yyval.slist) = (yyvsp[0].slist); }
  2709. #line 3074 "CMDgram.c"
  2710. break;
  2711. case 155: /* slot_assign_list: slot_assign_list slot_assign */
  2712. #line 600 "CMDgram.y"
  2713. { (yyvsp[-1].slist)->append((yyvsp[0].slist)); (yyval.slist) = (yyvsp[-1].slist); }
  2714. #line 3080 "CMDgram.c"
  2715. break;
  2716. case 156: /* slot_assign: IDENT '=' expr ';' */
  2717. #line 605 "CMDgram.y"
  2718. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-3].s).lineNumber, NULL, NULL, (yyvsp[-3].s).value, (yyvsp[-1].expr)); }
  2719. #line 3086 "CMDgram.c"
  2720. break;
  2721. case 157: /* slot_assign: TYPEIDENT IDENT '=' expr ';' */
  2722. #line 607 "CMDgram.y"
  2723. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-4].i).lineNumber, NULL, NULL, (yyvsp[-3].s).value, (yyvsp[-1].expr), (yyvsp[-4].i).value); }
  2724. #line 3092 "CMDgram.c"
  2725. break;
  2726. case 158: /* slot_assign: rwDATABLOCK '=' expr ';' */
  2727. #line 609 "CMDgram.y"
  2728. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-3].i).lineNumber, NULL, NULL, StringTable->insert("datablock"), (yyvsp[-1].expr)); }
  2729. #line 3098 "CMDgram.c"
  2730. break;
  2731. case 159: /* slot_assign: IDENT '[' aidx_expr ']' '=' expr ';' */
  2732. #line 611 "CMDgram.y"
  2733. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-6].s).lineNumber, NULL, (yyvsp[-4].expr), (yyvsp[-6].s).value, (yyvsp[-1].expr)); }
  2734. #line 3104 "CMDgram.c"
  2735. break;
  2736. case 160: /* slot_assign: TYPEIDENT IDENT '[' aidx_expr ']' '=' expr ';' */
  2737. #line 613 "CMDgram.y"
  2738. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-7].i).lineNumber, NULL, (yyvsp[-4].expr), (yyvsp[-6].s).value, (yyvsp[-1].expr), (yyvsp[-7].i).value); }
  2739. #line 3110 "CMDgram.c"
  2740. break;
  2741. case 161: /* aidx_expr: expr */
  2742. #line 618 "CMDgram.y"
  2743. { (yyval.expr) = (yyvsp[0].expr); }
  2744. #line 3116 "CMDgram.c"
  2745. break;
  2746. case 162: /* aidx_expr: aidx_expr ',' expr */
  2747. #line 620 "CMDgram.y"
  2748. { (yyval.expr) = CommaCatExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2749. #line 3122 "CMDgram.c"
  2750. break;
  2751. #line 3126 "CMDgram.c"
  2752. default: break;
  2753. }
  2754. /* User semantic actions sometimes alter yychar, and that requires
  2755. that yytoken be updated with the new translation. We take the
  2756. approach of translating immediately before every use of yytoken.
  2757. One alternative is translating here after every semantic action,
  2758. but that translation would be missed if the semantic action invokes
  2759. YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
  2760. if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
  2761. incorrect destructor might then be invoked immediately. In the
  2762. case of YYERROR or YYBACKUP, subsequent parser actions might lead
  2763. to an incorrect destructor call or verbose syntax error message
  2764. before the lookahead is translated. */
  2765. YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
  2766. YYPOPSTACK (yylen);
  2767. yylen = 0;
  2768. *++yyvsp = yyval;
  2769. *++yylsp = yyloc;
  2770. /* Now 'shift' the result of the reduction. Determine what state
  2771. that goes to, based on the state we popped back to and the rule
  2772. number reduced by. */
  2773. {
  2774. const int yylhs = yyr1[yyn] - YYNTOKENS;
  2775. const int yyi = yypgoto[yylhs] + *yyssp;
  2776. yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
  2777. ? yytable[yyi]
  2778. : yydefgoto[yylhs]);
  2779. }
  2780. goto yynewstate;
  2781. /*--------------------------------------.
  2782. | yyerrlab -- here on detecting error. |
  2783. `--------------------------------------*/
  2784. yyerrlab:
  2785. /* Make sure we have latest lookahead translation. See comments at
  2786. user semantic actions for why this is necessary. */
  2787. yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  2788. /* If not already recovering from an error, report this error. */
  2789. if (!yyerrstatus)
  2790. {
  2791. ++yynerrs;
  2792. {
  2793. yypcontext_t yyctx
  2794. = {yyssp, yytoken, &yylloc};
  2795. if (yyreport_syntax_error (&yyctx) == 2)
  2796. YYNOMEM;
  2797. }
  2798. }
  2799. yyerror_range[1] = yylloc;
  2800. if (yyerrstatus == 3)
  2801. {
  2802. /* If just tried and failed to reuse lookahead token after an
  2803. error, discard it. */
  2804. if (yychar <= YYEOF)
  2805. {
  2806. /* Return failure if at end of input. */
  2807. if (yychar == YYEOF)
  2808. YYABORT;
  2809. }
  2810. else
  2811. {
  2812. yydestruct ("Error: discarding",
  2813. yytoken, &yylval, &yylloc);
  2814. yychar = YYEMPTY;
  2815. }
  2816. }
  2817. /* Else will try to reuse lookahead token after shifting the error
  2818. token. */
  2819. goto yyerrlab1;
  2820. /*---------------------------------------------------.
  2821. | yyerrorlab -- error raised explicitly by YYERROR. |
  2822. `---------------------------------------------------*/
  2823. yyerrorlab:
  2824. /* Pacify compilers when the user code never invokes YYERROR and the
  2825. label yyerrorlab therefore never appears in user code. */
  2826. if (0)
  2827. YYERROR;
  2828. ++yynerrs;
  2829. /* Do not reclaim the symbols of the rule whose action triggered
  2830. this YYERROR. */
  2831. YYPOPSTACK (yylen);
  2832. yylen = 0;
  2833. YY_STACK_PRINT (yyss, yyssp);
  2834. yystate = *yyssp;
  2835. goto yyerrlab1;
  2836. /*-------------------------------------------------------------.
  2837. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  2838. `-------------------------------------------------------------*/
  2839. yyerrlab1:
  2840. yyerrstatus = 3; /* Each real token shifted decrements this. */
  2841. /* Pop stack until we find a state that shifts the error token. */
  2842. for (;;)
  2843. {
  2844. yyn = yypact[yystate];
  2845. if (!yypact_value_is_default (yyn))
  2846. {
  2847. yyn += YYSYMBOL_YYerror;
  2848. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
  2849. {
  2850. yyn = yytable[yyn];
  2851. if (0 < yyn)
  2852. break;
  2853. }
  2854. }
  2855. /* Pop the current state because it cannot handle the error token. */
  2856. if (yyssp == yyss)
  2857. YYABORT;
  2858. yyerror_range[1] = *yylsp;
  2859. yydestruct ("Error: popping",
  2860. YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp);
  2861. YYPOPSTACK (1);
  2862. yystate = *yyssp;
  2863. YY_STACK_PRINT (yyss, yyssp);
  2864. }
  2865. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  2866. *++yyvsp = yylval;
  2867. YY_IGNORE_MAYBE_UNINITIALIZED_END
  2868. yyerror_range[2] = yylloc;
  2869. ++yylsp;
  2870. YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
  2871. /* Shift the error token. */
  2872. YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
  2873. yystate = yyn;
  2874. goto yynewstate;
  2875. /*-------------------------------------.
  2876. | yyacceptlab -- YYACCEPT comes here. |
  2877. `-------------------------------------*/
  2878. yyacceptlab:
  2879. yyresult = 0;
  2880. goto yyreturnlab;
  2881. /*-----------------------------------.
  2882. | yyabortlab -- YYABORT comes here. |
  2883. `-----------------------------------*/
  2884. yyabortlab:
  2885. yyresult = 1;
  2886. goto yyreturnlab;
  2887. /*-----------------------------------------------------------.
  2888. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
  2889. `-----------------------------------------------------------*/
  2890. yyexhaustedlab:
  2891. yyerror (YY_("memory exhausted"));
  2892. yyresult = 2;
  2893. goto yyreturnlab;
  2894. /*----------------------------------------------------------.
  2895. | yyreturnlab -- parsing is finished, clean up and return. |
  2896. `----------------------------------------------------------*/
  2897. yyreturnlab:
  2898. if (yychar != YYEMPTY)
  2899. {
  2900. /* Make sure we have latest lookahead translation. See comments at
  2901. user semantic actions for why this is necessary. */
  2902. yytoken = YYTRANSLATE (yychar);
  2903. yydestruct ("Cleanup: discarding lookahead",
  2904. yytoken, &yylval, &yylloc);
  2905. }
  2906. /* Do not reclaim the symbols of the rule whose action triggered
  2907. this YYABORT or YYACCEPT. */
  2908. YYPOPSTACK (yylen);
  2909. YY_STACK_PRINT (yyss, yyssp);
  2910. while (yyssp != yyss)
  2911. {
  2912. yydestruct ("Cleanup: popping",
  2913. YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp);
  2914. YYPOPSTACK (1);
  2915. }
  2916. #ifndef yyoverflow
  2917. if (yyss != yyssa)
  2918. YYSTACK_FREE (yyss);
  2919. #endif
  2920. return yyresult;
  2921. }
  2922. #line 622 "CMDgram.y"
  2923. int
  2924. yyreport_syntax_error (const yypcontext_t *ctx)
  2925. {
  2926. int ret = 0;
  2927. String output;
  2928. const YYLTYPE *loc = yypcontext_location (ctx);
  2929. output += "syntax error: ";
  2930. yysymbol_kind_t nxt = yypcontext_token(ctx);
  2931. if (nxt != YYSYMBOL_YYEMPTY)
  2932. output += String::ToString("unexpected: %s at column: %d", yysymbol_name(nxt), loc->first_column);
  2933. enum { TOKENMAX = 10 };
  2934. yysymbol_kind_t expected[TOKENMAX];
  2935. int exp = yypcontext_expected_tokens(ctx, expected, TOKENMAX);
  2936. if (exp < 0)
  2937. ret = exp;
  2938. else
  2939. {
  2940. for (int i = 0; i < exp; ++i)
  2941. output += String::ToString("%s %s", i == 0 ? ": expected" : "or", yysymbol_name(expected[i]));
  2942. }
  2943. if (lines.size() > 0)
  2944. {
  2945. output += "\n";
  2946. for (int i = 0; i < lines.size(); i++)
  2947. {
  2948. int line = lines.size() - i;
  2949. output += String::ToString("%5d | ", loc->first_line - (line-1)) + lines[i] + "\n";
  2950. }
  2951. output += String::ToString("%5s | %*s", "", loc->first_column, "^");
  2952. }
  2953. yyerror("%s", output.c_str());
  2954. return ret;
  2955. }