~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/mesa/shader/slang/MachineIndependent/Gen_glslang.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-02-21 12:44:07 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20070221124407-rgcacs32mycrtadl
ImportĀ upstreamĀ versionĀ 6.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#line 2 "Gen_glslang.cpp"
2
 
/* A lexical scanner generated by flex */
3
 
 
4
 
/* Scanner skeleton version:
5
 
 * $Header: /cvs/mesa/Mesa/src/mesa/shader/slang/MachineIndependent/Gen_glslang.cpp,v 1.3 2005-03-18 14:30:27 michal Exp $
6
 
 */
7
 
 
8
 
#define FLEX_SCANNER
9
 
#define YY_FLEX_MAJOR_VERSION 2
10
 
#define YY_FLEX_MINOR_VERSION 5
11
 
 
12
 
#include <stdio.h>
13
 
#include <unistd.h>
14
 
 
15
 
 
16
 
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
17
 
#ifdef c_plusplus
18
 
#ifndef __cplusplus
19
 
#define __cplusplus
20
 
#endif
21
 
#endif
22
 
 
23
 
 
24
 
#ifdef __cplusplus
25
 
 
26
 
#include <stdlib.h>
27
 
 
28
 
/* Use prototypes in function declarations. */
29
 
#define YY_USE_PROTOS
30
 
 
31
 
/* The "const" storage-class-modifier is valid. */
32
 
#define YY_USE_CONST
33
 
 
34
 
#else   /* ! __cplusplus */
35
 
 
36
 
#if __STDC__
37
 
 
38
 
#define YY_USE_PROTOS
39
 
#define YY_USE_CONST
40
 
 
41
 
#endif  /* __STDC__ */
42
 
#endif  /* ! __cplusplus */
43
 
 
44
 
#ifdef __TURBOC__
45
 
 #pragma warn -rch
46
 
 #pragma warn -use
47
 
#include <io.h>
48
 
#include <stdlib.h>
49
 
#define YY_USE_CONST
50
 
#define YY_USE_PROTOS
51
 
#endif
52
 
 
53
 
#ifdef YY_USE_CONST
54
 
#define yyconst const
55
 
#else
56
 
#define yyconst
57
 
#endif
58
 
 
59
 
 
60
 
#ifdef YY_USE_PROTOS
61
 
#define YY_PROTO(proto) proto
62
 
#else
63
 
#define YY_PROTO(proto) ()
64
 
#endif
65
 
 
66
 
/* Returned upon end-of-file. */
67
 
#define YY_NULL 0
68
 
 
69
 
/* Promotes a possibly negative, possibly signed char to an unsigned
70
 
 * integer for use as an array index.  If the signed char is negative,
71
 
 * we want to instead treat it as an 8-bit unsigned char, hence the
72
 
 * double cast.
73
 
 */
74
 
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75
 
 
76
 
/* Enter a start condition.  This macro really ought to take a parameter,
77
 
 * but we do it the disgusting crufty way forced on us by the ()-less
78
 
 * definition of BEGIN.
79
 
 */
80
 
#define BEGIN yy_start = 1 + 2 *
81
 
 
82
 
/* Translate the current start state into a value that can be later handed
83
 
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
84
 
 * compatibility.
85
 
 */
86
 
#define YY_START ((yy_start - 1) / 2)
87
 
#define YYSTATE YY_START
88
 
 
89
 
/* Action number for EOF rule of a given start state. */
90
 
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91
 
 
92
 
/* Special action meaning "start processing a new file". */
93
 
#define YY_NEW_FILE yyrestart( yyin )
94
 
 
95
 
#define YY_END_OF_BUFFER_CHAR 0
96
 
 
97
 
/* Size of default input buffer. */
98
 
#define YY_BUF_SIZE 16384
99
 
 
100
 
typedef struct yy_buffer_state *YY_BUFFER_STATE;
101
 
 
102
 
extern int yyleng;
103
 
extern FILE *yyin, *yyout;
104
 
 
105
 
#define EOB_ACT_CONTINUE_SCAN 0
106
 
#define EOB_ACT_END_OF_FILE 1
107
 
#define EOB_ACT_LAST_MATCH 2
108
 
 
109
 
/* The funky do-while in the following #define is used to turn the definition
110
 
 * int a single C statement (which needs a semi-colon terminator).  This
111
 
 * avoids problems with code like:
112
 
 *
113
 
 *      if ( condition_holds )
114
 
 *              yyless( 5 );
115
 
 *      else
116
 
 *              do_something_else();
117
 
 *
118
 
 * Prior to using the do-while the compiler would get upset at the
119
 
 * "else" because it interpreted the "if" statement as being all
120
 
 * done when it reached the ';' after the yyless() call.
121
 
 */
122
 
 
123
 
/* Return all but the first 'n' matched characters back to the input stream. */
124
 
 
125
 
#define yyless(n) \
126
 
        do \
127
 
                { \
128
 
                /* Undo effects of setting up yytext. */ \
129
 
                *yy_cp = yy_hold_char; \
130
 
                YY_RESTORE_YY_MORE_OFFSET \
131
 
                yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
132
 
                YY_DO_BEFORE_ACTION; /* set up yytext again */ \
133
 
                } \
134
 
        while ( 0 )
135
 
 
136
 
#define unput(c) yyunput( c, yytext_ptr )
137
 
 
138
 
/* The following is because we cannot portably get our hands on size_t
139
 
 * (without autoconf's help, which isn't available because we want
140
 
 * flex-generated scanners to compile on their own).
141
 
 */
142
 
typedef unsigned int yy_size_t;
143
 
 
144
 
 
145
 
struct yy_buffer_state
146
 
        {
147
 
        FILE *yy_input_file;
148
 
 
149
 
        char *yy_ch_buf;                /* input buffer */
150
 
        char *yy_buf_pos;               /* current position in input buffer */
151
 
 
152
 
        /* Size of input buffer in bytes, not including room for EOB
153
 
         * characters.
154
 
         */
155
 
        yy_size_t yy_buf_size;
156
 
 
157
 
        /* Number of characters read into yy_ch_buf, not including EOB
158
 
         * characters.
159
 
         */
160
 
        int yy_n_chars;
161
 
 
162
 
        /* Whether we "own" the buffer - i.e., we know we created it,
163
 
         * and can realloc() it to grow it, and should free() it to
164
 
         * delete it.
165
 
         */
166
 
        int yy_is_our_buffer;
167
 
 
168
 
        /* Whether this is an "interactive" input source; if so, and
169
 
         * if we're using stdio for input, then we want to use getc()
170
 
         * instead of fread(), to make sure we stop fetching input after
171
 
         * each newline.
172
 
         */
173
 
        int yy_is_interactive;
174
 
 
175
 
        /* Whether we're considered to be at the beginning of a line.
176
 
         * If so, '^' rules will be active on the next match, otherwise
177
 
         * not.
178
 
         */
179
 
        int yy_at_bol;
180
 
 
181
 
        /* Whether to try to fill the input buffer when we reach the
182
 
         * end of it.
183
 
         */
184
 
        int yy_fill_buffer;
185
 
 
186
 
        int yy_buffer_status;
187
 
#define YY_BUFFER_NEW 0
188
 
#define YY_BUFFER_NORMAL 1
189
 
        /* When an EOF's been seen but there's still some text to process
190
 
         * then we mark the buffer as YY_EOF_PENDING, to indicate that we
191
 
         * shouldn't try reading from the input source any more.  We might
192
 
         * still have a bunch of tokens to match, though, because of
193
 
         * possible backing-up.
194
 
         *
195
 
         * When we actually see the EOF, we change the status to "new"
196
 
         * (via yyrestart()), so that the user can continue scanning by
197
 
         * just pointing yyin at a new input file.
198
 
         */
199
 
#define YY_BUFFER_EOF_PENDING 2
200
 
        };
201
 
 
202
 
static YY_BUFFER_STATE yy_current_buffer = 0;
203
 
 
204
 
/* We provide macros for accessing buffer states in case in the
205
 
 * future we want to put the buffer states in a more general
206
 
 * "scanner state".
207
 
 */
208
 
#define YY_CURRENT_BUFFER yy_current_buffer
209
 
 
210
 
 
211
 
/* yy_hold_char holds the character lost when yytext is formed. */
212
 
static char yy_hold_char;
213
 
 
214
 
static int yy_n_chars;          /* number of characters read into yy_ch_buf */
215
 
 
216
 
 
217
 
int yyleng;
218
 
 
219
 
/* Points to current character in buffer. */
220
 
static char *yy_c_buf_p = (char *) 0;
221
 
static int yy_init = 1;         /* whether we need to initialize */
222
 
static int yy_start = 0;        /* start state number */
223
 
 
224
 
/* Flag which is used to allow yywrap()'s to do buffer switches
225
 
 * instead of setting up a fresh yyin.  A bit of a hack ...
226
 
 */
227
 
static int yy_did_buffer_switch_on_eof;
228
 
 
229
 
void yyrestart YY_PROTO(( FILE *input_file ));
230
 
 
231
 
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
232
 
void yy_load_buffer_state YY_PROTO(( void ));
233
 
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
234
 
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
235
 
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
236
 
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
237
 
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238
 
 
239
 
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
240
 
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
241
 
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242
 
 
243
 
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
244
 
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
245
 
static void yy_flex_free YY_PROTO(( void * ));
246
 
 
247
 
#define yy_new_buffer yy_create_buffer
248
 
 
249
 
#define yy_set_interactive(is_interactive) \
250
 
        { \
251
 
        if ( ! yy_current_buffer ) \
252
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
253
 
        yy_current_buffer->yy_is_interactive = is_interactive; \
254
 
        }
255
 
 
256
 
#define yy_set_bol(at_bol) \
257
 
        { \
258
 
        if ( ! yy_current_buffer ) \
259
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
260
 
        yy_current_buffer->yy_at_bol = at_bol; \
261
 
        }
262
 
 
263
 
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
264
 
 
265
 
 
266
 
#define yywrap() 1
267
 
#define YY_SKIP_YYWRAP
268
 
typedef unsigned char YY_CHAR;
269
 
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
270
 
typedef int yy_state_type;
271
 
extern char *yytext;
272
 
#define yytext_ptr yytext
273
 
 
274
 
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
275
 
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
276
 
static int yy_get_next_buffer YY_PROTO(( void ));
277
 
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
278
 
 
279
 
/* Done after the current pattern has been matched and before the
280
 
 * corresponding action - sets up yytext.
281
 
 */
282
 
#define YY_DO_BEFORE_ACTION \
283
 
        yytext_ptr = yy_bp; \
284
 
        yyleng = (int) (yy_cp - yy_bp); \
285
 
        yy_hold_char = *yy_cp; \
286
 
        *yy_cp = '\0'; \
287
 
        yy_c_buf_p = yy_cp;
288
 
 
289
 
#define YY_NUM_RULES 144
290
 
#define YY_END_OF_BUFFER 145
291
 
static yyconst short int yy_accept[428] =
292
 
    {   0,
293
 
        0,    0,    0,    0,  145,  143,  142,  142,  127,  133,
294
 
      138,  122,  123,  131,  130,  119,  128,  126,  132,  143,
295
 
      143,  120,  116,  134,  121,  135,  139,  143,  124,  125,
296
 
      137,  143,  143,  143,  143,  143,  143,  143,  143,  143,
297
 
      143,  143,  143,  143,  143,  143,  143,  143,  143,  143,
298
 
      143,  117,  136,  118,  129,  141,  144,  143,  143,  113,
299
 
       99,  118,  107,  102,   97,  105,   95,  106,   96,    0,
300
 
       94,    0,   98,   90,    0,    0,    0,  125,  117,  124,
301
 
      114,  110,  112,  111,  115,   86,  103,  109,    0,    0,
302
 
        0,    0,    0,    0,    0,    0,    0,    0,    8,    0,
303
 
 
304
 
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
305
 
        0,   11,   13,    0,    0,    0,    0,    0,    0,    0,
306
 
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
307
 
        0,    0,    0,    0,    0,    0,    0,  104,  108,  140,
308
 
       93,    0,    1,   92,    0,    0,   88,   89,    0,  100,
309
 
      101,    0,    0,   43,    0,    0,    0,    0,    0,    0,
310
 
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
311
 
        0,    9,    0,    0,    0,    0,    0,    0,    0,   17,
312
 
        0,    0,    0,    0,    0,   14,    0,    0,    0,    0,
313
 
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
314
 
 
315
 
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
316
 
        0,    0,    0,    0,   87,   86,    0,   19,    0,    0,
317
 
       83,    0,    0,    0,    0,    0,    0,    0,   12,   46,
318
 
        0,    0,    0,    0,    0,   51,   65,    0,    0,    0,
319
 
        0,    0,    0,   62,   24,   25,   26,    0,    0,    0,
320
 
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
321
 
       49,   20,    0,    0,    0,    0,    0,    0,   27,   28,
322
 
       29,   18,    0,    0,  140,    0,    0,   92,    0,    0,
323
 
        0,    0,    6,   33,   34,   35,   44,    3,    0,    0,
324
 
        0,    0,   76,   77,   78,    0,   21,   66,   16,   73,
325
 
 
326
 
       74,   75,   70,   71,   72,    0,   15,   68,    0,   30,
327
 
       31,   32,    0,    0,    0,    0,    0,    0,    0,   63,
328
 
        0,    0,    0,    0,    0,    0,    0,   45,    0,   85,
329
 
        0,    0,   10,    0,    0,   91,    0,    0,    0,    0,
330
 
       64,   59,   54,    0,    0,    0,   69,   50,   57,   23,
331
 
        0,   82,   58,   42,   52,    0,    0,    0,    0,    0,
332
 
        0,   93,   92,    0,    0,   53,   22,    0,    0,    0,
333
 
        0,    0,    0,   47,    4,    0,    5,    0,    0,    7,
334
 
       60,    0,    0,   55,    0,    0,    0,    0,   48,   67,
335
 
       56,    2,   61,   84,   36,   37,   38,    0,    0,    0,
336
 
 
337
 
        0,    0,    0,    0,    0,    0,    0,   39,    0,    0,
338
 
        0,    0,    0,   79,    0,   80,    0,    0,    0,   40,
339
 
        0,   41,    0,    0,    0,   81,    0
340
 
    } ;
341
 
 
342
 
static yyconst int yy_ec[256] =
343
 
    {   0,
344
 
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
345
 
        2,    2,    4,    1,    1,    1,    1,    1,    1,    1,
346
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
347
 
        1,    2,    5,    1,    1,    1,    6,    7,    1,    8,
348
 
        9,   10,   11,   12,   13,   14,   15,   16,   17,   18,
349
 
       19,   20,   21,   21,   21,   22,   22,   23,   24,   25,
350
 
       26,   27,   28,    1,   29,   29,   30,   31,   32,   29,
351
 
       33,   33,   33,   33,   33,   33,   33,   33,   33,   33,
352
 
       33,   34,   35,   33,   33,   33,   33,   36,   33,   33,
353
 
       37,    1,   38,   39,   33,    1,   40,   41,   42,   43,
354
 
 
355
 
       44,   45,   46,   47,   48,   33,   49,   50,   51,   52,
356
 
       53,   54,   33,   55,   56,   57,   58,   59,   60,   61,
357
 
       62,   63,   64,   65,   66,   67,    1,    1,    1,    1,
358
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
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,    1,    1,    1,    1,    1,
365
 
 
366
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
367
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
368
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
369
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
370
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
371
 
        1,    1,    1,    1,    1
372
 
    } ;
