2
0

BsParserFX.c 166 KB

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