home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource Library: Graphics
/
graphics-16000.iso
/
msdos
/
raytrace
/
rayshade
/
src
/
yacc_tab.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-30
|
84KB
|
2,688 lines
/* A Bison parser, made from yacc.y */
#define tFLOAT 258
#define tSTRING 259
#define tFILENAME 260
#define tAPERTURE 261
#define tAPPLYSURF 262
#define tBACKGROUND 263
#define tBLOB 264
#define tBLOTCH 265
#define tBOX 266
#define tBUMP 267
#define tCONE 268
#define tCYL 269
#define tDIRECTIONAL 270
#define tCURSURF 271
#define tEXTENDED 272
#define tEYEP 273
#define tFBM 274
#define tFBMBUMP 275
#define tFOCALDIST 276
#define tFOG 277
#define tFOGDECK 278
#define tFOV 279
#define tGLOSS 280
#define tGRID 281
#define tHEIGHTFIELD 282
#define tLIGHT 283
#define tLIST 284
#define tLOOKP 285
#define tMARBLE 286
#define tMAXDEPTH 287
#define tMIST 288
#define tJITTER 289
#define tNOJITTER 290
#define tDEFINE 291
#define tOBJECT 292
#define tOUTFILE 293
#define tSKY 294
#define tDISC 295
#define tDIFFERENCE 296
#define tUNION 297
#define tINTERSECT 298
#define tPLANE 299
#define tPOINT 300
#define tPOLY 301
#define tROTATE 302
#define tSPOT 303
#define tPRINT 304
#define tSCALE 305
#define tSCREEN 306
#define tSPHERE 307
#define tSURFACE 308
#define tTHRESH 309
#define tTRANSLATE 310
#define tTRANSFORM 311
#define tTRIANGLE 312
#define tTRIANGLEUV 313
#define tUP 314
#define tEND 315
#define tTEXTURE 316
#define tCHECKER 317
#define tWOOD 318
#define tCONTRAST 319
#define tCUTOFF 320
#define tCLOUD 321
#define tAMBIENT 322
#define tDIFFUSE 323
#define tREFLECT 324
#define tTRANSP 325
#define tSPECULAR 326
#define tSPECPOW 327
#define tINDEX 328
#define tATMOSPHERE 329
#define tNOSHADOW 330
#define tAREA 331
#define tTRANSLU 332
#define tTORUS 333
#define tEYESEP 334
#define tSHADOWTRANSP 335
#define tREPORT 336
#define tVERBOSE 337
#define tQUIET 338
#define tWINDOW 339
#define tCROP 340
#define tSTRIPE 341
#define tMAP 342
#define tUV 343
#define tSPHERICAL 344
#define tCYLINDRICAL 345
#define tPLANAR 346
#define tIMAGE 347
#define tSMOOTH 348
#define tCOMPONENT 349
#define tTEXTSURF 350
#define tRANGE 351
#define tTILE 352
#define tSTARTTIME 353
#define tFRAMELENGTH 354
#define tNAME 355
#define tFILTER 356
#define tGAUSS 357
#define tBODY 358
#define tSAMPLE 359
#define tEXTINCT 360
#define tWINDY 361
#define tMOUNT 362
#define tSHUTTER 363
#define tFRAMES 364
#define UMINUS 365
#include "rayshade.h"
#include "symtab.h"
#include "builtin.h"
#include "atmosphere.h"
#include "surface.h"
#include "texture.h"
#include "image.h"
#include "geom.h"
#include "light.h"
#include "options.h"
#include "stats.h"
#include "viewing.h"
#include "blob.h"
#include "box.h"
#include "cone.h"
#include "csg.h"
#include "cylinder.h"
#include "disc.h"
#include "grid.h"
#include "hf.h"
#include "instance.h"
#include "list.h"
#include "plane.h"
#include "poly.h"
#include "sphere.h"
#include "torus.h"
#include "triangle.h"
#include "point.h"
#include "infinite.h"
#include "spot.h"
#include "jittered.h"
#include "extended.h"
#include "blotch.h"
#include "bump.h"
#include "checker.h"
#include "cloud.h"
#include "fbm.h"
#include "fbmbump.h"
#include "gloss.h"
#include "imagetext.h"
#include "marble.h"
#include "mount.h"
#include "sky.h"
#include "stripe.h"
#include "windy.h"
#include "wood.h"
#include "fog.h"
#include "fogdeck.h"
#include "mist.h"
#include "rotate.h"
#include "scale.h"
#include "translate.h"
#include "xform.h"
Geom *NewAggregate();
char yyfilename[BUFSIZ]; /* Input filename */
GeomList *Defstack; /* Geom definition stack. */
int Npoints = 0; /* # of points in Polypoints */
Surface *tmpsurf; /* Working surface */
SurfList *CurSurf;
Texture *CurText; /* Working list of textures */
ImageText *Imagetext; /* Working image texture */
Trans *TransHead, *TransTail; /* Linked list of current transformations */
Atmosphere *CurEffect = (Atmosphere *)NULL; /* Current atmos. effects */
PointList *Polypoints; /* List of vertices */
MetaList *Metapoints, *Metapoint;
extern FILE *yyin; /* input file pointer */
int yylineno; /* Current line # in file */
extern Atmosphere *AtmosEffects; /* atmospheric effects */
extern Medium TopMedium; /* "air" */
extern void GeomAddToDefined(),
LightAddToDefined(),
SurfaceAddToDefined();
extern Surface *SurfaceGetNamed();
extern Geom *GeomGetNamed();
/*
* Issue error message containing filename and line number, and exit.
*/
/*VARARGS1*/
yyerror(s, pat1, pat2)
char *s, *pat1, *pat2;
{
fprintf(stderr,"%s: Error: %s: line %d: ", Options.progname,
yyfilename, yylineno);
fprintf(stderr, s, pat1, pat2);
if (*s && s[strlen(s) -1] != '\n')
/* YACC doesn't put newlines on error messages. */
fprintf(stderr,"\n");
fflush(stderr);
exit(1);
}
typedef union {
char *c;
int i;
Float d;
Vector v;
Vec2d uv;
Color col;
Atmosphere *atmos;
Light *light;
Surface *surf;
Geom *obj;
Texture *text;
Mapping *map;
Trans *trans;
Expr *e;
SymtabEntry *sym;
} YYSTYPE;
#ifndef YYLTYPE
typedef
struct yyltype
{
int timestamp;
int first_line;
int first_column;
int last_line;
int last_column;
char *text;
}
yyltype;
#define YYLTYPE yyltype
#endif
#include <stdio.h>
#ifndef __STDC__
#define const
#endif
#define YYFINAL 528
#define YYFLAG -32768
#define YYNTBASE 120
#define YYTRANSLATE(x) ((unsigned)(x) <= 365 ? yytranslate[x] : 238)
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, 114, 2, 2, 117,
118, 112, 110, 119, 111, 2, 113, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 116, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 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, 2, 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, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 115
};
#if YYDEBUG != 0
static const short yyrline[] = { 0,
179, 180, 182, 183, 184, 185, 186, 187, 188, 189,
190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
210, 211, 212, 214, 224, 232, 251, 256, 258, 259,
261, 267, 268, 269, 270, 271, 272, 273, 274, 275,
276, 277, 279, 286, 287, 289, 290, 291, 292, 294,
295, 297, 323, 327, 331, 335, 339, 343, 348, 352,
356, 360, 364, 368, 372, 384, 388, 392, 397, 399,
404, 405, 407, 412, 417, 421, 426, 430, 434, 448,
460, 461, 465, 484, 494, 503, 513, 530, 551, 564,
569, 574, 579, 585, 592, 599, 605, 610, 614, 619,
623, 627, 632, 636, 640, 649, 655, 663, 678, 688,
695, 700, 705, 707, 709, 711, 713, 715, 720, 725,
731, 737, 742, 747, 751, 756, 760, 768, 776, 780,
784, 788, 792, 798, 803, 808, 809, 814, 815, 816,
818, 829, 839, 844, 850, 855, 864, 870, 877, 886,
887, 889, 890, 891, 892, 893, 894, 895, 896, 897,
898, 899, 901, 908, 915, 922, 928, 934, 941, 948,
955, 962, 971, 978, 984, 989, 999, 1000, 1002, 1013,
1033, 1059, 1066, 1067, 1068, 1070, 1075, 1080, 1086, 1090,
1094, 1099, 1110, 1117, 1124, 1131, 1138, 1147, 1158, 1170,
1177, 1184, 1193, 1194, 1196, 1209, 1220, 1225, 1235, 1236,
1238, 1244, 1248, 1252, 1257, 1264, 1271, 1277, 1278, 1283,
1288, 1292, 1297, 1302, 1307, 1312, 1317, 1323, 1327, 1331,
1335, 1339, 1343, 1347, 1351, 1355, 1360, 1362, 1364, 1368,
1372, 1375, 1376, 1385, 1389, 1391, 1395, 1399, 1403, 1407,
1413, 1419, 1425, 1432, 1436, 1440, 1444, 1448, 1452, 1456,
1460, 1464, 1468, 1469, 1471, 1473, 1474, 1476
};
static const char * const yytname[] = { 0,
"error","$illegal.","tFLOAT","tSTRING","tFILENAME","tAPERTURE","tAPPLYSURF","tBACKGROUND","tBLOB","tBLOTCH",
"tBOX","tBUMP","tCONE","tCYL","tDIRECTIONAL","tCURSURF","tEXTENDED","tEYEP","tFBM","tFBMBUMP",
"tFOCALDIST","tFOG","tFOGDECK","tFOV","tGLOSS","tGRID","tHEIGHTFIELD","tLIGHT","tLIST","tLOOKP",
"tMARBLE","tMAXDEPTH","tMIST","tJITTER","tNOJITTER","tDEFINE","tOBJECT","tOUTFILE","tSKY","tDISC",
"tDIFFERENCE","tUNION","tINTERSECT","tPLANE","tPOINT","tPOLY","tROTATE","tSPOT","tPRINT","tSCALE",
"tSCREEN","tSPHERE","tSURFACE","tTHRESH","tTRANSLATE","tTRANSFORM","tTRIANGLE","tTRIANGLEUV","tUP","tEND",
"tTEXTURE","tCHECKER","tWOOD","tCONTRAST","tCUTOFF","tCLOUD","tAMBIENT","tDIFFUSE","tREFLECT","tTRANSP",
"tSPECULAR","tSPECPOW","tINDEX","tATMOSPHERE","tNOSHADOW","tAREA","tTRANSLU","tTORUS","tEYESEP","tSHADOWTRANSP",
"tREPORT","tVERBOSE","tQUIET","tWINDOW","tCROP","tSTRIPE","tMAP","tUV","tSPHERICAL","tCYLINDRICAL",
"tPLANAR","tIMAGE","tSMOOTH","tCOMPONENT","tTEXTSURF","tRANGE","tTILE","tSTARTTIME","tFRAMELENGTH","tNAME",
"tFILTER","tGAUSS","tBODY","tSAMPLE","tEXTINCT","tWINDY","tMOUNT","tSHUTTER","tFRAMES","'+'",
"'-'","'*'","'/'","'%'","UMINUS","'^'","'('","')'","','","Items"
};
#endif
static const short yyr1[] = { 0,
120, 120, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 122, 123, 124, 125, 125, 126, 126,
127, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 129, 130, 130, 131, 131, 131, 131, 132,
132, 133, 134, 134, 134, 134, 134, 134, 134, 134,
134, 134, 134, 134, 134, 134, 134, 134, 135, 136,
137, 137, 138, 138, 138, 138, 138, 138, 139, 139,
140, 140, 141, 142, 142, 142, 142, 142, 143, 144,
145, 146, 146, 147, 147, 147, 148, 148, 148, 148,
149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
158, 158, 158, 159, 159, 160, 160, 161, 162, 163,
164, 165, 166, 167, 167, 167, 167, 167, 168, 168,
168, 168, 168, 169, 170, 171, 171, 172, 172, 172,
173, 173, 174, 174, 175, 176, 177, 178, 178, 179,
179, 180, 180, 180, 180, 180, 180, 180, 180, 180,
180, 180, 181, 182, 183, 184, 185, 186, 187, 188,
189, 190, 191, 192, 192, 193, 194, 194, 195, 196,
197, 198, 199, 199, 199, 200, 201, 202, 203, 203,
203, 204, 205, 206, 207, 208, 209, 209, 209, 210,
211, 212, 213, 213, 214, 215, 216, 216, 217, 217,
218, 219, 219, 219, 220, 221, 222, 223, 223, 224,
225, 225, 225, 225, 225, 225, 225, 226, 226, 226,
226, 226, 226, 226, 226, 226, 227, 227, 228, 229,
230, 231, 231, 232, 232, 233, 234, 234, 234, 234,
234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
234, 234, 235, 235, 235, 236, 236, 237
};
static const short yyr2[] = { 0,
0, 2, 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, 2, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 3, 2, 0, 1, 1, 1, 1, 2,
0, 3, 2, 3, 2, 1, 2, 7, 8, 6,
1, 2, 8, 7, 1, 5, 9, 4, 2, 2,
2, 0, 2, 3, 2, 3, 1, 1, 3, 2,
2, 0, 1, 4, 4, 5, 10, 13, 3, 2,
2, 3, 2, 3, 3, 2, 3, 2, 3, 2,
2, 2, 2, 2, 4, 2, 3, 5, 5, 5,
4, 4, 3, 1, 0, 1, 0, 2, 2, 2,
2, 2, 1, 1, 2, 3, 7, 8, 3, 3,
4, 5, 7, 2, 2, 1, 0, 1, 1, 1,
1, 1, 3, 3, 1, 1, 2, 3, 2, 2,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
2, 4, 1, 3, 2, 3, 0, 2, 1, 1,
3, 1, 1, 1, 1, 1, 4, 1, 1, 1,
1, 6, 5, 4, 5, 4, 5, 8, 11, 4,
6, 4, 0, 2, 5, 2, 2, 3, 2, 0,
1, 5, 3, 8, 3, 3, 2, 1, 0, 2,
1, 1, 4, 1, 4, 1, 4, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 3, 1, 1, 4, 6,
8, 10, 12, 3, 3, 3, 3, 3, 3, 2,
2, 3, 1, 2, 2, 1, 1, 1
};
static const short yydefact[] = { 1,
0, 0, 0, 0, 147, 147, 147, 147, 0, 0,
0, 0, 0, 0, 196, 0, 0, 0, 0, 0,
147, 201, 199, 200, 147, 147, 0, 0, 147, 0,
147, 147, 0, 0, 0, 220, 147, 0, 133, 125,
0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
25, 34, 61, 92, 37, 39, 41, 26, 38, 3,
4, 5, 6, 15, 16, 30, 29, 32, 31, 17,
18, 7, 8, 9, 10, 11, 12, 13, 14, 19,
20, 21, 134, 0, 23, 22, 49, 48, 40, 190,
55, 192, 193, 194, 195, 198, 47, 46, 43, 50,
44, 45, 42, 51, 52, 24, 27, 33, 28, 273,
0, 0, 0, 128, 253, 252, 151, 152, 0, 0,
0, 0, 0, 0, 0, 183, 0, 0, 0, 145,
148, 149, 0, 0, 150, 161, 162, 163, 164, 166,
169, 165, 167, 168, 170, 171, 172, 132, 0, 0,
146, 0, 0, 0, 92, 0, 129, 103, 0, 251,
276, 277, 0, 185, 248, 144, 247, 100, 131, 0,
90, 0, 276, 216, 0, 0, 187, 249, 0, 0,
159, 0, 0, 101, 0, 116, 217, 220, 0, 130,
124, 127, 0, 0, 111, 113, 0, 108, 110, 106,
114, 112, 35, 36, 135, 0, 0, 0, 0, 0,
0, 275, 274, 257, 258, 0, 0, 0, 0, 0,
173, 174, 179, 180, 175, 178, 181, 0, 176, 177,
161, 161, 157, 0, 213, 0, 0, 0, 99, 0,
102, 0, 184, 136, 250, 255, 254, 89, 0, 0,
186, 117, 0, 158, 0, 0, 0, 0, 0, 0,
219, 221, 218, 0, 126, 123, 0, 0, 53, 107,
109, 104, 105, 0, 60, 0, 0, 0, 0, 91,
93, 140, 0, 139, 0, 0, 191, 56, 59, 54,
58, 57, 271, 270, 0, 0, 0, 0, 0, 0,
0, 256, 0, 0, 153, 154, 160, 225, 212, 206,
0, 0, 226, 197, 0, 210, 188, 189, 204, 0,
0, 115, 0, 0, 0, 0, 121, 122, 0, 0,
0, 0, 0, 0, 0, 66, 0, 0, 71, 0,
0, 0, 0, 0, 92, 75, 82, 0, 0, 0,
0, 141, 0, 0, 264, 265, 266, 267, 268, 269,
272, 0, 182, 214, 0, 0, 203, 205, 207, 0,
0, 223, 0, 0, 0, 120, 118, 119, 0, 65,
0, 0, 72, 67, 0, 63, 0, 0, 80, 0,
0, 62, 79, 0, 0, 0, 0, 142, 0, 259,
0, 0, 202, 0, 0, 227, 0, 0, 211, 64,
0, 0, 0, 0, 0, 0, 0, 0, 87, 0,
0, 0, 0, 81, 88, 0, 94, 95, 0, 0,
0, 0, 0, 0, 0, 0, 222, 0, 0, 0,
0, 229, 0, 78, 231, 232, 234, 236, 230, 245,
238, 239, 242, 243, 241, 244, 246, 240, 83, 85,
0, 0, 96, 0, 143, 137, 260, 0, 0, 208,
0, 0, 0, 0, 0, 0, 76, 228, 0, 0,
0, 0, 86, 84, 0, 138, 0, 215, 0, 0,
0, 70, 0, 0, 0, 0, 0, 0, 0, 261,
0, 0, 224, 68, 74, 0, 0, 233, 235, 237,
0, 0, 209, 69, 73, 0, 0, 262, 0, 77,
97, 0, 0, 263, 0, 98, 0, 0
};
static const short yydefgoto[] = { 1,
50, 51, 52, 53, 54, 55, 56, 57, 58, 211,
290, 203, 275, 345, 346, 347, 393, 424, 59, 204,
280, 281, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 192, 266,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
150, 151, 131, 132, 133, 134, 135, 86, 233, 136,
137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
147, 87, 88, 251, 317, 89, 90, 91, 92, 93,
94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
104, 105, 309, 364, 106, 107, 187, 261, 262, 165,
155, 370, 477, 425, 449, 459, 166, 108, 109, 159,
156, 245, 115, 219, 116, 164, 220
};
static const short yypact[] = {-32768,
925, 32, 640, 32, 640, 640, 640, 640, 32, 32,
32, 32, 522, 32,-32768, 32, 32, 7, 774, 45,
640,-32768,-32768,-32768, 640, 640, 32, 32, 640, 13,
640, 640, 32, 32, 32, 32, 640, 32,-32768, -63,
32, 32, 32, 32, 20, -10, 32, 32, 32,-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, -37, 3,-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,
41, 54, 27,-32768,-32768,-32768, 842, 1032, 32, 32,
32, 32, 32, 32, 32,-32768, 32, 32, 32,-32768,
-32768,-32768, 1076, 1076,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 32, 32,
-32768, 32, 32, 32,-32768, 32,-32768, 32, 32,-32768,
141,-32768, 45,-32768,-32768, -12, 32,-32768,-32768, 32,
788, 72,-32768,-32768, 32, 32,-32768,-32768, 32, 32,
640, 32, 32,-32768, 32,-32768, -17,-32768, 32,-32768,
-32768, -1, 32, 32,-32768,-32768, 1084, 32, 32, 35,
-32768,-32768, 25, 40,-32768, 32, 32, 32, 32, 32,
1034,-32768,-32768,-32768, -29, 27, 27, 27, 58, -23,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 32,-32768,-32768,
-32768,-32768, 1076, 32,-32768, 32, 32, 32, 40, 32,
-32768, 32,-32768,-32768,-32768,-32768,-32768,-32768, 32, 32,
32,-32768, 32,-32768, 32, 32, 32, 32, 32, 32,
-32768,-32768, -17, 32,-32768, 24, 32, 32,-32768,-32768,
-32768,-32768,-32768, 976,-32768, 32, 32, 32, 32,-32768,
-32768,-32768, 32,-32768, 32, 32,-32768,-32768,-32768,-32768,
-32768,-32768, -19, -19, 202, 27, 27, 27, 27, 27,
27,-32768, 27, 32, 1076, 1076,-32768,-32768, 32,-32768,
32, 32,-32768,-32768, 32,-32768,-32768,-32768,-32768, 32,
32,-32768, 32, 32, 32, 32, 45,-32768, 32, 32,
32, 32, 32, 32, 32, 45, 32, 640,-32768, 32,
640, 45, 32, 45,-32768,-32768,-32768, 32, 32, 32,
32,-32768, 32, 32,-32768, -60, -60, -19, -19, -19,
-19, 158,-32768,-32768, 32, 32,-32768,-32768, 32, 32,
32,-32768, 32, 32, 32,-32768,-32768,-32768, 640,-32768,
32, 32,-32768,-32768, 32,-32768, 32, 32,-32768, 32,
32, 40, 134, 32, 32, 32, 32, 32, 32,-32768,
27, 32,-32768, 32, 32,-32768, 32, 32,-32768,-32768,
32, 32, 32, 32, 32, 32, 32, 21,-32768, -5,
640, 32, 32,-32768,-32768, 32,-32768,-32768, 32, 32,
32, 177, 32, 32, 32, 32,-32768, 32, 32, 32,
32, 12, 32,-32768,-32768, 32, 32, 32,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
32, 32,-32768, 32,-32768, 53,-32768, 27, 32,-32768,
32, 32, 32, 32, 32, 32,-32768,-32768, 32, 32,
32, 32,-32768,-32768, 32,-32768, 442,-32768, 32, 32,
32,-32768, 32, 32, 32, 32, 32, 32, 32,-32768,
27, 32,-32768, 45,-32768, 32, 32,-32768,-32768,-32768,
32, 456,-32768,-32768,-32768, 32, 32,-32768, 27,-32768,
32, 281, 32,-32768, 32,-32768, 100,-32768
};
static const short yypgoto[] = {-32768,
-32768, -104, -82,-32768,-32768,-32768,-32768,-32768, -95,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -152,
-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, -80,
52, 111,-32768,-32768,-32768,-32768,-32768, -79, -157, -120,
-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, -59,-32768,-32768, 39,
327, -431,-32768, -309,-32768,-32768, 101,-32768,-32768, 44,
-2, 405, 272, -195, 355, 17,-32768
};
#define YYLAST 1181
static const short yytable[] = { 114,
198, 149, 239, 471, 258, 259, 450, 157, 158, 160,
170, 167, 231, 232, 160, 260, 181, 206, 191, 207,
293, 294, 295, 197, 178, 160, 110, 173, 162, 214,
215, 185, 167, 160, 110, 190, 174, 205, 160, 194,
195, 196, 148, 212, 160, 201, 160, 208, 173, 162,
209, 298, 299, 300, 244, 301, 213, 152, 153, 154,
169, 451, 452, 453, 454, 455, 456, 457, 272, 273,
513, 179, 175, 305, 306, 248, 176, 177, 210, 188,
180, 265, 182, 183, 193, 274, 276, -278, 189, 277,
200, 199, 202, 303, 278, 279, 301, 458, 418, 528,
356, 357, 358, 359, 360, 361, 288, 362, 445, 446,
447, 448, 307, 130, 269, 289, 149, 149, 223, 224,
149, 226, 227, 163, 228, 149, 230, 486, 263, 172,
291, 292, 478, 111, 112, 186, 216, 217, 0, 0,
113, 111, 112, 218, -151, -151, 234, 235, 113, 0,
237, 238, 0, 240, 0, 241, 160, 221, 222, 0,
0, 225, 0, 0, 234, 0, 229, 296, 297, 298,
299, 300, 249, 301, 0, 302, 160, 253, 0, 243,
0, 0, 257, 0, 307, 307, 264, 0, 0, 0,
160, 268, 392, 0, 0, 270, 271, 0, 0, 0,
0, 0, 242, 0, 283, 432, 0, -155, -155, -155,
-155, -155, -155, -155, 0, -155, 0, -155, 0, 0,
418, 0, 252, 0, 0, 149, 419, 420, 421, 422,
423, 308, 0, 0, 0, 0, 267, 313, 0, 160,
0, 0, 0, -155, 0, -155, 0, 0, 0, 0,
0, 0, 0, 0, 322, 149, 324, 149, 0, 0,
0, 326, 0, 160, 160, 330, 304, 296, 297, 298,
299, 300, 487, 301, 0, 400, 401, 0, 0, 0,
0, 0, 328, 0, 0, 314, 296, 297, 298, 299,
300, 254, 301, 0, 467, 468, 323, 0, 325, 0,
0, 363, 0, 0, 0, 512, 365, 0, 366, 327,
329, 296, 297, 298, 299, 300, 0, 301, 371, 355,
149, 373, 149, 522, 0, 0, 160, 378, 379, 380,
381, 382, 383, 0, 385, 0, 0, 387, 0, 0,
390, 0, 168, 376, 0, 0, 0, 0, 0, 0,
398, 160, 384, 0, 0, 0, 0, 0, 389, 184,
391, 372, 402, 374, 0, 0, 0, 0, 406, 0,
0, 408, 377, 0, 0, 0, 0, 0, 411, 412,
0, 0, 413, 0, 414, 415, 0, 416, 417, 0,
296, 297, 298, 299, 300, 430, 301, 399, 524, 433,
0, 0, 0, 0, 436, 437, 0, 0, 438, 439,
440, 441, 442, 443, 444, 0, 0, 0, 0, 461,
462, 0, 0, 0, 0, 0, 0, 465, 160, 0,
469, 0, 371, 160, 0, 473, 474, 160, 160, 0,
479, 246, 0, 0, 0, 0, 0, 0, 386, 0,
0, 388, 0, 0, 0, 0, 0, 0, 483, 484,
0, 0, 0, 0, 0, 0, 488, 0, 0, 149,
160, 160, 493, 494, 466, 0, 160, 0, 236, 472,
0, 0, 0, 475, 476, 0, 0, 149, 504, 410,
505, 506, 507, 0, 0, 0, 0, 0, 0, 371,
0, 0, 250, 515, 516, 0, 0, 0, 255, 256,
490, 0, 0, 520, 0, 0, 491, 492, 0, 0,
514, 0, 495, 0, 247, 161, 162, 0, 503, 0,
0, 460, 282, 0, 284, 285, 286, 118, 0, 0,
0, 0, 0, 0, 0, 0, 0, 246, 246, 246,
246, 296, 297, 298, 299, 300, 0, 301, 0, 500,
501, 0, 310, 311, 312, 296, 297, 298, 299, 300,
0, 301, 0, 518, 519, 315, 316, 318, 0, 319,
0, 320, 321, 0, 0, 0, 0, 0, 119, 120,
121, 122, 123, 124, 125, 0, 126, 0, 127, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 352,
0, 353, 354, 0, 0, 0, 0, 0, 0, 246,
246, 246, 246, 0, 128, 0, 129, 0, 0, 0,
247, 247, 247, 247, 0, 0, 0, 0, 367, 0,
0, 368, 0, 117, 0, 0, 369, 0, 0, 0,
0, 0, 375, 0, 0, 118, 0, 0, 0, 0,
0, 0, 0, 0, 0, 246, 246, 246, 246, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
348, 349, 350, 351, 0, 0, 0, 0, 0, 0,
0, 0, 403, 0, 0, 404, 405, 246, 0, 407,
246, 409, 247, 247, 247, 247, 119, 120, 121, 122,
123, 124, 125, 0, 126, 0, 127, 0, 0, 0,
0, 0, 0, 0, 0, 431, 0, 0, 0, 0,
434, 435, 0, 0, 0, 246, 0, 0, 0, 0,
0, 0, 128, 0, 129, 0, 0, 0, 247, 247,
247, 247, 394, 395, 396, 397, 246, 0, 0, 0,
470, 0, 0, 0, 0, 0, 0, 0, 0, 0,
246, 0, 480, 481, 482, 0, 0, 171, 0, 0,
247, 0, 246, 247, 0, 0, 0, 0, 246, 118,
0, -151, 246, 0, 246, 0, 246, 489, 426, 427,
428, 429, 0, 0, 0, 0, 496, 497, 498, 0,
0, 0, 0, 0, 0, 502, 0, 0, 247, 0,
0, 0, 508, 509, 510, 0, 0, 0, 0, 0,
463, 0, 0, 464, 0, 0, 0, 0, 0, 247,
119, 120, 121, 122, 123, 124, 125, 0, 126, 0,
127, 0, 0, 247, -155, -155, -155, -155, -155, -155,
-155, 0, -155, 0, -155, 247, 0, 0, 485, 0,
0, 247, 0, 0, 0, 247, 128, 247, 129, 247,
0, 0, 0, 0, 0, 0, 0, 0, 0, 499,
-155, 0, -155, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 511, 0, 0, 0, 0, -155, -155,
-155, -155, -155, -155, -155, 517, -155, 0, -155, 0,
0, 521, 0, 0, 527, 523, 0, 525, 0, 526,
2, 3, 4, 5, 0, 6, 0, 7, 8, 0,
0, 0, 9, 0, -155, 10, -155, 0, 11, 0,
12, 13, 14, 15, 16, 0, 17, 0, 0, 0,
18, 19, 20, 0, 21, 22, 23, 24, 25, 0,
26, 0, 0, 27, 0, 28, 29, 30, 0, 0,
0, 31, 32, 33, 0, 331, 0, 332, 34, 35,
0, 0, 0, 0, 333, 334, 0, 0, 36, 0,
335, 0, 37, 38, 39, 40, 336, 0, 41, 42,
0, 0, 0, 0, 337, 0, 0, 0, 0, 0,
0, 0, 43, 44, 45, 46, 0, 0, 47, 0,
0, 0, 48, 49, 0, 0, 0, 338, 339, 0,
3, 340, 5, 0, 6, 0, 7, 8, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
13, 341, 15, 0, 0, 0, 0, 342, 0, 0,
19, 0, 0, 21, 22, 23, 24, 25, 0, 26,
0, 343, 344, 0, 0, 29, 30, 0, 0, 0,
31, 32, 5, 287, 6, 0, 7, 8, -156, -156,
-156, -156, -156, -156, -156, 0, -156, 0, -156, 12,
13, 37, 15, 0, 0, 0, 0, 0, 0, 0,
19, 0, 0, 21, 22, 23, 24, 25, 0, 26,
0, 0, 0, 45, -156, 29, -156, 0, 0, 0,
31, 32, 119, 120, 121, 122, 123, 124, 125, 0,
126, 0, 127, 0, 0, 0, 0, 0, 0, 0,
0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 128, 0,
129
};
static const short yycheck[] = { 2,
11, 4, 155, 435, 22, 23, 12, 10, 11, 12,
4, 14, 133, 134, 17, 33, 4, 15, 82, 17,
216, 217, 218, 4, 27, 28, 3, 4, 5, 3,
4, 34, 35, 36, 3, 38, 20, 75, 41, 42,
43, 44, 4, 3, 47, 48, 49, 45, 4, 5,
48, 112, 113, 114, 67, 116, 3, 6, 7, 8,
17, 67, 68, 69, 70, 71, 72, 73, 34, 35,
502, 28, 21, 231, 232, 4, 25, 26, 76, 36,
29, 83, 31, 32, 41, 61, 47, 117, 37, 50,
47, 102, 49, 117, 55, 56, 116, 103, 87, 0,
296, 297, 298, 299, 300, 301, 211, 303, 88, 89,
90, 91, 233, 3, 197, 211, 119, 120, 121, 122,
123, 124, 125, 13, 127, 128, 129, 75, 188, 19,
211, 211, 442, 110, 111, 35, 110, 111, -1, -1,
117, 110, 111, 117, 4, 5, 149, 150, 117, -1,
153, 154, -1, 156, -1, 158, 159, 119, 120, -1,
-1, 123, -1, -1, 167, -1, 128, 110, 111, 112,
113, 114, 175, 116, -1, 118, 179, 180, -1, 163,
-1, -1, 185, -1, 305, 306, 189, -1, -1, -1,
193, 194, 345, -1, -1, 198, 199, -1, -1, -1,
-1, -1, 159, -1, 207, 401, -1, 67, 68, 69,
70, 71, 72, 73, -1, 75, -1, 77, -1, -1,
87, -1, 179, -1, -1, 228, 93, 94, 95, 96,
97, 234, -1, -1, -1, -1, 193, 240, -1, 242,
-1, -1, -1, 103, -1, 105, -1, -1, -1, -1,
-1, -1, -1, -1, 257, 258, 259, 260, -1, -1,
-1, 264, -1, 266, 267, 268, 228, 110, 111, 112,
113, 114, 468, 116, -1, 118, 119, -1, -1, -1,
-1, -1, 266, -1, -1, 242, 110, 111, 112, 113,
114, 181, 116, -1, 118, 119, 258, -1, 260, -1,
-1, 304, -1, -1, -1, 501, 309, -1, 311, 266,
267, 110, 111, 112, 113, 114, -1, 116, 321, 118,
323, 324, 325, 519, -1, -1, 329, 330, 331, 332,
333, 334, 335, -1, 337, -1, -1, 340, -1, -1,
343, -1, 16, 327, -1, -1, -1, -1, -1, -1,
353, 354, 336, -1, -1, -1, -1, -1, 342, 33,
344, 323, 365, 325, -1, -1, -1, -1, 371, -1,
-1, 374, 329, -1, -1, -1, -1, -1, 381, 382,
-1, -1, 385, -1, 387, 388, -1, 390, 391, -1,
110, 111, 112, 113, 114, 398, 116, 354, 118, 402,
-1, -1, -1, -1, 407, 408, -1, -1, 411, 412,
413, 414, 415, 416, 417, -1, -1, -1, -1, 422,
423, -1, -1, -1, -1, -1, -1, 430, 431, -1,
433, -1, 435, 436, -1, 438, 439, 440, 441, -1,
443, 170, -1, -1, -1, -1, -1, -1, 338, -1,
-1, 341, -1, -1, -1, -1, -1, -1, 461, 462,
-1, -1, -1, -1, -1, -1, 469, -1, -1, 472,
473, 474, 475, 476, 431, -1, 479, -1, 152, 436,
-1, -1, -1, 440, 441, -1, -1, 490, 491, 379,
493, 494, 495, -1, -1, -1, -1, -1, -1, 502,
-1, -1, 176, 506, 507, -1, -1, -1, 182, 183,
472, -1, -1, 516, -1, -1, 473, 474, -1, -1,
504, -1, 479, -1, 170, 4, 5, -1, 490, -1,
-1, 421, 206, -1, 208, 209, 210, 16, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 276, 277, 278,
279, 110, 111, 112, 113, 114, -1, 116, -1, 118,
119, -1, 236, 237, 238, 110, 111, 112, 113, 114,
-1, 116, -1, 118, 119, 249, 250, 251, -1, 253,
-1, 255, 256, -1, -1, -1, -1, -1, 67, 68,
69, 70, 71, 72, 73, -1, 75, -1, 77, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 283,
-1, 285, 286, -1, -1, -1, -1, -1, -1, 348,
349, 350, 351, -1, 103, -1, 105, -1, -1, -1,
276, 277, 278, 279, -1, -1, -1, -1, 312, -1,
-1, 315, -1, 4, -1, -1, 320, -1, -1, -1,
-1, -1, 326, -1, -1, 16, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 394, 395, 396, 397, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
276, 277, 278, 279, -1, -1, -1, -1, -1, -1,
-1, -1, 366, -1, -1, 369, 370, 426, -1, 373,
429, 375, 348, 349, 350, 351, 67, 68, 69, 70,
71, 72, 73, -1, 75, -1, 77, -1, -1, -1,
-1, -1, -1, -1, -1, 399, -1, -1, -1, -1,
404, 405, -1, -1, -1, 464, -1, -1, -1, -1,
-1, -1, 103, -1, 105, -1, -1, -1, 394, 395,
396, 397, 348, 349, 350, 351, 485, -1, -1, -1,
434, -1, -1, -1, -1, -1, -1, -1, -1, -1,
499, -1, 446, 447, 448, -1, -1, 4, -1, -1,
426, -1, 511, 429, -1, -1, -1, -1, 517, 16,
-1, 4, 521, -1, 523, -1, 525, 471, 394, 395,
396, 397, -1, -1, -1, -1, 480, 481, 482, -1,
-1, -1, -1, -1, -1, 489, -1, -1, 464, -1,
-1, -1, 496, 497, 498, -1, -1, -1, -1, -1,
426, -1, -1, 429, -1, -1, -1, -1, -1, 485,
67, 68, 69, 70, 71, 72, 73, -1, 75, -1,
77, -1, -1, 499, 67, 68, 69, 70, 71, 72,
73, -1, 75, -1, 77, 511, -1, -1, 464, -1,
-1, 517, -1, -1, -1, 521, 103, 523, 105, 525,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 485,
103, -1, 105, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 499, -1, -1, -1, -1, 67, 68,
69, 70, 71, 72, 73, 511, 75, -1, 77, -1,
-1, 517, -1, -1, 0, 521, -1, 523, -1, 525,
6, 7, 8, 9, -1, 11, -1, 13, 14, -1,
-1, -1, 18, -1, 103, 21, 105, -1, 24, -1,
26, 27, 28, 29, 30, -1, 32, -1, -1, -1,
36, 37, 38, -1, 40, 41, 42, 43, 44, -1,
46, -1, -1, 49, -1, 51, 52, 53, -1, -1,
-1, 57, 58, 59, -1, 10, -1, 12, 64, 65,
-1, -1, -1, -1, 19, 20, -1, -1, 74, -1,
25, -1, 78, 79, 80, 81, 31, -1, 84, 85,
-1, -1, -1, -1, 39, -1, -1, -1, -1, -1,
-1, -1, 98, 99, 100, 101, -1, -1, 104, -1,
-1, -1, 108, 109, -1, -1, -1, 62, 63, -1,
7, 66, 9, -1, 11, -1, 13, 14, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 26,
27, 86, 29, -1, -1, -1, -1, 92, -1, -1,
37, -1, -1, 40, 41, 42, 43, 44, -1, 46,
-1, 106, 107, -1, -1, 52, 53, -1, -1, -1,
57, 58, 9, 60, 11, -1, 13, 14, 67, 68,
69, 70, 71, 72, 73, -1, 75, -1, 77, 26,
27, 78, 29, -1, -1, -1, -1, -1, -1, -1,
37, -1, -1, 40, 41, 42, 43, 44, -1, 46,
-1, -1, -1, 100, 103, 52, 105, -1, -1, -1,
57, 58, 67, 68, 69, 70, 71, 72, 73, -1,
75, -1, 77, -1, -1, -1, -1, -1, -1, -1,
-1, 78, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 103, -1,
105
};
#define YYPURE 1
/* BISON template */
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
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 1, 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* Not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
#include <alloca.h>
#else
#ifdef MSDOS
#include <malloc.h>
#else
void *alloca(unsigned);
#endif /* MSDOS */
#endif /* Sparc. */
#endif /* Not GNU C. */
#ifndef bcopy
#define bcopy(s,d,x) memcpy(d,s,x)
#endif
/* 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. */
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
as one case of the switch. */
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT return(0)
#define YYABORT return(1)
#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
#ifndef YYIMPURE
#define YYLEX yylex()
#endif
#ifndef YYPURE
#define YYLEX yylex(&yylval, &yylloc)
#endif
/* If nonreentrant, generate the variables here */
#ifndef YYIMPURE
int yychar; /* the lookahead symbol */
YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
#ifdef YYLSP_NEEDED
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
#endif
int yynerrs; /* number of parse errors so far */
#endif /* YYIMPURE */
#if YYDEBUG != 0
int yydebug; /* nonzero means print parse trace */
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
/* YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
/* YYMAXDEPTH is the maximum size the stacks can grow to
(effective only if the built-in stack extension method is used). */
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static void
__yy_bcopy (from, to, count)
char *from;
char *to;
int count;
{
register char *f = from;
register char *t = to;
register int i = count;
while (i-- > 0)
*t++ = *f++;
}
int
yyparse()
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1; /* lookahead token as an internal (translated) token number */
short yyssa[YYINITDEPTH]; /* the state stack */
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
short *yyss = yyssa; /* refer to the stacks thru separate pointers */
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
#ifdef YYLSP_NEEDED
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
#define YYPOPSTACK (yyvsp--, yysp--, yylsp--)
#else
#define YYPOPSTACK (yyvsp--, yysp--)
#endif
int yystacksize = YYINITDEPTH;
#ifndef YYPURE
int yychar;
YYSTYPE yylval;
int yynerrs;
#ifdef YYLSP_NEEDED
YYLTYPE yylloc;
#endif
#endif
YYSTYPE yyval; /* the variable used to return */
/* semantic values from the action */
/* routines */
int yylen;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Starting parse\n");
#endif
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. */
yyssp = yyss - 1;
yyvsp = yyvs;
#ifdef YYLSP_NEEDED
yylsp = yyls;
#endif
/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
*++yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* 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;
#ifdef YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
#endif
/* Get the current used size of the three stacks, in elements. */
int size = yyssp - yyss + 1;
#ifdef yyoverflow
/* Each stack pointer address is followed by the size of
the data in use in that stack, in bytes. */
yyoverflow("parser stack overflow",
&yyss1, size * sizeof (*yyssp),
&yyvs1, size * sizeof (*yyvsp),
#ifdef YYLSP_NEEDED
&yyls1, size * sizeof (*yylsp),
#endif
&yystacksize);
yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
yyls = yyls1;
#endif
#else /* no yyoverflow */
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
{
yyerror("parser stack overflow","","");
return 2;
}
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
__yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
__yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
__yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
yylsp = yyls + size - 1;
#endif
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Entering state %d\n", yystate);
#endif
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)
{
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Reading a token: ");
#endif
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 */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Now at end of input.\n");
#endif
}
else
{
yychar1 = YYTRANSLATE(yychar);
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
#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. */
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* count tokens shifted since error; after three, turn off error status. */
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
goto yynewstate;
/* Do the default action for the current state. */
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
yylen = yyr2[yyn];
yyval = yyvsp[1-yylen]; /* implement default value of the action */
#if YYDEBUG != 0
if (yydebug)
{
if (yylen == 1)
fprintf (stderr, "Reducing 1 value via rule %d (line %d), ",
yyn, yyrline[yyn]);
else
fprintf (stderr, "Reducing %d values via rule %d (line %d), ",
yylen, yyn, yyrline[yyn]);
}
#endif
switch (yyn) {
case 34:
{
if (yyvsp[0].obj) {
/*
* Add instance to current object.
*/
yyvsp[0].obj->next = Defstack->obj->next;
Defstack->obj->next = yyvsp[0].obj;
}
;
break;}
case 35:
{
if (yyval.obj && CurText) {
yyval.obj->texture = TextAppend(CurText, yyval.obj->texture);
}
CurText = (Texture *)NULL;
;
break;}
case 36:
{
yyval.obj = yyvsp[-1].obj;
if (yyval.obj != (Geom *)NULL) {
if (TransHead) {
yyval.obj->trans = TransHead;
yyval.obj->transtail = TransTail;
/*
* We compose non-animated tranformation lists,
* so we're only animated if it's one long,
* or it's animated itself.
*/
if (yyval.obj->trans->assoc || yyval.obj->trans->next)
/* geometry is animated...*/
yyval.obj->animtrans = TRUE;
}
}
;
break;}
case 37:
{
if (yyval.obj)
StatsAddRep(yyval.obj);
;
break;}
case 41:
{
if (yyval.obj)
yyval.obj->prims = 1; /* one primitive */
;
break;}
case 53:
{
if (yyvsp[0].obj) {
yyvsp[0].obj->name = yyvsp[-1].c;
GeomAddToDefined(yyvsp[0].obj);
}
;
break;}
case 62:
{
if (yyvsp[-1].text != (Texture *)NULL) {
/*
* Set transformation information.
*/
if (TransHead) {
yyvsp[-1].text->trans = TransHead;
/*
* We compose non-animated tranformation lists,
* so we're only animated if it's one long,
* or it's animated itself.
*/
if (yyvsp[-1].text->trans->assoc || yyvsp[-1].text->trans->next)
/* texture transformation is animated...*/
yyvsp[-1].text->animtrans = TRUE;
}
/*
* Walk to the end of list of textures and
* append new texture. This is done so that
* textures are applied in the expected order.
*/
CurText = TextAppend(yyvsp[-1].text, CurText);
}
;
break;}
case 63:
{
yyval.text = TextCheckerCreate(yyvsp[0].surf);
;
break;}
case 64:
{
yyval.text = TextBlotchCreate(yyvsp[-1].d, yyvsp[0].surf);
;
break;}
case 65:
{
yyval.text = TextBumpCreate(yyvsp[0].d);
;
break;}
case 66:
{
yyval.text = TextMarbleCreate((char *)NULL);
;
break;}
case 67:
{
yyval.text = TextMarbleCreate(yyvsp[0].c);
;
break;}
case 68:
{
yyval.text = TextFBmCreate(yyvsp[-5].d, yyvsp[-4].d, yyvsp[-3].d, yyvsp[-2].d, yyvsp[-1].i, yyvsp[0].d,
(char *)NULL);
;
break;}
case 69:
{
yyval.text = TextFBmCreate(yyvsp[-6].d, yyvsp[-5].d, yyvsp[-4].d, yyvsp[-3].d, yyvsp[-2].i, yyvsp[-1].d, yyvsp[0].c);
;
break;}
case 70:
{
yyval.text = TextFBmBumpCreate(yyvsp[-4].d, yyvsp[-3].d, yyvsp[-2].d, yyvsp[-1].d, yyvsp[0].i);
;
break;}
case 71:
{
yyval.text = TextWoodCreate();
;
break;}
case 72:
{
yyval.text = TextGlossCreate(yyvsp[0].d);
;
break;}
case 73:
{
yyval.text = TextCloudCreate(yyvsp[-6].d, yyvsp[-5].d, yyvsp[-4].d, yyvsp[-3].i, yyvsp[-2].d, yyvsp[-1].d, yyvsp[0].d);
;
break;}
case 74:
{
yyval.text = TextSkyCreate(yyvsp[-5].d, yyvsp[-4].d, yyvsp[-3].d, yyvsp[-2].i, yyvsp[-1].d, yyvsp[0].d);
;
break;}
case 75:
{
/*
* Image texturing has so many options
* that specification is keyword-based.
*/
if (Imagetext->image == (Image *)NULL)
yyval.text = (Texture *)NULL;
else
yyval.text = TextCreate(Imagetext, ImageTextApply);
Imagetext = (ImageText *)NULL;
;
break;}
case 76:
{
yyval.text = TextStripeCreate(yyvsp[-3].surf, yyvsp[-2].d, yyvsp[-1].d, yyvsp[0].map);
;
break;}
case 77:
{
yyval.text = TextWindyCreate(yyvsp[-7].d, yyvsp[-6].d, yyvsp[-5].d, yyvsp[-4].d, yyvsp[-3].i, yyvsp[-2].d, yyvsp[-1].d, yyvsp[0].d);
;
break;}
case 78:
{
yyval.text = TextMountCreate(yyvsp[-2].c, yyvsp[-1].d, yyvsp[0].d);
;
break;}
case 80:
{
Imagetext = ImageTextCreate(yyvsp[0].c);
;
break;}
case 83:
{
/* set texture to modify given component */
ImageTextSetComponent(Imagetext, yyvsp[0].i);
;
break;}
case 84:
{
Imagetext->tileu = yyvsp[-1].d;
Imagetext->tilev = yyvsp[0].d;
;
break;}
case 85:
{
Imagetext->surf = yyvsp[0].surf;
;
break;}
case 86:
{
Imagetext->hi = yyvsp[-1].d;
Imagetext->lo = yyvsp[0].d;
;
break;}
case 87:
{
Imagetext->smooth = TRUE;
;
break;}
case 88:
{
Imagetext->mapping = yyvsp[0].map;
;
break;}
case 89:
{
Geom *otmp;
/*
* Create an instance of the named object.
*/
otmp = GeomGetNamed(yyvsp[0].c);
if (otmp == (Geom *)NULL)
RLerror(RL_PANIC,
"There is no object named \"%s\".", yyvsp[0].c,"","");
yyval.obj = GeomInstanceCreate(otmp);
yyval.obj->surf = yyvsp[-1].surf;
yyval.obj->prims = otmp->prims;
;
break;}
case 90:
{
Geom *otmp;
otmp = GeomGetNamed(yyvsp[0].c);
if (otmp == (Geom *)NULL)
RLerror(RL_PANIC,
"There is no object named \"%s\".", yyvsp[0].c,"","");
yyval.obj = GeomInstanceCreate(otmp);
yyval.obj->surf = CurSurf->surf;
yyval.obj->prims = otmp->prims;
;
break;}
case 92:
{
TransHead = TransTail = (Trans *)NULL;
;
break;}
case 93:
{
if (TransHead == (Trans *)NULL) {
/* we're the list, head and tail */
TransHead = TransTail = yyvsp[0].trans;
} else {
if (yyvsp[0].trans->animated || TransTail->animated) {
/* new tail */
yyvsp[0].trans->prev = TransTail;
TransTail->next = yyvsp[0].trans;
TransTail = yyvsp[0].trans;
} else {
/* collapse with tail */
TransCompose(TransTail, yyvsp[0].trans, TransTail);
TransFree(yyvsp[0].trans);
}
}
;
break;}
case 94:
{
yyval.trans = TransScaleCreate();
TransScaleSetX(yyval.trans, yyvsp[-2].e);
TransScaleSetY(yyval.trans, yyvsp[-1].e);
TransScaleSetZ(yyval.trans, yyvsp[0].e);
if (!yyval.trans->animated)
TransPropagate(yyval.trans);
;
break;}
case 95:
{
yyval.trans = TransTranslateCreate();
TransTranslateSetX(yyval.trans, yyvsp[-2].e);
TransTranslateSetY(yyval.trans, yyvsp[-1].e);
TransTranslateSetZ(yyval.trans, yyvsp[0].e);
if (!yyval.trans->animated)
TransPropagate(yyval.trans);
;
break;}
case 96:
{
yyval.trans = TransRotateCreate();
TransRotateSetX(yyval.trans, yyvsp[-3].e);
TransRotateSetY(yyval.trans, yyvsp[-2].e);
TransRotateSetZ(yyval.trans, yyvsp[-1].e);
TransRotateSetTheta(yyval.trans, yyvsp[0].e);
if (!yyval.trans->animated)
TransPropagate(yyval.trans);
;
break;}
case 97:
{
yyval.trans = TransXformCreate();
TransXformSetX0(yyval.trans, yyvsp[-8].e);
TransXformSetY0(yyval.trans, yyvsp[-7].e);
TransXformSetZ0(yyval.trans, yyvsp[-6].e);
TransXformSetX1(yyval.trans, yyvsp[-5].e);
TransXformSetY1(yyval.trans, yyvsp[-4].e);
TransXformSetZ1(yyval.trans, yyvsp[-3].e);
TransXformSetX2(yyval.trans, yyvsp[-2].e);
TransXformSetY2(yyval.trans, yyvsp[-1].e);
TransXformSetZ2(yyval.trans, yyvsp[0].e);
if (!yyval.trans->animated)
TransPropagate(yyval.trans);
;
break;}
case 98:
{
yyval.trans = TransXformCreate();
TransXformSetX0(yyval.trans, yyvsp[-11].e);
TransXformSetY0(yyval.trans, yyvsp[-10].e);
TransXformSetZ0(yyval.trans, yyvsp[-9].e);
TransXformSetX1(yyval.trans, yyvsp[-8].e);
TransXformSetY1(yyval.trans, yyvsp[-7].e);
TransXformSetZ1(yyval.trans, yyvsp[-6].e);
TransXformSetX2(yyval.trans, yyvsp[-5].e);
TransXformSetY2(yyval.trans, yyvsp[-4].e);
TransXformSetZ2(yyval.trans, yyvsp[-3].e);
TransXformSetXt(yyval.trans, yyvsp[-2].e);
TransXformSetYt(yyval.trans, yyvsp[-1].e);
TransXformSetZt(yyval.trans, yyvsp[0].e);
if (!yyval.trans->animated)
TransPropagate(yyval.trans);
;
break;}
case 99:
{
Camera.pos = yyvsp[-1].v;
/*
* Eye can be transformed...
if (CurMatrix) {
PointTransform(&Camera.pos, CurMatrix);
free((voidstar)CurMatrix);
CurMatrix = (Matrix*)NULL;
}
*/
;
break;}
case 100:
{
Camera.lookp = yyvsp[0].v;
;
break;}
case 101:
{
Camera.up = yyvsp[0].v;
;
break;}
case 102:
{
Camera.hfov = yyvsp[-1].d;
Camera.vfov = yyvsp[0].d;
;
break;}
case 103:
{
Camera.hfov = yyvsp[0].d;
Camera.vfov = UNSET;
;
break;}
case 104:
{
if (!Options.samples_set)
Options.samples = yyvsp[-1].i;
if (!Options.jitter_set)
Options.jitter = TRUE;
;
break;}
case 105:
{
if (!Options.samples_set)
Options.samples = yyvsp[-1].i;
if (!Options.jitter_set)
Options.jitter = FALSE;
;
break;}
case 106:
{
if (!Options.samples_set)
Options.samples = yyvsp[0].i;
;
break;}
case 107:
{
Options.gaussian = FALSE;
Options.filterwidth = yyvsp[0].d;
;
break;}
case 108:
{
Options.gaussian = FALSE;
;
break;}
case 109:
{
Options.gaussian = TRUE;
Options.filterwidth = yyvsp[0].d;
;
break;}
case 110:
{
Options.gaussian = TRUE;
;
break;}
case 111:
{
Options.starttime = yyvsp[0].d;
;
break;}
case 112:
{
if (!Options.totalframes_set)
Options.totalframes = yyvsp[0].i;
;
break;}
case 113:
{
Options.framelength = yyvsp[0].d;
;
break;}
case 114:
{
Options.shutterspeed = yyvsp[0].d;
;
break;}
case 115:
{
if (!Options.contrast_set) {
Options.contrast.r = yyvsp[-2].d;
Options.contrast.g = yyvsp[-1].d;
Options.contrast.b = yyvsp[0].d;
}
;
break;}
case 116:
{
if (!Options.cutoff_set)
Options.cutoff = yyvsp[0].col;
;
break;}
case 117:
{
if (!Options.resolution_set) {
Screen.xres = yyvsp[-1].i;
Screen.yres = yyvsp[0].i;
}
;
break;}
case 118:
{
if (!Options.window_set) {
Options.window[LOW][X] = yyvsp[-3].i;
Options.window[HIGH][X] = yyvsp[-2].i;
Options.window[LOW][Y] = yyvsp[-1].i;
Options.window[HIGH][Y] = yyvsp[0].i;
/*
* We must let ViewingSetup know
* that a window has been defined.
*/
Options.window_set = TRUE;
}
;
break;}
case 119:
{
if (!Options.crop_set) {
Options.crop[LOW][X] = yyvsp[-3].d;
Options.crop[HIGH][X] = yyvsp[-2].d;
Options.crop[LOW][Y] = yyvsp[-1].d;
Options.crop[HIGH][Y] = yyvsp[0].d;
}
;
break;}
case 120:
{
if (!Options.freq_set)
Options.report_freq = yyvsp[-1].i;
if (Options.statsname == (char *)NULL)
Options.statsname = strsave(yyvsp[0].c);
;
break;}
case 121:
{
if (!Options.freq_set)
Options.report_freq = yyvsp[0].i;
;
break;}
case 122:
{
if (Options.statsname == (char *)NULL)
Options.statsname = strsave(yyvsp[0].c);
;
break;}
case 124:
{ Options.verbose = TRUE; ;
break;}
case 126:
{ Options.quiet = TRUE; ;
break;}
case 128:
{
Camera.aperture = yyvsp[0].d;
;
break;}
case 129:
{
Camera.focaldist = yyvsp[0].d;
;
break;}
case 130:
{
if (!Options.eyesep_set)
Options.eyesep = yyvsp[0].d;
;
break;}
case 131:
{
if (!Options.maxdepth_set)
Options.maxdepth = yyvsp[0].i;
;
break;}
case 132:
{
Screen.background = yyvsp[0].col;
;
break;}
case 133:
{
Options.shadowtransp = !Options.shadowtransp;
;
break;}
case 134:
{
LightAddToDefined(yyvsp[0].light);
;
break;}
case 135:
{
yyvsp[-1].light->shadow = FALSE;
LightAddToDefined(yyvsp[-1].light);
;
break;}
case 136:
{
Options.ambient = yyvsp[-1].col;
;
break;}
case 137:
{
extern void AreaLightCreate();
/* Area light is strange in that the
* Creation routine does the installation.
*/
AreaLightCreate(&yyvsp[-6].col, &yyvsp[-4].v, &yyvsp[-3].v, yyvsp[-2].i, &yyvsp[-1].v, yyvsp[0].i, TRUE);
;
break;}
case 138:
{
extern void AreaLightCreate();
/* Area light is strange in that the
* Creation routine does the installation.
*/
AreaLightCreate(&yyvsp[-7].col, &yyvsp[-5].v, &yyvsp[-4].v, yyvsp[-3].i, &yyvsp[-2].v, yyvsp[-1].i, FALSE);
;
break;}
case 139:
{
yyval.light = LightPointCreate(&yyvsp[-2].col, &yyvsp[0].v);
;
break;}
case 140:
{
yyval.light = LightInfiniteCreate(&yyvsp[-2].col, &yyvsp[0].v);
;
break;}
case 141:
{
yyval.light = LightExtendedCreate(&yyvsp[-3].col, yyvsp[-1].d, &yyvsp[0].v);
;
break;}
case 142:
{
yyval.light = LightSpotCreate(&yyvsp[-4].col, &yyvsp[-2].v, &yyvsp[-1].v, yyvsp[0].d, 0., 0.);
;
break;}
case 143:
{
/* light <intens> spot from <to> coef inner_rad
outer_rad */
yyval.light = LightSpotCreate(&yyvsp[-6].col, &yyvsp[-4].v, &yyvsp[-3].v, yyvsp[-2].d, yyvsp[-1].d, yyvsp[0].d);
;
break;}
case 144:
{
yyval.col = yyvsp[0].col;
;
break;}
case 145:
{
CurSurf->surf = yyvsp[0].surf;
;
break;}
case 147:
{
yyval.surf = CurSurf->surf;
;
break;}
case 151:
{
yyval.surf = SurfaceGetNamed(yyvsp[0].c);
/*
* Free up memory allocated for surf name.
* We bother doing this because for large models
* converted from 3.0, surfnames this can account
* for lots o' bytes.
*/
free((voidstar)yyvsp[0].c);
;
break;}
case 152:
{
extern Surface DefaultSurface;
if (CurSurf->surf)
yyval.surf = CurSurf->surf;
else
yyval.surf = &DefaultSurface;
;
break;}
case 153:
{
yyval.surf = tmpsurf;
tmpsurf = (Surface *)NULL;
;
break;}
case 154:
{
yyval.surf = tmpsurf;
tmpsurf = (Surface *)NULL;
;
break;}
case 155:
{
tmpsurf = SurfaceCopy(SurfaceGetNamed(yyvsp[0].c));
;
break;}
case 156:
{
extern Surface DefaultSurface;
if (CurSurf->surf)
tmpsurf = SurfaceCopy(CurSurf->surf);
else
tmpsurf = SurfaceCopy(&DefaultSurface);
;
break;}
case 157:
{
yyval.surf = tmpsurf;
tmpsurf = (Surface *)NULL;
;
break;}
case 158:
{
tmpsurf = SurfaceCopy(yyvsp[0].surf);
tmpsurf->name = strsave(yyvsp[-1].c);
SurfaceAddToDefined(tmpsurf);
tmpsurf = (Surface *)NULL;
;
break;}
case 159:
{
/* black surface */
tmpsurf = SurfaceCreate();
tmpsurf->name = strsave(yyvsp[0].c);
SurfaceAddToDefined(tmpsurf);
tmpsurf = (Surface *)NULL;
;
break;}
case 173:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->amb = yyvsp[0].col;
;
break;}
case 174:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->diff = yyvsp[0].col;
;
break;}
case 175:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->spec = yyvsp[0].col;
;
break;}
case 176:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->body = yyvsp[0].col;
;
break;}
case 177:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->statten = yyvsp[0].d;
;
break;}
case 178:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->srexp = yyvsp[0].d;
;
break;}
case 179:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->reflect = yyvsp[0].d;
;
break;}
case 180:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->transp = yyvsp[0].d;
;
break;}
case 181:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->index = yyvsp[0].d;
;
break;}
case 182:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->translucency = yyvsp[-2].d;
tmpsurf->translu = yyvsp[-1].col;
tmpsurf->stexp = yyvsp[0].d;
;
break;}
case 183:
{
if (tmpsurf == (Surface *)NULL)
tmpsurf = SurfaceCreate();
tmpsurf->noshadow = TRUE;
;
break;}
case 184:
{
yyval.obj = GeomHfCreate(yyvsp[0].c);
if (yyval.obj)
yyval.obj->surf = yyvsp[-1].surf;
;
break;}
case 185:
{
yyval.obj = GeomHfCreate(yyvsp[0].c);
;
break;}
case 186:
{
yyval.obj = GeomPolygonCreate(Polypoints, Npoints,
Options.flipnorm);
if (yyval.obj)
yyval.obj->surf = yyvsp[-1].surf;
Polypoints = (PointList *)NULL;
Npoints = 0;
;
break;}
case 189:
{
PointList *ptmp;
ptmp = (PointList *)RayMalloc(sizeof(PointList));
ptmp->vec = yyvsp[0].v;
ptmp->next = Polypoints;
Polypoints = ptmp;
Npoints++;
;
break;}
case 190:
{
if (Defstack->obj) {
/*
* Set object texture to current texture.
*/
Defstack->obj->texture = CurText;
}
CurText = (Texture *)NULL;
/*
* Pop topmost object on stack.
*/
yyval.obj = Defstack->obj;
Defstack = GeomStackPop(Defstack);
/* Pop current surface */
CurSurf = SurfPop(CurSurf);
/* Make current default surf aggregate's default */
yyval.obj->surf = CurSurf->surf;
;
break;}
case 191:
{
/* Convert aggregate, pop stacks, etc. */
if (yyvsp[-2].obj) {
if (Defstack->obj->next == (Geom *)NULL) {
RLerror(RL_WARN,
"Null object defined.\n","","","");
Defstack->obj = (Geom *)NULL;
} else {
/*
* Convert the linked list of objects
* associated with the topmost object
* to the appropriate aggregate type.
*/
Defstack->obj->prims=AggregateConvert(
Defstack->obj,
Defstack->obj->next);
/*
* Make sure conversion worked OK.
*/
if (Defstack->obj->prims <= 0)
Defstack->obj = (Geom *)NULL;
}
}
;
break;}
case 192:
{
if (yyvsp[0].obj) {
Defstack = GeomStackPush(yyvsp[0].obj, Defstack);
CurSurf = SurfPush((Surface *)NULL, CurSurf);
}
;
break;}
case 196:
{
yyval.obj = GeomListCreate();
;
break;}
case 197:
{
yyval.obj = GeomGridCreate(yyvsp[-2].i, yyvsp[-1].i, yyvsp[0].i);
;
break;}
case 198:
{
yyval.obj = GeomCsgCreate(yyvsp[0].i);
Options.csg = TRUE;
;
break;}
case 199:
{
yyval.i = CSG_UNION;
;
break;}
case 200:
{
yyval.i = CSG_INTERSECT;
;
break;}
case 201:
{
yyval.i = CSG_DIFFERENCE;
;
break;}
case 202:
{
if (equal(yyvsp[-3].d, yyvsp[-1].d)) {
/* It's really a cylinder */
yyval.obj = GeomCylinderCreate(yyvsp[-3].d, &yyvsp[-2].v, &yyvsp[0].v);
} else
yyval.obj = GeomConeCreate(yyvsp[-3].d, &yyvsp[-2].v, yyvsp[-1].d, &yyvsp[0].v);
if (yyval.obj)
yyval.obj->surf = yyvsp[-4].surf;
;
break;}
case 203:
{
yyval.obj = GeomCylinderCreate(yyvsp[-2].d, &yyvsp[-1].v, &yyvsp[0].v);
if (yyval.obj)
yyval.obj->surf = yyvsp[-3].surf;
;
break;}
case 204:
{
yyval.obj = GeomSphereCreate(yyvsp[-1].d, &(yyvsp[0].v));
if (yyval.obj)
yyval.obj->surf = yyvsp[-2].surf;
;
break;}
case 205:
{
yyval.obj = GeomDiscCreate(yyvsp[-2].d, &(yyvsp[-1].v), &(yyvsp[0].v));
if (yyval.obj)
yyval.obj->surf = yyvsp[-3].surf;
;
break;}
case 206:
{
yyval.obj = GeomBoxCreate(&yyvsp[-1].v, &yyvsp[0].v);
if (yyval.obj)
yyval.obj->surf = yyvsp[-2].surf;
;
break;}
case 207:
{
yyval.obj = GeomTriangleCreate(FLATTRI, &(yyvsp[-2].v), &(yyvsp[-1].v), &(yyvsp[0].v),
(Vector *)NULL, (Vector *)NULL, (Vector *)NULL,
(Vec2d *)NULL, (Vec2d *)NULL, (Vec2d *)NULL,
Options.flipnorm);
if (yyval.obj)
yyval.obj->surf = yyvsp[-3].surf;
;
break;}
case 208:
{
yyval.obj = GeomTriangleCreate(PHONGTRI, &(yyvsp[-5].v), &(yyvsp[-3].v),
&(yyvsp[-1].v), &(yyvsp[-4].v), &(yyvsp[-2].v), &(yyvsp[0].v),
(Vec2d *)NULL, (Vec2d *)NULL, (Vec2d *)NULL,
Options.flipnorm);
if (yyval.obj)
yyval.obj->surf = yyvsp[-6].surf;
;
break;}
case 209:
{
yyval.obj = GeomTriangleCreate(PHONGTRI, &(yyvsp[-8].v), &(yyvsp[-5].v), &(yyvsp[-2].v),
&(yyvsp[-7].v), &(yyvsp[-4].v), &(yyvsp[-1].v),
&(yyvsp[-6].uv), &(yyvsp[-3].uv), &(yyvsp[0].uv),
Options.flipnorm);
if (yyval.obj)
yyval.obj->surf = yyvsp[-9].surf;
;
break;}
case 210:
{
yyval.obj = GeomPlaneCreate(&(yyvsp[-1].v), &(yyvsp[0].v));
if (yyval.obj)
yyval.obj->surf = yyvsp[-2].surf;
;
break;}
case 211:
{
yyval.obj = GeomTorusCreate(yyvsp[-3].d, yyvsp[-2].d, &(yyvsp[-1].v), &(yyvsp[0].v));
if (yyval.obj)
yyval.obj->surf = yyvsp[-4].surf;
;
break;}
case 212:
{
yyval.obj = GeomBlobCreate(yyvsp[-1].d, Metapoints, Npoints);
if (yyval.obj)
yyval.obj->surf = yyvsp[-2].surf;
Metapoints = (MetaList *)NULL;
Npoints = 0;
;
break;}
case 215:
{
Metapoint = (MetaList *)RayMalloc(sizeof(MetaList));
Metapoint->mvec.c0 = yyvsp[-4].d;
Metapoint->mvec.rs = yyvsp[-3].d;
Metapoint->mvec.x = yyvsp[-2].d;
Metapoint->mvec.y = yyvsp[-1].d;
Metapoint->mvec.z = yyvsp[0].d;
Metapoint->next = Metapoints;
Metapoints = Metapoint;
Npoints++;
;
break;}
case 216:
{
if (Options.imgname != (char *)NULL)
/* Already set on command line. */
RLerror(RL_WARN,
"Ignoring output file name \"%s\".\n",
yyvsp[0].c,"","");
else
Options.imgname = strsave(yyvsp[0].c);
;
break;}
case 217:
{
AtmosEffects = CurEffect;
CurEffect = (Atmosphere *)NULL;
;
break;}
case 218:
{
if (yyvsp[-1].i <= 0.)
RLerror(RL_PANIC,
"Index of refraction must be positive.\n","","","");
TopMedium.index = yyvsp[-1].i;
AtmosEffects = CurEffect;
CurEffect = (Atmosphere *)NULL;
;
break;}
case 221:
{
yyvsp[0].atmos->next = CurEffect;
CurEffect = yyvsp[0].atmos;
;
break;}
case 222:
{
yyval.atmos = AtmosMistCreate(&(yyvsp[-3].col), &(yyvsp[-2].col), yyvsp[-1].d, yyvsp[0].d);
;
break;}
case 223:
{
yyval.atmos = AtmosFogCreate(&(yyvsp[-1].col), &(yyvsp[0].col));
;
break;}
case 224:
{
yyval.atmos = AtmosFogdeckCreate(yyvsp[-6].d, yyvsp[-5].d, &yyvsp[-4].v, yyvsp[-3].d, yyvsp[-2].i, &yyvsp[-1].col, &yyvsp[0].col);
;
break;}
case 225:
{
yyval.col.r = yyvsp[-2].d;
yyval.col.g = yyvsp[-1].d;
yyval.col.b = yyvsp[0].d;
;
break;}
case 226:
{
yyval.v.x = yyvsp[-2].d;
yyval.v.y = yyvsp[-1].d;
yyval.v.z = yyvsp[0].d;
;
break;}
case 227:
{
yyval.uv.u = yyvsp[-1].d;
yyval.uv.v = yyvsp[0].d;
;
break;}
case 229:
{
yyval.map = UVMappingCreate();
;
break;}
case 230:
{
yyval.map = yyvsp[0].map;
;
break;}
case 231:
{
yyval.map = UVMappingCreate();
;
break;}
case 232:
{
yyval.map = SphereMappingCreate((Vector *)NULL,
(Vector *)NULL, (Vector *)NULL);
;
break;}
case 233:
{
/* origin up uaxis */
yyval.map = SphereMappingCreate(&yyvsp[-2].v, &yyvsp[-1].v, &yyvsp[0].v);
;
break;}
case 234:
{
yyval.map = CylMappingCreate((Vector *)NULL,
(Vector *)NULL, (Vector *)NULL);
;
break;}
case 235:
{
/* origin up uaxis */
yyval.map = CylMappingCreate(&yyvsp[-2].v, &yyvsp[-1].v, &yyvsp[0].v);
;
break;}
case 236:
{
yyval.map = LinearMappingCreate((Vector *)NULL,
(Vector *)NULL, (Vector *)NULL);
;
break;}
case 237:
{
/* origin up uaxis */
yyval.map = LinearMappingCreate(&yyvsp[-2].v, &yyvsp[-1].v, &yyvsp[0].v);
;
break;}
case 238:
{
yyval.i = AMBIENT;
;
break;}
case 239:
{
yyval.i = DIFFUSE;
;
break;}
case 240:
{
yyval.i = BODY;
;
break;}
case 241:
{
yyval.i = SPECULAR;
;
break;}
case 242:
{
yyval.i = REFLECT;
;
break;}
case 243:
{
yyval.i = TRANSP;
;
break;}
case 244:
{
yyval.i = SPECPOW;
;
break;}
case 245:
{
yyval.i = BUMP;
;
break;}
case 246:
{
yyval.i = INDEX;
;
break;}
case 247:
{ yyval.col.r = yyval.col.g = yyval.col.b = yyvsp[0].d; ;
break;}
case 249:
{
fprintf(stderr,"%f\n",yyvsp[0].d);
;
break;}
case 250:
{
SymtabAddEntry(yyvsp[-1].c, yyvsp[0].e->type, yyvsp[0].e, NULL, yyvsp[0].e->timevary, 0);
;
break;}
case 251:
{ yyval.i = (int)yyvsp[0].d; ;
break;}
case 253:
{
if (!yyvsp[0].e->timevary) {
yyval.d = ExprEval(yyvsp[0].e);
} else {
RLerror(RL_PANIC, "Illegal expression use.\n","","","");
}
;
break;}
case 254:
{
yyval.e = ExprReuseFloatCreate(yyvsp[0].d);
;
break;}
case 256:
{
yyval.e = yyvsp[-1].e;
;
break;}
case 257:
{
yyval.e = ExprFloatCreate(yyvsp[0].d, FALSE);
;
break;}
case 258:
{
yyval.e = ExprFloatSymtabFind(yyvsp[0].c);
;
break;}
case 259:
{
yyval.e = ExprResolve1(yyvsp[-1].e, yyvsp[-3].sym->value.fp, yyvsp[-3].sym->timevary);
;
break;}
case 260:
{
yyval.e = ExprResolve2(yyvsp[-3].e, yyvsp[-1].e,
yyvsp[-5].sym->value.fp,
yyvsp[-5].sym->timevary);
;
break;}
case 261:
{
yyval.e = ExprResolve3(yyvsp[-5].e, yyvsp[-3].e, yyvsp[-1].e,
yyvsp[-7].sym->value.fp,
yyvsp[-7].sym->timevary);
;
break;}
case 262:
{
yyval.e = ExprResolve4(yyvsp[-7].e, yyvsp[-5].e, yyvsp[-3].e, yyvsp[-1].e,
yyvsp[-9].sym->value.fp,
yyvsp[-9].sym->timevary);
;
break;}
case 263:
{
yyval.e = ExprResolve5(yyvsp[-9].e, yyvsp[-7].e, yyvsp[-5].e, yyvsp[-3].e, yyvsp[-1].e,
yyvsp[-11].sym->value.fp,
yyvsp[-11].sym->timevary);
;
break;}
case 264:
{
yyval.e = yyvsp[-1].e;
;
break;}
case 265:
{
yyval.e = ExprResolve2(yyvsp[-2].e, yyvsp[0].e, SumExpr, FALSE);
;
break;}
case 266:
{
yyval.e = ExprResolve2(yyvsp[-2].e, yyvsp[0].e, DiffExpr, FALSE);
;
break;}
case 267:
{
yyval.e = ExprResolve2(yyvsp[-2].e, yyvsp[0].e, MultExpr, FALSE);
;
break;}
case 268:
{
yyval.e = ExprResolve2(yyvsp[-2].e, yyvsp[0].e, DivideExpr, FALSE);
;
break;}
case 269:
{
yyval.e = ExprResolve2(yyvsp[-2].e, yyvsp[0].e, ModExpr, FALSE);
;
break;}
case 270:
{
yyval.e = ExprResolve1(yyvsp[0].e, NegateExpr, FALSE);
;
break;}
case 271:
{
yyval.e = yyvsp[0].e;
;
break;}
case 272:
{
yyval.e = ExprResolve2(yyvsp[-2].e, yyvsp[0].e, pow, FALSE);
;
break;}
case 274:
{ yyval.d = -yyvsp[0].d; ;
break;}
case 275:
{ yyval.d = yyvsp[0].d; ;
break;}
case 278:
{
yyval.sym = SymtabBuiltinFind(yyvsp[0].c);
;
break;}
}
/* the action file gets copied in in place of this dollarsign */
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#ifdef YYLSP_NEEDED
yylsp++;
if (yylen == 0)
{
yylsp->first_line = yylloc.first_line;
yylsp->first_column = yylloc.first_column;
yylsp->last_line = (yylsp-1)->last_line;
yylsp->last_column = (yylsp-1)->last_column;
yylsp->text = 0;
}
else
{
yylsp->last_line = (yylsp+yylen-1)->last_line;
yylsp->last_column = (yylsp+yylen-1)->last_column;
}
#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 */
if (! yyerrstatus)
/* If not already recovering from an error, report this error. */
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
int size = 0;
char *msg;
int x, count;
count = 0;
for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
size += strlen(yytname[x]) + 15, count++;
msg = (char *) xmalloc(size + 15);
strcpy(msg, "parse error");
if (count < 5)
{
count = 0;
for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++)
if (yycheck[x + yyn] == x)
{
strcat(msg, count == 0 ? ", expecting `" : " or `");
strcat(msg, yytname[x]);
strcat(msg, "'");
count++;
}
}
yyerror(msg,"","");
free(msg);
}
else
#endif /* YYERROR_VERBOSE */
yyerror("parse error","","");
}
yyerrlab1: /* here on error raised explicitly by an action */
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;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
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. */
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
if (yyn) goto yydefault;
#endif
yyerrpop: /* pop the current state because it cannot handle the error token */
if (yyssp == yyss) YYABORT;
yyvsp--;
yystate = *--yyssp;
#ifdef YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG != 0
if (yydebug)
{
short *ssp1 = yyss - 1;
fprintf (stderr, "Error: state stack now");
while (ssp1 != yyssp)
fprintf (stderr, " %d", *++ssp1);
fprintf (stderr, "\n");
}
#endif
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;
#if YYDEBUG != 0
if (yydebug)
fprintf(stderr, "Shifting error token, ");
#endif
*++yyvsp = yylval;
#ifdef YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
}
Geom *
NewAggregate(obj)
Geom *obj;
{
obj->name = Defstack->obj->name;
obj->next = Defstack->obj->next;
return obj;
}