373
 
 
374
 
static yyconst int yy_meta[68] =
375
 
    {   0,
376
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
377
 
        1,    1,    1,    1,    1,    2,    2,    2,    2,    2,
378
 
        2,    2,    1,    1,    1,    1,    1,    1,    2,    2,
379
 
        2,    2,    3,    3,    3,    3,    1,    1,    1,    2,
380
 
        2,    2,    2,    2,    2,    3,    3,    3,    3,    3,
381
 
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
382
 
        3,    3,    3,    1,    1,    1,    1
383
 
    } ;
384
 
 
385
 
static yyconst short int yy_base[432] =
386
 
    {   0,
387
 
        0,    0,   67,    0,  678,  679,  679,  679,  651,  109,
388
 
      130,  679,  679,  650,  127,  679,  126,  124,  139,  151,
389
 
      671,  647,  679,  151,  647,  121,  679,  668,  679,  679,
390
 
      124,  147,  154,  155,  158,  171,  174,  157,  156,  184,
391
 
      175,  160,  178,  162,  176,  181,  190,  197,  193,  195,
392
 
      179,  679,  193,  679,  679,  679,  679,  656,  666,  679,
393
 
      679,  679,  679,  679,  679,  679,  679,  679,  679,  665,
394
 
      679,  665,  679,  246,  663,  662,    0,  679,  679,  679,
395
 
      639,  679,  679,  679,  638,  253,  679,  679,  612,  605,
396
 
      608,  616,  615,  602,  617,  604,  610,  598,  595,  608,
397
 
 
398
 
      595,  592,  592,  598,  586,  593,  590,  600,  586,  592,
399
 
      597,  679,  136,  596,  587,  581,  586,  588,  578,  592,
400
 
      592,  575,  580,  577,  566,  200,  580,  576,  578,  567,
401
 
      570,  136,  575,  567,  579,  203,  572,  679,  679,  263,
402
 
      275,  616,  679,  282,  614,  311,  318,  325,  613,  679,
403
 
      679,  612,  611,  679,  559,  563,  572,  569,  553,  553,
404
 
      200,  568,  565,  565,  563,  560,  552,  558,  545,  556,
405
 
      559,  679,  556,  544,  551,  553,  546,  535,  534,  547,
406
 
      548,  543,  268,  544,  535,  532,  536,  534,  525,  528,
407
 
      526,  536,  522,  520,  520,  522,  519,  530,  529,  201,
408
 
 
409
 
      524,  519,  508,  290,  526,  528,  517,  562,  561,  337,
410
 
      560,  349,  356,  559,    0,  363,  514,  679,  512,  293,
411
 
      679,  504,  502,  510,  499,  516,  505,  297,  679,  679,
412
 
      499,  509,  509,  494,  368,  679,  679,  371,  498,  492,
413
 
      491,  492,  374,  679,  679,  679,  679,  490,  495,  486,
414
 
      499,  494,  486,  490,  482,  485,  489,  494,  493,  484,
415
 
      679,  679,  490,  479,  479,  484,  483,  480,  679,  679,
416
 
      679,  679,  470,  482,  379,  386,  521,  393,  400,  520,
417
 
      422,  482,  679,  679,  679,  679,  679,  679,  470,  471,
418
 
      465,  475,  679,  679,  679,  466,  679,  679,  679,  679,
419
 
 
420
 
      679,  679,  679,  679,  679,  473,  679,  679,  471,  679,
421
 
      679,  679,  461,  466,  456,  469,  469,  458,  465,  679,
422
 
      463,  465,  449,  458,  464,  459,  447,  679,  449,  679,
423
 
      448,  451,  679,  429,  448,  679,  440,  439,  439,  452,
424
 
      679,  454,  679,  453,  452,  439,  679,  679,  679,  679,
425
 
      435,  679,  679,  679,  679,  432,  443,  436,  442,  439,
426
 
      434,  679,  679,  426,  438,  679,  679,  431,  438,  437,
427
 
      419,  441,  418,  679,  679,  418,  679,  413,  412,  679,
428
 
      679,  411,  410,  679,  422,  405,  404,  376,  679,  679,
429
 
      679,  679,  679,  679,  397,  242,  397,  389,  382,  384,
430
 
 
431
 
      380,  380,  379,  324,  321,  321,  310,  679,  308,  292,
432
 
      282,  266,  268,  285,  265,  679,  246,  258,  229,  679,
433
 
      221,  679,  199,  145,  131,  679,  679,  471,  179,  473,
434
 
      475
435
 
    } ;
436
 
 
437
 
static yyconst short int yy_def[432] =
438
 
    {   0,
439
 
      427,    1,  427,    3,  427,  427,  427,  427,  427,  427,
440
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
441
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
442
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
443
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
444
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
445
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
446
 
      427,  428,  427,  427,  427,  427,  429,  427,  427,  427,
447
 
      427,  427,  427,  427,  427,  430,  427,  427,  427,  427,
448
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
449
 
 
450
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
451
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
452
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
453
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  431,
454
 
      427,  428,  427,  427,  427,  427,  427,  427,  427,  427,
455
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
456
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
457
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
458
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
459
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
460
 
 
461
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
462
 
      427,  427,  427,  427,  429,  430,  427,  427,  427,  427,
463
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
464
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
465
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
466
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
467
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
468
 
      427,  427,  427,  427,  431,  427,  427,  427,  427,  427,
469
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
470
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
471
 
 
472
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
473
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
474
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
475
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
476
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
477
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
478
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
479
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
480
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
481
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
482
 
 
483
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
484
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
485
 
      427,  427,  427,  427,  427,  427,    0,  427,  427,  427,
486
 
      427
487
 
    } ;
488
 
 
489
 
static yyconst short int yy_nxt[747] =
490
 
    {   0,
491
 
        6,    7,    8,    7,    9,   10,   11,   12,   13,   14,
492
 
       15,   16,   17,   18,   19,   20,   21,   21,   21,   21,
493
 
       21,   21,   22,   23,   24,   25,   26,   27,   28,   28,
494
 
       28,   28,   28,   28,   28,   28,   29,   30,   31,   32,
495
 
       33,   34,   35,   36,   37,   38,   39,   40,   28,   41,
496
 
       42,   43,   44,   45,   46,   47,   48,   49,   50,   51,
497
 
       28,   28,   28,   52,   53,   54,   55,    6,   56,   57,
498
 
       56,    6,    6,    6,    6,    6,    6,    6,    6,    6,
499
 
        6,   58,    6,    6,    6,    6,    6,    6,    6,    6,
500
 
        6,    6,    6,    6,    6,   59,   59,   59,   59,   59,
501
 
 
502
 
       59,   59,   59,    6,    6,    6,   59,   59,   59,   59,
503
 
       59,   59,   59,   59,   59,   59,   59,   59,   59,   59,
504
 
       59,   59,   59,   59,   59,   59,   59,   59,   59,   59,
505
 
        6,    6,    6,    6,   61,   62,   63,   66,   68,   70,
506
 
       70,   70,   70,   70,   70,   70,   84,   85,   71,   87,
507
 
       86,   69,   67,   72,   74,   64,   79,   86,   86,   86,
508
 
       86,   86,   88,   86,   73,   86,   75,   75,   75,   75,
509
 
       75,   75,   76,   80,   86,   81,   82,   86,   86,   86,
510
 
      149,   86,   86,  200,   86,  177,   77,   86,  178,  179,
511
 
      426,  201,  180,   86,   94,  110,   86,  425,   86,  116,
512
 
 
513
 
       86,   97,   89,   90,   95,   98,   91,   96,   92,  109,
514
 
       99,   77,   93,  104,  111,  120,  100,  117,  138,  119,
515
 
      101,  105,  102,  106,  122,  137,  107,  115,  112,  123,
516
 
      118,  103,  108,  121,  134,  113,  124,  125,  135,  193,
517
 
      128,  424,  114,  129,  132,  264,  126,  136,  133,  127,
518
 
      205,  130,  206,  265,  194,  223,  224,  139,  131,  144,
519
 
      423,  145,  145,  145,  145,  145,  145,  145,  152,  152,
520
 
      152,  152,  152,  152,  152,  400,  401,  146,  208,  208,
521
 
      208,  208,  208,  208,  208,  245,  246,  247,  422,  146,
522
 
       70,   70,   70,   70,   70,   70,   70,  211,  211,  211,
523
 
 
524
 
      211,  211,  211,  211,  421,  420,  210,  269,  270,  271,
525
 
      284,  285,  286,  212,  293,  294,  295,  419,  210,  418,
526
 
      417,  213,  416,  213,  415,  212,  214,  214,  214,  214,
527
 
      214,  214,  214,   75,   75,   75,   75,   75,   75,   76,
528
 
       76,   76,   76,   76,   76,   76,   76,  276,  414,  276,
529
 
      413,  412,  277,  277,  277,  277,  277,  277,  277,  279,
530
 
      411,  279,  410,  409,  280,  280,  280,  280,  280,  280,
531
 
      280,  214,  214,  214,  214,  214,  214,  214,  152,  152,
532
 
      152,  152,  152,  152,  152,  300,  301,  302,  303,  304,
533
 
      305,  310,  311,  312,  208,  208,  208,  208,  208,  208,
534
 
 
535
 
      208,  277,  277,  277,  277,  277,  277,  277,  211,  211,
536
 
      211,  211,  211,  211,  211,  280,  280,  280,  280,  280,
537
 
      280,  280,  408,  407,  212,  336,  406,  405,  404,  403,
538
 
      402,  399,  362,  398,  397,  396,  212,  214,  214,  214,
539
 
      214,  214,  214,  214,  277,  277,  277,  277,  277,  277,
540
 
      277,  363,  395,  394,  393,  392,  391,  385,  386,  387,
541
 
      390,  389,  384,  280,  280,  280,  280,  280,  280,  280,
542
 
      388,  142,  142,  142,  153,  153,  209,  209,  383,  382,
543
 
      381,  380,  379,  378,  377,  376,  375,  374,  373,  372,
544
 
      371,  370,  369,  368,  367,  366,  365,  364,  361,  360,
545
 
 
546
 
      359,  358,  357,  356,  355,  354,  353,  352,  351,  350,
547
 
      349,  348,  347,  346,  345,  344,  343,  342,  341,  340,
548
 
      339,  338,  337,  335,  334,  333,  332,  331,  330,  329,
549
 
      328,  327,  326,  325,  324,  323,  322,  321,  320,  319,
550
 
      318,  317,  316,  315,  314,  313,  309,  308,  307,  306,
551
 
      299,  298,  297,  296,  292,  291,  290,  289,  288,  287,
552
 
      283,  282,  281,  278,  275,  275,  274,  273,  272,  268,
553
 
      267,  266,  263,  262,  261,  260,  259,  258,  257,  256,
554
 
      255,  254,  253,  252,  251,  250,  249,  248,  244,  243,
555
 
      242,  241,  240,  239,  238,  237,  236,  235,  234,  233,
556
 
 
557
 
      232,  231,  230,  229,  228,  227,  226,  225,  222,  221,
558
 
      220,  219,  218,  217,  216,  216,  215,   74,  143,  207,
559
 
      204,  203,  202,  199,  198,  197,  196,  195,  192,  191,
560
 
      190,  189,  188,  187,  186,  185,  184,  183,  182,  181,
561
 
      176,  175,  174,  173,  172,  171,  170,  169,  168,  167,
562
 
      166,  165,  164,  163,  162,  161,  160,  159,  158,  157,
563
 
      156,  155,  154,  151,  150,  148,  147,  143,  141,  140,
564
 
       72,   86,   83,   78,   74,   65,   60,  427,    5,  427,
565
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
566
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
567
 
 
568
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
569
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
570
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
571
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
572
 
      427,  427,  427,  427,  427,  427
573
 
    } ;
574
 
 
575
 
static yyconst short int yy_chk[747] =
576
 
    {   0,
577
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
578
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
579
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
580
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
581
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
582
 
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
583
 
        1,    1,    1,    1,    1,    1,    1,    3,    3,    3,
584
 
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
585
 
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
586
 
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
587
 
 
588
 
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
589
 
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
590
 
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
591
 
        3,    3,    3,    3,   10,   10,   11,   15,   17,   18,
592
 
       18,   18,   18,   18,   18,   18,   26,   26,   19,   31,
593
 
       32,   17,   15,   19,   20,   11,   24,   33,   34,   39,
594
 
       38,   35,   31,   42,   19,   44,   20,   20,   20,   20,
595
 
       20,   20,   20,   24,   36,   24,   24,   37,   41,   45,
596
 
      429,   43,   51,  132,   46,  113,   20,   40,  113,  113,
597
 
      425,  132,  113,   47,   34,   39,   49,  424,   50,   42,
598
 
 
599
 
       48,   35,   32,   32,   34,   35,   33,   34,   33,   38,
600
 
       35,   20,   33,   37,   39,   45,   35,   43,   53,   44,
601
 
       36,   37,   36,   37,   46,   51,   37,   41,   40,   47,
602
 
       43,   36,   37,   45,   50,   40,   47,   47,   50,  126,
603
 
       48,  423,   40,   48,   49,  200,   47,   50,   49,   47,
604
 
      136,   48,  136,  200,  126,  161,  161,   53,   48,   74,
605
 
      421,   74,   74,   74,   74,   74,   74,   74,   86,   86,
606
 
       86,   86,   86,   86,   86,  396,  396,   74,  140,  140,
607
 
      140,  140,  140,  140,  140,  183,  183,  183,  419,   74,
608
 
      141,  141,  141,  141,  141,  141,  141,  144,  144,  144,
609
 
 
610
 
      144,  144,  144,  144,  418,  417,  141,  204,  204,  204,
611
 
      220,  220,  220,  144,  228,  228,  228,  415,  141,  414,
612
 
      413,  146,  412,  146,  411,  144,  146,  146,  146,  146,
613
 
      146,  146,  146,  147,  147,  147,  147,  147,  147,  147,
614
 
      148,  148,  148,  148,  148,  148,  148,  210,  410,  210,
615
 
      409,  407,  210,  210,  210,  210,  210,  210,  210,  212,
616
 
      406,  212,  405,  404,  212,  212,  212,  212,  212,  212,
617
 
      212,  213,  213,  213,  213,  213,  213,  213,  216,  216,
618
 
      216,  216,  216,  216,  216,  235,  235,  235,  238,  238,
619
 
      238,  243,  243,  243,  275,  275,  275,  275,  275,  275,
620
 
 
621
 
      275,  276,  276,  276,  276,  276,  276,  276,  278,  278,
622
 
      278,  278,  278,  278,  278,  279,  279,  279,  279,  279,
623
 
      279,  279,  403,  402,  278,  281,  401,  400,  399,  398,
624
 
      397,  395,  334,  388,  387,  386,  278,  281,  281,  281,
625
 
      281,  281,  281,  281,  334,  334,  334,  334,  334,  334,
626
 
      334,  335,  385,  383,  382,  379,  378,  372,  372,  372,
627
 
      376,  373,  371,  335,  335,  335,  335,  335,  335,  335,
628
 
      372,  428,  428,  428,  430,  430,  431,  431,  370,  369,
629
 
      368,  365,  364,  361,  360,  359,  358,  357,  356,  351,
630
 
      346,  345,  344,  342,  340,  339,  338,  337,  332,  331,
631
 
 
632
 
      329,  327,  326,  325,  324,  323,  322,  321,  319,  318,
633
 
      317,  316,  315,  314,  313,  309,  306,  296,  292,  291,
634
 
      290,  289,  282,  280,  277,  274,  273,  268,  267,  266,
635
 
      265,  264,  263,  260,  259,  258,  257,  256,  255,  254,
636
 
      253,  252,  251,  250,  249,  248,  242,  241,  240,  239,
637
 
      234,  233,  232,  231,  227,  226,  225,  224,  223,  222,
638
 
      219,  217,  214,  211,  209,  208,  207,  206,  205,  203,
639
 
      202,  201,  199,  198,  197,  196,  195,  194,  193,  192,
640
 
      191,  190,  189,  188,  187,  186,  185,  184,  182,  181,
641
 
      180,  179,  178,  177,  176,  175,  174,  173,  171,  170,
642
 
 
643
 
      169,  168,  167,  166,  165,  164,  163,  162,  160,  159,
644
 
      158,  157,  156,  155,  153,  152,  149,  145,  142,  137,
645
 
      135,  134,  133,  131,  130,  129,  128,  127,  125,  124,
646
 
      123,  122,  121,  120,  119,  118,  117,  116,  115,  114,
647
 
      111,  110,  109,  108,  107,  106,  105,  104,  103,  102,
648
 
      101,  100,   99,   98,   97,   96,   95,   94,   93,   92,
649
 
       91,   90,   89,   85,   81,   76,   75,   72,   70,   59,
650
 
       58,   28,   25,   22,   21,   14,    9,    5,  427,  427,
651
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
652
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
653
 
 
654
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
655
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
656
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
657
 
      427,  427,  427,  427,  427,  427,  427,  427,  427,  427,
658
 
      427,  427,  427,  427,  427,  427
659
 
    } ;
