4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
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
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
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
;
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
;
57 /* Limits of integral types. */
59 #define INT8_MIN (-128)
62 #define INT16_MIN (-32767-1)
65 #define INT32_MIN (-2147483647-1)
68 #define INT8_MAX (127)
71 #define INT16_MAX (32767)
74 #define INT32_MAX (2147483647)
77 #define UINT8_MAX (255U)
80 #define UINT16_MAX (65535U)
83 #define UINT32_MAX (4294967295U)
88 #endif /* ! FLEXINT_H */
92 /* The "const" storage-class-modifier is valid. */
95 #else /* ! __cplusplus */
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
102 #endif /* defined (__STDC__) */
103 #endif /* ! __cplusplus */
106 #define yyconst const
111 /* Returned upon end-of-file. */
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
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121 /* An opaque pointer. */
122 #ifndef YY_TYPEDEF_YY_SCANNER_T
123 #define YY_TYPEDEF_YY_SCANNER_T
124 typedef void* yyscan_t
;
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
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.
142 #define BEGIN yyg->yy_start = 1 + 2 *
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
148 #define YY_START ((yyg->yy_start - 1) / 2)
149 #define YYSTATE YY_START
151 /* Action number for EOF rule of a given start state. */
152 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154 /* Special action meaning "start processing a new file". */
155 #define YY_NEW_FILE yyrestart(yyin ,yyscanner )
157 #define YY_END_OF_BUFFER_CHAR 0
159 /* Size of default input buffer. */
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.
166 #define YY_BUF_SIZE 32768
168 #define YY_BUF_SIZE 16384
169 #endif /* __ia64__ */
172 /* The state buf must be large enough to hold one state per character in the main buffer.
174 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
176 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
177 #define YY_TYPEDEF_YY_BUFFER_STATE
178 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
181 #define EOB_ACT_CONTINUE_SCAN 0
182 #define EOB_ACT_END_OF_FILE 1
183 #define EOB_ACT_LAST_MATCH 2
185 #define YY_LESS_LINENO(n)
187 /* Return all but the first "n" matched characters back to the input stream. */
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 */ \
201 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
203 #ifndef YY_TYPEDEF_YY_SIZE_T
204 #define YY_TYPEDEF_YY_SIZE_T
205 typedef size_t yy_size_t
;
208 #ifndef YY_STRUCT_YY_BUFFER_STATE
209 #define YY_STRUCT_YY_BUFFER_STATE
210 struct yy_buffer_state
214 char *yy_ch_buf
; /* input buffer */
215 char *yy_buf_pos
; /* current position in input buffer */
217 /* Size of input buffer in bytes, not including room for EOB
220 yy_size_t yy_buf_size
;
222 /* Number of characters read into yy_ch_buf, not including EOB
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
231 int yy_is_our_buffer
;
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
238 int yy_is_interactive
;
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
246 int yy_bs_lineno
; /**< The line count. */
247 int yy_bs_column
; /**< The column count. */
249 /* Whether to try to fill the input buffer when we reach the
254 int yy_buffer_status
;
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.
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.
268 #define YY_BUFFER_EOF_PENDING 2
271 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
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
277 * Returns the top of the stack, or NULL.
279 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
280 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
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.
286 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
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
);
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
);
300 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
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
);
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
);
310 #define yy_new_buffer yy_create_buffer
312 #define yy_set_interactive(is_interactive) \
314 if ( ! YY_CURRENT_BUFFER ){ \
315 yyensure_buffer_stack (yyscanner); \
316 YY_CURRENT_BUFFER_LVALUE = \
317 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
319 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
322 #define yy_set_bol(at_bol) \
324 if ( ! YY_CURRENT_BUFFER ){\
325 yyensure_buffer_stack (yyscanner); \
326 YY_CURRENT_BUFFER_LVALUE = \
327 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
329 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
332 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
334 /* Begin user sect3 */
337 #define YY_SKIP_YYWRAP
339 typedef unsigned char YY_CHAR
;
341 typedef int yy_state_type
;
343 #define yytext_ptr yytext_r
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
);
350 /* Done after the current pattern has been matched and before the
351 * corresponding action - sets up yytext.
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; \
358 yyg->yy_c_buf_p = yy_cp;
360 #define YY_NUM_RULES 168
361 #define YY_END_OF_BUFFER 169
362 /* This struct is not used in this scanner,
363 but its presence is necessary. */
366 flex_int32_t yy_verify
;
369 static yyconst flex_int16_t yy_accept
[836] =
371 0, 0, 169, 167, 165, 164, 167, 167, 137, 163,
372 139, 139, 139, 139, 137, 137, 137, 137, 137, 137,
373 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
374 137, 137, 137, 137, 137, 165, 0, 0, 166, 137,
375 0, 138, 140, 160, 160, 0, 0, 0, 0, 160,
376 0, 0, 0, 0, 0, 0, 0, 117, 161, 118,
377 119, 151, 151, 151, 151, 0, 139, 0, 125, 126,
378 127, 137, 137, 137, 137, 137, 137, 137, 137, 137,
379 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
380 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
382 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
383 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
384 137, 137, 137, 137, 137, 137, 0, 0, 0, 0,
385 0, 0, 0, 0, 0, 159, 0, 0, 0, 0,
386 0, 0, 0, 0, 0, 158, 158, 0, 0, 0,
387 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
388 157, 157, 157, 0, 0, 0, 0, 0, 0, 0,
389 0, 0, 0, 148, 148, 148, 149, 149, 150, 141,
390 140, 141, 0, 142, 11, 12, 137, 13, 137, 137,
391 14, 15, 137, 16, 17, 18, 19, 20, 21, 6,
393 22, 23, 24, 25, 26, 28, 27, 29, 30, 31,
394 32, 33, 34, 35, 137, 137, 137, 137, 137, 40,
395 41, 137, 42, 43, 44, 45, 46, 47, 48, 137,
396 49, 50, 51, 52, 53, 54, 55, 137, 56, 57,
397 58, 59, 137, 62, 63, 137, 137, 137, 137, 137,
398 137, 0, 0, 0, 0, 140, 0, 0, 0, 0,
399 0, 0, 0, 0, 0, 0, 78, 79, 81, 0,
400 156, 0, 0, 0, 0, 0, 0, 95, 0, 0,
401 0, 0, 0, 0, 0, 0, 0, 0, 155, 154,
402 154, 107, 0, 0, 0, 0, 0, 0, 0, 0,
404 0, 0, 145, 145, 146, 147, 0, 143, 11, 11,
405 137, 12, 12, 12, 137, 137, 137, 137, 137, 15,
406 15, 137, 128, 16, 16, 137, 17, 17, 137, 18,
407 18, 137, 19, 19, 137, 20, 20, 137, 21, 21,
408 137, 22, 22, 137, 24, 24, 137, 25, 25, 137,
409 28, 28, 137, 27, 27, 137, 30, 30, 137, 31,
410 31, 137, 32, 32, 137, 33, 33, 137, 34, 34,
411 137, 35, 35, 137, 137, 137, 137, 36, 137, 38,
412 137, 40, 40, 137, 41, 41, 137, 129, 42, 42,
413 137, 43, 43, 137, 137, 45, 45, 137, 46, 46,
415 137, 47, 47, 137, 48, 48, 137, 137, 49, 49,
416 137, 50, 50, 137, 51, 51, 137, 52, 52, 137,
417 53, 53, 137, 54, 54, 137, 137, 10, 56, 137,
418 57, 137, 58, 137, 59, 137, 60, 137, 62, 62,
419 137, 137, 137, 137, 137, 137, 137, 137, 0, 162,
420 0, 0, 0, 71, 72, 0, 0, 0, 0, 0,
421 0, 0, 83, 0, 0, 0, 0, 0, 0, 0,
422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
423 0, 153, 0, 0, 0, 111, 0, 113, 0, 0,
424 0, 0, 0, 0, 152, 144, 137, 137, 137, 4,
426 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
427 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
428 137, 137, 137, 9, 37, 39, 137, 137, 137, 137,
429 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
430 137, 137, 137, 137, 137, 137, 137, 60, 137, 61,
431 137, 137, 137, 137, 137, 67, 137, 137, 0, 0,
432 0, 0, 0, 73, 74, 0, 0, 0, 0, 82,
433 0, 0, 86, 89, 0, 0, 0, 0, 0, 0,
434 0, 100, 101, 0, 0, 0, 0, 106, 0, 0,
435 0, 0, 0, 0, 0, 0, 0, 0, 137, 137,
437 137, 137, 137, 137, 5, 137, 137, 137, 137, 137,
438 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
439 137, 137, 137, 137, 7, 8, 137, 137, 137, 137,
440 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
441 137, 137, 137, 137, 137, 137, 137, 137, 61, 137,
442 137, 137, 137, 137, 68, 137, 64, 0, 0, 0,
443 0, 122, 0, 0, 0, 0, 0, 0, 0, 0,
444 0, 92, 0, 96, 97, 0, 99, 0, 0, 0,
445 0, 0, 0, 0, 0, 0, 0, 115, 116, 0,
446 0, 123, 11, 3, 12, 133, 134, 137, 14, 15,
448 16, 17, 18, 19, 20, 21, 22, 24, 25, 28,
449 27, 30, 31, 32, 33, 34, 35, 40, 41, 42,
450 43, 44, 45, 46, 47, 48, 137, 137, 137, 49,
451 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
452 137, 137, 62, 63, 137, 66, 124, 0, 0, 69,
453 0, 75, 0, 0, 0, 84, 0, 0, 0, 0,
454 0, 0, 98, 0, 0, 104, 91, 0, 0, 0,
455 0, 0, 0, 120, 0, 137, 130, 131, 137, 60,
456 137, 65, 0, 0, 0, 0, 77, 80, 85, 0,
457 0, 90, 0, 0, 0, 103, 0, 0, 0, 0,
459 112, 114, 0, 137, 137, 61, 2, 1, 0, 76,
460 0, 88, 0, 94, 102, 0, 0, 109, 110, 121,
461 137, 132, 0, 87, 0, 105, 108, 137, 70, 93,
462 137, 137, 135, 136, 0
465 static yyconst flex_int32_t yy_ec
[256] =
467 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
468 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 2, 5, 1, 6, 7, 1, 1, 1, 1,
471 1, 1, 8, 1, 8, 9, 1, 10, 11, 12,
472 13, 14, 15, 15, 15, 15, 15, 1, 1, 1,
473 1, 1, 1, 1, 16, 17, 18, 19, 20, 21,
474 22, 23, 24, 7, 25, 26, 27, 28, 29, 30,
475 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
476 1, 1, 1, 1, 41, 1, 42, 43, 44, 45,
478 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
479 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
480 66, 67, 1, 1, 1, 1, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
492 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
493 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 static yyconst flex_int32_t yy_meta
[68] =
499 1, 1, 1, 1, 1, 1, 2, 1, 3, 2,
500 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508 static yyconst flex_int16_t yy_base
[839] =
510 0, 0, 1283, 1284, 66, 1284, 1277, 1278, 0, 69,
511 85, 128, 140, 152, 151, 58, 56, 63, 76, 1256,
512 158, 160, 39, 163, 173, 189, 52, 1249, 76, 1219,
513 1218, 1230, 1214, 1228, 1227, 105, 1256, 1268, 1284, 0,
514 225, 1284, 218, 160, 157, 20, 123, 66, 119, 192,
515 1228, 1214, 54, 162, 1212, 1224, 194, 1284, 200, 195,
516 98, 227, 196, 231, 235, 293, 305, 316, 1284, 1284,
517 1284, 1233, 1246, 1240, 223, 1229, 1232, 1228, 1243, 107,
518 298, 1225, 1239, 246, 1225, 1238, 1229, 1242, 1219, 1230,
519 1221, 182, 1222, 1213, 1222, 1213, 1212, 1213, 144, 1207,
521 1213, 1224, 1215, 1209, 1206, 1207, 1211, 289, 1220, 1207,
522 302, 1214, 1201, 1215, 1191, 65, 315, 1218, 1210, 1209,
523 1185, 1170, 1165, 1182, 1158, 1163, 1189, 279, 1178, 293,
524 1173, 342, 299, 1175, 1156, 317, 1166, 1162, 1157, 207,
525 1163, 1149, 1165, 1162, 1153, 320, 324, 1155, 1144, 1158,
526 1161, 1143, 1158, 1145, 1142, 1149, 284, 1157, 227, 288,
527 327, 342, 345, 1134, 1151, 1152, 1145, 1127, 318, 1128,
528 1150, 1141, 330, 341, 345, 349, 353, 357, 361, 1284,
529 419, 430, 436, 442, 440, 441, 1174, 0, 1173, 1156,
530 1146, 443, 1166, 444, 451, 468, 470, 472, 471, 0,
532 496, 0, 497, 498, 0, 499, 500, 0, 524, 525,
533 526, 536, 537, 553, 1161, 1154, 1167, 354, 356, 561,
534 563, 1148, 564, 565, 1140, 580, 590, 591, 592, 1161,
535 593, 617, 618, 619, 629, 630, 1138, 1148, 247, 330,
536 362, 419, 445, 646, 1136, 1128, 1127, 1112, 1112, 1111,
537 1110, 1153, 1125, 1113, 662, 669, 643, 1117, 487, 1114,
538 1108, 1108, 1102, 1115, 1115, 1100, 1284, 1284, 1115, 1103,
539 646, 1110, 135, 1107, 1113, 561, 1108, 1284, 1099, 1106,
540 1105, 1108, 1094, 1093, 1097, 1092, 330, 1097, 650, 653,
541 665, 1284, 1089, 1087, 1087, 1095, 1096, 1078, 670, 1083,
543 1089, 432, 460, 486, 579, 655, 715, 722, 1095, 682,
544 1102, 1093, 697, 721, 1100, 1099, 1092, 1106, 1096, 1087,
545 699, 1094, 0, 1085, 724, 1092, 1083, 725, 1090, 1081,
546 726, 1088, 1079, 727, 1086, 1077, 728, 1084, 1075, 729,
547 1082, 1073, 730, 1080, 1071, 731, 1078, 1069, 732, 1076,
548 1067, 733, 1074, 1065, 734, 1072, 1063, 735, 1070, 1061,
549 736, 1068, 1059, 737, 1066, 1057, 738, 1064, 1055, 739,
550 1062, 1053, 740, 1060, 1063, 1056, 1063, 0, 1056, 0,
551 1071, 1046, 741, 1053, 1044, 742, 1051, 0, 1042, 743,
552 1049, 1040, 745, 1047, 1046, 1037, 746, 1044, 1035, 767,
554 1042, 1033, 770, 1040, 1031, 771, 1038, 1041, 1028, 772,
555 1035, 1026, 773, 1033, 1024, 774, 1031, 1022, 775, 1029,
556 1020, 776, 1027, 1018, 777, 1025, 1024, 0, 1015, 1022,
557 1013, 1020, 1011, 1018, 1009, 1016, 778, 1015, 1006, 779,
558 1013, 1012, 990, 984, 989, 995, 978, 993, 424, 1284,
559 992, 982, 986, 1284, 1284, 976, 985, 971, 988, 971,
560 974, 968, 1284, 969, 968, 965, 972, 965, 973, 969,
561 979, 976, 958, 964, 971, 955, 954, 972, 954, 966,
562 965, 1284, 964, 954, 958, 1284, 945, 1284, 950, 950,
563 958, 941, 942, 952, 1284, 1284, 984, 966, 982, 0,
565 788, 980, 980, 979, 978, 977, 976, 975, 974, 973,
566 972, 971, 970, 969, 968, 967, 966, 965, 964, 963,
567 962, 949, 942, 0, 0, 0, 959, 958, 957, 956,
568 955, 954, 953, 952, 951, 929, 949, 948, 947, 946,
569 945, 944, 943, 942, 941, 940, 939, 913, 920, 783,
570 936, 935, 904, 907, 887, 0, 888, 881, 888, 887,
571 888, 880, 898, 1284, 1284, 880, 878, 888, 881, 1284,
572 876, 893, 345, 1284, 884, 868, 869, 878, 869, 868,
573 868, 1284, 867, 876, 866, 882, 879, 1284, 878, 876,
574 865, 866, 862, 854, 861, 856, 857, 852, 878, 878,
576 876, 890, 889, 884, 0, 872, 871, 870, 869, 868,
577 867, 866, 865, 864, 863, 862, 861, 860, 859, 858,
578 857, 856, 855, 854, 0, 0, 853, 852, 851, 850,
579 849, 848, 847, 846, 845, 791, 844, 843, 842, 841,
580 840, 839, 838, 837, 836, 835, 834, 851, 825, 832,
581 830, 829, 807, 807, 0, 814, 0, 848, 847, 796,
582 814, 1284, 809, 804, 797, 793, 805, 795, 793, 789,
583 805, 796, 795, 1284, 1284, 798, 1284, 793, 786, 775,
584 786, 778, 782, 795, 790, 793, 775, 1284, 1284, 787,
585 776, 1284, 0, 0, 0, 0, 0, 815, 0, 0,
587 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
588 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
589 0, 0, 0, 0, 0, 0, 811, 803, 790, 0,
590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
591 775, 791, 0, 0, 745, 0, 0, 796, 795, 1284,
592 737, 1284, 655, 655, 661, 1284, 644, 658, 643, 644,
593 635, 620, 1284, 598, 608, 1284, 1284, 604, 586, 579,
594 567, 567, 574, 1284, 557, 582, 0, 0, 582, 0,
595 565, 0, 582, 580, 539, 525, 1284, 1284, 1284, 527,
596 527, 1284, 525, 497, 499, 1284, 478, 451, 439, 441,
598 1284, 1284, 431, 441, 366, 0, 1284, 1284, 21, 1284,
599 144, 1284, 176, 1284, 1284, 182, 187, 1284, 1284, 1284,
600 220, 0, 235, 1284, 245, 1284, 1284, 424, 1284, 1284,
601 327, 373, 0, 0, 1284, 824, 396, 827
604 static yyconst flex_int16_t yy_def
[839] =
606 835, 1, 835, 835, 835, 835, 835, 836, 837, 835,
607 835, 835, 835, 835, 837, 837, 837, 837, 837, 837,
608 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
609 837, 837, 837, 837, 837, 835, 835, 836, 835, 837,
610 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
611 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
612 835, 835, 835, 835, 835, 838, 835, 835, 835, 835,
613 835, 837, 837, 837, 837, 837, 837, 837, 837, 837,
614 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
615 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
617 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
618 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
619 837, 837, 837, 837, 837, 837, 835, 835, 835, 835,
620 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
621 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
622 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
623 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
624 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
625 835, 835, 835, 835, 837, 837, 837, 837, 837, 837,
626 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
628 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
629 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
630 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
631 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
632 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
633 837, 835, 835, 835, 835, 835, 835, 835, 835, 835,
634 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
635 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
636 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
637 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
639 835, 835, 835, 835, 835, 835, 835, 835, 837, 837,
640 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
641 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
642 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
643 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
644 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
645 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
646 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
647 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
648 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
650 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
651 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
652 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
653 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
654 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
655 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
656 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
657 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
658 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
659 835, 835, 835, 835, 835, 835, 837, 837, 837, 837,
661 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
662 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
663 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
664 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
665 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
666 837, 837, 837, 837, 837, 837, 837, 837, 835, 835,
667 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
668 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
669 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
670 835, 835, 835, 835, 835, 835, 835, 835, 837, 837,
672 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
673 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
674 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
675 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
676 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
677 837, 837, 837, 837, 837, 837, 837, 835, 835, 835,
678 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
679 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
680 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
681 835, 835, 837, 837, 837, 837, 837, 837, 837, 837,
683 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
684 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
685 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
686 837, 837, 837, 837, 837, 837, 837, 837, 837, 837,
687 837, 837, 837, 837, 837, 837, 837, 835, 835, 835,
688 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
689 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
690 835, 835, 835, 835, 835, 837, 837, 837, 837, 837,
691 837, 837, 835, 835, 835, 835, 835, 835, 835, 835,
692 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
694 835, 835, 835, 837, 837, 837, 835, 835, 835, 835,
695 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
696 837, 837, 835, 835, 835, 835, 835, 837, 835, 835,
697 837, 837, 837, 837, 0, 835, 835, 835
700 static yyconst flex_int16_t yy_nxt
[1352] =
702 4, 5, 6, 5, 7, 8, 9, 4, 10, 11,
703 12, 13, 14, 11, 11, 15, 9, 16, 17, 18,
704 19, 9, 9, 9, 20, 21, 22, 9, 23, 24,
705 9, 25, 26, 27, 28, 9, 9, 29, 9, 9,
706 9, 9, 9, 9, 9, 9, 30, 9, 9, 9,
707 9, 9, 9, 9, 9, 9, 31, 9, 32, 33,
708 34, 9, 35, 9, 9, 9, 9, 36, 96, 36,
709 41, 116, 137, 97, 80, 138, 823, 42, 43, 43,
710 43, 43, 43, 43, 77, 81, 78, 119, 82, 117,
711 83, 238, 79, 66, 67, 67, 67, 67, 67, 67,
713 84, 85, 239, 150, 68, 120, 36, 86, 36, 151,
714 44, 45, 46, 47, 48, 49, 50, 51, 52, 141,
715 142, 53, 54, 55, 56, 57, 58, 59, 60, 61,
716 68, 143, 62, 63, 64, 65, 66, 67, 67, 67,
717 67, 67, 67, 170, 194, 195, 69, 68, 66, 67,
718 67, 67, 67, 67, 67, 218, 171, 219, 70, 68,
719 66, 67, 67, 67, 67, 67, 67, 72, 139, 73,
720 71, 68, 140, 68, 144, 92, 74, 145, 98, 88,
721 464, 89, 75, 93, 76, 68, 90, 99, 94, 91,
722 101, 100, 102, 103, 95, 465, 824, 68, 136, 133,
724 210, 133, 133, 152, 133, 104, 105, 133, 106, 107,
725 108, 109, 110, 134, 111, 133, 112, 153, 133, 211,
726 135, 825, 113, 114, 154, 115, 41, 43, 43, 43,
727 43, 43, 43, 146, 147, 157, 826, 132, 165, 133,
728 166, 161, 162, 167, 168, 827, 158, 163, 188, 159,
729 133, 169, 160, 264, 189, 164, 828, 201, 133, 174,
730 173, 175, 176, 132, 429, 265, 128, 129, 46, 47,
731 48, 49, 172, 51, 52, 202, 284, 53, 54, 55,
732 56, 57, 58, 130, 60, 61, 285, 430, 131, 829,
733 173, 173, 173, 173, 177, 173, 173, 178, 179, 173,
735 173, 173, 181, 181, 181, 181, 181, 181, 228, 830,
736 196, 197, 182, 66, 67, 67, 67, 67, 67, 67,
737 198, 232, 229, 183, 68, 184, 184, 184, 184, 184,
738 184, 240, 134, 241, 254, 233, 281, 286, 182, 135,
739 257, 257, 282, 287, 242, 833, 257, 431, 164, 255,
740 68, 256, 256, 256, 256, 256, 256, 257, 257, 257,
741 260, 257, 257, 297, 257, 271, 257, 257, 257, 257,
742 432, 257, 380, 298, 257, 257, 378, 479, 257, 433,
743 480, 288, 257, 289, 257, 257, 290, 291, 379, 257,
744 381, 834, 257, 302, 302, 302, 302, 40, 669, 822,
746 257, 670, 434, 257, 302, 302, 302, 302, 303, 302,
747 302, 304, 305, 302, 302, 302, 302, 302, 302, 302,
748 306, 302, 302, 302, 302, 302, 302, 302, 43, 43,
749 43, 43, 43, 43, 831, 832, 435, 307, 132, 308,
750 308, 308, 308, 308, 308, 184, 184, 184, 184, 184,
751 184, 184, 184, 184, 184, 184, 184, 309, 312, 436,
752 320, 324, 310, 313, 132, 321, 325, 437, 327, 821,
753 559, 310, 314, 328, 321, 325, 820, 310, 313, 438,
754 311, 315, 328, 322, 326, 330, 560, 333, 339, 336,
755 331, 329, 334, 340, 337, 495, 495, 495, 495, 331,
757 819, 334, 340, 337, 818, 331, 817, 334, 332, 337,
758 335, 341, 338, 342, 345, 348, 351, 354, 343, 346,
759 349, 352, 355, 495, 495, 495, 495, 343, 346, 349,
760 352, 355, 452, 816, 346, 349, 344, 347, 350, 353,
761 356, 357, 360, 363, 815, 453, 358, 361, 364, 496,
762 495, 495, 495, 366, 369, 358, 361, 364, 367, 370,
763 814, 358, 361, 364, 359, 362, 365, 367, 370, 813,
764 372, 812, 811, 367, 370, 373, 368, 371, 382, 810,
765 385, 389, 392, 383, 373, 386, 390, 393, 809, 808,
766 373, 807, 383, 374, 386, 390, 393, 396, 806, 805,
768 804, 384, 397, 387, 391, 394, 468, 399, 402, 405,
769 409, 397, 400, 403, 406, 410, 803, 397, 802, 469,
770 398, 400, 403, 406, 410, 801, 800, 400, 403, 406,
771 401, 404, 407, 411, 412, 415, 418, 799, 798, 413,
772 416, 419, 495, 495, 495, 495, 421, 424, 413, 416,
773 419, 422, 425, 797, 413, 416, 419, 414, 417, 420,
774 422, 425, 796, 439, 795, 794, 422, 425, 440, 423,
775 426, 256, 256, 256, 256, 256, 256, 440, 256, 256,
776 256, 256, 256, 256, 450, 450, 441, 450, 450, 793,
777 450, 450, 450, 450, 450, 450, 792, 450, 791, 309,
779 450, 450, 790, 789, 450, 788, 482, 450, 450, 787,
780 786, 450, 450, 489, 312, 490, 320, 491, 495, 495,
781 495, 495, 311, 450, 308, 308, 308, 308, 308, 308,
782 492, 308, 308, 308, 308, 308, 308, 315, 312, 322,
783 498, 324, 327, 330, 333, 336, 339, 342, 345, 348,
784 351, 354, 357, 360, 363, 366, 369, 372, 382, 385,
785 389, 315, 392, 396, 326, 329, 332, 335, 338, 341,
786 344, 347, 350, 353, 356, 359, 362, 365, 368, 371,
787 374, 384, 387, 391, 399, 394, 398, 402, 405, 409,
788 412, 415, 418, 421, 424, 548, 439, 785, 602, 603,
790 649, 727, 728, 784, 783, 782, 781, 401, 780, 779,
791 404, 407, 411, 414, 417, 420, 423, 426, 549, 441,
792 604, 778, 729, 650, 38, 38, 38, 180, 180, 777,
793 776, 775, 774, 773, 772, 771, 770, 769, 768, 767,
794 766, 765, 764, 763, 762, 761, 760, 759, 758, 757,
795 756, 755, 754, 753, 752, 751, 750, 749, 748, 747,
796 746, 745, 744, 743, 742, 650, 741, 740, 739, 738,
797 737, 736, 735, 734, 733, 732, 731, 730, 726, 725,
798 724, 723, 722, 721, 720, 719, 718, 717, 716, 715,
799 714, 713, 712, 711, 710, 709, 708, 707, 706, 705,
801 704, 703, 702, 701, 700, 699, 698, 697, 696, 695,
802 694, 693, 692, 691, 690, 689, 688, 687, 686, 685,
803 684, 683, 682, 681, 680, 679, 678, 677, 676, 675,
804 674, 673, 672, 671, 668, 667, 666, 665, 664, 663,
805 662, 661, 660, 659, 658, 657, 656, 655, 654, 653,
806 652, 651, 648, 549, 647, 646, 645, 644, 643, 642,
807 641, 640, 639, 638, 637, 636, 635, 634, 633, 632,
808 631, 630, 629, 628, 627, 626, 625, 624, 623, 622,
809 621, 620, 619, 618, 617, 616, 615, 614, 613, 612,
810 611, 610, 609, 608, 607, 606, 605, 601, 600, 599,
812 598, 597, 596, 595, 594, 593, 592, 591, 590, 589,
813 588, 587, 586, 585, 584, 583, 582, 581, 580, 579,
814 578, 577, 576, 575, 574, 573, 572, 571, 570, 569,
815 568, 567, 566, 565, 564, 563, 562, 561, 558, 557,
816 556, 555, 554, 553, 552, 551, 441, 550, 547, 436,
817 546, 434, 545, 432, 544, 430, 543, 542, 426, 541,
818 423, 540, 420, 539, 417, 538, 414, 537, 411, 536,
819 535, 407, 534, 404, 533, 401, 532, 398, 531, 530,
820 394, 529, 391, 528, 387, 527, 384, 526, 525, 524,
821 523, 522, 521, 374, 520, 371, 519, 368, 518, 365,
823 517, 362, 516, 359, 515, 356, 514, 353, 513, 350,
824 512, 347, 511, 344, 510, 341, 509, 338, 508, 335,
825 507, 332, 506, 329, 505, 326, 504, 322, 503, 502,
826 501, 500, 499, 315, 497, 311, 494, 493, 488, 487,
827 486, 485, 484, 483, 481, 478, 477, 476, 475, 474,
828 473, 472, 471, 470, 467, 466, 463, 462, 461, 460,
829 459, 458, 457, 456, 455, 454, 451, 288, 260, 449,
830 448, 447, 446, 445, 444, 443, 442, 428, 427, 408,
831 395, 388, 377, 376, 375, 323, 319, 318, 317, 316,
832 301, 300, 299, 296, 295, 294, 293, 292, 283, 280,
834 279, 278, 277, 276, 275, 274, 273, 272, 270, 269,
835 268, 267, 266, 263, 262, 261, 259, 258, 172, 253,
836 252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
837 237, 236, 235, 234, 231, 230, 227, 226, 225, 224,
838 223, 222, 221, 220, 217, 216, 215, 214, 213, 212,
839 209, 208, 207, 206, 205, 204, 203, 200, 199, 193,
840 192, 191, 190, 187, 186, 185, 156, 155, 149, 148,
841 39, 127, 126, 125, 124, 123, 122, 121, 118, 87,
842 39, 37, 835, 3, 835, 835, 835, 835, 835, 835,
843 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
845 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
846 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
847 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
848 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
849 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
853 static yyconst flex_int16_t yy_chk
[1352] =
855 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
856 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
857 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
858 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
859 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
860 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
861 1, 1, 1, 1, 1, 1, 1, 5, 23, 5,
862 10, 27, 46, 23, 17, 46, 809, 10, 10, 10,
863 10, 10, 10, 10, 16, 17, 16, 29, 17, 27,
864 18, 116, 16, 11, 11, 11, 11, 11, 11, 11,
866 18, 19, 116, 53, 11, 29, 36, 19, 36, 53,
867 10, 10, 10, 10, 10, 10, 10, 10, 10, 48,
868 48, 10, 10, 10, 10, 10, 10, 10, 10, 10,
869 11, 48, 10, 10, 10, 10, 12, 12, 12, 12,
870 12, 12, 12, 61, 80, 80, 12, 12, 13, 13,
871 13, 13, 13, 13, 13, 99, 61, 99, 13, 13,
872 14, 14, 14, 14, 14, 14, 14, 15, 47, 15,
873 14, 14, 47, 12, 49, 22, 15, 49, 24, 21,
874 273, 21, 15, 22, 15, 13, 21, 24, 22, 21,
875 25, 24, 25, 25, 22, 273, 811, 14, 45, 45,
877 92, 44, 44, 54, 45, 25, 26, 44, 26, 26,
878 26, 26, 26, 44, 26, 45, 26, 54, 44, 92,
879 44, 813, 26, 26, 54, 26, 41, 43, 43, 43,
880 43, 43, 43, 50, 50, 57, 816, 43, 60, 50,
881 60, 59, 59, 60, 60, 817, 57, 59, 75, 57,
882 50, 60, 57, 140, 75, 59, 821, 84, 59, 63,
883 63, 63, 63, 43, 239, 140, 41, 41, 41, 41,
884 41, 41, 62, 41, 41, 84, 159, 41, 41, 41,
885 41, 41, 41, 41, 41, 41, 159, 239, 41, 823,
886 62, 62, 62, 62, 64, 64, 64, 64, 65, 65,
888 65, 65, 66, 66, 66, 66, 66, 66, 108, 825,
889 81, 81, 66, 67, 67, 67, 67, 67, 67, 67,
890 81, 111, 108, 68, 67, 68, 68, 68, 68, 68,
891 68, 117, 128, 117, 130, 111, 157, 160, 66, 128,
892 133, 133, 157, 160, 117, 831, 133, 240, 130, 132,
893 67, 132, 132, 132, 132, 132, 132, 133, 136, 136,
894 136, 146, 146, 169, 136, 147, 147, 146, 161, 161,
895 240, 147, 219, 169, 161, 136, 218, 287, 146, 241,
896 287, 161, 147, 162, 162, 161, 163, 163, 218, 162,
897 219, 832, 163, 173, 173, 173, 173, 837, 573, 805,
899 162, 573, 241, 163, 174, 174, 174, 174, 175, 175,
900 175, 175, 176, 176, 176, 176, 177, 177, 177, 177,
901 178, 178, 178, 178, 179, 179, 179, 179, 181, 181,
902 181, 181, 181, 181, 828, 828, 242, 182, 181, 182,
903 182, 182, 182, 182, 182, 183, 183, 183, 183, 183,
904 183, 184, 184, 184, 184, 184, 184, 185, 186, 242,
905 192, 194, 185, 186, 181, 192, 194, 243, 195, 804,
906 449, 185, 186, 195, 192, 194, 803, 185, 186, 243,
907 185, 186, 195, 192, 194, 196, 449, 197, 199, 198,
908 196, 195, 197, 199, 198, 302, 302, 302, 302, 196,
910 800, 197, 199, 198, 799, 196, 798, 197, 196, 198,
911 197, 199, 198, 201, 203, 204, 206, 207, 201, 203,
912 204, 206, 207, 303, 303, 303, 303, 201, 203, 204,
913 206, 207, 259, 797, 203, 204, 201, 203, 204, 206,
914 207, 209, 210, 211, 795, 259, 209, 210, 211, 304,
915 304, 304, 304, 212, 213, 209, 210, 211, 212, 213,
916 794, 209, 210, 211, 209, 210, 211, 212, 213, 793,
917 214, 791, 790, 212, 213, 214, 212, 213, 220, 786,
918 221, 223, 224, 220, 214, 221, 223, 224, 785, 784,
919 214, 783, 220, 214, 221, 223, 224, 226, 781, 779,
921 776, 220, 226, 221, 223, 224, 276, 227, 228, 229,
922 231, 226, 227, 228, 229, 231, 775, 226, 773, 276,
923 226, 227, 228, 229, 231, 772, 771, 227, 228, 229,
924 227, 228, 229, 231, 232, 233, 234, 770, 769, 232,
925 233, 234, 305, 305, 305, 305, 235, 236, 232, 233,
926 234, 235, 236, 768, 232, 233, 234, 232, 233, 234,
927 235, 236, 765, 244, 764, 762, 235, 236, 244, 235,
928 236, 255, 255, 255, 255, 255, 255, 244, 256, 256,
929 256, 256, 256, 256, 257, 257, 244, 271, 271, 761,
930 257, 289, 289, 271, 290, 290, 760, 289, 759, 310,
932 290, 257, 758, 757, 271, 755, 291, 291, 289, 754,
933 753, 290, 291, 299, 313, 299, 321, 299, 306, 306,
934 306, 306, 310, 291, 307, 307, 307, 307, 307, 307,
935 299, 308, 308, 308, 308, 308, 308, 313, 314, 321,
936 314, 325, 328, 331, 334, 337, 340, 343, 346, 349,
937 352, 355, 358, 361, 364, 367, 370, 373, 383, 386,
938 390, 314, 393, 397, 325, 328, 331, 334, 337, 340,
939 343, 346, 349, 352, 355, 358, 361, 364, 367, 370,
940 373, 383, 386, 390, 400, 393, 397, 403, 406, 410,
941 413, 416, 419, 422, 425, 437, 440, 751, 501, 501,
943 550, 636, 636, 749, 748, 745, 742, 400, 741, 729,
944 403, 406, 410, 413, 416, 419, 422, 425, 437, 440,
945 501, 728, 636, 550, 836, 836, 836, 838, 838, 727,
946 698, 691, 690, 687, 686, 685, 684, 683, 682, 681,
947 680, 679, 678, 676, 673, 672, 671, 670, 669, 668,
948 667, 666, 665, 664, 663, 661, 660, 659, 658, 656,
949 654, 653, 652, 651, 650, 649, 648, 647, 646, 645,
950 644, 643, 642, 641, 640, 639, 638, 637, 635, 634,
951 633, 632, 631, 630, 629, 628, 627, 624, 623, 622,
952 621, 620, 619, 618, 617, 616, 615, 614, 613, 612,
954 611, 610, 609, 608, 607, 606, 604, 603, 602, 601,
955 600, 599, 598, 597, 596, 595, 594, 593, 592, 591,
956 590, 589, 587, 586, 585, 584, 583, 581, 580, 579,
957 578, 577, 576, 575, 572, 571, 569, 568, 567, 566,
958 563, 562, 561, 560, 559, 558, 557, 555, 554, 553,
959 552, 551, 549, 548, 547, 546, 545, 544, 543, 542,
960 541, 540, 539, 538, 537, 536, 535, 534, 533, 532,
961 531, 530, 529, 528, 527, 523, 522, 521, 520, 519,
962 518, 517, 516, 515, 514, 513, 512, 511, 510, 509,
963 508, 507, 506, 505, 504, 503, 502, 499, 498, 497,
965 494, 493, 492, 491, 490, 489, 487, 485, 484, 483,
966 481, 480, 479, 478, 477, 476, 475, 474, 473, 472,
967 471, 470, 469, 468, 467, 466, 465, 464, 462, 461,
968 460, 459, 458, 457, 456, 453, 452, 451, 448, 447,
969 446, 445, 444, 443, 442, 441, 439, 438, 436, 435,
970 434, 433, 432, 431, 430, 429, 427, 426, 424, 423,
971 421, 420, 418, 417, 415, 414, 412, 411, 409, 408,
972 407, 405, 404, 402, 401, 399, 398, 396, 395, 394,
973 392, 391, 389, 387, 385, 384, 382, 381, 379, 377,
974 376, 375, 374, 372, 371, 369, 368, 366, 365, 363,
976 362, 360, 359, 357, 356, 354, 353, 351, 350, 348,
977 347, 345, 344, 342, 341, 339, 338, 336, 335, 333,
978 332, 330, 329, 327, 326, 324, 322, 320, 319, 318,
979 317, 316, 315, 312, 311, 309, 301, 300, 298, 297,
980 296, 295, 294, 293, 288, 286, 285, 284, 283, 282,
981 281, 280, 279, 277, 275, 274, 272, 270, 269, 266,
982 265, 264, 263, 262, 261, 260, 258, 254, 253, 252,
983 251, 250, 249, 248, 247, 246, 245, 238, 237, 230,
984 225, 222, 217, 216, 215, 193, 191, 190, 189, 187,
985 172, 171, 170, 168, 167, 166, 165, 164, 158, 156,
987 155, 154, 153, 152, 151, 150, 149, 148, 145, 144,
988 143, 142, 141, 139, 138, 137, 135, 134, 131, 129,
989 127, 126, 125, 124, 123, 122, 121, 120, 119, 118,
990 115, 114, 113, 112, 110, 109, 107, 106, 105, 104,
991 103, 102, 101, 100, 98, 97, 96, 95, 94, 93,
992 91, 90, 89, 88, 87, 86, 85, 83, 82, 79,
993 78, 77, 76, 74, 73, 72, 56, 55, 52, 51,
994 38, 37, 35, 34, 33, 32, 31, 30, 28, 20,
995 8, 7, 3, 835, 835, 835, 835, 835, 835, 835,
996 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
998 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
999 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
1000 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
1001 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
1002 835, 835, 835, 835, 835, 835, 835, 835, 835, 835,
1006 /* The intent behind this definition is that it'll catch
1007 * any uses of REJECT which flex missed.
1009 #define REJECT reject_used_but_not_detected
1010 #define yymore() yymore_used_but_not_detected
1011 #define YY_MORE_ADJ 0
1012 #define YY_RESTORE_YY_MORE_OFFSET
1013 #line 1 "program_lexer.l"
1014 #line 2 "program_lexer.l"
1016 * Copyright © 2009 Intel Corporation
1018 * Permission is hereby granted, free of charge, to any person obtaining a
1019 * copy of this software and associated documentation files (the "Software"),
1020 * to deal in the Software without restriction, including without limitation
1021 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
1022 * and/or sell copies of the Software, and to permit persons to whom the
1023 * Software is furnished to do so, subject to the following conditions:
1025 * The above copyright notice and this permission notice (including the next
1026 * paragraph) shall be included in all copies or substantial portions of the
1029 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1030 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1031 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1032 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1033 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1034 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1035 * DEALINGS IN THE SOFTWARE.
1037 #include "main/glheader.h"
1038 #include "prog_instruction.h"
1040 #include "program_parser.h"
1041 #include "program_parse.tab.h"
1043 #define require_ARB_vp (yyextra->mode == ARB_vertex)
1044 #define require_ARB_fp (yyextra->mode == ARB_fragment)
1045 #define require_NV_fp (yyextra->option.NV_fragment)
1046 #define require_shadow (yyextra->option.Shadow)
1047 #define require_rect (yyextra->option.TexRect)
1048 #define require_texarray (yyextra->option.TexArray)
1050 #define return_token_or_IDENTIFIER(condition, token) \
1055 return handle_ident(yyextra, yytext, yylval); \
1059 #define return_token_or_DOT(condition, token) \
1070 #define return_opcode(condition, token, opcode, len) \
1073 _mesa_parse_instruction_suffix(yyextra, \
1075 & yylval->temp_inst)) { \
1076 yylval->temp_inst.Opcode = OPCODE_ ## opcode; \
1079 return handle_ident(yyextra, yytext, yylval); \
1083 #define SWIZZLE_INVAL MAKE_SWIZZLE4(SWIZZLE_NIL, SWIZZLE_NIL, \
1084 SWIZZLE_NIL, SWIZZLE_NIL)
1087 mask_from_char(char c
)
1108 swiz_from_char(char c
)
1129 handle_ident(struct asm_parser_state
*state
, const char *text
, YYSTYPE
*lval
)
1131 lval
->string
= strdup(text
);
1133 return (_mesa_symbol_table_find_symbol(state
->st
, 0, text
) == NULL
)
1134 ? IDENTIFIER
: USED_IDENTIFIER
;
1137 #define YY_USER_ACTION \
1139 yylloc->first_column = yylloc->last_column; \
1140 yylloc->last_column += yyleng; \
1141 if ((yylloc->first_line == 1) \
1142 && (yylloc->first_column == 1)) { \
1143 yylloc->position = 1; \
1145 yylloc->position += yylloc->last_column - yylloc->first_column; \
1149 #define YY_EXTRA_TYPE struct asm_parser_state *
1150 #line 1151 "lex.yy.c"
1154 #ifndef YY_NO_UNISTD_H
1155 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1156 * down here because we want the user's section 1 to have been scanned first.
1157 * The user has a chance to override it with an option.
1162 #ifndef YY_EXTRA_TYPE
1163 #define YY_EXTRA_TYPE void *
1166 /* Holds the entire state of the reentrant scanner. */
1170 /* User-defined. Not touched by flex. */
1171 YY_EXTRA_TYPE yyextra_r
;
1173 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1174 FILE *yyin_r
, *yyout_r
;
1175 size_t yy_buffer_stack_top
; /**< index of top of stack. */
1176 size_t yy_buffer_stack_max
; /**< capacity of stack. */
1177 YY_BUFFER_STATE
* yy_buffer_stack
; /**< Stack as an array. */
1184 int yy_did_buffer_switch_on_eof
;
1185 int yy_start_stack_ptr
;
1186 int yy_start_stack_depth
;
1187 int *yy_start_stack
;
1188 yy_state_type yy_last_accepting_state
;
1189 char* yy_last_accepting_cpos
;
1192 int yy_flex_debug_r
;
1202 }; /* end struct yyguts_t */
1204 static int yy_init_globals (yyscan_t yyscanner
);
1206 /* This must go here because YYSTYPE and YYLTYPE are included
1207 * from bison output in section 1.*/
1208 # define yylval yyg->yylval_r
1210 # define yylloc yyg->yylloc_r
1212 int yylex_init (yyscan_t
* scanner
);
1214 int yylex_init_extra (YY_EXTRA_TYPE user_defined
,yyscan_t
* scanner
);
1216 /* Accessor methods to globals.
1217 These are made visible to non-reentrant scanners for convenience. */
1219 int yylex_destroy (yyscan_t yyscanner
);
1221 int yyget_debug (yyscan_t yyscanner
);
1223 void yyset_debug (int debug_flag
,yyscan_t yyscanner
);
1225 YY_EXTRA_TYPE
yyget_extra (yyscan_t yyscanner
);
1227 void yyset_extra (YY_EXTRA_TYPE user_defined
,yyscan_t yyscanner
);
1229 FILE *yyget_in (yyscan_t yyscanner
);
1231 void yyset_in (FILE * in_str
,yyscan_t yyscanner
);
1233 FILE *yyget_out (yyscan_t yyscanner
);
1235 void yyset_out (FILE * out_str
,yyscan_t yyscanner
);
1237 int yyget_leng (yyscan_t yyscanner
);
1239 char *yyget_text (yyscan_t yyscanner
);
1241 int yyget_lineno (yyscan_t yyscanner
);
1243 void yyset_lineno (int line_number
,yyscan_t yyscanner
);
1245 YYSTYPE
* yyget_lval (yyscan_t yyscanner
);
1247 void yyset_lval (YYSTYPE
* yylval_param
,yyscan_t yyscanner
);
1249 YYLTYPE
*yyget_lloc (yyscan_t yyscanner
);
1251 void yyset_lloc (YYLTYPE
* yylloc_param
,yyscan_t yyscanner
);
1253 /* Macros after this point can all be overridden by user definitions in
1257 #ifndef YY_SKIP_YYWRAP
1259 extern "C" int yywrap (yyscan_t yyscanner
);
1261 extern int yywrap (yyscan_t yyscanner
);
1265 static void yyunput (int c
,char *buf_ptr
,yyscan_t yyscanner
);
1268 static void yy_flex_strncpy (char *,yyconst
char *,int ,yyscan_t yyscanner
);
1271 #ifdef YY_NEED_STRLEN
1272 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner
);
1278 static int yyinput (yyscan_t yyscanner
);
1280 static int input (yyscan_t yyscanner
);
1285 /* Amount of stuff to slurp up with each read. */
1286 #ifndef YY_READ_BUF_SIZE
1288 /* On IA-64, the buffer size is 16k, not 8k */
1289 #define YY_READ_BUF_SIZE 16384
1291 #define YY_READ_BUF_SIZE 8192
1292 #endif /* __ia64__ */
1295 /* Copy whatever the last rule matched to the standard output. */
1297 /* This used to be an fputs(), but since the string might contain NUL's,
1298 * we now use fwrite().
1300 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
1303 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1304 * is returned in "result".
1307 #define YY_INPUT(buf,result,max_size) \
1308 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1312 for ( n = 0; n < max_size && \
1313 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1314 buf[n] = (char) c; \
1316 buf[n++] = (char) c; \
1317 if ( c == EOF && ferror( yyin ) ) \
1318 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1324 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1326 if( errno != EINTR) \
1328 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1339 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1340 * we don't want an extra ';' after the "return" because that will cause
1341 * some compilers to complain about unreachable statements.
1344 #define yyterminate() return YY_NULL
1347 /* Number of entries by which start-condition stack grows. */
1348 #ifndef YY_START_STACK_INCR
1349 #define YY_START_STACK_INCR 25
1352 /* Report a fatal error. */
1353 #ifndef YY_FATAL_ERROR
1354 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1357 /* end tables serialization structures and prototypes */
1359 /* Default declaration of generated scanner - a define so the user can
1360 * easily add parameters.
1363 #define YY_DECL_IS_OURS 1
1366 (YYSTYPE
* yylval_param
,YYLTYPE
* yylloc_param
,yyscan_t yyscanner
);
1368 #define YY_DECL int yylex \
1369 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1370 #endif /* !YY_DECL */
1372 /* Code executed at the beginning of each rule, after yytext and yyleng
1375 #ifndef YY_USER_ACTION
1376 #define YY_USER_ACTION
1379 /* Code executed at the end of each rule. */
1381 #define YY_BREAK break;
1384 #define YY_RULE_SETUP \
1387 /** The main scanner function which does all the work.
1391 register yy_state_type yy_current_state
;
1392 register char *yy_cp
, *yy_bp
;
1393 register int yy_act
;
1394 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1396 #line 150 "program_lexer.l"
1399 #line 1400 "lex.yy.c"
1401 yylval
= yylval_param
;
1403 yylloc
= yylloc_param
;
1405 if ( !yyg
->yy_init
)
1413 if ( ! yyg
->yy_start
)
1414 yyg
->yy_start
= 1; /* first start state */
1422 if ( ! YY_CURRENT_BUFFER
) {
1423 yyensure_buffer_stack (yyscanner
);
1424 YY_CURRENT_BUFFER_LVALUE
=
1425 yy_create_buffer(yyin
,YY_BUF_SIZE
,yyscanner
);
1428 yy_load_buffer_state(yyscanner
);
1431 while ( 1 ) /* loops until end-of-file is reached */
1433 yy_cp
= yyg
->yy_c_buf_p
;
1435 /* Support of yytext. */
1436 *yy_cp
= yyg
->yy_hold_char
;
1438 /* yy_bp points to the position in yy_ch_buf of the start of
1443 yy_current_state
= yyg
->yy_start
;
1447 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
1448 if ( yy_accept
[yy_current_state
] )
1450 yyg
->yy_last_accepting_state
= yy_current_state
;
1451 yyg
->yy_last_accepting_cpos
= yy_cp
;
1453 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1455 yy_current_state
= (int) yy_def
[yy_current_state
];
1456 if ( yy_current_state
>= 836 )
1457 yy_c
= yy_meta
[(unsigned int) yy_c
];
1459 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1462 while ( yy_base
[yy_current_state
] != 1284 );
1465 yy_act
= yy_accept
[yy_current_state
];
1467 { /* have to back up */
1468 yy_cp
= yyg
->yy_last_accepting_cpos
;
1469 yy_current_state
= yyg
->yy_last_accepting_state
;
1470 yy_act
= yy_accept
[yy_current_state
];
1473 YY_DO_BEFORE_ACTION
;
1475 do_action
: /* This label is used only to access EOF actions. */
1478 { /* beginning of action switch */
1479 case 0: /* must back up */
1480 /* undo the effects of YY_DO_BEFORE_ACTION */
1481 *yy_cp
= yyg
->yy_hold_char
;
1482 yy_cp
= yyg
->yy_last_accepting_cpos
;
1483 yy_current_state
= yyg
->yy_last_accepting_state
;
1484 goto yy_find_action
;
1488 #line 152 "program_lexer.l"
1489 { return ARBvp_10
; }
1493 #line 153 "program_lexer.l"
1494 { return ARBfp_10
; }
1498 #line 154 "program_lexer.l"
1500 yylval
->integer
= at_address
;
1501 return_token_or_IDENTIFIER(require_ARB_vp
, ADDRESS
);
1506 #line 158 "program_lexer.l"
1511 #line 159 "program_lexer.l"
1516 #line 160 "program_lexer.l"
1521 #line 161 "program_lexer.l"
1526 #line 162 "program_lexer.l"
1531 #line 163 "program_lexer.l"
1536 #line 164 "program_lexer.l"
1537 { yylval
->integer
= at_temp
; return TEMP
; }
1541 #line 166 "program_lexer.l"
1542 { return_opcode( 1, VECTOR_OP
, ABS
, 3); }
1546 #line 167 "program_lexer.l"
1547 { return_opcode( 1, BIN_OP
, ADD
, 3); }
1551 #line 168 "program_lexer.l"
1552 { return_opcode(require_ARB_vp
, ARL
, ARL
, 3); }
1556 #line 170 "program_lexer.l"
1557 { return_opcode(require_ARB_fp
, TRI_OP
, CMP
, 3); }
1561 #line 171 "program_lexer.l"
1562 { return_opcode(require_ARB_fp
, SCALAR_OP
, COS
, 3); }
1566 #line 173 "program_lexer.l"
1567 { return_opcode(require_NV_fp
, VECTOR_OP
, DDX
, 3); }
1571 #line 174 "program_lexer.l"
1572 { return_opcode(require_NV_fp
, VECTOR_OP
, DDY
, 3); }
1576 #line 175 "program_lexer.l"
1577 { return_opcode( 1, BIN_OP
, DP3
, 3); }
1581 #line 176 "program_lexer.l"
1582 { return_opcode( 1, BIN_OP
, DP4
, 3); }
1586 #line 177 "program_lexer.l"
1587 { return_opcode( 1, BIN_OP
, DPH
, 3); }
1591 #line 178 "program_lexer.l"
1592 { return_opcode( 1, BIN_OP
, DST
, 3); }
1596 #line 180 "program_lexer.l"
1597 { return_opcode( 1, SCALAR_OP
, EX2
, 3); }
1601 #line 181 "program_lexer.l"
1602 { return_opcode(require_ARB_vp
, SCALAR_OP
, EXP
, 3); }
1606 #line 183 "program_lexer.l"
1607 { return_opcode( 1, VECTOR_OP
, FLR
, 3); }
1611 #line 184 "program_lexer.l"
1612 { return_opcode( 1, VECTOR_OP
, FRC
, 3); }
1616 #line 186 "program_lexer.l"
1617 { return_opcode(require_ARB_fp
, KIL
, KIL
, 3); }
1621 #line 188 "program_lexer.l"
1622 { return_opcode( 1, VECTOR_OP
, LIT
, 3); }
1626 #line 189 "program_lexer.l"
1627 { return_opcode( 1, SCALAR_OP
, LG2
, 3); }
1631 #line 190 "program_lexer.l"
1632 { return_opcode(require_ARB_vp
, SCALAR_OP
, LOG
, 3); }
1636 #line 191 "program_lexer.l"
1637 { return_opcode(require_ARB_fp
, TRI_OP
, LRP
, 3); }
1641 #line 193 "program_lexer.l"
1642 { return_opcode( 1, TRI_OP
, MAD
, 3); }
1646 #line 194 "program_lexer.l"
1647 { return_opcode( 1, BIN_OP
, MAX
, 3); }
1651 #line 195 "program_lexer.l"
1652 { return_opcode( 1, BIN_OP
, MIN
, 3); }
1656 #line 196 "program_lexer.l"
1657 { return_opcode( 1, VECTOR_OP
, MOV
, 3); }
1661 #line 197 "program_lexer.l"
1662 { return_opcode( 1, BIN_OP
, MUL
, 3); }
1666 #line 199 "program_lexer.l"
1667 { return_opcode(require_NV_fp
, VECTOR_OP
, PK2H
, 4); }
1671 #line 200 "program_lexer.l"
1672 { return_opcode(require_NV_fp
, VECTOR_OP
, PK2US
, 5); }
1676 #line 201 "program_lexer.l"
1677 { return_opcode(require_NV_fp
, VECTOR_OP
, PK4B
, 4); }
1681 #line 202 "program_lexer.l"
1682 { return_opcode(require_NV_fp
, VECTOR_OP
, PK4UB
, 5); }
1686 #line 203 "program_lexer.l"
1687 { return_opcode( 1, BINSC_OP
, POW
, 3); }
1691 #line 205 "program_lexer.l"
1692 { return_opcode( 1, SCALAR_OP
, RCP
, 3); }
1696 #line 206 "program_lexer.l"
1697 { return_opcode(require_NV_fp
, BIN_OP
, RFL
, 3); }
1701 #line 207 "program_lexer.l"
1702 { return_opcode( 1, SCALAR_OP
, RSQ
, 3); }
1706 #line 209 "program_lexer.l"
1707 { return_opcode(require_ARB_fp
, SCALAR_OP
, SCS
, 3); }
1711 #line 210 "program_lexer.l"
1712 { return_opcode(require_NV_fp
, BIN_OP
, SEQ
, 3); }
1716 #line 211 "program_lexer.l"
1717 { return_opcode(require_NV_fp
, BIN_OP
, SFL
, 3); }
1721 #line 212 "program_lexer.l"
1722 { return_opcode( 1, BIN_OP
, SGE
, 3); }
1726 #line 213 "program_lexer.l"
1727 { return_opcode(require_NV_fp
, BIN_OP
, SGT
, 3); }
1731 #line 214 "program_lexer.l"
1732 { return_opcode(require_ARB_fp
, SCALAR_OP
, SIN
, 3); }
1736 #line 215 "program_lexer.l"
1737 { return_opcode(require_NV_fp
, BIN_OP
, SLE
, 3); }
1741 #line 216 "program_lexer.l"
1742 { return_opcode( 1, BIN_OP
, SLT
, 3); }
1746 #line 217 "program_lexer.l"
1747 { return_opcode(require_NV_fp
, BIN_OP
, SNE
, 3); }
1751 #line 218 "program_lexer.l"
1752 { return_opcode(require_NV_fp
, BIN_OP
, STR
, 3); }
1756 #line 219 "program_lexer.l"
1757 { return_opcode( 1, BIN_OP
, SUB
, 3); }
1761 #line 220 "program_lexer.l"
1762 { return_opcode( 1, SWZ
, SWZ
, 3); }
1766 #line 222 "program_lexer.l"
1767 { return_opcode(require_ARB_fp
, SAMPLE_OP
, TEX
, 3); }
1771 #line 223 "program_lexer.l"
1772 { return_opcode(require_ARB_fp
, SAMPLE_OP
, TXB
, 3); }
1776 #line 224 "program_lexer.l"
1777 { return_opcode(require_NV_fp
, TXD_OP
, TXD
, 3); }
1781 #line 225 "program_lexer.l"
1782 { return_opcode(require_ARB_fp
, SAMPLE_OP
, TXP
, 3); }
1786 #line 227 "program_lexer.l"
1787 { return_opcode(require_NV_fp
, SCALAR_OP
, UP2H
, 4); }
1791 #line 228 "program_lexer.l"
1792 { return_opcode(require_NV_fp
, SCALAR_OP
, UP2US
, 5); }
1796 #line 230 "program_lexer.l"
1797 { return_opcode(require_NV_fp
, TRI_OP
, X2D
, 3); }
1801 #line 231 "program_lexer.l"
1802 { return_opcode( 1, BIN_OP
, XPD
, 3); }
1806 #line 233 "program_lexer.l"
1807 { return_token_or_IDENTIFIER(require_ARB_vp
, VERTEX
); }
1811 #line 234 "program_lexer.l"
1812 { return_token_or_IDENTIFIER(require_ARB_fp
, FRAGMENT
); }
1816 #line 235 "program_lexer.l"
1821 #line 236 "program_lexer.l"
1826 #line 237 "program_lexer.l"
1831 #line 239 "program_lexer.l"
1836 #line 240 "program_lexer.l"
1837 { return ATTENUATION
; }
1841 #line 241 "program_lexer.l"
1846 #line 242 "program_lexer.l"
1847 { return_token_or_DOT(require_ARB_vp
, CLIP
); }
1851 #line 243 "program_lexer.l"
1856 #line 244 "program_lexer.l"
1857 { return_token_or_DOT(require_ARB_fp
, DEPTH
); }
1861 #line 245 "program_lexer.l"
1866 #line 246 "program_lexer.l"
1867 { return DIRECTION
; }
1871 #line 247 "program_lexer.l"
1872 { return EMISSION
; }
1876 #line 248 "program_lexer.l"
1881 #line 249 "program_lexer.l"
1886 #line 250 "program_lexer.l"
1887 { return FOGCOORD
; }
1891 #line 251 "program_lexer.l"
1896 #line 252 "program_lexer.l"
1901 #line 253 "program_lexer.l"
1906 #line 254 "program_lexer.l"
1911 #line 255 "program_lexer.l"
1912 { return INVTRANS
; }
1916 #line 256 "program_lexer.l"
1921 #line 257 "program_lexer.l"
1922 { return LIGHTMODEL
; }
1926 #line 258 "program_lexer.l"
1927 { return LIGHTPROD
; }
1931 #line 259 "program_lexer.l"
1936 #line 260 "program_lexer.l"
1937 { return MATERIAL
; }
1941 #line 261 "program_lexer.l"
1942 { return MAT_PROGRAM
; }
1946 #line 262 "program_lexer.l"
1951 #line 263 "program_lexer.l"
1952 { return_token_or_DOT(require_ARB_vp
, MATRIXINDEX
); }
1956 #line 264 "program_lexer.l"
1957 { return MODELVIEW
; }
1961 #line 265 "program_lexer.l"
1966 #line 266 "program_lexer.l"
1967 { return_token_or_DOT(require_ARB_vp
, NORMAL
); }
1971 #line 267 "program_lexer.l"
1976 #line 268 "program_lexer.l"
1981 #line 269 "program_lexer.l"
1986 #line 270 "program_lexer.l"
1991 #line 271 "program_lexer.l"
1992 { return_token_or_DOT(require_ARB_vp
, POINT
); }
1996 #line 272 "program_lexer.l"
1997 { return_token_or_DOT(require_ARB_vp
, POINTSIZE
); }
2001 #line 273 "program_lexer.l"
2002 { return POSITION
; }
2006 #line 274 "program_lexer.l"
2011 #line 275 "program_lexer.l"
2012 { return PROJECTION
; }
2016 #line 276 "program_lexer.l"
2017 { return_token_or_DOT(require_ARB_fp
, RANGE
); }
2021 #line 277 "program_lexer.l"
2026 #line 278 "program_lexer.l"
2027 { return SCENECOLOR
; }
2031 #line 279 "program_lexer.l"
2032 { return SECONDARY
; }
2036 #line 280 "program_lexer.l"
2037 { return SHININESS
; }
2041 #line 281 "program_lexer.l"
2042 { return_token_or_DOT(require_ARB_vp
, SIZE
); }
2046 #line 282 "program_lexer.l"
2047 { return SPECULAR
; }
2051 #line 283 "program_lexer.l"
2056 #line 284 "program_lexer.l"
2057 { return TEXCOORD
; }
2061 #line 285 "program_lexer.l"
2062 { return_token_or_DOT(require_ARB_fp
, TEXENV
); }
2066 #line 286 "program_lexer.l"
2067 { return_token_or_DOT(require_ARB_vp
, TEXGEN
); }
2071 #line 287 "program_lexer.l"
2072 { return_token_or_DOT(require_ARB_vp
, TEXGEN_Q
); }
2076 #line 288 "program_lexer.l"
2077 { return_token_or_DOT(require_ARB_vp
, TEXGEN_S
); }
2081 #line 289 "program_lexer.l"
2082 { return_token_or_DOT(require_ARB_vp
, TEXGEN_T
); }
2086 #line 290 "program_lexer.l"
2091 #line 291 "program_lexer.l"
2092 { return TRANSPOSE
; }
2096 #line 292 "program_lexer.l"
2097 { return_token_or_DOT(require_ARB_vp
, VTXATTRIB
); }
2101 #line 293 "program_lexer.l"
2102 { return_token_or_DOT(require_ARB_vp
, WEIGHT
); }
2106 #line 295 "program_lexer.l"
2107 { return_token_or_IDENTIFIER(require_ARB_fp
, TEXTURE_UNIT
); }
2111 #line 296 "program_lexer.l"
2112 { return_token_or_IDENTIFIER(require_ARB_fp
, TEX_1D
); }
2116 #line 297 "program_lexer.l"
2117 { return_token_or_IDENTIFIER(require_ARB_fp
, TEX_2D
); }
2121 #line 298 "program_lexer.l"
2122 { return_token_or_IDENTIFIER(require_ARB_fp
, TEX_3D
); }
2126 #line 299 "program_lexer.l"
2127 { return_token_or_IDENTIFIER(require_ARB_fp
, TEX_CUBE
); }
2131 #line 300 "program_lexer.l"
2132 { return_token_or_IDENTIFIER(require_ARB_fp
&& require_rect
, TEX_RECT
); }
2136 #line 301 "program_lexer.l"
2137 { return_token_or_IDENTIFIER(require_ARB_fp
&& require_shadow
, TEX_SHADOW1D
); }
2141 #line 302 "program_lexer.l"
2142 { return_token_or_IDENTIFIER(require_ARB_fp
&& require_shadow
, TEX_SHADOW2D
); }
2146 #line 303 "program_lexer.l"
2147 { return_token_or_IDENTIFIER(require_ARB_fp
&& require_shadow
&& require_rect
, TEX_SHADOWRECT
); }
2151 #line 304 "program_lexer.l"
2152 { return_token_or_IDENTIFIER(require_ARB_fp
&& require_texarray
, TEX_ARRAY1D
); }
2156 #line 305 "program_lexer.l"
2157 { return_token_or_IDENTIFIER(require_ARB_fp
&& require_texarray
, TEX_ARRAY2D
); }
2161 #line 306 "program_lexer.l"
2162 { return_token_or_IDENTIFIER(require_ARB_fp
&& require_shadow
&& require_texarray
, TEX_ARRAYSHADOW1D
); }
2166 #line 307 "program_lexer.l"
2167 { return_token_or_IDENTIFIER(require_ARB_fp
&& require_shadow
&& require_texarray
, TEX_ARRAYSHADOW2D
); }
2171 #line 309 "program_lexer.l"
2172 { return handle_ident(yyextra
, yytext
, yylval
); }
2176 #line 311 "program_lexer.l"
2181 #line 313 "program_lexer.l"
2183 yylval
->integer
= strtol(yytext
, NULL
, 10);
2189 #line 317 "program_lexer.l"
2191 yylval
->real
= strtod(yytext
, NULL
);
2196 /* rule 141 can match eol */
2197 *yy_cp
= yyg
->yy_hold_char
; /* undo effects of setting up yytext */
2198 yyg
->yy_c_buf_p
= yy_cp
-= 1;
2199 YY_DO_BEFORE_ACTION
; /* set up yytext again */
2201 #line 321 "program_lexer.l"
2203 yylval
->real
= strtod(yytext
, NULL
);
2209 #line 325 "program_lexer.l"
2211 yylval
->real
= strtod(yytext
, NULL
);
2217 #line 329 "program_lexer.l"
2219 yylval
->real
= strtod(yytext
, NULL
);
2225 #line 334 "program_lexer.l"
2227 yylval
->swiz_mask
.swizzle
= SWIZZLE_NOOP
;
2228 yylval
->swiz_mask
.mask
= WRITEMASK_XYZW
;
2234 #line 340 "program_lexer.l"
2236 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2237 yylval
->swiz_mask
.mask
= WRITEMASK_XY
2238 | mask_from_char(yytext
[3]);
2244 #line 346 "program_lexer.l"
2246 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2247 yylval
->swiz_mask
.mask
= WRITEMASK_XZW
;
2253 #line 351 "program_lexer.l"
2255 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2256 yylval
->swiz_mask
.mask
= WRITEMASK_YZW
;
2262 #line 357 "program_lexer.l"
2264 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2265 yylval
->swiz_mask
.mask
= WRITEMASK_X
2266 | mask_from_char(yytext
[2]);
2272 #line 363 "program_lexer.l"
2274 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2275 yylval
->swiz_mask
.mask
= WRITEMASK_Y
2276 | mask_from_char(yytext
[2]);
2282 #line 369 "program_lexer.l"
2284 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2285 yylval
->swiz_mask
.mask
= WRITEMASK_ZW
;
2291 #line 375 "program_lexer.l"
2293 const unsigned s
= swiz_from_char(yytext
[1]);
2294 yylval
->swiz_mask
.swizzle
= MAKE_SWIZZLE4(s
, s
, s
, s
);
2295 yylval
->swiz_mask
.mask
= mask_from_char(yytext
[1]);
2301 #line 382 "program_lexer.l"
2303 yylval
->swiz_mask
.swizzle
= MAKE_SWIZZLE4(swiz_from_char(yytext
[1]),
2304 swiz_from_char(yytext
[2]),
2305 swiz_from_char(yytext
[3]),
2306 swiz_from_char(yytext
[4]));
2307 yylval
->swiz_mask
.mask
= 0;
2313 #line 391 "program_lexer.l"
2315 yylval
->swiz_mask
.swizzle
= SWIZZLE_NOOP
;
2316 yylval
->swiz_mask
.mask
= WRITEMASK_XYZW
;
2317 return_token_or_DOT(require_ARB_fp
, MASK4
);
2322 #line 397 "program_lexer.l"
2324 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2325 yylval
->swiz_mask
.mask
= WRITEMASK_XY
2326 | mask_from_char(yytext
[3]);
2327 return_token_or_DOT(require_ARB_fp
, MASK3
);
2332 #line 403 "program_lexer.l"
2334 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2335 yylval
->swiz_mask
.mask
= WRITEMASK_XZW
;
2336 return_token_or_DOT(require_ARB_fp
, MASK3
);
2341 #line 408 "program_lexer.l"
2343 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2344 yylval
->swiz_mask
.mask
= WRITEMASK_YZW
;
2345 return_token_or_DOT(require_ARB_fp
, MASK3
);
2350 #line 414 "program_lexer.l"
2352 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2353 yylval
->swiz_mask
.mask
= WRITEMASK_X
2354 | mask_from_char(yytext
[2]);
2355 return_token_or_DOT(require_ARB_fp
, MASK2
);
2360 #line 420 "program_lexer.l"
2362 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2363 yylval
->swiz_mask
.mask
= WRITEMASK_Y
2364 | mask_from_char(yytext
[2]);
2365 return_token_or_DOT(require_ARB_fp
, MASK2
);
2370 #line 426 "program_lexer.l"
2372 yylval
->swiz_mask
.swizzle
= SWIZZLE_INVAL
;
2373 yylval
->swiz_mask
.mask
= WRITEMASK_ZW
;
2374 return_token_or_DOT(require_ARB_fp
, MASK2
);
2379 #line 432 "program_lexer.l"
2381 const unsigned s
= swiz_from_char(yytext
[1]);
2382 yylval
->swiz_mask
.swizzle
= MAKE_SWIZZLE4(s
, s
, s
, s
);
2383 yylval
->swiz_mask
.mask
= mask_from_char(yytext
[1]);
2384 return_token_or_DOT(require_ARB_fp
, MASK1
);
2389 #line 440 "program_lexer.l"
2391 if (require_ARB_vp
) {
2394 yylval
->swiz_mask
.swizzle
= MAKE_SWIZZLE4(SWIZZLE_X
, SWIZZLE_X
,
2395 SWIZZLE_X
, SWIZZLE_X
);
2396 yylval
->swiz_mask
.mask
= WRITEMASK_X
;
2403 #line 451 "program_lexer.l"
2405 yylval
->swiz_mask
.swizzle
= MAKE_SWIZZLE4(swiz_from_char(yytext
[1]),
2406 swiz_from_char(yytext
[2]),
2407 swiz_from_char(yytext
[3]),
2408 swiz_from_char(yytext
[4]));
2409 yylval
->swiz_mask
.mask
= 0;
2410 return_token_or_DOT(require_ARB_fp
, SWIZZLE
);
2415 #line 460 "program_lexer.l"
2419 /* rule 164 can match eol */
2421 #line 462 "program_lexer.l"
2423 yylloc
->first_line
++;
2424 yylloc
->first_column
= 1;
2425 yylloc
->last_line
++;
2426 yylloc
->last_column
= 1;
2432 #line 469 "program_lexer.l"
2433 /* eat whitespace */ ;
2436 *yy_cp
= yyg
->yy_hold_char
; /* undo effects of setting up yytext */
2437 yyg
->yy_c_buf_p
= yy_cp
-= 1;
2438 YY_DO_BEFORE_ACTION
; /* set up yytext again */
2440 #line 470 "program_lexer.l"
2441 /* eat comments */ ;
2445 #line 471 "program_lexer.l"
2446 { return yytext
[0]; }
2450 #line 472 "program_lexer.l"
2453 #line 2454 "lex.yy.c"
2454 case YY_STATE_EOF(INITIAL
):
2457 case YY_END_OF_BUFFER
:
2459 /* Amount of text matched not including the EOB char. */
2460 int yy_amount_of_matched_text
= (int) (yy_cp
- yyg
->yytext_ptr
) - 1;
2462 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2463 *yy_cp
= yyg
->yy_hold_char
;
2464 YY_RESTORE_YY_MORE_OFFSET
2466 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
2468 /* We're scanning a new file or input source. It's
2469 * possible that this happened because the user
2470 * just pointed yyin at a new source and called
2471 * yylex(). If so, then we have to assure
2472 * consistency between YY_CURRENT_BUFFER and our
2473 * globals. Here is the right place to do so, because
2474 * this is the first action (other than possibly a
2475 * back-up) that will match for the new input source.
2477 yyg
->yy_n_chars
= YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2478 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
2479 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
2482 /* Note that here we test for yy_c_buf_p "<=" to the position
2483 * of the first EOB in the buffer, since yy_c_buf_p will
2484 * already have been incremented past the NUL character
2485 * (since all states make transitions on EOB to the
2486 * end-of-buffer state). Contrast this with the test
2489 if ( yyg
->yy_c_buf_p
<= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] )
2490 { /* This was really a NUL. */
2491 yy_state_type yy_next_state
;
2493 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ yy_amount_of_matched_text
;
2495 yy_current_state
= yy_get_previous_state( yyscanner
);
2497 /* Okay, we're now positioned to make the NUL
2498 * transition. We couldn't have
2499 * yy_get_previous_state() go ahead and do it
2500 * for us because it doesn't know how to deal
2501 * with the possibility of jamming (and we don't
2502 * want to build jamming into it because then it
2503 * will run more slowly).
2506 yy_next_state
= yy_try_NUL_trans( yy_current_state
, yyscanner
);
2508 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
2510 if ( yy_next_state
)
2512 /* Consume the NUL. */
2513 yy_cp
= ++yyg
->yy_c_buf_p
;
2514 yy_current_state
= yy_next_state
;
2520 yy_cp
= yyg
->yy_c_buf_p
;
2521 goto yy_find_action
;
2525 else switch ( yy_get_next_buffer( yyscanner
) )
2527 case EOB_ACT_END_OF_FILE
:
2529 yyg
->yy_did_buffer_switch_on_eof
= 0;
2531 if ( yywrap(yyscanner
) )
2533 /* Note: because we've taken care in
2534 * yy_get_next_buffer() to have set up
2535 * yytext, we can now set up
2536 * yy_c_buf_p so that if some total
2537 * hoser (like flex itself) wants to
2538 * call the scanner after we return the
2539 * YY_NULL, it'll still work - another
2540 * YY_NULL will get returned.
2542 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
2544 yy_act
= YY_STATE_EOF(YY_START
);
2550 if ( ! yyg
->yy_did_buffer_switch_on_eof
)
2556 case EOB_ACT_CONTINUE_SCAN
:
2558 yyg
->yytext_ptr
+ yy_amount_of_matched_text
;
2560 yy_current_state
= yy_get_previous_state( yyscanner
);
2562 yy_cp
= yyg
->yy_c_buf_p
;
2563 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
2566 case EOB_ACT_LAST_MATCH
:
2568 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
];
2570 yy_current_state
= yy_get_previous_state( yyscanner
);
2572 yy_cp
= yyg
->yy_c_buf_p
;
2573 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
2574 goto yy_find_action
;
2581 "fatal flex scanner internal error--no action found" );
2582 } /* end of action switch */
2583 } /* end of scanning one token */
2584 } /* end of yylex */
2586 /* yy_get_next_buffer - try to read in a new buffer
2588 * Returns a code representing an action:
2589 * EOB_ACT_LAST_MATCH -
2590 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2591 * EOB_ACT_END_OF_FILE - end of file
2593 static int yy_get_next_buffer (yyscan_t yyscanner
)
2595 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2596 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
2597 register char *source
= yyg
->yytext_ptr
;
2598 register int number_to_move
, i
;
2601 if ( yyg
->yy_c_buf_p
> &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
+ 1] )
2603 "fatal flex scanner internal error--end of buffer missed" );
2605 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
2606 { /* Don't try to fill the buffer, so this is an EOF. */
2607 if ( yyg
->yy_c_buf_p
- yyg
->yytext_ptr
- YY_MORE_ADJ
== 1 )
2609 /* We matched a single character, the EOB, so
2610 * treat this as a final EOF.
2612 return EOB_ACT_END_OF_FILE
;
2617 /* We matched some text prior to the EOB, first
2620 return EOB_ACT_LAST_MATCH
;
2624 /* Try to read more data. */
2626 /* First move last chars to start of buffer. */
2627 number_to_move
= (int) (yyg
->yy_c_buf_p
- yyg
->yytext_ptr
) - 1;
2629 for ( i
= 0; i
< number_to_move
; ++i
)
2630 *(dest
++) = *(source
++);
2632 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
2633 /* don't do the read, it's not guaranteed to return an EOF,
2636 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
= 0;
2641 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
2643 while ( num_to_read
<= 0 )
2644 { /* Not enough room in the buffer - grow it. */
2646 /* just a shorter name for the current buffer */
2647 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
2649 int yy_c_buf_p_offset
=
2650 (int) (yyg
->yy_c_buf_p
- b
->yy_ch_buf
);
2652 if ( b
->yy_is_our_buffer
)
2654 int new_size
= b
->yy_buf_size
* 2;
2656 if ( new_size
<= 0 )
2657 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
2659 b
->yy_buf_size
*= 2;
2661 b
->yy_ch_buf
= (char *)
2662 /* Include room in for 2 EOB chars. */
2663 yyrealloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 ,yyscanner
);
2666 /* Can't grow it, we don't own it. */
2669 if ( ! b
->yy_ch_buf
)
2671 "fatal error - scanner input buffer overflow" );
2673 yyg
->yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
2675 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
2680 if ( num_to_read
> YY_READ_BUF_SIZE
)
2681 num_to_read
= YY_READ_BUF_SIZE
;
2683 /* Read in more data. */
2684 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
2685 yyg
->yy_n_chars
, (size_t) num_to_read
);
2687 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
2690 if ( yyg
->yy_n_chars
== 0 )
2692 if ( number_to_move
== YY_MORE_ADJ
)
2694 ret_val
= EOB_ACT_END_OF_FILE
;
2695 yyrestart(yyin
,yyscanner
);
2700 ret_val
= EOB_ACT_LAST_MATCH
;
2701 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
2702 YY_BUFFER_EOF_PENDING
;
2707 ret_val
= EOB_ACT_CONTINUE_SCAN
;
2709 if ((yy_size_t
) (yyg
->yy_n_chars
+ number_to_move
) > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
2710 /* Extend the array by 50%, plus the number we really need. */
2711 yy_size_t new_size
= yyg
->yy_n_chars
+ number_to_move
+ (yyg
->yy_n_chars
>> 1);
2712 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
,new_size
,yyscanner
);
2713 if ( ! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2714 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2717 yyg
->yy_n_chars
+= number_to_move
;
2718 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
2719 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
2721 yyg
->yytext_ptr
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
2726 /* yy_get_previous_state - get the state just before the EOB char was reached */
2728 static yy_state_type
yy_get_previous_state (yyscan_t yyscanner
)
2730 register yy_state_type yy_current_state
;
2731 register char *yy_cp
;
2732 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2734 yy_current_state
= yyg
->yy_start
;
2736 for ( yy_cp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yyg
->yy_c_buf_p
; ++yy_cp
)
2738 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
2739 if ( yy_accept
[yy_current_state
] )
2741 yyg
->yy_last_accepting_state
= yy_current_state
;
2742 yyg
->yy_last_accepting_cpos
= yy_cp
;
2744 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2746 yy_current_state
= (int) yy_def
[yy_current_state
];
2747 if ( yy_current_state
>= 836 )
2748 yy_c
= yy_meta
[(unsigned int) yy_c
];
2750 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2753 return yy_current_state
;
2756 /* yy_try_NUL_trans - try to make a transition on the NUL character
2759 * next_state = yy_try_NUL_trans( current_state );
2761 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
, yyscan_t yyscanner
)
2763 register int yy_is_jam
;
2764 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
; /* This var may be unused depending upon options. */
2765 register char *yy_cp
= yyg
->yy_c_buf_p
;
2767 register YY_CHAR yy_c
= 1;
2768 if ( yy_accept
[yy_current_state
] )
2770 yyg
->yy_last_accepting_state
= yy_current_state
;
2771 yyg
->yy_last_accepting_cpos
= yy_cp
;
2773 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2775 yy_current_state
= (int) yy_def
[yy_current_state
];
2776 if ( yy_current_state
>= 836 )
2777 yy_c
= yy_meta
[(unsigned int) yy_c
];
2779 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2780 yy_is_jam
= (yy_current_state
== 835);
2782 return yy_is_jam
? 0 : yy_current_state
;
2785 static void yyunput (int c
, register char * yy_bp
, yyscan_t yyscanner
)
2787 register char *yy_cp
;
2788 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2790 yy_cp
= yyg
->yy_c_buf_p
;
2792 /* undo effects of setting up yytext */
2793 *yy_cp
= yyg
->yy_hold_char
;
2795 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2796 { /* need to shift things up to make room */
2797 /* +2 for EOB chars. */
2798 register int number_to_move
= yyg
->yy_n_chars
+ 2;
2799 register char *dest
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[
2800 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
+ 2];
2801 register char *source
=
2802 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
];
2804 while ( source
> YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2805 *--dest
= *--source
;
2807 yy_cp
+= (int) (dest
- source
);
2808 yy_bp
+= (int) (dest
- source
);
2809 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
=
2810 yyg
->yy_n_chars
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
;
2812 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2813 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2816 *--yy_cp
= (char) c
;
2818 yyg
->yytext_ptr
= yy_bp
;
2819 yyg
->yy_hold_char
= *yy_cp
;
2820 yyg
->yy_c_buf_p
= yy_cp
;
2825 static int yyinput (yyscan_t yyscanner
)
2827 static int input (yyscan_t yyscanner
)
2832 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2834 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
2836 if ( *yyg
->yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
2838 /* yy_c_buf_p now points to the character we want to return.
2839 * If this occurs *before* the EOB characters, then it's a
2840 * valid NUL; if not, then we've hit the end of the buffer.
2842 if ( yyg
->yy_c_buf_p
< &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] )
2843 /* This was really a NUL. */
2844 *yyg
->yy_c_buf_p
= '\0';
2847 { /* need more input */
2848 int offset
= yyg
->yy_c_buf_p
- yyg
->yytext_ptr
;
2851 switch ( yy_get_next_buffer( yyscanner
) )
2853 case EOB_ACT_LAST_MATCH
:
2854 /* This happens because yy_g_n_b()
2855 * sees that we've accumulated a
2856 * token and flags that we need to
2857 * try matching the token before
2858 * proceeding. But for input(),
2859 * there's no matching to consider.
2860 * So convert the EOB_ACT_LAST_MATCH
2861 * to EOB_ACT_END_OF_FILE.
2864 /* Reset buffer status. */
2865 yyrestart(yyin
,yyscanner
);
2869 case EOB_ACT_END_OF_FILE
:
2871 if ( yywrap(yyscanner
) )
2874 if ( ! yyg
->yy_did_buffer_switch_on_eof
)
2877 return yyinput(yyscanner
);
2879 return input(yyscanner
);
2883 case EOB_ACT_CONTINUE_SCAN
:
2884 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ offset
;
2890 c
= *(unsigned char *) yyg
->yy_c_buf_p
; /* cast for 8-bit char's */
2891 *yyg
->yy_c_buf_p
= '\0'; /* preserve yytext */
2892 yyg
->yy_hold_char
= *++yyg
->yy_c_buf_p
;
2896 #endif /* ifndef YY_NO_INPUT */
2898 /** Immediately switch to a different input stream.
2899 * @param input_file A readable stream.
2900 * @param yyscanner The scanner object.
2901 * @note This function does not reset the start condition to @c INITIAL .
2903 void yyrestart (FILE * input_file
, yyscan_t yyscanner
)
2905 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2907 if ( ! YY_CURRENT_BUFFER
){
2908 yyensure_buffer_stack (yyscanner
);
2909 YY_CURRENT_BUFFER_LVALUE
=
2910 yy_create_buffer(yyin
,YY_BUF_SIZE
,yyscanner
);
2913 yy_init_buffer(YY_CURRENT_BUFFER
,input_file
,yyscanner
);
2914 yy_load_buffer_state(yyscanner
);
2917 /** Switch to a different input buffer.
2918 * @param new_buffer The new input buffer.
2919 * @param yyscanner The scanner object.
2921 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
, yyscan_t yyscanner
)
2923 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2925 /* TODO. We should be able to replace this entire function body
2927 * yypop_buffer_state();
2928 * yypush_buffer_state(new_buffer);
2930 yyensure_buffer_stack (yyscanner
);
2931 if ( YY_CURRENT_BUFFER
== new_buffer
)
2934 if ( YY_CURRENT_BUFFER
)
2936 /* Flush out information for old buffer. */
2937 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
2938 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= yyg
->yy_c_buf_p
;
2939 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
2942 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2943 yy_load_buffer_state(yyscanner
);
2945 /* We don't actually know whether we did this switch during
2946 * EOF (yywrap()) processing, but the only time this flag
2947 * is looked at is after yywrap() is called, so it's safe
2948 * to go ahead and always set it.
2950 yyg
->yy_did_buffer_switch_on_eof
= 1;
2953 static void yy_load_buffer_state (yyscan_t yyscanner
)
2955 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2956 yyg
->yy_n_chars
= YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2957 yyg
->yytext_ptr
= yyg
->yy_c_buf_p
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
2958 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
2959 yyg
->yy_hold_char
= *yyg
->yy_c_buf_p
;
2962 /** Allocate and initialize an input buffer state.
2963 * @param file A readable stream.
2964 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2965 * @param yyscanner The scanner object.
2966 * @return the allocated buffer state.
2968 YY_BUFFER_STATE
yy_create_buffer (FILE * file
, int size
, yyscan_t yyscanner
)
2972 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) ,yyscanner
);
2974 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2976 b
->yy_buf_size
= size
;
2978 /* yy_ch_buf has to be 2 characters longer than the size given because
2979 * we need to put in 2 end-of-buffer characters.
2981 b
->yy_ch_buf
= (char *) yyalloc(b
->yy_buf_size
+ 2 ,yyscanner
);
2982 if ( ! b
->yy_ch_buf
)
2983 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2985 b
->yy_is_our_buffer
= 1;
2987 yy_init_buffer(b
,file
,yyscanner
);
2992 /** Destroy the buffer.
2993 * @param b a buffer created with yy_create_buffer()
2994 * @param yyscanner The scanner object.
2996 void yy_delete_buffer (YY_BUFFER_STATE b
, yyscan_t yyscanner
)
2998 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3003 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
3004 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
3006 if ( b
->yy_is_our_buffer
)
3007 yyfree((void *) b
->yy_ch_buf
,yyscanner
);
3009 yyfree((void *) b
,yyscanner
);
3012 /* Initializes or reinitializes a buffer.
3013 * This function is sometimes called more than once on the same buffer,
3014 * such as during a yyrestart() or at EOF.
3016 static void yy_init_buffer (YY_BUFFER_STATE b
, FILE * file
, yyscan_t yyscanner
)
3020 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3022 yy_flush_buffer(b
,yyscanner
);
3024 b
->yy_input_file
= file
;
3025 b
->yy_fill_buffer
= 1;
3027 /* If b is the current buffer, then yy_init_buffer was _probably_
3028 * called from yyrestart() or through yy_get_next_buffer.
3029 * In that case, we don't want to reset the lineno or column.
3031 if (b
!= YY_CURRENT_BUFFER
){
3032 b
->yy_bs_lineno
= 1;
3033 b
->yy_bs_column
= 0;
3036 b
->yy_is_interactive
= 0;
3041 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3042 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3043 * @param yyscanner The scanner object.
3045 void yy_flush_buffer (YY_BUFFER_STATE b
, yyscan_t yyscanner
)
3047 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3053 /* We always need two end-of-buffer characters. The first causes
3054 * a transition to the end-of-buffer state. The second causes
3055 * a jam in that state.
3057 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
3058 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
3060 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
3063 b
->yy_buffer_status
= YY_BUFFER_NEW
;
3065 if ( b
== YY_CURRENT_BUFFER
)
3066 yy_load_buffer_state(yyscanner
);
3069 /** Pushes the new state onto the stack. The new state becomes
3070 * the current state. This function will allocate the stack
3072 * @param new_buffer The new state.
3073 * @param yyscanner The scanner object.
3075 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
, yyscan_t yyscanner
)
3077 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3078 if (new_buffer
== NULL
)
3081 yyensure_buffer_stack(yyscanner
);
3083 /* This block is copied from yy_switch_to_buffer. */
3084 if ( YY_CURRENT_BUFFER
)
3086 /* Flush out information for old buffer. */
3087 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
3088 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= yyg
->yy_c_buf_p
;
3089 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
3092 /* Only push if top exists. Otherwise, replace top. */
3093 if (YY_CURRENT_BUFFER
)
3094 yyg
->yy_buffer_stack_top
++;
3095 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
3097 /* copied from yy_switch_to_buffer. */
3098 yy_load_buffer_state(yyscanner
);
3099 yyg
->yy_did_buffer_switch_on_eof
= 1;
3102 /** Removes and deletes the top of the stack, if present.
3103 * The next element becomes the new top.
3104 * @param yyscanner The scanner object.
3106 void yypop_buffer_state (yyscan_t yyscanner
)
3108 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3109 if (!YY_CURRENT_BUFFER
)
3112 yy_delete_buffer(YY_CURRENT_BUFFER
,yyscanner
);
3113 YY_CURRENT_BUFFER_LVALUE
= NULL
;
3114 if (yyg
->yy_buffer_stack_top
> 0)
3115 --yyg
->yy_buffer_stack_top
;
3117 if (YY_CURRENT_BUFFER
) {
3118 yy_load_buffer_state(yyscanner
);
3119 yyg
->yy_did_buffer_switch_on_eof
= 1;
3123 /* Allocates the stack if it does not exist.
3124 * Guarantees space for at least one push.
3126 static void yyensure_buffer_stack (yyscan_t yyscanner
)
3129 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3131 if (!yyg
->yy_buffer_stack
) {
3133 /* First allocation is just for 2 elements, since we don't know if this
3134 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3135 * immediate realloc on the next call.
3138 yyg
->yy_buffer_stack
= (struct yy_buffer_state
**)yyalloc
3139 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
3141 if ( ! yyg
->yy_buffer_stack
)
3142 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3144 memset(yyg
->yy_buffer_stack
, 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
3146 yyg
->yy_buffer_stack_max
= num_to_alloc
;
3147 yyg
->yy_buffer_stack_top
= 0;
3151 if (yyg
->yy_buffer_stack_top
>= (yyg
->yy_buffer_stack_max
) - 1){
3153 /* Increase the buffer to prepare for a possible push. */
3154 int grow_size
= 8 /* arbitrary grow size */;
3156 num_to_alloc
= yyg
->yy_buffer_stack_max
+ grow_size
;
3157 yyg
->yy_buffer_stack
= (struct yy_buffer_state
**)yyrealloc
3158 (yyg
->yy_buffer_stack
,
3159 num_to_alloc
* sizeof(struct yy_buffer_state
*)
3161 if ( ! yyg
->yy_buffer_stack
)
3162 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3164 /* zero only the new slots.*/
3165 memset(yyg
->yy_buffer_stack
+ yyg
->yy_buffer_stack_max
, 0, grow_size
* sizeof(struct yy_buffer_state
*));
3166 yyg
->yy_buffer_stack_max
= num_to_alloc
;
3170 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3171 * @param base the character buffer
3172 * @param size the size in bytes of the character buffer
3173 * @param yyscanner The scanner object.
3174 * @return the newly allocated buffer state object.
3176 YY_BUFFER_STATE
yy_scan_buffer (char * base
, yy_size_t size
, yyscan_t yyscanner
)
3181 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
3182 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
3183 /* They forgot to leave room for the EOB's. */
3186 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) ,yyscanner
);
3188 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3190 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
3191 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
3192 b
->yy_is_our_buffer
= 0;
3193 b
->yy_input_file
= 0;
3194 b
->yy_n_chars
= b
->yy_buf_size
;
3195 b
->yy_is_interactive
= 0;
3197 b
->yy_fill_buffer
= 0;
3198 b
->yy_buffer_status
= YY_BUFFER_NEW
;
3200 yy_switch_to_buffer(b
,yyscanner
);
3205 /** Setup the input buffer state to scan a string. The next call to yylex() will
3206 * scan from a @e copy of @a str.
3207 * @param yystr a NUL-terminated string to scan
3208 * @param yyscanner The scanner object.
3209 * @return the newly allocated buffer state object.
3210 * @note If you want to scan bytes that may contain NUL values, then use
3211 * yy_scan_bytes() instead.
3213 YY_BUFFER_STATE
yy_scan_string (yyconst
char * yystr
, yyscan_t yyscanner
)
3216 return yy_scan_bytes(yystr
,strlen(yystr
) ,yyscanner
);
3219 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3220 * scan from a @e copy of @a bytes.
3221 * @param yybytes the byte buffer to scan
3222 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
3223 * @param yyscanner The scanner object.
3224 * @return the newly allocated buffer state object.
3226 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char * yybytes
, int _yybytes_len
, yyscan_t yyscanner
)
3233 /* Get memory for full buffer, including space for trailing EOB's. */
3234 n
= _yybytes_len
+ 2;
3235 buf
= (char *) yyalloc(n
,yyscanner
);
3237 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3239 for ( i
= 0; i
< _yybytes_len
; ++i
)
3240 buf
[i
] = yybytes
[i
];
3242 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
3244 b
= yy_scan_buffer(buf
,n
,yyscanner
);
3246 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3248 /* It's okay to grow etc. this buffer, and we should throw it
3249 * away when we're done.
3251 b
->yy_is_our_buffer
= 1;
3256 #ifndef YY_EXIT_FAILURE
3257 #define YY_EXIT_FAILURE 2
3260 static void yy_fatal_error (yyconst
char* msg
, yyscan_t yyscanner
)
3262 (void) fprintf( stderr
, "%s\n", msg
);
3263 exit( YY_EXIT_FAILURE
);
3266 /* Redefine yyless() so it works in section 3 code. */
3272 /* Undo effects of setting up yytext. */ \
3273 int yyless_macro_arg = (n); \
3274 YY_LESS_LINENO(yyless_macro_arg);\
3275 yytext[yyleng] = yyg->yy_hold_char; \
3276 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
3277 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
3278 *yyg->yy_c_buf_p = '\0'; \
3279 yyleng = yyless_macro_arg; \
3283 /* Accessor methods (get/set functions) to struct members. */
3285 /** Get the user-defined data for this scanner.
3286 * @param yyscanner The scanner object.
3288 YY_EXTRA_TYPE
yyget_extra (yyscan_t yyscanner
)
3290 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3294 /** Get the current line number.
3295 * @param yyscanner The scanner object.
3297 int yyget_lineno (yyscan_t yyscanner
)
3299 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3301 if (! YY_CURRENT_BUFFER
)
3307 /** Get the current column number.
3308 * @param yyscanner The scanner object.
3310 int yyget_column (yyscan_t yyscanner
)
3312 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3314 if (! YY_CURRENT_BUFFER
)
3320 /** Get the input stream.
3321 * @param yyscanner The scanner object.
3323 FILE *yyget_in (yyscan_t yyscanner
)
3325 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3329 /** Get the output stream.
3330 * @param yyscanner The scanner object.
3332 FILE *yyget_out (yyscan_t yyscanner
)
3334 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3338 /** Get the length of the current token.
3339 * @param yyscanner The scanner object.
3341 int yyget_leng (yyscan_t yyscanner
)
3343 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3347 /** Get the current token.
3348 * @param yyscanner The scanner object.
3351 char *yyget_text (yyscan_t yyscanner
)
3353 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3357 /** Set the user-defined data. This data is never touched by the scanner.
3358 * @param user_defined The data to be associated with this scanner.
3359 * @param yyscanner The scanner object.
3361 void yyset_extra (YY_EXTRA_TYPE user_defined
, yyscan_t yyscanner
)
3363 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3364 yyextra
= user_defined
;
3367 /** Set the current line number.
3368 * @param line_number
3369 * @param yyscanner The scanner object.
3371 void yyset_lineno (int line_number
, yyscan_t yyscanner
)
3373 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3375 /* lineno is only valid if an input buffer exists. */
3376 if (! YY_CURRENT_BUFFER
)
3377 yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner
);
3379 yylineno
= line_number
;
3382 /** Set the current column.
3383 * @param line_number
3384 * @param yyscanner The scanner object.
3386 void yyset_column (int column_no
, yyscan_t yyscanner
)
3388 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3390 /* column is only valid if an input buffer exists. */
3391 if (! YY_CURRENT_BUFFER
)
3392 yy_fatal_error( "yyset_column called with no buffer" , yyscanner
);
3394 yycolumn
= column_no
;
3397 /** Set the input stream. This does not discard the current
3399 * @param in_str A readable stream.
3400 * @param yyscanner The scanner object.
3401 * @see yy_switch_to_buffer
3403 void yyset_in (FILE * in_str
, yyscan_t yyscanner
)
3405 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3409 void yyset_out (FILE * out_str
, yyscan_t yyscanner
)
3411 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3415 int yyget_debug (yyscan_t yyscanner
)
3417 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3418 return yy_flex_debug
;
3421 void yyset_debug (int bdebug
, yyscan_t yyscanner
)
3423 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3424 yy_flex_debug
= bdebug
;
3427 /* Accessor methods for yylval and yylloc */
3429 YYSTYPE
* yyget_lval (yyscan_t yyscanner
)
3431 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3435 void yyset_lval (YYSTYPE
* yylval_param
, yyscan_t yyscanner
)
3437 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3438 yylval
= yylval_param
;
3441 YYLTYPE
*yyget_lloc (yyscan_t yyscanner
)
3443 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3447 void yyset_lloc (YYLTYPE
* yylloc_param
, yyscan_t yyscanner
)
3449 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3450 yylloc
= yylloc_param
;
3453 /* User-visible API */
3455 /* yylex_init is special because it creates the scanner itself, so it is
3456 * the ONLY reentrant function that doesn't take the scanner as the last argument.
3457 * That's why we explicitly handle the declaration, instead of using our macros.
3460 int yylex_init(yyscan_t
* ptr_yy_globals
)
3463 if (ptr_yy_globals
== NULL
){
3468 *ptr_yy_globals
= (yyscan_t
) yyalloc ( sizeof( struct yyguts_t
), NULL
);
3470 if (*ptr_yy_globals
== NULL
){
3475 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
3476 memset(*ptr_yy_globals
,0x00,sizeof(struct yyguts_t
));
3478 return yy_init_globals ( *ptr_yy_globals
);
3481 /* yylex_init_extra has the same functionality as yylex_init, but follows the
3482 * convention of taking the scanner as the last argument. Note however, that
3483 * this is a *pointer* to a scanner, as it will be allocated by this call (and
3484 * is the reason, too, why this function also must handle its own declaration).
3485 * The user defined value in the first argument will be available to yyalloc in
3486 * the yyextra field.
3489 int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined
,yyscan_t
* ptr_yy_globals
)
3492 struct yyguts_t dummy_yyguts
;
3494 yyset_extra (yy_user_defined
, &dummy_yyguts
);
3496 if (ptr_yy_globals
== NULL
){
3501 *ptr_yy_globals
= (yyscan_t
) yyalloc ( sizeof( struct yyguts_t
), &dummy_yyguts
);
3503 if (*ptr_yy_globals
== NULL
){
3508 /* By setting to 0xAA, we expose bugs in
3509 yy_init_globals. Leave at 0x00 for releases. */
3510 memset(*ptr_yy_globals
,0x00,sizeof(struct yyguts_t
));
3512 yyset_extra (yy_user_defined
, *ptr_yy_globals
);
3514 return yy_init_globals ( *ptr_yy_globals
);
3517 static int yy_init_globals (yyscan_t yyscanner
)
3519 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3520 /* Initialization is the same as for the non-reentrant scanner.
3521 * This function is called from yylex_destroy(), so don't allocate here.
3524 yyg
->yy_buffer_stack
= 0;
3525 yyg
->yy_buffer_stack_top
= 0;
3526 yyg
->yy_buffer_stack_max
= 0;
3527 yyg
->yy_c_buf_p
= (char *) 0;
3531 yyg
->yy_start_stack_ptr
= 0;
3532 yyg
->yy_start_stack_depth
= 0;
3533 yyg
->yy_start_stack
= NULL
;
3535 /* Defined in main.c */
3544 /* For future reference: Set errno on error, since we are called by
3550 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3551 int yylex_destroy (yyscan_t yyscanner
)
3553 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
3555 /* Pop the buffer stack, destroying each element. */
3556 while(YY_CURRENT_BUFFER
){
3557 yy_delete_buffer(YY_CURRENT_BUFFER
,yyscanner
);
3558 YY_CURRENT_BUFFER_LVALUE
= NULL
;
3559 yypop_buffer_state(yyscanner
);
3562 /* Destroy the stack itself. */
3563 yyfree(yyg
->yy_buffer_stack
,yyscanner
);
3564 yyg
->yy_buffer_stack
= NULL
;
3566 /* Destroy the start condition stack. */
3567 yyfree(yyg
->yy_start_stack
,yyscanner
);
3568 yyg
->yy_start_stack
= NULL
;
3570 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3571 * yylex() is called, initialization will occur. */
3572 yy_init_globals( yyscanner
);
3574 /* Destroy the main struct (reentrant only). */
3575 yyfree ( yyscanner
, yyscanner
);
3581 * Internal utility routines.
3585 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
, yyscan_t yyscanner
)
3588 for ( i
= 0; i
< n
; ++i
)
3593 #ifdef YY_NEED_STRLEN
3594 static int yy_flex_strlen (yyconst
char * s
, yyscan_t yyscanner
)
3597 for ( n
= 0; s
[n
]; ++n
)
3604 void *yyalloc (yy_size_t size
, yyscan_t yyscanner
)
3606 return (void *) malloc( size
);
3609 void *yyrealloc (void * ptr
, yy_size_t size
, yyscan_t yyscanner
)
3611 /* The cast to (char *) in the following accommodates both
3612 * implementations that use char* generic pointers, and those
3613 * that use void* generic pointers. It works with the latter
3614 * because both ANSI C and C++ allow castless assignment from
3615 * any pointer type to void*, and deal with argument conversions
3616 * as though doing an assignment.
3618 return (void *) realloc( (char *) ptr
, size
);
3621 void yyfree (void * ptr
, yyscan_t yyscanner
)
3623 free( (char *) ptr
); /* see yyrealloc() for (char *) cast */
3626 #define YYTABLES_NAME "yytables"
3628 #line 472 "program_lexer.l"
3633 _mesa_program_lexer_ctor(void **scanner
, struct asm_parser_state
*state
,
3634 const char *string
, size_t len
)
3636 yylex_init_extra(state
,scanner
);
3637 yy_scan_bytes(string
,len
,*scanner
);
3641 _mesa_program_lexer_dtor(void *scanner
)
3643 yylex_destroy(scanner
);