1 #line 2 "asmshader.yy.c"
3 #line 4 "asmshader.yy.c"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
9 #define yy_create_buffer asmshader__create_buffer
10 #define yy_delete_buffer asmshader__delete_buffer
11 #define yy_flex_debug asmshader__flex_debug
12 #define yy_init_buffer asmshader__init_buffer
13 #define yy_flush_buffer asmshader__flush_buffer
14 #define yy_load_buffer_state asmshader__load_buffer_state
15 #define yy_switch_to_buffer asmshader__switch_to_buffer
16 #define yyin asmshader_in
17 #define yyleng asmshader_leng
18 #define yylex asmshader_lex
19 #define yylineno asmshader_lineno
20 #define yyout asmshader_out
21 #define yyrestart asmshader_restart
22 #define yytext asmshader_text
23 #define yywrap asmshader_wrap
24 #define yyalloc asmshader_alloc
25 #define yyrealloc asmshader_realloc
26 #define yyfree asmshader_free
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 5
31 #define YY_FLEX_SUBMINOR_VERSION 35
32 #if YY_FLEX_SUBMINOR_VERSION > 0
36 /* First, we deal with platform-specific or compiler-specific issues. */
38 /* begin standard C headers. */
44 /* end standard C headers. */
46 /* flex integer type definitions */
51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56 * if you want the limit (max/min) macros for int types.
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
63 typedef int8_t flex_int8_t
;
64 typedef uint8_t flex_uint8_t
;
65 typedef int16_t flex_int16_t
;
66 typedef uint16_t flex_uint16_t
;
67 typedef int32_t flex_int32_t
;
68 typedef uint32_t flex_uint32_t
;
70 typedef signed char flex_int8_t
;
71 typedef short int flex_int16_t
;
72 typedef int flex_int32_t
;
73 typedef unsigned char flex_uint8_t
;
74 typedef unsigned short int flex_uint16_t
;
75 typedef unsigned int flex_uint32_t
;
77 /* Limits of integral types. */
79 #define INT8_MIN (-128)
82 #define INT16_MIN (-32767-1)
85 #define INT32_MIN (-2147483647-1)
88 #define INT8_MAX (127)
91 #define INT16_MAX (32767)
94 #define INT32_MAX (2147483647)
97 #define UINT8_MAX (255U)
100 #define UINT16_MAX (65535U)
103 #define UINT32_MAX (4294967295U)
108 #endif /* ! FLEXINT_H */
112 /* The "const" storage-class-modifier is valid. */
115 #else /* ! __cplusplus */
117 /* C99 requires __STDC__ to be defined as 1. */
118 #if defined (__STDC__)
122 #endif /* defined (__STDC__) */
123 #endif /* ! __cplusplus */
126 #define yyconst const
131 /* Returned upon end-of-file. */
134 /* Promotes a possibly negative, possibly signed char to an unsigned
135 * integer for use as an array index. If the signed char is negative,
136 * we want to instead treat it as an 8-bit unsigned char, hence the
139 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
141 /* Enter a start condition. This macro really ought to take a parameter,
142 * but we do it the disgusting crufty way forced on us by the ()-less
143 * definition of BEGIN.
145 #define BEGIN (yy_start) = 1 + 2 *
147 /* Translate the current start state into a value that can be later handed
148 * to BEGIN to return to the state. The YYSTATE alias is for lex
151 #define YY_START (((yy_start) - 1) / 2)
152 #define YYSTATE YY_START
154 /* Action number for EOF rule of a given start state. */
155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
157 /* Special action meaning "start processing a new file". */
158 #define YY_NEW_FILE asmshader_restart(asmshader_in )
160 #define YY_END_OF_BUFFER_CHAR 0
162 /* Size of default input buffer. */
165 /* On IA-64, the buffer size is 16k, not 8k.
166 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
167 * Ditto for the __ia64__ case accordingly.
169 #define YY_BUF_SIZE 32768
171 #define YY_BUF_SIZE 16384
172 #endif /* __ia64__ */
175 /* The state buf must be large enough to hold one state per character in the main buffer.
177 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
179 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
180 #define YY_TYPEDEF_YY_BUFFER_STATE
181 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
184 extern int asmshader_leng
;
186 extern FILE *asmshader_in
, *asmshader_out
;
188 #define EOB_ACT_CONTINUE_SCAN 0
189 #define EOB_ACT_END_OF_FILE 1
190 #define EOB_ACT_LAST_MATCH 2
192 #define YY_LESS_LINENO(n)
194 /* Return all but the first "n" matched characters back to the input stream. */
198 /* Undo effects of setting up asmshader_text. */ \
199 int yyless_macro_arg = (n); \
200 YY_LESS_LINENO(yyless_macro_arg);\
201 *yy_cp = (yy_hold_char); \
202 YY_RESTORE_YY_MORE_OFFSET \
203 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
204 YY_DO_BEFORE_ACTION; /* set up asmshader_text again */ \
208 #define unput(c) yyunput( c, (yytext_ptr) )
210 #ifndef YY_TYPEDEF_YY_SIZE_T
211 #define YY_TYPEDEF_YY_SIZE_T
212 typedef size_t yy_size_t
;
215 #ifndef YY_STRUCT_YY_BUFFER_STATE
216 #define YY_STRUCT_YY_BUFFER_STATE
217 struct yy_buffer_state
221 char *yy_ch_buf
; /* input buffer */
222 char *yy_buf_pos
; /* current position in input buffer */
224 /* Size of input buffer in bytes, not including room for EOB
227 yy_size_t yy_buf_size
;
229 /* Number of characters read into yy_ch_buf, not including EOB
234 /* Whether we "own" the buffer - i.e., we know we created it,
235 * and can realloc() it to grow it, and should free() it to
238 int yy_is_our_buffer
;
240 /* Whether this is an "interactive" input source; if so, and
241 * if we're using stdio for input, then we want to use getc()
242 * instead of fread(), to make sure we stop fetching input after
245 int yy_is_interactive
;
247 /* Whether we're considered to be at the beginning of a line.
248 * If so, '^' rules will be active on the next match, otherwise
253 int yy_bs_lineno
; /**< The line count. */
254 int yy_bs_column
; /**< The column count. */
256 /* Whether to try to fill the input buffer when we reach the
261 int yy_buffer_status
;
263 #define YY_BUFFER_NEW 0
264 #define YY_BUFFER_NORMAL 1
265 /* When an EOF's been seen but there's still some text to process
266 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
267 * shouldn't try reading from the input source any more. We might
268 * still have a bunch of tokens to match, though, because of
269 * possible backing-up.
271 * When we actually see the EOF, we change the status to "new"
272 * (via asmshader_restart()), so that the user can continue scanning by
273 * just pointing asmshader_in at a new input file.
275 #define YY_BUFFER_EOF_PENDING 2
278 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
280 /* Stack of input buffers. */
281 static size_t yy_buffer_stack_top
= 0; /**< index of top of stack. */
282 static size_t yy_buffer_stack_max
= 0; /**< capacity of stack. */
283 static YY_BUFFER_STATE
* yy_buffer_stack
= 0; /**< Stack as an array. */
285 /* We provide macros for accessing buffer states in case in the
286 * future we want to put the buffer states in a more general
289 * Returns the top of the stack, or NULL.
291 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
292 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
295 /* Same as previous macro, but useful when we know that the buffer stack is not
296 * NULL or when we need an lvalue. For internal use only.
298 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
300 /* yy_hold_char holds the character lost when asmshader_text is formed. */
301 static char yy_hold_char
;
302 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
305 /* Points to current character in buffer. */
306 static char *yy_c_buf_p
= (char *) 0;
307 static int yy_init
= 0; /* whether we need to initialize */
308 static int yy_start
= 0; /* start state number */
310 /* Flag which is used to allow asmshader_wrap()'s to do buffer switches
311 * instead of setting up a fresh asmshader_in. A bit of a hack ...
313 static int yy_did_buffer_switch_on_eof
;
315 void asmshader_restart (FILE *input_file
);
316 void asmshader__switch_to_buffer (YY_BUFFER_STATE new_buffer
);
317 YY_BUFFER_STATE
asmshader__create_buffer (FILE *file
,int size
);
318 void asmshader__delete_buffer (YY_BUFFER_STATE b
);
319 void asmshader__flush_buffer (YY_BUFFER_STATE b
);
320 void asmshader_push_buffer_state (YY_BUFFER_STATE new_buffer
);
321 void asmshader_pop_buffer_state (void );
323 static void asmshader_ensure_buffer_stack (void );
324 static void asmshader__load_buffer_state (void );
325 static void asmshader__init_buffer (YY_BUFFER_STATE b
,FILE *file
);
327 #define YY_FLUSH_BUFFER asmshader__flush_buffer(YY_CURRENT_BUFFER )
329 YY_BUFFER_STATE
asmshader__scan_buffer (char *base
,yy_size_t size
);
330 YY_BUFFER_STATE
asmshader__scan_string (yyconst
char *yy_str
);
331 YY_BUFFER_STATE
asmshader__scan_bytes (yyconst
char *bytes
,int len
);
333 void *asmshader_alloc (yy_size_t
);
334 void *asmshader_realloc (void *,yy_size_t
);
335 void asmshader_free (void * );
337 #define yy_new_buffer asmshader__create_buffer
339 #define yy_set_interactive(is_interactive) \
341 if ( ! YY_CURRENT_BUFFER ){ \
342 asmshader_ensure_buffer_stack (); \
343 YY_CURRENT_BUFFER_LVALUE = \
344 asmshader__create_buffer(asmshader_in,YY_BUF_SIZE ); \
346 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
349 #define yy_set_bol(at_bol) \
351 if ( ! YY_CURRENT_BUFFER ){\
352 asmshader_ensure_buffer_stack (); \
353 YY_CURRENT_BUFFER_LVALUE = \
354 asmshader__create_buffer(asmshader_in,YY_BUF_SIZE ); \
356 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
359 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
361 /* Begin user sect3 */
363 #define asmshader_wrap(n) 1
364 #define YY_SKIP_YYWRAP
366 typedef unsigned char YY_CHAR
;
368 FILE *asmshader_in
= (FILE *) 0, *asmshader_out
= (FILE *) 0;
370 typedef int yy_state_type
;
372 extern int asmshader_lineno
;
374 int asmshader_lineno
= 1;
376 extern char *asmshader_text
;
377 #define yytext_ptr asmshader_text
379 static yy_state_type
yy_get_previous_state (void );
380 static yy_state_type
yy_try_NUL_trans (yy_state_type current_state
);
381 static int yy_get_next_buffer (void );
382 static void yy_fatal_error (yyconst
char msg
[] );
384 /* Done after the current pattern has been matched and before the
385 * corresponding action - sets up asmshader_text.
387 #define YY_DO_BEFORE_ACTION \
388 (yytext_ptr) = yy_bp; \
389 asmshader_leng = (size_t) (yy_cp - yy_bp); \
390 (yy_hold_char) = *yy_cp; \
392 (yy_c_buf_p) = yy_cp;
394 #define YY_NUM_RULES 174
395 #define YY_END_OF_BUFFER 175
396 /* This struct is not used in this scanner,
397 but its presence is necessary. */
400 flex_int32_t yy_verify
;
403 static yyconst flex_int16_t yy_accept
[481] =
405 0, 0, 175, 173, 171, 172, 173, 149, 173, 141,
406 142, 143, 139, 140, 119, 173, 136, 170, 173, 120,
407 120, 88, 173, 173, 173, 120, 173, 173, 173, 173,
408 86, 173, 120, 173, 173, 87, 171, 172, 0, 168,
409 0, 136, 136, 169, 136, 136, 170, 0, 0, 0,
410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
411 0, 0, 0, 102, 103, 0, 0, 90, 0, 0,
412 88, 0, 0, 0, 0, 0, 0, 0, 0, 0,
413 0, 0, 0, 0, 89, 39, 105, 0, 0, 0,
414 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
416 0, 0, 0, 0, 0, 104, 0, 0, 0, 85,
417 0, 0, 0, 93, 0, 0, 0, 0, 0, 91,
418 0, 0, 87, 0, 0, 0, 169, 164, 165, 0,
419 0, 0, 0, 0, 0, 0, 124, 125, 126, 0,
420 147, 146, 134, 0, 132, 130, 133, 131, 135, 0,
421 0, 128, 0, 0, 0, 0, 0, 121, 122, 123,
422 15, 1, 78, 0, 0, 55, 54, 24, 33, 34,
423 0, 9, 10, 20, 79, 80, 0, 0, 16, 0,
424 22, 0, 52, 17, 0, 21, 0, 0, 5, 12,
425 11, 3, 6, 2, 26, 98, 97, 0, 0, 0,
427 0, 92, 0, 23, 0, 0, 7, 37, 47, 8,
428 0, 14, 25, 0, 13, 4, 60, 0, 0, 0,
429 0, 0, 148, 0, 0, 0, 145, 0, 0, 0,
430 0, 161, 0, 0, 0, 0, 127, 0, 0, 0,
431 0, 0, 44, 35, 36, 0, 40, 0, 0, 0,
432 18, 0, 0, 19, 46, 32, 31, 30, 29, 28,
433 53, 0, 95, 94, 96, 0, 0, 0, 0, 0,
434 0, 0, 50, 0, 0, 0, 0, 0, 0, 0,
435 0, 137, 0, 100, 0, 0, 0, 0, 0, 0,
436 144, 0, 0, 0, 0, 166, 0, 161, 0, 0,
438 0, 0, 0, 0, 0, 0, 42, 0, 0, 41,
439 0, 0, 138, 49, 0, 84, 0, 0, 0, 0,
440 0, 0, 0, 0, 0, 0, 0, 0, 0, 61,
441 0, 0, 101, 0, 0, 0, 0, 0, 0, 0,
442 0, 0, 160, 162, 0, 0, 154, 0, 0, 0,
443 0, 0, 43, 45, 56, 0, 38, 99, 111, 112,
444 113, 114, 115, 116, 117, 118, 27, 62, 0, 58,
445 0, 75, 0, 82, 83, 51, 81, 0, 0, 106,
446 107, 108, 109, 110, 0, 0, 0, 0, 160, 162,
447 153, 0, 154, 163, 0, 0, 0, 167, 48, 63,
449 0, 0, 0, 59, 0, 76, 0, 0, 0, 0,
450 0, 153, 0, 163, 156, 0, 0, 57, 77, 0,
451 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
452 157, 0, 0, 129, 150, 156, 0, 155, 73, 0,
453 0, 0, 0, 0, 0, 0, 64, 65, 0, 157,
454 0, 0, 150, 159, 0, 155, 0, 67, 68, 69,
455 0, 72, 0, 66, 0, 0, 159, 158, 0, 70,
456 0, 0, 151, 158, 74, 71, 152, 151, 152, 0
459 static yyconst flex_int32_t yy_ec
[256] =
461 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
462 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 2, 5, 1, 6, 1, 1, 1, 1, 7,
465 8, 1, 9, 10, 11, 12, 13, 14, 15, 16,
466 17, 18, 19, 19, 19, 20, 19, 1, 21, 1,
467 1, 1, 1, 1, 1, 1, 22, 23, 1, 24,
468 1, 1, 1, 1, 1, 25, 1, 1, 1, 26,
469 1, 1, 1, 27, 1, 1, 1, 1, 1, 1,
470 28, 1, 29, 1, 30, 1, 31, 32, 33, 34,
472 35, 36, 37, 38, 39, 1, 40, 41, 42, 43,
473 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
474 54, 55, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
481 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,
491 static yyconst flex_int32_t yy_meta
[56] =
493 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
494 1, 3, 1, 4, 4, 4, 4, 4, 4, 4,
495 1, 1, 1, 5, 1, 5, 1, 1, 1, 1,
496 6, 1, 7, 1, 8, 3, 1, 1, 9, 1,
497 1, 10, 10, 9, 1, 1, 11, 12, 1, 1,
501 static yyconst flex_int16_t yy_base
[491] =
503 0, 0, 889, 890, 886, 890, 884, 890, 883, 890,
504 890, 890, 890, 44, 51, 872, 45, 0, 67, 59,
505 39, 45, 61, 36, 64, 890, 107, 97, 114, 28,
506 151, 91, 107, 165, 43, 124, 882, 890, 880, 890,
507 172, 101, 193, 0, 202, 890, 0, 848, 847, 848,
508 108, 189, 179, 833, 834, 84, 103, 116, 182, 846,
509 99, 832, 178, 890, 890, 827, 840, 226, 831, 837,
510 233, 830, 825, 835, 820, 826, 830, 219, 205, 817,
511 830, 818, 821, 828, 246, 890, 253, 828, 810, 70,
512 813, 804, 803, 123, 812, 803, 812, 807, 809, 260,
514 267, 274, 806, 36, 276, 890, 818, 796, 193, 283,
515 802, 114, 800, 296, 796, 111, 801, 794, 810, 303,
516 788, 790, 310, 808, 794, 319, 0, 890, 890, 789,
517 301, 801, 819, 791, 792, 800, 890, 890, 890, 786,
518 890, 890, 890, 793, 890, 890, 890, 890, 890, 782,
519 780, 890, 788, 183, 783, 285, 784, 890, 890, 890,
520 890, 890, 890, 793, 782, 890, 890, 890, 890, 302,
521 791, 890, 890, 890, 890, 890, 786, 296, 775, 771,
522 890, 783, 890, 772, 771, 890, 239, 287, 890, 890,
523 890, 784, 890, 890, 890, 336, 890, 769, 776, 764,
525 763, 343, 762, 890, 291, 330, 890, 890, 890, 890,
526 764, 890, 890, 775, 890, 890, 332, 772, 773, 757,
527 352, 360, 890, 756, 759, 759, 890, 752, 756, 764,
528 749, 366, 755, 757, 740, 749, 890, 756, 744, 758,
529 740, 749, 745, 890, 890, 753, 890, 750, 741, 749,
530 890, 748, 741, 890, 890, 890, 890, 890, 890, 890,
531 890, 732, 890, 890, 890, 745, 767, 766, 765, 746,
532 745, 744, 890, 729, 737, 292, 158, 732, 736, 752,
533 733, 890, 732, 890, 754, 753, 752, 733, 732, 731,
534 890, 713, 725, 711, 710, 890, 718, 373, 724, 705,
536 718, 711, 716, 714, 705, 706, 702, 691, 711, 890,
537 700, 698, 890, 890, 704, 890, 380, 103, 727, 385,
538 148, 726, 691, 696, 693, 702, 690, 717, 692, 372,
539 679, 694, 890, 356, 391, 716, 393, 395, 715, 686,
540 371, 683, 410, 417, 685, 686, 435, 689, 670, 679,
541 665, 673, 890, 890, 890, 662, 890, 890, 890, 890,
542 890, 890, 890, 890, 890, 890, 890, 665, 658, 890,
543 652, 651, 657, 890, 890, 890, 890, 395, 681, 890,
544 890, 890, 890, 890, 665, 650, 657, 652, 442, 449,
545 456, 644, 463, 470, 638, 651, 635, 890, 890, 890,
547 647, 641, 640, 890, 457, 370, 461, 633, 639, 632,
548 634, 495, 624, 502, 509, 616, 630, 890, 890, 610,
549 616, 476, 470, 473, 458, 466, 452, 452, 465, 459,
550 516, 456, 457, 890, 523, 530, 449, 537, 890, 402,
551 412, 392, 409, 407, 388, 395, 890, 890, 407, 544,
552 405, 384, 551, 559, 373, 566, 367, 890, 890, 890,
553 381, 890, 343, 890, 313, 293, 573, 580, 302, 890,
554 195, 49, 587, 594, 890, 890, 601, 608, 615, 890,
555 635, 645, 649, 658, 666, 674, 682, 691, 699, 711
558 static yyconst flex_int16_t yy_def
[491] =
560 480, 1, 480, 480, 480, 480, 480, 480, 481, 480,
561 480, 480, 480, 480, 480, 480, 482, 483, 480, 480,
562 484, 485, 480, 480, 480, 480, 480, 486, 480, 480,
563 480, 480, 487, 480, 488, 489, 480, 480, 481, 480,
564 480, 482, 480, 490, 480, 480, 483, 480, 480, 480,
565 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
566 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
567 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
568 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
569 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
571 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
572 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
573 480, 480, 480, 480, 480, 480, 490, 480, 480, 480,
574 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
575 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
576 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
577 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
578 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
579 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
580 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
582 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
583 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
584 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
585 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
586 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
587 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
588 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
589 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
590 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
591 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
593 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
594 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
595 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
596 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
597 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
598 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
599 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
600 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
601 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
602 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
604 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
605 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
606 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
607 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
608 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
609 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
610 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
611 480, 480, 480, 480, 480, 480, 480, 480, 480, 0,
612 480, 480, 480, 480, 480, 480, 480, 480, 480, 480
615 static yyconst flex_int16_t yy_nxt
[946] =
617 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
618 14, 15, 16, 17, 17, 17, 17, 17, 17, 17,
619 18, 4, 4, 4, 4, 4, 4, 12, 12, 19,
620 20, 21, 22, 23, 24, 25, 26, 4, 27, 4,
621 28, 29, 30, 31, 32, 4, 33, 34, 35, 4,
622 36, 26, 26, 26, 26, 41, 45, 42, 42, 42,
623 42, 42, 42, 42, 43, 43, 43, 43, 43, 43,
624 43, 98, 64, 69, 99, 72, 80, 121, 81, 200,
625 46, 48, 49, 65, 201, 70, 73, 74, 82, 122,
626 66, 75, 67, 76, 83, 77, 477, 50, 51, 52,
628 53, 54, 55, 56, 106, 78, 184, 57, 79, 58,
629 84, 59, 45, 185, 60, 61, 364, 62, 145, 63,
630 85, 85, 85, 85, 85, 85, 85, 88, 107, 155,
631 92, 93, 146, 156, 108, 89, 46, 147, 109, 111,
632 90, 112, 86, 91, 94, 212, 131, 124, 132, 125,
633 149, 148, 95, 213, 113, 365, 189, 96, 208, 150,
634 133, 364, 209, 97, 100, 100, 100, 100, 100, 100,
635 100, 126, 101, 102, 103, 190, 104, 105, 114, 114,
636 114, 114, 114, 114, 114, 43, 43, 43, 43, 43,
637 43, 43, 327, 158, 137, 159, 138, 160, 139, 115,
639 365, 116, 328, 117, 205, 118, 43, 43, 43, 43,
640 43, 43, 43, 140, 119, 43, 43, 43, 43, 43,
641 43, 43, 206, 134, 236, 151, 152, 476, 46, 153,
642 141, 237, 135, 142, 171, 172, 173, 46, 136, 68,
643 68, 68, 68, 68, 68, 68, 71, 71, 71, 71,
644 71, 71, 71, 174, 256, 257, 258, 175, 176, 85,
645 85, 85, 85, 85, 85, 85, 87, 87, 87, 87,
646 87, 87, 87, 100, 100, 100, 100, 100, 100, 100,
647 196, 196, 196, 196, 196, 196, 196, 197, 197, 202,
648 202, 202, 202, 202, 202, 202, 110, 110, 110, 110,
650 110, 110, 110, 259, 260, 267, 268, 269, 198, 114,
651 114, 114, 114, 114, 114, 114, 120, 120, 120, 120,
652 120, 120, 120, 123, 123, 123, 123, 123, 123, 123,
653 221, 224, 239, 244, 248, 325, 249, 240, 326, 475,
654 245, 473, 250, 225, 270, 271, 272, 472, 222, 196,
655 196, 196, 196, 196, 196, 196, 202, 202, 202, 202,
656 202, 202, 202, 275, 276, 277, 285, 286, 287, 380,
657 381, 278, 279, 280, 288, 289, 290, 471, 281, 298,
658 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
659 298, 298, 298, 359, 360, 361, 362, 363, 359, 360,
661 361, 362, 363, 374, 382, 375, 380, 381, 382, 386,
662 405, 406, 376, 470, 424, 469, 377, 425, 426, 468,
663 427, 466, 387, 389, 389, 389, 389, 389, 389, 389,
664 390, 390, 390, 390, 390, 390, 390, 465, 464, 463,
665 462, 461, 460, 383, 459, 458, 457, 383, 393, 393,
666 393, 393, 393, 393, 393, 389, 389, 389, 389, 389,
667 389, 389, 390, 390, 390, 390, 390, 390, 390, 412,
668 412, 412, 412, 412, 412, 412, 393, 393, 393, 393,
669 393, 393, 393, 414, 414, 414, 414, 414, 414, 414,
670 421, 428, 455, 452, 451, 449, 448, 429, 447, 446,
672 445, 422, 444, 443, 442, 423, 441, 430, 412, 412,
673 412, 412, 412, 412, 412, 414, 414, 414, 414, 414,
674 414, 414, 436, 436, 436, 436, 436, 436, 436, 450,
675 450, 450, 450, 450, 450, 450, 453, 453, 453, 453,
676 453, 453, 453, 436, 436, 436, 436, 436, 436, 436,
677 456, 456, 456, 456, 456, 456, 456, 450, 450, 450,
678 450, 450, 450, 450, 453, 453, 453, 453, 453, 453,
679 453, 454, 467, 467, 467, 467, 467, 467, 467, 456,
680 456, 456, 456, 456, 456, 456, 467, 467, 467, 467,
681 467, 467, 467, 474, 474, 474, 474, 474, 474, 474,
683 478, 478, 478, 478, 478, 478, 478, 474, 474, 474,
684 474, 474, 474, 474, 479, 479, 479, 479, 479, 479,
685 479, 478, 478, 478, 478, 478, 478, 478, 479, 479,
686 479, 479, 479, 479, 479, 39, 39, 39, 39, 39,
687 39, 39, 39, 39, 39, 39, 39, 42, 42, 47,
688 440, 47, 47, 47, 47, 47, 47, 47, 47, 47,
689 47, 68, 439, 438, 437, 68, 435, 434, 68, 71,
690 433, 71, 432, 431, 420, 71, 71, 87, 419, 87,
691 418, 417, 87, 416, 87, 110, 415, 413, 110, 110,
692 411, 410, 409, 110, 120, 408, 407, 404, 120, 403,
694 402, 120, 123, 123, 401, 400, 399, 398, 397, 396,
695 123, 127, 395, 127, 127, 127, 127, 127, 127, 127,
696 127, 127, 127, 394, 392, 391, 388, 385, 384, 384,
697 379, 378, 373, 372, 371, 370, 369, 368, 367, 366,
698 366, 358, 357, 356, 355, 354, 353, 352, 351, 350,
699 349, 348, 347, 346, 345, 344, 343, 342, 341, 340,
700 339, 338, 337, 336, 335, 334, 333, 332, 331, 330,
701 329, 324, 323, 322, 321, 320, 319, 318, 317, 316,
702 315, 314, 313, 312, 311, 310, 309, 308, 307, 306,
703 305, 304, 303, 302, 301, 300, 299, 297, 296, 295,
705 294, 293, 292, 291, 284, 283, 282, 274, 273, 266,
706 265, 264, 263, 262, 261, 255, 254, 253, 252, 251,
707 247, 246, 243, 242, 241, 238, 235, 234, 233, 232,
708 231, 230, 229, 228, 227, 226, 223, 220, 219, 218,
709 217, 216, 215, 214, 211, 210, 207, 204, 203, 199,
710 195, 194, 193, 192, 191, 188, 187, 186, 183, 182,
711 181, 180, 179, 178, 177, 170, 169, 168, 167, 166,
712 165, 164, 163, 162, 161, 157, 154, 144, 143, 130,
713 129, 128, 40, 37, 44, 40, 38, 37, 480, 3,
714 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
716 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
717 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
718 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
719 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
720 480, 480, 480, 480, 480
723 static yyconst flex_int16_t yy_chk
[946] =
725 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
726 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
727 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
728 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
729 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
730 1, 1, 1, 1, 1, 14, 17, 14, 14, 14,
731 14, 14, 14, 14, 15, 15, 15, 15, 15, 15,
732 15, 30, 20, 21, 30, 22, 24, 35, 24, 104,
733 17, 19, 19, 20, 104, 21, 22, 22, 24, 35,
734 20, 22, 20, 23, 25, 23, 472, 19, 19, 19,
736 19, 19, 19, 19, 32, 23, 90, 19, 23, 19,
737 25, 19, 42, 90, 19, 19, 318, 19, 56, 19,
738 27, 27, 27, 27, 27, 27, 27, 28, 32, 61,
739 29, 29, 56, 61, 32, 28, 42, 57, 32, 33,
740 28, 33, 27, 28, 29, 116, 51, 36, 51, 36,
741 58, 57, 29, 116, 33, 318, 94, 29, 112, 58,
742 51, 321, 112, 29, 31, 31, 31, 31, 31, 31,
743 31, 36, 31, 31, 31, 94, 31, 31, 34, 34,
744 34, 34, 34, 34, 34, 41, 41, 41, 41, 41,
745 41, 41, 277, 63, 53, 63, 53, 63, 53, 34,
747 321, 34, 277, 34, 109, 34, 43, 43, 43, 43,
748 43, 43, 43, 53, 34, 45, 45, 45, 45, 45,
749 45, 45, 109, 52, 154, 59, 59, 471, 43, 59,
750 53, 154, 52, 53, 78, 78, 78, 45, 52, 68,
751 68, 68, 68, 68, 68, 68, 71, 71, 71, 71,
752 71, 71, 71, 79, 187, 187, 187, 79, 79, 85,
753 85, 85, 85, 85, 85, 85, 87, 87, 87, 87,
754 87, 87, 87, 100, 100, 100, 100, 100, 100, 100,
755 101, 101, 101, 101, 101, 101, 101, 102, 102, 105,
756 105, 105, 105, 105, 105, 105, 110, 110, 110, 110,
758 110, 110, 110, 188, 188, 205, 205, 205, 102, 114,
759 114, 114, 114, 114, 114, 114, 120, 120, 120, 120,
760 120, 120, 120, 123, 123, 123, 123, 123, 123, 123,
761 126, 131, 156, 170, 178, 276, 178, 156, 276, 469,
762 170, 466, 178, 131, 206, 206, 206, 465, 126, 196,
763 196, 196, 196, 196, 196, 196, 202, 202, 202, 202,
764 202, 202, 202, 217, 217, 217, 221, 221, 221, 334,
765 334, 217, 217, 217, 222, 222, 222, 463, 217, 232,
766 232, 232, 232, 232, 232, 232, 298, 298, 298, 298,
767 298, 298, 298, 317, 317, 317, 317, 317, 320, 320,
769 320, 320, 320, 330, 335, 330, 337, 337, 338, 341,
770 378, 378, 330, 461, 406, 457, 330, 406, 406, 455,
771 406, 452, 341, 343, 343, 343, 343, 343, 343, 343,
772 344, 344, 344, 344, 344, 344, 344, 451, 449, 446,
773 445, 444, 443, 335, 442, 441, 440, 338, 347, 347,
774 347, 347, 347, 347, 347, 389, 389, 389, 389, 389,
775 389, 389, 390, 390, 390, 390, 390, 390, 390, 391,
776 391, 391, 391, 391, 391, 391, 393, 393, 393, 393,
777 393, 393, 393, 394, 394, 394, 394, 394, 394, 394,
778 405, 407, 437, 433, 432, 430, 429, 407, 428, 427,
780 426, 405, 425, 424, 423, 405, 422, 407, 412, 412,
781 412, 412, 412, 412, 412, 414, 414, 414, 414, 414,
782 414, 414, 415, 415, 415, 415, 415, 415, 415, 431,
783 431, 431, 431, 431, 431, 431, 435, 435, 435, 435,
784 435, 435, 435, 436, 436, 436, 436, 436, 436, 436,
785 438, 438, 438, 438, 438, 438, 438, 450, 450, 450,
786 450, 450, 450, 450, 453, 453, 453, 453, 453, 453,
787 453, 435, 454, 454, 454, 454, 454, 454, 454, 456,
788 456, 456, 456, 456, 456, 456, 467, 467, 467, 467,
789 467, 467, 467, 468, 468, 468, 468, 468, 468, 468,
791 473, 473, 473, 473, 473, 473, 473, 474, 474, 474,
792 474, 474, 474, 474, 477, 477, 477, 477, 477, 477,
793 477, 478, 478, 478, 478, 478, 478, 478, 479, 479,
794 479, 479, 479, 479, 479, 481, 481, 481, 481, 481,
795 481, 481, 481, 481, 481, 481, 481, 482, 482, 483,
796 421, 483, 483, 483, 483, 483, 483, 483, 483, 483,
797 483, 484, 420, 417, 416, 484, 413, 411, 484, 485,
798 410, 485, 409, 408, 403, 485, 485, 486, 402, 486,
799 401, 397, 486, 396, 486, 487, 395, 392, 487, 487,
800 388, 387, 386, 487, 488, 385, 379, 373, 488, 372,
802 371, 488, 489, 489, 369, 368, 356, 352, 351, 350,
803 489, 490, 349, 490, 490, 490, 490, 490, 490, 490,
804 490, 490, 490, 348, 346, 345, 342, 340, 339, 336,
805 332, 331, 329, 328, 327, 326, 325, 324, 323, 322,
806 319, 315, 312, 311, 309, 308, 307, 306, 305, 304,
807 303, 302, 301, 300, 299, 297, 295, 294, 293, 292,
808 290, 289, 288, 287, 286, 285, 283, 281, 280, 279,
809 278, 275, 274, 272, 271, 270, 269, 268, 267, 266,
810 262, 253, 252, 250, 249, 248, 246, 243, 242, 241,
811 240, 239, 238, 236, 235, 234, 233, 231, 230, 229,
813 228, 226, 225, 224, 220, 219, 218, 214, 211, 203,
814 201, 200, 199, 198, 192, 185, 184, 182, 180, 179,
815 177, 171, 165, 164, 157, 155, 153, 151, 150, 144,
816 140, 136, 135, 134, 133, 132, 130, 125, 124, 122,
817 121, 119, 118, 117, 115, 113, 111, 108, 107, 103,
818 99, 98, 97, 96, 95, 93, 92, 91, 89, 88,
819 84, 83, 82, 81, 80, 77, 76, 75, 74, 73,
820 72, 70, 69, 67, 66, 62, 60, 55, 54, 50,
821 49, 48, 39, 37, 16, 9, 7, 5, 3, 480,
822 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
824 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
825 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
826 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
827 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
828 480, 480, 480, 480, 480
831 static yy_state_type yy_last_accepting_state
;
832 static char *yy_last_accepting_cpos
;
834 extern int asmshader__flex_debug
;
835 int asmshader__flex_debug
= 0;
837 /* The intent behind this definition is that it'll catch
838 * any uses of REJECT which flex missed.
840 #define REJECT reject_used_but_not_detected
841 #define yymore() yymore_used_but_not_detected
842 #define YY_MORE_ADJ 0
843 #define YY_RESTORE_YY_MORE_OFFSET
844 char *asmshader_text
;
845 #line 1 "asmshader.l"
847 * Direct3D shader assembler
849 * Copyright 2008 Stefan Dösinger
850 * Copyright 2009 Matteo Bruni
852 * This library is free software; you can redistribute it and/or
853 * modify it under the terms of the GNU Lesser General Public
854 * License as published by the Free Software Foundation; either
855 * version 2.1 of the License, or (at your option) any later version.
857 * This library is distributed in the hope that it will be useful,
858 * but WITHOUT ANY WARRANTY; without even the implied warranty of
859 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
860 * Lesser General Public License for more details.
862 * You should have received a copy of the GNU Lesser General Public
863 * License along with this library; if not, write to the Free Software
864 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
866 #line 23 "asmshader.l"
868 #include "wine/port.h"
869 #include "wine/debug.h"
871 #include "d3dcompiler_private.h"
872 #include "asmshader.tab.h"
874 WINE_DEFAULT_DEBUG_CHANNEL(asmshader
);
875 #define YY_NO_INPUT 1
876 /* Swizzles and writemasks consist of a dot and up to 4 x, y, z or w characters,
877 * or up to 4 a, r, g, b characters. There are different rules for swizzles and
878 * writemasks wrt repetition, those are handled in the grammar.
881 /* for relative addressing in the form o[x], v[x] and c[x] */
882 /* Not really a register, but it is considered as such */
884 /* Whitespaces are spaces, tabs and newlines */
885 #line 886 "asmshader.yy.c"
889 #ifndef YY_NO_UNISTD_H
890 /* Special case for "unistd.h", since it is non-ANSI. We include it way
891 * down here because we want the user's section 1 to have been scanned first.
892 * The user has a chance to override it with an option.
897 #ifndef YY_EXTRA_TYPE
898 #define YY_EXTRA_TYPE void *
901 static int yy_init_globals (void );
903 /* Accessor methods to globals.
904 These are made visible to non-reentrant scanners for convenience. */
906 int asmshader_lex_destroy (void );
908 int asmshader_get_debug (void );
910 void asmshader_set_debug (int debug_flag
);
912 YY_EXTRA_TYPE
asmshader_get_extra (void );
914 void asmshader_set_extra (YY_EXTRA_TYPE user_defined
);
916 FILE *asmshader_get_in (void );
918 void asmshader_set_in (FILE * in_str
);
920 FILE *asmshader_get_out (void );
922 void asmshader_set_out (FILE * out_str
);
924 int asmshader_get_leng (void );
926 char *asmshader_get_text (void );
928 int asmshader_get_lineno (void );
930 void asmshader_set_lineno (int line_number
);
932 /* Macros after this point can all be overridden by user definitions in
936 #ifndef YY_SKIP_YYWRAP
938 extern "C" int asmshader_wrap (void );
940 extern int asmshader_wrap (void );
945 static void yy_flex_strncpy (char *,yyconst
char *,int );
948 #ifdef YY_NEED_STRLEN
949 static int yy_flex_strlen (yyconst
char * );
955 static int yyinput (void );
957 static int input (void );
962 /* Amount of stuff to slurp up with each read. */
963 #ifndef YY_READ_BUF_SIZE
965 /* On IA-64, the buffer size is 16k, not 8k */
966 #define YY_READ_BUF_SIZE 16384
968 #define YY_READ_BUF_SIZE 8192
969 #endif /* __ia64__ */
972 /* Copy whatever the last rule matched to the standard output. */
974 /* This used to be an fputs(), but since the string might contain NUL's,
975 * we now use fwrite().
977 #define ECHO do { if (fwrite( asmshader_text, asmshader_leng, 1, asmshader_out )) {} } while (0)
980 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
981 * is returned in "result".
984 #define YY_INPUT(buf,result,max_size) \
985 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
989 for ( n = 0; n < max_size && \
990 (c = getc( asmshader_in )) != EOF && c != '\n'; ++n ) \
993 buf[n++] = (char) c; \
994 if ( c == EOF && ferror( asmshader_in ) ) \
995 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1001 while ( (result = fread(buf, 1, max_size, asmshader_in))==0 && ferror(asmshader_in)) \
1003 if( errno != EINTR) \
1005 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1009 clearerr(asmshader_in); \
1016 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1017 * we don't want an extra ';' after the "return" because that will cause
1018 * some compilers to complain about unreachable statements.
1021 #define yyterminate() return YY_NULL
1024 /* Number of entries by which start-condition stack grows. */
1025 #ifndef YY_START_STACK_INCR
1026 #define YY_START_STACK_INCR 25
1029 /* Report a fatal error. */
1030 #ifndef YY_FATAL_ERROR
1031 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1034 /* end tables serialization structures and prototypes */
1036 /* Default declaration of generated scanner - a define so the user can
1037 * easily add parameters.
1040 #define YY_DECL_IS_OURS 1
1042 extern int asmshader_lex (void);
1044 #define YY_DECL int asmshader_lex (void)
1045 #endif /* !YY_DECL */
1047 /* Code executed at the beginning of each rule, after asmshader_text and asmshader_leng
1050 #ifndef YY_USER_ACTION
1051 #define YY_USER_ACTION
1054 /* Code executed at the end of each rule. */
1056 #define YY_BREAK break;
1059 #define YY_RULE_SETUP \
1062 /** The main scanner function which does all the work.
1066 register yy_state_type yy_current_state
;
1067 register char *yy_cp
, *yy_bp
;
1068 register int yy_act
;
1070 #line 105 "asmshader.l"
1073 /* Common instructions(vertex and pixel shaders) */
1074 #line 1075 "asmshader.yy.c"
1085 (yy_start
) = 1; /* first start state */
1087 if ( ! asmshader_in
)
1088 asmshader_in
= stdin
;
1090 if ( ! asmshader_out
)
1091 asmshader_out
= stdout
;
1093 if ( ! YY_CURRENT_BUFFER
) {
1094 asmshader_ensure_buffer_stack ();
1095 YY_CURRENT_BUFFER_LVALUE
=
1096 asmshader__create_buffer(asmshader_in
,YY_BUF_SIZE
);
1099 asmshader__load_buffer_state( );
1102 while ( 1 ) /* loops until end-of-file is reached */
1104 yy_cp
= (yy_c_buf_p
);
1106 /* Support of asmshader_text. */
1107 *yy_cp
= (yy_hold_char
);
1109 /* yy_bp points to the position in yy_ch_buf of the start of
1114 yy_current_state
= (yy_start
);
1118 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
1119 if ( yy_accept
[yy_current_state
] )
1121 (yy_last_accepting_state
) = yy_current_state
;
1122 (yy_last_accepting_cpos
) = yy_cp
;
1124 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1126 yy_current_state
= (int) yy_def
[yy_current_state
];
1127 if ( yy_current_state
>= 481 )
1128 yy_c
= yy_meta
[(unsigned int) yy_c
];
1130 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1133 while ( yy_current_state
!= 480 );
1134 yy_cp
= (yy_last_accepting_cpos
);
1135 yy_current_state
= (yy_last_accepting_state
);
1138 yy_act
= yy_accept
[yy_current_state
];
1140 YY_DO_BEFORE_ACTION
;
1142 do_action
: /* This label is used only to access EOF actions. */
1145 { /* beginning of action switch */
1146 case 0: /* must back up */
1147 /* undo the effects of YY_DO_BEFORE_ACTION */
1148 *yy_cp
= (yy_hold_char
);
1149 yy_cp
= (yy_last_accepting_cpos
);
1150 yy_current_state
= (yy_last_accepting_state
);
1151 goto yy_find_action
;
1155 #line 108 "asmshader.l"
1156 {return INSTR_ADD
; }
1160 #line 109 "asmshader.l"
1161 {return INSTR_NOP
; }
1165 #line 110 "asmshader.l"
1166 {return INSTR_MOV
; }
1170 #line 111 "asmshader.l"
1171 {return INSTR_SUB
; }
1175 #line 112 "asmshader.l"
1176 {return INSTR_MAD
; }
1180 #line 113 "asmshader.l"
1181 {return INSTR_MUL
; }
1185 #line 114 "asmshader.l"
1186 {return INSTR_RCP
; }
1190 #line 115 "asmshader.l"
1191 {return INSTR_RSQ
; }
1195 #line 116 "asmshader.l"
1196 {return INSTR_DP3
; }
1200 #line 117 "asmshader.l"
1201 {return INSTR_DP4
; }
1205 #line 118 "asmshader.l"
1206 {return INSTR_MIN
; }
1210 #line 119 "asmshader.l"
1211 {return INSTR_MAX
; }
1215 #line 120 "asmshader.l"
1216 {return INSTR_SLT
; }
1220 #line 121 "asmshader.l"
1221 {return INSTR_SGE
; }
1225 #line 122 "asmshader.l"
1226 {return INSTR_ABS
; }
1230 #line 123 "asmshader.l"
1231 {return INSTR_EXP
; }
1235 #line 124 "asmshader.l"
1236 {return INSTR_LOG
; }
1240 #line 125 "asmshader.l"
1241 {return INSTR_EXPP
; }
1245 #line 126 "asmshader.l"
1246 {return INSTR_LOGP
; }
1250 #line 127 "asmshader.l"
1251 {return INSTR_DST
; }
1255 #line 128 "asmshader.l"
1256 {return INSTR_LRP
; }
1260 #line 129 "asmshader.l"
1261 {return INSTR_FRC
; }
1265 #line 130 "asmshader.l"
1266 {return INSTR_POW
; }
1270 #line 131 "asmshader.l"
1271 {return INSTR_CRS
; }
1275 #line 132 "asmshader.l"
1276 {return INSTR_SGN
; }
1280 #line 133 "asmshader.l"
1281 {return INSTR_NRM
; }
1285 #line 134 "asmshader.l"
1286 {return INSTR_SINCOS
; }
1290 #line 135 "asmshader.l"
1291 {return INSTR_M4x4
; }
1295 #line 136 "asmshader.l"
1296 {return INSTR_M4x3
; }
1300 #line 137 "asmshader.l"
1301 {return INSTR_M3x4
; }
1305 #line 138 "asmshader.l"
1306 {return INSTR_M3x3
; }
1310 #line 139 "asmshader.l"
1311 {return INSTR_M3x2
; }
1315 #line 140 "asmshader.l"
1316 {return INSTR_DCL
; }
1320 #line 141 "asmshader.l"
1321 {return INSTR_DEF
; }
1325 #line 142 "asmshader.l"
1326 {return INSTR_DEFB
; }
1330 #line 143 "asmshader.l"
1331 {return INSTR_DEFI
; }
1335 #line 144 "asmshader.l"
1336 {return INSTR_REP
; }
1340 #line 145 "asmshader.l"
1341 {return INSTR_ENDREP
; }
1345 #line 146 "asmshader.l"
1350 #line 147 "asmshader.l"
1351 {return INSTR_ELSE
; }
1355 #line 148 "asmshader.l"
1356 {return INSTR_ENDIF
; }
1360 #line 149 "asmshader.l"
1361 {return INSTR_BREAK
; }
1365 #line 150 "asmshader.l"
1366 {return INSTR_BREAKP
; }
1370 #line 151 "asmshader.l"
1371 {return INSTR_CALL
; }
1375 #line 152 "asmshader.l"
1376 {return INSTR_CALLNZ
; }
1380 #line 153 "asmshader.l"
1381 {return INSTR_LOOP
; }
1385 #line 154 "asmshader.l"
1386 {return INSTR_RET
; }
1390 #line 155 "asmshader.l"
1391 {return INSTR_ENDLOOP
; }
1395 #line 156 "asmshader.l"
1396 {return INSTR_LABEL
; }
1400 #line 157 "asmshader.l"
1401 {return INSTR_SETP
; }
1405 #line 158 "asmshader.l"
1406 {return INSTR_TEXLDL
; }
1408 /* Vertex shader only instructions */
1411 #line 161 "asmshader.l"
1412 {return INSTR_LIT
; }
1416 #line 162 "asmshader.l"
1417 {return INSTR_MOVA
; }
1419 /* Pixel shader only instructions */
1422 #line 165 "asmshader.l"
1423 {return INSTR_CND
; }
1427 #line 166 "asmshader.l"
1428 {return INSTR_CMP
; }
1432 #line 167 "asmshader.l"
1433 {return INSTR_DP2ADD
; }
1437 #line 168 "asmshader.l"
1438 {return INSTR_TEXCOORD
; }
1442 #line 169 "asmshader.l"
1443 {return INSTR_TEXCRD
; }
1447 #line 170 "asmshader.l"
1448 {return INSTR_TEXKILL
; }
1452 #line 171 "asmshader.l"
1453 {return INSTR_TEX
; }
1457 #line 172 "asmshader.l"
1458 {return INSTR_TEXLD
; }
1462 #line 173 "asmshader.l"
1463 {return INSTR_TEXBEM
; }
1467 #line 174 "asmshader.l"
1468 {return INSTR_TEXBEML
; }
1472 #line 175 "asmshader.l"
1473 {return INSTR_TEXREG2AR
; }
1477 #line 176 "asmshader.l"
1478 {return INSTR_TEXREG2GB
; }
1482 #line 177 "asmshader.l"
1483 {return INSTR_TEXREG2RGB
; }
1487 #line 178 "asmshader.l"
1488 {return INSTR_TEXM3x2PAD
; }
1492 #line 179 "asmshader.l"
1493 {return INSTR_TEXM3x2TEX
; }
1497 #line 180 "asmshader.l"
1498 {return INSTR_TEXM3x3PAD
; }
1502 #line 181 "asmshader.l"
1503 {return INSTR_TEXM3x3SPEC
; }
1507 #line 182 "asmshader.l"
1508 {return INSTR_TEXM3x3VSPEC
; }
1512 #line 183 "asmshader.l"
1513 {return INSTR_TEXM3x3TEX
; }
1517 #line 184 "asmshader.l"
1518 {return INSTR_TEXDP3TEX
; }
1522 #line 185 "asmshader.l"
1523 {return INSTR_TEXM3x2DEPTH
; }
1527 #line 186 "asmshader.l"
1528 {return INSTR_TEXDP3
; }
1532 #line 187 "asmshader.l"
1533 {return INSTR_TEXM3x3
; }
1537 #line 188 "asmshader.l"
1538 {return INSTR_TEXDEPTH
; }
1542 #line 189 "asmshader.l"
1543 {return INSTR_BEM
; }
1547 #line 190 "asmshader.l"
1548 {return INSTR_DSX
; }
1552 #line 191 "asmshader.l"
1553 {return INSTR_DSY
; }
1557 #line 192 "asmshader.l"
1558 {return INSTR_TEXLDP
; }
1562 #line 193 "asmshader.l"
1563 {return INSTR_TEXLDB
; }
1567 #line 194 "asmshader.l"
1568 {return INSTR_TEXLDD
; }
1572 #line 195 "asmshader.l"
1573 {return INSTR_PHASE
; }
1577 #line 197 "asmshader.l"
1579 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1585 #line 201 "asmshader.l"
1587 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1593 #line 205 "asmshader.l"
1595 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1601 #line 209 "asmshader.l"
1603 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1604 return REG_CONSTFLOAT
;
1609 #line 213 "asmshader.l"
1611 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1612 return REG_CONSTINT
;
1617 #line 217 "asmshader.l"
1619 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1620 return REG_CONSTBOOL
;
1625 #line 221 "asmshader.l"
1627 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1633 #line 225 "asmshader.l"
1635 asmshader_lval
.regnum
= atoi(asmshader_text
+ 2);
1636 return REG_TEXCRDOUT
;
1641 #line 229 "asmshader.l"
1643 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1649 #line 233 "asmshader.l"
1654 #line 234 "asmshader.l"
1659 #line 235 "asmshader.l"
1664 #line 236 "asmshader.l"
1666 asmshader_lval
.regnum
= atoi(asmshader_text
+ 2);
1667 return REG_VERTEXCOLOR
;
1672 #line 240 "asmshader.l"
1674 asmshader_lval
.regnum
= atoi(asmshader_text
+ 2);
1675 return REG_FRAGCOLOR
;
1680 #line 244 "asmshader.l"
1681 {return REG_FRAGDEPTH
; }
1685 #line 245 "asmshader.l"
1690 #line 246 "asmshader.l"
1691 {return REG_VFACE
; }
1695 #line 247 "asmshader.l"
1696 {return REG_ADDRESS
; }
1700 #line 248 "asmshader.l"
1705 #line 249 "asmshader.l"
1706 {return REG_PREDICATE
; }
1710 #line 251 "asmshader.l"
1712 asmshader_lval
.regnum
= atoi(asmshader_text
+ 1);
1716 /* Shader versions. These are important to select the correct
1721 #line 259 "asmshader.l"
1726 #line 260 "asmshader.l"
1731 #line 262 "asmshader.l"
1736 #line 263 "asmshader.l"
1741 #line 264 "asmshader.l"
1746 #line 266 "asmshader.l"
1751 #line 267 "asmshader.l"
1756 #line 268 "asmshader.l"
1761 #line 269 "asmshader.l"
1766 #line 270 "asmshader.l"
1771 #line 272 "asmshader.l"
1776 #line 273 "asmshader.l"
1781 #line 274 "asmshader.l"
1786 #line 276 "asmshader.l"
1787 {return asmshader_text
[0]; }
1791 #line 277 "asmshader.l"
1793 switch(asmshader_text
[0]) {
1796 asmshader_lval
.component
= 0;
1800 asmshader_lval
.component
= 1;
1804 asmshader_lval
.component
= 2;
1808 asmshader_lval
.component
= 3;
1814 /* Output modifiers */
1817 #line 300 "asmshader.l"
1822 #line 301 "asmshader.l"
1827 #line 302 "asmshader.l"
1832 #line 303 "asmshader.l"
1837 #line 304 "asmshader.l"
1842 #line 305 "asmshader.l"
1847 #line 306 "asmshader.l"
1852 #line 307 "asmshader.l"
1857 #line 308 "asmshader.l"
1858 {return MOD_CENTROID
; }
1860 /* compare params */
1863 #line 311 "asmshader.l"
1868 #line 312 "asmshader.l"
1873 #line 313 "asmshader.l"
1878 #line 314 "asmshader.l"
1883 #line 315 "asmshader.l"
1888 #line 316 "asmshader.l"
1893 #line 318 "asmshader.l"
1895 asmshader_lval
.immval
.val
= atof(asmshader_text
);
1896 asmshader_lval
.immval
.integer
= ((strstr(asmshader_text
, ".") == NULL
) && (strstr(asmshader_text
, "f") == NULL
));
1902 #line 323 "asmshader.l"
1904 asmshader_lval
.immbool
= TRUE
;
1910 #line 327 "asmshader.l"
1912 asmshader_lval
.immbool
= FALSE
;
1918 #line 332 "asmshader.l"
1919 {return asmshader_text
[0]; }
1923 #line 333 "asmshader.l"
1924 {return asmshader_text
[0]; }
1928 #line 334 "asmshader.l"
1929 {return asmshader_text
[0]; }
1933 #line 335 "asmshader.l"
1934 {return asmshader_text
[0]; }
1936 /* for relative addressing */
1939 #line 338 "asmshader.l"
1940 {return asmshader_text
[0]; }
1944 #line 340 "asmshader.l"
1945 {return SMOD_BIAS
; }
1947 /* No _x2 here; it is identical to MOD_X2 */
1950 #line 342 "asmshader.l"
1951 {return SMOD_SCALEBIAS
; }
1955 #line 343 "asmshader.l"
1960 #line 344 "asmshader.l"
1965 #line 345 "asmshader.l"
1970 #line 347 "asmshader.l"
1975 #line 349 "asmshader.l"
1977 if(asmshader_text
[strlen("_position")] == '\0') {
1978 asmshader_lval
.regnum
= 0;
1980 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_position"));
1982 return USAGE_POSITION
;
1987 #line 357 "asmshader.l"
1989 if(asmshader_text
[strlen("_blendweight")] == '\0') {
1990 asmshader_lval
.regnum
= 0;
1992 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_blendweight"));
1994 return USAGE_BLENDWEIGHT
;
1999 #line 365 "asmshader.l"
2001 if(asmshader_text
[strlen("_blendindices")] == '\0') {
2002 asmshader_lval
.regnum
= 0;
2004 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_blendindices"));
2006 return USAGE_BLENDINDICES
;
2011 #line 373 "asmshader.l"
2013 if(asmshader_text
[strlen("_normal")] == '\0') {
2014 asmshader_lval
.regnum
= 0;
2016 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_normal"));
2018 return USAGE_NORMAL
;
2023 #line 381 "asmshader.l"
2025 if(asmshader_text
[strlen("_psize")] == '\0') {
2026 asmshader_lval
.regnum
= 0;
2028 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_psize"));
2035 #line 389 "asmshader.l"
2037 if(asmshader_text
[strlen("_texcoord")] == '\0') {
2038 asmshader_lval
.regnum
= 0;
2040 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_texcoord"));
2042 return USAGE_TEXCOORD
;
2047 #line 397 "asmshader.l"
2049 if(asmshader_text
[strlen("_tangent")] == '\0') {
2050 asmshader_lval
.regnum
= 0;
2052 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_tangent"));
2054 return USAGE_TANGENT
;
2059 #line 405 "asmshader.l"
2061 if(asmshader_text
[strlen("_binormal")] == '\0') {
2062 asmshader_lval
.regnum
= 0;
2064 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_binormal"));
2066 return USAGE_BINORMAL
;
2071 #line 413 "asmshader.l"
2073 if(asmshader_text
[strlen("_tessfactor")] == '\0') {
2074 asmshader_lval
.regnum
= 0;
2076 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_tessfactor"));
2078 return USAGE_TESSFACTOR
;
2083 #line 421 "asmshader.l"
2085 if(asmshader_text
[strlen("_positiont")] == '\0') {
2086 asmshader_lval
.regnum
= 0;
2088 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_positiont"));
2090 return USAGE_POSITIONT
;
2095 #line 429 "asmshader.l"
2097 if(asmshader_text
[strlen("_color")] == '\0') {
2098 asmshader_lval
.regnum
= 0;
2100 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_color"));
2107 #line 437 "asmshader.l"
2109 if(asmshader_text
[strlen("_fog")] == '\0') {
2110 asmshader_lval
.regnum
= 0;
2112 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_fog"));
2119 #line 445 "asmshader.l"
2121 if(asmshader_text
[strlen("_depth")] == '\0') {
2122 asmshader_lval
.regnum
= 0;
2124 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_depth"));
2131 #line 453 "asmshader.l"
2133 if(asmshader_text
[strlen("_sample")] == '\0') {
2134 asmshader_lval
.regnum
= 0;
2136 asmshader_lval
.regnum
= atoi(asmshader_text
+ strlen("_sample"));
2138 return USAGE_SAMPLE
;
2143 #line 462 "asmshader.l"
2144 { return SAMPTYPE_1D
; }
2148 #line 463 "asmshader.l"
2149 { return SAMPTYPE_2D
; }
2153 #line 464 "asmshader.l"
2154 { return SAMPTYPE_CUBE
; }
2158 #line 465 "asmshader.l"
2159 { return SAMPTYPE_VOLUME
; }
2162 /* rule 168 can match eol */
2164 #line 467 "asmshader.l"
2166 /* TODO: update current line information */
2167 TRACE("line info update: %s", asmshader_text
);
2173 #line 473 "asmshader.l"
2178 #line 474 "asmshader.l"
2183 #line 476 "asmshader.l"
2184 { /* Do nothing */ }
2187 /* rule 172 can match eol */
2189 #line 477 "asmshader.l"
2196 #line 481 "asmshader.l"
2198 asmparser_message(&asm_ctx
, "Line %u: Unexpected input %s\n", asm_ctx
.line_no
, asmshader_text
);
2199 set_parse_status(&asm_ctx
.status
, PARSE_ERR
);
2204 #line 486 "asmshader.l"
2207 #line 2208 "asmshader.yy.c"
2208 case YY_STATE_EOF(INITIAL
):
2211 case YY_END_OF_BUFFER
:
2213 /* Amount of text matched not including the EOB char. */
2214 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
2216 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2217 *yy_cp
= (yy_hold_char
);
2218 YY_RESTORE_YY_MORE_OFFSET
2220 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
2222 /* We're scanning a new file or input source. It's
2223 * possible that this happened because the user
2224 * just pointed asmshader_in at a new source and called
2225 * asmshader_lex(). If so, then we have to assure
2226 * consistency between YY_CURRENT_BUFFER and our
2227 * globals. Here is the right place to do so, because
2228 * this is the first action (other than possibly a
2229 * back-up) that will match for the new input source.
2231 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2232 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= asmshader_in
;
2233 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
2236 /* Note that here we test for yy_c_buf_p "<=" to the position
2237 * of the first EOB in the buffer, since yy_c_buf_p will
2238 * already have been incremented past the NUL character
2239 * (since all states make transitions on EOB to the
2240 * end-of-buffer state). Contrast this with the test
2243 if ( (yy_c_buf_p
) <= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
2244 { /* This was really a NUL. */
2245 yy_state_type yy_next_state
;
2247 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
2249 yy_current_state
= yy_get_previous_state( );
2251 /* Okay, we're now positioned to make the NUL
2252 * transition. We couldn't have
2253 * yy_get_previous_state() go ahead and do it
2254 * for us because it doesn't know how to deal
2255 * with the possibility of jamming (and we don't
2256 * want to build jamming into it because then it
2257 * will run more slowly).
2260 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
2262 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2264 if ( yy_next_state
)
2266 /* Consume the NUL. */
2267 yy_cp
= ++(yy_c_buf_p
);
2268 yy_current_state
= yy_next_state
;
2274 yy_cp
= (yy_last_accepting_cpos
);
2275 yy_current_state
= (yy_last_accepting_state
);
2276 goto yy_find_action
;
2280 else switch ( yy_get_next_buffer( ) )
2282 case EOB_ACT_END_OF_FILE
:
2284 (yy_did_buffer_switch_on_eof
) = 0;
2286 if ( asmshader_wrap( ) )
2288 /* Note: because we've taken care in
2289 * yy_get_next_buffer() to have set up
2290 * asmshader_text, we can now set up
2291 * yy_c_buf_p so that if some total
2292 * hoser (like flex itself) wants to
2293 * call the scanner after we return the
2294 * YY_NULL, it'll still work - another
2295 * YY_NULL will get returned.
2297 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
2299 yy_act
= YY_STATE_EOF(YY_START
);
2305 if ( ! (yy_did_buffer_switch_on_eof
) )
2311 case EOB_ACT_CONTINUE_SCAN
:
2313 (yytext_ptr
) + yy_amount_of_matched_text
;
2315 yy_current_state
= yy_get_previous_state( );
2317 yy_cp
= (yy_c_buf_p
);
2318 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2321 case EOB_ACT_LAST_MATCH
:
2323 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
2325 yy_current_state
= yy_get_previous_state( );
2327 yy_cp
= (yy_c_buf_p
);
2328 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2329 goto yy_find_action
;
2336 "fatal flex scanner internal error--no action found" );
2337 } /* end of action switch */
2338 } /* end of scanning one token */
2339 } /* end of asmshader_lex */
2341 /* yy_get_next_buffer - try to read in a new buffer
2343 * Returns a code representing an action:
2344 * EOB_ACT_LAST_MATCH -
2345 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2346 * EOB_ACT_END_OF_FILE - end of file
2348 static int yy_get_next_buffer (void)
2350 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
2351 register char *source
= (yytext_ptr
);
2352 register int number_to_move
, i
;
2355 if ( (yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] )
2357 "fatal flex scanner internal error--end of buffer missed" );
2359 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
2360 { /* Don't try to fill the buffer, so this is an EOF. */
2361 if ( (yy_c_buf_p
) - (yytext_ptr
) - YY_MORE_ADJ
== 1 )
2363 /* We matched a single character, the EOB, so
2364 * treat this as a final EOF.
2366 return EOB_ACT_END_OF_FILE
;
2371 /* We matched some text prior to the EOB, first
2374 return EOB_ACT_LAST_MATCH
;
2378 /* Try to read more data. */
2380 /* First move last chars to start of buffer. */
2381 number_to_move
= (int) ((yy_c_buf_p
) - (yytext_ptr
)) - 1;
2383 for ( i
= 0; i
< number_to_move
; ++i
)
2384 *(dest
++) = *(source
++);
2386 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
2387 /* don't do the read, it's not guaranteed to return an EOF,
2390 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
2395 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
2397 while ( num_to_read
<= 0 )
2398 { /* Not enough room in the buffer - grow it. */
2400 /* just a shorter name for the current buffer */
2401 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
2403 int yy_c_buf_p_offset
=
2404 (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
2406 if ( b
->yy_is_our_buffer
)
2408 int new_size
= b
->yy_buf_size
* 2;
2410 if ( new_size
<= 0 )
2411 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
2413 b
->yy_buf_size
*= 2;
2415 b
->yy_ch_buf
= (char *)
2416 /* Include room in for 2 EOB chars. */
2417 asmshader_realloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 );
2420 /* Can't grow it, we don't own it. */
2423 if ( ! b
->yy_ch_buf
)
2425 "fatal error - scanner input buffer overflow" );
2427 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
2429 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
2434 if ( num_to_read
> YY_READ_BUF_SIZE
)
2435 num_to_read
= YY_READ_BUF_SIZE
;
2437 /* Read in more data. */
2438 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
2439 (yy_n_chars
), (size_t) num_to_read
);
2441 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2444 if ( (yy_n_chars
) == 0 )
2446 if ( number_to_move
== YY_MORE_ADJ
)
2448 ret_val
= EOB_ACT_END_OF_FILE
;
2449 asmshader_restart(asmshader_in
);
2454 ret_val
= EOB_ACT_LAST_MATCH
;
2455 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
2456 YY_BUFFER_EOF_PENDING
;
2461 ret_val
= EOB_ACT_CONTINUE_SCAN
;
2463 if ((yy_size_t
) ((yy_n_chars
) + number_to_move
) > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
2464 /* Extend the array by 50%, plus the number we really need. */
2465 yy_size_t new_size
= (yy_n_chars
) + number_to_move
+ ((yy_n_chars
) >> 1);
2466 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *) asmshader_realloc((void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
,new_size
);
2467 if ( ! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2468 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2471 (yy_n_chars
) += number_to_move
;
2472 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] = YY_END_OF_BUFFER_CHAR
;
2473 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] = YY_END_OF_BUFFER_CHAR
;
2475 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
2480 /* yy_get_previous_state - get the state just before the EOB char was reached */
2482 static yy_state_type
yy_get_previous_state (void)
2484 register yy_state_type yy_current_state
;
2485 register char *yy_cp
;
2487 yy_current_state
= (yy_start
);
2489 for ( yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
)
2491 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
2492 if ( yy_accept
[yy_current_state
] )
2494 (yy_last_accepting_state
) = yy_current_state
;
2495 (yy_last_accepting_cpos
) = yy_cp
;
2497 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2499 yy_current_state
= (int) yy_def
[yy_current_state
];
2500 if ( yy_current_state
>= 481 )
2501 yy_c
= yy_meta
[(unsigned int) yy_c
];
2503 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2506 return yy_current_state
;
2509 /* yy_try_NUL_trans - try to make a transition on the NUL character
2512 * next_state = yy_try_NUL_trans( current_state );
2514 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
)
2516 register int yy_is_jam
;
2517 register char *yy_cp
= (yy_c_buf_p
);
2519 register YY_CHAR yy_c
= 1;
2520 if ( yy_accept
[yy_current_state
] )
2522 (yy_last_accepting_state
) = yy_current_state
;
2523 (yy_last_accepting_cpos
) = yy_cp
;
2525 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2527 yy_current_state
= (int) yy_def
[yy_current_state
];
2528 if ( yy_current_state
>= 481 )
2529 yy_c
= yy_meta
[(unsigned int) yy_c
];
2531 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2532 yy_is_jam
= (yy_current_state
== 480);
2534 return yy_is_jam
? 0 : yy_current_state
;
2539 static int yyinput (void)
2541 static int input (void)
2547 *(yy_c_buf_p
) = (yy_hold_char
);
2549 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
2551 /* yy_c_buf_p now points to the character we want to return.
2552 * If this occurs *before* the EOB characters, then it's a
2553 * valid NUL; if not, then we've hit the end of the buffer.
2555 if ( (yy_c_buf_p
) < &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
2556 /* This was really a NUL. */
2557 *(yy_c_buf_p
) = '\0';
2560 { /* need more input */
2561 int offset
= (yy_c_buf_p
) - (yytext_ptr
);
2564 switch ( yy_get_next_buffer( ) )
2566 case EOB_ACT_LAST_MATCH
:
2567 /* This happens because yy_g_n_b()
2568 * sees that we've accumulated a
2569 * token and flags that we need to
2570 * try matching the token before
2571 * proceeding. But for input(),
2572 * there's no matching to consider.
2573 * So convert the EOB_ACT_LAST_MATCH
2574 * to EOB_ACT_END_OF_FILE.
2577 /* Reset buffer status. */
2578 asmshader_restart(asmshader_in
);
2582 case EOB_ACT_END_OF_FILE
:
2584 if ( asmshader_wrap( ) )
2587 if ( ! (yy_did_buffer_switch_on_eof
) )
2596 case EOB_ACT_CONTINUE_SCAN
:
2597 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
2603 c
= *(unsigned char *) (yy_c_buf_p
); /* cast for 8-bit char's */
2604 *(yy_c_buf_p
) = '\0'; /* preserve asmshader_text */
2605 (yy_hold_char
) = *++(yy_c_buf_p
);
2609 #endif /* ifndef YY_NO_INPUT */
2611 /** Immediately switch to a different input stream.
2612 * @param input_file A readable stream.
2614 * @note This function does not reset the start condition to @c INITIAL .
2616 void asmshader_restart (FILE * input_file
)
2619 if ( ! YY_CURRENT_BUFFER
){
2620 asmshader_ensure_buffer_stack ();
2621 YY_CURRENT_BUFFER_LVALUE
=
2622 asmshader__create_buffer(asmshader_in
,YY_BUF_SIZE
);
2625 asmshader__init_buffer(YY_CURRENT_BUFFER
,input_file
);
2626 asmshader__load_buffer_state( );
2629 /** Switch to a different input buffer.
2630 * @param new_buffer The new input buffer.
2633 void asmshader__switch_to_buffer (YY_BUFFER_STATE new_buffer
)
2636 /* TODO. We should be able to replace this entire function body
2638 * asmshader_pop_buffer_state();
2639 * asmshader_push_buffer_state(new_buffer);
2641 asmshader_ensure_buffer_stack ();
2642 if ( YY_CURRENT_BUFFER
== new_buffer
)
2645 if ( YY_CURRENT_BUFFER
)
2647 /* Flush out information for old buffer. */
2648 *(yy_c_buf_p
) = (yy_hold_char
);
2649 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2650 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2653 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2654 asmshader__load_buffer_state( );
2656 /* We don't actually know whether we did this switch during
2657 * EOF (asmshader_wrap()) processing, but the only time this flag
2658 * is looked at is after asmshader_wrap() is called, so it's safe
2659 * to go ahead and always set it.
2661 (yy_did_buffer_switch_on_eof
) = 1;
2664 static void asmshader__load_buffer_state (void)
2666 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2667 (yytext_ptr
) = (yy_c_buf_p
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
2668 asmshader_in
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
2669 (yy_hold_char
) = *(yy_c_buf_p
);
2672 /** Allocate and initialize an input buffer state.
2673 * @param file A readable stream.
2674 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2676 * @return the allocated buffer state.
2678 YY_BUFFER_STATE
asmshader__create_buffer (FILE * file
, int size
)
2682 b
= (YY_BUFFER_STATE
) asmshader_alloc(sizeof( struct yy_buffer_state
) );
2684 YY_FATAL_ERROR( "out of dynamic memory in asmshader__create_buffer()" );
2686 b
->yy_buf_size
= size
;
2688 /* yy_ch_buf has to be 2 characters longer than the size given because
2689 * we need to put in 2 end-of-buffer characters.
2691 b
->yy_ch_buf
= (char *) asmshader_alloc(b
->yy_buf_size
+ 2 );
2692 if ( ! b
->yy_ch_buf
)
2693 YY_FATAL_ERROR( "out of dynamic memory in asmshader__create_buffer()" );
2695 b
->yy_is_our_buffer
= 1;
2697 asmshader__init_buffer(b
,file
);
2702 /** Destroy the buffer.
2703 * @param b a buffer created with asmshader__create_buffer()
2706 void asmshader__delete_buffer (YY_BUFFER_STATE b
)
2712 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
2713 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
2715 if ( b
->yy_is_our_buffer
)
2716 asmshader_free((void *) b
->yy_ch_buf
);
2718 asmshader_free((void *) b
);
2721 /* Initializes or reinitializes a buffer.
2722 * This function is sometimes called more than once on the same buffer,
2723 * such as during a asmshader_restart() or at EOF.
2725 static void asmshader__init_buffer (YY_BUFFER_STATE b
, FILE * file
)
2730 asmshader__flush_buffer(b
);
2732 b
->yy_input_file
= file
;
2733 b
->yy_fill_buffer
= 1;
2735 /* If b is the current buffer, then asmshader__init_buffer was _probably_
2736 * called from asmshader_restart() or through yy_get_next_buffer.
2737 * In that case, we don't want to reset the lineno or column.
2739 if (b
!= YY_CURRENT_BUFFER
){
2740 b
->yy_bs_lineno
= 1;
2741 b
->yy_bs_column
= 0;
2744 b
->yy_is_interactive
= 0;
2749 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2750 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2753 void asmshader__flush_buffer (YY_BUFFER_STATE b
)
2760 /* We always need two end-of-buffer characters. The first causes
2761 * a transition to the end-of-buffer state. The second causes
2762 * a jam in that state.
2764 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2765 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2767 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2770 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2772 if ( b
== YY_CURRENT_BUFFER
)
2773 asmshader__load_buffer_state( );
2776 /** Pushes the new state onto the stack. The new state becomes
2777 * the current state. This function will allocate the stack
2779 * @param new_buffer The new state.
2782 void asmshader_push_buffer_state (YY_BUFFER_STATE new_buffer
)
2784 if (new_buffer
== NULL
)
2787 asmshader_ensure_buffer_stack();
2789 /* This block is copied from asmshader__switch_to_buffer. */
2790 if ( YY_CURRENT_BUFFER
)
2792 /* Flush out information for old buffer. */
2793 *(yy_c_buf_p
) = (yy_hold_char
);
2794 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2795 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2798 /* Only push if top exists. Otherwise, replace top. */
2799 if (YY_CURRENT_BUFFER
)
2800 (yy_buffer_stack_top
)++;
2801 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2803 /* copied from asmshader__switch_to_buffer. */
2804 asmshader__load_buffer_state( );
2805 (yy_did_buffer_switch_on_eof
) = 1;
2808 /** Removes and deletes the top of the stack, if present.
2809 * The next element becomes the new top.
2812 void asmshader_pop_buffer_state (void)
2814 if (!YY_CURRENT_BUFFER
)
2817 asmshader__delete_buffer(YY_CURRENT_BUFFER
);
2818 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2819 if ((yy_buffer_stack_top
) > 0)
2820 --(yy_buffer_stack_top
);
2822 if (YY_CURRENT_BUFFER
) {
2823 asmshader__load_buffer_state( );
2824 (yy_did_buffer_switch_on_eof
) = 1;
2828 /* Allocates the stack if it does not exist.
2829 * Guarantees space for at least one push.
2831 static void asmshader_ensure_buffer_stack (void)
2835 if (!(yy_buffer_stack
)) {
2837 /* First allocation is just for 2 elements, since we don't know if this
2838 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2839 * immediate realloc on the next call.
2842 (yy_buffer_stack
) = (struct yy_buffer_state
**)asmshader_alloc
2843 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
2845 if ( ! (yy_buffer_stack
) )
2846 YY_FATAL_ERROR( "out of dynamic memory in asmshader_ensure_buffer_stack()" );
2848 memset((yy_buffer_stack
), 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
2850 (yy_buffer_stack_max
) = num_to_alloc
;
2851 (yy_buffer_stack_top
) = 0;
2855 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1){
2857 /* Increase the buffer to prepare for a possible push. */
2858 int grow_size
= 8 /* arbitrary grow size */;
2860 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
2861 (yy_buffer_stack
) = (struct yy_buffer_state
**)asmshader_realloc
2863 num_to_alloc
* sizeof(struct yy_buffer_state
*)
2865 if ( ! (yy_buffer_stack
) )
2866 YY_FATAL_ERROR( "out of dynamic memory in asmshader_ensure_buffer_stack()" );
2868 /* zero only the new slots.*/
2869 memset((yy_buffer_stack
) + (yy_buffer_stack_max
), 0, grow_size
* sizeof(struct yy_buffer_state
*));
2870 (yy_buffer_stack_max
) = num_to_alloc
;
2874 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2875 * @param base the character buffer
2876 * @param size the size in bytes of the character buffer
2878 * @return the newly allocated buffer state object.
2880 YY_BUFFER_STATE
asmshader__scan_buffer (char * base
, yy_size_t size
)
2885 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
2886 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
2887 /* They forgot to leave room for the EOB's. */
2890 b
= (YY_BUFFER_STATE
) asmshader_alloc(sizeof( struct yy_buffer_state
) );
2892 YY_FATAL_ERROR( "out of dynamic memory in asmshader__scan_buffer()" );
2894 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
2895 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
2896 b
->yy_is_our_buffer
= 0;
2897 b
->yy_input_file
= 0;
2898 b
->yy_n_chars
= b
->yy_buf_size
;
2899 b
->yy_is_interactive
= 0;
2901 b
->yy_fill_buffer
= 0;
2902 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2904 asmshader__switch_to_buffer(b
);
2909 /** Setup the input buffer state to scan a string. The next call to asmshader_lex() will
2910 * scan from a @e copy of @a str.
2911 * @param yystr a NUL-terminated string to scan
2913 * @return the newly allocated buffer state object.
2914 * @note If you want to scan bytes that may contain NUL values, then use
2915 * asmshader__scan_bytes() instead.
2917 YY_BUFFER_STATE
asmshader__scan_string (yyconst
char * yystr
)
2920 return asmshader__scan_bytes(yystr
,strlen(yystr
) );
2923 /** Setup the input buffer state to scan the given bytes. The next call to asmshader_lex() will
2924 * scan from a @e copy of @a bytes.
2925 * @param yybytes the byte buffer to scan
2926 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2928 * @return the newly allocated buffer state object.
2930 YY_BUFFER_STATE
asmshader__scan_bytes (yyconst
char * yybytes
, int _yybytes_len
)
2937 /* Get memory for full buffer, including space for trailing EOB's. */
2938 n
= _yybytes_len
+ 2;
2939 buf
= (char *) asmshader_alloc(n
);
2941 YY_FATAL_ERROR( "out of dynamic memory in asmshader__scan_bytes()" );
2943 for ( i
= 0; i
< _yybytes_len
; ++i
)
2944 buf
[i
] = yybytes
[i
];
2946 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
2948 b
= asmshader__scan_buffer(buf
,n
);
2950 YY_FATAL_ERROR( "bad buffer in asmshader__scan_bytes()" );
2952 /* It's okay to grow etc. this buffer, and we should throw it
2953 * away when we're done.
2955 b
->yy_is_our_buffer
= 1;
2960 #ifndef YY_EXIT_FAILURE
2961 #define YY_EXIT_FAILURE 2
2964 static void yy_fatal_error (yyconst
char* msg
)
2966 (void) fprintf( stderr
, "%s\n", msg
);
2967 exit( YY_EXIT_FAILURE
);
2970 /* Redefine yyless() so it works in section 3 code. */
2976 /* Undo effects of setting up asmshader_text. */ \
2977 int yyless_macro_arg = (n); \
2978 YY_LESS_LINENO(yyless_macro_arg);\
2979 asmshader_text[asmshader_leng] = (yy_hold_char); \
2980 (yy_c_buf_p) = asmshader_text + yyless_macro_arg; \
2981 (yy_hold_char) = *(yy_c_buf_p); \
2982 *(yy_c_buf_p) = '\0'; \
2983 asmshader_leng = yyless_macro_arg; \
2987 /* Accessor methods (get/set functions) to struct members. */
2989 /** Get the current line number.
2992 int asmshader_get_lineno (void)
2995 return asmshader_lineno
;
2998 /** Get the input stream.
3001 FILE *asmshader_get_in (void)
3003 return asmshader_in
;
3006 /** Get the output stream.
3009 FILE *asmshader_get_out (void)
3011 return asmshader_out
;
3014 /** Get the length of the current token.
3017 int asmshader_get_leng (void)
3019 return asmshader_leng
;
3022 /** Get the current token.
3026 char *asmshader_get_text (void)
3028 return asmshader_text
;
3031 /** Set the current line number.
3032 * @param line_number
3035 void asmshader_set_lineno (int line_number
)
3038 asmshader_lineno
= line_number
;
3041 /** Set the input stream. This does not discard the current
3043 * @param in_str A readable stream.
3045 * @see asmshader__switch_to_buffer
3047 void asmshader_set_in (FILE * in_str
)
3049 asmshader_in
= in_str
;
3052 void asmshader_set_out (FILE * out_str
)
3054 asmshader_out
= out_str
;
3057 int asmshader_get_debug (void)
3059 return asmshader__flex_debug
;
3062 void asmshader_set_debug (int bdebug
)
3064 asmshader__flex_debug
= bdebug
;
3067 static int yy_init_globals (void)
3069 /* Initialization is the same as for the non-reentrant scanner.
3070 * This function is called from asmshader_lex_destroy(), so don't allocate here.
3073 (yy_buffer_stack
) = 0;
3074 (yy_buffer_stack_top
) = 0;
3075 (yy_buffer_stack_max
) = 0;
3076 (yy_c_buf_p
) = (char *) 0;
3080 /* Defined in main.c */
3082 asmshader_in
= stdin
;
3083 asmshader_out
= stdout
;
3085 asmshader_in
= (FILE *) 0;
3086 asmshader_out
= (FILE *) 0;
3089 /* For future reference: Set errno on error, since we are called by
3090 * asmshader_lex_init()
3095 /* asmshader_lex_destroy is for both reentrant and non-reentrant scanners. */
3096 int asmshader_lex_destroy (void)
3099 /* Pop the buffer stack, destroying each element. */
3100 while(YY_CURRENT_BUFFER
){
3101 asmshader__delete_buffer(YY_CURRENT_BUFFER
);
3102 YY_CURRENT_BUFFER_LVALUE
= NULL
;
3103 asmshader_pop_buffer_state();
3106 /* Destroy the stack itself. */
3107 asmshader_free((yy_buffer_stack
) );
3108 (yy_buffer_stack
) = NULL
;
3110 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3111 * asmshader_lex() is called, initialization will occur. */
3118 * Internal utility routines.
3122 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
)
3125 for ( i
= 0; i
< n
; ++i
)
3130 #ifdef YY_NEED_STRLEN
3131 static int yy_flex_strlen (yyconst
char * s
)
3134 for ( n
= 0; s
[n
]; ++n
)
3141 void *asmshader_alloc (yy_size_t size
)
3143 return (void *) malloc( size
);
3146 void *asmshader_realloc (void * ptr
, yy_size_t size
)
3148 /* The cast to (char *) in the following accommodates both
3149 * implementations that use char* generic pointers, and those
3150 * that use void* generic pointers. It works with the latter
3151 * because both ANSI C and C++ allow castless assignment from
3152 * any pointer type to void*, and deal with argument conversions
3153 * as though doing an assignment.
3155 return (void *) realloc( (char *) ptr
, size
);
3158 void asmshader_free (void * ptr
)
3160 free( (char *) ptr
); /* see asmshader_realloc() for (char *) cast */
3163 #define YYTABLES_NAME "yytables"
3165 #line 486 "asmshader.l"
3169 struct bwriter_shader
*SlAssembleShader(const char *text
, char **messages
) {
3170 struct bwriter_shader
*ret
= NULL
;
3171 YY_BUFFER_STATE buffer
;
3172 TRACE("%p, %p\n", text
, messages
);
3174 buffer
= asmshader__scan_string(text
);
3175 asmshader__switch_to_buffer(buffer
);
3177 ret
= parse_asm_shader(messages
);
3179 asmshader__delete_buffer(buffer
);