source: OGRE/trunk/ogrenew/RenderSystems/GL/src/nvparse/_ps1.0_lexer.cpp @ 657

Revision 657, 50.3 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1#define yy_create_buffer ps10__create_buffer
2#define yy_delete_buffer ps10__delete_buffer
3#define yy_scan_buffer ps10__scan_buffer
4#define yy_scan_string ps10__scan_string
5#define yy_scan_bytes ps10__scan_bytes
6#define yy_flex_debug ps10__flex_debug
7#define yy_init_buffer ps10__init_buffer
8#define yy_flush_buffer ps10__flush_buffer
9#define yy_load_buffer_state ps10__load_buffer_state
10#define yy_switch_to_buffer ps10__switch_to_buffer
11#define yyin ps10_in
12#define yyleng ps10_leng
13#define yylex ps10_lex
14#define yyout ps10_out
15#define yyrestart ps10_restart
16#define yytext ps10_text
17#define yywrap ps10_wrap
18
19#line 20 "_ps1.0_lexer.cpp"
20/* A lexical scanner generated by flex */
21
22/* Scanner skeleton version:
23 * $Header: /cvsroot/ogre/ogrenew/RenderSystems/GL/src/nvparse/_ps1.0_lexer.cpp,v 1.1 2003/12/14 04:58:12 josullivan Exp $
24 */
25
26#define FLEX_SCANNER
27#define YY_FLEX_MAJOR_VERSION 2
28#define YY_FLEX_MINOR_VERSION 5
29
30#include <stdio.h>
31#include <unistd.h>
32
33
34/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
35#ifdef c_plusplus
36#ifndef __cplusplus
37#define __cplusplus
38#endif
39#endif
40
41
42#ifdef __cplusplus
43
44#include <stdlib.h>
45
46/* Use prototypes in function declarations. */
47#define YY_USE_PROTOS
48
49/* The "const" storage-class-modifier is valid. */
50#define YY_USE_CONST
51
52#else   /* ! __cplusplus */
53
54#if __STDC__
55
56#define YY_USE_PROTOS
57#define YY_USE_CONST
58
59#endif  /* __STDC__ */
60#endif  /* ! __cplusplus */
61
62#ifdef __TURBOC__
63 #pragma warn -rch
64 #pragma warn -use
65#include <io.h>
66#include <stdlib.h>
67#define YY_USE_CONST
68#define YY_USE_PROTOS
69#endif
70
71#ifdef YY_USE_CONST
72#define yyconst const
73#else
74#define yyconst
75#endif
76
77
78#ifdef YY_USE_PROTOS
79#define YY_PROTO(proto) proto
80#else
81#define YY_PROTO(proto) ()
82#endif
83
84/* Returned upon end-of-file. */
85#define YY_NULL 0
86
87/* Promotes a possibly negative, possibly signed char to an unsigned
88 * integer for use as an array index.  If the signed char is negative,
89 * we want to instead treat it as an 8-bit unsigned char, hence the
90 * double cast.
91 */
92#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
93
94/* Enter a start condition.  This macro really ought to take a parameter,
95 * but we do it the disgusting crufty way forced on us by the ()-less
96 * definition of BEGIN.
97 */
98#define BEGIN yy_start = 1 + 2 *
99
100/* Translate the current start state into a value that can be later handed
101 * to BEGIN to return to the state.  The YYSTATE alias is for lex
102 * compatibility.
103 */
104#define YY_START ((yy_start - 1) / 2)
105#define YYSTATE YY_START
106
107/* Action number for EOF rule of a given start state. */
108#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
109
110/* Special action meaning "start processing a new file". */
111#define YY_NEW_FILE yyrestart( yyin )
112
113#define YY_END_OF_BUFFER_CHAR 0
114
115/* Size of default input buffer. */
116#define YY_BUF_SIZE 16384
117
118typedef struct yy_buffer_state *YY_BUFFER_STATE;
119
120extern int yyleng;
121extern FILE *yyin, *yyout;
122
123#define EOB_ACT_CONTINUE_SCAN 0
124#define EOB_ACT_END_OF_FILE 1
125#define EOB_ACT_LAST_MATCH 2
126
127/* The funky do-while in the following #define is used to turn the definition
128 * int a single C statement (which needs a semi-colon terminator).  This
129 * avoids problems with code like:
130 *
131 *      if ( condition_holds )
132 *              yyless( 5 );
133 *      else
134 *              do_something_else();
135 *
136 * Prior to using the do-while the compiler would get upset at the
137 * "else" because it interpreted the "if" statement as being all
138 * done when it reached the ';' after the yyless() call.
139 */
140
141/* Return all but the first 'n' matched characters back to the input stream. */
142
143#define yyless(n) \
144        do \
145                { \
146                /* Undo effects of setting up yytext. */ \
147                *yy_cp = yy_hold_char; \
148                YY_RESTORE_YY_MORE_OFFSET \
149                yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
150                YY_DO_BEFORE_ACTION; /* set up yytext again */ \
151                } \
152        while ( 0 )
153
154#define unput(c) yyunput( c, yytext_ptr )
155
156/* The following is because we cannot portably get our hands on size_t
157 * (without autoconf's help, which isn't available because we want
158 * flex-generated scanners to compile on their own).
159 */
160typedef unsigned int yy_size_t;
161
162
163struct yy_buffer_state
164        {
165        FILE *yy_input_file;
166
167        char *yy_ch_buf;                /* input buffer */
168        char *yy_buf_pos;               /* current position in input buffer */
169
170        /* Size of input buffer in bytes, not including room for EOB
171         * characters.
172         */
173        yy_size_t yy_buf_size;
174
175        /* Number of characters read into yy_ch_buf, not including EOB
176         * characters.
177         */
178        int yy_n_chars;
179
180        /* Whether we "own" the buffer - i.e., we know we created it,
181         * and can realloc() it to grow it, and should free() it to
182         * delete it.
183         */
184        int yy_is_our_buffer;
185
186        /* Whether this is an "interactive" input source; if so, and
187         * if we're using stdio for input, then we want to use getc()
188         * instead of fread(), to make sure we stop fetching input after
189         * each newline.
190         */
191        int yy_is_interactive;
192
193        /* Whether we're considered to be at the beginning of a line.
194         * If so, '^' rules will be active on the next match, otherwise
195         * not.
196         */
197        int yy_at_bol;
198
199        /* Whether to try to fill the input buffer when we reach the
200         * end of it.
201         */
202        int yy_fill_buffer;
203
204        int yy_buffer_status;
205#define YY_BUFFER_NEW 0
206#define YY_BUFFER_NORMAL 1
207        /* When an EOF's been seen but there's still some text to process
208         * then we mark the buffer as YY_EOF_PENDING, to indicate that we
209         * shouldn't try reading from the input source any more.  We might
210         * still have a bunch of tokens to match, though, because of
211         * possible backing-up.
212         *
213         * When we actually see the EOF, we change the status to "new"
214         * (via yyrestart()), so that the user can continue scanning by
215         * just pointing yyin at a new input file.
216         */
217#define YY_BUFFER_EOF_PENDING 2
218        };
219
220static YY_BUFFER_STATE yy_current_buffer = 0;
221
222/* We provide macros for accessing buffer states in case in the
223 * future we want to put the buffer states in a more general
224 * "scanner state".
225 */
226#define YY_CURRENT_BUFFER yy_current_buffer
227
228
229/* yy_hold_char holds the character lost when yytext is formed. */
230static char yy_hold_char;
231
232static int yy_n_chars;          /* number of characters read into yy_ch_buf */
233
234
235int yyleng;
236
237/* Points to current character in buffer. */
238static char *yy_c_buf_p = (char *) 0;
239static int yy_init = 1;         /* whether we need to initialize */
240static int yy_start = 0;        /* start state number */
241
242/* Flag which is used to allow yywrap()'s to do buffer switches
243 * instead of setting up a fresh yyin.  A bit of a hack ...
244 */
245static int yy_did_buffer_switch_on_eof;
246
247void yyrestart YY_PROTO(( FILE *input_file ));
248
249void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
250void yy_load_buffer_state YY_PROTO(( void ));
251YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
252void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
253void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
254void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
255#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
256
257YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
258YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
259YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
260
261static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
262static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
263static void yy_flex_free YY_PROTO(( void * ));
264
265#define yy_new_buffer yy_create_buffer
266
267#define yy_set_interactive(is_interactive) \
268        { \
269        if ( ! yy_current_buffer ) \
270                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
271        yy_current_buffer->yy_is_interactive = is_interactive; \
272        }
273
274#define yy_set_bol(at_bol) \
275        { \
276        if ( ! yy_current_buffer ) \
277                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
278        yy_current_buffer->yy_at_bol = at_bol; \
279        }
280
281#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
282
283typedef unsigned char YY_CHAR;
284FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
285typedef int yy_state_type;
286extern char *yytext;
287#define yytext_ptr yytext
288
289static yy_state_type yy_get_previous_state YY_PROTO(( void ));
290static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
291static int yy_get_next_buffer YY_PROTO(( void ));
292static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
293
294/* Done after the current pattern has been matched and before the
295 * corresponding action - sets up yytext.
296 */
297#define YY_DO_BEFORE_ACTION \
298        yytext_ptr = yy_bp; \
299        yyleng = (int) (yy_cp - yy_bp); \
300        yy_hold_char = *yy_cp; \
301        *yy_cp = '\0'; \
302        yy_c_buf_p = yy_cp;
303
304#define YY_NUM_RULES 36
305#define YY_END_OF_BUFFER 37
306static yyconst short int yy_accept[231] =
307    {   0,
308        0,    0,    0,    0,   37,   35,   33,   32,   35,   35,
309       35,   35,    1,   35,   35,   35,   35,   35,   35,   35,
310       35,   35,   35,   35,   35,   35,    5,    5,   33,   32,
311        0,    0,    0,    0,    0,    0,    0,    2,    0,    0,
312        0,    0,    8,    0,    0,    0,    0,    0,    0,    0,
313        7,    0,    9,    0,   10,    0,    5,    4,    3,    0,
314       11,    0,    0,   12,    6,   13,   14,   15,   16,   17,
315        0,    0,   18,    0,    0,   19,    0,    0,    3,    0,
316        0,    8,    0,    0,    0,    0,    0,    0,    0,    0,
317        0,    7,    0,    0,    0,    0,    9,    0,    0,    0,
318
319        0,    0,    0,    0,    0,   10,    0,    0,    0,    0,
320        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
321        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
322        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
323        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
324        0,    0,    0,    0,    0,   34,   11,    0,    0,   12,
325        0,   13,    0,   14,    0,   15,    0,   16,    0,   17,
326        0,    0,   18,    0,    0,   20,    0,    0,    0,    0,
327        0,    0,   11,    0,   12,    0,   13,    0,   14,    0,
328       15,    0,   16,    0,   17,    0,   18,   21,    0,   23,
329
330        0,    0,    0,   22,    0,    0,    0,    0,    0,    0,
331        0,    0,    0,    0,    0,    0,    0,    0,   26,   27,
332       24,   25,   28,    0,   30,    0,   29,    0,   31,    0
333    } ;
334
335static yyconst int yy_ec[256] =
336    {   0,
337        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
338        1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
339        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
340        1,    2,    1,    1,    1,    1,    1,    1,    1,    1,
341        1,    1,    5,    1,    6,    7,    8,    9,   10,   11,
342       12,   13,   14,   14,   14,   15,   15,    1,   16,    1,
343        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
344        1,    1,    1,    1,    1,    1,    1,    1,    1,   17,
345        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
346        1,    1,    1,    1,   18,    1,   19,   20,   21,   22,
347
348       23,   24,   25,    1,   26,    1,   27,   28,   29,   30,
349       31,   32,    1,   33,   34,   35,   36,   37,   38,   39,
350       40,   41,    1,    1,    1,    1,    1,    1,    1,    1,
351        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
352        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
353        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
354        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
355        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
356        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
357        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
358
359        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
360        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
361        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
362        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
363        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
364        1,    1,    1,    1,    1
365    } ;
366
367static yyconst int yy_meta[42] =
368    {   0,
369        1,    1,    2,    1,    1,    1,    3,    1,    4,    4,
370        4,    4,    4,    4,    5,    1,    1,    1,    1,    1,
371        1,    1,    1,    1,    1,    1,    1,    1,    1,    6,
372        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
373        1
374    } ;
375
376static yyconst short int yy_base[236] =
377    {   0,
378        0,    0,   37,    0,  365,  366,   51,   54,  361,   43,
379      355,   57,  366,  328,  339,  330,   37,  326,   43,   56,
380      322,   61,   58,  350,   75,    0,  349,   79,   85,   88,
381      352,   91,   81,  110,   88,   94,   90,  366,  105,  107,
382      347,  331,  108,  330,  327,  338,  317,  326,  310,  318,
383      118,  325,  120,  305,  123,    0,  336,    0,    0,  332,
384      323,  112,  320,  321,  366,  320,  319,  318,  317,  316,
385      114,  313,  314,  129,  311,  136,  139,  310,    0,    0,
386      121,  366,  304,  288,  135,  132,  142,  148,  151,  157,
387      158,  366,  302,  286,  149,  161,  366,  300,  284,  160,
388
389      300,  291,  295,  308,  296,  366,  293,  277,  163,  184,
390      305,  296,  124,  294,  272,  293,  300,  299,  290,  190,
391      297,  288,  193,  295,  286,  194,  293,  284,  197,  291,
392      282,  198,  289,  280,  201,  278,  256,  277,  284,  283,
393      274,  202,  272,  250,  271,  278,  259,  256,  258,  246,
394      259,  263,  241,  262,  269,  366,  261,  243,  243,  258,
395      240,  256,  238,  254,  236,  252,  234,  250,  232,  248,
396      230,  230,  245,  227,  227,  232,  226,  230,  205,  246,
397      222,  221,  366,  220,  366,  219,  366,  218,  366,  217,
398      366,  216,  366,  215,  366,  214,  366,  366,  225,  366,
399
400      186,  188,  205,  366,  223,  209,  210,  196,  204,  192,
401      186,  178,  162,  107,  117,  106,   78,   81,  366,  366,
402      366,  366,  366,   80,  366,   52,  366,   40,  366,  366,
403      227,  231,  233,  235,  240
404    } ;
405
406static yyconst short int yy_def[236] =
407    {   0,
408      230,    1,    1,    3,  230,  230,  230,  230,  230,  230,
409      230,  230,  230,  230,  230,  231,  230,  230,  230,  230,
410      230,  230,  230,  232,  232,  233,  232,  232,  230,  230,
411      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
412      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
413      230,  230,  230,  230,  230,  233,  232,  233,  234,  230,
414      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
415      230,  230,  230,  230,  230,  230,  230,  230,  234,  235,
416      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
417      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
418
419      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
420      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
421      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
422      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
423      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
424      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
425      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
426      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
427      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
428      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
429
430      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
431      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
432      230,  230,  230,  230,  230,  230,  230,  230,  230,    0,
433      230,  230,  230,  230,  230
434    } ;
435
436static yyconst short int yy_nxt[408] =
437    {   0,
438        6,    7,    8,    9,    6,   10,    6,   11,    6,   12,
439        6,    6,    6,    6,    6,   13,   14,    6,   15,    6,
440       16,   17,    6,    6,    6,    6,    6,   18,   19,    6,
441        6,   14,   20,   21,   22,    6,   23,    6,    6,    6,
442        6,   24,   25,   26,   33,   27,   28,   27,   27,   27,
443       27,   27,   29,   30,   31,   32,   30,   31,   39,   45,
444      229,   48,   40,   34,   51,   51,   55,   55,   46,   53,
445       53,   53,   53,   49,  228,   35,   33,   36,   50,   37,
446       39,   56,   33,   54,   40,   59,   29,   30,   31,   32,
447       30,   31,   32,   30,   31,   34,   51,   51,   55,   55,
448
449      227,   34,   53,   53,   53,   53,   39,   35,   33,   36,
450       40,   37,  226,   35,   62,   36,  225,   37,   43,   43,
451       43,   43,   43,   43,   71,   63,   74,   34,  224,   77,
452       82,   82,   92,   92,  157,   72,  157,   75,  223,   35,
453       78,   36,  111,   37,   83,  222,   93,   97,   97,   82,
454       84,   92,   94,  118,  112,  101,  102,  106,  106,  113,
455      116,   98,  103,  121,  104,  119,   97,   99,  105,  124,
456      120,  107,  127,  117,  138,  122,  106,  108,  130,  133,
457      123,  125,  140,  221,  128,  145,  126,  139,  154,  129,
458      131,  134,  156,  156,  141,  132,  135,  220,  146,  142,
459
460      160,  155,  160,  162,  164,  162,  164,  166,  168,  166,
461      168,  170,  173,  170,  173,  201,  202,  205,  219,  207,
462      206,  208,  209,  211,  210,  218,  217,  216,  215,  212,
463       43,  214,   43,   57,   57,   57,   58,   58,   79,   79,
464      110,  213,  110,  110,  110,  110,  204,  141,  134,  131,
465      128,  125,  122,  119,  112,  106,  203,  200,  199,  198,
466       97,  197,  196,   92,  195,  194,  193,  192,  191,  190,
467      189,  188,  187,  186,  185,  184,   82,  183,  182,  106,
468      181,  106,  106,  180,  179,  178,  177,  176,   97,  175,
469       97,   97,  174,  173,   92,  172,   92,   92,  171,  170,
470
471      169,  168,  167,  166,  165,  164,  163,  162,  161,  160,
472       82,  159,   82,   82,  158,  157,  153,  152,  151,  150,
473      149,  148,  147,  144,  143,  137,  136,  115,  114,  109,
474      100,   96,   95,   91,   90,   89,   88,   87,   86,   85,
475       81,   80,   59,   76,   73,   70,   69,   68,   67,   66,
476       65,   64,   61,   60,   30,   59,   56,   52,   47,   44,
477       42,   41,   38,   30,  230,    5,  230,  230,  230,  230,
478      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
479      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
480      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
481
482      230,  230,  230,  230,  230,  230,  230
483    } ;
484
485static yyconst short int yy_chk[408] =
486    {   0,
487        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
488        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
489        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
490        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
491        1,    3,    3,    3,   10,    3,    3,    3,    3,    3,
492        3,    3,    7,    7,    7,    8,    8,    8,   12,   17,
493      228,   19,   12,   10,   20,   20,   23,   23,   17,   22,
494       22,   22,   22,   19,  226,   10,   25,   10,   19,   10,
495       28,   25,   33,   22,   28,   28,   29,   29,   29,   30,
496       30,   30,   32,   32,   32,   25,   35,   35,   37,   37,
497
498      224,   33,   36,   36,   36,   36,   39,   25,   40,   25,
499       39,   25,  218,   33,   43,   33,  217,   33,   34,   34,
500       34,   34,   34,   34,   51,   43,   53,   40,  216,   55,
501       62,   62,   71,   71,  113,   51,  113,   53,  215,   40,
502       55,   40,   81,   40,   62,  214,   71,   74,   74,   62,
503       62,   71,   71,   86,   81,   76,   76,   77,   77,   81,
504       85,   74,   76,   87,   76,   86,   74,   74,   76,   88,
505       86,   77,   89,   85,   95,   87,   77,   77,   90,   91,
506       87,   88,   96,  213,   89,  100,   88,   95,  109,   89,
507       90,   91,  110,  110,   96,   90,   91,  212,  100,   96,
508
509      120,  109,  120,  123,  126,  123,  126,  129,  132,  129,
510      132,  135,  142,  135,  142,  179,  179,  201,  211,  202,
511      201,  202,  202,  203,  202,  210,  209,  208,  207,  203,
512      231,  206,  231,  232,  232,  232,  233,  233,  234,  234,
513      235,  205,  235,  235,  235,  235,  199,  196,  194,  192,
514      190,  188,  186,  184,  182,  181,  180,  178,  177,  176,
515      175,  174,  173,  172,  171,  170,  169,  168,  167,  166,
516      165,  164,  163,  162,  161,  160,  159,  158,  157,  155,
517      154,  153,  152,  151,  150,  149,  148,  147,  146,  145,
518      144,  143,  141,  140,  139,  138,  137,  136,  134,  133,
519
520      131,  130,  128,  127,  125,  124,  122,  121,  119,  118,
521      117,  116,  115,  114,  112,  111,  108,  107,  105,  104,
522      103,  102,  101,   99,   98,   94,   93,   84,   83,   78,
523       75,   73,   72,   70,   69,   68,   67,   66,   64,   63,
524       61,   60,   57,   54,   52,   50,   49,   48,   47,   46,
525       45,   44,   42,   41,   31,   27,   24,   21,   18,   16,
526       15,   14,   11,    9,    5,  230,  230,  230,  230,  230,
527      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
528      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
529      230,  230,  230,  230,  230,  230,  230,  230,  230,  230,
530
531      230,  230,  230,  230,  230,  230,  230
532    } ;
533
534static yy_state_type yy_last_accepting_state;
535static char *yy_last_accepting_cpos;
536
537/* The intent behind this definition is that it'll catch
538 * any uses of REJECT which flex missed.
539 */
540#define REJECT reject_used_but_not_detected
541#define yymore() yymore_used_but_not_detected
542#define YY_MORE_ADJ 0
543#define YY_RESTORE_YY_MORE_OFFSET
544char *yytext;
545#line 1 "ps1.0_tokens.l"
546#define INITIAL 0
547/* definitions */
548#line 7 "ps1.0_tokens.l"
549
550#include <stdlib.h>
551#include <list>
552#include <vector>
553
554#include "ps1.0_program.h"
555
556using namespace std;
557using namespace ps10;
558
559#include "_ps1.0_parser.h"
560
561#ifdef _WIN32
562# include <windows.h>
563#endif
564
565#include <GL/gl.h>
566#include <GL/glext.h>
567#include "nvparse_errors.h"
568#include "nvparse_externs.h"
569
570
571#define YY_INPUT(buf,result,max_size)                            \
572{                                                                \
573        int c = *myin++;                                             \
574        result = (c == 0) ? YY_NULL : (buf[0] = c, 1);               \
575}
576
577#define YY_ALWAYS_INTERACTIVE 1
578
579//#define DBG_MESG(msg, line)   errors.set(msg, line)
580#define DBG_MESG(msg, line)
581
582static char buf[80];
583
584
585#define DEFSTATE 1
586
587/* end of definitions */
588#line 589 "_ps1.0_lexer.cpp"
589
590/* Macros after this point can all be overridden by user definitions in
591 * section 1.
592 */
593
594#ifndef YY_SKIP_YYWRAP
595#ifdef __cplusplus
596extern "C" int yywrap YY_PROTO(( void ));
597#else
598extern int yywrap YY_PROTO(( void ));
599#endif
600#endif
601
602#ifndef YY_NO_UNPUT
603static void yyunput YY_PROTO(( int c, char *buf_ptr ));
604#endif
605
606#ifndef yytext_ptr
607static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
608#endif
609
610#ifdef YY_NEED_STRLEN
611static int yy_flex_strlen YY_PROTO(( yyconst char * ));
612#endif
613
614#ifndef YY_NO_INPUT
615#ifdef __cplusplus
616static int yyinput YY_PROTO(( void ));
617#else
618static int input YY_PROTO(( void ));
619#endif
620#endif
621
622#if YY_STACK_USED
623static int yy_start_stack_ptr = 0;
624static int yy_start_stack_depth = 0;
625static int *yy_start_stack = 0;
626#ifndef YY_NO_PUSH_STATE
627static void yy_push_state YY_PROTO(( int new_state ));
628#endif
629#ifndef YY_NO_POP_STATE
630static void yy_pop_state YY_PROTO(( void ));
631#endif
632#ifndef YY_NO_TOP_STATE
633static int yy_top_state YY_PROTO(( void ));
634#endif
635
636#else
637#define YY_NO_PUSH_STATE 1
638#define YY_NO_POP_STATE 1
639#define YY_NO_TOP_STATE 1
640#endif
641
642#ifdef YY_MALLOC_DECL
643YY_MALLOC_DECL
644#else
645#if __STDC__
646#ifndef __cplusplus
647#include <stdlib.h>
648#endif
649#else
650/* Just try to get by without declaring the routines.  This will fail
651 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
652 * or sizeof(void*) != sizeof(int).
653 */
654#endif
655#endif
656
657/* Amount of stuff to slurp up with each read. */
658#ifndef YY_READ_BUF_SIZE
659#define YY_READ_BUF_SIZE 8192
660#endif
661
662/* Copy whatever the last rule matched to the standard output. */
663
664#ifndef ECHO
665/* This used to be an fputs(), but since the string might contain NUL's,
666 * we now use fwrite().
667 */
668#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
669#endif
670
671/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
672 * is returned in "result".
673 */
674#ifndef YY_INPUT
675#define YY_INPUT(buf,result,max_size) \
676        if ( yy_current_buffer->yy_is_interactive ) \
677                { \
678                int c = '*', n; \
679                for ( n = 0; n < max_size && \
680                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
681                        buf[n] = (char) c; \
682                if ( c == '\n' ) \
683                        buf[n++] = (char) c; \
684                if ( c == EOF && ferror( yyin ) ) \
685                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
686                result = n; \
687                } \
688        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
689                  && ferror( yyin ) ) \
690                YY_FATAL_ERROR( "input in flex scanner failed" );
691#endif
692
693/* No semi-colon after return; correct usage is to write "yyterminate();" -
694 * we don't want an extra ';' after the "return" because that will cause
695 * some compilers to complain about unreachable statements.
696 */
697#ifndef yyterminate
698#define yyterminate() return YY_NULL
699#endif
700
701/* Number of entries by which start-condition stack grows. */
702#ifndef YY_START_STACK_INCR
703#define YY_START_STACK_INCR 25
704#endif
705
706/* Report a fatal error. */
707#ifndef YY_FATAL_ERROR
708#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
709#endif
710
711/* Default declaration of generated scanner - a define so the user can
712 * easily add parameters.
713 */
714#ifndef YY_DECL
715#define YY_DECL int yylex YY_PROTO(( void ))
716#endif
717
718/* Code executed at the beginning of each rule, after yytext and yyleng
719 * have been set up.
720 */
721#ifndef YY_USER_ACTION
722#define YY_USER_ACTION
723#endif
724
725/* Code executed at the end of each rule. */
726#ifndef YY_BREAK
727#define YY_BREAK break;
728#endif
729
730#define YY_RULE_SETUP \
731        YY_USER_ACTION
732
733YY_DECL
734        {
735        register yy_state_type yy_current_state;
736        register char *yy_cp = NULL, *yy_bp = NULL;
737        register int yy_act;
738
739#line 48 "ps1.0_tokens.l"
740
741
742#line 743 "_ps1.0_lexer.cpp"
743
744        if ( yy_init )
745                {
746                yy_init = 0;
747
748#ifdef YY_USER_INIT
749                YY_USER_INIT;
750#endif
751
752                if ( ! yy_start )
753                        yy_start = 1;   /* first start state */
754
755                if ( ! yyin )
756                        yyin = stdin;
757
758                if ( ! yyout )
759                        yyout = stdout;
760
761                if ( ! yy_current_buffer )
762                        yy_current_buffer =
763                                yy_create_buffer( yyin, YY_BUF_SIZE );
764
765                yy_load_buffer_state();
766                }
767
768        while ( 1 )             /* loops until end-of-file is reached */
769                {
770                yy_cp = yy_c_buf_p;
771
772                /* Support of yytext. */
773                *yy_cp = yy_hold_char;
774
775                /* yy_bp points to the position in yy_ch_buf of the start of
776                 * the current run.
777                 */
778                yy_bp = yy_cp;
779
780                yy_current_state = yy_start;
781yy_match:
782                do
783                        {
784                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
785                        if ( yy_accept[yy_current_state] )
786                                {
787                                yy_last_accepting_state = yy_current_state;
788                                yy_last_accepting_cpos = yy_cp;
789                                }
790                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
791                                {
792                                yy_current_state = (int) yy_def[yy_current_state];
793                                if ( yy_current_state >= 231 )
794                                        yy_c = yy_meta[(unsigned int) yy_c];
795                                }
796                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
797                        ++yy_cp;
798                        }
799                while ( yy_base[yy_current_state] != 366 );
800
801yy_find_action:
802                yy_act = yy_accept[yy_current_state];
803                if ( yy_act == 0 )
804                        { /* have to back up */
805                        yy_cp = yy_last_accepting_cpos;
806                        yy_current_state = yy_last_accepting_state;
807                        yy_act = yy_accept[yy_current_state];
808                        }
809
810                YY_DO_BEFORE_ACTION;
811
812
813do_action:      /* This label is used only to access EOF actions. */
814
815
816                switch ( yy_act )
817        { /* beginning of action switch */
818                        case 0: /* must back up */
819                        /* undo the effects of YY_DO_BEFORE_ACTION */
820                        *yy_cp = yy_hold_char;
821                        yy_cp = yy_last_accepting_cpos;
822                        yy_current_state = yy_last_accepting_state;
823                        goto yy_find_action;
824
825case 1:
826#line 51 "ps1.0_tokens.l"
827case 2:
828YY_RULE_SETUP
829#line 51 "ps1.0_tokens.l"
830{
831                            char ch;
832                            while ((ch = yyinput()) != '\n')
833                                        ;
834                                line_number++;
835                                DBG_MESG("dbg: comment, NEWLINE", line_number-1);
836                                return NEWLINE;
837                        }
838        YY_BREAK
839case 3:
840#line 61 "ps1.0_tokens.l"
841case 4:
842#line 62 "ps1.0_tokens.l"
843case 5:
844YY_RULE_SETUP
845#line 62 "ps1.0_tokens.l"
846{
847                                ps10_lval.fval = (float)atof(yytext);
848                                // debug
849                                DBG_MESG("dbg: NUMBER", line_number);
850                                return NUMBER;
851                        }
852        YY_BREAK
853case 6:
854YY_RULE_SETUP
855#line 72 "ps1.0_tokens.l"
856{
857                                // debug
858                                DBG_MESG("dbg: DEF", line_number);
859                                BEGIN DEFSTATE;
860                                return DEF;
861                        }
862        YY_BREAK
863case 7:
864#line 81 "ps1.0_tokens.l"
865case 8:
866#line 82 "ps1.0_tokens.l"
867case 9:
868#line 83 "ps1.0_tokens.l"
869case 10:
870YY_RULE_SETUP
871#line 83 "ps1.0_tokens.l"
872{
873                                sprintf(buf, "dbg: REG = %s", yytext);
874                                // debug
875                                DBG_MESG(buf, line_number);
876                                ps10_lval.sval = new string(yytext);
877                                return REG;
878                        }
879        YY_BREAK
880case 11:
881#line 92 "ps1.0_tokens.l"
882case 12:
883#line 93 "ps1.0_tokens.l"
884case 13:
885#line 94 "ps1.0_tokens.l"
886case 14:
887#line 95 "ps1.0_tokens.l"
888case 15:
889#line 96 "ps1.0_tokens.l"
890case 16:
891#line 97 "ps1.0_tokens.l"
892case 17:
893#line 98 "ps1.0_tokens.l"
894case 18:
895YY_RULE_SETUP
896#line 98 "ps1.0_tokens.l"
897{
898                                sprintf(buf, "dbg: BLENDOP = %s", yytext);
899                                // debug
900                                DBG_MESG(buf, line_number);
901                                ps10_lval.sval = new string(yytext);
902                                return BLENDOP;
903                        }
904        YY_BREAK
905case 19:
906#line 107 "ps1.0_tokens.l"
907case 20:
908#line 108 "ps1.0_tokens.l"
909case 21:
910#line 109 "ps1.0_tokens.l"
911case 22:
912#line 110 "ps1.0_tokens.l"
913case 23:
914#line 111 "ps1.0_tokens.l"
915case 24:
916#line 112 "ps1.0_tokens.l"
917case 25:
918#line 113 "ps1.0_tokens.l"
919case 26:
920#line 114 "ps1.0_tokens.l"
921case 27:
922#line 115 "ps1.0_tokens.l"
923case 28:
924#line 116 "ps1.0_tokens.l"
925case 29:
926#line 117 "ps1.0_tokens.l"
927case 30:
928#line 118 "ps1.0_tokens.l"
929case 31:
930YY_RULE_SETUP
931#line 118 "ps1.0_tokens.l"
932{
933                                sprintf(buf, "dbg: ADDROP = %s", yytext);
934                                // debug
935                                DBG_MESG(buf, line_number);
936                                ps10_lval.sval = new string(yytext);
937                                return ADDROP;
938                        }
939        YY_BREAK
940case 32:
941YY_RULE_SETUP
942#line 128 "ps1.0_tokens.l"
943{
944                                line_number++;
945                                BEGIN 0;
946                                // debug
947                                DBG_MESG("dbg: NEWLINE", line_number-1);
948                                return NEWLINE;
949                        }
950        YY_BREAK
951case 33:
952YY_RULE_SETUP
953#line 136 "ps1.0_tokens.l"
954{
955                        }
956        YY_BREAK
957case 34:
958YY_RULE_SETUP
959#line 139 "ps1.0_tokens.l"
960{
961                                return HEADER;
962                        }
963        YY_BREAK
964case 35:
965YY_RULE_SETUP
966#line 143 "ps1.0_tokens.l"
967{
968                                char buf[40];
969                                sprintf(buf, "character token == '%c'", *yytext);
970                                DBG_MESG(buf, line_number);
971                                return *yytext;
972                        }
973        YY_BREAK
974case 36:
975YY_RULE_SETUP
976#line 150 "ps1.0_tokens.l"
977ECHO;
978        YY_BREAK
979#line 980 "_ps1.0_lexer.cpp"
980case YY_STATE_EOF(INITIAL):
981case YY_STATE_EOF(DEFSTATE):
982        yyterminate();
983
984        case YY_END_OF_BUFFER:
985                {
986                /* Amount of text matched not including the EOB char. */
987                int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
988
989                /* Undo the effects of YY_DO_BEFORE_ACTION. */
990                *yy_cp = yy_hold_char;
991                YY_RESTORE_YY_MORE_OFFSET
992
993                if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
994                        {
995                        /* We're scanning a new file or input source.  It's
996                         * possible that this happened because the user
997                         * just pointed yyin at a new source and called
998                         * yylex().  If so, then we have to assure
999                         * consistency between yy_current_buffer and our
1000                         * globals.  Here is the right place to do so, because
1001                         * this is the first action (other than possibly a
1002                         * back-up) that will match for the new input source.
1003                         */
1004                        yy_n_chars = yy_current_buffer->yy_n_chars;
1005                        yy_current_buffer->yy_input_file = yyin;
1006                        yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1007                        }
1008
1009                /* Note that here we test for yy_c_buf_p "<=" to the position
1010                 * of the first EOB in the buffer, since yy_c_buf_p will
1011                 * already have been incremented past the NUL character
1012                 * (since all states make transitions on EOB to the
1013                 * end-of-buffer state).  Contrast this with the test
1014                 * in input().
1015                 */
1016                if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1017                        { /* This was really a NUL. */
1018                        yy_state_type yy_next_state;
1019
1020                        yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1021
1022                        yy_current_state = yy_get_previous_state();
1023
1024                        /* Okay, we're now positioned to make the NUL
1025                         * transition.  We couldn't have
1026                         * yy_get_previous_state() go ahead and do it
1027                         * for us because it doesn't know how to deal
1028                         * with the possibility of jamming (and we don't
1029                         * want to build jamming into it because then it
1030                         * will run more slowly).
1031                         */
1032
1033                        yy_next_state = yy_try_NUL_trans( yy_current_state );
1034
1035                        yy_bp = yytext_ptr + YY_MORE_ADJ;
1036
1037                        if ( yy_next_state )
1038                                {
1039                                /* Consume the NUL. */
1040                                yy_cp = ++yy_c_buf_p;
1041                                yy_current_state = yy_next_state;
1042                                goto yy_match;
1043                                }
1044
1045                        else
1046                                {
1047                                yy_cp = yy_c_buf_p;
1048                                goto yy_find_action;
1049                                }
1050                        }
1051
1052                else switch ( yy_get_next_buffer() )
1053                        {
1054                        case EOB_ACT_END_OF_FILE:
1055                                {
1056                                yy_did_buffer_switch_on_eof = 0;
1057
1058                                if ( yywrap() )
1059                                        {
1060                                        /* Note: because we've taken care in
1061                                         * yy_get_next_buffer() to have set up
1062                                         * yytext, we can now set up
1063                                         * yy_c_buf_p so that if some total
1064                                         * hoser (like flex itself) wants to
1065                                         * call the scanner after we return the
1066                                         * YY_NULL, it'll still work - another
1067                                         * YY_NULL will get returned.
1068                                         */
1069                                        yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1070
1071                                        yy_act = YY_STATE_EOF(YY_START);
1072                                        goto do_action;
1073                                        }
1074
1075                                else
1076                                        {
1077                                        if ( ! yy_did_buffer_switch_on_eof )
1078                                                YY_NEW_FILE;
1079                                        }
1080                                break;
1081                                }
1082
1083                        case EOB_ACT_CONTINUE_SCAN:
1084                                yy_c_buf_p =
1085                                        yytext_ptr + yy_amount_of_matched_text;
1086
1087                                yy_current_state = yy_get_previous_state();
1088
1089                                yy_cp = yy_c_buf_p;
1090                                yy_bp = yytext_ptr + YY_MORE_ADJ;
1091                                goto yy_match;
1092
1093                        case EOB_ACT_LAST_MATCH:
1094                                yy_c_buf_p =
1095                                &yy_current_buffer->yy_ch_buf[yy_n_chars];
1096
1097                                yy_current_state = yy_get_previous_state();
1098
1099                                yy_cp = yy_c_buf_p;
1100                                yy_bp = yytext_ptr + YY_MORE_ADJ;
1101                                goto yy_find_action;
1102                        }
1103                break;
1104                }
1105
1106        default:
1107                YY_FATAL_ERROR(
1108                        "fatal flex scanner internal error--no action found" );
1109        } /* end of action switch */
1110                } /* end of scanning one token */
1111        } /* end of yylex */
1112
1113
1114/* yy_get_next_buffer - try to read in a new buffer
1115 *
1116 * Returns a code representing an action:
1117 *      EOB_ACT_LAST_MATCH -
1118 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1119 *      EOB_ACT_END_OF_FILE - end of file
1120 */
1121
1122static int yy_get_next_buffer()
1123        {
1124        register char *dest = yy_current_buffer->yy_ch_buf;
1125        register char *source = yytext_ptr;
1126        register int number_to_move, i;
1127        int ret_val;
1128
1129        if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1130                YY_FATAL_ERROR(
1131                "fatal flex scanner internal error--end of buffer missed" );
1132
1133        if ( yy_current_buffer->yy_fill_buffer == 0 )
1134                { /* Don't try to fill the buffer, so this is an EOF. */
1135                if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1136                        {
1137                        /* We matched a single character, the EOB, so
1138                         * treat this as a final EOF.
1139                         */
1140                        return EOB_ACT_END_OF_FILE;
1141                        }
1142
1143                else
1144                        {
1145                        /* We matched some text prior to the EOB, first
1146                         * process it.
1147                         */
1148                        return EOB_ACT_LAST_MATCH;
1149                        }
1150                }
1151
1152        /* Try to read more data. */
1153
1154        /* First move last chars to start of buffer. */
1155        number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1156
1157        for ( i = 0; i < number_to_move; ++i )
1158                *(dest++) = *(source++);
1159
1160        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1161                /* don't do the read, it's not guaranteed to return an EOF,
1162                 * just force an EOF
1163                 */
1164                yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1165
1166        else
1167                {
1168                int num_to_read =
1169                        yy_current_buffer->yy_buf_size - number_to_move - 1;
1170
1171                while ( num_to_read <= 0 )
1172                        { /* Not enough room in the buffer - grow it. */
1173#ifdef YY_USES_REJECT
1174                        YY_FATAL_ERROR(
1175"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1176#else
1177
1178                        /* just a shorter name for the current buffer */
1179                        YY_BUFFER_STATE b = yy_current_buffer;
1180
1181                        int yy_c_buf_p_offset =
1182                                (int) (yy_c_buf_p - b->yy_ch_buf);
1183
1184                        if ( b->yy_is_our_buffer )
1185                                {
1186                                int new_size = b->yy_buf_size * 2;
1187
1188                                if ( new_size <= 0 )
1189                                        b->yy_buf_size += b->yy_buf_size / 8;
1190                                else
1191                                        b->yy_buf_size *= 2;
1192
1193                                b->yy_ch_buf = (char *)
1194                                        /* Include room in for 2 EOB chars. */
1195                                        yy_flex_realloc( (void *) b->yy_ch_buf,
1196                                                         b->yy_buf_size + 2 );
1197                                }
1198                        else
1199                                /* Can't grow it, we don't own it. */
1200                                b->yy_ch_buf = 0;
1201
1202                        if ( ! b->yy_ch_buf )
1203                                YY_FATAL_ERROR(
1204                                "fatal error - scanner input buffer overflow" );
1205
1206                        yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1207
1208                        num_to_read = yy_current_buffer->yy_buf_size -
1209                                                number_to_move - 1;
1210#endif
1211                        }
1212
1213                if ( num_to_read > YY_READ_BUF_SIZE )
1214                        num_to_read = YY_READ_BUF_SIZE;
1215
1216                /* Read in more data. */
1217                YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1218                        yy_n_chars, num_to_read );
1219
1220                yy_current_buffer->yy_n_chars = yy_n_chars;
1221                }
1222
1223        if ( yy_n_chars == 0 )
1224                {
1225                if ( number_to_move == YY_MORE_ADJ )
1226                        {
1227                        ret_val = EOB_ACT_END_OF_FILE;
1228                        yyrestart( yyin );
1229                        }
1230
1231                else
1232                        {
1233                        ret_val = EOB_ACT_LAST_MATCH;
1234                        yy_current_buffer->yy_buffer_status =
1235                                YY_BUFFER_EOF_PENDING;
1236                        }
1237                }
1238
1239        else
1240                ret_val = EOB_ACT_CONTINUE_SCAN;
1241
1242        yy_n_chars += number_to_move;
1243        yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1244        yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1245
1246        yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1247
1248        return ret_val;
1249        }
1250
1251
1252/* yy_get_previous_state - get the state just before the EOB char was reached */
1253
1254static yy_state_type yy_get_previous_state()
1255        {
1256        register yy_state_type yy_current_state;
1257        register char *yy_cp;
1258
1259        yy_current_state = yy_start;
1260
1261        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1262                {
1263                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1264                if ( yy_accept[yy_current_state] )
1265                        {
1266                        yy_last_accepting_state = yy_current_state;
1267                        yy_last_accepting_cpos = yy_cp;
1268                        }
1269                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1270                        {
1271                        yy_current_state = (int) yy_def[yy_current_state];
1272                        if ( yy_current_state >= 231 )
1273                                yy_c = yy_meta[(unsigned int) yy_c];
1274                        }
1275                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1276                }
1277
1278        return yy_current_state;
1279        }
1280
1281
1282/* yy_try_NUL_trans - try to make a transition on the NUL character
1283 *
1284 * synopsis
1285 *      next_state = yy_try_NUL_trans( current_state );
1286 */
1287
1288#ifdef YY_USE_PROTOS
1289static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1290#else
1291static yy_state_type yy_try_NUL_trans( yy_current_state )
1292yy_state_type yy_current_state;
1293#endif
1294        {
1295        register int yy_is_jam;
1296        register char *yy_cp = yy_c_buf_p;
1297
1298        register YY_CHAR yy_c = 1;
1299        if ( yy_accept[yy_current_state] )
1300                {
1301                yy_last_accepting_state = yy_current_state;
1302                yy_last_accepting_cpos = yy_cp;
1303                }
1304        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1305                {
1306                yy_current_state = (int) yy_def[yy_current_state];
1307                if ( yy_current_state >= 231 )
1308                        yy_c = yy_meta[(unsigned int) yy_c];
1309                }
1310        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1311        yy_is_jam = (yy_current_state == 230);
1312
1313        return yy_is_jam ? 0 : yy_current_state;
1314        }
1315
1316
1317#ifndef YY_NO_UNPUT
1318#ifdef YY_USE_PROTOS
1319static void yyunput( int c, register char *yy_bp )
1320#else
1321static void yyunput( c, yy_bp )
1322int c;
1323register char *yy_bp;
1324#endif
1325        {
1326        register char *yy_cp = yy_c_buf_p;
1327
1328        /* undo effects of setting up yytext */
1329        *yy_cp = yy_hold_char;
1330
1331        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1332                { /* need to shift things up to make room */
1333                /* +2 for EOB chars. */
1334                register int number_to_move = yy_n_chars + 2;
1335                register char *dest = &yy_current_buffer->yy_ch_buf[
1336                                        yy_current_buffer->yy_buf_size + 2];
1337                register char *source =
1338                                &yy_current_buffer->yy_ch_buf[number_to_move];
1339
1340                while ( source > yy_current_buffer->yy_ch_buf )
1341                        *--dest = *--source;
1342
1343                yy_cp += (int) (dest - source);
1344                yy_bp += (int) (dest - source);
1345                yy_current_buffer->yy_n_chars =
1346                        yy_n_chars = yy_current_buffer->yy_buf_size;
1347
1348                if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1349                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
1350                }
1351
1352        *--yy_cp = (char) c;
1353
1354
1355        yytext_ptr = yy_bp;
1356        yy_hold_char = *yy_cp;
1357        yy_c_buf_p = yy_cp;
1358        }
1359#endif  /* ifndef YY_NO_UNPUT */
1360
1361
1362#ifndef YY_NO_INPUT
1363#ifdef __cplusplus
1364static int yyinput()
1365#else
1366static int input()
1367#endif
1368        {
1369        int c;
1370
1371        *yy_c_buf_p = yy_hold_char;
1372
1373        if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1374                {
1375                /* yy_c_buf_p now points to the character we want to return.
1376                 * If this occurs *before* the EOB characters, then it's a
1377                 * valid NUL; if not, then we've hit the end of the buffer.
1378                 */
1379                if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1380                        /* This was really a NUL. */
1381                        *yy_c_buf_p = '\0';
1382
1383                else
1384                        { /* need more input */
1385                        int offset = yy_c_buf_p - yytext_ptr;
1386                        ++yy_c_buf_p;
1387
1388                        switch ( yy_get_next_buffer() )
1389                                {
1390                                case EOB_ACT_LAST_MATCH:
1391                                        /* This happens because yy_g_n_b()
1392                                         * sees that we've accumulated a
1393                                         * token and flags that we need to
1394                                         * try matching the token before
1395                                         * proceeding.  But for input(),
1396                                         * there's no matching to consider.
1397                                         * So convert the EOB_ACT_LAST_MATCH
1398                                         * to EOB_ACT_END_OF_FILE.
1399                                         */
1400
1401                                        /* Reset buffer status. */
1402                                        yyrestart( yyin );
1403
1404                                        /* fall through */
1405
1406                                case EOB_ACT_END_OF_FILE:
1407                                        {
1408                                        if ( yywrap() )
1409                                                return EOF;
1410
1411                                        if ( ! yy_did_buffer_switch_on_eof )
1412                                                YY_NEW_FILE;
1413#ifdef __cplusplus
1414                                        return yyinput();
1415#else
1416                                        return input();
1417#endif
1418                                        }
1419
1420                                case EOB_ACT_CONTINUE_SCAN:
1421                                        yy_c_buf_p = yytext_ptr + offset;
1422                                        break;
1423                                }
1424                        }
1425                }
1426
1427        c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1428        *yy_c_buf_p = '\0';     /* preserve yytext */
1429        yy_hold_char = *++yy_c_buf_p;
1430
1431
1432        return c;
1433        }
1434#endif /* YY_NO_INPUT */
1435
1436#ifdef YY_USE_PROTOS
1437void yyrestart( FILE *input_file )
1438#else
1439void yyrestart( input_file )
1440FILE *input_file;
1441#endif
1442        {
1443        if ( ! yy_current_buffer )
1444                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1445
1446        yy_init_buffer( yy_current_buffer, input_file );
1447        yy_load_buffer_state();
1448        }
1449
1450
1451#ifdef YY_USE_PROTOS
1452void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1453#else
1454void yy_switch_to_buffer( new_buffer )
1455YY_BUFFER_STATE new_buffer;
1456#endif
1457        {
1458        if ( yy_current_buffer == new_buffer )
1459                return;
1460
1461        if ( yy_current_buffer )
1462                {
1463                /* Flush out information for old buffer. */
1464                *yy_c_buf_p = yy_hold_char;
1465                yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1466                yy_current_buffer->yy_n_chars = yy_n_chars;
1467                }
1468
1469        yy_current_buffer = new_buffer;
1470        yy_load_buffer_state();
1471
1472        /* We don't actually know whether we did this switch during
1473         * EOF (yywrap()) processing, but the only time this flag
1474         * is looked at is after yywrap() is called, so it's safe
1475         * to go ahead and always set it.
1476         */
1477        yy_did_buffer_switch_on_eof = 1;
1478        }
1479
1480
1481#ifdef YY_USE_PROTOS
1482void yy_load_buffer_state( void )
1483#else
1484void yy_load_buffer_state()
1485#endif
1486        {
1487        yy_n_chars = yy_current_buffer->yy_n_chars;
1488        yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1489        yyin = yy_current_buffer->yy_input_file;
1490        yy_hold_char = *yy_c_buf_p;
1491        }
1492
1493
1494#ifdef YY_USE_PROTOS
1495YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1496#else
1497YY_BUFFER_STATE yy_create_buffer( file, size )
1498FILE *file;
1499int size;
1500#endif
1501        {
1502        YY_BUFFER_STATE b;
1503
1504        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1505        if ( ! b )
1506                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1507
1508        b->yy_buf_size = size;
1509
1510        /* yy_ch_buf has to be 2 characters longer than the size given because
1511         * we need to put in 2 end-of-buffer characters.
1512         */
1513        b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1514        if ( ! b->yy_ch_buf )
1515                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1516
1517        b->yy_is_our_buffer = 1;
1518
1519        yy_init_buffer( b, file );
1520
1521        return b;
1522        }
1523
1524
1525#ifdef YY_USE_PROTOS
1526void yy_delete_buffer( YY_BUFFER_STATE b )
1527#else
1528void yy_delete_buffer( b )
1529YY_BUFFER_STATE b;
1530#endif
1531        {
1532        if ( ! b )
1533                return;
1534
1535        if ( b == yy_current_buffer )
1536                yy_current_buffer = (YY_BUFFER_STATE) 0;
1537
1538        if ( b->yy_is_our_buffer )
1539                yy_flex_free( (void *) b->yy_ch_buf );
1540
1541        yy_flex_free( (void *) b );
1542        }
1543
1544
1545
1546#ifdef YY_USE_PROTOS
1547void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1548#else
1549void yy_init_buffer( b, file )
1550YY_BUFFER_STATE b;
1551FILE *file;
1552#endif
1553
1554
1555        {
1556        yy_flush_buffer( b );
1557
1558        b->yy_input_file = file;
1559        b->yy_fill_buffer = 1;
1560
1561#if YY_ALWAYS_INTERACTIVE
1562        b->yy_is_interactive = 1;
1563#else
1564#if YY_NEVER_INTERACTIVE
1565        b->yy_is_interactive = 0;
1566#else
1567        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1568#endif
1569#endif
1570        }
1571
1572
1573#ifdef YY_USE_PROTOS
1574void yy_flush_buffer( YY_BUFFER_STATE b )
1575#else
1576void yy_flush_buffer( b )
1577YY_BUFFER_STATE b;
1578#endif
1579
1580        {
1581        if ( ! b )
1582                return;
1583
1584        b->yy_n_chars = 0;
1585
1586        /* We always need two end-of-buffer characters.  The first causes
1587         * a transition to the end-of-buffer state.  The second causes
1588         * a jam in that state.
1589         */
1590        b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1591        b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1592
1593        b->yy_buf_pos = &b->yy_ch_buf[0];
1594
1595        b->yy_at_bol = 1;
1596        b->yy_buffer_status = YY_BUFFER_NEW;
1597
1598        if ( b == yy_current_buffer )
1599                yy_load_buffer_state();
1600        }
1601
1602
1603#ifndef YY_NO_SCAN_BUFFER
1604#ifdef YY_USE_PROTOS
1605YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1606#else
1607YY_BUFFER_STATE yy_scan_buffer( base, size )
1608char *base;
1609yy_size_t size;
1610#endif
1611        {
1612        YY_BUFFER_STATE b;
1613
1614        if ( size < 2 ||
1615             base[size-2] != YY_END_OF_BUFFER_CHAR ||
1616             base[size-1] != YY_END_OF_BUFFER_CHAR )
1617                /* They forgot to leave room for the EOB's. */
1618                return 0;
1619
1620        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1621        if ( ! b )
1622                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1623
1624        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1625        b->yy_buf_pos = b->yy_ch_buf = base;
1626        b->yy_is_our_buffer = 0;
1627        b->yy_input_file = 0;
1628        b->yy_n_chars = b->yy_buf_size;
1629        b->yy_is_interactive = 0;
1630        b->yy_at_bol = 1;
1631        b->yy_fill_buffer = 0;
1632        b->yy_buffer_status = YY_BUFFER_NEW;
1633
1634        yy_switch_to_buffer( b );
1635
1636        return b;
1637        }
1638#endif
1639
1640
1641#ifndef YY_NO_SCAN_STRING
1642#ifdef YY_USE_PROTOS
1643YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1644#else
1645YY_BUFFER_STATE yy_scan_string( yy_str )
1646yyconst char *yy_str;
1647#endif
1648        {
1649        int len;
1650        for ( len = 0; yy_str[len]; ++len )
1651                ;
1652
1653        return yy_scan_bytes( yy_str, len );
1654        }
1655#endif
1656
1657
1658#ifndef YY_NO_SCAN_BYTES
1659#ifdef YY_USE_PROTOS
1660YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1661#else
1662YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1663yyconst char *bytes;
1664int len;
1665#endif
1666        {
1667        YY_BUFFER_STATE b;
1668        char *buf;
1669        yy_size_t n;
1670        int i;
1671
1672        /* Get memory for full buffer, including space for trailing EOB's. */
1673        n = len + 2;
1674        buf = (char *) yy_flex_alloc( n );
1675        if ( ! buf )
1676                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1677
1678        for ( i = 0; i < len; ++i )
1679                buf[i] = bytes[i];
1680
1681        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1682
1683        b = yy_scan_buffer( buf, n );
1684        if ( ! b )
1685                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1686
1687        /* It's okay to grow etc. this buffer, and we should throw it
1688         * away when we're done.
1689         */
1690        b->yy_is_our_buffer = 1;
1691
1692        return b;
1693        }
1694#endif
1695
1696
1697#ifndef YY_NO_PUSH_STATE
1698#ifdef YY_USE_PROTOS
1699static void yy_push_state( int new_state )
1700#else
1701static void yy_push_state( new_state )
1702int new_state;
1703#endif
1704        {
1705        if ( yy_start_stack_ptr >= yy_start_stack_depth )
1706                {
1707                yy_size_t new_size;
1708
1709                yy_start_stack_depth += YY_START_STACK_INCR;
1710                new_size = yy_start_stack_depth * sizeof( int );
1711
1712                if ( ! yy_start_stack )
1713                        yy_start_stack = (int *) yy_flex_alloc( new_size );
1714
1715                else
1716                        yy_start_stack = (int *) yy_flex_realloc(
1717                                        (void *) yy_start_stack, new_size );
1718
1719                if ( ! yy_start_stack )
1720                        YY_FATAL_ERROR(
1721                        "out of memory expanding start-condition stack" );
1722                }
1723
1724        yy_start_stack[yy_start_stack_ptr++] = YY_START;
1725
1726        BEGIN(new_state);
1727        }
1728#endif
1729
1730
1731#ifndef YY_NO_POP_STATE
1732static void yy_pop_state()
1733        {
1734        if ( --yy_start_stack_ptr < 0 )
1735                YY_FATAL_ERROR( "start-condition stack underflow" );
1736
1737        BEGIN(yy_start_stack[yy_start_stack_ptr]);
1738        }
1739#endif
1740
1741
1742#ifndef YY_NO_TOP_STATE
1743static int yy_top_state()
1744        {
1745        return yy_start_stack[yy_start_stack_ptr - 1];
1746        }
1747#endif
1748
1749#ifndef YY_EXIT_FAILURE
1750#define YY_EXIT_FAILURE 2
1751#endif
1752
1753#ifdef YY_USE_PROTOS
1754static void yy_fatal_error( yyconst char msg[] )
1755#else
1756static void yy_fatal_error( msg )
1757char msg[];
1758#endif
1759        {
1760        (void) fprintf( stderr, "%s\n", msg );
1761        exit( YY_EXIT_FAILURE );
1762        }
1763
1764
1765
1766/* Redefine yyless() so it works in section 3 code. */
1767
1768#undef yyless
1769#define yyless(n) \
1770        do \
1771                { \
1772                /* Undo effects of setting up yytext. */ \
1773                yytext[yyleng] = yy_hold_char; \
1774                yy_c_buf_p = yytext + n; \
1775                yy_hold_char = *yy_c_buf_p; \
1776                *yy_c_buf_p = '\0'; \
1777                yyleng = n; \
1778                } \
1779        while ( 0 )
1780
1781
1782/* Internal utility routines. */
1783
1784#ifndef yytext_ptr
1785#ifdef YY_USE_PROTOS
1786static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1787#else
1788static void yy_flex_strncpy( s1, s2, n )
1789char *s1;
1790yyconst char *s2;
1791int n;
1792#endif
1793        {
1794        register int i;
1795        for ( i = 0; i < n; ++i )
1796                s1[i] = s2[i];
1797        }
1798#endif
1799
1800#ifdef YY_NEED_STRLEN
1801#ifdef YY_USE_PROTOS
1802static int yy_flex_strlen( yyconst char *s )
1803#else
1804static int yy_flex_strlen( s )
1805yyconst char *s;
1806#endif
1807        {
1808        register int n;
1809        for ( n = 0; s[n]; ++n )
1810                ;
1811
1812        return n;
1813        }
1814#endif
1815
1816
1817#ifdef YY_USE_PROTOS
1818static void *yy_flex_alloc( yy_size_t size )
1819#else
1820static void *yy_flex_alloc( size )
1821yy_size_t size;
1822#endif
1823        {
1824        return (void *) malloc( size );
1825        }
1826
1827#ifdef YY_USE_PROTOS
1828static void *yy_flex_realloc( void *ptr, yy_size_t size )
1829#else
1830static void *yy_flex_realloc( ptr, size )
1831void *ptr;
1832yy_size_t size;
1833#endif
1834        {
1835        /* The cast to (char *) in the following accommodates both
1836         * implementations that use char* generic pointers, and those
1837         * that use void* generic pointers.  It works with the latter
1838         * because both ANSI C and C++ allow castless assignment from
1839         * any pointer type to void*, and deal with argument conversions
1840         * as though doing an assignment.
1841         */
1842        return (void *) realloc( (char *) ptr, size );
1843        }
1844
1845#ifdef YY_USE_PROTOS
1846static void yy_flex_free( void *ptr )
1847#else
1848static void yy_flex_free( ptr )
1849void *ptr;
1850#endif
1851        {
1852        free( ptr );
1853        }
1854
1855#if YY_MAIN
1856int main()
1857        {
1858        yylex();
1859        return 0;
1860        }
1861#endif
1862#line 150 "ps1.0_tokens.l"
1863
1864bool ps10_init(char* inputString)
1865{
1866    myin = inputString;
1867        return init_extensions();
1868}
1869
1870#ifndef ps10_wrap
1871int ps10_wrap(void)
1872{
1873  return(1);
1874}
1875#endif
Note: See TracBrowser for help on using the repository browser.