660
 
 
661
 
static yy_state_type yy_last_accepting_state;
662
 
static char *yy_last_accepting_cpos;
663
 
 
664
 
/* The intent behind this definition is that it'll catch
665
 
 * any uses of REJECT which flex missed.
666
 
 */
667
 
#define REJECT reject_used_but_not_detected
668
 
#define yymore() yymore_used_but_not_detected
669
 
#define YY_MORE_ADJ 0
670
 
#define YY_RESTORE_YY_MORE_OFFSET
671
 
char *yytext;
672
 
#line 1 "glslang.l"
673
 
#define INITIAL 0
674
 
/*
675
 
//
676
 
//Copyright (C) 2002-2005  3Dlabs Inc. Ltd.
677
 
//All rights reserved.
678
 
//
679
 
//Redistribution and use in source and binary forms, with or without
680
 
//modification, are permitted provided that the following conditions
681
 
//are met:
682
 
//
683
 
//    Redistributions of source code must retain the above copyright
684
 
//    notice, this list of conditions and the following disclaimer.
685
 
//
686
 
//    Redistributions in binary form must reproduce the above
687
 
//    copyright notice, this list of conditions and the following
688
 
//    disclaimer in the documentation and/or other materials provided
689
 
//    with the distribution.
690
 
//
691
 
//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
692
 
//    contributors may be used to endorse or promote products derived
693
 
//    from this software without specific prior written permission.
694
 
//
695
 
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
696
 
//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
697
 
//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
698
 
//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
699
 
//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
700
 
//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
701
 
//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
702
 
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
703
 
//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
704
 
//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
705
 
//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
706
 
//POSSIBILITY OF SUCH DAMAGE.
707
 
//
708
 
*/
709
 
/* Based on
710
 
ANSI C grammar, Lex specification
711
 
 
712
 
In 1985, Jeff Lee published this Lex specification together with a Yacc 
713
 
grammar for the April 30, 1985 ANSI C draft.  Tom Stockfisch reposted 
714
 
both to net.sources in 1987; that original, as mentioned in the answer 
715
 
to question 17.25 of the comp.lang.c FAQ, can be ftp'ed from ftp.uu.net, 
716
 
file usenet/net.sources/ansi.c.grammar.Z. 
717
 
 
718
 
I intend to keep this version as close to the current C Standard grammar 
719
 
as possible; please let me know if you discover discrepancies. 
720
 
 
721
 
Jutta Degener, 1995 
722
 
*/
723
 
#define YY_NO_UNPUT 1
724
 
#line 59 "glslang.l"
725
 
#include <stdio.h>
726
 
#include <stdlib.h>
727
 
#include "ParseHelper.h"
728
 
#include "glslang_tab.h"
729
 
 
730
 
/* windows only pragma */
731
 
#ifdef _MSC_VER
732
 
#pragma warning(disable : 4102)
733
 
#endif
734
 
 
735
 
int yy_input(char* buf, int max_size);
736
 
TSourceLoc yylineno;
737
 
 
738
 
#ifdef _WIN32
739
 
    extern int yyparse(TParseContext&);
740
 
    #define YY_DECL int yylex(YYSTYPE* pyylval, TParseContext& parseContext)    
741
 
#else
742
 
    extern int yyparse(void*);
743
 
    #define YY_DECL int yylex(YYSTYPE* pyylval, void* parseContextLocal)
744
 
    #define parseContext (*((TParseContext*)(parseContextLocal)))
745
 
#endif
746
 
 
747
 
#define YY_INPUT(buf,result,max_size) (result = yy_input(buf, max_size))
748
 
 
749
 
#define YY_NEVER_INTERACTIVE 1
750
 
#define FIELDS 1
751
 
 
752
 
#line 753 "Gen_glslang.cpp"
753
 
 
754
 
/* Macros after this point can all be overridden by user definitions in
755
 
 * section 1.
756
 
 */
757
 
 
758
 
#ifndef YY_SKIP_YYWRAP
759
 
#ifdef __cplusplus
760
 
extern "C" int yywrap YY_PROTO(( void ));
761
 
#else
762
 
extern int yywrap YY_PROTO(( void ));
763
 
#endif
764
 
#endif
765
 
 
766
 
#ifndef YY_NO_UNPUT
767
 
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
768
 
#endif
769
 
 
770
 
#ifndef yytext_ptr
771
 
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
772
 
#endif
773
 
 
774
 
#ifdef YY_NEED_STRLEN
775
 
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
776
 
#endif
777
 
 
778
 
#ifndef YY_NO_INPUT
779
 
#ifdef __cplusplus
780
 
static int yyinput YY_PROTO(( void ));
781
 
#else
782
 
static int input YY_PROTO(( void ));
783
 
#endif
784
 
#endif
785
 
 
786
 
#if YY_STACK_USED
787
 
static int yy_start_stack_ptr = 0;
788
 
static int yy_start_stack_depth = 0;
789
 
static int *yy_start_stack = 0;
790
 
#ifndef YY_NO_PUSH_STATE
791
 
static void yy_push_state YY_PROTO(( int new_state ));
792
 
#endif
793
 
#ifndef YY_NO_POP_STATE
794
 
static void yy_pop_state YY_PROTO(( void ));
795
 
#endif
796
 
#ifndef YY_NO_TOP_STATE
797
 
static int yy_top_state YY_PROTO(( void ));
798
 
#endif
799
 
 
800
 
#else
801
 
#define YY_NO_PUSH_STATE 1
802
 
#define YY_NO_POP_STATE 1
803
 
#define YY_NO_TOP_STATE 1
804
 
#endif
805
 
 
806
 
#ifdef YY_MALLOC_DECL
807
 
YY_MALLOC_DECL
808
 
#else
809
 
#if __STDC__
810
 
#ifndef __cplusplus
811
 
#include <stdlib.h>
812
 
#endif
813
 
#else
814
 
/* Just try to get by without declaring the routines.  This will fail
815
 
 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
816
 
 * or sizeof(void*) != sizeof(int).
817
 
 */
818
 
#endif
819
 
#endif
820
 
 
821
 
/* Amount of stuff to slurp up with each read. */
822
 
#ifndef YY_READ_BUF_SIZE
823
 
#define YY_READ_BUF_SIZE 8192
824
 
#endif
825
 
 
826
 
/* Copy whatever the last rule matched to the standard output. */
827
 
 
828
 
#ifndef ECHO
829
 
/* This used to be an fputs(), but since the string might contain NUL's,
830
 
 * we now use fwrite().
831
 
 */
832
 
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
833
 
#endif
834
 
 
835
 
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
836
 
 * is returned in "result".
837
 
 */
838
 
#ifndef YY_INPUT
839
 
#define YY_INPUT(buf,result,max_size) \
840
 
        if ( yy_current_buffer->yy_is_interactive ) \
841
 
                { \
842
 
                int c = '*', n; \
843
 
                for ( n = 0; n < max_size && \
844
 
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
845
 
                        buf[n] = (char) c; \
846
 
                if ( c == '\n' ) \
847
 
                        buf[n++] = (char) c; \
848
 
                if ( c == EOF && ferror( yyin ) ) \
849
 
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
850
 
                result = n; \
851
 
                } \
852
 
        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
853
 
                  && ferror( yyin ) ) \
854
 
                YY_FATAL_ERROR( "input in flex scanner failed" );
855
 
#endif
856
 
 
857
 
/* No semi-colon after return; correct usage is to write "yyterminate();" -
858
 
 * we don't want an extra ';' after the "return" because that will cause
859
 
 * some compilers to complain about unreachable statements.
860
 
 */
861
 
#ifndef yyterminate
862
 
#define yyterminate() return YY_NULL
863
 
#endif
864
 
 
865
 
/* Number of entries by which start-condition stack grows. */
866
 
#ifndef YY_START_STACK_INCR
867
 
#define YY_START_STACK_INCR 25
868
 
#endif
869
 
 
870
 
/* Report a fatal error. */
871
 
#ifndef YY_FATAL_ERROR
872
 
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
873
 
#endif
874
 
 
875
 
/* Default declaration of generated scanner - a define so the user can
876
 
 * easily add parameters.
877
 
 */
878
 
#ifndef YY_DECL
879
 
#define YY_DECL int yylex YY_PROTO(( void ))
880
 
#endif
881
 
 
882
 
/* Code executed at the beginning of each rule, after yytext and yyleng
883
 
 * have been set up.
884
 
 */
885
 
#ifndef YY_USER_ACTION
886
 
#define YY_USER_ACTION
887
 
#endif
888
 
 
889
 
/* Code executed at the end of each rule. */
890
 
#ifndef YY_BREAK
891
 
#define YY_BREAK break;
892
 
#endif
893
 
 
894
 
#define YY_RULE_SETUP \
895
 
        YY_USER_ACTION
896
 
 
897
 
YY_DECL
898
 
        {
899
 
        register yy_state_type yy_current_state;
900
 
        register char *yy_cp, *yy_bp;
901
 
        register int yy_act;
902
 
 
903
 
#line 91 "glslang.l"
904
 
 
905
 
#line 906 "Gen_glslang.cpp"
906
 
 
907
 
        if ( yy_init )
908
 
                {
909
 
                yy_init = 0;
910
 
 
911
 
#ifdef YY_USER_INIT
912
 
                YY_USER_INIT;
913
 
#endif
914
 
 
915
 
                if ( ! yy_start )
916
 
                        yy_start = 1;   /* first start state */
917
 
 
918
 
                if ( ! yyin )
919
 
                        yyin = stdin;
920
 
 
921
 
                if ( ! yyout )
922
 
                        yyout = stdout;
923
 
 
924
 
                if ( ! yy_current_buffer )
925
 
                        yy_current_buffer =
926
 
                                yy_create_buffer( yyin, YY_BUF_SIZE );
927
 
 
928
 
                yy_load_buffer_state();
929
 
                }
930
 
 
931
 
        while ( 1 )             /* loops until end-of-file is reached */
932
 
                {
933
 
                yy_cp = yy_c_buf_p;
934
 
 
935
 
                /* Support of yytext. */
936
 
                *yy_cp = yy_hold_char;
937
 
 
938
 
                /* yy_bp points to the position in yy_ch_buf of the start of
939
 
                 * the current run.
940
 
                 */
941
 
                yy_bp = yy_cp;
942
 
 
943
 
                yy_current_state = yy_start;
944
 
yy_match:
945
 
                do
946
 
                        {
947
 
                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
948
 
                        if ( yy_accept[yy_current_state] )
949
 
                                {
950
 
                                yy_last_accepting_state = yy_current_state;
951
 
                                yy_last_accepting_cpos = yy_cp;
952
 
                                }
953
 
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
954
 
                                {
955
 
                                yy_current_state = (int) yy_def[yy_current_state];
956
 
                                if ( yy_current_state >= 428 )
957
 
                                        yy_c = yy_meta[(unsigned int) yy_c];
958
 
                                }
959
 
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
960
 
                        ++yy_cp;
961
 
                        }
962
 
                while ( yy_base[yy_current_state] != 679 );
963
 
 
964
 
yy_find_action:
965
 
                yy_act = yy_accept[yy_current_state];
966
 
                if ( yy_act == 0 )
967
 
                        { /* have to back up */
968
 
                        yy_cp = yy_last_accepting_cpos;
969
 
                        yy_current_state = yy_last_accepting_state;
970
 
                        yy_act = yy_accept[yy_current_state];
971
 
                        }
972
 
 
973
 
                YY_DO_BEFORE_ACTION;
974
 
 
975
 
 
976
 
do_action:      /* This label is used only to access EOF actions. */
977
 
 
978
 
 
979
 
                switch ( yy_act )
980
 
        { /* beginning of action switch */
981
 
                        case 0: /* must back up */
982
 
                        /* undo the effects of YY_DO_BEFORE_ACTION */
983
 
                        *yy_cp = yy_hold_char;
984
 
                        yy_cp = yy_last_accepting_cpos;
985
 
                        yy_current_state = yy_last_accepting_state;
986
 
                        goto yy_find_action;
987
 
 
988
 
case 1:
989
 
YY_RULE_SETUP
990
 
#line 92 "glslang.l"
991
 
{ /* ?? carriage and/or line-feed? */ };
992
 
        YY_BREAK
993
 
case 2:
994
 
YY_RULE_SETUP
995
 
#line 94 "glslang.l"
996
 
{  pyylval->lex.line = yylineno; return(ATTRIBUTE); }
997
 
        YY_BREAK
998
 
case 3:
999
 
YY_RULE_SETUP
1000
 
#line 95 "glslang.l"
1001
 
{  pyylval->lex.line = yylineno; return(CONST_QUAL); }
1002
 
        YY_BREAK
1003
 
case 4:
1004
 
YY_RULE_SETUP
1005
 
#line 96 "glslang.l"
1006
 
{  pyylval->lex.line = yylineno; return(UNIFORM); }
1007
 
        YY_BREAK
1008
 
case 5:
1009
 
YY_RULE_SETUP
1010
 
#line 97 "glslang.l"
1011
 
{  pyylval->lex.line = yylineno; return(VARYING); }
1012
 
        YY_BREAK
1013
 
case 6:
1014
 
YY_RULE_SETUP
1015
 
#line 99 "glslang.l"
1016
 
{  pyylval->lex.line = yylineno; return(BREAK); }
1017
 
        YY_BREAK
1018
 
case 7:
1019
 
YY_RULE_SETUP
1020
 
#line 100 "glslang.l"
1021
 
{  pyylval->lex.line = yylineno; return(CONTINUE); }
1022
 
        YY_BREAK
1023
 
case 8:
1024
 
YY_RULE_SETUP
1025
 
#line 101 "glslang.l"
1026
 
{  pyylval->lex.line = yylineno; return(DO); }
1027
 
        YY_BREAK
1028
 
case 9:
1029
 
YY_RULE_SETUP
1030
 
#line 102 "glslang.l"
1031
 
{  pyylval->lex.line = yylineno; return(FOR); }
1032
 
        YY_BREAK
1033
 
case 10:
1034
 
YY_RULE_SETUP
1035
 
#line 103 "glslang.l"
1036
 
{  pyylval->lex.line = yylineno; return(WHILE); }
1037
 
        YY_BREAK
1038
 
case 11:
1039
 
YY_RULE_SETUP
1040
 
#line 105 "glslang.l"
1041
 
{  pyylval->lex.line = yylineno; return(IF); }
1042
 
        YY_BREAK
1043
 
case 12:
1044
 
YY_RULE_SETUP
1045
 
#line 106 "glslang.l"
1046
 
{  pyylval->lex.line = yylineno; return(ELSE); }
1047
 
        YY_BREAK
1048
 
case 13:
1049
 
YY_RULE_SETUP
1050
 
#line 108 "glslang.l"
1051
 
{  pyylval->lex.line = yylineno; return(IN_QUAL); }
1052
 
        YY_BREAK
1053
 
case 14:
1054
 
YY_RULE_SETUP
1055
 
#line 109 "glslang.l"
1056
 
{  pyylval->lex.line = yylineno; return(OUT_QUAL); }
1057
 
        YY_BREAK
1058
 
case 15:
1059
 
YY_RULE_SETUP
1060
 
#line 110 "glslang.l"
1061
 
{  pyylval->lex.line = yylineno; return(INOUT_QUAL); }
1062
 
        YY_BREAK
1063
 
case 16:
1064
 
YY_RULE_SETUP
1065
 
#line 112 "glslang.l"
1066
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(FLOAT_TYPE); }
1067
 
        YY_BREAK
1068
 
case 17:
1069
 
YY_RULE_SETUP
1070
 
#line 113 "glslang.l"
1071
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(INT_TYPE); }
1072
 
        YY_BREAK
1073
 
case 18:
1074
 
YY_RULE_SETUP
1075
 
#line 114 "glslang.l"
1076
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(VOID_TYPE); }
1077
 
        YY_BREAK
