BsParserFX.c 188 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527
  1. /* A Bison parser, made by GNU Bison 2.7. */
  2. /* Skeleton implementation for Bison GLR parsers in C
  3. Copyright (C) 2002-2012 Free Software Foundation, Inc.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. /* As a special exception, you may create a larger work that contains
  15. part or all of the Bison parser skeleton and distribute that work
  16. under terms of your choice, so long as that work isn't itself a
  17. parser generator using the skeleton or a modified version thereof
  18. as a parser skeleton. Alternatively, if you modify or redistribute
  19. the parser skeleton itself, you may (at your option) remove this
  20. special exception, which will cause the skeleton and the resulting
  21. Bison output files to be licensed under the GNU General Public
  22. License without this special exception.
  23. This special exception was added by the Free Software Foundation in
  24. version 2.2 of Bison. */
  25. /* C GLR parser skeleton written by Paul Hilfinger. */
  26. /* Identify Bison output. */
  27. #define YYBISON 1
  28. /* Bison version. */
  29. #define YYBISON_VERSION "2.7"
  30. /* Skeleton name. */
  31. #define YYSKELETON_NAME "glr.c"
  32. /* Pure parsers. */
  33. #define YYPURE 1
  34. /* Copy the first part of user declarations. */
  35. /* Line 207 of glr.c */
  36. #line 1 "BsParserFX.y"
  37. #include "BsParserFX.h"
  38. #include "BsLexerFX.h"
  39. #define inline
  40. void yyerror(YYLTYPE *locp, ParseState* parse_state, yyscan_t scanner, const char *msg);
  41. /* Line 207 of glr.c */
  42. #line 64 "BsParserFX.c"
  43. # ifndef YY_NULL
  44. # if defined __cplusplus && 201103L <= __cplusplus
  45. # define YY_NULL nullptr
  46. # else
  47. # define YY_NULL 0
  48. # endif
  49. # endif
  50. #include "BsParserFX.h"
  51. /* Enabling verbose error messages. */
  52. #ifdef YYERROR_VERBOSE
  53. # undef YYERROR_VERBOSE
  54. # define YYERROR_VERBOSE 1
  55. #else
  56. # define YYERROR_VERBOSE 0
  57. #endif
  58. /* Default (constant) value used for initialization for null
  59. right-hand sides. Unlike the standard yacc.c template, here we set
  60. the default value of $$ to a zeroed-out value. Since the default
  61. value is undefined, this behavior is technically correct. */
  62. static YYSTYPE yyval_default;
  63. static YYLTYPE yyloc_default
  64. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  65. = { 1, 1, 1, 1 }
  66. # endif
  67. ;
  68. /* Copy the second part of user declarations. */
  69. /* Line 230 of glr.c */
  70. #line 98 "BsParserFX.c"
  71. #include <stdio.h>
  72. #include <stdlib.h>
  73. #include <string.h>
  74. #ifndef YY_
  75. # if defined YYENABLE_NLS && YYENABLE_NLS
  76. # if ENABLE_NLS
  77. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  78. # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  79. # endif
  80. # endif
  81. # ifndef YY_
  82. # define YY_(Msgid) Msgid
  83. # endif
  84. #endif
  85. /* Suppress unused-variable warnings by "using" E. */
  86. #if ! defined lint || defined __GNUC__
  87. # define YYUSE(E) ((void) (E))
  88. #else
  89. # define YYUSE(E) /* empty */
  90. #endif
  91. /* Identity function, used to suppress warnings about constant conditions. */
  92. #ifndef lint
  93. # define YYID(N) (N)
  94. #else
  95. #if (defined __STDC__ || defined __C99__FUNC__ \
  96. || defined __cplusplus || defined _MSC_VER)
  97. static int
  98. YYID (int i)
  99. #else
  100. static int
  101. YYID (i)
  102. int i;
  103. #endif
  104. {
  105. return i;
  106. }
  107. #endif
  108. #ifndef YYFREE
  109. # define YYFREE free
  110. #endif
  111. #ifndef YYMALLOC
  112. # define YYMALLOC malloc
  113. #endif
  114. #ifndef YYREALLOC
  115. # define YYREALLOC realloc
  116. #endif
  117. #define YYSIZEMAX ((size_t) -1)
  118. #ifdef __cplusplus
  119. typedef bool yybool;
  120. #else
  121. typedef unsigned char yybool;
  122. #endif
  123. #define yytrue 1
  124. #define yyfalse 0
  125. #ifndef YYSETJMP
  126. # include <setjmp.h>
  127. # define YYJMP_BUF jmp_buf
  128. # define YYSETJMP(Env) setjmp (Env)
  129. /* Pacify clang. */
  130. # define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0))
  131. #endif
  132. /*-----------------.
  133. | GCC extensions. |
  134. `-----------------*/
  135. #ifndef __attribute__
  136. /* This feature is available in gcc versions 2.5 and later. */
  137. # if (! defined __GNUC__ || __GNUC__ < 2 \
  138. || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
  139. # define __attribute__(Spec) /* empty */
  140. # endif
  141. #endif
  142. #ifndef YYASSERT
  143. # define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0)))
  144. #endif
  145. /* YYFINAL -- State number of the termination state. */
  146. #define YYFINAL 26
  147. /* YYLAST -- Last index in YYTABLE. */
  148. #define YYLAST 627
  149. /* YYNTOKENS -- Number of terminals. */
  150. #define YYNTOKENS 121
  151. /* YYNNTS -- Number of nonterminals. */
  152. #define YYNNTS 84
  153. /* YYNRULES -- Number of rules. */
  154. #define YYNRULES 201
  155. /* YYNRULES -- Number of states. */
  156. #define YYNSTATES 648
  157. /* YYMAXRHS -- Maximum number of symbols on right-hand side of rule. */
  158. #define YYMAXRHS 33
  159. /* YYMAXLEFT -- Maximum number of symbols to the left of a handle
  160. accessed by $0, $-1, etc., in any rule. */
  161. #define YYMAXLEFT 0
  162. /* YYTRANSLATE(X) -- Bison symbol number corresponding to X. */
  163. #define YYUNDEFTOK 2
  164. #define YYMAXUTOK 367
  165. #define YYTRANSLATE(YYX) \
  166. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  167. /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
  168. static const unsigned char yytranslate[] =
  169. {
  170. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  171. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  172. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  173. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  174. 119, 120, 2, 2, 117, 2, 2, 2, 2, 2,
  175. 2, 2, 2, 2, 2, 2, 2, 2, 118, 114,
  176. 2, 113, 2, 2, 2, 2, 2, 2, 2, 2,
  177. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  178. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  179. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  180. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  181. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  182. 2, 2, 2, 115, 2, 116, 2, 2, 2, 2,
  183. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  184. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  185. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  186. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  187. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  188. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  189. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  190. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  191. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  192. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  193. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  194. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  195. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  196. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  197. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  198. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  199. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  200. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  201. 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
  202. 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
  203. 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
  204. 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
  205. 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
  206. 105, 106, 107, 108, 109, 110, 111, 112
  207. };
  208. #if YYDEBUG
  209. /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  210. YYRHS. */
  211. static const unsigned short int yyprhs[] =
  212. {
  213. 0, 0, 3, 4, 7, 9, 11, 13, 15, 20,
  214. 25, 30, 35, 40, 46, 49, 50, 53, 55, 57,
  215. 59, 61, 66, 71, 77, 80, 81, 84, 86, 88,
  216. 93, 98, 103, 108, 113, 118, 123, 128, 133, 138,
  217. 143, 148, 153, 158, 163, 169, 175, 181, 187, 192,
  218. 197, 199, 204, 213, 216, 219, 222, 225, 228, 231,
  219. 234, 237, 240, 248, 249, 252, 257, 262, 267, 272,
  220. 278, 281, 282, 285, 287, 292, 297, 303, 309, 315,
  221. 321, 326, 329, 332, 333, 336, 342, 347, 352, 357,
  222. 358, 361, 363, 368, 373, 378, 383, 388, 393, 398,
  223. 403, 408, 414, 420, 423, 429, 430, 433, 438, 443,
  224. 448, 454, 462, 472, 486, 504, 524, 550, 584, 590,
  225. 593, 594, 597, 602, 607, 612, 617, 622, 627, 632,
  226. 637, 642, 647, 652, 657, 662, 667, 671, 675, 678,
  227. 681, 684, 687, 690, 693, 696, 699, 702, 705, 708,
  228. 711, 714, 717, 720, 723, 726, 729, 732, 735, 738,
  229. 741, 744, 747, 750, 753, 756, 759, 762, 765, 768,
  230. 771, 772, 775, 776, 779, 780, 783, 784, 787, 788,
  231. 791, 792, 795, 796, 799, 800, 803, 804, 807, 808,
  232. 813, 819, 822, 823, 826, 830, 833, 834, 837, 843,
  233. 849, 855
  234. };
  235. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  236. static const short int yyrhs[] =
  237. {
  238. 122, 0, -1, -1, 123, 122, -1, 124, -1, 125,
  239. -1, 167, -1, 198, -1, 53, 113, 5, 114, -1,
  240. 54, 113, 3, 114, -1, 55, 113, 3, 114, -1,
  241. 62, 113, 6, 114, -1, 56, 113, 5, 114, -1,
  242. 126, 115, 127, 116, 114, -1, 59, 113, -1, -1,
  243. 128, 127, -1, 129, -1, 130, -1, 134, -1, 135,
  244. -1, 60, 113, 6, 114, -1, 61, 113, 6, 114,
  245. -1, 131, 115, 132, 116, 114, -1, 63, 113, -1,
  246. -1, 133, 132, -1, 134, -1, 135, -1, 93, 113,
  247. 3, 114, -1, 72, 113, 8, 114, -1, 73, 113,
  248. 9, 114, -1, 74, 113, 4, 114, -1, 75, 113,
  249. 4, 114, -1, 76, 113, 5, 114, -1, 77, 113,
  250. 5, 114, -1, 78, 113, 5, 114, -1, 79, 113,
  251. 5, 114, -1, 80, 113, 5, 114, -1, 81, 113,
  252. 5, 114, -1, 82, 113, 10, 114, -1, 83, 113,
  253. 5, 114, -1, 84, 113, 3, 114, -1, 85, 113,
  254. 3, 114, -1, 137, 115, 140, 116, 114, -1, 138,
  255. 115, 140, 116, 114, -1, 137, 115, 139, 116, 114,
  256. -1, 138, 115, 139, 116, 114, -1, 90, 113, 5,
  257. 114, -1, 91, 113, 5, 114, -1, 142, -1, 71,
  258. 113, 3, 114, -1, 136, 115, 93, 113, 3, 114,
  259. 116, 114, -1, 64, 113, -1, 65, 113, -1, 66,
  260. 113, -1, 67, 113, -1, 68, 113, -1, 69, 113,
  261. -1, 70, 113, -1, 86, 113, -1, 87, 113, -1,
  262. 11, 117, 11, 117, 11, 117, 10, -1, -1, 141,
  263. 140, -1, 88, 113, 11, 114, -1, 89, 113, 11,
  264. 114, -1, 63, 113, 11, 114, -1, 82, 113, 10,
  265. 114, -1, 143, 115, 144, 116, 114, -1, 92, 113,
  266. -1, -1, 145, 144, -1, 146, -1, 93, 113, 3,
  267. 114, -1, 94, 113, 5, 114, -1, 147, 115, 149,
  268. 116, 114, -1, 148, 115, 149, 116, 114, -1, 147,
  269. 115, 150, 116, 114, -1, 148, 115, 150, 116, 114,
  270. -1, 97, 113, 12, 114, -1, 95, 113, -1, 96,
  271. 113, -1, -1, 151, 149, -1, 11, 117, 11, 117,
  272. 15, -1, 98, 113, 11, 114, -1, 99, 113, 11,
  273. 114, -1, 100, 113, 15, 114, -1, -1, 153, 152,
  274. -1, 154, -1, 102, 113, 14, 114, -1, 103, 113,
  275. 14, 114, -1, 104, 113, 14, 114, -1, 105, 113,
  276. 3, 114, -1, 106, 113, 4, 114, -1, 107, 113,
  277. 4, 114, -1, 108, 113, 4, 114, -1, 109, 113,
  278. 161, 114, -1, 82, 113, 10, 114, -1, 155, 115,
  279. 157, 116, 114, -1, 155, 115, 156, 116, 114, -1,
  280. 101, 113, -1, 13, 117, 13, 117, 13, -1, -1,
  281. 158, 157, -1, 110, 113, 13, 114, -1, 111, 113,
  282. 13, 114, -1, 112, 113, 13, 114, -1, 115, 4,
  283. 117, 4, 116, -1, 115, 4, 117, 4, 117, 4,
  284. 116, -1, 115, 4, 117, 4, 117, 4, 117, 4,
  285. 116, -1, 115, 4, 117, 4, 117, 4, 117, 4,
  286. 117, 4, 117, 4, 116, -1, 115, 4, 117, 4,
  287. 117, 4, 117, 4, 117, 4, 117, 4, 117, 4,
  288. 117, 4, 116, -1, 115, 4, 117, 4, 117, 4,
  289. 117, 4, 117, 4, 117, 4, 117, 4, 117, 4,
  290. 117, 4, 116, -1, 115, 4, 117, 4, 117, 4,
  291. 117, 4, 117, 4, 117, 4, 117, 4, 117, 4,
  292. 117, 4, 117, 4, 117, 4, 117, 4, 116, -1,
  293. 115, 4, 117, 4, 117, 4, 117, 4, 117, 4,
  294. 117, 4, 117, 4, 117, 4, 117, 4, 117, 4,
  295. 117, 4, 117, 4, 117, 4, 117, 4, 117, 4,
  296. 117, 4, 116, -1, 168, 115, 169, 116, 114, -1,
  297. 57, 113, -1, -1, 170, 169, -1, 171, 203, 188,
  298. 114, -1, 172, 203, 189, 114, -1, 173, 203, 190,
  299. 114, -1, 174, 203, 191, 114, -1, 175, 203, 191,
  300. 114, -1, 176, 203, 191, 114, -1, 177, 203, 192,
  301. 114, -1, 178, 203, 193, 114, -1, 179, 203, 192,
  302. 114, -1, 180, 203, 194, 114, -1, 181, 203, 195,
  303. 114, -1, 182, 203, 193, 114, -1, 183, 203, 195,
  304. 114, -1, 184, 203, 196, 114, -1, 186, 203, 114,
  305. -1, 187, 197, 114, -1, 17, 7, -1, 18, 7,
  306. -1, 19, 7, -1, 20, 7, -1, 21, 7, -1,
  307. 22, 7, -1, 23, 7, -1, 24, 7, -1, 25,
  308. 7, -1, 26, 7, -1, 27, 7, -1, 28, 7,
  309. -1, 29, 7, -1, 30, 7, -1, 31, 7, -1,
  310. 32, 7, -1, 33, 7, -1, 34, 7, -1, 35,
  311. 7, -1, 36, 7, -1, 37, 7, -1, 38, 7,
  312. -1, 39, 7, -1, 40, 7, -1, 41, 7, -1,
  313. 42, 7, -1, 43, 7, -1, 44, 7, -1, 45,
  314. 7, -1, 46, 7, -1, 47, 7, -1, 185, 203,
  315. -1, -1, 113, 4, -1, -1, 113, 159, -1, -1,
  316. 113, 160, -1, -1, 113, 161, -1, -1, 113, 162,
  317. -1, -1, 113, 163, -1, -1, 113, 164, -1, -1,
  318. 113, 165, -1, -1, 113, 166, -1, -1, 113, 115,
  319. 152, 116, -1, 199, 115, 200, 116, 114, -1, 58,
  320. 113, -1, -1, 201, 200, -1, 202, 203, 114, -1,
  321. 48, 7, -1, -1, 204, 203, -1, 118, 50, 119,
  322. 6, 120, -1, 118, 49, 119, 6, 120, -1, 118,
  323. 51, 119, 5, 120, -1, 118, 52, 119, 16, 120,
  324. -1
  325. };
  326. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  327. static const unsigned short int yyrline[] =
  328. {
  329. 0, 231, 231, 232, 236, 237, 238, 239, 243, 244,
  330. 245, 246, 247, 253, 257, 264, 266, 270, 271, 272,
  331. 273, 277, 278, 284, 288, 295, 297, 301, 302, 306,
  332. 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
  333. 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
  334. 327, 328, 334, 348, 353, 358, 363, 368, 373, 378,
  335. 388, 396, 404, 418, 420, 424, 425, 426, 427, 432,
  336. 436, 443, 445, 449, 453, 454, 455, 456, 457, 458,
  337. 459, 464, 472, 479, 481, 485, 498, 499, 500, 505,
  338. 507, 511, 512, 513, 514, 515, 516, 517, 518, 519,
  339. 520, 525, 526, 530, 538, 550, 552, 556, 557, 558,
  340. 563, 567, 571, 575, 584, 595, 606, 617, 631, 635,
  341. 642, 644, 648, 649, 650, 651, 652, 653, 654, 655,
  342. 656, 657, 658, 659, 660, 661, 662, 663, 679, 683,
  343. 687, 691, 695, 699, 703, 707, 711, 715, 719, 723,
  344. 727, 731, 735, 736, 737, 738, 739, 743, 744, 745,
  345. 746, 747, 748, 749, 750, 751, 752, 753, 754, 758,
  346. 766, 767, 771, 772, 776, 777, 781, 782, 786, 787,
  347. 791, 792, 796, 797, 801, 802, 806, 807, 811, 812,
  348. 817, 821, 828, 830, 834, 838, 852, 854, 858, 859,
  349. 860, 861
  350. };
  351. #endif
  352. #if YYDEBUG || YYERROR_VERBOSE || 0
  353. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  354. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  355. static const char *const yytname[] =
  356. {
  357. "$end", "error", "$undefined", "TOKEN_INTEGER", "TOKEN_FLOAT",
  358. "TOKEN_BOOLEAN", "TOKEN_STRING", "TOKEN_IDENTIFIER",
  359. "TOKEN_FILLMODEVALUE", "TOKEN_CULLMODEVALUE", "TOKEN_COMPFUNCVALUE",
  360. "TOKEN_OPVALUE", "TOKEN_COLORMASK", "TOKEN_ADDRMODEVALUE",
  361. "TOKEN_FILTERVALUE", "TOKEN_BLENDOPVALUE", "TOKEN_BUFFERUSAGE",
  362. "TOKEN_FLOATTYPE", "TOKEN_FLOAT2TYPE", "TOKEN_FLOAT3TYPE",
  363. "TOKEN_FLOAT4TYPE", "TOKEN_COLORTYPE", "TOKEN_MAT2x2TYPE",
  364. "TOKEN_MAT2x3TYPE", "TOKEN_MAT2x4TYPE", "TOKEN_MAT3x2TYPE",
  365. "TOKEN_MAT3x3TYPE", "TOKEN_MAT3x4TYPE", "TOKEN_MAT4x2TYPE",
  366. "TOKEN_MAT4x3TYPE", "TOKEN_MAT4x4TYPE", "TOKEN_SAMPLER1D",
  367. "TOKEN_SAMPLER2D", "TOKEN_SAMPLER3D", "TOKEN_SAMPLERCUBE",
  368. "TOKEN_SAMPLER2DMS", "TOKEN_TEXTURE1D", "TOKEN_TEXTURE2D",
  369. "TOKEN_TEXTURE3D", "TOKEN_TEXTURECUBE", "TOKEN_TEXTURE2DMS",
  370. "TOKEN_BYTEBUFFER", "TOKEN_STRUCTBUFFER", "TOKEN_RWTYPEDBUFFER",
  371. "TOKEN_RWBYTEBUFFER", "TOKEN_RWSTRUCTBUFFER", "TOKEN_RWAPPENDBUFFER",
  372. "TOKEN_RWCONSUMEBUFFER", "TOKEN_PARAMSBLOCK", "TOKEN_AUTO",
  373. "TOKEN_ALIAS", "TOKEN_SHARED", "TOKEN_USAGE", "TOKEN_SEPARABLE",
  374. "TOKEN_QUEUE", "TOKEN_PRIORITY", "TOKEN_TRANSPARENT", "TOKEN_PARAMETERS",
  375. "TOKEN_BLOCKS", "TOKEN_TECHNIQUE", "TOKEN_RENDERER", "TOKEN_LANGUAGE",
  376. "TOKEN_INCLUDE", "TOKEN_PASS", "TOKEN_VERTEX", "TOKEN_FRAGMENT",
  377. "TOKEN_GEOMETRY", "TOKEN_HULL", "TOKEN_DOMAIN", "TOKEN_COMPUTE",
  378. "TOKEN_COMMON", "TOKEN_STENCILREF", "TOKEN_FILLMODE", "TOKEN_CULLMODE",
  379. "TOKEN_DEPTHBIAS", "TOKEN_SDEPTHBIAS", "TOKEN_DEPTHCLIP",
  380. "TOKEN_SCISSOR", "TOKEN_MULTISAMPLE", "TOKEN_AALINE", "TOKEN_DEPTHREAD",
  381. "TOKEN_DEPTHWRITE", "TOKEN_COMPAREFUNC", "TOKEN_STENCIL",
  382. "TOKEN_STENCILREADMASK", "TOKEN_STENCILWRITEMASK",
  383. "TOKEN_STENCILOPFRONT", "TOKEN_STENCILOPBACK", "TOKEN_FAIL",
  384. "TOKEN_ZFAIL", "TOKEN_ALPHATOCOVERAGE", "TOKEN_INDEPENDANTBLEND",
  385. "TOKEN_TARGET", "TOKEN_INDEX", "TOKEN_BLEND", "TOKEN_COLOR",
  386. "TOKEN_ALPHA", "TOKEN_WRITEMASK", "TOKEN_SOURCE", "TOKEN_DEST",
  387. "TOKEN_OP", "TOKEN_ADDRMODE", "TOKEN_MINFILTER", "TOKEN_MAGFILTER",
  388. "TOKEN_MIPFILTER", "TOKEN_MAXANISO", "TOKEN_MIPBIAS", "TOKEN_MIPMIN",
  389. "TOKEN_MIPMAX", "TOKEN_BORDERCOLOR", "TOKEN_U", "TOKEN_V", "TOKEN_W",
  390. "'='", "';'", "'{'", "'}'", "','", "':'", "'('", "')'", "$accept",
  391. "shader", "shader_statement", "shader_option", "technique",
  392. "technique_header", "technique_body", "technique_statement",
  393. "technique_option", "pass", "pass_header", "pass_body", "pass_statement",
  394. "pass_option", "code", "code_header", "stencil_op_front_header",
  395. "stencil_op_back_header", "stencil_op_body_init", "stencil_op_body",
  396. "stencil_op_option", "target", "target_header", "target_body",
  397. "target_statement", "target_option", "blend_color_header",
  398. "blend_alpha_header", "blenddef_body", "blenddef_body_init",
  399. "blenddef_option", "sampler_state_body", "sampler_state_option",
  400. "addr_mode", "addr_mode_header", "addr_mode_body_init", "addr_mode_body",
  401. "addr_mode_option", "float2", "float3", "float4", "mat6", "mat8", "mat9",
  402. "mat12", "mat16", "parameters", "parameters_header", "parameters_body",
  403. "parameter", "param_header_float", "param_header_float2",
  404. "param_header_float3", "param_header_float4", "param_header_color",
  405. "param_header_mat2x2", "param_header_mat2x3", "param_header_mat2x4",
  406. "param_header_mat3x2", "param_header_mat3x3", "param_header_mat3x4",
  407. "param_header_mat4x2", "param_header_mat4x3", "param_header_mat4x4",
  408. "param_header_sampler", "param_header_generic",
  409. "param_header_qualified_sampler", "param_body_float",
  410. "param_body_float2", "param_body_float3", "param_body_float4",
  411. "param_body_mat6", "param_body_mat8", "param_body_mat9",
  412. "param_body_mat12", "param_body_mat16", "param_body_sampler", "blocks",
  413. "blocks_header", "blocks_body", "block", "block_header",
  414. "qualifier_list", "qualifier", YY_NULL
  415. };
  416. #endif
  417. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  418. static const unsigned char yyr1[] =
  419. {
  420. 0, 121, 122, 122, 123, 123, 123, 123, 124, 124,
  421. 124, 124, 124, 125, 126, 127, 127, 128, 128, 128,
  422. 128, 129, 129, 130, 131, 132, 132, 133, 133, 134,
  423. 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
  424. 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
  425. 134, 134, 135, 136, 136, 136, 136, 136, 136, 136,
  426. 137, 138, 139, 140, 140, 141, 141, 141, 141, 142,
  427. 143, 144, 144, 145, 146, 146, 146, 146, 146, 146,
  428. 146, 147, 148, 149, 149, 150, 151, 151, 151, 152,
  429. 152, 153, 153, 153, 153, 153, 153, 153, 153, 153,
  430. 153, 154, 154, 155, 156, 157, 157, 158, 158, 158,
  431. 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
  432. 169, 169, 170, 170, 170, 170, 170, 170, 170, 170,
  433. 170, 170, 170, 170, 170, 170, 170, 170, 171, 172,
  434. 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
  435. 183, 184, 185, 185, 185, 185, 185, 186, 186, 186,
  436. 186, 186, 186, 186, 186, 186, 186, 186, 186, 187,
  437. 188, 188, 189, 189, 190, 190, 191, 191, 192, 192,
  438. 193, 193, 194, 194, 195, 195, 196, 196, 197, 197,
  439. 198, 199, 200, 200, 201, 202, 203, 203, 204, 204,
  440. 204, 204
  441. };
  442. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  443. static const unsigned char yyr2[] =
  444. {
  445. 0, 2, 0, 2, 1, 1, 1, 1, 4, 4,
  446. 4, 4, 4, 5, 2, 0, 2, 1, 1, 1,
  447. 1, 4, 4, 5, 2, 0, 2, 1, 1, 4,
  448. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  449. 4, 4, 4, 4, 5, 5, 5, 5, 4, 4,
  450. 1, 4, 8, 2, 2, 2, 2, 2, 2, 2,
  451. 2, 2, 7, 0, 2, 4, 4, 4, 4, 5,
  452. 2, 0, 2, 1, 4, 4, 5, 5, 5, 5,
  453. 4, 2, 2, 0, 2, 5, 4, 4, 4, 0,
  454. 2, 1, 4, 4, 4, 4, 4, 4, 4, 4,
  455. 4, 5, 5, 2, 5, 0, 2, 4, 4, 4,
  456. 5, 7, 9, 13, 17, 19, 25, 33, 5, 2,
  457. 0, 2, 4, 4, 4, 4, 4, 4, 4, 4,
  458. 4, 4, 4, 4, 4, 4, 3, 3, 2, 2,
  459. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  460. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  461. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  462. 0, 2, 0, 2, 0, 2, 0, 2, 0, 2,
  463. 0, 2, 0, 2, 0, 2, 0, 2, 0, 4,
  464. 5, 2, 0, 2, 3, 2, 0, 2, 5, 5,
  465. 5, 5
  466. };
  467. /* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none). */
  468. static const unsigned char yydprec[] =
  469. {
  470. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  471. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  472. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  473. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  474. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  475. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  476. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  477. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  478. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  479. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  480. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  481. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  482. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  483. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  484. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  485. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  486. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  487. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  488. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  489. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  490. 0, 0
  491. };
  492. /* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM. */
  493. static const unsigned char yymerger[] =
  494. {
  495. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  496. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  497. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  498. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  499. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  500. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  501. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  502. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  503. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  504. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  505. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  506. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  507. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  508. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  509. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  510. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  511. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  512. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  513. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  514. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  515. 0, 0
  516. };
  517. /* YYDEFACT[S] -- default reduction number in state S. Performed when
  518. YYTABLE doesn't specify something else to do. Zero means the default
  519. is an error. */
  520. static const unsigned char yydefact[] =
  521. {
  522. 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  523. 2, 4, 5, 0, 6, 0, 7, 0, 0, 0,
  524. 0, 0, 119, 191, 14, 0, 1, 3, 15, 120,
  525. 192, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  526. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  527. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  528. 0, 0, 0, 0, 0, 0, 0, 0, 15, 17,
  529. 18, 0, 19, 20, 0, 0, 0, 50, 0, 0,
  530. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  531. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  532. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  533. 0, 120, 196, 196, 196, 196, 196, 196, 196, 196,
  534. 196, 196, 196, 196, 196, 196, 196, 196, 188, 0,
  535. 0, 192, 196, 8, 9, 10, 12, 11, 0, 0,
  536. 24, 53, 54, 55, 56, 57, 58, 59, 0, 0,
  537. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  538. 0, 0, 0, 60, 61, 0, 0, 70, 0, 0,
  539. 16, 25, 0, 63, 63, 71, 138, 139, 140, 141,
  540. 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
  541. 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
  542. 162, 163, 164, 165, 166, 167, 168, 0, 121, 0,
  543. 170, 196, 172, 174, 176, 176, 176, 178, 180, 178,
  544. 182, 184, 180, 184, 186, 169, 0, 0, 0, 195,
  545. 0, 193, 0, 0, 0, 0, 0, 0, 0, 0,
  546. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  547. 0, 0, 0, 13, 0, 25, 27, 28, 0, 0,
  548. 0, 0, 0, 0, 0, 0, 63, 0, 0, 0,
  549. 0, 0, 0, 0, 0, 71, 73, 0, 0, 118,
  550. 0, 0, 0, 0, 0, 0, 197, 0, 0, 0,
  551. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  552. 0, 0, 0, 0, 0, 0, 0, 0, 136, 89,
  553. 137, 190, 194, 21, 22, 51, 30, 31, 32, 33,
  554. 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
  555. 48, 49, 29, 0, 26, 0, 0, 0, 0, 0,
  556. 0, 0, 0, 64, 0, 0, 0, 0, 81, 82,
  557. 0, 0, 72, 83, 83, 0, 0, 0, 0, 171,
  558. 122, 0, 173, 123, 0, 175, 124, 0, 177, 125,
  559. 126, 127, 0, 179, 128, 0, 181, 129, 130, 0,
  560. 183, 131, 0, 185, 132, 133, 134, 0, 187, 135,
  561. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  562. 0, 89, 91, 0, 23, 0, 0, 0, 0, 0,
  563. 0, 46, 44, 47, 45, 0, 0, 0, 69, 0,
  564. 0, 0, 0, 0, 0, 83, 0, 0, 0, 0,
  565. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  566. 0, 103, 0, 0, 0, 0, 0, 0, 0, 0,
  567. 189, 90, 105, 0, 0, 67, 68, 65, 66, 74,
  568. 75, 80, 0, 0, 0, 0, 0, 0, 84, 0,
  569. 0, 199, 198, 200, 201, 0, 0, 0, 0, 0,
  570. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  571. 0, 0, 0, 0, 0, 0, 0, 0, 105, 0,
  572. 0, 0, 0, 0, 0, 76, 78, 77, 79, 0,
  573. 0, 0, 0, 0, 0, 0, 0, 100, 92, 93,
  574. 94, 95, 96, 97, 98, 99, 0, 0, 0, 0,
  575. 0, 0, 106, 52, 0, 0, 86, 87, 88, 110,
  576. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  577. 0, 102, 101, 62, 85, 0, 0, 0, 0, 0,
  578. 0, 0, 0, 107, 108, 109, 111, 0, 0, 0,
  579. 0, 0, 0, 104, 0, 0, 0, 0, 0, 0,
  580. 112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  581. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  582. 0, 113, 0, 0, 0, 0, 0, 0, 0, 0,
  583. 0, 0, 0, 0, 0, 0, 0, 0, 114, 0,
  584. 0, 0, 0, 0, 0, 115, 0, 0, 0, 0,
  585. 0, 0, 0, 0, 0, 0, 0, 0, 116, 0,
  586. 0, 0, 0, 0, 0, 0, 0, 117
  587. };
  588. /* YYPDEFGOTO[NTERM-NUM]. */
  589. static const short int yydefgoto[] =
  590. {
  591. -1, 9, 10, 11, 12, 13, 67, 68, 69, 70,
  592. 71, 254, 255, 72, 73, 74, 75, 76, 264, 265,
  593. 266, 77, 78, 274, 275, 276, 277, 278, 423, 424,
  594. 425, 400, 401, 402, 403, 496, 497, 498, 362, 365,
  595. 368, 373, 376, 380, 383, 388, 14, 15, 110, 111,
  596. 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
  597. 122, 123, 124, 125, 126, 127, 128, 285, 288, 290,
  598. 292, 296, 298, 301, 303, 307, 228, 16, 17, 130,
  599. 131, 132, 210, 211
  600. };
  601. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  602. STATE-NUM. */
  603. #define YYPACT_NINF -335
  604. static const short int yypact[] =
  605. {
  606. 10, -86, -43, -42, -33, -24, -23, -19, -18, 86,
  607. 10, -335, -335, 50, -335, 55, -335, 56, 87, 93,
  608. 169, 168, -335, -335, -335, 170, -335, -335, -32, 92,
  609. 126, 61, 63, 64, 65, 66, 68, 69, 79, 80,
  610. 81, 83, 84, 85, 88, 89, 90, 91, 94, 95,
  611. 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
  612. 106, 107, 108, 109, 110, 111, 112, 113, -32, -335,
  613. -335, 115, -335, -335, 116, 117, 118, -335, 119, 188,
  614. 192, 193, 198, 199, 219, 220, 221, 228, 229, 230,
  615. 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
  616. 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
  617. 142, 92, 141, 141, 141, 141, 141, 141, 141, 141,
  618. 141, 141, 141, 141, 141, 141, 141, 141, 147, 254,
  619. 146, 126, 141, -335, -335, -335, -335, -335, 257, 258,
  620. -335, -335, -335, -335, -335, -335, -335, -335, 262, 259,
  621. 260, 264, 266, 261, 267, 268, 269, 270, 271, 272,
  622. 273, 274, 276, -335, -335, 275, 278, -335, 281, 157,
  623. -335, 76, 194, 19, 19, -71, -335, -335, -335, -335,
  624. -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
  625. -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
  626. -335, -335, -335, -335, -335, -335, -335, 167, -335, 24,
  627. 172, 141, 173, 175, 176, 176, 176, 177, 178, 177,
  628. 179, 180, 178, 180, 181, -335, 182, 183, 185, -335,
  629. 186, -335, 187, 189, 190, 191, 195, 196, 197, 200,
  630. 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
  631. 211, 212, 213, -335, 214, 76, -335, -335, 184, 215,
  632. 216, 218, 222, 223, 217, 224, -1, 225, 226, 251,
  633. 252, 253, 255, 256, 227, -71, -335, 263, 265, -335,
  634. 277, 279, 280, 282, 291, 283, -335, 285, 288, 289,
  635. 292, 290, 293, 294, 295, 296, 298, 299, 301, 302,
  636. 303, 305, 306, 308, 309, 310, 311, 313, -335, 82,
  637. -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
  638. -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
  639. -335, -335, -335, 314, -335, 304, 297, 317, 324, 326,
  640. 327, 315, 316, -335, 318, 319, 336, 307, -335, -335,
  641. 332, 320, -335, 6, 6, 300, 339, 341, 286, -335,
  642. -335, 343, -335, -335, 344, -335, -335, 345, -335, -335,
  643. -335, -335, 346, -335, -335, 347, -335, -335, -335, 348,
  644. -335, -335, 349, -335, -335, -335, -335, 350, -335, -335,
  645. 312, 322, 323, 325, 328, 329, 330, 331, 333, 334,
  646. 287, 82, -335, 335, -335, 337, 338, 340, 342, 351,
  647. 352, -335, -335, -335, -335, 353, 354, 355, -335, 356,
  648. 357, 358, 359, 321, 360, -21, 361, 362, 363, 364,
  649. 365, 366, 370, 371, 372, 373, 374, 375, 376, 377,
  650. 367, -335, 368, 369, 378, 381, 382, 383, 384, 290,
  651. -335, -335, -13, 379, 380, -335, -335, -335, -335, -335,
  652. -335, -335, 399, 402, 406, 405, 385, 386, -335, 387,
  653. 388, -335, -335, -335, -335, 389, 390, 391, 427, 435,
  654. 436, 441, 444, 392, 393, 394, 395, 396, 397, 398,
  655. 400, 401, 403, 404, 408, 409, 407, 410, -27, 411,
  656. 412, 413, 414, 417, 418, -335, -335, -335, -335, 419,
  657. 416, 420, 421, 422, 423, 424, 425, -335, -335, -335,
  658. -335, -335, -335, -335, -335, -335, 439, 440, 445, 446,
  659. 429, 430, -335, -335, 447, 434, -335, -335, -335, -335,
  660. 456, 457, 458, 459, 460, 470, 471, 428, 432, 433,
  661. 437, -335, -335, -335, -335, 438, 431, 442, 443, 448,
  662. 449, 450, 466, -335, -335, -335, -335, 476, 477, 478,
  663. 492, 493, 494, -335, 452, 453, 454, 455, 461, 462,
  664. -335, 499, 500, 501, 509, 512, 463, 464, 465, 467,
  665. 468, 514, 515, 520, 523, 530, 472, 469, 473, 474,
  666. 475, -335, 532, 545, 546, 548, 479, 480, 481, 482,
  667. 549, 551, 552, 553, 484, 485, 486, 487, -335, 554,
  668. 557, 558, 489, 490, 491, -335, 559, 560, 495, 496,
  669. 565, 569, 497, 498, 570, 571, 502, 503, -335, 572,
  670. 504, 573, 505, 579, 506, 583, 508, -335
  671. };
  672. /* YYPGOTO[NTERM-NUM]. */
  673. static const short int yypgoto[] =
  674. {
  675. -335, 584, -335, -335, -335, -335, 521, -335, -335, -335,
  676. -335, 58, -335, -153, -152, -335, -335, -335, 451, -173,
  677. -335, -335, -335, 114, -335, -335, -335, -335, -334, 1,
  678. -335, -45, -335, -335, -335, -335, -141, -335, -335, -335,
  679. -91, -335, -335, -335, -335, -335, -335, -335, 516, -335,
  680. -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
  681. -335, -335, -335, -335, -335, -335, -335, -335, -335, -335,
  682. -159, 140, 138, -335, 139, -335, -335, -335, -335, 488,
  683. -335, -335, -111, -335
  684. };
  685. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  686. positive, shift that token. If negative, reduce the rule which
  687. number is the opposite. If YYTABLE_NINF, syntax error. */
  688. #define YYTABLE_NINF -1
  689. static const unsigned short int yytable[] =
  690. {
  691. 492, 268, 212, 213, 214, 215, 216, 217, 218, 219,
  692. 220, 221, 222, 223, 224, 225, 226, 419, 256, 257,
  693. 426, 232, 269, 270, 271, 272, 273, 18, 36, 37,
  694. 259, 38, 39, 40, 41, 42, 43, 44, 45, 46,
  695. 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
  696. 57, 58, 59, 60, 61, 62, 293, 294, 63, 64,
  697. 65, 66, 260, 1, 2, 3, 4, 5, 6, 7,
  698. 19, 20, 8, 280, 281, 282, 283, 420, 421, 422,
  699. 21, 261, 260, 493, 494, 495, 26, 262, 263, 22,
  700. 23, 468, 31, 343, 24, 25, 32, 493, 494, 495,
  701. 286, 261, 256, 257, 420, 421, 422, 262, 263, 79,
  702. 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
  703. 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
  704. 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
  705. 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
  706. 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
  707. 59, 60, 61, 62, 390, 28, 63, 64, 65, 66,
  708. 29, 30, 33, 34, 129, 133, 35, 134, 135, 136,
  709. 137, 138, 139, 391, 392, 393, 394, 395, 396, 397,
  710. 398, 399, 140, 141, 142, 176, 143, 144, 145, 177,
  711. 178, 146, 147, 148, 149, 179, 180, 150, 151, 152,
  712. 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
  713. 163, 164, 165, 166, 167, 168, 181, 182, 183, 169,
  714. 171, 172, 173, 174, 175, 184, 185, 186, 187, 188,
  715. 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
  716. 199, 200, 201, 202, 203, 204, 205, 206, 207, 209,
  717. 227, 229, 230, 233, 234, 235, 240, 236, 238, 237,
  718. 239, 253, 241, 242, 243, 244, 245, 248, 247, 249,
  719. 250, 279, 246, 251, 252, 284, 287, 258, 289, 291,
  720. 295, 297, 300, 302, 306, 359, 308, 335, 309, 310,
  721. 311, 312, 431, 313, 314, 315, 428, 405, 406, 316,
  722. 317, 318, 416, 334, 319, 320, 321, 322, 323, 324,
  723. 325, 326, 327, 328, 329, 330, 331, 332, 407, 337,
  724. 333, 338, 336, 341, 408, 339, 340, 409, 410, 415,
  725. 342, 344, 345, 351, 417, 429, 430, 432, 433, 434,
  726. 435, 436, 437, 438, 439, 427, 451, 532, 491, 299,
  727. 304, 0, 305, 0, 346, 347, 348, 0, 349, 350,
  728. 0, 0, 0, 0, 0, 0, 0, 483, 353, 0,
  729. 354, 0, 484, 485, 487, 0, 488, 489, 490, 352,
  730. 0, 500, 486, 509, 510, 511, 355, 360, 356, 357,
  731. 361, 358, 363, 450, 364, 367, 366, 369, 370, 371,
  732. 501, 372, 374, 502, 375, 377, 378, 503, 379, 381,
  733. 504, 382, 384, 385, 386, 440, 387, 389, 404, 411,
  734. 412, 512, 413, 414, 418, 441, 442, 466, 443, 513,
  735. 514, 444, 445, 446, 447, 515, 448, 449, 516, 554,
  736. 452, 453, 547, 548, 455, 454, 456, 553, 549, 550,
  737. 555, 556, 557, 558, 559, 457, 458, 459, 460, 461,
  738. 463, 464, 465, 462, 560, 561, 467, 469, 470, 573,
  739. 574, 575, 576, 471, 472, 473, 474, 475, 476, 477,
  740. 478, 479, 480, 481, 482, 499, 577, 578, 579, 505,
  741. 506, 507, 508, 586, 587, 588, 517, 518, 519, 520,
  742. 521, 522, 523, 589, 524, 525, 590, 527, 596, 597,
  743. 526, 528, 529, 530, 598, 533, 531, 599, 536, 534,
  744. 535, 537, 538, 540, 600, 539, 606, 541, 542, 543,
  745. 544, 545, 546, 551, 552, 562, 563, 564, 567, 607,
  746. 608, 565, 609, 614, 566, 615, 616, 617, 622, 568,
  747. 569, 623, 624, 628, 629, 570, 571, 572, 580, 632,
  748. 581, 582, 583, 633, 636, 637, 640, 642, 584, 585,
  749. 591, 592, 593, 644, 594, 595, 602, 646, 601, 170,
  750. 603, 604, 605, 0, 27, 0, 610, 611, 612, 613,
  751. 618, 0, 619, 620, 621, 625, 0, 626, 627, 0,
  752. 0, 0, 630, 631, 634, 635, 0, 0, 638, 231,
  753. 639, 641, 643, 645, 647, 267, 0, 208
  754. };
  755. /* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of
  756. list of conflicting reductions corresponding to action entry for
  757. state STATE-NUM in yytable. 0 means no conflicts. The list in
  758. yyconfl is terminated by a rule number of 0. */
  759. static const unsigned char yyconflp[] =
  760. {
  761. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  762. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  763. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  764. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  765. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  766. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  767. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  768. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  769. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  770. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  771. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  772. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  773. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  774. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  775. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  776. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  777. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  778. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  779. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  780. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  781. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  782. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  783. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  784. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  785. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  786. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  787. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  788. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  789. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  790. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  791. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  792. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  793. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  794. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  795. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  796. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  797. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  798. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  799. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  800. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  801. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  802. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  803. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  804. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  805. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  806. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  807. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  808. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  809. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  810. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  811. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  812. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  813. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  814. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  815. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  816. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  817. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  818. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  819. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  820. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  821. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  822. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  823. 0, 0, 0, 0, 0, 0, 0, 0
  824. };
  825. /* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
  826. 0, pointed into by YYCONFLP. */
  827. static const short int yyconfl[] =
  828. {
  829. 0
  830. };
  831. static const short int yycheck[] =
  832. {
  833. 13, 174, 113, 114, 115, 116, 117, 118, 119, 120,
  834. 121, 122, 123, 124, 125, 126, 127, 11, 171, 171,
  835. 354, 132, 93, 94, 95, 96, 97, 113, 60, 61,
  836. 11, 63, 64, 65, 66, 67, 68, 69, 70, 71,
  837. 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
  838. 82, 83, 84, 85, 86, 87, 215, 216, 90, 91,
  839. 92, 93, 63, 53, 54, 55, 56, 57, 58, 59,
  840. 113, 113, 62, 49, 50, 51, 52, 98, 99, 100,
  841. 113, 82, 63, 110, 111, 112, 0, 88, 89, 113,
  842. 113, 425, 5, 266, 113, 113, 3, 110, 111, 112,
  843. 211, 82, 255, 255, 98, 99, 100, 88, 89, 17,
  844. 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
  845. 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
  846. 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  847. 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
  848. 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
  849. 84, 85, 86, 87, 82, 115, 90, 91, 92, 93,
  850. 115, 115, 3, 5, 48, 114, 6, 114, 114, 114,
  851. 114, 113, 113, 101, 102, 103, 104, 105, 106, 107,
  852. 108, 109, 113, 113, 113, 7, 113, 113, 113, 7,
  853. 7, 113, 113, 113, 113, 7, 7, 113, 113, 113,
  854. 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
  855. 113, 113, 113, 113, 113, 113, 7, 7, 7, 116,
  856. 115, 115, 115, 115, 115, 7, 7, 7, 7, 7,
  857. 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  858. 7, 7, 7, 7, 7, 7, 7, 7, 116, 118,
  859. 113, 7, 116, 6, 6, 3, 5, 8, 4, 9,
  860. 4, 114, 5, 5, 5, 5, 5, 3, 5, 3,
  861. 5, 114, 10, 5, 3, 113, 113, 93, 113, 113,
  862. 113, 113, 113, 113, 113, 4, 114, 113, 115, 114,
  863. 114, 114, 16, 114, 114, 114, 6, 3, 11, 114,
  864. 114, 114, 5, 255, 114, 114, 114, 114, 114, 114,
  865. 114, 114, 114, 114, 114, 114, 114, 114, 11, 113,
  866. 116, 113, 117, 116, 10, 113, 113, 11, 11, 3,
  867. 116, 116, 116, 116, 12, 6, 5, 4, 4, 4,
  868. 4, 4, 4, 4, 4, 354, 401, 498, 449, 219,
  869. 222, -1, 223, -1, 113, 113, 113, -1, 113, 113,
  870. -1, -1, -1, -1, -1, -1, -1, 10, 115, -1,
  871. 115, -1, 14, 14, 3, -1, 4, 4, 4, 275,
  872. -1, 11, 14, 4, 4, 4, 119, 114, 119, 119,
  873. 115, 119, 114, 116, 115, 115, 114, 114, 114, 114,
  874. 11, 115, 114, 11, 115, 114, 114, 11, 115, 114,
  875. 15, 115, 114, 114, 114, 113, 115, 114, 114, 114,
  876. 114, 4, 114, 114, 114, 113, 113, 116, 113, 4,
  877. 4, 113, 113, 113, 113, 4, 113, 113, 4, 15,
  878. 115, 114, 13, 13, 114, 117, 114, 10, 13, 13,
  879. 4, 4, 4, 4, 4, 114, 114, 114, 114, 114,
  880. 113, 113, 113, 117, 4, 4, 116, 116, 116, 13,
  881. 4, 4, 4, 120, 120, 120, 120, 117, 117, 117,
  882. 117, 117, 117, 117, 117, 116, 4, 4, 4, 114,
  883. 114, 114, 114, 4, 4, 4, 114, 114, 114, 114,
  884. 114, 114, 114, 4, 114, 114, 4, 113, 4, 4,
  885. 117, 113, 113, 116, 4, 114, 116, 4, 114, 117,
  886. 117, 114, 114, 117, 4, 116, 4, 117, 117, 117,
  887. 117, 117, 117, 114, 114, 117, 114, 114, 117, 4,
  888. 4, 114, 4, 4, 116, 4, 4, 4, 4, 117,
  889. 117, 4, 4, 4, 4, 117, 117, 117, 116, 4,
  890. 117, 117, 117, 4, 4, 4, 4, 4, 117, 117,
  891. 117, 117, 117, 4, 117, 117, 117, 4, 116, 68,
  892. 117, 117, 117, -1, 10, -1, 117, 117, 117, 117,
  893. 116, -1, 117, 117, 117, 116, -1, 117, 117, -1,
  894. -1, -1, 117, 117, 117, 117, -1, -1, 116, 131,
  895. 117, 117, 117, 117, 116, 174, -1, 111
  896. };
  897. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  898. symbol of state STATE-NUM. */
  899. static const unsigned char yystos[] =
  900. {
  901. 0, 53, 54, 55, 56, 57, 58, 59, 62, 122,
  902. 123, 124, 125, 126, 167, 168, 198, 199, 113, 113,
  903. 113, 113, 113, 113, 113, 113, 0, 122, 115, 115,
  904. 115, 5, 3, 3, 5, 6, 60, 61, 63, 64,
  905. 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
  906. 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
  907. 85, 86, 87, 90, 91, 92, 93, 127, 128, 129,
  908. 130, 131, 134, 135, 136, 137, 138, 142, 143, 17,
  909. 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
  910. 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
  911. 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  912. 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
  913. 179, 180, 181, 182, 183, 184, 185, 186, 187, 48,
  914. 200, 201, 202, 114, 114, 114, 114, 114, 113, 113,
  915. 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
  916. 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
  917. 113, 113, 113, 113, 113, 113, 113, 113, 113, 116,
  918. 127, 115, 115, 115, 115, 115, 7, 7, 7, 7,
  919. 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  920. 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
  921. 7, 7, 7, 7, 7, 7, 7, 116, 169, 118,
  922. 203, 204, 203, 203, 203, 203, 203, 203, 203, 203,
  923. 203, 203, 203, 203, 203, 203, 203, 113, 197, 7,
  924. 116, 200, 203, 6, 6, 3, 8, 9, 4, 4,
  925. 5, 5, 5, 5, 5, 5, 10, 5, 3, 3,
  926. 5, 5, 3, 114, 132, 133, 134, 135, 93, 11,
  927. 63, 82, 88, 89, 139, 140, 141, 139, 140, 93,
  928. 94, 95, 96, 97, 144, 145, 146, 147, 148, 114,
  929. 49, 50, 51, 52, 113, 188, 203, 113, 189, 113,
  930. 190, 113, 191, 191, 191, 113, 192, 113, 193, 192,
  931. 113, 194, 113, 195, 193, 195, 113, 196, 114, 115,
  932. 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
  933. 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
  934. 114, 114, 114, 116, 132, 113, 117, 113, 113, 113,
  935. 113, 116, 116, 140, 116, 116, 113, 113, 113, 113,
  936. 113, 116, 144, 115, 115, 119, 119, 119, 119, 4,
  937. 114, 115, 159, 114, 115, 160, 114, 115, 161, 114,
  938. 114, 114, 115, 162, 114, 115, 163, 114, 114, 115,
  939. 164, 114, 115, 165, 114, 114, 114, 115, 166, 114,
  940. 82, 101, 102, 103, 104, 105, 106, 107, 108, 109,
  941. 152, 153, 154, 155, 114, 3, 11, 11, 10, 11,
  942. 11, 114, 114, 114, 114, 3, 5, 12, 114, 11,
  943. 98, 99, 100, 149, 150, 151, 149, 150, 6, 6,
  944. 5, 16, 4, 4, 4, 4, 4, 4, 4, 4,
  945. 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
  946. 116, 152, 115, 114, 117, 114, 114, 114, 114, 114,
  947. 114, 114, 117, 113, 113, 113, 116, 116, 149, 116,
  948. 116, 120, 120, 120, 120, 117, 117, 117, 117, 117,
  949. 117, 117, 117, 10, 14, 14, 14, 3, 4, 4,
  950. 4, 161, 13, 110, 111, 112, 156, 157, 158, 116,
  951. 11, 11, 11, 11, 15, 114, 114, 114, 114, 4,
  952. 4, 4, 4, 4, 4, 4, 4, 114, 114, 114,
  953. 114, 114, 114, 114, 114, 114, 117, 113, 113, 113,
  954. 116, 116, 157, 114, 117, 117, 114, 114, 114, 116,
  955. 117, 117, 117, 117, 117, 117, 117, 13, 13, 13,
  956. 13, 114, 114, 10, 15, 4, 4, 4, 4, 4,
  957. 4, 4, 117, 114, 114, 114, 116, 117, 117, 117,
  958. 117, 117, 117, 13, 4, 4, 4, 4, 4, 4,
  959. 116, 117, 117, 117, 117, 117, 4, 4, 4, 4,
  960. 4, 117, 117, 117, 117, 117, 4, 4, 4, 4,
  961. 4, 116, 117, 117, 117, 117, 4, 4, 4, 4,
  962. 117, 117, 117, 117, 4, 4, 4, 4, 116, 117,
  963. 117, 117, 4, 4, 4, 116, 117, 117, 4, 4,
  964. 117, 117, 4, 4, 117, 117, 4, 4, 116, 117,
  965. 4, 117, 4, 117, 4, 117, 4, 116
  966. };
  967. /* Error token number */
  968. #define YYTERROR 1
  969. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  970. If N is 0, then set CURRENT to the empty location which ends
  971. the previous symbol: RHS[0] (always defined). */
  972. #ifndef YYLLOC_DEFAULT
  973. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  974. do \
  975. if (YYID (N)) \
  976. { \
  977. (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  978. (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  979. (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  980. (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  981. } \
  982. else \
  983. { \
  984. (Current).first_line = (Current).last_line = \
  985. YYRHSLOC (Rhs, 0).last_line; \
  986. (Current).first_column = (Current).last_column = \
  987. YYRHSLOC (Rhs, 0).last_column; \
  988. } \
  989. while (YYID (0))
  990. #endif
  991. # define YYRHSLOC(Rhs, K) ((Rhs)[K].yystate.yyloc)
  992. /* YY_LOCATION_PRINT -- Print the location on the stream.
  993. This macro was not mandated originally: define only if we know
  994. we won't break user code: when these are the locations we know. */
  995. #ifndef __attribute__
  996. /* This feature is available in gcc versions 2.5 and later. */
  997. # if (! defined __GNUC__ || __GNUC__ < 2 \
  998. || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
  999. # define __attribute__(Spec) /* empty */
  1000. # endif
  1001. #endif
  1002. #ifndef YY_LOCATION_PRINT
  1003. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  1004. /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
  1005. __attribute__((__unused__))
  1006. #if (defined __STDC__ || defined __C99__FUNC__ \
  1007. || defined __cplusplus || defined _MSC_VER)
  1008. static unsigned
  1009. yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
  1010. #else
  1011. static unsigned
  1012. yy_location_print_ (yyo, yylocp)
  1013. FILE *yyo;
  1014. YYLTYPE const * const yylocp;
  1015. #endif
  1016. {
  1017. unsigned res = 0;
  1018. int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  1019. if (0 <= yylocp->first_line)
  1020. {
  1021. res += fprintf (yyo, "%d", yylocp->first_line);
  1022. if (0 <= yylocp->first_column)
  1023. res += fprintf (yyo, ".%d", yylocp->first_column);
  1024. }
  1025. if (0 <= yylocp->last_line)
  1026. {
  1027. if (yylocp->first_line < yylocp->last_line)
  1028. {
  1029. res += fprintf (yyo, "-%d", yylocp->last_line);
  1030. if (0 <= end_col)
  1031. res += fprintf (yyo, ".%d", end_col);
  1032. }
  1033. else if (0 <= end_col && yylocp->first_column < end_col)
  1034. res += fprintf (yyo, "-%d", end_col);
  1035. }
  1036. return res;
  1037. }
  1038. # define YY_LOCATION_PRINT(File, Loc) \
  1039. yy_location_print_ (File, &(Loc))
  1040. # else
  1041. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  1042. # endif
  1043. #endif
  1044. /* YYLEX -- calling `yylex' with the right arguments. */
  1045. #define YYLEX yylex (&yylval, &yylloc, scanner)
  1046. #undef yynerrs
  1047. #define yynerrs (yystackp->yyerrcnt)
  1048. #undef yychar
  1049. #define yychar (yystackp->yyrawchar)
  1050. #undef yylval
  1051. #define yylval (yystackp->yyval)
  1052. #undef yylloc
  1053. #define yylloc (yystackp->yyloc)
  1054. static const int YYEOF = 0;
  1055. static const int YYEMPTY = -2;
  1056. typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG;
  1057. #define YYCHK(YYE) \
  1058. do { YYRESULTTAG yyflag = YYE; if (yyflag != yyok) return yyflag; } \
  1059. while (YYID (0))
  1060. #if YYDEBUG
  1061. # ifndef YYFPRINTF
  1062. # define YYFPRINTF fprintf
  1063. # endif
  1064. # define YYDPRINTF(Args) \
  1065. do { \
  1066. if (yydebug) \
  1067. YYFPRINTF Args; \
  1068. } while (YYID (0))
  1069. /*--------------------------------.
  1070. | Print this symbol on YYOUTPUT. |
  1071. `--------------------------------*/
  1072. /*ARGSUSED*/
  1073. static void
  1074. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, ParseState* parse_state, yyscan_t scanner)
  1075. {
  1076. FILE *yyo = yyoutput;
  1077. YYUSE (yyo);
  1078. if (!yyvaluep)
  1079. return;
  1080. YYUSE (yylocationp);
  1081. YYUSE (parse_state);
  1082. YYUSE (scanner);
  1083. # ifdef YYPRINT
  1084. if (yytype < YYNTOKENS)
  1085. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  1086. # else
  1087. YYUSE (yyoutput);
  1088. # endif
  1089. switch (yytype)
  1090. {
  1091. default:
  1092. break;
  1093. }
  1094. }
  1095. /*--------------------------------.
  1096. | Print this symbol on YYOUTPUT. |
  1097. `--------------------------------*/
  1098. static void
  1099. yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, ParseState* parse_state, yyscan_t scanner)
  1100. {
  1101. if (yytype < YYNTOKENS)
  1102. YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  1103. else
  1104. YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  1105. YY_LOCATION_PRINT (yyoutput, *yylocationp);
  1106. YYFPRINTF (yyoutput, ": ");
  1107. yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parse_state, scanner);
  1108. YYFPRINTF (yyoutput, ")");
  1109. }
  1110. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  1111. do { \
  1112. if (yydebug) \
  1113. { \
  1114. YYFPRINTF (stderr, "%s ", Title); \
  1115. yy_symbol_print (stderr, Type, Value, Location, parse_state, scanner); \
  1116. YYFPRINTF (stderr, "\n"); \
  1117. } \
  1118. } while (YYID (0))
  1119. /* Nonzero means print parse trace. It is left uninitialized so that
  1120. multiple parsers can coexist. */
  1121. int yydebug;
  1122. #else /* !YYDEBUG */
  1123. # define YYDPRINTF(Args)
  1124. # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  1125. #endif /* !YYDEBUG */
  1126. /* YYINITDEPTH -- initial size of the parser's stacks. */
  1127. #ifndef YYINITDEPTH
  1128. # define YYINITDEPTH 200
  1129. #endif
  1130. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  1131. if the built-in stack extension method is used).
  1132. Do not make this value too large; the results are undefined if
  1133. SIZE_MAX < YYMAXDEPTH * sizeof (GLRStackItem)
  1134. evaluated with infinite-precision integer arithmetic. */
  1135. #ifndef YYMAXDEPTH
  1136. # define YYMAXDEPTH 10000
  1137. #endif
  1138. /* Minimum number of free items on the stack allowed after an
  1139. allocation. This is to allow allocation and initialization
  1140. to be completed by functions that call yyexpandGLRStack before the
  1141. stack is expanded, thus insuring that all necessary pointers get
  1142. properly redirected to new data. */
  1143. #define YYHEADROOM 2
  1144. #ifndef YYSTACKEXPANDABLE
  1145. # if (! defined __cplusplus \
  1146. || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  1147. && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))
  1148. # define YYSTACKEXPANDABLE 1
  1149. # else
  1150. # define YYSTACKEXPANDABLE 0
  1151. # endif
  1152. #endif
  1153. #if YYSTACKEXPANDABLE
  1154. # define YY_RESERVE_GLRSTACK(Yystack) \
  1155. do { \
  1156. if (Yystack->yyspaceLeft < YYHEADROOM) \
  1157. yyexpandGLRStack (Yystack); \
  1158. } while (YYID (0))
  1159. #else
  1160. # define YY_RESERVE_GLRSTACK(Yystack) \
  1161. do { \
  1162. if (Yystack->yyspaceLeft < YYHEADROOM) \
  1163. yyMemoryExhausted (Yystack); \
  1164. } while (YYID (0))
  1165. #endif
  1166. #if YYERROR_VERBOSE
  1167. # ifndef yystpcpy
  1168. # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
  1169. # define yystpcpy stpcpy
  1170. # else
  1171. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  1172. YYDEST. */
  1173. static char *
  1174. yystpcpy (char *yydest, const char *yysrc)
  1175. {
  1176. char *yyd = yydest;
  1177. const char *yys = yysrc;
  1178. while ((*yyd++ = *yys++) != '\0')
  1179. continue;
  1180. return yyd - 1;
  1181. }
  1182. # endif
  1183. # endif
  1184. # ifndef yytnamerr
  1185. /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  1186. quotes and backslashes, so that it's suitable for yyerror. The
  1187. heuristic is that double-quoting is unnecessary unless the string
  1188. contains an apostrophe, a comma, or backslash (other than
  1189. backslash-backslash). YYSTR is taken from yytname. If YYRES is
  1190. null, do not copy; instead, return the length of what the result
  1191. would have been. */
  1192. static size_t
  1193. yytnamerr (char *yyres, const char *yystr)
  1194. {
  1195. if (*yystr == '"')
  1196. {
  1197. size_t yyn = 0;
  1198. char const *yyp = yystr;
  1199. for (;;)
  1200. switch (*++yyp)
  1201. {
  1202. case '\'':
  1203. case ',':
  1204. goto do_not_strip_quotes;
  1205. case '\\':
  1206. if (*++yyp != '\\')
  1207. goto do_not_strip_quotes;
  1208. /* Fall through. */
  1209. default:
  1210. if (yyres)
  1211. yyres[yyn] = *yyp;
  1212. yyn++;
  1213. break;
  1214. case '"':
  1215. if (yyres)
  1216. yyres[yyn] = '\0';
  1217. return yyn;
  1218. }
  1219. do_not_strip_quotes: ;
  1220. }
  1221. if (! yyres)
  1222. return strlen (yystr);
  1223. return yystpcpy (yyres, yystr) - yyres;
  1224. }
  1225. # endif
  1226. #endif /* !YYERROR_VERBOSE */
  1227. /** State numbers, as in LALR(1) machine */
  1228. typedef int yyStateNum;
  1229. /** Rule numbers, as in LALR(1) machine */
  1230. typedef int yyRuleNum;
  1231. /** Grammar symbol */
  1232. typedef short int yySymbol;
  1233. /** Item references, as in LALR(1) machine */
  1234. typedef short int yyItemNum;
  1235. typedef struct yyGLRState yyGLRState;
  1236. typedef struct yyGLRStateSet yyGLRStateSet;
  1237. typedef struct yySemanticOption yySemanticOption;
  1238. typedef union yyGLRStackItem yyGLRStackItem;
  1239. typedef struct yyGLRStack yyGLRStack;
  1240. struct yyGLRState {
  1241. /** Type tag: always true. */
  1242. yybool yyisState;
  1243. /** Type tag for yysemantics. If true, yysval applies, otherwise
  1244. * yyfirstVal applies. */
  1245. yybool yyresolved;
  1246. /** Number of corresponding LALR(1) machine state. */
  1247. yyStateNum yylrState;
  1248. /** Preceding state in this stack */
  1249. yyGLRState* yypred;
  1250. /** Source position of the first token produced by my symbol */
  1251. size_t yyposn;
  1252. union {
  1253. /** First in a chain of alternative reductions producing the
  1254. * non-terminal corresponding to this state, threaded through
  1255. * yynext. */
  1256. yySemanticOption* yyfirstVal;
  1257. /** Semantic value for this state. */
  1258. YYSTYPE yysval;
  1259. } yysemantics;
  1260. /** Source location for this state. */
  1261. YYLTYPE yyloc;
  1262. };
  1263. struct yyGLRStateSet {
  1264. yyGLRState** yystates;
  1265. /** During nondeterministic operation, yylookaheadNeeds tracks which
  1266. * stacks have actually needed the current lookahead. During deterministic
  1267. * operation, yylookaheadNeeds[0] is not maintained since it would merely
  1268. * duplicate yychar != YYEMPTY. */
  1269. yybool* yylookaheadNeeds;
  1270. size_t yysize, yycapacity;
  1271. };
  1272. struct yySemanticOption {
  1273. /** Type tag: always false. */
  1274. yybool yyisState;
  1275. /** Rule number for this reduction */
  1276. yyRuleNum yyrule;
  1277. /** The last RHS state in the list of states to be reduced. */
  1278. yyGLRState* yystate;
  1279. /** The lookahead for this reduction. */
  1280. int yyrawchar;
  1281. YYSTYPE yyval;
  1282. YYLTYPE yyloc;
  1283. /** Next sibling in chain of options. To facilitate merging,
  1284. * options are chained in decreasing order by address. */
  1285. yySemanticOption* yynext;
  1286. };
  1287. /** Type of the items in the GLR stack. The yyisState field
  1288. * indicates which item of the union is valid. */
  1289. union yyGLRStackItem {
  1290. yyGLRState yystate;
  1291. yySemanticOption yyoption;
  1292. };
  1293. struct yyGLRStack {
  1294. int yyerrState;
  1295. /* To compute the location of the error token. */
  1296. yyGLRStackItem yyerror_range[3];
  1297. int yyerrcnt;
  1298. int yyrawchar;
  1299. YYSTYPE yyval;
  1300. YYLTYPE yyloc;
  1301. YYJMP_BUF yyexception_buffer;
  1302. yyGLRStackItem* yyitems;
  1303. yyGLRStackItem* yynextFree;
  1304. size_t yyspaceLeft;
  1305. yyGLRState* yysplitPoint;
  1306. yyGLRState* yylastDeleted;
  1307. yyGLRStateSet yytops;
  1308. };
  1309. #if YYSTACKEXPANDABLE
  1310. static void yyexpandGLRStack (yyGLRStack* yystackp);
  1311. #endif
  1312. static void yyFail (yyGLRStack* yystackp, YYLTYPE *yylocp, ParseState* parse_state, yyscan_t scanner, const char* yymsg)
  1313. __attribute__ ((__noreturn__));
  1314. static void
  1315. yyFail (yyGLRStack* yystackp, YYLTYPE *yylocp, ParseState* parse_state, yyscan_t scanner, const char* yymsg)
  1316. {
  1317. if (yymsg != YY_NULL)
  1318. yyerror (yylocp, parse_state, scanner, yymsg);
  1319. YYLONGJMP (yystackp->yyexception_buffer, 1);
  1320. }
  1321. static void yyMemoryExhausted (yyGLRStack* yystackp)
  1322. __attribute__ ((__noreturn__));
  1323. static void
  1324. yyMemoryExhausted (yyGLRStack* yystackp)
  1325. {
  1326. YYLONGJMP (yystackp->yyexception_buffer, 2);
  1327. }
  1328. #if YYDEBUG || YYERROR_VERBOSE
  1329. /** A printable representation of TOKEN. */
  1330. static inline const char*
  1331. yytokenName (yySymbol yytoken)
  1332. {
  1333. if (yytoken == YYEMPTY)
  1334. return "";
  1335. return yytname[yytoken];
  1336. }
  1337. #endif
  1338. /** Fill in YYVSP[YYLOW1 .. YYLOW0-1] from the chain of states starting
  1339. * at YYVSP[YYLOW0].yystate.yypred. Leaves YYVSP[YYLOW1].yystate.yypred
  1340. * containing the pointer to the next state in the chain. */
  1341. static void yyfillin (yyGLRStackItem *, int, int) __attribute__ ((__unused__));
  1342. static void
  1343. yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1)
  1344. {
  1345. int i;
  1346. yyGLRState *s = yyvsp[yylow0].yystate.yypred;
  1347. for (i = yylow0-1; i >= yylow1; i -= 1)
  1348. {
  1349. YYASSERT (s->yyresolved);
  1350. yyvsp[i].yystate.yyresolved = yytrue;
  1351. yyvsp[i].yystate.yysemantics.yysval = s->yysemantics.yysval;
  1352. yyvsp[i].yystate.yyloc = s->yyloc;
  1353. s = yyvsp[i].yystate.yypred = s->yypred;
  1354. }
  1355. }
  1356. /* Do nothing if YYNORMAL or if *YYLOW <= YYLOW1. Otherwise, fill in
  1357. * YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1.
  1358. * For convenience, always return YYLOW1. */
  1359. static inline int yyfill (yyGLRStackItem *, int *, int, yybool)
  1360. __attribute__ ((__unused__));
  1361. static inline int
  1362. yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal)
  1363. {
  1364. if (!yynormal && yylow1 < *yylow)
  1365. {
  1366. yyfillin (yyvsp, *yylow, yylow1);
  1367. *yylow = yylow1;
  1368. }
  1369. return yylow1;
  1370. }
  1371. /** Perform user action for rule number YYN, with RHS length YYRHSLEN,
  1372. * and top stack item YYVSP. YYLVALP points to place to put semantic
  1373. * value ($$), and yylocp points to place for location information
  1374. * (@$). Returns yyok for normal return, yyaccept for YYACCEPT,
  1375. * yyerr for YYERROR, yyabort for YYABORT. */
  1376. /*ARGSUSED*/ static YYRESULTTAG
  1377. yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
  1378. yyGLRStack* yystackp,
  1379. YYSTYPE* yyvalp, YYLTYPE *yylocp, ParseState* parse_state, yyscan_t scanner)
  1380. {
  1381. yybool yynormal __attribute__ ((__unused__)) =
  1382. (yystackp->yysplitPoint == YY_NULL);
  1383. int yylow;
  1384. YYUSE (parse_state);
  1385. YYUSE (scanner);
  1386. # undef yyerrok
  1387. # define yyerrok (yystackp->yyerrState = 0)
  1388. # undef YYACCEPT
  1389. # define YYACCEPT return yyaccept
  1390. # undef YYABORT
  1391. # define YYABORT return yyabort
  1392. # undef YYERROR
  1393. # define YYERROR return yyerrok, yyerr
  1394. # undef YYRECOVERING
  1395. # define YYRECOVERING() (yystackp->yyerrState != 0)
  1396. # undef yyclearin
  1397. # define yyclearin (yychar = YYEMPTY)
  1398. # undef YYFILL
  1399. # define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal)
  1400. # undef YYBACKUP
  1401. # define YYBACKUP(Token, Value) \
  1402. return yyerror (yylocp, parse_state, scanner, YY_("syntax error: cannot back up")), \
  1403. yyerrok, yyerr
  1404. yylow = 1;
  1405. if (yyrhslen == 0)
  1406. *yyvalp = yyval_default;
  1407. else
  1408. *yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;
  1409. YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
  1410. yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
  1411. switch (yyn)
  1412. {
  1413. case 2:
  1414. /* Line 868 of glr.c */
  1415. #line 231 "BsParserFX.y"
  1416. { }
  1417. break;
  1418. case 3:
  1419. /* Line 868 of glr.c */
  1420. #line 232 "BsParserFX.y"
  1421. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  1422. break;
  1423. case 5:
  1424. /* Line 868 of glr.c */
  1425. #line 237 "BsParserFX.y"
  1426. { ((*yyvalp).nodeOption).type = OT_Technique; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.nodePtr); }
  1427. break;
  1428. case 6:
  1429. /* Line 868 of glr.c */
  1430. #line 238 "BsParserFX.y"
  1431. { ((*yyvalp).nodeOption).type = OT_Parameters; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.nodePtr); }
  1432. break;
  1433. case 7:
  1434. /* Line 868 of glr.c */
  1435. #line 239 "BsParserFX.y"
  1436. { ((*yyvalp).nodeOption).type = OT_Blocks; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.nodePtr); }
  1437. break;
  1438. case 8:
  1439. /* Line 868 of glr.c */
  1440. #line 243 "BsParserFX.y"
  1441. { ((*yyvalp).nodeOption).type = OT_Separable; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1442. break;
  1443. case 9:
  1444. /* Line 868 of glr.c */
  1445. #line 244 "BsParserFX.y"
  1446. { ((*yyvalp).nodeOption).type = OT_Queue; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1447. break;
  1448. case 10:
  1449. /* Line 868 of glr.c */
  1450. #line 245 "BsParserFX.y"
  1451. { ((*yyvalp).nodeOption).type = OT_Priority; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1452. break;
  1453. case 11:
  1454. /* Line 868 of glr.c */
  1455. #line 246 "BsParserFX.y"
  1456. { ((*yyvalp).nodeOption).type = OT_Include; ((*yyvalp).nodeOption).value.strValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.strValue); }
  1457. break;
  1458. case 12:
  1459. /* Line 868 of glr.c */
  1460. #line 247 "BsParserFX.y"
  1461. { ((*yyvalp).nodeOption).type = OT_Transparent; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1462. break;
  1463. case 13:
  1464. /* Line 868 of glr.c */
  1465. #line 253 "BsParserFX.y"
  1466. { nodePop(parse_state); ((*yyvalp).nodePtr) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1467. break;
  1468. case 14:
  1469. /* Line 868 of glr.c */
  1470. #line 258 "BsParserFX.y"
  1471. {
  1472. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Technique);
  1473. nodePush(parse_state, ((*yyvalp).nodePtr));
  1474. }
  1475. break;
  1476. case 16:
  1477. /* Line 868 of glr.c */
  1478. #line 266 "BsParserFX.y"
  1479. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  1480. break;
  1481. case 18:
  1482. /* Line 868 of glr.c */
  1483. #line 271 "BsParserFX.y"
  1484. { ((*yyvalp).nodeOption).type = OT_Pass; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.nodePtr); }
  1485. break;
  1486. case 20:
  1487. /* Line 868 of glr.c */
  1488. #line 273 "BsParserFX.y"
  1489. { ((*yyvalp).nodeOption).type = OT_Code; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.nodePtr); }
  1490. break;
  1491. case 21:
  1492. /* Line 868 of glr.c */
  1493. #line 277 "BsParserFX.y"
  1494. { ((*yyvalp).nodeOption).type = OT_Renderer; ((*yyvalp).nodeOption).value.strValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.strValue); }
  1495. break;
  1496. case 22:
  1497. /* Line 868 of glr.c */
  1498. #line 278 "BsParserFX.y"
  1499. { ((*yyvalp).nodeOption).type = OT_Language; ((*yyvalp).nodeOption).value.strValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.strValue); }
  1500. break;
  1501. case 23:
  1502. /* Line 868 of glr.c */
  1503. #line 284 "BsParserFX.y"
  1504. { nodePop(parse_state); ((*yyvalp).nodePtr) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1505. break;
  1506. case 24:
  1507. /* Line 868 of glr.c */
  1508. #line 289 "BsParserFX.y"
  1509. {
  1510. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Pass);
  1511. nodePush(parse_state, ((*yyvalp).nodePtr));
  1512. }
  1513. break;
  1514. case 26:
  1515. /* Line 868 of glr.c */
  1516. #line 297 "BsParserFX.y"
  1517. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  1518. break;
  1519. case 28:
  1520. /* Line 868 of glr.c */
  1521. #line 302 "BsParserFX.y"
  1522. { ((*yyvalp).nodeOption).type = OT_Code; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.nodePtr); }
  1523. break;
  1524. case 29:
  1525. /* Line 868 of glr.c */
  1526. #line 306 "BsParserFX.y"
  1527. { ((*yyvalp).nodeOption).type = OT_Index; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1528. break;
  1529. case 30:
  1530. /* Line 868 of glr.c */
  1531. #line 307 "BsParserFX.y"
  1532. { ((*yyvalp).nodeOption).type = OT_FillMode; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1533. break;
  1534. case 31:
  1535. /* Line 868 of glr.c */
  1536. #line 308 "BsParserFX.y"
  1537. { ((*yyvalp).nodeOption).type = OT_CullMode; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1538. break;
  1539. case 32:
  1540. /* Line 868 of glr.c */
  1541. #line 309 "BsParserFX.y"
  1542. { ((*yyvalp).nodeOption).type = OT_DepthBias; ((*yyvalp).nodeOption).value.floatValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.floatValue); }
  1543. break;
  1544. case 33:
  1545. /* Line 868 of glr.c */
  1546. #line 310 "BsParserFX.y"
  1547. { ((*yyvalp).nodeOption).type = OT_SDepthBias; ((*yyvalp).nodeOption).value.floatValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.floatValue); }
  1548. break;
  1549. case 34:
  1550. /* Line 868 of glr.c */
  1551. #line 311 "BsParserFX.y"
  1552. { ((*yyvalp).nodeOption).type = OT_DepthClip; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1553. break;
  1554. case 35:
  1555. /* Line 868 of glr.c */
  1556. #line 312 "BsParserFX.y"
  1557. { ((*yyvalp).nodeOption).type = OT_Scissor; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1558. break;
  1559. case 36:
  1560. /* Line 868 of glr.c */
  1561. #line 313 "BsParserFX.y"
  1562. { ((*yyvalp).nodeOption).type = OT_Multisample; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1563. break;
  1564. case 37:
  1565. /* Line 868 of glr.c */
  1566. #line 314 "BsParserFX.y"
  1567. { ((*yyvalp).nodeOption).type = OT_AALine; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1568. break;
  1569. case 38:
  1570. /* Line 868 of glr.c */
  1571. #line 315 "BsParserFX.y"
  1572. { ((*yyvalp).nodeOption).type = OT_DepthRead; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1573. break;
  1574. case 39:
  1575. /* Line 868 of glr.c */
  1576. #line 316 "BsParserFX.y"
  1577. { ((*yyvalp).nodeOption).type = OT_DepthWrite; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1578. break;
  1579. case 40:
  1580. /* Line 868 of glr.c */
  1581. #line 317 "BsParserFX.y"
  1582. { ((*yyvalp).nodeOption).type = OT_CompareFunc; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1583. break;
  1584. case 41:
  1585. /* Line 868 of glr.c */
  1586. #line 318 "BsParserFX.y"
  1587. { ((*yyvalp).nodeOption).type = OT_Stencil; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1588. break;
  1589. case 42:
  1590. /* Line 868 of glr.c */
  1591. #line 319 "BsParserFX.y"
  1592. { ((*yyvalp).nodeOption).type = OT_StencilReadMask; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1593. break;
  1594. case 43:
  1595. /* Line 868 of glr.c */
  1596. #line 320 "BsParserFX.y"
  1597. { ((*yyvalp).nodeOption).type = OT_StencilWriteMask; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1598. break;
  1599. case 44:
  1600. /* Line 868 of glr.c */
  1601. #line 321 "BsParserFX.y"
  1602. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_StencilOpFront; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1603. break;
  1604. case 45:
  1605. /* Line 868 of glr.c */
  1606. #line 322 "BsParserFX.y"
  1607. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_StencilOpBack; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1608. break;
  1609. case 46:
  1610. /* Line 868 of glr.c */
  1611. #line 323 "BsParserFX.y"
  1612. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_StencilOpFront; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1613. break;
  1614. case 47:
  1615. /* Line 868 of glr.c */
  1616. #line 324 "BsParserFX.y"
  1617. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_StencilOpBack; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1618. break;
  1619. case 48:
  1620. /* Line 868 of glr.c */
  1621. #line 325 "BsParserFX.y"
  1622. { ((*yyvalp).nodeOption).type = OT_AlphaToCoverage; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1623. break;
  1624. case 49:
  1625. /* Line 868 of glr.c */
  1626. #line 326 "BsParserFX.y"
  1627. { ((*yyvalp).nodeOption).type = OT_IndependantBlend; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1628. break;
  1629. case 50:
  1630. /* Line 868 of glr.c */
  1631. #line 327 "BsParserFX.y"
  1632. { ((*yyvalp).nodeOption).type = OT_Target; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.nodePtr); }
  1633. break;
  1634. case 51:
  1635. /* Line 868 of glr.c */
  1636. #line 328 "BsParserFX.y"
  1637. { ((*yyvalp).nodeOption).type = OT_StencilRef; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1638. break;
  1639. case 52:
  1640. /* Line 868 of glr.c */
  1641. #line 335 "BsParserFX.y"
  1642. {
  1643. NodeOption index;
  1644. index.type = OT_Index;
  1645. index.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((5) - (8))].yystate.yysemantics.yysval.intValue);
  1646. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &index);
  1647. nodePop(parse_state);
  1648. ((*yyvalp).nodePtr) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (8))].yystate.yysemantics.yysval.nodePtr);
  1649. }
  1650. break;
  1651. case 53:
  1652. /* Line 868 of glr.c */
  1653. #line 349 "BsParserFX.y"
  1654. {
  1655. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Code);
  1656. nodePush(parse_state, ((*yyvalp).nodePtr));
  1657. }
  1658. break;
  1659. case 54:
  1660. /* Line 868 of glr.c */
  1661. #line 354 "BsParserFX.y"
  1662. {
  1663. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Code);
  1664. nodePush(parse_state, ((*yyvalp).nodePtr));
  1665. }
  1666. break;
  1667. case 55:
  1668. /* Line 868 of glr.c */
  1669. #line 359 "BsParserFX.y"
  1670. {
  1671. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Code);
  1672. nodePush(parse_state, ((*yyvalp).nodePtr));
  1673. }
  1674. break;
  1675. case 56:
  1676. /* Line 868 of glr.c */
  1677. #line 364 "BsParserFX.y"
  1678. {
  1679. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Code);
  1680. nodePush(parse_state, ((*yyvalp).nodePtr));
  1681. }
  1682. break;
  1683. case 57:
  1684. /* Line 868 of glr.c */
  1685. #line 369 "BsParserFX.y"
  1686. {
  1687. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Code);
  1688. nodePush(parse_state, ((*yyvalp).nodePtr));
  1689. }
  1690. break;
  1691. case 58:
  1692. /* Line 868 of glr.c */
  1693. #line 374 "BsParserFX.y"
  1694. {
  1695. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Code);
  1696. nodePush(parse_state, ((*yyvalp).nodePtr));
  1697. }
  1698. break;
  1699. case 59:
  1700. /* Line 868 of glr.c */
  1701. #line 379 "BsParserFX.y"
  1702. {
  1703. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Code);
  1704. nodePush(parse_state, ((*yyvalp).nodePtr));
  1705. }
  1706. break;
  1707. case 60:
  1708. /* Line 868 of glr.c */
  1709. #line 389 "BsParserFX.y"
  1710. {
  1711. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_StencilOp);
  1712. nodePush(parse_state, ((*yyvalp).nodePtr));
  1713. }
  1714. break;
  1715. case 61:
  1716. /* Line 868 of glr.c */
  1717. #line 397 "BsParserFX.y"
  1718. {
  1719. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_StencilOp);
  1720. nodePush(parse_state, ((*yyvalp).nodePtr));
  1721. }
  1722. break;
  1723. case 62:
  1724. /* Line 868 of glr.c */
  1725. #line 405 "BsParserFX.y"
  1726. {
  1727. NodeOption fail; fail.type = OT_Fail; fail.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (7))].yystate.yysemantics.yysval.intValue);
  1728. NodeOption zfail; zfail.type = OT_ZFail; zfail.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.intValue);
  1729. NodeOption pass; pass.type = OT_PassOp; pass.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((5) - (7))].yystate.yysemantics.yysval.intValue);
  1730. NodeOption cmp; cmp.type = OT_CompareFunc; cmp.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((7) - (7))].yystate.yysemantics.yysval.intValue);
  1731. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &fail);
  1732. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &zfail);
  1733. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &pass);
  1734. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &cmp);
  1735. }
  1736. break;
  1737. case 64:
  1738. /* Line 868 of glr.c */
  1739. #line 420 "BsParserFX.y"
  1740. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  1741. break;
  1742. case 65:
  1743. /* Line 868 of glr.c */
  1744. #line 424 "BsParserFX.y"
  1745. { ((*yyvalp).nodeOption).type = OT_Fail; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1746. break;
  1747. case 66:
  1748. /* Line 868 of glr.c */
  1749. #line 425 "BsParserFX.y"
  1750. { ((*yyvalp).nodeOption).type = OT_ZFail; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1751. break;
  1752. case 67:
  1753. /* Line 868 of glr.c */
  1754. #line 426 "BsParserFX.y"
  1755. { ((*yyvalp).nodeOption).type = OT_PassOp; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1756. break;
  1757. case 68:
  1758. /* Line 868 of glr.c */
  1759. #line 427 "BsParserFX.y"
  1760. { ((*yyvalp).nodeOption).type = OT_CompareFunc; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1761. break;
  1762. case 69:
  1763. /* Line 868 of glr.c */
  1764. #line 432 "BsParserFX.y"
  1765. { nodePop(parse_state); ((*yyvalp).nodePtr) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1766. break;
  1767. case 70:
  1768. /* Line 868 of glr.c */
  1769. #line 437 "BsParserFX.y"
  1770. {
  1771. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Target);
  1772. nodePush(parse_state, ((*yyvalp).nodePtr));
  1773. }
  1774. break;
  1775. case 72:
  1776. /* Line 868 of glr.c */
  1777. #line 445 "BsParserFX.y"
  1778. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  1779. break;
  1780. case 74:
  1781. /* Line 868 of glr.c */
  1782. #line 453 "BsParserFX.y"
  1783. { ((*yyvalp).nodeOption).type = OT_Index; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1784. break;
  1785. case 75:
  1786. /* Line 868 of glr.c */
  1787. #line 454 "BsParserFX.y"
  1788. { ((*yyvalp).nodeOption).type = OT_Blend; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1789. break;
  1790. case 76:
  1791. /* Line 868 of glr.c */
  1792. #line 455 "BsParserFX.y"
  1793. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Color; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1794. break;
  1795. case 77:
  1796. /* Line 868 of glr.c */
  1797. #line 456 "BsParserFX.y"
  1798. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Alpha; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1799. break;
  1800. case 78:
  1801. /* Line 868 of glr.c */
  1802. #line 457 "BsParserFX.y"
  1803. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Color; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1804. break;
  1805. case 79:
  1806. /* Line 868 of glr.c */
  1807. #line 458 "BsParserFX.y"
  1808. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Alpha; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1809. break;
  1810. case 80:
  1811. /* Line 868 of glr.c */
  1812. #line 459 "BsParserFX.y"
  1813. { ((*yyvalp).nodeOption).type = OT_WriteMask; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1814. break;
  1815. case 81:
  1816. /* Line 868 of glr.c */
  1817. #line 465 "BsParserFX.y"
  1818. {
  1819. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_BlendDef);
  1820. nodePush(parse_state, ((*yyvalp).nodePtr));
  1821. }
  1822. break;
  1823. case 82:
  1824. /* Line 868 of glr.c */
  1825. #line 473 "BsParserFX.y"
  1826. {
  1827. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_BlendDef);
  1828. nodePush(parse_state, ((*yyvalp).nodePtr));
  1829. }
  1830. break;
  1831. case 84:
  1832. /* Line 868 of glr.c */
  1833. #line 481 "BsParserFX.y"
  1834. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  1835. break;
  1836. case 85:
  1837. /* Line 868 of glr.c */
  1838. #line 486 "BsParserFX.y"
  1839. {
  1840. NodeOption src; src.type = OT_Source; src.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.intValue);
  1841. NodeOption dst; dst.type = OT_Dest; dst.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (5))].yystate.yysemantics.yysval.intValue);
  1842. NodeOption op; op.type = OT_Op; op.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((5) - (5))].yystate.yysemantics.yysval.intValue);
  1843. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &src);
  1844. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &dst);
  1845. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &op);
  1846. }
  1847. break;
  1848. case 86:
  1849. /* Line 868 of glr.c */
  1850. #line 498 "BsParserFX.y"
  1851. { ((*yyvalp).nodeOption).type = OT_Source; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1852. break;
  1853. case 87:
  1854. /* Line 868 of glr.c */
  1855. #line 499 "BsParserFX.y"
  1856. { ((*yyvalp).nodeOption).type = OT_Dest; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1857. break;
  1858. case 88:
  1859. /* Line 868 of glr.c */
  1860. #line 500 "BsParserFX.y"
  1861. { ((*yyvalp).nodeOption).type = OT_Op; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1862. break;
  1863. case 90:
  1864. /* Line 868 of glr.c */
  1865. #line 507 "BsParserFX.y"
  1866. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  1867. break;
  1868. case 91:
  1869. /* Line 868 of glr.c */
  1870. #line 511 "BsParserFX.y"
  1871. { ((*yyvalp).nodeOption).type = OT_AddrMode; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.nodePtr); }
  1872. break;
  1873. case 92:
  1874. /* Line 868 of glr.c */
  1875. #line 512 "BsParserFX.y"
  1876. { ((*yyvalp).nodeOption).type = OT_MinFilter; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1877. break;
  1878. case 93:
  1879. /* Line 868 of glr.c */
  1880. #line 513 "BsParserFX.y"
  1881. { ((*yyvalp).nodeOption).type = OT_MagFilter; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1882. break;
  1883. case 94:
  1884. /* Line 868 of glr.c */
  1885. #line 514 "BsParserFX.y"
  1886. { ((*yyvalp).nodeOption).type = OT_MipFilter; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1887. break;
  1888. case 95:
  1889. /* Line 868 of glr.c */
  1890. #line 515 "BsParserFX.y"
  1891. { ((*yyvalp).nodeOption).type = OT_MaxAniso; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1892. break;
  1893. case 96:
  1894. /* Line 868 of glr.c */
  1895. #line 516 "BsParserFX.y"
  1896. { ((*yyvalp).nodeOption).type = OT_MipBias; ((*yyvalp).nodeOption).value.floatValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.floatValue); }
  1897. break;
  1898. case 97:
  1899. /* Line 868 of glr.c */
  1900. #line 517 "BsParserFX.y"
  1901. { ((*yyvalp).nodeOption).type = OT_MipMin; ((*yyvalp).nodeOption).value.floatValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.floatValue); }
  1902. break;
  1903. case 98:
  1904. /* Line 868 of glr.c */
  1905. #line 518 "BsParserFX.y"
  1906. { ((*yyvalp).nodeOption).type = OT_MipMax; ((*yyvalp).nodeOption).value.floatValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.floatValue); }
  1907. break;
  1908. case 99:
  1909. /* Line 868 of glr.c */
  1910. #line 519 "BsParserFX.y"
  1911. { ((*yyvalp).nodeOption).type = OT_BorderColor; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.matrixValue))); }
  1912. break;
  1913. case 100:
  1914. /* Line 868 of glr.c */
  1915. #line 520 "BsParserFX.y"
  1916. { ((*yyvalp).nodeOption).type = OT_CompareFunc; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1917. break;
  1918. case 101:
  1919. /* Line 868 of glr.c */
  1920. #line 525 "BsParserFX.y"
  1921. { nodePop(parse_state); ((*yyvalp).nodePtr) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1922. break;
  1923. case 102:
  1924. /* Line 868 of glr.c */
  1925. #line 526 "BsParserFX.y"
  1926. { nodePop(parse_state); ((*yyvalp).nodePtr) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  1927. break;
  1928. case 103:
  1929. /* Line 868 of glr.c */
  1930. #line 531 "BsParserFX.y"
  1931. {
  1932. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_AddrMode);
  1933. nodePush(parse_state, ((*yyvalp).nodePtr));
  1934. }
  1935. break;
  1936. case 104:
  1937. /* Line 868 of glr.c */
  1938. #line 539 "BsParserFX.y"
  1939. {
  1940. NodeOption u; u.type = OT_U; u.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.intValue);
  1941. NodeOption v; v.type = OT_V; v.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (5))].yystate.yysemantics.yysval.intValue);
  1942. NodeOption w; w.type = OT_W; w.value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((5) - (5))].yystate.yysemantics.yysval.intValue);
  1943. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &u);
  1944. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &v);
  1945. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &w);
  1946. }
  1947. break;
  1948. case 106:
  1949. /* Line 868 of glr.c */
  1950. #line 552 "BsParserFX.y"
  1951. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  1952. break;
  1953. case 107:
  1954. /* Line 868 of glr.c */
  1955. #line 556 "BsParserFX.y"
  1956. { ((*yyvalp).nodeOption).type = OT_U; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1957. break;
  1958. case 108:
  1959. /* Line 868 of glr.c */
  1960. #line 557 "BsParserFX.y"
  1961. { ((*yyvalp).nodeOption).type = OT_V; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1962. break;
  1963. case 109:
  1964. /* Line 868 of glr.c */
  1965. #line 558 "BsParserFX.y"
  1966. { ((*yyvalp).nodeOption).type = OT_W; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue); }
  1967. break;
  1968. case 110:
  1969. /* Line 868 of glr.c */
  1970. #line 563 "BsParserFX.y"
  1971. { ((*yyvalp).matrixValue)[0] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (5))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[1] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.floatValue); }
  1972. break;
  1973. case 111:
  1974. /* Line 868 of glr.c */
  1975. #line 567 "BsParserFX.y"
  1976. { ((*yyvalp).matrixValue)[0] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (7))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[1] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (7))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[2] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (7))].yystate.yysemantics.yysval.floatValue); }
  1977. break;
  1978. case 112:
  1979. /* Line 868 of glr.c */
  1980. #line 571 "BsParserFX.y"
  1981. { ((*yyvalp).matrixValue)[0] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (9))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[1] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (9))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[2] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (9))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[3] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (9))].yystate.yysemantics.yysval.floatValue);}
  1982. break;
  1983. case 113:
  1984. /* Line 868 of glr.c */
  1985. #line 577 "BsParserFX.y"
  1986. {
  1987. ((*yyvalp).matrixValue)[0] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (13))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[1] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (13))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[2] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (13))].yystate.yysemantics.yysval.floatValue);
  1988. ((*yyvalp).matrixValue)[3] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (13))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[4] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((10) - (13))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[5] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((12) - (13))].yystate.yysemantics.yysval.floatValue);
  1989. }
  1990. break;
  1991. case 114:
  1992. /* Line 868 of glr.c */
  1993. #line 587 "BsParserFX.y"
  1994. {
  1995. ((*yyvalp).matrixValue)[0] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (17))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[1] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (17))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[2] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (17))].yystate.yysemantics.yysval.floatValue);
  1996. ((*yyvalp).matrixValue)[3] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (17))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[4] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((10) - (17))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[5] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((12) - (17))].yystate.yysemantics.yysval.floatValue);
  1997. ((*yyvalp).matrixValue)[6] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((14) - (17))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[7] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((16) - (17))].yystate.yysemantics.yysval.floatValue);
  1998. }
  1999. break;
  2000. case 115:
  2001. /* Line 868 of glr.c */
  2002. #line 598 "BsParserFX.y"
  2003. {
  2004. ((*yyvalp).matrixValue)[0] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (19))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[1] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (19))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[2] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (19))].yystate.yysemantics.yysval.floatValue);
  2005. ((*yyvalp).matrixValue)[3] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (19))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[4] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((10) - (19))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[5] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((12) - (19))].yystate.yysemantics.yysval.floatValue);
  2006. ((*yyvalp).matrixValue)[6] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((14) - (19))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[7] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((16) - (19))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[8] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((18) - (19))].yystate.yysemantics.yysval.floatValue);
  2007. }
  2008. break;
  2009. case 116:
  2010. /* Line 868 of glr.c */
  2011. #line 609 "BsParserFX.y"
  2012. {
  2013. ((*yyvalp).matrixValue)[0] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[1] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[2] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[3] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (25))].yystate.yysemantics.yysval.floatValue);
  2014. ((*yyvalp).matrixValue)[4] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((10) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[5] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((12) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[6] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((14) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[7] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((16) - (25))].yystate.yysemantics.yysval.floatValue);
  2015. ((*yyvalp).matrixValue)[8] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((18) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[9] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((20) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[10] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((22) - (25))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[11] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((24) - (25))].yystate.yysemantics.yysval.floatValue);
  2016. }
  2017. break;
  2018. case 117:
  2019. /* Line 868 of glr.c */
  2020. #line 621 "BsParserFX.y"
  2021. {
  2022. ((*yyvalp).matrixValue)[0] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[1] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[2] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[3] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (33))].yystate.yysemantics.yysval.floatValue);
  2023. ((*yyvalp).matrixValue)[4] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((10) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[5] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((12) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[6] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((14) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[7] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((16) - (33))].yystate.yysemantics.yysval.floatValue);
  2024. ((*yyvalp).matrixValue)[8] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((18) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[9] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((20) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[10] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((22) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[11] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((24) - (33))].yystate.yysemantics.yysval.floatValue);
  2025. ((*yyvalp).matrixValue)[12] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((26) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[13] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((28) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[14] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((30) - (33))].yystate.yysemantics.yysval.floatValue); ((*yyvalp).matrixValue)[15] = (((yyGLRStackItem const *)yyvsp)[YYFILL ((32) - (33))].yystate.yysemantics.yysval.floatValue);
  2026. }
  2027. break;
  2028. case 118:
  2029. /* Line 868 of glr.c */
  2030. #line 631 "BsParserFX.y"
  2031. { nodePop(parse_state); ((*yyvalp).nodePtr) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  2032. break;
  2033. case 119:
  2034. /* Line 868 of glr.c */
  2035. #line 636 "BsParserFX.y"
  2036. {
  2037. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Parameters);
  2038. nodePush(parse_state, ((*yyvalp).nodePtr));
  2039. }
  2040. break;
  2041. case 121:
  2042. /* Line 868 of glr.c */
  2043. #line 644 "BsParserFX.y"
  2044. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  2045. break;
  2046. case 122:
  2047. /* Line 868 of glr.c */
  2048. #line 648 "BsParserFX.y"
  2049. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2050. break;
  2051. case 123:
  2052. /* Line 868 of glr.c */
  2053. #line 649 "BsParserFX.y"
  2054. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2055. break;
  2056. case 124:
  2057. /* Line 868 of glr.c */
  2058. #line 650 "BsParserFX.y"
  2059. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2060. break;
  2061. case 125:
  2062. /* Line 868 of glr.c */
  2063. #line 651 "BsParserFX.y"
  2064. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2065. break;
  2066. case 126:
  2067. /* Line 868 of glr.c */
  2068. #line 652 "BsParserFX.y"
  2069. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2070. break;
  2071. case 127:
  2072. /* Line 868 of glr.c */
  2073. #line 653 "BsParserFX.y"
  2074. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2075. break;
  2076. case 128:
  2077. /* Line 868 of glr.c */
  2078. #line 654 "BsParserFX.y"
  2079. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2080. break;
  2081. case 129:
  2082. /* Line 868 of glr.c */
  2083. #line 655 "BsParserFX.y"
  2084. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2085. break;
  2086. case 130:
  2087. /* Line 868 of glr.c */
  2088. #line 656 "BsParserFX.y"
  2089. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2090. break;
  2091. case 131:
  2092. /* Line 868 of glr.c */
  2093. #line 657 "BsParserFX.y"
  2094. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2095. break;
  2096. case 132:
  2097. /* Line 868 of glr.c */
  2098. #line 658 "BsParserFX.y"
  2099. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2100. break;
  2101. case 133:
  2102. /* Line 868 of glr.c */
  2103. #line 659 "BsParserFX.y"
  2104. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2105. break;
  2106. case 134:
  2107. /* Line 868 of glr.c */
  2108. #line 660 "BsParserFX.y"
  2109. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2110. break;
  2111. case 135:
  2112. /* Line 868 of glr.c */
  2113. #line 661 "BsParserFX.y"
  2114. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.nodeOption)); nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.nodePtr); }
  2115. break;
  2116. case 136:
  2117. /* Line 868 of glr.c */
  2118. #line 662 "BsParserFX.y"
  2119. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.nodePtr); }
  2120. break;
  2121. case 137:
  2122. /* Line 868 of glr.c */
  2123. #line 664 "BsParserFX.y"
  2124. {
  2125. nodePop(parse_state);
  2126. NodeOption samplerState;
  2127. samplerState.type = OT_SamplerState;
  2128. samplerState.value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.nodePtr);
  2129. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &samplerState);
  2130. ((*yyvalp).nodeOption).type = OT_Parameter; ((*yyvalp).nodeOption).value.nodePtr = parse_state->topNode;
  2131. nodePop(parse_state);
  2132. }
  2133. break;
  2134. case 138:
  2135. /* Line 868 of glr.c */
  2136. #line 679 "BsParserFX.y"
  2137. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2138. break;
  2139. case 139:
  2140. /* Line 868 of glr.c */
  2141. #line 683 "BsParserFX.y"
  2142. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2143. break;
  2144. case 140:
  2145. /* Line 868 of glr.c */
  2146. #line 687 "BsParserFX.y"
  2147. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2148. break;
  2149. case 141:
  2150. /* Line 868 of glr.c */
  2151. #line 691 "BsParserFX.y"
  2152. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2153. break;
  2154. case 142:
  2155. /* Line 868 of glr.c */
  2156. #line 695 "BsParserFX.y"
  2157. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2158. break;
  2159. case 143:
  2160. /* Line 868 of glr.c */
  2161. #line 699 "BsParserFX.y"
  2162. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2163. break;
  2164. case 144:
  2165. /* Line 868 of glr.c */
  2166. #line 703 "BsParserFX.y"
  2167. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2168. break;
  2169. case 145:
  2170. /* Line 868 of glr.c */
  2171. #line 707 "BsParserFX.y"
  2172. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2173. break;
  2174. case 146:
  2175. /* Line 868 of glr.c */
  2176. #line 711 "BsParserFX.y"
  2177. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2178. break;
  2179. case 147:
  2180. /* Line 868 of glr.c */
  2181. #line 715 "BsParserFX.y"
  2182. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2183. break;
  2184. case 148:
  2185. /* Line 868 of glr.c */
  2186. #line 719 "BsParserFX.y"
  2187. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2188. break;
  2189. case 149:
  2190. /* Line 868 of glr.c */
  2191. #line 723 "BsParserFX.y"
  2192. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2193. break;
  2194. case 150:
  2195. /* Line 868 of glr.c */
  2196. #line 727 "BsParserFX.y"
  2197. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2198. break;
  2199. case 151:
  2200. /* Line 868 of glr.c */
  2201. #line 731 "BsParserFX.y"
  2202. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2203. break;
  2204. case 152:
  2205. /* Line 868 of glr.c */
  2206. #line 735 "BsParserFX.y"
  2207. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2208. break;
  2209. case 153:
  2210. /* Line 868 of glr.c */
  2211. #line 736 "BsParserFX.y"
  2212. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2213. break;
  2214. case 154:
  2215. /* Line 868 of glr.c */
  2216. #line 737 "BsParserFX.y"
  2217. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2218. break;
  2219. case 155:
  2220. /* Line 868 of glr.c */
  2221. #line 738 "BsParserFX.y"
  2222. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2223. break;
  2224. case 156:
  2225. /* Line 868 of glr.c */
  2226. #line 739 "BsParserFX.y"
  2227. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2228. break;
  2229. case 157:
  2230. /* Line 868 of glr.c */
  2231. #line 743 "BsParserFX.y"
  2232. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2233. break;
  2234. case 158:
  2235. /* Line 868 of glr.c */
  2236. #line 744 "BsParserFX.y"
  2237. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2238. break;
  2239. case 159:
  2240. /* Line 868 of glr.c */
  2241. #line 745 "BsParserFX.y"
  2242. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2243. break;
  2244. case 160:
  2245. /* Line 868 of glr.c */
  2246. #line 746 "BsParserFX.y"
  2247. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2248. break;
  2249. case 161:
  2250. /* Line 868 of glr.c */
  2251. #line 747 "BsParserFX.y"
  2252. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2253. break;
  2254. case 162:
  2255. /* Line 868 of glr.c */
  2256. #line 748 "BsParserFX.y"
  2257. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2258. break;
  2259. case 163:
  2260. /* Line 868 of glr.c */
  2261. #line 749 "BsParserFX.y"
  2262. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2263. break;
  2264. case 164:
  2265. /* Line 868 of glr.c */
  2266. #line 750 "BsParserFX.y"
  2267. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2268. break;
  2269. case 165:
  2270. /* Line 868 of glr.c */
  2271. #line 751 "BsParserFX.y"
  2272. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2273. break;
  2274. case 166:
  2275. /* Line 868 of glr.c */
  2276. #line 752 "BsParserFX.y"
  2277. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2278. break;
  2279. case 167:
  2280. /* Line 868 of glr.c */
  2281. #line 753 "BsParserFX.y"
  2282. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2283. break;
  2284. case 168:
  2285. /* Line 868 of glr.c */
  2286. #line 754 "BsParserFX.y"
  2287. { ADD_PARAMETER(((*yyvalp).nodePtr), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.intValue), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue)); }
  2288. break;
  2289. case 169:
  2290. /* Line 868 of glr.c */
  2291. #line 759 "BsParserFX.y"
  2292. {
  2293. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_SamplerState);
  2294. nodePush(parse_state, ((*yyvalp).nodePtr));
  2295. }
  2296. break;
  2297. case 170:
  2298. /* Line 868 of glr.c */
  2299. #line 766 "BsParserFX.y"
  2300. { ((*yyvalp).nodeOption).type = OT_None; }
  2301. break;
  2302. case 171:
  2303. /* Line 868 of glr.c */
  2304. #line 767 "BsParserFX.y"
  2305. { ((*yyvalp).nodeOption).type = OT_ParamValue; ((*yyvalp).nodeOption).value.floatValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.floatValue); }
  2306. break;
  2307. case 172:
  2308. /* Line 868 of glr.c */
  2309. #line 771 "BsParserFX.y"
  2310. { ((*yyvalp).nodeOption).type = OT_None; }
  2311. break;
  2312. case 173:
  2313. /* Line 868 of glr.c */
  2314. #line 772 "BsParserFX.y"
  2315. { ((*yyvalp).nodeOption).type = OT_ParamValue; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue))); }
  2316. break;
  2317. case 174:
  2318. /* Line 868 of glr.c */
  2319. #line 776 "BsParserFX.y"
  2320. { ((*yyvalp).nodeOption).type = OT_None; }
  2321. break;
  2322. case 175:
  2323. /* Line 868 of glr.c */
  2324. #line 777 "BsParserFX.y"
  2325. { ((*yyvalp).nodeOption).type = OT_ParamValue; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue))); }
  2326. break;
  2327. case 176:
  2328. /* Line 868 of glr.c */
  2329. #line 781 "BsParserFX.y"
  2330. { ((*yyvalp).nodeOption).type = OT_None; }
  2331. break;
  2332. case 177:
  2333. /* Line 868 of glr.c */
  2334. #line 782 "BsParserFX.y"
  2335. { ((*yyvalp).nodeOption).type = OT_ParamValue; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue))); }
  2336. break;
  2337. case 178:
  2338. /* Line 868 of glr.c */
  2339. #line 786 "BsParserFX.y"
  2340. { ((*yyvalp).nodeOption).type = OT_None; }
  2341. break;
  2342. case 179:
  2343. /* Line 868 of glr.c */
  2344. #line 787 "BsParserFX.y"
  2345. { ((*yyvalp).nodeOption).type = OT_ParamValue; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue))); }
  2346. break;
  2347. case 180:
  2348. /* Line 868 of glr.c */
  2349. #line 791 "BsParserFX.y"
  2350. { ((*yyvalp).nodeOption).type = OT_None; }
  2351. break;
  2352. case 181:
  2353. /* Line 868 of glr.c */
  2354. #line 792 "BsParserFX.y"
  2355. { ((*yyvalp).nodeOption).type = OT_ParamValue; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue))); }
  2356. break;
  2357. case 182:
  2358. /* Line 868 of glr.c */
  2359. #line 796 "BsParserFX.y"
  2360. { ((*yyvalp).nodeOption).type = OT_None; }
  2361. break;
  2362. case 183:
  2363. /* Line 868 of glr.c */
  2364. #line 797 "BsParserFX.y"
  2365. { ((*yyvalp).nodeOption).type = OT_ParamValue; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue))); }
  2366. break;
  2367. case 184:
  2368. /* Line 868 of glr.c */
  2369. #line 801 "BsParserFX.y"
  2370. { ((*yyvalp).nodeOption).type = OT_None; }
  2371. break;
  2372. case 185:
  2373. /* Line 868 of glr.c */
  2374. #line 802 "BsParserFX.y"
  2375. { ((*yyvalp).nodeOption).type = OT_ParamValue; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue))); }
  2376. break;
  2377. case 186:
  2378. /* Line 868 of glr.c */
  2379. #line 806 "BsParserFX.y"
  2380. { ((*yyvalp).nodeOption).type = OT_None; }
  2381. break;
  2382. case 187:
  2383. /* Line 868 of glr.c */
  2384. #line 807 "BsParserFX.y"
  2385. { ((*yyvalp).nodeOption).type = OT_ParamValue; memcpy(((*yyvalp).nodeOption).value.matrixValue, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue), sizeof((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.matrixValue))); }
  2386. break;
  2387. case 188:
  2388. /* Line 868 of glr.c */
  2389. #line 811 "BsParserFX.y"
  2390. { ((*yyvalp).nodeOption).type = OT_None; }
  2391. break;
  2392. case 189:
  2393. /* Line 868 of glr.c */
  2394. #line 812 "BsParserFX.y"
  2395. { }
  2396. break;
  2397. case 190:
  2398. /* Line 868 of glr.c */
  2399. #line 817 "BsParserFX.y"
  2400. { nodePop(parse_state); ((*yyvalp).nodePtr) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.nodePtr); }
  2401. break;
  2402. case 191:
  2403. /* Line 868 of glr.c */
  2404. #line 822 "BsParserFX.y"
  2405. {
  2406. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Blocks);
  2407. nodePush(parse_state, ((*yyvalp).nodePtr));
  2408. }
  2409. break;
  2410. case 193:
  2411. /* Line 868 of glr.c */
  2412. #line 830 "BsParserFX.y"
  2413. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  2414. break;
  2415. case 194:
  2416. /* Line 868 of glr.c */
  2417. #line 834 "BsParserFX.y"
  2418. { nodePop(parse_state); ((*yyvalp).nodeOption).type = OT_Block; ((*yyvalp).nodeOption).value.nodePtr = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.nodePtr); }
  2419. break;
  2420. case 195:
  2421. /* Line 868 of glr.c */
  2422. #line 839 "BsParserFX.y"
  2423. {
  2424. ((*yyvalp).nodePtr) = nodeCreate(parse_state->memContext, NT_Block);
  2425. nodePush(parse_state, ((*yyvalp).nodePtr));
  2426. NodeOption blockName;
  2427. blockName.type = OT_Identifier;
  2428. blockName.value.strValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.strValue);
  2429. nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &blockName);
  2430. }
  2431. break;
  2432. case 197:
  2433. /* Line 868 of glr.c */
  2434. #line 854 "BsParserFX.y"
  2435. { nodeOptionsAdd(parse_state->memContext, parse_state->topNode->options, &(((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.nodeOption)); }
  2436. break;
  2437. case 198:
  2438. /* Line 868 of glr.c */
  2439. #line 858 "BsParserFX.y"
  2440. { ((*yyvalp).nodeOption).type = OT_Alias; ((*yyvalp).nodeOption).value.strValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.strValue); }
  2441. break;
  2442. case 199:
  2443. /* Line 868 of glr.c */
  2444. #line 859 "BsParserFX.y"
  2445. { ((*yyvalp).nodeOption).type = OT_Auto; ((*yyvalp).nodeOption).value.strValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.strValue); }
  2446. break;
  2447. case 200:
  2448. /* Line 868 of glr.c */
  2449. #line 860 "BsParserFX.y"
  2450. { ((*yyvalp).nodeOption).type = OT_Shared; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.intValue); }
  2451. break;
  2452. case 201:
  2453. /* Line 868 of glr.c */
  2454. #line 861 "BsParserFX.y"
  2455. { ((*yyvalp).nodeOption).type = OT_Usage; ((*yyvalp).nodeOption).value.intValue = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.intValue); }
  2456. break;
  2457. /* Line 868 of glr.c */
  2458. #line 2792 "BsParserFX.c"
  2459. default: break;
  2460. }
  2461. return yyok;
  2462. # undef yyerrok
  2463. # undef YYABORT
  2464. # undef YYACCEPT
  2465. # undef YYERROR
  2466. # undef YYBACKUP
  2467. # undef yyclearin
  2468. # undef YYRECOVERING
  2469. }
  2470. /*ARGSUSED*/ static void
  2471. yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
  2472. {
  2473. YYUSE (yy0);
  2474. YYUSE (yy1);
  2475. switch (yyn)
  2476. {
  2477. default: break;
  2478. }
  2479. }
  2480. /* Bison grammar-table manipulation. */
  2481. /*-----------------------------------------------.
  2482. | Release the memory associated to this symbol. |
  2483. `-----------------------------------------------*/
  2484. /*ARGSUSED*/
  2485. static void
  2486. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, ParseState* parse_state, yyscan_t scanner)
  2487. {
  2488. YYUSE (yyvaluep);
  2489. YYUSE (yylocationp);
  2490. YYUSE (parse_state);
  2491. YYUSE (scanner);
  2492. if (!yymsg)
  2493. yymsg = "Deleting";
  2494. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  2495. switch (yytype)
  2496. {
  2497. default:
  2498. break;
  2499. }
  2500. }
  2501. /** Number of symbols composing the right hand side of rule #RULE. */
  2502. static inline int
  2503. yyrhsLength (yyRuleNum yyrule)
  2504. {
  2505. return yyr2[yyrule];
  2506. }
  2507. static void
  2508. yydestroyGLRState (char const *yymsg, yyGLRState *yys, ParseState* parse_state, yyscan_t scanner)
  2509. {
  2510. if (yys->yyresolved)
  2511. yydestruct (yymsg, yystos[yys->yylrState],
  2512. &yys->yysemantics.yysval, &yys->yyloc, parse_state, scanner);
  2513. else
  2514. {
  2515. #if YYDEBUG
  2516. if (yydebug)
  2517. {
  2518. if (yys->yysemantics.yyfirstVal)
  2519. YYFPRINTF (stderr, "%s unresolved ", yymsg);
  2520. else
  2521. YYFPRINTF (stderr, "%s incomplete ", yymsg);
  2522. yy_symbol_print (stderr, yystos[yys->yylrState],
  2523. YY_NULL, &yys->yyloc, parse_state, scanner);
  2524. YYFPRINTF (stderr, "\n");
  2525. }
  2526. #endif
  2527. if (yys->yysemantics.yyfirstVal)
  2528. {
  2529. yySemanticOption *yyoption = yys->yysemantics.yyfirstVal;
  2530. yyGLRState *yyrh;
  2531. int yyn;
  2532. for (yyrh = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule);
  2533. yyn > 0;
  2534. yyrh = yyrh->yypred, yyn -= 1)
  2535. yydestroyGLRState (yymsg, yyrh, parse_state, scanner);
  2536. }
  2537. }
  2538. }
  2539. /** Left-hand-side symbol for rule #RULE. */
  2540. static inline yySymbol
  2541. yylhsNonterm (yyRuleNum yyrule)
  2542. {
  2543. return yyr1[yyrule];
  2544. }
  2545. #define yypact_value_is_default(Yystate) \
  2546. (!!((Yystate) == (-335)))
  2547. /** True iff LR state STATE has only a default reduction (regardless
  2548. * of token). */
  2549. static inline yybool
  2550. yyisDefaultedState (yyStateNum yystate)
  2551. {
  2552. return yypact_value_is_default (yypact[yystate]);
  2553. }
  2554. /** The default reduction for STATE, assuming it has one. */
  2555. static inline yyRuleNum
  2556. yydefaultAction (yyStateNum yystate)
  2557. {
  2558. return yydefact[yystate];
  2559. }
  2560. #define yytable_value_is_error(Yytable_value) \
  2561. YYID (0)
  2562. /** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
  2563. * Result R means
  2564. * R < 0: Reduce on rule -R.
  2565. * R = 0: Error.
  2566. * R > 0: Shift to state R.
  2567. * Set *CONFLICTS to a pointer into yyconfl to 0-terminated list of
  2568. * conflicting reductions.
  2569. */
  2570. static inline void
  2571. yygetLRActions (yyStateNum yystate, int yytoken,
  2572. int* yyaction, const short int** yyconflicts)
  2573. {
  2574. int yyindex = yypact[yystate] + yytoken;
  2575. if (yypact_value_is_default (yypact[yystate])
  2576. || yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
  2577. {
  2578. *yyaction = -yydefact[yystate];
  2579. *yyconflicts = yyconfl;
  2580. }
  2581. else if (! yytable_value_is_error (yytable[yyindex]))
  2582. {
  2583. *yyaction = yytable[yyindex];
  2584. *yyconflicts = yyconfl + yyconflp[yyindex];
  2585. }
  2586. else
  2587. {
  2588. *yyaction = 0;
  2589. *yyconflicts = yyconfl + yyconflp[yyindex];
  2590. }
  2591. }
  2592. static inline yyStateNum
  2593. yyLRgotoState (yyStateNum yystate, yySymbol yylhs)
  2594. {
  2595. int yyr;
  2596. yyr = yypgoto[yylhs - YYNTOKENS] + yystate;
  2597. if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate)
  2598. return yytable[yyr];
  2599. else
  2600. return yydefgoto[yylhs - YYNTOKENS];
  2601. }
  2602. static inline yybool
  2603. yyisShiftAction (int yyaction)
  2604. {
  2605. return 0 < yyaction;
  2606. }
  2607. static inline yybool
  2608. yyisErrorAction (int yyaction)
  2609. {
  2610. return yyaction == 0;
  2611. }
  2612. /* GLRStates */
  2613. /** Return a fresh GLRStackItem. Callers should call
  2614. * YY_RESERVE_GLRSTACK afterwards to make sure there is sufficient
  2615. * headroom. */
  2616. static inline yyGLRStackItem*
  2617. yynewGLRStackItem (yyGLRStack* yystackp, yybool yyisState)
  2618. {
  2619. yyGLRStackItem* yynewItem = yystackp->yynextFree;
  2620. yystackp->yyspaceLeft -= 1;
  2621. yystackp->yynextFree += 1;
  2622. yynewItem->yystate.yyisState = yyisState;
  2623. return yynewItem;
  2624. }
  2625. /** Add a new semantic action that will execute the action for rule
  2626. * RULENUM on the semantic values in RHS to the list of
  2627. * alternative actions for STATE. Assumes that RHS comes from
  2628. * stack #K of *STACKP. */
  2629. static void
  2630. yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate,
  2631. yyGLRState* rhs, yyRuleNum yyrule)
  2632. {
  2633. yySemanticOption* yynewOption =
  2634. &yynewGLRStackItem (yystackp, yyfalse)->yyoption;
  2635. yynewOption->yystate = rhs;
  2636. yynewOption->yyrule = yyrule;
  2637. if (yystackp->yytops.yylookaheadNeeds[yyk])
  2638. {
  2639. yynewOption->yyrawchar = yychar;
  2640. yynewOption->yyval = yylval;
  2641. yynewOption->yyloc = yylloc;
  2642. }
  2643. else
  2644. yynewOption->yyrawchar = YYEMPTY;
  2645. yynewOption->yynext = yystate->yysemantics.yyfirstVal;
  2646. yystate->yysemantics.yyfirstVal = yynewOption;
  2647. YY_RESERVE_GLRSTACK (yystackp);
  2648. }
  2649. /* GLRStacks */
  2650. /** Initialize SET to a singleton set containing an empty stack. */
  2651. static yybool
  2652. yyinitStateSet (yyGLRStateSet* yyset)
  2653. {
  2654. yyset->yysize = 1;
  2655. yyset->yycapacity = 16;
  2656. yyset->yystates = (yyGLRState**) YYMALLOC (16 * sizeof yyset->yystates[0]);
  2657. if (! yyset->yystates)
  2658. return yyfalse;
  2659. yyset->yystates[0] = YY_NULL;
  2660. yyset->yylookaheadNeeds =
  2661. (yybool*) YYMALLOC (16 * sizeof yyset->yylookaheadNeeds[0]);
  2662. if (! yyset->yylookaheadNeeds)
  2663. {
  2664. YYFREE (yyset->yystates);
  2665. return yyfalse;
  2666. }
  2667. return yytrue;
  2668. }
  2669. static void yyfreeStateSet (yyGLRStateSet* yyset)
  2670. {
  2671. YYFREE (yyset->yystates);
  2672. YYFREE (yyset->yylookaheadNeeds);
  2673. }
  2674. /** Initialize STACK to a single empty stack, with total maximum
  2675. * capacity for all stacks of SIZE. */
  2676. static yybool
  2677. yyinitGLRStack (yyGLRStack* yystackp, size_t yysize)
  2678. {
  2679. yystackp->yyerrState = 0;
  2680. yynerrs = 0;
  2681. yystackp->yyspaceLeft = yysize;
  2682. yystackp->yyitems =
  2683. (yyGLRStackItem*) YYMALLOC (yysize * sizeof yystackp->yynextFree[0]);
  2684. if (!yystackp->yyitems)
  2685. return yyfalse;
  2686. yystackp->yynextFree = yystackp->yyitems;
  2687. yystackp->yysplitPoint = YY_NULL;
  2688. yystackp->yylastDeleted = YY_NULL;
  2689. return yyinitStateSet (&yystackp->yytops);
  2690. }
  2691. #if YYSTACKEXPANDABLE
  2692. # define YYRELOC(YYFROMITEMS,YYTOITEMS,YYX,YYTYPE) \
  2693. &((YYTOITEMS) - ((YYFROMITEMS) - (yyGLRStackItem*) (YYX)))->YYTYPE
  2694. /** If STACK is expandable, extend it. WARNING: Pointers into the
  2695. stack from outside should be considered invalid after this call.
  2696. We always expand when there are 1 or fewer items left AFTER an
  2697. allocation, so that we can avoid having external pointers exist
  2698. across an allocation. */
  2699. static void
  2700. yyexpandGLRStack (yyGLRStack* yystackp)
  2701. {
  2702. yyGLRStackItem* yynewItems;
  2703. yyGLRStackItem* yyp0, *yyp1;
  2704. size_t yynewSize;
  2705. size_t yyn;
  2706. size_t yysize = yystackp->yynextFree - yystackp->yyitems;
  2707. if (YYMAXDEPTH - YYHEADROOM < yysize)
  2708. yyMemoryExhausted (yystackp);
  2709. yynewSize = 2*yysize;
  2710. if (YYMAXDEPTH < yynewSize)
  2711. yynewSize = YYMAXDEPTH;
  2712. yynewItems = (yyGLRStackItem*) YYMALLOC (yynewSize * sizeof yynewItems[0]);
  2713. if (! yynewItems)
  2714. yyMemoryExhausted (yystackp);
  2715. for (yyp0 = yystackp->yyitems, yyp1 = yynewItems, yyn = yysize;
  2716. 0 < yyn;
  2717. yyn -= 1, yyp0 += 1, yyp1 += 1)
  2718. {
  2719. *yyp1 = *yyp0;
  2720. if (*(yybool *) yyp0)
  2721. {
  2722. yyGLRState* yys0 = &yyp0->yystate;
  2723. yyGLRState* yys1 = &yyp1->yystate;
  2724. if (yys0->yypred != YY_NULL)
  2725. yys1->yypred =
  2726. YYRELOC (yyp0, yyp1, yys0->yypred, yystate);
  2727. if (! yys0->yyresolved && yys0->yysemantics.yyfirstVal != YY_NULL)
  2728. yys1->yysemantics.yyfirstVal =
  2729. YYRELOC (yyp0, yyp1, yys0->yysemantics.yyfirstVal, yyoption);
  2730. }
  2731. else
  2732. {
  2733. yySemanticOption* yyv0 = &yyp0->yyoption;
  2734. yySemanticOption* yyv1 = &yyp1->yyoption;
  2735. if (yyv0->yystate != YY_NULL)
  2736. yyv1->yystate = YYRELOC (yyp0, yyp1, yyv0->yystate, yystate);
  2737. if (yyv0->yynext != YY_NULL)
  2738. yyv1->yynext = YYRELOC (yyp0, yyp1, yyv0->yynext, yyoption);
  2739. }
  2740. }
  2741. if (yystackp->yysplitPoint != YY_NULL)
  2742. yystackp->yysplitPoint = YYRELOC (yystackp->yyitems, yynewItems,
  2743. yystackp->yysplitPoint, yystate);
  2744. for (yyn = 0; yyn < yystackp->yytops.yysize; yyn += 1)
  2745. if (yystackp->yytops.yystates[yyn] != YY_NULL)
  2746. yystackp->yytops.yystates[yyn] =
  2747. YYRELOC (yystackp->yyitems, yynewItems,
  2748. yystackp->yytops.yystates[yyn], yystate);
  2749. YYFREE (yystackp->yyitems);
  2750. yystackp->yyitems = yynewItems;
  2751. yystackp->yynextFree = yynewItems + yysize;
  2752. yystackp->yyspaceLeft = yynewSize - yysize;
  2753. }
  2754. #endif
  2755. static void
  2756. yyfreeGLRStack (yyGLRStack* yystackp)
  2757. {
  2758. YYFREE (yystackp->yyitems);
  2759. yyfreeStateSet (&yystackp->yytops);
  2760. }
  2761. /** Assuming that S is a GLRState somewhere on STACK, update the
  2762. * splitpoint of STACK, if needed, so that it is at least as deep as
  2763. * S. */
  2764. static inline void
  2765. yyupdateSplit (yyGLRStack* yystackp, yyGLRState* yys)
  2766. {
  2767. if (yystackp->yysplitPoint != YY_NULL && yystackp->yysplitPoint > yys)
  2768. yystackp->yysplitPoint = yys;
  2769. }
  2770. /** Invalidate stack #K in STACK. */
  2771. static inline void
  2772. yymarkStackDeleted (yyGLRStack* yystackp, size_t yyk)
  2773. {
  2774. if (yystackp->yytops.yystates[yyk] != YY_NULL)
  2775. yystackp->yylastDeleted = yystackp->yytops.yystates[yyk];
  2776. yystackp->yytops.yystates[yyk] = YY_NULL;
  2777. }
  2778. /** Undelete the last stack that was marked as deleted. Can only be
  2779. done once after a deletion, and only when all other stacks have
  2780. been deleted. */
  2781. static void
  2782. yyundeleteLastStack (yyGLRStack* yystackp)
  2783. {
  2784. if (yystackp->yylastDeleted == YY_NULL || yystackp->yytops.yysize != 0)
  2785. return;
  2786. yystackp->yytops.yystates[0] = yystackp->yylastDeleted;
  2787. yystackp->yytops.yysize = 1;
  2788. YYDPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n"));
  2789. yystackp->yylastDeleted = YY_NULL;
  2790. }
  2791. static inline void
  2792. yyremoveDeletes (yyGLRStack* yystackp)
  2793. {
  2794. size_t yyi, yyj;
  2795. yyi = yyj = 0;
  2796. while (yyj < yystackp->yytops.yysize)
  2797. {
  2798. if (yystackp->yytops.yystates[yyi] == YY_NULL)
  2799. {
  2800. if (yyi == yyj)
  2801. {
  2802. YYDPRINTF ((stderr, "Removing dead stacks.\n"));
  2803. }
  2804. yystackp->yytops.yysize -= 1;
  2805. }
  2806. else
  2807. {
  2808. yystackp->yytops.yystates[yyj] = yystackp->yytops.yystates[yyi];
  2809. /* In the current implementation, it's unnecessary to copy
  2810. yystackp->yytops.yylookaheadNeeds[yyi] since, after
  2811. yyremoveDeletes returns, the parser immediately either enters
  2812. deterministic operation or shifts a token. However, it doesn't
  2813. hurt, and the code might evolve to need it. */
  2814. yystackp->yytops.yylookaheadNeeds[yyj] =
  2815. yystackp->yytops.yylookaheadNeeds[yyi];
  2816. if (yyj != yyi)
  2817. {
  2818. YYDPRINTF ((stderr, "Rename stack %lu -> %lu.\n",
  2819. (unsigned long int) yyi, (unsigned long int) yyj));
  2820. }
  2821. yyj += 1;
  2822. }
  2823. yyi += 1;
  2824. }
  2825. }
  2826. /** Shift to a new state on stack #K of STACK, corresponding to LR state
  2827. * LRSTATE, at input position POSN, with (resolved) semantic value SVAL. */
  2828. static inline void
  2829. yyglrShift (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
  2830. size_t yyposn,
  2831. YYSTYPE* yyvalp, YYLTYPE* yylocp)
  2832. {
  2833. yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
  2834. yynewState->yylrState = yylrState;
  2835. yynewState->yyposn = yyposn;
  2836. yynewState->yyresolved = yytrue;
  2837. yynewState->yypred = yystackp->yytops.yystates[yyk];
  2838. yynewState->yysemantics.yysval = *yyvalp;
  2839. yynewState->yyloc = *yylocp;
  2840. yystackp->yytops.yystates[yyk] = yynewState;
  2841. YY_RESERVE_GLRSTACK (yystackp);
  2842. }
  2843. /** Shift stack #K of YYSTACK, to a new state corresponding to LR
  2844. * state YYLRSTATE, at input position YYPOSN, with the (unresolved)
  2845. * semantic value of YYRHS under the action for YYRULE. */
  2846. static inline void
  2847. yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
  2848. size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule)
  2849. {
  2850. yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
  2851. yynewState->yylrState = yylrState;
  2852. yynewState->yyposn = yyposn;
  2853. yynewState->yyresolved = yyfalse;
  2854. yynewState->yypred = yystackp->yytops.yystates[yyk];
  2855. yynewState->yysemantics.yyfirstVal = YY_NULL;
  2856. yystackp->yytops.yystates[yyk] = yynewState;
  2857. /* Invokes YY_RESERVE_GLRSTACK. */
  2858. yyaddDeferredAction (yystackp, yyk, yynewState, rhs, yyrule);
  2859. }
  2860. /** Pop the symbols consumed by reduction #RULE from the top of stack
  2861. * #K of STACK, and perform the appropriate semantic action on their
  2862. * semantic values. Assumes that all ambiguities in semantic values
  2863. * have been previously resolved. Set *VALP to the resulting value,
  2864. * and *LOCP to the computed location (if any). Return value is as
  2865. * for userAction. */
  2866. static inline YYRESULTTAG
  2867. yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
  2868. YYSTYPE* yyvalp, YYLTYPE *yylocp, ParseState* parse_state, yyscan_t scanner)
  2869. {
  2870. int yynrhs = yyrhsLength (yyrule);
  2871. if (yystackp->yysplitPoint == YY_NULL)
  2872. {
  2873. /* Standard special case: single stack. */
  2874. yyGLRStackItem* rhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk];
  2875. YYASSERT (yyk == 0);
  2876. yystackp->yynextFree -= yynrhs;
  2877. yystackp->yyspaceLeft += yynrhs;
  2878. yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate;
  2879. return yyuserAction (yyrule, yynrhs, rhs, yystackp,
  2880. yyvalp, yylocp, parse_state, scanner);
  2881. }
  2882. else
  2883. {
  2884. /* At present, doAction is never called in nondeterministic
  2885. * mode, so this branch is never taken. It is here in
  2886. * anticipation of a future feature that will allow immediate
  2887. * evaluation of selected actions in nondeterministic mode. */
  2888. int yyi;
  2889. yyGLRState* yys;
  2890. yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
  2891. yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred
  2892. = yystackp->yytops.yystates[yyk];
  2893. if (yynrhs == 0)
  2894. /* Set default location. */
  2895. yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yys->yyloc;
  2896. for (yyi = 0; yyi < yynrhs; yyi += 1)
  2897. {
  2898. yys = yys->yypred;
  2899. YYASSERT (yys);
  2900. }
  2901. yyupdateSplit (yystackp, yys);
  2902. yystackp->yytops.yystates[yyk] = yys;
  2903. return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
  2904. yystackp, yyvalp, yylocp, parse_state, scanner);
  2905. }
  2906. }
  2907. #if !YYDEBUG
  2908. # define YY_REDUCE_PRINT(Args)
  2909. #else
  2910. # define YY_REDUCE_PRINT(Args) \
  2911. do { \
  2912. if (yydebug) \
  2913. yy_reduce_print Args; \
  2914. } while (YYID (0))
  2915. /*----------------------------------------------------------.
  2916. | Report that the RULE is going to be reduced on stack #K. |
  2917. `----------------------------------------------------------*/
  2918. /*ARGSUSED*/ static inline void
  2919. yy_reduce_print (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
  2920. YYSTYPE* yyvalp, YYLTYPE *yylocp, ParseState* parse_state, yyscan_t scanner)
  2921. {
  2922. int yynrhs = yyrhsLength (yyrule);
  2923. yybool yynormal __attribute__ ((__unused__)) =
  2924. (yystackp->yysplitPoint == YY_NULL);
  2925. yyGLRStackItem* yyvsp = (yyGLRStackItem*) yystackp->yytops.yystates[yyk];
  2926. int yylow = 1;
  2927. int yyi;
  2928. YYUSE (yyvalp);
  2929. YYUSE (yylocp);
  2930. YYUSE (parse_state);
  2931. YYUSE (scanner);
  2932. YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n",
  2933. (unsigned long int) yyk, yyrule - 1,
  2934. (unsigned long int) yyrline[yyrule]);
  2935. /* The symbols being reduced. */
  2936. for (yyi = 0; yyi < yynrhs; yyi++)
  2937. {
  2938. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  2939. yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
  2940. &(((yyGLRStackItem const *)yyvsp)[YYFILL ((yyi + 1) - (yynrhs))].yystate.yysemantics.yysval)
  2941. , &(((yyGLRStackItem const *)yyvsp)[YYFILL ((yyi + 1) - (yynrhs))].yystate.yyloc) , parse_state, scanner);
  2942. YYFPRINTF (stderr, "\n");
  2943. }
  2944. }
  2945. #endif
  2946. /** Pop items off stack #K of STACK according to grammar rule RULE,
  2947. * and push back on the resulting nonterminal symbol. Perform the
  2948. * semantic action associated with RULE and store its value with the
  2949. * newly pushed state, if FORCEEVAL or if STACK is currently
  2950. * unambiguous. Otherwise, store the deferred semantic action with
  2951. * the new state. If the new state would have an identical input
  2952. * position, LR state, and predecessor to an existing state on the stack,
  2953. * it is identified with that existing state, eliminating stack #K from
  2954. * the STACK. In this case, the (necessarily deferred) semantic value is
  2955. * added to the options for the existing state's semantic value.
  2956. */
  2957. static inline YYRESULTTAG
  2958. yyglrReduce (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
  2959. yybool yyforceEval, ParseState* parse_state, yyscan_t scanner)
  2960. {
  2961. size_t yyposn = yystackp->yytops.yystates[yyk]->yyposn;
  2962. if (yyforceEval || yystackp->yysplitPoint == YY_NULL)
  2963. {
  2964. YYSTYPE yysval;
  2965. YYLTYPE yyloc;
  2966. YY_REDUCE_PRINT ((yystackp, yyk, yyrule, &yysval, &yyloc, parse_state, scanner));
  2967. YYCHK (yydoAction (yystackp, yyk, yyrule, &yysval, &yyloc, parse_state, scanner));
  2968. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc);
  2969. yyglrShift (yystackp, yyk,
  2970. yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState,
  2971. yylhsNonterm (yyrule)),
  2972. yyposn, &yysval, &yyloc);
  2973. }
  2974. else
  2975. {
  2976. size_t yyi;
  2977. int yyn;
  2978. yyGLRState* yys, *yys0 = yystackp->yytops.yystates[yyk];
  2979. yyStateNum yynewLRState;
  2980. for (yys = yystackp->yytops.yystates[yyk], yyn = yyrhsLength (yyrule);
  2981. 0 < yyn; yyn -= 1)
  2982. {
  2983. yys = yys->yypred;
  2984. YYASSERT (yys);
  2985. }
  2986. yyupdateSplit (yystackp, yys);
  2987. yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule));
  2988. YYDPRINTF ((stderr,
  2989. "Reduced stack %lu by rule #%d; action deferred. Now in state %d.\n",
  2990. (unsigned long int) yyk, yyrule - 1, yynewLRState));
  2991. for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
  2992. if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULL)
  2993. {
  2994. yyGLRState *yysplit = yystackp->yysplitPoint;
  2995. yyGLRState *yyp = yystackp->yytops.yystates[yyi];
  2996. while (yyp != yys && yyp != yysplit && yyp->yyposn >= yyposn)
  2997. {
  2998. if (yyp->yylrState == yynewLRState && yyp->yypred == yys)
  2999. {
  3000. yyaddDeferredAction (yystackp, yyk, yyp, yys0, yyrule);
  3001. yymarkStackDeleted (yystackp, yyk);
  3002. YYDPRINTF ((stderr, "Merging stack %lu into stack %lu.\n",
  3003. (unsigned long int) yyk,
  3004. (unsigned long int) yyi));
  3005. return yyok;
  3006. }
  3007. yyp = yyp->yypred;
  3008. }
  3009. }
  3010. yystackp->yytops.yystates[yyk] = yys;
  3011. yyglrShiftDefer (yystackp, yyk, yynewLRState, yyposn, yys0, yyrule);
  3012. }
  3013. return yyok;
  3014. }
  3015. static size_t
  3016. yysplitStack (yyGLRStack* yystackp, size_t yyk)
  3017. {
  3018. if (yystackp->yysplitPoint == YY_NULL)
  3019. {
  3020. YYASSERT (yyk == 0);
  3021. yystackp->yysplitPoint = yystackp->yytops.yystates[yyk];
  3022. }
  3023. if (yystackp->yytops.yysize >= yystackp->yytops.yycapacity)
  3024. {
  3025. yyGLRState** yynewStates;
  3026. yybool* yynewLookaheadNeeds;
  3027. yynewStates = YY_NULL;
  3028. if (yystackp->yytops.yycapacity
  3029. > (YYSIZEMAX / (2 * sizeof yynewStates[0])))
  3030. yyMemoryExhausted (yystackp);
  3031. yystackp->yytops.yycapacity *= 2;
  3032. yynewStates =
  3033. (yyGLRState**) YYREALLOC (yystackp->yytops.yystates,
  3034. (yystackp->yytops.yycapacity
  3035. * sizeof yynewStates[0]));
  3036. if (yynewStates == YY_NULL)
  3037. yyMemoryExhausted (yystackp);
  3038. yystackp->yytops.yystates = yynewStates;
  3039. yynewLookaheadNeeds =
  3040. (yybool*) YYREALLOC (yystackp->yytops.yylookaheadNeeds,
  3041. (yystackp->yytops.yycapacity
  3042. * sizeof yynewLookaheadNeeds[0]));
  3043. if (yynewLookaheadNeeds == YY_NULL)
  3044. yyMemoryExhausted (yystackp);
  3045. yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds;
  3046. }
  3047. yystackp->yytops.yystates[yystackp->yytops.yysize]
  3048. = yystackp->yytops.yystates[yyk];
  3049. yystackp->yytops.yylookaheadNeeds[yystackp->yytops.yysize]
  3050. = yystackp->yytops.yylookaheadNeeds[yyk];
  3051. yystackp->yytops.yysize += 1;
  3052. return yystackp->yytops.yysize-1;
  3053. }
  3054. /** True iff Y0 and Y1 represent identical options at the top level.
  3055. * That is, they represent the same rule applied to RHS symbols
  3056. * that produce the same terminal symbols. */
  3057. static yybool
  3058. yyidenticalOptions (yySemanticOption* yyy0, yySemanticOption* yyy1)
  3059. {
  3060. if (yyy0->yyrule == yyy1->yyrule)
  3061. {
  3062. yyGLRState *yys0, *yys1;
  3063. int yyn;
  3064. for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
  3065. yyn = yyrhsLength (yyy0->yyrule);
  3066. yyn > 0;
  3067. yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
  3068. if (yys0->yyposn != yys1->yyposn)
  3069. return yyfalse;
  3070. return yytrue;
  3071. }
  3072. else
  3073. return yyfalse;
  3074. }
  3075. /** Assuming identicalOptions (Y0,Y1), destructively merge the
  3076. * alternative semantic values for the RHS-symbols of Y1 and Y0. */
  3077. static void
  3078. yymergeOptionSets (yySemanticOption* yyy0, yySemanticOption* yyy1)
  3079. {
  3080. yyGLRState *yys0, *yys1;
  3081. int yyn;
  3082. for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
  3083. yyn = yyrhsLength (yyy0->yyrule);
  3084. yyn > 0;
  3085. yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
  3086. {
  3087. if (yys0 == yys1)
  3088. break;
  3089. else if (yys0->yyresolved)
  3090. {
  3091. yys1->yyresolved = yytrue;
  3092. yys1->yysemantics.yysval = yys0->yysemantics.yysval;
  3093. }
  3094. else if (yys1->yyresolved)
  3095. {
  3096. yys0->yyresolved = yytrue;
  3097. yys0->yysemantics.yysval = yys1->yysemantics.yysval;
  3098. }
  3099. else
  3100. {
  3101. yySemanticOption** yyz0p = &yys0->yysemantics.yyfirstVal;
  3102. yySemanticOption* yyz1 = yys1->yysemantics.yyfirstVal;
  3103. while (YYID (yytrue))
  3104. {
  3105. if (yyz1 == *yyz0p || yyz1 == YY_NULL)
  3106. break;
  3107. else if (*yyz0p == YY_NULL)
  3108. {
  3109. *yyz0p = yyz1;
  3110. break;
  3111. }
  3112. else if (*yyz0p < yyz1)
  3113. {
  3114. yySemanticOption* yyz = *yyz0p;
  3115. *yyz0p = yyz1;
  3116. yyz1 = yyz1->yynext;
  3117. (*yyz0p)->yynext = yyz;
  3118. }
  3119. yyz0p = &(*yyz0p)->yynext;
  3120. }
  3121. yys1->yysemantics.yyfirstVal = yys0->yysemantics.yyfirstVal;
  3122. }
  3123. }
  3124. }
  3125. /** Y0 and Y1 represent two possible actions to take in a given
  3126. * parsing state; return 0 if no combination is possible,
  3127. * 1 if user-mergeable, 2 if Y0 is preferred, 3 if Y1 is preferred. */
  3128. static int
  3129. yypreference (yySemanticOption* y0, yySemanticOption* y1)
  3130. {
  3131. yyRuleNum r0 = y0->yyrule, r1 = y1->yyrule;
  3132. int p0 = yydprec[r0], p1 = yydprec[r1];
  3133. if (p0 == p1)
  3134. {
  3135. if (yymerger[r0] == 0 || yymerger[r0] != yymerger[r1])
  3136. return 0;
  3137. else
  3138. return 1;
  3139. }
  3140. if (p0 == 0 || p1 == 0)
  3141. return 0;
  3142. if (p0 < p1)
  3143. return 3;
  3144. if (p1 < p0)
  3145. return 2;
  3146. return 0;
  3147. }
  3148. static YYRESULTTAG yyresolveValue (yyGLRState* yys,
  3149. yyGLRStack* yystackp, ParseState* parse_state, yyscan_t scanner);
  3150. /** Resolve the previous N states starting at and including state S. If result
  3151. * != yyok, some states may have been left unresolved possibly with empty
  3152. * semantic option chains. Regardless of whether result = yyok, each state
  3153. * has been left with consistent data so that yydestroyGLRState can be invoked
  3154. * if necessary. */
  3155. static YYRESULTTAG
  3156. yyresolveStates (yyGLRState* yys, int yyn,
  3157. yyGLRStack* yystackp, ParseState* parse_state, yyscan_t scanner)
  3158. {
  3159. if (0 < yyn)
  3160. {
  3161. YYASSERT (yys->yypred);
  3162. YYCHK (yyresolveStates (yys->yypred, yyn-1, yystackp, parse_state, scanner));
  3163. if (! yys->yyresolved)
  3164. YYCHK (yyresolveValue (yys, yystackp, parse_state, scanner));
  3165. }
  3166. return yyok;
  3167. }
  3168. /** Resolve the states for the RHS of OPT, perform its user action, and return
  3169. * the semantic value and location. Regardless of whether result = yyok, all
  3170. * RHS states have been destroyed (assuming the user action destroys all RHS
  3171. * semantic values if invoked). */
  3172. static YYRESULTTAG
  3173. yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystackp,
  3174. YYSTYPE* yyvalp, YYLTYPE *yylocp, ParseState* parse_state, yyscan_t scanner)
  3175. {
  3176. yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
  3177. int yynrhs = yyrhsLength (yyopt->yyrule);
  3178. YYRESULTTAG yyflag =
  3179. yyresolveStates (yyopt->yystate, yynrhs, yystackp, parse_state, scanner);
  3180. if (yyflag != yyok)
  3181. {
  3182. yyGLRState *yys;
  3183. for (yys = yyopt->yystate; yynrhs > 0; yys = yys->yypred, yynrhs -= 1)
  3184. yydestroyGLRState ("Cleanup: popping", yys, parse_state, scanner);
  3185. return yyflag;
  3186. }
  3187. yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yyopt->yystate;
  3188. if (yynrhs == 0)
  3189. /* Set default location. */
  3190. yyrhsVals[YYMAXRHS + YYMAXLEFT - 1].yystate.yyloc = yyopt->yystate->yyloc;
  3191. {
  3192. int yychar_current = yychar;
  3193. YYSTYPE yylval_current = yylval;
  3194. YYLTYPE yylloc_current = yylloc;
  3195. yychar = yyopt->yyrawchar;
  3196. yylval = yyopt->yyval;
  3197. yylloc = yyopt->yyloc;
  3198. yyflag = yyuserAction (yyopt->yyrule, yynrhs,
  3199. yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
  3200. yystackp, yyvalp, yylocp, parse_state, scanner);
  3201. yychar = yychar_current;
  3202. yylval = yylval_current;
  3203. yylloc = yylloc_current;
  3204. }
  3205. return yyflag;
  3206. }
  3207. #if YYDEBUG
  3208. static void
  3209. yyreportTree (yySemanticOption* yyx, int yyindent)
  3210. {
  3211. int yynrhs = yyrhsLength (yyx->yyrule);
  3212. int yyi;
  3213. yyGLRState* yys;
  3214. yyGLRState* yystates[1 + YYMAXRHS];
  3215. yyGLRState yyleftmost_state;
  3216. for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred)
  3217. yystates[yyi] = yys;
  3218. if (yys == YY_NULL)
  3219. {
  3220. yyleftmost_state.yyposn = 0;
  3221. yystates[0] = &yyleftmost_state;
  3222. }
  3223. else
  3224. yystates[0] = yys;
  3225. if (yyx->yystate->yyposn < yys->yyposn + 1)
  3226. YYFPRINTF (stderr, "%*s%s -> <Rule %d, empty>\n",
  3227. yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
  3228. yyx->yyrule - 1);
  3229. else
  3230. YYFPRINTF (stderr, "%*s%s -> <Rule %d, tokens %lu .. %lu>\n",
  3231. yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
  3232. yyx->yyrule - 1, (unsigned long int) (yys->yyposn + 1),
  3233. (unsigned long int) yyx->yystate->yyposn);
  3234. for (yyi = 1; yyi <= yynrhs; yyi += 1)
  3235. {
  3236. if (yystates[yyi]->yyresolved)
  3237. {
  3238. if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn)
  3239. YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "",
  3240. yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]));
  3241. else
  3242. YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "",
  3243. yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]),
  3244. (unsigned long int) (yystates[yyi - 1]->yyposn + 1),
  3245. (unsigned long int) yystates[yyi]->yyposn);
  3246. }
  3247. else
  3248. yyreportTree (yystates[yyi]->yysemantics.yyfirstVal, yyindent+2);
  3249. }
  3250. }
  3251. #endif
  3252. /*ARGSUSED*/ static YYRESULTTAG
  3253. yyreportAmbiguity (yySemanticOption* yyx0,
  3254. yySemanticOption* yyx1, YYLTYPE *yylocp, ParseState* parse_state, yyscan_t scanner)
  3255. {
  3256. YYUSE (yyx0);
  3257. YYUSE (yyx1);
  3258. #if YYDEBUG
  3259. YYFPRINTF (stderr, "Ambiguity detected.\n");
  3260. YYFPRINTF (stderr, "Option 1,\n");
  3261. yyreportTree (yyx0, 2);
  3262. YYFPRINTF (stderr, "\nOption 2,\n");
  3263. yyreportTree (yyx1, 2);
  3264. YYFPRINTF (stderr, "\n");
  3265. #endif
  3266. yyerror (yylocp, parse_state, scanner, YY_("syntax is ambiguous"));
  3267. return yyabort;
  3268. }
  3269. /** Starting at and including state S1, resolve the location for each of the
  3270. * previous N1 states that is unresolved. The first semantic option of a state
  3271. * is always chosen. */
  3272. static void
  3273. yyresolveLocations (yyGLRState* yys1, int yyn1,
  3274. yyGLRStack *yystackp, ParseState* parse_state, yyscan_t scanner)
  3275. {
  3276. if (0 < yyn1)
  3277. {
  3278. yyresolveLocations (yys1->yypred, yyn1 - 1, yystackp, parse_state, scanner);
  3279. if (!yys1->yyresolved)
  3280. {
  3281. yyGLRStackItem yyrhsloc[1 + YYMAXRHS];
  3282. int yynrhs;
  3283. yySemanticOption *yyoption = yys1->yysemantics.yyfirstVal;
  3284. YYASSERT (yyoption != YY_NULL);
  3285. yynrhs = yyrhsLength (yyoption->yyrule);
  3286. if (yynrhs > 0)
  3287. {
  3288. yyGLRState *yys;
  3289. int yyn;
  3290. yyresolveLocations (yyoption->yystate, yynrhs,
  3291. yystackp, parse_state, scanner);
  3292. for (yys = yyoption->yystate, yyn = yynrhs;
  3293. yyn > 0;
  3294. yys = yys->yypred, yyn -= 1)
  3295. yyrhsloc[yyn].yystate.yyloc = yys->yyloc;
  3296. }
  3297. else
  3298. {
  3299. /* Both yyresolveAction and yyresolveLocations traverse the GSS
  3300. in reverse rightmost order. It is only necessary to invoke
  3301. yyresolveLocations on a subforest for which yyresolveAction
  3302. would have been invoked next had an ambiguity not been
  3303. detected. Thus the location of the previous state (but not
  3304. necessarily the previous state itself) is guaranteed to be
  3305. resolved already. */
  3306. yyGLRState *yyprevious = yyoption->yystate;
  3307. yyrhsloc[0].yystate.yyloc = yyprevious->yyloc;
  3308. }
  3309. {
  3310. int yychar_current = yychar;
  3311. YYSTYPE yylval_current = yylval;
  3312. YYLTYPE yylloc_current = yylloc;
  3313. yychar = yyoption->yyrawchar;
  3314. yylval = yyoption->yyval;
  3315. yylloc = yyoption->yyloc;
  3316. YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs);
  3317. yychar = yychar_current;
  3318. yylval = yylval_current;
  3319. yylloc = yylloc_current;
  3320. }
  3321. }
  3322. }
  3323. }
  3324. /** Resolve the ambiguity represented in state S, perform the indicated
  3325. * actions, and set the semantic value of S. If result != yyok, the chain of
  3326. * semantic options in S has been cleared instead or it has been left
  3327. * unmodified except that redundant options may have been removed. Regardless
  3328. * of whether result = yyok, S has been left with consistent data so that
  3329. * yydestroyGLRState can be invoked if necessary. */
  3330. static YYRESULTTAG
  3331. yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp, ParseState* parse_state, yyscan_t scanner)
  3332. {
  3333. yySemanticOption* yyoptionList = yys->yysemantics.yyfirstVal;
  3334. yySemanticOption* yybest = yyoptionList;
  3335. yySemanticOption** yypp;
  3336. yybool yymerge = yyfalse;
  3337. YYSTYPE yysval;
  3338. YYRESULTTAG yyflag;
  3339. YYLTYPE *yylocp = &yys->yyloc;
  3340. for (yypp = &yyoptionList->yynext; *yypp != YY_NULL; )
  3341. {
  3342. yySemanticOption* yyp = *yypp;
  3343. if (yyidenticalOptions (yybest, yyp))
  3344. {
  3345. yymergeOptionSets (yybest, yyp);
  3346. *yypp = yyp->yynext;
  3347. }
  3348. else
  3349. {
  3350. switch (yypreference (yybest, yyp))
  3351. {
  3352. case 0:
  3353. yyresolveLocations (yys, 1, yystackp, parse_state, scanner);
  3354. return yyreportAmbiguity (yybest, yyp, yylocp, parse_state, scanner);
  3355. break;
  3356. case 1:
  3357. yymerge = yytrue;
  3358. break;
  3359. case 2:
  3360. break;
  3361. case 3:
  3362. yybest = yyp;
  3363. yymerge = yyfalse;
  3364. break;
  3365. default:
  3366. /* This cannot happen so it is not worth a YYASSERT (yyfalse),
  3367. but some compilers complain if the default case is
  3368. omitted. */
  3369. break;
  3370. }
  3371. yypp = &yyp->yynext;
  3372. }
  3373. }
  3374. if (yymerge)
  3375. {
  3376. yySemanticOption* yyp;
  3377. int yyprec = yydprec[yybest->yyrule];
  3378. yyflag = yyresolveAction (yybest, yystackp, &yysval, yylocp, parse_state, scanner);
  3379. if (yyflag == yyok)
  3380. for (yyp = yybest->yynext; yyp != YY_NULL; yyp = yyp->yynext)
  3381. {
  3382. if (yyprec == yydprec[yyp->yyrule])
  3383. {
  3384. YYSTYPE yysval_other;
  3385. YYLTYPE yydummy;
  3386. yyflag = yyresolveAction (yyp, yystackp, &yysval_other, &yydummy, parse_state, scanner);
  3387. if (yyflag != yyok)
  3388. {
  3389. yydestruct ("Cleanup: discarding incompletely merged value for",
  3390. yystos[yys->yylrState],
  3391. &yysval, yylocp, parse_state, scanner);
  3392. break;
  3393. }
  3394. yyuserMerge (yymerger[yyp->yyrule], &yysval, &yysval_other);
  3395. }
  3396. }
  3397. }
  3398. else
  3399. yyflag = yyresolveAction (yybest, yystackp, &yysval, yylocp, parse_state, scanner);
  3400. if (yyflag == yyok)
  3401. {
  3402. yys->yyresolved = yytrue;
  3403. yys->yysemantics.yysval = yysval;
  3404. }
  3405. else
  3406. yys->yysemantics.yyfirstVal = YY_NULL;
  3407. return yyflag;
  3408. }
  3409. static YYRESULTTAG
  3410. yyresolveStack (yyGLRStack* yystackp, ParseState* parse_state, yyscan_t scanner)
  3411. {
  3412. if (yystackp->yysplitPoint != YY_NULL)
  3413. {
  3414. yyGLRState* yys;
  3415. int yyn;
  3416. for (yyn = 0, yys = yystackp->yytops.yystates[0];
  3417. yys != yystackp->yysplitPoint;
  3418. yys = yys->yypred, yyn += 1)
  3419. continue;
  3420. YYCHK (yyresolveStates (yystackp->yytops.yystates[0], yyn, yystackp
  3421. , parse_state, scanner));
  3422. }
  3423. return yyok;
  3424. }
  3425. static void
  3426. yycompressStack (yyGLRStack* yystackp)
  3427. {
  3428. yyGLRState* yyp, *yyq, *yyr;
  3429. if (yystackp->yytops.yysize != 1 || yystackp->yysplitPoint == YY_NULL)
  3430. return;
  3431. for (yyp = yystackp->yytops.yystates[0], yyq = yyp->yypred, yyr = YY_NULL;
  3432. yyp != yystackp->yysplitPoint;
  3433. yyr = yyp, yyp = yyq, yyq = yyp->yypred)
  3434. yyp->yypred = yyr;
  3435. yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems;
  3436. yystackp->yynextFree = ((yyGLRStackItem*) yystackp->yysplitPoint) + 1;
  3437. yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems;
  3438. yystackp->yysplitPoint = YY_NULL;
  3439. yystackp->yylastDeleted = YY_NULL;
  3440. while (yyr != YY_NULL)
  3441. {
  3442. yystackp->yynextFree->yystate = *yyr;
  3443. yyr = yyr->yypred;
  3444. yystackp->yynextFree->yystate.yypred = &yystackp->yynextFree[-1].yystate;
  3445. yystackp->yytops.yystates[0] = &yystackp->yynextFree->yystate;
  3446. yystackp->yynextFree += 1;
  3447. yystackp->yyspaceLeft -= 1;
  3448. }
  3449. }
  3450. static YYRESULTTAG
  3451. yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
  3452. size_t yyposn, YYLTYPE *yylocp, ParseState* parse_state, yyscan_t scanner)
  3453. {
  3454. int yyaction;
  3455. const short int* yyconflicts;
  3456. yyRuleNum yyrule;
  3457. while (yystackp->yytops.yystates[yyk] != YY_NULL)
  3458. {
  3459. yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState;
  3460. YYDPRINTF ((stderr, "Stack %lu Entering state %d\n",
  3461. (unsigned long int) yyk, yystate));
  3462. YYASSERT (yystate != YYFINAL);
  3463. if (yyisDefaultedState (yystate))
  3464. {
  3465. yyrule = yydefaultAction (yystate);
  3466. if (yyrule == 0)
  3467. {
  3468. YYDPRINTF ((stderr, "Stack %lu dies.\n",
  3469. (unsigned long int) yyk));
  3470. yymarkStackDeleted (yystackp, yyk);
  3471. return yyok;
  3472. }
  3473. YYCHK (yyglrReduce (yystackp, yyk, yyrule, yyfalse, parse_state, scanner));
  3474. }
  3475. else
  3476. {
  3477. yySymbol yytoken;
  3478. yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
  3479. if (yychar == YYEMPTY)
  3480. {
  3481. YYDPRINTF ((stderr, "Reading a token: "));
  3482. yychar = YYLEX;
  3483. }
  3484. if (yychar <= YYEOF)
  3485. {
  3486. yychar = yytoken = YYEOF;
  3487. YYDPRINTF ((stderr, "Now at end of input.\n"));
  3488. }
  3489. else
  3490. {
  3491. yytoken = YYTRANSLATE (yychar);
  3492. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  3493. }
  3494. yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
  3495. while (*yyconflicts != 0)
  3496. {
  3497. size_t yynewStack = yysplitStack (yystackp, yyk);
  3498. YYDPRINTF ((stderr, "Splitting off stack %lu from %lu.\n",
  3499. (unsigned long int) yynewStack,
  3500. (unsigned long int) yyk));
  3501. YYCHK (yyglrReduce (yystackp, yynewStack,
  3502. *yyconflicts, yyfalse, parse_state, scanner));
  3503. YYCHK (yyprocessOneStack (yystackp, yynewStack,
  3504. yyposn, yylocp, parse_state, scanner));
  3505. yyconflicts += 1;
  3506. }
  3507. if (yyisShiftAction (yyaction))
  3508. break;
  3509. else if (yyisErrorAction (yyaction))
  3510. {
  3511. YYDPRINTF ((stderr, "Stack %lu dies.\n",
  3512. (unsigned long int) yyk));
  3513. yymarkStackDeleted (yystackp, yyk);
  3514. break;
  3515. }
  3516. else
  3517. YYCHK (yyglrReduce (yystackp, yyk, -yyaction,
  3518. yyfalse, parse_state, scanner));
  3519. }
  3520. }
  3521. return yyok;
  3522. }
  3523. /*ARGSUSED*/ static void
  3524. yyreportSyntaxError (yyGLRStack* yystackp, ParseState* parse_state, yyscan_t scanner)
  3525. {
  3526. if (yystackp->yyerrState != 0)
  3527. return;
  3528. #if ! YYERROR_VERBOSE
  3529. yyerror (&yylloc, parse_state, scanner, YY_("syntax error"));
  3530. #else
  3531. {
  3532. yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
  3533. size_t yysize0 = yytnamerr (YY_NULL, yytokenName (yytoken));
  3534. size_t yysize = yysize0;
  3535. yybool yysize_overflow = yyfalse;
  3536. char* yymsg = YY_NULL;
  3537. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  3538. /* Internationalized format string. */
  3539. const char *yyformat = YY_NULL;
  3540. /* Arguments of yyformat. */
  3541. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  3542. /* Number of reported tokens (one for the "unexpected", one per
  3543. "expected"). */
  3544. int yycount = 0;
  3545. /* There are many possibilities here to consider:
  3546. - If this state is a consistent state with a default action, then
  3547. the only way this function was invoked is if the default action
  3548. is an error action. In that case, don't check for expected
  3549. tokens because there are none.
  3550. - The only way there can be no lookahead present (in yychar) is if
  3551. this state is a consistent state with a default action. Thus,
  3552. detecting the absence of a lookahead is sufficient to determine
  3553. that there is no unexpected or expected token to report. In that
  3554. case, just report a simple "syntax error".
  3555. - Don't assume there isn't a lookahead just because this state is a
  3556. consistent state with a default action. There might have been a
  3557. previous inconsistent state, consistent state with a non-default
  3558. action, or user semantic action that manipulated yychar.
  3559. - Of course, the expected token list depends on states to have
  3560. correct lookahead information, and it depends on the parser not
  3561. to perform extra reductions after fetching a lookahead from the
  3562. scanner and before detecting a syntax error. Thus, state merging
  3563. (from LALR or IELR) and default reductions corrupt the expected
  3564. token list. However, the list is correct for canonical LR with
  3565. one exception: it will still contain any token that will not be
  3566. accepted due to an error action in a later state.
  3567. */
  3568. if (yytoken != YYEMPTY)
  3569. {
  3570. int yyn = yypact[yystackp->yytops.yystates[0]->yylrState];
  3571. yyarg[yycount++] = yytokenName (yytoken);
  3572. if (!yypact_value_is_default (yyn))
  3573. {
  3574. /* Start YYX at -YYN if negative to avoid negative indexes in
  3575. YYCHECK. In other words, skip the first -YYN actions for this
  3576. state because they are default actions. */
  3577. int yyxbegin = yyn < 0 ? -yyn : 0;
  3578. /* Stay within bounds of both yycheck and yytname. */
  3579. int yychecklim = YYLAST - yyn + 1;
  3580. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  3581. int yyx;
  3582. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  3583. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
  3584. && !yytable_value_is_error (yytable[yyx + yyn]))
  3585. {
  3586. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  3587. {
  3588. yycount = 1;
  3589. yysize = yysize0;
  3590. break;
  3591. }
  3592. yyarg[yycount++] = yytokenName (yyx);
  3593. {
  3594. size_t yysz = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
  3595. yysize_overflow |= yysz < yysize;
  3596. yysize = yysz;
  3597. }
  3598. }
  3599. }
  3600. }
  3601. switch (yycount)
  3602. {
  3603. #define YYCASE_(N, S) \
  3604. case N: \
  3605. yyformat = S; \
  3606. break
  3607. YYCASE_(0, YY_("syntax error"));
  3608. YYCASE_(1, YY_("syntax error, unexpected %s"));
  3609. YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
  3610. YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
  3611. YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
  3612. YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
  3613. #undef YYCASE_
  3614. }
  3615. {
  3616. size_t yysz = yysize + strlen (yyformat);
  3617. yysize_overflow |= yysz < yysize;
  3618. yysize = yysz;
  3619. }
  3620. if (!yysize_overflow)
  3621. yymsg = (char *) YYMALLOC (yysize);
  3622. if (yymsg)
  3623. {
  3624. char *yyp = yymsg;
  3625. int yyi = 0;
  3626. while ((*yyp = *yyformat))
  3627. {
  3628. if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
  3629. {
  3630. yyp += yytnamerr (yyp, yyarg[yyi++]);
  3631. yyformat += 2;
  3632. }
  3633. else
  3634. {
  3635. yyp++;
  3636. yyformat++;
  3637. }
  3638. }
  3639. yyerror (&yylloc, parse_state, scanner, yymsg);
  3640. YYFREE (yymsg);
  3641. }
  3642. else
  3643. {
  3644. yyerror (&yylloc, parse_state, scanner, YY_("syntax error"));
  3645. yyMemoryExhausted (yystackp);
  3646. }
  3647. }
  3648. #endif /* YYERROR_VERBOSE */
  3649. yynerrs += 1;
  3650. }
  3651. /* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP,
  3652. yylval, and yylloc are the syntactic category, semantic value, and location
  3653. of the lookahead. */
  3654. /*ARGSUSED*/ static void
  3655. yyrecoverSyntaxError (yyGLRStack* yystackp, ParseState* parse_state, yyscan_t scanner)
  3656. {
  3657. size_t yyk;
  3658. int yyj;
  3659. if (yystackp->yyerrState == 3)
  3660. /* We just shifted the error token and (perhaps) took some
  3661. reductions. Skip tokens until we can proceed. */
  3662. while (YYID (yytrue))
  3663. {
  3664. yySymbol yytoken;
  3665. if (yychar == YYEOF)
  3666. yyFail (yystackp, &yylloc, parse_state, scanner, YY_NULL);
  3667. if (yychar != YYEMPTY)
  3668. {
  3669. /* We throw away the lookahead, but the error range
  3670. of the shifted error token must take it into account. */
  3671. yyGLRState *yys = yystackp->yytops.yystates[0];
  3672. yyGLRStackItem yyerror_range[3];
  3673. yyerror_range[1].yystate.yyloc = yys->yyloc;
  3674. yyerror_range[2].yystate.yyloc = yylloc;
  3675. YYLLOC_DEFAULT ((yys->yyloc), yyerror_range, 2);
  3676. yytoken = YYTRANSLATE (yychar);
  3677. yydestruct ("Error: discarding",
  3678. yytoken, &yylval, &yylloc, parse_state, scanner);
  3679. }
  3680. YYDPRINTF ((stderr, "Reading a token: "));
  3681. yychar = YYLEX;
  3682. if (yychar <= YYEOF)
  3683. {
  3684. yychar = yytoken = YYEOF;
  3685. YYDPRINTF ((stderr, "Now at end of input.\n"));
  3686. }
  3687. else
  3688. {
  3689. yytoken = YYTRANSLATE (yychar);
  3690. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  3691. }
  3692. yyj = yypact[yystackp->yytops.yystates[0]->yylrState];
  3693. if (yypact_value_is_default (yyj))
  3694. return;
  3695. yyj += yytoken;
  3696. if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken)
  3697. {
  3698. if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0)
  3699. return;
  3700. }
  3701. else if (! yytable_value_is_error (yytable[yyj]))
  3702. return;
  3703. }
  3704. /* Reduce to one stack. */
  3705. for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1)
  3706. if (yystackp->yytops.yystates[yyk] != YY_NULL)
  3707. break;
  3708. if (yyk >= yystackp->yytops.yysize)
  3709. yyFail (yystackp, &yylloc, parse_state, scanner, YY_NULL);
  3710. for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1)
  3711. yymarkStackDeleted (yystackp, yyk);
  3712. yyremoveDeletes (yystackp);
  3713. yycompressStack (yystackp);
  3714. /* Now pop stack until we find a state that shifts the error token. */
  3715. yystackp->yyerrState = 3;
  3716. while (yystackp->yytops.yystates[0] != YY_NULL)
  3717. {
  3718. yyGLRState *yys = yystackp->yytops.yystates[0];
  3719. yyj = yypact[yys->yylrState];
  3720. if (! yypact_value_is_default (yyj))
  3721. {
  3722. yyj += YYTERROR;
  3723. if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR
  3724. && yyisShiftAction (yytable[yyj]))
  3725. {
  3726. /* Shift the error token. */
  3727. /* First adjust its location.*/
  3728. YYLTYPE yyerrloc;
  3729. yystackp->yyerror_range[2].yystate.yyloc = yylloc;
  3730. YYLLOC_DEFAULT (yyerrloc, (yystackp->yyerror_range), 2);
  3731. YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]],
  3732. &yylval, &yyerrloc);
  3733. yyglrShift (yystackp, 0, yytable[yyj],
  3734. yys->yyposn, &yylval, &yyerrloc);
  3735. yys = yystackp->yytops.yystates[0];
  3736. break;
  3737. }
  3738. }
  3739. yystackp->yyerror_range[1].yystate.yyloc = yys->yyloc;
  3740. if (yys->yypred != YY_NULL)
  3741. yydestroyGLRState ("Error: popping", yys, parse_state, scanner);
  3742. yystackp->yytops.yystates[0] = yys->yypred;
  3743. yystackp->yynextFree -= 1;
  3744. yystackp->yyspaceLeft += 1;
  3745. }
  3746. if (yystackp->yytops.yystates[0] == YY_NULL)
  3747. yyFail (yystackp, &yylloc, parse_state, scanner, YY_NULL);
  3748. }
  3749. #define YYCHK1(YYE) \
  3750. do { \
  3751. switch (YYE) { \
  3752. case yyok: \
  3753. break; \
  3754. case yyabort: \
  3755. goto yyabortlab; \
  3756. case yyaccept: \
  3757. goto yyacceptlab; \
  3758. case yyerr: \
  3759. goto yyuser_error; \
  3760. default: \
  3761. goto yybuglab; \
  3762. } \
  3763. } while (YYID (0))
  3764. /*----------.
  3765. | yyparse. |
  3766. `----------*/
  3767. int
  3768. yyparse (ParseState* parse_state, yyscan_t scanner)
  3769. {
  3770. int yyresult;
  3771. yyGLRStack yystack;
  3772. yyGLRStack* const yystackp = &yystack;
  3773. size_t yyposn;
  3774. YYDPRINTF ((stderr, "Starting parse\n"));
  3775. yychar = YYEMPTY;
  3776. yylval = yyval_default;
  3777. yylloc = yyloc_default;
  3778. if (! yyinitGLRStack (yystackp, YYINITDEPTH))
  3779. goto yyexhaustedlab;
  3780. switch (YYSETJMP (yystack.yyexception_buffer))
  3781. {
  3782. case 0: break;
  3783. case 1: goto yyabortlab;
  3784. case 2: goto yyexhaustedlab;
  3785. default: goto yybuglab;
  3786. }
  3787. yyglrShift (&yystack, 0, 0, 0, &yylval, &yylloc);
  3788. yyposn = 0;
  3789. while (YYID (yytrue))
  3790. {
  3791. /* For efficiency, we have two loops, the first of which is
  3792. specialized to deterministic operation (single stack, no
  3793. potential ambiguity). */
  3794. /* Standard mode */
  3795. while (YYID (yytrue))
  3796. {
  3797. yyRuleNum yyrule;
  3798. int yyaction;
  3799. const short int* yyconflicts;
  3800. yyStateNum yystate = yystack.yytops.yystates[0]->yylrState;
  3801. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  3802. if (yystate == YYFINAL)
  3803. goto yyacceptlab;
  3804. if (yyisDefaultedState (yystate))
  3805. {
  3806. yyrule = yydefaultAction (yystate);
  3807. if (yyrule == 0)
  3808. {
  3809. yystack.yyerror_range[1].yystate.yyloc = yylloc;
  3810. yyreportSyntaxError (&yystack, parse_state, scanner);
  3811. goto yyuser_error;
  3812. }
  3813. YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue, parse_state, scanner));
  3814. }
  3815. else
  3816. {
  3817. yySymbol yytoken;
  3818. if (yychar == YYEMPTY)
  3819. {
  3820. YYDPRINTF ((stderr, "Reading a token: "));
  3821. yychar = YYLEX;
  3822. }
  3823. if (yychar <= YYEOF)
  3824. {
  3825. yychar = yytoken = YYEOF;
  3826. YYDPRINTF ((stderr, "Now at end of input.\n"));
  3827. }
  3828. else
  3829. {
  3830. yytoken = YYTRANSLATE (yychar);
  3831. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  3832. }
  3833. yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
  3834. if (*yyconflicts != 0)
  3835. break;
  3836. if (yyisShiftAction (yyaction))
  3837. {
  3838. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  3839. yychar = YYEMPTY;
  3840. yyposn += 1;
  3841. yyglrShift (&yystack, 0, yyaction, yyposn, &yylval, &yylloc);
  3842. if (0 < yystack.yyerrState)
  3843. yystack.yyerrState -= 1;
  3844. }
  3845. else if (yyisErrorAction (yyaction))
  3846. {
  3847. yystack.yyerror_range[1].yystate.yyloc = yylloc;
  3848. yyreportSyntaxError (&yystack, parse_state, scanner);
  3849. goto yyuser_error;
  3850. }
  3851. else
  3852. YYCHK1 (yyglrReduce (&yystack, 0, -yyaction, yytrue, parse_state, scanner));
  3853. }
  3854. }
  3855. while (YYID (yytrue))
  3856. {
  3857. yySymbol yytoken_to_shift;
  3858. size_t yys;
  3859. for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
  3860. yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY;
  3861. /* yyprocessOneStack returns one of three things:
  3862. - An error flag. If the caller is yyprocessOneStack, it
  3863. immediately returns as well. When the caller is finally
  3864. yyparse, it jumps to an error label via YYCHK1.
  3865. - yyok, but yyprocessOneStack has invoked yymarkStackDeleted
  3866. (&yystack, yys), which sets the top state of yys to NULL. Thus,
  3867. yyparse's following invocation of yyremoveDeletes will remove
  3868. the stack.
  3869. - yyok, when ready to shift a token.
  3870. Except in the first case, yyparse will invoke yyremoveDeletes and
  3871. then shift the next token onto all remaining stacks. This
  3872. synchronization of the shift (that is, after all preceding
  3873. reductions on all stacks) helps prevent double destructor calls
  3874. on yylval in the event of memory exhaustion. */
  3875. for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
  3876. YYCHK1 (yyprocessOneStack (&yystack, yys, yyposn, &yylloc, parse_state, scanner));
  3877. yyremoveDeletes (&yystack);
  3878. if (yystack.yytops.yysize == 0)
  3879. {
  3880. yyundeleteLastStack (&yystack);
  3881. if (yystack.yytops.yysize == 0)
  3882. yyFail (&yystack, &yylloc, parse_state, scanner, YY_("syntax error"));
  3883. YYCHK1 (yyresolveStack (&yystack, parse_state, scanner));
  3884. YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
  3885. yystack.yyerror_range[1].yystate.yyloc = yylloc;
  3886. yyreportSyntaxError (&yystack, parse_state, scanner);
  3887. goto yyuser_error;
  3888. }
  3889. /* If any yyglrShift call fails, it will fail after shifting. Thus,
  3890. a copy of yylval will already be on stack 0 in the event of a
  3891. failure in the following loop. Thus, yychar is set to YYEMPTY
  3892. before the loop to make sure the user destructor for yylval isn't
  3893. called twice. */
  3894. yytoken_to_shift = YYTRANSLATE (yychar);
  3895. yychar = YYEMPTY;
  3896. yyposn += 1;
  3897. for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
  3898. {
  3899. int yyaction;
  3900. const short int* yyconflicts;
  3901. yyStateNum yystate = yystack.yytops.yystates[yys]->yylrState;
  3902. yygetLRActions (yystate, yytoken_to_shift, &yyaction,
  3903. &yyconflicts);
  3904. /* Note that yyconflicts were handled by yyprocessOneStack. */
  3905. YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys));
  3906. YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc);
  3907. yyglrShift (&yystack, yys, yyaction, yyposn,
  3908. &yylval, &yylloc);
  3909. YYDPRINTF ((stderr, "Stack %lu now in state #%d\n",
  3910. (unsigned long int) yys,
  3911. yystack.yytops.yystates[yys]->yylrState));
  3912. }
  3913. if (yystack.yytops.yysize == 1)
  3914. {
  3915. YYCHK1 (yyresolveStack (&yystack, parse_state, scanner));
  3916. YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
  3917. yycompressStack (&yystack);
  3918. break;
  3919. }
  3920. }
  3921. continue;
  3922. yyuser_error:
  3923. yyrecoverSyntaxError (&yystack, parse_state, scanner);
  3924. yyposn = yystack.yytops.yystates[0]->yyposn;
  3925. }
  3926. yyacceptlab:
  3927. yyresult = 0;
  3928. goto yyreturn;
  3929. yybuglab:
  3930. YYASSERT (yyfalse);
  3931. goto yyabortlab;
  3932. yyabortlab:
  3933. yyresult = 1;
  3934. goto yyreturn;
  3935. yyexhaustedlab:
  3936. yyerror (&yylloc, parse_state, scanner, YY_("memory exhausted"));
  3937. yyresult = 2;
  3938. goto yyreturn;
  3939. yyreturn:
  3940. if (yychar != YYEMPTY)
  3941. yydestruct ("Cleanup: discarding lookahead",
  3942. YYTRANSLATE (yychar), &yylval, &yylloc, parse_state, scanner);
  3943. /* If the stack is well-formed, pop the stack until it is empty,
  3944. destroying its entries as we go. But free the stack regardless
  3945. of whether it is well-formed. */
  3946. if (yystack.yyitems)
  3947. {
  3948. yyGLRState** yystates = yystack.yytops.yystates;
  3949. if (yystates)
  3950. {
  3951. size_t yysize = yystack.yytops.yysize;
  3952. size_t yyk;
  3953. for (yyk = 0; yyk < yysize; yyk += 1)
  3954. if (yystates[yyk])
  3955. {
  3956. while (yystates[yyk])
  3957. {
  3958. yyGLRState *yys = yystates[yyk];
  3959. yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;
  3960. if (yys->yypred != YY_NULL)
  3961. yydestroyGLRState ("Cleanup: popping", yys, parse_state, scanner);
  3962. yystates[yyk] = yys->yypred;
  3963. yystack.yynextFree -= 1;
  3964. yystack.yyspaceLeft += 1;
  3965. }
  3966. break;
  3967. }
  3968. }
  3969. yyfreeGLRStack (&yystack);
  3970. }
  3971. /* Make sure YYID is used. */
  3972. return YYID (yyresult);
  3973. }
  3974. /* DEBUGGING ONLY */
  3975. #if YYDEBUG
  3976. static void yypstack (yyGLRStack* yystackp, size_t yyk)
  3977. __attribute__ ((__unused__));
  3978. static void yypdumpstack (yyGLRStack* yystackp) __attribute__ ((__unused__));
  3979. static void
  3980. yy_yypstack (yyGLRState* yys)
  3981. {
  3982. if (yys->yypred)
  3983. {
  3984. yy_yypstack (yys->yypred);
  3985. YYFPRINTF (stderr, " -> ");
  3986. }
  3987. YYFPRINTF (stderr, "%d@%lu", yys->yylrState,
  3988. (unsigned long int) yys->yyposn);
  3989. }
  3990. static void
  3991. yypstates (yyGLRState* yyst)
  3992. {
  3993. if (yyst == YY_NULL)
  3994. YYFPRINTF (stderr, "<null>");
  3995. else
  3996. yy_yypstack (yyst);
  3997. YYFPRINTF (stderr, "\n");
  3998. }
  3999. static void
  4000. yypstack (yyGLRStack* yystackp, size_t yyk)
  4001. {
  4002. yypstates (yystackp->yytops.yystates[yyk]);
  4003. }
  4004. #define YYINDEX(YYX) \
  4005. ((YYX) == YY_NULL ? -1 : (yyGLRStackItem*) (YYX) - yystackp->yyitems)
  4006. static void
  4007. yypdumpstack (yyGLRStack* yystackp)
  4008. {
  4009. yyGLRStackItem* yyp;
  4010. size_t yyi;
  4011. for (yyp = yystackp->yyitems; yyp < yystackp->yynextFree; yyp += 1)
  4012. {
  4013. YYFPRINTF (stderr, "%3lu. ",
  4014. (unsigned long int) (yyp - yystackp->yyitems));
  4015. if (*(yybool *) yyp)
  4016. {
  4017. YYFPRINTF (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld",
  4018. yyp->yystate.yyresolved, yyp->yystate.yylrState,
  4019. (unsigned long int) yyp->yystate.yyposn,
  4020. (long int) YYINDEX (yyp->yystate.yypred));
  4021. if (! yyp->yystate.yyresolved)
  4022. YYFPRINTF (stderr, ", firstVal: %ld",
  4023. (long int) YYINDEX (yyp->yystate
  4024. .yysemantics.yyfirstVal));
  4025. }
  4026. else
  4027. {
  4028. YYFPRINTF (stderr, "Option. rule: %d, state: %ld, next: %ld",
  4029. yyp->yyoption.yyrule - 1,
  4030. (long int) YYINDEX (yyp->yyoption.yystate),
  4031. (long int) YYINDEX (yyp->yyoption.yynext));
  4032. }
  4033. YYFPRINTF (stderr, "\n");
  4034. }
  4035. YYFPRINTF (stderr, "Tops:");
  4036. for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
  4037. YYFPRINTF (stderr, "%lu: %ld; ", (unsigned long int) yyi,
  4038. (long int) YYINDEX (yystackp->yytops.yystates[yyi]));
  4039. YYFPRINTF (stderr, "\n");
  4040. }
  4041. #endif
  4042. /* Line 2575 of glr.c */
  4043. #line 863 "BsParserFX.y"
  4044. void yyerror(YYLTYPE *locp, ParseState* parse_state, yyscan_t scanner, const char *msg)
  4045. {
  4046. parse_state->hasError = 1;
  4047. parse_state->errorLine = locp->first_line;
  4048. parse_state->errorColumn = locp->first_column;
  4049. parse_state->errorMessage = mmalloc_strdup(parse_state->memContext, msg);
  4050. }