home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 5
/
FreshFish_July-August1994.bin
/
bbs
/
gfx
/
magiccamera-1.0.lha
/
MagicCamera-1.0
/
Docs
/
Scan.l
< prev
next >
Wrap
Text File
|
1994-06-11
|
6KB
|
268 lines
/**********************************************************************
*
* This file Copyright © 1993-1994 Dan Wesnor. Distribution
* rights limited. See included "Distribution" file for
* details.
*
* No part of this file be compiled or otherwise used in any product
* (commercial or not) wihout the expressed written consent of the
* copyright holder.
*
* The inclusion of this file in the distributed archive is intended
* solely to aid authorized users in understanding the operation of
* Magic Camera rendering system.
*
* For best reading set tab stops every 4 spaces.
*
**********************************************************************/
integer ([0-9]+)
dreal ([0-9]*"."[0-9]+)
ereal ([0-9]*"."[0-9]+[eE][+-]?[0-9]+)
real ({dreal}|{ereal})
realint ({real}|{integer})
comment ;.*
ws ([ \t])
id ([_]*[a-zA-Z]+[_.a-zA-Z0-9]*)
filename (\"[a-zA-Z0-9\/\'\._\\]+\")
text \"[^\"\n]*\"
%%
"/*" /* open comment */
"*/" /* close comment */
{ws} ;
{integer} TYPE_INTEGER;
{real} TYPE_REAL;
{comment} ;
\< OPEN_VEC;
\> CLOSE_VEC;
\{ OPEN_BRACE;
\} CLOSE_BRACE;
\( OPEN_PAREN;
\) CLOSE_PAREN;
\[ OPEN_BRACK;
\] CLOSE_BRACK;
"=" P_EQSIGN;
"+" P_PLUS;
"-" P_MINUS;
"*" P_MULT;
"/" P_DIVIDE;
"," P_COMMA;
\n
"include" BEGIN(incl);
<incl>[ \t]*
<incl>[^ \t\n]+ BEGIN(INITIAL);
<<EOF>> if root file
yyterminate();
else
return to previous file
acos P_ACOS;
and P_AND;
andnot P_ANDNOT;
amb(ient)? P_AMBIENT;
a(lpha)?refl P_AREFL;
array P_ARRAY;
asin P_ASIN;
aspect P_ASPECT;
a(lpha)?trans P_ATRANS;
atan P_ATAN;
atan2 P_ATAN2;
axis P_AXIS;
back P_BACK;
billboard P_BILLBOARD;
bitmap P_BITMAP;
blotch P_BLOTCH;
box P_BOX;
brick P_BRICK;
bumpcy(linder)? P_BUMPCY;
bumpfl(at)? P_BUMPFL;
bumpsp(here)? P_BUMPSP;
check P_CHECK;
ceil P_CEIL;
child P_CHILD;
closed P_CLOSED;
clouds P_CLOUDS;
color P_COLOR;
cos P_COS;
cosh P_COSH;
csg P_CSG;
deg2rad P_DEG2RAD;
diff(use)? P_DIFFUSE;
dir(ect)? P_DIRECT;
dist(ance)? P_DIST;
dodiff(use)? P_DODIFF;
dorefl(ect)? P_DOREFL;
dotrans(mit)? P_DOTRANS;
end P_END;
endobj(ect)? P_ENDOBJECT;
endscope P_ENDSCOPE;
exp P_EXP;
extrude P_EXTRUDE;
fastmemonly P_FASTMEMONLY;
file P_FILE;
fill P_FILL;
(fill)?first P_FILLFIRST;
(fill)?last P_FILLLAST;
filt(er)? P_FILTER;
floor P_FLOOR;
flushverts P_FLUSHVERTS;
fog P_FOG;
front P_FRONT;
grain P_GRAIN;
height P_HEIGHT;
h(eight)?field P_HFIELD;
hfov P_HFOV;
horizon P_HORIZON;
hole P_HOLE;
hseg(ment)?s P_HSEGS;
iff P_IFF;
illum(inate)? P_ILLUMINATE;
in P_IN;
index P_INDEX;
instance P_INSTANCE;
int(eger)? P_VINT;
killobj(ect)? P_KILLOBJECT;
lamp P_LAMP;
length P_LENGTH;
loc(ation)? P_LOC;
lockobj(ect)? P_LOCK;
log P_LOG;
log10 P_LOG10;
marble P_MARBLE;
maxaadepth P_MAXAADEPTH;
maxaadiff P_MAXAADIFF;
maxobcube P_MAXOBCUBE;
maxoctdepth P_MAXOCTDEPTH;
mortar P_MORTAR;
m(ortar)?size P_MSIZE;
name P_NAME;
n(um)?centers P_NCENTERS;
norefl(ect)? P_NOREFL;
note P_NOTE;
noshad(ows)? P_NOSHAD;
notrans(mit)? P_NOTRANS;
n(um)?rays P_NRAYS;
newscope P_NEWSCOPE;
numstars P_NUMSTARS;
object P_OBJECT;
camera P_OBSERVER;
octbuff P_OCTBUFF;
offtree P_OFFTREE;
origin P_ORIGIN;
out P_OUT;
p1 P_P1;
p2 P_P2;
p3 P_P3;
path P_PATH;
patt(ern)? P_PATTERN;
patt(ern)?1 P_PATTERN1;
patt(ern)?2 P_PATTERN2;
s(pec)?(ular)?coef P_PCOEF;
s(pec)?(ular)?refl P_PREFL;
(per)?turb P_PERTURB;
phase P_PHASE;
plane P_PLANE;
point P_POINT;
pointat P_POINTAT;
pow(er)? P_POWER;
psphere P_PSPHERE;
para(llelo)?gram P_QUAD;
radius P_RADIUS;
rad2deg P_RAD2DEG;
raw24 P_RAW24LPO;
real P_VREAL;
refl(ect)? P_REFLECT;
reset P_RESET;
res(olution)? P_RES;
ring P_RING;
rise P_RISE;
scale P_SCALE;
seg(ment)?s P_SEGMENTS;
size P_SIZE;
sin P_SIN;
sinh P_SINH;
skin P_SKIN;
sky P_SKY;
slice P_SLICE;
smooth P_SMOOTH;
smoothoff P_SMOOTHOFF;
smoothon P_SMOOTHON;
sphere P_SPHERE;
spin P_SPIN;
spread P_SPREAD;
sqrt P_SQRT;
starcolor P_STARCOLOR;
start P_START;
sub P_SUB;
subpatt(ern)? P_SUBSURF;
subtext(ure)? P_SUBTEXT;
tan P_TAN;
tanh P_TANH;
target P_TARGET;
text(ure)? P_TEXTURE;
thin(ness)? P_THIN;
trans(mit)? P_TRANSMIT;
translate P_TRANSLATE;
tri(angle) P_TRIANGLE;
tube P_TUBE;
undef(ine)?patt(ern)? P_UNSURF;
usepatt(ern)? P_USESURF;
up P_UP;
v1 P_V1;
v2 P_V2;
v3 P_V3;
var(iable)? P_VARIABLE;
vector P_VECTOR;
vertex P_VERTEX;
vfov P_VFOV;
vseg(ment)?s P_VSEGS;
waves P_WAVES;
wood P_WOOD;
wrapcy(linder)? P_WRAPCY;
wrapsp(here)? P_WRAPSP;
wrapfl(at)? P_WRAPFL;
xaxis P_XAXIS;
xlen(gth)? P_XLEN;
xphase P_XPHASE;
xrep(eat)? P_XREP;
rep(eat)?x P_REPEATX;
rep(eat)?y P_REPEATY;
xrot(ate)? P_XROTATE;
xsize P_XSIZE;
yaxis P_YAXIS;
ylen(gth)? P_YLEN;
yoffset P_YOFFSET;
yphase P_YPHASE;
yrep(eat)? P_YREP;
yrot(ate)? P_YROTATE;
ysize P_YSIZE;
zenith P_ZENITH;
zoffset P_ZOFFSET;
zphase P_ZPHASE;
zrot(ate)? P_ZROTATE;
zsize P_ZSIZE;
{id} TYPE_IDENT;
{filename} TYPE_FILENAME;
{text} TYPE_TEXT;
. yyerror(MsgBuff, "Unrecognized lexical token %s on line %d");
%%