1078
 
case 19:
1079
 
YY_RULE_SETUP
1080
 
#line 115 "glslang.l"
1081
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(BOOL_TYPE); }
1082
 
        YY_BREAK
1083
 
case 20:
1084
 
YY_RULE_SETUP
1085
 
#line 116 "glslang.l"
1086
 
{  pyylval->lex.line = yylineno; pyylval->lex.b = true;  return(BOOLCONSTANT); }
1087
 
        YY_BREAK
1088
 
case 21:
1089
 
YY_RULE_SETUP
1090
 
#line 117 "glslang.l"
1091
 
{  pyylval->lex.line = yylineno; pyylval->lex.b = false; return(BOOLCONSTANT); }
1092
 
        YY_BREAK
1093
 
case 22:
1094
 
YY_RULE_SETUP
1095
 
#line 119 "glslang.l"
1096
 
{  pyylval->lex.line = yylineno; return(DISCARD); }
1097
 
        YY_BREAK
1098
 
case 23:
1099
 
YY_RULE_SETUP
1100
 
#line 120 "glslang.l"
1101
 
{  pyylval->lex.line = yylineno; return(RETURN); }
1102
 
        YY_BREAK
1103
 
case 24:
1104
 
YY_RULE_SETUP
1105
 
#line 122 "glslang.l"
1106
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX2); }
1107
 
        YY_BREAK
1108
 
case 25:
1109
 
YY_RULE_SETUP
1110
 
#line 123 "glslang.l"
1111
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX3); }
1112
 
        YY_BREAK
1113
 
case 26:
1114
 
YY_RULE_SETUP
1115
 
#line 124 "glslang.l"
1116
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return(MATRIX4); }
1117
 
        YY_BREAK
1118
 
case 27:
1119
 
YY_RULE_SETUP
1120
 
#line 126 "glslang.l"
1121
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC2); }
1122
 
        YY_BREAK
1123
 
case 28:
1124
 
YY_RULE_SETUP
1125
 
#line 127 "glslang.l"
1126
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC3); }
1127
 
        YY_BREAK
1128
 
case 29:
1129
 
YY_RULE_SETUP
1130
 
#line 128 "glslang.l"
1131
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (VEC4); }
1132
 
        YY_BREAK
1133
 
case 30:
1134
 
YY_RULE_SETUP
1135
 
#line 129 "glslang.l"
1136
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC2); }
1137
 
        YY_BREAK
1138
 
case 31:
1139
 
YY_RULE_SETUP
1140
 
#line 130 "glslang.l"
1141
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC3); }
1142
 
        YY_BREAK
1143
 
case 32:
1144
 
YY_RULE_SETUP
1145
 
#line 131 "glslang.l"
1146
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (IVEC4); }
1147
 
        YY_BREAK
1148
 
case 33:
1149
 
YY_RULE_SETUP
1150
 
#line 132 "glslang.l"
1151
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC2); }
1152
 
        YY_BREAK
1153
 
case 34:
1154
 
YY_RULE_SETUP
1155
 
#line 133 "glslang.l"
1156
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC3); }
1157
 
        YY_BREAK
1158
 
case 35:
1159
 
YY_RULE_SETUP
1160
 
#line 134 "glslang.l"
1161
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return (BVEC4); }
1162
 
        YY_BREAK
1163
 
case 36:
1164
 
YY_RULE_SETUP
1165
 
#line 136 "glslang.l"
1166
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER1D; }
1167
 
        YY_BREAK
1168
 
case 37:
1169
 
YY_RULE_SETUP
1170
 
#line 137 "glslang.l"
1171
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER2D; }
1172
 
        YY_BREAK
1173
 
case 38:
1174
 
YY_RULE_SETUP
1175
 
#line 138 "glslang.l"
1176
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER3D; }
1177
 
        YY_BREAK
1178
 
case 39:
1179
 
YY_RULE_SETUP
1180
 
#line 139 "glslang.l"
1181
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLERCUBE; }
1182
 
        YY_BREAK
1183
 
case 40:
1184
 
YY_RULE_SETUP
1185
 
#line 140 "glslang.l"
1186
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER1DSHADOW; }
1187
 
        YY_BREAK
1188
 
case 41:
1189
 
YY_RULE_SETUP
1190
 
#line 141 "glslang.l"
1191
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = true; return SAMPLER2DSHADOW; }
1192
 
        YY_BREAK
1193
 
case 42:
1194
 
YY_RULE_SETUP
1195
 
#line 143 "glslang.l"
1196
 
{  pyylval->lex.line = yylineno; return(STRUCT); }
1197
 
        YY_BREAK
1198
 
case 43:
1199
 
YY_RULE_SETUP
1200
 
#line 145 "glslang.l"
1201
 
{  PaReservedWord(); return 0; }
1202
 
        YY_BREAK
1203
 
case 44:
1204
 
YY_RULE_SETUP
1205
 
#line 147 "glslang.l"
1206
 
{  PaReservedWord(); return 0; }
1207
 
        YY_BREAK
1208
 
case 45:
1209
 
YY_RULE_SETUP
1210
 
#line 148 "glslang.l"
1211
 
{  PaReservedWord(); return 0; }
1212
 
        YY_BREAK
1213
 
case 46:
1214
 
YY_RULE_SETUP
1215
 
#line 149 "glslang.l"
1216
 
{  PaReservedWord(); return 0; }
1217
 
        YY_BREAK
1218
 
case 47:
1219
 
YY_RULE_SETUP
1220
 
#line 150 "glslang.l"
1221
 
{  PaReservedWord(); return 0; }
1222
 
        YY_BREAK
1223
 
case 48:
1224
 
YY_RULE_SETUP
1225
 
#line 151 "glslang.l"
1226
 
{  PaReservedWord(); return 0; }
1227
 
        YY_BREAK
1228
 
case 49:
1229
 
YY_RULE_SETUP
1230
 
#line 152 "glslang.l"
1231
 
{  PaReservedWord(); return 0; }
1232
 
        YY_BREAK
1233
 
case 50:
1234
 
YY_RULE_SETUP
1235
 
#line 153 "glslang.l"
1236
 
{  PaReservedWord(); return 0; }
1237
 
        YY_BREAK
1238
 
case 51:
1239
 
YY_RULE_SETUP
1240
 
#line 155 "glslang.l"
1241
 
{  PaReservedWord(); return 0; }
1242
 
        YY_BREAK
1243
 
case 52:
1244
 
YY_RULE_SETUP
1245
 
#line 156 "glslang.l"
1246
 
{  PaReservedWord(); return 0; }
1247
 
        YY_BREAK
1248
 
case 53:
1249
 
YY_RULE_SETUP
1250
 
#line 157 "glslang.l"
1251
 
{  PaReservedWord(); return 0; }
1252
 
        YY_BREAK
1253
 
case 54:
1254
 
YY_RULE_SETUP
1255
 
#line 159 "glslang.l"
1256
 
{  PaReservedWord(); return 0; }
1257
 
        YY_BREAK
1258
 
case 55:
1259
 
YY_RULE_SETUP
1260
 
#line 160 "glslang.l"
1261
 
{  PaReservedWord(); return 0; }
1262
 
        YY_BREAK
1263
 
case 56:
1264
 
YY_RULE_SETUP
1265
 
#line 161 "glslang.l"
1266
 
{  PaReservedWord(); return 0; }
1267
 
        YY_BREAK
1268
 
case 57:
1269
 
YY_RULE_SETUP
1270
 
#line 162 "glslang.l"
1271
 
{  PaReservedWord(); return 0; }
1272
 
        YY_BREAK
1273
 
case 58:
1274
 
YY_RULE_SETUP
1275
 
#line 163 "glslang.l"
1276
 
{  PaReservedWord(); return 0; }
1277
 
        YY_BREAK
1278
 
case 59:
1279
 
YY_RULE_SETUP
1280
 
#line 164 "glslang.l"
1281
 
{  PaReservedWord(); return 0; }
1282
 
        YY_BREAK
1283
 
case 60:
1284
 
YY_RULE_SETUP
1285
 
#line 165 "glslang.l"
1286
 
{  PaReservedWord(); return 0; }
1287
 
        YY_BREAK
1288
 
case 61:
1289
 
YY_RULE_SETUP
1290
 
#line 166 "glslang.l"
1291
 
{  PaReservedWord(); return 0; }
1292
 
        YY_BREAK
1293
 
case 62:
1294
 
YY_RULE_SETUP
1295
 
#line 168 "glslang.l"
1296
 
{  PaReservedWord(); return 0; }
1297
 
        YY_BREAK
1298
 
case 63:
1299
 
YY_RULE_SETUP
1300
 
#line 169 "glslang.l"
1301
 
{  PaReservedWord(); return 0; }
1302
 
        YY_BREAK
1303
 
case 64:
1304
 
YY_RULE_SETUP
1305
 
#line 170 "glslang.l"
1306
 
{  PaReservedWord(); return 0; }
1307
 
        YY_BREAK
1308
 
case 65:
1309
 
YY_RULE_SETUP
1310
 
#line 171 "glslang.l"
1311
 
{  PaReservedWord(); return 0; }
1312
 
        YY_BREAK
1313
 
case 66:
1314
 
YY_RULE_SETUP
1315
 
#line 172 "glslang.l"
1316
 
{  PaReservedWord(); return 0; }
1317
 
        YY_BREAK
1318
 
case 67:
1319
 
YY_RULE_SETUP
1320
 
#line 173 "glslang.l"
1321
 
{  PaReservedWord(); return 0; }
1322
 
        YY_BREAK
1323
 
case 68:
1324
 
YY_RULE_SETUP
1325
 
#line 175 "glslang.l"
1326
 
{  PaReservedWord(); return 0; }
1327
 
        YY_BREAK
1328
 
case 69:
1329
 
YY_RULE_SETUP
1330
 
#line 176 "glslang.l"
1331
 
{  PaReservedWord(); return 0; }
1332
 
        YY_BREAK
1333
 
case 70:
1334
 
YY_RULE_SETUP
1335
 
#line 178 "glslang.l"
1336
 
{  PaReservedWord(); return 0; }
1337
 
        YY_BREAK
1338
 
case 71:
1339
 
YY_RULE_SETUP
1340
 
#line 179 "glslang.l"
1341
 
{  PaReservedWord(); return 0; }
1342
 
        YY_BREAK
1343
 
case 72:
1344
 
YY_RULE_SETUP
1345
 
#line 180 "glslang.l"
1346
 
{  PaReservedWord(); return 0; }
1347
 
        YY_BREAK
1348
 
case 73:
1349
 
YY_RULE_SETUP
1350
 
#line 181 "glslang.l"
1351
 
{  PaReservedWord(); return 0; }
1352
 
        YY_BREAK
1353
 
case 74:
1354
 
YY_RULE_SETUP
1355
 
#line 182 "glslang.l"
1356
 
{  PaReservedWord(); return 0; }
1357
 
        YY_BREAK
1358
 
case 75:
1359
 
YY_RULE_SETUP
1360
 
#line 183 "glslang.l"
1361
 
{  PaReservedWord(); return 0; }
1362
 
        YY_BREAK
1363
 
case 76:
1364
 
YY_RULE_SETUP
1365
 
#line 184 "glslang.l"
1366
 
{  PaReservedWord(); return 0; }
1367
 
        YY_BREAK
1368
 
case 77:
1369
 
YY_RULE_SETUP
1370
 
#line 185 "glslang.l"
1371
 
{  PaReservedWord(); return 0; }
1372
 
        YY_BREAK
1373
 
case 78:
1374
 
YY_RULE_SETUP
1375
 
#line 186 "glslang.l"
1376
 
{  PaReservedWord(); return 0; }
1377
 
        YY_BREAK
1378
 
case 79:
1379
 
YY_RULE_SETUP
1380
 
#line 188 "glslang.l"
1381
 
{  PaReservedWord(); return 0; }
1382
 
        YY_BREAK
1383
 
case 80:
1384
 
YY_RULE_SETUP
1385
 
#line 189 "glslang.l"
1386
 
{  PaReservedWord(); return 0; }
1387
 
        YY_BREAK
1388
 
case 81:
1389
 
YY_RULE_SETUP
1390
 
#line 190 "glslang.l"
1391
 
{  PaReservedWord(); return 0; }
1392
 
        YY_BREAK
1393
 
case 82:
1394
 
YY_RULE_SETUP
1395
 
#line 192 "glslang.l"
1396
 
{  PaReservedWord(); return 0; }
1397
 
        YY_BREAK
1398
 
case 83:
1399
 
YY_RULE_SETUP
1400
 
#line 193 "glslang.l"
1401
 
{  PaReservedWord(); return 0; }
1402
 
        YY_BREAK
1403
 
case 84:
1404
 
YY_RULE_SETUP
1405
 
#line 195 "glslang.l"
1406
 
{  PaReservedWord(); return 0; }
1407
 
        YY_BREAK
1408
 
case 85:
1409
 
YY_RULE_SETUP
1410
 
#line 196 "glslang.l"
1411
 
{  PaReservedWord(); return 0; }
1412
 
        YY_BREAK
