kits@6
|
Part01,
Part02,
Part03,
Part04,
Part05,
Part06,
Part07,
Part08,
Part09,
Part10,
Part11,
Part12,
Part13,
Part14,
Part15,
Part16,
Part17,
Part18,
Part19,
|
|
|
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh 'libshade/yacc.y' <<'END_OF_FILE'
X/* yacc.y */
X/* */
X/* Copyright (C) 1989, 1991, Craig E. Kolb */
X/* All rights reserved. */
X/* */
X/* This software may be freely copied, modified, and redistributed, */
X/* provided that this copyright notice is preserved on all copies. */
X/* */
X/* You may not distribute this software, in whole or in part, as part of */
X/* any commercial product without the express consent of the authors. */
X/* */
X/* There is no warranty or other guarantee of fitness of this software */
X/* for any purpose. It is provided solely "as is". */
X/* $Id: yacc.y,v 4.0.1.4 92/01/10 16:29:55 cek Exp Locker: cek $ */
X%{
X#include "rayshade.h"
X
X#include "symtab.h"
X#include "builtin.h"
X
X#include "libsurf/atmosphere.h"
X#include "libsurf/surface.h"
X#include "libtext/texture.h"
X#include "libimage/image.h"
X#include "libobj/geom.h"
X#include "liblight/light.h"
X#include "options.h"
X#include "stats.h"
X#include "viewing.h"
X
X#include "libobj/blob.h"
X#include "libobj/box.h"
X#include "libobj/cone.h"
X#include "libobj/csg.h"
X#include "libobj/cylinder.h"
X#include "libobj/disc.h"
X#include "libobj/grid.h"
X#include "libobj/hf.h"
X#include "libobj/instance.h"
X#include "libobj/list.h"
X#include "libobj/plane.h"
X#include "libobj/poly.h"
X#include "libobj/sphere.h"
X#include "libobj/torus.h"
X#include "libobj/triangle.h"
X
X#include "liblight/point.h"
X#include "liblight/infinite.h"
X#include "liblight/spot.h"
X#include "liblight/jittered.h"
X#include "liblight/extended.h"
X
X#include "libtext/blotch.h"
X#include "libtext/bump.h"
X#include "libtext/checker.h"
X#include "libtext/cloud.h"
X#include "libtext/fbm.h"
X#include "libtext/fbmbump.h"
X#include "libtext/gloss.h"
X#include "libtext/imagetext.h"
X#include "libtext/marble.h"
X#include "libtext/mount.h"
X#include "libtext/sky.h"
X#include "libtext/stripe.h"
X#include "libtext/windy.h"
X#include "libtext/wood.h"
X
X#include "libsurf/fog.h"
X#include "libsurf/fogdeck.h"
X#include "libsurf/mist.h"
X
X#include "libcommon/rotate.h"
X#include "libcommon/scale.h"
X#include "libcommon/translate.h"
X#include "libcommon/xform.h"
X
XGeom *NewAggregate();
Xchar yyfilename[BUFSIZ]; /* Input filename */
XGeomList *Defstack; /* Geom definition stack. */
Xint Npoints = 0; /* # of points in Polypoints */
XSurface *tmpsurf; /* Working surface */
XSurfList *CurSurf;
XTexture *CurText; /* Working list of textures */
XImageText *Imagetext; /* Working image texture */
XTrans *TransHead, *TransTail; /* Linked list of current transformations */
XAtmosphere *CurEffect = (Atmosphere *)NULL; /* Current atmos. effects */
XPointList *Polypoints; /* List of vertices */
XMetaList *Metapoints, *Metapoint;
Xextern FILE *yyin; /* input file pointer */
Xextern int yylineno; /* Current line # in file */
Xextern Atmosphere *AtmosEffects; /* atmospheric effects */
Xextern Medium TopMedium; /* "air" */
Xextern void GeomAddToDefined(),
X LightAddToDefined(),
X SurfaceAddToDefined();
Xextern Surface *SurfaceGetNamed();
Xextern Geom *GeomGetNamed();
X%}
X%union {
X char *c;
X int i;
X Float d;
X Vector v;
X Vec2d uv;
X Color col;
X Atmosphere *atmos;
X Light *light;
X Surface *surf;
X Geom *obj;
X Texture *text;
X Mapping *map;
X Trans *trans;
X Expr *e;
X SymtabEntry *sym;
X}
X%token tFLOAT
X%token tSTRING tFILENAME
X%token tAPERTURE tAPPLYSURF
X%token tBACKGROUND tBLOB tBLOTCH tBOX tBUMP tCONE tCYL tDIRECTIONAL tCURSURF
X%token tEXTENDED tEYEP tFBM tFBMBUMP tFOCALDIST tFOG tFOGDECK tFOV tGLOSS tGRID
X%token tHEIGHTFIELD tLIGHT tLIST tLOOKP tMARBLE tMAXDEPTH tMIST
X%token tJITTER tNOJITTER tDEFINE
X%token tOBJECT tOUTFILE tSKY tDISC tDIFFERENCE tUNION tINTERSECT
X%token tPLANE tPOINT tPOLY tROTATE tSPOT tPRINT
X%token tSCALE tSCREEN tSPHERE tSURFACE
X%token tTHRESH tTRANSLATE tTRANSFORM tTRIANGLE tTRIANGLEUV tUP tEND
X%token tTEXTURE tCHECKER tWOOD tCONTRAST tCUTOFF tCLOUD
X%token tAMBIENT tDIFFUSE tREFLECT tTRANSP tSPECULAR tSPECPOW
X%token tINDEX tATMOSPHERE tNOSHADOW tAREA tTRANSLU tTORUS
X%token tEYESEP tSHADOWTRANSP tREPORT tVERBOSE tQUIET tWINDOW tCROP tSTRIPE
X%token tMAP tUV tSPHERICAL tCYLINDRICAL tPLANAR
X%token tIMAGE tSMOOTH tCOMPONENT tTEXTSURF tRANGE tTILE tSTARTTIME tFRAMELENGTH
X%token tNAME tFILTER tGAUSS tBODY tSAMPLE tEXTINCT tWINDY tMOUNT
X%token tSHUTTER tFRAMES
X%type Filename
X%type AnimExpr MExpr ParenExpr
X%type Expr Float
X%type Vector
X%type Vec2d
X%type Color Intensity Lightdef
X%type Texturetype
X%type SurfCompName IExpr CombineOp
X%type EffectType
X%type LightType
X%type PrimType Primitive TransTextObj
X%type Csg Aggregate Object TransObj ObjType
X%type Blob Box Cone Cylinder Disc HeightField Plane Poly
X%type Sphere Triangle Torus AggregateType List Grid AggregateCreate
X%type NamedObject
X%type Surface OptSurface NamedSurf
X%type SurfSpec ModifyNamedSurf
X%type
|