BsParserFX.c 186 KB

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