_ts1.0_parser.cpp 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841
  1. /*
  2. -----------------------------------------------------------------------------
  3. This source file is part of OGRE
  4. (Object-oriented Graphics Rendering Engine)
  5. For the latest info, see http://www.ogre3d.org/
  6. Copyright (c) 2000-2011 Torus Knot Software Ltd
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. THE SOFTWARE.
  22. -----------------------------------------------------------------------------
  23. */
  24. /* A Bison parser, made by GNU Bison 1.875. */
  25. /* Skeleton parser for Yacc-like parsing with Bison,
  26. Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
  27. This program is free software; you can redistribute it and/or modify
  28. it under the terms of the GNU General Public License as published by
  29. the Free Software Foundation; either version 2, or (at your option)
  30. any later version.
  31. This program is distributed in the hope that it will be useful,
  32. but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. GNU General Public License for more details.
  35. You should have received a copy of the GNU General Public License
  36. along with this program; if not, write to the Free Software
  37. Foundation, Inc., 59 Temple Place - Suite 330,
  38. Boston, MA 02111-1307, USA. */
  39. /* As a special exception, when this file is copied by Bison into a
  40. Bison output file, you may use that output file without restriction.
  41. This special exception was added by the Free Software Foundation
  42. in version 1.24 of Bison. */
  43. /* Written by Richard Stallman by simplifying the original so called
  44. ``semantic'' parser. */
  45. /* All symbols defined below should begin with yy or YY, to avoid
  46. infringing on user name space. This should be done even for local
  47. variables, as they might otherwise be expanded by user macros.
  48. There are some unavoidable exceptions within include files to
  49. define necessary library symbols; they are noted "INFRINGES ON
  50. USER NAME SPACE" below. */
  51. #include <CmGLPrerequisites.h>
  52. /* Identify Bison output. */
  53. #define YYBISON 1
  54. /* Skeleton name. */
  55. #define YYSKELETON_NAME "yacc.c"
  56. /* Pure parsers. */
  57. #define YYPURE 0
  58. /* Using locations. */
  59. #define YYLSP_NEEDED 0
  60. /* If NAME_PREFIX is specified substitute the variables and functions
  61. names. */
  62. #define yyparse ts10_parse
  63. #define yylex ts10_lex
  64. #define yyerror ts10_error
  65. #define yylval ts10_lval
  66. #define yychar ts10_char
  67. #define yydebug ts10_debug
  68. #define yynerrs ts10_nerrs
  69. /* Tokens. */
  70. #ifndef YYTOKENTYPE
  71. # define YYTOKENTYPE
  72. /* Put the tokens into the symbol table, so that GDB and other debuggers
  73. know about them. */
  74. enum yytokentype {
  75. floatValue = 258,
  76. gequal = 259,
  77. less = 260,
  78. texVariable = 261,
  79. expandString = 262,
  80. openParen = 263,
  81. closeParen = 264,
  82. semicolon = 265,
  83. comma = 266,
  84. nop = 267,
  85. texture_1d = 268,
  86. texture_2d = 269,
  87. texture_rectangle = 270,
  88. texture_3d = 271,
  89. texture_cube_map = 272,
  90. cull_fragment = 273,
  91. pass_through = 274,
  92. offset_2d_scale = 275,
  93. offset_2d = 276,
  94. offset_rectangle_scale = 277,
  95. offset_rectangle = 278,
  96. dependent_ar = 279,
  97. dependent_gb = 280,
  98. dot_product_2d_1of2 = 281,
  99. dot_product_2d_2of2 = 282,
  100. dot_product_rectangle_1of2 = 283,
  101. dot_product_rectangle_2of2 = 284,
  102. dot_product_depth_replace_1of2 = 285,
  103. dot_product_depth_replace_2of2 = 286,
  104. dot_product_3d_1of3 = 287,
  105. dot_product_3d_2of3 = 288,
  106. dot_product_3d_3of3 = 289,
  107. dot_product_cube_map_1of3 = 290,
  108. dot_product_cube_map_2of3 = 291,
  109. dot_product_cube_map_3of3 = 292,
  110. dot_product_reflect_cube_map_eye_from_qs_1of3 = 293,
  111. dot_product_reflect_cube_map_eye_from_qs_2of3 = 294,
  112. dot_product_reflect_cube_map_eye_from_qs_3of3 = 295,
  113. dot_product_reflect_cube_map_const_eye_1of3 = 296,
  114. dot_product_reflect_cube_map_const_eye_2of3 = 297,
  115. dot_product_reflect_cube_map_const_eye_3of3 = 298,
  116. dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3 = 299,
  117. dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3 = 300,
  118. dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3 = 301,
  119. dot_product_cube_map_and_reflect_cube_map_const_eye_1of3 = 302,
  120. dot_product_cube_map_and_reflect_cube_map_const_eye_2of3 = 303,
  121. dot_product_cube_map_and_reflect_cube_map_const_eye_3of3 = 304
  122. };
  123. #endif
  124. #define floatValue 258
  125. #define gequal 259
  126. #define less 260
  127. #define texVariable 261
  128. #define expandString 262
  129. #define openParen 263
  130. #define closeParen 264
  131. #define semicolon 265
  132. #define comma 266
  133. #define nop 267
  134. #define texture_1d 268
  135. #define texture_2d 269
  136. #define texture_rectangle 270
  137. #define texture_3d 271
  138. #define texture_cube_map 272
  139. #define cull_fragment 273
  140. #define pass_through 274
  141. #define offset_2d_scale 275
  142. #define offset_2d 276
  143. #define offset_rectangle_scale 277
  144. #define offset_rectangle 278
  145. #define dependent_ar 279
  146. #define dependent_gb 280
  147. #define dot_product_2d_1of2 281
  148. #define dot_product_2d_2of2 282
  149. #define dot_product_rectangle_1of2 283
  150. #define dot_product_rectangle_2of2 284
  151. #define dot_product_depth_replace_1of2 285
  152. #define dot_product_depth_replace_2of2 286
  153. #define dot_product_3d_1of3 287
  154. #define dot_product_3d_2of3 288
  155. #define dot_product_3d_3of3 289
  156. #define dot_product_cube_map_1of3 290
  157. #define dot_product_cube_map_2of3 291
  158. #define dot_product_cube_map_3of3 292
  159. #define dot_product_reflect_cube_map_eye_from_qs_1of3 293
  160. #define dot_product_reflect_cube_map_eye_from_qs_2of3 294
  161. #define dot_product_reflect_cube_map_eye_from_qs_3of3 295
  162. #define dot_product_reflect_cube_map_const_eye_1of3 296
  163. #define dot_product_reflect_cube_map_const_eye_2of3 297
  164. #define dot_product_reflect_cube_map_const_eye_3of3 298
  165. #define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3 299
  166. #define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3 300
  167. #define dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3 301
  168. #define dot_product_cube_map_and_reflect_cube_map_const_eye_1of3 302
  169. #define dot_product_cube_map_and_reflect_cube_map_const_eye_2of3 303
  170. #define dot_product_cube_map_and_reflect_cube_map_const_eye_3of3 304
  171. /* Copy the first part of user declarations. */
  172. #line 3 "ts1.0_grammar.y"
  173. void yyerror(const char* s);
  174. int yylex ( void );
  175. #ifdef _WIN32
  176. # define WIN32_LEAN_AND_MEAN
  177. # if !defined(NOMINMAX) && defined(_MSC_VER)
  178. # define NOMINMAX // required to stop windows.h messing up std::min
  179. # endif
  180. # include <windows.h>
  181. #endif
  182. #include <stdio.h>
  183. #include <stdlib.h>
  184. #include "ts1.0_inst.h"
  185. #include "ts1.0_inst_list.h"
  186. #include "nvparse_errors.h"
  187. #include "nvparse_externs.h"
  188. /* Enabling traces. */
  189. #ifndef YYDEBUG
  190. # define YYDEBUG 0
  191. #endif
  192. /* Enabling verbose error messages. */
  193. #ifdef YYERROR_VERBOSE
  194. # undef YYERROR_VERBOSE
  195. # define YYERROR_VERBOSE 1
  196. #else
  197. # define YYERROR_VERBOSE 0
  198. #endif
  199. #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
  200. #line 18 "ts1.0_grammar.y"
  201. typedef union YYSTYPE {
  202. float fval;
  203. InstPtr inst;
  204. InstListPtr instList;
  205. MappedVariablePtr variable;
  206. } YYSTYPE;
  207. /* Line 191 of yacc.c. */
  208. #line 205 "_ts1.0_parser.c"
  209. # define yystype YYSTYPE /* obsolescent; will be withdrawn */
  210. # define YYSTYPE_IS_DECLARED 1
  211. # define YYSTYPE_IS_TRIVIAL 1
  212. #endif
  213. /* Copy the second part of user declarations. */
  214. /* Line 214 of yacc.c. */
  215. #line 217 "_ts1.0_parser.c"
  216. #if ! defined (yyoverflow) || YYERROR_VERBOSE
  217. /* The parser invokes alloca or malloc; define the necessary symbols. */
  218. # if YYSTACK_USE_ALLOCA
  219. # define YYSTACK_ALLOC alloca
  220. # else
  221. # ifndef YYSTACK_USE_ALLOCA
  222. # if defined (alloca) || defined (_ALLOCA_H)
  223. # define YYSTACK_ALLOC alloca
  224. # else
  225. # ifdef __GNUC__
  226. # define YYSTACK_ALLOC __builtin_alloca
  227. # endif
  228. # endif
  229. # endif
  230. # endif
  231. # ifdef YYSTACK_ALLOC
  232. /* Pacify GCC's `empty if-body' warning. */
  233. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  234. # else
  235. # if defined (__STDC__) || defined (__cplusplus)
  236. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  237. # define YYSIZE_T size_t
  238. # endif
  239. # define YYSTACK_ALLOC malloc
  240. # define YYSTACK_FREE free
  241. # endif
  242. #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
  243. #if (! defined (yyoverflow) \
  244. && (! defined (__cplusplus) \
  245. || (YYSTYPE_IS_TRIVIAL)))
  246. /* A type that is properly aligned for any stack member. */
  247. union yyalloc
  248. {
  249. short yyss;
  250. YYSTYPE yyvs;
  251. };
  252. /* The size of the maximum gap between one aligned stack and the next. */
  253. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  254. /* The size of an array large to enough to hold all stacks, each with
  255. N elements. */
  256. # define YYSTACK_BYTES(N) \
  257. ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
  258. + YYSTACK_GAP_MAXIMUM)
  259. /* Copy COUNT objects from FROM to TO. The source and destination do
  260. not overlap. */
  261. # ifndef YYCOPY
  262. # if 1 < __GNUC__
  263. # define YYCOPY(To, From, Count) \
  264. __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
  265. # else
  266. # define YYCOPY(To, From, Count) \
  267. do \
  268. { \
  269. register YYSIZE_T yyi; \
  270. for (yyi = 0; yyi < (Count); yyi++) \
  271. (To)[yyi] = (From)[yyi]; \
  272. } \
  273. while (0)
  274. # endif
  275. # endif
  276. /* Relocate STACK from its old location to the new one. The
  277. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  278. elements in the stack, and YYPTR gives the new location of the
  279. stack. Advance YYPTR to a properly aligned location for the next
  280. stack. */
  281. # define YYSTACK_RELOCATE(Stack) \
  282. do \
  283. { \
  284. YYSIZE_T yynewbytes; \
  285. YYCOPY (&yyptr->Stack, Stack, yysize); \
  286. Stack = &yyptr->Stack; \
  287. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  288. yyptr += yynewbytes / sizeof (*yyptr); \
  289. } \
  290. while (0)
  291. #endif
  292. #if defined (__STDC__) || defined (__cplusplus)
  293. typedef signed char yysigned_char;
  294. #else
  295. typedef short yysigned_char;
  296. #endif
  297. /* YYFINAL -- State number of the termination state. */
  298. #define YYFINAL 80
  299. /* YYLAST -- Last index in YYTABLE. */
  300. #define YYLAST 223
  301. /* YYNTOKENS -- Number of terminals. */
  302. #define YYNTOKENS 50
  303. /* YYNNTS -- Number of nonterminals. */
  304. #define YYNNTS 6
  305. /* YYNRULES -- Number of rules. */
  306. #define YYNRULES 46
  307. /* YYNRULES -- Number of states. */
  308. #define YYNSTATES 218
  309. /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  310. #define YYUNDEFTOK 2
  311. #define YYMAXUTOK 304
  312. #define YYTRANSLATE(YYX) \
  313. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  314. /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
  315. static const unsigned char yytranslate[] =
  316. {
  317. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  318. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  319. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  320. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  321. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  322. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  323. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  324. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  325. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  326. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  327. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  328. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  329. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  330. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  331. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  332. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  333. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  334. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  335. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  336. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  337. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  338. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  339. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  340. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  341. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  342. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  343. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  344. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  345. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  346. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  347. 45, 46, 47, 48, 49
  348. };
  349. #if YYDEBUG
  350. /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  351. YYRHS. */
  352. static const unsigned short yyprhs[] =
  353. {
  354. 0, 0, 3, 5, 9, 12, 17, 19, 23, 27,
  355. 31, 35, 39, 43, 54, 58, 75, 88, 105, 118,
  356. 123, 128, 133, 138, 143, 148, 153, 158, 163, 168,
  357. 173, 178, 183, 188, 193, 198, 203, 214, 219, 224,
  358. 229, 234, 239, 250, 255, 260, 262
  359. };
  360. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  361. static const yysigned_char yyrhs[] =
  362. {
  363. 51, 0, -1, 52, -1, 52, 54, 10, -1, 54,
  364. 10, -1, 7, 8, 6, 9, -1, 6, -1, 12,
  365. 8, 9, -1, 13, 8, 9, -1, 14, 8, 9,
  366. -1, 15, 8, 9, -1, 16, 8, 9, -1, 17,
  367. 8, 9, -1, 18, 8, 55, 11, 55, 11, 55,
  368. 11, 55, 9, -1, 19, 8, 9, -1, 20, 8,
  369. 6, 11, 3, 11, 3, 11, 3, 11, 3, 11,
  370. 3, 11, 3, 9, -1, 21, 8, 6, 11, 3,
  371. 11, 3, 11, 3, 11, 3, 9, -1, 22, 8,
  372. 6, 11, 3, 11, 3, 11, 3, 11, 3, 11,
  373. 3, 11, 3, 9, -1, 23, 8, 6, 11, 3,
  374. 11, 3, 11, 3, 11, 3, 9, -1, 24, 8,
  375. 6, 9, -1, 25, 8, 6, 9, -1, 26, 8,
  376. 53, 9, -1, 27, 8, 53, 9, -1, 28, 8,
  377. 53, 9, -1, 29, 8, 53, 9, -1, 30, 8,
  378. 53, 9, -1, 31, 8, 53, 9, -1, 32, 8,
  379. 53, 9, -1, 33, 8, 53, 9, -1, 34, 8,
  380. 53, 9, -1, 35, 8, 53, 9, -1, 36, 8,
  381. 53, 9, -1, 37, 8, 53, 9, -1, 38, 8,
  382. 53, 9, -1, 39, 8, 53, 9, -1, 40, 8,
  383. 53, 9, -1, 41, 8, 53, 11, 3, 11, 3,
  384. 11, 3, 9, -1, 42, 8, 53, 9, -1, 43,
  385. 8, 53, 9, -1, 44, 8, 53, 9, -1, 45,
  386. 8, 53, 9, -1, 46, 8, 53, 9, -1, 47,
  387. 8, 53, 11, 3, 11, 3, 11, 3, 9, -1,
  388. 48, 8, 53, 9, -1, 49, 8, 53, 9, -1,
  389. 4, -1, 5, -1
  390. };
  391. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  392. static const unsigned short yyrline[] =
  393. {
  394. 0, 73, 73, 81, 87, 97, 103, 111, 115, 119,
  395. 123, 127, 131, 135, 139, 143, 147, 151, 155, 159,
  396. 163, 167, 172, 177, 182, 187, 192, 197, 202, 207,
  397. 212, 217, 222, 227, 232, 237, 242, 247, 252, 257,
  398. 262, 267, 272, 277, 282, 289, 293
  399. };
  400. #endif
  401. #if YYDEBUG || YYERROR_VERBOSE
  402. /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  403. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  404. static const char *const yytname[] =
  405. {
  406. "$end", "error", "$undefined", "floatValue", "gequal", "less",
  407. "texVariable", "expandString", "openParen", "closeParen", "semicolon",
  408. "comma", "nop", "texture_1d", "texture_2d", "texture_rectangle",
  409. "texture_3d", "texture_cube_map", "cull_fragment", "pass_through",
  410. "offset_2d_scale", "offset_2d", "offset_rectangle_scale",
  411. "offset_rectangle", "dependent_ar", "dependent_gb",
  412. "dot_product_2d_1of2", "dot_product_2d_2of2",
  413. "dot_product_rectangle_1of2", "dot_product_rectangle_2of2",
  414. "dot_product_depth_replace_1of2", "dot_product_depth_replace_2of2",
  415. "dot_product_3d_1of3", "dot_product_3d_2of3", "dot_product_3d_3of3",
  416. "dot_product_cube_map_1of3", "dot_product_cube_map_2of3",
  417. "dot_product_cube_map_3of3",
  418. "dot_product_reflect_cube_map_eye_from_qs_1of3",
  419. "dot_product_reflect_cube_map_eye_from_qs_2of3",
  420. "dot_product_reflect_cube_map_eye_from_qs_3of3",
  421. "dot_product_reflect_cube_map_const_eye_1of3",
  422. "dot_product_reflect_cube_map_const_eye_2of3",
  423. "dot_product_reflect_cube_map_const_eye_3of3",
  424. "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_1of3",
  425. "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_2of3",
  426. "dot_product_cube_map_and_reflect_cube_map_eye_from_qs_3of3",
  427. "dot_product_cube_map_and_reflect_cube_map_const_eye_1of3",
  428. "dot_product_cube_map_and_reflect_cube_map_const_eye_2of3",
  429. "dot_product_cube_map_and_reflect_cube_map_const_eye_3of3", "$accept",
  430. "WholeEnchilada", "InstListDesc", "MappedVariableDesc", "InstDesc",
  431. "CondDesc", 0
  432. };
  433. #endif
  434. # ifdef YYPRINT
  435. /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  436. token YYLEX-NUM. */
  437. static const unsigned short yytoknum[] =
  438. {
  439. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  440. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  441. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  442. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  443. 295, 296, 297, 298, 299, 300, 301, 302, 303, 304
  444. };
  445. # endif
  446. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  447. static const unsigned char yyr1[] =
  448. {
  449. 0, 50, 51, 52, 52, 53, 53, 54, 54, 54,
  450. 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
  451. 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
  452. 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
  453. 54, 54, 54, 54, 54, 55, 55
  454. };
  455. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  456. static const unsigned char yyr2[] =
  457. {
  458. 0, 2, 1, 3, 2, 4, 1, 3, 3, 3,
  459. 3, 3, 3, 10, 3, 16, 12, 16, 12, 4,
  460. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  461. 4, 4, 4, 4, 4, 4, 10, 4, 4, 4,
  462. 4, 4, 10, 4, 4, 1, 1
  463. };
  464. /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
  465. STATE-NUM when YYTABLE doesn't specify something else to do. Zero
  466. means the default is an error. */
  467. static const unsigned char yydefact[] =
  468. {
  469. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  470. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  471. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  472. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  473. 2, 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. 1, 0, 4, 7, 8, 9, 10, 11, 12, 45,
  478. 46, 0, 14, 0, 0, 0, 0, 0, 0, 6,
  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, 3, 0, 0, 0, 0,
  482. 0, 19, 20, 0, 21, 22, 23, 24, 25, 26,
  483. 27, 28, 29, 30, 31, 32, 33, 34, 35, 0,
  484. 37, 38, 39, 40, 41, 0, 43, 44, 0, 0,
  485. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  486. 0, 5, 0, 0, 0, 0, 0, 0, 0, 0,
  487. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  488. 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
  489. 36, 42, 0, 0, 0, 0, 0, 16, 0, 18,
  490. 0, 0, 0, 0, 0, 0, 15, 17
  491. };
  492. /* YYDEFGOTO[NTERM-NUM]. */
  493. static const yysigned_char yydefgoto[] =
  494. {
  495. -1, 39, 40, 101, 41, 91
  496. };
  497. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  498. STATE-NUM. */
  499. #define YYPACT_NINF -127
  500. static const short yypact[] =
  501. {
  502. -11, 31, 35, 39, 40, 41, 42, 43, 44, 45,
  503. 46, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  504. 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
  505. 90, 91, 92, 93, 94, 95, 96, 97, 98, 107,
  506. -11, 36, 99, 100, 101, 102, 103, 104, 37, 105,
  507. 109, 110, 111, 112, 113, 114, 38, 38, 38, 38,
  508. 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
  509. 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
  510. -127, 115, -127, -127, -127, -127, -127, -127, -127, -127,
  511. -127, 116, -127, 117, 118, 119, 120, 123, 124, -127,
  512. 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
  513. 136, 137, 138, 139, 140, 141, 142, 143, 145, 146,
  514. 147, 148, 149, 150, 152, -127, 37, 121, 155, 159,
  515. 160, -127, -127, 158, -127, -127, -127, -127, -127, -127,
  516. -127, -127, -127, -127, -127, -127, -127, -127, -127, 162,
  517. -127, -127, -127, -127, -127, 163, -127, -127, 156, 157,
  518. 161, 164, 165, 168, 167, 169, 37, 166, 170, 171,
  519. 176, -127, 178, 179, 172, 173, 174, 175, 177, 180,
  520. 181, 37, 184, 186, 187, 190, 191, 192, 188, 185,
  521. 189, 193, 194, 197, 198, -127, 195, 196, 199, 200,
  522. -127, -127, 201, 202, 203, 204, 205, -127, 206, -127,
  523. 207, 208, 212, 213, 211, 214, -127, -127
  524. };
  525. /* YYPGOTO[NTERM-NUM]. */
  526. static const short yypgoto[] =
  527. {
  528. -127, -127, -127, -1, 182, -126
  529. };
  530. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  531. positive, shift that token. If negative, reduce the rule which
  532. number is the opposite. If zero, do what YYDEFACT says.
  533. If YYTABLE_NINF, syntax error. */
  534. #define YYTABLE_NINF -1
  535. static const unsigned char yytable[] =
  536. {
  537. 158, 1, 2, 3, 4, 5, 6, 7, 8, 9,
  538. 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
  539. 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
  540. 30, 31, 32, 33, 34, 35, 36, 37, 38, 42,
  541. 174, 89, 90, 43, 99, 100, 82, 44, 45, 46,
  542. 47, 48, 49, 50, 51, 188, 102, 103, 104, 105,
  543. 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
  544. 116, 117, 118, 119, 120, 121, 122, 123, 124, 52,
  545. 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
  546. 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
  547. 73, 74, 75, 76, 77, 78, 79, 80, 83, 84,
  548. 85, 86, 87, 88, 92, 93, 94, 95, 96, 97,
  549. 98, 0, 0, 0, 159, 125, 0, 126, 127, 128,
  550. 129, 130, 131, 132, 133, 0, 134, 135, 136, 137,
  551. 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
  552. 148, 0, 150, 149, 151, 152, 153, 154, 160, 156,
  553. 155, 157, 161, 162, 163, 164, 165, 166, 167, 175,
  554. 0, 0, 168, 176, 177, 169, 170, 171, 172, 178,
  555. 173, 179, 180, 181, 182, 183, 184, 189, 185, 190,
  556. 191, 186, 187, 192, 193, 194, 196, 195, 202, 203,
  557. 197, 0, 204, 205, 198, 199, 200, 201, 210, 211,
  558. 0, 207, 206, 209, 208, 214, 215, 0, 212, 213,
  559. 216, 0, 81, 217
  560. };
  561. static const short yycheck[] =
  562. {
  563. 126, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  564. 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
  565. 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
  566. 41, 42, 43, 44, 45, 46, 47, 48, 49, 8,
  567. 166, 4, 5, 8, 6, 7, 10, 8, 8, 8,
  568. 8, 8, 8, 8, 8, 181, 57, 58, 59, 60,
  569. 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
  570. 71, 72, 73, 74, 75, 76, 77, 78, 79, 8,
  571. 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  572. 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  573. 8, 8, 8, 8, 8, 8, 8, 0, 9, 9,
  574. 9, 9, 9, 9, 9, 6, 6, 6, 6, 6,
  575. 6, -1, -1, -1, 3, 10, -1, 11, 11, 11,
  576. 11, 11, 9, 9, 8, -1, 9, 9, 9, 9,
  577. 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
  578. 9, -1, 9, 11, 9, 9, 9, 9, 3, 9,
  579. 11, 9, 3, 3, 6, 3, 3, 11, 11, 3,
  580. -1, -1, 11, 3, 3, 11, 11, 9, 11, 3,
  581. 11, 3, 3, 11, 11, 11, 11, 3, 11, 3,
  582. 3, 11, 11, 3, 3, 3, 11, 9, 3, 3,
  583. 11, -1, 3, 3, 11, 11, 9, 9, 3, 3,
  584. -1, 9, 11, 9, 11, 3, 3, -1, 11, 11,
  585. 9, -1, 40, 9
  586. };
  587. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  588. symbol of state STATE-NUM. */
  589. static const unsigned char yystos[] =
  590. {
  591. 0, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  592. 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
  593. 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
  594. 41, 42, 43, 44, 45, 46, 47, 48, 49, 51,
  595. 52, 54, 8, 8, 8, 8, 8, 8, 8, 8,
  596. 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  597. 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  598. 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  599. 0, 54, 10, 9, 9, 9, 9, 9, 9, 4,
  600. 5, 55, 9, 6, 6, 6, 6, 6, 6, 6,
  601. 7, 53, 53, 53, 53, 53, 53, 53, 53, 53,
  602. 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
  603. 53, 53, 53, 53, 53, 10, 11, 11, 11, 11,
  604. 11, 9, 9, 8, 9, 9, 9, 9, 9, 9,
  605. 9, 9, 9, 9, 9, 9, 9, 9, 9, 11,
  606. 9, 9, 9, 9, 9, 11, 9, 9, 55, 3,
  607. 3, 3, 3, 6, 3, 3, 11, 11, 11, 11,
  608. 11, 9, 11, 11, 55, 3, 3, 3, 3, 3,
  609. 3, 11, 11, 11, 11, 11, 11, 11, 55, 3,
  610. 3, 3, 3, 3, 3, 9, 11, 11, 11, 11,
  611. 9, 9, 3, 3, 3, 3, 11, 9, 11, 9,
  612. 3, 3, 11, 11, 3, 3, 9, 9
  613. };
  614. #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
  615. # define YYSIZE_T __SIZE_TYPE__
  616. #endif
  617. #if ! defined (YYSIZE_T) && defined (size_t)
  618. # define YYSIZE_T size_t
  619. #endif
  620. #if ! defined (YYSIZE_T)
  621. # if defined (__STDC__) || defined (__cplusplus)
  622. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  623. # define YYSIZE_T size_t
  624. # endif
  625. #endif
  626. #if ! defined (YYSIZE_T)
  627. # define YYSIZE_T unsigned int
  628. #endif
  629. #define yyerrok (yyerrstatus = 0)
  630. #define yyclearin (yychar = YYEMPTY)
  631. #define YYEMPTY (-2)
  632. #define YYEOF 0
  633. #define YYACCEPT goto yyacceptlab
  634. #define YYABORT goto yyabortlab
  635. #define YYERROR goto yyerrlab1
  636. /* Like YYERROR except do call yyerror. This remains here temporarily
  637. to ease the transition to the new meaning of YYERROR, for GCC.
  638. Once GCC version 2 has supplanted version 1, this can go. */
  639. #define YYFAIL goto yyerrlab
  640. #define YYRECOVERING() (!!yyerrstatus)
  641. #define YYBACKUP(Token, Value) \
  642. do \
  643. if (yychar == YYEMPTY && yylen == 1) \
  644. { \
  645. yychar = (Token); \
  646. yylval = (Value); \
  647. yytoken = YYTRANSLATE (yychar); \
  648. YYPOPSTACK; \
  649. goto yybackup; \
  650. } \
  651. else \
  652. { \
  653. yyerror ("syntax error: cannot back up");\
  654. YYERROR; \
  655. } \
  656. while (0)
  657. #define YYTERROR 1
  658. #define YYERRCODE 256
  659. /* YYLLOC_DEFAULT -- Compute the default location (before the actions
  660. are run). */
  661. #ifndef YYLLOC_DEFAULT
  662. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  663. Current.first_line = Rhs[1].first_line; \
  664. Current.first_column = Rhs[1].first_column; \
  665. Current.last_line = Rhs[N].last_line; \
  666. Current.last_column = Rhs[N].last_column;
  667. #endif
  668. /* YYLEX -- calling `yylex' with the right arguments. */
  669. #ifdef YYLEX_PARAM
  670. # define YYLEX yylex (YYLEX_PARAM)
  671. #else
  672. # define YYLEX yylex ()
  673. #endif
  674. /* Enable debugging if requested. */
  675. #if YYDEBUG
  676. # ifndef YYFPRINTF
  677. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  678. # define YYFPRINTF fprintf
  679. # endif
  680. # define YYDPRINTF(Args) \
  681. do { \
  682. if (yydebug) \
  683. YYFPRINTF Args; \
  684. } while (0)
  685. # define YYDSYMPRINT(Args) \
  686. do { \
  687. if (yydebug) \
  688. yysymprint Args; \
  689. } while (0)
  690. # define YYDSYMPRINTF(Title, Token, Value, Location) \
  691. do { \
  692. if (yydebug) \
  693. { \
  694. YYFPRINTF (stderr, "%s ", Title); \
  695. yysymprint (stderr, \
  696. Token, Value); \
  697. YYFPRINTF (stderr, "\n"); \
  698. } \
  699. } while (0)
  700. /*------------------------------------------------------------------.
  701. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  702. | TOP (cinluded). |
  703. `------------------------------------------------------------------*/
  704. #if defined (__STDC__) || defined (__cplusplus)
  705. static void
  706. yy_stack_print (short *bottom, short *top)
  707. #else
  708. static void
  709. yy_stack_print (bottom, top)
  710. short *bottom;
  711. short *top;
  712. #endif
  713. {
  714. YYFPRINTF (stderr, "Stack now");
  715. for (/* Nothing. */; bottom <= top; ++bottom)
  716. YYFPRINTF (stderr, " %d", *bottom);
  717. YYFPRINTF (stderr, "\n");
  718. }
  719. # define YY_STACK_PRINT(Bottom, Top) \
  720. do { \
  721. if (yydebug) \
  722. yy_stack_print ((Bottom), (Top)); \
  723. } while (0)
  724. /*------------------------------------------------.
  725. | Report that the YYRULE is going to be reduced. |
  726. `------------------------------------------------*/
  727. #if defined (__STDC__) || defined (__cplusplus)
  728. static void
  729. yy_reduce_print (int yyrule)
  730. #else
  731. static void
  732. yy_reduce_print (yyrule)
  733. int yyrule;
  734. #endif
  735. {
  736. int yyi;
  737. unsigned int yylineno = yyrline[yyrule];
  738. YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
  739. yyrule - 1, yylineno);
  740. /* Print the symbols being reduced, and their result. */
  741. for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
  742. YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  743. YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
  744. }
  745. # define YY_REDUCE_PRINT(Rule) \
  746. do { \
  747. if (yydebug) \
  748. yy_reduce_print (Rule); \
  749. } while (0)
  750. /* Nonzero means print parse trace. It is left uninitialized so that
  751. multiple parsers can coexist. */
  752. int yydebug;
  753. #else /* !YYDEBUG */
  754. # define YYDPRINTF(Args)
  755. # define YYDSYMPRINT(Args)
  756. # define YYDSYMPRINTF(Title, Token, Value, Location)
  757. # define YY_STACK_PRINT(Bottom, Top)
  758. # define YY_REDUCE_PRINT(Rule)
  759. #endif /* !YYDEBUG */
  760. /* YYINITDEPTH -- initial size of the parser's stacks. */
  761. #ifndef YYINITDEPTH
  762. # define YYINITDEPTH 200
  763. #endif
  764. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  765. if the built-in stack extension method is used).
  766. Do not make this value too large; the results are undefined if
  767. SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
  768. evaluated with infinite-precision integer arithmetic. */
  769. #if YYMAXDEPTH == 0
  770. # undef YYMAXDEPTH
  771. #endif
  772. #ifndef YYMAXDEPTH
  773. # define YYMAXDEPTH 10000
  774. #endif
  775. #if YYERROR_VERBOSE
  776. # ifndef yystrlen
  777. # if defined (__GLIBC__) && defined (_STRING_H)
  778. # define yystrlen strlen
  779. # else
  780. /* Return the length of YYSTR. */
  781. static YYSIZE_T
  782. # if defined (__STDC__) || defined (__cplusplus)
  783. yystrlen (const char *yystr)
  784. # else
  785. yystrlen (yystr)
  786. const char *yystr;
  787. # endif
  788. {
  789. register const char *yys = yystr;
  790. while (*yys++ != '\0')
  791. continue;
  792. return yys - yystr - 1;
  793. }
  794. # endif
  795. # endif
  796. # ifndef yystpcpy
  797. # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
  798. # define yystpcpy stpcpy
  799. # else
  800. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  801. YYDEST. */
  802. static char *
  803. # if defined (__STDC__) || defined (__cplusplus)
  804. yystpcpy (char *yydest, const char *yysrc)
  805. # else
  806. yystpcpy (yydest, yysrc)
  807. char *yydest;
  808. const char *yysrc;
  809. # endif
  810. {
  811. register char *yyd = yydest;
  812. register const char *yys = yysrc;
  813. while ((*yyd++ = *yys++) != '\0')
  814. continue;
  815. return yyd - 1;
  816. }
  817. # endif
  818. # endif
  819. #endif /* !YYERROR_VERBOSE */
  820. #if YYDEBUG
  821. /*--------------------------------.
  822. | Print this symbol on YYOUTPUT. |
  823. `--------------------------------*/
  824. #if defined (__STDC__) || defined (__cplusplus)
  825. static void
  826. yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
  827. #else
  828. static void
  829. yysymprint (yyoutput, yytype, yyvaluep)
  830. FILE *yyoutput;
  831. int yytype;
  832. YYSTYPE *yyvaluep;
  833. #endif
  834. {
  835. /* Pacify ``unused variable'' warnings. */
  836. (void) yyvaluep;
  837. if (yytype < YYNTOKENS)
  838. {
  839. YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  840. # ifdef YYPRINT
  841. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  842. # endif
  843. }
  844. else
  845. YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  846. switch (yytype)
  847. {
  848. default:
  849. break;
  850. }
  851. YYFPRINTF (yyoutput, ")");
  852. }
  853. #endif /* ! YYDEBUG */
  854. /*-----------------------------------------------.
  855. | Release the memory associated to this symbol. |
  856. `-----------------------------------------------*/
  857. #if defined (__STDC__) || defined (__cplusplus)
  858. static void
  859. yydestruct (int yytype, YYSTYPE *yyvaluep)
  860. #else
  861. static void
  862. yydestruct (yytype, yyvaluep)
  863. int yytype;
  864. YYSTYPE *yyvaluep;
  865. #endif
  866. {
  867. /* Pacify ``unused variable'' warnings. */
  868. (void) yyvaluep;
  869. switch (yytype)
  870. {
  871. default:
  872. break;
  873. }
  874. }
  875. /* Prevent warnings from -Wmissing-prototypes. */
  876. #ifdef YYPARSE_PARAM
  877. # if defined (__STDC__) || defined (__cplusplus)
  878. int yyparse (void *YYPARSE_PARAM);
  879. # else
  880. int yyparse ();
  881. # endif
  882. #else /* ! YYPARSE_PARAM */
  883. #if defined (__STDC__) || defined (__cplusplus)
  884. int yyparse (void);
  885. #else
  886. int yyparse ();
  887. #endif
  888. #endif /* ! YYPARSE_PARAM */
  889. /* The lookahead symbol. */
  890. int yychar;
  891. /* The semantic value of the lookahead symbol. */
  892. YYSTYPE yylval;
  893. /* Number of syntax errors so far. */
  894. int yynerrs;
  895. /*----------.
  896. | yyparse. |
  897. `----------*/
  898. #ifdef YYPARSE_PARAM
  899. # if defined (__STDC__) || defined (__cplusplus)
  900. int yyparse (void *YYPARSE_PARAM)
  901. # else
  902. int yyparse (YYPARSE_PARAM)
  903. void *YYPARSE_PARAM;
  904. # endif
  905. #else /* ! YYPARSE_PARAM */
  906. #if defined (__STDC__) || defined (__cplusplus)
  907. int
  908. yyparse (void)
  909. #else
  910. int
  911. yyparse ()
  912. #endif
  913. #endif
  914. {
  915. register int yystate;
  916. register int yyn;
  917. int yyresult;
  918. /* Number of tokens to shift before error messages enabled. */
  919. int yyerrstatus;
  920. /* Lookahead token as an internal (translated) token number. */
  921. int yytoken = 0;
  922. /* Three stacks and their tools:
  923. `yyss': related to states,
  924. `yyvs': related to semantic values,
  925. `yyls': related to locations.
  926. Refer to the stacks thru separate pointers, to allow yyoverflow
  927. to reallocate them elsewhere. */
  928. /* The state stack. */
  929. short yyssa[YYINITDEPTH];
  930. short *yyss = yyssa;
  931. register short *yyssp;
  932. /* The semantic value stack. */
  933. YYSTYPE yyvsa[YYINITDEPTH];
  934. YYSTYPE *yyvs = yyvsa;
  935. register YYSTYPE *yyvsp;
  936. #define YYPOPSTACK (yyvsp--, yyssp--)
  937. YYSIZE_T yystacksize = YYINITDEPTH;
  938. /* The variables used to return semantic value and location from the
  939. action routines. */
  940. YYSTYPE yyval;
  941. /* When reducing, the number of symbols on the RHS of the reduced
  942. rule. */
  943. int yylen;
  944. YYDPRINTF ((stderr, "Starting parse\n"));
  945. yystate = 0;
  946. yyerrstatus = 0;
  947. yynerrs = 0;
  948. yychar = YYEMPTY; /* Cause a token to be read. */
  949. /* Initialize stack pointers.
  950. Waste one element of value and location stack
  951. so that they stay on the same level as the state stack.
  952. The wasted elements are never initialized. */
  953. yyssp = yyss;
  954. yyvsp = yyvs;
  955. goto yysetstate;
  956. /*------------------------------------------------------------.
  957. | yynewstate -- Push a new state, which is found in yystate. |
  958. `------------------------------------------------------------*/
  959. yynewstate:
  960. /* In all cases, when you get here, the value and location stacks
  961. have just been pushed. so pushing a state here evens the stacks.
  962. */
  963. yyssp++;
  964. yysetstate:
  965. *yyssp = yystate;
  966. if (yyss + yystacksize - 1 <= yyssp)
  967. {
  968. /* Get the current used size of the three stacks, in elements. */
  969. YYSIZE_T yysize = yyssp - yyss + 1;
  970. #ifdef yyoverflow
  971. {
  972. /* Give user a chance to reallocate the stack. Use copies of
  973. these so that the &'s don't force the real ones into
  974. memory. */
  975. YYSTYPE *yyvs1 = yyvs;
  976. short *yyss1 = yyss;
  977. /* Each stack pointer address is followed by the size of the
  978. data in use in that stack, in bytes. This used to be a
  979. conditional around just the two extra args, but that might
  980. be undefined if yyoverflow is a macro. */
  981. yyoverflow ("parser stack overflow",
  982. &yyss1, yysize * sizeof (*yyssp),
  983. &yyvs1, yysize * sizeof (*yyvsp),
  984. &yystacksize);
  985. yyss = yyss1;
  986. yyvs = yyvs1;
  987. }
  988. #else /* no yyoverflow */
  989. # ifndef YYSTACK_RELOCATE
  990. goto yyoverflowlab;
  991. # else
  992. /* Extend the stack our own way. */
  993. if (YYMAXDEPTH <= yystacksize)
  994. goto yyoverflowlab;
  995. yystacksize *= 2;
  996. if (YYMAXDEPTH < yystacksize)
  997. yystacksize = YYMAXDEPTH;
  998. {
  999. short *yyss1 = yyss;
  1000. union yyalloc *yyptr =
  1001. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  1002. if (! yyptr)
  1003. goto yyoverflowlab;
  1004. YYSTACK_RELOCATE (yyss);
  1005. YYSTACK_RELOCATE (yyvs);
  1006. # undef YYSTACK_RELOCATE
  1007. if (yyss1 != yyssa)
  1008. YYSTACK_FREE (yyss1);
  1009. }
  1010. # endif
  1011. #endif /* no yyoverflow */
  1012. yyssp = yyss + yysize - 1;
  1013. yyvsp = yyvs + yysize - 1;
  1014. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  1015. (unsigned long int) yystacksize));
  1016. if (yyss + yystacksize - 1 <= yyssp)
  1017. YYABORT;
  1018. }
  1019. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1020. goto yybackup;
  1021. /*-----------.
  1022. | yybackup. |
  1023. `-----------*/
  1024. yybackup:
  1025. /* Do appropriate processing given the current state. */
  1026. /* Read a lookahead token if we need one and don't already have one. */
  1027. /* yyresume: */
  1028. /* First try to decide what to do without reference to lookahead token. */
  1029. yyn = yypact[yystate];
  1030. if (yyn == YYPACT_NINF)
  1031. goto yydefault;
  1032. /* Not known => get a lookahead token if don't already have one. */
  1033. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  1034. if (yychar == YYEMPTY)
  1035. {
  1036. YYDPRINTF ((stderr, "Reading a token: "));
  1037. yychar = YYLEX;
  1038. }
  1039. if (yychar <= YYEOF)
  1040. {
  1041. yychar = yytoken = YYEOF;
  1042. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1043. }
  1044. else
  1045. {
  1046. yytoken = YYTRANSLATE (yychar);
  1047. YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
  1048. }
  1049. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1050. detect an error, take that action. */
  1051. yyn += yytoken;
  1052. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1053. goto yydefault;
  1054. yyn = yytable[yyn];
  1055. if (yyn <= 0)
  1056. {
  1057. if (yyn == 0 || yyn == YYTABLE_NINF)
  1058. goto yyerrlab;
  1059. yyn = -yyn;
  1060. goto yyreduce;
  1061. }
  1062. if (yyn == YYFINAL)
  1063. YYACCEPT;
  1064. /* Shift the lookahead token. */
  1065. YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
  1066. /* Discard the token being shifted unless it is eof. */
  1067. if (yychar != YYEOF)
  1068. yychar = YYEMPTY;
  1069. *++yyvsp = yylval;
  1070. /* Count tokens shifted since error; after three, turn off error
  1071. status. */
  1072. if (yyerrstatus)
  1073. yyerrstatus--;
  1074. yystate = yyn;
  1075. goto yynewstate;
  1076. /*-----------------------------------------------------------.
  1077. | yydefault -- do the default action for the current state. |
  1078. `-----------------------------------------------------------*/
  1079. yydefault:
  1080. yyn = yydefact[yystate];
  1081. if (yyn == 0)
  1082. goto yyerrlab;
  1083. goto yyreduce;
  1084. /*-----------------------------.
  1085. | yyreduce -- Do a reduction. |
  1086. `-----------------------------*/
  1087. yyreduce:
  1088. /* yyn is the number of a rule to reduce with. */
  1089. yylen = yyr2[yyn];
  1090. /* If YYLEN is nonzero, implement the default value of the action:
  1091. `$$ = $1'.
  1092. Otherwise, the following line sets YYVAL to garbage.
  1093. This behavior is undocumented and Bison
  1094. users should not rely upon it. Assigning to YYVAL
  1095. unconditionally makes the parser a bit smaller, and it avoids a
  1096. GCC warning that YYVAL may be used uninitialized. */
  1097. yyval = yyvsp[1-yylen];
  1098. YY_REDUCE_PRINT (yyn);
  1099. switch (yyn)
  1100. {
  1101. case 2:
  1102. #line 74 "ts1.0_grammar.y"
  1103. {
  1104. yyvsp[0].instList->Validate();
  1105. yyvsp[0].instList->Invoke();
  1106. delete yyvsp[0].instList;
  1107. ;}
  1108. break;
  1109. case 3:
  1110. #line 82 "ts1.0_grammar.y"
  1111. {
  1112. *(yyvsp[-2].instList) += yyvsp[-1].inst;
  1113. delete yyvsp[-1].inst;
  1114. yyval.instList = yyvsp[-2].instList;
  1115. ;}
  1116. break;
  1117. case 4:
  1118. #line 88 "ts1.0_grammar.y"
  1119. {
  1120. InstListPtr instList = new InstList;
  1121. *instList += yyvsp[-1].inst;
  1122. delete yyvsp[-1].inst;
  1123. yyval.instList = instList;
  1124. ;}
  1125. break;
  1126. case 5:
  1127. #line 98 "ts1.0_grammar.y"
  1128. {
  1129. yyval.variable = new MappedVariable;
  1130. yyval.variable->var = yyvsp[-1].fval;
  1131. yyval.variable->expand = true;
  1132. ;}
  1133. break;
  1134. case 6:
  1135. #line 104 "ts1.0_grammar.y"
  1136. {
  1137. yyval.variable = new MappedVariable;
  1138. yyval.variable->var = yyvsp[0].fval;
  1139. yyval.variable->expand = false;
  1140. ;}
  1141. break;
  1142. case 7:
  1143. #line 112 "ts1.0_grammar.y"
  1144. {
  1145. yyval.inst = new Inst(TSP_NOP);
  1146. ;}
  1147. break;
  1148. case 8:
  1149. #line 116 "ts1.0_grammar.y"
  1150. {
  1151. yyval.inst = new Inst(TSP_TEXTURE_1D);
  1152. ;}
  1153. break;
  1154. case 9:
  1155. #line 120 "ts1.0_grammar.y"
  1156. {
  1157. yyval.inst = new Inst(TSP_TEXTURE_2D);
  1158. ;}
  1159. break;
  1160. case 10:
  1161. #line 124 "ts1.0_grammar.y"
  1162. {
  1163. yyval.inst = new Inst(TSP_TEXTURE_RECTANGLE);
  1164. ;}
  1165. break;
  1166. case 11:
  1167. #line 128 "ts1.0_grammar.y"
  1168. {
  1169. yyval.inst = new Inst(TSP_TEXTURE_3D);
  1170. ;}
  1171. break;
  1172. case 12:
  1173. #line 132 "ts1.0_grammar.y"
  1174. {
  1175. yyval.inst = new Inst(TSP_TEXTURE_CUBE_MAP);
  1176. ;}
  1177. break;
  1178. case 13:
  1179. #line 136 "ts1.0_grammar.y"
  1180. {
  1181. yyval.inst = new Inst(TSP_CULL_FRAGMENT, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
  1182. ;}
  1183. break;
  1184. case 14:
  1185. #line 140 "ts1.0_grammar.y"
  1186. {
  1187. yyval.inst = new Inst(TSP_PASS_THROUGH);
  1188. ;}
  1189. break;
  1190. case 15:
  1191. #line 144 "ts1.0_grammar.y"
  1192. {
  1193. yyval.inst = new Inst(TSP_OFFSET_2D_SCALE, yyvsp[-13].fval, yyvsp[-11].fval, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
  1194. ;}
  1195. break;
  1196. case 16:
  1197. #line 148 "ts1.0_grammar.y"
  1198. {
  1199. yyval.inst = new Inst(TSP_OFFSET_2D, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
  1200. ;}
  1201. break;
  1202. case 17:
  1203. #line 152 "ts1.0_grammar.y"
  1204. {
  1205. yyval.inst = new Inst(TSP_OFFSET_RECTANGLE_SCALE, yyvsp[-13].fval, yyvsp[-11].fval, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
  1206. ;}
  1207. break;
  1208. case 18:
  1209. #line 156 "ts1.0_grammar.y"
  1210. {
  1211. yyval.inst = new Inst(TSP_OFFSET_RECTANGLE, yyvsp[-9].fval, yyvsp[-7].fval, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
  1212. ;}
  1213. break;
  1214. case 19:
  1215. #line 160 "ts1.0_grammar.y"
  1216. {
  1217. yyval.inst = new Inst(TSP_DEPENDENT_AR, yyvsp[-1].fval);
  1218. ;}
  1219. break;
  1220. case 20:
  1221. #line 164 "ts1.0_grammar.y"
  1222. {
  1223. yyval.inst = new Inst(TSP_DEPENDENT_GB, yyvsp[-1].fval);
  1224. ;}
  1225. break;
  1226. case 21:
  1227. #line 168 "ts1.0_grammar.y"
  1228. {
  1229. yyval.inst = new Inst(TSP_DOT_PRODUCT_2D_1_OF_2, yyvsp[-1].variable);
  1230. delete yyvsp[-1].variable;
  1231. ;}
  1232. break;
  1233. case 22:
  1234. #line 173 "ts1.0_grammar.y"
  1235. {
  1236. yyval.inst = new Inst(TSP_DOT_PRODUCT_2D_2_OF_2, yyvsp[-1].variable);
  1237. delete yyvsp[-1].variable;
  1238. ;}
  1239. break;
  1240. case 23:
  1241. #line 178 "ts1.0_grammar.y"
  1242. {
  1243. yyval.inst = new Inst(TSP_DOT_PRODUCT_RECTANGLE_1_OF_2, yyvsp[-1].variable);
  1244. delete yyvsp[-1].variable;
  1245. ;}
  1246. break;
  1247. case 24:
  1248. #line 183 "ts1.0_grammar.y"
  1249. {
  1250. yyval.inst = new Inst(TSP_DOT_PRODUCT_RECTANGLE_2_OF_2, yyvsp[-1].variable);
  1251. delete yyvsp[-1].variable;
  1252. ;}
  1253. break;
  1254. case 25:
  1255. #line 188 "ts1.0_grammar.y"
  1256. {
  1257. yyval.inst = new Inst(TSP_DOT_PRODUCT_DEPTH_REPLACE_1_OF_2, yyvsp[-1].variable);
  1258. delete yyvsp[-1].variable;
  1259. ;}
  1260. break;
  1261. case 26:
  1262. #line 193 "ts1.0_grammar.y"
  1263. {
  1264. yyval.inst = new Inst(TSP_DOT_PRODUCT_DEPTH_REPLACE_2_OF_2, yyvsp[-1].variable);
  1265. delete yyvsp[-1].variable;
  1266. ;}
  1267. break;
  1268. case 27:
  1269. #line 198 "ts1.0_grammar.y"
  1270. {
  1271. yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_1_OF_3, yyvsp[-1].variable);
  1272. delete yyvsp[-1].variable;
  1273. ;}
  1274. break;
  1275. case 28:
  1276. #line 203 "ts1.0_grammar.y"
  1277. {
  1278. yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_2_OF_3, yyvsp[-1].variable);
  1279. delete yyvsp[-1].variable;
  1280. ;}
  1281. break;
  1282. case 29:
  1283. #line 208 "ts1.0_grammar.y"
  1284. {
  1285. yyval.inst = new Inst(TSP_DOT_PRODUCT_3D_3_OF_3, yyvsp[-1].variable);
  1286. delete yyvsp[-1].variable;
  1287. ;}
  1288. break;
  1289. case 30:
  1290. #line 213 "ts1.0_grammar.y"
  1291. {
  1292. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_1_OF_3, yyvsp[-1].variable);
  1293. delete yyvsp[-1].variable;
  1294. ;}
  1295. break;
  1296. case 31:
  1297. #line 218 "ts1.0_grammar.y"
  1298. {
  1299. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_2_OF_3, yyvsp[-1].variable);
  1300. delete yyvsp[-1].variable;
  1301. ;}
  1302. break;
  1303. case 32:
  1304. #line 223 "ts1.0_grammar.y"
  1305. {
  1306. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_3_OF_3, yyvsp[-1].variable);
  1307. delete yyvsp[-1].variable;
  1308. ;}
  1309. break;
  1310. case 33:
  1311. #line 228 "ts1.0_grammar.y"
  1312. {
  1313. yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3, yyvsp[-1].variable);
  1314. delete yyvsp[-1].variable;
  1315. ;}
  1316. break;
  1317. case 34:
  1318. #line 233 "ts1.0_grammar.y"
  1319. {
  1320. yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3, yyvsp[-1].variable);
  1321. delete yyvsp[-1].variable;
  1322. ;}
  1323. break;
  1324. case 35:
  1325. #line 238 "ts1.0_grammar.y"
  1326. {
  1327. yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3, yyvsp[-1].variable);
  1328. delete yyvsp[-1].variable;
  1329. ;}
  1330. break;
  1331. case 36:
  1332. #line 243 "ts1.0_grammar.y"
  1333. {
  1334. yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3, yyvsp[-7].variable, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
  1335. delete yyvsp[-7].variable;
  1336. ;}
  1337. break;
  1338. case 37:
  1339. #line 248 "ts1.0_grammar.y"
  1340. {
  1341. yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3, yyvsp[-1].variable);
  1342. delete yyvsp[-1].variable;
  1343. ;}
  1344. break;
  1345. case 38:
  1346. #line 253 "ts1.0_grammar.y"
  1347. {
  1348. yyval.inst = new Inst(TSP_DOT_PRODUCT_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3, yyvsp[-1].variable);
  1349. delete yyvsp[-1].variable;
  1350. ;}
  1351. break;
  1352. case 39:
  1353. #line 258 "ts1.0_grammar.y"
  1354. {
  1355. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_1_OF_3, yyvsp[-1].variable);
  1356. delete yyvsp[-1].variable;
  1357. ;}
  1358. break;
  1359. case 40:
  1360. #line 263 "ts1.0_grammar.y"
  1361. {
  1362. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_2_OF_3, yyvsp[-1].variable);
  1363. delete yyvsp[-1].variable;
  1364. ;}
  1365. break;
  1366. case 41:
  1367. #line 268 "ts1.0_grammar.y"
  1368. {
  1369. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_EYE_FROM_QS_3_OF_3, yyvsp[-1].variable);
  1370. delete yyvsp[-1].variable;
  1371. ;}
  1372. break;
  1373. case 42:
  1374. #line 273 "ts1.0_grammar.y"
  1375. {
  1376. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_1_OF_3, yyvsp[-7].variable, yyvsp[-5].fval, yyvsp[-3].fval, yyvsp[-1].fval);
  1377. delete yyvsp[-7].variable;
  1378. ;}
  1379. break;
  1380. case 43:
  1381. #line 278 "ts1.0_grammar.y"
  1382. {
  1383. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_2_OF_3, yyvsp[-1].variable);
  1384. delete yyvsp[-1].variable;
  1385. ;}
  1386. break;
  1387. case 44:
  1388. #line 283 "ts1.0_grammar.y"
  1389. {
  1390. yyval.inst = new Inst(TSP_DOT_PRODUCT_CUBE_MAP_AND_REFLECT_CUBE_MAP_CONST_EYE_3_OF_3, yyvsp[-1].variable);
  1391. delete yyvsp[-1].variable;
  1392. ;}
  1393. break;
  1394. case 45:
  1395. #line 290 "ts1.0_grammar.y"
  1396. {
  1397. yyval.fval = yyvsp[0].fval;
  1398. ;}
  1399. break;
  1400. case 46:
  1401. #line 294 "ts1.0_grammar.y"
  1402. {
  1403. yyval.fval = yyvsp[0].fval;
  1404. ;}
  1405. break;
  1406. }
  1407. /* Line 999 of yacc.c. */
  1408. #line 1610 "_ts1.0_parser.c"
  1409. yyvsp -= yylen;
  1410. yyssp -= yylen;
  1411. YY_STACK_PRINT (yyss, yyssp);
  1412. *++yyvsp = yyval;
  1413. /* Now `shift' the result of the reduction. Determine what state
  1414. that goes to, based on the state we popped back to and the rule
  1415. number reduced by. */
  1416. yyn = yyr1[yyn];
  1417. yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  1418. if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1419. yystate = yytable[yystate];
  1420. else
  1421. yystate = yydefgoto[yyn - YYNTOKENS];
  1422. goto yynewstate;
  1423. /*------------------------------------.
  1424. | yyerrlab -- here on detecting error |
  1425. `------------------------------------*/
  1426. yyerrlab:
  1427. /* If not already recovering from an error, report this error. */
  1428. if (!yyerrstatus)
  1429. {
  1430. ++yynerrs;
  1431. #if YYERROR_VERBOSE
  1432. yyn = yypact[yystate];
  1433. if (YYPACT_NINF < yyn && yyn < YYLAST)
  1434. {
  1435. YYSIZE_T yysize = 0;
  1436. int yytype = YYTRANSLATE (yychar);
  1437. char *yymsg;
  1438. int yyx, yycount;
  1439. yycount = 0;
  1440. /* Start YYX at -YYN if negative to avoid negative indexes in
  1441. YYCHECK. */
  1442. for (yyx = yyn < 0 ? -yyn : 0;
  1443. yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
  1444. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
  1445. yysize += yystrlen (yytname[yyx]) + 15, yycount++;
  1446. yysize += yystrlen ("syntax error, unexpected ") + 1;
  1447. yysize += yystrlen (yytname[yytype]);
  1448. yymsg = (char *) YYSTACK_ALLOC (yysize);
  1449. if (yymsg != 0)
  1450. {
  1451. char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
  1452. yyp = yystpcpy (yyp, yytname[yytype]);
  1453. if (yycount < 5)
  1454. {
  1455. yycount = 0;
  1456. for (yyx = yyn < 0 ? -yyn : 0;
  1457. yyx < (int) (sizeof (yytname) / sizeof (char *));
  1458. yyx++)
  1459. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
  1460. {
  1461. const char *yyq = ! yycount ? ", expecting " : " or ";
  1462. yyp = yystpcpy (yyp, yyq);
  1463. yyp = yystpcpy (yyp, yytname[yyx]);
  1464. yycount++;
  1465. }
  1466. }
  1467. yyerror (yymsg);
  1468. YYSTACK_FREE (yymsg);
  1469. }
  1470. else
  1471. yyerror ("syntax error; also virtual memory exhausted");
  1472. }
  1473. else
  1474. #endif /* YYERROR_VERBOSE */
  1475. yyerror ("syntax error");
  1476. }
  1477. if (yyerrstatus == 3)
  1478. {
  1479. /* If just tried and failed to reuse lookahead token after an
  1480. error, discard it. */
  1481. /* Return failure if at end of input. */
  1482. if (yychar == YYEOF)
  1483. {
  1484. /* Pop the error token. */
  1485. YYPOPSTACK;
  1486. /* Pop the rest of the stack. */
  1487. while (yyss < yyssp)
  1488. {
  1489. YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
  1490. yydestruct (yystos[*yyssp], yyvsp);
  1491. YYPOPSTACK;
  1492. }
  1493. YYABORT;
  1494. }
  1495. YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
  1496. yydestruct (yytoken, &yylval);
  1497. yychar = YYEMPTY;
  1498. }
  1499. /* Else will try to reuse lookahead token after shifting the error
  1500. token. */
  1501. goto yyerrlab1;
  1502. /*----------------------------------------------------.
  1503. | yyerrlab1 -- error raised explicitly by an action. |
  1504. `----------------------------------------------------*/
  1505. yyerrlab1:
  1506. yyerrstatus = 3; /* Each real token shifted decrements this. */
  1507. for (;;)
  1508. {
  1509. yyn = yypact[yystate];
  1510. if (yyn != YYPACT_NINF)
  1511. {
  1512. yyn += YYTERROR;
  1513. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  1514. {
  1515. yyn = yytable[yyn];
  1516. if (0 < yyn)
  1517. break;
  1518. }
  1519. }
  1520. /* Pop the current state because it cannot handle the error token. */
  1521. if (yyssp == yyss)
  1522. YYABORT;
  1523. YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
  1524. yydestruct (yystos[yystate], yyvsp);
  1525. yyvsp--;
  1526. yystate = *--yyssp;
  1527. YY_STACK_PRINT (yyss, yyssp);
  1528. }
  1529. if (yyn == YYFINAL)
  1530. YYACCEPT;
  1531. YYDPRINTF ((stderr, "Shifting error token, "));
  1532. *++yyvsp = yylval;
  1533. yystate = yyn;
  1534. goto yynewstate;
  1535. /*-------------------------------------.
  1536. | yyacceptlab -- YYACCEPT comes here. |
  1537. `-------------------------------------*/
  1538. yyacceptlab:
  1539. yyresult = 0;
  1540. goto yyreturn;
  1541. /*-----------------------------------.
  1542. | yyabortlab -- YYABORT comes here. |
  1543. `-----------------------------------*/
  1544. yyabortlab:
  1545. yyresult = 1;
  1546. goto yyreturn;
  1547. #ifndef yyoverflow
  1548. /*----------------------------------------------.
  1549. | yyoverflowlab -- parser overflow comes here. |
  1550. `----------------------------------------------*/
  1551. yyoverflowlab:
  1552. yyerror ("parser stack overflow");
  1553. yyresult = 2;
  1554. /* Fall through. */
  1555. #endif
  1556. yyreturn:
  1557. #ifndef yyoverflow
  1558. if (yyss != yyssa)
  1559. YYSTACK_FREE (yyss);
  1560. #endif
  1561. return yyresult;
  1562. }
  1563. #line 300 "ts1.0_grammar.y"
  1564. void yyerror(const char* s)
  1565. {
  1566. errors.set("unrecognized token");
  1567. }