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