ARB prog lexer: Add missing #include to silence compile warning
[mesa.git] / src / mesa / shader / lex.yy.c
1
2 #line 3 "lex.yy.c"
3
4 #define YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 35
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15
16 /* First, we deal with platform-specific or compiler-specific issues. */
17
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
23
24 /* end standard C headers. */
25
26 /* flex integer type definitions */
27
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
37 */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41
42 #include <inttypes.h>
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX (4294967295U)
84 #endif
85
86 #endif /* ! C99 */
87
88 #endif /* ! FLEXINT_H */
89
90 #ifdef __cplusplus
91
92 /* The "const" storage-class-modifier is valid. */
93 #define YY_USE_CONST
94
95 #else /* ! __cplusplus */
96
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
99
100 #define YY_USE_CONST
101
102 #endif /* defined (__STDC__) */
103 #endif /* ! __cplusplus */
104
105 #ifdef YY_USE_CONST
106 #define yyconst const
107 #else
108 #define yyconst
109 #endif
110
111 /* Returned upon end-of-file. */
112 #define YY_NULL 0
113
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115 * integer for use as an array index. If the signed char is negative,
116 * we want to instead treat it as an 8-bit unsigned char, hence the
117 * double cast.
118 */
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120
121 /* An opaque pointer. */
122 #ifndef YY_TYPEDEF_YY_SCANNER_T
123 #define YY_TYPEDEF_YY_SCANNER_T
124 typedef void* yyscan_t;
125 #endif
126
127 /* For convenience, these vars (plus the bison vars far below)
128 are macros in the reentrant scanner. */
129 #define yyin yyg->yyin_r
130 #define yyout yyg->yyout_r
131 #define yyextra yyg->yyextra_r
132 #define yyleng yyg->yyleng_r
133 #define yytext yyg->yytext_r
134 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
135 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
136 #define yy_flex_debug yyg->yy_flex_debug_r
137
138 /* Enter a start condition. This macro really ought to take a parameter,
139 * but we do it the disgusting crufty way forced on us by the ()-less
140 * definition of BEGIN.
141 */
142 #define BEGIN yyg->yy_start = 1 + 2 *
143
144 /* Translate the current start state into a value that can be later handed
145 * to BEGIN to return to the state. The YYSTATE alias is for lex
146 * compatibility.
147 */
148 #define YY_START ((yyg->yy_start - 1) / 2)
149 #define YYSTATE YY_START
150
151 /* Action number for EOF rule of a given start state. */
152 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
153
154 /* Special action meaning "start processing a new file". */
155 #define YY_NEW_FILE yyrestart(yyin ,yyscanner )
156
157 #define YY_END_OF_BUFFER_CHAR 0
158
159 /* Size of default input buffer. */
160 #ifndef YY_BUF_SIZE
161 #ifdef __ia64__
162 /* On IA-64, the buffer size is 16k, not 8k.
163 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
164 * Ditto for the __ia64__ case accordingly.
165 */
166 #define YY_BUF_SIZE 32768
167 #else
168 #define YY_BUF_SIZE 16384
169 #endif /* __ia64__ */
170 #endif
171
172 /* The state buf must be large enough to hold one state per character in the main buffer.
173 */
174 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
175
176 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
177 #define YY_TYPEDEF_YY_BUFFER_STATE
178 typedef struct yy_buffer_state *YY_BUFFER_STATE;
179 #endif
180
181 #define EOB_ACT_CONTINUE_SCAN 0
182 #define EOB_ACT_END_OF_FILE 1
183 #define EOB_ACT_LAST_MATCH 2
184
185 #define YY_LESS_LINENO(n)
186
187 /* Return all but the first "n" matched characters back to the input stream. */
188 #define yyless(n) \
189 do \
190 { \
191 /* Undo effects of setting up yytext. */ \
192 int yyless_macro_arg = (n); \
193 YY_LESS_LINENO(yyless_macro_arg);\
194 *yy_cp = yyg->yy_hold_char; \
195 YY_RESTORE_YY_MORE_OFFSET \
196 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
197 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
198 } \
199 while ( 0 )
200
201 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
202
203 #ifndef YY_TYPEDEF_YY_SIZE_T
204 #define YY_TYPEDEF_YY_SIZE_T
205 typedef size_t yy_size_t;
206 #endif
207
208 #ifndef YY_STRUCT_YY_BUFFER_STATE
209 #define YY_STRUCT_YY_BUFFER_STATE
210 struct yy_buffer_state
211 {
212 FILE *yy_input_file;
213
214 char *yy_ch_buf; /* input buffer */
215 char *yy_buf_pos; /* current position in input buffer */
216
217 /* Size of input buffer in bytes, not including room for EOB
218 * characters.
219 */
220 yy_size_t yy_buf_size;
221
222 /* Number of characters read into yy_ch_buf, not including EOB
223 * characters.
224 */
225 int yy_n_chars;
226
227 /* Whether we "own" the buffer - i.e., we know we created it,
228 * and can realloc() it to grow it, and should free() it to
229 * delete it.
230 */
231 int yy_is_our_buffer;
232
233 /* Whether this is an "interactive" input source; if so, and
234 * if we're using stdio for input, then we want to use getc()
235 * instead of fread(), to make sure we stop fetching input after
236 * each newline.
237 */
238 int yy_is_interactive;
239
240 /* Whether we're considered to be at the beginning of a line.
241 * If so, '^' rules will be active on the next match, otherwise
242 * not.
243 */
244 int yy_at_bol;
245
246 int yy_bs_lineno; /**< The line count. */
247 int yy_bs_column; /**< The column count. */
248
249 /* Whether to try to fill the input buffer when we reach the
250 * end of it.
251 */
252 int yy_fill_buffer;
253
254 int yy_buffer_status;
255
256 #define YY_BUFFER_NEW 0
257 #define YY_BUFFER_NORMAL 1
258 /* When an EOF's been seen but there's still some text to process
259 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
260 * shouldn't try reading from the input source any more. We might
261 * still have a bunch of tokens to match, though, because of
262 * possible backing-up.
263 *
264 * When we actually see the EOF, we change the status to "new"
265 * (via yyrestart()), so that the user can continue scanning by
266 * just pointing yyin at a new input file.
267 */
268 #define YY_BUFFER_EOF_PENDING 2
269
270 };
271 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
272
273 /* We provide macros for accessing buffer states in case in the
274 * future we want to put the buffer states in a more general
275 * "scanner state".
276 *
277 * Returns the top of the stack, or NULL.
278 */
279 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
280 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
281 : NULL)
282
283 /* Same as previous macro, but useful when we know that the buffer stack is not
284 * NULL or when we need an lvalue. For internal use only.
285 */
286 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
287
288 void yyrestart (FILE *input_file ,yyscan_t yyscanner );
289 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
290 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
291 void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
292 void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
293 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
294 void yypop_buffer_state (yyscan_t yyscanner );
295
296 static void yyensure_buffer_stack (yyscan_t yyscanner );
297 static void yy_load_buffer_state (yyscan_t yyscanner );
298 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
299
300 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
301
302 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
303 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
304 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
305
306 void *yyalloc (yy_size_t ,yyscan_t yyscanner );
307 void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
308 void yyfree (void * ,yyscan_t yyscanner );
309
310 #define yy_new_buffer yy_create_buffer
311
312 #define yy_set_interactive(is_interactive) \
313 { \
314 if ( ! YY_CURRENT_BUFFER ){ \
315 yyensure_buffer_stack (yyscanner); \
316 YY_CURRENT_BUFFER_LVALUE = \
317 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
318 } \
319 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
320 }
321
322 #define yy_set_bol(at_bol) \
323 { \
324 if ( ! YY_CURRENT_BUFFER ){\
325 yyensure_buffer_stack (yyscanner); \
326 YY_CURRENT_BUFFER_LVALUE = \
327 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
328 } \
329 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
330 }
331
332 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
333
334 /* Begin user sect3 */
335
336 #define yywrap(n) 1
337 #define YY_SKIP_YYWRAP
338
339 typedef unsigned char YY_CHAR;
340
341 typedef int yy_state_type;
342
343 #define yytext_ptr yytext_r
344
345 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
346 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
347 static int yy_get_next_buffer (yyscan_t yyscanner );
348 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
349
350 /* Done after the current pattern has been matched and before the
351 * corresponding action - sets up yytext.
352 */
353 #define YY_DO_BEFORE_ACTION \
354 yyg->yytext_ptr = yy_bp; \
355 yyleng = (size_t) (yy_cp - yy_bp); \
356 yyg->yy_hold_char = *yy_cp; \
357 *yy_cp = '\0'; \
358 yyg->yy_c_buf_p = yy_cp;
359
360 #define YY_NUM_RULES 168
361 #define YY_END_OF_BUFFER 169
362 /* This struct is not used in this scanner,
363 but its presence is necessary. */
364 struct yy_trans_info
365 {
366 flex_int32_t yy_verify;
367 flex_int32_t yy_nxt;
368 };
369 static yyconst flex_int16_t yy_accept[836] =
370 { 0,
371 0, 0, 169, 167, 165, 164, 167, 167, 137, 163,
372 139, 139, 139, 139, 137, 137, 137, 137, 137, 137,
373 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
374 137, 137, 137, 137, 137, 165, 0, 0, 166, 137,
375 0, 138, 140, 160, 160, 0, 0, 0, 0, 160,
376 0, 0, 0, 0, 0, 0, 0, 117, 161, 118,
377 119, 151, 151, 151, 151, 0, 139, 0, 125, 126,
378 127, 137, 137, 137, 137, 137, 137, 137, 137, 137,
379 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
380 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
381
382 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
383 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
384 137, 137, 137, 137, 137, 137, 0, 0, 0, 0,
385 0, 0, 0, 0, 0, 159, 0, 0, 0, 0,
386 0, 0, 0, 0, 0, 158, 158, 0, 0, 0,
387 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
388 157, 157, 157, 0, 0, 0, 0, 0, 0, 0,
389 0, 0, 0, 148, 148, 148, 149, 149, 150, 141,
390 140, 141, 0, 142, 11, 12, 137, 13, 137, 137,
391 14, 15, 137, 16, 17, 18, 19, 20, 21, 6,
392
393 22, 23, 24, 25, 26, 28, 27, 29, 30, 31,
394 32, 33, 34, 35, 137, 137, 137, 137, 137, 40,
395 41, 137, 42, 43, 44, 45, 46, 47, 48, 137,
396 49, 50, 51, 52, 53, 54, 55, 137, 56, 57,
397 58, 59, 137, 62, 63, 137, 137, 137, 137, 137,
398 137, 0, 0, 0, 0, 140, 0, 0, 0, 0,
399 0, 0, 0, 0, 0, 0, 78, 79, 81, 0,
400 156, 0, 0, 0, 0, 0, 0, 95, 0, 0,
401 0, 0, 0, 0, 0, 0, 0, 0, 155, 154,
402 154, 107, 0, 0, 0, 0, 0, 0, 0, 0,
403
404 0, 0, 145, 145, 146, 147, 0, 143, 11, 11,
405 137, 12, 12, 12, 137, 137, 137, 137, 137, 15,
406 15, 137, 128, 16, 16, 137, 17, 17, 137, 18,
407 18, 137, 19, 19, 137, 20, 20, 137, 21, 21,
408 137, 22, 22, 137, 24, 24, 137, 25, 25, 137,
409 28, 28, 137, 27, 27, 137, 30, 30, 137, 31,
410 31, 137, 32, 32, 137, 33, 33, 137, 34, 34,
411 137, 35, 35, 137, 137, 137, 137, 36, 137, 38,
412 137, 40, 40, 137, 41, 41, 137, 129, 42, 42,
413 137, 43, 43, 137, 137, 45, 45, 137, 46, 46,
414
415 137, 47, 47, 137, 48, 48, 137, 137, 49, 49,
416 137, 50, 50, 137, 51, 51, 137, 52, 52, 137,
417 53, 53, 137, 54, 54, 137, 137, 10, 56, 137,
418 57, 137, 58, 137, 59, 137, 60, 137, 62, 62,
419 137, 137, 137, 137, 137, 137, 137, 137, 0, 162,
420 0, 0, 0, 71, 72, 0, 0, 0, 0, 0,
421 0, 0, 83, 0, 0, 0, 0, 0, 0, 0,
422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
423 0, 153, 0, 0, 0, 111, 0, 113, 0, 0,
424 0, 0, 0, 0, 152, 144, 137, 137, 137, 4,
425
426 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
427 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
428 137, 137, 137, 9, 37, 39, 137, 137, 137, 137,
429 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
430 137, 137, 137, 137, 137, 137, 137, 60, 137, 61,
431 137, 137, 137, 137, 137, 67, 137, 137, 0, 0,
432 0, 0, 0, 73, 74, 0, 0, 0, 0, 82,
433 0, 0, 86, 89, 0, 0, 0, 0, 0, 0,
434 0, 100, 101, 0, 0, 0, 0, 106, 0, 0,
435 0, 0, 0, 0, 0, 0, 0, 0, 137, 137,
436
437 137, 137, 137, 137, 5, 137, 137, 137, 137, 137,
438 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
439 137, 137, 137, 137, 7, 8, 137, 137, 137, 137,
440 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
441 137, 137, 137, 137, 137, 137, 137, 137, 61, 137,
442 137, 137, 137, 137, 68, 137, 64, 0, 0, 0,
443 0, 122, 0, 0, 0, 0, 0, 0, 0, 0,
444 0, 92, 0, 96, 97, 0, 99, 0, 0, 0,
445 0, 0, 0, 0, 0, 0, 0, 115, 116, 0,
446 0, 123, 11, 3, 12, 133, 134, 137, 14, 15,
447
448 16, 17, 18, 19, 20, 21, 22, 24, 25, 28,
449 27, 30, 31, 32, 33, 34, 35, 40, 41, 42,
450 43, 44, 45, 46, 47, 48, 137, 137, 137, 49,
451 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
452 137, 137, 62, 63, 137, 66, 124, 0, 0, 69,
453 0, 75, 0, 0, 0, 84, 0, 0, 0, 0,
454 0, 0, 98, 0, 0, 104, 91, 0, 0, 0,
455 0, 0, 0, 120, 0, 137, 130, 131, 137, 60,
456 137, 65, 0, 0, 0, 0, 77, 80, 85, 0,
457 0, 90, 0, 0, 0, 103, 0, 0, 0, 0,
458
459 112, 114, 0, 137, 137, 61, 2, 1, 0, 76,
460 0, 88, 0, 94, 102, 0, 0, 109, 110, 121,
461 137, 132, 0, 87, 0, 105, 108, 137, 70, 93,
462 137, 137, 135, 136, 0
463 } ;
464
465 static yyconst flex_int32_t yy_ec[256] =
466 { 0,
467 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
468 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 2, 5, 1, 6, 7, 1, 1, 1, 1,
471 1, 1, 8, 1, 8, 9, 1, 10, 11, 12,
472 13, 14, 15, 15, 15, 15, 15, 1, 1, 1,
473 1, 1, 1, 1, 16, 17, 18, 19, 20, 21,
474 22, 23, 24, 7, 25, 26, 27, 28, 29, 30,
475 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
476 1, 1, 1, 1, 41, 1, 42, 43, 44, 45,
477
478 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
479 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
480 66, 67, 1, 1, 1, 1, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
488
489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
492 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
493 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
494 1, 1, 1, 1, 1
495 } ;
496
497 static yyconst flex_int32_t yy_meta[68] =
498 { 0,
499 1, 1, 1, 1, 1, 1, 2, 1, 3, 2,
500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505 2, 2, 2, 2, 2, 2, 2
506 } ;
507
508 static yyconst flex_int16_t yy_base[839] =
509 { 0,
510 0, 0, 1283, 1284, 66, 1284, 1277, 1278, 0, 69,
511 85, 128, 140, 152, 151, 58, 56, 63, 76, 1256,
512 158, 160, 39, 163, 173, 189, 52, 1249, 76, 1219,
513 1218, 1230, 1214, 1228, 1227, 105, 1256, 1268, 1284, 0,
514 225, 1284, 218, 160, 157, 20, 123, 66, 119, 192,
515 1228, 1214, 54, 162, 1212, 1224, 194, 1284, 200, 195,
516 98, 227, 196, 231, 235, 293, 305, 316, 1284, 1284,
517 1284, 1233, 1246, 1240, 223, 1229, 1232, 1228, 1243, 107,
518 298, 1225, 1239, 246, 1225, 1238, 1229, 1242, 1219, 1230,
519 1221, 182, 1222, 1213, 1222, 1213, 1212, 1213, 144, 1207,
520
521 1213, 1224, 1215, 1209, 1206, 1207, 1211, 289, 1220, 1207,
522 302, 1214, 1201, 1215, 1191, 65, 315, 1218, 1210, 1209,
523 1185, 1170, 1165, 1182, 1158, 1163, 1189, 279, 1178, 293,
524 1173, 342, 299, 1175, 1156, 317, 1166, 1162, 1157, 207,
525 1163, 1149, 1165, 1162, 1153, 320, 324, 1155, 1144, 1158,
526 1161, 1143, 1158, 1145, 1142, 1149, 284, 1157, 227, 288,
527 327, 342, 345, 1134, 1151, 1152, 1145, 1127, 318, 1128,
528 1150, 1141, 330, 341, 345, 349, 353, 357, 361, 1284,
529 419, 430, 436, 442, 440, 441, 1174, 0, 1173, 1156,
530 1146, 443, 1166, 444, 451, 468, 470, 472, 471, 0,
531
532 496, 0, 497, 498, 0, 499, 500, 0, 524, 525,
533 526, 536, 537, 553, 1161, 1154, 1167, 354, 356, 561,
534 563, 1148, 564, 565, 1140, 580, 590, 591, 592, 1161,
535 593, 617, 618, 619, 629, 630, 1138, 1148, 247, 330,
536 362, 419, 445, 646, 1136, 1128, 1127, 1112, 1112, 1111,
537 1110, 1153, 1125, 1113, 662, 669, 643, 1117, 487, 1114,
538 1108, 1108, 1102, 1115, 1115, 1100, 1284, 1284, 1115, 1103,
539 646, 1110, 135, 1107, 1113, 561, 1108, 1284, 1099, 1106,
540 1105, 1108, 1094, 1093, 1097, 1092, 330, 1097, 650, 653,
541 665, 1284, 1089, 1087, 1087, 1095, 1096, 1078, 670, 1083,
542
543 1089, 432, 460, 486, 579, 655, 715, 722, 1095, 682,
544 1102, 1093, 697, 721, 1100, 1099, 1092, 1106, 1096, 1087,
545 699, 1094, 0, 1085, 724, 1092, 1083, 725, 1090, 1081,
546 726, 1088, 1079, 727, 1086, 1077, 728, 1084, 1075, 729,
547 1082, 1073, 730, 1080, 1071, 731, 1078, 1069, 732, 1076,
548 1067, 733, 1074, 1065, 734, 1072, 1063, 735, 1070, 1061,
549 736, 1068, 1059, 737, 1066, 1057, 738, 1064, 1055, 739,
550 1062, 1053, 740, 1060, 1063, 1056, 1063, 0, 1056, 0,
551 1071, 1046, 741, 1053, 1044, 742, 1051, 0, 1042, 743,
552 1049, 1040, 745, 1047, 1046, 1037, 746, 1044, 1035, 767,
553
554 1042, 1033, 770, 1040, 1031, 771, 1038, 1041, 1028, 772,
555 1035, 1026, 773, 1033, 1024, 774, 1031, 1022, 775, 1029,
556 1020, 776, 1027, 1018, 777, 1025, 1024, 0, 1015, 1022,
557 1013, 1020, 1011, 1018, 1009, 1016, 778, 1015, 1006, 779,
558 1013, 1012, 990, 984, 989, 995, 978, 993, 424, 1284,
559 992, 982, 986, 1284, 1284, 976, 985, 971, 988, 971,
560 974, 968, 1284, 969, 968, 965, 972, 965, 973, 969,
561 979, 976, 958, 964, 971, 955, 954, 972, 954, 966,
562 965, 1284, 964, 954, 958, 1284, 945, 1284, 950, 950,
563 958, 941, 942, 952, 1284, 1284, 984, 966, 982, 0,
564
565 788, 980, 980, 979, 978, 977, 976, 975, 974, 973,
566 972, 971, 970, 969, 968, 967, 966, 965, 964, 963,
567 962, 949, 942, 0, 0, 0, 959, 958, 957, 956,
568 955, 954, 953, 952, 951, 929, 949, 948, 947, 946,
569 945, 944, 943, 942, 941, 940, 939, 913, 920, 783,
570 936, 935, 904, 907, 887, 0, 888, 881, 888, 887,
571 888, 880, 898, 1284, 1284, 880, 878, 888, 881, 1284,
572 876, 893, 345, 1284, 884, 868, 869, 878, 869, 868,
573 868, 1284, 867, 876, 866, 882, 879, 1284, 878, 876,
574 865, 866, 862, 854, 861, 856, 857, 852, 878, 878,
575
576 876, 890, 889, 884, 0, 872, 871, 870, 869, 868,
577 867, 866, 865, 864, 863, 862, 861, 860, 859, 858,
578 857, 856, 855, 854, 0, 0, 853, 852, 851, 850,
579 849, 848, 847, 846, 845, 791, 844, 843, 842, 841,
580 840, 839, 838, 837, 836, 835, 834, 851, 825, 832,
581 830, 829, 807, 807, 0, 814, 0, 848, 847, 796,
582 814, 1284, 809, 804, 797, 793, 805, 795, 793, 789,
583 805, 796, 795, 1284, 1284, 798, 1284, 793, 786, 775,
584 786, 778, 782, 795, 790, 793, 775, 1284, 1284, 787,
585 776, 1284, 0, 0, 0, 0, 0, 815, 0, 0,
586
587 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
588 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
589 0, 0, 0, 0, 0, 0, 811, 803, 790, 0,
590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
591 775, 791, 0, 0, 745, 0, 0, 796, 795, 1284,
592 737, 1284, 655, 655, 661, 1284, 644, 658, 643, 644,
593 635, 620, 1284, 598, 608, 1284, 1284, 604, 586, 579,
594 567, 567, 574, 1284, 557, 582, 0, 0, 582, 0,
595 565, 0, 582, 580, 539, 525, 1284, 1284, 1284, 527,
596 527, 1284, 525, 497, 499, 1284, 478, 451, 439, 441,
597
598 1284, 1284, 431, 441, 366, 0, 1284, 1284, 21, 1284,
599 144, 1284, 176, 1284, 1284, 182, 187, 1284, 1284, 1284,
600 220, 0, 235, 1284, 245, 1284, 1284, 424, 1284, 1284,
601 327, 373, 0, 0, 1284, 824, 396, 827
602 } ;
603
604 static yyconst flex_int16_t yy_def[839] =
605 { 0,
606 835, 1, 835, 835, 835, 835, 835, 836, 837, 835,
607 835, 835, 835, 835, 837, 837, 837, 837, 837, 837,
608 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
609 837, 837, 837, 837, 837, 835, 835, 836, 835, 837,
610 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
611 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
612 835, 835, 835, 835, 835, 838, 835, 835, 835, 835,
613 835, 837, 837, 837, 837, 837, 837, 837, 837, 837,
614 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
615 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
616
617 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
618 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
619 837, 837, 837, 837, 837, 837, 835, 835, 835, 835,
620 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
621 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
622 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
623 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
624 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
625 835, 835, 835, 835, 837, 837, 837, 837, 837, 837,
626 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
627
628 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
629 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
630 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
631 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
632 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
633 837, 835, 835, 835, 835, 835, 835, 835, 835, 835,
634 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
635 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
636 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
637 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
638
639 835, 835, 835, 835, 835, 835, 835, 835, 837, 837,
640 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
641 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
642 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
643 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
644 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
645 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
646 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
647 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
648 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
649
650 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
651 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
652 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
653 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
654 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
655 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
656 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
657 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
658 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
659 835, 835, 835, 835, 835, 835, 837, 837, 837, 837,
660
661 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
662 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
663 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
664 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
665 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
666 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
667 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
668 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
669 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
670 835, 835, 835, 835, 835, 835, 835, 835, 837, 837,
671
672 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
673 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
674 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
675 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
676 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
677 837, 837, 837, 837, 837, 837, 837, 835, 835, 835,
678 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
679 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
680 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
681 835, 835, 837, 837, 837, 837, 837, 837, 837, 837,
682
683 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
684 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
685 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
686 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
687 837, 837, 837, 837, 837, 837, 837, 835, 835, 835,
688 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
689 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
690 835, 835, 835, 835, 835, 837, 837, 837, 837, 837,
691 837, 837, 835, 835, 835, 835, 835, 835, 835, 835,
692 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
693
694 835, 835, 835, 837, 837, 837, 835, 835, 835, 835,
695 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
696 837, 837, 835, 835, 835, 835, 835, 837, 835, 835,
697 837, 837, 837, 837, 0, 835, 835, 835
698 } ;
699
700 static yyconst flex_int16_t yy_nxt[1352] =
701 { 0,
702 4, 5, 6, 5, 7, 8, 9, 4, 10, 11,
703 12, 13, 14, 11, 11, 15, 9, 16, 17, 18,
704 19, 9, 9, 9, 20, 21, 22, 9, 23, 24,
705 9, 25, 26, 27, 28, 9, 9, 29, 9, 9,
706 9, 9, 9, 9, 9, 9, 30, 9, 9, 9,
707 9, 9, 9, 9, 9, 9, 31, 9, 32, 33,
708 34, 9, 35, 9, 9, 9, 9, 36, 96, 36,
709 41, 116, 137, 97, 80, 138, 823, 42, 43, 43,
710 43, 43, 43, 43, 77, 81, 78, 119, 82, 117,
711 83, 238, 79, 66, 67, 67, 67, 67, 67, 67,
712
713 84, 85, 239, 150, 68, 120, 36, 86, 36, 151,
714 44, 45, 46, 47, 48, 49, 50, 51, 52, 141,
715 142, 53, 54, 55, 56, 57, 58, 59, 60, 61,
716 68, 143, 62, 63, 64, 65, 66, 67, 67, 67,
717 67, 67, 67, 170, 194, 195, 69, 68, 66, 67,
718 67, 67, 67, 67, 67, 218, 171, 219, 70, 68,
719 66, 67, 67, 67, 67, 67, 67, 72, 139, 73,
720 71, 68, 140, 68, 144, 92, 74, 145, 98, 88,
721 464, 89, 75, 93, 76, 68, 90, 99, 94, 91,
722 101, 100, 102, 103, 95, 465, 824, 68, 136, 133,
723
724 210, 133, 133, 152, 133, 104, 105, 133, 106, 107,
725 108, 109, 110, 134, 111, 133, 112, 153, 133, 211,
726 135, 825, 113, 114, 154, 115, 41, 43, 43, 43,
727 43, 43, 43, 146, 147, 157, 826, 132, 165, 133,
728 166, 161, 162, 167, 168, 827, 158, 163, 188, 159,
729 133, 169, 160, 264, 189, 164, 828, 201, 133, 174,
730 173, 175, 176, 132, 429, 265, 128, 129, 46, 47,
731 48, 49, 172, 51, 52, 202, 284, 53, 54, 55,
732 56, 57, 58, 130, 60, 61, 285, 430, 131, 829,
733 173, 173, 173, 173, 177, 173, 173, 178, 179, 173,
734
735 173, 173, 181, 181, 181, 181, 181, 181, 228, 830,
736 196, 197, 182, 66, 67, 67, 67, 67, 67, 67,
737 198, 232, 229, 183, 68, 184, 184, 184, 184, 184,
738 184, 240, 134, 241, 254, 233, 281, 286, 182, 135,
739 257, 257, 282, 287, 242, 833, 257, 431, 164, 255,
740 68, 256, 256, 256, 256, 256, 256, 257, 257, 257,
741 260, 257, 257, 297, 257, 271, 257, 257, 257, 257,
742 432, 257, 380, 298, 257, 257, 378, 479, 257, 433,
743 480, 288, 257, 289, 257, 257, 290, 291, 379, 257,
744 381, 834, 257, 302, 302, 302, 302, 40, 669, 822,
745
746 257, 670, 434, 257, 302, 302, 302, 302, 303, 302,
747 302, 304, 305, 302, 302, 302, 302, 302, 302, 302,
748 306, 302, 302, 302, 302, 302, 302, 302, 43, 43,
749 43, 43, 43, 43, 831, 832, 435, 307, 132, 308,
750 308, 308, 308, 308, 308, 184, 184, 184, 184, 184,
751 184, 184, 184, 184, 184, 184, 184, 309, 312, 436,
752 320, 324, 310, 313, 132, 321, 325, 437, 327, 821,
753 559, 310, 314, 328, 321, 325, 820, 310, 313, 438,
754 311, 315, 328, 322, 326, 330, 560, 333, 339, 336,
755 331, 329, 334, 340, 337, 495, 495, 495, 495, 331,
756
757 819, 334, 340, 337, 818, 331, 817, 334, 332, 337,
758 335, 341, 338, 342, 345, 348, 351, 354, 343, 346,
759 349, 352, 355, 495, 495, 495, 495, 343, 346, 349,
760 352, 355, 452, 816, 346, 349, 344, 347, 350, 353,
761 356, 357, 360, 363, 815, 453, 358, 361, 364, 496,
762 495, 495, 495, 366, 369, 358, 361, 364, 367, 370,
763 814, 358, 361, 364, 359, 362, 365, 367, 370, 813,
764 372, 812, 811, 367, 370, 373, 368, 371, 382, 810,
765 385, 389, 392, 383, 373, 386, 390, 393, 809, 808,
766 373, 807, 383, 374, 386, 390, 393, 396, 806, 805,
767
768 804, 384, 397, 387, 391, 394, 468, 399, 402, 405,
769 409, 397, 400, 403, 406, 410, 803, 397, 802, 469,
770 398, 400, 403, 406, 410, 801, 800, 400, 403, 406,
771 401, 404, 407, 411, 412, 415, 418, 799, 798, 413,
772 416, 419, 495, 495, 495, 495, 421, 424, 413, 416,
773 419, 422, 425, 797, 413, 416, 419, 414, 417, 420,
774 422, 425, 796, 439, 795, 794, 422, 425, 440, 423,
775 426, 256, 256, 256, 256, 256, 256, 440, 256, 256,
776 256, 256, 256, 256, 450, 450, 441, 450, 450, 793,
777 450, 450, 450, 450, 450, 450, 792, 450, 791, 309,
778
779 450, 450, 790, 789, 450, 788, 482, 450, 450, 787,
780 786, 450, 450, 489, 312, 490, 320, 491, 495, 495,
781 495, 495, 311, 450, 308, 308, 308, 308, 308, 308,
782 492, 308, 308, 308, 308, 308, 308, 315, 312, 322,
783 498, 324, 327, 330, 333, 336, 339, 342, 345, 348,
784 351, 354, 357, 360, 363, 366, 369, 372, 382, 385,
785 389, 315, 392, 396, 326, 329, 332, 335, 338, 341,
786 344, 347, 350, 353, 356, 359, 362, 365, 368, 371,
787 374, 384, 387, 391, 399, 394, 398, 402, 405, 409,
788 412, 415, 418, 421, 424, 548, 439, 785, 602, 603,
789
790 649, 727, 728, 784, 783, 782, 781, 401, 780, 779,
791 404, 407, 411, 414, 417, 420, 423, 426, 549, 441,
792 604, 778, 729, 650, 38, 38, 38, 180, 180, 777,
793 776, 775, 774, 773, 772, 771, 770, 769, 768, 767,
794 766, 765, 764, 763, 762, 761, 760, 759, 758, 757,
795 756, 755, 754, 753, 752, 751, 750, 749, 748, 747,
796 746, 745, 744, 743, 742, 650, 741, 740, 739, 738,
797 737, 736, 735, 734, 733, 732, 731, 730, 726, 725,
798 724, 723, 722, 721, 720, 719, 718, 717, 716, 715,
799 714, 713, 712, 711, 710, 709, 708, 707, 706, 705,
800
801 704, 703, 702, 701, 700, 699, 698, 697, 696, 695,
802 694, 693, 692, 691, 690, 689, 688, 687, 686, 685,
803 684, 683, 682, 681, 680, 679, 678, 677, 676, 675,
804 674, 673, 672, 671, 668, 667, 666, 665, 664, 663,
805 662, 661, 660, 659, 658, 657, 656, 655, 654, 653,
806 652, 651, 648, 549, 647, 646, 645, 644, 643, 642,
807 641, 640, 639, 638, 637, 636, 635, 634, 633, 632,
808 631, 630, 629, 628, 627, 626, 625, 624, 623, 622,
809 621, 620, 619, 618, 617, 616, 615, 614, 613, 612,
810 611, 610, 609, 608, 607, 606, 605, 601, 600, 599,
811
812 598, 597, 596, 595, 594, 593, 592, 591, 590, 589,
813 588, 587, 586, 585, 584, 583, 582, 581, 580, 579,
814 578, 577, 576, 575, 574, 573, 572, 571, 570, 569,
815 568, 567, 566, 565, 564, 563, 562, 561, 558, 557,
816 556, 555, 554, 553, 552, 551, 441, 550, 547, 436,
817 546, 434, 545, 432, 544, 430, 543, 542, 426, 541,
818 423, 540, 420, 539, 417, 538, 414, 537, 411, 536,
819 535, 407, 534, 404, 533, 401, 532, 398, 531, 530,
820 394, 529, 391, 528, 387, 527, 384, 526, 525, 524,
821 523, 522, 521, 374, 520, 371, 519, 368, 518, 365,
822
823 517, 362, 516, 359, 515, 356, 514, 353, 513, 350,
824 512, 347, 511, 344, 510, 341, 509, 338, 508, 335,
825 507, 332, 506, 329, 505, 326, 504, 322, 503, 502,
826 501, 500, 499, 315, 497, 311, 494, 493, 488, 487,
827 486, 485, 484, 483, 481, 478, 477, 476, 475, 474,
828 473, 472, 471, 470, 467, 466, 463, 462, 461, 460,
829 459, 458, 457, 456, 455, 454, 451, 288, 260, 449,
830 448, 447, 446, 445, 444, 443, 442, 428, 427, 408,
831 395, 388, 377, 376, 375, 323, 319, 318, 317, 316,
832 301, 300, 299, 296, 295, 294, 293, 292, 283, 280,
833
834 279, 278, 277, 276, 275, 274, 273, 272, 270, 269,
835 268, 267, 266, 263, 262, 261, 259, 258, 172, 253,
836 252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
837 237, 236, 235, 234, 231, 230, 227, 226, 225, 224,
838 223, 222, 221, 220, 217, 216, 215, 214, 213, 212,
839 209, 208, 207, 206, 205, 204, 203, 200, 199, 193,
840 192, 191, 190, 187, 186, 185, 156, 155, 149, 148,
841 39, 127, 126, 125, 124, 123, 122, 121, 118, 87,
842 39, 37, 835, 3, 835, 835, 835, 835, 835, 835,
843 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
844
845 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
846 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
847 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
848 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
849 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
850 835
851 } ;
852
853 static yyconst flex_int16_t yy_chk[1352] =
854 { 0,
855 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
856 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
857 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
858 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
859 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
860 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
861 1, 1, 1, 1, 1, 1, 1, 5, 23, 5,
862 10, 27, 46, 23, 17, 46, 809, 10, 10, 10,
863 10, 10, 10, 10, 16, 17, 16, 29, 17, 27,
864 18, 116, 16, 11, 11, 11, 11, 11, 11, 11,
865
866 18, 19, 116, 53, 11, 29, 36, 19, 36, 53,
867 10, 10, 10, 10, 10, 10, 10, 10, 10, 48,
868 48, 10, 10, 10, 10, 10, 10, 10, 10, 10,
869 11, 48, 10, 10, 10, 10, 12, 12, 12, 12,
870 12, 12, 12, 61, 80, 80, 12, 12, 13, 13,
871 13, 13, 13, 13, 13, 99, 61, 99, 13, 13,
872 14, 14, 14, 14, 14, 14, 14, 15, 47, 15,
873 14, 14, 47, 12, 49, 22, 15, 49, 24, 21,
874 273, 21, 15, 22, 15, 13, 21, 24, 22, 21,
875 25, 24, 25, 25, 22, 273, 811, 14, 45, 45,
876
877 92, 44, 44, 54, 45, 25, 26, 44, 26, 26,
878 26, 26, 26, 44, 26, 45, 26, 54, 44, 92,
879 44, 813, 26, 26, 54, 26, 41, 43, 43, 43,
880 43, 43, 43, 50, 50, 57, 816, 43, 60, 50,
881 60, 59, 59, 60, 60, 817, 57, 59, 75, 57,
882 50, 60, 57, 140, 75, 59, 821, 84, 59, 63,
883 63, 63, 63, 43, 239, 140, 41, 41, 41, 41,
884 41, 41, 62, 41, 41, 84, 159, 41, 41, 41,
885 41, 41, 41, 41, 41, 41, 159, 239, 41, 823,
886 62, 62, 62, 62, 64, 64, 64, 64, 65, 65,
887
888 65, 65, 66, 66, 66, 66, 66, 66, 108, 825,
889 81, 81, 66, 67, 67, 67, 67, 67, 67, 67,
890 81, 111, 108, 68, 67, 68, 68, 68, 68, 68,
891 68, 117, 128, 117, 130, 111, 157, 160, 66, 128,
892 133, 133, 157, 160, 117, 831, 133, 240, 130, 132,
893 67, 132, 132, 132, 132, 132, 132, 133, 136, 136,
894 136, 146, 146, 169, 136, 147, 147, 146, 161, 161,
895 240, 147, 219, 169, 161, 136, 218, 287, 146, 241,
896 287, 161, 147, 162, 162, 161, 163, 163, 218, 162,
897 219, 832, 163, 173, 173, 173, 173, 837, 573, 805,
898
899 162, 573, 241, 163, 174, 174, 174, 174, 175, 175,
900 175, 175, 176, 176, 176, 176, 177, 177, 177, 177,
901 178, 178, 178, 178, 179, 179, 179, 179, 181, 181,
902 181, 181, 181, 181, 828, 828, 242, 182, 181, 182,
903 182, 182, 182, 182, 182, 183, 183, 183, 183, 183,
904 183, 184, 184, 184, 184, 184, 184, 185, 186, 242,
905 192, 194, 185, 186, 181, 192, 194, 243, 195, 804,
906 449, 185, 186, 195, 192, 194, 803, 185, 186, 243,
907 185, 186, 195, 192, 194, 196, 449, 197, 199, 198,
908 196, 195, 197, 199, 198, 302, 302, 302, 302, 196,
909
910 800, 197, 199, 198, 799, 196, 798, 197, 196, 198,
911 197, 199, 198, 201, 203, 204, 206, 207, 201, 203,
912 204, 206, 207, 303, 303, 303, 303, 201, 203, 204,
913 206, 207, 259, 797, 203, 204, 201, 203, 204, 206,
914 207, 209, 210, 211, 795, 259, 209, 210, 211, 304,
915 304, 304, 304, 212, 213, 209, 210, 211, 212, 213,
916 794, 209, 210, 211, 209, 210, 211, 212, 213, 793,
917 214, 791, 790, 212, 213, 214, 212, 213, 220, 786,
918 221, 223, 224, 220, 214, 221, 223, 224, 785, 784,
919 214, 783, 220, 214, 221, 223, 224, 226, 781, 779,
920
921 776, 220, 226, 221, 223, 224, 276, 227, 228, 229,
922 231, 226, 227, 228, 229, 231, 775, 226, 773, 276,
923 226, 227, 228, 229, 231, 772, 771, 227, 228, 229,
924 227, 228, 229, 231, 232, 233, 234, 770, 769, 232,
925 233, 234, 305, 305, 305, 305, 235, 236, 232, 233,
926 234, 235, 236, 768, 232, 233, 234, 232, 233, 234,
927 235, 236, 765, 244, 764, 762, 235, 236, 244, 235,
928 236, 255, 255, 255, 255, 255, 255, 244, 256, 256,
929 256, 256, 256, 256, 257, 257, 244, 271, 271, 761,
930 257, 289, 289, 271, 290, 290, 760, 289, 759, 310,
931
932 290, 257, 758, 757, 271, 755, 291, 291, 289, 754,
933 753, 290, 291, 299, 313, 299, 321, 299, 306, 306,
934 306, 306, 310, 291, 307, 307, 307, 307, 307, 307,
935 299, 308, 308, 308, 308, 308, 308, 313, 314, 321,
936 314, 325, 328, 331, 334, 337, 340, 343, 346, 349,
937 352, 355, 358, 361, 364, 367, 370, 373, 383, 386,
938 390, 314, 393, 397, 325, 328, 331, 334, 337, 340,
939 343, 346, 349, 352, 355, 358, 361, 364, 367, 370,
940 373, 383, 386, 390, 400, 393, 397, 403, 406, 410,
941 413, 416, 419, 422, 425, 437, 440, 751, 501, 501,
942
943 550, 636, 636, 749, 748, 745, 742, 400, 741, 729,
944 403, 406, 410, 413, 416, 419, 422, 425, 437, 440,
945 501, 728, 636, 550, 836, 836, 836, 838, 838, 727,
946 698, 691, 690, 687, 686, 685, 684, 683, 682, 681,
947 680, 679, 678, 676, 673, 672, 671, 670, 669, 668,
948 667, 666, 665, 664, 663, 661, 660, 659, 658, 656,
949 654, 653, 652, 651, 650, 649, 648, 647, 646, 645,
950 644, 643, 642, 641, 640, 639, 638, 637, 635, 634,
951 633, 632, 631, 630, 629, 628, 627, 624, 623, 622,
952 621, 620, 619, 618, 617, 616, 615, 614, 613, 612,
953
954 611, 610, 609, 608, 607, 606, 604, 603, 602, 601,
955 600, 599, 598, 597, 596, 595, 594, 593, 592, 591,
956 590, 589, 587, 586, 585, 584, 583, 581, 580, 579,
957 578, 577, 576, 575, 572, 571, 569, 568, 567, 566,
958 563, 562, 561, 560, 559, 558, 557, 555, 554, 553,
959 552, 551, 549, 548, 547, 546, 545, 544, 543, 542,
960 541, 540, 539, 538, 537, 536, 535, 534, 533, 532,
961 531, 530, 529, 528, 527, 523, 522, 521, 520, 519,
962 518, 517, 516, 515, 514, 513, 512, 511, 510, 509,
963 508, 507, 506, 505, 504, 503, 502, 499, 498, 497,
964
965 494, 493, 492, 491, 490, 489, 487, 485, 484, 483,
966 481, 480, 479, 478, 477, 476, 475, 474, 473, 472,
967 471, 470, 469, 468, 467, 466, 465, 464, 462, 461,
968 460, 459, 458, 457, 456, 453, 452, 451, 448, 447,
969 446, 445, 444, 443, 442, 441, 439, 438, 436, 435,
970 434, 433, 432, 431, 430, 429, 427, 426, 424, 423,
971 421, 420, 418, 417, 415, 414, 412, 411, 409, 408,
972 407, 405, 404, 402, 401, 399, 398, 396, 395, 394,
973 392, 391, 389, 387, 385, 384, 382, 381, 379, 377,
974 376, 375, 374, 372, 371, 369, 368, 366, 365, 363,
975
976 362, 360, 359, 357, 356, 354, 353, 351, 350, 348,
977 347, 345, 344, 342, 341, 339, 338, 336, 335, 333,
978 332, 330, 329, 327, 326, 324, 322, 320, 319, 318,
979 317, 316, 315, 312, 311, 309, 301, 300, 298, 297,
980 296, 295, 294, 293, 288, 286, 285, 284, 283, 282,
981 281, 280, 279, 277, 275, 274, 272, 270, 269, 266,
982 265, 264, 263, 262, 261, 260, 258, 254, 253, 252,
983 251, 250, 249, 248, 247, 246, 245, 238, 237, 230,
984 225, 222, 217, 216, 215, 193, 191, 190, 189, 187,
985 172, 171, 170, 168, 167, 166, 165, 164, 158, 156,
986
987 155, 154, 153, 152, 151, 150, 149, 148, 145, 144,
988 143, 142, 141, 139, 138, 137, 135, 134, 131, 129,
989 127, 126, 125, 124, 123, 122, 121, 120, 119, 118,
990 115, 114, 113, 112, 110, 109, 107, 106, 105, 104,
991 103, 102, 101, 100, 98, 97, 96, 95, 94, 93,
992 91, 90, 89, 88, 87, 86, 85, 83, 82, 79,
993 78, 77, 76, 74, 73, 72, 56, 55, 52, 51,
994 38, 37, 35, 34, 33, 32, 31, 30, 28, 20,
995 8, 7, 3, 835, 835, 835, 835, 835, 835, 835,
996 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
997
998 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
999 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
1000 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
1001 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
1002 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
1003 835
1004 } ;
1005
1006 /* The intent behind this definition is that it'll catch
1007 * any uses of REJECT which flex missed.
1008 */
1009 #define REJECT reject_used_but_not_detected
1010 #define yymore() yymore_used_but_not_detected
1011 #define YY_MORE_ADJ 0
1012 #define YY_RESTORE_YY_MORE_OFFSET
1013 #line 1 "program_lexer.l"
1014 #line 2 "program_lexer.l"
1015 /*
1016 * Copyright © 2009 Intel Corporation
1017 *
1018 * Permission is hereby granted, free of charge, to any person obtaining a
1019 * copy of this software and associated documentation files (the "Software"),
1020 * to deal in the Software without restriction, including without limitation
1021 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1022 * and/or sell copies of the Software, and to permit persons to whom the
1023 * Software is furnished to do so, subject to the following conditions:
1024 *
1025 * The above copyright notice and this permission notice (including the next
1026 * paragraph) shall be included in all copies or substantial portions of the
1027 * Software.
1028 *
1029 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1030 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1031 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1032 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1033 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1034 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1035 * DEALINGS IN THE SOFTWARE.
1036 */
1037 #include "main/glheader.h"
1038 #include "prog_instruction.h"
1039
1040 #include "symbol_table.h"
1041 #include "program_parser.h"
1042 #include "program_parse.tab.h"
1043
1044 #define require_ARB_vp (yyextra->mode == ARB_vertex)
1045 #define require_ARB_fp (yyextra->mode == ARB_fragment)
1046 #define require_NV_fp (yyextra->option.NV_fragment)
1047 #define require_shadow (yyextra->option.Shadow)
1048 #define require_rect (yyextra->option.TexRect)
1049 #define require_texarray (yyextra->option.TexArray)
1050
1051 #define return_token_or_IDENTIFIER(condition, token) \
1052 do { \
1053 if (condition) { \
1054 return token; \
1055 } else { \
1056 return handle_ident(yyextra, yytext, yylval); \
1057 } \
1058 } while (0)
1059
1060 #define return_token_or_DOT(condition, token) \
1061 do { \
1062 if (condition) { \
1063 return token; \
1064 } else { \
1065 yyless(1); \
1066 return DOT; \
1067 } \
1068 } while (0)
1069
1070
1071 #define return_opcode(condition, token, opcode, len) \
1072 do { \
1073 if (condition && \
1074 _mesa_parse_instruction_suffix(yyextra, \
1075 yytext + len, \
1076 & yylval->temp_inst)) { \
1077 yylval->temp_inst.Opcode = OPCODE_ ## opcode; \
1078 return token; \
1079 } else { \
1080 return handle_ident(yyextra, yytext, yylval); \
1081 } \
1082 } while (0)
1083
1084 #define SWIZZLE_INVAL MAKE_SWIZZLE4(SWIZZLE_NIL, SWIZZLE_NIL, \
1085 SWIZZLE_NIL, SWIZZLE_NIL)
1086
1087 static unsigned
1088 mask_from_char(char c)
1089 {
1090 switch (c) {
1091 case 'x':
1092 case 'r':
1093 return WRITEMASK_X;
1094 case 'y':
1095 case 'g':
1096 return WRITEMASK_Y;
1097 case 'z':
1098 case 'b':
1099 return WRITEMASK_Z;
1100 case 'w':
1101 case 'a':
1102 return WRITEMASK_W;
1103 }
1104
1105 return 0;
1106 }
1107
1108 static unsigned
1109 swiz_from_char(char c)
1110 {
1111 switch (c) {
1112 case 'x':
1113 case 'r':
1114 return SWIZZLE_X;
1115 case 'y':
1116 case 'g':
1117 return SWIZZLE_Y;
1118 case 'z':
1119 case 'b':
1120 return SWIZZLE_Z;
1121 case 'w':
1122 case 'a':
1123 return SWIZZLE_W;
1124 }
1125
1126 return 0;
1127 }
1128
1129 static int
1130 handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval)
1131 {
1132 lval->string = strdup(text);
1133
1134 return (_mesa_symbol_table_find_symbol(state->st, 0, text) == NULL)
1135 ? IDENTIFIER : USED_IDENTIFIER;
1136 }
1137
1138 #define YY_USER_ACTION \
1139 do { \
1140 yylloc->first_column = yylloc->last_column; \
1141 yylloc->last_column += yyleng; \
1142 if ((yylloc->first_line == 1) \
1143 && (yylloc->first_column == 1)) { \
1144 yylloc->position = 1; \
1145 } else { \
1146 yylloc->position += yylloc->last_column - yylloc->first_column; \
1147 } \
1148 } while(0);
1149
1150 #define YY_EXTRA_TYPE struct asm_parser_state *
1151 #line 1152 "lex.yy.c"
1152
1153 #define INITIAL 0
1154
1155 #ifndef YY_NO_UNISTD_H
1156 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1157 * down here because we want the user's section 1 to have been scanned first.
1158 * The user has a chance to override it with an option.
1159 */
1160 #include <unistd.h>
1161 #endif
1162
1163 #ifndef YY_EXTRA_TYPE
1164 #define YY_EXTRA_TYPE void *
1165 #endif
1166
1167 /* Holds the entire state of the reentrant scanner. */
1168 struct yyguts_t
1169 {
1170
1171 /* User-defined. Not touched by flex. */
1172 YY_EXTRA_TYPE yyextra_r;
1173
1174 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1175 FILE *yyin_r, *yyout_r;
1176 size_t yy_buffer_stack_top; /**< index of top of stack. */
1177 size_t yy_buffer_stack_max; /**< capacity of stack. */
1178 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1179 char yy_hold_char;
1180 int yy_n_chars;
1181 int yyleng_r;
1182 char *yy_c_buf_p;
1183 int yy_init;
1184 int yy_start;
1185 int yy_did_buffer_switch_on_eof;
1186 int yy_start_stack_ptr;
1187 int yy_start_stack_depth;
1188 int *yy_start_stack;
1189 yy_state_type yy_last_accepting_state;
1190 char* yy_last_accepting_cpos;
1191
1192 int yylineno_r;
1193 int yy_flex_debug_r;
1194
1195 char *yytext_r;
1196 int yy_more_flag;
1197 int yy_more_len;
1198
1199 YYSTYPE * yylval_r;
1200
1201 YYLTYPE * yylloc_r;
1202
1203 }; /* end struct yyguts_t */
1204
1205 static int yy_init_globals (yyscan_t yyscanner );
1206
1207 /* This must go here because YYSTYPE and YYLTYPE are included
1208 * from bison output in section 1.*/
1209 # define yylval yyg->yylval_r
1210
1211 # define yylloc yyg->yylloc_r
1212
1213 int yylex_init (yyscan_t* scanner);
1214
1215 int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
1216
1217 /* Accessor methods to globals.
1218 These are made visible to non-reentrant scanners for convenience. */
1219
1220 int yylex_destroy (yyscan_t yyscanner );
1221
1222 int yyget_debug (yyscan_t yyscanner );
1223
1224 void yyset_debug (int debug_flag ,yyscan_t yyscanner );
1225
1226 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner );
1227
1228 void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
1229
1230 FILE *yyget_in (yyscan_t yyscanner );
1231
1232 void yyset_in (FILE * in_str ,yyscan_t yyscanner );
1233
1234 FILE *yyget_out (yyscan_t yyscanner );
1235
1236 void yyset_out (FILE * out_str ,yyscan_t yyscanner );
1237
1238 int yyget_leng (yyscan_t yyscanner );
1239
1240 char *yyget_text (yyscan_t yyscanner );
1241
1242 int yyget_lineno (yyscan_t yyscanner );
1243
1244 void yyset_lineno (int line_number ,yyscan_t yyscanner );
1245
1246 YYSTYPE * yyget_lval (yyscan_t yyscanner );
1247
1248 void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
1249
1250 YYLTYPE *yyget_lloc (yyscan_t yyscanner );
1251
1252 void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
1253
1254 /* Macros after this point can all be overridden by user definitions in
1255 * section 1.
1256 */
1257
1258 #ifndef YY_SKIP_YYWRAP
1259 #ifdef __cplusplus
1260 extern "C" int yywrap (yyscan_t yyscanner );
1261 #else
1262 extern int yywrap (yyscan_t yyscanner );
1263 #endif
1264 #endif
1265
1266 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
1267
1268 #ifndef yytext_ptr
1269 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
1270 #endif
1271
1272 #ifdef YY_NEED_STRLEN
1273 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
1274 #endif
1275
1276 #ifndef YY_NO_INPUT
1277
1278 #ifdef __cplusplus
1279 static int yyinput (yyscan_t yyscanner );
1280 #else
1281 static int input (yyscan_t yyscanner );
1282 #endif
1283
1284 #endif
1285
1286 /* Amount of stuff to slurp up with each read. */
1287 #ifndef YY_READ_BUF_SIZE
1288 #ifdef __ia64__
1289 /* On IA-64, the buffer size is 16k, not 8k */
1290 #define YY_READ_BUF_SIZE 16384
1291 #else
1292 #define YY_READ_BUF_SIZE 8192
1293 #endif /* __ia64__ */
1294 #endif
1295
1296 /* Copy whatever the last rule matched to the standard output. */
1297 #ifndef ECHO
1298 /* This used to be an fputs(), but since the string might contain NUL's,
1299 * we now use fwrite().
1300 */
1301 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
1302 #endif
1303
1304 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1305 * is returned in "result".
1306 */
1307 #ifndef YY_INPUT
1308 #define YY_INPUT(buf,result,max_size) \
1309 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1310 { \
1311 int c = '*'; \
1312 size_t n; \
1313 for ( n = 0; n < max_size && \
1314 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1315 buf[n] = (char) c; \
1316 if ( c == '\n' ) \
1317 buf[n++] = (char) c; \
1318 if ( c == EOF && ferror( yyin ) ) \
1319 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1320 result = n; \
1321 } \
1322 else \
1323 { \
1324 errno=0; \
1325 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1326 { \
1327 if( errno != EINTR) \
1328 { \
1329 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1330 break; \
1331 } \
1332 errno=0; \
1333 clearerr(yyin); \
1334 } \
1335 }\
1336 \
1337
1338 #endif
1339
1340 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1341 * we don't want an extra ';' after the "return" because that will cause
1342 * some compilers to complain about unreachable statements.
1343 */
1344 #ifndef yyterminate
1345 #define yyterminate() return YY_NULL
1346 #endif
1347
1348 /* Number of entries by which start-condition stack grows. */
1349 #ifndef YY_START_STACK_INCR
1350 #define YY_START_STACK_INCR 25
1351 #endif
1352
1353 /* Report a fatal error. */
1354 #ifndef YY_FATAL_ERROR
1355 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1356 #endif
1357
1358 /* end tables serialization structures and prototypes */
1359
1360 /* Default declaration of generated scanner - a define so the user can
1361 * easily add parameters.
1362 */
1363 #ifndef YY_DECL
1364 #define YY_DECL_IS_OURS 1
1365
1366 extern int yylex \
1367 (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
1368
1369 #define YY_DECL int yylex \
1370 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1371 #endif /* !YY_DECL */
1372
1373 /* Code executed at the beginning of each rule, after yytext and yyleng
1374 * have been set up.
1375 */
1376 #ifndef YY_USER_ACTION
1377 #define YY_USER_ACTION
1378 #endif
1379
1380 /* Code executed at the end of each rule. */
1381 #ifndef YY_BREAK
1382 #define YY_BREAK break;
1383 #endif
1384
1385 #define YY_RULE_SETUP \
1386 YY_USER_ACTION
1387
1388 /** The main scanner function which does all the work.
1389 */
1390 YY_DECL
1391 {
1392 register yy_state_type yy_current_state;
1393 register char *yy_cp, *yy_bp;
1394 register int yy_act;
1395 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1396
1397 #line 151 "program_lexer.l"
1398
1399
1400 #line 1401 "lex.yy.c"
1401
1402 yylval = yylval_param;
1403
1404 yylloc = yylloc_param;
1405
1406 if ( !yyg->yy_init )
1407 {
1408 yyg->yy_init = 1;
1409
1410 #ifdef YY_USER_INIT
1411 YY_USER_INIT;
1412 #endif
1413
1414 if ( ! yyg->yy_start )
1415 yyg->yy_start = 1; /* first start state */
1416
1417 if ( ! yyin )
1418 yyin = stdin;
1419
1420 if ( ! yyout )
1421 yyout = stdout;
1422
1423 if ( ! YY_CURRENT_BUFFER ) {
1424 yyensure_buffer_stack (yyscanner);
1425 YY_CURRENT_BUFFER_LVALUE =
1426 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1427 }
1428
1429 yy_load_buffer_state(yyscanner );
1430 }
1431
1432 while ( 1 ) /* loops until end-of-file is reached */
1433 {
1434 yy_cp = yyg->yy_c_buf_p;
1435
1436 /* Support of yytext. */
1437 *yy_cp = yyg->yy_hold_char;
1438
1439 /* yy_bp points to the position in yy_ch_buf of the start of
1440 * the current run.
1441 */
1442 yy_bp = yy_cp;
1443
1444 yy_current_state = yyg->yy_start;
1445 yy_match:
1446 do
1447 {
1448 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1449 if ( yy_accept[yy_current_state] )
1450 {
1451 yyg->yy_last_accepting_state = yy_current_state;
1452 yyg->yy_last_accepting_cpos = yy_cp;
1453 }
1454 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1455 {
1456 yy_current_state = (int) yy_def[yy_current_state];
1457 if ( yy_current_state >= 836 )
1458 yy_c = yy_meta[(unsigned int) yy_c];
1459 }
1460 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1461 ++yy_cp;
1462 }
1463 while ( yy_base[yy_current_state] != 1284 );
1464
1465 yy_find_action:
1466 yy_act = yy_accept[yy_current_state];
1467 if ( yy_act == 0 )
1468 { /* have to back up */
1469 yy_cp = yyg->yy_last_accepting_cpos;
1470 yy_current_state = yyg->yy_last_accepting_state;
1471 yy_act = yy_accept[yy_current_state];
1472 }
1473
1474 YY_DO_BEFORE_ACTION;
1475
1476 do_action: /* This label is used only to access EOF actions. */
1477
1478 switch ( yy_act )
1479 { /* beginning of action switch */
1480 case 0: /* must back up */
1481 /* undo the effects of YY_DO_BEFORE_ACTION */
1482 *yy_cp = yyg->yy_hold_char;
1483 yy_cp = yyg->yy_last_accepting_cpos;
1484 yy_current_state = yyg->yy_last_accepting_state;
1485 goto yy_find_action;
1486
1487 case 1:
1488 YY_RULE_SETUP
1489 #line 153 "program_lexer.l"
1490 { return ARBvp_10; }
1491 YY_BREAK
1492 case 2:
1493 YY_RULE_SETUP
1494 #line 154 "program_lexer.l"
1495 { return ARBfp_10; }
1496 YY_BREAK
1497 case 3:
1498 YY_RULE_SETUP
1499 #line 155 "program_lexer.l"
1500 {
1501 yylval->integer = at_address;
1502 return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS);
1503 }
1504 YY_BREAK
1505 case 4:
1506 YY_RULE_SETUP
1507 #line 159 "program_lexer.l"
1508 { return ALIAS; }
1509 YY_BREAK
1510 case 5:
1511 YY_RULE_SETUP
1512 #line 160 "program_lexer.l"
1513 { return ATTRIB; }
1514 YY_BREAK
1515 case 6:
1516 YY_RULE_SETUP
1517 #line 161 "program_lexer.l"
1518 { return END; }
1519 YY_BREAK
1520 case 7:
1521 YY_RULE_SETUP
1522 #line 162 "program_lexer.l"
1523 { return OPTION; }
1524 YY_BREAK
1525 case 8:
1526 YY_RULE_SETUP
1527 #line 163 "program_lexer.l"
1528 { return OUTPUT; }
1529 YY_BREAK
1530 case 9:
1531 YY_RULE_SETUP
1532 #line 164 "program_lexer.l"
1533 { return PARAM; }
1534 YY_BREAK
1535 case 10:
1536 YY_RULE_SETUP
1537 #line 165 "program_lexer.l"
1538 { yylval->integer = at_temp; return TEMP; }
1539 YY_BREAK
1540 case 11:
1541 YY_RULE_SETUP
1542 #line 167 "program_lexer.l"
1543 { return_opcode( 1, VECTOR_OP, ABS, 3); }
1544 YY_BREAK
1545 case 12:
1546 YY_RULE_SETUP
1547 #line 168 "program_lexer.l"
1548 { return_opcode( 1, BIN_OP, ADD, 3); }
1549 YY_BREAK
1550 case 13:
1551 YY_RULE_SETUP
1552 #line 169 "program_lexer.l"
1553 { return_opcode(require_ARB_vp, ARL, ARL, 3); }
1554 YY_BREAK
1555 case 14:
1556 YY_RULE_SETUP
1557 #line 171 "program_lexer.l"
1558 { return_opcode(require_ARB_fp, TRI_OP, CMP, 3); }
1559 YY_BREAK
1560 case 15:
1561 YY_RULE_SETUP
1562 #line 172 "program_lexer.l"
1563 { return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); }
1564 YY_BREAK
1565 case 16:
1566 YY_RULE_SETUP
1567 #line 174 "program_lexer.l"
1568 { return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); }
1569 YY_BREAK
1570 case 17:
1571 YY_RULE_SETUP
1572 #line 175 "program_lexer.l"
1573 { return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); }
1574 YY_BREAK
1575 case 18:
1576 YY_RULE_SETUP
1577 #line 176 "program_lexer.l"
1578 { return_opcode( 1, BIN_OP, DP3, 3); }
1579 YY_BREAK
1580 case 19:
1581 YY_RULE_SETUP
1582 #line 177 "program_lexer.l"
1583 { return_opcode( 1, BIN_OP, DP4, 3); }
1584 YY_BREAK
1585 case 20:
1586 YY_RULE_SETUP
1587 #line 178 "program_lexer.l"
1588 { return_opcode( 1, BIN_OP, DPH, 3); }
1589 YY_BREAK
1590 case 21:
1591 YY_RULE_SETUP
1592 #line 179 "program_lexer.l"
1593 { return_opcode( 1, BIN_OP, DST, 3); }
1594 YY_BREAK
1595 case 22:
1596 YY_RULE_SETUP
1597 #line 181 "program_lexer.l"
1598 { return_opcode( 1, SCALAR_OP, EX2, 3); }
1599 YY_BREAK
1600 case 23:
1601 YY_RULE_SETUP
1602 #line 182 "program_lexer.l"
1603 { return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); }
1604 YY_BREAK
1605 case 24:
1606 YY_RULE_SETUP
1607 #line 184 "program_lexer.l"
1608 { return_opcode( 1, VECTOR_OP, FLR, 3); }
1609 YY_BREAK
1610 case 25:
1611 YY_RULE_SETUP
1612 #line 185 "program_lexer.l"
1613 { return_opcode( 1, VECTOR_OP, FRC, 3); }
1614 YY_BREAK
1615 case 26:
1616 YY_RULE_SETUP
1617 #line 187 "program_lexer.l"
1618 { return_opcode(require_ARB_fp, KIL, KIL, 3); }
1619 YY_BREAK
1620 case 27:
1621 YY_RULE_SETUP
1622 #line 189 "program_lexer.l"
1623 { return_opcode( 1, VECTOR_OP, LIT, 3); }
1624 YY_BREAK
1625 case 28:
1626 YY_RULE_SETUP
1627 #line 190 "program_lexer.l"
1628 { return_opcode( 1, SCALAR_OP, LG2, 3); }
1629 YY_BREAK
1630 case 29:
1631 YY_RULE_SETUP
1632 #line 191 "program_lexer.l"
1633 { return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); }
1634 YY_BREAK
1635 case 30:
1636 YY_RULE_SETUP
1637 #line 192 "program_lexer.l"
1638 { return_opcode(require_ARB_fp, TRI_OP, LRP, 3); }
1639 YY_BREAK
1640 case 31:
1641 YY_RULE_SETUP
1642 #line 194 "program_lexer.l"
1643 { return_opcode( 1, TRI_OP, MAD, 3); }
1644 YY_BREAK
1645 case 32:
1646 YY_RULE_SETUP
1647 #line 195 "program_lexer.l"
1648 { return_opcode( 1, BIN_OP, MAX, 3); }
1649 YY_BREAK
1650 case 33:
1651 YY_RULE_SETUP
1652 #line 196 "program_lexer.l"
1653 { return_opcode( 1, BIN_OP, MIN, 3); }
1654 YY_BREAK
1655 case 34:
1656 YY_RULE_SETUP
1657 #line 197 "program_lexer.l"
1658 { return_opcode( 1, VECTOR_OP, MOV, 3); }
1659 YY_BREAK
1660 case 35:
1661 YY_RULE_SETUP
1662 #line 198 "program_lexer.l"
1663 { return_opcode( 1, BIN_OP, MUL, 3); }
1664 YY_BREAK
1665 case 36:
1666 YY_RULE_SETUP
1667 #line 200 "program_lexer.l"
1668 { return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); }
1669 YY_BREAK
1670 case 37:
1671 YY_RULE_SETUP
1672 #line 201 "program_lexer.l"
1673 { return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); }
1674 YY_BREAK
1675 case 38:
1676 YY_RULE_SETUP
1677 #line 202 "program_lexer.l"
1678 { return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); }
1679 YY_BREAK
1680 case 39:
1681 YY_RULE_SETUP
1682 #line 203 "program_lexer.l"
1683 { return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); }
1684 YY_BREAK
1685 case 40:
1686 YY_RULE_SETUP
1687 #line 204 "program_lexer.l"
1688 { return_opcode( 1, BINSC_OP, POW, 3); }
1689 YY_BREAK
1690 case 41:
1691 YY_RULE_SETUP
1692 #line 206 "program_lexer.l"
1693 { return_opcode( 1, SCALAR_OP, RCP, 3); }
1694 YY_BREAK
1695 case 42:
1696 YY_RULE_SETUP
1697 #line 207 "program_lexer.l"
1698 { return_opcode(require_NV_fp, BIN_OP, RFL, 3); }
1699 YY_BREAK
1700 case 43:
1701 YY_RULE_SETUP
1702 #line 208 "program_lexer.l"
1703 { return_opcode( 1, SCALAR_OP, RSQ, 3); }
1704 YY_BREAK
1705 case 44:
1706 YY_RULE_SETUP
1707 #line 210 "program_lexer.l"
1708 { return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); }
1709 YY_BREAK
1710 case 45:
1711 YY_RULE_SETUP
1712 #line 211 "program_lexer.l"
1713 { return_opcode(require_NV_fp, BIN_OP, SEQ, 3); }
1714 YY_BREAK
1715 case 46:
1716 YY_RULE_SETUP
1717 #line 212 "program_lexer.l"
1718 { return_opcode(require_NV_fp, BIN_OP, SFL, 3); }
1719 YY_BREAK
1720 case 47:
1721 YY_RULE_SETUP
1722 #line 213 "program_lexer.l"
1723 { return_opcode( 1, BIN_OP, SGE, 3); }
1724 YY_BREAK
1725 case 48:
1726 YY_RULE_SETUP
1727 #line 214 "program_lexer.l"
1728 { return_opcode(require_NV_fp, BIN_OP, SGT, 3); }
1729 YY_BREAK
1730 case 49:
1731 YY_RULE_SETUP
1732 #line 215 "program_lexer.l"
1733 { return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); }
1734 YY_BREAK
1735 case 50:
1736 YY_RULE_SETUP
1737 #line 216 "program_lexer.l"
1738 { return_opcode(require_NV_fp, BIN_OP, SLE, 3); }
1739 YY_BREAK
1740 case 51:
1741 YY_RULE_SETUP
1742 #line 217 "program_lexer.l"
1743 { return_opcode( 1, BIN_OP, SLT, 3); }
1744 YY_BREAK
1745 case 52:
1746 YY_RULE_SETUP
1747 #line 218 "program_lexer.l"
1748 { return_opcode(require_NV_fp, BIN_OP, SNE, 3); }
1749 YY_BREAK
1750 case 53:
1751 YY_RULE_SETUP
1752 #line 219 "program_lexer.l"
1753 { return_opcode(require_NV_fp, BIN_OP, STR, 3); }
1754 YY_BREAK
1755 case 54:
1756 YY_RULE_SETUP
1757 #line 220 "program_lexer.l"
1758 { return_opcode( 1, BIN_OP, SUB, 3); }
1759 YY_BREAK
1760 case 55:
1761 YY_RULE_SETUP
1762 #line 221 "program_lexer.l"
1763 { return_opcode( 1, SWZ, SWZ, 3); }
1764 YY_BREAK
1765 case 56:
1766 YY_RULE_SETUP
1767 #line 223 "program_lexer.l"
1768 { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); }
1769 YY_BREAK
1770 case 57:
1771 YY_RULE_SETUP
1772 #line 224 "program_lexer.l"
1773 { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); }
1774 YY_BREAK
1775 case 58:
1776 YY_RULE_SETUP
1777 #line 225 "program_lexer.l"
1778 { return_opcode(require_NV_fp, TXD_OP, TXD, 3); }
1779 YY_BREAK
1780 case 59:
1781 YY_RULE_SETUP
1782 #line 226 "program_lexer.l"
1783 { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); }
1784 YY_BREAK
1785 case 60:
1786 YY_RULE_SETUP
1787 #line 228 "program_lexer.l"
1788 { return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); }
1789 YY_BREAK
1790 case 61:
1791 YY_RULE_SETUP
1792 #line 229 "program_lexer.l"
1793 { return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); }
1794 YY_BREAK
1795 case 62:
1796 YY_RULE_SETUP
1797 #line 231 "program_lexer.l"
1798 { return_opcode(require_NV_fp, TRI_OP, X2D, 3); }
1799 YY_BREAK
1800 case 63:
1801 YY_RULE_SETUP
1802 #line 232 "program_lexer.l"
1803 { return_opcode( 1, BIN_OP, XPD, 3); }
1804 YY_BREAK
1805 case 64:
1806 YY_RULE_SETUP
1807 #line 234 "program_lexer.l"
1808 { return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); }
1809 YY_BREAK
1810 case 65:
1811 YY_RULE_SETUP
1812 #line 235 "program_lexer.l"
1813 { return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); }
1814 YY_BREAK
1815 case 66:
1816 YY_RULE_SETUP
1817 #line 236 "program_lexer.l"
1818 { return PROGRAM; }
1819 YY_BREAK
1820 case 67:
1821 YY_RULE_SETUP
1822 #line 237 "program_lexer.l"
1823 { return STATE; }
1824 YY_BREAK
1825 case 68:
1826 YY_RULE_SETUP
1827 #line 238 "program_lexer.l"
1828 { return RESULT; }
1829 YY_BREAK
1830 case 69:
1831 YY_RULE_SETUP
1832 #line 240 "program_lexer.l"
1833 { return AMBIENT; }
1834 YY_BREAK
1835 case 70:
1836 YY_RULE_SETUP
1837 #line 241 "program_lexer.l"
1838 { return ATTENUATION; }
1839 YY_BREAK
1840 case 71:
1841 YY_RULE_SETUP
1842 #line 242 "program_lexer.l"
1843 { return BACK; }
1844 YY_BREAK
1845 case 72:
1846 YY_RULE_SETUP
1847 #line 243 "program_lexer.l"
1848 { return_token_or_DOT(require_ARB_vp, CLIP); }
1849 YY_BREAK
1850 case 73:
1851 YY_RULE_SETUP
1852 #line 244 "program_lexer.l"
1853 { return COLOR; }
1854 YY_BREAK
1855 case 74:
1856 YY_RULE_SETUP
1857 #line 245 "program_lexer.l"
1858 { return_token_or_DOT(require_ARB_fp, DEPTH); }
1859 YY_BREAK
1860 case 75:
1861 YY_RULE_SETUP
1862 #line 246 "program_lexer.l"
1863 { return DIFFUSE; }
1864 YY_BREAK
1865 case 76:
1866 YY_RULE_SETUP
1867 #line 247 "program_lexer.l"
1868 { return DIRECTION; }
1869 YY_BREAK
1870 case 77:
1871 YY_RULE_SETUP
1872 #line 248 "program_lexer.l"
1873 { return EMISSION; }
1874 YY_BREAK
1875 case 78:
1876 YY_RULE_SETUP
1877 #line 249 "program_lexer.l"
1878 { return ENV; }
1879 YY_BREAK
1880 case 79:
1881 YY_RULE_SETUP
1882 #line 250 "program_lexer.l"
1883 { return EYE; }
1884 YY_BREAK
1885 case 80:
1886 YY_RULE_SETUP
1887 #line 251 "program_lexer.l"
1888 { return FOGCOORD; }
1889 YY_BREAK
1890 case 81:
1891 YY_RULE_SETUP
1892 #line 252 "program_lexer.l"
1893 { return FOG; }
1894 YY_BREAK
1895 case 82:
1896 YY_RULE_SETUP
1897 #line 253 "program_lexer.l"
1898 { return FRONT; }
1899 YY_BREAK
1900 case 83:
1901 YY_RULE_SETUP
1902 #line 254 "program_lexer.l"
1903 { return HALF; }
1904 YY_BREAK
1905 case 84:
1906 YY_RULE_SETUP
1907 #line 255 "program_lexer.l"
1908 { return INVERSE; }
1909 YY_BREAK
1910 case 85:
1911 YY_RULE_SETUP
1912 #line 256 "program_lexer.l"
1913 { return INVTRANS; }
1914 YY_BREAK
1915 case 86:
1916 YY_RULE_SETUP
1917 #line 257 "program_lexer.l"
1918 { return LIGHT; }
1919 YY_BREAK
1920 case 87:
1921 YY_RULE_SETUP
1922 #line 258 "program_lexer.l"
1923 { return LIGHTMODEL; }
1924 YY_BREAK
1925 case 88:
1926 YY_RULE_SETUP
1927 #line 259 "program_lexer.l"
1928 { return LIGHTPROD; }
1929 YY_BREAK
1930 case 89:
1931 YY_RULE_SETUP
1932 #line 260 "program_lexer.l"
1933 { return LOCAL; }
1934 YY_BREAK
1935 case 90:
1936 YY_RULE_SETUP
1937 #line 261 "program_lexer.l"
1938 { return MATERIAL; }
1939 YY_BREAK
1940 case 91:
1941 YY_RULE_SETUP
1942 #line 262 "program_lexer.l"
1943 { return MAT_PROGRAM; }
1944 YY_BREAK
1945 case 92:
1946 YY_RULE_SETUP
1947 #line 263 "program_lexer.l"
1948 { return MATRIX; }
1949 YY_BREAK
1950 case 93:
1951 YY_RULE_SETUP
1952 #line 264 "program_lexer.l"
1953 { return_token_or_DOT(require_ARB_vp, MATRIXINDEX); }
1954 YY_BREAK
1955 case 94:
1956 YY_RULE_SETUP
1957 #line 265 "program_lexer.l"
1958 { return MODELVIEW; }
1959 YY_BREAK
1960 case 95:
1961 YY_RULE_SETUP
1962 #line 266 "program_lexer.l"
1963 { return MVP; }
1964 YY_BREAK
1965 case 96:
1966 YY_RULE_SETUP
1967 #line 267 "program_lexer.l"
1968 { return_token_or_DOT(require_ARB_vp, NORMAL); }
1969 YY_BREAK
1970 case 97:
1971 YY_RULE_SETUP
1972 #line 268 "program_lexer.l"
1973 { return OBJECT; }
1974 YY_BREAK
1975 case 98:
1976 YY_RULE_SETUP
1977 #line 269 "program_lexer.l"
1978 { return PALETTE; }
1979 YY_BREAK
1980 case 99:
1981 YY_RULE_SETUP
1982 #line 270 "program_lexer.l"
1983 { return PARAMS; }
1984 YY_BREAK
1985 case 100:
1986 YY_RULE_SETUP
1987 #line 271 "program_lexer.l"
1988 { return PLANE; }
1989 YY_BREAK
1990 case 101:
1991 YY_RULE_SETUP
1992 #line 272 "program_lexer.l"
1993 { return_token_or_DOT(require_ARB_vp, POINT); }
1994 YY_BREAK
1995 case 102:
1996 YY_RULE_SETUP
1997 #line 273 "program_lexer.l"
1998 { return_token_or_DOT(require_ARB_vp, POINTSIZE); }
1999 YY_BREAK
2000 case 103:
2001 YY_RULE_SETUP
2002 #line 274 "program_lexer.l"
2003 { return POSITION; }
2004 YY_BREAK
2005 case 104:
2006 YY_RULE_SETUP
2007 #line 275 "program_lexer.l"
2008 { return PRIMARY; }
2009 YY_BREAK
2010 case 105:
2011 YY_RULE_SETUP
2012 #line 276 "program_lexer.l"
2013 { return PROJECTION; }
2014 YY_BREAK
2015 case 106:
2016 YY_RULE_SETUP
2017 #line 277 "program_lexer.l"
2018 { return_token_or_DOT(require_ARB_fp, RANGE); }
2019 YY_BREAK
2020 case 107:
2021 YY_RULE_SETUP
2022 #line 278 "program_lexer.l"
2023 { return ROW; }
2024 YY_BREAK
2025 case 108:
2026 YY_RULE_SETUP
2027 #line 279 "program_lexer.l"
2028 { return SCENECOLOR; }
2029 YY_BREAK
2030 case 109:
2031 YY_RULE_SETUP
2032 #line 280 "program_lexer.l"
2033 { return SECONDARY; }
2034 YY_BREAK
2035 case 110:
2036 YY_RULE_SETUP
2037 #line 281 "program_lexer.l"
2038 { return SHININESS; }
2039 YY_BREAK
2040 case 111:
2041 YY_RULE_SETUP
2042 #line 282 "program_lexer.l"
2043 { return_token_or_DOT(require_ARB_vp, SIZE); }
2044 YY_BREAK
2045 case 112:
2046 YY_RULE_SETUP
2047 #line 283 "program_lexer.l"
2048 { return SPECULAR; }
2049 YY_BREAK
2050 case 113:
2051 YY_RULE_SETUP
2052 #line 284 "program_lexer.l"
2053 { return SPOT; }
2054 YY_BREAK
2055 case 114:
2056 YY_RULE_SETUP
2057 #line 285 "program_lexer.l"
2058 { return TEXCOORD; }
2059 YY_BREAK
2060 case 115:
2061 YY_RULE_SETUP
2062 #line 286 "program_lexer.l"
2063 { return_token_or_DOT(require_ARB_fp, TEXENV); }
2064 YY_BREAK
2065 case 116:
2066 YY_RULE_SETUP
2067 #line 287 "program_lexer.l"
2068 { return_token_or_DOT(require_ARB_vp, TEXGEN); }
2069 YY_BREAK
2070 case 117:
2071 YY_RULE_SETUP
2072 #line 288 "program_lexer.l"
2073 { return_token_or_DOT(require_ARB_vp, TEXGEN_Q); }
2074 YY_BREAK
2075 case 118:
2076 YY_RULE_SETUP
2077 #line 289 "program_lexer.l"
2078 { return_token_or_DOT(require_ARB_vp, TEXGEN_S); }
2079 YY_BREAK
2080 case 119:
2081 YY_RULE_SETUP
2082 #line 290 "program_lexer.l"
2083 { return_token_or_DOT(require_ARB_vp, TEXGEN_T); }
2084 YY_BREAK
2085 case 120:
2086 YY_RULE_SETUP
2087 #line 291 "program_lexer.l"
2088 { return TEXTURE; }
2089 YY_BREAK
2090 case 121:
2091 YY_RULE_SETUP
2092 #line 292 "program_lexer.l"
2093 { return TRANSPOSE; }
2094 YY_BREAK
2095 case 122:
2096 YY_RULE_SETUP
2097 #line 293 "program_lexer.l"
2098 { return_token_or_DOT(require_ARB_vp, VTXATTRIB); }
2099 YY_BREAK
2100 case 123:
2101 YY_RULE_SETUP
2102 #line 294 "program_lexer.l"
2103 { return_token_or_DOT(require_ARB_vp, WEIGHT); }
2104 YY_BREAK
2105 case 124:
2106 YY_RULE_SETUP
2107 #line 296 "program_lexer.l"
2108 { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); }
2109 YY_BREAK
2110 case 125:
2111 YY_RULE_SETUP
2112 #line 297 "program_lexer.l"
2113 { return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); }
2114 YY_BREAK
2115 case 126:
2116 YY_RULE_SETUP
2117 #line 298 "program_lexer.l"
2118 { return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); }
2119 YY_BREAK
2120 case 127:
2121 YY_RULE_SETUP
2122 #line 299 "program_lexer.l"
2123 { return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); }
2124 YY_BREAK
2125 case 128:
2126 YY_RULE_SETUP
2127 #line 300 "program_lexer.l"
2128 { return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); }
2129 YY_BREAK
2130 case 129:
2131 YY_RULE_SETUP
2132 #line 301 "program_lexer.l"
2133 { return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); }
2134 YY_BREAK
2135 case 130:
2136 YY_RULE_SETUP
2137 #line 302 "program_lexer.l"
2138 { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); }
2139 YY_BREAK
2140 case 131:
2141 YY_RULE_SETUP
2142 #line 303 "program_lexer.l"
2143 { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); }
2144 YY_BREAK
2145 case 132:
2146 YY_RULE_SETUP
2147 #line 304 "program_lexer.l"
2148 { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); }
2149 YY_BREAK
2150 case 133:
2151 YY_RULE_SETUP
2152 #line 305 "program_lexer.l"
2153 { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); }
2154 YY_BREAK
2155 case 134:
2156 YY_RULE_SETUP
2157 #line 306 "program_lexer.l"
2158 { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); }
2159 YY_BREAK
2160 case 135:
2161 YY_RULE_SETUP
2162 #line 307 "program_lexer.l"
2163 { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); }
2164 YY_BREAK
2165 case 136:
2166 YY_RULE_SETUP
2167 #line 308 "program_lexer.l"
2168 { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); }
2169 YY_BREAK
2170 case 137:
2171 YY_RULE_SETUP
2172 #line 310 "program_lexer.l"
2173 { return handle_ident(yyextra, yytext, yylval); }
2174 YY_BREAK
2175 case 138:
2176 YY_RULE_SETUP
2177 #line 312 "program_lexer.l"
2178 { return DOT_DOT; }
2179 YY_BREAK
2180 case 139:
2181 YY_RULE_SETUP
2182 #line 314 "program_lexer.l"
2183 {
2184 yylval->integer = strtol(yytext, NULL, 10);
2185 return INTEGER;
2186 }
2187 YY_BREAK
2188 case 140:
2189 YY_RULE_SETUP
2190 #line 318 "program_lexer.l"
2191 {
2192 yylval->real = strtod(yytext, NULL);
2193 return REAL;
2194 }
2195 YY_BREAK
2196 case 141:
2197 /* rule 141 can match eol */
2198 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
2199 yyg->yy_c_buf_p = yy_cp -= 1;
2200 YY_DO_BEFORE_ACTION; /* set up yytext again */
2201 YY_RULE_SETUP
2202 #line 322 "program_lexer.l"
2203 {
2204 yylval->real = strtod(yytext, NULL);
2205 return REAL;
2206 }
2207 YY_BREAK
2208 case 142:
2209 YY_RULE_SETUP
2210 #line 326 "program_lexer.l"
2211 {
2212 yylval->real = strtod(yytext, NULL);
2213 return REAL;
2214 }
2215 YY_BREAK
2216 case 143:
2217 YY_RULE_SETUP
2218 #line 330 "program_lexer.l"
2219 {
2220 yylval->real = strtod(yytext, NULL);
2221 return REAL;
2222 }
2223 YY_BREAK
2224 case 144:
2225 YY_RULE_SETUP
2226 #line 335 "program_lexer.l"
2227 {
2228 yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
2229 yylval->swiz_mask.mask = WRITEMASK_XYZW;
2230 return MASK4;
2231 }
2232 YY_BREAK
2233 case 145:
2234 YY_RULE_SETUP
2235 #line 341 "program_lexer.l"
2236 {
2237 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2238 yylval->swiz_mask.mask = WRITEMASK_XY
2239 | mask_from_char(yytext[3]);
2240 return MASK3;
2241 }
2242 YY_BREAK
2243 case 146:
2244 YY_RULE_SETUP
2245 #line 347 "program_lexer.l"
2246 {
2247 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2248 yylval->swiz_mask.mask = WRITEMASK_XZW;
2249 return MASK3;
2250 }
2251 YY_BREAK
2252 case 147:
2253 YY_RULE_SETUP
2254 #line 352 "program_lexer.l"
2255 {
2256 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2257 yylval->swiz_mask.mask = WRITEMASK_YZW;
2258 return MASK3;
2259 }
2260 YY_BREAK
2261 case 148:
2262 YY_RULE_SETUP
2263 #line 358 "program_lexer.l"
2264 {
2265 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2266 yylval->swiz_mask.mask = WRITEMASK_X
2267 | mask_from_char(yytext[2]);
2268 return MASK2;
2269 }
2270 YY_BREAK
2271 case 149:
2272 YY_RULE_SETUP
2273 #line 364 "program_lexer.l"
2274 {
2275 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2276 yylval->swiz_mask.mask = WRITEMASK_Y
2277 | mask_from_char(yytext[2]);
2278 return MASK2;
2279 }
2280 YY_BREAK
2281 case 150:
2282 YY_RULE_SETUP
2283 #line 370 "program_lexer.l"
2284 {
2285 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2286 yylval->swiz_mask.mask = WRITEMASK_ZW;
2287 return MASK2;
2288 }
2289 YY_BREAK
2290 case 151:
2291 YY_RULE_SETUP
2292 #line 376 "program_lexer.l"
2293 {
2294 const unsigned s = swiz_from_char(yytext[1]);
2295 yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
2296 yylval->swiz_mask.mask = mask_from_char(yytext[1]);
2297 return MASK1;
2298 }
2299 YY_BREAK
2300 case 152:
2301 YY_RULE_SETUP
2302 #line 383 "program_lexer.l"
2303 {
2304 yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
2305 swiz_from_char(yytext[2]),
2306 swiz_from_char(yytext[3]),
2307 swiz_from_char(yytext[4]));
2308 yylval->swiz_mask.mask = 0;
2309 return SWIZZLE;
2310 }
2311 YY_BREAK
2312 case 153:
2313 YY_RULE_SETUP
2314 #line 392 "program_lexer.l"
2315 {
2316 yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
2317 yylval->swiz_mask.mask = WRITEMASK_XYZW;
2318 return_token_or_DOT(require_ARB_fp, MASK4);
2319 }
2320 YY_BREAK
2321 case 154:
2322 YY_RULE_SETUP
2323 #line 398 "program_lexer.l"
2324 {
2325 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2326 yylval->swiz_mask.mask = WRITEMASK_XY
2327 | mask_from_char(yytext[3]);
2328 return_token_or_DOT(require_ARB_fp, MASK3);
2329 }
2330 YY_BREAK
2331 case 155:
2332 YY_RULE_SETUP
2333 #line 404 "program_lexer.l"
2334 {
2335 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2336 yylval->swiz_mask.mask = WRITEMASK_XZW;
2337 return_token_or_DOT(require_ARB_fp, MASK3);
2338 }
2339 YY_BREAK
2340 case 156:
2341 YY_RULE_SETUP
2342 #line 409 "program_lexer.l"
2343 {
2344 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2345 yylval->swiz_mask.mask = WRITEMASK_YZW;
2346 return_token_or_DOT(require_ARB_fp, MASK3);
2347 }
2348 YY_BREAK
2349 case 157:
2350 YY_RULE_SETUP
2351 #line 415 "program_lexer.l"
2352 {
2353 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2354 yylval->swiz_mask.mask = WRITEMASK_X
2355 | mask_from_char(yytext[2]);
2356 return_token_or_DOT(require_ARB_fp, MASK2);
2357 }
2358 YY_BREAK
2359 case 158:
2360 YY_RULE_SETUP
2361 #line 421 "program_lexer.l"
2362 {
2363 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2364 yylval->swiz_mask.mask = WRITEMASK_Y
2365 | mask_from_char(yytext[2]);
2366 return_token_or_DOT(require_ARB_fp, MASK2);
2367 }
2368 YY_BREAK
2369 case 159:
2370 YY_RULE_SETUP
2371 #line 427 "program_lexer.l"
2372 {
2373 yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
2374 yylval->swiz_mask.mask = WRITEMASK_ZW;
2375 return_token_or_DOT(require_ARB_fp, MASK2);
2376 }
2377 YY_BREAK
2378 case 160:
2379 YY_RULE_SETUP
2380 #line 433 "program_lexer.l"
2381 {
2382 const unsigned s = swiz_from_char(yytext[1]);
2383 yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
2384 yylval->swiz_mask.mask = mask_from_char(yytext[1]);
2385 return_token_or_DOT(require_ARB_fp, MASK1);
2386 }
2387 YY_BREAK
2388 case 161:
2389 YY_RULE_SETUP
2390 #line 441 "program_lexer.l"
2391 {
2392 if (require_ARB_vp) {
2393 return TEXGEN_R;
2394 } else {
2395 yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X,
2396 SWIZZLE_X, SWIZZLE_X);
2397 yylval->swiz_mask.mask = WRITEMASK_X;
2398 return MASK1;
2399 }
2400 }
2401 YY_BREAK
2402 case 162:
2403 YY_RULE_SETUP
2404 #line 452 "program_lexer.l"
2405 {
2406 yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
2407 swiz_from_char(yytext[2]),
2408 swiz_from_char(yytext[3]),
2409 swiz_from_char(yytext[4]));
2410 yylval->swiz_mask.mask = 0;
2411 return_token_or_DOT(require_ARB_fp, SWIZZLE);
2412 }
2413 YY_BREAK
2414 case 163:
2415 YY_RULE_SETUP
2416 #line 461 "program_lexer.l"
2417 { return DOT; }
2418 YY_BREAK
2419 case 164:
2420 /* rule 164 can match eol */
2421 YY_RULE_SETUP
2422 #line 463 "program_lexer.l"
2423 {
2424 yylloc->first_line++;
2425 yylloc->first_column = 1;
2426 yylloc->last_line++;
2427 yylloc->last_column = 1;
2428 yylloc->position++;
2429 }
2430 YY_BREAK
2431 case 165:
2432 YY_RULE_SETUP
2433 #line 470 "program_lexer.l"
2434 /* eat whitespace */ ;
2435 YY_BREAK
2436 case 166:
2437 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
2438 yyg->yy_c_buf_p = yy_cp -= 1;
2439 YY_DO_BEFORE_ACTION; /* set up yytext again */
2440 YY_RULE_SETUP
2441 #line 471 "program_lexer.l"
2442 /* eat comments */ ;
2443 YY_BREAK
2444 case 167:
2445 YY_RULE_SETUP
2446 #line 472 "program_lexer.l"
2447 { return yytext[0]; }
2448 YY_BREAK
2449 case 168:
2450 YY_RULE_SETUP
2451 #line 473 "program_lexer.l"
2452 ECHO;
2453 YY_BREAK
2454 #line 2455 "lex.yy.c"
2455 case YY_STATE_EOF(INITIAL):
2456 yyterminate();
2457
2458 case YY_END_OF_BUFFER:
2459 {
2460 /* Amount of text matched not including the EOB char. */
2461 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
2462
2463 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2464 *yy_cp = yyg->yy_hold_char;
2465 YY_RESTORE_YY_MORE_OFFSET
2466
2467 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2468 {
2469 /* We're scanning a new file or input source. It's
2470 * possible that this happened because the user
2471 * just pointed yyin at a new source and called
2472 * yylex(). If so, then we have to assure
2473 * consistency between YY_CURRENT_BUFFER and our
2474 * globals. Here is the right place to do so, because
2475 * this is the first action (other than possibly a
2476 * back-up) that will match for the new input source.
2477 */
2478 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2479 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2480 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2481 }
2482
2483 /* Note that here we test for yy_c_buf_p "<=" to the position
2484 * of the first EOB in the buffer, since yy_c_buf_p will
2485 * already have been incremented past the NUL character
2486 * (since all states make transitions on EOB to the
2487 * end-of-buffer state). Contrast this with the test
2488 * in input().
2489 */
2490 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2491 { /* This was really a NUL. */
2492 yy_state_type yy_next_state;
2493
2494 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2495
2496 yy_current_state = yy_get_previous_state( yyscanner );
2497
2498 /* Okay, we're now positioned to make the NUL
2499 * transition. We couldn't have
2500 * yy_get_previous_state() go ahead and do it
2501 * for us because it doesn't know how to deal
2502 * with the possibility of jamming (and we don't
2503 * want to build jamming into it because then it
2504 * will run more slowly).
2505 */
2506
2507 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2508
2509 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2510
2511 if ( yy_next_state )
2512 {
2513 /* Consume the NUL. */
2514 yy_cp = ++yyg->yy_c_buf_p;
2515 yy_current_state = yy_next_state;
2516 goto yy_match;
2517 }
2518
2519 else
2520 {
2521 yy_cp = yyg->yy_c_buf_p;
2522 goto yy_find_action;
2523 }
2524 }
2525
2526 else switch ( yy_get_next_buffer( yyscanner ) )
2527 {
2528 case EOB_ACT_END_OF_FILE:
2529 {
2530 yyg->yy_did_buffer_switch_on_eof = 0;
2531
2532 if ( yywrap(yyscanner ) )
2533 {
2534 /* Note: because we've taken care in
2535 * yy_get_next_buffer() to have set up
2536 * yytext, we can now set up
2537 * yy_c_buf_p so that if some total
2538 * hoser (like flex itself) wants to
2539 * call the scanner after we return the
2540 * YY_NULL, it'll still work - another
2541 * YY_NULL will get returned.
2542 */
2543 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2544
2545 yy_act = YY_STATE_EOF(YY_START);
2546 goto do_action;
2547 }
2548
2549 else
2550 {
2551 if ( ! yyg->yy_did_buffer_switch_on_eof )
2552 YY_NEW_FILE;
2553 }
2554 break;
2555 }
2556
2557 case EOB_ACT_CONTINUE_SCAN:
2558 yyg->yy_c_buf_p =
2559 yyg->yytext_ptr + yy_amount_of_matched_text;
2560
2561 yy_current_state = yy_get_previous_state( yyscanner );
2562
2563 yy_cp = yyg->yy_c_buf_p;
2564 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2565 goto yy_match;
2566
2567 case EOB_ACT_LAST_MATCH:
2568 yyg->yy_c_buf_p =
2569 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2570
2571 yy_current_state = yy_get_previous_state( yyscanner );
2572
2573 yy_cp = yyg->yy_c_buf_p;
2574 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2575 goto yy_find_action;
2576 }
2577 break;
2578 }
2579
2580 default:
2581 YY_FATAL_ERROR(
2582 "fatal flex scanner internal error--no action found" );
2583 } /* end of action switch */
2584 } /* end of scanning one token */
2585 } /* end of yylex */
2586
2587 /* yy_get_next_buffer - try to read in a new buffer
2588 *
2589 * Returns a code representing an action:
2590 * EOB_ACT_LAST_MATCH -
2591 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2592 * EOB_ACT_END_OF_FILE - end of file
2593 */
2594 static int yy_get_next_buffer (yyscan_t yyscanner)
2595 {
2596 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2597 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2598 register char *source = yyg->yytext_ptr;
2599 register int number_to_move, i;
2600 int ret_val;
2601
2602 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2603 YY_FATAL_ERROR(
2604 "fatal flex scanner internal error--end of buffer missed" );
2605
2606 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2607 { /* Don't try to fill the buffer, so this is an EOF. */
2608 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2609 {
2610 /* We matched a single character, the EOB, so
2611 * treat this as a final EOF.
2612 */
2613 return EOB_ACT_END_OF_FILE;
2614 }
2615
2616 else
2617 {
2618 /* We matched some text prior to the EOB, first
2619 * process it.
2620 */
2621 return EOB_ACT_LAST_MATCH;
2622 }
2623 }
2624
2625 /* Try to read more data. */
2626
2627 /* First move last chars to start of buffer. */
2628 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
2629
2630 for ( i = 0; i < number_to_move; ++i )
2631 *(dest++) = *(source++);
2632
2633 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2634 /* don't do the read, it's not guaranteed to return an EOF,
2635 * just force an EOF
2636 */
2637 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2638
2639 else
2640 {
2641 int num_to_read =
2642 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2643
2644 while ( num_to_read <= 0 )
2645 { /* Not enough room in the buffer - grow it. */
2646
2647 /* just a shorter name for the current buffer */
2648 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2649
2650 int yy_c_buf_p_offset =
2651 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2652
2653 if ( b->yy_is_our_buffer )
2654 {
2655 int new_size = b->yy_buf_size * 2;
2656
2657 if ( new_size <= 0 )
2658 b->yy_buf_size += b->yy_buf_size / 8;
2659 else
2660 b->yy_buf_size *= 2;
2661
2662 b->yy_ch_buf = (char *)
2663 /* Include room in for 2 EOB chars. */
2664 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
2665 }
2666 else
2667 /* Can't grow it, we don't own it. */
2668 b->yy_ch_buf = 0;
2669
2670 if ( ! b->yy_ch_buf )
2671 YY_FATAL_ERROR(
2672 "fatal error - scanner input buffer overflow" );
2673
2674 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2675
2676 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2677 number_to_move - 1;
2678
2679 }
2680
2681 if ( num_to_read > YY_READ_BUF_SIZE )
2682 num_to_read = YY_READ_BUF_SIZE;
2683
2684 /* Read in more data. */
2685 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2686 yyg->yy_n_chars, (size_t) num_to_read );
2687
2688 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2689 }
2690
2691 if ( yyg->yy_n_chars == 0 )
2692 {
2693 if ( number_to_move == YY_MORE_ADJ )
2694 {
2695 ret_val = EOB_ACT_END_OF_FILE;
2696 yyrestart(yyin ,yyscanner);
2697 }
2698
2699 else
2700 {
2701 ret_val = EOB_ACT_LAST_MATCH;
2702 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2703 YY_BUFFER_EOF_PENDING;
2704 }
2705 }
2706
2707 else
2708 ret_val = EOB_ACT_CONTINUE_SCAN;
2709
2710 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2711 /* Extend the array by 50%, plus the number we really need. */
2712 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
2713 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
2714 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2715 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2716 }
2717
2718 yyg->yy_n_chars += number_to_move;
2719 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2720 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2721
2722 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2723
2724 return ret_val;
2725 }
2726
2727 /* yy_get_previous_state - get the state just before the EOB char was reached */
2728
2729 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2730 {
2731 register yy_state_type yy_current_state;
2732 register char *yy_cp;
2733 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2734
2735 yy_current_state = yyg->yy_start;
2736
2737 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2738 {
2739 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2740 if ( yy_accept[yy_current_state] )
2741 {
2742 yyg->yy_last_accepting_state = yy_current_state;
2743 yyg->yy_last_accepting_cpos = yy_cp;
2744 }
2745 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2746 {
2747 yy_current_state = (int) yy_def[yy_current_state];
2748 if ( yy_current_state >= 836 )
2749 yy_c = yy_meta[(unsigned int) yy_c];
2750 }
2751 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2752 }
2753
2754 return yy_current_state;
2755 }
2756
2757 /* yy_try_NUL_trans - try to make a transition on the NUL character
2758 *
2759 * synopsis
2760 * next_state = yy_try_NUL_trans( current_state );
2761 */
2762 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2763 {
2764 register int yy_is_jam;
2765 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2766 register char *yy_cp = yyg->yy_c_buf_p;
2767
2768 register YY_CHAR yy_c = 1;
2769 if ( yy_accept[yy_current_state] )
2770 {
2771 yyg->yy_last_accepting_state = yy_current_state;
2772 yyg->yy_last_accepting_cpos = yy_cp;
2773 }
2774 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2775 {
2776 yy_current_state = (int) yy_def[yy_current_state];
2777 if ( yy_current_state >= 836 )
2778 yy_c = yy_meta[(unsigned int) yy_c];
2779 }
2780 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2781 yy_is_jam = (yy_current_state == 835);
2782
2783 return yy_is_jam ? 0 : yy_current_state;
2784 }
2785
2786 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
2787 {
2788 register char *yy_cp;
2789 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2790
2791 yy_cp = yyg->yy_c_buf_p;
2792
2793 /* undo effects of setting up yytext */
2794 *yy_cp = yyg->yy_hold_char;
2795
2796 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2797 { /* need to shift things up to make room */
2798 /* +2 for EOB chars. */
2799 register int number_to_move = yyg->yy_n_chars + 2;
2800 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2801 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2802 register char *source =
2803 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2804
2805 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2806 *--dest = *--source;
2807
2808 yy_cp += (int) (dest - source);
2809 yy_bp += (int) (dest - source);
2810 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2811 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2812
2813 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2814 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2815 }
2816
2817 *--yy_cp = (char) c;
2818
2819 yyg->yytext_ptr = yy_bp;
2820 yyg->yy_hold_char = *yy_cp;
2821 yyg->yy_c_buf_p = yy_cp;
2822 }
2823
2824 #ifndef YY_NO_INPUT
2825 #ifdef __cplusplus
2826 static int yyinput (yyscan_t yyscanner)
2827 #else
2828 static int input (yyscan_t yyscanner)
2829 #endif
2830
2831 {
2832 int c;
2833 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2834
2835 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2836
2837 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2838 {
2839 /* yy_c_buf_p now points to the character we want to return.
2840 * If this occurs *before* the EOB characters, then it's a
2841 * valid NUL; if not, then we've hit the end of the buffer.
2842 */
2843 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2844 /* This was really a NUL. */
2845 *yyg->yy_c_buf_p = '\0';
2846
2847 else
2848 { /* need more input */
2849 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
2850 ++yyg->yy_c_buf_p;
2851
2852 switch ( yy_get_next_buffer( yyscanner ) )
2853 {
2854 case EOB_ACT_LAST_MATCH:
2855 /* This happens because yy_g_n_b()
2856 * sees that we've accumulated a
2857 * token and flags that we need to
2858 * try matching the token before
2859 * proceeding. But for input(),
2860 * there's no matching to consider.
2861 * So convert the EOB_ACT_LAST_MATCH
2862 * to EOB_ACT_END_OF_FILE.
2863 */
2864
2865 /* Reset buffer status. */
2866 yyrestart(yyin ,yyscanner);
2867
2868 /*FALLTHROUGH*/
2869
2870 case EOB_ACT_END_OF_FILE:
2871 {
2872 if ( yywrap(yyscanner ) )
2873 return EOF;
2874
2875 if ( ! yyg->yy_did_buffer_switch_on_eof )
2876 YY_NEW_FILE;
2877 #ifdef __cplusplus
2878 return yyinput(yyscanner);
2879 #else
2880 return input(yyscanner);
2881 #endif
2882 }
2883
2884 case EOB_ACT_CONTINUE_SCAN:
2885 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2886 break;
2887 }
2888 }
2889 }
2890
2891 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2892 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2893 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2894
2895 return c;
2896 }
2897 #endif /* ifndef YY_NO_INPUT */
2898
2899 /** Immediately switch to a different input stream.
2900 * @param input_file A readable stream.
2901 * @param yyscanner The scanner object.
2902 * @note This function does not reset the start condition to @c INITIAL .
2903 */
2904 void yyrestart (FILE * input_file , yyscan_t yyscanner)
2905 {
2906 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2907
2908 if ( ! YY_CURRENT_BUFFER ){
2909 yyensure_buffer_stack (yyscanner);
2910 YY_CURRENT_BUFFER_LVALUE =
2911 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
2912 }
2913
2914 yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2915 yy_load_buffer_state(yyscanner );
2916 }
2917
2918 /** Switch to a different input buffer.
2919 * @param new_buffer The new input buffer.
2920 * @param yyscanner The scanner object.
2921 */
2922 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2923 {
2924 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2925
2926 /* TODO. We should be able to replace this entire function body
2927 * with
2928 * yypop_buffer_state();
2929 * yypush_buffer_state(new_buffer);
2930 */
2931 yyensure_buffer_stack (yyscanner);
2932 if ( YY_CURRENT_BUFFER == new_buffer )
2933 return;
2934
2935 if ( YY_CURRENT_BUFFER )
2936 {
2937 /* Flush out information for old buffer. */
2938 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2939 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2940 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2941 }
2942
2943 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2944 yy_load_buffer_state(yyscanner );
2945
2946 /* We don't actually know whether we did this switch during
2947 * EOF (yywrap()) processing, but the only time this flag
2948 * is looked at is after yywrap() is called, so it's safe
2949 * to go ahead and always set it.
2950 */
2951 yyg->yy_did_buffer_switch_on_eof = 1;
2952 }
2953
2954 static void yy_load_buffer_state (yyscan_t yyscanner)
2955 {
2956 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2957 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2958 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2959 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2960 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2961 }
2962
2963 /** Allocate and initialize an input buffer state.
2964 * @param file A readable stream.
2965 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2966 * @param yyscanner The scanner object.
2967 * @return the allocated buffer state.
2968 */
2969 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2970 {
2971 YY_BUFFER_STATE b;
2972
2973 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2974 if ( ! b )
2975 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2976
2977 b->yy_buf_size = size;
2978
2979 /* yy_ch_buf has to be 2 characters longer than the size given because
2980 * we need to put in 2 end-of-buffer characters.
2981 */
2982 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner );
2983 if ( ! b->yy_ch_buf )
2984 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2985
2986 b->yy_is_our_buffer = 1;
2987
2988 yy_init_buffer(b,file ,yyscanner);
2989
2990 return b;
2991 }
2992
2993 /** Destroy the buffer.
2994 * @param b a buffer created with yy_create_buffer()
2995 * @param yyscanner The scanner object.
2996 */
2997 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2998 {
2999 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3000
3001 if ( ! b )
3002 return;
3003
3004 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3005 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3006
3007 if ( b->yy_is_our_buffer )
3008 yyfree((void *) b->yy_ch_buf ,yyscanner );
3009
3010 yyfree((void *) b ,yyscanner );
3011 }
3012
3013 /* Initializes or reinitializes a buffer.
3014 * This function is sometimes called more than once on the same buffer,
3015 * such as during a yyrestart() or at EOF.
3016 */
3017 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
3018
3019 {
3020 int oerrno = errno;
3021 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3022
3023 yy_flush_buffer(b ,yyscanner);
3024
3025 b->yy_input_file = file;
3026 b->yy_fill_buffer = 1;
3027
3028 /* If b is the current buffer, then yy_init_buffer was _probably_
3029 * called from yyrestart() or through yy_get_next_buffer.
3030 * In that case, we don't want to reset the lineno or column.
3031 */
3032 if (b != YY_CURRENT_BUFFER){
3033 b->yy_bs_lineno = 1;
3034 b->yy_bs_column = 0;
3035 }
3036
3037 b->yy_is_interactive = 0;
3038
3039 errno = oerrno;
3040 }
3041
3042 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3043 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3044 * @param yyscanner The scanner object.
3045 */
3046 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
3047 {
3048 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3049 if ( ! b )
3050 return;
3051
3052 b->yy_n_chars = 0;
3053
3054 /* We always need two end-of-buffer characters. The first causes
3055 * a transition to the end-of-buffer state. The second causes
3056 * a jam in that state.
3057 */
3058 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3059 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3060
3061 b->yy_buf_pos = &b->yy_ch_buf[0];
3062
3063 b->yy_at_bol = 1;
3064 b->yy_buffer_status = YY_BUFFER_NEW;
3065
3066 if ( b == YY_CURRENT_BUFFER )
3067 yy_load_buffer_state(yyscanner );
3068 }
3069
3070 /** Pushes the new state onto the stack. The new state becomes
3071 * the current state. This function will allocate the stack
3072 * if necessary.
3073 * @param new_buffer The new state.
3074 * @param yyscanner The scanner object.
3075 */
3076 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
3077 {
3078 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3079 if (new_buffer == NULL)
3080 return;
3081
3082 yyensure_buffer_stack(yyscanner);
3083
3084 /* This block is copied from yy_switch_to_buffer. */
3085 if ( YY_CURRENT_BUFFER )
3086 {
3087 /* Flush out information for old buffer. */
3088 *yyg->yy_c_buf_p = yyg->yy_hold_char;
3089 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
3090 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
3091 }
3092
3093 /* Only push if top exists. Otherwise, replace top. */
3094 if (YY_CURRENT_BUFFER)
3095 yyg->yy_buffer_stack_top++;
3096 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3097
3098 /* copied from yy_switch_to_buffer. */
3099 yy_load_buffer_state(yyscanner );
3100 yyg->yy_did_buffer_switch_on_eof = 1;
3101 }
3102
3103 /** Removes and deletes the top of the stack, if present.
3104 * The next element becomes the new top.
3105 * @param yyscanner The scanner object.
3106 */
3107 void yypop_buffer_state (yyscan_t yyscanner)
3108 {
3109 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3110 if (!YY_CURRENT_BUFFER)
3111 return;
3112
3113 yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
3114 YY_CURRENT_BUFFER_LVALUE = NULL;
3115 if (yyg->yy_buffer_stack_top > 0)
3116 --yyg->yy_buffer_stack_top;
3117
3118 if (YY_CURRENT_BUFFER) {
3119 yy_load_buffer_state(yyscanner );
3120 yyg->yy_did_buffer_switch_on_eof = 1;
3121 }
3122 }
3123
3124 /* Allocates the stack if it does not exist.
3125 * Guarantees space for at least one push.
3126 */
3127 static void yyensure_buffer_stack (yyscan_t yyscanner)
3128 {
3129 int num_to_alloc;
3130 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3131
3132 if (!yyg->yy_buffer_stack) {
3133
3134 /* First allocation is just for 2 elements, since we don't know if this
3135 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3136 * immediate realloc on the next call.
3137 */
3138 num_to_alloc = 1;
3139 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
3140 (num_to_alloc * sizeof(struct yy_buffer_state*)
3141 , yyscanner);
3142 if ( ! yyg->yy_buffer_stack )
3143 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3144
3145 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3146
3147 yyg->yy_buffer_stack_max = num_to_alloc;
3148 yyg->yy_buffer_stack_top = 0;
3149 return;
3150 }
3151
3152 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
3153
3154 /* Increase the buffer to prepare for a possible push. */
3155 int grow_size = 8 /* arbitrary grow size */;
3156
3157 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
3158 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
3159 (yyg->yy_buffer_stack,
3160 num_to_alloc * sizeof(struct yy_buffer_state*)
3161 , yyscanner);
3162 if ( ! yyg->yy_buffer_stack )
3163 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3164
3165 /* zero only the new slots.*/
3166 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
3167 yyg->yy_buffer_stack_max = num_to_alloc;
3168 }
3169 }
3170
3171 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3172 * @param base the character buffer
3173 * @param size the size in bytes of the character buffer
3174 * @param yyscanner The scanner object.
3175 * @return the newly allocated buffer state object.
3176 */
3177 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
3178 {
3179 YY_BUFFER_STATE b;
3180
3181 if ( size < 2 ||
3182 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3183 base[size-1] != YY_END_OF_BUFFER_CHAR )
3184 /* They forgot to leave room for the EOB's. */
3185 return 0;
3186
3187 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
3188 if ( ! b )
3189 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3190
3191 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3192 b->yy_buf_pos = b->yy_ch_buf = base;
3193 b->yy_is_our_buffer = 0;
3194 b->yy_input_file = 0;
3195 b->yy_n_chars = b->yy_buf_size;
3196 b->yy_is_interactive = 0;
3197 b->yy_at_bol = 1;
3198 b->yy_fill_buffer = 0;
3199 b->yy_buffer_status = YY_BUFFER_NEW;
3200
3201 yy_switch_to_buffer(b ,yyscanner );
3202
3203 return b;
3204 }
3205
3206 /** Setup the input buffer state to scan a string. The next call to yylex() will
3207 * scan from a @e copy of @a str.
3208 * @param yystr a NUL-terminated string to scan
3209 * @param yyscanner The scanner object.
3210 * @return the newly allocated buffer state object.
3211 * @note If you want to scan bytes that may contain NUL values, then use
3212 * yy_scan_bytes() instead.
3213 */
3214 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
3215 {
3216
3217 return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
3218 }
3219
3220 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3221 * scan from a @e copy of @a bytes.
3222 * @param yybytes the byte buffer to scan
3223 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3224 * @param yyscanner The scanner object.
3225 * @return the newly allocated buffer state object.
3226 */
3227 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
3228 {
3229 YY_BUFFER_STATE b;
3230 char *buf;
3231 yy_size_t n;
3232 int i;
3233
3234 /* Get memory for full buffer, including space for trailing EOB's. */
3235 n = _yybytes_len + 2;
3236 buf = (char *) yyalloc(n ,yyscanner );
3237 if ( ! buf )
3238 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3239
3240 for ( i = 0; i < _yybytes_len; ++i )
3241 buf[i] = yybytes[i];
3242
3243 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3244
3245 b = yy_scan_buffer(buf,n ,yyscanner);
3246 if ( ! b )
3247 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3248
3249 /* It's okay to grow etc. this buffer, and we should throw it
3250 * away when we're done.
3251 */
3252 b->yy_is_our_buffer = 1;
3253
3254 return b;
3255 }
3256
3257 #ifndef YY_EXIT_FAILURE
3258 #define YY_EXIT_FAILURE 2
3259 #endif
3260
3261 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
3262 {
3263 (void) fprintf( stderr, "%s\n", msg );
3264 exit( YY_EXIT_FAILURE );
3265 }
3266
3267 /* Redefine yyless() so it works in section 3 code. */
3268
3269 #undef yyless
3270 #define yyless(n) \
3271 do \
3272 { \
3273 /* Undo effects of setting up yytext. */ \
3274 int yyless_macro_arg = (n); \
3275 YY_LESS_LINENO(yyless_macro_arg);\
3276 yytext[yyleng] = yyg->yy_hold_char; \
3277 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
3278 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
3279 *yyg->yy_c_buf_p = '\0'; \
3280 yyleng = yyless_macro_arg; \
3281 } \
3282 while ( 0 )
3283
3284 /* Accessor methods (get/set functions) to struct members. */
3285
3286 /** Get the user-defined data for this scanner.
3287 * @param yyscanner The scanner object.
3288 */
3289 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
3290 {
3291 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3292 return yyextra;
3293 }
3294
3295 /** Get the current line number.
3296 * @param yyscanner The scanner object.
3297 */
3298 int yyget_lineno (yyscan_t yyscanner)
3299 {
3300 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3301
3302 if (! YY_CURRENT_BUFFER)
3303 return 0;
3304
3305 return yylineno;
3306 }
3307
3308 /** Get the current column number.
3309 * @param yyscanner The scanner object.
3310 */
3311 int yyget_column (yyscan_t yyscanner)
3312 {
3313 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3314
3315 if (! YY_CURRENT_BUFFER)
3316 return 0;
3317
3318 return yycolumn;
3319 }
3320
3321 /** Get the input stream.
3322 * @param yyscanner The scanner object.
3323 */
3324 FILE *yyget_in (yyscan_t yyscanner)
3325 {
3326 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3327 return yyin;
3328 }
3329
3330 /** Get the output stream.
3331 * @param yyscanner The scanner object.
3332 */
3333 FILE *yyget_out (yyscan_t yyscanner)
3334 {
3335 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3336 return yyout;
3337 }
3338
3339 /** Get the length of the current token.
3340 * @param yyscanner The scanner object.
3341 */
3342 int yyget_leng (yyscan_t yyscanner)
3343 {
3344 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3345 return yyleng;
3346 }
3347
3348 /** Get the current token.
3349 * @param yyscanner The scanner object.
3350 */
3351
3352 char *yyget_text (yyscan_t yyscanner)
3353 {
3354 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3355 return yytext;
3356 }
3357
3358 /** Set the user-defined data. This data is never touched by the scanner.
3359 * @param user_defined The data to be associated with this scanner.
3360 * @param yyscanner The scanner object.
3361 */
3362 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
3363 {
3364 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3365 yyextra = user_defined ;
3366 }
3367
3368 /** Set the current line number.
3369 * @param line_number
3370 * @param yyscanner The scanner object.
3371 */
3372 void yyset_lineno (int line_number , yyscan_t yyscanner)
3373 {
3374 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3375
3376 /* lineno is only valid if an input buffer exists. */
3377 if (! YY_CURRENT_BUFFER )
3378 yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner);
3379
3380 yylineno = line_number;
3381 }
3382
3383 /** Set the current column.
3384 * @param line_number
3385 * @param yyscanner The scanner object.
3386 */
3387 void yyset_column (int column_no , yyscan_t yyscanner)
3388 {
3389 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3390
3391 /* column is only valid if an input buffer exists. */
3392 if (! YY_CURRENT_BUFFER )
3393 yy_fatal_error( "yyset_column called with no buffer" , yyscanner);
3394
3395 yycolumn = column_no;
3396 }
3397
3398 /** Set the input stream. This does not discard the current
3399 * input buffer.
3400 * @param in_str A readable stream.
3401 * @param yyscanner The scanner object.
3402 * @see yy_switch_to_buffer
3403 */
3404 void yyset_in (FILE * in_str , yyscan_t yyscanner)
3405 {
3406 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3407 yyin = in_str ;
3408 }
3409
3410 void yyset_out (FILE * out_str , yyscan_t yyscanner)
3411 {
3412 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3413 yyout = out_str ;
3414 }
3415
3416 int yyget_debug (yyscan_t yyscanner)
3417 {
3418 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3419 return yy_flex_debug;
3420 }
3421
3422 void yyset_debug (int bdebug , yyscan_t yyscanner)
3423 {
3424 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3425 yy_flex_debug = bdebug ;
3426 }
3427
3428 /* Accessor methods for yylval and yylloc */
3429
3430 YYSTYPE * yyget_lval (yyscan_t yyscanner)
3431 {
3432 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3433 return yylval;
3434 }
3435
3436 void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
3437 {
3438 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3439 yylval = yylval_param;
3440 }
3441
3442 YYLTYPE *yyget_lloc (yyscan_t yyscanner)
3443 {
3444 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3445 return yylloc;
3446 }
3447
3448 void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
3449 {
3450 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3451 yylloc = yylloc_param;
3452 }
3453
3454 /* User-visible API */
3455
3456 /* yylex_init is special because it creates the scanner itself, so it is
3457 * the ONLY reentrant function that doesn't take the scanner as the last argument.
3458 * That's why we explicitly handle the declaration, instead of using our macros.
3459 */
3460
3461 int yylex_init(yyscan_t* ptr_yy_globals)
3462
3463 {
3464 if (ptr_yy_globals == NULL){
3465 errno = EINVAL;
3466 return 1;
3467 }
3468
3469 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
3470
3471 if (*ptr_yy_globals == NULL){
3472 errno = ENOMEM;
3473 return 1;
3474 }
3475
3476 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3477 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3478
3479 return yy_init_globals ( *ptr_yy_globals );
3480 }
3481
3482 /* yylex_init_extra has the same functionality as yylex_init, but follows the
3483 * convention of taking the scanner as the last argument. Note however, that
3484 * this is a *pointer* to a scanner, as it will be allocated by this call (and
3485 * is the reason, too, why this function also must handle its own declaration).
3486 * The user defined value in the first argument will be available to yyalloc in
3487 * the yyextra field.
3488 */
3489
3490 int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
3491
3492 {
3493 struct yyguts_t dummy_yyguts;
3494
3495 yyset_extra (yy_user_defined, &dummy_yyguts);
3496
3497 if (ptr_yy_globals == NULL){
3498 errno = EINVAL;
3499 return 1;
3500 }
3501
3502 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
3503
3504 if (*ptr_yy_globals == NULL){
3505 errno = ENOMEM;
3506 return 1;
3507 }
3508
3509 /* By setting to 0xAA, we expose bugs in
3510 yy_init_globals. Leave at 0x00 for releases. */
3511 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
3512
3513 yyset_extra (yy_user_defined, *ptr_yy_globals);
3514
3515 return yy_init_globals ( *ptr_yy_globals );
3516 }
3517
3518 static int yy_init_globals (yyscan_t yyscanner)
3519 {
3520 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3521 /* Initialization is the same as for the non-reentrant scanner.
3522 * This function is called from yylex_destroy(), so don't allocate here.
3523 */
3524
3525 yyg->yy_buffer_stack = 0;
3526 yyg->yy_buffer_stack_top = 0;
3527 yyg->yy_buffer_stack_max = 0;
3528 yyg->yy_c_buf_p = (char *) 0;
3529 yyg->yy_init = 0;
3530 yyg->yy_start = 0;
3531
3532 yyg->yy_start_stack_ptr = 0;
3533 yyg->yy_start_stack_depth = 0;
3534 yyg->yy_start_stack = NULL;
3535
3536 /* Defined in main.c */
3537 #ifdef YY_STDINIT
3538 yyin = stdin;
3539 yyout = stdout;
3540 #else
3541 yyin = (FILE *) 0;
3542 yyout = (FILE *) 0;
3543 #endif
3544
3545 /* For future reference: Set errno on error, since we are called by
3546 * yylex_init()
3547 */
3548 return 0;
3549 }
3550
3551 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3552 int yylex_destroy (yyscan_t yyscanner)
3553 {
3554 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3555
3556 /* Pop the buffer stack, destroying each element. */
3557 while(YY_CURRENT_BUFFER){
3558 yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
3559 YY_CURRENT_BUFFER_LVALUE = NULL;
3560 yypop_buffer_state(yyscanner);
3561 }
3562
3563 /* Destroy the stack itself. */
3564 yyfree(yyg->yy_buffer_stack ,yyscanner);
3565 yyg->yy_buffer_stack = NULL;
3566
3567 /* Destroy the start condition stack. */
3568 yyfree(yyg->yy_start_stack ,yyscanner );
3569 yyg->yy_start_stack = NULL;
3570
3571 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3572 * yylex() is called, initialization will occur. */
3573 yy_init_globals( yyscanner);
3574
3575 /* Destroy the main struct (reentrant only). */
3576 yyfree ( yyscanner , yyscanner );
3577 yyscanner = NULL;
3578 return 0;
3579 }
3580
3581 /*
3582 * Internal utility routines.
3583 */
3584
3585 #ifndef yytext_ptr
3586 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
3587 {
3588 register int i;
3589 for ( i = 0; i < n; ++i )
3590 s1[i] = s2[i];
3591 }
3592 #endif
3593
3594 #ifdef YY_NEED_STRLEN
3595 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
3596 {
3597 register int n;
3598 for ( n = 0; s[n]; ++n )
3599 ;
3600
3601 return n;
3602 }
3603 #endif
3604
3605 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
3606 {
3607 return (void *) malloc( size );
3608 }
3609
3610 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
3611 {
3612 /* The cast to (char *) in the following accommodates both
3613 * implementations that use char* generic pointers, and those
3614 * that use void* generic pointers. It works with the latter
3615 * because both ANSI C and C++ allow castless assignment from
3616 * any pointer type to void*, and deal with argument conversions
3617 * as though doing an assignment.
3618 */
3619 return (void *) realloc( (char *) ptr, size );
3620 }
3621
3622 void yyfree (void * ptr , yyscan_t yyscanner)
3623 {
3624 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3625 }
3626
3627 #define YYTABLES_NAME "yytables"
3628
3629 #line 473 "program_lexer.l"
3630
3631
3632
3633 void
3634 _mesa_program_lexer_ctor(void **scanner, struct asm_parser_state *state,
3635 const char *string, size_t len)
3636 {
3637 yylex_init_extra(state,scanner);
3638 yy_scan_bytes(string,len,*scanner);
3639 }
3640
3641 void
3642 _mesa_program_lexer_dtor(void *scanner)
3643 {
3644 yylex_destroy(scanner);
3645 }
3646