home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-05-11 | 77.2 KB | 2,775 lines |
- # line 16 "yacc2.y"
- #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 */
- extern 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();
-
- # line 98 "yacc2.y"
- 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;
- # define tFLOAT 257
- # define tSTRING 258
- # define tFILENAME 259
- # define tAPERTURE 260
- # define tAPPLYSURF 261
- # define tBACKGROUND 262
- # define tBLOB 263
- # define tBLOTCH 264
- # define tBOX 265
- # define tBUMP 266
- # define tCONE 267
- # define tCYL 268
- # define tDIRECTIONAL 269
- # define tCURSURF 270
- # define tEXTENDED 271
- # define tEYEP 272
- # define tFBM 273
- # define tFBMBUMP 274
- # define tFOCALDIST 275
- # define tFOG 276
- # define tFOGDECK 277
- # define tFOV 278
- # define tGLOSS 279
- # define tGRID 280
- # define tHEIGHTFIELD 281
- # define tLIGHT 282
- # define tLIST 283
- # define tLOOKP 284
- # define tMARBLE 285
- # define tMAXDEPTH 286
- # define tMIST 287
- # define tJITTER 288
- # define tNOJITTER 289
- # define tDEFINE 290
- # define tOBJECT 291
- # define tOUTFILE 292
- # define tSKY 293
- # define tDISC 294
- # define tDIFFERENCE 295
- # define tUNION 296
- # define tINTERSECT 297
- # define tPLANE 298
- # define tPOINT 299
- # define tPOLY 300
- # define tROTATE 301
- # define tSPOT 302
- # define tPRINT 303
- # define tSCALE 304
- # define tSCREEN 305
- # define tSPHERE 306
- # define tSURFACE 307
- # define tTHRESH 308
- # define tTRANSLATE 309
- # define tTRANSFORM 310
- # define tTRIANGLE 311
- # define tTRIANGLEUV 312
- # define tUP 313
- # define tEND 314
- # define tTEXTURE 315
- # define tCHECKER 316
- # define tWOOD 317
- # define tCONTRAST 318
- # define tCUTOFF 319
- # define tCLOUD 320
- # define tAMBIENT 321
- # define tDIFFUSE 322
- # define tREFLECT 323
- # define tTRANSP 324
- # define tSPECULAR 325
- # define tSPECPOW 326
- # define tINDEX 327
- # define tATMOSPHERE 328
- # define tNOSHADOW 329
- # define tAREA 330
- # define tTRANSLU 331
- # define tTORUS 332
- # define tEYESEP 333
- # define tSHADOWTRANSP 334
- # define tREPORT 335
- # define tVERBOSE 336
- # define tQUIET 337
- # define tWINDOW 338
- # define tSTRIPE 339
- # define tMAP 340
- # define tUV 341
- # define tSPHERICAL 342
- # define tCYLINDRICAL 343
- # define tPLANAR 344
- # define tIMAGE 345
- # define tSMOOTH 346
- # define tCOMPONENT 347
- # define tTEXTSURF 348
- # define tRANGE 349
- # define tTILE 350
- # define tSTARTTIME 351
- # define tFRAMELENGTH 352
- # define tNAME 353
- # define tFILTER 354
- # define tGAUSS 355
- # define tBODY 356
- # define tSAMPLE 357
- # define tEXTINCT 358
- # define tWINDY 359
- # define tMOUNT 360
- # define tSHUTTER 361
- # define tFRAMES 362
- # define UMINUS 363
- #define yyclearin yychar = -1
- #define yyerrok yyerrflag = 0
- extern int yychar;
- extern int yyerrflag;
- #ifndef YYMAXDEPTH
- #define YYMAXDEPTH 150
- #endif
- YYSTYPE yylval, yyval;
- # define YYERRCODE 256
-
- # line 1443 "yacc2.y"
-
- /*
- * 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);
- }
-
- Geom *
- NewAggregate(obj)
- Geom *obj;
- {
- obj->name = Defstack->obj->name;
- obj->next = Defstack->obj->next;
- return obj;
- }
- int yyexca[] ={
- -1, 1,
- 0, -1,
- -2, 0,
- -1, 149,
- 321, 153,
- 322, 153,
- 323, 153,
- 324, 153,
- 325, 153,
- 326, 153,
- 327, 153,
- 329, 153,
- 331, 153,
- 356, 153,
- 358, 153,
- -2, 149,
- -1, 150,
- 321, 154,
- 322, 154,
- 323, 154,
- 324, 154,
- 325, 154,
- 326, 154,
- 327, 154,
- 329, 154,
- 331, 154,
- 356, 154,
- 358, 154,
- -2, 150,
- -1, 191,
- 258, 149,
- 321, 153,
- 322, 153,
- 323, 153,
- 324, 153,
- 325, 153,
- 326, 153,
- 327, 153,
- 329, 153,
- 331, 153,
- 356, 153,
- 358, 153,
- -2, 89,
- -1, 204,
- 258, 149,
- 259, 149,
- 321, 153,
- 322, 153,
- 323, 153,
- 324, 153,
- 325, 153,
- 326, 153,
- 327, 153,
- 329, 153,
- 331, 153,
- 356, 153,
- 358, 153,
- -2, 274,
- -1, 215,
- 40, 276,
- -2, 256,
- };
- # define YYNPROD 277
- # define YYLAST 1114
- int yyact[]={
-
- 109, 415, 386, 414, 318, 224, 319, 129, 123, 204,
- 178, 463, 137, 321, 322, 231, 194, 262, 269, 324,
- 189, 150, 225, 226, 182, 320, 452, 453, 454, 455,
- 176, 177, 178, 326, 446, 255, 256, 118, 120, 121,
- 212, 124, 125, 126, 120, 120, 254, 131, 133, 136,
- 179, 141, 133, 142, 144, 240, 317, 323, 211, 120,
- 325, 120, 184, 185, 186, 187, 180, 296, 25, 56,
- 24, 145, 165, 166, 170, 171, 167, 168, 173, 328,
- 175, 140, 174, 132, 143, 332, 297, 22, 190, 439,
- 440, 443, 444, 442, 445, 447, 252, 130, 392, 329,
- 330, 134, 348, 21, 120, 267, 73, 169, 265, 172,
- 210, 202, 139, 266, 268, 149, 344, 283, 217, 220,
- 120, 219, 222, 218, 441, 203, 164, 150, 163, 209,
- 227, 228, 229, 162, 230, 138, 115, 230, 415, 114,
- 161, 113, 160, 235, 413, 409, 411, 412, 410, 115,
- 135, 159, 114, 295, 113, 110, 158, 157, 293, 156,
- 155, 237, 154, 294, 152, 151, 136, 136, 136, 244,
- 136, 246, 247, 248, 249, 250, 223, 111, 165, 166,
- 170, 171, 167, 168, 173, 122, 175, 258, 174, 263,
- 408, 379, 331, 327, 261, 270, 277, 192, 188, 32,
- 281, 282, 31, 30, 29, 28, 285, 286, 287, 120,
- 296, 289, 27, 169, 26, 172, 153, 23, 20, 19,
- 18, 17, 16, 301, 120, 15, 14, 13, 12, 11,
- 304, 305, 10, 284, 9, 8, 7, 6, 5, 4,
- 54, 3, 97, 2, 88, 1, 92, 91, 257, 251,
- 216, 136, 264, 469, 303, 136, 136, 315, 451, 103,
- 94, 275, 102, 272, 147, 148, 146, 241, 242, 243,
- 71, 245, 68, 95, 107, 105, 106, 86, 85, 93,
- 274, 100, 99, 98, 83, 87, 53, 347, 77, 120,
- 89, 90, 75, 271, 309, 310, 273, 80, 74, 81,
- 82, 78, 358, 79, 76, 84, 67, 120, 65, 361,
- 66, 96, 70, 362, 136, 136, 365, 101, 69, 368,
- 369, 72, 371, 372, 213, 373, 374, 375, 50, 253,
- 377, 104, 57, 359, 367, 214, 215, 366, 259, 438,
- 316, 52, 387, 0, 389, 376, 0, 0, 0, 393,
- 0, 370, 312, 112, 177, 178, 313, 314, 0, 0,
- 260, 378, 397, 380, 398, 0, 112, 0, 238, 239,
- 0, 0, 401, 402, 0, 403, 404, 405, 406, 407,
- 0, 0, 0, 0, 0, 400, 0, 0, 422, 0,
- 0, 0, 0, 0, 425, 0, 0, 120, 428, 429,
- 430, 0, 431, 432, 433, 434, 435, 436, 437, 0,
- 0, 448, 0, 450, 0, 363, 364, 0, 0, 0,
- 0, 259, 259, 259, 259, 0, 460, 0, 449, 0,
- 0, 120, 465, 466, 120, 120, 0, 471, 0, 470,
- 0, 0, 0, 260, 260, 260, 260, 0, 0, 472,
- 0, 473, 0, 333, 334, 335, 336, 311, 0, 119,
- 387, 480, 479, 0, 0, 136, 120, 120, 485, 486,
- 0, 0, 120, 0, 0, 0, 0, 0, 0, 0,
- 0, 493, 0, 136, 497, 0, 498, 499, 500, 259,
- 259, 259, 259, 0, 0, 0, 0, 193, 0, 508,
- 0, 509, 0, 127, 128, 0, 387, 0, 511, 0,
- 514, 260, 260, 260, 260, 0, 0, 108, 181, 0,
- 183, 381, 382, 383, 384, 295, 311, 311, 507, 512,
- 293, 291, 513, 292, 0, 294, 0, 259, 259, 259,
- 259, 295, 298, 299, 300, 494, 293, 291, 495, 292,
- 0, 294, 116, 117, 0, 0, 0, 0, 0, 260,
- 260, 260, 260, 208, 0, 0, 482, 0, 0, 416,
- 417, 418, 419, 0, 259, 259, 0, 0, 0, 221,
- 0, 0, 296, 0, 496, 195, 196, 197, 198, 199,
- 200, 201, 0, 205, 206, 207, 260, 260, 296, 0,
- 0, 0, 0, 0, 0, 0, 456, 457, 0, 0,
- 0, 0, 0, 259, 0, 0, 350, 351, 352, 353,
- 354, 355, 356, 0, 295, 0, 0, 0, 461, 293,
- 291, 462, 292, 259, 294, 260, 0, 0, 0, 0,
- 0, 0, 0, 0, 295, 477, 0, 259, 394, 293,
- 291, 395, 292, 0, 294, 260, 0, 232, 233, 234,
- 259, 236, 191, 0, 0, 491, 259, 0, 288, 260,
- 0, 259, 0, 259, 150, 259, 0, 0, 0, 504,
- 0, 296, 260, 302, 0, 0, 0, 0, 260, 0,
- 0, 0, 510, 260, 0, 260, 0, 260, 515, 0,
- 0, 296, 0, 517, 0, 519, 0, 520, 0, 0,
- 0, 276, 0, 295, 278, 279, 280, 518, 293, 291,
- 426, 292, 0, 294, 0, 165, 166, 170, 171, 167,
- 168, 173, 0, 175, 0, 174, 165, 166, 170, 171,
- 167, 168, 173, 0, 175, 0, 174, 0, 349, 0,
- 306, 295, 0, 307, 308, 357, 293, 291, 0, 292,
- 169, 294, 172, 0, 0, 0, 360, 0, 0, 0,
- 296, 169, 295, 172, 0, 0, 290, 293, 291, 0,
- 292, 0, 294, 0, 0, 0, 0, 481, 0, 0,
- 0, 0, 0, 0, 337, 338, 339, 340, 341, 342,
- 343, 345, 0, 346, 0, 0, 0, 0, 296, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 506, 0, 0, 0, 0, 0, 0, 0, 0, 296,
- 0, 0, 0, 0, 0, 0, 0, 0, 516, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 427, 0, 385, 0,
- 388, 0, 0, 0, 390, 391, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 396, 0,
- 97, 0, 88, 399, 92, 91, 0, 0, 0, 0,
- 464, 0, 0, 467, 468, 0, 0, 103, 94, 0,
- 102, 0, 0, 420, 421, 0, 0, 423, 71, 424,
- 0, 95, 107, 105, 106, 86, 0, 93, 0, 0,
- 0, 0, 0, 87, 0, 483, 484, 0, 89, 90,
- 0, 487, 0, 0, 0, 0, 0, 0, 458, 459,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 474, 475, 476, 0, 0, 478, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 488, 489, 490, 0, 0, 492, 0, 0,
- 0, 0, 0, 0, 0, 0, 501, 502, 503, 0,
- 505, 40, 54, 48, 97, 0, 88, 0, 92, 91,
- 0, 0, 0, 33, 0, 0, 41, 0, 0, 36,
- 0, 103, 94, 51, 102, 34, 0, 43, 0, 0,
- 0, 59, 71, 55, 0, 95, 107, 105, 106, 86,
- 0, 93, 0, 0, 64, 0, 37, 87, 53, 0,
- 0, 0, 89, 90, 35, 0, 0, 0, 0, 46,
- 47, 0, 0, 0, 0, 0, 0, 0, 0, 58,
- 0, 0, 0, 96, 42, 49, 39, 0, 0, 38,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 61, 63, 57, 45, 0, 0, 44, 0,
- 0, 0, 62, 60 };
- int yypact[]={
-
- -1000, 751, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, -1000, -1000, 109, 109, 109, 109, 109, 109, -328,
- 109, 109, 109, 109, 109, -258, 109, 109, 109, -1000,
- -317, 109, -218, -204, -143, -227, -1000, -208, 109, -234,
- 109, 109, 109, 109, 109, -1000, -1000, -1000, -1000, -1000,
- -1000, 404, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, -1000, -1000, -143, -143, -143, -143,
- -143, -143, -143, -143, -249, -143, -143, -143, -1000, -1000,
- -1000, -1000, -1000, 109, -1000, -1000, -1000, -1000, -1000, 109,
- -1000, -1000, -1000, -199, -217, 78, -1000, -1000, 109, 109,
- -1000, 109, -332, -1000, -1000, -1000, -1000, -1000, -266, 109,
- 109, 109, -1000, 109, -1000, -1000, 109, -1000, -306, 109,
- 109, 109, 109, 109, -143, -1000, -1000, -1000, -1000, -1000,
- -1000, 415, 415, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, -1000, 109, 109, 109, 109, 109,
- 109, 109, 109, 109, 109, -1000, -1000, -1000, -1000, 617,
- -241, -1000, 109, -1000, -1000, -1000, -1000, -1000, -298, -196,
- -240, -1000, -21, 109, -1000, 109, 109, 109, 109, 109,
- 109, -1000, -227, -1000, -1000, 109, 109, 109, 109, -196,
- 109, -1000, -1000, 735, -1000, -1000, 46, 78, 78, 78,
- -1000, -1000, 109, 96, -1000, -1000, -1000, -1000, -1000, 109,
- 109, -1000, 109, -1000, -1000, 109, 109, -1000, -1000, -1000,
- 415, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
- 109, -1000, -1000, -1000, 109, 109, 109, -241, -1000, -1000,
- -1000, -1000, -260, -1000, -1000, 109, 109, 109, 109, -1000,
- -1000, -1000, -1000, -1000, -1000, -1000, 109, 109, 109, 109,
- 109, 109, 109, 109, -1000, 109, 109, -1000, 109, -1000,
- -1000, 78, 78, 78, 78, 78, 78, 78, 714, -27,
- -27, 109, -227, -1000, -1000, -1000, 109, -1000, 109, 415,
- 415, -1000, 109, 109, 109, 109, -1000, -143, 109, 109,
- -227, 109, 109, -1000, 109, 109, 109, -1000, -143, 109,
- -227, -1000, -227, 109, 109, 109, 109, -1000, -1000, -1000,
- 109, 109, 109, 109, -1000, -1000, 109, 109, 109, -1000,
- 116, 116, -27, -27, -27, -27, 607, -1000, -1000, -1000,
- 109, 109, -1000, 109, -1000, 109, -196, -1000, -143, -1000,
- -1000, 109, 109, -1000, 109, 109, 109, 109, 109, -202,
- -1000, 109, 109, 109, 109, 109, 109, 109, -1000, 109,
- -1000, 109, -1000, 109, -1000, 78, 109, 109, 109, 109,
- -1000, 109, 109, 109, 109, 109, 109, 109, -1000, -232,
- 109, -143, 109, -1000, -1000, -315, -1000, -1000, 109, 109,
- 109, 109, -1000, -1000, -1000, 109, 587, -318, -1000, -1000,
- 109, 109, 109, 109, 109, -339, 109, -1000, -1000, -1000,
- -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 109, -1000,
- 109, -1000, -1000, 109, 109, 109, -1000, 109, 109, 109,
- 109, -1000, 78, -1000, 109, 109, 109, 109, 109, -1000,
- -1000, 109, -1000, -1000, 109, 109, 109, 109, -1000, 109,
- 109, 504, 109, 109, -1000, 109, 109, 109, 109, 109,
- 109, 109, 109, -1000, -1000, 78, -1000, -227, 109, -1000,
- 109, -1000, -1000, -1000, 109, 109, 488, -1000, -1000, 109,
- 109, -1000, -1000, 78, -1000, 109, 676, 109, -1000, 109,
- -1000 };
- int yypgo[]={
-
- 0, 30, 187, 324, 177, 0, 155, 517, 2, 101,
- 83, 341, 340, 339, 459, 331, 329, 328, 321, 318,
- 69, 317, 312, 310, 308, 306, 305, 304, 303, 301,
- 300, 299, 298, 297, 292, 288, 284, 283, 282, 281,
- 278, 272, 16, 497, 266, 265, 264, 3, 258, 253,
- 252, 250, 245, 243, 241, 239, 238, 237, 236, 235,
- 234, 232, 229, 228, 227, 226, 225, 222, 221, 220,
- 219, 218, 103, 87, 217, 70, 68, 214, 212, 205,
- 204, 203, 202, 199, 198, 20, 197, 195, 194, 193,
- 192, 191, 190, 189, 185, 176, 165, 216, 55, 164,
- 162, 160, 159, 157, 156, 151, 142, 140, 133, 128,
- 126, 117, 116, 106, 102, 98, 66, 96 };
- int yyr1[]={
-
- 0, 52, 52, 53, 53, 53, 53, 53, 53, 53,
- 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
- 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
- 53, 53, 53, 75, 20, 24, 23, 23, 25, 25,
- 19, 18, 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 76, 86, 86, 87, 87, 87, 87, 84,
- 84, 88, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 89, 90,
- 91, 91, 92, 92, 92, 92, 92, 92, 41, 41,
- 85, 85, 93, 50, 50, 50, 50, 50, 54, 55,
- 56, 57, 57, 65, 65, 65, 66, 66, 66, 66,
- 80, 79, 82, 81, 67, 68, 58, 59, 60, 60,
- 60, 60, 94, 94, 95, 95, 61, 62, 63, 64,
- 69, 70, 71, 71, 71, 71, 71, 17, 17, 17,
- 17, 17, 11, 73, 43, 43, 42, 42, 42, 44,
- 44, 46, 46, 96, 99, 45, 72, 72, 98, 98,
- 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
- 97, 100, 101, 102, 104, 107, 103, 105, 106, 108,
- 109, 110, 31, 31, 33, 111, 111, 112, 22, 113,
- 40, 37, 37, 37, 38, 39, 21, 15, 15, 15,
- 28, 29, 34, 30, 27, 35, 35, 35, 32, 36,
- 26, 114, 114, 115, 74, 77, 77, 116, 116, 117,
- 16, 16, 16, 9, 7, 8, 49, 49, 47, 48,
- 48, 48, 48, 48, 48, 48, 13, 13, 13, 13,
- 13, 13, 13, 13, 13, 10, 10, 83, 78, 14,
- 5, 5, 2, 2, 4, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 6, 6, 6, 1, 1, 51 };
- int yyr2[]={
-
- 0, 0, 4, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 3, 5, 5, 3, 2, 2, 2,
- 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 7, 4, 0, 2, 2, 2, 2, 4,
- 0, 7, 5, 7, 5, 3, 5, 15, 17, 13,
- 3, 5, 17, 15, 3, 11, 19, 9, 4, 5,
- 4, 0, 5, 7, 5, 7, 3, 3, 7, 5,
- 4, 1, 3, 9, 9, 11, 21, 27, 7, 5,
- 5, 7, 5, 7, 7, 5, 7, 5, 7, 5,
- 5, 5, 5, 5, 9, 5, 7, 11, 11, 9,
- 9, 6, 3, 0, 3, 0, 5, 5, 5, 5,
- 5, 3, 3, 5, 7, 15, 17, 7, 7, 9,
- 11, 15, 5, 5, 2, 1, 2, 2, 2, 3,
- 3, 7, 7, 3, 3, 5, 7, 5, 4, 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 9, 3, 7, 5, 7, 0, 4, 3, 3, 7,
- 3, 2, 2, 2, 3, 9, 3, 3, 3, 3,
- 13, 11, 9, 11, 9, 11, 17, 23, 9, 13,
- 9, 0, 4, 11, 5, 5, 7, 4, 0, 3,
- 11, 7, 17, 7, 7, 5, 2, 1, 5, 3,
- 3, 9, 3, 9, 3, 9, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 2, 5, 7, 3,
- 2, 3, 3, 2, 7, 3, 3, 9, 13, 17,
- 21, 25, 7, 7, 7, 7, 7, 7, 5, 5,
- 7, 2, 5, 5, 2, 2, 3 };
- int yychk[]={
-
- -1000, -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, 272, 284, 313, 278, 305, 338, 335,
- 260, 275, 333, 286, 357, 354, 318, 319, 262, 334,
- -17, 282, -11, 307, 261, 292, -20, 353, 328, 290,
- 362, 351, 361, 352, 303, -24, -23, -25, -41, -19,
- -22, 291, -18, -113, -32, -34, -27, -35, -29, -28,
- -33, -31, -30, -36, -26, -40, 298, 306, 265, 311,
- 312, 268, 267, 300, 281, 294, 332, 263, -37, -38,
- -39, -21, 283, 280, -15, 296, 297, 295, -7, -5,
- -6, -4, 257, 45, 43, 40, -7, -7, -5, -14,
- -5, -5, -94, 336, -5, -5, -5, -14, -14, 265,
- 355, -5, -10, -5, -9, -9, -5, 329, -10, 330,
- 299, 269, 271, 302, 258, -42, -44, -46, -45, 258,
- 270, -96, -99, -97, -100, -101, -102, -103, -104, -105,
- -106, -107, -108, -109, -110, 321, 322, 325, 326, 356,
- 323, 324, 358, 327, 331, 329, -1, 258, 259, 258,
- -116, -14, 258, -14, -5, -5, -5, -5, -84, -85,
- -42, 258, -86, -43, -42, -43, -43, -43, -43, -43,
- -43, -43, -42, -1, 258, -43, -43, -43, -14, -85,
- -5, 257, 257, -3, 257, 258, -51, 40, 45, 43,
- -5, -14, -5, -95, 337, 288, 289, -5, -5, -5,
- -5, 321, -7, -7, -7, -5, -7, -42, -97, -97,
- -98, -9, -9, -9, -5, -9, -5, -5, -5, -5,
- -5, -20, -117, -16, 287, 276, 277, -116, -2, -6,
- -4, -88, 315, -93, -50, 304, 309, 301, 310, 258,
- -87, 314, -75, -72, -73, -76, -7, -5, -7, -7,
- -7, -5, -5, -111, -1, -5, -5, -5, -14, -5,
- 41, 43, 45, 42, 47, 37, 94, 40, -3, -3,
- -3, -5, -14, -1, -5, -5, -7, -7, -7, -98,
- -98, -97, -9, -9, -9, -5, -12, 316, 264, 266,
- 285, 273, 274, 317, 279, 320, 293, -89, 339, 359,
- 360, -90, 345, -2, -2, -2, -2, -7, -7, -7,
- -7, -7, -7, -7, -112, -7, -7, -5, -114, -14,
- -3, -3, -3, -3, -3, -3, -3, 41, -5, -1,
- -14, -5, -5, -9, -9, -5, -85, -42, -5, -5,
- -1, -5, -5, -5, -5, -5, -42, -5, -1, -91,
- -1, -2, -2, -2, -2, -7, -8, -5, -7, -5,
- -7, -7, -115, -5, 41, 44, -7, -5, -5, -7,
- -42, -5, -5, -5, -5, -5, -5, -5, -92, 347,
- 350, 348, 349, 346, -47, 340, -2, -2, -2, -2,
- -7, -7, -5, -7, -7, -5, -3, -14, -5, -5,
- -5, -5, -5, -5, -5, -5, -5, -5, -13, 321,
- 322, 356, 325, 323, 324, 326, 266, 327, -5, -42,
- -5, -48, 341, 342, 343, 344, -2, -2, -7, -7,
- -5, 41, 44, 329, -14, -5, -5, -14, -14, -49,
- -47, -5, -5, -5, -7, -7, -7, -2, -7, -8,
- -5, -3, -9, -14, -14, -5, -5, -14, -7, -7,
- -7, -2, -7, -5, 41, 44, -9, -5, -5, -5,
- -5, -7, -7, -7, -2, -7, -3, -1, -5, -5,
- -2, -8, 41, 44, -5, -2, -3, -2, 41, -2,
- -2 };
- int yydef[]={
-
- 1, -2, 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, 0, 0, 0, 0, 0, 0, 123,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 131,
- 132, 0, 0, 0, 0, 0, 33, 0, 218, 0,
- 0, 0, 0, 0, 0, 60, 91, 36, 37, 38,
- 39, 0, 40, 188, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 54, 145, 145, 145, 145,
- 145, 145, 145, 145, 0, 145, 145, 145, 190, 191,
- 192, 193, 194, 0, 196, 197, 198, 199, 91, 0,
- 250, 251, 271, 0, 0, 0, 99, 100, 102, 0,
- 249, 0, 125, 122, 126, 127, 128, 129, 105, 107,
- 109, 0, 115, 245, 246, 130, 0, 133, 142, 0,
- 0, 0, 0, 0, 157, 143, 146, 147, 148, -2,
- -2, 0, 0, 159, 160, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 181, 214, 274, 275, 0,
- 215, 218, 0, 111, 110, 113, 112, 247, 34, 35,
- 0, -2, 0, 0, 144, 0, 0, 0, 0, 0,
- 0, 185, 0, 183, -2, 0, 0, 0, 0, 98,
- 0, 272, 273, 0, 255, -2, 0, 0, 0, 0,
- 101, 116, 0, 121, 124, 103, 104, 106, 108, 0,
- 0, 134, 0, 137, 138, 0, 0, 156, 159, 159,
- 155, 171, 172, 173, 176, 174, 177, 178, 175, 179,
- 0, 52, 217, 219, 0, 0, 0, 216, 248, 252,
- 253, 59, 0, 90, 92, 0, 0, 0, 0, 88,
- 53, 189, 55, 56, 57, 58, 0, 0, 0, 0,
- 0, 0, 0, 184, 182, 0, 0, 211, 0, 224,
- 254, 0, 0, 0, 0, 0, 0, 0, 0, 268,
- 269, 0, 119, 120, 114, 223, 0, 139, 0, 151,
- 152, 158, 0, 0, 0, 0, 91, 0, 0, 0,
- 65, 0, 0, 70, 0, 0, 0, 74, 0, 0,
- 0, 81, 0, 0, 0, 0, 0, 208, 202, 204,
- 0, 0, 0, 0, 186, 187, 0, 0, 210, 195,
- 263, 264, 265, 266, 267, 270, 0, 262, 117, 118,
- 0, 140, 180, 0, 221, 0, 61, 62, 0, 64,
- 66, 0, 0, 71, 0, 0, 0, 0, 0, 78,
- 79, 0, 0, 0, 0, 205, 0, 0, 201, 0,
- 203, 0, 212, 0, 257, 0, 0, 0, 0, 0,
- 63, 0, 0, 0, 0, 0, 0, 0, 80, 0,
- 0, 0, 0, 86, 87, 0, 93, 94, 0, 0,
- 0, 0, 225, 200, 209, 0, 0, 135, 141, 220,
- 0, 0, 0, 0, 0, 227, 0, 77, 82, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 0, 84,
- 0, 228, 229, 230, 232, 234, 95, 0, 0, 0,
- 0, 258, 0, 136, 0, 0, 0, 0, 0, 75,
- 226, 0, 83, 85, 0, 0, 0, 0, 206, 0,
- 0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
- 0, 0, 0, 213, 259, 0, 222, 67, 0, 73,
- 0, 231, 233, 235, 0, 0, 0, 68, 72, 0,
- 0, 207, 260, 0, 76, 96, 0, 0, 261, 0,
- 97 };
- typedef struct { char *t_name; int t_val; } yytoktype;
- #ifndef YYDEBUG
- # define YYDEBUG 0 /* don't allow debugging */
- #endif
-
- #if YYDEBUG
-
- yytoktype yytoks[] =
- {
- "tFLOAT", 257,
- "tSTRING", 258,
- "tFILENAME", 259,
- "tAPERTURE", 260,
- "tAPPLYSURF", 261,
- "tBACKGROUND", 262,
- "tBLOB", 263,
- "tBLOTCH", 264,
- "tBOX", 265,
- "tBUMP", 266,
- "tCONE", 267,
- "tCYL", 268,
- "tDIRECTIONAL", 269,
- "tCURSURF", 270,
- "tEXTENDED", 271,
- "tEYEP", 272,
- "tFBM", 273,
- "tFBMBUMP", 274,
- "tFOCALDIST", 275,
- "tFOG", 276,
- "tFOGDECK", 277,
- "tFOV", 278,
- "tGLOSS", 279,
- "tGRID", 280,
- "tHEIGHTFIELD", 281,
- "tLIGHT", 282,
- "tLIST", 283,
- "tLOOKP", 284,
- "tMARBLE", 285,
- "tMAXDEPTH", 286,
- "tMIST", 287,
- "tJITTER", 288,
- "tNOJITTER", 289,
- "tDEFINE", 290,
- "tOBJECT", 291,
- "tOUTFILE", 292,
- "tSKY", 293,
- "tDISC", 294,
- "tDIFFERENCE", 295,
- "tUNION", 296,
- "tINTERSECT", 297,
- "tPLANE", 298,
- "tPOINT", 299,
- "tPOLY", 300,
- "tROTATE", 301,
- "tSPOT", 302,
- "tPRINT", 303,
- "tSCALE", 304,
- "tSCREEN", 305,
- "tSPHERE", 306,
- "tSURFACE", 307,
- "tTHRESH", 308,
- "tTRANSLATE", 309,
- "tTRANSFORM", 310,
- "tTRIANGLE", 311,
- "tTRIANGLEUV", 312,
- "tUP", 313,
- "tEND", 314,
- "tTEXTURE", 315,
- "tCHECKER", 316,
- "tWOOD", 317,
- "tCONTRAST", 318,
- "tCUTOFF", 319,
- "tCLOUD", 320,
- "tAMBIENT", 321,
- "tDIFFUSE", 322,
- "tREFLECT", 323,
- "tTRANSP", 324,
- "tSPECULAR", 325,
- "tSPECPOW", 326,
- "tINDEX", 327,
- "tATMOSPHERE", 328,
- "tNOSHADOW", 329,
- "tAREA", 330,
- "tTRANSLU", 331,
- "tTORUS", 332,
- "tEYESEP", 333,
- "tSHADOWTRANSP", 334,
- "tREPORT", 335,
- "tVERBOSE", 336,
- "tQUIET", 337,
- "tWINDOW", 338,
- "tSTRIPE", 339,
- "tMAP", 340,
- "tUV", 341,
- "tSPHERICAL", 342,
- "tCYLINDRICAL", 343,
- "tPLANAR", 344,
- "tIMAGE", 345,
- "tSMOOTH", 346,
- "tCOMPONENT", 347,
- "tTEXTSURF", 348,
- "tRANGE", 349,
- "tTILE", 350,
- "tSTARTTIME", 351,
- "tFRAMELENGTH", 352,
- "tNAME", 353,
- "tFILTER", 354,
- "tGAUSS", 355,
- "tBODY", 356,
- "tSAMPLE", 357,
- "tEXTINCT", 358,
- "tWINDY", 359,
- "tMOUNT", 360,
- "tSHUTTER", 361,
- "tFRAMES", 362,
- "+", 43,
- "-", 45,
- "*", 42,
- "/", 47,
- "%", 37,
- "UMINUS", 363,
- "^", 94,
- "-unknown-", -1 /* ends search */
- };
-
- char * yyreds[] =
- {
- "-no such reduction-",
- "Items : /* empty */",
- "Items : Items Item",
- "Item : Eyep",
- "Item : Lookp",
- "Item : Up",
- "Item : Fov",
- "Item : Screen",
- "Item : Window",
- "Item : Report",
- "Item : Aperture",
- "Item : Focaldist",
- "Item : Eyesep",
- "Item : Maxdepth",
- "Item : Sample",
- "Item : Filter",
- "Item : Contrast",
- "Item : Cutoff",
- "Item : Background",
- "Item : Shadowtransp",
- "Item : Light",
- "Item : SurfDef",
- "Item : CurSurf",
- "Item : Outfile",
- "Item : Instance",
- "Item : NameObject",
- "Item : GlobalEffects",
- "Item : Define",
- "Item : Frames",
- "Item : Starttime",
- "Item : Shutter",
- "Item : Framelength",
- "Item : Print",
- "Instance : TransTextObj",
- "TransTextObj : TransObj Textures",
- "TransObj : Object Transforms",
- "Object : ObjType",
- "Object : NamedObject",
- "ObjType : Primitive",
- "ObjType : Aggregate",
- "Primitive : PrimType",
- "PrimType : Plane",
- "PrimType : Sphere",
- "PrimType : Box",
- "PrimType : Triangle",
- "PrimType : Cylinder",
- "PrimType : Cone",
- "PrimType : Poly",
- "PrimType : HeightField",
- "PrimType : Disc",
- "PrimType : Torus",
- "PrimType : Blob",
- "NameObject : tNAME tSTRING TransTextObj",
- "Aggdefs : Aggdefs Aggdef",
- "Aggdefs : /* empty */",
- "Aggdef : Instance",
- "Aggdef : SurfDef",
- "Aggdef : CurSurf",
- "Aggdef : NameObject",
- "Textures : Textures Texture",
- "Textures : /* empty */",
- "Texture : tTEXTURE Texturetype Transforms",
- "Texturetype : tCHECKER Surface",
- "Texturetype : tBLOTCH Expr Surface",
- "Texturetype : tBUMP Expr",
- "Texturetype : tMARBLE",
- "Texturetype : tMARBLE Filename",
- "Texturetype : tFBM Expr Expr Expr Expr IExpr Expr",
- "Texturetype : tFBM Expr Expr Expr Expr IExpr Expr Filename",
- "Texturetype : tFBMBUMP Expr Expr Expr Expr IExpr",
- "Texturetype : tWOOD",
- "Texturetype : tGLOSS Expr",
- "Texturetype : tCLOUD Expr Expr Expr IExpr Expr Expr Expr",
- "Texturetype : tSKY Expr Expr Expr IExpr Expr Expr",
- "Texturetype : ImageText",
- "Texturetype : tSTRIPE Surface Expr Expr OptMapping",
- "Texturetype : tWINDY Expr Expr Expr Expr IExpr Expr Expr Expr",
- "Texturetype : tMOUNT Filename Expr Expr",
- "ImageText : ImageTextType ImageTextOptions",
- "ImageTextType : tIMAGE Filename",
- "ImageTextOptions : ImageTextOptions ImageTextOption",
- "ImageTextOptions : /* empty */",
- "ImageTextOption : tCOMPONENT SurfCompName",
- "ImageTextOption : tTILE Expr Expr",
- "ImageTextOption : tTEXTSURF Surface",
- "ImageTextOption : tRANGE Expr Expr",
- "ImageTextOption : tSMOOTH",
- "ImageTextOption : Mapping",
- "NamedObject : tOBJECT Surface tSTRING",
- "NamedObject : tOBJECT tSTRING",
- "Transforms : Transforms PostTransform",
- "Transforms : /* empty */",
- "PostTransform : TransformType",
- "TransformType : tSCALE AnimExpr AnimExpr AnimExpr",
- "TransformType : tTRANSLATE AnimExpr AnimExpr AnimExpr",
- "TransformType : tROTATE AnimExpr AnimExpr AnimExpr AnimExpr",
- "TransformType : tTRANSFORM AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr",
- "TransformType : tTRANSFORM AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr",
- "Eyep : tEYEP Vector Transforms",
- "Lookp : tLOOKP Vector",
- "Up : tUP Vector",
- "Fov : tFOV Expr Expr",
- "Fov : tFOV Expr",
- "Sample : tSAMPLE IExpr tJITTER",
- "Sample : tSAMPLE IExpr tNOJITTER",
- "Sample : tSAMPLE IExpr",
- "Filter : tFILTER tBOX Expr",
- "Filter : tFILTER tBOX",
- "Filter : tFILTER tGAUSS Expr",
- "Filter : tFILTER tGAUSS",
- "Starttime : tSTARTTIME Expr",
- "Frames : tFRAMES IExpr",
- "Framelength : tFRAMELENGTH Expr",
- "Shutter : tSHUTTER Expr",
- "Contrast : tCONTRAST Expr Expr Expr",
- "Cutoff : tCUTOFF Intensity",
- "Screen : tSCREEN IExpr IExpr",
- "Window : tWINDOW Expr Expr Expr Expr",
- "Report : tREPORT Verbose Quiet IExpr Filename",
- "Report : tREPORT Verbose Quiet IExpr",
- "Report : tREPORT Verbose Quiet Filename",
- "Report : tREPORT Verbose Quiet",
- "Verbose : tVERBOSE",
- "Verbose : /* empty */",
- "Quiet : tQUIET",
- "Quiet : /* empty */",
- "Aperture : tAPERTURE Expr",
- "Focaldist : tFOCALDIST Expr",
- "Eyesep : tEYESEP Expr",
- "Maxdepth : tMAXDEPTH IExpr",
- "Background : tBACKGROUND Color",
- "Shadowtransp : tSHADOWTRANSP",
- "Light : LightType",
- "Light : LightType tNOSHADOW",
- "Light : tLIGHT Intensity tAMBIENT",
- "Light : Lightdef tAREA Vector Vector IExpr Vector IExpr",
- "Light : Lightdef tAREA Vector Vector IExpr Vector IExpr tNOSHADOW",
- "LightType : Lightdef tPOINT Vector",
- "LightType : Lightdef tDIRECTIONAL Vector",
- "LightType : Lightdef tEXTENDED Expr Vector",
- "LightType : Lightdef tSPOT Vector Vector Expr",
- "LightType : Lightdef tSPOT Vector Vector Expr Expr Expr",
- "Lightdef : tLIGHT Intensity",
- "CurSurf : tAPPLYSURF Surface",
- "OptSurface : Surface",
- "OptSurface : /* empty */",
- "Surface : NamedSurf",
- "Surface : ModifyNamedSurf",
- "Surface : SurfSpec",
- "NamedSurf : tSTRING",
- "NamedSurf : tCURSURF",
- "ModifyNamedSurf : CopyNamedSurf SurfComponent SurfComponents",
- "ModifyNamedSurf : CopyCurSurf SurfComponent SurfComponents",
- "CopyNamedSurf : tSTRING",
- "CopyCurSurf : tCURSURF",
- "SurfSpec : SurfComponent SurfComponents",
- "SurfDef : tSURFACE tSTRING Surface",
- "SurfDef : tSURFACE tSTRING",
- "SurfComponents : SurfComponents SurfComponent",
- "SurfComponents : /* empty */",
- "SurfComponent : Ambient",
- "SurfComponent : Diffuse",
- "SurfComponent : Specular",
- "SurfComponent : Specpow",
- "SurfComponent : Body",
- "SurfComponent : Reflect",
- "SurfComponent : Transp",
- "SurfComponent : Extinct",
- "SurfComponent : Index",
- "SurfComponent : Translu",
- "SurfComponent : Noshadow",
- "Ambient : tAMBIENT Color",
- "Diffuse : tDIFFUSE Color",
- "Specular : tSPECULAR Color",
- "Body : tBODY Color",
- "Extinct : tEXTINCT Expr",
- "Specpow : tSPECPOW Expr",
- "Reflect : tREFLECT Expr",
- "Transp : tTRANSP Expr",
- "Index : tINDEX Expr",
- "Translu : tTRANSLU Expr Color Expr",
- "Noshadow : tNOSHADOW",
- "HeightField : tHEIGHTFIELD Surface Filename",
- "HeightField : tHEIGHTFIELD Filename",
- "Poly : tPOLY OptSurface Polypoints",
- "Polypoints : /* empty */",
- "Polypoints : Polypoints Polypoint",
- "Polypoint : Vector",
- "Aggregate : AggregateDef",
- "AggregateDef : AggregateCreate Aggdefs tEND",
- "AggregateCreate : AggregateType",
- "AggregateType : List",
- "AggregateType : Grid",
- "AggregateType : Csg",
- "List : tLIST",
- "Grid : tGRID IExpr IExpr IExpr",
- "Csg : CombineOp",
- "CombineOp : tUNION",
- "CombineOp : tINTERSECT",
- "CombineOp : tDIFFERENCE",
- "Cone : tCONE OptSurface Expr Vector Expr Vector",
- "Cylinder : tCYL OptSurface Expr Vector Vector",
- "Sphere : tSPHERE OptSurface Expr Vector",
- "Disc : tDISC OptSurface Expr Vector Vector",
- "Box : tBOX OptSurface Vector Vector",
- "Triangle : tTRIANGLE OptSurface Vector Vector Vector",
- "Triangle : tTRIANGLE OptSurface Vector Vector Vector Vector Vector Vector",
- "Triangle : tTRIANGLEUV OptSurface Vector Vector Vec2d Vector Vector Vec2d Vector Vector Vec2d",
- "Plane : tPLANE OptSurface Vector Vector",
- "Torus : tTORUS OptSurface Expr Expr Vector Vector",
- "Blob : tBLOB OptSurface Expr MetaPoints",
- "MetaPoints : /* empty */",
- "MetaPoints : MetaPoints MetaPoint",
- "MetaPoint : Expr Expr Expr Expr Expr",
- "Outfile : tOUTFILE Filename",
- "GlobalEffects : tATMOSPHERE Effects",
- "GlobalEffects : tATMOSPHERE IExpr Effects",
- "Effects : Effects Effect",
- "Effects : /* empty */",
- "Effect : EffectType",
- "EffectType : tMIST Color Color Expr Expr",
- "EffectType : tFOG Color Color",
- "EffectType : tFOGDECK Expr Expr Vector Expr IExpr Color Color",
- "Color : Expr Expr Expr",
- "Vector : Expr Expr Expr",
- "Vec2d : Expr Expr",
- "OptMapping : Mapping",
- "OptMapping : /* empty */",
- "Mapping : tMAP MapMethod",
- "MapMethod : tUV",
- "MapMethod : tSPHERICAL",
- "MapMethod : tSPHERICAL Vector Vector Vector",
- "MapMethod : tCYLINDRICAL",
- "MapMethod : tCYLINDRICAL Vector Vector Vector",
- "MapMethod : tPLANAR",
- "MapMethod : tPLANAR Vector Vector Vector",
- "SurfCompName : tAMBIENT",
- "SurfCompName : tDIFFUSE",
- "SurfCompName : tBODY",
- "SurfCompName : tSPECULAR",
- "SurfCompName : tREFLECT",
- "SurfCompName : tTRANSP",
- "SurfCompName : tSPECPOW",
- "SurfCompName : tBUMP",
- "SurfCompName : tINDEX",
- "Intensity : Expr",
- "Intensity : Color",
- "Print : tPRINT Expr",
- "Define : tDEFINE tSTRING AnimExpr",
- "IExpr : Expr",
- "Expr : Float",
- "Expr : ParenExpr",
- "AnimExpr : Float",
- "AnimExpr : ParenExpr",
- "ParenExpr : '(' MExpr ')'",
- "MExpr : tFLOAT",
- "MExpr : tSTRING",
- "MExpr : Symtabent '(' MExpr ')'",
- "MExpr : Symtabent '(' MExpr ',' MExpr ')'",
- "MExpr : Symtabent '(' MExpr ',' MExpr ',' MExpr ')'",
- "MExpr : Symtabent '(' MExpr ',' MExpr ',' MExpr ',' MExpr ')'",
- "MExpr : Symtabent '(' MExpr ',' MExpr ',' MExpr ',' MExpr ',' MExpr ')'",
- "MExpr : '(' MExpr ')'",
- "MExpr : MExpr '+' MExpr",
- "MExpr : MExpr '-' MExpr",
- "MExpr : MExpr '*' MExpr",
- "MExpr : MExpr '/' MExpr",
- "MExpr : MExpr '%' MExpr",
- "MExpr : '-' MExpr",
- "MExpr : '+' MExpr",
- "MExpr : MExpr '^' MExpr",
- "Float : tFLOAT",
- "Float : '-' tFLOAT",
- "Float : '+' tFLOAT",
- "Filename : tSTRING",
- "Filename : tFILENAME",
- "Symtabent : tSTRING",
- };
- #endif /* YYDEBUG */
- #line 1 "/usr/lib/yaccpar"
- /* @(#)yaccpar 1.10 89/04/04 SMI; from S5R3 1.10 */
-
- /*
- ** Skeleton parser driver for yacc output
- */
-
- /*
- ** yacc user known macros and defines
- */
- #define YYERROR goto yyerrlab
- #define YYACCEPT { free(yys); free(yyv); return(0); }
- #define YYABORT { free(yys); free(yyv); return(1); }
- #define YYBACKUP( newtoken, newvalue )\
- {\
- if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
- {\
- yyerror( "syntax error - cannot backup" );\
- goto yyerrlab;\
- }\
- yychar = newtoken;\
- yystate = *yyps;\
- yylval = newvalue;\
- goto yynewstate;\
- }
- #define YYRECOVERING() (!!yyerrflag)
- #ifndef YYDEBUG
- # define YYDEBUG 1 /* make debugging available */
- #endif
-
- /*
- ** user known globals
- */
- int yydebug; /* set to 1 to get debugging */
-
- /*
- ** driver internal defines
- */
- #define YYFLAG (-1000)
-
- /*
- ** static variables used by the parser
- */
- static YYSTYPE *yyv; /* value stack */
- static int *yys; /* state stack */
-
- static YYSTYPE *yypv; /* top of value stack */
- static int *yyps; /* top of state stack */
-
- static int yystate; /* current state */
- static int yytmp; /* extra var (lasts between blocks) */
-
- int yynerrs; /* number of errors */
-
- int yyerrflag; /* error recovery flag */
- int yychar; /* current input token number */
-
-
- /*
- ** yyparse - return 0 if worked, 1 if syntax error not recovered from
- */
- int
- yyparse()
- {
- register YYSTYPE *yypvt; /* top of value stack for $vars */
- unsigned yymaxdepth = YYMAXDEPTH;
-
- /*
- ** Initialize externals - yyparse may be called more than once
- */
- yyv = (YYSTYPE*)malloc(yymaxdepth*sizeof(YYSTYPE));
- yys = (int*)malloc(yymaxdepth*sizeof(int));
- if (!yyv || !yys)
- {
- yyerror( "out of memory" );
- return(1);
- }
- yypv = &yyv[-1];
- yyps = &yys[-1];
- yystate = 0;
- yytmp = 0;
- yynerrs = 0;
- yyerrflag = 0;
- yychar = -1;
-
- goto yystack;
- {
- register YYSTYPE *yy_pv; /* top of value stack */
- register int *yy_ps; /* top of state stack */
- register int yy_state; /* current state */
- register int yy_n; /* internal state number info */
-
- /*
- ** get globals into registers.
- ** branch to here only if YYBACKUP was called.
- */
- yynewstate:
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
- goto yy_newstate;
-
- /*
- ** get globals into registers.
- ** either we just started, or we just finished a reduction
- */
- yystack:
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
-
- /*
- ** top of for (;;) loop while no reductions done
- */
- yy_stack:
- /*
- ** put a state and value onto the stacks
- */
- #if YYDEBUG
- /*
- ** if debugging, look up token value in list of value vs.
- ** name pairs. 0 and negative (-1) are special values.
- ** Note: linear search is used since time is not a real
- ** consideration while debugging.
- */
- if ( yydebug )
- {
- register int yy_i;
-
- (void)printf( "State %d, token ", yy_state );
- if ( yychar == 0 )
- (void)printf( "end-of-file\n" );
- else if ( yychar < 0 )
- (void)printf( "-none-\n" );
- else
- {
- for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val == yychar )
- break;
- }
- (void)printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
- #endif /* YYDEBUG */
- if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */
- {
- /*
- ** reallocate and recover. Note that pointers
- ** have to be reset, or bad things will happen
- */
- int yyps_index = (yy_ps - yys);
- int yypv_index = (yy_pv - yyv);
- int yypvt_index = (yypvt - yyv);
- yymaxdepth += YYMAXDEPTH;
- yyv = (YYSTYPE*)realloc((char*)yyv,
- yymaxdepth * sizeof(YYSTYPE));
- yys = (int*)realloc((char*)yys,
- yymaxdepth * sizeof(int));
- if (!yyv || !yys)
- {
- yyerror( "yacc stack overflow" );
- return(1);
- }
- yy_ps = yys + yyps_index;
- yy_pv = yyv + yypv_index;
- yypvt = yyv + yypvt_index;
- }
- *yy_ps = yy_state;
- *++yy_pv = yyval;
-
- /*
- ** we have a new state - find out what to do
- */
- yy_newstate:
- if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
- goto yydefault; /* simple state */
- #if YYDEBUG
- /*
- ** if debugging, need to mark whether new token grabbed
- */
- yytmp = yychar < 0;
- #endif
- if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
- yychar = 0; /* reached EOF */
- #if YYDEBUG
- if ( yydebug && yytmp )
- {
- register int yy_i;
-
- (void)printf( "Received token " );
- if ( yychar == 0 )
- (void)printf( "end-of-file\n" );
- else if ( yychar < 0 )
- (void)printf( "-none-\n" );
- else
- {
- for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val == yychar )
- break;
- }
- (void)printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
- #endif /* YYDEBUG */
- if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
- goto yydefault;
- if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/
- {
- yychar = -1;
- yyval = yylval;
- yy_state = yy_n;
- if ( yyerrflag > 0 )
- yyerrflag--;
- goto yy_stack;
- }
-
- yydefault:
- if ( ( yy_n = yydef[ yy_state ] ) == -2 )
- {
- #if YYDEBUG
- yytmp = yychar < 0;
- #endif
- if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
- yychar = 0; /* reached EOF */
- #if YYDEBUG
- if ( yydebug && yytmp )
- {
- register int yy_i;
-
- (void)printf( "Received token " );
- if ( yychar == 0 )
- (void)printf( "end-of-file\n" );
- else if ( yychar < 0 )
- (void)printf( "-none-\n" );
- else
- {
- for ( yy_i = 0;
- yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val
- == yychar )
- {
- break;
- }
- }
- (void)printf( "%s\n", yytoks[yy_i].t_name );
- }
- }
- #endif /* YYDEBUG */
- /*
- ** look through exception table
- */
- {
- register int *yyxi = yyexca;
-
- while ( ( *yyxi != -1 ) ||
- ( yyxi[1] != yy_state ) )
- {
- yyxi += 2;
- }
- while ( ( *(yyxi += 2) >= 0 ) &&
- ( *yyxi != yychar ) )
- ;
- if ( ( yy_n = yyxi[1] ) < 0 )
- YYACCEPT;
- }
- }
-
- /*
- ** check for syntax error
- */
- if ( yy_n == 0 ) /* have an error */
- {
- /* no worry about speed here! */
- switch ( yyerrflag )
- {
- case 0: /* new error */
- yyerror( "syntax error" );
- goto skip_init;
- yyerrlab:
- /*
- ** get globals into registers.
- ** we have a user generated syntax type error
- */
- yy_pv = yypv;
- yy_ps = yyps;
- yy_state = yystate;
- yynerrs++;
- skip_init:
- case 1:
- case 2: /* incompletely recovered error */
- /* try again... */
- yyerrflag = 3;
- /*
- ** find state where "error" is a legal
- ** shift action
- */
- while ( yy_ps >= yys )
- {
- yy_n = yypact[ *yy_ps ] + YYERRCODE;
- if ( yy_n >= 0 && yy_n < YYLAST &&
- yychk[yyact[yy_n]] == YYERRCODE) {
- /*
- ** simulate shift of "error"
- */
- yy_state = yyact[ yy_n ];
- goto yy_stack;
- }
- /*
- ** current state has no shift on
- ** "error", pop stack
- */
- #if YYDEBUG
- # define _POP_ "Error recovery pops state %d, uncovers state %d\n"
- if ( yydebug )
- (void)printf( _POP_, *yy_ps,
- yy_ps[-1] );
- # undef _POP_
- #endif
- yy_ps--;
- yy_pv--;
- }
- /*
- ** there is no state on stack with "error" as
- ** a valid shift. give up.
- */
- YYABORT;
- case 3: /* no shift yet; eat a token */
- #if YYDEBUG
- /*
- ** if debugging, look up token in list of
- ** pairs. 0 and negative shouldn't occur,
- ** but since timing doesn't matter when
- ** debugging, it doesn't hurt to leave the
- ** tests here.
- */
- if ( yydebug )
- {
- register int yy_i;
-
- (void)printf( "Error recovery discards " );
- if ( yychar == 0 )
- (void)printf( "token end-of-file\n" );
- else if ( yychar < 0 )
- (void)printf( "token -none-\n" );
- else
- {
- for ( yy_i = 0;
- yytoks[yy_i].t_val >= 0;
- yy_i++ )
- {
- if ( yytoks[yy_i].t_val
- == yychar )
- {
- break;
- }
- }
- (void)printf( "token %s\n",
- yytoks[yy_i].t_name );
- }
- }
- #endif /* YYDEBUG */
- if ( yychar == 0 ) /* reached EOF. quit */
- YYABORT;
- yychar = -1;
- goto yy_newstate;
- }
- }/* end if ( yy_n == 0 ) */
- /*
- ** reduction by production yy_n
- ** put stack tops, etc. so things right after switch
- */
- #if YYDEBUG
- /*
- ** if debugging, print the string that is the user's
- ** specification of the reduction which is just about
- ** to be done.
- */
- if ( yydebug )
- (void)printf( "Reduce by (%d) \"%s\"\n",
- yy_n, yyreds[ yy_n ] );
- #endif
- yytmp = yy_n; /* value to switch over */
- yypvt = yy_pv; /* $vars top of value stack */
- /*
- ** Look in goto table for next state
- ** Sorry about using yy_state here as temporary
- ** register variable, but why not, if it works...
- ** If yyr2[ yy_n ] doesn't have the low order bit
- ** set, then there is no action to be done for
- ** this reduction. So, no saving & unsaving of
- ** registers done. The only difference between the
- ** code just after the if and the body of the if is
- ** the goto yy_stack in the body. This way the test
- ** can be made before the choice of what to do is needed.
- */
- {
- /* length of production doubled with extra bit */
- register int yy_len = yyr2[ yy_n ];
-
- if ( !( yy_len & 01 ) )
- {
- yy_len >>= 1;
- yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
- yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
- *( yy_ps -= yy_len ) + 1;
- if ( yy_state >= YYLAST ||
- yychk[ yy_state =
- yyact[ yy_state ] ] != -yy_n )
- {
- yy_state = yyact[ yypgo[ yy_n ] ];
- }
- goto yy_stack;
- }
- yy_len >>= 1;
- yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
- yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
- *( yy_ps -= yy_len ) + 1;
- if ( yy_state >= YYLAST ||
- yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
- {
- yy_state = yyact[ yypgo[ yy_n ] ];
- }
- }
- /* save until reenter driver code */
- yystate = yy_state;
- yyps = yy_ps;
- yypv = yy_pv;
- }
- /*
- ** code supplied by user is placed in this switch
- */
- switch( yytmp )
- {
-
- case 33:
- # line 195 "yacc2.y"
- {
- if (yypvt[-0].obj) {
- /*
- * Add instance to current object.
- */
- yypvt[-0].obj->next = Defstack->obj->next;
- Defstack->obj->next = yypvt[-0].obj;
- }
- } break;
- case 34:
- # line 205 "yacc2.y"
- {
- if (yyval.obj && CurText) {
- yyval.obj->texture = TextAppend(CurText, yyval.obj->texture);
- }
- CurText = (Texture *)NULL;
- } break;
- case 35:
- # line 213 "yacc2.y"
- {
- yyval.obj = yypvt[-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 36:
- # line 232 "yacc2.y"
- {
- if (yyval.obj)
- StatsAddRep(yyval.obj);
- } break;
- case 40:
- # line 242 "yacc2.y"
- {
- if (yyval.obj)
- yyval.obj->prims = 1; /* one primitive */
- } break;
- case 52:
- # line 260 "yacc2.y"
- {
- if (yypvt[-0].obj) {
- yypvt[-0].obj->name = yypvt[-1].c;
- GeomAddToDefined(yypvt[-0].obj);
- }
- } break;
- case 61:
- # line 278 "yacc2.y"
- {
- if (yypvt[-1].text != (Texture *)NULL) {
- /*
- * Set transformation information.
- */
- if (TransHead) {
- yypvt[-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 (yypvt[-1].text->trans->assoc || yypvt[-1].text->trans->next)
- /* texture transformation is animated...*/
- yypvt[-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(yypvt[-1].text, CurText);
- }
- } break;
- case 62:
- # line 304 "yacc2.y"
- {
- yyval.text = TextCheckerCreate(yypvt[-0].surf);
- } break;
- case 63:
- # line 308 "yacc2.y"
- {
- yyval.text = TextBlotchCreate(yypvt[-1].d, yypvt[-0].surf);
- } break;
- case 64:
- # line 312 "yacc2.y"
- {
- yyval.text = TextBumpCreate(yypvt[-0].d);
- } break;
- case 65:
- # line 316 "yacc2.y"
- {
- yyval.text = TextMarbleCreate((char *)NULL);
- } break;
- case 66:
- # line 320 "yacc2.y"
- {
- yyval.text = TextMarbleCreate(yypvt[-0].c);
- } break;
- case 67:
- # line 324 "yacc2.y"
- {
- yyval.text = TextFBmCreate(yypvt[-5].d, yypvt[-4].d, yypvt[-3].d, yypvt[-2].d, yypvt[-1].i, yypvt[-0].d,
- (char *)NULL);
- } break;
- case 68:
- # line 329 "yacc2.y"
- {
- yyval.text = TextFBmCreate(yypvt[-6].d, yypvt[-5].d, yypvt[-4].d, yypvt[-3].d, yypvt[-2].i, yypvt[-1].d, yypvt[-0].c);
- } break;
- case 69:
- # line 333 "yacc2.y"
- {
- yyval.text = TextFBmBumpCreate(yypvt[-4].d, yypvt[-3].d, yypvt[-2].d, yypvt[-1].d, yypvt[-0].i);
- } break;
- case 70:
- # line 337 "yacc2.y"
- {
- yyval.text = TextWoodCreate();
- } break;
- case 71:
- # line 341 "yacc2.y"
- {
- yyval.text = TextGlossCreate(yypvt[-0].d);
- } break;
- case 72:
- # line 345 "yacc2.y"
- {
- yyval.text = TextCloudCreate(yypvt[-6].d, yypvt[-5].d, yypvt[-4].d, yypvt[-3].i, yypvt[-2].d, yypvt[-1].d, yypvt[-0].d);
- } break;
- case 73:
- # line 349 "yacc2.y"
- {
- yyval.text = TextSkyCreate(yypvt[-5].d, yypvt[-4].d, yypvt[-3].d, yypvt[-2].i, yypvt[-1].d, yypvt[-0].d);
- } break;
- case 74:
- # line 353 "yacc2.y"
- {
- /*
- * 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 75:
- # line 365 "yacc2.y"
- {
- yyval.text = TextStripeCreate(yypvt[-3].surf, yypvt[-2].d, yypvt[-1].d, yypvt[-0].map);
- } break;
- case 76:
- # line 369 "yacc2.y"
- {
- yyval.text = TextWindyCreate(yypvt[-7].d, yypvt[-6].d, yypvt[-5].d, yypvt[-4].d, yypvt[-3].i, yypvt[-2].d, yypvt[-1].d, yypvt[-0].d);
- } break;
- case 77:
- # line 373 "yacc2.y"
- {
- yyval.text = TextMountCreate(yypvt[-2].c, yypvt[-1].d, yypvt[-0].d);
- } break;
- case 79:
- # line 380 "yacc2.y"
- {
- Imagetext = ImageTextCreate(yypvt[-0].c);
- } break;
- case 82:
- # line 388 "yacc2.y"
- {
- /* set texture to modify given component */
- ImageTextSetComponent(Imagetext, yypvt[-0].i);
- } break;
- case 83:
- # line 393 "yacc2.y"
- {
- Imagetext->tileu = yypvt[-1].d;
- Imagetext->tilev = yypvt[-0].d;
- } break;
- case 84:
- # line 398 "yacc2.y"
- {
- Imagetext->surf = yypvt[-0].surf;
- } break;
- case 85:
- # line 402 "yacc2.y"
- {
- Imagetext->hi = yypvt[-1].d;
- Imagetext->lo = yypvt[-0].d;
- } break;
- case 86:
- # line 407 "yacc2.y"
- {
- Imagetext->smooth = TRUE;
- } break;
- case 87:
- # line 411 "yacc2.y"
- {
- Imagetext->mapping = yypvt[-0].map;
- } break;
- case 88:
- # line 415 "yacc2.y"
- {
- Geom *otmp;
- /*
- * Create an instance of the named object.
- */
- otmp = GeomGetNamed(yypvt[-0].c);
- if (otmp == (Geom *)NULL)
- RLerror(RL_PANIC,
- "There is no object named \"%s\".", yypvt[-0].c,0,0);
- yyval.obj = GeomInstanceCreate(otmp);
- yyval.obj->surf = yypvt[-1].surf;
- yyval.obj->prims = otmp->prims;
- } break;
- case 89:
- # line 429 "yacc2.y"
- {
- Geom *otmp;
-
- otmp = GeomGetNamed(yypvt[-0].c);
- if (otmp == (Geom *)NULL)
- RLerror(RL_PANIC,
- "There is no object named \"%s\".", yypvt[-0].c,0,0);
- yyval.obj = GeomInstanceCreate(otmp);
- yyval.obj->surf = CurSurf->surf;
- yyval.obj->prims = otmp->prims;
- } break;
- case 91:
- # line 442 "yacc2.y"
- {
- TransHead = TransTail = (Trans *)NULL;
- } break;
- case 92:
- # line 446 "yacc2.y"
- {
- if (TransHead == (Trans *)NULL) {
- /* we're the list, head and tail */
- TransHead = TransTail = yypvt[-0].trans;
- } else {
- if (yypvt[-0].trans->animated || TransTail->animated) {
- /* new tail */
- yypvt[-0].trans->prev = TransTail;
- TransTail->next = yypvt[-0].trans;
- TransTail = yypvt[-0].trans;
- } else {
- /* collapse with tail */
- TransCompose(TransTail, yypvt[-0].trans, TransTail);
- TransFree(yypvt[-0].trans);
- }
- }
- } break;
- case 93:
- # line 465 "yacc2.y"
- {
- yyval.trans = TransScaleCreate();
- TransScaleSetX(yyval.trans, yypvt[-2].e);
- TransScaleSetY(yyval.trans, yypvt[-1].e);
- TransScaleSetZ(yyval.trans, yypvt[-0].e);
- if (!yyval.trans->animated)
- TransPropagate(yyval.trans);
-
- } break;
- case 94:
- # line 475 "yacc2.y"
- {
- yyval.trans = TransTranslateCreate();
- TransTranslateSetX(yyval.trans, yypvt[-2].e);
- TransTranslateSetY(yyval.trans, yypvt[-1].e);
- TransTranslateSetZ(yyval.trans, yypvt[-0].e);
- if (!yyval.trans->animated)
- TransPropagate(yyval.trans);
- } break;
- case 95:
- # line 484 "yacc2.y"
- {
- yyval.trans = TransRotateCreate();
- TransRotateSetX(yyval.trans, yypvt[-3].e);
- TransRotateSetY(yyval.trans, yypvt[-2].e);
- TransRotateSetZ(yyval.trans, yypvt[-1].e);
- TransRotateSetTheta(yyval.trans, yypvt[-0].e);
- if (!yyval.trans->animated)
- TransPropagate(yyval.trans);
- } break;
- case 96:
- # line 496 "yacc2.y"
- {
- yyval.trans = TransXformCreate();
- TransXformSetX0(yyval.trans, yypvt[-8].e);
- TransXformSetY0(yyval.trans, yypvt[-7].e);
- TransXformSetZ0(yyval.trans, yypvt[-6].e);
- TransXformSetX1(yyval.trans, yypvt[-5].e);
- TransXformSetY1(yyval.trans, yypvt[-4].e);
- TransXformSetZ1(yyval.trans, yypvt[-3].e);
- TransXformSetX2(yyval.trans, yypvt[-2].e);
- TransXformSetY2(yyval.trans, yypvt[-1].e);
- TransXformSetZ2(yyval.trans, yypvt[-0].e);
- if (!yyval.trans->animated)
- TransPropagate(yyval.trans);
- } break;
- case 97:
- # line 514 "yacc2.y"
- {
- yyval.trans = TransXformCreate();
- TransXformSetX0(yyval.trans, yypvt[-11].e);
- TransXformSetY0(yyval.trans, yypvt[-10].e);
- TransXformSetZ0(yyval.trans, yypvt[-9].e);
- TransXformSetX1(yyval.trans, yypvt[-8].e);
- TransXformSetY1(yyval.trans, yypvt[-7].e);
- TransXformSetZ1(yyval.trans, yypvt[-6].e);
- TransXformSetX2(yyval.trans, yypvt[-5].e);
- TransXformSetY2(yyval.trans, yypvt[-4].e);
- TransXformSetZ2(yyval.trans, yypvt[-3].e);
- TransXformSetXt(yyval.trans, yypvt[-2].e);
- TransXformSetYt(yyval.trans, yypvt[-1].e);
- TransXformSetZt(yyval.trans, yypvt[-0].e);
- if (!yyval.trans->animated)
- TransPropagate(yyval.trans);
- } break;
- case 98:
- # line 533 "yacc2.y"
- {
- Camera.pos = yypvt[-1].v;
- /*
- * Eye can be transformed...
- if (CurMatrix) {
- PointTransform(&Camera.pos, CurMatrix);
- free((voidstar)CurMatrix);
- CurMatrix = (Matrix*)NULL;
- }
- */
- } break;
- case 99:
- # line 546 "yacc2.y"
- {
- Camera.lookp = yypvt[-0].v;
- } break;
- case 100:
- # line 551 "yacc2.y"
- {
- Camera.up = yypvt[-0].v;
- } break;
- case 101:
- # line 556 "yacc2.y"
- {
- Camera.hfov = yypvt[-1].d;
- Camera.vfov = yypvt[-0].d;
- } break;
- case 102:
- # line 561 "yacc2.y"
- {
- Camera.hfov = yypvt[-0].d;
- Camera.vfov = UNSET;
- } break;
- case 103:
- # line 567 "yacc2.y"
- {
- if (!Options.samples_set)
- Options.samples = yypvt[-1].i;
- if (!Options.jitter_set)
- Options.jitter = TRUE;
- } break;
- case 104:
- # line 574 "yacc2.y"
- {
- if (!Options.samples_set)
- Options.samples = yypvt[-1].i;
- if (!Options.jitter_set)
- Options.jitter = FALSE;
- } break;
- case 105:
- # line 581 "yacc2.y"
- {
- if (!Options.samples_set)
- Options.samples = yypvt[-0].i;
- } break;
- case 106:
- # line 587 "yacc2.y"
- {
- Options.gaussian = FALSE;
- Options.filterwidth = yypvt[-0].d;
- } break;
- case 107:
- # line 592 "yacc2.y"
- {
- Options.gaussian = FALSE;
- } break;
- case 108:
- # line 596 "yacc2.y"
- {
- Options.gaussian = TRUE;
- Options.filterwidth = yypvt[-0].d;
- } break;
- case 109:
- # line 601 "yacc2.y"
- {
- Options.gaussian = TRUE;
- } break;
- case 110:
- # line 605 "yacc2.y"
- {
- Options.starttime = yypvt[-0].d;
- } break;
- case 111:
- # line 609 "yacc2.y"
- {
- if (!Options.totalframes_set)
- Options.totalframes = yypvt[-0].i;
- } break;
- case 112:
- # line 614 "yacc2.y"
- {
- Options.framelength = yypvt[-0].d;
- } break;
- case 113:
- # line 618 "yacc2.y"
- {
- Options.shutterspeed = yypvt[-0].d;
- } break;
- case 114:
- # line 622 "yacc2.y"
- {
- if (!Options.contrast_set) {
- Options.contrast.r = yypvt[-2].d;
- Options.contrast.g = yypvt[-1].d;
- Options.contrast.b = yypvt[-0].d;
- }
- } break;
- case 115:
- # line 631 "yacc2.y"
- {
- if (!Options.cutoff_set)
- Options.cutoff = yypvt[-0].col;
- } break;
- case 116:
- # line 637 "yacc2.y"
- {
- if (!Options.resolution_set) {
- Screen.xres = yypvt[-1].i;
- Screen.yres = yypvt[-0].i;
- }
- } break;
- case 117:
- # line 645 "yacc2.y"
- {
- if (!Options.window_set) {
- Options.xmin = yypvt[-3].d;
- Options.xmax = yypvt[-2].d;
- Options.ymin = yypvt[-1].d;
- Options.ymax = yypvt[-0].d;
- }
- } break;
- case 118:
- # line 654 "yacc2.y"
- {
- if (!Options.freq_set)
- Options.report_freq = yypvt[-1].i;
- } break;
- case 119:
- # line 661 "yacc2.y"
- {
- if (!Options.freq_set)
- Options.report_freq = yypvt[-0].i;
- } break;
- case 120:
- # line 666 "yacc2.y"
- {
- } break;
- case 122:
- # line 673 "yacc2.y"
- { Options.verbose = TRUE; } break;
- case 124:
- # line 677 "yacc2.y"
- { Options.quiet = TRUE; } break;
- case 126:
- # line 681 "yacc2.y"
- {
- Camera.aperture = yypvt[-0].d;
- } break;
- case 127:
- # line 686 "yacc2.y"
- {
- Camera.focaldist = yypvt[-0].d;
- } break;
- case 128:
- # line 691 "yacc2.y"
- {
- if (!Options.eyesep_set)
- Options.eyesep = yypvt[-0].d;
- } break;
- case 129:
- # line 697 "yacc2.y"
- {
- if (!Options.maxdepth_set)
- Options.maxdepth = yypvt[-0].i;
- } break;
- case 130:
- # line 703 "yacc2.y"
- {
- Screen.background = yypvt[-0].col;
- } break;
- case 131:
- # line 708 "yacc2.y"
- {
- Options.shadowtransp = TRUE;
- } break;
- case 132:
- # line 713 "yacc2.y"
- {
- LightAddToDefined(yypvt[-0].light);
- } break;
- case 133:
- # line 717 "yacc2.y"
- {
- yypvt[-1].light->shadow = FALSE;
- LightAddToDefined(yypvt[-1].light);
- } break;
- case 134:
- # line 722 "yacc2.y"
- {
- Options.ambient = yypvt[-1].col;
- } break;
- case 135:
- # line 726 "yacc2.y"
- {
- extern void AreaLightCreate();
- /* Area light is strange in that the
- * Creation routine does the installation.
- */
- AreaLightCreate(&yypvt[-6].col, &yypvt[-4].v, &yypvt[-3].v, yypvt[-2].i, &yypvt[-1].v, yypvt[-0].i, TRUE);
- } break;
- case 136:
- # line 734 "yacc2.y"
- {
- extern void AreaLightCreate();
- /* Area light is strange in that the
- * Creation routine does the installation.
- */
- AreaLightCreate(&yypvt[-7].col, &yypvt[-5].v, &yypvt[-4].v, yypvt[-3].i, &yypvt[-2].v, yypvt[-1].i, FALSE);
- } break;
- case 137:
- # line 742 "yacc2.y"
- {
- yyval.light = LightPointCreate(&yypvt[-2].col, &yypvt[-0].v);
- } break;
- case 138:
- # line 746 "yacc2.y"
- {
- yyval.light = LightInfiniteCreate(&yypvt[-2].col, &yypvt[-0].v);
- } break;
- case 139:
- # line 750 "yacc2.y"
- {
- yyval.light = LightExtendedCreate(&yypvt[-3].col, yypvt[-1].d, &yypvt[-0].v);
- } break;
- case 140:
- # line 754 "yacc2.y"
- {
- yyval.light = LightSpotCreate(&yypvt[-4].col, &yypvt[-2].v, &yypvt[-1].v, yypvt[-0].d, 0., 0.);
- } break;
- case 141:
- # line 758 "yacc2.y"
- {
- /* light <intens> spot from <to> coef inner_rad
- outer_rad */
- yyval.light = LightSpotCreate(&yypvt[-6].col, &yypvt[-4].v, &yypvt[-3].v, yypvt[-2].d, yypvt[-1].d, yypvt[-0].d);
- } break;
- case 142:
- # line 764 "yacc2.y"
- {
- yyval.col = yypvt[-0].col;
- } break;
- case 143:
- # line 769 "yacc2.y"
- {
- CurSurf->surf = yypvt[-0].surf;
- } break;
- case 145:
- # line 775 "yacc2.y"
- {
- yyval.surf = CurSurf->surf;
- } break;
- case 149:
- # line 784 "yacc2.y"
- {
- yyval.surf = SurfaceGetNamed(yypvt[-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)yypvt[-0].c);
- } break;
- case 150:
- # line 795 "yacc2.y"
- {
- extern Surface DefaultSurface;
-
- if (CurSurf->surf)
- yyval.surf = CurSurf->surf;
- else
- yyval.surf = &DefaultSurface;
- } break;
- case 151:
- # line 805 "yacc2.y"
- {
- yyval.surf = tmpsurf;
- tmpsurf = (Surface *)NULL;
- } break;
- case 152:
- # line 810 "yacc2.y"
- {
- yyval.surf = tmpsurf;
- tmpsurf = (Surface *)NULL;
- } break;
- case 153:
- # line 816 "yacc2.y"
- {
- tmpsurf = SurfaceCopy(SurfaceGetNamed(yypvt[-0].c));
- } break;
- case 154:
- # line 821 "yacc2.y"
- {
- extern Surface DefaultSurface;
- if (CurSurf->surf)
- tmpsurf = SurfaceCopy(CurSurf->surf);
- else
- tmpsurf = SurfaceCopy(&DefaultSurface);
- } break;
- case 155:
- # line 830 "yacc2.y"
- {
- yyval.surf = tmpsurf;
- tmpsurf = (Surface *)NULL;
- } break;
- case 156:
- # line 836 "yacc2.y"
- {
- tmpsurf = SurfaceCopy(yypvt[-0].surf);
- tmpsurf->name = strsave(yypvt[-1].c);
- SurfaceAddToDefined(tmpsurf);
- tmpsurf = (Surface *)NULL;
- } break;
- case 157:
- # line 843 "yacc2.y"
- {
- /* black surface */
- tmpsurf = SurfaceCreate();
- tmpsurf->name = strsave(yypvt[-0].c);
- SurfaceAddToDefined(tmpsurf);
- tmpsurf = (Surface *)NULL;
- } break;
- case 171:
- # line 867 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->amb = yypvt[-0].col;
- } break;
- case 172:
- # line 874 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->diff = yypvt[-0].col;
- } break;
- case 173:
- # line 881 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->spec = yypvt[-0].col;
- } break;
- case 174:
- # line 888 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->body = yypvt[-0].col;
- } break;
- case 175:
- # line 894 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->statten = yypvt[-0].d;
- } break;
- case 176:
- # line 900 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->srexp = yypvt[-0].d;
- } break;
- case 177:
- # line 907 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->reflect = yypvt[-0].d;
- } break;
- case 178:
- # line 914 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->transp = yypvt[-0].d;
- } break;
- case 179:
- # line 921 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->index = yypvt[-0].d;
- } break;
- case 180:
- # line 928 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->translucency = yypvt[-2].d;
- tmpsurf->translu = yypvt[-1].col;
- tmpsurf->stexp = yypvt[-0].d;
- } break;
- case 181:
- # line 937 "yacc2.y"
- {
- if (tmpsurf == (Surface *)NULL)
- tmpsurf = SurfaceCreate();
- tmpsurf->noshadow = TRUE;
- } break;
- case 182:
- # line 944 "yacc2.y"
- {
- yyval.obj = GeomHfCreate(yypvt[-0].c);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-1].surf;
- } break;
- case 183:
- # line 950 "yacc2.y"
- {
- yyval.obj = GeomHfCreate(yypvt[-0].c);
- } break;
- case 184:
- # line 955 "yacc2.y"
- {
- yyval.obj = GeomPolygonCreate(Polypoints, Npoints,
- Options.flipnorm);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-1].surf;
- Polypoints = (PointList *)NULL;
- Npoints = 0;
- } break;
- case 187:
- # line 968 "yacc2.y"
- {
- PointList *ptmp;
-
- ptmp = (PointList *)Malloc(sizeof(PointList));
- ptmp->vec = yypvt[-0].v;
- ptmp->next = Polypoints;
- Polypoints = ptmp;
- Npoints++;
- } break;
- case 188:
- # line 979 "yacc2.y"
- {
- 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);
- } break;
- case 189:
- # line 997 "yacc2.y"
- {
- /* Convert aggregate, pop stacks, etc. */
- if (yypvt[-2].obj) {
- if (Defstack->obj->next == (Geom *)NULL) {
- RLerror(RL_WARN,
- "Null object defined.\n",0,0,0);
- 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 190:
- # line 1023 "yacc2.y"
- {
- if (yypvt[-0].obj) {
- Defstack = GeomStackPush(yypvt[-0].obj, Defstack);
- CurSurf = SurfPush((Surface *)NULL, CurSurf);
- }
- } break;
- case 194:
- # line 1034 "yacc2.y"
- {
- yyval.obj = GeomListCreate();
- } break;
- case 195:
- # line 1039 "yacc2.y"
- {
- yyval.obj = GeomGridCreate(yypvt[-2].i, yypvt[-1].i, yypvt[-0].i);
- } break;
- case 196:
- # line 1044 "yacc2.y"
- {
- yyval.obj = GeomCsgCreate(yypvt[-0].i);
- Options.csg = TRUE;
- } break;
- case 197:
- # line 1050 "yacc2.y"
- {
- yyval.i = CSG_UNION;
- } break;
- case 198:
- # line 1054 "yacc2.y"
- {
- yyval.i = CSG_INTERSECT;
- } break;
- case 199:
- # line 1058 "yacc2.y"
- {
- yyval.i = CSG_DIFFERENCE;
- } break;
- case 200:
- # line 1063 "yacc2.y"
- {
- if (equal(yypvt[-3].d, yypvt[-1].d)) {
- /* It's really a cylinder */
- yyval.obj = GeomCylinderCreate(yypvt[-3].d, &yypvt[-2].v, &yypvt[-0].v);
- } else
- yyval.obj = GeomConeCreate(yypvt[-3].d, &yypvt[-2].v, yypvt[-1].d, &yypvt[-0].v);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-4].surf;
- } break;
- case 201:
- # line 1074 "yacc2.y"
- {
- yyval.obj = GeomCylinderCreate(yypvt[-2].d, &yypvt[-1].v, &yypvt[-0].v);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-3].surf;
- } break;
- case 202:
- # line 1081 "yacc2.y"
- {
- yyval.obj = GeomSphereCreate(yypvt[-1].d, &(yypvt[-0].v));
- if (yyval.obj)
- yyval.obj->surf = yypvt[-2].surf;
- } break;
- case 203:
- # line 1088 "yacc2.y"
- {
- yyval.obj = GeomDiscCreate(yypvt[-2].d, &(yypvt[-1].v), &(yypvt[-0].v));
- if (yyval.obj)
- yyval.obj->surf = yypvt[-3].surf;
- } break;
- case 204:
- # line 1095 "yacc2.y"
- {
- yyval.obj = GeomBoxCreate(&yypvt[-1].v, &yypvt[-0].v);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-2].surf;
- } break;
- case 205:
- # line 1102 "yacc2.y"
- {
- yyval.obj = GeomTriangleCreate(FLATTRI, &(yypvt[-2].v), &(yypvt[-1].v), &(yypvt[-0].v),
- (Vector *)NULL, (Vector *)NULL, (Vector *)NULL,
- (Vec2d *)NULL, (Vec2d *)NULL, (Vec2d *)NULL,
- Options.flipnorm);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-3].surf;
- } break;
- case 206:
- # line 1113 "yacc2.y"
- {
- yyval.obj = GeomTriangleCreate(PHONGTRI, &(yypvt[-5].v), &(yypvt[-3].v),
- &(yypvt[-1].v), &(yypvt[-4].v), &(yypvt[-2].v), &(yypvt[-0].v),
- (Vec2d *)NULL, (Vec2d *)NULL, (Vec2d *)NULL,
- Options.flipnorm);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-6].surf;
- } break;
- case 207:
- # line 1124 "yacc2.y"
- {
- yyval.obj = GeomTriangleCreate(PHONGTRI, &(yypvt[-8].v), &(yypvt[-5].v), &(yypvt[-2].v),
- &(yypvt[-7].v), &(yypvt[-4].v), &(yypvt[-1].v),
- &(yypvt[-6].uv), &(yypvt[-3].uv), &(yypvt[-0].uv),
- Options.flipnorm);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-9].surf;
- } break;
- case 208:
- # line 1134 "yacc2.y"
- {
- yyval.obj = GeomPlaneCreate(&(yypvt[-1].v), &(yypvt[-0].v));
- if (yyval.obj)
- yyval.obj->surf = yypvt[-2].surf;
- } break;
- case 209:
- # line 1141 "yacc2.y"
- {
- yyval.obj = GeomTorusCreate(yypvt[-3].d, yypvt[-2].d, &(yypvt[-1].v), &(yypvt[-0].v));
- if (yyval.obj)
- yyval.obj->surf = yypvt[-4].surf;
- } break;
- case 210:
- # line 1148 "yacc2.y"
- {
- yyval.obj = GeomBlobCreate(yypvt[-1].d, Metapoints, Npoints);
- if (yyval.obj)
- yyval.obj->surf = yypvt[-2].surf;
- Metapoints = (MetaList *)NULL;
- Npoints = 0;
- } break;
- case 213:
- # line 1160 "yacc2.y"
- {
- Metapoint = (MetaList *)Malloc(sizeof(MetaList));
- Metapoint->mvec.c0 = yypvt[-4].d;
- Metapoint->mvec.rs = yypvt[-3].d;
- Metapoint->mvec.x = yypvt[-2].d;
- Metapoint->mvec.y = yypvt[-1].d;
- Metapoint->mvec.z = yypvt[-0].d;
- Metapoint->next = Metapoints;
- Metapoints = Metapoint;
- Npoints++;
- } break;
- case 214:
- # line 1173 "yacc2.y"
- {
- if (Options.imgname != (char *)NULL)
- /* Already set on command line. */
- RLerror(RL_WARN,
- "Ignoring output file name \"%s\".\n",
- yypvt[-0].c,0,0);
- else
- Options.imgname = strsave(yypvt[-0].c);
- } break;
- case 215:
- # line 1184 "yacc2.y"
- {
- AtmosEffects = CurEffect;
- CurEffect = (Atmosphere *)NULL;
- } break;
- case 216:
- # line 1189 "yacc2.y"
- {
- if (yypvt[-1].i <= 0.)
- RLerror(RL_PANIC,
- "Index of refraction must be positive.\n",0,0,0);
- TopMedium.index = yypvt[-1].i;
- AtmosEffects = CurEffect;
- CurEffect = (Atmosphere *)NULL;
- } break;
- case 219:
- # line 1202 "yacc2.y"
- {
- yypvt[-0].atmos->next = CurEffect;
- CurEffect = yypvt[-0].atmos;
- } break;
- case 220:
- # line 1208 "yacc2.y"
- {
- yyval.atmos = AtmosMistCreate(&(yypvt[-3].col), &(yypvt[-2].col), yypvt[-1].d, yypvt[-0].d);
- } break;
- case 221:
- # line 1212 "yacc2.y"
- {
- yyval.atmos = AtmosFogCreate(&(yypvt[-1].col), &(yypvt[-0].col));
- } break;
- case 222:
- # line 1216 "yacc2.y"
- {
- yyval.atmos = AtmosFogdeckCreate(yypvt[-6].d, yypvt[-5].d, &yypvt[-4].v, yypvt[-3].d, yypvt[-2].i, &yypvt[-1].col, &yypvt[-0].col);
- } break;
- case 223:
- # line 1221 "yacc2.y"
- {
- yyval.col.r = yypvt[-2].d;
- yyval.col.g = yypvt[-1].d;
- yyval.col.b = yypvt[-0].d;
- } break;
- case 224:
- # line 1228 "yacc2.y"
- {
- yyval.v.x = yypvt[-2].d;
- yyval.v.y = yypvt[-1].d;
- yyval.v.z = yypvt[-0].d;
- } break;
- case 225:
- # line 1235 "yacc2.y"
- {
- yyval.uv.u = yypvt[-1].d;
- yyval.uv.v = yypvt[-0].d;
- } break;
- case 227:
- # line 1242 "yacc2.y"
- {
- yyval.map = UVMappingCreate();
- } break;
- case 228:
- # line 1247 "yacc2.y"
- {
- yyval.map = yypvt[-0].map;
- } break;
- case 229:
- # line 1252 "yacc2.y"
- {
- yyval.map = UVMappingCreate();
- } break;
- case 230:
- # line 1256 "yacc2.y"
- {
- yyval.map = SphereMappingCreate((Vector *)NULL,
- (Vector *)NULL, (Vector *)NULL);
- } break;
- case 231:
- # line 1261 "yacc2.y"
- {
- /* origin up uaxis */
- yyval.map = SphereMappingCreate(&yypvt[-2].v, &yypvt[-1].v, &yypvt[-0].v);
- } break;
- case 232:
- # line 1266 "yacc2.y"
- {
- yyval.map = CylMappingCreate((Vector *)NULL,
- (Vector *)NULL, (Vector *)NULL);
- } break;
- case 233:
- # line 1271 "yacc2.y"
- {
- /* origin up uaxis */
- yyval.map = CylMappingCreate(&yypvt[-2].v, &yypvt[-1].v, &yypvt[-0].v);
- } break;
- case 234:
- # line 1276 "yacc2.y"
- {
- yyval.map = LinearMappingCreate((Vector *)NULL,
- (Vector *)NULL, (Vector *)NULL);
- } break;
- case 235:
- # line 1281 "yacc2.y"
- {
- /* origin up uaxis */
- yyval.map = LinearMappingCreate(&yypvt[-2].v, &yypvt[-1].v, &yypvt[-0].v);
- } break;
- case 236:
- # line 1287 "yacc2.y"
- {
- yyval.i = AMBIENT;
- } break;
- case 237:
- # line 1291 "yacc2.y"
- {
- yyval.i = DIFFUSE;
- } break;
- case 238:
- # line 1295 "yacc2.y"
- {
- yyval.i = BODY;
- } break;
- case 239:
- # line 1299 "yacc2.y"
- {
- yyval.i = SPECULAR;
- } break;
- case 240:
- # line 1303 "yacc2.y"
- {
- yyval.i = REFLECT;
- } break;
- case 241:
- # line 1307 "yacc2.y"
- {
- yyval.i = TRANSP;
- } break;
- case 242:
- # line 1311 "yacc2.y"
- {
- yyval.i = SPECPOW;
- } break;
- case 243:
- # line 1315 "yacc2.y"
- {
- yyval.i = BUMP;
- } break;
- case 244:
- # line 1319 "yacc2.y"
- {
- yyval.i = INDEX;
- } break;
- case 245:
- # line 1324 "yacc2.y"
- { yyval.col.r = yyval.col.g = yyval.col.b = yypvt[-0].d; } break;
- case 247:
- # line 1328 "yacc2.y"
- {
- fprintf(stderr,"%f\n",yypvt[-0].d);
- } break;
- case 248:
- # line 1332 "yacc2.y"
- {
- SymtabAddEntry(yypvt[-1].c, yypvt[-0].e->type, yypvt[-0].e, NULL, yypvt[-0].e->timevary, 0);
- } break;
- case 249:
- # line 1336 "yacc2.y"
- { yyval.i = (int)yypvt[-0].d; } break;
- case 251:
- # line 1340 "yacc2.y"
- {
- if (!yypvt[-0].e->timevary) {
- yyval.d = ExprEval(yypvt[-0].e);
- } else {
- RLerror(RL_PANIC, "Illegal expression use.\n",0,0,0);
- }
- } break;
- case 252:
- # line 1349 "yacc2.y"
- {
- yyval.e = ExprReuseFloatCreate(yypvt[-0].d);
- } break;
- case 254:
- # line 1355 "yacc2.y"
- {
- yyval.e = yypvt[-1].e;
- } break;
- case 255:
- # line 1359 "yacc2.y"
- {
- yyval.e = ExprFloatCreate(yypvt[-0].d, FALSE);
- } break;
- case 256:
- # line 1363 "yacc2.y"
- {
- yyval.e = ExprFloatSymtabFind(yypvt[-0].c);
- } break;
- case 257:
- # line 1367 "yacc2.y"
- {
- yyval.e = ExprResolve1(yypvt[-1].e, yypvt[-3].sym->value.fp, yypvt[-3].sym->timevary);
- } break;
- case 258:
- # line 1371 "yacc2.y"
- {
- yyval.e = ExprResolve2(yypvt[-3].e, yypvt[-1].e,
- yypvt[-5].sym->value.fp,
- yypvt[-5].sym->timevary);
- } break;
- case 259:
- # line 1377 "yacc2.y"
- {
- yyval.e = ExprResolve3(yypvt[-5].e, yypvt[-3].e, yypvt[-1].e,
- yypvt[-7].sym->value.fp,
- yypvt[-7].sym->timevary);
- } break;
- case 260:
- # line 1383 "yacc2.y"
- {
- yyval.e = ExprResolve4(yypvt[-7].e, yypvt[-5].e, yypvt[-3].e, yypvt[-1].e,
- yypvt[-9].sym->value.fp,
- yypvt[-9].sym->timevary);
- } break;
- case 261:
- # line 1390 "yacc2.y"
- {
- yyval.e = ExprResolve5(yypvt[-9].e, yypvt[-7].e, yypvt[-5].e, yypvt[-3].e, yypvt[-1].e,
- yypvt[-11].sym->value.fp,
- yypvt[-11].sym->timevary);
- } break;
- case 262:
- # line 1396 "yacc2.y"
- {
- yyval.e = yypvt[-1].e;
- } break;
- case 263:
- # line 1400 "yacc2.y"
- {
- yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, SumExpr, FALSE);
- } break;
- case 264:
- # line 1404 "yacc2.y"
- {
- yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, DiffExpr, FALSE);
- } break;
- case 265:
- # line 1408 "yacc2.y"
- {
- yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, MultExpr, FALSE);
- } break;
- case 266:
- # line 1412 "yacc2.y"
- {
- yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, DivideExpr, FALSE);
- } break;
- case 267:
- # line 1416 "yacc2.y"
- {
- yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, ModExpr, FALSE);
- } break;
- case 268:
- # line 1420 "yacc2.y"
- {
- yyval.e = ExprResolve1(yypvt[-0].e, NegateExpr, FALSE);
- } break;
- case 269:
- # line 1424 "yacc2.y"
- {
- yyval.e = yypvt[-0].e;
- } break;
- case 270:
- # line 1428 "yacc2.y"
- {
- yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, pow, FALSE);
- } break;
- case 272:
- # line 1433 "yacc2.y"
- { yyval.d = -yypvt[-0].d; } break;
- case 273:
- # line 1435 "yacc2.y"
- { yyval.d = yypvt[-0].d; } break;
- case 276:
- # line 1440 "yacc2.y"
- {
- yyval.sym = SymtabBuiltinFind(yypvt[-0].c);
- } break;
- }
- goto yystack; /* reset registers in driver code */
- }
-