BsParserFX.c 189 KB

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