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

4055 lines
138 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 ULONG 258
# define STRING 259
# define BEZIERCURVE 260
# define BFACE 261
# define BILLBOARD 262
# define BILLBOARDCENTER 263
# define BINORMAL 264
# define BUNDLE 265
# define CLOSED 266
# define COLLIDE 267
# define COMMENT 268
# define COMPONENT 269
# define COORDSYSTEM 270
# define CV 271
# define DART 272
# define DNORMAL 273
# define DRGBA 274
# define DUV 275
# define DXYZ 276
# define DCS 277
# define DISTANCE 278
# define DTREF 279
# define DYNAMICVERTEXPOOL 280
# define EXTERNAL_FILE 281
# define FLIGHT 282
# define GROUP 283
# define HIP 284
# define INTANGENT 285
# define JOINT 286
# define KNOTS 287
# define INCLUDE 288
# define INSTANCE 289
# define LINE 290
# define LOOP 291
# define MATERIAL 292
# define MATRIX3 293
# define MATRIX4 294
# define MODEL 295
# define MREF 296
# define NORMAL 297
# define NURBSCURVE 298
# define NURBSSURFACE 299
# define OBJECTTYPE 300
# define ORDER 301
# define OUTTANGENT 302
# define POINTLIGHT 303
# define POLYGON 304
# define REF 305
# define RGBA 306
# define ROTATE 307
# define ROTX 308
# define ROTY 309
# define ROTZ 310
# define SANIM 311
# define SCALAR 312
# define SCALE 313
# define SEQUENCE 314
# define SHADING 315
# define SWITCH 316
# define SWITCHCONDITION 317
# define TABLE 318
# define TABLE_V 319
# define TAG 320
# define TANGENT 321
# define TEXLIST 322
# define TEXTURE 323
# define TLENGTHS 324
# define TRANSFORM 325
# define TRANSLATE 326
# define TREF 327
# define TRIANGLEFAN 328
# define TRIANGLESTRIP 329
# define TRIM 330
# define TXT 331
# define UKNOTS 332
# define UV 333
# define VKNOTS 334
# define VERTEX 335
# define VERTEXANIM 336
# define VERTEXPOOL 337
# define VERTEXREF 338
# define XFMANIM 339
# define XFMSANIM 340
# define START_EGG 341
# define START_GROUP_BODY 342
# define START_TEXTURE_BODY 343
# define START_PRIMITIVE_BODY 344
#line 6 "parser.yxx"
#include "pandabase.h"
#include "config_egg.h"
#include "parserDefs.h"
#include "lexerDefs.h"
#include "eggObject.h"
#include "eggGroup.h"
#include "eggVertex.h"
#include "eggVertexPool.h"
#include "eggVertexUV.h"
#include "eggPolygon.h"
#include "eggCompositePrimitive.h"
#include "eggTriangleFan.h"
#include "eggTriangleStrip.h"
#include "eggPoint.h"
#include "eggLine.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() {
// Check for undefined vertex pools.
VertexPools::const_iterator vpi;
for (vpi = vertex_pools.begin(); vpi != vertex_pools.end(); ++vpi) {
EggVertexPool *pool = (*vpi).second;
if (pool->has_forward_vertices()) {
if (!pool->has_defined_vertices()) {
eggyyerror("Undefined vertex pool " + pool->get_name());
} else {
eggyyerror("Undefined vertices in pool " + pool->get_name());
egg_cat.error(false)
<< "Undefined vertex index numbers:";
EggVertexPool::const_iterator vi;
for (vi = pool->begin(); vi != pool->end(); ++vi) {
EggVertex *vertex = (*vi);
if (vertex->is_forward_reference()) {
egg_cat.error(false)
<< " " << vertex->get_index();
}
}
egg_cat.error(false)
<< "\n";
}
}
}
// 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 733
#define YYFLAG -32768
#define YYNTBASE 93
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= 344 ? yytranslate[x] : 211)
/* 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, 91, 2, 92, 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, 83, 84, 85,
86, 87, 88, 89, 90
};
#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, 47, 49, 51, 56, 62, 63, 71, 73,
80, 83, 84, 91, 93, 100, 106, 113, 114, 121,
123, 126, 127, 133, 134, 141, 143, 146, 150, 155,
156, 164, 170, 176, 185, 194, 197, 205, 213, 221,
229, 233, 242, 251, 256, 266, 276, 277, 284, 285,
292, 293, 300, 302, 309, 315, 323, 331, 337, 343,
349, 355, 361, 367, 373, 380, 386, 389, 392, 395,
398, 400, 402, 405, 406, 412, 414, 417, 420, 423,
426, 429, 432, 435, 442, 447, 452, 457, 465, 472,
477, 482, 484, 501, 502, 508, 510, 513, 516, 519,
522, 528, 533, 539, 544, 546, 556, 566, 568, 575,
580, 592, 605, 606, 613, 614, 621, 622, 629, 630,
637, 638, 645, 646, 653, 654, 661, 663, 669, 675,
677, 678, 686, 692, 698, 704, 707, 713, 719, 725,
732, 734, 740, 746, 752, 755, 761, 767, 773, 779,
785, 791, 794, 800, 807, 809, 815, 821, 827, 830,
836, 842, 848, 854, 860, 867, 869, 871, 873, 877,
886, 895, 900, 910, 920, 922, 931, 934, 936, 938,
940, 946, 948, 951, 953, 955, 956, 963, 964, 971,
973, 976, 979, 982, 985, 988, 989, 996, 998, 1005,
1011, 1012, 1019, 1021, 1028, 1034, 1035, 1042, 1044, 1051,
1054, 1056, 1059, 1061, 1064, 1066, 1068, 1070, 1072, 1074,
1076, 1078, 1080, 1082, 1084, 1086, 1088, 1090, 1092, 1094,
1096, 1099, 1101, 1103, 1105, 1107, 1109, 1111, 1113
};
static const short yyrhs[] =
{
87, 94, 0, 88, 122, 0, 89, 100, 0, 90,
163, 0, 210, 0, 94, 95, 0, 96, 0, 97,
0, 98, 0, 101, 0, 104, 0, 105, 0, 116,
0, 118, 0, 120, 0, 148, 0, 150, 0, 152,
0, 154, 0, 156, 0, 158, 0, 160, 0, 181,
0, 16, 91, 202, 92, 0, 14, 201, 91, 205,
92, 0, 0, 69, 200, 91, 202, 99, 100, 92,
0, 210, 0, 100, 58, 200, 91, 208, 92, 0,
100, 136, 0, 0, 38, 200, 91, 102, 103, 92,
0, 210, 0, 103, 58, 200, 91, 208, 92, 0,
27, 201, 91, 202, 92, 0, 204, 27, 201, 91,
202, 92, 0, 0, 83, 200, 106, 91, 107, 92,
0, 210, 0, 107, 108, 0, 0, 81, 109, 91,
111, 92, 0, 0, 81, 209, 110, 91, 111, 92,
0, 207, 0, 207, 207, 0, 207, 207, 207, 0,
207, 207, 207, 207, 0, 0, 111, 79, 201, 91,
112, 113, 92, 0, 111, 43, 91, 114, 92, 0,
111, 52, 91, 115, 92, 0, 111, 22, 204, 91,
207, 207, 207, 92, 0, 111, 22, 91, 204, 207,
207, 207, 92, 0, 207, 207, 0, 113, 67, 91,
207, 207, 207, 92, 0, 113, 10, 91, 207, 207,
207, 92, 0, 113, 21, 204, 91, 207, 207, 92,
0, 113, 21, 91, 204, 207, 207, 92, 0, 207,
207, 207, 0, 114, 19, 204, 91, 207, 207, 207,
92, 0, 114, 19, 91, 204, 207, 207, 207, 92,
0, 207, 207, 207, 207, 0, 115, 20, 204, 91,
207, 207, 207, 207, 92, 0, 115, 20, 91, 204,
207, 207, 207, 207, 92, 0, 0, 29, 201, 117,
91, 122, 92, 0, 0, 32, 201, 119, 91, 122,
92, 0, 0, 35, 201, 121, 91, 122, 92, 0,
210, 0, 122, 58, 200, 91, 208, 92, 0, 122,
8, 91, 204, 92, 0, 122, 9, 91, 207, 207,
207, 92, 0, 122, 13, 201, 91, 123, 124, 92,
0, 122, 23, 91, 209, 92, 0, 122, 23, 91,
5, 92, 0, 122, 18, 91, 209, 92, 0, 122,
18, 91, 5, 92, 0, 122, 62, 91, 209, 92,
0, 122, 46, 91, 202, 92, 0, 122, 41, 91,
209, 92, 0, 122, 66, 201, 91, 205, 92, 0,
122, 68, 91, 209, 92, 0, 122, 125, 0, 122,
144, 0, 122, 146, 0, 122, 95, 0, 204, 0,
210, 0, 124, 204, 0, 0, 71, 126, 91, 127,
92, 0, 210, 0, 127, 128, 0, 127, 129, 0,
127, 130, 0, 127, 131, 0, 127, 132, 0, 127,
133, 0, 127, 134, 0, 72, 91, 207, 207, 207,
92, 0, 54, 91, 207, 92, 0, 55, 91, 207,
92, 0, 56, 91, 207, 92, 0, 53, 91, 207,
207, 207, 207, 92, 0, 59, 91, 207, 207, 207,
92, 0, 59, 91, 207, 92, 0, 40, 91, 135,
92, 0, 210, 0, 207, 207, 207, 207, 207, 207,
207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
0, 0, 71, 137, 91, 138, 92, 0, 210, 0,
138, 142, 0, 138, 139, 0, 138, 140, 0, 138,
141, 0, 72, 91, 207, 207, 92, 0, 53, 91,
207, 92, 0, 59, 91, 207, 207, 92, 0, 39,
91, 143, 92, 0, 210, 0, 207, 207, 207, 207,
207, 207, 207, 207, 207, 0, 84, 91, 195, 145,
51, 91, 199, 92, 92, 0, 210, 0, 145, 58,
200, 91, 208, 92, 0, 63, 91, 147, 92, 0,
24, 91, 207, 207, 81, 91, 207, 207, 207, 92,
92, 0, 24, 91, 207, 207, 207, 81, 91, 207,
207, 207, 92, 92, 0, 0, 50, 201, 149, 91,
163, 92, 0, 0, 74, 201, 151, 91, 163, 92,
0, 0, 75, 201, 153, 91, 163, 92, 0, 0,
49, 201, 155, 91, 163, 92, 0, 0, 36, 201,
157, 91, 163, 92, 0, 0, 45, 201, 159, 91,
165, 92, 0, 0, 44, 201, 161, 91, 166, 92,
0, 210, 0, 162, 43, 91, 170, 92, 0, 162,
52, 91, 171, 92, 0, 210, 0, 0, 163, 15,
209, 91, 164, 162, 92, 0, 163, 73, 91, 167,
92, 0, 163, 69, 91, 168, 92, 0, 163, 42,
91, 169, 92, 0, 163, 173, 0, 163, 43, 91,
170, 92, 0, 163, 52, 91, 171, 92, 0, 163,
7, 91, 172, 92, 0, 163, 58, 200, 91, 208,
92, 0, 210, 0, 165, 73, 91, 167, 92, 0,
165, 69, 91, 168, 92, 0, 165, 42, 91, 169,
92, 0, 165, 173, 0, 165, 43, 91, 170, 92,
0, 165, 52, 91, 171, 92, 0, 165, 7, 91,
172, 92, 0, 165, 47, 91, 174, 92, 0, 165,
78, 91, 175, 92, 0, 165, 80, 91, 176, 92,
0, 165, 160, 0, 165, 76, 91, 177, 92, 0,
165, 58, 200, 91, 208, 92, 0, 210, 0, 166,
73, 91, 167, 92, 0, 166, 69, 91, 168, 92,
0, 166, 42, 91, 169, 92, 0, 166, 173, 0,
166, 43, 91, 170, 92, 0, 166, 52, 91, 171,
92, 0, 166, 7, 91, 172, 92, 0, 166, 47,
91, 179, 92, 0, 166, 33, 91, 180, 92, 0,
166, 58, 200, 91, 208, 92, 0, 197, 0, 200,
0, 198, 0, 207, 207, 207, 0, 170, 19, 204,
91, 207, 207, 207, 92, 0, 170, 19, 91, 204,
207, 207, 207, 92, 0, 207, 207, 207, 207, 0,
171, 20, 204, 91, 207, 207, 207, 207, 92, 0,
171, 20, 91, 204, 207, 207, 207, 207, 92, 0,
209, 0, 84, 91, 195, 51, 91, 199, 92, 92,
0, 209, 209, 0, 196, 0, 196, 0, 210, 0,
177, 37, 91, 178, 92, 0, 210, 0, 178, 160,
0, 209, 0, 196, 0, 0, 64, 201, 182, 91,
185, 92, 0, 0, 11, 201, 184, 91, 185, 92,
0, 210, 0, 185, 181, 0, 185, 183, 0, 185,
186, 0, 185, 189, 0, 185, 192, 0, 0, 57,
201, 187, 91, 188, 92, 0, 210, 0, 188, 58,
200, 91, 208, 92, 0, 188, 65, 91, 196, 92,
0, 0, 85, 201, 190, 91, 191, 92, 0, 210,
0, 191, 58, 200, 91, 208, 92, 0, 191, 65,
91, 196, 92, 0, 0, 86, 201, 193, 91, 194,
92, 0, 210, 0, 194, 58, 200, 91, 208, 92,
0, 194, 186, 0, 210, 0, 195, 209, 0, 210,
0, 196, 207, 0, 200, 0, 200, 0, 200, 0,
210, 0, 204, 0, 203, 0, 210, 0, 204, 0,
210, 0, 204, 0, 3, 0, 4, 0, 5, 0,
210, 0, 206, 0, 204, 0, 206, 204, 0, 3,
0, 4, 0, 3, 0, 4, 0, 5, 0, 3,
0, 4, 0, 0
};
#endif
#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
0, 215, 217, 218, 219, 229, 231, 246, 248, 249,
250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
260, 261, 262, 263, 273, 296, 310, 310, 338, 340,
622, 632, 632, 659, 661, 755, 763, 782, 782, 822,
824, 834, 834, 846, 846, 891, 896, 900, 904, 908,
908, 923, 924, 925, 933, 951, 956, 964, 972, 980,
997, 1002, 1010, 1027, 1032, 1040, 1057, 1057, 1077, 1077,
1098, 1098, 1119, 1121, 1251, 1263, 1268, 1275, 1281, 1294,
1301, 1314, 1320, 1326, 1332, 1337, 1343, 1344, 1345, 1346,
1359, 1389, 1391, 1412, 1412, 1428, 1430, 1431, 1432, 1433,
1434, 1435, 1436, 1439, 1445, 1451, 1457, 1463, 1469, 1473,
1479, 1483, 1485, 1506, 1506, 1525, 1527, 1528, 1529, 1530,
1533, 1539, 1545, 1551, 1554, 1556, 1574, 1607, 1612, 1636,
1648, 1654, 1670, 1670, 1689, 1689, 1708, 1708, 1727, 1727,
1746, 1746, 1765, 1765, 1784, 1784, 1804, 1806, 1807, 1817,
1819, 1819, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847,
1919, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929,
1930, 1931, 1937, 1938, 2001, 2003, 2004, 2005, 2006, 2007,
2008, 2009, 2010, 2011, 2012, 2080, 2097, 2137, 2154, 2159,
2167, 2184, 2189, 2197, 2214, 2230, 2261, 2279, 2299, 2319,
2325, 2335, 2342, 2360, 2376, 2397, 2397, 2419, 2419, 2441,
2443, 2447, 2451, 2455, 2459, 2473, 2473, 2494, 2496, 2508,
2521, 2521, 2542, 2544, 2561, 2574, 2574, 2595, 2597, 2612,
2626, 2631, 2644, 2649, 2662, 2683, 2704, 2730, 2736, 2747,
2759, 2765, 2775, 2780, 2793, 2798, 2802, 2814, 2819, 2834,
2839, 2852, 2854, 2868, 2875, 2881, 2897, 2906, 2912
};
#endif
#if (YYDEBUG) || defined YYERROR_VERBOSE
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
"$", "error", "$undefined.", "NUMBER", "ULONG", "STRING", "BEZIERCURVE",
"BFACE", "BILLBOARD", "BILLBOARDCENTER", "BINORMAL", "BUNDLE", "CLOSED",
"COLLIDE", "COMMENT", "COMPONENT", "COORDSYSTEM", "CV", "DART",
"DNORMAL", "DRGBA", "DUV", "DXYZ", "DCS", "DISTANCE", "DTREF",
"DYNAMICVERTEXPOOL", "EXTERNAL_FILE", "FLIGHT", "GROUP", "HIP",
"INTANGENT", "JOINT", "KNOTS", "INCLUDE", "INSTANCE", "LINE", "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", "TAG", "TANGENT", "TEXLIST",
"TEXTURE", "TLENGTHS", "TRANSFORM", "TRANSLATE", "TREF", "TRIANGLEFAN",
"TRIANGLESTRIP", "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", "@6",
"vertex_uv_body", "vertex_normal_body", "vertex_color_body", "group",
"@7", "joint", "@8", "instance", "@9", "group_body", "cs_type",
"collide_flags", "transform_3d", "@10", "transform_3d_body",
"translate_3d", "rotx_3d", "roty_3d", "rotz_3d", "rotate_3d",
"scale_3d", "matrix4_3d", "matrix4_3d_body", "transform_2d", "@11",
"transform_2d_body", "translate_2d", "rotate_2d", "scale_2d",
"matrix3_2d", "matrix3_2d_body", "group_vertex_ref",
"group_vertex_membership", "switchcondition", "switchcondition_body",
"polygon", "@12", "trianglefan", "@13", "trianglestrip", "@14",
"point_light", "@15", "line", "@16", "nurbs_surface", "@17",
"nurbs_curve", "@18", "primitive_component_body", "primitive_body",
"@19", "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", "@20",
"bundle", "@21", "table_body", "sanim", "@22", "sanim_body", "xfmanim",
"@23", "xfmanim_body", "xfm_s_anim", "@24", "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, 93, 93, 93, 93, 94, 94, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 96, 97, 99, 98, 100, 100,
100, 102, 101, 103, 103, 104, 104, 106, 105, 107,
107, 109, 108, 110, 108, 111, 111, 111, 111, 112,
111, 111, 111, 111, 111, 113, 113, 113, 113, 113,
114, 114, 114, 115, 115, 115, 117, 116, 119, 118,
121, 120, 122, 122, 122, 122, 122, 122, 122, 122,
122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
123, 124, 124, 126, 125, 127, 127, 127, 127, 127,
127, 127, 127, 128, 129, 130, 131, 132, 133, 133,
134, 135, 135, 137, 136, 138, 138, 138, 138, 138,
139, 140, 141, 142, 143, 143, 144, 145, 145, 146,
147, 147, 149, 148, 151, 150, 153, 152, 155, 154,
157, 156, 159, 158, 161, 160, 162, 162, 162, 163,
164, 163, 163, 163, 163, 163, 163, 163, 163, 163,
165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
165, 165, 165, 165, 166, 166, 166, 166, 166, 166,
166, 166, 166, 166, 166, 167, 168, 169, 170, 170,
170, 171, 171, 171, 172, 173, 174, 175, 176, 177,
177, 178, 178, 179, 180, 182, 181, 184, 183, 185,
185, 185, 185, 185, 185, 187, 186, 188, 188, 188,
190, 189, 191, 191, 191, 193, 192, 194, 194, 194,
195, 195, 196, 196, 197, 198, 199, 200, 200, 201,
202, 202, 203, 203, 204, 204, 204, 205, 205, 206,
206, 207, 207, 208, 208, 208, 209, 209, 210
};
/* 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, 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, 0,
7, 5, 5, 8, 8, 2, 7, 7, 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, 6, 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,
0, 6, 0, 6, 0, 6, 1, 5, 5, 1,
0, 7, 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, 1,
2, 1, 1, 1, 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, 258, 258, 258, 258, 1, 5, 2, 72, 3,
28, 4, 149, 244, 245, 246, 258, 0, 258, 258,
258, 258, 258, 258, 258, 258, 258, 258, 258, 258,
258, 258, 258, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 0, 0, 0, 258, 0, 0, 0, 0, 258,
0, 0, 258, 0, 93, 0, 89, 86, 87, 88,
258, 113, 30, 0, 0, 0, 0, 0, 258, 0,
0, 0, 155, 0, 239, 243, 242, 258, 0, 66,
68, 70, 140, 0, 238, 237, 144, 142, 138, 132,
205, 0, 134, 136, 37, 258, 0, 0, 0, 0,
0, 0, 258, 0, 0, 0, 0, 0, 0, 258,
0, 0, 0, 256, 257, 0, 258, 0, 0, 0,
258, 258, 258, 258, 0, 241, 240, 258, 0, 0,
0, 0, 31, 0, 0, 0, 0, 0, 258, 0,
0, 0, 0, 0, 251, 252, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 258, 0,
258, 258, 230, 0, 258, 0, 194, 150, 0, 187,
235, 0, 0, 0, 0, 0, 0, 186, 0, 185,
234, 0, 249, 0, 248, 247, 24, 0, 258, 258,
258, 258, 258, 258, 258, 258, 258, 258, 26, 258,
258, 258, 258, 74, 0, 258, 90, 80, 79, 78,
77, 83, 82, 253, 254, 255, 0, 81, 0, 129,
0, 85, 0, 95, 0, 231, 127, 0, 0, 115,
158, 258, 154, 0, 156, 0, 0, 157, 0, 0,
153, 152, 0, 25, 250, 35, 0, 0, 0, 0,
0, 33, 0, 174, 0, 160, 0, 0, 0, 209,
258, 0, 0, 0, 39, 0, 0, 0, 91, 73,
0, 84, 0, 0, 0, 0, 0, 0, 0, 94,
96, 97, 98, 99, 100, 101, 102, 0, 258, 29,
0, 0, 0, 0, 114, 117, 118, 119, 116, 0,
146, 0, 0, 188, 0, 0, 0, 159, 258, 67,
69, 71, 141, 258, 32, 0, 0, 0, 0, 0,
0, 258, 0, 0, 145, 178, 0, 0, 0, 0,
0, 258, 0, 0, 0, 0, 0, 143, 171, 164,
139, 133, 258, 258, 258, 258, 206, 210, 211, 212,
213, 214, 0, 135, 137, 41, 38, 40, 36, 75,
76, 92, 0, 258, 0, 0, 0, 0, 0, 0,
258, 0, 258, 0, 0, 0, 0, 0, 151, 0,
0, 0, 0, 191, 0, 236, 0, 0, 258, 258,
0, 0, 0, 0, 258, 258, 0, 258, 0, 0,
0, 0, 258, 258, 258, 258, 258, 207, 215, 220,
225, 27, 0, 43, 0, 0, 0, 0, 111, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 124,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 204, 232, 0, 0, 0, 203, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 199, 0, 197, 0, 198, 0, 0,
0, 0, 0, 0, 0, 0, 110, 0, 0, 104,
105, 106, 109, 0, 0, 0, 0, 123, 0, 121,
0, 0, 0, 0, 0, 0, 0, 0, 195, 0,
181, 183, 233, 177, 179, 182, 180, 0, 176, 175,
167, 163, 165, 168, 196, 166, 0, 162, 161, 0,
172, 169, 170, 258, 258, 258, 258, 0, 45, 0,
0, 0, 0, 0, 0, 0, 126, 128, 0, 122,
120, 147, 148, 0, 0, 0, 0, 34, 184, 173,
258, 0, 0, 217, 0, 222, 0, 227, 0, 0,
0, 258, 42, 46, 0, 0, 0, 0, 0, 108,
103, 0, 190, 189, 0, 0, 0, 201, 208, 258,
0, 216, 258, 0, 221, 258, 226, 229, 0, 0,
0, 0, 0, 47, 44, 0, 0, 0, 107, 0,
193, 192, 200, 202, 0, 258, 0, 258, 0, 0,
0, 0, 0, 0, 0, 49, 48, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
0, 0, 52, 0, 0, 130, 0, 0, 0, 0,
219, 0, 224, 0, 0, 0, 0, 0, 60, 0,
0, 0, 0, 0, 131, 0, 0, 218, 223, 228,
0, 0, 0, 0, 0, 0, 63, 0, 0, 0,
50, 55, 0, 125, 54, 53, 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, 62, 61, 0, 0, 0, 0, 0,
0, 0, 65, 64, 57, 59, 58, 56, 0, 0,
112, 0, 0, 0
};
static const short yydefgoto[] =
{
731, 5, 66, 34, 35, 36, 270, 9, 37, 202,
260, 38, 39, 151, 273, 367, 422, 483, 537, 644,
662, 621, 623, 40, 138, 41, 139, 42, 140, 7,
215, 277, 67, 118, 232, 290, 291, 292, 293, 294,
295, 296, 426, 72, 121, 238, 305, 306, 307, 308,
437, 68, 234, 69, 167, 43, 146, 44, 149, 45,
150, 46, 145, 47, 141, 48, 144, 49, 143, 309,
11, 241, 264, 262, 188, 186, 178, 181, 183, 175,
82, 466, 474, 476, 472, 586, 457, 452, 50, 147,
358, 478, 268, 359, 479, 562, 360, 480, 564, 361,
481, 566, 171, 453, 189, 179, 394, 180, 83, 134,
84, 94, 193, 194, 512, 226, 176, 95
};
static const short yypact[] =
{
252,-32768,-32768,-32768,-32768, 1028,-32768, 1150,-32768, 132,
-32768, 221,-32768,-32768,-32768,-32768, 317, -79, 317, 317,
317, 317, 317, 317, 317, 317, 317, 317, 317, 317,
317, 317, 317,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, 92, 51, 104, 317, 129, 134, 141, 148, 317,
149, 163, 317, 165,-32768, 169,-32768,-32768,-32768,-32768,
317,-32768,-32768, 174, 119, 177, 179, 183, 317, 184,
190, 193,-32768, 200,-32768,-32768,-32768, 317, 204,-32768,
-32768,-32768,-32768, 206,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, 207,-32768,-32768,-32768, 317, 317, 196, 209, 349,
362, 119, 317, 210, 119, 102, 213, 119, 216,-32768,
217, 225, 119,-32768,-32768, 226, 317, 196, 196, 237,
317, 317,-32768, 317, 41,-32768,-32768, 317, 238, 241,
245, 253,-32768, 264, 266, 267, 269, 280, 317, 292,
298, 299, 309, 44,-32768,-32768, 196, 317, 62, 91,
153, 197, 218, 232, 365, 251, 310, 313, 317, 314,
-32768, 119,-32768, 365,-32768, 315,-32768,-32768, 316,-32768,
-32768, -9, 196, 21, 196, 365, 319,-32768, 321,-32768,
-32768, 146,-32768, 323, 317,-32768,-32768, 326,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768, 317,-32768, 196,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768, 329,-32768, 196,-32768,
331,-32768, 420,-32768, 66,-32768,-32768, 333, 227,-32768,
-32768,-32768,-32768, 49,-32768, 196, 65,-32768, 196, 334,
-32768,-32768, 318,-32768,-32768,-32768, 748, 929, 1077, 219,
0,-32768, 175,-32768, 118,-32768, 330, 409, 87,-32768,
-32768, 462, 819, 35,-32768, 338, 340, 4,-32768,-32768,
196,-32768, 342, 343, 346, 347, 348, 350, 351,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 363, 317,-32768,
364, 366, 367, 368,-32768,-32768,-32768,-32768,-32768, 63,
-32768, 317, 371,-32768, 317, 372, 196,-32768, 317,-32768,
-32768,-32768,-32768, 317,-32768, 374, 379, 380, 381, 389,
390, 317, 392, 394,-32768,-32768, 396, 397, 400, 403,
406, 317, 407, 408, 411, 412, 419,-32768,-32768,-32768,
-32768,-32768, 317, 317, 317, 317,-32768,-32768,-32768,-32768,
-32768,-32768, 117,-32768,-32768, 119,-32768,-32768,-32768,-32768,
-32768,-32768, 99, 196, 196, 196, 196, 196, 196, 196,
317, 422, 196, 196, 196, 196, 424, 425,-32768, 196,
196, 196, 196,-32768, 361,-32768, 426, 119,-32768, 317,
196, 119, 196, 427, 317, 317, 119, 317, 196, 119,
196, 428, 317, 317,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768, 430,-32768, 431, 97, 432, 196,-32768, 196,
433, 434, 435, 39, 196, 436, 365, 437, 196,-32768,
438, 196, 196, 196, 196, 196, 196, 196, 196, 440,
365, 441, 442, 196,-32768, 444, 13, 445,-32768, 55,
365, 446, 447, 455, 456, 43, 457, 119, 74, 365,
459, 460, 19,-32768, 461, 196, 463, 196, 465, 468,
469, 470, 196, 471, 196, 473,-32768, 196, 196,-32768,
-32768,-32768,-32768, 196, 196, 475, 476,-32768, 196,-32768,
477, 478, 46, 77, 196, 196, 196, 196,-32768, 479,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 480,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768, 481,-32768,-32768, 474,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 233, 196, 196,
196, 196, 196, 196, 482, 484,-32768,-32768, 196,-32768,
-32768,-32768,-32768, 489, 490, 196, 196,-32768,-32768,-32768,
-32768, 157, 127,-32768, 166,-32768, 154,-32768, 73, 493,
494, 317,-32768, 196, 235, 196, 196, 196, 495,-32768,
-32768, 196,-32768,-32768, 496, 497, 28,-32768,-32768, 317,
499,-32768, 317, 500,-32768, 317,-32768,-32768, 317, 501,
196, 196, 503, 196,-32768, 504, 196, 196,-32768, 196,
-32768,-32768,-32768,-32768, 506,-32768, 507,-32768, 508, 196,
196, 89, 196, 79, 196,-32768,-32768, 509, 514, 196,
196, 365, 42, 365, 47, 365, 196, 196, 76,-32768,
196, 83,-32768, 196, 196,-32768, 520, 196, 196, 521,
-32768, 522,-32768, 523, 196, 196, 317, 525,-32768, 317,
526, 196, 45, 196,-32768, 196, 196,-32768,-32768,-32768,
527, 528, 196, 196, 196, 196,-32768, 532, 86, 534,
-32768,-32768, 196,-32768,-32768,-32768, 196, 196, 196, 196,
196, 317, 536, 196, 196, 196, 196, 196, 196, 196,
196, 196, 196, 196, 537, 538, 196, 196, 196, 196,
196, 196, 196,-32768,-32768, 542, 543, 545, 548, 549,
551, 196,-32768,-32768,-32768,-32768,-32768,-32768, 196, 196,
-32768, 511, 586,-32768
};
static const short yypgoto[] =
{
-32768,-32768, 451,-32768,-32768,-32768,-32768, 325,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -16,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 198,
-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,-32768,-32768,-32768,-32768,-32768,-32768, -263,-32768,-32768,
125,-32768,-32768,-32768, -200, -189, -170, -290, -209, -302,
-105,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -265,-32768,
-32768,-32768, 67, 52,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768, 512, -411,-32768,-32768, 248, 15, 9, -64,
-32768, -5, 485,-32768, 2, -167, -50, 716
};
#define YYLAST 1333
static const short yytable[] =
{
51, 348, 51, 357, 475, 477, 237, 13, 14, 15,
243, 85, 87, 85, 85, 85, 85, 85, 249, 85,
85, 85, 85, 85, 125, 85, 85, 88, 89, 90,
91, 92, 243, 96, 97, 98, 99, 100, 93, 102,
103, 246, 154, 155, 101, 154, 155, 104, 163, 85,
154, 155, 13, 14, 15, 677, 529, 85, 323, 159,
161, 162, 243, 108, 165, 243, 678, 169, 13, 14,
15, 116, 24, 197, 113, 246, 13, 14, 15, 13,
14, 15, 135, 244, 208, 120, 13, 14, 15, 13,
14, 15, 324, 129, 246, 451, 370, 246, 352, 641,
85, 153, 154, 155, 463, 514, 386, 135, 638, 156,
456, 530, 679, 247, 152, 387, 365, 297, 465, 105,
612, 235, 123, 124, 298, 336, 166, 366, 192, 182,
184, 492, 135, 196, 650, 522, 213, 680, 551, 652,
311, 235, 106, 135, 353, 187, 190, 516, 275, 123,
124, 28, 216, 502, 217, 388, 314, 335, 214, 349,
337, 338, 24, 192, 598, 339, 525, 656, 352, 552,
340, 642, 354, 355, 659, 70, 341, 691, 485, 356,
424, 639, 325, 218, 245, 589, 248, 342, 71, 254,
70, 343, 590, 459, 344, 107, 345, 252, 346, 154,
155, 468, 81, 71, 632, 462, 634, 135, 326, 421,
347, 353, 595, 471, 353, 461, 276, 327, 328, 591,
109, 28, 329, 470, 592, 110, 73, 330, 73, 455,
280, 593, 111, 331, 74, 503, 74, 464, 312, 112,
114, 315, 354, 355, 332, 219, 596, 313, 333, 588,
316, 51, 51, 51, 115, 568, 117, 568, 594, 81,
119, 75, 76, 75, 76, 122, 300, 334, 126, 496,
127, 77, 371, 77, 128, 130, 569, 78, 569, 78,
301, 131, 372, 509, 132, 570, 302, 570, 79, 220,
79, 133, 80, 517, 80, 137, 357, 142, 148, 303,
157, 164, 526, 81, 168, 81, 389, 170, 173, 391,
221, 322, 571, 381, 571, 423, 174, 177, 393, 304,
13, 14, 15, 613, 222, 572, 259, 604, 185, 198,
266, 267, 199, 395, 271, 272, 200, 73, 396, 1,
2, 3, 4, 227, 201, 74, 403, 85, 85, 85,
85, 458, 123, 124, 158, 203, 411, 204, 205, 467,
206, 417, 418, 419, 420, 123, 124, 160, 223, 224,
225, 207, 75, 76, 425, 427, 429, 430, 431, 432,
433, 434, 77, 209, 438, 440, 441, 442, 78, 210,
211, 445, 446, 447, 448, 395, 256, 257, 258, 79,
212, 228, 182, 80, 184, 229, 231, 240, 242, 318,
182, 250, 184, 251, 81, 253, 73, 524, 255, 187,
190, 279, 350, 281, 74, 299, 317, 187, 190, 487,
368, 488, 369, 373, 374, 493, 494, 375, 376, 377,
498, 378, 379, 500, 501, 182, 184, 504, 505, 506,
507, 75, 76, 449, 380, 382, 33, 383, 384, 385,
282, 77, 390, 392, 649, 397, 651, 78, 653, 73,
398, 399, 400, 283, 284, 285, 286, 74, 79, 287,
401, 402, 80, 404, 538, 405, 540, 406, 407, 542,
543, 408, 288, 81, 409, 544, 545, 410, 412, 413,
548, 351, 414, 415, 75, 76, 553, 554, 555, 556,
416, 732, 289, 436, 77, 443, 444, 450, 460, 469,
78, 482, 484, 574, 486, 489, 490, 491, 495, 497,
499, 79, 508, 510, 511, 80, 513, 515, 518, 519,
573, 538, 575, 576, 577, 578, 81, 520, 521, 523,
581, 527, 528, 531, 363, 532, 533, 584, 585, 534,
535, 536, 539, 599, 541, 560, 85, 546, 547, 549,
550, 557, 558, 559, 579, 603, 580, 605, 606, 607,
602, 582, 583, 609, 600, 601, 733, 608, 610, 611,
615, 617, 620, 619, 625, 362, 627, 631, 633, 635,
561, 645, 622, 624, 614, 626, 646, 616, 628, 629,
618, 630, 664, 667, 668, 669, 673, 675, 597, 684,
685, 636, 637, 690, 640, 693, 643, 701, 435, 713,
714, 647, 648, 657, 722, 723, 660, 724, 654, 655,
725, 726, 658, 727, 191, 661, 663, 0, 0, 665,
666, 672, 0, 230, 674, 0, 670, 671, 0, 0,
0, 0, 0, 676, 0, 681, 0, 682, 683, 0,
0, 0, 0, 692, 686, 687, 688, 689, 0, 0,
0, 0, 0, 0, 694, 0, 700, 0, 695, 696,
697, 698, 699, 0, 0, 702, 703, 704, 705, 706,
707, 708, 709, 710, 711, 712, 0, 0, 715, 716,
717, 718, 719, 720, 721, 0, 0, 6, 8, 10,
12, 0, 0, 728, 0, 0, 0, 0, 0, 0,
729, 730, 86, 0, 86, 86, 86, 86, 86, 0,
86, 86, 86, 86, 86, 0, 86, 86, 0, 0,
0, 13, 14, 15, 0, 0, 52, 53, 0, 0,
0, 54, 16, 0, 17, 0, 55, 0, 0, 0,
86, 56, 0, 0, 0, 18, 0, 19, 86, 0,
20, 0, 0, 21, 22, 0, 23, 0, 0, 57,
0, 0, 24, 25, 58, 0, 0, 26, 27, 0,
0, 0, 0, 136, 0, 0, 59, 0, 0, 0,
60, 61, 28, 0, 62, 0, 63, 29, 0, 64,
0, 86, 30, 31, 0, 0, 73, 0, 136, 0,
0, 32, 65, 0, 74, 172, 0, 0, 0, 0,
319, 0, 0, 0, 0, 0, 0, 0, 172, 195,
0, 0, 0, 136, 0, 0, 0, 0, 0, 0,
0, 75, 76, 0, 136, 0, 0, 0, 0, 0,
0, 77, 0, 0, 0, 0, 0, 78, 0, 0,
0, 0, 0, 0, 195, 0, 233, 236, 79, 0,
239, 0, 80, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 81, 0, 0, 0, 0, 0, 0,
0, 364, 0, 0, 8, 8, 8, 12, 261, 263,
265, 12, 12, 269, 0, 12, 12, 274, 136, 0,
0, 278, 13, 14, 15, 0, 0, 52, 53, 0,
0, 0, 54, 16, 0, 17, 0, 55, 0, 0,
0, 0, 56, 0, 0, 0, 18, 310, 19, 0,
0, 20, 0, 0, 21, 22, 0, 23, 0, 0,
57, 0, 0, 24, 25, 58, 0, 0, 26, 27,
0, 0, 0, 0, 0, 0, 10, 59, 0, 0,
0, 60, 61, 28, 0, 62, 0, 63, 29, 0,
64, 0, 0, 30, 31, 0, 0, 0, 0, 0,
0, 0, 32, 65, 0, 0, 0, 0, 0, 0,
0, 320, 0, 0, 0, 0, 0, 0, 0, 0,
0, 13, 14, 15, 0, 0, 0, 0, 0, 0,
0, 0, 16, 0, 17, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 18, 0, 19, 0, 0,
20, 0, 0, 21, 22, 0, 23, 0, 86, 86,
86, 86, 24, 25, 0, 0, 0, 26, 27, 0,
13, 14, 15, 0, 0, 52, 53, 0, 0, 428,
54, 16, 28, 17, 0, 55, 0, 29, 439, 0,
56, 0, 30, 31, 18, 0, 19, 0, 0, 20,
0, 32, 21, 22, 454, 23, 0, 0, 57, 0,
0, 24, 25, 58, 0, 0, 26, 27, 0, 0,
473, 454, 454, 0, 0, 59, 0, 0, 0, 60,
61, 28, 0, 62, 0, 63, 29, 0, 64, 0,
0, 30, 31, 13, 14, 15, 0, 0, 52, 53,
32, 65, 0, 54, 16, 0, 17, 0, 55, 321,
0, 0, 0, 56, 0, 0, 0, 18, 0, 19,
0, 0, 20, 0, 0, 21, 22, 0, 23, 0,
0, 57, 0, 0, 24, 25, 58, 0, 0, 26,
27, 0, 0, 0, 0, 0, 0, 0, 59, 0,
0, 0, 60, 61, 28, 0, 62, 0, 63, 29,
0, 64, 0, 0, 30, 31, 0, 0, 0, 0,
0, 0, 0, 32, 65, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 269,
563, 565, 567, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 587, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 86, 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, 454, 0, 454
};
static const short yycheck[] =
{
5, 264, 7, 268, 415, 416, 173, 3, 4, 5,
19, 16, 91, 18, 19, 20, 21, 22, 185, 24,
25, 26, 27, 28, 74, 30, 31, 18, 19, 20,
21, 22, 19, 24, 25, 26, 27, 28, 23, 30,
31, 20, 3, 4, 29, 3, 4, 32, 112, 54,
3, 4, 3, 4, 5, 10, 37, 62, 58, 109,
110, 111, 19, 54, 114, 19, 21, 117, 3, 4,
5, 62, 44, 137, 59, 20, 3, 4, 5, 3,
4, 5, 87, 92, 148, 70, 3, 4, 5, 3,
4, 5, 92, 78, 20, 397, 92, 20, 11, 20,
105, 106, 3, 4, 406, 92, 43, 112, 19, 107,
400, 92, 67, 92, 105, 52, 81, 51, 408, 27,
92, 171, 3, 4, 58, 7, 24, 92, 133, 127,
128, 92, 137, 92, 92, 92, 92, 92, 92, 92,
91, 191, 91, 148, 57, 130, 131, 92, 212, 3,
4, 64, 157, 443, 92, 92, 91, 262, 156, 264,
42, 43, 44, 168, 91, 47, 92, 91, 11, 92,
52, 92, 85, 86, 91, 58, 58, 91, 81, 92,
81, 92, 7, 92, 182, 58, 184, 69, 71, 194,
58, 73, 65, 402, 76, 91, 78, 51, 80, 3,
4, 410, 84, 71, 615, 405, 617, 212, 33, 92,
92, 57, 58, 413, 57, 404, 214, 42, 43, 92,
91, 64, 47, 412, 58, 91, 7, 52, 7, 399,
228, 65, 91, 58, 15, 444, 15, 407, 243, 91,
91, 246, 85, 86, 69, 92, 92, 245, 73, 92,
248, 256, 257, 258, 91, 22, 91, 22, 92, 84,
91, 42, 43, 42, 43, 91, 39, 92, 91, 436,
91, 52, 277, 52, 91, 91, 43, 58, 43, 58,
53, 91, 280, 450, 91, 52, 59, 52, 69, 92,
69, 91, 73, 460, 73, 91, 561, 91, 91, 72,
91, 91, 469, 84, 91, 84, 311, 91, 91, 314,
92, 92, 79, 298, 79, 365, 91, 91, 316, 92,
3, 4, 5, 586, 92, 92, 201, 92, 91, 91,
205, 206, 91, 318, 209, 210, 91, 7, 323, 87,
88, 89, 90, 92, 91, 15, 331, 352, 353, 354,
355, 401, 3, 4, 5, 91, 341, 91, 91, 409,
91, 352, 353, 354, 355, 3, 4, 5, 3, 4,
5, 91, 42, 43, 372, 373, 374, 375, 376, 377,
378, 379, 52, 91, 382, 383, 384, 385, 58, 91,
91, 389, 390, 391, 392, 380, 198, 199, 200, 69,
91, 91, 400, 73, 402, 92, 92, 92, 92, 91,
408, 92, 410, 92, 84, 92, 7, 467, 92, 404,
405, 92, 92, 92, 15, 92, 92, 412, 413, 427,
92, 429, 92, 91, 91, 433, 434, 91, 91, 91,
438, 91, 91, 441, 442, 443, 444, 445, 446, 447,
448, 42, 43, 92, 91, 91, 5, 91, 91, 91,
40, 52, 91, 91, 631, 91, 633, 58, 635, 7,
91, 91, 91, 53, 54, 55, 56, 15, 69, 59,
91, 91, 73, 91, 482, 91, 484, 91, 91, 487,
488, 91, 72, 84, 91, 493, 494, 91, 91, 91,
498, 92, 91, 91, 42, 43, 504, 505, 506, 507,
91, 0, 92, 91, 52, 91, 91, 91, 91, 91,
58, 91, 91, 539, 92, 92, 92, 92, 92, 92,
92, 69, 92, 92, 92, 73, 92, 92, 92, 92,
538, 539, 540, 541, 542, 543, 84, 92, 92, 92,
548, 92, 92, 92, 92, 92, 91, 555, 556, 91,
91, 91, 91, 568, 91, 91, 571, 92, 92, 92,
92, 92, 92, 92, 92, 573, 92, 575, 576, 577,
571, 92, 92, 581, 91, 91, 0, 92, 92, 92,
91, 91, 91, 598, 91, 270, 92, 91, 91, 91,
533, 92, 600, 601, 589, 603, 92, 592, 606, 607,
595, 609, 92, 92, 92, 92, 91, 91, 566, 92,
92, 619, 620, 91, 622, 91, 624, 91, 380, 92,
92, 629, 630, 638, 92, 92, 641, 92, 636, 637,
92, 92, 640, 92, 132, 643, 644, -1, -1, 647,
648, 656, -1, 168, 659, -1, 654, 655, -1, -1,
-1, -1, -1, 661, -1, 663, -1, 665, 666, -1,
-1, -1, -1, 678, 672, 673, 674, 675, -1, -1,
-1, -1, -1, -1, 682, -1, 691, -1, 686, 687,
688, 689, 690, -1, -1, 693, 694, 695, 696, 697,
698, 699, 700, 701, 702, 703, -1, -1, 706, 707,
708, 709, 710, 711, 712, -1, -1, 1, 2, 3,
4, -1, -1, 721, -1, -1, -1, -1, -1, -1,
728, 729, 16, -1, 18, 19, 20, 21, 22, -1,
24, 25, 26, 27, 28, -1, 30, 31, -1, -1,
-1, 3, 4, 5, -1, -1, 8, 9, -1, -1,
-1, 13, 14, -1, 16, -1, 18, -1, -1, -1,
54, 23, -1, -1, -1, 27, -1, 29, 62, -1,
32, -1, -1, 35, 36, -1, 38, -1, -1, 41,
-1, -1, 44, 45, 46, -1, -1, 49, 50, -1,
-1, -1, -1, 87, -1, -1, 58, -1, -1, -1,
62, 63, 64, -1, 66, -1, 68, 69, -1, 71,
-1, 105, 74, 75, -1, -1, 7, -1, 112, -1,
-1, 83, 84, -1, 15, 119, -1, -1, -1, -1,
92, -1, -1, -1, -1, -1, -1, -1, 132, 133,
-1, -1, -1, 137, -1, -1, -1, -1, -1, -1,
-1, 42, 43, -1, 148, -1, -1, -1, -1, -1,
-1, 52, -1, -1, -1, -1, -1, 58, -1, -1,
-1, -1, -1, -1, 168, -1, 170, 171, 69, -1,
174, -1, 73, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 84, -1, -1, -1, -1, -1, -1,
-1, 92, -1, -1, 198, 199, 200, 201, 202, 203,
204, 205, 206, 207, -1, 209, 210, 211, 212, -1,
-1, 215, 3, 4, 5, -1, -1, 8, 9, -1,
-1, -1, 13, 14, -1, 16, -1, 18, -1, -1,
-1, -1, 23, -1, -1, -1, 27, 241, 29, -1,
-1, 32, -1, -1, 35, 36, -1, 38, -1, -1,
41, -1, -1, 44, 45, 46, -1, -1, 49, 50,
-1, -1, -1, -1, -1, -1, 270, 58, -1, -1,
-1, 62, 63, 64, -1, 66, -1, 68, 69, -1,
71, -1, -1, 74, 75, -1, -1, -1, -1, -1,
-1, -1, 83, 84, -1, -1, -1, -1, -1, -1,
-1, 92, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 3, 4, 5, -1, -1, -1, -1, -1, -1,
-1, -1, 14, -1, 16, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 27, -1, 29, -1, -1,
32, -1, -1, 35, 36, -1, 38, -1, 352, 353,
354, 355, 44, 45, -1, -1, -1, 49, 50, -1,
3, 4, 5, -1, -1, 8, 9, -1, -1, 373,
13, 14, 64, 16, -1, 18, -1, 69, 382, -1,
23, -1, 74, 75, 27, -1, 29, -1, -1, 32,
-1, 83, 35, 36, 398, 38, -1, -1, 41, -1,
-1, 44, 45, 46, -1, -1, 49, 50, -1, -1,
414, 415, 416, -1, -1, 58, -1, -1, -1, 62,
63, 64, -1, 66, -1, 68, 69, -1, 71, -1,
-1, 74, 75, 3, 4, 5, -1, -1, 8, 9,
83, 84, -1, 13, 14, -1, 16, -1, 18, 92,
-1, -1, -1, 23, -1, -1, -1, 27, -1, 29,
-1, -1, 32, -1, -1, 35, 36, -1, 38, -1,
-1, 41, -1, -1, 44, 45, 46, -1, -1, 49,
50, -1, -1, -1, -1, -1, -1, -1, 58, -1,
-1, -1, 62, 63, 64, -1, 66, -1, 68, 69,
-1, 71, -1, -1, 74, 75, -1, -1, -1, -1,
-1, -1, -1, 83, 84, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 533,
534, 535, 536, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 560, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 571, -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, 615, -1, 617
};
/* -*-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 232 "parser.yxx"
{
assert(!egg_stack.empty());
DCAST(EggData, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 24:
#line 275 "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 25:
#line 298 "parser.yxx"
{
yyval._egg = new EggComment(yyvsp[-3]._string, yyvsp[-1]._string);
}
break;
case 26:
#line 312 "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 27:
#line 325 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 29:
#line 341 "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, "combine-rgb") == 0) {
EggTexture::CombineMode cm = EggTexture::string_combine_mode(strval);
if (cm == EggTexture::CM_unspecified) {
eggyywarning("Unknown combine mode " + strval);
} else {
texture->set_combine_mode(EggTexture::CC_rgb, cm);
}
} else if (cmp_nocase_uh(name, "combine-rgb-source0") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning("Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_rgb, 0, cs);
}
} else if (cmp_nocase_uh(name, "combine-rgb-operand0") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning("Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_rgb, 0, co);
}
} else if (cmp_nocase_uh(name, "combine-rgb-source1") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning("Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_rgb, 1, cs);
}
} else if (cmp_nocase_uh(name, "combine-rgb-operand1") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning("Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_rgb, 1, co);
}
} else if (cmp_nocase_uh(name, "combine-rgb-source2") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning("Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_rgb, 2, cs);
}
} else if (cmp_nocase_uh(name, "combine-rgb-operand2") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning("Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_rgb, 2, co);
}
} else if (cmp_nocase_uh(name, "combine-alpha") == 0) {
EggTexture::CombineMode cm = EggTexture::string_combine_mode(strval);
if (cm == EggTexture::CM_unspecified) {
eggyywarning("Unknown combine mode " + strval);
} else {
texture->set_combine_mode(EggTexture::CC_alpha, cm);
}
} else if (cmp_nocase_uh(name, "combine-alpha-source0") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning("Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_alpha, 0, cs);
}
} else if (cmp_nocase_uh(name, "combine-alpha-operand0") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning("Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_alpha, 0, co);
}
} else if (cmp_nocase_uh(name, "combine-alpha-source1") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning("Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_alpha, 1, cs);
}
} else if (cmp_nocase_uh(name, "combine-alpha-operand1") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning("Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_alpha, 1, co);
}
} else if (cmp_nocase_uh(name, "combine-alpha-source2") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning("Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_alpha, 2, cs);
}
} else if (cmp_nocase_uh(name, "combine-alpha-operand2") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning("Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_alpha, 2, co);
}
} else if (cmp_nocase_uh(name, "tex_gen") == 0) {
EggTexture::TexGen tex_gen = EggTexture::string_tex_gen(strval);
if (tex_gen == EggTexture::TG_unspecified) {
eggyywarning("Unknown texture env type " + strval);
} else {
texture->set_tex_gen(tex_gen);
}
} else if (cmp_nocase_uh(name, "stage_name") == 0) {
texture->set_stage_name(strval);
} else if (cmp_nocase_uh(name, "priority") == 0) {
texture->set_priority((int)value);
} else if (cmp_nocase_uh(name, "blendr") == 0) {
Colorf color = texture->get_color();
color[0] = value;
texture->set_color(color);
} else if (cmp_nocase_uh(name, "blendg") == 0) {
Colorf color = texture->get_color();
color[1] = value;
texture->set_color(color);
} else if (cmp_nocase_uh(name, "blendb") == 0) {
Colorf color = texture->get_color();
color[2] = value;
texture->set_color(color);
} else if (cmp_nocase_uh(name, "blenda") == 0) {
Colorf color = texture->get_color();
color[3] = value;
texture->set_color(color);
} else if (cmp_nocase_uh(name, "uv_name") == 0) {
texture->set_uv_name(strval);
} else if (cmp_nocase_uh(name, "rgb_scale") == 0) {
int int_value = (int)value;
if (int_value != 1 && int_value != 2 && int_value != 4) {
eggyyerror("Invalid rgb-scale value " + strval);
} else {
texture->set_rgb_scale(int_value);
}
} else if (cmp_nocase_uh(name, "alpha_scale") == 0) {
int int_value = (int)value;
if (int_value != 1 && int_value != 2 && int_value != 4) {
eggyyerror("Invalid alpha-scale value " + strval);
} else {
texture->set_alpha_scale(int_value);
}
} 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, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning("Unknown visibility mode " + strval);
} else {
texture->set_visibility_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 if (cmp_nocase_uh(name, "alpha_file_channel") == 0) {
texture->set_alpha_file_channel((int)value);
} else {
eggyywarning("Unsupported texture scalar: " + name);
}
}
break;
case 31:
#line 634 "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 32:
#line 646 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 34:
#line 662 "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 35:
#line 757 "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 36:
#line 764 "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 37:
#line 784 "parser.yxx"
{
string name = yyvsp[0]._string;
EggVertexPool *pool = NULL;
VertexPools::const_iterator vpi = vertex_pools.find(name);
if (vpi != vertex_pools.end()) {
pool = (*vpi).second;
if (pool->has_defined_vertices()) {
eggyywarning("Duplicate vertex pool name " + name);
pool = new EggVertexPool(name);
// The egg syntax starts counting at 1 by convention.
pool->set_highest_index(0);
vertex_pools[name] = pool;
}
} else {
pool = new EggVertexPool(name);
// The egg syntax starts counting at 1 by convention.
pool->set_highest_index(0);
vertex_pools[name] = pool;
}
egg_stack.push_back(pool);
}
break;
case 38:
#line 808 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 41:
#line 836 "parser.yxx"
{
egg_stack.push_back(new EggVertex);
}
break;
case 42:
#line 840 "parser.yxx"
{
PT(EggVertex) vtx = DCAST(EggVertex, egg_stack.back());
egg_stack.pop_back();
DCAST(EggVertexPool, egg_stack.back())->add_vertex(vtx);
}
break;
case 43:
#line 847 "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->has_vertex(vertex_index)) {
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 44:
#line 872 "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 45:
#line 893 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_pos(yyvsp[0]._number);
}
break;
case 46:
#line 897 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_pos(LPoint2d(yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 47:
#line 901 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_pos(LPoint3d(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 48:
#line 905 "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 909 "parser.yxx"
{
EggVertex *vertex = DCAST(EggVertex, egg_stack.back());
EggVertexUV *uv = new EggVertexUV(yyvsp[-1]._string, TexCoordd::zero());
egg_stack.push_back(uv);
if (vertex->has_uv(yyvsp[-1]._string)) {
eggyywarning("Ignoring repeated UV name " + yyvsp[-1]._string);
} else {
vertex->set_uv_obj(uv);
}
}
break;
case 50:
#line 920 "parser.yxx"
{
egg_stack.pop_back();
}
break;
case 53:
#line 926 "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 54:
#line 934 "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 55:
#line 953 "parser.yxx"
{
DCAST(EggVertexUV, egg_stack.back())->set_uv(TexCoordd(yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 56:
#line 957 "parser.yxx"
{
if (DCAST(EggVertexUV, egg_stack.back())->has_tangent()) {
eggyywarning("Ignoring repeated tangent");
} else {
DCAST(EggVertexUV, egg_stack.back())->set_tangent(Normald(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
}
break;
case 57:
#line 965 "parser.yxx"
{
if (DCAST(EggVertexUV, egg_stack.back())->has_binormal()) {
eggyywarning("Ignoring repeated binormal");
} else {
DCAST(EggVertexUV, egg_stack.back())->set_binormal(Normald(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
}
break;
case 58:
#line 973 "parser.yxx"
{
bool inserted = DCAST(EggVertexUV, 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 59:
#line 981 "parser.yxx"
{
bool inserted = DCAST(EggVertexUV, 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 60:
#line 999 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_normal(Normald(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 61:
#line 1003 "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 62:
#line 1011 "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 63:
#line 1029 "parser.yxx"
{
DCAST(EggVertex, egg_stack.back())->set_color(Colorf(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 64:
#line 1033 "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 65:
#line 1041 "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 66:
#line 1059 "parser.yxx"
{
EggGroup *group = new EggGroup(yyvsp[0]._string);
egg_stack.push_back(group);
}
break;
case 67:
#line 1064 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 68:
#line 1079 "parser.yxx"
{
EggGroup *group = new EggGroup(yyvsp[0]._string);
group->set_group_type(EggGroup::GT_joint);
egg_stack.push_back(group);
}
break;
case 69:
#line 1085 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 70:
#line 1100 "parser.yxx"
{
EggGroup *group = new EggGroup(yyvsp[0]._string);
group->set_group_type(EggGroup::GT_instance);
egg_stack.push_back(group);
}
break;
case 71:
#line 1106 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 73:
#line 1122 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string name = yyvsp[-3]._string;
double value = yyvsp[-1]._number;
unsigned long ulong_value = yyvsp[-1]._ulong;
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, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning("Unknown visibility mode " + strval);
} else {
group->set_visibility_mode(m);
}
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
group->set_draw_order(ulong_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(group->get_collide_mask() | ulong_value);
} else if (cmp_nocase_uh(name, "from_collide_mask") == 0) {
group->set_from_collide_mask(group->get_from_collide_mask() | ulong_value);
} else if (cmp_nocase_uh(name, "into_collide_mask") == 0) {
group->set_into_collide_mask(group->get_into_collide_mask() | ulong_value);
} else if (cmp_nocase_uh(name, "portal") == 0) {
group->set_portal_flag(value != 0);
} else if (cmp_nocase_uh(name, "polylight") == 0) {
group->set_polylight_flag(value != 0);
} else if (cmp_nocase_uh(name, "indexed") == 0) {
group->set_indexed_flag(value != 0);
} else if (cmp_nocase_uh(name, "blend") == 0) {
EggGroup::BlendMode blend_mode =
EggGroup::string_blend_mode(strval);
if (blend_mode == EggGroup::BM_unspecified) {
eggyywarning("Unknown blend mode " + strval);
} else {
group->set_blend_mode(blend_mode);
}
} else if (cmp_nocase_uh(name, "blendop_a") == 0) {
EggGroup::BlendOperand blend_operand =
EggGroup::string_blend_operand(strval);
if (blend_operand == EggGroup::BO_unspecified) {
eggyywarning("Unknown blend operand " + strval);
} else {
group->set_blend_operand_a(blend_operand);
}
} else if (cmp_nocase_uh(name, "blendop_b") == 0) {
EggGroup::BlendOperand blend_operand =
EggGroup::string_blend_operand(strval);
if (blend_operand == EggGroup::BO_unspecified) {
eggyywarning("Unknown blend operand " + strval);
} else {
group->set_blend_operand_b(blend_operand);
}
} else if (cmp_nocase_uh(name, "blendr") == 0) {
Colorf color = group->get_blend_color();
color[0] = value;
group->set_blend_color(color);
} else if (cmp_nocase_uh(name, "blendg") == 0) {
Colorf color = group->get_blend_color();
color[1] = value;
group->set_blend_color(color);
} else if (cmp_nocase_uh(name, "blendb") == 0) {
Colorf color = group->get_blend_color();
color[2] = value;
group->set_blend_color(color);
} else if (cmp_nocase_uh(name, "blenda") == 0) {
Colorf color = group->get_blend_color();
color[3] = value;
group->set_blend_color(color);
} else {
eggyywarning("Unknown group scalar " + name);
}
}
break;
case 74:
#line 1252 "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 75:
#line 1264 "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 76:
#line 1269 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string name = yyvsp[-4]._string;
group->set_collision_name(name);
}
break;
case 77:
#line 1276 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_dcs_type(value!=0 ? EggGroup::DC_default : EggGroup::DC_none);
}
break;
case 78:
#line 1282 "parser.yxx"
{
// The special flavor of DCS, with { sync } or { nosync }.
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string strval = yyvsp[-1]._string;
EggGroup::DCSType f = EggGroup::string_dcs_type(strval);
if (f == EggGroup::DC_unspecified) {
eggyywarning("Unknown DCS type " + strval);
} else {
group->set_dcs_type(f);
}
}
break;
case 79:
#line 1295 "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 80:
#line 1302 "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 81:
#line 1315 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_switch_flag(value!=0);
}
break;
case 82:
#line 1321 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
string type = yyvsp[-1]._string;
group->add_object_type(type);
}
break;
case 83:
#line 1327 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_model_flag(value!=0);
}
break;
case 84:
#line 1333 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
group->set_tag(yyvsp[-3]._string, yyvsp[-1]._string);
}
break;
case 85:
#line 1338 "parser.yxx"
{
EggGroup *group = DCAST(EggGroup, egg_stack.back());
int value = (int)yyvsp[-1]._number;
group->set_texlist_flag(value!=0);
}
break;
case 89:
#line 1347 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 90:
#line 1361 "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 {
if (f == EggGroup::CST_polyset && group->get_cs_type() != EggGroup::CST_none) {
// By convention, a CST_polyset doesn't replace any existing
// contradictory type, so ignore it if this happens. This
// allows the artist to place, for instance, <ObjectType> {
// sphere } and <ObjectType> { trigger } together.
} else {
group->set_cs_type(f);
}
}
}
break;
case 92:
#line 1392 "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 93:
#line 1414 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->clear_transform();
}
break;
case 103:
#line 1440 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_translate(LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
break;
case 104:
#line 1446 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_rotx(yyvsp[-1]._number);
}
break;
case 105:
#line 1452 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_roty(yyvsp[-1]._number);
}
break;
case 106:
#line 1458 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_rotz(yyvsp[-1]._number);
}
break;
case 107:
#line 1464 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_rotate(yyvsp[-4]._number, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
break;
case 108:
#line 1470 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_scale(LVecBase3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
}
break;
case 109:
#line 1474 "parser.yxx"
{
DCAST(EggGroup, egg_stack.back())->add_uniform_scale(yyvsp[-1]._number);
}
break;
case 112:
#line 1489 "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 113:
#line 1508 "parser.yxx"
{
matrix_2d = LMatrix3d::ident_mat();
}
break;
case 114:
#line 1512 "parser.yxx"
{
DCAST(EggTexture, egg_stack.back())->set_transform(matrix_2d);
}
break;
case 120:
#line 1534 "parser.yxx"
{
matrix_2d *= LMatrix3d::translate_mat(yyvsp[-2]._number, yyvsp[-1]._number);
}
break;
case 121:
#line 1540 "parser.yxx"
{
matrix_2d *= LMatrix3d::rotate_mat(yyvsp[-1]._number);
}
break;
case 122:
#line 1546 "parser.yxx"
{
matrix_2d *= LMatrix3d::scale_mat(yyvsp[-2]._number, yyvsp[-1]._number);
}
break;
case 125:
#line 1559 "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 126:
#line 1576 "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_forward_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 127:
#line 1609 "parser.yxx"
{
yyval._number = 1.0;
}
break;
case 128:
#line 1613 "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 130:
#line 1650 "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 131:
#line 1655 "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 132:
#line 1672 "parser.yxx"
{
egg_stack.push_back(new EggPolygon(yyvsp[0]._string));
}
break;
case 133:
#line 1676 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 134:
#line 1691 "parser.yxx"
{
egg_stack.push_back(new EggTriangleFan(yyvsp[0]._string));
}
break;
case 135:
#line 1695 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 136:
#line 1710 "parser.yxx"
{
egg_stack.push_back(new EggTriangleStrip(yyvsp[0]._string));
}
break;
case 137:
#line 1714 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 138:
#line 1729 "parser.yxx"
{
egg_stack.push_back(new EggPoint(yyvsp[0]._string));
}
break;
case 139:
#line 1733 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 140:
#line 1748 "parser.yxx"
{
egg_stack.push_back(new EggLine(yyvsp[0]._string));
}
break;
case 141:
#line 1752 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 142:
#line 1767 "parser.yxx"
{
egg_stack.push_back(new EggNurbsSurface(yyvsp[0]._string));
}
break;
case 143:
#line 1771 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 144:
#line 1786 "parser.yxx"
{
egg_stack.push_back(new EggNurbsCurve(yyvsp[0]._string));
}
break;
case 145:
#line 1790 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 150:
#line 1820 "parser.yxx"
{
if (!egg_stack.back()->is_of_type(EggCompositePrimitive::get_class_type())) {
eggyyerror("Not a composite primitive; components are not allowed here.");
} else {
PT(EggCompositePrimitive) comp = DCAST(EggCompositePrimitive, egg_stack.back());
if (yyvsp[-1]._number < 0 || yyvsp[-1]._number >= comp->get_num_components()) {
eggyyerror("Invalid component number");
}
}
// We temporarily add an EggPolygon to the stack, just to receive
// the component attributes.
egg_stack.push_back(new EggPolygon);
}
break;
case 151:
#line 1834 "parser.yxx"
{
PT(EggPrimitive) prim = DCAST(EggPrimitive, egg_stack.back());
egg_stack.pop_back();
PT(EggCompositePrimitive) comp = DCAST(EggCompositePrimitive, egg_stack.back());
comp->set_component((int)yyvsp[-4]._number, prim);
}
break;
case 159:
#line 1848 "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, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning("Unknown visibility mode " + strval);
} else {
primitive->set_visibility_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, "thick") == 0) {
if (primitive->is_of_type(EggLine::get_class_type())) {
DCAST(EggLine, primitive)->set_thick(value);
} else if (primitive->is_of_type(EggPoint::get_class_type())) {
DCAST(EggPoint, primitive)->set_thick(value);
} else {
eggyywarning("scalar thick is only meaningful for points and lines.");
}
} else if (cmp_nocase_uh(name, "perspective") == 0) {
if (primitive->is_of_type(EggPoint::get_class_type())) {
DCAST(EggPoint, primitive)->set_perspective(value != 0);
} else {
eggyywarning("scalar perspective is only meaningful for points.");
}
} else {
eggyywarning("Unknown scalar " + name);
}
}
break;
case 171:
#line 1932 "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 173:
#line 1939 "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, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning("Unknown visibility mode " + strval);
} else {
primitive->set_visibility_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 184:
#line 2013 "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, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning("Unknown visibility mode " + strval);
} else {
primitive->set_visibility_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 185:
#line 2082 "parser.yxx"
{
if (yyvsp[0]._egg != (EggTexture *)NULL) {
EggTexture *texture = DCAST(EggTexture, yyvsp[0]._egg);
DCAST(EggPrimitive, egg_stack.back())->add_texture(texture);
}
}
break;
case 186:
#line 2099 "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())->add_texture(texture);
}
break;
case 187:
#line 2139 "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 188:
#line 2156 "parser.yxx"
{
DCAST(EggPrimitive, egg_stack.back())->set_normal(Normald(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 189:
#line 2160 "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 190:
#line 2168 "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 191:
#line 2186 "parser.yxx"
{
DCAST(EggPrimitive, egg_stack.back())->set_color(Colorf(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
}
break;
case 192:
#line 2190 "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 193:
#line 2198 "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 194:
#line 2216 "parser.yxx"
{
EggPrimitive *primitive = DCAST(EggPrimitive, egg_stack.back());
int value = (int)yyvsp[0]._number;
primitive->set_bface_flag(value!=0);
}
break;
case 195:
#line 2232 "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_forward_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 196:
#line 2263 "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 197:
#line 2281 "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 198:
#line 2301 "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 199:
#line 2321 "parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
nurbs->_trims.push_back(EggNurbsSurface::Trim());
}
break;
case 201:
#line 2337 "parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
nassertr(!nurbs->_trims.empty(), 0);
nurbs->_trims.back().push_back(EggNurbsSurface::Loop());
}
break;
case 202:
#line 2343 "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 203:
#line 2362 "parser.yxx"
{
EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, egg_stack.back());
int order = (int)yyvsp[0]._number;
nurbs->set_order(order);
}
break;
case 204:
#line 2378 "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 205:
#line 2399 "parser.yxx"
{
EggTable *table = new EggTable(yyvsp[0]._string);
table->set_table_type(EggTable::TT_table);
egg_stack.push_back(table);
}
break;
case 206:
#line 2405 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 207:
#line 2421 "parser.yxx"
{
EggTable *table = new EggTable(yyvsp[0]._string);
table->set_table_type(EggTable::TT_bundle);
egg_stack.push_back(table);
}
break;
case 208:
#line 2427 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 210:
#line 2444 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 211:
#line 2448 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 212:
#line 2452 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 213:
#line 2456 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 214:
#line 2460 "parser.yxx"
{
DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 215:
#line 2475 "parser.yxx"
{
EggSAnimData *anim_data = new EggSAnimData(yyvsp[0]._string);
egg_stack.push_back(anim_data);
}
break;
case 216:
#line 2480 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 218:
#line 2497 "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 219:
#line 2509 "parser.yxx"
{
DCAST(EggSAnimData, egg_stack.back())->set_data(yyvsp[-1]._number_list);
}
break;
case 220:
#line 2523 "parser.yxx"
{
EggXfmAnimData *anim_data = new EggXfmAnimData(yyvsp[0]._string);
egg_stack.push_back(anim_data);
}
break;
case 221:
#line 2528 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 223:
#line 2545 "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 224:
#line 2562 "parser.yxx"
{
DCAST(EggXfmAnimData, egg_stack.back())->set_data(yyvsp[-1]._number_list);
}
break;
case 225:
#line 2576 "parser.yxx"
{
EggXfmSAnim *anim_group = new EggXfmSAnim(yyvsp[0]._string);
egg_stack.push_back(anim_group);
}
break;
case 226:
#line 2581 "parser.yxx"
{
yyval._egg = egg_stack.back();
egg_stack.pop_back();
}
break;
case 228:
#line 2598 "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 229:
#line 2613 "parser.yxx"
{
DCAST(EggXfmSAnim, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
}
break;
case 230:
#line 2628 "parser.yxx"
{
yyval._number_list = PTA_double::empty_array(0);
}
break;
case 231:
#line 2632 "parser.yxx"
{
yyval._number_list.push_back((double)yyvsp[0]._number);
}
break;
case 232:
#line 2646 "parser.yxx"
{
yyval._number_list = PTA_double::empty_array(0);
}
break;
case 233:
#line 2650 "parser.yxx"
{
yyval._number_list.push_back(yyvsp[0]._number);
}
break;
case 234:
#line 2664 "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 235:
#line 2685 "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 236:
#line 2706 "parser.yxx"
{
string name = yyvsp[0]._string;
VertexPools::iterator vpi = vertex_pools.find(name);
if (vpi == vertex_pools.end()) {
// This will become a forward reference.
EggVertexPool *pool = new EggVertexPool(name);
// The egg syntax starts counting at 1 by convention.
pool->set_highest_index(0);
vertex_pools[name] = pool;
yyval._egg = pool;
} else {
yyval._egg = (*vpi).second;
}
}
break;
case 237:
#line 2732 "parser.yxx"
{
eggyyerror("Name required.");
yyval._string = "";
}
break;
case 240:
#line 2761 "parser.yxx"
{
eggyyerror("String required.");
yyval._string = "";
}
break;
case 242:
#line 2777 "parser.yxx"
{
yyval._string = "";
}
break;
case 244:
#line 2795 "parser.yxx"
{
yyval._string = yyvsp[0]._string;
}
break;
case 245:
#line 2799 "parser.yxx"
{
yyval._string = yyvsp[0]._string;
}
break;
case 247:
#line 2816 "parser.yxx"
{
yyval._string = "";
}
break;
case 248:
#line 2820 "parser.yxx"
{
yyval._string = yyvsp[0]._string;
}
break;
case 249:
#line 2836 "parser.yxx"
{
yyval._string = yyvsp[0]._string;
}
break;
case 250:
#line 2840 "parser.yxx"
{
yyval._string = yyvsp[-1]._string + "\n" + yyvsp[0]._string;
}
break;
case 252:
#line 2855 "parser.yxx"
{
yyval._number = yyvsp[0]._ulong;
}
break;
case 253:
#line 2870 "parser.yxx"
{
yyval._number = yyvsp[0]._number;
yyval._ulong = (unsigned long)yyvsp[0]._number;
yyval._string = yyvsp[0]._string;
}
break;
case 254:
#line 2876 "parser.yxx"
{
yyval._number = yyvsp[0]._ulong;
yyval._ulong = yyvsp[0]._ulong;
yyval._string = yyvsp[0]._string;
}
break;
case 255:
#line 2882 "parser.yxx"
{
yyval._number = 0.0;
yyval._ulong = 0;
yyval._string = yyvsp[0]._string;
}
break;
case 256:
#line 2899 "parser.yxx"
{
int i = (int)yyvsp[0]._number;
if ((double)i != yyvsp[0]._number) {
eggyywarning("Integer expected.");
yyval._number = (double)i;
}
}
break;
case 257:
#line 2907 "parser.yxx"
{
yyval._number = yyvsp[0]._ulong;
}
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 2914 "parser.yxx"