1413
 
case 86:
1414
 
YY_RULE_SETUP
1415
 
#line 198 "glslang.l"
1416
 
{  
1417
 
   pyylval->lex.line = yylineno; 
1418
 
   pyylval->lex.string = NewPoolTString(yytext); 
1419
 
   return PaIdentOrType(*pyylval->lex.string, parseContext, pyylval->lex.symbol); 
1420
 
}
1421
 
        YY_BREAK
1422
 
case 87:
1423
 
YY_RULE_SETUP
1424
 
#line 204 "glslang.l"
1425
 
{ pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
1426
 
        YY_BREAK
1427
 
case 88:
1428
 
YY_RULE_SETUP
1429
 
#line 205 "glslang.l"
1430
 
{ pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
1431
 
        YY_BREAK
1432
 
case 89:
1433
 
YY_RULE_SETUP
1434
 
#line 206 "glslang.l"
1435
 
{ pyylval->lex.line = yylineno; parseContext.error(yylineno, "Invalid Octal number.", yytext, "", ""); parseContext.recover(); return 0;}
1436
 
        YY_BREAK
1437
 
case 90:
1438
 
YY_RULE_SETUP
1439
 
#line 207 "glslang.l"
1440
 
{ pyylval->lex.line = yylineno; pyylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
1441
 
        YY_BREAK
1442
 
case 91:
1443
 
YY_RULE_SETUP
1444
 
#line 209 "glslang.l"
1445
 
{ pyylval->lex.line = yylineno; pyylval->lex.f = static_cast<float>(atof(yytext)); return(FLOATCONSTANT); }
1446
 
        YY_BREAK
1447
 
case 92:
1448
 
YY_RULE_SETUP
1449
 
#line 210 "glslang.l"
1450
 
{ pyylval->lex.line = yylineno; pyylval->lex.f = static_cast<float>(atof(yytext)); return(FLOATCONSTANT); }
1451
 
        YY_BREAK
1452
 
case 93:
1453
 
YY_RULE_SETUP
1454
 
#line 211 "glslang.l"
1455
 
{ pyylval->lex.line = yylineno; pyylval->lex.f = static_cast<float>(atof(yytext)); return(FLOATCONSTANT); }
1456
 
        YY_BREAK
1457
 
case 94:
1458
 
YY_RULE_SETUP
1459
 
#line 213 "glslang.l"
1460
 
{  int ret = PaParseComment(pyylval->lex.line, parseContext); if (!ret) return ret; }   
1461
 
        YY_BREAK
1462
 
case 95:
1463
 
YY_RULE_SETUP
1464
 
#line 215 "glslang.l"
1465
 
{  pyylval->lex.line = yylineno; return(ADD_ASSIGN); }
1466
 
        YY_BREAK
1467
 
case 96:
1468
 
YY_RULE_SETUP
1469
 
#line 216 "glslang.l"
1470
 
{  pyylval->lex.line = yylineno; return(SUB_ASSIGN); }
1471
 
        YY_BREAK
1472
 
case 97:
1473
 
YY_RULE_SETUP
1474
 
#line 217 "glslang.l"
1475
 
{  pyylval->lex.line = yylineno; return(MUL_ASSIGN); }
1476
 
        YY_BREAK
1477
 
case 98:
1478
 
YY_RULE_SETUP
1479
 
#line 218 "glslang.l"
1480
 
{  pyylval->lex.line = yylineno; return(DIV_ASSIGN); }
1481
 
        YY_BREAK
1482
 
case 99:
1483
 
YY_RULE_SETUP
1484
 
#line 219 "glslang.l"
1485
 
{  pyylval->lex.line = yylineno; return(MOD_ASSIGN); }
1486
 
        YY_BREAK
1487
 
case 100:
1488
 
YY_RULE_SETUP
1489
 
#line 220 "glslang.l"
1490
 
{  pyylval->lex.line = yylineno; return(LEFT_ASSIGN); }
1491
 
        YY_BREAK
1492
 
case 101:
1493
 
YY_RULE_SETUP
1494
 
#line 221 "glslang.l"
1495
 
{  pyylval->lex.line = yylineno; return(RIGHT_ASSIGN); }
1496
 
        YY_BREAK
1497
 
case 102:
1498
 
YY_RULE_SETUP
1499
 
#line 222 "glslang.l"
1500
 
{  pyylval->lex.line = yylineno; return(AND_ASSIGN); }
1501
 
        YY_BREAK
1502
 
case 103:
1503
 
YY_RULE_SETUP
1504
 
#line 223 "glslang.l"
1505
 
{  pyylval->lex.line = yylineno; return(XOR_ASSIGN); }
1506
 
        YY_BREAK
1507
 
case 104:
1508
 
YY_RULE_SETUP
1509
 
#line 224 "glslang.l"
1510
 
{  pyylval->lex.line = yylineno; return(OR_ASSIGN); }
1511
 
        YY_BREAK
1512
 
case 105:
1513
 
YY_RULE_SETUP
1514
 
#line 226 "glslang.l"
1515
 
{  pyylval->lex.line = yylineno; return(INC_OP); }
1516
 
        YY_BREAK
1517
 
case 106:
1518
 
YY_RULE_SETUP
1519
 
#line 227 "glslang.l"
1520
 
{  pyylval->lex.line = yylineno; return(DEC_OP); }
1521
 
        YY_BREAK
1522
 
case 107:
1523
 
YY_RULE_SETUP
1524
 
#line 228 "glslang.l"
1525
 
{  pyylval->lex.line = yylineno; return(AND_OP); }
1526
 
        YY_BREAK
1527
 
case 108:
1528
 
YY_RULE_SETUP
1529
 
#line 229 "glslang.l"
1530
 
{  pyylval->lex.line = yylineno; return(OR_OP); }
1531
 
        YY_BREAK
1532
 
case 109:
1533
 
YY_RULE_SETUP
1534
 
#line 230 "glslang.l"
1535
 
{  pyylval->lex.line = yylineno; return(XOR_OP); }
1536
 
        YY_BREAK
1537
 
case 110:
1538
 
YY_RULE_SETUP
1539
 
#line 231 "glslang.l"
1540
 
{  pyylval->lex.line = yylineno; return(LE_OP); }
1541
 
        YY_BREAK
1542
 
case 111:
1543
 
YY_RULE_SETUP
1544
 
#line 232 "glslang.l"
1545
 
{  pyylval->lex.line = yylineno; return(GE_OP); }
1546
 
        YY_BREAK
1547
 
case 112:
1548
 
YY_RULE_SETUP
1549
 
#line 233 "glslang.l"
1550
 
{  pyylval->lex.line = yylineno; return(EQ_OP); }
1551
 
        YY_BREAK
1552
 
case 113:
1553
 
YY_RULE_SETUP
1554
 
#line 234 "glslang.l"
1555
 
{  pyylval->lex.line = yylineno; return(NE_OP); }
1556
 
        YY_BREAK
1557
 
case 114:
1558
 
YY_RULE_SETUP
1559
 
#line 235 "glslang.l"
1560
 
{  pyylval->lex.line = yylineno; return(LEFT_OP); }
1561
 
        YY_BREAK
1562
 
case 115:
1563
 
YY_RULE_SETUP
1564
 
#line 236 "glslang.l"
1565
 
{  pyylval->lex.line = yylineno; return(RIGHT_OP); }
1566
 
        YY_BREAK
1567
 
case 116:
1568
 
YY_RULE_SETUP
1569
 
#line 237 "glslang.l"
1570
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(SEMICOLON); }
1571
 
        YY_BREAK
1572
 
case 117:
1573
 
YY_RULE_SETUP
1574
 
#line 238 "glslang.l"
1575
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(LEFT_BRACE); }
1576
 
        YY_BREAK
1577
 
case 118:
1578
 
YY_RULE_SETUP
1579
 
#line 239 "glslang.l"
1580
 
{  pyylval->lex.line = yylineno; return(RIGHT_BRACE); }
1581
 
        YY_BREAK
1582
 
case 119:
1583
 
YY_RULE_SETUP
1584
 
#line 240 "glslang.l"
1585
 
{  pyylval->lex.line = yylineno; if (parseContext.inTypeParen) parseContext.lexAfterType = false; return(COMMA); }
1586
 
        YY_BREAK
1587
 
case 120:
1588
 
YY_RULE_SETUP
1589
 
#line 241 "glslang.l"
1590
 
{  pyylval->lex.line = yylineno; return(COLON); }
1591
 
        YY_BREAK
1592
 
case 121:
1593
 
YY_RULE_SETUP
1594
 
#line 242 "glslang.l"
1595
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = false; return(EQUAL); }
1596
 
        YY_BREAK
1597
 
case 122:
1598
 
YY_RULE_SETUP
1599
 
#line 243 "glslang.l"
1600
 
{  pyylval->lex.line = yylineno; parseContext.lexAfterType = false; parseContext.inTypeParen = true; return(LEFT_PAREN); }
1601
 
        YY_BREAK
1602
 
case 123:
1603
 
YY_RULE_SETUP
1604
 
#line 244 "glslang.l"
1605
 
{  pyylval->lex.line = yylineno; parseContext.inTypeParen = false; return(RIGHT_PAREN); }
1606
 
        YY_BREAK
1607
 
case 124:
1608
 
YY_RULE_SETUP
1609
 
#line 245 "glslang.l"
1610
 
{  pyylval->lex.line = yylineno; return(LEFT_BRACKET); }
1611
 
        YY_BREAK
1612
 
case 125:
1613
 
YY_RULE_SETUP
1614
 
#line 246 "glslang.l"
1615
 
{  pyylval->lex.line = yylineno; return(RIGHT_BRACKET); }
1616
 
        YY_BREAK
1617
 
case 126:
1618
 
YY_RULE_SETUP
1619
 
#line 247 "glslang.l"
1620
 
{ BEGIN(FIELDS);  return(DOT); }
1621
 
        YY_BREAK
1622
 
case 127:
1623
 
YY_RULE_SETUP
1624
 
#line 248 "glslang.l"
1625
 
{  pyylval->lex.line = yylineno; return(BANG); }
1626
 
        YY_BREAK
1627
 
case 128:
1628
 
YY_RULE_SETUP
1629
 
#line 249 "glslang.l"
1630
 
{  pyylval->lex.line = yylineno; return(DASH); }
1631
 
        YY_BREAK
1632
 
case 129:
1633
 
YY_RULE_SETUP
1634
 
#line 250 "glslang.l"
1635
 
{  pyylval->lex.line = yylineno; return(TILDE); }
1636
 
        YY_BREAK
1637
 
case 130:
1638
 
YY_RULE_SETUP
1639
 
#line 251 "glslang.l"
1640
 
{  pyylval->lex.line = yylineno; return(PLUS); }
1641
 
        YY_BREAK
1642
 
case 131:
1643
 
YY_RULE_SETUP
1644
 
#line 252 "glslang.l"
1645
 
{  pyylval->lex.line = yylineno; return(STAR); }
1646
 
        YY_BREAK
1647
 
case 132:
1648
 
YY_RULE_SETUP
1649
 
#line 253 "glslang.l"
1650
 
{  pyylval->lex.line = yylineno; return(SLASH); }
1651
 
        YY_BREAK
1652
 
case 133:
1653
 
YY_RULE_SETUP
1654
 
#line 254 "glslang.l"
1655
 
{  pyylval->lex.line = yylineno; return(PERCENT); }
1656
 
        YY_BREAK
1657
 
case 134:
1658
 
YY_RULE_SETUP
1659
 
#line 255 "glslang.l"
1660
 
{  pyylval->lex.line = yylineno; return(LEFT_ANGLE); }
1661
 
        YY_BREAK
1662
 
case 135:
1663
 
YY_RULE_SETUP
1664
 
#line 256 "glslang.l"
1665
 
{  pyylval->lex.line = yylineno; return(RIGHT_ANGLE); }
1666
 
        YY_BREAK
1667
 
case 136:
1668
 
YY_RULE_SETUP
1669
 
#line 257 "glslang.l"
1670
 
{  pyylval->lex.line = yylineno; return(VERTICAL_BAR); }
1671
 
        YY_BREAK
1672
 
case 137:
1673
 
YY_RULE_SETUP
1674
 
#line 258 "glslang.l"
1675
 
{  pyylval->lex.line = yylineno; return(CARET); }
1676
 
        YY_BREAK
1677
 
case 138:
1678
 
YY_RULE_SETUP
1679
 
#line 259 "glslang.l"
1680
 
{  pyylval->lex.line = yylineno; return(AMPERSAND); }
1681
 
        YY_BREAK
1682
 
case 139:
1683
 
YY_RULE_SETUP
1684
 
#line 260 "glslang.l"
1685
 
{  pyylval->lex.line = yylineno; return(QUESTION); }
1686
 
        YY_BREAK
1687
 
case 140:
1688
 
YY_RULE_SETUP
1689
 
#line 262 "glslang.l"
1690
 
1691
 
BEGIN(INITIAL);      
1692
 
    pyylval->lex.line = yylineno;     
1693
 
    pyylval->lex.string = NewPoolTString(yytext); 
1694
 
    return FIELD_SELECTION; }
1695
 
        YY_BREAK
1696
 
case 141:
1697
 
YY_RULE_SETUP
1698
 
#line 267 "glslang.l"
1699
 
{}
1700
 
        YY_BREAK
1701
 
case 142:
1702
 
YY_RULE_SETUP
1703
 
#line 269 "glslang.l"
1704
 
{  }
1705
 
        YY_BREAK
1706
 
case YY_STATE_EOF(INITIAL):
1707
 
case YY_STATE_EOF(FIELDS):
1708
 
#line 270 "glslang.l"
1709
 
{ (&parseContext)->AfterEOF = true; yy_delete_buffer(YY_CURRENT_BUFFER); yyterminate();}
1710
 
        YY_BREAK
1711
 
case 143:
1712
 
YY_RULE_SETUP
1713
 
#line 271 "glslang.l"
1714
 
{ parseContext.infoSink.info << "FLEX: Unknown char " << yytext << "\n";
1715
 
          return 0; }
1716
 
        YY_BREAK
1717
 
case 144:
1718
 
YY_RULE_SETUP
1719
 
#line 274 "glslang.l"
1720
 
ECHO;
1721
 
        YY_BREAK
1722
 
#line 1723 "Gen_glslang.cpp"
1723
 
 
1724
 
        case YY_END_OF_BUFFER:
