cmdgram.cpp 144 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415
  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, 170, 170, 176, 177, 182, 184, 186, 191, 196,
  613. 198, 204, 205, 210, 211, 212, 213, 214, 215, 216,
  614. 218, 220, 222, 224, 226, 228, 230, 235, 237, 243,
  615. 244, 249, 251, 256, 261, 263, 265, 267, 269, 271,
  616. 277, 278, 284, 285, 291, 292, 298, 299, 301, 303,
  617. 308, 310, 315, 317, 322, 324, 329, 331, 333, 338,
  618. 340, 345, 347, 352, 354, 359, 361, 363, 365, 367,
  619. 369, 371, 373, 378, 380, 385, 390, 392, 394, 396,
  620. 398, 400, 402, 404, 406, 408, 410, 412, 414, 416,
  621. 418, 420, 422, 424, 426, 428, 430, 432, 434, 436,
  622. 438, 440, 442, 444, 446, 448, 450, 452, 454, 456,
  623. 458, 460, 462, 464, 466, 488, 490, 495, 497, 502,
  624. 504, 509, 511, 513, 515, 517, 519, 521, 523, 525,
  625. 527, 529, 531, 536, 538, 540, 542, 544, 546, 548,
  626. 550, 552, 554, 559, 561, 563, 573, 575, 581, 582,
  627. 587, 589, 595, 596, 601, 603, 608, 610, 612, 614,
  628. 616, 621, 623
  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. switch (yykind)
  1743. {
  1744. case YYSYMBOL_TTAG: /* TTAG */
  1745. #line 106 "CMDgram.y"
  1746. { dFree(((*yyvaluep).s).value); }
  1747. #line 1913 "CMDgram.c"
  1748. break;
  1749. case YYSYMBOL_VAR: /* VAR */
  1750. #line 106 "CMDgram.y"
  1751. { dFree(((*yyvaluep).s).value); }
  1752. #line 1919 "CMDgram.c"
  1753. break;
  1754. case YYSYMBOL_IDENT: /* IDENT */
  1755. #line 106 "CMDgram.y"
  1756. { dFree(((*yyvaluep).s).value); }
  1757. #line 1925 "CMDgram.c"
  1758. break;
  1759. case YYSYMBOL_DOCBLOCK: /* DOCBLOCK */
  1760. #line 107 "CMDgram.y"
  1761. { dFree(((*yyvaluep).str).value); }
  1762. #line 1931 "CMDgram.c"
  1763. break;
  1764. case YYSYMBOL_STRATOM: /* STRATOM */
  1765. #line 107 "CMDgram.y"
  1766. { dFree(((*yyvaluep).str).value); }
  1767. #line 1937 "CMDgram.c"
  1768. break;
  1769. case YYSYMBOL_TAGATOM: /* TAGATOM */
  1770. #line 107 "CMDgram.y"
  1771. { dFree(((*yyvaluep).str).value); }
  1772. #line 1943 "CMDgram.c"
  1773. break;
  1774. case YYSYMBOL_parent_block: /* parent_block */
  1775. #line 106 "CMDgram.y"
  1776. { dFree(((*yyvaluep).s).value); }
  1777. #line 1949 "CMDgram.c"
  1778. break;
  1779. default:
  1780. break;
  1781. }
  1782. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1783. }
  1784. /* Lookahead token kind. */
  1785. int yychar;
  1786. /* The semantic value of the lookahead symbol. */
  1787. YYSTYPE yylval;
  1788. /* Location data for the lookahead symbol. */
  1789. YYLTYPE yylloc
  1790. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  1791. = { 1, 1, 1, 1 }
  1792. # endif
  1793. ;
  1794. /* Number of syntax errors so far. */
  1795. int yynerrs;
  1796. /*----------.
  1797. | yyparse. |
  1798. `----------*/
  1799. int
  1800. yyparse (void)
  1801. {
  1802. yy_state_fast_t yystate = 0;
  1803. /* Number of tokens to shift before error messages enabled. */
  1804. int yyerrstatus = 0;
  1805. /* Refer to the stacks through separate pointers, to allow yyoverflow
  1806. to reallocate them elsewhere. */
  1807. /* Their size. */
  1808. YYPTRDIFF_T yystacksize = YYINITDEPTH;
  1809. /* The state stack: array, bottom, top. */
  1810. yy_state_t yyssa[YYINITDEPTH];
  1811. yy_state_t *yyss = yyssa;
  1812. yy_state_t *yyssp = yyss;
  1813. /* The semantic value stack: array, bottom, top. */
  1814. YYSTYPE yyvsa[YYINITDEPTH];
  1815. YYSTYPE *yyvs = yyvsa;
  1816. YYSTYPE *yyvsp = yyvs;
  1817. /* The location stack: array, bottom, top. */
  1818. YYLTYPE yylsa[YYINITDEPTH];
  1819. YYLTYPE *yyls = yylsa;
  1820. YYLTYPE *yylsp = yyls;
  1821. int yyn;
  1822. /* The return value of yyparse. */
  1823. int yyresult;
  1824. /* Lookahead symbol kind. */
  1825. yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  1826. /* The variables used to return semantic value and location from the
  1827. action routines. */
  1828. YYSTYPE yyval;
  1829. YYLTYPE yyloc;
  1830. /* The locations where the error started and ended. */
  1831. YYLTYPE yyerror_range[3];
  1832. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
  1833. /* The number of symbols on the RHS of the reduced rule.
  1834. Keep to zero when no symbol should be popped. */
  1835. int yylen = 0;
  1836. YYDPRINTF ((stderr, "Starting parse\n"));
  1837. yychar = YYEMPTY; /* Cause a token to be read. */
  1838. yylsp[0] = yylloc;
  1839. goto yysetstate;
  1840. /*------------------------------------------------------------.
  1841. | yynewstate -- push a new state, which is found in yystate. |
  1842. `------------------------------------------------------------*/
  1843. yynewstate:
  1844. /* In all cases, when you get here, the value and location stacks
  1845. have just been pushed. So pushing a state here evens the stacks. */
  1846. yyssp++;
  1847. /*--------------------------------------------------------------------.
  1848. | yysetstate -- set current state (the top of the stack) to yystate. |
  1849. `--------------------------------------------------------------------*/
  1850. yysetstate:
  1851. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1852. YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  1853. YY_IGNORE_USELESS_CAST_BEGIN
  1854. *yyssp = YY_CAST (yy_state_t, yystate);
  1855. YY_IGNORE_USELESS_CAST_END
  1856. YY_STACK_PRINT (yyss, yyssp);
  1857. if (yyss + yystacksize - 1 <= yyssp)
  1858. #if !defined yyoverflow && !defined YYSTACK_RELOCATE
  1859. YYNOMEM;
  1860. #else
  1861. {
  1862. /* Get the current used size of the three stacks, in elements. */
  1863. YYPTRDIFF_T yysize = yyssp - yyss + 1;
  1864. # if defined yyoverflow
  1865. {
  1866. /* Give user a chance to reallocate the stack. Use copies of
  1867. these so that the &'s don't force the real ones into
  1868. memory. */
  1869. yy_state_t *yyss1 = yyss;
  1870. YYSTYPE *yyvs1 = yyvs;
  1871. YYLTYPE *yyls1 = yyls;
  1872. /* Each stack pointer address is followed by the size of the
  1873. data in use in that stack, in bytes. This used to be a
  1874. conditional around just the two extra args, but that might
  1875. be undefined if yyoverflow is a macro. */
  1876. yyoverflow (YY_("memory exhausted"),
  1877. &yyss1, yysize * YYSIZEOF (*yyssp),
  1878. &yyvs1, yysize * YYSIZEOF (*yyvsp),
  1879. &yyls1, yysize * YYSIZEOF (*yylsp),
  1880. &yystacksize);
  1881. yyss = yyss1;
  1882. yyvs = yyvs1;
  1883. yyls = yyls1;
  1884. }
  1885. # else /* defined YYSTACK_RELOCATE */
  1886. /* Extend the stack our own way. */
  1887. if (YYMAXDEPTH <= yystacksize)
  1888. YYNOMEM;
  1889. yystacksize *= 2;
  1890. if (YYMAXDEPTH < yystacksize)
  1891. yystacksize = YYMAXDEPTH;
  1892. {
  1893. yy_state_t *yyss1 = yyss;
  1894. union yyalloc *yyptr =
  1895. YY_CAST (union yyalloc *,
  1896. YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
  1897. if (! yyptr)
  1898. YYNOMEM;
  1899. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1900. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1901. YYSTACK_RELOCATE (yyls_alloc, yyls);
  1902. # undef YYSTACK_RELOCATE
  1903. if (yyss1 != yyssa)
  1904. YYSTACK_FREE (yyss1);
  1905. }
  1906. # endif
  1907. yyssp = yyss + yysize - 1;
  1908. yyvsp = yyvs + yysize - 1;
  1909. yylsp = yyls + yysize - 1;
  1910. YY_IGNORE_USELESS_CAST_BEGIN
  1911. YYDPRINTF ((stderr, "Stack size increased to %ld\n",
  1912. YY_CAST (long, yystacksize)));
  1913. YY_IGNORE_USELESS_CAST_END
  1914. if (yyss + yystacksize - 1 <= yyssp)
  1915. YYABORT;
  1916. }
  1917. #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
  1918. if (yystate == YYFINAL)
  1919. YYACCEPT;
  1920. goto yybackup;
  1921. /*-----------.
  1922. | yybackup. |
  1923. `-----------*/
  1924. yybackup:
  1925. /* Do appropriate processing given the current state. Read a
  1926. lookahead token if we need one and don't already have one. */
  1927. /* First try to decide what to do without reference to lookahead token. */
  1928. yyn = yypact[yystate];
  1929. if (yypact_value_is_default (yyn))
  1930. goto yydefault;
  1931. /* Not known => get a lookahead token if don't already have one. */
  1932. /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
  1933. if (yychar == YYEMPTY)
  1934. {
  1935. YYDPRINTF ((stderr, "Reading a token\n"));
  1936. yychar = yylex ();
  1937. }
  1938. if (yychar <= YYEOF)
  1939. {
  1940. yychar = YYEOF;
  1941. yytoken = YYSYMBOL_YYEOF;
  1942. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1943. }
  1944. else if (yychar == YYerror)
  1945. {
  1946. /* The scanner already issued an error message, process directly
  1947. to error recovery. But do not keep the error token as
  1948. lookahead, it is too special and may lead us to an endless
  1949. loop in error recovery. */
  1950. yychar = YYUNDEF;
  1951. yytoken = YYSYMBOL_YYerror;
  1952. yyerror_range[1] = yylloc;
  1953. goto yyerrlab1;
  1954. }
  1955. else
  1956. {
  1957. yytoken = YYTRANSLATE (yychar);
  1958. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1959. }
  1960. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1961. detect an error, take that action. */
  1962. yyn += yytoken;
  1963. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1964. goto yydefault;
  1965. yyn = yytable[yyn];
  1966. if (yyn <= 0)
  1967. {
  1968. if (yytable_value_is_error (yyn))
  1969. goto yyerrlab;
  1970. yyn = -yyn;
  1971. goto yyreduce;
  1972. }
  1973. /* Count tokens shifted since error; after three, turn off error
  1974. status. */
  1975. if (yyerrstatus)
  1976. yyerrstatus--;
  1977. /* Shift the lookahead token. */
  1978. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1979. yystate = yyn;
  1980. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1981. *++yyvsp = yylval;
  1982. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1983. *++yylsp = yylloc;
  1984. /* Discard the shifted token. */
  1985. yychar = YYEMPTY;
  1986. goto yynewstate;
  1987. /*-----------------------------------------------------------.
  1988. | yydefault -- do the default action for the current state. |
  1989. `-----------------------------------------------------------*/
  1990. yydefault:
  1991. yyn = yydefact[yystate];
  1992. if (yyn == 0)
  1993. goto yyerrlab;
  1994. goto yyreduce;
  1995. /*-----------------------------.
  1996. | yyreduce -- do a reduction. |
  1997. `-----------------------------*/
  1998. yyreduce:
  1999. /* yyn is the number of a rule to reduce with. */
  2000. yylen = yyr2[yyn];
  2001. /* If YYLEN is nonzero, implement the default value of the action:
  2002. '$$ = $1'.
  2003. Otherwise, the following line sets YYVAL to garbage.
  2004. This behavior is undocumented and Bison
  2005. users should not rely upon it. Assigning to YYVAL
  2006. unconditionally makes the parser a bit smaller, and it avoids a
  2007. GCC warning that YYVAL may be used uninitialized. */
  2008. yyval = yyvsp[1-yylen];
  2009. /* Default location. */
  2010. YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  2011. yyerror_range[1] = yyloc;
  2012. YY_REDUCE_PRINT (yyn);
  2013. switch (yyn)
  2014. {
  2015. case 2: /* start: decl_list */
  2016. #line 171 "CMDgram.y"
  2017. { }
  2018. #line 2244 "CMDgram.c"
  2019. break;
  2020. case 3: /* decl_list: %empty */
  2021. #line 176 "CMDgram.y"
  2022. { (yyval.stmt) = nil; }
  2023. #line 2250 "CMDgram.c"
  2024. break;
  2025. case 4: /* decl_list: decl_list decl */
  2026. #line 178 "CMDgram.y"
  2027. { if(!Script::gStatementList) { Script::gStatementList = (yyvsp[0].stmt); } else { Script::gStatementList->append((yyvsp[0].stmt)); } }
  2028. #line 2256 "CMDgram.c"
  2029. break;
  2030. case 5: /* decl: stmt */
  2031. #line 183 "CMDgram.y"
  2032. { (yyval.stmt) = (yyvsp[0].stmt); }
  2033. #line 2262 "CMDgram.c"
  2034. break;
  2035. case 6: /* decl: fn_decl_stmt */
  2036. #line 185 "CMDgram.y"
  2037. { (yyval.stmt) = (yyvsp[0].stmt); }
  2038. #line 2268 "CMDgram.c"
  2039. break;
  2040. case 7: /* decl: package_decl */
  2041. #line 187 "CMDgram.y"
  2042. { (yyval.stmt) = (yyvsp[0].stmt); }
  2043. #line 2274 "CMDgram.c"
  2044. break;
  2045. case 8: /* package_decl: rwPACKAGE IDENT '{' fn_decl_list '}' ';' */
  2046. #line 192 "CMDgram.y"
  2047. { (yyval.stmt) = (yyvsp[-2].stmt); for(StmtNode *walk = ((yyvsp[-2].stmt));walk;walk = walk->getNext() ) walk->setPackage((yyvsp[-4].s).value); }
  2048. #line 2280 "CMDgram.c"
  2049. break;
  2050. case 9: /* fn_decl_list: fn_decl_stmt */
  2051. #line 197 "CMDgram.y"
  2052. { (yyval.stmt) = (yyvsp[0].stmt); }
  2053. #line 2286 "CMDgram.c"
  2054. break;
  2055. case 10: /* fn_decl_list: fn_decl_list fn_decl_stmt */
  2056. #line 199 "CMDgram.y"
  2057. { (yyval.stmt) = (yyvsp[-1].stmt); ((yyvsp[-1].stmt))->append((yyvsp[0].stmt)); }
  2058. #line 2292 "CMDgram.c"
  2059. break;
  2060. case 11: /* statement_list: %empty */
  2061. #line 204 "CMDgram.y"
  2062. { (yyval.stmt) = nil; }
  2063. #line 2298 "CMDgram.c"
  2064. break;
  2065. case 12: /* statement_list: statement_list stmt */
  2066. #line 206 "CMDgram.y"
  2067. { if(!(yyvsp[-1].stmt)) { (yyval.stmt) = (yyvsp[0].stmt); } else { ((yyvsp[-1].stmt))->append((yyvsp[0].stmt)); (yyval.stmt) = (yyvsp[-1].stmt); } }
  2068. #line 2304 "CMDgram.c"
  2069. break;
  2070. case 19: /* stmt: rwBREAK ';' */
  2071. #line 217 "CMDgram.y"
  2072. { (yyval.stmt) = BreakStmtNode::alloc( (yyvsp[-1].i).lineNumber ); }
  2073. #line 2310 "CMDgram.c"
  2074. break;
  2075. case 20: /* stmt: rwCONTINUE ';' */
  2076. #line 219 "CMDgram.y"
  2077. { (yyval.stmt) = ContinueStmtNode::alloc( (yyvsp[-1].i).lineNumber ); }
  2078. #line 2316 "CMDgram.c"
  2079. break;
  2080. case 21: /* stmt: rwRETURN ';' */
  2081. #line 221 "CMDgram.y"
  2082. { (yyval.stmt) = ReturnStmtNode::alloc( (yyvsp[-1].i).lineNumber, NULL ); }
  2083. #line 2322 "CMDgram.c"
  2084. break;
  2085. case 22: /* stmt: rwRETURN expr ';' */
  2086. #line 223 "CMDgram.y"
  2087. { (yyval.stmt) = ReturnStmtNode::alloc( (yyvsp[-2].i).lineNumber, (yyvsp[-1].expr) ); }
  2088. #line 2328 "CMDgram.c"
  2089. break;
  2090. case 23: /* stmt: expression_stmt ';' */
  2091. #line 225 "CMDgram.y"
  2092. { (yyval.stmt) = (yyvsp[-1].stmt); }
  2093. #line 2334 "CMDgram.c"
  2094. break;
  2095. case 24: /* stmt: TTAG '=' expr ';' */
  2096. #line 227 "CMDgram.y"
  2097. { (yyval.stmt) = TTagSetStmtNode::alloc( (yyvsp[-3].s).lineNumber, (yyvsp[-3].s).value, (yyvsp[-1].expr), NULL ); }
  2098. #line 2340 "CMDgram.c"
  2099. break;
  2100. case 25: /* stmt: TTAG '=' expr ',' expr ';' */
  2101. #line 229 "CMDgram.y"
  2102. { (yyval.stmt) = TTagSetStmtNode::alloc( (yyvsp[-5].s).lineNumber, (yyvsp[-5].s).value, (yyvsp[-3].expr), (yyvsp[-1].expr) ); }
  2103. #line 2346 "CMDgram.c"
  2104. break;
  2105. case 26: /* stmt: DOCBLOCK */
  2106. #line 231 "CMDgram.y"
  2107. { (yyval.stmt) = StrConstNode::alloc( (yyvsp[0].str).lineNumber, (yyvsp[0].str).value, false, true ); }
  2108. #line 2352 "CMDgram.c"
  2109. break;
  2110. case 27: /* fn_decl_stmt: rwDEFINE IDENT '(' var_list_decl ')' '{' statement_list '}' */
  2111. #line 236 "CMDgram.y"
  2112. { (yyval.stmt) = FunctionDeclStmtNode::alloc( (yyvsp[-7].i).lineNumber, (yyvsp[-6].s).value, NULL, (yyvsp[-4].var), (yyvsp[-1].stmt) ); }
  2113. #line 2358 "CMDgram.c"
  2114. break;
  2115. case 28: /* fn_decl_stmt: rwDEFINE IDENT opCOLONCOLON IDENT '(' var_list_decl ')' '{' statement_list '}' */
  2116. #line 238 "CMDgram.y"
  2117. { (yyval.stmt) = FunctionDeclStmtNode::alloc( (yyvsp[-9].i).lineNumber, (yyvsp[-6].s).value, (yyvsp[-8].s).value, (yyvsp[-4].var), (yyvsp[-1].stmt) ); }
  2118. #line 2364 "CMDgram.c"
  2119. break;
  2120. case 29: /* var_list_decl: %empty */
  2121. #line 243 "CMDgram.y"
  2122. { (yyval.var) = NULL; }
  2123. #line 2370 "CMDgram.c"
  2124. break;
  2125. case 30: /* var_list_decl: var_list */
  2126. #line 245 "CMDgram.y"
  2127. { (yyval.var) = (yyvsp[0].var); }
  2128. #line 2376 "CMDgram.c"
  2129. break;
  2130. case 31: /* var_list: VAR */
  2131. #line 250 "CMDgram.y"
  2132. { (yyval.var) = VarNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value, NULL ); }
  2133. #line 2382 "CMDgram.c"
  2134. break;
  2135. case 32: /* var_list: var_list ',' VAR */
  2136. #line 252 "CMDgram.y"
  2137. { (yyval.var) = (yyvsp[-2].var); ((StmtNode*)((yyvsp[-2].var)))->append((StmtNode*)VarNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value, NULL ) ); }
  2138. #line 2388 "CMDgram.c"
  2139. break;
  2140. case 33: /* datablock_decl: rwDATABLOCK class_name_expr '(' expr parent_block ')' '{' slot_assign_list_opt '}' ';' */
  2141. #line 257 "CMDgram.y"
  2142. { (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); }
  2143. #line 2394 "CMDgram.c"
  2144. break;
  2145. case 34: /* object_decl: rwDECLARE class_name_expr '(' object_name parent_block object_args ')' '{' object_declare_block '}' */
  2146. #line 262 "CMDgram.y"
  2147. { (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); }
  2148. #line 2400 "CMDgram.c"
  2149. break;
  2150. case 35: /* object_decl: rwDECLARE class_name_expr '(' object_name parent_block object_args ')' */
  2151. #line 264 "CMDgram.y"
  2152. { (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); }
  2153. #line 2406 "CMDgram.c"
  2154. break;
  2155. case 36: /* object_decl: rwDECLARE class_name_expr '(' '[' object_name ']' parent_block object_args ')' '{' object_declare_block '}' */
  2156. #line 266 "CMDgram.y"
  2157. { (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); }
  2158. #line 2412 "CMDgram.c"
  2159. break;
  2160. case 37: /* object_decl: rwDECLARE class_name_expr '(' '[' object_name ']' parent_block object_args ')' */
  2161. #line 268 "CMDgram.y"
  2162. { (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); }
  2163. #line 2418 "CMDgram.c"
  2164. break;
  2165. case 38: /* object_decl: rwDECLARESINGLETON class_name_expr '(' object_name parent_block object_args ')' '{' object_declare_block '}' */
  2166. #line 270 "CMDgram.y"
  2167. { (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); }
  2168. #line 2424 "CMDgram.c"
  2169. break;
  2170. case 39: /* object_decl: rwDECLARESINGLETON class_name_expr '(' object_name parent_block object_args ')' */
  2171. #line 272 "CMDgram.y"
  2172. { (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); }
  2173. #line 2430 "CMDgram.c"
  2174. break;
  2175. case 40: /* parent_block: %empty */
  2176. #line 277 "CMDgram.y"
  2177. { (yyval.s).value = NULL; }
  2178. #line 2436 "CMDgram.c"
  2179. break;
  2180. case 41: /* parent_block: ':' IDENT */
  2181. #line 279 "CMDgram.y"
  2182. { (yyval.s) = (yyvsp[0].s); }
  2183. #line 2442 "CMDgram.c"
  2184. break;
  2185. case 42: /* object_name: %empty */
  2186. #line 284 "CMDgram.y"
  2187. { (yyval.expr) = StrConstNode::alloc( CodeBlock::smCurrentParser->getCurrentLine(), "", false); }
  2188. #line 2448 "CMDgram.c"
  2189. break;
  2190. case 43: /* object_name: expr */
  2191. #line 286 "CMDgram.y"
  2192. { (yyval.expr) = (yyvsp[0].expr); }
  2193. #line 2454 "CMDgram.c"
  2194. break;
  2195. case 44: /* object_args: %empty */
  2196. #line 291 "CMDgram.y"
  2197. { (yyval.expr) = NULL; }
  2198. #line 2460 "CMDgram.c"
  2199. break;
  2200. case 45: /* object_args: ',' expr_list */
  2201. #line 293 "CMDgram.y"
  2202. { (yyval.expr) = (yyvsp[0].expr); }
  2203. #line 2466 "CMDgram.c"
  2204. break;
  2205. case 46: /* object_declare_block: %empty */
  2206. #line 298 "CMDgram.y"
  2207. { (yyval.odcl).slots = NULL; (yyval.odcl).decls = NULL; }
  2208. #line 2472 "CMDgram.c"
  2209. break;
  2210. case 47: /* object_declare_block: slot_assign_list */
  2211. #line 300 "CMDgram.y"
  2212. { (yyval.odcl).slots = (yyvsp[0].slist); (yyval.odcl).decls = NULL; }
  2213. #line 2478 "CMDgram.c"
  2214. break;
  2215. case 48: /* object_declare_block: object_decl_list */
  2216. #line 302 "CMDgram.y"
  2217. { (yyval.odcl).slots = NULL; (yyval.odcl).decls = (yyvsp[0].od); }
  2218. #line 2484 "CMDgram.c"
  2219. break;
  2220. case 49: /* object_declare_block: slot_assign_list object_decl_list */
  2221. #line 304 "CMDgram.y"
  2222. { (yyval.odcl).slots = (yyvsp[-1].slist); (yyval.odcl).decls = (yyvsp[0].od); }
  2223. #line 2490 "CMDgram.c"
  2224. break;
  2225. case 50: /* object_decl_list: object_decl ';' */
  2226. #line 309 "CMDgram.y"
  2227. { (yyval.od) = (yyvsp[-1].od); }
  2228. #line 2496 "CMDgram.c"
  2229. break;
  2230. case 51: /* object_decl_list: object_decl_list object_decl ';' */
  2231. #line 311 "CMDgram.y"
  2232. { (yyvsp[-2].od)->append((yyvsp[-1].od)); (yyval.od) = (yyvsp[-2].od); }
  2233. #line 2502 "CMDgram.c"
  2234. break;
  2235. case 52: /* stmt_block: '{' statement_list '}' */
  2236. #line 316 "CMDgram.y"
  2237. { (yyval.stmt) = (yyvsp[-1].stmt); }
  2238. #line 2508 "CMDgram.c"
  2239. break;
  2240. case 53: /* stmt_block: stmt */
  2241. #line 318 "CMDgram.y"
  2242. { (yyval.stmt) = (yyvsp[0].stmt); }
  2243. #line 2514 "CMDgram.c"
  2244. break;
  2245. case 54: /* switch_stmt: rwSWITCH '(' expr ')' '{' case_block '}' */
  2246. #line 323 "CMDgram.y"
  2247. { (yyval.stmt) = (yyvsp[-1].ifnode); (yyvsp[-1].ifnode)->propagateSwitchExpr((yyvsp[-4].expr), false); }
  2248. #line 2520 "CMDgram.c"
  2249. break;
  2250. case 55: /* switch_stmt: rwSWITCHSTR '(' expr ')' '{' case_block '}' */
  2251. #line 325 "CMDgram.y"
  2252. { (yyval.stmt) = (yyvsp[-1].ifnode); (yyvsp[-1].ifnode)->propagateSwitchExpr((yyvsp[-4].expr), true); }
  2253. #line 2526 "CMDgram.c"
  2254. break;
  2255. case 56: /* case_block: rwCASE case_expr ':' statement_list */
  2256. #line 330 "CMDgram.y"
  2257. { (yyval.ifnode) = IfStmtNode::alloc( (yyvsp[-3].i).lineNumber, (yyvsp[-2].expr), (yyvsp[0].stmt), NULL, false); }
  2258. #line 2532 "CMDgram.c"
  2259. break;
  2260. case 57: /* case_block: rwCASE case_expr ':' statement_list rwDEFAULT ':' statement_list */
  2261. #line 332 "CMDgram.y"
  2262. { (yyval.ifnode) = IfStmtNode::alloc( (yyvsp[-6].i).lineNumber, (yyvsp[-5].expr), (yyvsp[-3].stmt), (yyvsp[0].stmt), false); }
  2263. #line 2538 "CMDgram.c"
  2264. break;
  2265. case 58: /* case_block: rwCASE case_expr ':' statement_list case_block */
  2266. #line 334 "CMDgram.y"
  2267. { (yyval.ifnode) = IfStmtNode::alloc( (yyvsp[-4].i).lineNumber, (yyvsp[-3].expr), (yyvsp[-1].stmt), (yyvsp[0].ifnode), true); }
  2268. #line 2544 "CMDgram.c"
  2269. break;
  2270. case 59: /* case_expr: expr */
  2271. #line 339 "CMDgram.y"
  2272. { (yyval.expr) = (yyvsp[0].expr);}
  2273. #line 2550 "CMDgram.c"
  2274. break;
  2275. case 60: /* case_expr: case_expr rwCASEOR expr */
  2276. #line 341 "CMDgram.y"
  2277. { ((yyvsp[-2].expr))->append((yyvsp[0].expr)); (yyval.expr)=(yyvsp[-2].expr); }
  2278. #line 2556 "CMDgram.c"
  2279. break;
  2280. case 61: /* if_stmt: rwIF '(' expr ')' stmt_block */
  2281. #line 346 "CMDgram.y"
  2282. { (yyval.stmt) = IfStmtNode::alloc((yyvsp[-4].i).lineNumber, (yyvsp[-2].expr), (yyvsp[0].stmt), NULL, false); }
  2283. #line 2562 "CMDgram.c"
  2284. break;
  2285. case 62: /* if_stmt: rwIF '(' expr ')' stmt_block rwELSE stmt_block */
  2286. #line 348 "CMDgram.y"
  2287. { (yyval.stmt) = IfStmtNode::alloc((yyvsp[-6].i).lineNumber, (yyvsp[-4].expr), (yyvsp[-2].stmt), (yyvsp[0].stmt), false); }
  2288. #line 2568 "CMDgram.c"
  2289. break;
  2290. case 63: /* while_stmt: rwWHILE '(' expr ')' stmt_block */
  2291. #line 353 "CMDgram.y"
  2292. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-4].i).lineNumber, nil, (yyvsp[-2].expr), nil, (yyvsp[0].stmt), false); }
  2293. #line 2574 "CMDgram.c"
  2294. break;
  2295. case 64: /* while_stmt: rwDO stmt_block rwWHILE '(' expr ')' */
  2296. #line 355 "CMDgram.y"
  2297. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-3].i).lineNumber, nil, (yyvsp[-1].expr), nil, (yyvsp[-4].stmt), true); }
  2298. #line 2580 "CMDgram.c"
  2299. break;
  2300. case 65: /* for_stmt: rwFOR '(' expr ';' expr ';' expr ')' stmt_block */
  2301. #line 360 "CMDgram.y"
  2302. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-8].i).lineNumber, (yyvsp[-6].expr), (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].stmt), false); }
  2303. #line 2586 "CMDgram.c"
  2304. break;
  2305. case 66: /* for_stmt: rwFOR '(' expr ';' expr ';' ')' stmt_block */
  2306. #line 362 "CMDgram.y"
  2307. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-7].i).lineNumber, (yyvsp[-5].expr), (yyvsp[-3].expr), NULL, (yyvsp[0].stmt), false); }
  2308. #line 2592 "CMDgram.c"
  2309. break;
  2310. case 67: /* for_stmt: rwFOR '(' expr ';' ';' expr ')' stmt_block */
  2311. #line 364 "CMDgram.y"
  2312. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-7].i).lineNumber, (yyvsp[-5].expr), NULL, (yyvsp[-2].expr), (yyvsp[0].stmt), false); }
  2313. #line 2598 "CMDgram.c"
  2314. break;
  2315. case 68: /* for_stmt: rwFOR '(' expr ';' ';' ')' stmt_block */
  2316. #line 366 "CMDgram.y"
  2317. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-6].i).lineNumber, (yyvsp[-4].expr), NULL, NULL, (yyvsp[0].stmt), false); }
  2318. #line 2604 "CMDgram.c"
  2319. break;
  2320. case 69: /* for_stmt: rwFOR '(' ';' expr ';' expr ')' stmt_block */
  2321. #line 368 "CMDgram.y"
  2322. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-7].i).lineNumber, NULL, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].stmt), false); }
  2323. #line 2610 "CMDgram.c"
  2324. break;
  2325. case 70: /* for_stmt: rwFOR '(' ';' expr ';' ')' stmt_block */
  2326. #line 370 "CMDgram.y"
  2327. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-6].i).lineNumber, NULL, (yyvsp[-3].expr), NULL, (yyvsp[0].stmt), false); }
  2328. #line 2616 "CMDgram.c"
  2329. break;
  2330. case 71: /* for_stmt: rwFOR '(' ';' ';' expr ')' stmt_block */
  2331. #line 372 "CMDgram.y"
  2332. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-6].i).lineNumber, NULL, NULL, (yyvsp[-2].expr), (yyvsp[0].stmt), false); }
  2333. #line 2622 "CMDgram.c"
  2334. break;
  2335. case 72: /* for_stmt: rwFOR '(' ';' ';' ')' stmt_block */
  2336. #line 374 "CMDgram.y"
  2337. { (yyval.stmt) = LoopStmtNode::alloc((yyvsp[-5].i).lineNumber, NULL, NULL, NULL, (yyvsp[0].stmt), false); }
  2338. #line 2628 "CMDgram.c"
  2339. break;
  2340. case 73: /* foreach_stmt: rwFOREACH '(' VAR rwIN expr ')' stmt_block */
  2341. #line 379 "CMDgram.y"
  2342. { (yyval.stmt) = IterStmtNode::alloc( (yyvsp[-6].i).lineNumber, (yyvsp[-4].s).value, (yyvsp[-2].expr), (yyvsp[0].stmt), false ); }
  2343. #line 2634 "CMDgram.c"
  2344. break;
  2345. case 74: /* foreach_stmt: rwFOREACHSTR '(' VAR rwIN expr ')' stmt_block */
  2346. #line 381 "CMDgram.y"
  2347. { (yyval.stmt) = IterStmtNode::alloc( (yyvsp[-6].i).lineNumber, (yyvsp[-4].s).value, (yyvsp[-2].expr), (yyvsp[0].stmt), true ); }
  2348. #line 2640 "CMDgram.c"
  2349. break;
  2350. case 75: /* expression_stmt: stmt_expr */
  2351. #line 386 "CMDgram.y"
  2352. { (yyval.stmt) = (yyvsp[0].expr); }
  2353. #line 2646 "CMDgram.c"
  2354. break;
  2355. case 76: /* expr: stmt_expr */
  2356. #line 391 "CMDgram.y"
  2357. { (yyval.expr) = (yyvsp[0].expr); }
  2358. #line 2652 "CMDgram.c"
  2359. break;
  2360. case 77: /* expr: '(' expr ')' */
  2361. #line 393 "CMDgram.y"
  2362. { (yyval.expr) = (yyvsp[-1].expr); }
  2363. #line 2658 "CMDgram.c"
  2364. break;
  2365. case 78: /* expr: expr '^' expr */
  2366. #line 395 "CMDgram.y"
  2367. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2368. #line 2664 "CMDgram.c"
  2369. break;
  2370. case 79: /* expr: expr '%' expr */
  2371. #line 397 "CMDgram.y"
  2372. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2373. #line 2670 "CMDgram.c"
  2374. break;
  2375. case 80: /* expr: expr '&' expr */
  2376. #line 399 "CMDgram.y"
  2377. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2378. #line 2676 "CMDgram.c"
  2379. break;
  2380. case 81: /* expr: expr '|' expr */
  2381. #line 401 "CMDgram.y"
  2382. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2383. #line 2682 "CMDgram.c"
  2384. break;
  2385. case 82: /* expr: expr '+' expr */
  2386. #line 403 "CMDgram.y"
  2387. { (yyval.expr) = FloatBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2388. #line 2688 "CMDgram.c"
  2389. break;
  2390. case 83: /* expr: expr '-' expr */
  2391. #line 405 "CMDgram.y"
  2392. { (yyval.expr) = FloatBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2393. #line 2694 "CMDgram.c"
  2394. break;
  2395. case 84: /* expr: expr '*' expr */
  2396. #line 407 "CMDgram.y"
  2397. { (yyval.expr) = FloatBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2398. #line 2700 "CMDgram.c"
  2399. break;
  2400. case 85: /* expr: expr '/' expr */
  2401. #line 409 "CMDgram.y"
  2402. { (yyval.expr) = FloatBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2403. #line 2706 "CMDgram.c"
  2404. break;
  2405. case 86: /* expr: '-' expr */
  2406. #line 411 "CMDgram.y"
  2407. { (yyval.expr) = FloatUnaryExprNode::alloc( (yyvsp[-1].i).lineNumber, (yyvsp[-1].i).value, (yyvsp[0].expr)); }
  2408. #line 2712 "CMDgram.c"
  2409. break;
  2410. case 87: /* expr: '*' expr */
  2411. #line 413 "CMDgram.y"
  2412. { (yyval.expr) = TTagDerefNode::alloc( (yyvsp[-1].i).lineNumber, (yyvsp[0].expr) ); }
  2413. #line 2718 "CMDgram.c"
  2414. break;
  2415. case 88: /* expr: TTAG */
  2416. #line 415 "CMDgram.y"
  2417. { (yyval.expr) = TTagExprNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value ); }
  2418. #line 2724 "CMDgram.c"
  2419. break;
  2420. case 89: /* expr: expr '?' expr ':' expr */
  2421. #line 417 "CMDgram.y"
  2422. { (yyval.expr) = ConditionalExprNode::alloc( (yyvsp[-4].expr)->dbgLineNumber, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2423. #line 2730 "CMDgram.c"
  2424. break;
  2425. case 90: /* expr: expr '<' expr */
  2426. #line 419 "CMDgram.y"
  2427. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2428. #line 2736 "CMDgram.c"
  2429. break;
  2430. case 91: /* expr: expr '>' expr */
  2431. #line 421 "CMDgram.y"
  2432. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2433. #line 2742 "CMDgram.c"
  2434. break;
  2435. case 92: /* expr: expr opGE expr */
  2436. #line 423 "CMDgram.y"
  2437. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2438. #line 2748 "CMDgram.c"
  2439. break;
  2440. case 93: /* expr: expr opLE expr */
  2441. #line 425 "CMDgram.y"
  2442. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2443. #line 2754 "CMDgram.c"
  2444. break;
  2445. case 94: /* expr: expr opEQ expr */
  2446. #line 427 "CMDgram.y"
  2447. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2448. #line 2760 "CMDgram.c"
  2449. break;
  2450. case 95: /* expr: expr opNE expr */
  2451. #line 429 "CMDgram.y"
  2452. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2453. #line 2766 "CMDgram.c"
  2454. break;
  2455. case 96: /* expr: expr opOR expr */
  2456. #line 431 "CMDgram.y"
  2457. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2458. #line 2772 "CMDgram.c"
  2459. break;
  2460. case 97: /* expr: expr opSHL expr */
  2461. #line 433 "CMDgram.y"
  2462. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2463. #line 2778 "CMDgram.c"
  2464. break;
  2465. case 98: /* expr: expr opSHR expr */
  2466. #line 435 "CMDgram.y"
  2467. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2468. #line 2784 "CMDgram.c"
  2469. break;
  2470. case 99: /* expr: expr opAND expr */
  2471. #line 437 "CMDgram.y"
  2472. { (yyval.expr) = IntBinaryExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-1].i).value, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2473. #line 2790 "CMDgram.c"
  2474. break;
  2475. case 100: /* expr: expr opSTREQ expr */
  2476. #line 439 "CMDgram.y"
  2477. { (yyval.expr) = StreqExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-2].expr), (yyvsp[0].expr), true); }
  2478. #line 2796 "CMDgram.c"
  2479. break;
  2480. case 101: /* expr: expr opSTRNE expr */
  2481. #line 441 "CMDgram.y"
  2482. { (yyval.expr) = StreqExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-2].expr), (yyvsp[0].expr), false); }
  2483. #line 2802 "CMDgram.c"
  2484. break;
  2485. case 102: /* expr: expr '@' expr */
  2486. #line 443 "CMDgram.y"
  2487. { (yyval.expr) = StrcatExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-2].expr), (yyvsp[0].expr), (yyvsp[-1].i).value); }
  2488. #line 2808 "CMDgram.c"
  2489. break;
  2490. case 103: /* expr: '!' expr */
  2491. #line 445 "CMDgram.y"
  2492. { (yyval.expr) = IntUnaryExprNode::alloc((yyvsp[-1].i).lineNumber, (yyvsp[-1].i).value, (yyvsp[0].expr)); }
  2493. #line 2814 "CMDgram.c"
  2494. break;
  2495. case 104: /* expr: '~' expr */
  2496. #line 447 "CMDgram.y"
  2497. { (yyval.expr) = IntUnaryExprNode::alloc((yyvsp[-1].i).lineNumber, (yyvsp[-1].i).value, (yyvsp[0].expr)); }
  2498. #line 2820 "CMDgram.c"
  2499. break;
  2500. case 105: /* expr: TAGATOM */
  2501. #line 449 "CMDgram.y"
  2502. { (yyval.expr) = StrConstNode::alloc( (yyvsp[0].str).lineNumber, (yyvsp[0].str).value, true); }
  2503. #line 2826 "CMDgram.c"
  2504. break;
  2505. case 106: /* expr: FLTCONST */
  2506. #line 451 "CMDgram.y"
  2507. { (yyval.expr) = FloatNode::alloc( (yyvsp[0].f).lineNumber, (yyvsp[0].f).value ); }
  2508. #line 2832 "CMDgram.c"
  2509. break;
  2510. case 107: /* expr: INTCONST */
  2511. #line 453 "CMDgram.y"
  2512. { (yyval.expr) = IntNode::alloc( (yyvsp[0].i).lineNumber, (yyvsp[0].i).value ); }
  2513. #line 2838 "CMDgram.c"
  2514. break;
  2515. case 108: /* expr: rwBREAK */
  2516. #line 455 "CMDgram.y"
  2517. { (yyval.expr) = ConstantNode::alloc( (yyvsp[0].i).lineNumber, StringTable->insert("break")); }
  2518. #line 2844 "CMDgram.c"
  2519. break;
  2520. case 109: /* expr: slot_acc */
  2521. #line 457 "CMDgram.y"
  2522. { (yyval.expr) = SlotAccessNode::alloc( (yyvsp[0].slot).lineNumber, (yyvsp[0].slot).object, (yyvsp[0].slot).array, (yyvsp[0].slot).slotName ); }
  2523. #line 2850 "CMDgram.c"
  2524. break;
  2525. case 110: /* expr: intslot_acc */
  2526. #line 459 "CMDgram.y"
  2527. { (yyval.expr) = InternalSlotAccessNode::alloc( (yyvsp[0].intslot).lineNumber, (yyvsp[0].intslot).object, (yyvsp[0].intslot).slotExpr, (yyvsp[0].intslot).recurse); }
  2528. #line 2856 "CMDgram.c"
  2529. break;
  2530. case 111: /* expr: IDENT */
  2531. #line 461 "CMDgram.y"
  2532. { (yyval.expr) = ConstantNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value ); }
  2533. #line 2862 "CMDgram.c"
  2534. break;
  2535. case 112: /* expr: STRATOM */
  2536. #line 463 "CMDgram.y"
  2537. { (yyval.expr) = StrConstNode::alloc( (yyvsp[0].str).lineNumber, (yyvsp[0].str).value, false); }
  2538. #line 2868 "CMDgram.c"
  2539. break;
  2540. case 113: /* expr: VAR */
  2541. #line 465 "CMDgram.y"
  2542. { (yyval.expr) = (ExprNode*)VarNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value, NULL); }
  2543. #line 2874 "CMDgram.c"
  2544. break;
  2545. case 114: /* expr: VAR '[' aidx_expr ']' */
  2546. #line 467 "CMDgram.y"
  2547. { (yyval.expr) = (ExprNode*)VarNode::alloc( (yyvsp[-3].s).lineNumber, (yyvsp[-3].s).value, (yyvsp[-1].expr) ); }
  2548. #line 2880 "CMDgram.c"
  2549. break;
  2550. case 115: /* slot_acc: expr '.' IDENT */
  2551. #line 489 "CMDgram.y"
  2552. { (yyval.slot).lineNumber = (yyvsp[-2].expr)->dbgLineNumber; (yyval.slot).object = (yyvsp[-2].expr); (yyval.slot).slotName = (yyvsp[0].s).value; (yyval.slot).array = NULL; }
  2553. #line 2886 "CMDgram.c"
  2554. break;
  2555. case 116: /* slot_acc: expr '.' IDENT '[' aidx_expr ']' */
  2556. #line 491 "CMDgram.y"
  2557. { (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); }
  2558. #line 2892 "CMDgram.c"
  2559. break;
  2560. case 117: /* intslot_acc: expr opINTNAME class_name_expr */
  2561. #line 496 "CMDgram.y"
  2562. { (yyval.intslot).lineNumber = (yyvsp[-2].expr)->dbgLineNumber; (yyval.intslot).object = (yyvsp[-2].expr); (yyval.intslot).slotExpr = (yyvsp[0].expr); (yyval.intslot).recurse = false; }
  2563. #line 2898 "CMDgram.c"
  2564. break;
  2565. case 118: /* intslot_acc: expr opINTNAMER class_name_expr */
  2566. #line 498 "CMDgram.y"
  2567. { (yyval.intslot).lineNumber = (yyvsp[-2].expr)->dbgLineNumber; (yyval.intslot).object = (yyvsp[-2].expr); (yyval.intslot).slotExpr = (yyvsp[0].expr); (yyval.intslot).recurse = true; }
  2568. #line 2904 "CMDgram.c"
  2569. break;
  2570. case 119: /* class_name_expr: IDENT */
  2571. #line 503 "CMDgram.y"
  2572. { (yyval.expr) = ConstantNode::alloc( (yyvsp[0].s).lineNumber, (yyvsp[0].s).value ); }
  2573. #line 2910 "CMDgram.c"
  2574. break;
  2575. case 120: /* class_name_expr: '(' expr ')' */
  2576. #line 505 "CMDgram.y"
  2577. { (yyval.expr) = (yyvsp[-1].expr); }
  2578. #line 2916 "CMDgram.c"
  2579. break;
  2580. case 121: /* assign_op_struct: opPLUSPLUS */
  2581. #line 510 "CMDgram.y"
  2582. { (yyval.asn).lineNumber = (yyvsp[0].i).lineNumber; (yyval.asn).token = opPLUSPLUS; (yyval.asn).expr = FloatNode::alloc( (yyvsp[0].i).lineNumber, 1 ); }
  2583. #line 2922 "CMDgram.c"
  2584. break;
  2585. case 122: /* assign_op_struct: opMINUSMINUS */
  2586. #line 512 "CMDgram.y"
  2587. { (yyval.asn).lineNumber = (yyvsp[0].i).lineNumber; (yyval.asn).token = opMINUSMINUS; (yyval.asn).expr = FloatNode::alloc( (yyvsp[0].i).lineNumber, 1 ); }
  2588. #line 2928 "CMDgram.c"
  2589. break;
  2590. case 123: /* assign_op_struct: opPLASN expr */
  2591. #line 514 "CMDgram.y"
  2592. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '+'; (yyval.asn).expr = (yyvsp[0].expr); }
  2593. #line 2934 "CMDgram.c"
  2594. break;
  2595. case 124: /* assign_op_struct: opMIASN expr */
  2596. #line 516 "CMDgram.y"
  2597. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '-'; (yyval.asn).expr = (yyvsp[0].expr); }
  2598. #line 2940 "CMDgram.c"
  2599. break;
  2600. case 125: /* assign_op_struct: opMLASN expr */
  2601. #line 518 "CMDgram.y"
  2602. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '*'; (yyval.asn).expr = (yyvsp[0].expr); }
  2603. #line 2946 "CMDgram.c"
  2604. break;
  2605. case 126: /* assign_op_struct: opDVASN expr */
  2606. #line 520 "CMDgram.y"
  2607. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '/'; (yyval.asn).expr = (yyvsp[0].expr); }
  2608. #line 2952 "CMDgram.c"
  2609. break;
  2610. case 127: /* assign_op_struct: opMODASN expr */
  2611. #line 522 "CMDgram.y"
  2612. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '%'; (yyval.asn).expr = (yyvsp[0].expr); }
  2613. #line 2958 "CMDgram.c"
  2614. break;
  2615. case 128: /* assign_op_struct: opANDASN expr */
  2616. #line 524 "CMDgram.y"
  2617. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '&'; (yyval.asn).expr = (yyvsp[0].expr); }
  2618. #line 2964 "CMDgram.c"
  2619. break;
  2620. case 129: /* assign_op_struct: opXORASN expr */
  2621. #line 526 "CMDgram.y"
  2622. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '^'; (yyval.asn).expr = (yyvsp[0].expr); }
  2623. #line 2970 "CMDgram.c"
  2624. break;
  2625. case 130: /* assign_op_struct: opORASN expr */
  2626. #line 528 "CMDgram.y"
  2627. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = '|'; (yyval.asn).expr = (yyvsp[0].expr); }
  2628. #line 2976 "CMDgram.c"
  2629. break;
  2630. case 131: /* assign_op_struct: opSLASN expr */
  2631. #line 530 "CMDgram.y"
  2632. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = opSHL; (yyval.asn).expr = (yyvsp[0].expr); }
  2633. #line 2982 "CMDgram.c"
  2634. break;
  2635. case 132: /* assign_op_struct: opSRASN expr */
  2636. #line 532 "CMDgram.y"
  2637. { (yyval.asn).lineNumber = (yyvsp[-1].i).lineNumber; (yyval.asn).token = opSHR; (yyval.asn).expr = (yyvsp[0].expr); }
  2638. #line 2988 "CMDgram.c"
  2639. break;
  2640. case 133: /* stmt_expr: funcall_expr */
  2641. #line 537 "CMDgram.y"
  2642. { (yyval.expr) = (yyvsp[0].expr); }
  2643. #line 2994 "CMDgram.c"
  2644. break;
  2645. case 134: /* stmt_expr: assert_expr */
  2646. #line 539 "CMDgram.y"
  2647. { (yyval.expr) = (yyvsp[0].expr); }
  2648. #line 3000 "CMDgram.c"
  2649. break;
  2650. case 135: /* stmt_expr: object_decl */
  2651. #line 541 "CMDgram.y"
  2652. { (yyval.expr) = (yyvsp[0].od); }
  2653. #line 3006 "CMDgram.c"
  2654. break;
  2655. case 136: /* stmt_expr: VAR '=' expr */
  2656. #line 543 "CMDgram.y"
  2657. { (yyval.expr) = AssignExprNode::alloc( (yyvsp[-2].s).lineNumber, (yyvsp[-2].s).value, NULL, (yyvsp[0].expr)); }
  2658. #line 3012 "CMDgram.c"
  2659. break;
  2660. case 137: /* stmt_expr: VAR '[' aidx_expr ']' '=' expr */
  2661. #line 545 "CMDgram.y"
  2662. { (yyval.expr) = AssignExprNode::alloc( (yyvsp[-5].s).lineNumber, (yyvsp[-5].s).value, (yyvsp[-3].expr), (yyvsp[0].expr)); }
  2663. #line 3018 "CMDgram.c"
  2664. break;
  2665. case 138: /* stmt_expr: VAR assign_op_struct */
  2666. #line 547 "CMDgram.y"
  2667. { (yyval.expr) = AssignOpExprNode::alloc( (yyvsp[-1].s).lineNumber, (yyvsp[-1].s).value, NULL, (yyvsp[0].asn).expr, (yyvsp[0].asn).token); }
  2668. #line 3024 "CMDgram.c"
  2669. break;
  2670. case 139: /* stmt_expr: VAR '[' aidx_expr ']' assign_op_struct */
  2671. #line 549 "CMDgram.y"
  2672. { (yyval.expr) = AssignOpExprNode::alloc( (yyvsp[-4].s).lineNumber, (yyvsp[-4].s).value, (yyvsp[-2].expr), (yyvsp[0].asn).expr, (yyvsp[0].asn).token); }
  2673. #line 3030 "CMDgram.c"
  2674. break;
  2675. case 140: /* stmt_expr: slot_acc assign_op_struct */
  2676. #line 551 "CMDgram.y"
  2677. { (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); }
  2678. #line 3036 "CMDgram.c"
  2679. break;
  2680. case 141: /* stmt_expr: slot_acc '=' expr */
  2681. #line 553 "CMDgram.y"
  2682. { (yyval.expr) = SlotAssignNode::alloc( (yyvsp[-2].slot).lineNumber, (yyvsp[-2].slot).object, (yyvsp[-2].slot).array, (yyvsp[-2].slot).slotName, (yyvsp[0].expr)); }
  2683. #line 3042 "CMDgram.c"
  2684. break;
  2685. case 142: /* stmt_expr: slot_acc '=' '{' expr_list '}' */
  2686. #line 555 "CMDgram.y"
  2687. { (yyval.expr) = SlotAssignNode::alloc( (yyvsp[-4].slot).lineNumber, (yyvsp[-4].slot).object, (yyvsp[-4].slot).array, (yyvsp[-4].slot).slotName, (yyvsp[-1].expr)); }
  2688. #line 3048 "CMDgram.c"
  2689. break;
  2690. case 143: /* funcall_expr: IDENT '(' expr_list_decl ')' */
  2691. #line 560 "CMDgram.y"
  2692. { (yyval.expr) = FuncCallExprNode::alloc( (yyvsp[-3].s).lineNumber, (yyvsp[-3].s).value, NULL, (yyvsp[-1].expr), false); }
  2693. #line 3054 "CMDgram.c"
  2694. break;
  2695. case 144: /* funcall_expr: IDENT opCOLONCOLON IDENT '(' expr_list_decl ')' */
  2696. #line 562 "CMDgram.y"
  2697. { (yyval.expr) = FuncCallExprNode::alloc( (yyvsp[-5].s).lineNumber, (yyvsp[-3].s).value, (yyvsp[-5].s).value, (yyvsp[-1].expr), false); }
  2698. #line 3060 "CMDgram.c"
  2699. break;
  2700. case 145: /* funcall_expr: expr '.' IDENT '(' expr_list_decl ')' */
  2701. #line 564 "CMDgram.y"
  2702. { (yyvsp[-5].expr)->append((yyvsp[-1].expr)); (yyval.expr) = FuncCallExprNode::alloc( (yyvsp[-5].expr)->dbgLineNumber, (yyvsp[-3].s).value, NULL, (yyvsp[-5].expr), true); }
  2703. #line 3066 "CMDgram.c"
  2704. break;
  2705. case 146: /* assert_expr: rwASSERT '(' expr ')' */
  2706. #line 574 "CMDgram.y"
  2707. { (yyval.expr) = AssertCallExprNode::alloc( (yyvsp[-3].i).lineNumber, (yyvsp[-1].expr), NULL ); }
  2708. #line 3072 "CMDgram.c"
  2709. break;
  2710. case 147: /* assert_expr: rwASSERT '(' expr ',' STRATOM ')' */
  2711. #line 576 "CMDgram.y"
  2712. { (yyval.expr) = AssertCallExprNode::alloc( (yyvsp[-5].i).lineNumber, (yyvsp[-3].expr), (yyvsp[-1].str).value ); }
  2713. #line 3078 "CMDgram.c"
  2714. break;
  2715. case 148: /* expr_list_decl: %empty */
  2716. #line 581 "CMDgram.y"
  2717. { (yyval.expr) = NULL; }
  2718. #line 3084 "CMDgram.c"
  2719. break;
  2720. case 149: /* expr_list_decl: expr_list */
  2721. #line 583 "CMDgram.y"
  2722. { (yyval.expr) = (yyvsp[0].expr); }
  2723. #line 3090 "CMDgram.c"
  2724. break;
  2725. case 150: /* expr_list: expr */
  2726. #line 588 "CMDgram.y"
  2727. { (yyval.expr) = (yyvsp[0].expr); }
  2728. #line 3096 "CMDgram.c"
  2729. break;
  2730. case 151: /* expr_list: expr_list ',' expr */
  2731. #line 590 "CMDgram.y"
  2732. { ((yyvsp[-2].expr))->append((yyvsp[0].expr)); (yyval.expr) = (yyvsp[-2].expr); }
  2733. #line 3102 "CMDgram.c"
  2734. break;
  2735. case 152: /* slot_assign_list_opt: %empty */
  2736. #line 595 "CMDgram.y"
  2737. { (yyval.slist) = NULL; }
  2738. #line 3108 "CMDgram.c"
  2739. break;
  2740. case 153: /* slot_assign_list_opt: slot_assign_list */
  2741. #line 597 "CMDgram.y"
  2742. { (yyval.slist) = (yyvsp[0].slist); }
  2743. #line 3114 "CMDgram.c"
  2744. break;
  2745. case 154: /* slot_assign_list: slot_assign */
  2746. #line 602 "CMDgram.y"
  2747. { (yyval.slist) = (yyvsp[0].slist); }
  2748. #line 3120 "CMDgram.c"
  2749. break;
  2750. case 155: /* slot_assign_list: slot_assign_list slot_assign */
  2751. #line 604 "CMDgram.y"
  2752. { (yyvsp[-1].slist)->append((yyvsp[0].slist)); (yyval.slist) = (yyvsp[-1].slist); }
  2753. #line 3126 "CMDgram.c"
  2754. break;
  2755. case 156: /* slot_assign: IDENT '=' expr ';' */
  2756. #line 609 "CMDgram.y"
  2757. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-3].s).lineNumber, NULL, NULL, (yyvsp[-3].s).value, (yyvsp[-1].expr)); }
  2758. #line 3132 "CMDgram.c"
  2759. break;
  2760. case 157: /* slot_assign: TYPEIDENT IDENT '=' expr ';' */
  2761. #line 611 "CMDgram.y"
  2762. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-4].i).lineNumber, NULL, NULL, (yyvsp[-3].s).value, (yyvsp[-1].expr), (yyvsp[-4].i).value); }
  2763. #line 3138 "CMDgram.c"
  2764. break;
  2765. case 158: /* slot_assign: rwDATABLOCK '=' expr ';' */
  2766. #line 613 "CMDgram.y"
  2767. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-3].i).lineNumber, NULL, NULL, StringTable->insert("datablock"), (yyvsp[-1].expr)); }
  2768. #line 3144 "CMDgram.c"
  2769. break;
  2770. case 159: /* slot_assign: IDENT '[' aidx_expr ']' '=' expr ';' */
  2771. #line 615 "CMDgram.y"
  2772. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-6].s).lineNumber, NULL, (yyvsp[-4].expr), (yyvsp[-6].s).value, (yyvsp[-1].expr)); }
  2773. #line 3150 "CMDgram.c"
  2774. break;
  2775. case 160: /* slot_assign: TYPEIDENT IDENT '[' aidx_expr ']' '=' expr ';' */
  2776. #line 617 "CMDgram.y"
  2777. { (yyval.slist) = SlotAssignNode::alloc( (yyvsp[-7].i).lineNumber, NULL, (yyvsp[-4].expr), (yyvsp[-6].s).value, (yyvsp[-1].expr), (yyvsp[-7].i).value); }
  2778. #line 3156 "CMDgram.c"
  2779. break;
  2780. case 161: /* aidx_expr: expr */
  2781. #line 622 "CMDgram.y"
  2782. { (yyval.expr) = (yyvsp[0].expr); }
  2783. #line 3162 "CMDgram.c"
  2784. break;
  2785. case 162: /* aidx_expr: aidx_expr ',' expr */
  2786. #line 624 "CMDgram.y"
  2787. { (yyval.expr) = CommaCatExprNode::alloc( (yyvsp[-2].expr)->dbgLineNumber, (yyvsp[-2].expr), (yyvsp[0].expr)); }
  2788. #line 3168 "CMDgram.c"
  2789. break;
  2790. #line 3172 "CMDgram.c"
  2791. default: break;
  2792. }
  2793. /* User semantic actions sometimes alter yychar, and that requires
  2794. that yytoken be updated with the new translation. We take the
  2795. approach of translating immediately before every use of yytoken.
  2796. One alternative is translating here after every semantic action,
  2797. but that translation would be missed if the semantic action invokes
  2798. YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
  2799. if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
  2800. incorrect destructor might then be invoked immediately. In the
  2801. case of YYERROR or YYBACKUP, subsequent parser actions might lead
  2802. to an incorrect destructor call or verbose syntax error message
  2803. before the lookahead is translated. */
  2804. YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
  2805. YYPOPSTACK (yylen);
  2806. yylen = 0;
  2807. *++yyvsp = yyval;
  2808. *++yylsp = yyloc;
  2809. /* Now 'shift' the result of the reduction. Determine what state
  2810. that goes to, based on the state we popped back to and the rule
  2811. number reduced by. */
  2812. {
  2813. const int yylhs = yyr1[yyn] - YYNTOKENS;
  2814. const int yyi = yypgoto[yylhs] + *yyssp;
  2815. yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
  2816. ? yytable[yyi]
  2817. : yydefgoto[yylhs]);
  2818. }
  2819. goto yynewstate;
  2820. /*--------------------------------------.
  2821. | yyerrlab -- here on detecting error. |
  2822. `--------------------------------------*/
  2823. yyerrlab:
  2824. /* Make sure we have latest lookahead translation. See comments at
  2825. user semantic actions for why this is necessary. */
  2826. yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  2827. /* If not already recovering from an error, report this error. */
  2828. if (!yyerrstatus)
  2829. {
  2830. ++yynerrs;
  2831. {
  2832. yypcontext_t yyctx
  2833. = {yyssp, yytoken, &yylloc};
  2834. if (yyreport_syntax_error (&yyctx) == 2)
  2835. YYNOMEM;
  2836. }
  2837. }
  2838. yyerror_range[1] = yylloc;
  2839. if (yyerrstatus == 3)
  2840. {
  2841. /* If just tried and failed to reuse lookahead token after an
  2842. error, discard it. */
  2843. if (yychar <= YYEOF)
  2844. {
  2845. /* Return failure if at end of input. */
  2846. if (yychar == YYEOF)
  2847. YYABORT;
  2848. }
  2849. else
  2850. {
  2851. yydestruct ("Error: discarding",
  2852. yytoken, &yylval, &yylloc);
  2853. yychar = YYEMPTY;
  2854. }
  2855. }
  2856. /* Else will try to reuse lookahead token after shifting the error
  2857. token. */
  2858. goto yyerrlab1;
  2859. /*---------------------------------------------------.
  2860. | yyerrorlab -- error raised explicitly by YYERROR. |
  2861. `---------------------------------------------------*/
  2862. yyerrorlab:
  2863. /* Pacify compilers when the user code never invokes YYERROR and the
  2864. label yyerrorlab therefore never appears in user code. */
  2865. if (0)
  2866. YYERROR;
  2867. ++yynerrs;
  2868. /* Do not reclaim the symbols of the rule whose action triggered
  2869. this YYERROR. */
  2870. YYPOPSTACK (yylen);
  2871. yylen = 0;
  2872. YY_STACK_PRINT (yyss, yyssp);
  2873. yystate = *yyssp;
  2874. goto yyerrlab1;
  2875. /*-------------------------------------------------------------.
  2876. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  2877. `-------------------------------------------------------------*/
  2878. yyerrlab1:
  2879. yyerrstatus = 3; /* Each real token shifted decrements this. */
  2880. /* Pop stack until we find a state that shifts the error token. */
  2881. for (;;)
  2882. {
  2883. yyn = yypact[yystate];
  2884. if (!yypact_value_is_default (yyn))
  2885. {
  2886. yyn += YYSYMBOL_YYerror;
  2887. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
  2888. {
  2889. yyn = yytable[yyn];
  2890. if (0 < yyn)
  2891. break;
  2892. }
  2893. }
  2894. /* Pop the current state because it cannot handle the error token. */
  2895. if (yyssp == yyss)
  2896. YYABORT;
  2897. yyerror_range[1] = *yylsp;
  2898. yydestruct ("Error: popping",
  2899. YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp);
  2900. YYPOPSTACK (1);
  2901. yystate = *yyssp;
  2902. YY_STACK_PRINT (yyss, yyssp);
  2903. }
  2904. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  2905. *++yyvsp = yylval;
  2906. YY_IGNORE_MAYBE_UNINITIALIZED_END
  2907. yyerror_range[2] = yylloc;
  2908. ++yylsp;
  2909. YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
  2910. /* Shift the error token. */
  2911. YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
  2912. yystate = yyn;
  2913. goto yynewstate;
  2914. /*-------------------------------------.
  2915. | yyacceptlab -- YYACCEPT comes here. |
  2916. `-------------------------------------*/
  2917. yyacceptlab:
  2918. yyresult = 0;
  2919. goto yyreturnlab;
  2920. /*-----------------------------------.
  2921. | yyabortlab -- YYABORT comes here. |
  2922. `-----------------------------------*/
  2923. yyabortlab:
  2924. yyresult = 1;
  2925. goto yyreturnlab;
  2926. /*-----------------------------------------------------------.
  2927. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
  2928. `-----------------------------------------------------------*/
  2929. yyexhaustedlab:
  2930. yyerror (YY_("memory exhausted"));
  2931. yyresult = 2;
  2932. goto yyreturnlab;
  2933. /*----------------------------------------------------------.
  2934. | yyreturnlab -- parsing is finished, clean up and return. |
  2935. `----------------------------------------------------------*/
  2936. yyreturnlab:
  2937. if (yychar != YYEMPTY)
  2938. {
  2939. /* Make sure we have latest lookahead translation. See comments at
  2940. user semantic actions for why this is necessary. */
  2941. yytoken = YYTRANSLATE (yychar);
  2942. yydestruct ("Cleanup: discarding lookahead",
  2943. yytoken, &yylval, &yylloc);
  2944. }
  2945. /* Do not reclaim the symbols of the rule whose action triggered
  2946. this YYABORT or YYACCEPT. */
  2947. YYPOPSTACK (yylen);
  2948. YY_STACK_PRINT (yyss, yyssp);
  2949. while (yyssp != yyss)
  2950. {
  2951. yydestruct ("Cleanup: popping",
  2952. YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp);
  2953. YYPOPSTACK (1);
  2954. }
  2955. #ifndef yyoverflow
  2956. if (yyss != yyssa)
  2957. YYSTACK_FREE (yyss);
  2958. #endif
  2959. return yyresult;
  2960. }
  2961. #line 626 "CMDgram.y"
  2962. int
  2963. yyreport_syntax_error (const yypcontext_t *ctx)
  2964. {
  2965. int ret = 0;
  2966. String output;
  2967. const YYLTYPE *loc = yypcontext_location (ctx);
  2968. output += "syntax error: ";
  2969. yysymbol_kind_t nxt = yypcontext_token(ctx);
  2970. if (nxt != YYSYMBOL_YYEMPTY)
  2971. output += String::ToString("unexpected: %s at column: %d", yysymbol_name(nxt), loc->first_column);
  2972. enum { TOKENMAX = 10 };
  2973. yysymbol_kind_t expected[TOKENMAX];
  2974. int exp = yypcontext_expected_tokens(ctx, expected, TOKENMAX);
  2975. if (exp < 0)
  2976. ret = exp;
  2977. else
  2978. {
  2979. for (int i = 0; i < exp; ++i)
  2980. output += String::ToString("%s %s", i == 0 ? ": expected" : "or", yysymbol_name(expected[i]));
  2981. }
  2982. if (lines.size() > 0)
  2983. {
  2984. output += "\n";
  2985. for (int i = 0; i < lines.size(); i++)
  2986. {
  2987. int line = lines.size() - i;
  2988. output += String::ToString("%5d | ", loc->first_line - (line-1)) + lines[i] + "\n";
  2989. }
  2990. output += String::ToString("%5s | %*s", "", loc->first_column, "^");
  2991. }
  2992. yyerror("%s", output.c_str());
  2993. return ret;
  2994. }