home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
GRAPHICS
/
rayshade.lzh
/
input_lex.c
< prev
next >
Wrap
Text File
|
1990-09-29
|
42KB
|
1,465 lines
/* A lexical scanner generated by flex */
/* scanner skeleton version:
* $Header: /usr/fsys/odin/a/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp $
*/
#define FLEX_SCANNER
#include <stdio.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
#include <osfcn.h>
/* use prototypes in function declarations */
#define YY_USE_PROTOS
/* the "const" storage-class-modifier is valid */
#define YY_USE_CONST
#else /* ! __cplusplus */
#ifdef __STDC__
#ifdef __GNUC__
#include <stddef.h>
void *malloc( size_t );
void free( void* );
#else
#include <stdlib.h>
#endif /* __GNUC__ */
#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
#ifdef __TURBOC__
#define YY_USE_CONST
#endif
#ifndef YY_USE_CONST
#define const
#endif
#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
/* we can't get here if it's an ANSI C compiler, or a C++ compiler,
* so it's got to be a K&R compiler, and therefore there's no standard
* place from which to include these definitions
*/
char *malloc();
int free();
int read();
#endif
/* amount of stuff to slurp up with each read */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* returned upon end-of-file */
#define YY_END_TOK 0
/* copy whatever the last rule matched to the standard output */
/* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
/* this used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite()
*/
#define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
/* gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#define YY_INPUT(buf,result,max_size) \
if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "read() in flex scanner failed" );
#define YY_NULL 0
/* no semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#define yyterminate() return ( YY_NULL )
/* report a fatal error */
/* The funky do-while is used to turn this macro definition into
* a single C statement (which needs a semi-colon terminator).
* This avoids problems with code like:
*
* if ( something_happens )
* YY_FATAL_ERROR( "oops, the something happened" );
* else
* everything_okay();
*
* Prior to using the do-while the compiler would get upset at the
* "else" because it interpreted the "if" statement as being all
* done when it reached the ';' after the YY_FATAL_ERROR() call.
*/
#define YY_FATAL_ERROR(msg) \
do \
{ \
(void) fputs( msg, stderr ); \
(void) putc( '\n', stderr ); \
exit( 1 ); \
} \
while ( 0 )
/* default yywrap function - always treat EOF as an EOF */
#ifndef OSK
#define yywrap() 1
#endif
/* enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN
*/
#define BEGIN yy_start = 1 + 2 *
/* action number for EOF rule of a given start state */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* special action meaning "start processing a new file" */
#define YY_NEW_FILE \
do \
{ \
yy_init_buffer( yy_current_buffer, yyin ); \
yy_load_buffer_state(); \
} \
while ( 0 )
/* default declaration of generated scanner - a define so the user can
* easily add parameters
*/
#define YY_DECL int yylex YY_PROTO(( void ))
/* code executed at the end of each rule */
#define YY_BREAK break;
#define YY_END_OF_BUFFER_CHAR 0
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
#endif
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define YY_CHAR char
#define INITIAL 0
/* input_lex.l */
/* */
/* Copyright (C) 1989, Craig E. Kolb */
/* */
/* This software may be freely copied, modified, and redistributed, */
/* provided that this copyright notice is preserved on all copies. */
/* */
/* There is no warranty or other guarantee of fitness for this software, */
/* it is provided solely "as is". Bug reports or fixes may be sent */
/* to the author, who may or may not act on them as he desires. */
/* */
/* You may not include this software in a program or other software product */
/* without supplying the source, or without informing the end-user that the */
/* source is available for no extra charge. */
/* */
/* $Id: input_lex.l,v 3.0.1.4 90/03/07 21:26:29 craig Exp $ */
#ifdef SYSV
#include <string.h>
#else
#include <strings.h>
#endif
#include "typedefs.h"
#include "y.tab.h"
double atof();
char *strsave();
/* done after the current pattern has been matched and before the
* corresponding action - sets up yytext
*/
#define YY_DO_BEFORE_ACTION \
yytext = yy_bp; \
yyleng = yy_cp - yy_bp; \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
/* return all but the first 'n' matched characters back to the input stream */
#define yyless(n) \
do \
{ \
/* undo effects of setting up yytext */ \
*yy_cp = yy_hold_char; \
yy_c_buf_p = yy_cp = yy_bp + n; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, yytext )
struct yy_buffer_state
{
FILE *yy_input_file;
YY_CHAR *yy_ch_buf; /* input buffer */
YY_CHAR *yy_buf_pos; /* current position in input buffer */
/* size of input buffer in bytes, not including room for EOB characters*/
int yy_buf_size;
/* number of characters read into yy_ch_buf, not including EOB characters */
int yy_n_chars;
int yy_eof_status; /* whether we've seen an EOF on this buffer */
#define EOF_NOT_SEEN 0
/* "pending" happens when the EOF has been seen but there's still
* some text process
*/
#define EOF_PENDING 1
#define EOF_DONE 2
};
static YY_BUFFER_STATE yy_current_buffer;
/* we provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state"
*/
#define YY_CURRENT_BUFFER yy_current_buffer
/* yy_hold_char holds the character lost when yytext is formed */
static YY_CHAR yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
#ifndef YY_USER_INIT
#define YY_USER_INIT
#endif
extern YY_CHAR *yytext;
extern int yyleng;
extern FILE *yyin, *yyout;
YY_CHAR *yytext;
int yyleng;
int yylineno = 1;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
#define YY_END_OF_BUFFER 62
typedef int yy_state_type;
static const short int yy_accept[300] =
{ 0,
0, 0, 62, 60, 1, 1, 60, 60, 55, 56,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 2,
0, 56, 58, 3, 55, 57, 0, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 53, 55, 0, 57, 0, 0,
59, 55, 55, 55, 55, 8, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 21, 55, 24, 25,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 0, 58, 0,
0, 57, 55, 55, 55, 55, 9, 55, 11, 55,
55, 55, 55, 55, 55, 55, 55, 20, 55, 55,
55, 27, 55, 55, 55, 31, 55, 55, 55, 35,
55, 55, 55, 55, 40, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 54, 0, 57, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 26, 55, 55, 30, 32, 55,
55, 55, 55, 38, 39, 55, 55, 55, 44, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 7,
55, 55, 13, 55, 15, 16, 55, 55, 55, 55,
55, 55, 55, 33, 55, 36, 55, 55, 42, 55,
45, 46, 47, 55, 55, 55, 55, 55, 55, 55,
55, 10, 55, 55, 55, 18, 55, 22, 55, 55,
55, 55, 37, 55, 43, 48, 49, 55, 55, 55,
4, 5, 55, 12, 14, 55, 19, 55, 55, 29,
34, 55, 55, 55, 52, 55, 55, 23, 55, 55,
50, 51, 6, 55, 55, 41, 17, 28, 0
} ;
static const YY_CHAR yy_ec[128] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 1, 4, 1, 1, 1, 1, 1,
1, 5, 6, 1, 7, 8, 9, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 1, 1, 1,
1, 1, 1, 1, 11, 11, 11, 11, 12, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1, 1, 1, 1, 13, 1, 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, 11, 1, 1, 1, 1, 1
} ;
static const YY_CHAR yy_meta[39] =
{ 0,
1, 1, 1, 1, 2, 1, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2
} ;
static const short int yy_base[301] =
{ 0,
0, 597, 600, 602, 602, 602, 31, 589, 593, 32,
592, 38, 40, 41, 42, 43, 44, 46, 48, 51,
56, 71, 77, 58, 82, 83, 84, 85, 90, 602,
586, 86, 91, 602, 590, 95, 113, 111, 103, 117,
101, 119, 121, 122, 123, 125, 126, 127, 129, 131,
130, 134, 133, 137, 136, 132, 139, 138, 150, 140,
144, 157, 160, 161, 162, 168, 164, 169, 172, 173,
174, 179, 175, 183, 589, 181, 193, 201, 208, 583,
582, 187, 186, 196, 201, 586, 202, 216, 217, 218,
219, 220, 221, 224, 222, 223, 232, 231, 585, 584,
225, 239, 228, 244, 246, 248, 249, 250, 253, 254,
256, 257, 255, 258, 53, 261, 264, 259, 266, 274,
275, 278, 267, 270, 263, 290, 289, 578, 577, 291,
576, 575, 279, 294, 295, 297, 579, 300, 578, 302,
303, 304, 305, 309, 312, 313, 311, 577, 306, 314,
315, 576, 316, 324, 318, 575, 320, 321, 325, 574,
329, 336, 339, 343, 573, 345, 347, 348, 349, 350,
351, 354, 355, 356, 357, 359, 572, 566, 565, 361,
358, 360, 366, 370, 367, 374, 379, 389, 390, 369,
372, 393, 373, 395, 569, 396, 399, 568, 567, 398,
402, 400, 409, 566, 565, 404, 406, 408, 564, 410,
414, 412, 420, 413, 416, 423, 415, 417, 418, 563,
422, 434, 562, 440, 561, 560, 435, 442, 444, 446,
447, 449, 454, 559, 450, 558, 456, 451, 557, 458,
556, 555, 554, 459, 460, 465, 462, 466, 468, 474,
475, 553, 477, 476, 480, 552, 482, 551, 483, 484,
495, 490, 550, 491, 549, 548, 546, 489, 492, 496,
545, 543, 497, 542, 541, 499, 540, 498, 500, 539,
537, 493, 511, 512, 535, 517, 514, 534, 518, 522,
533, 531, 530, 527, 524, 528, 180, 52, 602, 50
} ;
static const short int yy_def[301] =
{ 0,
299, 1, 299, 299, 299, 299, 299, 299, 300, 299,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 299,
299, 299, 299, 299, 300, 299, 299, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 299, 299, 299, 299,
299, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 299, 299, 299,
299, 299, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 299, 299, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 300, 300,
300, 300, 300, 300, 300, 300, 300, 300, 0, 299
} ;
static const short int yy_nxt[641] =
{ 0,
4, 5, 6, 4, 4, 7, 7, 8, 9, 10,
11, 11, 4, 12, 13, 14, 15, 16, 17, 18,
19, 11, 20, 11, 21, 22, 11, 23, 24, 11,
25, 26, 27, 28, 11, 29, 11, 11, 31, 36,
32, 32, 299, 37, 299, 299, 299, 299, 299, 37,
299, 35, 299, 40, 38, 299, 299, 299, 53, 48,
299, 44, 299, 49, 41, 57, 39, 42, 45, 50,
55, 54, 58, 43, 46, 299, 56, 59, 47, 51,
52, 299, 65, 60, 61, 66, 299, 299, 299, 299,
165, 63, 62, 36, 299, 32, 69, 37, 70, 67,
33, 73, 77, 37, 78, 299, 79, 299, 77, 68,
64, 71, 79, 75, 74, 299, 72, 76, 80, 80,
83, 299, 81, 299, 82, 299, 299, 299, 85, 299,
299, 299, 84, 299, 299, 299, 299, 299, 299, 88,
299, 299, 299, 299, 299, 92, 87, 94, 299, 89,
91, 96, 98, 102, 299, 86, 99, 90, 97, 93,
103, 299, 95, 101, 299, 299, 299, 107, 299, 105,
104, 100, 299, 299, 108, 113, 299, 299, 299, 299,
109, 106, 111, 299, 299, 299, 119, 299, 110, 114,
299, 299, 115, 112, 121, 116, 125, 118, 128, 128,
299, 117, 129, 120, 126, 299, 299, 122, 127, 123,
78, 124, 130, 131, 131, 133, 134, 132, 130, 135,
299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
137, 138, 299, 136, 139, 299, 299, 143, 145, 147,
142, 144, 146, 299, 150, 141, 149, 153, 299, 140,
299, 148, 299, 299, 299, 152, 151, 299, 299, 299,
299, 299, 299, 299, 158, 299, 155, 299, 299, 159,
299, 299, 157, 161, 299, 162, 154, 167, 299, 299,
156, 163, 299, 299, 164, 173, 160, 168, 166, 175,
169, 170, 171, 299, 299, 172, 178, 178, 299, 299,
179, 299, 174, 176, 299, 177, 299, 299, 299, 299,
299, 180, 183, 299, 182, 299, 299, 299, 299, 299,
299, 186, 299, 184, 299, 299, 181, 190, 299, 299,
187, 188, 185, 299, 191, 189, 196, 192, 194, 193,
299, 197, 201, 299, 202, 200, 195, 299, 199, 299,
198, 299, 299, 299, 299, 299, 204, 203, 299, 299,
299, 299, 299, 299, 299, 299, 209, 210, 213, 206,
299, 299, 208, 299, 299, 205, 299, 299, 299, 207,
222, 211, 217, 299, 212, 216, 220, 221, 215, 214,
219, 218, 223, 299, 299, 224, 228, 299, 230, 299,
299, 227, 299, 299, 299, 225, 299, 226, 299, 229,
299, 231, 299, 299, 299, 234, 299, 299, 299, 299,
299, 299, 299, 239, 299, 240, 299, 299, 232, 233,
235, 242, 236, 237, 246, 244, 241, 238, 299, 299,
247, 243, 248, 245, 299, 251, 299, 250, 299, 249,
299, 299, 252, 299, 299, 299, 255, 254, 299, 256,
299, 257, 299, 299, 299, 253, 299, 260, 259, 299,
299, 261, 299, 263, 258, 269, 266, 267, 299, 299,
299, 299, 262, 264, 299, 271, 299, 299, 299, 265,
270, 272, 268, 299, 299, 299, 299, 299, 277, 299,
299, 299, 299, 299, 299, 279, 275, 276, 273, 274,
281, 280, 282, 285, 278, 299, 299, 289, 299, 283,
290, 299, 299, 286, 284, 287, 299, 294, 299, 292,
288, 299, 299, 293, 299, 299, 291, 299, 299, 299,
298, 299, 295, 299, 299, 299, 299, 299, 296, 299,
299, 297, 299, 299, 299, 299, 299, 299, 299, 299,
299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
299, 299, 299, 299, 179, 179, 299, 299, 299, 299,
299, 299, 299, 299, 132, 132, 129, 129, 299, 299,
299, 81, 81, 299, 299, 33, 299, 34, 33, 299,
30, 3, 299, 299, 299, 299, 299, 299, 299, 299,
299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
299, 299, 299, 299, 299, 299, 299, 299, 299, 299
} ;
static const short int yy_chk[641] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 7, 10,
7, 10, 12, 10, 13, 14, 15, 16, 17, 10,
18, 300, 19, 13, 12, 20, 298, 115, 17, 15,
21, 14, 24, 15, 13, 19, 12, 13, 14, 16,
18, 17, 20, 13, 14, 22, 18, 21, 14, 16,
16, 23, 24, 21, 22, 24, 25, 26, 27, 28,
115, 23, 22, 32, 29, 32, 26, 32, 26, 25,
33, 27, 33, 32, 36, 41, 36, 39, 33, 25,
23, 26, 36, 28, 27, 38, 26, 29, 37, 37,
39, 40, 37, 42, 38, 43, 44, 45, 41, 46,
47, 48, 40, 49, 51, 50, 56, 53, 52, 44,
55, 54, 58, 57, 60, 48, 43, 50, 61, 45,
47, 52, 54, 56, 59, 42, 54, 46, 53, 49,
57, 62, 51, 55, 63, 64, 65, 60, 67, 59,
58, 54, 66, 68, 61, 65, 69, 70, 71, 73,
61, 59, 63, 72, 297, 76, 70, 74, 62, 66,
83, 82, 66, 64, 71, 67, 74, 69, 77, 77,
84, 68, 77, 70, 74, 85, 87, 72, 76, 72,
78, 73, 78, 79, 79, 82, 83, 79, 78, 84,
88, 89, 90, 91, 92, 93, 95, 96, 94, 101,
87, 88, 103, 85, 89, 98, 97, 92, 93, 95,
91, 92, 94, 102, 98, 90, 97, 103, 104, 89,
105, 96, 106, 107, 108, 102, 101, 109, 110, 113,
111, 112, 114, 118, 108, 116, 105, 125, 117, 109,
119, 123, 107, 111, 124, 112, 104, 117, 120, 121,
106, 113, 122, 133, 114, 123, 110, 118, 116, 125,
119, 120, 121, 127, 126, 122, 130, 130, 134, 135,
130, 136, 124, 126, 138, 127, 140, 141, 142, 143,
149, 133, 136, 144, 135, 147, 145, 146, 150, 151,
153, 141, 155, 138, 157, 158, 134, 145, 154, 159,
142, 143, 140, 161, 146, 144, 153, 147, 150, 149,
162, 154, 159, 163, 161, 158, 151, 164, 157, 166,
155, 167, 168, 169, 170, 171, 163, 162, 172, 173,
174, 175, 181, 176, 182, 180, 169, 170, 173, 166,
183, 185, 168, 190, 184, 164, 191, 193, 186, 167,
185, 171, 180, 187, 172, 176, 183, 184, 175, 174,
182, 181, 186, 188, 189, 187, 191, 192, 193, 194,
196, 190, 200, 197, 202, 188, 201, 189, 206, 192,
207, 194, 208, 203, 210, 200, 212, 214, 211, 217,
215, 218, 219, 207, 213, 208, 221, 216, 196, 197,
201, 211, 202, 203, 215, 213, 210, 206, 222, 227,
215, 212, 216, 214, 224, 219, 228, 218, 229, 217,
230, 231, 221, 232, 235, 238, 227, 224, 233, 228,
237, 229, 240, 244, 245, 222, 247, 232, 231, 246,
248, 233, 249, 237, 230, 247, 244, 245, 250, 251,
254, 253, 235, 238, 255, 249, 257, 259, 260, 240,
248, 250, 246, 268, 262, 264, 269, 282, 257, 261,
270, 273, 278, 276, 279, 260, 254, 255, 251, 253,
262, 261, 264, 270, 259, 283, 284, 279, 287, 268,
282, 286, 289, 273, 269, 276, 290, 287, 295, 284,
278, 294, 296, 286, 293, 292, 283, 291, 288, 285,
295, 281, 289, 280, 277, 275, 274, 272, 290, 271,
267, 294, 266, 265, 263, 258, 256, 252, 243, 242,
241, 239, 236, 234, 226, 225, 223, 220, 209, 205,
204, 199, 198, 195, 179, 178, 177, 165, 160, 156,
152, 148, 139, 137, 132, 131, 129, 128, 100, 99,
86, 81, 80, 75, 35, 31, 11, 9, 8, 3,
2, 299, 299, 299, 299, 299, 299, 299, 299, 299,
299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
299, 299, 299, 299, 299, 299, 299, 299, 299, 299
} ;
static yy_state_type yy_last_accepting_state;
static YY_CHAR *yy_last_accepting_cpos;
/* the intent behind this definition is that it'll catch
* any uses of REJECT which flex missed
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
/* these variables are all declared out here so that section 3 code can
* manipulate them
*/
/* points to current character in buffer */
static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
static int yy_init = 1; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
void yyrestart YY_PROTO(( FILE *input_file ));
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
#define yy_new_buffer yy_create_buffer
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
YY_DECL
{
register yy_state_type yy_current_state;
register YY_CHAR *yy_cp, *yy_bp;
register int yy_act;
if ( yy_init )
{
YY_USER_INIT;
if ( ! yy_start )
yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( yy_current_buffer )
yy_init_buffer( yy_current_buffer, yyin );
else
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
yy_load_buffer_state();
yy_init = 0;
}
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = yy_c_buf_p;
/* support of yytext */
*yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of the
* current run.
*/
yy_bp = yy_cp;
yy_current_state = yy_start;
if ( yy_bp[-1] == '\n' )
++yy_current_state;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[*yy_cp];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 300 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 299 );
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
yy_find_action:
yy_act = yy_accept[yy_current_state];
YY_DO_BEFORE_ACTION;
YY_USER_ACTION;
do_action: /* this label is used only to access EOF actions */
switch ( yy_act )
{
case 0: /* must backtrack */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
;
YY_BREAK
case 2:
{handlehash();}
YY_BREAK
case 3:
{skipcomments();}
YY_BREAK
case 4:
{return(tADAPTIVE);}
YY_BREAK
case 5:
{return(tAPERTURE);}
YY_BREAK
case 6:
{return(tBACKGROUND);}
YY_BREAK
case 7:
{return(tBLOTCH);}
YY_BREAK
case 8:
{return(tBOX);}
YY_BREAK
case 9:
{return(tBUMP);}
YY_BREAK
case 10:
{return(tCHECKER);}
YY_BREAK
case 11:
{return(tCONE);}
YY_BREAK
case 12:
{return(tCONTRAST);}
YY_BREAK
case 13:
{return(tCUTOFF);}
YY_BREAK
case 14:
{return(tCYL);}
YY_BREAK
case 15:
{return(tENDDEF);}
YY_BREAK
case 16:
{return(tSTARTDEF);}
YY_BREAK
case 17:
{return(tDIRECTIONAL);}
YY_BREAK
case 18:
{return(tENDFILE);}
YY_BREAK
case 19:
{return(tEXTENDED);}
YY_BREAK
case 20:
{return(tEYEP);}
YY_BREAK
case 21:
{return(tFBM);}
YY_BREAK
case 22:
{return(tFBMBUMP);}
YY_BREAK
case 23:
{return(tFOCALDIST);}
YY_BREAK
case 24:
{return(tFOG);}
YY_BREAK
case 25:
{return(tFOV);}
YY_BREAK
case 26:
{return(tGLOSS);}
YY_BREAK
case 27:
{return(tGRID);}
YY_BREAK
case 28:
{return(tHEIGHTFIELD);}
YY_BREAK
case 29:
{return(tJITTERED);}
YY_BREAK
case 30:
{return(tLIGHT);}
YY_BREAK
case 31:
{return(tLIST);}
YY_BREAK
case 32:
{return(tLOOKP);}
YY_BREAK
case 33:
{return(tMARBLE);}
YY_BREAK
case 34:
{return(tMAXDEPTH);}
YY_BREAK
case 35:
{return(tMIST);}
YY_BREAK
case 36:
{return(tOBJECT);}
YY_BREAK
case 37:
{return(tOUTFILE);}
YY_BREAK
case 38:
{return(tPLANE);}
YY_BREAK
case 39:
{return(tPOINT);}
YY_BREAK
case 40:
{return(tPOLY);}
YY_BREAK
case 41:
{return(tRESOLUTION);}
YY_BREAK
case 42:
{return(tROTATE);}
YY_BREAK
case 43:
{return(tSAMPLES);}
YY_BREAK
case 44:
{return(tSCALE);}
YY_BREAK
case 45:
{return(tSCREEN);}
YY_BREAK
case 46:
{return(tSPHERE);}
YY_BREAK
case 47:
{return(tSUPERQ);}
YY_BREAK
case 48:
{return(tSURFACE);}
YY_BREAK
case 49:
{return(tTEXTURE);}
YY_BREAK
case 50:
{return(tTRANSFORM);}
YY_BREAK
case 51:
{return(tTRANSLATE);}
YY_BREAK
case 52:
{return(tTRIANGLE);}
YY_BREAK
case 53:
{return(tUP);}
YY_BREAK
case 54:
{return(tWOOD);}
YY_BREAK
case 55:
{yylval.c = strsave(yytext);
return(tSTRING);}
YY_BREAK
case 56:
{yylval.i = atoi(yytext);
return(tINT);}
YY_BREAK
case 57:
case 58:
case 59:
{yylval.d = atof(yytext); return(tFLOAT);}
YY_BREAK
case 60:
{return yytext[0];}
YY_BREAK
case 61:
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
yyterminate();
case YY_END_OF_BUFFER:
{
/* amount of text matched not including the EOB char */
int yy_amount_of_matched_text = yy_cp - yytext - 1;
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yy_hold_char;
/* note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the end-
* of-buffer state). Contrast this with the test in yyinput().
*/
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* this was really a NUL */
{
yy_state_type yy_next_state;
yy_c_buf_p = yytext + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
/* okay, we're now positioned to make the
* NUL transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we
* don't want to build jamming into it because
* then it will run more slowly)
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = yytext + YY_MORE_ADJ;
if ( yy_next_state )
{
/* consume the NUL */
yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = yy_last_accepting_cpos;
yy_current_state = yy_last_accepting_state;
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
yy_did_buffer_switch_on_eof = 0;
if ( yywrap() )
{
/* note: because we've taken care in
* yy_get_next_buffer() to have set up yytext,
* we can now set up yy_c_buf_p so that if some
* total hoser (like flex itself) wants
* to call the scanner after we return the
* YY_NULL, it'll still work - another YY_NULL
* will get returned.
*/
yy_c_buf_p = yytext + YY_MORE_ADJ;
yy_act = YY_STATE_EOF((yy_start - 1) / 2);
goto do_action;
}
else
{
if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
}
break;
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
yy_c_buf_p =
&yy_current_buffer->yy_ch_buf[yy_n_chars];
yy_current_state = yy_get_previous_state();
yy_cp = yy_c_buf_p;
yy_bp = yytext + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
#ifdef FLEX_DEBUG
printf( "action # %d\n", yy_act );
#endif
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
}
}
}
/* yy_get_next_buffer - try to read in a new buffer
*
* synopsis
* int yy_get_next_buffer();
*
* returns a code representing an action
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
{
register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
register int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
/* try to read more data */
/* first move last chars to start of buffer */
number_to_move = yy_c_buf_p - yytext;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
yy_n_chars = 0;
else
{
int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
else if ( num_to_read <= 0 )
YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
/* read in more data */
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
yy_n_chars, num_to_read );
}
if ( yy_n_chars == 0 )
{
if ( number_to_move == 1 )
{
ret_val = EOB_ACT_END_OF_FILE;
yy_current_buffer->yy_eof_status = EOF_DONE;
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_eof_status = EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
yy_n_chars += number_to_move;
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
/* yytext begins at the second character in yy_ch_buf; the first
* character is the one which preceded it before reading in the latest
* buffer; it needs to be kept around in case it's a newline, so
* yy_get_previous_state() will have with '^' rules active
*/
yytext = &yy_current_buffer->yy_ch_buf[1];
return ( ret_val );
}
/* yy_get_previous_state - get the state just before the EOB char was reached
*
* synopsis
* yy_state_type yy_get_previous_state();
*/
static yy_state_type yy_get_previous_state()
{
register yy_state_type yy_current_state;
register YY_CHAR *yy_cp;
register YY_CHAR *yy_bp = yytext;
yy_current_state = yy_start;
if ( yy_bp[-1] == '\n' )
++yy_current_state;
for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 300 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return ( yy_current_state );
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
register yy_state_type yy_current_state;
#endif
{
register int yy_is_jam;
register YY_CHAR *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = yy_def[yy_current_state];
if ( yy_current_state >= 300 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 299);
return ( yy_is_jam ? 0 : yy_current_state );
}
#ifdef YY_USE_PROTOS
static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
#else
static void yyunput( c, yy_bp )
YY_CHAR c;
register YY_CHAR *yy_bp;
#endif
{
register YY_CHAR *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
register YY_CHAR *dest =
&yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
register YY_CHAR *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += dest - source;
yy_bp += dest - source;
yy_n_chars = yy_current_buffer->yy_buf_size;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
yy_cp[-2] = '\n';
if ((*--yy_cp = c) == '\n')
yylineno--;
/* note: the formal parameter *must* be called "yy_bp" for this
* macro to now work correctly
*/
YY_DO_BEFORE_ACTION; /* set up yytext again */
}
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
{
int c;
YY_CHAR *yy_cp = yy_c_buf_p;
*yy_cp = yy_hold_char;
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* this was really a NUL */
*yy_c_buf_p = '\0';
else
{ /* need more input */
yytext = yy_c_buf_p;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
if ( yywrap() )
{
yy_c_buf_p = yytext + YY_MORE_ADJ;
return ( EOF );
}
YY_NEW_FILE;
#ifdef __cplusplus
return ( yyinput() );
#else
return ( input() );
#endif
}
break;
case EOB_ACT_CONTINUE_SCAN:
yy_c_buf_p = yytext + YY_MORE_ADJ;
break;
case EOB_ACT_LAST_MATCH:
#ifdef __cplusplus
YY_FATAL_ERROR( "unexpected last match in yyinput()" );
#else
YY_FATAL_ERROR( "unexpected last match in input()" );
#endif
}
}
}
if ((c = *yy_c_buf_p) == '\n')
yylineno++;
yy_hold_char = *++yy_c_buf_p;
return ( c );
}
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
{
yy_init_buffer( yy_current_buffer, input_file );
yy_load_buffer_state();
}
#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
{
if ( yy_current_buffer == new_buffer )
return;
if ( yy_current_buffer )
{
/* flush out information for old buffer */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
}
yy_current_buffer = new_buffer;
yy_load_buffer_state();
/* we don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
yy_did_buffer_switch_on_eof = 1;
}
#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
}
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
yy_init_buffer( b, file );
return ( b );
}
#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
{
if ( b == yy_current_buffer )
yy_current_buffer = (YY_BUFFER_STATE) 0;
free( (char *) b->yy_ch_buf );
free( (char *) b );
}
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif
{
b->yy_input_file = file;
/* we put in the '\n' and start reading from [1] so that an
* initial match-at-newline will be true.
*/
b->yy_ch_buf[0] = '\n';
b->yy_n_chars = 1;
/* we always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[1];
b->yy_eof_status = EOF_NOT_SEEN;
}
yywrap() {return(1);}
/*
* Skip over comments.
*/
skipcomments()
{
char c;
while (1) {
while (input() != '*')
;
if ((c = input()) == '/')
return;
unput(c);
}
}
/*
* Deal with ccp-produced lines of the form:
* # n "filename"
* and
* # n
* Where filename is the name of the file being processed, and n is
* the current line number in that file.
*/
handlehash()
{
char buf[BUFSIZ];
int i;
extern int yylineno;
extern char yyfilename[];
/*
* Read the entire line into buf.
*/
for (i = 0; (buf[i] = input()) != '\n'; i++)
;
unput(buf[i]); /* To make sure consecutive # lines work. */
buf[i] = (char)NULL; /* Replace newline with NULL. */
/*
* Complain if the line was not of the form #n "filename"
*/
if ((i = sscanf(buf, "%d \"%[^\"]s\"", &yylineno, yyfilename)) == 0) {
yyerror("Unknown '#' control.");
exit(1);
}
if (i == 1) {
#ifdef SYSV
if (strchr(buf, '"') != (char *)0) {
#else
if (index(buf, '"') != (char *)0) {
#endif
/*
* Filename was "", which means stdin.
*/
strcpy(yyfilename, "stdin");
}
}
}