1725
 
                {
1726
 
                /* Amount of text matched not including the EOB char. */
1727
 
                int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1728
 
 
1729
 
                /* Undo the effects of YY_DO_BEFORE_ACTION. */
1730
 
                *yy_cp = yy_hold_char;
1731
 
                YY_RESTORE_YY_MORE_OFFSET
1732
 
 
1733
 
                if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1734
 
                        {
1735
 
                        /* We're scanning a new file or input source.  It's
1736
 
                         * possible that this happened because the user
1737
 
                         * just pointed yyin at a new source and called
1738
 
                         * yylex().  If so, then we have to assure
1739
 
                         * consistency between yy_current_buffer and our
1740
 
                         * globals.  Here is the right place to do so, because
1741
 
                         * this is the first action (other than possibly a
1742
 
                         * back-up) that will match for the new input source.
1743
 
                         */
1744
 
                        yy_n_chars = yy_current_buffer->yy_n_chars;
1745
 
                        yy_current_buffer->yy_input_file = yyin;
1746
 
                        yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1747
 
                        }
1748
 
 
1749
 
                /* Note that here we test for yy_c_buf_p "<=" to the position
1750
 
                 * of the first EOB in the buffer, since yy_c_buf_p will
1751
 
                 * already have been incremented past the NUL character
1752
 
                 * (since all states make transitions on EOB to the
1753
 
                 * end-of-buffer state).  Contrast this with the test
1754
 
                 * in input().
1755
 
                 */
1756
 
                if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1757
 
                        { /* This was really a NUL. */
1758
 
                        yy_state_type yy_next_state;
1759
 
 
1760
 
                        yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1761
 
 
1762
 
                        yy_current_state = yy_get_previous_state();
1763
 
 
1764
 
                        /* Okay, we're now positioned to make the NUL
1765
 
                         * transition.  We couldn't have
1766
 
                         * yy_get_previous_state() go ahead and do it
1767
 
                         * for us because it doesn't know how to deal
1768
 
                         * with the possibility of jamming (and we don't
1769
 
                         * want to build jamming into it because then it
1770
 
                         * will run more slowly).
1771
 
                         */
1772
 
 
1773
 
                        yy_next_state = yy_try_NUL_trans( yy_current_state );
1774
 
 
1775
 
                        yy_bp = yytext_ptr + YY_MORE_ADJ;
1776
 
 
1777
 
                        if ( yy_next_state )
1778
 
                                {
1779
 
                                /* Consume the NUL. */
1780
 
                                yy_cp = ++yy_c_buf_p;
1781
 
                                yy_current_state = yy_next_state;
1782
 
                                goto yy_match;
1783
 
                                }
1784
 
 
1785
 
                        else
1786
 
                                {
1787
 
                                yy_cp = yy_c_buf_p;
1788
 
                                goto yy_find_action;
1789
 
                                }
1790
 
                        }
1791
 
 
1792
 
                else switch ( yy_get_next_buffer() )
1793
 
                        {
1794
 
                        case EOB_ACT_END_OF_FILE:
1795
 
                                {
1796
 
                                yy_did_buffer_switch_on_eof = 0;
1797
 
 
1798
 
                                if ( yywrap() )
1799
 
                                        {
1800
 
                                        /* Note: because we've taken care in
1801
 
                                         * yy_get_next_buffer() to have set up
1802
 
                                         * yytext, we can now set up
1803
 
                                         * yy_c_buf_p so that if some total
1804
 
                                         * hoser (like flex itself) wants to
1805
 
                                         * call the scanner after we return the
1806
 
                                         * YY_NULL, it'll still work - another
1807
 
                                         * YY_NULL will get returned.
1808
 
                                         */
1809
 
                                        yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1810
 
 
1811
 
                                        yy_act = YY_STATE_EOF(YY_START);
1812
 
                                        goto do_action;
1813
 
                                        }
1814
 
 
1815
 
                                else
1816
 
                                        {
1817
 
                                        if ( ! yy_did_buffer_switch_on_eof )
1818
 
                                                YY_NEW_FILE;
1819
 
                                        }
1820
 
                                break;
1821
 
                                }
1822
 
 
1823
 
                        case EOB_ACT_CONTINUE_SCAN:
1824
 
                                yy_c_buf_p =
1825
 
                                        yytext_ptr + yy_amount_of_matched_text;
1826
 
 
1827
 
                                yy_current_state = yy_get_previous_state();
1828
 
 
1829
 
                                yy_cp = yy_c_buf_p;
1830
 
                                yy_bp = yytext_ptr + YY_MORE_ADJ;
1831
 
                                goto yy_match;
1832
 
 
1833
 
                        case EOB_ACT_LAST_MATCH:
1834
 
                                yy_c_buf_p =
1835
 
                                &yy_current_buffer->yy_ch_buf[yy_n_chars];
1836
 
 
1837
 
                                yy_current_state = yy_get_previous_state();
1838
 
 
1839
 
                                yy_cp = yy_c_buf_p;
1840
 
                                yy_bp = yytext_ptr + YY_MORE_ADJ;
1841
 
                                goto yy_find_action;
1842
 
                        }
1843
 
                break;
1844
 
                }
1845
 
 
1846
 
        default:
1847
 
                YY_FATAL_ERROR(
1848
 
                        "fatal flex scanner internal error--no action found" );
1849
 
        } /* end of action switch */
1850
 
                } /* end of scanning one token */
1851
 
        } /* end of yylex */
1852
 
 
1853
 
 
1854
 
/* yy_get_next_buffer - try to read in a new buffer
1855
 
 *
1856
 
 * Returns a code representing an action:
1857
 
 *      EOB_ACT_LAST_MATCH -
1858
 
 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1859
 
 *      EOB_ACT_END_OF_FILE - end of file
1860
 
 */
1861
 
 
1862
 
static int yy_get_next_buffer()
1863
 
        {
1864
 
        register char *dest = yy_current_buffer->yy_ch_buf;
1865
 
        register char *source = yytext_ptr;
1866
 
        register int number_to_move, i;
1867
 
        int ret_val;
1868
 
 
1869
 
        if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1870
 
                YY_FATAL_ERROR(
1871
 
                "fatal flex scanner internal error--end of buffer missed" );
1872
 
 
1873
 
        if ( yy_current_buffer->yy_fill_buffer == 0 )
1874
 
                { /* Don't try to fill the buffer, so this is an EOF. */
1875
 
                if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1876
 
                        {
1877
 
                        /* We matched a single character, the EOB, so
1878
 
                         * treat this as a final EOF.
1879
 
                         */
1880
 
                        return EOB_ACT_END_OF_FILE;
1881
 
                        }
1882
 
 
1883
 
                else
1884
 
                        {
1885
 
                        /* We matched some text prior to the EOB, first
1886
 
                         * process it.
1887
 
                         */
1888
 
                        return EOB_ACT_LAST_MATCH;
1889
 
                        }
1890
 
                }
1891
 
 
1892
 
        /* Try to read more data. */
1893
 
 
1894
 
        /* First move last chars to start of buffer. */
1895
 
        number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1896
 
 
1897
 
        for ( i = 0; i < number_to_move; ++i )
1898
 
                *(dest++) = *(source++);
1899
 
 
1900
 
        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1901
 
                /* don't do the read, it's not guaranteed to return an EOF,
1902
 
                 * just force an EOF
1903
 
                 */
1904
 
                yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1905
 
 
1906
 
        else
1907
 
                {
1908
 
                int num_to_read =
1909
 
                        yy_current_buffer->yy_buf_size - number_to_move - 1;
1910
 
 
1911
 
                while ( num_to_read <= 0 )
1912
 
                        { /* Not enough room in the buffer - grow it. */
1913
 
#ifdef YY_USES_REJECT
1914
 
                        YY_FATAL_ERROR(
1915
 
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1916
 
#else
1917
 
 
1918
 
                        /* just a shorter name for the current buffer */
1919
 
                        YY_BUFFER_STATE b = yy_current_buffer;
1920
 
 
1921
 
                        int yy_c_buf_p_offset =
1922
 
                                (int) (yy_c_buf_p - b->yy_ch_buf);
1923
 
 
1924
 
                        if ( b->yy_is_our_buffer )
1925
 
                                {
1926
 
                                int new_size = b->yy_buf_size * 2;
1927
 
 
1928
 
                                if ( new_size <= 0 )
1929
 
                                        b->yy_buf_size += b->yy_buf_size / 8;
1930
 
                                else
1931
 
                                        b->yy_buf_size *= 2;
1932
 
 
1933
 
                                b->yy_ch_buf = (char *)
1934
 
                                        /* Include room in for 2 EOB chars. */
1935
 
                                        yy_flex_realloc( (void *) b->yy_ch_buf,
1936
 
                                                         b->yy_buf_size + 2 );
1937
 
                                }
1938
 
                        else
1939
 
                                /* Can't grow it, we don't own it. */
1940
 
                                b->yy_ch_buf = 0;
1941
 
 
1942
 
                        if ( ! b->yy_ch_buf )
1943
 
                                YY_FATAL_ERROR(
1944
 
                                "fatal error - scanner input buffer overflow" );
1945
 
 
1946
 
                        yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1947
 
 
1948
 
                        num_to_read = yy_current_buffer->yy_buf_size -
1949
 
                                                number_to_move - 1;
1950
 
#endif
1951
 
                        }
1952
 
 
1953
 
                if ( num_to_read > YY_READ_BUF_SIZE )
1954
 
                        num_to_read = YY_READ_BUF_SIZE;
1955
 
 
1956
 
                /* Read in more data. */
1957
 
                YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1958
 
                        yy_n_chars, num_to_read );
1959
 
 
1960
 
                yy_current_buffer->yy_n_chars = yy_n_chars;
1961
 
                }
1962
 
 
1963
 
        if ( yy_n_chars == 0 )
1964
 
                {
1965
 
                if ( number_to_move == YY_MORE_ADJ )
1966
 
                        {
1967
 
                        ret_val = EOB_ACT_END_OF_FILE;
1968
 
                        yyrestart( yyin );
1969
 
                        }
1970
 
 
1971
 
                else
1972
 
                        {
1973
 
                        ret_val = EOB_ACT_LAST_MATCH;
1974
 
                        yy_current_buffer->yy_buffer_status =
1975
 
                                YY_BUFFER_EOF_PENDING;
1976
 
                        }
1977
 
                }
1978
 
 
1979
 
        else
1980
 
                ret_val = EOB_ACT_CONTINUE_SCAN;
1981
 
 
1982
 
        yy_n_chars += number_to_move;
1983
 
        yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1984
 
        yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1985
 
 
1986
 
        yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1987
 
 
1988
 
        return ret_val;
1989
 
        }
1990
 
 
1991
 
 
1992
 
/* yy_get_previous_state - get the state just before the EOB char was reached */
1993
 
 
1994
 
static yy_state_type yy_get_previous_state()
1995
 
        {
1996
 
        register yy_state_type yy_current_state;
1997
 
        register char *yy_cp;
1998
 
 
1999
 
        yy_current_state = yy_start;
2000
 
 
2001
 
        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2002
 
                {
2003
 
                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2004
 
                if ( yy_accept[yy_current_state] )
2005
 
                        {
2006
 
                        yy_last_accepting_state = yy_current_state;
2007
 
                        yy_last_accepting_cpos = yy_cp;
2008
 
                        }
2009
 
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2010
 
                        {
2011
 
                        yy_current_state = (int) yy_def[yy_current_state];
2012
 
                        if ( yy_current_state >= 428 )
2013
 
                                yy_c = yy_meta[(unsigned int) yy_c];
2014
 
                        }
2015
 
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2016
 
                }
2017
 
 
2018
 
        return yy_current_state;
2019
 
        }
2020
 
 
2021
 
 
2022
 
/* yy_try_NUL_trans - try to make a transition on the NUL character
2023
 
 *
2024
 
 * synopsis
2025
 
 *      next_state = yy_try_NUL_trans( current_state );
2026
 
 */
2027
 
 
2028
 
#ifdef YY_USE_PROTOS
2029
 
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2030
 
#else
2031
 
static yy_state_type yy_try_NUL_trans( yy_current_state )
2032
 
yy_state_type yy_current_state;
2033
 
#endif
2034
 
        {
2035
 
        register int yy_is_jam;
2036
 
        register char *yy_cp = yy_c_buf_p;
2037
 
 
2038
 
        register YY_CHAR yy_c = 1;
2039
 
        if ( yy_accept[yy_current_state] )
2040
 
                {
2041
 
                yy_last_accepting_state = yy_current_state;
2042
 
                yy_last_accepting_cpos = yy_cp;
2043
 
                }
2044
 
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2045
 
                {
2046
 
                yy_current_state = (int) yy_def[yy_current_state];
2047
 
                if ( yy_current_state >= 428 )
2048
 
                        yy_c = yy_meta[(unsigned int) yy_c];
2049
 
                }
2050
 
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2051
 
        yy_is_jam = (yy_current_state == 427);
2052
 
 
2053
 
        return yy_is_jam ? 0 : yy_current_state;
2054
 
        }
2055
 
 
2056
 
 
2057
 
#ifndef YY_NO_UNPUT
2058
 
#ifdef YY_USE_PROTOS
2059
 
static void yyunput( int c, register char *yy_bp )
2060
 
#else
2061
 
static void yyunput( c, yy_bp )
2062
 
int c;
2063
 
register char *yy_bp;
2064
 
#endif
2065
 
        {
2066
 
        register char *yy_cp = yy_c_buf_p;
2067
 
 
2068
 
        /* undo effects of setting up yytext */
2069
 
        *yy_cp = yy_hold_char;
2070
 
 
2071
 
        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2072
 
                { /* need to shift things up to make room */
2073
 
                /* +2 for EOB chars. */
2074
 
                register int number_to_move = yy_n_chars + 2;
2075
 
                register char *dest = &yy_current_buffer->yy_ch_buf[
2076
 
                                        yy_current_buffer->yy_buf_size + 2];
2077
 
                register char *source =
2078
 
                                &yy_current_buffer->yy_ch_buf[number_to_move];
2079
 
 
2080
 
                while ( source > yy_current_buffer->yy_ch_buf )
2081
 
                        *--dest = *--source;
2082
 
 
2083
 
                yy_cp += (int) (dest - source);
2084
 
                yy_bp += (int) (dest - source);
2085
 
                yy_current_buffer->yy_n_chars =
2086
 
                        yy_n_chars = yy_current_buffer->yy_buf_size;
2087
 
 
2088
 
                if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2089
 
                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
2090
 
                }
2091
 
 
2092
 
        *--yy_cp = (char) c;
2093
 
 
2094
 
 
2095
 
        yytext_ptr = yy_bp;
2096
 
        yy_hold_char = *yy_cp;
2097
 
        yy_c_buf_p = yy_cp;
2098
 
        }
2099
 
#endif  /* ifndef YY_NO_UNPUT */
2100
 
 
2101
 
 
2102
 
#ifdef __cplusplus
2103
 
static int yyinput()
2104
 
#else
2105
 
static int input()
2106
 
#endif
2107
 
        {
2108
 
        int c;
2109
 
 
2110
 
        *yy_c_buf_p = yy_hold_char;
2111
 
 
2112
 
        if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2113
 
                {
2114
 
                /* yy_c_buf_p now points to the character we want to return.
2115
 
                 * If this occurs *before* the EOB characters, then it's a
2116
 
                 * valid NUL; if not, then we've hit the end of the buffer.
2117
 
                 */
2118
 
                if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2119
 
                        /* This was really a NUL. */
2120
 
                        *yy_c_buf_p = '\0';
2121
 
 
2122
 
                else
2123
 
                        { /* need more input */
2124
 
                        int offset = yy_c_buf_p - yytext_ptr;
2125
 
                        ++yy_c_buf_p;
2126
 
 
2127
 
                        switch ( yy_get_next_buffer() )
2128
 
                                {
2129
 
                                case EOB_ACT_LAST_MATCH:
2130
 
                                        /* This happens because yy_g_n_b()
2131
 
                                         * sees that we've accumulated a
2132
 
                                         * token and flags that we need to
2133
 
                                         * try matching the token before
2134
 
                                         * proceeding.  But for input(),
2135
 
                                         * there's no matching to consider.
2136
 
                                         * So convert the EOB_ACT_LAST_MATCH
2137
 
                                         * to EOB_ACT_END_OF_FILE.
2138
 
                                         */
2139
 
 
2140
 
                                        /* Reset buffer status. */
2141
 
                                        yyrestart( yyin );
2142
 
 
2143
 
                                        /* fall through */
2144
 
 
2145
 
                                case EOB_ACT_END_OF_FILE:
2146
 
                                        {
2147
 
                                        if ( yywrap() )
2148
 
                                                return EOF;
2149
 
 
2150
 
                                        if ( ! yy_did_buffer_switch_on_eof )
2151
 
                                                YY_NEW_FILE;
2152
 
#ifdef __cplusplus
2153
 
                                        return yyinput();
2154
 
#else
2155
 
                                        return input();
2156
 
#endif
2157
 
                                        }
2158
 
 
2159
 
                                case EOB_ACT_CONTINUE_SCAN:
2160
 
                                        yy_c_buf_p = yytext_ptr + offset;
2161
 
                                        break;
2162
 
                                }
2163
 
                        }
2164
 
                }
2165
 
 
2166
 
        c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
2167
 
        *yy_c_buf_p = '\0';     /* preserve yytext */
2168
 
        yy_hold_char = *++yy_c_buf_p;
2169
 
 
2170
 
 
2171
 
        return c;
2172
 
        }
