BsParserFX.c 194 KB

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