5
* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
7
* This file is generated automatically by the Parrot build process
8
* from the file compilers/pirc/new/pir.l.
10
* Any changes made here will be lost!
14
/* HEADERIZER HFILE: none */
17
#ifndef __STDC_VERSION__
18
# define __STDC_VERSION__ 0
21
#ifndef YY_NO_UNISTD_H
22
# define YY_NO_UNISTD_H
25
/* prevent warnings on undefined #defines: */
30
#ifndef YY_ALWAYS_INTERACTIVE
31
# define YY_ALWAYS_INTERACTIVE 0
34
#include <stdlib.h> /* for size_t */
35
typedef size_t yy_size_t;
36
#define YY_TYPEDEF_YY_SIZE_T
43
#define YY_INT_ALIGNED short int
45
/* A lexical scanner generated by flex */
50
/* %if-not-reentrant */
56
#define YY_FLEX_MAJOR_VERSION 2
57
#define YY_FLEX_MINOR_VERSION 5
58
#define YY_FLEX_SUBMINOR_VERSION 35
59
#if YY_FLEX_SUBMINOR_VERSION > 0
74
/* First, we deal with platform-specific or compiler-specific issues. */
76
/* begin standard C headers. */
84
/* %if-tables-serialization */
86
/* end standard C headers. */
89
/* flex integer type definitions */
94
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
96
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
98
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
99
* if you want the limit (max/min) macros for int types.
101
#ifndef __STDC_LIMIT_MACROS
102
#define __STDC_LIMIT_MACROS 1
105
#include <inttypes.h>
106
typedef int8_t flex_int8_t;
107
typedef uint8_t flex_uint8_t;
108
typedef int16_t flex_int16_t;
109
typedef uint16_t flex_uint16_t;
110
typedef int32_t flex_int32_t;
111
typedef uint32_t flex_uint32_t;
113
typedef signed char flex_int8_t;
114
typedef short int flex_int16_t;
115
typedef int flex_int32_t;
116
typedef unsigned char flex_uint8_t;
117
typedef unsigned short int flex_uint16_t;
118
typedef unsigned int flex_uint32_t;
121
/* Limits of integral types. */
123
#define INT8_MIN (-128)
126
#define INT16_MIN (-32767-1)
129
#define INT32_MIN (-2147483647-1)
132
#define INT8_MAX (127)
135
#define INT16_MAX (32767)
138
#define INT32_MAX (2147483647)
141
#define UINT8_MAX (255U)
144
#define UINT16_MAX (65535U)
147
#define UINT32_MAX (4294967295U)
150
#endif /* ! FLEXINT_H */
159
/* The "const" storage-class-modifier is valid. */
162
#else /* ! __cplusplus */
164
/* C99 requires __STDC__ to be defined as 1. */
165
#if defined (__STDC__)
169
#endif /* defined (__STDC__) */
170
#endif /* ! __cplusplus */
173
#define yyconst const
178
/* %not-for-header */
180
/* Returned upon end-of-file. */
184
/* %not-for-header */
186
/* Promotes a possibly negative, possibly signed char to an unsigned
187
* integer for use as an array index. If the signed char is negative,
188
* we want to instead treat it as an 8-bit unsigned char, hence the
191
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
196
/* An opaque pointer. */
197
#ifndef YY_TYPEDEF_YY_SCANNER_T
198
#define YY_TYPEDEF_YY_SCANNER_T
199
typedef void* yyscan_t;
202
/* For convenience, these vars (plus the bison vars far below)
203
are macros in the reentrant scanner. */
204
#define yyin yyg->yyin_r
205
#define yyout yyg->yyout_r
206
#define yyextra yyg->yyextra_r
207
#define yyleng yyg->yyleng_r
208
#define yytext yyg->yytext_r
209
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
210
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
211
#define yy_flex_debug yyg->yy_flex_debug_r
215
/* %if-not-reentrant */
218
/* Enter a start condition. This macro really ought to take a parameter,
219
* but we do it the disgusting crufty way forced on us by the ()-less
220
* definition of BEGIN.
222
#define BEGIN yyg->yy_start = 1 + 2 *
224
/* Translate the current start state into a value that can be later handed
225
* to BEGIN to return to the state. The YYSTATE alias is for lex
228
#define YY_START ((yyg->yy_start - 1) / 2)
229
#define YYSTATE YY_START
231
/* Action number for EOF rule of a given start state. */
232
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
234
/* Special action meaning "start processing a new file". */
235
#define YY_NEW_FILE yypirrestart(yyin ,yyscanner )
237
#define YY_END_OF_BUFFER_CHAR 0
239
/* Size of default input buffer. */
241
#define YY_BUF_SIZE 16384
244
/* The state buf must be large enough to hold one state per character in the main buffer.
246
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
248
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
249
#define YY_TYPEDEF_YY_BUFFER_STATE
250
typedef struct yy_buffer_state *YY_BUFFER_STATE;
253
#ifndef YY_TYPEDEF_YY_SIZE_T
254
#define YY_TYPEDEF_YY_SIZE_T
255
typedef size_t yy_size_t;
258
/* %if-not-reentrant */
262
/* %if-not-reentrant */
266
#define EOB_ACT_CONTINUE_SCAN 0
267
#define EOB_ACT_END_OF_FILE 1
268
#define EOB_ACT_LAST_MATCH 2
270
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
271
* access to the local variable yy_act. Since yyless() is a macro, it would break
272
* existing scanners that call yyless() from OUTSIDE yypirlex.
273
* One obvious solution it to make yy_act a global. I tried that, and saw
274
* a 5% performance hit in a non-yylineno scanner, because yy_act is
275
* normally declared as a register variable-- so it is not worth it.
277
#define YY_LESS_LINENO(n) \
280
for ( yyl = n; yyl < yyleng; ++yyl )\
281
if ( yytext[yyl] == '\n' )\
285
/* Return all but the first "n" matched characters back to the input stream. */
289
/* Undo effects of setting up yytext. */ \
290
int yyless_macro_arg = (n); \
291
YY_LESS_LINENO(yyless_macro_arg);\
292
*yy_cp = yyg->yy_hold_char; \
293
YY_RESTORE_YY_MORE_OFFSET \
294
yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
295
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
299
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
301
#ifndef YY_STRUCT_YY_BUFFER_STATE
302
#define YY_STRUCT_YY_BUFFER_STATE
303
struct yy_buffer_state
312
char *yy_ch_buf; /* input buffer */
313
char *yy_buf_pos; /* current position in input buffer */
315
/* Size of input buffer in bytes, not including room for EOB
318
yy_size_t yy_buf_size;
320
/* Number of characters read into yy_ch_buf, not including EOB
323
yy_size_t yy_n_chars;
325
/* Whether we "own" the buffer - i.e., we know we created it,
326
* and can realloc() it to grow it, and should free() it to
329
int yy_is_our_buffer;
331
/* Whether this is an "interactive" input source; if so, and
332
* if we're using stdio for input, then we want to use getc()
333
* instead of fread(), to make sure we stop fetching input after
336
int yy_is_interactive;
338
/* Whether we're considered to be at the beginning of a line.
339
* If so, '^' rules will be active on the next match, otherwise
344
int yy_bs_lineno; /**< The line count. */
345
int yy_bs_column; /**< The column count. */
347
/* Whether to try to fill the input buffer when we reach the
352
int yy_buffer_status;
354
#define YY_BUFFER_NEW 0
355
#define YY_BUFFER_NORMAL 1
356
/* When an EOF's been seen but there's still some text to process
357
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
358
* shouldn't try reading from the input source any more. We might
359
* still have a bunch of tokens to match, though, because of
360
* possible backing-up.
362
* When we actually see the EOF, we change the status to "new"
363
* (via yypirrestart()), so that the user can continue scanning by
364
* just pointing yyin at a new input file.
366
#define YY_BUFFER_EOF_PENDING 2
369
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
371
/* %if-c-only Standard (non-C++) definition */
372
/* %not-for-header */
374
/* %if-not-reentrant */
380
/* We provide macros for accessing buffer states in case in the
381
* future we want to put the buffer states in a more general
384
* Returns the top of the stack, or NULL.
386
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
387
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
390
/* Same as previous macro, but useful when we know that the buffer stack is not
391
* NULL or when we need an lvalue. For internal use only.
393
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
395
/* %if-c-only Standard (non-C++) definition */
397
/* %if-not-reentrant */
398
/* %not-for-header */
404
void yypirrestart (FILE *input_file ,yyscan_t yyscanner );
405
void yypir_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
406
YY_BUFFER_STATE yypir_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
407
void yypir_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
408
void yypir_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
409
void yypirpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
410
void yypirpop_buffer_state (yyscan_t yyscanner );
412
static void yypirensure_buffer_stack (yyscan_t yyscanner );
413
static void yypir_load_buffer_state (yyscan_t yyscanner );
414
static void yypir_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
416
#define YY_FLUSH_BUFFER yypir_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
418
YY_BUFFER_STATE yypir_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
419
YY_BUFFER_STATE yypir_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
420
YY_BUFFER_STATE yypir_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
424
void *yypiralloc (yy_size_t ,yyscan_t yyscanner );
425
void *yypirrealloc (void *,yy_size_t ,yyscan_t yyscanner );
426
void yypirfree (void * ,yyscan_t yyscanner );
428
#define yy_new_buffer yypir_create_buffer
430
#define yy_set_interactive(is_interactive) \
432
if ( ! YY_CURRENT_BUFFER ){ \
433
yypirensure_buffer_stack (yyscanner); \
434
YY_CURRENT_BUFFER_LVALUE = \
435
yypir_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
437
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
440
#define yy_set_bol(at_bol) \
442
if ( ! YY_CURRENT_BUFFER ){\
443
yypirensure_buffer_stack (yyscanner); \
444
YY_CURRENT_BUFFER_LVALUE = \
445
yypir_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
447
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
450
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
452
/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
453
/* Begin user sect3 */
455
#define yypirwrap(n) 1
456
#define YY_SKIP_YYWRAP
460
typedef unsigned char YY_CHAR;
462
typedef int yy_state_type;
464
#define yytext_ptr yytext_r
466
/* %if-c-only Standard (non-C++) definition */
468
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
469
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
470
static int yy_get_next_buffer (yyscan_t yyscanner );
471
static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
475
/* Done after the current pattern has been matched and before the
476
* corresponding action - sets up yytext.
478
#define YY_DO_BEFORE_ACTION \
479
yyg->yytext_ptr = yy_bp; \
480
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
481
yyleng = (size_t) (yy_cp - yy_bp); \
482
yyg->yy_hold_char = *yy_cp; \
484
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
485
yyg->yy_c_buf_p = yy_cp;
487
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
488
#define YY_NUM_RULES 209
489
#define YY_END_OF_BUFFER 210
490
/* This struct is not used in this scanner,
491
but its presence is necessary. */
494
flex_int32_t yy_verify;
497
static yyconst flex_int16_t yy_accept[825] =
499
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
500
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
501
0, 0, 0, 0, 210, 129, 2, 4, 2, 25,
502
129, 129, 129, 22, 129, 129, 28, 29, 23, 21,
503
30, 27, 129, 24, 122, 122, 129, 35, 15, 34,
504
16, 120, 120, 31, 32, 120, 120, 120, 120, 120,
505
120, 129, 26, 209, 136, 141, 136, 138, 139, 140,
506
137, 175, 173, 175, 175, 167, 165, 166, 165, 167,
507
161, 161, 161, 161, 161, 170, 209, 209, 209, 154,
508
146, 153, 146, 154, 154, 154, 148, 149, 154, 147,
510
154, 150, 150, 144, 151, 152, 134, 133, 134, 134,
511
134, 134, 134, 132, 132, 131, 129, 129, 120, 120,
512
120, 120, 120, 120, 120, 120, 209, 209, 209, 209,
513
150, 150, 1, 208, 206, 207, 206, 208, 208, 208,
514
208, 176, 208, 201, 201, 208, 199, 199, 199, 199,
515
199, 177, 178, 0, 4, 4, 12, 0, 110, 0,
516
0, 3, 0, 0, 0, 0, 0, 40, 18, 43,
517
0, 111, 0, 39, 0, 122, 36, 37, 126, 121,
518
46, 126, 126, 142, 126, 126, 126, 126, 126, 126,
519
126, 126, 126, 126, 126, 126, 126, 126, 126, 17,
521
38, 121, 0, 0, 0, 0, 109, 109, 109, 109,
522
109, 109, 109, 109, 109, 109, 109, 109, 9, 13,
523
11, 10, 14, 8, 0, 120, 118, 119, 120, 47,
524
120, 120, 120, 120, 120, 42, 19, 45, 20, 141,
525
141, 137, 173, 173, 0, 0, 0, 166, 166, 162,
526
161, 161, 161, 161, 161, 170, 170, 0, 0, 169,
527
153, 153, 0, 150, 0, 0, 0, 0, 150, 150,
528
143, 150, 0, 0, 0, 0, 144, 0, 132, 0,
529
0, 0, 0, 132, 132, 132, 0, 0, 0, 0,
530
131, 0, 0, 0, 0, 0, 126, 120, 128, 119,
532
120, 47, 120, 120, 120, 120, 120, 207, 207, 0,
533
205, 0, 0, 0, 0, 201, 200, 192, 192, 192,
534
192, 192, 192, 200, 0, 0, 0, 0, 0, 0,
535
0, 0, 0, 199, 193, 197, 196, 195, 198, 127,
536
33, 3, 117, 116, 114, 115, 41, 0, 142, 142,
537
142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
538
142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
539
142, 142, 44, 121, 124, 0, 121, 125, 123, 109,
540
109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
541
109, 109, 109, 109, 109, 109, 109, 109, 7, 6,
543
0, 0, 0, 120, 51, 120, 52, 53, 120, 120,
544
0, 0, 0, 162, 157, 159, 158, 161, 145, 0,
545
143, 150, 150, 0, 150, 150, 150, 132, 0, 132,
546
132, 0, 132, 132, 132, 0, 164, 117, 116, 114,
547
115, 163, 171, 120, 51, 120, 52, 53, 120, 120,
548
194, 0, 192, 192, 192, 192, 192, 192, 192, 200,
549
203, 0, 200, 204, 202, 0, 0, 0, 0, 0,
550
0, 0, 121, 62, 142, 142, 142, 142, 58, 142,
551
142, 142, 142, 64, 142, 142, 142, 142, 142, 142,
552
142, 142, 142, 142, 81, 142, 142, 109, 109, 109,
554
109, 109, 109, 94, 109, 109, 109, 109, 109, 109,
555
109, 109, 109, 109, 109, 109, 109, 109, 5, 0,
556
112, 0, 0, 0, 48, 50, 120, 120, 0, 0,
557
0, 161, 0, 150, 0, 132, 172, 163, 48, 50,
558
120, 120, 0, 200, 192, 186, 192, 192, 192, 192,
559
0, 0, 0, 0, 0, 0, 142, 142, 75, 142,
560
142, 86, 59, 142, 142, 142, 65, 142, 142, 142,
561
142, 142, 142, 142, 142, 142, 142, 142, 87, 106,
562
109, 88, 109, 109, 89, 109, 92, 109, 109, 109,
563
109, 109, 109, 109, 109, 109, 109, 109, 109, 0,
565
120, 120, 174, 0, 0, 161, 120, 120, 191, 190,
566
192, 192, 192, 182, 0, 181, 180, 179, 0, 142,
567
142, 57, 142, 142, 142, 142, 142, 142, 142, 67,
568
135, 142, 142, 142, 71, 142, 142, 142, 142, 142,
569
82, 109, 109, 109, 109, 109, 97, 105, 109, 109,
570
109, 95, 109, 109, 98, 109, 109, 0, 113, 0,
571
54, 49, 155, 0, 160, 54, 49, 188, 192, 192,
572
0, 0, 142, 142, 142, 142, 142, 142, 142, 142,
573
142, 142, 142, 142, 142, 80, 142, 142, 142, 142,
574
109, 109, 109, 109, 93, 109, 109, 109, 109, 104,
576
109, 96, 0, 192, 192, 192, 0, 0, 142, 142,
577
142, 142, 142, 142, 142, 142, 142, 142, 66, 142,
578
142, 142, 142, 142, 56, 142, 142, 142, 109, 109,
579
109, 109, 100, 109, 109, 109, 109, 0, 192, 192,
580
185, 0, 0, 55, 142, 142, 142, 76, 142, 142,
581
142, 142, 63, 142, 142, 142, 142, 142, 70, 142,
582
142, 85, 109, 109, 107, 109, 103, 102, 90, 109,
583
0, 0, 192, 192, 0, 183, 142, 142, 142, 142,
584
78, 142, 142, 142, 142, 142, 68, 69, 142, 84,
585
91, 109, 108, 109, 0, 0, 192, 187, 184, 72,
587
142, 142, 77, 79, 142, 142, 142, 142, 83, 99,
588
101, 0, 0, 192, 142, 74, 60, 61, 130, 168,
592
static yyconst flex_int32_t yy_ec[256] =
594
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
595
1, 4, 5, 1, 1, 1, 1, 1, 1, 1,
596
1, 1, 1, 1, 1, 4, 1, 1, 1, 1,
597
1, 2, 6, 7, 8, 9, 10, 11, 12, 13,
598
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
599
23, 23, 23, 23, 23, 24, 24, 25, 26, 27,
600
28, 29, 1, 30, 31, 32, 31, 31, 33, 31,
601
34, 35, 36, 34, 34, 37, 34, 38, 39, 40,
602
34, 34, 41, 34, 34, 34, 42, 43, 34, 34,
603
44, 45, 46, 1, 47, 1, 48, 49, 50, 51,
605
52, 53, 54, 55, 56, 34, 57, 58, 59, 60,
606
61, 62, 63, 64, 65, 66, 67, 68, 34, 69,
607
70, 34, 71, 72, 73, 74, 1, 1, 1, 1,
608
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
609
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
610
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
611
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
612
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
613
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
614
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
616
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
617
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
618
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
619
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
620
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
624
static yyconst flex_int32_t yy_meta[75] =
626
1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
627
1, 1, 1, 1, 1, 1, 1, 4, 1, 1,
628
5, 5, 5, 5, 6, 1, 1, 1, 1, 7,
629
8, 8, 8, 9, 9, 9, 9, 9, 9, 9,
630
10, 10, 9, 1, 1, 1, 9, 8, 8, 8,
631
8, 8, 8, 9, 9, 9, 9, 9, 9, 9,
632
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
636
static yyconst flex_int16_t yy_base[885] =
638
0, 0, 74, 0, 146, 147, 166, 0, 240, 0,
639
314, 0, 388, 0, 0, 0, 462, 0, 530, 543,
640
0, 0, 567, 0, 2392, 2393, 2372, 151, 537, 2362,
641
635, 152, 122, 2361, 530, 2376, 2393, 2393, 529, 624,
642
2393, 632, 674, 519, 726, 640, 723, 2393, 622, 629,
643
637, 520, 653, 2393, 2393, 728, 739, 736, 737, 654,
644
738, 616, 723, 2393, 2393, 665, 2384, 2393, 2393, 2393,
645
0, 2393, 682, 2383, 641, 2393, 2393, 765, 2382, 0,
646
0, 2324, 2316, 2323, 2315, 799, 2377, 0, 2354, 2393,
647
2393, 803, 2375, 765, 771, 2365, 2393, 2393, 794, 2393,
649
798, 804, 811, 0, 2393, 2393, 2393, 2393, 779, 810,
650
2364, 836, 817, 855, 847, 0, 845, 2366, 664, 887,
651
866, 872, 888, 901, 903, 904, 786, 2362, 916, 920,
652
0, 926, 2393, 2393, 2393, 859, 2370, 807, 916, 2360,
653
944, 2393, 949, 993, 958, 927, 2346, 971, 976, 997,
654
1006, 2393, 2393, 699, 890, 898, 2393, 822, 2393, 0,
655
156, 1001, 948, 1016, 1025, 1029, 1034, 2393, 2393, 2393,
656
2358, 2393, 2341, 2393, 1042, 1048, 2393, 2393, 2393, 1052,
657
2393, 0, 2331, 0, 2307, 2314, 712, 2305, 2308, 722,
658
2303, 793, 910, 926, 2314, 2309, 863, 2312, 2303, 2330,
660
2393, 1056, 669, 1070, 1012, 0, 0, 2297, 2298, 659,
661
862, 1035, 495, 1028, 2294, 946, 2294, 2287, 2393, 2393,
662
2393, 2393, 2393, 959, 2327, 857, 2344, 1088, 1078, 1043,
663
1080, 1089, 1099, 1097, 1098, 2393, 2393, 2393, 2393, 1116,
664
1123, 0, 1127, 1131, 2290, 2288, 2300, 1135, 1140, 0,
665
0, 2281, 2287, 2295, 2280, 1148, 1152, 2318, 2317, 2393,
666
1157, 1161, 939, 2393, 0, 1146, 2329, 1150, 1156, 1160,
667
0, 1164, 1002, 1178, 1169, 0, 0, 1037, 2393, 0,
668
1182, 2328, 1196, 1202, 1206, 1210, 1038, 1224, 1188, 0,
669
0, 2309, 1229, 1242, 1246, 1256, 0, 1219, 2313, 1266,
671
1267, 1275, 1276, 1277, 1290, 1286, 1294, 1320, 1324, 1090,
672
2393, 0, 1322, 2325, 1332, 1338, 1342, 0, 2280, 1075,
673
2287, 2286, 2283, 1346, 1192, 1360, 1234, 0, 2272, 1201,
674
2270, 2282, 2268, 2303, 2393, 1364, 1378, 1383, 1388, 2393,
675
2393, 1269, 1393, 1397, 1401, 1405, 2393, 1414, 0, 2290,
676
2266, 2271, 2266, 2263, 2271, 2263, 2254, 2258, 2250, 2248,
677
2256, 993, 2265, 2248, 2254, 2256, 2247, 2244, 2243, 2259,
678
2251, 2254, 2393, 1418, 1260, 1422, 1426, 1309, 0, 0,
679
2244, 2256, 2244, 1253, 2233, 1091, 2245, 2234, 2241, 2239,
680
2245, 2230, 2229, 2229, 2226, 2243, 2235, 2242, 2393, 2261,
682
2281, 1113, 2262, 1316, 1197, 1333, 1285, 1355, 1434, 1435,
683
2235, 2235, 2234, 0, 0, 0, 0, 2227, 1433, 1445,
684
0, 1450, 1277, 1454, 1458, 1316, 0, 1470, 1482, 1486,
685
1292, 1490, 1494, 1326, 0, 2252, 2256, 1499, 1503, 1513,
686
1518, 0, 2393, 1471, 1526, 1527, 1528, 1529, 1537, 1543,
687
1542, 1553, 0, 2222, 2210, 2218, 2227, 2217, 2225, 1557,
688
1371, 1565, 1575, 1374, 0, 2213, 2214, 2216, 2223, 2214,
689
2204, 1579, 1583, 0, 2207, 2211, 2208, 2200, 1148, 2212,
690
2216, 2213, 2200, 0, 2208, 2208, 2210, 2193, 2201, 2203,
691
2207, 2205, 2185, 2204, 0, 2192, 2191, 2188, 2181, 2194,
693
2179, 2178, 2182, 0, 2191, 2184, 2180, 2184, 2172, 2185,
694
2176, 1439, 2183, 2168, 2169, 2176, 2168, 2181, 2393, 1191,
695
2393, 0, 2204, 2221, 1440, 1566, 1590, 1592, 2168, 2178,
696
2161, 2164, 1590, 1597, 1601, 1605, 2393, 0, 1612, 1613,
697
1614, 1615, 1625, 1630, 2171, 0, 2170, 2157, 2168, 2172,
698
2158, 2165, 2150, 2164, 2154, 2147, 2146, 2151, 0, 2144,
699
1591, 0, 0, 2145, 2160, 2157, 0, 2148, 2147, 2143,
700
2156, 2137, 2151, 2141, 2135, 1608, 2148, 2146, 0, 0,
701
2145, 0, 2147, 2144, 0, 2145, 0, 2131, 2135, 2139,
702
2123, 2135, 2126, 2122, 2135, 2122, 2132, 2115, 2123, 1628,
704
1640, 1641, 2393, 2122, 2118, 2124, 1645, 1646, 0, 0,
705
2116, 2111, 2110, 2393, 2123, 2393, 2393, 2393, 2123, 2124,
706
2124, 0, 2122, 2117, 2112, 2115, 2108, 2108, 2095, 0,
707
2103, 2095, 2076, 2077, 0, 2060, 2052, 2063, 2054, 2061,
708
0, 2042, 2027, 2023, 2011, 2014, 0, 0, 1998, 2003,
709
1990, 0, 1978, 1964, 0, 1981, 1978, 1653, 2393, 0,
710
1644, 1659, 2393, 1982, 0, 1661, 1663, 1977, 1961, 1951,
711
1956, 1950, 1940, 1632, 1947, 1934, 1947, 1929, 1943, 1932,
712
1942, 1225, 1938, 1931, 1914, 0, 1917, 1902, 1915, 1904,
713
1913, 1900, 1868, 1862, 0, 1838, 1859, 1848, 1826, 0,
715
1823, 0, 1811, 1808, 1799, 1793, 1793, 1777, 1783, 1776,
716
1761, 1752, 1741, 1731, 1732, 1722, 1723, 1702, 0, 1685,
717
1436, 1652, 1659, 1650, 0, 1640, 1647, 1646, 1637, 1649,
718
1634, 1649, 0, 1641, 1634, 1628, 1625, 1522, 1626, 1635,
719
0, 1617, 1606, 0, 1609, 1570, 1582, 0, 1552, 1543,
720
1534, 1522, 0, 1512, 1511, 1500, 1491, 1479, 0, 1466,
721
1477, 0, 1447, 1427, 0, 1434, 0, 0, 0, 1412,
722
1413, 1384, 1373, 1379, 1322, 2393, 1314, 1261, 1259, 1181,
723
0, 1172, 1111, 1100, 1089, 1053, 0, 0, 1039, 0,
724
0, 1031, 0, 936, 909, 888, 855, 0, 2393, 0,
726
825, 821, 0, 777, 734, 728, 719, 708, 0, 0,
727
0, 694, 611, 497, 104, 0, 0, 0, 0, 2393,
728
2393, 0, 0, 2393, 1711, 1722, 1733, 1744, 1755, 1766,
729
1770, 1777, 1783, 1786, 1792, 1795, 1801, 1811, 1822, 1829,
730
1835, 1845, 1856, 1863, 1866, 1873, 1883, 1894, 1901, 1907,
731
1917, 1926, 1937, 1948, 1955, 1961, 1965, 1972, 1979, 1987,
732
1993, 1999, 2005, 2011, 2017, 2023, 2027, 2037, 2048, 2055,
733
2059, 2065, 2068, 2075, 2085, 2096, 2103, 2109, 2113, 2123,
734
2131, 2138, 2144, 2154
737
static yyconst flex_int16_t yy_def[885] =
739
824, 1, 824, 3, 825, 825, 824, 7, 824, 9,
740
824, 11, 824, 13, 1, 1, 824, 17, 826, 826,
741
827, 827, 824, 23, 824, 824, 824, 824, 824, 824,
742
828, 829, 824, 824, 824, 830, 824, 824, 824, 824,
743
824, 824, 824, 824, 824, 824, 831, 824, 824, 824,
744
824, 832, 832, 824, 824, 832, 832, 832, 832, 832,
745
832, 824, 824, 824, 824, 824, 824, 824, 824, 824,
746
833, 824, 824, 824, 824, 824, 824, 824, 824, 834,
747
835, 835, 835, 835, 835, 824, 824, 836, 837, 824,
748
824, 824, 824, 838, 824, 839, 824, 824, 824, 824,
750
840, 824, 824, 841, 824, 824, 824, 824, 842, 824,
751
843, 824, 824, 824, 824, 844, 845, 43, 846, 846,
752
846, 846, 846, 846, 846, 846, 838, 839, 824, 824,
753
102, 824, 824, 824, 824, 824, 824, 847, 824, 848,
754
824, 824, 849, 824, 824, 824, 850, 850, 850, 850,
755
850, 824, 824, 851, 824, 824, 824, 852, 824, 852,
756
853, 824, 853, 824, 824, 824, 824, 824, 824, 824,
757
854, 824, 824, 824, 824, 824, 824, 824, 824, 824,
758
824, 855, 855, 855, 855, 855, 855, 855, 855, 855,
759
855, 855, 855, 855, 855, 855, 855, 855, 855, 824,
761
824, 824, 824, 824, 824, 856, 857, 857, 857, 857,
762
857, 857, 857, 857, 857, 857, 857, 857, 824, 824,
763
824, 824, 824, 824, 858, 859, 860, 859, 859, 859,
764
859, 859, 859, 859, 859, 824, 824, 824, 824, 824,
765
824, 861, 824, 824, 824, 824, 824, 824, 824, 862,
766
863, 863, 863, 863, 863, 824, 824, 864, 864, 824,
767
824, 824, 838, 824, 838, 824, 839, 824, 824, 824,
768
865, 824, 824, 824, 824, 866, 867, 868, 824, 868,
769
824, 869, 824, 824, 824, 824, 824, 824, 824, 870,
770
871, 872, 872, 872, 872, 872, 873, 874, 824, 874,
772
874, 874, 874, 874, 874, 874, 874, 824, 824, 875,
773
824, 875, 824, 876, 824, 824, 824, 877, 877, 877,
774
877, 877, 877, 824, 824, 824, 824, 878, 824, 824,
775
824, 824, 824, 879, 824, 879, 879, 879, 879, 824,
776
824, 824, 824, 824, 824, 824, 824, 824, 855, 855,
777
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
778
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
779
855, 855, 824, 824, 824, 824, 824, 824, 856, 857,
780
857, 857, 857, 857, 857, 857, 857, 857, 857, 857,
781
857, 857, 857, 857, 857, 857, 857, 857, 824, 824,
783
860, 880, 881, 882, 882, 882, 882, 882, 882, 882,
784
824, 824, 824, 862, 863, 863, 863, 863, 824, 824,
785
865, 824, 824, 824, 824, 824, 866, 824, 824, 824,
786
824, 824, 824, 824, 870, 872, 824, 872, 872, 872,
787
872, 883, 824, 874, 874, 874, 874, 874, 874, 874,
788
824, 824, 877, 877, 877, 877, 877, 877, 877, 824,
789
824, 824, 824, 824, 878, 824, 824, 824, 824, 824,
790
824, 824, 824, 855, 855, 855, 855, 855, 855, 855,
791
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
792
855, 855, 855, 855, 855, 855, 855, 857, 857, 857,
794
857, 857, 857, 857, 857, 857, 857, 857, 857, 857,
795
857, 857, 857, 857, 857, 857, 857, 857, 824, 880,
796
824, 880, 881, 824, 882, 882, 882, 882, 824, 824,
797
824, 863, 824, 824, 824, 824, 824, 883, 874, 874,
798
874, 874, 824, 824, 877, 877, 877, 877, 877, 877,
799
824, 824, 824, 824, 824, 824, 855, 855, 855, 855,
800
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
801
855, 855, 855, 855, 855, 855, 855, 855, 857, 857,
802
857, 857, 857, 857, 857, 857, 857, 857, 857, 857,
803
857, 857, 857, 857, 857, 857, 857, 857, 857, 884,
805
882, 882, 824, 824, 824, 863, 874, 874, 877, 877,
806
877, 877, 877, 824, 824, 824, 824, 824, 824, 855,
807
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
808
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
809
855, 857, 857, 857, 857, 857, 857, 857, 857, 857,
810
857, 857, 857, 857, 857, 857, 857, 884, 824, 884,
811
882, 882, 824, 824, 863, 874, 874, 877, 877, 877,
812
824, 824, 855, 855, 855, 855, 855, 855, 855, 855,
813
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
814
857, 857, 857, 857, 857, 857, 857, 857, 857, 857,
816
857, 857, 824, 877, 877, 877, 824, 824, 855, 855,
817
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
818
855, 855, 855, 855, 855, 855, 855, 855, 857, 857,
819
857, 857, 857, 857, 857, 857, 857, 824, 877, 877,
820
877, 824, 824, 855, 855, 855, 855, 855, 855, 855,
821
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
822
855, 855, 857, 857, 857, 857, 857, 857, 857, 857,
823
824, 824, 877, 877, 824, 824, 855, 855, 855, 855,
824
855, 855, 855, 855, 855, 855, 855, 855, 855, 855,
825
857, 857, 857, 857, 824, 824, 877, 877, 824, 855,
827
855, 855, 855, 855, 855, 855, 855, 855, 855, 857,
828
857, 824, 824, 877, 855, 855, 855, 855, 855, 824,
829
824, 877, 855, 0, 824, 824, 824, 824, 824, 824,
830
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
831
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
832
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
833
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
834
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
838
static yyconst flex_int16_t yy_nxt[2468] =
840
26, 27, 28, 27, 29, 30, 31, 32, 33, 34,
841
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
842
45, 46, 46, 46, 47, 48, 49, 50, 51, 26,
843
52, 52, 52, 52, 52, 53, 52, 53, 52, 53,
844
53, 52, 52, 54, 26, 55, 52, 52, 52, 52,
845
52, 52, 52, 56, 52, 57, 52, 52, 52, 58,
846
52, 59, 52, 52, 60, 52, 61, 52, 52, 52,
847
26, 62, 26, 63, 64, 65, 66, 65, 67, 64,
848
64, 64, 64, 64, 64, 64, 68, 69, 64, 64,
849
70, 64, 64, 64, 64, 64, 64, 64, 64, 64,
851
64, 64, 64, 64, 71, 71, 71, 71, 71, 71,
852
71, 71, 71, 71, 71, 71, 71, 64, 64, 64,
853
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
854
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
855
71, 71, 71, 71, 64, 64, 64, 64, 73, 73,
856
74, 74, 155, 155, 162, 155, 163, 164, 162, 165,
857
163, 166, 167, 823, 75, 75, 76, 77, 78, 77,
858
79, 76, 76, 76, 80, 76, 76, 76, 76, 76,
859
76, 76, 76, 76, 76, 76, 76, 76, 76, 76,
860
76, 76, 76, 76, 76, 76, 81, 81, 81, 81,
862
81, 81, 81, 81, 81, 81, 81, 81, 81, 76,
863
76, 76, 81, 81, 81, 81, 81, 81, 81, 81,
864
81, 82, 81, 81, 81, 83, 81, 84, 81, 81,
865
85, 81, 81, 81, 81, 81, 76, 76, 76, 76,
866
64, 64, 86, 64, 87, 64, 64, 64, 88, 64,
867
64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
868
64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
869
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
870
89, 89, 89, 64, 64, 64, 89, 89, 89, 89,
871
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
873
89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
874
64, 64, 64, 64, 90, 91, 92, 91, 93, 90,
875
94, 90, 95, 90, 90, 96, 97, 98, 90, 99,
876
100, 99, 101, 90, 102, 103, 103, 103, 90, 90,
877
90, 90, 90, 90, 104, 104, 104, 104, 104, 104,
878
104, 104, 104, 104, 104, 104, 104, 90, 90, 90,
879
104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
880
104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
881
104, 104, 104, 104, 105, 90, 106, 90, 107, 108,
882
64, 108, 108, 107, 109, 107, 110, 107, 107, 111,
884
107, 107, 107, 112, 107, 112, 113, 107, 114, 115,
885
115, 115, 107, 107, 107, 107, 107, 107, 116, 116,
886
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
887
116, 107, 107, 107, 116, 116, 116, 116, 116, 116,
888
116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
889
116, 116, 116, 116, 116, 116, 116, 116, 107, 107,
890
107, 107, 26, 27, 28, 27, 29, 30, 31, 32,
891
117, 34, 35, 36, 37, 38, 39, 40, 41, 42,
892
118, 44, 45, 46, 46, 46, 47, 48, 49, 50,
893
51, 26, 119, 119, 119, 119, 119, 120, 119, 120,
895
119, 120, 120, 119, 119, 54, 26, 55, 119, 119,
896
119, 119, 119, 119, 119, 121, 119, 122, 119, 119,
897
119, 123, 119, 124, 119, 119, 125, 119, 126, 119,
898
119, 119, 26, 62, 26, 63, 127, 225, 200, 156,
899
169, 128, 390, 173, 227, 129, 201, 129, 130, 127,
900
131, 132, 132, 132, 128, 154, 174, 170, 129, 391,
901
129, 130, 822, 131, 132, 132, 132, 134, 135, 136,
902
135, 137, 134, 138, 134, 139, 134, 134, 140, 134,
903
134, 134, 141, 142, 141, 143, 134, 144, 145, 145,
904
145, 146, 134, 134, 134, 134, 134, 147, 147, 147,
906
147, 147, 148, 147, 149, 147, 150, 151, 147, 147,
907
152, 134, 153, 147, 147, 147, 147, 147, 147, 147,
908
147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
909
147, 147, 147, 147, 147, 147, 147, 134, 134, 134,
910
134, 159, 175, 236, 176, 176, 176, 176, 219, 220,
911
175, 177, 176, 176, 176, 176, 221, 222, 202, 178,
912
176, 176, 176, 176, 223, 224, 240, 240, 821, 240,
913
225, 225, 204, 228, 228, 228, 228, 227, 227, 160,
914
179, 225, 179, 243, 243, 179, 243, 237, 227, 375,
915
375, 204, 245, 299, 180, 180, 180, 180, 246, 247,
917
341, 181, 341, 341, 182, 182, 182, 182, 183, 182,
918
182, 182, 182, 182, 182, 182, 182, 383, 384, 234,
919
184, 185, 186, 187, 182, 188, 189, 190, 182, 191,
920
182, 192, 193, 194, 182, 195, 182, 196, 197, 198,
921
182, 182, 182, 199, 202, 225, 176, 176, 176, 176,
922
238, 820, 227, 225, 225, 225, 225, 203, 204, 353,
923
227, 227, 227, 227, 205, 562, 248, 248, 206, 248,
924
208, 264, 354, 357, 203, 209, 562, 204, 210, 358,
925
211, 212, 213, 214, 215, 279, 205, 216, 229, 217,
926
218, 230, 264, 819, 206, 233, 239, 235, 231, 818,
928
256, 256, 232, 256, 261, 261, 266, 261, 266, 265,
929
266, 266, 268, 311, 269, 269, 269, 269, 270, 270,
930
270, 270, 272, 280, 269, 269, 269, 269, 159, 272,
931
265, 269, 269, 269, 269, 273, 274, 285, 285, 285,
932
285, 817, 275, 274, 360, 281, 276, 281, 361, 281,
933
281, 312, 273, 362, 283, 274, 284, 284, 284, 284,
934
308, 308, 274, 308, 275, 286, 160, 284, 284, 284,
935
284, 816, 276, 286, 225, 284, 284, 284, 284, 288,
936
293, 227, 294, 225, 295, 296, 287, 288, 815, 225,
937
227, 155, 155, 289, 155, 299, 227, 290, 288, 155,
939
155, 299, 155, 287, 225, 225, 288, 300, 300, 300,
940
300, 227, 227, 385, 369, 289, 299, 299, 225, 814,
941
225, 225, 386, 290, 302, 227, 301, 227, 227, 370,
942
299, 303, 299, 299, 268, 813, 269, 269, 269, 269,
943
270, 270, 270, 270, 272, 264, 269, 269, 269, 269,
944
162, 313, 163, 313, 304, 313, 313, 363, 274, 305,
945
812, 364, 315, 307, 316, 316, 316, 316, 306, 317,
946
317, 317, 317, 365, 329, 366, 324, 274, 316, 316,
947
316, 316, 330, 265, 331, 332, 399, 400, 333, 811,
948
326, 336, 336, 336, 336, 335, 337, 337, 337, 337,
950
335, 319, 342, 395, 342, 342, 320, 321, 322, 326,
951
323, 324, 396, 316, 316, 316, 316, 338, 338, 338,
952
338, 335, 423, 423, 325, 326, 339, 339, 339, 339,
953
335, 327, 378, 378, 378, 328, 343, 343, 343, 343,
954
486, 325, 487, 279, 326, 344, 344, 344, 344, 345,
955
345, 345, 345, 327, 346, 346, 346, 346, 431, 431,
956
225, 328, 180, 180, 180, 180, 202, 227, 176, 176,
957
176, 176, 180, 180, 180, 180, 374, 374, 374, 374,
958
204, 280, 387, 810, 348, 376, 388, 376, 348, 392,
959
377, 377, 377, 377, 393, 225, 311, 225, 809, 204,
961
808, 389, 227, 348, 227, 225, 225, 348, 228, 228,
962
228, 228, 227, 227, 225, 225, 225, 240, 240, 521,
963
240, 227, 227, 227, 240, 240, 455, 240, 243, 243,
964
456, 243, 243, 243, 312, 243, 248, 248, 505, 248,
965
807, 248, 248, 404, 248, 405, 406, 407, 408, 256,
966
256, 506, 256, 256, 256, 410, 256, 522, 261, 261,
967
409, 261, 261, 261, 806, 261, 419, 419, 419, 419,
968
270, 270, 270, 270, 272, 805, 269, 269, 269, 269,
969
270, 270, 270, 270, 422, 422, 422, 422, 274, 426,
970
426, 426, 420, 424, 561, 424, 420, 521, 425, 425,
972
425, 425, 428, 428, 428, 428, 562, 274, 434, 434,
973
434, 420, 461, 461, 225, 420, 285, 285, 285, 285,
974
286, 227, 284, 284, 284, 284, 285, 285, 285, 285,
975
430, 430, 430, 430, 288, 522, 225, 804, 429, 432,
976
803, 432, 429, 227, 433, 433, 433, 433, 299, 438,
977
438, 438, 438, 288, 464, 464, 464, 429, 437, 467,
978
468, 429, 439, 439, 439, 439, 440, 440, 440, 440,
979
342, 437, 342, 342, 720, 437, 441, 441, 441, 441,
980
375, 375, 721, 225, 225, 437, 300, 300, 300, 300,
981
227, 227, 225, 225, 225, 299, 299, 423, 423, 227,
983
227, 227, 225, 225, 299, 299, 299, 225, 501, 227,
984
227, 225, 431, 431, 227, 299, 802, 502, 227, 299,
985
503, 308, 308, 299, 308, 308, 308, 801, 308, 378,
986
378, 378, 444, 225, 446, 447, 426, 426, 426, 448,
987
227, 445, 451, 451, 451, 451, 434, 434, 434, 449,
988
225, 450, 317, 317, 317, 317, 324, 227, 316, 316,
989
316, 316, 317, 317, 317, 317, 460, 460, 460, 460,
990
326, 800, 225, 799, 452, 462, 525, 462, 452, 227,
991
463, 463, 463, 463, 336, 336, 336, 336, 335, 326,
992
526, 461, 461, 452, 464, 464, 464, 452, 337, 337,
994
337, 337, 335, 338, 338, 338, 338, 335, 339, 339,
995
339, 339, 335, 343, 343, 343, 343, 344, 344, 344,
996
344, 345, 345, 345, 345, 346, 346, 346, 346, 472,
997
798, 472, 797, 796, 473, 473, 473, 473, 374, 374,
998
374, 374, 377, 377, 377, 377, 377, 377, 377, 377,
999
348, 225, 225, 419, 419, 419, 419, 225, 227, 227,
1000
533, 795, 533, 794, 227, 534, 534, 534, 534, 348,
1001
422, 422, 422, 422, 425, 425, 425, 425, 425, 425,
1002
425, 425, 420, 755, 793, 592, 528, 792, 225, 527,
1003
428, 428, 428, 428, 593, 227, 756, 535, 791, 535,
1005
299, 420, 536, 536, 536, 536, 430, 430, 430, 430,
1006
433, 433, 433, 433, 433, 433, 433, 433, 429, 438,
1007
438, 438, 438, 439, 439, 439, 439, 790, 437, 789,
1008
788, 539, 437, 440, 440, 440, 440, 429, 441, 441,
1009
441, 441, 437, 225, 225, 225, 225, 437, 787, 786,
1010
227, 227, 227, 227, 225, 299, 299, 299, 299, 785,
1011
225, 227, 451, 451, 451, 451, 299, 227, 543, 771,
1012
543, 784, 299, 544, 544, 544, 544, 460, 460, 460,
1013
460, 783, 772, 225, 540, 463, 463, 463, 463, 452,
1014
227, 782, 541, 781, 542, 463, 463, 463, 463, 473,
1016
473, 473, 473, 473, 473, 473, 473, 225, 452, 225,
1017
534, 534, 534, 534, 227, 780, 227, 534, 534, 534,
1018
534, 536, 536, 536, 536, 536, 536, 536, 536, 225,
1019
225, 225, 225, 779, 659, 778, 227, 227, 227, 227,
1020
623, 299, 299, 299, 299, 544, 544, 544, 544, 601,
1021
544, 544, 544, 544, 624, 637, 602, 225, 225, 659,
1022
625, 225, 225, 225, 227, 227, 777, 776, 227, 227,
1023
227, 638, 660, 607, 299, 299, 225, 639, 225, 608,
1024
225, 710, 775, 227, 774, 227, 773, 227, 770, 769,
1025
299, 768, 299, 661, 767, 711, 766, 660, 666, 765,
1027
764, 712, 763, 762, 761, 662, 760, 759, 758, 757,
1028
667, 72, 72, 72, 72, 72, 72, 72, 72, 72,
1029
72, 72, 64, 64, 64, 64, 64, 64, 64, 64,
1030
64, 64, 64, 133, 133, 133, 133, 133, 133, 133,
1031
133, 133, 133, 133, 158, 754, 158, 158, 158, 158,
1032
158, 158, 158, 158, 158, 161, 161, 161, 161, 161,
1033
161, 161, 161, 161, 161, 161, 171, 753, 171, 171,
1034
171, 171, 171, 171, 171, 171, 171, 207, 207, 207,
1035
226, 226, 226, 752, 226, 226, 226, 242, 751, 750,
1036
242, 242, 242, 250, 250, 250, 251, 749, 748, 251,
1038
251, 251, 258, 258, 258, 259, 259, 747, 259, 259,
1039
259, 263, 746, 263, 263, 263, 263, 263, 263, 263,
1040
263, 263, 267, 745, 267, 267, 267, 267, 267, 267,
1041
267, 267, 267, 271, 744, 743, 271, 271, 271, 277,
1042
742, 741, 277, 277, 277, 278, 740, 278, 278, 278,
1043
278, 278, 278, 278, 278, 278, 282, 739, 282, 282,
1044
282, 282, 282, 282, 282, 282, 282, 291, 738, 737,
1045
291, 291, 291, 292, 292, 292, 298, 298, 298, 298,
1046
298, 298, 298, 310, 736, 310, 310, 310, 310, 310,
1047
310, 310, 310, 310, 314, 735, 314, 314, 314, 314,
1049
314, 314, 314, 314, 314, 318, 734, 733, 318, 318,
1050
318, 334, 334, 732, 334, 334, 334, 340, 340, 340,
1051
340, 340, 340, 340, 340, 340, 158, 731, 158, 158,
1052
158, 158, 158, 158, 158, 158, 158, 161, 161, 161,
1053
161, 161, 161, 161, 161, 161, 161, 161, 171, 730,
1054
171, 171, 171, 171, 171, 171, 171, 171, 171, 349,
1055
729, 728, 349, 349, 349, 379, 727, 726, 379, 380,
1056
725, 724, 380, 380, 380, 225, 225, 225, 723, 225,
1057
225, 225, 226, 226, 226, 722, 226, 226, 226, 403,
1058
719, 718, 717, 716, 403, 403, 403, 242, 715, 714,
1060
242, 242, 242, 414, 713, 709, 414, 414, 414, 251,
1061
708, 707, 251, 251, 251, 259, 259, 706, 259, 259,
1062
259, 421, 705, 704, 421, 421, 421, 427, 703, 702,
1063
427, 277, 701, 700, 277, 277, 277, 278, 699, 278,
1064
278, 278, 278, 278, 278, 278, 278, 278, 282, 698,
1065
282, 282, 282, 282, 282, 282, 282, 282, 282, 435,
1066
697, 696, 435, 291, 695, 694, 291, 291, 291, 436,
1067
693, 436, 436, 436, 436, 442, 442, 442, 298, 298,
1068
298, 298, 298, 298, 298, 310, 692, 310, 310, 310,
1069
310, 310, 310, 310, 310, 310, 314, 691, 314, 314,
1071
314, 314, 314, 314, 314, 314, 314, 453, 690, 689,
1072
453, 453, 453, 465, 688, 687, 465, 334, 334, 686,
1073
334, 334, 334, 520, 685, 520, 520, 520, 520, 520,
1074
520, 520, 520, 520, 523, 523, 523, 684, 523, 523,
1075
523, 226, 226, 226, 683, 226, 226, 226, 538, 682,
1076
681, 538, 538, 538, 658, 680, 658, 658, 658, 658,
1077
658, 658, 658, 658, 658, 679, 678, 677, 676, 675,
1078
674, 673, 672, 671, 670, 669, 668, 665, 664, 663,
1079
657, 656, 655, 654, 653, 652, 651, 650, 649, 648,
1080
647, 646, 645, 644, 643, 642, 641, 640, 636, 635,
1082
634, 633, 632, 631, 630, 629, 628, 627, 626, 622,
1083
621, 620, 619, 618, 617, 616, 615, 614, 613, 612,
1084
611, 610, 609, 606, 605, 604, 603, 600, 524, 599,
1085
598, 597, 596, 595, 594, 591, 590, 589, 588, 587,
1086
586, 585, 584, 583, 582, 581, 580, 579, 578, 577,
1087
576, 575, 574, 573, 572, 571, 570, 569, 568, 567,
1088
566, 565, 564, 563, 560, 559, 558, 557, 556, 555,
1089
554, 553, 552, 551, 550, 549, 548, 547, 546, 545,
1090
537, 437, 532, 531, 530, 529, 524, 402, 519, 518,
1091
517, 516, 515, 514, 513, 512, 511, 510, 509, 508,
1093
507, 504, 500, 499, 498, 497, 496, 495, 494, 493,
1094
492, 491, 490, 489, 488, 485, 484, 483, 482, 481,
1095
480, 479, 478, 477, 476, 475, 474, 335, 471, 470,
1096
469, 466, 459, 458, 457, 454, 311, 443, 437, 279,
1097
264, 260, 260, 418, 417, 416, 415, 413, 412, 411,
1098
402, 401, 398, 397, 394, 382, 381, 373, 372, 371,
1099
368, 367, 359, 356, 355, 352, 351, 350, 347, 172,
1100
335, 311, 309, 264, 297, 279, 264, 262, 260, 257,
1101
255, 254, 253, 252, 249, 244, 241, 172, 168, 157,
1102
154, 824, 25, 824, 824, 824, 824, 824, 824, 824,
1104
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1105
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1106
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1107
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1108
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1109
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1110
824, 824, 824, 824, 824, 824, 824
1113
static yyconst flex_int16_t yy_chk[2468] =
1115
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1116
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1117
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1118
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1119
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1120
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1121
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1122
1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
1123
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1124
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1126
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1127
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1128
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1129
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1130
3, 3, 3, 3, 3, 3, 3, 3, 5, 6,
1131
5, 6, 28, 28, 32, 28, 32, 33, 161, 33,
1132
161, 33, 33, 815, 5, 6, 7, 7, 7, 7,
1133
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
1134
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
1135
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
1137
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
1138
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
1139
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
1140
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
1141
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1142
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1143
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1144
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1145
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1146
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1148
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
1149
9, 9, 9, 9, 11, 11, 11, 11, 11, 11,
1150
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1151
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1152
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1153
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1154
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1155
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
1156
11, 11, 11, 11, 11, 11, 11, 11, 13, 13,
1157
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1159
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1160
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1161
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1162
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1163
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1164
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
1165
13, 13, 17, 17, 17, 17, 17, 17, 17, 17,
1166
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1167
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1168
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1170
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1171
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1172
17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1173
17, 17, 17, 17, 17, 17, 19, 52, 44, 29,
1174
35, 19, 213, 39, 52, 19, 44, 19, 19, 20,
1175
19, 19, 19, 19, 20, 29, 39, 35, 20, 213,
1176
20, 20, 814, 20, 20, 20, 20, 23, 23, 23,
1177
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1178
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1179
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1181
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1182
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1183
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1184
23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1185
23, 31, 40, 62, 40, 40, 40, 40, 49, 49,
1186
42, 40, 42, 42, 42, 42, 50, 50, 46, 42,
1187
46, 46, 46, 46, 51, 51, 66, 66, 813, 66,
1188
53, 60, 46, 53, 53, 53, 53, 53, 60, 31,
1189
43, 119, 43, 73, 73, 43, 73, 62, 119, 203,
1190
203, 46, 75, 119, 43, 43, 43, 43, 75, 75,
1192
154, 43, 154, 154, 43, 43, 43, 43, 43, 43,
1193
43, 43, 43, 43, 43, 43, 43, 210, 210, 60,
1194
43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
1195
43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
1196
43, 43, 43, 43, 45, 56, 45, 45, 45, 45,
1197
63, 812, 56, 58, 59, 61, 57, 45, 45, 187,
1198
58, 59, 61, 57, 45, 808, 78, 78, 45, 78,
1199
47, 94, 187, 190, 45, 47, 807, 45, 47, 190,
1200
47, 47, 47, 47, 47, 109, 45, 47, 56, 47,
1201
47, 57, 127, 806, 45, 59, 63, 61, 57, 805,
1203
86, 86, 58, 86, 92, 92, 95, 92, 95, 94,
1204
95, 95, 99, 138, 99, 99, 99, 99, 101, 101,
1205
101, 101, 102, 109, 102, 102, 102, 102, 158, 103,
1206
127, 103, 103, 103, 103, 102, 102, 113, 113, 113,
1207
113, 804, 102, 103, 192, 110, 102, 110, 192, 110,
1208
110, 138, 102, 192, 112, 102, 112, 112, 112, 112,
1209
136, 136, 103, 136, 102, 115, 158, 115, 115, 115,
1210
115, 802, 102, 114, 226, 114, 114, 114, 114, 115,
1211
117, 226, 117, 121, 117, 117, 114, 114, 801, 122,
1212
121, 155, 155, 114, 155, 121, 122, 114, 115, 156,
1214
156, 122, 156, 114, 120, 123, 114, 120, 120, 120,
1215
120, 120, 123, 211, 197, 114, 120, 123, 124, 797,
1216
125, 126, 211, 114, 122, 124, 121, 125, 126, 197,
1217
124, 122, 125, 126, 129, 796, 129, 129, 129, 129,
1218
130, 130, 130, 130, 132, 263, 132, 132, 132, 132,
1219
163, 139, 163, 139, 123, 139, 139, 193, 132, 124,
1220
795, 193, 141, 126, 141, 141, 141, 141, 125, 143,
1221
143, 143, 143, 194, 146, 194, 145, 132, 145, 145,
1222
145, 145, 146, 263, 146, 146, 224, 224, 146, 794,
1223
145, 148, 148, 148, 148, 148, 149, 149, 149, 149,
1225
149, 143, 162, 216, 162, 162, 143, 143, 143, 145,
1226
143, 144, 216, 144, 144, 144, 144, 150, 150, 150,
1227
150, 150, 273, 273, 144, 144, 151, 151, 151, 151,
1228
151, 144, 205, 205, 205, 144, 164, 164, 164, 164,
1229
362, 144, 362, 278, 144, 165, 165, 165, 165, 166,
1230
166, 166, 166, 144, 167, 167, 167, 167, 287, 287,
1231
230, 144, 175, 175, 175, 175, 176, 230, 176, 176,
1232
176, 176, 180, 180, 180, 180, 202, 202, 202, 202,
1233
176, 278, 212, 792, 180, 204, 212, 204, 202, 214,
1234
204, 204, 204, 204, 214, 229, 310, 231, 789, 176,
1236
786, 212, 229, 180, 231, 228, 232, 202, 228, 228,
1237
228, 228, 228, 232, 234, 235, 233, 240, 240, 402,
1238
240, 234, 235, 233, 241, 241, 320, 241, 243, 243,
1239
320, 243, 244, 244, 310, 244, 248, 248, 386, 248,
1240
785, 249, 249, 229, 249, 231, 232, 232, 233, 256,
1241
256, 386, 256, 257, 257, 235, 257, 402, 261, 261,
1242
234, 261, 262, 262, 784, 262, 266, 266, 266, 266,
1243
268, 268, 268, 268, 269, 783, 269, 269, 269, 269,
1244
270, 270, 270, 270, 272, 272, 272, 272, 269, 275,
1245
275, 275, 270, 274, 479, 274, 272, 520, 274, 274,
1247
274, 274, 281, 281, 281, 281, 479, 269, 289, 289,
1248
289, 270, 325, 325, 405, 272, 283, 283, 283, 283,
1249
284, 405, 284, 284, 284, 284, 285, 285, 285, 285,
1250
286, 286, 286, 286, 284, 520, 298, 782, 285, 288,
1251
780, 288, 286, 298, 288, 288, 288, 288, 298, 293,
1252
293, 293, 293, 284, 327, 327, 327, 285, 293, 330,
1253
330, 286, 294, 294, 294, 294, 295, 295, 295, 295,
1254
342, 294, 342, 342, 682, 295, 296, 296, 296, 296,
1255
375, 375, 682, 300, 301, 296, 300, 300, 300, 300,
1256
300, 301, 302, 303, 304, 300, 301, 423, 423, 302,
1258
303, 304, 407, 306, 302, 303, 304, 305, 384, 407,
1259
306, 307, 431, 431, 305, 306, 779, 384, 307, 305,
1260
384, 308, 308, 307, 308, 309, 309, 778, 309, 378,
1261
378, 378, 301, 404, 304, 304, 426, 426, 426, 305,
1262
404, 303, 313, 313, 313, 313, 434, 434, 434, 306,
1263
406, 307, 315, 315, 315, 315, 316, 406, 316, 316,
1264
316, 316, 317, 317, 317, 317, 324, 324, 324, 324,
1265
316, 777, 408, 775, 317, 326, 404, 326, 324, 408,
1266
326, 326, 326, 326, 336, 336, 336, 336, 336, 316,
1267
406, 461, 461, 317, 464, 464, 464, 324, 337, 337,
1269
337, 337, 337, 338, 338, 338, 338, 338, 339, 339,
1270
339, 339, 339, 343, 343, 343, 343, 344, 344, 344,
1271
344, 345, 345, 345, 345, 346, 346, 346, 346, 348,
1272
774, 348, 773, 772, 348, 348, 348, 348, 374, 374,
1273
374, 374, 376, 376, 376, 376, 377, 377, 377, 377,
1274
374, 409, 410, 419, 419, 419, 419, 525, 409, 410,
1275
420, 771, 420, 770, 525, 420, 420, 420, 420, 374,
1276
422, 422, 422, 422, 424, 424, 424, 424, 425, 425,
1277
425, 425, 422, 721, 766, 512, 410, 764, 444, 409,
1278
428, 428, 428, 428, 512, 444, 721, 429, 763, 429,
1280
444, 422, 429, 429, 429, 429, 430, 430, 430, 430,
1281
432, 432, 432, 432, 433, 433, 433, 433, 430, 438,
1282
438, 438, 438, 439, 439, 439, 439, 761, 438, 760,
1283
758, 444, 439, 440, 440, 440, 440, 430, 441, 441,
1284
441, 441, 440, 445, 446, 447, 448, 441, 757, 756,
1285
445, 446, 447, 448, 449, 445, 446, 447, 448, 755,
1286
450, 449, 451, 451, 451, 451, 449, 450, 452, 738,
1287
452, 754, 450, 452, 452, 452, 452, 460, 460, 460,
1288
460, 752, 738, 526, 446, 462, 462, 462, 462, 460,
1289
526, 751, 449, 750, 450, 463, 463, 463, 463, 472,
1291
472, 472, 472, 473, 473, 473, 473, 527, 460, 528,
1292
533, 533, 533, 533, 527, 749, 528, 534, 534, 534,
1293
534, 535, 535, 535, 535, 536, 536, 536, 536, 539,
1294
540, 541, 542, 747, 600, 746, 539, 540, 541, 542,
1295
561, 539, 540, 541, 542, 543, 543, 543, 543, 527,
1296
544, 544, 544, 544, 561, 576, 528, 601, 602, 658,
1297
561, 661, 607, 608, 601, 602, 745, 743, 661, 607,
1298
608, 576, 600, 541, 607, 608, 662, 576, 666, 542,
1299
667, 674, 742, 662, 740, 666, 739, 667, 737, 736,
1300
666, 735, 667, 601, 734, 674, 732, 658, 607, 731,
1302
730, 674, 729, 728, 727, 602, 726, 724, 723, 722,
1303
608, 825, 825, 825, 825, 825, 825, 825, 825, 825,
1304
825, 825, 826, 826, 826, 826, 826, 826, 826, 826,
1305
826, 826, 826, 827, 827, 827, 827, 827, 827, 827,
1306
827, 827, 827, 827, 828, 720, 828, 828, 828, 828,
1307
828, 828, 828, 828, 828, 829, 829, 829, 829, 829,
1308
829, 829, 829, 829, 829, 829, 830, 718, 830, 830,
1309
830, 830, 830, 830, 830, 830, 830, 831, 831, 831,
1310
832, 832, 832, 717, 832, 832, 832, 833, 716, 715,
1311
833, 833, 833, 834, 834, 834, 835, 714, 713, 835,
1313
835, 835, 836, 836, 836, 837, 837, 712, 837, 837,
1314
837, 838, 711, 838, 838, 838, 838, 838, 838, 838,
1315
838, 838, 839, 710, 839, 839, 839, 839, 839, 839,
1316
839, 839, 839, 840, 709, 708, 840, 840, 840, 841,
1317
707, 706, 841, 841, 841, 842, 705, 842, 842, 842,
1318
842, 842, 842, 842, 842, 842, 843, 704, 843, 843,
1319
843, 843, 843, 843, 843, 843, 843, 844, 703, 701,
1320
844, 844, 844, 845, 845, 845, 846, 846, 846, 846,
1321
846, 846, 846, 847, 699, 847, 847, 847, 847, 847,
1322
847, 847, 847, 847, 848, 698, 848, 848, 848, 848,
1324
848, 848, 848, 848, 848, 849, 697, 696, 849, 849,
1325
849, 850, 850, 694, 850, 850, 850, 851, 851, 851,
1326
851, 851, 851, 851, 851, 851, 852, 693, 852, 852,
1327
852, 852, 852, 852, 852, 852, 852, 853, 853, 853,
1328
853, 853, 853, 853, 853, 853, 853, 853, 854, 692,
1329
854, 854, 854, 854, 854, 854, 854, 854, 854, 855,
1330
691, 690, 855, 855, 855, 856, 689, 688, 856, 857,
1331
687, 685, 857, 857, 857, 858, 858, 858, 684, 858,
1332
858, 858, 859, 859, 859, 683, 859, 859, 859, 860,
1333
681, 680, 679, 678, 860, 860, 860, 861, 677, 676,
1335
861, 861, 861, 862, 675, 673, 862, 862, 862, 863,
1336
672, 671, 863, 863, 863, 864, 864, 670, 864, 864,
1337
864, 865, 669, 668, 865, 865, 865, 866, 664, 657,
1338
866, 867, 656, 654, 867, 867, 867, 868, 653, 868,
1339
868, 868, 868, 868, 868, 868, 868, 868, 869, 651,
1340
869, 869, 869, 869, 869, 869, 869, 869, 869, 870,
1341
650, 649, 870, 871, 646, 645, 871, 871, 871, 872,
1342
644, 872, 872, 872, 872, 873, 873, 873, 874, 874,
1343
874, 874, 874, 874, 874, 875, 643, 875, 875, 875,
1344
875, 875, 875, 875, 875, 875, 876, 642, 876, 876,
1346
876, 876, 876, 876, 876, 876, 876, 877, 640, 639,
1347
877, 877, 877, 878, 638, 637, 878, 879, 879, 636,
1348
879, 879, 879, 880, 634, 880, 880, 880, 880, 880,
1349
880, 880, 880, 880, 881, 881, 881, 633, 881, 881,
1350
881, 882, 882, 882, 632, 882, 882, 882, 883, 631,
1351
629, 883, 883, 883, 884, 628, 884, 884, 884, 884,
1352
884, 884, 884, 884, 884, 627, 626, 625, 624, 623,
1353
621, 620, 619, 615, 613, 612, 611, 606, 605, 604,
1354
599, 598, 597, 596, 595, 594, 593, 592, 591, 590,
1355
589, 588, 586, 584, 583, 581, 578, 577, 575, 574,
1357
573, 572, 571, 570, 569, 568, 566, 565, 564, 560,
1358
558, 557, 556, 555, 554, 553, 552, 551, 550, 549,
1359
548, 547, 545, 532, 531, 530, 529, 524, 523, 518,
1360
517, 516, 515, 514, 513, 511, 510, 509, 508, 507,
1361
506, 505, 503, 502, 501, 500, 499, 498, 497, 496,
1362
494, 493, 492, 491, 490, 489, 488, 487, 486, 485,
1363
483, 482, 481, 480, 478, 477, 476, 475, 471, 470,
1364
469, 468, 467, 466, 459, 458, 457, 456, 455, 454,
1365
437, 436, 418, 413, 412, 411, 403, 401, 400, 398,
1366
397, 396, 395, 394, 393, 392, 391, 390, 389, 388,
1368
387, 385, 383, 382, 381, 372, 371, 370, 369, 368,
1369
367, 366, 365, 364, 363, 361, 360, 359, 358, 357,
1370
356, 355, 354, 353, 352, 351, 350, 334, 333, 332,
1371
331, 329, 323, 322, 321, 319, 314, 299, 292, 282,
1372
267, 259, 258, 255, 254, 253, 252, 247, 246, 245,
1373
227, 225, 218, 217, 215, 209, 208, 200, 199, 198,
1374
196, 195, 191, 189, 188, 186, 185, 183, 173, 171,
1375
147, 140, 137, 128, 118, 111, 96, 93, 89, 87,
1376
85, 84, 83, 82, 79, 74, 67, 36, 34, 30,
1377
27, 25, 824, 824, 824, 824, 824, 824, 824, 824,
1379
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1380
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1381
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1382
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1383
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1384
824, 824, 824, 824, 824, 824, 824, 824, 824, 824,
1385
824, 824, 824, 824, 824, 824, 824
1388
/* Table of booleans, true if rule could match eol. */
1389
static yyconst flex_int32_t yy_rule_can_match_eol[210] =
1391
1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1392
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1393
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1394
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1395
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1396
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1397
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1398
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
1399
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,
1400
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1401
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, };
1403
static yyconst flex_int16_t yy_rule_linenum[209] =
1405
226, 248, 250, 252, 274, 275, 276, 277, 278, 279,
1406
280, 281, 282, 283, 284, 285, 287, 288, 289, 290,
1407
292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
1408
302, 303, 305, 310, 311, 313, 314, 315, 316, 317,
1409
318, 319, 320, 321, 322, 323, 325, 326, 327, 328,
1410
330, 331, 332, 333, 335, 336, 337, 338, 339, 341,
1411
342, 343, 344, 345, 346, 347, 348, 350, 351, 352,
1412
353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
1413
363, 364, 365, 366, 367, 370, 377, 378, 379, 380,
1414
381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
1416
392, 393, 394, 395, 396, 397, 398, 399, 401, 405,
1417
427, 439, 468, 516, 517, 518, 519, 521, 530, 542,
1418
571, 572, 573, 574, 575, 577, 585, 636, 649, 671,
1419
676, 681, 688, 689, 704, 709, 710, 715, 716, 717,
1420
719, 735, 789, 817, 822, 827, 828, 829, 830, 835,
1421
846, 847, 849, 851, 862, 876, 881, 882, 883, 884,
1422
886, 901, 915, 944, 969, 971, 976, 986, 991, 1009,
1423
1015, 1022, 1055, 1057, 1062, 1098, 1099, 1100, 1102, 1103,
1424
1104, 1105, 1106, 1107, 1109, 1110, 1111, 1113, 1118, 1123,
1425
1124, 1127, 1161, 1166, 1169, 1170, 1171, 1172, 1174, 1179,
1427
1180, 1181, 1182, 1183, 1185, 1190, 1192, 1194
1430
/* The intent behind this definition is that it'll catch
1431
* any uses of REJECT which flex missed.
1433
#define REJECT reject_used_but_not_detected
1434
#define yymore() yymore_used_but_not_detected
1435
#define YY_MORE_ADJ 0
1436
#define YY_RESTORE_YY_MORE_OFFSET
1442
* $Id: pirlexer.c 41681 2009-10-04 11:07:09Z kjs $
1443
* Copyright (C) 2007-2009, Parrot Foundation.
1450
pir.l - implementation of the lexical analyzer of the PIR assembly language.
1454
This file implements the lexical analyzer of the PIR assembly language.
1455
The macro layer is implemented here as well. Heredocs and C<.include>
1456
are processed by a different preprocessor; see F<hdocprep.l>.
1465
#include "pirparser.h"
1466
#include "pircompiler.h"
1467
#include "pirmacro.h"
1470
#include "parrot/parrot.h"
1472
/* define the type of the extra field in the yyscan_t object that is passed around;
1473
* this is the lexer_state structure, defined in "pircompiler.h"
1475
#define YY_EXTRA_TYPE struct lexer_state *
1477
/* accessor methods for setting and getting the column; flex doesn't generate
1478
* prototypes for these for some reason. It's probably a missing feature, so
1479
* let's do that here and now.
1481
extern int yypirget_column(yyscan_t yyscanner);
1482
extern void yypirset_column(int col, yyscan_t yyscanner);
1485
/* warning C4018: "signed/unsigned mismatch" */
1486
# pragma warning (disable:4018)
1487
/* warning C4244: "conversion from 'int' to 'yytype_int16' */
1488
# pragma warning (disable:4244)
1491
/* is this possible on other platforms? */
1495
void include_file(yyscan_t yyscanner, char const * const filename);
1496
char *expand_macro(yyscan_t yyscanner, macro_def * const macro, macro_param * args);
1498
/* static prototypes */
1499
static int is_pir_directive(char * const text);
1500
static macro_table *pop_macro_table(lexer_state * const lexer);
1501
static macro_table *peek_macro_table(lexer_state * const lexer);
1502
static char * munge_id(char const * const id, lexer_state * const lexer);
1504
static void save_filestate(yyscan_t yyscanner);
1505
static int restore_filestate(yyscan_t yyscanner);
1507
/* make sure yytext is a pointer */
1508
/* slightly more efficient when this option is set; our parser is not interactive anyway. */
1509
/* define output file */
1510
/* name of header file */
1511
/* prefix on exported functions. */
1512
/* we don't use unput, so don't generate it */
1513
/* use flex' built-in capability for line counting */
1514
/* make the scanner re-entrant */
1515
/* needed for bison interaction. */
1516
/* make yypirwrap() always return true. */
1517
/* always show warnings if something's wrong with our spec. */
1518
/* create a scanner in debug mode; XXX remove this in production build. */
1519
/* we're pushing and popping lexer states, so we need a stack */
1520
/* override memory allocation function with Parrot's memory functions;
1521
* don't generate built-ins.
1523
/* XXX document, and possibly rename, these states, when are they used? */
1526
/* The MACROLOCAL state is used ONLY when parsing ".macro_local <type> <ident>". */
1528
/* The MACROLABEL state is used ONLY when parsing ".macro_label <ident>". */
1530
/* The MACROEXPAND state is entered when we find a dot-identifier (e.g. ".foo"); */
1533
/* note that SCANSTR is an inclusive state, purely to override default action for <<EOF>> */
1537
/* The SPECIALSTART state is only used when the parsing starts, and only to
1538
* read a single character; we're not interested in the character, but we want
1539
* a way for the lexer to check the PASM flag (indicating a PASM file), and this
1540
* check must only be done once (it's a waste to do it for each token). The
1541
* read character will be pushed back into the input stream immediately, and
1542
* a token will be returned, indicating it's a PASM or PIR file.
1545
/* The PASM state is an exclusive state, recognizing ONLY PASM tokens. */
1547
#line 1548 "pirlexer.c"
1552
#define MACROLOCAL 3
1553
#define MACROLABEL 4
1554
#define MACROEXPAND 5
1555
#define MACROCONST 6
1558
#define STRINGEXPAND 9
1559
#define SPECIALSTART 10
1562
#ifndef YY_NO_UNISTD_H
1563
/* Special case for "unistd.h", since it is non-ANSI. We include it way
1564
* down here because we want the user's section 1 to have been scanned first.
1565
* The user has a chance to override it with an option.
1574
#ifndef YY_EXTRA_TYPE
1575
#define YY_EXTRA_TYPE void *
1578
/* %if-c-only Reentrant structure and macros (non-C++). */
1581
/* Holds the entire state of the reentrant scanner. */
1585
/* User-defined. Not touched by flex. */
1586
YY_EXTRA_TYPE yyextra_r;
1588
/* The rest are the same as the globals declared in the non-reentrant scanner. */
1589
FILE *yyin_r, *yyout_r;
1590
size_t yy_buffer_stack_top; /**< index of top of stack. */
1591
size_t yy_buffer_stack_max; /**< capacity of stack. */
1592
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1594
yy_size_t yy_n_chars;
1599
int yy_did_buffer_switch_on_eof;
1600
int yy_start_stack_ptr;
1601
int yy_start_stack_depth;
1602
int *yy_start_stack;
1603
yy_state_type yy_last_accepting_state;
1604
char* yy_last_accepting_cpos;
1607
int yy_flex_debug_r;
1615
}; /* end struct yyguts_t */
1619
static int yy_init_globals (yyscan_t yyscanner );
1625
/* This must go here because YYSTYPE and YYLTYPE are included
1626
* from bison output in section 1.*/
1627
# define yylval yyg->yylval_r
1629
int yypirlex_init (yyscan_t* scanner);
1631
int yypirlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
1635
/* %endif End reentrant structures and macros. */
1637
/* Accessor methods to globals.
1638
These are made visible to non-reentrant scanners for convenience. */
1640
int yypirlex_destroy (yyscan_t yyscanner );
1642
int yypirget_debug (yyscan_t yyscanner );
1644
void yypirset_debug (int debug_flag ,yyscan_t yyscanner );
1646
YY_EXTRA_TYPE yypirget_extra (yyscan_t yyscanner );
1648
void yypirset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
1650
FILE *yypirget_in (yyscan_t yyscanner );
1652
void yypirset_in (FILE * in_str ,yyscan_t yyscanner );
1654
FILE *yypirget_out (yyscan_t yyscanner );
1656
void yypirset_out (FILE * out_str ,yyscan_t yyscanner );
1658
yy_size_t yypirget_leng (yyscan_t yyscanner );
1660
char *yypirget_text (yyscan_t yyscanner );
1662
int yypirget_lineno (yyscan_t yyscanner );
1664
void yypirset_lineno (int line_number ,yyscan_t yyscanner );
1666
/* %if-bison-bridge */
1668
YYSTYPE * yypirget_lval (yyscan_t yyscanner );
1670
void yypirset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
1674
/* Macros after this point can all be overridden by user definitions in
1678
#ifndef YY_SKIP_YYWRAP
1680
extern "C" int yypirwrap (yyscan_t yyscanner );
1682
extern int yypirwrap (yyscan_t yyscanner );
1686
/* %not-for-header */
1688
/* %ok-for-header */
1693
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
1696
#ifdef YY_NEED_STRLEN
1697
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
1701
/* %if-c-only Standard (non-C++) definition */
1702
/* %not-for-header */
1705
static int yyinput (yyscan_t yyscanner );
1707
static int input (yyscan_t yyscanner );
1709
/* %ok-for-header */
1716
static void yy_push_state (int new_state ,yyscan_t yyscanner);
1718
static void yy_pop_state (yyscan_t yyscanner );
1720
static int yy_top_state (yyscan_t yyscanner );
1724
/* Amount of stuff to slurp up with each read. */
1725
#ifndef YY_READ_BUF_SIZE
1726
#define YY_READ_BUF_SIZE 8192
1729
/* Copy whatever the last rule matched to the standard output. */
1731
/* %if-c-only Standard (non-C++) definition */
1732
/* This used to be an fputs(), but since the string might contain NUL's,
1733
* we now use fwrite().
1735
#define ECHO fwrite( yytext, yyleng, 1, yyout )
1737
/* %if-c++-only C++ definition */
1741
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1742
* is returned in "result".
1745
#define YY_INPUT(buf,result,max_size) \
1746
/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
1747
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1751
for ( n = 0; n < max_size && \
1752
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1753
buf[n] = (char) c; \
1755
buf[n++] = (char) c; \
1756
if ( c == EOF && ferror( yyin ) ) \
1757
YY_FATAL_ERROR( "input in flex scanner failed" ); \
1763
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1765
if( errno != EINTR) \
1767
YY_FATAL_ERROR( "input in flex scanner failed" ); \
1775
/* %if-c++-only C++ definition \ */\
1780
/* No semi-colon after return; correct usage is to write "yyterminate();" -
1781
* we don't want an extra ';' after the "return" because that will cause
1782
* some compilers to complain about unreachable statements.
1785
#define yyterminate() return YY_NULL
1788
/* Number of entries by which start-condition stack grows. */
1789
#ifndef YY_START_STACK_INCR
1790
#define YY_START_STACK_INCR 25
1793
/* Report a fatal error. */
1794
#ifndef YY_FATAL_ERROR
1796
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1802
/* %if-tables-serialization structures and prototypes */
1803
/* %not-for-header */
1805
/* %ok-for-header */
1807
/* %not-for-header */
1809
/* %tables-yydmap generated elements */
1811
/* end tables serialization structures and prototypes */
1813
/* %ok-for-header */
1815
/* Default declaration of generated scanner - a define so the user can
1816
* easily add parameters.
1819
#define YY_DECL_IS_OURS 1
1820
/* %if-c-only Standard (non-C++) definition */
1822
extern int yypirlex \
1823
(YYSTYPE * yylval_param ,yyscan_t yyscanner);
1825
#define YY_DECL int yypirlex \
1826
(YYSTYPE * yylval_param , yyscan_t yyscanner)
1828
/* %if-c++-only C++ definition */
1830
#endif /* !YY_DECL */
1832
/* Code executed at the beginning of each rule, after yytext and yyleng
1835
#ifndef YY_USER_ACTION
1836
#define YY_USER_ACTION
1839
/* Code executed at the end of each rule. */
1841
#define YY_BREAK break;
1844
/* %% [6.0] YY_RULE_SETUP definition goes here */
1845
#define YY_RULE_SETUP \
1848
/* %not-for-header */
1850
/** The main scanner function which does all the work.
1854
register yy_state_type yy_current_state;
1855
register char *yy_cp, *yy_bp;
1856
register int yy_act;
1857
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1859
/* %% [7.0] user's declarations go here */
1864
#line 1865 "pirlexer.c"
1866
yylval = yylval_param;
1868
if ( !yyg->yy_init )
1876
if ( ! yyg->yy_start )
1877
yyg->yy_start = 1; /* first start state */
1893
if ( ! YY_CURRENT_BUFFER ) {
1894
yypirensure_buffer_stack (yyscanner);
1895
YY_CURRENT_BUFFER_LVALUE =
1896
yypir_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1899
yypir_load_buffer_state(yyscanner );
1902
while ( 1 ) /* loops until end-of-file is reached */
1904
/* %% [8.0] yymore()-related code goes here */
1905
yy_cp = yyg->yy_c_buf_p;
1907
/* Support of yytext. */
1908
*yy_cp = yyg->yy_hold_char;
1910
/* yy_bp points to the position in yy_ch_buf of the start of
1915
/* %% [9.0] code to set up and find next match goes here */
1916
yy_current_state = yyg->yy_start;
1920
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1921
if ( yy_accept[yy_current_state] )
1923
yyg->yy_last_accepting_state = yy_current_state;
1924
yyg->yy_last_accepting_cpos = yy_cp;
1926
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1928
yy_current_state = (int) yy_def[yy_current_state];
1929
if ( yy_current_state >= 825 )
1930
yy_c = yy_meta[(unsigned int) yy_c];
1932
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1935
while ( yy_current_state != 824 );
1936
yy_cp = yyg->yy_last_accepting_cpos;
1937
yy_current_state = yyg->yy_last_accepting_state;
1940
/* %% [10.0] code to find the action number goes here */
1941
yy_act = yy_accept[yy_current_state];
1943
YY_DO_BEFORE_ACTION;
1945
/* %% [11.0] code for yylineno update goes here */
1947
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1950
for ( yyl = 0; yyl < yyleng; ++yyl )
1951
if ( yytext[yyl] == '\n' )
1959
do_action: /* This label is used only to access EOF actions. */
1961
/* %% [12.0] debug code goes here */
1962
if ( yy_flex_debug )
1965
fprintf( stderr, "--scanner backing up\n" );
1966
else if ( yy_act < 209 )
1967
fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
1968
(long)yy_rule_linenum[yy_act], yytext );
1969
else if ( yy_act == 209 )
1970
fprintf( stderr, "--accepting default rule (\"%s\")\n",
1972
else if ( yy_act == 210 )
1973
fprintf( stderr, "--(end of buffer or a NUL)\n" );
1975
fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
1979
{ /* beginning of action switch */
1980
/* %% [13.0] actions go here */
1981
case 0: /* must back up */
1982
/* undo the effects of YY_DO_BEFORE_ACTION */
1983
*yy_cp = yyg->yy_hold_char;
1984
yy_cp = yyg->yy_last_accepting_cpos;
1985
yy_current_state = yyg->yy_last_accepting_state;
1986
goto yy_find_action;
1989
/* rule 1 can match eol */
1992
{ /* only when the scanning starts, is this state used. Only a single
1993
* character is read, pushed back, and then, depending on the
1994
* lexer flags, either PASM or PIR mode (INITIAL state) is activated.
1995
* The alternative (documented in Bison's info) would be to have a
1996
* check on some variable, which is written right after the %% marker
1997
* above. However, that code would be executed on every call to the
1998
* lexer, which is a bit of a waste.
2000
yyless(0); /* put everything back. It's only 1 character anyway. */
2001
yy_pop_state(yyscanner); /* SPECIALSTART was pushed on state stack. */
2003
if (TEST_FLAG(yypirget_extra(yyscanner)->flags, LEXER_FLAG_PASMFILE)) {
2005
return TK_PASM_MARKER_START;
2008
BEGIN(INITIAL); /* this is the normal case. */
2009
return TK_PIR_MARKER_START;
2017
{ /* ignore whitespace */ }
2020
/* rule 3 can match eol */
2023
{ /* ignore line comments */ }
2026
/* rule 4 can match eol */
2029
{ /* a set of continuous newlines yields a single newline token. */
2031
int num_newlines = 0;
2033
/* count number of newlines in the matched text;
2034
* iterate explicitly using an index is somewhat safer
2035
* than with a character pointer, as you'd have to
2036
* check for (*iter != '\0'), not (iter != NULL) for
2037
* some reason. Just do it safely, and hope the compiler
2038
* optimizes this a bit.
2040
while (index < yyleng) {
2041
if (yytext[index] == '\n')
2046
/* pass the number of matched newlines */
2047
yylval->ival = num_newlines;
2054
{ return TK_ASSIGN_USHIFT; }
2059
{ return TK_USHIFT; }
2064
{ return TK_ASSIGN_RSHIFT; }
2069
{ return TK_RSHIFT; }
2074
{ return TK_LSHIFT; }
2079
{ return TK_ARROW; }
2194
{ /* if the dot is surrounded by whitespace, it's a concatenation operator */
2211
{ return TK_ASSIGN_INC; }
2216
{ return TK_ASSIGN_DEC; }
2221
{ return TK_ASSIGN_DIV; }
2226
{ return TK_ASSIGN_MUL; }
2231
{ return TK_ASSIGN_MOD; }
2236
{ return TK_ASSIGN_POW; }
2241
{ return TK_ASSIGN_BOR; }
2246
{ return TK_ASSIGN_BAND; }
2251
{ return TK_ASSIGN_FDIV; }
2256
{ return TK_ASSIGN_BNOT; }
2261
{ return TK_ASSIGN_CONC; }
2276
{ return TK_UNLESS; }
2301
{ return TK_STRING; }
2306
{ return TK_ANNOTATE; }
2311
{ return TK_SET_ARG; }
2316
{ return TK_CONST; }
2331
{ return TK_GET_RESULTS; }
2336
{ return TK_GLOBALCONST; }
2346
{ return TK_INVOCANT; }
2361
{ return TK_LOADLIB; }
2366
{ return TK_LOCAL; }
2371
{ return TK_METH_CALL; }
2376
{ return TK_NAMESPACE; }
2381
{ return TK_NCI_CALL; }
2386
{ return TK_PARAM; }
2391
{ return TK_BEGIN_CALL; }
2396
{ return TK_BEGIN_RETURN; }
2401
{ return TK_BEGIN_YIELD; }
2411
{ return TK_END_CALL; }
2416
{ return TK_END_RETURN; }
2421
{ return TK_END_YIELD; }
2426
{ return TK_GET_RESULT; }
2431
{ return TK_RETURN; }
2441
{ return TK_YIELD; }
2446
{ return TK_SET_RETURN; }
2451
{ return TK_SET_YIELD; }
2456
{ return TK_TAILCALL; }
2461
{ /* make sure these are not used outside macro defs */
2462
yypirerror(yyscanner, yypirget_extra(yyscanner),
2463
"cannot use '%s' outside of macro definitions", yytext);
2469
{ return TK_FLAG_ANON; }
2474
{ return TK_FLAG_INIT; }
2479
{ return TK_FLAG_LOAD; }
2484
{ return TK_FLAG_POSTCOMP; }
2489
{ return TK_FLAG_IMMEDIATE; }
2494
{ return TK_FLAG_MAIN; }
2499
{ return TK_FLAG_METHOD; }
2504
{ return TK_FLAG_LEX; }
2509
{ return TK_FLAG_OUTER; }
2514
{ return TK_FLAG_VTABLE; }
2519
{ return TK_FLAG_MULTI; }
2524
{ return TK_FLAG_SUBID; }
2529
{ return TK_FLAG_INSTANCEOF; }
2534
{ return TK_FLAG_NSENTRY; }
2539
{ return TK_FLAG_UNIQUE_REG; }
2544
{ return TK_FLAG_OPTIONAL; }
2549
{ return TK_FLAG_OPT_FLAG; }
2554
{ return TK_FLAG_SLURPY; }
2559
{ return TK_FLAG_NAMED; }
2564
{ return TK_FLAG_FLAT; }
2569
{ return TK_FLAG_INVOCANT; }
2574
{ return TK_FLAG_LOOKAHEAD; }
2579
{ yypirerror(yyscanner, yypirget_extra(yyscanner),
2580
"unrecognized flag: '%s'", yytext);
2586
{ /* XXX this is a bit hacky. First the string is unescaped, but that
2587
* returns a STRING * object; that's not what we want at this point.
2588
* So, convert it back to a C string, and return that. Later, that
2589
* string is converted into a STRING again, so this must be fixed.
2590
* Preferably there would be an unescape function returning a C-string.
2592
lexer_state * const lexer = yypirget_extra(yyscanner);
2594
STRING *pstr = Parrot_str_unescape(lexer->interp,
2595
yytext + 1, '"', "ascii");
2597
char *str = Parrot_str_to_cstring(lexer->interp, pstr);
2601
/* store the STRING in lexer's sval buffer; once PIRC is doing
2602
only STRINGs, it can be stored in yylval.sval. */
2611
{ /* copy the string, remove the quotes. */
2612
lexer_state * const lexer = yypirget_extra(yyscanner);
2614
STRING *str = Parrot_str_unescape(lexer->interp, yytext + 1, '\'', "ascii");
2617
yylval->sval = dupstrn(lexer, yytext + 1, yyleng - 2);
2626
{ /* XXX these double-quoted strings are not unescaped (yet) */
2627
/* parse yytext, which contains the charset, a ':', and the quoted string */
2628
char *colon = strchr(yytext, ':');
2629
lexer_state *lexer = yypirget_extra(yyscanner);
2630
ucstring *ustr = (ucstring *)pir_mem_allocate(lexer, sizeof (ucstring));
2631
/* copy the charset part */
2632
ustr->charset = dupstrn(lexer, yytext, colon - yytext);
2633
/* the colon becomes a NULL character to end the encoding string */
2635
/* copy the string contents, strip the quotes. Example:
2636
* iso-8859-1:"hi there"
2637
* 123456789012345678901
2640
* colon points to the colon, add 2 to point to the first character
2641
* in the string ('h'). yyleng is 20 in the example, subtract
2642
* string length of the charset part (10) and 3 for the quotes and colon.
2645
ustr->contents = dupstrn(lexer, colon + 2, yyleng - strlen(ustr->charset) - 3);
2647
ustr->encoding = NULL;
2649
/* fprintf(stderr, "ucstring: [%s]:[%s]\n", ustr->charset, ustr->contents); */
2651
yylval->ustr = ustr;
2658
{ /* XXX these double-quoted strings are not unescaped (yet) */
2659
/* parse yytext, which contains the encoding, a ':', a charset,
2660
* a ':', and the quoted string
2662
char *colon1 = strchr(yytext, ':');
2664
lexer_state *lexer = yypirget_extra(yyscanner);
2665
ucstring *ustr = (ucstring *)pir_mem_allocate(lexer, sizeof (ucstring));
2667
/* yytext has the following structure:
2669
* <charset><encoding><contents>
2671
* utf:unicode:"hi there"
2672
* 1234567890123456789012
2676
* colon1 points to the first colon, colon2 points to the second.
2679
/* copy the encoding part */
2680
ustr->encoding = dupstrn(lexer, yytext, colon1 - yytext);
2682
/* look for the second colon after this one */
2683
colon2 = strchr(colon1 + 1, ':');
2684
/* the colon becomes a NULL character to end the encoding string */
2687
ustr->charset = dupstrn(lexer, colon1 + 1, colon2 - colon1 - 1);
2689
/* start copying after the second colon, and skip the quote as well.
2690
* yyleng contains the total length, substract length of encoding,
2691
* length of charset, 2 quotes, and 2 colons (hence -4).
2693
ustr->contents = dupstrn(lexer, colon2 + 2,
2694
yyleng - strlen(ustr->charset) - strlen(ustr->encoding) - 4);
2696
/* fprintf(stderr, "ucstring: [%s]:[%s]:[%s]\n", ustr->encoding, ustr->charset,
2700
yylval->ustr = ustr;
2708
{ yylval->ival = atoi(yytext + 2); return TK_PREG; }
2713
{ yylval->ival = atoi(yytext + 2); return TK_SREG; }
2718
{ yylval->ival = atoi(yytext + 2); return TK_NREG; }
2723
{ yylval->ival = atoi(yytext + 2); return TK_IREG; }
2728
{ /* make the label Id available in the parser. remove the ":" first. */
2729
lexer_state * const lexer = yypirget_extra(yyscanner);
2730
STRING *str = Parrot_str_new(lexer->interp, yytext, yyleng - 1);
2733
yylval->sval = dupstrn(yypirget_extra(yyscanner), yytext, yyleng - 1);
2740
{ /* give a warning when using PASM registers as PIR identifiers */
2741
lexer_state * const lexer = yypirget_extra(yyscanner);
2743
if (TEST_FLAG(lexer->flags, LEXER_FLAG_WARNINGS))
2744
pirwarning(lexer, yypirget_lineno(yyscanner),
2745
"Use of PASM register identifier ('%s') "
2746
"is not encouraged for readable code", yytext);
2748
yylval->sval = dupstr(yypirget_extra(yyscanner), yytext);
2755
{ /* identifier; can be a global (sub or const), local or parrot op */
2756
lexer_state * const lexer = yypirget_extra(yyscanner);
2757
constdecl * const c = find_global_constant(lexer, yytext);
2759
if (c) { /* it's a global const */
2762
yylval->ival = c->val.ival;
2765
yylval->sval = c->val.sval;
2768
yylval->dval = c->val.nval;
2771
yylval->sval = c->val.ustr->contents;
2774
panic(lexer, "unsupported constant type");
2778
lexer->sval = Parrot_str_new(lexer->interp, yytext, yyleng);
2780
yylval->sval = dupstr(lexer, yytext);
2787
{ yylval->dval = atof(yytext); return TK_NUMC; }
2792
{ yylval->ival = atoi(yytext); return TK_INTC; }
2797
{ yylval->ival = atoi(yytext); return TK_INTC; }
2802
{ yylval->ival = atoi(yytext); return TK_INTC; }
2807
{ yylval->ival = atoi(yytext); return TK_INTC; }
2810
*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
2811
yyg->yy_c_buf_p = yy_cp = yy_bp + 1;
2812
YY_DO_BEFORE_ACTION; /* set up yytext again */
2815
{ /* Make sure the dot is followed by a character that
2816
* starts a method object. $ for registers,
2817
* quotes for quoted strings, and letters for identifiers.
2824
/* rule 127 can match eol */
2827
{ yypirerror(yyscanner, yypirget_extra(yyscanner),
2828
"no space allowed before a methodcall dot, "
2829
"or space expected after the '.' operator");
2835
/* SCANSTR<<EOF>> and SCANMACRO<<EOF>> must be defined before <INTIAL><<EOF>>,
2836
* because they are %s states, which means they are inclusive, not exclusive states.
2837
* An inclusive scanner state will recognize all other tokens defined in <INITIAL>
2838
* state, but they are used here to override the action when scanning <INITIAL><<EOF>>.
2841
/* SCANSTR and SCANMACRO are states that are active when expanding a macro_const
2842
* or a macro, respectively. When expanding a macro_const, no new macro_table
2843
* is created, which acts as a local symbol table for parameters. Hence, there
2844
* are two different <<EOF>> actions for them.
2848
case YY_STATE_EOF(SCANSTR):
2850
{ /* switch back from .macro_const buffer to file. */
2851
lexer_state * const lexer = yypirget_extra(yyscanner);
2852
yy_pop_state(yyscanner);
2853
yypir_switch_to_buffer(lexer->buffer,yyscanner);
2856
case YY_STATE_EOF(SCANMACRO):
2858
{ /* override the default <<EOF>> action; go back to normal state and
2859
* switch back to the saved file.
2861
lexer_state * const lexer = yypirget_extra(yyscanner);
2862
macro_table * const table = pop_macro_table(lexer);
2864
yy_pop_state(yyscanner); /* pop off the SCANMACRO scanner state */
2866
/* switch back to whatever buffer we were scanning before we started
2867
* to read the macro's buffer.
2869
yypir_switch_to_buffer(table->prev_buff,yyscanner);
2871
/* restore line number */
2872
yypirset_lineno(table->lineno,yyscanner);
2874
/* restore current scope id */
2875
lexer->unique_id = table->scopeno;
2877
delete_macro_table(table);
2884
{ /* when scanning a macro body, the @ marker indicates the {IDENT} must
2887
lexer_state * const lexer = yypirget_extra(yyscanner);
2888
char const * const id = dupstrn(lexer, yytext, yyleng - 1);
2889
yylval->sval = munge_id(id, lexer);
2893
case YY_STATE_EOF(INITIAL):
2895
{ /* end of file, stop scanning. */
2902
{ /* any character not covered in the rules above is an error. */
2903
yypirerror(yyscanner, yypirget_extra(yyscanner),
2904
"unexpected character: '%c'", yytext[0]);
2909
/*****************************************************************************
2911
* the following rules implement the macro layer.
2913
*****************************************************************************/
2917
/********************** .macro_const ****************************************/
2924
yy_push_state(MACROCONST, yyscanner);
2925
return TK_MACRO_CONST;
2932
yylval->sval = dupstr(yypirget_extra(yyscanner), yytext);
2940
/* only these tokens can be macro constant values */
2941
yylval->sval = dupstr(yypirget_extra(yyscanner), yytext);
2942
yy_pop_state(yyscanner);
2943
return TK_MACRO_CONST_VAL;
2949
{ /* ignore whitespace */ }
2955
yypirerror(yyscanner, yypirget_extra(yyscanner),
2956
"unknown character: '%c'", yytext[0]);
2959
case YY_STATE_EOF(MACROCONST):
2962
yypirerror(yyscanner, yypirget_extra(yyscanner),
2963
"read end of file during .macro_const definition");
2968
/**************** macro header (.macro <ident> <parameters> ) ***************/
2974
{ /* start a macro definition */
2975
yy_push_state(MACROHEAD, yyscanner);
2982
{ /* ignore whitespace */ }
2988
yylval->sval = dupstr(yypirget_extra(yyscanner), yytext);
3008
/* rule 141 can match eol */
3011
{ /* a set of continuous newlines yields a single newline token. */
3012
yy_pop_state(yyscanner); /* remove MACROHEAD state */
3013
yy_push_state(MACROBODY, yyscanner); /* enter MACROBODY state */
3019
/******************************* macro expansion ***************************/
3022
* Only identifiers, constants and registers are recognized.
3029
{ /* .foo; it can be a macro, macro_local, or just $P0.foo(),
3030
* but we need to check that.
3032
lexer_state * const lexer = yypirget_extra(yyscanner);
3033
macro_def * const macro = find_macro(lexer->macros, yytext + 1);
3035
if (macro == NULL) { /* it's not a macro */
3037
/* it may be a .macro_local */
3038
macro_table *table = peek_macro_table(lexer);
3040
if (table->thismacro != NULL) { /* not expanding a macro */
3042
if (is_macro_local(table->thismacro, yytext + 1)) {
3043
yylval->sval = munge_id(yytext + 1, lexer);
3046
/* else fall through */
3049
/* table->thismacro == NULL || is_macro_local() == FALSE */
3050
yyless(1); /* return all but first character */
3054
else { /* it's a macro */
3055
/* fprintf(stderr, "found .ident: %s\n", yytext + 1); */
3057
/* store current buffer at this point, because we'll be
3058
* scanning a string buffer later on. Saving must be done
3059
* in the lexer specification, otherwise YY_CURRENT_BUFFER
3060
* cannot be used (it's a macro).
3062
lexer->buffer = YY_CURRENT_BUFFER;
3064
/* if it's a .macro, (not .macro_const), then go into
3065
* MACROEXPAND state, to correctly parse the arguments.
3066
* For .macro_const, we don't want this, because a .macro_const
3067
* is expanded here, hidden from the parser.
3069
if (macro->takes_args) {
3070
yylval->mval = macro;
3071
yy_push_state(MACROEXPAND, yyscanner);
3072
return TK_MACRO_IDENT;
3074
else { /* expand the .macro_const here; no need for
3075
* adding this to the grammar. */
3076
/* goto SCANSTR state, and scan macro->body */
3077
yy_push_state(SCANSTR, yyscanner);
3078
yypir_scan_string(macro->body,yyscanner);
3086
{ /* expand a .macro_const or parameter in argument list */
3087
lexer_state * const lexer = yypirget_extra(yyscanner);
3088
macro_def * const macro = find_macro(lexer->macros, yytext + 1);
3091
/* .foo( .bar() ) is not allowed; that's too fancy for PIR. */
3092
if (macro->takes_args) {
3094
yypirerror(yyscanner, lexer, "cannot expand a .macro"
3095
"in another .macro's argument list");
3099
yylval->mval = macro;
3100
/* yy_push_state(MACROEXPAND, yyscanner);
3102
return TK_MACRO_IDENT;
3104
else { /* we do allow expansion of .macro_consts as macro args */
3105
lexer->buffer = YY_CURRENT_BUFFER;
3106
yy_push_state(STRINGEXPAND, yyscanner);
3107
yypir_scan_string(macro->body,yyscanner);
3111
yypirerror(yyscanner, lexer, "'%s' is not a macro", yytext + 1);
3118
yylval->sval = dupstr(yypirget_extra(yyscanner), yytext);
3119
return TK_MACRO_ARG_IDENT;
3126
yylval->sval = dupstr(yypirget_extra(yyscanner), yytext);
3127
return TK_MACRO_ARG_OTHER;
3133
{ /* ignore whitespace */ }
3149
yy_pop_state(yyscanner); /* leave MACROEXPAND state */
3157
yylval->sval = dupstr(yypirget_extra(yyscanner), yytext);
3158
return TK_MACRO_ARG_OTHER;
3161
case YY_STATE_EOF(STRINGEXPAND):
3164
lexer_state * const lexer = yypirget_extra(yyscanner);
3165
yy_pop_state(yyscanner);
3166
yypir_switch_to_buffer(lexer->buffer,yyscanner);
3180
/* rule 153 can match eol */
3183
{ yylval->sval = "\n"; return TK_NL; }
3188
{ yypirerror(yyscanner, yypirget_extra(yyscanner),
3189
"unknown character in macro expansion: %c", yytext[0]);
3194
/******************************** .macro_local *****************************/
3200
{ /* give a warning if the right flag is set */
3202
lexer_state * const lexer = yypirget_extra(yyscanner);
3203
if (TEST_FLAG(lexer->flags, LEXER_FLAG_WARNINGS))
3204
pirwarning(lexer, yypirget_lineno(yyscanner),
3205
"use of .local in macros prevents multiple "
3206
"usage of macro in one sub. Use .macro_local instead");
3208
XXX we should disallow .local altogether in macros.
3209
Doesn't make sense to use it.
3217
yy_push_state(MACROLOCAL, yyscanner);
3218
return TK_MACRO_LOCAL;
3239
{ return TK_STRING; }
3244
{ /* normal .macro_local */
3245
lexer_state * const lexer = yypirget_extra(yyscanner);
3246
/* reserve space for {IDENT}, the @ marker and the NULL char. */
3247
char * temp = (char *)mem_sys_allocate((yyleng + 2) * sizeof (char));
3248
/* stick a special marker "@" so we can recognize this as a id
3249
* that must be munged.
3251
sprintf(temp, "%s@", yytext);
3252
yylval->sval = temp;
3254
/* declare it as a macro local symbol */
3255
declare_macro_local(CURRENT_MACRO(lexer), dupstr(lexer, yytext));
3256
return TK_MACRO_LOCAL_ID;
3262
{ /* declare a .macro_local based on a parameter */
3263
lexer_state * const lexer = yypirget_extra(yyscanner);
3265
char * temp = (char *)mem_sys_allocate((yyleng + 2) * sizeof (char));
3266
/* stick a "@" after, so it can be recognized later */
3267
sprintf(temp, "%s@", yytext);
3268
yylval->sval = temp;
3270
/* declare the {IDENT} part as a local */
3271
declare_macro_local(CURRENT_MACRO(lexer), dupstr(lexer, yytext + 1));
3272
return TK_MACRO_LOCAL_ID;
3280
lexer_state * const lexer = yypirget_extra(yyscanner);
3281
macro_table * const table = peek_macro_table(lexer);
3282
macro_def * const param = find_macro(table, yytext + 2);
3285
yypirerror(yyscanner, lexer, "Cannot expand '%s', as it is "
3286
"not a macro parameter", yytext);
3288
unsigned len = strlen(param->body);
3289
/* length includes quotes, so substract 2, + 1 for NULL char. */
3290
char *unquoted = (char *)mem_sys_allocate_zeroed(
3291
(len - 1) * sizeof (char));
3292
/* remove the quotes */
3293
if (param->body[0] != '"')
3294
yypirerror(yyscanner, lexer,
3295
"value of macro argument '%s' must be a quoted string",
3298
strncpy(unquoted, param->body + 1, len - 2);
3299
yylval->sval = munge_id(unquoted, lexer);
3301
mem_sys_free(unquoted);
3311
{ /* expanding a .macro_local using a macro parameter value */
3312
lexer_state * const lexer = yypirget_extra(yyscanner);
3313
char const * const paramname = dupstrn(lexer, yytext + 1, yyleng - 2);
3314
macro_def * const param = find_macro(lexer->macros, paramname);
3316
if (param == NULL) {
3317
yypirerror(yyscanner, lexer, "Cannot expand %s; '%s' was not "
3318
"declared as a macro parameter", yytext, paramname);
3321
unsigned len = strlen(param->body);
3322
char *unquoted = (char *)mem_sys_allocate_zeroed(
3323
(len - 1) * sizeof (char));
3325
/* unquote the string */
3326
strncpy(unquoted, param->body + 1, len - 2);
3328
yylval->sval = munge_id(unquoted, lexer);
3329
mem_sys_free(unquoted);
3331
/* fprintf(stderr, "scanmacro:$id@: [%s]\n", yylval->sval); */
3339
{ /* ignore whitespace */ }
3342
/* rule 166 can match eol */
3345
{ /* newline after .macro_local <type> <ident> line */
3346
yy_pop_state(yyscanner);
3353
{ /* this state is only used for declaring .macro_locals */
3354
yypirerror(yyscanner, yypirget_extra(yyscanner),
3355
"unknown character '%c' when declaring .macro_local", yytext[0]);
3360
/****************************** .macro_label ********************************/
3367
yy_push_state(MACROLABEL, yyscanner);
3368
return TK_MACRO_LABEL;
3374
{ /* if the "$" is there, it's a macro label using a macro
3375
* parameter's value; otherwise it's a normal macro label
3377
lexer_state * const lexer = yypirget_extra(yyscanner);
3378
char * temp = (char *)pir_mem_allocate(lexer,
3379
(yyleng + 2) * sizeof (char));
3380
/* stick a special marker "@" so we can recognize this as a label
3381
* that must be munged.
3383
strncpy(temp, yytext, yyleng - 1);
3384
strcpy(temp + yyleng - 1, "@:");
3386
yylval->sval = temp;
3387
declare_macro_local(CURRENT_MACRO(lexer), dupstr(lexer, yytext));
3388
return TK_MACRO_LABEL_ID;
3392
/* rule 170 can match eol */
3395
{ /* the newline character after a ".macro_label $foo:" declaration */
3396
yy_pop_state(yyscanner); /* leave MACROLABEL state */
3403
{ /* scan a label when expanding a buffer; declared as .macro_label */
3404
lexer_state * const lexer = yypirget_extra(yyscanner);
3405
char const * const label = dupstrn(lexer, yytext, yyleng - 2);
3406
yylval->sval = munge_id(label, lexer);
3413
{ /* scan a label when expanding macro; was a macro parameter */
3414
lexer_state * const lexer = yypirget_extra(yyscanner);
3415
char const * const paramname = dupstrn(lexer, yytext + 1, yyleng - 3);
3416
macro_def * const param = find_macro(lexer->macros, paramname);
3418
if (param == NULL) {
3419
yypirerror(yyscanner, lexer, "Cannot expand %s; '%s' was not "
3420
"declared as a macro parameter", yytext, paramname);
3423
unsigned len = strlen(param->body);
3424
char *unquoted = (char *)mem_sys_allocate_zeroed(
3425
(len - 1) * sizeof (char));
3426
/* unquote the string */
3427
if (param->body[0] != '"')
3428
yypirerror(yyscanner, lexer,
3429
"value of macro argument '%s' must be a quoted string",
3432
strncpy(unquoted, param->body + 1, len - 2);
3433
yylval->sval = munge_id(unquoted, lexer);
3434
mem_sys_free(unquoted);
3441
/*************************** macro body scanning (storing) ****************************/
3445
/* rule 173 can match eol */
3448
{ store_macro_char(CURRENT_MACRO(yypirget_extra(yyscanner)), '\n'); }
3454
yy_pop_state(yyscanner); /* leave MACROBODY state */
3461
{ /* store everything else */
3462
store_macro_char(CURRENT_MACRO(yypirget_extra(yyscanner)), yytext[0]);
3465
case YY_STATE_EOF(MACROBODY):
3467
{ /* catch run-away macro bodys */
3468
yypirerror(yyscanner, yypirget_extra(yyscanner),
3469
"read end of file while reading macro body");
3474
yypirerror(yyscanner, yypirget_extra(yyscanner),
3475
"ambiguous '.'; must be enclosed in space on both sides or none at all.");
3481
yypirerror(yyscanner, yypirget_extra(yyscanner),
3482
"ambiguous '.'; must be enclosed in space on both sides or none at all.");
3492
* do not mix with other tokens, using <state1,state2> notation.
3493
* This becomes unmanageable
3514
{ return TK_FLAG_MAIN; }
3519
{ return TK_FLAG_LOAD; }
3524
{ return TK_FLAG_INIT; }
3529
{ return TK_FLAG_ANON; }
3534
{ return TK_FLAG_POSTCOMP; }
3539
{ return TK_FLAG_IMMEDIATE; }
3544
{ return TK_PCC_SUB; }
3554
{ return TK_NAMESPACE; }
3560
yy_push_state(MACROHEAD, yyscanner);
3568
yy_push_state(MACROCONST, yyscanner);
3569
return TK_MACRO_CONST;
3585
{ /* macro expansion in PASM mode. */
3586
lexer_state * const lexer = yypirget_extra(yyscanner);
3587
macro_def * const macro = find_macro(lexer->macros, yytext + 1);
3589
if (macro == NULL) { /* it's not a macro */
3590
yypirerror(yyscanner, lexer, "cannot find macro '%s'", yytext + 1);
3592
else { /* it's a macro */
3593
/* store current buffer at this point, because we'll be
3594
* scanning a string buffer later on. Saving must be done
3595
* in the lexer specification, otherwise YY_CURRENT_BUFFER
3596
* cannot be used (it's a macro).
3598
lexer->buffer = YY_CURRENT_BUFFER;
3600
/* if it's a .macro, (not .macro_const), then go into
3601
* MACROEXPAND state, to correctly parse the arguments.
3602
* For .macro_const, we don't want this, because a .macro_const
3603
* is expanded here, hidden from the parser.
3605
if (macro->takes_args) {
3606
yylval->mval = macro;
3607
yy_push_state(MACROEXPAND, yyscanner);
3608
return TK_MACRO_IDENT;
3610
else { /* expand the .macro_const here; no need for
3611
* adding this to the grammar. */
3612
/* goto SCANSTR state, and scan macro->body */
3613
yy_push_state(SCANSTR, yyscanner);
3614
yypir_scan_string(macro->body,yyscanner);
3622
{ /* a label in PASM */
3623
yylval->sval = dupstrn(yypirget_extra(yyscanner), yytext, yyleng - 1);
3630
{ yypirerror(yyscanner, yypirget_extra(yyscanner),
3631
"symbolic registers are not allowed in PASM mode");
3637
{ yylval->ival = atoi(yytext + 1); return TK_PREG; }
3642
{ yylval->ival = atoi(yytext + 1); return TK_NREG; }
3647
{ yylval->ival = atoi(yytext + 1); return TK_IREG; }
3652
{ yylval->ival = atoi(yytext + 1); return TK_SREG; }
3657
{ /* can be a parrot op or a label; the check is done in the parser. */
3658
yylval->sval = dupstr(yypirget_extra(yyscanner), yytext);
3665
{ yylval->dval = atof(yytext); return TK_NUMC; }
3670
{ yylval->ival = atoi(yytext); return TK_INTC; }
3675
{ yylval->ival = atoi(yytext); return TK_INTC; }
3680
{ yylval->ival = atoi(yytext); return TK_INTC; }
3685
{ yylval->ival = atoi(yytext); return TK_INTC; }
3690
{ /* copy the string, remove the quotes. */
3691
yylval->sval = dupstrn(yypirget_extra(yyscanner), yytext + 1, yyleng - 2);
3698
{ /* ignore whitespace */ }
3701
/* rule 207 can match eol */
3709
{ yypirerror(yyscanner, yypirget_extra(yyscanner),
3710
"unrecognized character: %c", yytext[0]);
3713
case YY_STATE_EOF(PASM):
3722
#line 3723 "pirlexer.c"
3723
case YY_STATE_EOF(MACROHEAD):
3724
case YY_STATE_EOF(MACROLOCAL):
3725
case YY_STATE_EOF(MACROLABEL):
3726
case YY_STATE_EOF(MACROEXPAND):
3727
case YY_STATE_EOF(SPECIALSTART):
3730
case YY_END_OF_BUFFER:
3732
/* Amount of text matched not including the EOB char. */
3733
int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
3735
/* Undo the effects of YY_DO_BEFORE_ACTION. */
3736
*yy_cp = yyg->yy_hold_char;
3737
YY_RESTORE_YY_MORE_OFFSET
3739
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3741
/* We're scanning a new file or input source. It's
3742
* possible that this happened because the user
3743
* just pointed yyin at a new source and called
3744
* yypirlex(). If so, then we have to assure
3745
* consistency between YY_CURRENT_BUFFER and our
3746
* globals. Here is the right place to do so, because
3747
* this is the first action (other than possibly a
3748
* back-up) that will match for the new input source.
3750
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3751
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
3752
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3755
/* Note that here we test for yy_c_buf_p "<=" to the position
3756
* of the first EOB in the buffer, since yy_c_buf_p will
3757
* already have been incremented past the NUL character
3758
* (since all states make transitions on EOB to the
3759
* end-of-buffer state). Contrast this with the test
3762
if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
3763
{ /* This was really a NUL. */
3764
yy_state_type yy_next_state;
3766
yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
3768
yy_current_state = yy_get_previous_state( yyscanner );
3770
/* Okay, we're now positioned to make the NUL
3771
* transition. We couldn't have
3772
* yy_get_previous_state() go ahead and do it
3773
* for us because it doesn't know how to deal
3774
* with the possibility of jamming (and we don't
3775
* want to build jamming into it because then it
3776
* will run more slowly).
3779
yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
3781
yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
3783
if ( yy_next_state )
3785
/* Consume the NUL. */
3786
yy_cp = ++yyg->yy_c_buf_p;
3787
yy_current_state = yy_next_state;
3793
/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
3794
yy_cp = yyg->yy_last_accepting_cpos;
3795
yy_current_state = yyg->yy_last_accepting_state;
3796
goto yy_find_action;
3800
else switch ( yy_get_next_buffer( yyscanner ) )
3802
case EOB_ACT_END_OF_FILE:
3804
yyg->yy_did_buffer_switch_on_eof = 0;
3806
if ( yypirwrap(yyscanner ) )
3808
/* Note: because we've taken care in
3809
* yy_get_next_buffer() to have set up
3810
* yytext, we can now set up
3811
* yy_c_buf_p so that if some total
3812
* hoser (like flex itself) wants to
3813
* call the scanner after we return the
3814
* YY_NULL, it'll still work - another
3815
* YY_NULL will get returned.
3817
yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
3819
yy_act = YY_STATE_EOF(YY_START);
3825
if ( ! yyg->yy_did_buffer_switch_on_eof )
3831
case EOB_ACT_CONTINUE_SCAN:
3833
yyg->yytext_ptr + yy_amount_of_matched_text;
3835
yy_current_state = yy_get_previous_state( yyscanner );
3837
yy_cp = yyg->yy_c_buf_p;
3838
yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
3841
case EOB_ACT_LAST_MATCH:
3843
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
3845
yy_current_state = yy_get_previous_state( yyscanner );
3847
yy_cp = yyg->yy_c_buf_p;
3848
yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
3849
goto yy_find_action;
3856
"fatal flex scanner internal error--no action found" );
3857
} /* end of action switch */
3858
} /* end of scanning one token */
3859
} /* end of yypirlex */
3860
/* %ok-for-header */
3863
/* %not-for-header */
3865
/* %ok-for-header */
3869
/* yy_get_next_buffer - try to read in a new buffer
3871
* Returns a code representing an action:
3872
* EOB_ACT_LAST_MATCH -
3873
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3874
* EOB_ACT_END_OF_FILE - end of file
3877
static int yy_get_next_buffer (yyscan_t yyscanner)
3882
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3883
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3884
register char *source = yyg->yytext_ptr;
3885
register int number_to_move, i;
3888
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
3890
"fatal flex scanner internal error--end of buffer missed" );
3892
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3893
{ /* Don't try to fill the buffer, so this is an EOF. */
3894
if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
3896
/* We matched a single character, the EOB, so
3897
* treat this as a final EOF.
3899
return EOB_ACT_END_OF_FILE;
3904
/* We matched some text prior to the EOB, first
3907
return EOB_ACT_LAST_MATCH;
3911
/* Try to read more data. */
3913
/* First move last chars to start of buffer. */
3914
number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
3916
for ( i = 0; i < number_to_move; ++i )
3917
*(dest++) = *(source++);
3919
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3920
/* don't do the read, it's not guaranteed to return an EOF,
3923
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
3927
yy_size_t num_to_read =
3928
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3930
while ( num_to_read <= 0 )
3931
{ /* Not enough room in the buffer - grow it. */
3933
/* just a shorter name for the current buffer */
3934
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
3936
int yy_c_buf_p_offset =
3937
(int) (yyg->yy_c_buf_p - b->yy_ch_buf);
3939
if ( b->yy_is_our_buffer )
3941
yy_size_t new_size = b->yy_buf_size * 2;
3943
if ( new_size <= 0 )
3944
b->yy_buf_size += b->yy_buf_size / 8;
3946
b->yy_buf_size *= 2;
3948
b->yy_ch_buf = (char *)
3949
/* Include room in for 2 EOB chars. */
3950
yypirrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
3953
/* Can't grow it, we don't own it. */
3956
if ( ! b->yy_ch_buf )
3958
"fatal error - scanner input buffer overflow" );
3960
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
3962
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
3967
if ( num_to_read > YY_READ_BUF_SIZE )
3968
num_to_read = YY_READ_BUF_SIZE;
3970
/* Read in more data. */
3971
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3972
yyg->yy_n_chars, num_to_read );
3974
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
3977
if ( yyg->yy_n_chars == 0 )
3979
if ( number_to_move == YY_MORE_ADJ )
3981
ret_val = EOB_ACT_END_OF_FILE;
3982
yypirrestart(yyin ,yyscanner);
3987
ret_val = EOB_ACT_LAST_MATCH;
3988
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3989
YY_BUFFER_EOF_PENDING;
3994
ret_val = EOB_ACT_CONTINUE_SCAN;
3996
if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3997
/* Extend the array by 50%, plus the number we really need. */
3998
yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
3999
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yypirrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
4000
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
4001
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
4004
yyg->yy_n_chars += number_to_move;
4005
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
4006
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
4008
yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
4013
/* yy_get_previous_state - get the state just before the EOB char was reached */
4016
/* %not-for-header */
4018
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
4023
register yy_state_type yy_current_state;
4024
register char *yy_cp;
4025
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4027
/* %% [15.0] code to get the start state into yy_current_state goes here */
4028
yy_current_state = yyg->yy_start;
4030
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
4032
/* %% [16.0] code to find the next state goes here */
4033
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
4034
if ( yy_accept[yy_current_state] )
4036
yyg->yy_last_accepting_state = yy_current_state;
4037
yyg->yy_last_accepting_cpos = yy_cp;
4039
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4041
yy_current_state = (int) yy_def[yy_current_state];
4042
if ( yy_current_state >= 825 )
4043
yy_c = yy_meta[(unsigned int) yy_c];
4045
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4048
return yy_current_state;
4051
/* yy_try_NUL_trans - try to make a transition on the NUL character
4054
* next_state = yy_try_NUL_trans( current_state );
4057
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
4062
register int yy_is_jam;
4063
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
4064
/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
4065
register char *yy_cp = yyg->yy_c_buf_p;
4067
register YY_CHAR yy_c = 1;
4068
if ( yy_accept[yy_current_state] )
4070
yyg->yy_last_accepting_state = yy_current_state;
4071
yyg->yy_last_accepting_cpos = yy_cp;
4073
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
4075
yy_current_state = (int) yy_def[yy_current_state];
4076
if ( yy_current_state >= 825 )
4077
yy_c = yy_meta[(unsigned int) yy_c];
4079
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
4080
yy_is_jam = (yy_current_state == 824);
4082
return yy_is_jam ? 0 : yy_current_state;
4092
static int yyinput (yyscan_t yyscanner)
4094
static int input (yyscan_t yyscanner)
4102
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4104
*yyg->yy_c_buf_p = yyg->yy_hold_char;
4106
if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
4108
/* yy_c_buf_p now points to the character we want to return.
4109
* If this occurs *before* the EOB characters, then it's a
4110
* valid NUL; if not, then we've hit the end of the buffer.
4112
if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
4113
/* This was really a NUL. */
4114
*yyg->yy_c_buf_p = '\0';
4117
{ /* need more input */
4118
yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
4121
switch ( yy_get_next_buffer( yyscanner ) )
4123
case EOB_ACT_LAST_MATCH:
4124
/* This happens because yy_g_n_b()
4125
* sees that we've accumulated a
4126
* token and flags that we need to
4127
* try matching the token before
4128
* proceeding. But for input(),
4129
* there's no matching to consider.
4130
* So convert the EOB_ACT_LAST_MATCH
4131
* to EOB_ACT_END_OF_FILE.
4134
/* Reset buffer status. */
4135
yypirrestart(yyin ,yyscanner);
4139
case EOB_ACT_END_OF_FILE:
4141
if ( yypirwrap(yyscanner ) )
4144
if ( ! yyg->yy_did_buffer_switch_on_eof )
4147
return yyinput(yyscanner);
4149
return input(yyscanner);
4153
case EOB_ACT_CONTINUE_SCAN:
4154
yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
4160
c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
4161
*yyg->yy_c_buf_p = '\0'; /* preserve yytext */
4162
yyg->yy_hold_char = *++yyg->yy_c_buf_p;
4164
/* %% [19.0] update BOL and yylineno */
4175
#endif /* ifndef YY_NO_INPUT */
4178
/** Immediately switch to a different input stream.
4179
* @param input_file A readable stream.
4180
* @param yyscanner The scanner object.
4181
* @note This function does not reset the start condition to @c INITIAL .
4184
void yypirrestart (FILE * input_file , yyscan_t yyscanner)
4189
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4191
if ( ! YY_CURRENT_BUFFER ){
4192
yypirensure_buffer_stack (yyscanner);
4193
YY_CURRENT_BUFFER_LVALUE =
4194
yypir_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
4197
yypir_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
4198
yypir_load_buffer_state(yyscanner );
4201
/** Switch to a different input buffer.
4202
* @param new_buffer The new input buffer.
4203
* @param yyscanner The scanner object.
4206
void yypir_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
4211
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4213
/* TODO. We should be able to replace this entire function body
4215
* yypirpop_buffer_state();
4216
* yypirpush_buffer_state(new_buffer);
4218
yypirensure_buffer_stack (yyscanner);
4219
if ( YY_CURRENT_BUFFER == new_buffer )
4222
if ( YY_CURRENT_BUFFER )
4224
/* Flush out information for old buffer. */
4225
*yyg->yy_c_buf_p = yyg->yy_hold_char;
4226
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
4227
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
4230
YY_CURRENT_BUFFER_LVALUE = new_buffer;
4231
yypir_load_buffer_state(yyscanner );
4233
/* We don't actually know whether we did this switch during
4234
* EOF (yypirwrap()) processing, but the only time this flag
4235
* is looked at is after yypirwrap() is called, so it's safe
4236
* to go ahead and always set it.
4238
yyg->yy_did_buffer_switch_on_eof = 1;
4242
static void yypir_load_buffer_state (yyscan_t yyscanner)
4247
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4248
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4249
yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
4250
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
4251
yyg->yy_hold_char = *yyg->yy_c_buf_p;
4254
/** Allocate and initialize an input buffer state.
4255
* @param file A readable stream.
4256
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
4257
* @param yyscanner The scanner object.
4258
* @return the allocated buffer state.
4261
YY_BUFFER_STATE yypir_create_buffer (FILE * file, int size , yyscan_t yyscanner)
4268
b = (YY_BUFFER_STATE) yypiralloc(sizeof( struct yy_buffer_state ) ,yyscanner );
4270
YY_FATAL_ERROR( "out of dynamic memory in yypir_create_buffer()" );
4272
b->yy_buf_size = size;
4274
/* yy_ch_buf has to be 2 characters longer than the size given because
4275
* we need to put in 2 end-of-buffer characters.
4277
b->yy_ch_buf = (char *) yypiralloc(b->yy_buf_size + 2 ,yyscanner );
4278
if ( ! b->yy_ch_buf )
4279
YY_FATAL_ERROR( "out of dynamic memory in yypir_create_buffer()" );
4281
b->yy_is_our_buffer = 1;
4283
yypir_init_buffer(b,file ,yyscanner);
4288
/** Destroy the buffer.
4289
* @param b a buffer created with yypir_create_buffer()
4290
* @param yyscanner The scanner object.
4293
void yypir_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
4298
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4303
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
4304
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
4306
if ( b->yy_is_our_buffer )
4307
yypirfree((void *) b->yy_ch_buf ,yyscanner );
4309
yypirfree((void *) b ,yyscanner );
4319
/* Initializes or reinitializes a buffer.
4320
* This function is sometimes called more than once on the same buffer,
4321
* such as during a yypirrestart() or at EOF.
4324
static void yypir_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
4331
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4333
yypir_flush_buffer(b ,yyscanner);
4335
b->yy_input_file = file;
4336
b->yy_fill_buffer = 1;
4338
/* If b is the current buffer, then yypir_init_buffer was _probably_
4339
* called from yypirrestart() or through yy_get_next_buffer.
4340
* In that case, we don't want to reset the lineno or column.
4342
if (b != YY_CURRENT_BUFFER){
4343
b->yy_bs_lineno = 1;
4344
b->yy_bs_column = 0;
4349
b->yy_is_interactive = 0;
4357
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
4358
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
4359
* @param yyscanner The scanner object.
4362
void yypir_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
4367
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4373
/* We always need two end-of-buffer characters. The first causes
4374
* a transition to the end-of-buffer state. The second causes
4375
* a jam in that state.
4377
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
4378
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
4380
b->yy_buf_pos = &b->yy_ch_buf[0];
4383
b->yy_buffer_status = YY_BUFFER_NEW;
4385
if ( b == YY_CURRENT_BUFFER )
4386
yypir_load_buffer_state(yyscanner );
4390
/** Pushes the new state onto the stack. The new state becomes
4391
* the current state. This function will allocate the stack
4393
* @param new_buffer The new state.
4394
* @param yyscanner The scanner object.
4397
void yypirpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
4402
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4403
if (new_buffer == NULL)
4406
yypirensure_buffer_stack(yyscanner);
4408
/* This block is copied from yypir_switch_to_buffer. */
4409
if ( YY_CURRENT_BUFFER )
4411
/* Flush out information for old buffer. */
4412
*yyg->yy_c_buf_p = yyg->yy_hold_char;
4413
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
4414
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
4417
/* Only push if top exists. Otherwise, replace top. */
4418
if (YY_CURRENT_BUFFER)
4419
yyg->yy_buffer_stack_top++;
4420
YY_CURRENT_BUFFER_LVALUE = new_buffer;
4422
/* copied from yypir_switch_to_buffer. */
4423
yypir_load_buffer_state(yyscanner );
4424
yyg->yy_did_buffer_switch_on_eof = 1;
4429
/** Removes and deletes the top of the stack, if present.
4430
* The next element becomes the new top.
4431
* @param yyscanner The scanner object.
4434
void yypirpop_buffer_state (yyscan_t yyscanner)
4439
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4440
if (!YY_CURRENT_BUFFER)
4443
yypir_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
4444
YY_CURRENT_BUFFER_LVALUE = NULL;
4445
if (yyg->yy_buffer_stack_top > 0)
4446
--yyg->yy_buffer_stack_top;
4448
if (YY_CURRENT_BUFFER) {
4449
yypir_load_buffer_state(yyscanner );
4450
yyg->yy_did_buffer_switch_on_eof = 1;
4456
/* Allocates the stack if it does not exist.
4457
* Guarantees space for at least one push.
4460
static void yypirensure_buffer_stack (yyscan_t yyscanner)
4465
yy_size_t num_to_alloc;
4466
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4468
if (!yyg->yy_buffer_stack) {
4470
/* First allocation is just for 2 elements, since we don't know if this
4471
* scanner will even need a stack. We use 2 instead of 1 to avoid an
4472
* immediate realloc on the next call.
4475
yyg->yy_buffer_stack = (struct yy_buffer_state**)yypiralloc
4476
(num_to_alloc * sizeof(struct yy_buffer_state*)
4478
if ( ! yyg->yy_buffer_stack )
4479
YY_FATAL_ERROR( "out of dynamic memory in yypirensure_buffer_stack()" );
4481
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
4483
yyg->yy_buffer_stack_max = num_to_alloc;
4484
yyg->yy_buffer_stack_top = 0;
4488
if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
4490
/* Increase the buffer to prepare for a possible push. */
4491
int grow_size = 8 /* arbitrary grow size */;
4493
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
4494
yyg->yy_buffer_stack = (struct yy_buffer_state**)yypirrealloc
4495
(yyg->yy_buffer_stack,
4496
num_to_alloc * sizeof(struct yy_buffer_state*)
4498
if ( ! yyg->yy_buffer_stack )
4499
YY_FATAL_ERROR( "out of dynamic memory in yypirensure_buffer_stack()" );
4501
/* zero only the new slots.*/
4502
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
4503
yyg->yy_buffer_stack_max = num_to_alloc;
4509
/** Setup the input buffer state to scan directly from a user-specified character buffer.
4510
* @param base the character buffer
4511
* @param size the size in bytes of the character buffer
4512
* @param yyscanner The scanner object.
4513
* @return the newly allocated buffer state object.
4515
YY_BUFFER_STATE yypir_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
4520
base[size-2] != YY_END_OF_BUFFER_CHAR ||
4521
base[size-1] != YY_END_OF_BUFFER_CHAR )
4522
/* They forgot to leave room for the EOB's. */
4525
b = (YY_BUFFER_STATE) yypiralloc(sizeof( struct yy_buffer_state ) ,yyscanner );
4527
YY_FATAL_ERROR( "out of dynamic memory in yypir_scan_buffer()" );
4529
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
4530
b->yy_buf_pos = b->yy_ch_buf = base;
4531
b->yy_is_our_buffer = 0;
4532
b->yy_input_file = 0;
4533
b->yy_n_chars = b->yy_buf_size;
4534
b->yy_is_interactive = 0;
4536
b->yy_fill_buffer = 0;
4537
b->yy_buffer_status = YY_BUFFER_NEW;
4539
yypir_switch_to_buffer(b ,yyscanner );
4546
/** Setup the input buffer state to scan a string. The next call to yypirlex() will
4547
* scan from a @e copy of @a str.
4548
* @param yystr a NUL-terminated string to scan
4549
* @param yyscanner The scanner object.
4550
* @return the newly allocated buffer state object.
4551
* @note If you want to scan bytes that may contain NUL values, then use
4552
* yypir_scan_bytes() instead.
4554
YY_BUFFER_STATE yypir_scan_string (yyconst char * yystr , yyscan_t yyscanner)
4557
return yypir_scan_bytes(yystr,strlen(yystr) ,yyscanner);
4562
/** Setup the input buffer state to scan the given bytes. The next call to yypirlex() will
4563
* scan from a @e copy of @a bytes.
4564
* @param bytes the byte buffer to scan
4565
* @param len the number of bytes in the buffer pointed to by @a bytes.
4566
* @param yyscanner The scanner object.
4567
* @return the newly allocated buffer state object.
4569
YY_BUFFER_STATE yypir_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
4575
/* Get memory for full buffer, including space for trailing EOB's. */
4576
n = _yybytes_len + 2;
4577
buf = (char *) yypiralloc(n ,yyscanner );
4579
YY_FATAL_ERROR( "out of dynamic memory in yypir_scan_bytes()" );
4581
for ( i = 0; i < _yybytes_len; ++i )
4582
buf[i] = yybytes[i];
4584
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
4586
b = yypir_scan_buffer(buf,n ,yyscanner);
4588
YY_FATAL_ERROR( "bad buffer in yypir_scan_bytes()" );
4590
/* It's okay to grow etc. this buffer, and we should throw it
4591
* away when we're done.
4593
b->yy_is_our_buffer = 1;
4600
static void yy_push_state (int new_state , yyscan_t yyscanner)
4605
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4606
if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
4610
yyg->yy_start_stack_depth += YY_START_STACK_INCR;
4611
new_size = yyg->yy_start_stack_depth * sizeof( int );
4613
if ( ! yyg->yy_start_stack )
4614
yyg->yy_start_stack = (int *) yypiralloc(new_size ,yyscanner );
4617
yyg->yy_start_stack = (int *) yypirrealloc((void *) yyg->yy_start_stack,new_size ,yyscanner );
4619
if ( ! yyg->yy_start_stack )
4620
YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
4623
yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
4629
static void yy_pop_state (yyscan_t yyscanner)
4634
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4635
if ( --yyg->yy_start_stack_ptr < 0 )
4636
YY_FATAL_ERROR( "start-condition stack underflow" );
4638
BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
4642
static int yy_top_state (yyscan_t yyscanner)
4647
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4648
return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1];
4651
#ifndef YY_EXIT_FAILURE
4652
#define YY_EXIT_FAILURE 2
4656
static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
4658
(void) fprintf( stderr, "%s\n", msg );
4659
exit( YY_EXIT_FAILURE );
4665
/* Redefine yyless() so it works in section 3 code. */
4671
/* Undo effects of setting up yytext. */ \
4672
int yyless_macro_arg = (n); \
4673
YY_LESS_LINENO(yyless_macro_arg);\
4674
yytext[yyleng] = yyg->yy_hold_char; \
4675
yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
4676
yyg->yy_hold_char = *yyg->yy_c_buf_p; \
4677
*yyg->yy_c_buf_p = '\0'; \
4678
yyleng = yyless_macro_arg; \
4682
/* Accessor methods (get/set functions) to struct members. */
4687
/** Get the user-defined data for this scanner.
4688
* @param yyscanner The scanner object.
4690
YY_EXTRA_TYPE yypirget_extra (yyscan_t yyscanner)
4692
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4698
/** Get the current line number.
4699
* @param yyscanner The scanner object.
4701
int yypirget_lineno (yyscan_t yyscanner)
4703
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4705
if (! YY_CURRENT_BUFFER)
4711
/** Get the current column number.
4712
* @param yyscanner The scanner object.
4714
int yypirget_column (yyscan_t yyscanner)
4716
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4718
if (! YY_CURRENT_BUFFER)
4724
/** Get the input stream.
4725
* @param yyscanner The scanner object.
4727
FILE *yypirget_in (yyscan_t yyscanner)
4729
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4733
/** Get the output stream.
4734
* @param yyscanner The scanner object.
4736
FILE *yypirget_out (yyscan_t yyscanner)
4738
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4742
/** Get the length of the current token.
4743
* @param yyscanner The scanner object.
4745
yy_size_t yypirget_leng (yyscan_t yyscanner)
4747
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4751
/** Get the current token.
4752
* @param yyscanner The scanner object.
4755
char *yypirget_text (yyscan_t yyscanner)
4757
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4763
/** Set the user-defined data. This data is never touched by the scanner.
4764
* @param user_defined The data to be associated with this scanner.
4765
* @param yyscanner The scanner object.
4767
void yypirset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
4769
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4770
yyextra = user_defined ;
4775
/** Set the current line number.
4776
* @param line_number
4777
* @param yyscanner The scanner object.
4779
void yypirset_lineno (int line_number , yyscan_t yyscanner)
4781
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4783
/* lineno is only valid if an input buffer exists. */
4784
if (! YY_CURRENT_BUFFER )
4785
yy_fatal_error( "yypirset_lineno called with no buffer" , yyscanner);
4787
yylineno = line_number;
4790
/** Set the current column.
4791
* @param line_number
4792
* @param yyscanner The scanner object.
4794
void yypirset_column (int column_no , yyscan_t yyscanner)
4796
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4798
/* column is only valid if an input buffer exists. */
4799
if (! YY_CURRENT_BUFFER )
4800
yy_fatal_error( "yypirset_column called with no buffer" , yyscanner);
4802
yycolumn = column_no;
4805
/** Set the input stream. This does not discard the current
4807
* @param in_str A readable stream.
4808
* @param yyscanner The scanner object.
4809
* @see yypir_switch_to_buffer
4811
void yypirset_in (FILE * in_str , yyscan_t yyscanner)
4813
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4817
void yypirset_out (FILE * out_str , yyscan_t yyscanner)
4819
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4823
int yypirget_debug (yyscan_t yyscanner)
4825
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4826
return yy_flex_debug;
4829
void yypirset_debug (int bdebug , yyscan_t yyscanner)
4831
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4832
yy_flex_debug = bdebug ;
4838
/* Accessor methods for yylval and yylloc */
4840
/* %if-bison-bridge */
4842
YYSTYPE * yypirget_lval (yyscan_t yyscanner)
4844
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4848
void yypirset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
4850
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4851
yylval = yylval_param;
4856
/* User-visible API */
4858
/* yypirlex_init is special because it creates the scanner itself, so it is
4859
* the ONLY reentrant function that doesn't take the scanner as the last argument.
4860
* That's why we explicitly handle the declaration, instead of using our macros.
4863
int yypirlex_init(yyscan_t* ptr_yy_globals)
4866
if (ptr_yy_globals == NULL){
4871
*ptr_yy_globals = (yyscan_t) yypiralloc ( sizeof( struct yyguts_t ), NULL );
4873
if (*ptr_yy_globals == NULL){
4878
/* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
4879
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
4881
return yy_init_globals ( *ptr_yy_globals );
4884
/* yypirlex_init_extra has the same functionality as yypirlex_init, but follows the
4885
* convention of taking the scanner as the last argument. Note however, that
4886
* this is a *pointer* to a scanner, as it will be allocated by this call (and
4887
* is the reason, too, why this function also must handle its own declaration).
4888
* The user defined value in the first argument will be available to yypiralloc in
4889
* the yyextra field.
4892
int yypirlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
4895
struct yyguts_t dummy_yyguts;
4897
yypirset_extra (yy_user_defined, &dummy_yyguts);
4899
if (ptr_yy_globals == NULL){
4904
*ptr_yy_globals = (yyscan_t) yypiralloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
4906
if (*ptr_yy_globals == NULL){
4911
/* By setting to 0xAA, we expose bugs in
4912
yy_init_globals. Leave at 0x00 for releases. */
4913
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
4915
yypirset_extra (yy_user_defined, *ptr_yy_globals);
4917
return yy_init_globals ( *ptr_yy_globals );
4920
/* %endif if-c-only */
4923
static int yy_init_globals (yyscan_t yyscanner)
4925
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4926
/* Initialization is the same as for the non-reentrant scanner.
4927
* This function is called from yypirlex_destroy(), so don't allocate here.
4930
yyg->yy_buffer_stack = 0;
4931
yyg->yy_buffer_stack_top = 0;
4932
yyg->yy_buffer_stack_max = 0;
4933
yyg->yy_c_buf_p = (char *) 0;
4937
yyg->yy_start_stack_ptr = 0;
4938
yyg->yy_start_stack_depth = 0;
4939
yyg->yy_start_stack = NULL;
4941
/* Defined in main.c */
4950
/* For future reference: Set errno on error, since we are called by
4957
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
4958
/* yypirlex_destroy is for both reentrant and non-reentrant scanners. */
4959
int yypirlex_destroy (yyscan_t yyscanner)
4961
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4963
/* Pop the buffer stack, destroying each element. */
4964
while(YY_CURRENT_BUFFER){
4965
yypir_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
4966
YY_CURRENT_BUFFER_LVALUE = NULL;
4967
yypirpop_buffer_state(yyscanner);
4970
/* Destroy the stack itself. */
4971
yypirfree(yyg->yy_buffer_stack ,yyscanner);
4972
yyg->yy_buffer_stack = NULL;
4974
/* Destroy the start condition stack. */
4975
yypirfree(yyg->yy_start_stack ,yyscanner );
4976
yyg->yy_start_stack = NULL;
4978
/* Reset the globals. This is important in a non-reentrant scanner so the next time
4979
* yypirlex() is called, initialization will occur. */
4980
yy_init_globals( yyscanner);
4983
/* Destroy the main struct (reentrant only). */
4984
yypirfree ( yyscanner , yyscanner );
4992
* Internal utility routines.
4996
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
4999
for ( i = 0; i < n; ++i )
5004
#ifdef YY_NEED_STRLEN
5005
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
5008
for ( n = 0; s[n]; ++n )
5015
/* %if-tables-serialization definitions */
5016
/* %define-yytables The name for this specific scanner's tables. */
5017
#define YYTABLES_NAME "yytables"
5020
/* %ok-for-header */
5032
Helper functions for macro expansion. These function are only used by the lexer,
5033
so keep them local to this file.
5045
init_scanner_state(yyscan_t yyscanner)>
5047
Initializes C<yyscanner> to the SPECIALSTART state, which can then decide
5048
whether to scan PASM or PIR tokens. State identifiers (e.g. SPECIALSTART)
5049
are not exported (private to the generated lexer), so this function wraps
5050
the call to yy_push_state().
5056
init_scanner_state(yyscan_t yyscanner) {
5057
yy_push_state(SPECIALSTART, yyscanner);
5063
=item C<static macro_table *
5064
peek_macro_table(lexer_state * const lexer)>
5066
Return the top of the macro_table stack; this is the currently
5067
active macro_table object.
5072
PARROT_WARN_UNUSED_RESULT
5073
static macro_table *
5074
peek_macro_table(lexer_state * const lexer) {
5075
return lexer->macros;
5080
=item C<static char *
5081
munge_id(char const * const id, lexer_state * const lexer)>
5083
Generate an identifier based on a macro label or local expansion.
5085
A label expansion looks like ".$<LABEL>", from which a label identifier is
5086
generated, formatted as: "$macro_<MACRO>_<LABEL>_<SCOPE>".
5088
In this format, C<MACRO> refers to the macro name of the macro in which
5089
the .macro_local or .macro_label was defined; C<LABEL> refers to the runtime
5090
value of the label or local variable (this can be a macro's argument's value).
5091
C<SCOPE> refers to the unique scope ID of this macro expansion.
5097
PARROT_CANNOT_RETURN_NULL
5098
PARROT_WARN_UNUSED_RESULT
5100
munge_id(char const * const id, lexer_state * const lexer) {
5101
/* the format of the generated label; note that it has a $ character,
5102
* which is not allowed in normal PIR identifiers. This way, you cannot
5103
* use the generated names outside of macros. We dont't want people
5104
* write outside of macros:
5106
* macro_foo_bar_1 = 42
5108
* Hence the $ character.
5111
char const * const format = "$macro_%s_%s_%d"; /* 15 characters */
5112
int const format_length = strlen(format);
5115
macro_table *table = peek_macro_table(lexer);
5117
/* calculate length of the generated label: length of macro name,
5118
* plus length of label name.
5120
int length = format_length;
5122
/* add length of the macro name */
5123
length += strlen(table->thismacro->name);
5125
/* add length of unique id to total length */
5126
length += lexer->num_digits;
5128
/* add length of the actual label id */
5129
length += strlen(id);
5131
munged_id = (char *)pir_mem_allocate_zeroed(lexer, (length + 1) * sizeof (char));
5133
sprintf(munged_id, format, table->thismacro->name, id, lexer->unique_id);
5142
=item C<static macro_table *
5143
pop_macro_table(lexer_state * const lexer)>
5145
Pop off the current macro symbol table from the
5146
macro symbol table stack and return it.
5151
PARROT_IGNORABLE_RESULT
5152
PARROT_CANNOT_RETURN_NULL
5153
static macro_table *
5154
pop_macro_table(lexer_state * const lexer) {
5155
macro_table *popped = lexer->macros;
5156
lexer->macros = popped->prev;
5164
push_macro_table(lexer_state * const lexer, macro_table * const table)>
5166
Push macro_table C<table> onto the macro scope stack. Any attempt to find
5167
a macro definition will start in C<table>. If not found, the stack will be walked
5168
down (recursing into older entries).
5174
push_macro_table(lexer_state * const lexer, macro_table * const table) {
5175
table->prev = lexer->macros;
5176
lexer->macros = table;
5182
update_unique_id(lexer_state * const lexer)>
5184
Update the unique ID generator; the number of characters that the new number
5185
is taking in a string is recalculated, as the unique IDs are used in string
5192
update_unique_id(lexer_state * const lexer) {
5193
/* each expansion has a unique id that is used for label/local munging */
5195
/* Count number of digits:
5196
* log10 returns a double, get the part before the dot (so, "3.14" -> "3")
5197
* using the floor() function.
5198
* log10(1000) -> 3, so add 1 more digit.
5200
lexer->num_digits = (int)floor(log10(lexer->id_gen)) + 1;
5207
expand(yyscan_t yyscanner, macro_def * const macro, list * args, lexer_state * const lexer)>
5209
Expand the specified macro (or constant). The current yy_buffer_state is saved, as well
5210
as the current scope ID (for macro expansions; each expansion has its own unique scope ID);
5211
as well as the current line number. The macro_table, which defines the macro parameters/arguments,
5212
gets a reference to the macro definition that is being expanded; that's the C<thismacro> field
5213
of the C<macro_table> structure.
5215
An argument count check is done to make sure there's exactly enough arguments for the defined
5216
parameters. Then, the macro definition's body (a string buffer) is scanned (instead of the
5217
file that we were scanning).
5219
The function returns the body of the macro being expanded.
5225
expand_macro(yyscan_t yyscanner, macro_def * const macro, macro_param * args) {
5226
/* construct a map data structure that maps the argument values to the parameter names */
5227
/* enter the parameters as temporary symbols (.macro_const) */
5228
lexer_state *lexer = yypirget_extra(yyscanner);
5229
macro_table *macro_params = new_macro_table(lexer->macros);
5230
macro_param *params = macro->parameters;
5232
/* push the new macro_table, acting as a local symbol scope */
5233
push_macro_table(lexer, macro_params);
5235
/* save the current line, unique_id and current buffer in the macro_table,
5236
* so they can be restored when the macro_table is popped from the stack.
5238
macro_params->lineno = yypirget_lineno(yyscanner);
5239
/* save current scope id */
5240
macro_params->scopeno = lexer->unique_id;
5241
macro_params->prev_buff = lexer->buffer; /* cannot use YY_CURRENT_BUFFER here, but it was
5242
stored in lexer->buffer anyway, so store that. */
5243
macro_params->thismacro = macro; /* let the macro_table point to the macro-definition that
5244
is being expanded; this allows access to macro name etc. */
5246
while (params && args) {
5247
new_macro_const(macro_params, params->name, args->name, yypirget_lineno(yyscanner));
5248
/* fprintf(stderr, "defining parameter '%s' as '%s'\n", params->name, args->name); */
5249
params = params->next;
5253
/* check for both conditions; either can be non-null, indicating an error.
5254
* If both are null, then all went ok.
5256
if (params != NULL) /* args must be null, so too few arguments */
5257
yypirerror(yyscanner, lexer, "Too few arguments for macro expansion '%s'", macro->name);
5259
if (args != NULL) /* params must be null, so too many arguments */
5260
yypirerror(yyscanner, lexer, "Too many arguments for macro expansion '%s'", macro->name);
5263
update_unique_id(lexer);
5264
lexer->unique_id = lexer->id_gen;
5266
/* switch to SCANMACRO state, and tell the lexer to get
5267
* next tokens from the string buffer by calling yypir_scan_string().
5269
yy_push_state(SCANMACRO, yyscanner);
5270
yypir_scan_string(macro->body,yyscanner);
5271
/* update the line number in the yyscanner so that any error message occuring
5272
* refers to the bad line in the macro definition. Note that this must done
5273
* **after** the call to yypir_scan_string(), which sets the line number to 1.
5275
yypirset_lineno(macro->linedefined,yyscanner);
5281
/* override Flex generated memory functions: all memory allocated
5282
* by Flex goes through Parrot's memory allocators.
5288
yypiralloc(yy_size_t bytes,yyscan_t yyscanner)>
5290
Allocate C<bytes> of memory; the C<yyscanner> argument is not used.
5297
yypiralloc(yy_size_t bytes,yyscan_t yyscanner) {
5298
return mem_sys_allocate(bytes);
5304
yypirrealloc(void * ptr,yy_size_t bytes,yyscan_t yyscanner)>
5306
Reallocate memory pointed to by C<ptr>. The new memory region is C<bytes> in size;
5307
the C<yyscanner> argument is not used.
5313
yypirrealloc(void * ptr,yy_size_t bytes,yyscan_t yyscanner) {
5314
return mem_sys_realloc(ptr, bytes);
5320
yypirfree(void *ptr,yyscan_t yyscanner)>
5322
Free memory pointed to by C<ptr>. The C<yyscanner> argument is not used,
5323
but part of the signature as it is a Flex-generated function.
5329
yypirfree(void *ptr,yyscan_t yyscanner) {
5346
* c-file-style: "parrot"
5348
* vim: expandtab shiftwidth=4: