open_toontown_panda3d/panda/src/egg/parser.cxx.prebuilt

3481 lines
118 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* A Bison parser, made from parser.yxx
by GNU bison 1.35. */
#define YYBISON 1 /* Identify Bison output. */
#define yyparse eggyyparse
#define yylex eggyylex
#define yyerror eggyyerror
#define yylval eggyylval
#define yychar eggyychar
#define yydebug eggyydebug
#define yynerrs eggyynerrs
# define NUMBER 257
# define STRING 258
# define BEZIERCURVE 259
# define BFACE 260
# define BILLBOARD 261
# define BILLBOARDCENTER 262
# define BUNDLE 263
# define CLOSED 264
# define COLLIDE 265
# define COMMENT 266
# define COORDSYSTEM 267
# define CV 268
# define DART 269
# define DNORMAL 270
# define DRGBA 271
# define DUV 272
# define DXYZ 273
# define DCS 274
# define DISTANCE 275
# define DTREF 276
# define DYNAMICVERTEXPOOL 277
# define EXTERNAL_FILE 278
# define FLIGHT 279
# define GROUP 280
# define HIP 281
# define INTANGENT 282
# define JOINT 283
# define KNOTS 284
# define INCLUDE 285
# define INSTANCE 286
# define LOOP 287
# define MATERIAL 288
# define MATRIX3 289
# define MATRIX4 290
# define MODEL 291
# define MREF 292
# define NORMAL 293
# define NURBSCURVE 294
# define NURBSSURFACE 295
# define OBJECTTYPE 296
# define ORDER 297
# define OUTTANGENT 298
# define POINTLIGHT 299
# define POLYGON 300
# define REF 301
# define RGBA 302
# define ROTATE 303
# define ROTX 304
# define ROTY 305
# define ROTZ 306
# define SANIM 307
# define SCALAR 308
# define SCALE 309
# define SEQUENCE 310
# define SHADING 311
# define SWITCH 312
# define SWITCHCONDITION 313
# define TABLE 314
# define TABLE_V 315
# define TEXLIST 316
# define TEXTURE 317
# define TLENGTHS 318
# define TRANSFORM 319
# define TRANSLATE 320
# define TREF 321
# define TRIM 322
# define TXT 323
# define UKNOTS 324
# define UV 325
# define VKNOTS 326
# define VERTEX 327
# define VERTEXANIM 328
# define VERTEXPOOL 329
# define VERTEXREF 330
# define XFMANIM 331
# define XFMSANIM 332
# define START_EGG 333
# define START_GROUP_BODY 334
# define START_TEXTURE_BODY 335
# define START_PRIMITIVE_BODY 336
#line 6 "parser.yxx"
#include <pandabase.h>
#include "parserDefs.h"
#include "lexerDefs.h"
#include "eggObject.h"
#include "eggGroup.h"
#include "eggVertex.h"
#include "eggVertexPool.h"
#include "eggPolygon.h"
#include "eggPoint.h"
#include "eggNurbsSurface.h"
#include "eggNurbsCurve.h"
#include "eggTable.h"
#include "eggSAnimData.h"
#include "eggXfmSAnim.h"
#include "eggXfmAnimData.h"
#include "eggTexture.h"
#include "eggMaterial.h"
#include "eggComment.h"
#include "eggCoordinateSystem.h"
#include "eggExternalReference.h"
#include "eggData.h"
#include "pt_EggTexture.h"
#include "pt_EggMaterial.h"
#include "string_utils.h"
#include "filename.h"
#include "luse.h"
#include "lmatrix.h"
#include "coordinateSystem.h"
#include "pvector.h"
#include "dcast.h"
// Because our token type contains objects of type string, which
// require correct copy construction (and not simply memcpying), we
// cannot use bison's built-in auto-stack-grow feature. As an easy
// solution, we ensure here that we have enough yacc stack to start
// with, and that it doesn't ever try to grow.
#define YYINITDEPTH 1000
#define YYMAXDEPTH 1000
// We need a stack of EggObject pointers. Each time we encounter a
// nested EggObject of some kind, we'll allocate a new one of these
// and push it onto the stack. At any given time, the top of the
// stack is the EggObject we are currently scanning.
typedef pvector< PT(EggObject) > EggStack;
static EggStack egg_stack;
// There's one "top-level" egg node, which is where we should parent
// things (e.g. implicit textures) encountered in the egg file that
// don't have an explicit place in the tree. If this is NULL, such
// things won't be parented anywhere.
static EggGroupNode *egg_top_node;
// We need a table mapping vertex pool names to vertex pools.
typedef pmap<string, PT(EggVertexPool) > VertexPools;
static VertexPools vertex_pools;
// And another one mapping texture names to textures.
typedef pmap<string, PT_EggTexture > Textures;
static Textures textures;
// And again for material names to materials.
typedef pmap<string, PT_EggMaterial > Materials;
static Materials materials;
// We need to be able to save the index number requested for a vertex
// temporarily.
static int vertex_index;
// We need to hold a matrix for a little bit while parsing the
// <Transform> entries.
static LMatrix3d matrix_2d;
////////////////////////////////////////////////////////////////////
// Defining the interface to the parser.
////////////////////////////////////////////////////////////////////
void
egg_init_parser(istream &in, const string &filename,
EggObject *tos, EggGroupNode *top_node) {
egg_init_lexer(in, filename);
egg_stack.clear();
vertex_pools.clear();
textures.clear();
materials.clear();
egg_stack.push_back(tos);
egg_top_node = top_node;
}
void
egg_cleanup_parser() {
// Clean these out after we're done, so we don't keep big memory
// structures around needlessly.
egg_stack.clear();
vertex_pools.clear();
textures.clear();
materials.clear();
}
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#define YYFINAL 672
#define YYFLAG -32768
#define YYNTBASE 85
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= 336 ? yytranslate[x] : 194)
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
static const char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 83, 2, 84, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82
};
#if YYDEBUG
static const short yyprhs[] =
{
0, 0, 3, 6, 9, 12, 14, 17, 19, 21,
23, 25, 27, 29, 31, 33, 35, 37, 39, 41,
43, 45, 50, 56, 57, 65, 67, 74, 77, 78,
85, 87, 94, 100, 107, 108, 115, 117, 120, 121,
127, 128, 135, 137, 140, 144, 149, 155, 161, 167,
176, 185, 188, 196, 204, 208, 217, 226, 231, 241,
251, 252, 259, 260, 267, 268, 275, 277, 284, 290,
298, 306, 312, 318, 324, 330, 336, 342, 348, 351,
354, 357, 360, 362, 364, 367, 368, 374, 376, 379,
382, 385, 388, 391, 394, 397, 404, 409, 414, 419,
427, 434, 439, 444, 446, 463, 464, 470, 472, 475,
478, 481, 484, 490, 495, 501, 506, 508, 518, 528,
530, 537, 542, 554, 567, 568, 575, 576, 583, 584,
591, 592, 599, 601, 607, 613, 619, 622, 628, 634,
640, 647, 649, 655, 661, 667, 670, 676, 682, 688,
694, 700, 706, 709, 715, 722, 724, 730, 736, 742,
745, 751, 757, 763, 769, 775, 782, 784, 786, 788,
792, 801, 810, 815, 825, 835, 837, 846, 849, 851,
853, 855, 861, 863, 866, 868, 870, 871, 878, 879,
886, 888, 891, 894, 897, 900, 903, 904, 911, 913,
920, 926, 927, 934, 936, 943, 949, 950, 957, 959,
966, 969, 971, 974, 976, 979, 981, 983, 985, 987,
989, 991, 993, 995, 997, 999, 1001, 1003, 1005, 1007,
1009, 1012, 1014, 1016, 1018, 1020
};
static const short yyrhs[] =
{
79, 86, 0, 80, 113, 0, 81, 92, 0, 82,
147, 0, 193, 0, 86, 87, 0, 88, 0, 89,
0, 90, 0, 93, 0, 96, 0, 97, 0, 107,
0, 109, 0, 111, 0, 139, 0, 141, 0, 143,
0, 145, 0, 164, 0, 13, 83, 185, 84, 0,
12, 184, 83, 188, 84, 0, 0, 63, 183, 83,
185, 91, 92, 84, 0, 193, 0, 92, 54, 183,
83, 191, 84, 0, 92, 127, 0, 0, 34, 183,
83, 94, 95, 84, 0, 193, 0, 95, 54, 183,
83, 191, 84, 0, 24, 184, 83, 185, 84, 0,
187, 24, 184, 83, 185, 84, 0, 0, 75, 183,
98, 83, 99, 84, 0, 193, 0, 99, 100, 0,
0, 73, 101, 83, 103, 84, 0, 0, 73, 192,
102, 83, 103, 84, 0, 190, 0, 190, 190, 0,
190, 190, 190, 0, 190, 190, 190, 190, 0, 103,
71, 83, 104, 84, 0, 103, 39, 83, 105, 84,
0, 103, 48, 83, 106, 84, 0, 103, 19, 187,
83, 190, 190, 190, 84, 0, 103, 19, 83, 187,
190, 190, 190, 84, 0, 190, 190, 0, 104, 18,
187, 83, 190, 190, 84, 0, 104, 18, 83, 187,
190, 190, 84, 0, 190, 190, 190, 0, 105, 16,
187, 83, 190, 190, 190, 84, 0, 105, 16, 83,
187, 190, 190, 190, 84, 0, 190, 190, 190, 190,
0, 106, 17, 187, 83, 190, 190, 190, 190, 84,
0, 106, 17, 83, 187, 190, 190, 190, 190, 84,
0, 0, 26, 184, 108, 83, 113, 84, 0, 0,
29, 184, 110, 83, 113, 84, 0, 0, 32, 184,
112, 83, 113, 84, 0, 193, 0, 113, 54, 183,
83, 191, 84, 0, 113, 7, 83, 187, 84, 0,
113, 8, 83, 190, 190, 190, 84, 0, 113, 11,
184, 83, 114, 115, 84, 0, 113, 20, 83, 192,
84, 0, 113, 15, 83, 192, 84, 0, 113, 15,
83, 4, 84, 0, 113, 58, 83, 192, 84, 0,
113, 42, 83, 185, 84, 0, 113, 37, 83, 192,
84, 0, 113, 62, 83, 192, 84, 0, 113, 116,
0, 113, 135, 0, 113, 137, 0, 113, 87, 0,
187, 0, 193, 0, 115, 187, 0, 0, 65, 117,
83, 118, 84, 0, 193, 0, 118, 119, 0, 118,
120, 0, 118, 121, 0, 118, 122, 0, 118, 123,
0, 118, 124, 0, 118, 125, 0, 66, 83, 190,
190, 190, 84, 0, 50, 83, 190, 84, 0, 51,
83, 190, 84, 0, 52, 83, 190, 84, 0, 49,
83, 190, 190, 190, 190, 84, 0, 55, 83, 190,
190, 190, 84, 0, 55, 83, 190, 84, 0, 36,
83, 126, 84, 0, 193, 0, 190, 190, 190, 190,
190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
190, 190, 0, 0, 65, 128, 83, 129, 84, 0,
193, 0, 129, 133, 0, 129, 130, 0, 129, 131,
0, 129, 132, 0, 66, 83, 190, 190, 84, 0,
49, 83, 190, 84, 0, 55, 83, 190, 190, 84,
0, 35, 83, 134, 84, 0, 193, 0, 190, 190,
190, 190, 190, 190, 190, 190, 190, 0, 76, 83,
178, 136, 47, 83, 182, 84, 84, 0, 193, 0,
136, 54, 183, 83, 191, 84, 0, 59, 83, 138,
84, 0, 21, 83, 190, 190, 73, 83, 190, 190,
190, 84, 84, 0, 21, 83, 190, 190, 190, 73,
83, 190, 190, 190, 84, 84, 0, 0, 46, 184,
140, 83, 147, 84, 0, 0, 45, 184, 142, 83,
147, 84, 0, 0, 41, 184, 144, 83, 148, 84,
0, 0, 40, 184, 146, 83, 149, 84, 0, 193,
0, 147, 67, 83, 150, 84, 0, 147, 63, 83,
151, 84, 0, 147, 38, 83, 152, 84, 0, 147,
156, 0, 147, 39, 83, 153, 84, 0, 147, 48,
83, 154, 84, 0, 147, 6, 83, 155, 84, 0,
147, 54, 183, 83, 191, 84, 0, 193, 0, 148,
67, 83, 150, 84, 0, 148, 63, 83, 151, 84,
0, 148, 38, 83, 152, 84, 0, 148, 156, 0,
148, 39, 83, 153, 84, 0, 148, 48, 83, 154,
84, 0, 148, 6, 83, 155, 84, 0, 148, 43,
83, 157, 84, 0, 148, 70, 83, 158, 84, 0,
148, 72, 83, 159, 84, 0, 148, 145, 0, 148,
68, 83, 160, 84, 0, 148, 54, 183, 83, 191,
84, 0, 193, 0, 149, 67, 83, 150, 84, 0,
149, 63, 83, 151, 84, 0, 149, 38, 83, 152,
84, 0, 149, 156, 0, 149, 39, 83, 153, 84,
0, 149, 48, 83, 154, 84, 0, 149, 6, 83,
155, 84, 0, 149, 43, 83, 162, 84, 0, 149,
30, 83, 163, 84, 0, 149, 54, 183, 83, 191,
84, 0, 180, 0, 183, 0, 181, 0, 190, 190,
190, 0, 153, 16, 187, 83, 190, 190, 190, 84,
0, 153, 16, 83, 187, 190, 190, 190, 84, 0,
190, 190, 190, 190, 0, 154, 17, 187, 83, 190,
190, 190, 190, 84, 0, 154, 17, 83, 187, 190,
190, 190, 190, 84, 0, 192, 0, 76, 83, 178,
47, 83, 182, 84, 84, 0, 192, 192, 0, 179,
0, 179, 0, 193, 0, 160, 33, 83, 161, 84,
0, 193, 0, 161, 145, 0, 192, 0, 179, 0,
0, 60, 184, 165, 83, 168, 84, 0, 0, 9,
184, 167, 83, 168, 84, 0, 193, 0, 168, 164,
0, 168, 166, 0, 168, 169, 0, 168, 172, 0,
168, 175, 0, 0, 53, 184, 170, 83, 171, 84,
0, 193, 0, 171, 54, 183, 83, 191, 84, 0,
171, 61, 83, 179, 84, 0, 0, 77, 184, 173,
83, 174, 84, 0, 193, 0, 174, 54, 183, 83,
191, 84, 0, 174, 61, 83, 179, 84, 0, 0,
78, 184, 176, 83, 177, 84, 0, 193, 0, 177,
54, 183, 83, 191, 84, 0, 177, 169, 0, 193,
0, 178, 192, 0, 193, 0, 179, 190, 0, 183,
0, 183, 0, 183, 0, 193, 0, 187, 0, 186,
0, 193, 0, 187, 0, 193, 0, 187, 0, 3,
0, 4, 0, 193, 0, 189, 0, 187, 0, 189,
187, 0, 3, 0, 3, 0, 4, 0, 3, 0,
0
};
#endif
#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
0, 178, 180, 181, 182, 192, 194, 208, 210, 211,
212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
222, 232, 255, 269, 269, 297, 299, 403, 413, 413,
440, 442, 536, 544, 563, 563, 591, 593, 603, 603,
615, 615, 660, 665, 669, 673, 677, 678, 679, 680,
688, 706, 711, 719, 736, 741, 749, 766, 771, 779,
796, 796, 816, 816, 837, 837, 858, 860, 913, 925,
930, 937, 943, 950, 963, 969, 975, 981, 987, 988,
989, 990, 1003, 1025, 1027, 1048, 1048, 1064, 1066, 1067,
1068, 1069, 1070, 1071, 1072, 1075, 1081, 1087, 1093, 1099,
1105, 1109, 1115, 1119, 1121, 1142, 1142, 1161, 1163, 1164,
1165, 1166, 1169, 1175, 1181, 1187, 1190, 1192, 1210, 1243,
1248, 1272, 1284, 1290, 1306, 1306, 1325, 1325, 1344, 1344,
1363, 1363, 1383, 1385, 1386, 1387, 1388, 1389, 1390, 1391,
1392, 1440, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449,
1450, 1451, 1452, 1458, 1459, 1512, 1514, 1515, 1516, 1517,
1518, 1519, 1520, 1521, 1522, 1523, 1581, 1598, 1638, 1655,
1660, 1668, 1685, 1690, 1698, 1715, 1731, 1762, 1780, 1800,
1820, 1826, 1836, 1843, 1861, 1877, 1898, 1898, 1920, 1920,
1942, 1944, 1948, 1952, 1956, 1960, 1974, 1974, 1995, 1997,
2009, 2022, 2022, 2043, 2045, 2062, 2075, 2075, 2096, 2098,
2113, 2127, 2132, 2145, 2150, 2163, 2184, 2205, 2227, 2233,
2244, 2256, 2262, 2272, 2277, 2290, 2295, 2307, 2312, 2327,
2332, 2345, 2356, 2362, 2377, 2388
};
#endif
#if (YYDEBUG) || defined YYERROR_VERBOSE
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
"$", "error", "$undefined.", "NUMBER", "STRING", "BEZIERCURVE", "BFACE",
"BILLBOARD", "BILLBOARDCENTER", "BUNDLE", "CLOSED", "COLLIDE",
"COMMENT", "COORDSYSTEM", "CV", "DART", "DNORMAL", "DRGBA", "DUV",
"DXYZ", "DCS", "DISTANCE", "DTREF", "DYNAMICVERTEXPOOL",
"EXTERNAL_FILE", "FLIGHT", "GROUP", "HIP", "INTANGENT", "JOINT",
"KNOTS", "INCLUDE", "INSTANCE", "LOOP", "MATERIAL", "MATRIX3",
"MATRIX4", "MODEL", "MREF", "NORMAL", "NURBSCURVE", "NURBSSURFACE",
"OBJECTTYPE", "ORDER", "OUTTANGENT", "POINTLIGHT", "POLYGON", "REF",
"RGBA", "ROTATE", "ROTX", "ROTY", "ROTZ", "SANIM", "SCALAR", "SCALE",
"SEQUENCE", "SHADING", "SWITCH", "SWITCHCONDITION", "TABLE", "TABLE_V",
"TEXLIST", "TEXTURE", "TLENGTHS", "TRANSFORM", "TRANSLATE", "TREF",
"TRIM", "TXT", "UKNOTS", "UV", "VKNOTS", "VERTEX", "VERTEXANIM",
"VERTEXPOOL", "VERTEXREF", "XFMANIM", "XFMSANIM", "START_EGG",
"START_GROUP_BODY", "START_TEXTURE_BODY", "START_PRIMITIVE_BODY", "'{'",
"'}'", "grammar", "egg", "node", "coordsystem", "comment", "texture",
"@1", "texture_body", "material", "@2", "material_body",
"external_reference", "vertex_pool", "@3", "vertex_pool_body", "vertex",
"@4", "@5", "vertex_body", "vertex_uv_body", "vertex_normal_body",
"vertex_color_body", "group", "@6", "joint", "@7", "instance", "@8",
"group_body", "cs_type", "collide_flags", "transform_3d", "@9",
"transform_3d_body", "translate_3d", "rotx_3d", "roty_3d", "rotz_3d",
"rotate_3d", "scale_3d", "matrix4_3d", "matrix4_3d_body",
"transform_2d", "@10", "transform_2d_body", "translate_2d", "rotate_2d",
"scale_2d", "matrix3_2d", "matrix3_2d_body", "group_vertex_ref",
"group_vertex_membership", "switchcondition", "switchcondition_body",
"polygon", "@11", "point_light", "@12", "nurbs_surface", "@13",
"nurbs_curve", "@14", "primitive_body", "nurbs_surface_body",
"nurbs_curve_body", "primitive_tref_body", "primitive_texture_body",
"primitive_material_body", "primitive_normal_body",
"primitive_color_body", "primitive_bface_body", "primitive_vertex_ref",
"nurbs_surface_order_body", "nurbs_surface_uknots_body",
"nurbs_surface_vknots_body", "nurbs_surface_trim_body",
"nurbs_surface_trim_loop_body", "nurbs_curve_order_body",
"nurbs_curve_knots_body", "table", "@15", "bundle", "@16", "table_body",
"sanim", "@17", "sanim_body", "xfmanim", "@18", "xfmanim_body",
"xfm_s_anim", "@19", "xfm_s_anim_body", "integer_list", "real_list",
"texture_name", "material_name", "vertex_pool_name", "required_name",
"optional_name", "required_string", "optional_string", "string",
"repeated_string", "repeated_string_body", "real", "real_or_string",
"integer", "empty", 0
};
#endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const short yyr1[] =
{
0, 85, 85, 85, 85, 86, 86, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 88, 89, 91, 90, 92, 92, 92, 94, 93,
95, 95, 96, 96, 98, 97, 99, 99, 101, 100,
102, 100, 103, 103, 103, 103, 103, 103, 103, 103,
103, 104, 104, 104, 105, 105, 105, 106, 106, 106,
108, 107, 110, 109, 112, 111, 113, 113, 113, 113,
113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
113, 113, 114, 115, 115, 117, 116, 118, 118, 118,
118, 118, 118, 118, 118, 119, 120, 121, 122, 123,
124, 124, 125, 126, 126, 128, 127, 129, 129, 129,
129, 129, 130, 131, 132, 133, 134, 134, 135, 136,
136, 137, 138, 138, 140, 139, 142, 141, 144, 143,
146, 145, 147, 147, 147, 147, 147, 147, 147, 147,
147, 148, 148, 148, 148, 148, 148, 148, 148, 148,
148, 148, 148, 148, 148, 149, 149, 149, 149, 149,
149, 149, 149, 149, 149, 149, 150, 151, 152, 153,
153, 153, 154, 154, 154, 155, 156, 157, 158, 159,
160, 160, 161, 161, 162, 163, 165, 164, 167, 166,
168, 168, 168, 168, 168, 168, 170, 169, 171, 171,
171, 173, 172, 174, 174, 174, 176, 175, 177, 177,
177, 178, 178, 179, 179, 180, 181, 182, 183, 183,
184, 185, 185, 186, 186, 187, 187, 188, 188, 189,
189, 190, 191, 191, 192, 193
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const short yyr2[] =
{
0, 2, 2, 2, 2, 1, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 5, 0, 7, 1, 6, 2, 0, 6,
1, 6, 5, 6, 0, 6, 1, 2, 0, 5,
0, 6, 1, 2, 3, 4, 5, 5, 5, 8,
8, 2, 7, 7, 3, 8, 8, 4, 9, 9,
0, 6, 0, 6, 0, 6, 1, 6, 5, 7,
7, 5, 5, 5, 5, 5, 5, 5, 2, 2,
2, 2, 1, 1, 2, 0, 5, 1, 2, 2,
2, 2, 2, 2, 2, 6, 4, 4, 4, 7,
6, 4, 4, 1, 16, 0, 5, 1, 2, 2,
2, 2, 5, 4, 5, 4, 1, 9, 9, 1,
6, 4, 11, 12, 0, 6, 0, 6, 0, 6,
0, 6, 1, 5, 5, 5, 2, 5, 5, 5,
6, 1, 5, 5, 5, 2, 5, 5, 5, 5,
5, 5, 2, 5, 6, 1, 5, 5, 5, 2,
5, 5, 5, 5, 5, 6, 1, 1, 1, 3,
8, 8, 4, 9, 9, 1, 8, 2, 1, 1,
1, 5, 1, 2, 1, 1, 0, 6, 0, 6,
1, 2, 2, 2, 2, 2, 0, 6, 1, 6,
5, 0, 6, 1, 6, 5, 0, 6, 1, 6,
2, 1, 2, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 1, 1, 1, 1, 0
};
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
doesn't specify something else to do. Zero means the default is an
error. */
static const short yydefact[] =
{
0, 235, 235, 235, 235, 1, 5, 2, 66, 3,
25, 4, 132, 225, 226, 235, 0, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 0, 0, 0, 235, 0, 0,
0, 0, 235, 0, 0, 0, 85, 0, 81, 78,
79, 80, 235, 105, 27, 0, 0, 0, 0, 235,
0, 0, 0, 136, 0, 220, 224, 223, 235, 0,
60, 62, 64, 0, 219, 218, 130, 128, 126, 124,
186, 0, 34, 235, 0, 0, 0, 0, 0, 0,
235, 0, 0, 0, 0, 0, 235, 0, 0, 0,
235, 0, 0, 0, 235, 235, 235, 235, 0, 222,
221, 235, 0, 0, 0, 28, 0, 0, 0, 0,
0, 235, 0, 0, 0, 231, 0, 0, 234, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 235,
235, 211, 0, 235, 0, 175, 0, 168, 216, 0,
0, 0, 0, 0, 0, 167, 0, 166, 215, 0,
229, 0, 228, 227, 21, 0, 235, 235, 235, 235,
235, 235, 235, 235, 235, 23, 235, 235, 68, 0,
235, 82, 73, 72, 71, 76, 75, 232, 233, 0,
74, 0, 121, 77, 0, 87, 0, 212, 119, 0,
0, 107, 139, 135, 0, 137, 0, 0, 138, 0,
0, 134, 133, 0, 22, 230, 32, 0, 0, 0,
0, 30, 0, 155, 0, 141, 0, 0, 0, 190,
235, 0, 36, 0, 0, 0, 83, 67, 0, 0,
0, 0, 0, 0, 0, 0, 86, 88, 89, 90,
91, 92, 93, 94, 0, 235, 26, 0, 0, 0,
0, 106, 109, 110, 111, 108, 0, 0, 169, 0,
0, 0, 140, 235, 61, 63, 65, 235, 29, 0,
0, 0, 0, 0, 0, 235, 0, 0, 131, 159,
0, 0, 0, 0, 0, 235, 0, 0, 0, 0,
0, 129, 152, 145, 127, 125, 235, 235, 235, 235,
187, 191, 192, 193, 194, 195, 0, 38, 35, 37,
33, 69, 70, 84, 0, 235, 0, 0, 0, 0,
0, 0, 235, 0, 235, 0, 0, 0, 0, 0,
0, 0, 172, 0, 217, 0, 0, 235, 235, 0,
0, 0, 0, 235, 235, 0, 235, 0, 0, 0,
0, 235, 235, 235, 235, 235, 188, 196, 201, 206,
24, 0, 40, 0, 0, 0, 0, 103, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 116, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
185, 213, 0, 0, 0, 184, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
180, 0, 178, 0, 179, 0, 0, 0, 0, 0,
0, 0, 0, 102, 0, 0, 96, 97, 98, 101,
0, 0, 0, 0, 115, 0, 113, 0, 0, 0,
0, 0, 0, 176, 0, 162, 164, 214, 158, 160,
163, 161, 0, 157, 156, 148, 144, 146, 149, 177,
147, 0, 143, 142, 0, 153, 150, 151, 235, 235,
235, 235, 0, 42, 0, 0, 0, 0, 0, 0,
0, 118, 120, 0, 114, 112, 0, 0, 0, 0,
31, 165, 154, 235, 0, 0, 198, 0, 203, 0,
208, 0, 0, 0, 0, 39, 43, 0, 0, 0,
0, 0, 100, 95, 0, 171, 170, 0, 0, 0,
182, 189, 235, 0, 197, 235, 0, 202, 235, 207,
210, 0, 0, 0, 0, 0, 44, 41, 0, 0,
0, 99, 0, 174, 173, 181, 183, 0, 235, 0,
235, 0, 0, 0, 0, 0, 0, 0, 0, 0,
45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 47, 0, 0, 48, 0, 0, 46,
51, 122, 0, 0, 0, 0, 200, 0, 205, 0,
0, 0, 0, 0, 54, 0, 0, 0, 0, 0,
123, 0, 0, 199, 204, 209, 0, 0, 0, 0,
0, 0, 57, 0, 0, 0, 117, 50, 49, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 53, 52, 0,
56, 55, 0, 0, 0, 59, 58, 0, 0, 104,
0, 0, 0
};
static const short yydefgoto[] =
{
670, 5, 58, 30, 31, 32, 240, 9, 33, 179,
230, 34, 35, 132, 241, 329, 381, 440, 492, 578,
574, 576, 36, 122, 37, 123, 38, 124, 7, 190,
245, 59, 105, 204, 257, 258, 259, 260, 261, 262,
263, 385, 64, 108, 210, 272, 273, 274, 275, 396,
60, 206, 61, 147, 39, 129, 40, 128, 41, 127,
42, 126, 11, 234, 232, 166, 164, 156, 159, 161,
154, 73, 423, 431, 433, 429, 539, 414, 409, 43,
130, 322, 435, 238, 323, 436, 515, 324, 437, 517,
325, 438, 519, 150, 410, 167, 157, 353, 158, 74,
118, 75, 84, 171, 172, 467, 199, 155, 85
};
static const short yypact[] =
{
170,-32768,-32768,-32768,-32768, 684,-32768, 1075,-32768, 14,
-32768, 368,-32768,-32768,-32768, 197, -18, 197, 197, 197,
197, 197, 197, 197, 197, 197, 197, 197, 197,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768, 63, -12, 18, 197, 32, 38,
73, 78, 197, 82, 98, 110,-32768, 114,-32768,-32768,
-32768,-32768, 197,-32768,-32768, 125, 130, 138, 144, 197,
150, 154, 155,-32768, 159,-32768,-32768,-32768, 197, 160,
-32768,-32768,-32768, 161,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, 164,-32768, 197, 197, 94, 177, 200, 148, 148,
197, 178, 148, 83, 148, 181,-32768, 182, 183, 148,
197, 94, 94, 185, 197, 197,-32768, 197, 100,-32768,
-32768, 197, 186, 187, 193,-32768, 201, 205, 209, 210,
211, 197, 213, 214, 107,-32768, 94, 197,-32768, 169,
171, 196, 202, 215, 203, 217, 219, 221, 223,-32768,
148,-32768, 203,-32768, 225,-32768, 226,-32768,-32768, 24,
94, 22, 94, 203, 231,-32768, 232,-32768,-32768, 52,
-32768, 233, 197,-32768,-32768, 235,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 197,-32768, 94,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 236,
-32768, 94,-32768,-32768, 419,-32768, 132,-32768,-32768, 237,
108,-32768,-32768,-32768, 40,-32768, 94, 42,-32768, 94,
238,-32768,-32768, 220,-32768,-32768,-32768, 842, 924, 1009,
12,-32768, 172,-32768, 101,-32768, 224, 312, 58,-32768,
-32768, 8,-32768, 239, 240, 21,-32768,-32768, 94, 246,
247, 257, 258, 269, 270, 271,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768, 272, 197,-32768, 273, 275, 278,
279,-32768,-32768,-32768,-32768,-32768, 197, 280,-32768, 197,
281, 94,-32768, 197,-32768,-32768,-32768, 197,-32768, 285,
286, 287, 288, 289, 290, 197, 293, 294,-32768,-32768,
295, 297, 298, 299, 300, 197, 302, 304, 306, 309,
310,-32768,-32768,-32768,-32768,-32768, 197, 197, 197, 197,
-32768,-32768,-32768,-32768,-32768,-32768, 7, 148,-32768,-32768,
-32768,-32768,-32768,-32768, 72, 94, 94, 94, 94, 94,
94, 94, 197, 311, 94, 94, 94, 94, 94, 94,
94, 94,-32768, 313,-32768, 321, 148,-32768, 197, 94,
148, 94, 322, 197, 197, 148, 197, 94, 148, 94,
325, 197, 197,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, 326,-32768, 327, 216, 328, 94,-32768, 94, 329,
330, 331, 0, 94, 333, 203, 334, 94,-32768, 335,
94, 94, 94, 94, 94, 94, 336, 203, 337, 339,
94,-32768, 340, 36, 341,-32768, 43, 203, 342, 343,
344, 345, 53, 346, 148, 66, 203, 349, 350, 29,
-32768, 352, 94, 354, 94, 357, 358, 362, 363, 94,
364, 94, 369,-32768, 94, 94,-32768,-32768,-32768,-32768,
94, 94, 367, 372,-32768, 94,-32768, 377, 380, 94,
94, 94, 94,-32768, 382,-32768,-32768,-32768,-32768,-32768,
-32768,-32768, 389,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, 391,-32768,-32768, 393,-32768,-32768,-32768,-32768,-32768,
-32768,-32768, 157, 94, 94, 94, 94, 94, 94, 394,
395,-32768,-32768, 94,-32768,-32768, 396, 397, 94, 94,
-32768,-32768,-32768,-32768, 69, 70,-32768, 105,-32768, 10,
-32768, 45, 399, 400, 401,-32768, 94, 206, 94, 94,
94, 402,-32768,-32768, 94,-32768,-32768, 403, 404, 30,
-32768,-32768, 197, 406,-32768, 197, 407,-32768, 197,-32768,
-32768, 197, 414, 94, 94, 94, 94,-32768, 415, 94,
94,-32768, 94,-32768,-32768,-32768,-32768, 417,-32768, 421,
-32768, 422, 94, 94, 64, 94, 68, 94, -10, 94,
-32768, 418, 424, 94, 94, 203, 33, 203, 35, 203,
94, 94, 47,-32768, 94, 50,-32768, 94, 55,-32768,
-32768,-32768, 426, 94, 94, 427,-32768, 428,-32768, 429,
94, 94, 197, 431,-32768, 197, 432, 94, 197, 434,
-32768, 94, 94,-32768,-32768,-32768, 435, 436, 94, 94,
94, 94,-32768, 94, 94, 94,-32768,-32768,-32768, 94,
94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
437, 438, 94, 439, 441, 94, 94,-32768,-32768, 94,
-32768,-32768, 445, 449, 94,-32768,-32768, 94, 94,-32768,
411, 477,-32768
};
static const short yypgoto[] =
{
-32768,-32768, 493,-32768,-32768,-32768,-32768, 296,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -196,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 81,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-233,-32768, 49,-32768,-32768, -282, -201, -186, -184, -171,
-279, -134,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -231,
-32768,-32768,-32768, 46, -1,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768, 425, -352,-32768,-32768, 195, 167, 9,
-84,-32768, -5,-32768,-32768, -2, -122, -93, 657
};
#define YYLAST 1227
static const short yytable[] =
{
44, 312, 44, 135, 140, 141, 142, 321, 598, 145,
76, 148, 76, 76, 76, 76, 143, 76, 76, 76,
76, 76, 432, 434, 13, 14, 79, 80, 81, 82,
209, 86, 87, 88, 89, 90, 135, 175, 135, 217,
214, 220, 76, 13, 14, 13, 14, 185, 13, 14,
13, 14, 214, 13, 14, 138, 96, 207, 13, 14,
217, 62, 484, 317, 548, 78, 287, 316, 62, 214,
22, 94, 63, 119, 599, 135, 207, 408, 316, 63,
592, 327, 419, 217, 449, 595, 420, 93, 76, 134,
428, 380, 328, 136, 549, 119, 288, 135, 299, 223,
313, 95, 133, 243, 146, 332, 218, 300, 215, 160,
162, 317, 170, 485, 565, 97, 119, 606, 26, 608,
469, 98, 317, 276, 542, 279, 119, 471, 551, 26,
612, 543, 191, 615, 189, 318, 319, 477, 618, 301,
302, 22, 320, 267, 303, 383, 318, 319, 593, 304,
480, 138, 596, 541, 544, 305, 99, 268, 216, 545,
219, 100, 418, 269, 306, 102, 546, 225, 307, 308,
427, 309, 412, 310, 270, 413, 521, 72, 289, 264,
421, 103, 119, 422, 174, 311, 265, 244, 83, 547,
416, 188, 271, 104, 91, 92, 522, 106, 425, 248,
13, 14, 290, 138, 139, 523, 197, 198, 109, 277,
291, 292, 280, 110, 278, 293, 586, 281, 588, 101,
294, 111, 44, 44, 44, 521, 295, 112, 524, 107,
65, 236, 237, 114, 382, 296, 113, 115, 116, 297,
333, 525, 117, 121, 125, 522, 334, 131, 72, 1,
2, 3, 4, 192, 523, 193, 298, 227, 228, 229,
137, 144, 66, 67, 149, 152, 153, 415, 163, 176,
177, 348, 68, 453, 350, 424, 178, 524, 69, 352,
194, 165, 168, 321, 180, 464, 195, 70, 181, 442,
557, 71, 182, 183, 184, 472, 186, 187, 527, 196,
72, 200, 201, 283, 481, 202, 566, 203, 314, 212,
213, 76, 76, 76, 76, 221, 222, 224, 65, 226,
247, 266, 282, 330, 331, 376, 377, 378, 379, 335,
336, 479, 384, 386, 388, 389, 390, 391, 392, 393,
337, 338, 397, 399, 400, 401, 402, 403, 404, 405,
66, 67, 339, 340, 341, 342, 344, 160, 345, 162,
68, 346, 347, 349, 351, 160, 69, 162, 356, 357,
358, 359, 360, 361, 65, 70, 363, 364, 365, 71,
366, 367, 368, 369, 444, 371, 445, 372, 72, 373,
450, 451, 374, 375, 395, 455, 315, 406, 457, 458,
459, 460, 461, 462, 407, 417, 66, 67, 426, 439,
441, 671, 443, 446, 447, 448, 68, 452, 454, 456,
463, 465, 69, 466, 468, 470, 473, 474, 475, 476,
478, 70, 343, 482, 483, 71, 486, 493, 487, 495,
488, 489, 497, 498, 72, 490, 491, 494, 499, 500,
354, 501, 496, 503, 355, 249, 502, 506, 507, 508,
509, 504, 362, 605, 505, 607, 510, 609, 250, 251,
252, 253, 370, 511, 254, 512, 513, 672, 532, 533,
535, 536, 553, 554, 555, 255, 561, 563, 564, 568,
570, 526, 493, 528, 529, 530, 531, 573, 29, 581,
585, 534, 601, 256, 587, 589, 537, 538, 602, 354,
620, 623, 624, 625, 629, 631, 552, 634, 550, 637,
638, 657, 658, 660, 556, 661, 558, 559, 560, 665,
165, 168, 562, 666, 514, 0, 326, 394, 165, 168,
0, 169, 0, 0, 0, 0, 572, 0, 0, 0,
0, 575, 577, 579, 580, 0, 0, 582, 583, 0,
584, 0, 0, 0, 0, 0, 0, 0, 0, 0,
590, 591, 0, 594, 0, 597, 0, 600, 0, 0,
0, 603, 604, 0, 0, 0, 0, 613, 610, 611,
616, 0, 614, 619, 0, 617, 0, 0, 0, 0,
0, 621, 622, 0, 0, 0, 0, 628, 626, 627,
630, 0, 0, 633, 0, 632, 0, 0, 0, 635,
636, 0, 0, 0, 0, 0, 639, 640, 641, 642,
0, 643, 644, 645, 0, 0, 0, 646, 647, 648,
649, 650, 651, 652, 653, 654, 655, 656, 0, 0,
659, 0, 0, 662, 663, 0, 0, 664, 6, 8,
10, 12, 667, 0, 0, 668, 669, 0, 0, 0,
0, 0, 77, 0, 77, 77, 77, 77, 0, 77,
77, 77, 77, 77, 0, 0, 0, 13, 14, 0,
0, 0, 0, 0, 0, 0, 15, 16, 0, 0,
0, 0, 0, 0, 77, 0, 0, 0, 17, 567,
18, 0, 569, 19, 0, 571, 20, 0, 21, 0,
0, 0, 0, 0, 22, 23, 0, 0, 0, 24,
25, 0, 0, 0, 0, 120, 0, 0, 0, 0,
0, 0, 0, 0, 26, 0, 0, 27, 0, 0,
77, 0, 0, 0, 0, 0, 0, 120, 0, 28,
0, 0, 0, 151, 0, 0, 0, 0, 0, 0,
0, 0, 0, 151, 173, 0, 0, 0, 120, 0,
0, 0, 0, 0, 0, 0, 0, 0, 120, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 205, 208, 0, 0,
211, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 8, 8, 8, 231, 233, 235, 12,
12, 239, 0, 242, 120, 13, 14, 246, 0, 45,
46, 0, 0, 47, 15, 16, 0, 48, 0, 0,
0, 0, 49, 0, 0, 0, 17, 0, 18, 0,
0, 19, 0, 0, 20, 0, 21, 0, 0, 50,
0, 0, 22, 23, 51, 0, 0, 24, 25, 0,
0, 0, 0, 0, 0, 0, 52, 10, 0, 0,
53, 54, 26, 0, 55, 27, 0, 56, 0, 0,
0, 0, 0, 0, 0, 0, 0, 28, 57, 0,
0, 0, 0, 0, 0, 0, 284, 13, 14, 0,
0, 45, 46, 0, 0, 47, 15, 16, 0, 48,
0, 0, 0, 0, 49, 0, 0, 0, 17, 0,
18, 0, 0, 19, 0, 0, 20, 0, 21, 0,
0, 50, 0, 0, 22, 23, 51, 0, 0, 24,
25, 0, 0, 77, 77, 77, 77, 0, 52, 0,
0, 0, 53, 54, 26, 0, 55, 27, 0, 56,
0, 0, 387, 0, 0, 0, 0, 0, 0, 28,
57, 398, 0, 0, 0, 0, 0, 0, 285, 0,
0, 0, 13, 14, 411, 0, 45, 46, 0, 0,
47, 15, 16, 0, 48, 0, 0, 0, 0, 49,
430, 411, 411, 17, 0, 18, 0, 0, 19, 0,
0, 20, 0, 21, 0, 0, 50, 0, 0, 22,
23, 51, 0, 0, 24, 25, 0, 0, 0, 0,
0, 0, 0, 52, 0, 0, 0, 53, 54, 26,
0, 55, 27, 0, 56, 0, 0, 0, 13, 14,
0, 0, 45, 46, 28, 57, 47, 15, 16, 0,
48, 0, 0, 286, 0, 49, 0, 0, 0, 17,
0, 18, 0, 0, 19, 0, 0, 20, 0, 21,
0, 0, 50, 0, 0, 22, 23, 51, 0, 0,
24, 25, 0, 0, 0, 0, 0, 0, 0, 52,
0, 0, 0, 53, 54, 26, 0, 55, 27, 0,
56, 0, 0, 0, 0, 239, 516, 518, 520, 0,
28, 57, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
540, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 411, 0, 411
};
static const short yycheck[] =
{
5, 234, 7, 3, 97, 98, 99, 238, 18, 102,
15, 104, 17, 18, 19, 20, 100, 22, 23, 24,
25, 26, 374, 375, 3, 4, 17, 18, 19, 20,
152, 22, 23, 24, 25, 26, 3, 121, 3, 17,
16, 163, 47, 3, 4, 3, 4, 131, 3, 4,
3, 4, 16, 3, 4, 3, 47, 150, 3, 4,
17, 54, 33, 53, 54, 83, 54, 9, 54, 16,
40, 83, 65, 78, 84, 3, 169, 356, 9, 65,
16, 73, 364, 17, 84, 17, 365, 24, 93, 94,
372, 84, 84, 95, 84, 100, 84, 3, 232, 47,
234, 83, 93, 187, 21, 84, 84, 6, 84, 111,
112, 53, 117, 84, 84, 83, 121, 84, 60, 84,
84, 83, 53, 83, 54, 83, 131, 84, 83, 60,
83, 61, 137, 83, 136, 77, 78, 84, 83, 38,
39, 40, 84, 35, 43, 73, 77, 78, 84, 48,
84, 3, 84, 84, 84, 54, 83, 49, 160, 54,
162, 83, 363, 55, 63, 83, 61, 172, 67, 68,
371, 70, 358, 72, 66, 359, 19, 76, 6, 47,
366, 83, 187, 367, 84, 84, 54, 189, 21, 84,
361, 84, 84, 83, 27, 28, 39, 83, 369, 201,
3, 4, 30, 3, 4, 48, 3, 4, 83, 214,
38, 39, 217, 83, 216, 43, 568, 219, 570, 52,
48, 83, 227, 228, 229, 19, 54, 83, 71, 62,
6, 182, 183, 83, 327, 63, 69, 83, 83, 67,
245, 84, 83, 83, 83, 39, 248, 83, 76, 79,
80, 81, 82, 84, 48, 84, 84, 176, 177, 178,
83, 83, 38, 39, 83, 83, 83, 360, 83, 83,
83, 276, 48, 395, 279, 368, 83, 71, 54, 281,
84, 114, 115, 514, 83, 407, 84, 63, 83, 73,
84, 67, 83, 83, 83, 417, 83, 83, 494, 84,
76, 84, 83, 83, 426, 84, 539, 84, 84, 84,
84, 316, 317, 318, 319, 84, 84, 84, 6, 84,
84, 84, 84, 84, 84, 316, 317, 318, 319, 83,
83, 424, 334, 335, 336, 337, 338, 339, 340, 341,
83, 83, 344, 345, 346, 347, 348, 349, 350, 351,
38, 39, 83, 83, 83, 83, 83, 359, 83, 361,
48, 83, 83, 83, 83, 367, 54, 369, 83, 83,
83, 83, 83, 83, 6, 63, 83, 83, 83, 67,
83, 83, 83, 83, 386, 83, 388, 83, 76, 83,
392, 393, 83, 83, 83, 397, 84, 84, 400, 401,
402, 403, 404, 405, 83, 83, 38, 39, 83, 83,
83, 0, 84, 84, 84, 84, 48, 84, 84, 84,
84, 84, 54, 84, 84, 84, 84, 84, 84, 84,
84, 63, 265, 84, 84, 67, 84, 439, 84, 441,
83, 83, 444, 445, 76, 83, 83, 83, 450, 451,
283, 84, 83, 455, 287, 36, 84, 459, 460, 461,
462, 84, 295, 585, 84, 587, 84, 589, 49, 50,
51, 52, 305, 84, 55, 84, 83, 0, 84, 84,
84, 84, 83, 83, 83, 66, 84, 84, 84, 83,
83, 493, 494, 495, 496, 497, 498, 83, 5, 84,
83, 503, 84, 84, 83, 83, 508, 509, 84, 342,
84, 84, 84, 84, 83, 83, 521, 83, 519, 84,
84, 84, 84, 84, 526, 84, 528, 529, 530, 84,
363, 364, 534, 84, 488, -1, 240, 342, 371, 372,
-1, 116, -1, -1, -1, -1, 551, -1, -1, -1,
-1, 553, 554, 555, 556, -1, -1, 559, 560, -1,
562, -1, -1, -1, -1, -1, -1, -1, -1, -1,
572, 573, -1, 575, -1, 577, -1, 579, -1, -1,
-1, 583, 584, -1, -1, -1, -1, 592, 590, 591,
595, -1, 594, 598, -1, 597, -1, -1, -1, -1,
-1, 603, 604, -1, -1, -1, -1, 612, 610, 611,
615, -1, -1, 618, -1, 617, -1, -1, -1, 621,
622, -1, -1, -1, -1, -1, 628, 629, 630, 631,
-1, 633, 634, 635, -1, -1, -1, 639, 640, 641,
642, 643, 644, 645, 646, 647, 648, 649, -1, -1,
652, -1, -1, 655, 656, -1, -1, 659, 1, 2,
3, 4, 664, -1, -1, 667, 668, -1, -1, -1,
-1, -1, 15, -1, 17, 18, 19, 20, -1, 22,
23, 24, 25, 26, -1, -1, -1, 3, 4, -1,
-1, -1, -1, -1, -1, -1, 12, 13, -1, -1,
-1, -1, -1, -1, 47, -1, -1, -1, 24, 542,
26, -1, 545, 29, -1, 548, 32, -1, 34, -1,
-1, -1, -1, -1, 40, 41, -1, -1, -1, 45,
46, -1, -1, -1, -1, 78, -1, -1, -1, -1,
-1, -1, -1, -1, 60, -1, -1, 63, -1, -1,
93, -1, -1, -1, -1, -1, -1, 100, -1, 75,
-1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 116, 117, -1, -1, -1, 121, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 131, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 149, 150, -1, -1,
153, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 176, 177, 178, 179, 180, 181, 182,
183, 184, -1, 186, 187, 3, 4, 190, -1, 7,
8, -1, -1, 11, 12, 13, -1, 15, -1, -1,
-1, -1, 20, -1, -1, -1, 24, -1, 26, -1,
-1, 29, -1, -1, 32, -1, 34, -1, -1, 37,
-1, -1, 40, 41, 42, -1, -1, 45, 46, -1,
-1, -1, -1, -1, -1, -1, 54, 240, -1, -1,
58, 59, 60, -1, 62, 63, -1, 65, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
-1, -1, -1, -1, -1, -1, 84, 3, 4, -1,
-1, 7, 8, -1, -1, 11, 12, 13, -1, 15,
-1, -1, -1, -1, 20, -1, -1, -1, 24, -1,
26, -1, -1, 29, -1, -1, 32, -1, 34, -1,
-1, 37, -1, -1, 40, 41, 42, -1, -1, 45,
46, -1, -1, 316, 317, 318, 319, -1, 54, -1,
-1, -1, 58, 59, 60, -1, 62, 63, -1, 65,
-1, -1, 335, -1, -1, -1, -1, -1, -1, 75,
76, 344, -1, -1, -1, -1, -1, -1, 84, -1,
-1, -1, 3, 4, 357, -1, 7, 8, -1, -1,
11, 12, 13, -1, 15, -1, -1, -1, -1, 20,
373, 374, 375, 24, -1, 26, -1, -1, 29, -1,
-1, 32, -1, 34, -1, -1, 37, -1, -1, 40,
41, 42, -1, -1, 45, 46, -1, -1, -1, -1,
-1, -1, -1, 54, -1, -1, -1, 58, 59, 60,
-1, 62, 63, -1, 65, -1, -1, -1, 3, 4,
-1, -1, 7, 8, 75, 76, 11, 12, 13, -1,
15, -1, -1, 84, -1, 20, -1, -1, -1, 24,
-1, 26, -1, -1, 29, -1, -1, 32, -1, 34,
-1, -1, 37, -1, -1, 40, 41, 42, -1, -1,
45, 46, -1, -1, -1, -1, -1, -1, -1, 54,
-1, -1, -1, 58, 59, 60, -1, 62, 63, -1,
65, -1, -1, -1, -1, 488, 489, 490, 491, -1,
75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
513, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 568, -1, 570
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/share/bison/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* This is the parser code that is written into each bison parser when
the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
/* The parser invokes alloca or malloc; define the necessary symbols. */
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# else
# ifndef YYSTACK_USE_ALLOCA
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short yyss;
YYSTYPE yyvs;
# if YYLSP_NEEDED
YYLTYPE yyls;
# endif
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# if YYLSP_NEEDED
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)
# else
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
# endif
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
register YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (0)
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#endif
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ \
yyerror ("syntax error: cannot back up"); \
YYERROR; \
} \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
are run).
When YYLLOC_DEFAULT is run, CURRENT is set the location of the
first token. By default, to implement support for ranges, extend
its range to the last symbol. */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#if YYPURE
# if YYLSP_NEEDED
# ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
# else
# define YYLEX yylex (&yylval, &yylloc)
# endif
# else /* !YYLSP_NEEDED */
# ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
# else
# define YYLEX yylex (&yylval)
# endif
# endif /* !YYLSP_NEEDED */
#else /* !YYPURE */
# define YYLEX yylex ()
#endif /* !YYPURE */
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# endif
# define YYDPRINTF(Args) \
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
#ifdef YYERROR_VERBOSE
# ifndef yystrlen
# if defined (__GLIBC__) && defined (_STRING_H)
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
static YYSIZE_T
# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
# else
yystrlen (yystr)
const char *yystr;
# endif
{
register const char *yys = yystr;
while (*yys++ != '\0')
continue;
return yys - yystr - 1;
}
# endif
# endif
# ifndef yystpcpy
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
static char *
# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
# else
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
# endif
{
register char *yyd = yydest;
register const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
# endif
# endif
#endif
#line 315 "/usr/share/bison/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
# define YYPARSE_PARAM_DECL
# else
# define YYPARSE_PARAM_ARG YYPARSE_PARAM
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
# endif
#else /* !YYPARSE_PARAM */
# define YYPARSE_PARAM_ARG
# define YYPARSE_PARAM_DECL
#endif /* !YYPARSE_PARAM */
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
# ifdef YYPARSE_PARAM
int yyparse (void *);
# else
int yyparse (void);
# endif
#endif
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
variables are global, or local to YYPARSE. */
#define YY_DECL_NON_LSP_VARIABLES \
/* The lookahead symbol. */ \
int yychar; \
\
/* The semantic value of the lookahead symbol. */ \
YYSTYPE yylval; \
\
/* Number of parse errors so far. */ \
int yynerrs;
#if YYLSP_NEEDED
# define YY_DECL_VARIABLES \
YY_DECL_NON_LSP_VARIABLES \
\
/* Location data for the lookahead symbol. */ \
YYLTYPE yylloc;
#else
# define YY_DECL_VARIABLES \
YY_DECL_NON_LSP_VARIABLES
#endif
/* If nonreentrant, generate the variables here. */
#if !YYPURE
YY_DECL_VARIABLES
#endif /* !YYPURE */
int
yyparse (YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
/* If reentrant, generate the variables here. */
#if YYPURE
YY_DECL_VARIABLES
#endif /* !YYPURE */
register int yystate;
register int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Lookahead token as an internal (translated) token number. */
int yychar1 = 0;
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
short yyssa[YYINITDEPTH];
short *yyss = yyssa;
register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
register YYSTYPE *yyvsp;
#if YYLSP_NEEDED
/* The location stack. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#endif
#if YYLSP_NEEDED
# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
# define YYPOPSTACK (yyvsp--, yyssp--)
#endif
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
#if YYLSP_NEEDED
YYLTYPE yyloc;
#endif
/* When reducing, the number of symbols on the RHS of the reduced
rule. */
int yylen;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
#if YYLSP_NEEDED
yylsp = yyls;
#endif
goto yysetstate;
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks.
*/
yyssp++;
yysetstate:
*yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. */
# if YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
yyls = yyls1;
# else
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
# endif
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyoverflowlab;
# else
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
goto yyoverflowlab;
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
{
short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyoverflowlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
# if YYLSP_NEEDED
YYSTACK_RELOCATE (yyls);
# endif
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
#if YYLSP_NEEDED
yylsp = yyls + yysize - 1;
#endif
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yychar1 = YYTRANSLATE (yychar);
#if YYDEBUG
/* We have to keep this `#if YYDEBUG', since we use variables
which are defined only if `YYDEBUG' is set. */
if (yydebug)
{
YYFPRINTF (stderr, "Next token is %d (%s",
yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise
meaning of a token, for further debugging info. */
# ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
# endif
YYFPRINTF (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
YYDPRINTF ((stderr, "Shifting token %d (%s), ",
yychar, yytname[yychar1]));
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#if YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
yystate = yyn;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
Otherwise, the following line sets YYVAL to the semantic value of
the lookahead token. This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
#if YYLSP_NEEDED
/* Similarly for the default location. Let the user run additional
commands if for instance locations are ranges. */
yyloc = yylsp[1-yylen];
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
#endif
#if YYDEBUG
/* We have to keep this `#if YYDEBUG', since we use variables which
are defined only if `YYDEBUG' is set. */
if (yydebug)
{
int yyi;
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
switch (yyn) {
case 6:
#line 195 "parser.yxx"
{
DCAST(EggData, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 21:
#line 234 "parser.yxx"
{
string strval = yyvsp[-1]._string;
EggCoordinateSystem *cs = new EggCoordinateSystem;
CoordinateSystem f = parse_coordinate_system_string(strval);
if (f == CS_invalid) {
eggyywarning("Unknown coordinate system " + strval);
} else {
cs->set_value(f);
}
yyval._egg = cs;
}
break;
case 22:
#line 257 "parser.yxx"
{
yyval._egg = new EggComment(yyvsp[-3]._string, yyvsp[-1]._string);
}
break;
case 23:
#line 271 "parser.yxx"
{
string tref_name = yyvsp[-2]._string;
Filename filename = yyvsp[0]._string;
EggTexture *texture = new EggTexture(tref_name, filename);
if (textures.find(tref_name) != textures.end()) {
eggyywarning("Duplicate texture name " + tref_name);
}
textures[tref_name] = texture;
egg_stack.push_back(texture);
}
break;
case 24:
#line 284 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 26:
#line 300 "parser.yxx"
{
EggTexture *texture = DCAST(EggTexture, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
string strval = yyvsp[-1]._string;
if (cmp_nocase_uh(name, "format") == 0) {
EggTexture::Format f = EggTexture::string_format(strval);
if (f == EggTexture::F_unspecified) {
eggyywarning("Unknown texture format " + strval);
} else {
texture->set_format(f);
}
} else if (cmp_nocase_uh(name, "wrap") == 0) {
EggTexture::WrapMode w = EggTexture::string_wrap_mode(strval);
if (w == EggTexture::WM_unspecified) {
eggyywarning("Unknown texture wrap mode " + strval);
} else {
texture->set_wrap_mode(w);
}
} else if (cmp_nocase_uh(name, "wrapu") == 0) {
EggTexture::WrapMode w = EggTexture::string_wrap_mode(strval);
if (w == EggTexture::WM_unspecified) {
eggyywarning("Unknown texture wrap mode " + strval);
} else {
texture->set_wrap_u(w);
}
} else if (cmp_nocase_uh(name, "wrapv") == 0) {
EggTexture::WrapMode w = EggTexture::string_wrap_mode(strval);
if (w == EggTexture::WM_unspecified) {
eggyywarning("Unknown texture wrap mode " + strval);
} else {
texture->set_wrap_v(w);
}
} else if (cmp_nocase_uh(name, "minfilter") == 0) {
EggTexture::FilterType f = EggTexture::string_filter_type(strval);
if (f == EggTexture::FT_unspecified) {
eggyywarning("Unknown texture filter type " + strval);
} else {
texture->set_minfilter(f);
}
} else if (cmp_nocase_uh(name, "magfilter") == 0) {
EggTexture::FilterType f = EggTexture::string_filter_type(strval);
if (f == EggTexture::FT_unspecified) {
eggyywarning("Unknown texture filter type " + strval);
} else {
texture->set_magfilter(f);
}
} else if (cmp_nocase_uh(name, "anisotropic_degree") == 0) {
texture->set_anisotropic_degree((int)value);
} else if (cmp_nocase_uh(name, "envtype") == 0) {
EggTexture::EnvType e = EggTexture::string_env_type(strval);
if (e == EggTexture::ET_unspecified) {
eggyywarning("Unknown texture env type " + strval);
} else {
texture->set_env_type(e);
}
} else if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning("Unknown alpha mode " + strval);
} else {
texture->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning("Unknown depth-write mode " + strval);
} else {
texture->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning("Unknown depth-test mode " + strval);
} else {
texture->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
texture->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
texture->set_bin(strval);
} else if (cmp_nocase_uh(name, "alpha_file") == 0) {
texture->set_alpha_filename(strval);
} else {
eggyywarning("Unsupported texture scalar: " + name);
}
}
break;
case 28:
#line 415 "parser.yxx"
{
string mref_name = yyvsp[-1]._string;
EggMaterial *material = new EggMaterial(mref_name);
if (materials.find(mref_name) != materials.end()) {
eggyywarning("Duplicate material name " + mref_name);
}
materials[mref_name] = material;
egg_stack.push_back(material);
}
break;
case 29:
#line 427 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 31:
#line 443 "parser.yxx"
{
EggMaterial *material = DCAST(EggMaterial, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
if (cmp_nocase_uh(name, "diffr") == 0) {
Colorf diff = material->get_diff();
diff[0] = value;
material->set_diff(diff);
} else if (cmp_nocase_uh(name, "diffg") == 0) {
Colorf diff = material->get_diff();
diff[1] = value;
material->set_diff(diff);
} else if (cmp_nocase_uh(name, "diffb") == 0) {
Colorf diff = material->get_diff();
diff[2] = value;
material->set_diff(diff);
} else if (cmp_nocase_uh(name, "diffa") == 0) {
Colorf diff = material->get_diff();
diff[3] = value;
material->set_diff(diff);
} else if (cmp_nocase_uh(name, "ambr") == 0) {
Colorf amb = material->get_amb();
amb[0] = value;
material->set_amb(amb);
} else if (cmp_nocase_uh(name, "ambg") == 0) {
Colorf amb = material->get_amb();
amb[1] = value;
material->set_amb(amb);
} else if (cmp_nocase_uh(name, "ambb") == 0) {
Colorf amb = material->get_amb();
amb[2] = value;
material->set_amb(amb);
} else if (cmp_nocase_uh(name, "amba") == 0) {
Colorf amb = material->get_amb();
amb[3] = value;
material->set_amb(amb);
} else if (cmp_nocase_uh(name, "emitr") == 0) {
Colorf emit = material->get_emit();
emit[0] = value;
material->set_emit(emit);
} else if (cmp_nocase_uh(name, "emitg") == 0) {
Colorf emit = material->get_emit();
emit[1] = value;
material->set_emit(emit);
} else if (cmp_nocase_uh(name, "emitb") == 0) {
Colorf emit = material->get_emit();
emit[2] = value;
material->set_emit(emit);
} else if (cmp_nocase_uh(name, "emita") == 0) {
Colorf emit = material->get_emit();
emit[3] = value;
material->set_emit(emit);
} else if (cmp_nocase_uh(name, "specr") == 0) {
Colorf spec = material->get_spec();
spec[0] = value;
material->set_spec(spec);
} else if (cmp_nocase_uh(name, "specg") == 0) {
Colorf spec = material->get_spec();
spec[1] = value;
material->set_spec(spec);
} else if (cmp_nocase_uh(name, "specb") == 0) {
Colorf spec = material->get_spec();
spec[2] = value;
material->set_spec(spec);
} else if (cmp_nocase_uh(name, "speca") == 0) {
Colorf spec = material->get_spec();
spec[3] = value;
material->set_spec(spec);
} else if (cmp_nocase_uh(name, "shininess") == 0) {
material->set_shininess(value);
} else if (cmp_nocase_uh(name, "local") == 0) {
material->set_local(value != 0.0);
} else {
eggyywarning("Unsupported material scalar: " + name);
}
}
break;
case 32:
#line 538 "parser.yxx"
{
string node_name = yyvsp[-3]._string;
Filename filename = yyvsp[-1]._string;
EggExternalReference *ref = new EggExternalReference(node_name, filename);
yyval._egg = ref;
}
break;
case 33:
#line 545 "parser.yxx"
{
if (cmp_nocase_uh(yyvsp[-5]._string, "group") != 0) {
eggyyerror("keyword 'group' expected");
}
string node_name = yyvsp[-3]._string;
Filename filename = yyvsp[-1]._string;
EggExternalReference *ref = new EggExternalReference(node_name, filename);
yyval._egg = ref;
}
break;
case 34:
#line 565 "parser.yxx"
{
string name = yyvsp[0]._string;
EggVertexPool *pool = new EggVertexPool(name);
if (vertex_pools.find(name) != vertex_pools.end()) {
eggyywarning("Duplicate vertex pool name " + name);
}
vertex_pools[name] = pool;
egg_stack.push_back(pool);
}
break;
case 35:
#line 577 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 38:
#line 605 "parser.yxx"
{
egg_stack.push_back(new EggVertex);
}
break;
case 39:
#line 609 "parser.yxx"
{
PT(EggVertex) vtx = DCAST(EggVertex, egg_stack.back());
egg_stack.pop_back();
DCAST(EggVertexPool, egg_stack.back())->add_vertex(vtx);
}
break;
case 40:
#line 616 "parser.yxx"
{
vertex_index = (int)yyvsp[0]._number;
EggVertexPool *pool = DCAST(EggVertexPool, egg_stack.back());
if (vertex_index < 0) {
ostringstream errmsg;
errmsg << "Ignoring invalid vertex index " << vertex_index
<< " in vertex pool " << pool->get_name() << ends;
eggyywarning(errmsg);
vertex_index = -1;
} else if (pool->get_vertex(vertex_index) != NULL) {
ostringstream errmsg;
errmsg << "Ignoring duplicate vertex index " << vertex_index
<< " in vertex pool " << pool->get_name() << ends;
eggyywarning(errmsg);
vertex_index = -1;
}
// Even if we didn't like the vertex index number, we still need to
// go ahead and parse the vertex. We just won't save it.
egg_stack.push_back(new EggVertex);
}
break;
case 41:
#line 641 "parser.yxx"
{
PT(EggVertex) vtx = DCAST(EggVertex, egg_stack.back());
egg_stack.pop_back();
EggVertexPool *pool = DCAST(EggVertexPool, egg_stack.back());
if (vertex_index != -1) {
pool->add_vertex(vtx, vertex_index);
}
}
break;
case 42:
#line 662 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_pos(yyvsp[0]._number);
}
break;
case 43:
#line 666 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_pos(LPoint2d(yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 44:
#line 670 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_pos(LPoint3d(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 45:
#line 674 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_pos(LPoint4d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 49:
#line 681 "parser.yxx"
{
bool inserted = DCAST(EggVertex, egg_stack.back())->_dxyzs.
insert(EggMorphVertex(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
}
}
break;
case 50:
#line 689 "parser.yxx"
{
bool inserted = DCAST(EggVertex, egg_stack.back())->_dxyzs.
insert(EggMorphVertex(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string);
}
}
break;
case 51:
#line 708 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_uv(TexCoordd(yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 52:
#line 712 "parser.yxx"
{
bool inserted = DCAST(EggVertex, egg_stack.back())->_duvs.
insert(EggMorphTexCoord(yyvsp[-4]._string, LVector2d(yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string);
}
}
break;
case 53:
#line 720 "parser.yxx"
{
bool inserted = DCAST(EggVertex, egg_stack.back())->_duvs.
insert(EggMorphTexCoord(yyvsp[-3]._string, LVector2d(yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-3]._string);
}
}
break;
case 54:
#line 738 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_normal(Normald(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 55:
#line 742 "parser.yxx"
{
bool inserted = DCAST(EggVertex, egg_stack.back())->_dnormals.
insert(EggMorphNormal(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
}
}
break;
case 56:
#line 750 "parser.yxx"
{
bool inserted = DCAST(EggVertex, egg_stack.back())->_dnormals.
insert(EggMorphNormal(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string);
}
}
break;
case 57:
#line 768 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_color(Colorf(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 58:
#line 772 "parser.yxx"
{
bool inserted = DCAST(EggVertex, egg_stack.back())->_drgbas.
insert(EggMorphColor(yyvsp[-6]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-6]._string);
}
}
break;
case 59:
#line 780 "parser.yxx"
{
bool inserted = DCAST(EggVertex, egg_stack.back())->_drgbas.
insert(EggMorphColor(yyvsp[-5]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
}
}
break;
case 60:
#line 798 "parser.yxx"
{
EggGroup *group = new EggGroup(yyvsp[0]._string);
egg_stack.push_back(group);
}
break;
case 61:
#line 803 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 62:
#line 818 "parser.yxx"
{
EggGroup *group = new EggGroup(yyvsp[0]._string);
group->set_group_type(EggGroup::GT_joint);
egg_stack.push_back(group);
}
break;
case 63:
#line 824 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 64:
#line 839 "parser.yxx"
{
EggGroup *group = new EggGroup(yyvsp[0]._string);
group->set_group_type(EggGroup::GT_instance);
egg_stack.push_back(group);
}
break;
case 65:
#line 845 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 67:
#line 861 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
string strval = yyvsp[-1]._string;
if (cmp_nocase_uh(name, "fps") == 0) {
group->set_switch_fps(value);
} else if (cmp_nocase_uh(name, "no_fog") == 0) {
group->set_nofog_flag(value != 0);
} else if (cmp_nocase_uh(name, "decal") == 0) {
group->set_decal_flag(value != 0);
} else if (cmp_nocase_uh(name, "direct") == 0) {
group->set_direct_flag(value != 0);
} else if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning("Unknown alpha mode " + strval);
} else {
group->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning("Unknown depth-write mode " + strval);
} else {
group->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning("Unknown depth-test mode " + strval);
} else {
group->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
group->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
group->set_bin(strval);
} else if (cmp_nocase_uh(name, "collide_mask") == 0) {
group->set_collide_mask((int)value);
} else if (cmp_nocase_uh(name, "from_collide_mask") == 0) {
group->set_from_collide_mask((int)value);
} else if (cmp_nocase_uh(name, "into_collide_mask") == 0) {
group->set_into_collide_mask((int)value);
} else {
eggyywarning("Unknown group scalar " + name);
}
}
break;
case 68:
#line 914 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string strval = yyvsp[-1]._string;
EggGroup::BillboardType f = EggGroup::string_billboard_type(strval);
if (f == EggGroup::BT_none) {
eggyywarning("Unknown billboard type " + strval);
} else {
group->set_billboard_type(f);
}
}
break;
case 69:
#line 926 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
group->set_billboard_center(LPoint3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
break;
case 70:
#line 931 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string name = yyvsp[-4]._string;
group->set_collision_name(name);
}
break;
case 71:
#line 938 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_dcs_flag(value!=0);
}
break;
case 72:
#line 944 "parser.yxx"
{
// The traditional flavor of DART, with { 0 } or { 1 }.
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_dart_type(value!=0 ? EggGroup::DT_default : EggGroup::DT_none);
}
break;
case 73:
#line 951 "parser.yxx"
{
// The special flavor of DART, with { sync } or { nosync }.
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string strval = yyvsp[-1]._string;
EggGroup::DartType f = EggGroup::string_dart_type(strval);
if (f == EggGroup::DT_none) {
eggyywarning("Unknown dart type " + strval);
} else {
group->set_dart_type(f);
}
}
break;
case 74:
#line 964 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_switch_flag(value!=0);
}
break;
case 75:
#line 970 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string type = yyvsp[-1]._string;
group->add_object_type(type);
}
break;
case 76:
#line 976 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_model_flag(value!=0);
}
break;
case 77:
#line 982 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_texlist_flag(value!=0);
}
break;
case 81:
#line 991 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 82:
#line 1005 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string strval = yyvsp[0]._string;
EggGroup::CollisionSolidType f = EggGroup::string_cs_type(strval);
if (f == EggGroup::CST_none) {
eggyywarning("Unknown collision solid type " + strval);
} else {
group->set_cs_type(f);
}
}
break;
case 84:
#line 1028 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string strval = yyvsp[0]._string;
EggGroup::CollideFlags f = EggGroup::string_collide_flags(strval);
if (f == EggGroup::CF_none) {
eggyywarning("Unknown collision flag " + strval);
} else {
group->set_collide_flags(group->get_collide_flags() | f);
}
}
break;
case 85:
#line 1050 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->clear_transform();
}
break;
case 95:
#line 1076 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_translate(LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
break;
case 96:
#line 1082 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_rotx(yyvsp[-1]._number);
}
break;
case 97:
#line 1088 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_roty(yyvsp[-1]._number);
}
break;
case 98:
#line 1094 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_rotz(yyvsp[-1]._number);
}
break;
case 99:
#line 1100 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_rotate(yyvsp[-4]._number, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
break;
case 100:
#line 1106 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_scale(LVecBase3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
break;
case 101:
#line 1110 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_uniform_scale(yyvsp[-1]._number);
}
break;
case 104:
#line 1125 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_matrix
(LMatrix4d(yyvsp[-15]._number, yyvsp[-14]._number, yyvsp[-13]._number, yyvsp[-12]._number,
yyvsp[-11]._number, yyvsp[-10]._number, yyvsp[-9]._number, yyvsp[-8]._number,
yyvsp[-7]._number, yyvsp[-6]._number, yyvsp[-5]._number, yyvsp[-4]._number,
yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 105:
#line 1144 "parser.yxx"
{
matrix_2d = LMatrix3d::ident_mat();
}
break;
case 106:
#line 1148 "parser.yxx"
{
DCAST(EggTexture, egg_stack.back())->set_transform(matrix_2d);
}
break;
case 112:
#line 1170 "parser.yxx"
{
matrix_2d *= LMatrix3d::translate_mat(yyvsp[-2]._number, yyvsp[-1]._number);
}
break;
case 113:
#line 1176 "parser.yxx"
{
matrix_2d *= LMatrix3d::rotate_mat(yyvsp[-1]._number);
}
break;
case 114:
#line 1182 "parser.yxx"
{
matrix_2d *= LMatrix3d::scale_mat(yyvsp[-2]._number, yyvsp[-1]._number);
}
break;
case 117:
#line 1195 "parser.yxx"
{
matrix_2d *= LMatrix3d(yyvsp[-8]._number, yyvsp[-7]._number, yyvsp[-6]._number,
yyvsp[-5]._number, yyvsp[-4]._number, yyvsp[-3]._number,
yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number);
}
break;
case 118:
#line 1212 "parser.yxx"
{
if (yyvsp[-2]._egg != (EggVertexPool *)NULL) {
EggVertexPool *pool = DCAST(EggVertexPool, yyvsp[-2]._egg);
EggGroup *group = DCAST(EggGroup, egg_stack.back());
PTA_double nums = yyvsp[-6]._number_list;
double membership = yyvsp[-5]._number;
for (int i = 0; i < (int)nums.size(); i++) {
int index = (int)nums[i];
EggVertex *vertex = pool->get_vertex(index);
if (vertex == NULL) {
ostringstream errmsg;
errmsg << "No vertex " << index << " in pool " << pool->get_name()
<< ends;
eggyyerror(errmsg);
} else {
group->ref_vertex(vertex, membership);
}
}
}
}
break;
case 119:
#line 1245 "parser.yxx"
{
yyval._number = 1.0;
}
break;
case 120:
#line 1249 "parser.yxx"
{
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
double result = yyvsp[-5]._number;
if (cmp_nocase_uh(name, "membership") == 0) {
result = value;
} else {
eggyywarning("Unknown group vertex scalar " + name);
}
yyval._number = result;
}
break;
case 122:
#line 1286 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
group->set_lod(EggSwitchConditionDistance(yyvsp[-8]._number, yyvsp[-7]._number, LPoint3d(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number)));
}
break;
case 123:
#line 1291 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
group->set_lod(EggSwitchConditionDistance(yyvsp[-9]._number, yyvsp[-8]._number, LPoint3d(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number), yyvsp[-7]._number));
}
break;
case 124:
#line 1308 "parser.yxx"
{
egg_stack.push_back(new EggPolygon(yyvsp[0]._string));
}
break;
case 125:
#line 1312 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 126:
#line 1327 "parser.yxx"
{
egg_stack.push_back(new EggPoint(yyvsp[0]._string));
}
break;
case 127:
#line 1331 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 128:
#line 1346 "parser.yxx"
{
egg_stack.push_back(new EggNurbsSurface(yyvsp[0]._string));
}
break;
case 129:
#line 1350 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 130:
#line 1365 "parser.yxx"
{
egg_stack.push_back(new EggNurbsCurve(yyvsp[0]._string));
}
break;
case 131:
#line 1369 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 140:
#line 1393 "parser.yxx"
{
EggPrimitive *primitive = DCAST(EggPrimitive, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
string strval = yyvsp[-1]._string;
if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning("Unknown alpha mode " + strval);
} else {
primitive->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning("Unknown depth-write mode " + strval);
} else {
primitive->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning("Unknown depth-test mode " + strval);
} else {
primitive->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
primitive->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
primitive->set_bin(strval);
} else {
eggyywarning("Unknown scalar " + name);
}
}
break;
case 152:
#line 1453 "parser.yxx"
{
EggNurbsCurve *curve = DCAST(EggNurbsCurve, yyvsp[0]._egg);
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
nurbs->_curves_on_surface.push_back(curve);
}
break;
case 154:
#line 1460 "parser.yxx"
{
EggNurbsSurface *primitive = DCAST(EggNurbsSurface, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
string strval = yyvsp[-1]._string;
if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning("Unknown alpha mode " + strval);
} else {
primitive->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning("Unknown depth-write mode " + strval);
} else {
primitive->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning("Unknown depth-test mode " + strval);
} else {
primitive->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
primitive->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
primitive->set_bin(strval);
} else if (cmp_nocase_uh(name, "u_subdiv") == 0) {
primitive->set_u_subdiv((int)value);
} else if (cmp_nocase_uh(name, "v_subdiv") == 0) {
primitive->set_v_subdiv((int)value);
} else {
eggyywarning("Unknown scalar " + name);
}
}
break;
case 165:
#line 1524 "parser.yxx"
{
EggNurbsCurve *primitive = DCAST(EggNurbsCurve, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
string strval = yyvsp[-1]._string;
if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning("Unknown alpha mode " + strval);
} else {
primitive->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning("Unknown depth-write mode " + strval);
} else {
primitive->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning("Unknown depth-test mode " + strval);
} else {
primitive->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
primitive->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
primitive->set_bin(strval);
} else if (cmp_nocase_uh(name, "subdiv") == 0) {
primitive->set_subdiv((int)value);
} else if (cmp_nocase_uh(name, "type") == 0) {
EggCurve::CurveType a = EggCurve::string_curve_type(strval);
if (a == EggCurve::CT_none) {
eggyywarning("Unknown curve type " + strval);
} else {
primitive->set_curve_type(a);
}
} else {
eggyywarning("Unknown scalar " + name);
}
}
break;
case 166:
#line 1583 "parser.yxx"
{
if (yyvsp[0]._egg != (EggTexture *)NULL) {
EggTexture *texture = DCAST(EggTexture, yyvsp[0]._egg);
DCAST(EggPrimitive, egg_stack.back())->set_texture(texture);
}
}
break;
case 167:
#line 1600 "parser.yxx"
{
EggTexture *texture = NULL;
// Defining a texture on-the-fly.
Filename filename = yyvsp[0]._string;
string tref_name = filename.get_basename();
Textures::iterator vpi = textures.find(tref_name);
if (vpi == textures.end()) {
// The texture was not yet defined. Define it.
texture = new EggTexture(tref_name, filename);
textures[tref_name] = texture;
if (egg_top_node != NULL) {
egg_top_node->add_child(texture);
}
} else {
// The texture already existed. Use it.
texture = (*vpi).second;
if (filename != texture->get_filename()) {
eggyywarning(string("Using previous path: ") +
texture->get_filename().get_fullpath());
}
}
nassertr(texture != NULL, 0);
DCAST(EggPrimitive, egg_stack.back())->set_texture(texture);
}
break;
case 168:
#line 1640 "parser.yxx"
{
if (yyvsp[0]._egg != (EggMaterial *)NULL) {
EggMaterial *material = DCAST(EggMaterial, yyvsp[0]._egg);
DCAST(EggPrimitive, egg_stack.back())->set_material(material);
}
}
break;
case 169:
#line 1657 "parser.yxx"
{
DCAST(EggPrimitive, egg_stack.back())->set_normal(Normald(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 170:
#line 1661 "parser.yxx"
{
bool inserted = DCAST(EggPrimitive, egg_stack.back())->_dnormals.
insert(EggMorphNormal(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
}
}
break;
case 171:
#line 1669 "parser.yxx"
{
bool inserted = DCAST(EggPrimitive, egg_stack.back())->_dnormals.
insert(EggMorphNormal(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string);
}
}
break;
case 172:
#line 1687 "parser.yxx"
{
DCAST(EggPrimitive, egg_stack.back())->set_color(Colorf(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 173:
#line 1691 "parser.yxx"
{
bool inserted = DCAST(EggPrimitive, egg_stack.back())->_drgbas.
insert(EggMorphColor(yyvsp[-6]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-6]._string);
}
}
break;
case 174:
#line 1699 "parser.yxx"
{
bool inserted = DCAST(EggPrimitive, egg_stack.back())->_drgbas.
insert(EggMorphColor(yyvsp[-5]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
if (!inserted) {
eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
}
}
break;
case 175:
#line 1717 "parser.yxx"
{
EggPrimitive *primitive = DCAST(EggPrimitive, egg_stack.back());
int value = (int)yyvsp[0]._number;
primitive->set_bface_flag(value!=0);
}
break;
case 176:
#line 1733 "parser.yxx"
{
if (yyvsp[-2]._egg != (EggVertexPool *)NULL) {
EggVertexPool *pool = DCAST(EggVertexPool, yyvsp[-2]._egg);
EggPrimitive *prim = DCAST(EggPrimitive, egg_stack.back());
PTA_double nums = yyvsp[-5]._number_list;
for (int i = 0; i < (int)nums.size(); i++) {
int index = (int)nums[i];
EggVertex *vertex = pool->get_vertex(index);
if (vertex == NULL) {
ostringstream errmsg;
errmsg << "No vertex " << index << " in pool " << pool->get_name()
<< ends;
eggyyerror(errmsg);
} else {
prim->add_vertex(vertex);
}
}
}
}
break;
case 177:
#line 1764 "parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
int u_order = (int)yyvsp[-1]._number;
int v_order = (int)yyvsp[0]._number;
nurbs->set_u_order(u_order);
nurbs->set_v_order(v_order);
}
break;
case 178:
#line 1782 "parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
PTA_double nums = yyvsp[0]._number_list;
nurbs->set_num_u_knots(nums.size());
for (int i = 0; i < (int)nums.size(); i++) {
nurbs->set_u_knot(i, nums[i]);
}
}
break;
case 179:
#line 1802 "parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
PTA_double nums = yyvsp[0]._number_list;
nurbs->set_num_v_knots(nums.size());
for (int i = 0; i < (int)nums.size(); i++) {
nurbs->set_v_knot(i, nums[i]);
}
}
break;
case 180:
#line 1822 "parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
nurbs->_trims.push_back(EggNurbsSurface::Trim());
}
break;
case 182:
#line 1838 "parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
nassertr(!nurbs->_trims.empty(), 0);
nurbs->_trims.back().push_back(EggNurbsSurface::Loop());
}
break;
case 183:
#line 1844 "parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
nassertr(!nurbs->_trims.empty(), 0);
nassertr(!nurbs->_trims.back().empty(), 0);
EggNurbsCurve *curve = DCAST(EggNurbsCurve, yyvsp[0]._egg);
nurbs->_trims.back().back().push_back(curve);
}
break;
case 184:
#line 1863 "parser.yxx"
{
EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, egg_stack.back());
int order = (int)yyvsp[0]._number;
nurbs->set_order(order);
}
break;
case 185:
#line 1879 "parser.yxx"
{
EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, egg_stack.back());
PTA_double nums = yyvsp[0]._number_list;
nurbs->set_num_knots(nums.size());
for (int i = 0; i < (int)nums.size(); i++) {
nurbs->set_knot(i, nums[i]);
}
}
break;
case 186:
#line 1900 "parser.yxx"
{
EggTable *table = new EggTable(yyvsp[0]._string);
table->set_table_type(EggTable::TT_table);
egg_stack.push_back(table);
}
break;
case 187:
#line 1906 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 188:
#line 1922 "parser.yxx"
{
EggTable *table = new EggTable(yyvsp[0]._string);
table->set_table_type(EggTable::TT_bundle);
egg_stack.push_back(table);
}
break;
case 189:
#line 1928 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 191:
#line 1945 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 192:
#line 1949 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 193:
#line 1953 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 194:
#line 1957 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 195:
#line 1961 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 196:
#line 1976 "parser.yxx"
{
EggSAnimData *anim_data = new EggSAnimData(yyvsp[0]._string);
egg_stack.push_back(anim_data);
}
break;
case 197:
#line 1981 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 199:
#line 1998 "parser.yxx"
{
EggSAnimData *anim_data = DCAST(EggSAnimData, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
if (cmp_nocase_uh(name, "fps") == 0) {
anim_data->set_fps(value);
} else {
eggyywarning("Unsupported S$Anim scalar: " + name);
}
}
break;
case 200:
#line 2010 "parser.yxx"
{
DCAST(EggSAnimData, egg_stack.back())->set_data(yyvsp[-1]._number_list);
}
break;
case 201:
#line 2024 "parser.yxx"
{
EggXfmAnimData *anim_data = new EggXfmAnimData(yyvsp[0]._string);
egg_stack.push_back(anim_data);
}
break;
case 202:
#line 2029 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 204:
#line 2046 "parser.yxx"
{
EggXfmAnimData *anim_data = DCAST(EggXfmAnimData, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
string strval = yyvsp[-1]._string;
if (cmp_nocase_uh(name, "fps") == 0) {
anim_data->set_fps(value);
} else if (cmp_nocase_uh(name, "order") == 0) {
anim_data->set_order(strval);
} else if (cmp_nocase_uh(name, "contents") == 0) {
anim_data->set_contents(strval);
} else {
eggyywarning("Unsupported Xfm$Anim scalar: " + name);
}
}
break;
case 205:
#line 2063 "parser.yxx"
{
DCAST(EggXfmAnimData, egg_stack.back())->set_data(yyvsp[-1]._number_list);
}
break;
case 206:
#line 2077 "parser.yxx"
{
EggXfmSAnim *anim_group = new EggXfmSAnim(yyvsp[0]._string);
egg_stack.push_back(anim_group);
}
break;
case 207:
#line 2082 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 209:
#line 2099 "parser.yxx"
{
EggXfmSAnim *anim_group = DCAST(EggXfmSAnim, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
string strval = yyvsp[-1]._string;
if (cmp_nocase_uh(name, "fps") == 0) {
anim_group->set_fps(value);
} else if (cmp_nocase_uh(name, "order") == 0) {
anim_group->set_order(strval);
} else {
eggyywarning("Unsupported Xfm$Anim_S$ scalar: " + name);
}
}
break;
case 210:
#line 2114 "parser.yxx"
{
DCAST(EggXfmSAnim, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 211:
#line 2129 "parser.yxx"
{
yyval._number_list = PTA_double::empty_array(0);
}
break;
case 212:
#line 2133 "parser.yxx"
{
yyval._number_list.push_back((double)yyvsp[0]._number);
}
break;
case 213:
#line 2147 "parser.yxx"
{
yyval._number_list = PTA_double::empty_array(0);
}
break;
case 214:
#line 2151 "parser.yxx"
{
yyval._number_list.push_back(yyvsp[0]._number);
}
break;
case 215:
#line 2165 "parser.yxx"
{
string name = yyvsp[0]._string;
Textures::iterator vpi = textures.find(name);
if (vpi == textures.end()) {
eggyyerror("Unknown texture " + name);
yyval._egg = PT(EggObject)();
} else {
yyval._egg = (*vpi).second;
}
}
break;
case 216:
#line 2186 "parser.yxx"
{
string name = yyvsp[0]._string;
Materials::iterator vpi = materials.find(name);
if (vpi == materials.end()) {
eggyyerror("Unknown material " + name);
yyval._egg = PT(EggObject)();
} else {
yyval._egg = (*vpi).second;
}
}
break;
case 217:
#line 2207 "parser.yxx"
{
string name = yyvsp[0]._string;
VertexPools::iterator vpi = vertex_pools.find(name);
if (vpi == vertex_pools.end()) {
eggyyerror("Unknown vertex pool " + name);
yyval._egg = PT(EggObject)();
} else {
yyval._egg = (*vpi).second;
}
}
break;
case 218:
#line 2229 "parser.yxx"
{
eggyyerror("Name required.");
yyval._string = "";
}
break;
case 221:
#line 2258 "parser.yxx"
{
eggyyerror("String required.");
yyval._string = "";
}
break;
case 223:
#line 2274 "parser.yxx"
{
yyval._string = "";
}
break;
case 225:
#line 2292 "parser.yxx"
{
yyval._string = yyvsp[0]._string;
}
break;
case 227:
#line 2309 "parser.yxx"
{
yyval._string = "";
}
break;
case 228:
#line 2313 "parser.yxx"
{
yyval._string = yyvsp[0]._string;
}
break;
case 229:
#line 2329 "parser.yxx"
{
yyval._string = yyvsp[0]._string;
}
break;
case 230:
#line 2333 "parser.yxx"
{
yyval._string = yyvsp[-1]._string + "\n" + yyvsp[0]._string;
}
break;
case 232:
#line 2358 "parser.yxx"
{
yyval._number = yyvsp[0]._number;
yyval._string = yyvsp[0]._string;
}
break;
case 233:
#line 2363 "parser.yxx"
{
yyval._number = 0.0;
yyval._string = yyvsp[0]._string;
}
break;
case 234:
#line 2379 "parser.yxx"
{
int i = (int)yyvsp[0]._number;
if ((double)i != yyvsp[0]._number) {
eggyywarning("Integer expected.");
yyval._number = (double)i;
}
}
break;
}
#line 705 "/usr/share/bison/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
#if YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#if YYLSP_NEEDED
*++yylsp = yyloc;
#endif
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
YYSIZE_T yysize = 0;
char *yymsg;
int yyx, yycount;
yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx)
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
yysize += yystrlen ("parse error, unexpected ") + 1;
yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
if (yycount < 5)
{
yycount = 0;
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *));
yyx++)
if (yycheck[yyx + yyn] == yyx)
{
const char *yyq = ! yycount ? ", expecting " : " or ";
yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
yycount++;
}
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
yyerror ("parse error; also virtual memory exhausted");
}
else
#endif /* defined (YYERROR_VERBOSE) */
yyerror ("parse error");
}
goto yyerrlab1;
/*--------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action |
`--------------------------------------------------*/
yyerrlab1:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
yychar, yytname[yychar1]));
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token after shifting the error
token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
/*-------------------------------------------------------------------.
| yyerrdefault -- current state does not do anything special for the |
| error token. |
`-------------------------------------------------------------------*/
yyerrdefault:
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
/* If its default is to accept any token, ok. Otherwise pop it. */
yyn = yydefact[yystate];
if (yyn)
goto yydefault;
#endif
/*---------------------------------------------------------------.
| yyerrpop -- pop the current state because it cannot handle the |
| error token |
`---------------------------------------------------------------*/
yyerrpop:
if (yyssp == yyss)
YYABORT;
yyvsp--;
yystate = *--yyssp;
#if YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "Error: state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
/*--------------.
| yyerrhandle. |
`--------------*/
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval;
#if YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
/*---------------------------------------------.
| yyoverflowab -- parser overflow comes here. |
`---------------------------------------------*/
yyoverflowlab:
yyerror ("parser stack overflow");
yyresult = 2;
/* Fall through. */
yyreturn:
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
return yyresult;
}
#line 2390 "parser.yxx"