2173
 
 
2174
 
 
2175
 
#ifdef YY_USE_PROTOS
2176
 
void yyrestart( FILE *input_file )
2177
 
#else
2178
 
void yyrestart( input_file )
2179
 
FILE *input_file;
2180
 
#endif
2181
 
        {
2182
 
        if ( ! yy_current_buffer )
2183
 
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2184
 
 
2185
 
        yy_init_buffer( yy_current_buffer, input_file );
2186
 
        yy_load_buffer_state();
2187
 
        }
2188
 
 
2189
 
 
2190
 
#ifdef YY_USE_PROTOS
2191
 
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2192
 
#else
2193
 
void yy_switch_to_buffer( new_buffer )
2194
 
YY_BUFFER_STATE new_buffer;
2195
 
#endif
2196
 
        {
2197
 
        if ( yy_current_buffer == new_buffer )
2198
 
                return;
2199
 
 
2200
 
        if ( yy_current_buffer )
2201
 
                {
2202
 
                /* Flush out information for old buffer. */
2203
 
                *yy_c_buf_p = yy_hold_char;
2204
 
                yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2205
 
                yy_current_buffer->yy_n_chars = yy_n_chars;
2206
 
                }
2207
 
 
2208
 
        yy_current_buffer = new_buffer;
2209
 
        yy_load_buffer_state();
2210
 
 
2211
 
        /* We don't actually know whether we did this switch during
2212
 
         * EOF (yywrap()) processing, but the only time this flag
2213
 
         * is looked at is after yywrap() is called, so it's safe
2214
 
         * to go ahead and always set it.
2215
 
         */
2216
 
        yy_did_buffer_switch_on_eof = 1;
2217
 
        }
2218
 
 
2219
 
 
2220
 
#ifdef YY_USE_PROTOS
2221
 
void yy_load_buffer_state( void )
2222
 
#else
2223
 
void yy_load_buffer_state()
2224
 
#endif
2225
 
        {
2226
 
        yy_n_chars = yy_current_buffer->yy_n_chars;
2227
 
        yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2228
 
        yyin = yy_current_buffer->yy_input_file;
2229
 
        yy_hold_char = *yy_c_buf_p;
2230
 
        }
2231
 
 
2232
 
 
2233
 
#ifdef YY_USE_PROTOS
2234
 
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2235
 
#else
2236
 
YY_BUFFER_STATE yy_create_buffer( file, size )
2237
 
FILE *file;
2238
 
int size;
2239
 
#endif
2240
 
        {
2241
 
        YY_BUFFER_STATE b;
2242
 
 
2243
 
        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2244
 
        if ( ! b )
2245
 
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2246
 
 
2247
 
        b->yy_buf_size = size;
2248
 
 
2249
 
        /* yy_ch_buf has to be 2 characters longer than the size given because
2250
 
         * we need to put in 2 end-of-buffer characters.
2251
 
         */
2252
 
        b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2253
 
        if ( ! b->yy_ch_buf )
2254
 
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2255
 
 
2256
 
        b->yy_is_our_buffer = 1;
2257
 
 
2258
 
        yy_init_buffer( b, file );
2259
 
 
2260
 
        return b;
2261
 
        }
2262
 
 
2263
 
 
2264
 
#ifdef YY_USE_PROTOS
2265
 
void yy_delete_buffer( YY_BUFFER_STATE b )
2266
 
#else
2267
 
void yy_delete_buffer( b )
2268
 
YY_BUFFER_STATE b;
2269
 
#endif
2270
 
        {
2271
 
        if ( ! b )
2272
 
                return;
2273
 
 
2274
 
        if ( b == yy_current_buffer )
2275
 
                yy_current_buffer = (YY_BUFFER_STATE) 0;
2276
 
 
2277
 
        if ( b->yy_is_our_buffer )
2278
 
                yy_flex_free( (void *) b->yy_ch_buf );
2279
 
 
2280
 
        yy_flex_free( (void *) b );
2281
 
        }
2282
 
 
2283
 
 
2284
 
 
2285
 
#ifdef YY_USE_PROTOS
2286
 
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2287
 
#else
2288
 
void yy_init_buffer( b, file )
2289
 
YY_BUFFER_STATE b;
2290
 
FILE *file;
2291
 
#endif
2292
 
 
2293
 
 
2294
 
        {
2295
 
        yy_flush_buffer( b );
2296
 
 
2297
 
        b->yy_input_file = file;
2298
 
        b->yy_fill_buffer = 1;
2299
 
 
2300
 
#if YY_ALWAYS_INTERACTIVE
2301
 
        b->yy_is_interactive = 1;
2302
 
#else
2303
 
#if YY_NEVER_INTERACTIVE
2304
 
        b->yy_is_interactive = 0;
2305
 
#else
2306
 
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2307
 
#endif
2308
 
#endif
2309
 
        }
2310
 
 
2311
 
 
2312
 
#ifdef YY_USE_PROTOS
2313
 
void yy_flush_buffer( YY_BUFFER_STATE b )
2314
 
#else
2315
 
void yy_flush_buffer( b )
2316
 
YY_BUFFER_STATE b;
2317
 
#endif
2318
 
 
2319
 
        {
2320
 
        if ( ! b )
2321
 
                return;
2322
 
 
2323
 
        b->yy_n_chars = 0;
2324
 
 
2325
 
        /* We always need two end-of-buffer characters.  The first causes
2326
 
         * a transition to the end-of-buffer state.  The second causes
2327
 
         * a jam in that state.
2328
 
         */
2329
 
        b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2330
 
        b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2331
 
 
2332
 
        b->yy_buf_pos = &b->yy_ch_buf[0];
2333
 
 
2334
 
        b->yy_at_bol = 1;
2335
 
        b->yy_buffer_status = YY_BUFFER_NEW;
2336
 
 
2337
 
        if ( b == yy_current_buffer )
2338
 
                yy_load_buffer_state();
2339
 
        }
2340
 
 
2341
 
 
2342
 
#ifndef YY_NO_SCAN_BUFFER
2343
 
#ifdef YY_USE_PROTOS
2344
 
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2345
 
#else
2346
 
YY_BUFFER_STATE yy_scan_buffer( base, size )
2347
 
char *base;
2348
 
yy_size_t size;
2349
 
#endif
2350
 
        {
2351
 
        YY_BUFFER_STATE b;
2352
 
 
2353
 
        if ( size < 2 ||
2354
 
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
2355
 
             base[size-1] != YY_END_OF_BUFFER_CHAR )
2356
 
                /* They forgot to leave room for the EOB's. */
2357
 
                return 0;
2358
 
 
2359
 
        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2360
 
        if ( ! b )
2361
 
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2362
 
 
2363
 
        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
2364
 
        b->yy_buf_pos = b->yy_ch_buf = base;
2365
 
        b->yy_is_our_buffer = 0;
2366
 
        b->yy_input_file = 0;
2367
 
        b->yy_n_chars = b->yy_buf_size;
2368
 
        b->yy_is_interactive = 0;
2369
 
        b->yy_at_bol = 1;
2370
 
        b->yy_fill_buffer = 0;
2371
 
        b->yy_buffer_status = YY_BUFFER_NEW;
2372
 
 
2373
 
        yy_switch_to_buffer( b );
2374
 
 
2375
 
        return b;
2376
 
        }
2377
 
#endif
2378
 
 
2379
 
 
2380
 
#ifndef YY_NO_SCAN_STRING
2381
 
#ifdef YY_USE_PROTOS
2382
 
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2383
 
#else
2384
 
YY_BUFFER_STATE yy_scan_string( yy_str )
2385
 
yyconst char *yy_str;
2386
 
#endif
2387
 
        {
2388
 
        int len;
2389
 
        for ( len = 0; yy_str[len]; ++len )
2390
 
                ;
2391
 
 
2392
 
        return yy_scan_bytes( yy_str, len );
2393
 
        }
2394
 
#endif
2395
 
 
2396
 
 
2397
 
#ifndef YY_NO_SCAN_BYTES
2398
 
#ifdef YY_USE_PROTOS
2399
 
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2400
 
#else
2401
 
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2402
 
yyconst char *bytes;
2403
 
int len;
2404
 
#endif
2405
 
        {
2406
 
        YY_BUFFER_STATE b;
2407
 
        char *buf;
2408
 
        yy_size_t n;
2409
 
        int i;
2410
 
 
2411
 
        /* Get memory for full buffer, including space for trailing EOB's. */
2412
 
        n = len + 2;
2413
 
        buf = (char *) yy_flex_alloc( n );
2414
 
        if ( ! buf )
2415
 
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2416
 
 
2417
 
        for ( i = 0; i < len; ++i )
2418
 
                buf[i] = bytes[i];
2419
 
 
2420
 
        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2421
 
 
2422
 
        b = yy_scan_buffer( buf, n );
2423
 
        if ( ! b )
2424
 
                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2425
 
 
2426
 
        /* It's okay to grow etc. this buffer, and we should throw it
2427
 
         * away when we're done.
2428
 
         */
2429
 
        b->yy_is_our_buffer = 1;
2430
 
 
2431
 
        return b;
2432
 
        }
2433
 
#endif
2434
 
 
2435
 
 
2436
 
#ifndef YY_NO_PUSH_STATE
2437
 
#ifdef YY_USE_PROTOS
2438
 
static void yy_push_state( int new_state )
2439
 
#else
2440
 
static void yy_push_state( new_state )
2441
 
int new_state;
2442
 
#endif
2443
 
        {
2444
 
        if ( yy_start_stack_ptr >= yy_start_stack_depth )
2445
 
                {
2446
 
                yy_size_t new_size;
2447
 
 
2448
 
                yy_start_stack_depth += YY_START_STACK_INCR;
2449
 
                new_size = yy_start_stack_depth * sizeof( int );
2450
 
 
2451
 
                if ( ! yy_start_stack )
2452
 
                        yy_start_stack = (int *) yy_flex_alloc( new_size );
2453
 
 
2454
 
                else
2455
 
                        yy_start_stack = (int *) yy_flex_realloc(
2456
 
                                        (void *) yy_start_stack, new_size );
2457
 
 
2458
 
                if ( ! yy_start_stack )
2459
 
                        YY_FATAL_ERROR(
2460
 
                        "out of memory expanding start-condition stack" );
2461
 
                }
2462
 
 
2463
 
        yy_start_stack[yy_start_stack_ptr++] = YY_START;
2464
 
 
2465
 
        BEGIN(new_state);
2466
 
        }
2467
 
#endif
2468
 
 
2469
 
 
2470
 
#ifndef YY_NO_POP_STATE
2471
 
static void yy_pop_state()
2472
 
        {
2473
 
        if ( --yy_start_stack_ptr < 0 )
2474
 
                YY_FATAL_ERROR( "start-condition stack underflow" );
2475
 
 
2476
 
        BEGIN(yy_start_stack[yy_start_stack_ptr]);
2477
 
        }
2478
 
#endif
2479
 
 
2480
 
 
2481
 
#ifndef YY_NO_TOP_STATE
2482
 
static int yy_top_state()
2483
 
        {
2484
 
        return yy_start_stack[yy_start_stack_ptr - 1];
2485
 
        }
2486
 
#endif
2487
 
 
2488
 
#ifndef YY_EXIT_FAILURE
2489
 
#define YY_EXIT_FAILURE 2
2490
 
#endif
2491
 
 
2492
 
#ifdef YY_USE_PROTOS
2493
 
static void yy_fatal_error( yyconst char msg[] )
2494
 
#else
2495
 
static void yy_fatal_error( msg )
2496
 
char msg[];
2497
 
#endif
2498
 
        {
2499
 
        (void) fprintf( stderr, "%s\n", msg );
2500
 
        exit( YY_EXIT_FAILURE );
2501
 
        }
2502
 
 
2503
 
 
2504
 
 
2505
 
/* Redefine yyless() so it works in section 3 code. */
2506
 
 
2507
 
#undef yyless
2508
 
#define yyless(n) \
2509
 
        do \
2510
 
                { \
2511
 
                /* Undo effects of setting up yytext. */ \
2512
 
                yytext[yyleng] = yy_hold_char; \
2513
 
                yy_c_buf_p = yytext + n; \
2514
 
                yy_hold_char = *yy_c_buf_p; \
2515
 
                *yy_c_buf_p = '\0'; \
2516
 
                yyleng = n; \
2517
 
                } \
2518
 
        while ( 0 )
2519
 
 
2520
 
 
2521
 
/* Internal utility routines. */
2522
 
 
2523
 
#ifndef yytext_ptr
2524
 
#ifdef YY_USE_PROTOS
2525
 
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2526
 
#else
2527
 
static void yy_flex_strncpy( s1, s2, n )
2528
 
char *s1;
2529
 
yyconst char *s2;
2530
 
int n;
2531
 
#endif
2532
 
        {
2533
 
        register int i;
2534
 
        for ( i = 0; i < n; ++i )
2535
 
                s1[i] = s2[i];
2536
 
        }
2537
 
#endif
2538
 
 
2539
 
#ifdef YY_NEED_STRLEN
2540
 
#ifdef YY_USE_PROTOS
2541
 
static int yy_flex_strlen( yyconst char *s )
2542
 
#else
2543
 
static int yy_flex_strlen( s )
2544
 
yyconst char *s;
2545
 
#endif
2546
 
        {
2547
 
        register int n;
2548
 
        for ( n = 0; s[n]; ++n )
2549
 
                ;
2550
 
 
2551
 
        return n;
2552
 
        }
2553
 
#endif
2554
 
 
2555
 
 
2556
 
#ifdef YY_USE_PROTOS
2557
 
static void *yy_flex_alloc( yy_size_t size )
2558
 
#else
2559
 
static void *yy_flex_alloc( size )
2560
 
yy_size_t size;
2561
 
#endif
2562
 
        {
2563
 
        return (void *) malloc( size );
2564
 
        }
2565
 
 
2566
 
#ifdef YY_USE_PROTOS
2567
 
static void *yy_flex_realloc( void *ptr, yy_size_t size )
2568
 
#else
2569
 
static void *yy_flex_realloc( ptr, size )
2570
 
void *ptr;
2571
 
yy_size_t size;
2572
 
