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