#endif
2573
 
        {
2574
 
        /* The cast to (char *) in the following accommodates both
2575
 
         * implementations that use char* generic pointers, and those
2576
 
         * that use void* generic pointers.  It works with the latter
2577
 
         * because both ANSI C and C++ allow castless assignment from
2578
 
         * any pointer type to void*, and deal with argument conversions
2579
 
         * as though doing an assignment.
2580
 
         */
2581
 
        return (void *) realloc( (char *) ptr, size );
2582
 
        }
2583
 
 
2584
 
#ifdef YY_USE_PROTOS
2585
 
static void yy_flex_free( void *ptr )
2586
 
#else
2587
 
static void yy_flex_free( ptr )
2588
 
void *ptr;
2589
 
#endif
2590
 
        {
2591
 
        free( ptr );
2592
 
        }
2593
 
 
2594
 
#if YY_MAIN
2595
 
int main()
2596
 
        {
2597
 
        yylex();
2598
 
        return 0;
2599
 
        }
2600
 
#endif
2601
 
#line 274 "glslang.l"
2602
 
 
2603
 
 
2604
 
 
2605
 
//Including Pre-processor.
2606
 
extern "C" {
2607
 
  #include "./preprocessor/preprocess.h"
2608
 
2609
 
 
2610
 
//
2611
 
// The YY_INPUT macro just calls this.  Maybe this could be just put into
2612
 
// the macro directly.
2613
 
//
2614
 
 
2615
 
int yy_input(char* buf, int max_size)
2616
 
{
2617
 
     char *char_token =NULL;
2618
 
     int len;
2619
 
 
2620
 
    if ((len = yylex_CPP(buf, max_size)) == 0)
2621
 
        return 0;
2622
 
    if (len >= max_size) 
2623
 
        YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2624
 
 
2625
 
        buf[len] = ' ';
2626
 
        return len+1;
2627
 
}
2628
 
 
2629
 
 
2630
 
//
2631
 
// Parse an array of strings using yyparse.  We set up globals used by
2632
 
// yywrap.
2633
 
//
2634
 
// Returns 0 for success, as per yyparse().
2635
 
//
2636
 
int PaParseStrings(char* argv[], int strLen[], int argc, TParseContext& parseContextLocal)
2637
 
{
2638
 
    int argv0len;
2639
 
    ScanFromString(argv[0]); 
2640
 
    
2641
 
    //Storing the Current Compiler Parse context into the cpp structure.
2642
 
        cpp->pC = (void*)&parseContextLocal;
2643
 
        
2644
 
        if (!argv || argc == 0 || !argv[0])
2645
 
        return 1;
2646
 
    
2647
 
    if (!strLen) {
2648
 
        argv0len = (int) strlen(argv[0]);
2649
 
        strLen   = &argv0len;
2650
 
    }
2651
 
    yyrestart(0);
2652
 
    (&parseContextLocal)->AfterEOF = false;
2653
 
    cpp->PaWhichStr = 0;
2654
 
    cpp->PaArgv     = argv;
2655
 
    cpp->PaArgc     = argc;
2656
 
    cpp->PaStrLen   = strLen;
2657
 
    yylineno   = 1;
2658
 
   
2659
 
    if (*cpp->PaStrLen >= 0) {    
2660
 
        int ret;
2661
 
        #ifdef _WIN32
2662
 
            ret = yyparse(parseContextLocal);
2663
 
        #else
2664
 
            ret = yyparse((void*)(&parseContextLocal));
2665
 
        #endif
2666
 
        if (cpp->CompileError == 1 || parseContextLocal.recoveredFromError || parseContextLocal.numErrors > 0)
2667
 
             return 1;
2668
 
        else
2669
 
             return 0;
2670
 
    }
2671
 
    else
2672
 
        return 0;
2673
 
}
2674
 
 
2675
 
void yyerror(char *s) 
2676
 
{
2677
 
    if (((TParseContext *)cpp->pC)->AfterEOF) {
2678
 
        if (cpp->tokensBeforeEOF == 1) {
2679
 
            GlobalParseContext->error(yylineno, "syntax error", "pre-mature EOF", s, "");
2680
 
            GlobalParseContext->recover();
2681
 
        }
2682
 
    } else {
2683
 
        GlobalParseContext->error(yylineno, "syntax error", yytext, s, "");
2684
 
        GlobalParseContext->recover();
2685
 
    }            
2686
 
}
2687
 
 
2688
 
void PaReservedWord()
2689
 
{
2690
 
    GlobalParseContext->error(yylineno, "Reserved word.", yytext, "", "");
2691
 
    GlobalParseContext->recover();
2692
 
}
2693
 
 
2694
 
int PaIdentOrType(TString& id, TParseContext& parseContextLocal, TSymbol*& symbol)
2695
 
{
2696
 
    symbol = parseContextLocal.symbolTable.find(id);
2697
 
    if (parseContextLocal.lexAfterType == false && symbol && symbol->isVariable()) {
2698
 
        TVariable* variable = static_cast<TVariable*>(symbol);
2699
 
        if (variable->isUserType()) {
2700
 
            parseContextLocal.lexAfterType = true;
2701
 
            return TYPE_NAME;
2702
 
        }
2703
 
    }
2704
 
    
2705
 
    return IDENTIFIER;
2706
 
}
2707
 
 
2708
 
int PaParseComment(int &lineno, TParseContext& parseContextLocal)
2709
 
{
2710
 
    int transitionFlag = 0;
2711
 
    int nextChar;
2712
 
    
2713
 
    while (transitionFlag != 2) {
2714
 
        nextChar = yyinput();
2715
 
        if (nextChar == '\n')
2716
 
             lineno++;
2717
 
        switch (nextChar) {
2718
 
        case '*' :
2719
 
            transitionFlag = 1;
2720
 
            break;
2721
 
        case '/' :  /* if star is the previous character, then it is the end of comment */
2722
 
            if (transitionFlag == 1) {
2723
 
                return 1 ;
2724
 
            }
2725
 
            break;
2726
 
        case EOF :
2727
 
            /* Raise error message here */
2728
 
            parseContextLocal.error(yylineno, "End of shader found before end of comment.", "", "", "");
2729
 
            GlobalParseContext->recover();
2730
 
            return YY_NULL; 
2731
 
        default :  /* Any other character will be a part of the comment */
2732
 
            transitionFlag = 0;
2733
 
        }
2734
 
    }
2735
 
    return 1;
2736
 
}
2737
 
 
2738
 
extern "C" {
2739
 
 
2740
 
void CPPDebugLogMsg(const char *msg)
2741
 
{
2742
 
    ((TParseContext *)cpp->pC)->infoSink.debug.message(EPrefixNone, msg);
2743
 
}
2744
 
 
2745
 
void CPPWarningToInfoLog(const char *msg)
2746
 
{
2747
 
    ((TParseContext *)cpp->pC)->infoSink.info.message(EPrefixWarning, msg, yylineno); 
2748
 
}
2749
 
 
2750
 
void CPPShInfoLogMsg(const char *msg)
2751
 
{
2752
 
    ((TParseContext *)cpp->pC)->error(yylineno,"", "",msg,"");
2753
 
    GlobalParseContext->recover();
2754
 
}
2755
 
 
2756
 
void CPPErrorToInfoLog(char *msg)
2757
 
{
2758
 
    ((TParseContext *)cpp->pC)->error(yylineno,"syntax error", "",msg,"");
2759
 
    GlobalParseContext->recover();
2760
 
}
2761
 
 
2762
 
void SetLineNumber(int line)
2763
 
{
2764
 
    yylineno &= ~SourceLocLineMask;
2765
 
    yylineno |= line;
2766
 
}
2767
 
 
2768
 
void SetStringNumber(int string)
2769
 
{
2770
 
    yylineno = (string << SourceLocStringShift) | (yylineno & SourceLocLineMask);
2771
 
}
2772
 
 
2773
 
int GetStringNumber(void)
2774
 
{
2775
 
    return yylineno >> 16;
2776
 
}
2777
 
 
2778
 
int GetLineNumber(void)
2779
 
{
2780
 
    return yylineno & SourceLocLineMask;
2781
 
}
2782
 
 
2783
 
void IncLineNumber(void)
2784
 
{
2785
 
    if ((yylineno & SourceLocLineMask) <= SourceLocLineMask)
2786
 
        ++yylineno;
2787
 
}
2788
 
 
2789
 
void DecLineNumber(void)
2790
 
{
2791
 
    if ((yylineno & SourceLocLineMask) > 0)
2792
 
        --yylineno;
2793
 
}
2794
 
 
2795
 
void HandlePragma(const char **tokens, int numTokens)
2796
 
{
2797
 
    if (!strcmp(tokens[0], "optimize")) {
2798
 
        if (numTokens != 4) {
2799
 
            CPPShInfoLogMsg("optimize pragma syntax is incorrect");
2800
 
            return;
2801
 
        }
2802
 
        
2803
 
        if (strcmp(tokens[1], "(")) {
2804
 
            CPPShInfoLogMsg("\"(\" expected after 'optimize' keyword");
2805
 
            return;
2806
 
        }
2807
 
            
2808
 
        if (!strcmp(tokens[2], "on"))
2809
 
            ((TParseContext *)cpp->pC)->contextPragma.optimize = true;
2810
 
        else if (!strcmp(tokens[2], "off"))
2811
 
            ((TParseContext *)cpp->pC)->contextPragma.optimize = false;
2812
 
        else {
2813
 
            CPPShInfoLogMsg("\"on\" or \"off\" expected after '(' for 'optimize' pragma");
2814
 
            return;
2815
 
        }
2816
 
        
2817
 
        if (strcmp(tokens[3], ")")) {
2818
 
            CPPShInfoLogMsg("\")\" expected to end 'optimize' pragma");
2819
 
            return;
2820
 
        }
2821
 
    } else if (!strcmp(tokens[0], "debug")) {
2822
 
        if (numTokens != 4) {
2823
 
            CPPShInfoLogMsg("debug pragma syntax is incorrect");
2824
 
            return;
2825
 
        }
2826
 
        
2827
 
        if (strcmp(tokens[1], "(")) {
2828
 
            CPPShInfoLogMsg("\"(\" expected after 'debug' keyword");
2829
 
            return;
2830
 
        }
2831
 
            
2832
 
        if (!strcmp(tokens[2], "on"))
2833
 
            ((TParseContext *)cpp->pC)->contextPragma.debug = true;
2834
 
        else if (!strcmp(tokens[2], "off"))
2835
 
            ((TParseContext *)cpp->pC)->contextPragma.debug = false;
2836
 
        else {
2837
 
            CPPShInfoLogMsg("\"on\" or \"off\" expected after '(' for 'debug' pragma");
2838
 
            return;
2839
 
        }
2840
 
        
2841
 
        if (strcmp(tokens[3], ")")) {
2842
 
            CPPShInfoLogMsg("\")\" expected to end 'debug' pragma");
2843
 
            return;
2844
 
        }
2845
 
    } else {
2846
 
        /*
2847
 
        // implementation specific pragma
2848
 
        // use ((TParseContext *)cpp->pC)->contextPragma.pragmaTable to store the information about pragma
2849
 
        // For now, just ignore the pragma that the implementation cannot recognize
2850
 
        // An Example of one such implementation for a pragma that has a syntax like
2851
 
        // #pragma pragmaname(pragmavalue)
2852
 
        // This implementation stores the current pragmavalue against the pragma name in pragmaTable.
2853
 
        if (numTokens == 4 && !strcmp(tokens[1], "(") && !strcmp(tokens[3], ")")) {              
2854
 
            TPragmaTable& pragmaTable = ((TParseContext *)cpp->pC)->contextPragma.pragmaTable;
2855
 
            TPragmaTable::iterator iter;
2856
 
            iter = pragmaTable.find(TString(tokens[0]));
2857
 
            if (iter != pragmaTable.end()) {
2858
 
                iter->second = tokens[2];
2859
 
            } else {
2860
 
                pragmaTable[tokens[0]] = tokens[2];
2861
 
            }        
2862
 
        }
2863
 
        */
2864
 
    }
2865
 
}
2866
 
 
2867
 
void StoreStr(char *string)
2868
 
{
2869
 
    TString strSrc;
2870
 
    strSrc = TString(string);
2871
 
 
2872
 
    ((TParseContext *)cpp->pC)->HashErrMsg = ((TParseContext *)cpp->pC)->HashErrMsg + " " + strSrc;
2873
 
}
2874
 
 
2875
 
const char* GetStrfromTStr(void)
2876
 
{
2877
 
    cpp->ErrMsg = (((TParseContext *)cpp->pC)->HashErrMsg).c_str();
2878
 
    return cpp->ErrMsg;
2879
 
}
2880
 
 
2881
 
void ResetTString(void)
2882
 
{
2883
 
    ((TParseContext *)cpp->pC)->HashErrMsg = "";
2884
 
}
2885
 
 
2886
 
TBehavior GetBehavior(const char* behavior)
2887
 
{
2888
 
    if (!strcmp("require", behavior))
2889
 
        return EBhRequire;
2890
 
    else if (!strcmp("enable", behavior))
2891
 
        return EBhEnable;
2892
 
    else if (!strcmp("disable", behavior))
2893
 
        return EBhDisable;
2894
 
    else if (!strcmp("warn", behavior))
2895
 
        return EBhWarn;
2896
 
    else {
2897
 
        CPPShInfoLogMsg((TString("behavior '") + behavior + "' is not supported").c_str());
2898
 
        return EBhDisable;
2899
 
    }        
2900
 
}
2901
 
 
2902
 
void  updateExtensionBehavior(const char* extName, const char* behavior)
2903
 
{
2904
 
    TBehavior behaviorVal = GetBehavior(behavior);
2905
 
    TMap<TString, TBehavior>:: iterator iter;
2906
 
    TString msg;
2907
 
    
2908
 
    // special cased for all extension
2909
 
    if (!strcmp(extName, "all")) {
2910
 
        if (behaviorVal == EBhRequire || behaviorVal == EBhEnable) {
2911
 
            CPPShInfoLogMsg("extension 'all' cannot have 'require' or 'enable' behavior");  
2912
 
            return;
2913
 
        } else {
2914
 
            for (iter =  ((TParseContext *)cpp->pC)->extensionBehavior.begin(); iter != ((TParseContext *)cpp->pC)->extensionBehavior.end(); ++iter)
2915
 
                iter->second = behaviorVal;
2916
 
        }        
2917
 
    } else {
2918
 
        iter = ((TParseContext *)cpp->pC)->extensionBehavior.find(TString(extName));
2919
 
        if (iter == ((TParseContext *)cpp->pC)->extensionBehavior.end()) {
2920
 
            switch (behaviorVal) {
2921
 
            case EBhRequire:
2922
 
                CPPShInfoLogMsg((TString("extension '") + extName + "' is not supported").c_str());  
2923
 
                break;
2924
 
            case EBhEnable:
2925
 
            case EBhWarn:
2926
 
            case EBhDisable:
2927
 
                msg = TString("extension '") + extName + "' is not supported";
2928
 
                ((TParseContext *)cpp->pC)->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno); 
2929
 
                break;
2930
 
            }
2931
 
            return;
2932
 
        } else
2933
 
            iter->second = behaviorVal;
2934
 
    }
2935
 
}
2936
 
        
2937
 
}
2938
 
 
2939
 
void setInitialState()
2940
 
{
2941
 
    yy_start = 1;
2942
 
}