#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* First, we deal with platform-specific or compiler-specific issues. */
#include "stdhdr.h"
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
/* end standard C headers. */
/* flex integer type definitions */
#ifndef FLEXINT_H
#define FLEXINT_H
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif
#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef unsigned char flex_uint8_t;
typedef unsigned flex_uint32_t;
/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
/* TODO: this is always defined, so inline it */
#define const const
#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an unsigned
* integer for use as an array index. If the signed char is negative,
* we want to instead treat it as an 8-bit unsigned char, hence the
* double cast.
*/
#define YY_SC_TO_UI(c) ((unsigned) (unsigned char) c)
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a pnew file". */
#define YY_NEW_FILE yyrestart(yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
*/
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
extern int yyleng;
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yy_size_t yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
FILE *yy_input_file;
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
* shouldn't try reading from the input source any more. We might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "pnew"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a pnew input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*
* Returns the top of the stack, or NULL.
*/
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
/* Flag which is used to allow yywrap()'s to do buffer switches
* instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
void yyrestart (FILE *input_file );
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
void yy_delete_buffer (YY_BUFFER_STATE b );
void yy_flush_buffer (YY_BUFFER_STATE b );
void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
void yypop_buffer_state (void );
static void yyensure_buffer_stack (void );
static void yy_load_buffer_state (void );
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE yy_scan_string (const char *yy_str );
YY_BUFFER_STATE yy_scan_bytes (const char *bytes,int len );
void *yyalloc (yy_size_t );
void *yyrealloc (void *,yy_size_t );
void yyfree (void * );
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer(yyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer(yyin,YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
#define yywrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
extern int yylineno;
int yylineno = 1;
extern char *yytext;
#ifdef yytext_ptr
#undef yytext_ptr
#endif
#define yytext_ptr yytext
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
static void yynoreturn yy_fatal_error (const char* msg );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 78
#define YY_END_OF_BUFFER 79
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
{
int32_t yy_verify;
int32_t yy_nxt;
};
static const flex_int16_t yy_accept[511] =
{ 0,
73, 73, 73, 73, 73, 73, 0, 0, 73, 73,
73, 73, 73, 73, 79, 77, 73, 75, 77, 43,
31, 77, 77, 77, 77, 77, 77, 77, 77, 42,
42, 76, 77, 77, 77, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 77,
77, 73, 30, 77, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
47, 77, 49, 49, 13, 77, 11, 12, 77, 74,
73, 74, 73, 55, 43, 43, 43, 31, 31, 31,
31, 62, 56, 65, 0, 0, 70, 71, 60, 72,
68, 58, 69, 59, 31, 39, 31, 61, 42, 33,
37, 40, 35, 42, 76, 50, 53, 54, 52, 51,
0, 31, 31, 31, 31, 31, 0, 31, 31, 0,
31, 31, 31, 31, 0, 31, 20, 31, 31, 0,
31, 31, 67, 66, 57, 73, 0, 0, 0, 0,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
20, 30, 30, 30, 30, 30, 30, 30, 30, 47,
0, 46, 0, 49, 0, 49, 0, 48, 0, 49,
13, 10, 13, 11, 11, 43, 43, 43, 43, 31,
31, 20, 31, 44, 44, 0, 0, 31, 32, 32,
32, 32, 32, 63, 64, 0, 0, 0, 0, 31,
31, 0, 0, 31, 31, 31, 31, 31, 0, 0,
31, 31, 31, 31, 16, 0, 0, 31, 31, 0,
0, 0, 0, 0, 30, 30, 30, 20, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 16, 30, 30, 30, 30, 30, 0,
0, 0, 0, 49, 49, 48, 49, 48, 0, 48,
49, 49, 49, 49, 43, 43, 31, 31, 31, 31,
31, 31, 0, 0, 31, 45, 45, 0, 0, 34,
31, 31, 38, 21, 22, 6, 31, 31, 31, 41,
15, 31, 31, 17, 36, 31, 31, 0, 0, 0,
0, 0, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 21, 22, 6, 30, 30, 30, 15,
30, 30, 30, 17, 30, 30, 30, 30, 30, 0,
0, 48, 49, 49, 49, 49, 48, 0, 0, 0,
0, 49, 49, 21, 22, 31, 31, 31, 31, 29,
0, 0, 31, 31, 31, 31, 23, 31, 0, 7,
24, 31, 31, 14, 0, 0, 0, 0, 0, 30,
21, 22, 30, 30, 30, 30, 30, 29, 30, 30,
30, 30, 23, 30, 24, 30, 30, 30, 30, 30,
30, 14, 49, 49, 0, 0, 31, 31, 23, 24,
31, 31, 4, 18, 31, 31, 31, 26, 31, 0,
0, 0, 0, 0, 30, 30, 30, 23, 24, 30,
30, 30, 4, 18, 30, 30, 30, 26, 30, 30,
30, 30, 2, 31, 31, 26, 31, 25, 31, 31,
31, 0, 0, 0, 0, 30, 30, 30, 26, 30,
30, 25, 30, 30, 30, 30, 3, 30, 25, 31,
31, 27, 31, 31, 0, 0, 0, 9, 8, 25,
30, 30, 30, 27, 30, 1, 30, 30, 27, 28,
31, 19, 0, 27, 28, 30, 19, 5, 5, 0
} ;
static const YY_CHAR yy_ec[256] = {
0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, //NUL..
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 5, 6, 7, 1, 8, 9,10,11,12,13,14, 1,15,16,17, //SPC..
18,19,19,19,19,19,19,19,20,20,21,22,23,24,25,26, //'0'..'?'
27,28,29,30,31,32,33,34,35,36,37,38,39,37,40,41, //'@'..'O'
42,43,44,45,46,47,48,49,50,37,37, 1,51, 1,52,27, //'P'..'~'
1,53,54,55,56,57,58,59,60,61,37,62,63,37,64,65, //'`'..'o'
66,43,67,68,69,70,71,72,73,37,37, 1,74, 1, 1, 1, //'p'..DEL
27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,
27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27};
static const YY_CHAR yy_meta[75] =
{ 0,
1, 2, 3, 4, 1, 5, 6, 1, 1, 7,
8, 1, 1, 1, 9, 10, 1, 11, 12, 12,
13, 14, 2, 1, 2, 15, 6, 16, 16, 17,
17, 17, 16, 18, 18, 18, 18, 18, 18, 19,
18, 18, 18, 19, 18, 19, 18, 19, 18, 19,
20, 1, 16, 16, 17, 17, 17, 16, 18, 18,
18, 18, 18, 19, 18, 18, 19, 18, 19, 18,
19, 18, 19, 1
} ;
static const uint16_t yy_base[548] =
{ 0,
0, 74, 147, 152, 157, 162, 184, 258, 208, 211,
332, 406, 215, 218, 1760, 2377, 169, 2377, 1735, 172,
195, 1734, 143, 1704, 167, 215, 201, 266, 1729, 258,
259, 0, 220, 1727, 221, 0, 474, 533, 348, 1734,
329, 424, 1728, 425, 429, 427, 1725, 315, 320, 1710,
152, 468, 491, 426, 1712, 592, 651, 437, 1683, 506,
433, 1679, 438, 532, 544, 1640, 388, 318, 446, 431,
0, 132, 1609, 504, 1599, 0, 0, 2377, 0, 2377,
230, 0, 245, 2377, 244, 2377, 707, 0, 257, 258,
184, 2377, 2377, 2377, 1599, 553, 2377, 2377, 2377, 2377,
2377, 2377, 2377, 2377, 0, 235, 256, 2377, 599, 625,
658, 721, 753, 754, 0, 1574, 2377, 2377, 2377, 1573,
1545, 1585, 1584, 1547, 1545, 1544, 1535, 432, 511, 352,
543, 423, 514, 457, 1506, 449, 585, 488, 534, 1454,
574, 525, 2377, 2377, 2377, 766, 343, 258, 257, 324,
1443, 2377, 419, 611, 655, 580, 1442, 340, 1451, 1449,
1444, 1439, 1413, 547, 567, 602, 652, 659, 661, 663,
759, 674, 686, 700, 722, 556, 568, 757, 756, 0,
413, 2377, 830, 1420, 1391, 798, 799, 1381, 385, 902,
1371, 2377, 1370, 0, 0, 399, 773, 970, 0, 792,
344, 798, 347, 2377, 1370, 720, 0, 326, 878, 950,
951, 1000, 1001, 2377, 2377, 1369, 823, 1363, 296, 806,
688, 723, 847, 835, 807, 862, 820, 681, 1336, 614,
699, 859, 821, 833, 1338, 1332, 836, 885, 879, 420,
463, 666, 846, 568, 889, 951, 906, 1018, 884, 928,
904, 968, 896, 964, 951, 1037, 1004, 1007, 935, 1027,
1040, 1024, 872, 1319, 1038, 1030, 1042, 1041, 1043, 781,
1072, 1106, 0, 1309, 1079, 1306, 1163, 2377, 1231, 1100,
1107, 1126, 1303, 0, 1089, 1344, 893, 901, 977, 1032,
1047, 1062, 362, 0, 1084, 2377, 1262, 1102, 0, 2377,
1117, 1107, 2377, 1144, 1242, 1192, 1143, 1123, 1168, 2377,
1183, 1161, 1142, 1178, 2377, 1172, 1139, 1122, 1023, 1141,
1149, 1079, 1184, 1165, 1194, 1204, 1201, 1207, 1203, 1223,
1229, 1237, 1233, 1243, 1156, 1146, 1229, 1187, 1286, 1140,
1258, 1246, 1280, 1136, 1283, 1302, 1307, 1296, 1300, 1295,
1385, 1384, 1385, 1406, 1456, 0, 594, 742, 1320, 1509,
0, 1428, 1550, 1389, 0, 1215, 1243, 1292, 1297, 0,
376, 0, 1332, 1385, 1399, 1417, 1105, 1427, 530, 2377,
1104, 1422, 1423, 1100, 1349, 1165, 1207, 1360, 1394, 1431,
1461, 1084, 1439, 1444, 1449, 1446, 1475, 1062, 1484, 1489,
1473, 1488, 1069, 1493, 1067, 1514, 1521, 1490, 1494, 1342,
509, 1062, 1569, 1603, 1567, 1644, 1486, 1489, 0, 0,
1501, 1500, 1010, 1008, 1543, 1580, 1582, 967, 1574, 1305,
1518, 1567, 1320, 965, 1568, 1581, 1595, 869, 823, 1594,
1609, 1607, 832, 815, 1634, 1637, 1638, 718, 1639, 1635,
735, 1643, 713, 1596, 1609, 0, 1553, 696, 1671, 1636,
1645, 1651, 1655, 663, 1646, 1316, 1657, 1684, 622, 1690,
1692, 626, 1681, 1669, 955, 1678, 592, 1716, 0, 1687,
1689, 572, 1717, 1713, 884, 529, 1722, 961, 2377, 504,
1704, 236, 1710, 443, 1718, 447, 1720, 1382, 0, 0,
1726, 387, 361, 286, 230, 1742, 231, 170, 152, 2377,
1805, 1825, 1845, 1865, 1885, 1905, 1920, 1939, 1954, 1963,
1982, 1997, 2011, 2025, 2039, 2058, 2078, 2098, 2118, 2133,
2147, 2161, 2175, 2190, 2200, 2219, 2231, 2242, 2253, 2272,
2292, 2312, 2322, 2335, 2345, 2352, 2359
} ;
static const flex_int16_t yy_def[548] =
{ 0,
510, 510, 511, 511, 512, 512, 513, 513, 512, 512,
514, 514, 515, 515, 510, 510, 510, 510, 510, 516,
517, 510, 510, 518, 510, 510, 510, 519, 510, 520,
520, 521, 510, 510, 510, 517, 522, 522, 38, 38,
38, 38, 38, 38, 38, 38, 38, 38, 38, 510,
510, 510, 523, 524, 523, 525, 525, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
526, 527, 528, 529, 530, 531, 532, 510, 533, 510,
510, 521, 510, 510, 516, 510, 516, 517, 517, 517,
517, 510, 510, 510, 510, 534, 510, 510, 510, 510,
510, 510, 510, 510, 517, 510, 517, 510, 520, 520,
520, 520, 520, 535, 521, 510, 510, 510, 510, 510,
536, 38, 38, 38, 38, 38, 537, 38, 38, 510,
38, 38, 38, 38, 538, 38, 38, 38, 38, 539,
38, 38, 510, 510, 510, 510, 510, 510, 510, 510,
523, 510, 523, 523, 523, 523, 523, 523, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 526,
527, 510, 527, 528, 540, 529, 541, 528, 542, 529,
530, 510, 530, 532, 532, 516, 516, 516, 87, 517,
517, 517, 517, 510, 510, 510, 543, 517, 535, 535,
535, 535, 535, 510, 510, 510, 544, 537, 537, 38,
38, 510, 510, 38, 38, 38, 38, 38, 538, 538,
38, 38, 38, 38, 38, 539, 539, 38, 38, 510,
510, 510, 510, 510, 523, 523, 523, 523, 523, 523,
523, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 527,
527, 527, 183, 540, 541, 540, 541, 510, 542, 529,
529, 529, 529, 190, 516, 198, 517, 517, 517, 517,
517, 517, 510, 545, 517, 510, 510, 510, 546, 510,
38, 38, 510, 38, 38, 38, 38, 38, 38, 510,
38, 38, 38, 38, 510, 38, 38, 510, 510, 510,
510, 510, 523, 523, 523, 523, 523, 523, 523, 523,
523, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 527,
272, 541, 541, 541, 541, 277, 542, 542, 542, 542,
279, 529, 283, 517, 517, 517, 517, 517, 517, 517,
510, 547, 38, 38, 38, 38, 38, 38, 510, 510,
38, 38, 38, 38, 510, 510, 510, 510, 510, 523,
523, 523, 523, 523, 523, 523, 523, 523, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 541, 355, 542, 360, 517, 517, 517, 517,
517, 517, 38, 38, 38, 38, 38, 38, 38, 510,
510, 510, 510, 510, 523, 523, 523, 523, 523, 523,
523, 523, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 510, 517, 517, 517, 517, 38, 38, 38,
38, 510, 510, 510, 510, 523, 523, 523, 523, 523,
523, 57, 57, 57, 57, 57, 510, 57, 517, 517,
517, 38, 38, 38, 510, 510, 510, 510, 510, 523,
523, 523, 523, 57, 57, 510, 57, 57, 517, 517,
38, 38, 510, 523, 523, 57, 57, 38, 57, 0,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510
} ;
static const uint16_t yy_nxt[2452] =
{ 0,
16, 17, 18, 17, 19, 20, 21, 22, 23, 24,
16, 16, 25, 26, 27, 28, 29, 30, 31, 31,
16, 32, 33, 34, 35, 36, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 43, 43, 46, 43,
47, 48, 47, 43, 43, 43, 49, 43, 43, 43,
16, 50, 37, 38, 39, 40, 41, 42, 43, 44,
45, 43, 46, 43, 47, 48, 43, 43, 43, 49,
43, 43, 43, 51, 16, 52, 18, 17, 19, 20,
53, 22, 23, 24, 16, 16, 25, 26, 27, 54,
29, 30, 31, 31, 16, 32, 33, 34, 35, 55,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
62, 62, 65, 62, 66, 67, 66, 62, 68, 69,
70, 62, 62, 62, 16, 50, 56, 57, 58, 59,
60, 61, 62, 63, 64, 62, 65, 62, 66, 67,
62, 68, 69, 70, 62, 62, 62, 51, 17, 18,
17, 93, 20, 17, 18, 17, 182, 20, 17, 18,
17, 510, 74, 17, 18, 17, 94, 74, 32, 72,
83, 16, 83, 32, 72, 144, 16, 86, 32, 510,
97, 98, 183, 32, 16, 16, 18, 16, 16, 16,
99, 16, 16, 16, 16, 16, 16, 16, 16, 76,
16, 16, 16, 16, 16, 32, 16, 16, 16, 17,
18, 17, 17, 18, 17, 103, 81, 18, 81, 81,
18, 81, 87, 203, 104, 145, 89, 100, 101, 32,
90, 83, 32, 83, 16, 16, 82, 496, 102, 82,
510, 91, 116, 117, 119, 120, 83, 203, 83, 86,
152, 89, 106, 106, 106, 90, 152, 16, 16, 16,
18, 16, 16, 16, 91, 16, 16, 16, 16, 16,
16, 16, 16, 76, 16, 16, 16, 16, 16, 32,
16, 16, 16, 106, 106, 106, 110, 110, 111, 111,
202, 208, 112, 112, 87, 200, 201, 241, 113, 113,
113, 113, 242, 243, 107, 300, 152, 114, 16, 16,
510, 110, 110, 111, 111, 202, 208, 112, 112, 200,
201, 241, 113, 113, 510, 242, 243, 510, 107, 510,
114, 16, 16, 17, 18, 17, 16, 16, 510, 16,
16, 16, 16, 78, 16, 16, 16, 79, 16, 16,
16, 16, 16, 32, 16, 16, 16, 510, 141, 244,
152, 142, 477, 176, 177, 295, 222, 131, 132, 223,
223, 223, 133, 240, 289, 251, 128, 292, 148, 95,
95, 141, 16, 16, 244, 142, 176, 177, 129, 295,
278, 131, 132, 216, 216, 133, 510, 510, 240, 289,
251, 128, 292, 148, 86, 16, 16, 17, 18, 17,
16, 16, 129, 16, 16, 16, 16, 78, 16, 16,
16, 79, 16, 16, 16, 16, 16, 32, 16, 16,
16, 175, 510, 510, 135, 279, 510, 182, 510, 152,
510, 510, 510, 106, 106, 106, 510, 135, 496, 87,
245, 318, 510, 226, 175, 510, 16, 16, 510, 134,
136, 137, 138, 183, 158, 164, 510, 139, 169, 146,
220, 83, 179, 170, 147, 245, 318, 165, 226, 16,
88, 178, 231, 121, 134, 136, 137, 138, 158, 88,
164, 139, 319, 169, 220, 228, 179, 510, 170, 88,
88, 165, 123, 148, 124, 187, 178, 231, 125, 188,
453, 152, 149, 150, 126, 510, 126, 319, 510, 228,
510, 153, 154, 510, 152, 189, 155, 123, 148, 124,
496, 379, 234, 125, 510, 149, 150, 156, 126, 88,
380, 510, 127, 510, 166, 167, 153, 154, 88, 168,
221, 155, 510, 510, 190, 234, 510, 227, 88, 88,
156, 123, 205, 124, 171, 510, 239, 125, 166, 167,
206, 172, 168, 126, 221, 126, 510, 510, 224, 173,
227, 510, 235, 510, 174, 252, 123, 225, 124, 171,
239, 266, 125, 477, 510, 172, 267, 126, 151, 278,
152, 121, 207, 224, 173, 235, 253, 151, 174, 252,
225, 510, 152, 322, 238, 232, 266, 151, 151, 250,
160, 267, 161, 310, 233, 207, 162, 110, 510, 111,
253, 152, 163, 112, 163, 510, 322, 254, 238, 113,
232, 113, 152, 250, 279, 160, 255, 161, 233, 246,
247, 162, 110, 110, 111, 111, 163, 151, 112, 112,
127, 510, 254, 113, 477, 113, 151, 113, 510, 255,
510, 152, 510, 246, 247, 152, 151, 151, 110, 160,
111, 161, 256, 510, 112, 162, 110, 248, 111, 113,
510, 163, 112, 163, 249, 510, 259, 510, 113, 258,
113, 320, 257, 262, 160, 510, 161, 256, 510, 510,
162, 110, 248, 111, 453, 163, 196, 112, 249, 309,
302, 259, 113, 258, 197, 257, 320, 510, 262, 204,
263, 510, 196, 311, 196, 196, 477, 293, 293, 196,
223, 223, 223, 309, 510, 302, 196, 278, 264, 110,
196, 111, 196, 263, 196, 112, 198, 199, 311, 196,
196, 113, 265, 113, 196, 510, 510, 146, 510, 83,
196, 264, 147, 196, 110, 196, 111, 196, 86, 198,
112, 110, 210, 111, 211, 113, 265, 112, 212, 260,
285, 285, 279, 113, 213, 113, 213, 269, 261, 187,
187, 148, 268, 188, 276, 182, 110, 210, 111, 211,
149, 150, 112, 212, 260, 510, 510, 113, 213, 189,
189, 269, 261, 87, 510, 268, 148, 287, 290, 510,
510, 183, 297, 149, 150, 270, 288, 291, 305, 270,
298, 510, 510, 152, 510, 315, 301, 271, 190, 277,
510, 313, 287, 290, 182, 270, 303, 270, 270, 288,
308, 291, 270, 305, 223, 223, 223, 304, 510, 270,
301, 510, 299, 270, 321, 270, 313, 270, 314, 272,
273, 510, 270, 270, 308, 488, 489, 270, 510, 152,
312, 306, 304, 270, 510, 299, 270, 307, 270, 321,
270, 314, 272, 187, 152, 510, 210, 280, 211, 152,
317, 281, 212, 329, 316, 312, 306, 344, 213, 282,
213, 323, 307, 189, 152, 364, 152, 281, 333, 281,
281, 210, 365, 211, 281, 317, 326, 212, 329, 316,
344, 281, 213, 331, 510, 281, 323, 281, 152, 281,
364, 283, 284, 333, 281, 281, 496, 365, 330, 281,
510, 326, 488, 489, 510, 281, 453, 331, 281, 340,
281, 152, 281, 510, 283, 86, 510, 510, 210, 210,
211, 211, 335, 330, 212, 212, 324, 286, 286, 286,
213, 213, 213, 213, 340, 325, 334, 286, 286, 286,
286, 286, 286, 210, 210, 211, 211, 335, 332, 212,
212, 324, 366, 510, 213, 213, 510, 510, 325, 510,
87, 334, 286, 286, 286, 286, 286, 286, 210, 210,
211, 211, 332, 510, 212, 212, 510, 366, 152, 510,
213, 213, 213, 213, 338, 339, 510, 510, 327, 510,
510, 510, 510, 210, 210, 211, 211, 328, 341, 212,
212, 386, 343, 367, 213, 213, 336, 345, 338, 339,
342, 510, 337, 327, 349, 346, 510, 368, 510, 348,
187, 328, 152, 341, 276, 386, 343, 347, 367, 350,
350, 336, 345, 369, 86, 342, 182, 337, 346, 349,
189, 187, 368, 348, 152, 188, 196, 196, 187, 510,
347, 296, 188, 510, 510, 370, 510, 389, 369, 371,
371, 189, 183, 351, 351, 351, 510, 187, 189, 277,
182, 188, 510, 351, 351, 351, 351, 351, 351, 87,
370, 389, 374, 362, 362, 510, 373, 189, 510, 510,
190, 510, 510, 510, 385, 510, 183, 190, 351, 351,
351, 351, 351, 351, 187, 510, 378, 374, 352, 379,
510, 373, 353, 382, 375, 377, 190, 510, 380, 385,
354, 510, 384, 376, 189, 152, 387, 510, 353, 378,
353, 353, 510, 381, 388, 353, 510, 391, 382, 375,
377, 510, 353, 383, 152, 384, 353, 376, 353, 387,
353, 431, 355, 356, 152, 353, 353, 388, 381, 390,
353, 152, 391, 152, 152, 392, 353, 152, 383, 353,
404, 353, 394, 353, 431, 355, 357, 395, 510, 393,
358, 396, 510, 152, 390, 432, 510, 419, 359, 152,
392, 510, 510, 404, 397, 510, 358, 394, 358, 358,
398, 403, 395, 358, 393, 396, 399, 510, 400, 432,
358, 296, 419, 401, 358, 420, 358, 406, 358, 397,
360, 361, 402, 358, 358, 398, 403, 379, 358, 510,
405, 399, 510, 400, 358, 510, 380, 358, 401, 358,
420, 358, 406, 360, 187, 510, 402, 185, 188, 510,
185, 510, 270, 270, 408, 405, 510, 488, 489, 182,
363, 363, 363, 421, 189, 278, 407, 411, 510, 422,
363, 363, 363, 363, 363, 363, 152, 415, 415, 408,
409, 510, 410, 412, 462, 183, 510, 510, 421, 407,
510, 510, 411, 190, 422, 363, 363, 363, 363, 363,
363, 196, 196, 196, 409, 465, 412, 410, 462, 423,
279, 196, 196, 196, 196, 196, 196, 510, 296, 204,
192, 192, 185, 477, 430, 187, 187, 452, 465, 276,
276, 510, 185, 423, 510, 433, 196, 196, 196, 196,
196, 196, 270, 270, 270, 189, 189, 187, 510, 430,
452, 276, 270, 270, 270, 270, 270, 270, 424, 417,
433, 185, 510, 413, 413, 434, 510, 189, 418, 187,
425, 510, 510, 188, 277, 277, 510, 270, 270, 270,
270, 270, 270, 424, 417, 281, 281, 426, 510, 189,
434, 152, 418, 510, 428, 425, 277, 187, 510, 152,
510, 276, 152, 152, 152, 427, 152, 429, 236, 152,
435, 438, 426, 414, 414, 414, 439, 189, 190, 428,
440, 152, 510, 414, 414, 414, 414, 414, 414, 427,
429, 436, 441, 510, 435, 152, 438, 510, 510, 510,
437, 439, 510, 510, 445, 440, 277, 442, 414, 414,
414, 414, 414, 414, 278, 441, 436, 454, 446, 455,
229, 443, 444, 510, 437, 451, 416, 416, 416, 445,
510, 447, 442, 456, 450, 457, 416, 416, 416, 416,
416, 416, 454, 446, 455, 443, 448, 444, 463, 218,
451, 449, 510, 510, 510, 447, 510, 450, 456, 279,
457, 416, 416, 416, 416, 416, 416, 281, 281, 281,
187, 448, 278, 463, 276, 458, 449, 281, 281, 281,
281, 281, 281, 510, 358, 358, 353, 353, 152, 510,
189, 510, 481, 510, 510, 217, 215, 214, 464, 466,
458, 152, 281, 281, 281, 281, 281, 281, 204, 192,
185, 459, 467, 460, 152, 152, 481, 279, 461, 277,
353, 353, 353, 464, 466, 468, 469, 152, 479, 152,
353, 353, 353, 353, 353, 353, 459, 467, 460, 470,
480, 461, 471, 510, 510, 510, 510, 510, 510, 140,
468, 469, 510, 479, 510, 353, 353, 353, 353, 353,
353, 358, 358, 358, 470, 480, 472, 471, 473, 474,
475, 358, 358, 358, 358, 358, 358, 152, 510, 476,
510, 478, 485, 483, 487, 484, 486, 510, 510, 490,
510, 472, 130, 473, 474, 475, 358, 358, 358, 358,
358, 358, 476, 482, 152, 478, 483, 485, 487, 484,
152, 486, 152, 494, 490, 491, 495, 477, 497, 499,
500, 492, 510, 477, 152, 510, 510, 510, 482, 510,
152, 493, 152, 143, 140, 510, 504, 510, 494, 495,
491, 505, 497, 130, 499, 500, 492, 498, 501, 506,
118, 510, 108, 503, 96, 493, 502, 92, 84, 510,
510, 504, 510, 507, 508, 510, 505, 510, 510, 510,
510, 510, 498, 501, 506, 510, 510, 510, 503, 502,
509, 510, 510, 510, 510, 510, 507, 510, 508, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 509, 71, 71, 71, 71, 71,
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 71, 71, 71, 71, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
73, 73, 73, 73, 73, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 85, 85, 510, 510, 85,
85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
85, 85, 85, 85, 85, 88, 510, 510, 510, 88,
88, 88, 510, 510, 88, 88, 88, 88, 88, 95,
95, 510, 510, 510, 95, 95, 95, 95, 95, 95,
95, 95, 95, 95, 95, 95, 95, 95, 95, 105,
510, 510, 510, 510, 105, 105, 510, 510, 105, 105,
105, 105, 105, 109, 109, 510, 510, 510, 109, 109,
109, 109, 115, 115, 510, 115, 115, 115, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 122, 122, 510, 510, 122, 122, 122, 510,
510, 122, 122, 122, 122, 122, 151, 510, 510, 510,
151, 151, 151, 151, 510, 151, 151, 151, 151, 151,
157, 510, 510, 510, 510, 157, 157, 510, 510, 157,
157, 157, 157, 157, 159, 159, 510, 510, 159, 159,
159, 159, 510, 159, 159, 159, 159, 159, 180, 510,
510, 510, 510, 180, 180, 180, 180, 180, 180, 180,
180, 510, 180, 180, 180, 180, 180, 180, 181, 181,
510, 510, 181, 181, 181, 181, 181, 181, 181, 181,
181, 181, 181, 181, 181, 181, 181, 181, 184, 184,
510, 510, 184, 184, 184, 184, 184, 184, 184, 184,
184, 510, 184, 184, 184, 184, 184, 184, 186, 186,
510, 510, 186, 186, 186, 186, 186, 186, 186, 186,
186, 186, 186, 186, 186, 186, 186, 186, 191, 510,
191, 510, 191, 191, 191, 510, 510, 191, 191, 191,
191, 191, 193, 510, 510, 510, 510, 510, 510, 510,
510, 193, 193, 193, 193, 193, 194, 510, 510, 510,
194, 194, 194, 510, 510, 194, 194, 194, 194, 194,
195, 510, 510, 510, 510, 510, 510, 510, 510, 195,
195, 195, 195, 195, 95, 510, 95, 510, 510, 510,
95, 510, 510, 510, 95, 95, 510, 510, 95, 95,
209, 209, 510, 510, 510, 209, 209, 209, 209, 216,
216, 510, 510, 510, 216, 216, 216, 216, 216, 216,
216, 216, 216, 216, 216, 216, 216, 216, 216, 219,
510, 219, 219, 510, 510, 510, 219, 219, 219, 219,
230, 510, 230, 230, 510, 510, 510, 230, 230, 230,
230, 237, 510, 237, 237, 510, 510, 510, 237, 237,
237, 237, 274, 274, 510, 510, 274, 274, 274, 274,
274, 274, 274, 274, 274, 510, 274, 274, 274, 274,
274, 274, 275, 275, 510, 510, 275, 275, 275, 275,
275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
275, 275, 189, 189, 510, 510, 189, 189, 189, 189,
189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
189, 189, 294, 294, 510, 510, 510, 294, 294, 216,
510, 216, 510, 510, 510, 216, 510, 510, 510, 216,
216, 510, 510, 216, 216, 95, 95, 510, 510, 510,
95, 95, 372, 372, 510, 510, 510, 372, 372, 216,
216, 510, 510, 510, 216, 216, 15, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510
} ;
static const flex_int16_t yy_chk[2452] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 3, 3,
3, 23, 3, 4, 4, 4, 72, 4, 5, 5,
5, 509, 5, 6, 6, 6, 23, 6, 3, 3,
17, 3, 17, 4, 4, 51, 4, 20, 5, 508,
25, 25, 72, 6, 7, 7, 7, 7, 7, 7,
25, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 9,
9, 9, 10, 10, 10, 27, 13, 13, 13, 14,
14, 14, 20, 91, 27, 51, 21, 26, 26, 9,
21, 81, 10, 81, 7, 7, 13, 492, 26, 14,
507, 21, 33, 33, 35, 35, 83, 91, 83, 85,
505, 21, 106, 106, 106, 21, 492, 7, 8, 8,
8, 8, 8, 8, 21, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 28, 28, 28, 30, 31, 30, 31,
90, 107, 30, 31, 85, 89, 89, 148, 30, 31,
30, 31, 149, 149, 28, 219, 504, 30, 8, 8,
219, 30, 31, 30, 31, 90, 107, 30, 31, 89,
89, 148, 30, 31, 48, 149, 149, 68, 28, 49,
30, 8, 11, 11, 11, 11, 11, 11, 41, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 39, 48, 150,
158, 49, 503, 68, 68, 208, 130, 41, 41, 130,
130, 130, 41, 147, 201, 158, 39, 203, 147, 293,
293, 48, 11, 11, 150, 49, 68, 68, 39, 208,
189, 41, 41, 371, 371, 41, 502, 67, 147, 201,
158, 39, 203, 147, 196, 11, 12, 12, 12, 12,
12, 12, 39, 12, 12, 12, 12, 12, 12, 12,
12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
12, 67, 132, 42, 44, 189, 46, 181, 45, 153,
70, 128, 61, 54, 54, 54, 58, 63, 496, 196,
153, 240, 494, 132, 67, 69, 12, 12, 136, 42,
44, 45, 46, 181, 54, 58, 134, 46, 61, 52,
128, 52, 70, 63, 52, 153, 240, 58, 132, 12,
37, 69, 136, 37, 42, 44, 45, 46, 54, 37,
58, 46, 241, 61, 128, 134, 70, 138, 63, 37,
37, 58, 37, 52, 37, 74, 69, 136, 37, 74,
411, 53, 52, 52, 37, 60, 37, 241, 411, 134,
129, 53, 53, 133, 490, 74, 53, 37, 52, 37,
486, 379, 138, 37, 142, 52, 52, 53, 37, 38,
379, 64, 38, 139, 60, 60, 53, 53, 38, 60,
129, 53, 131, 65, 74, 138, 164, 133, 38, 38,
53, 38, 96, 38, 64, 176, 142, 38, 60, 60,
96, 64, 60, 38, 129, 38, 165, 177, 131, 65,
133, 482, 139, 141, 65, 164, 38, 131, 38, 64,
142, 176, 38, 477, 137, 64, 177, 38, 56, 357,
156, 56, 96, 131, 65, 139, 165, 56, 65, 164,
131, 166, 56, 244, 141, 137, 176, 56, 56, 156,
56, 177, 56, 230, 137, 96, 56, 109, 230, 109,
165, 154, 56, 109, 56, 472, 244, 166, 141, 109,
137, 109, 469, 156, 357, 56, 166, 56, 137, 154,
154, 56, 109, 110, 109, 110, 56, 57, 109, 110,
57, 167, 166, 109, 464, 110, 57, 110, 168, 166,
169, 57, 170, 154, 154, 155, 57, 57, 110, 57,
110, 57, 167, 172, 110, 57, 111, 155, 111, 110,
228, 57, 111, 57, 155, 173, 170, 221, 111, 169,
111, 242, 168, 172, 57, 458, 57, 167, 231, 174,
57, 111, 155, 111, 453, 57, 87, 111, 155, 228,
221, 170, 111, 169, 87, 168, 242, 448, 172, 206,
173, 175, 87, 231, 87, 87, 451, 206, 206, 87,
222, 222, 222, 228, 451, 221, 87, 358, 174, 112,
87, 112, 87, 173, 87, 112, 87, 87, 231, 87,
87, 112, 175, 112, 87, 179, 178, 146, 171, 146,
87, 174, 146, 87, 112, 87, 112, 87, 197, 87,
112, 113, 114, 113, 114, 112, 175, 113, 114, 171,
197, 197, 358, 113, 114, 113, 114, 179, 171, 186,
187, 146, 178, 186, 187, 270, 113, 114, 113, 114,
146, 146, 113, 114, 171, 220, 225, 113, 114, 186,
187, 179, 171, 197, 444, 178, 146, 200, 202, 227,
233, 270, 217, 146, 146, 183, 200, 202, 225, 183,
217, 443, 234, 439, 224, 237, 220, 183, 186, 187,
237, 233, 200, 202, 183, 183, 223, 183, 183, 200,
227, 202, 183, 225, 223, 223, 223, 224, 232, 183,
220, 226, 217, 183, 243, 183, 233, 183, 234, 183,
183, 263, 183, 183, 227, 485, 485, 183, 239, 438,
232, 226, 224, 183, 238, 217, 183, 226, 183, 243,
183, 234, 183, 190, 249, 253, 209, 190, 209, 245,
239, 190, 209, 249, 238, 232, 226, 263, 209, 190,
209, 245, 226, 190, 251, 287, 247, 190, 253, 190,
190, 209, 288, 209, 190, 239, 247, 209, 249, 238,
263, 190, 209, 251, 259, 190, 245, 190, 250, 190,
287, 190, 190, 253, 190, 190, 475, 288, 250, 190,
255, 247, 488, 488, 475, 190, 434, 251, 190, 259,
190, 246, 190, 254, 190, 198, 428, 252, 210, 211,
210, 211, 255, 250, 210, 211, 246, 198, 198, 198,
210, 211, 210, 211, 259, 246, 254, 198, 198, 198,
198, 198, 198, 210, 211, 210, 211, 255, 252, 210,
211, 246, 289, 257, 210, 211, 258, 424, 246, 423,
198, 254, 198, 198, 198, 198, 198, 198, 212, 213,
212, 213, 252, 262, 212, 213, 260, 289, 248, 266,
212, 213, 212, 213, 257, 258, 256, 265, 248, 261,
268, 267, 269, 212, 213, 212, 213, 248, 260, 212,
213, 319, 262, 290, 212, 213, 256, 265, 257, 258,
261, 412, 256, 248, 269, 266, 405, 291, 403, 268,
275, 248, 398, 260, 275, 319, 262, 267, 290, 271,
271, 256, 265, 292, 285, 261, 271, 256, 266, 269,
275, 280, 291, 268, 392, 280, 285, 285, 281, 384,
267, 298, 281, 381, 377, 295, 302, 322, 292, 298,
298, 280, 271, 272, 272, 272, 301, 282, 281, 275,
272, 282, 308, 272, 272, 272, 272, 272, 272, 285,
295, 322, 302, 282, 282, 344, 301, 282, 317, 340,
280, 313, 307, 304, 318, 336, 272, 281, 272, 272,
272, 272, 272, 272, 277, 335, 308, 302, 277, 309,
312, 301, 277, 313, 304, 307, 282, 309, 309, 318,
277, 316, 317, 304, 277, 324, 320, 314, 277, 308,
277, 277, 311, 312, 321, 277, 338, 324, 313, 304,
307, 306, 277, 316, 323, 317, 277, 304, 277, 320,
277, 386, 277, 277, 325, 277, 277, 321, 312, 323,
277, 327, 324, 329, 326, 325, 277, 328, 316, 277,
338, 277, 327, 277, 386, 277, 279, 328, 337, 326,
279, 329, 333, 330, 323, 387, 332, 366, 279, 331,
325, 305, 334, 338, 330, 342, 279, 327, 279, 279,
331, 337, 328, 279, 326, 329, 332, 341, 333, 387,
279, 297, 366, 334, 279, 367, 279, 342, 279, 330,
279, 279, 334, 279, 279, 331, 337, 339, 279, 343,
341, 332, 345, 333, 279, 339, 339, 279, 334, 279,
367, 279, 342, 279, 283, 348, 334, 276, 283, 349,
274, 346, 350, 350, 345, 341, 347, 466, 466, 350,
283, 283, 283, 368, 283, 359, 343, 348, 264, 369,
283, 283, 283, 283, 283, 283, 466, 359, 359, 345,
346, 373, 347, 349, 430, 350, 236, 235, 368, 343,
229, 410, 348, 283, 369, 283, 283, 283, 283, 283,
283, 286, 286, 286, 346, 433, 349, 347, 430, 373,
359, 286, 286, 286, 286, 286, 286, 218, 216, 205,
193, 191, 188, 498, 385, 352, 353, 410, 433, 352,
353, 498, 185, 373, 374, 388, 286, 286, 286, 286,
286, 286, 351, 351, 351, 352, 353, 354, 375, 385,
410, 354, 351, 351, 351, 351, 351, 351, 374, 364,
388, 184, 163, 354, 354, 389, 376, 354, 364, 362,
375, 382, 383, 362, 352, 353, 378, 351, 351, 351,
351, 351, 351, 374, 364, 362, 362, 376, 162, 362,
389, 390, 364, 161, 382, 375, 354, 355, 160, 393,
159, 355, 157, 151, 394, 378, 396, 383, 140, 395,
390, 393, 376, 355, 355, 355, 394, 355, 362, 382,
395, 391, 401, 355, 355, 355, 355, 355, 355, 378,
383, 391, 396, 399, 390, 397, 393, 402, 400, 408,
391, 394, 404, 409, 401, 395, 355, 397, 355, 355,
355, 355, 355, 355, 360, 396, 391, 417, 402, 418,
135, 399, 400, 406, 391, 409, 360, 360, 360, 401,
407, 404, 397, 421, 408, 422, 360, 360, 360, 360,
360, 360, 417, 402, 418, 399, 406, 400, 431, 127,
409, 407, 425, 126, 125, 404, 124, 408, 421, 360,
422, 360, 360, 360, 360, 360, 360, 363, 363, 363,
413, 406, 415, 431, 413, 425, 407, 363, 363, 363,
363, 363, 363, 429, 415, 415, 413, 413, 435, 426,
413, 427, 457, 123, 122, 121, 120, 116, 432, 435,
425, 436, 363, 363, 363, 363, 363, 363, 95, 75,
73, 426, 436, 427, 440, 437, 457, 415, 429, 413,
414, 414, 414, 432, 435, 437, 440, 442, 454, 441,
414, 414, 414, 414, 414, 414, 426, 436, 427, 441,
455, 429, 442, 445, 450, 460, 446, 447, 449, 66,
437, 440, 452, 454, 461, 414, 414, 414, 414, 414,
414, 416, 416, 416, 441, 455, 445, 442, 446, 447,
449, 416, 416, 416, 416, 416, 416, 467, 474, 450,
459, 452, 462, 460, 465, 461, 463, 476, 62, 467,
473, 445, 59, 446, 447, 449, 416, 416, 416, 416,
416, 416, 450, 459, 468, 452, 460, 462, 465, 461,
470, 463, 471, 473, 467, 468, 474, 478, 476, 480,
481, 470, 484, 487, 491, 478, 483, 495, 459, 497,
493, 471, 55, 50, 47, 501, 491, 43, 473, 474,
468, 493, 476, 40, 480, 481, 470, 478, 483, 495,
34, 506, 29, 487, 24, 471, 484, 22, 19, 15,
0, 491, 0, 497, 501, 0, 493, 0, 0, 0,
0, 0, 478, 483, 495, 0, 0, 0, 487, 484,
506, 0, 0, 0, 0, 0, 497, 0, 501, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 506, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 512, 512, 512, 512, 512,
512, 512, 512, 512, 512, 512, 512, 512, 512, 512,
512, 512, 512, 512, 512, 513, 513, 513, 513, 513,
513, 513, 513, 513, 513, 513, 513, 513, 513, 513,
513, 513, 513, 513, 513, 514, 514, 514, 514, 514,
514, 514, 514, 514, 514, 514, 514, 514, 514, 514,
514, 514, 514, 514, 514, 515, 515, 515, 515, 515,
515, 515, 515, 515, 515, 515, 515, 515, 515, 515,
515, 515, 515, 515, 515, 516, 516, 0, 0, 516,
516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
516, 516, 516, 516, 516, 517, 0, 0, 0, 517,
517, 517, 0, 0, 517, 517, 517, 517, 517, 518,
518, 0, 0, 0, 518, 518, 518, 518, 518, 518,
518, 518, 518, 518, 518, 518, 518, 518, 518, 519,
0, 0, 0, 0, 519, 519, 0, 0, 519, 519,
519, 519, 519, 520, 520, 0, 0, 0, 520, 520,
520, 520, 521, 521, 0, 521, 521, 521, 521, 521,
521, 521, 521, 521, 521, 521, 521, 521, 521, 521,
521, 521, 522, 522, 0, 0, 522, 522, 522, 0,
0, 522, 522, 522, 522, 522, 523, 0, 0, 0,
523, 523, 523, 523, 0, 523, 523, 523, 523, 523,
524, 0, 0, 0, 0, 524, 524, 0, 0, 524,
524, 524, 524, 524, 525, 525, 0, 0, 525, 525,
525, 525, 0, 525, 525, 525, 525, 525, 526, 0,
0, 0, 0, 526, 526, 526, 526, 526, 526, 526,
526, 0, 526, 526, 526, 526, 526, 526, 527, 527,
0, 0, 527, 527, 527, 527, 527, 527, 527, 527,
527, 527, 527, 527, 527, 527, 527, 527, 528, 528,
0, 0, 528, 528, 528, 528, 528, 528, 528, 528,
528, 0, 528, 528, 528, 528, 528, 528, 529, 529,
0, 0, 529, 529, 529, 529, 529, 529, 529, 529,
529, 529, 529, 529, 529, 529, 529, 529, 530, 0,
530, 0, 530, 530, 530, 0, 0, 530, 530, 530,
530, 530, 531, 0, 0, 0, 0, 0, 0, 0,
0, 531, 531, 531, 531, 531, 532, 0, 0, 0,
532, 532, 532, 0, 0, 532, 532, 532, 532, 532,
533, 0, 0, 0, 0, 0, 0, 0, 0, 533,
533, 533, 533, 533, 534, 0, 534, 0, 0, 0,
534, 0, 0, 0, 534, 534, 0, 0, 534, 534,
535, 535, 0, 0, 0, 535, 535, 535, 535, 536,
536, 0, 0, 0, 536, 536, 536, 536, 536, 536,
536, 536, 536, 536, 536, 536, 536, 536, 536, 537,
0, 537, 537, 0, 0, 0, 537, 537, 537, 537,
538, 0, 538, 538, 0, 0, 0, 538, 538, 538,
538, 539, 0, 539, 539, 0, 0, 0, 539, 539,
539, 539, 540, 540, 0, 0, 540, 540, 540, 540,
540, 540, 540, 540, 540, 0, 540, 540, 540, 540,
540, 540, 541, 541, 0, 0, 541, 541, 541, 541,
541, 541, 541, 541, 541, 541, 541, 541, 541, 541,
541, 541, 542, 542, 0, 0, 542, 542, 542, 542,
542, 542, 542, 542, 542, 542, 542, 542, 542, 542,
542, 542, 543, 543, 0, 0, 0, 543, 543, 544,
0, 544, 0, 0, 0, 544, 0, 0, 0, 544,
544, 0, 0, 544, 544, 545, 545, 0, 0, 0,
545, 545, 546, 546, 0, 0, 0, 546, 546, 547,
547, 0, 0, 0, 547, 547, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510, 510, 510, 510, 510, 510, 510, 510, 510, 510,
510
} ;
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
extern int yy_flex_debug;
int yy_flex_debug = 0;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
/* %option debug */
/* lexical analyser for gpasm
Copyright 1998-2005
James Bowman, Craig Franklin
*/
#if !defined(YY_FLEX_MAJOR_VERSION) || \
!defined(YY_FLEX_MINOR_VERSION) || \
!defined(YY_FLEX_SUBMINOR_VERSION) || \
YY_FLEX_MAJOR_VERSION < 2 || \
(YY_FLEX_MAJOR_VERSION == 2 && YY_FLEX_MINOR_VERSION < 5) || \
(YY_FLEX_MAJOR_VERSION == 2 && YY_FLEX_MINOR_VERSION == 5 && YY_FLEX_SUBMINOR_VERSION < 35)
# error "flex 2.5.35 or newer required!"
#endif
#include "libgputils.h"
#include "gpasm.h"
#include "parse.h"
#include "scan.h"
#include "file.h"
#include "deps.h"
#include "gpmsg.h"
#include "directive.h"
#include "evaluate.h"
#include "macro.h"
#include "coff.h"
#include "preprocess.h"
#include "lst.h"
#define OPERATOR(x) return (yylval.i = (x))
enum identtype {
ID_UNKNOWN_TYPE,
ID_MACRO_PARAMS,
ID_DEFINES,
ID_DIRECTIVES,
ID_GLOBALS,
ID_MACROS,
ID_OPCODES
};
bool force_decimal; /* Used to force radix to decimal for some directives. */
bool force_ident; /* Used to force numbers to identifiers for processor names. */
static enum identtype _identify(const char *);
static bool _found_eof();
static _inline int gp_input(char *Buf, int Max_size) {
int c;
int n;
if (IN_FILE_EXPANSION) {
c = '*';
/* not in macro expansion */
if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) {
for (n = 0; (n < Max_size) && ((c = getc(yyin)) != EOF) && (c != '\n'); ++n) {
Buf[n] = (char)c;
}
if (c == '\n') {
/* skip CR followed by LF */
if ((n > 0) && (Buf[n - 1] == '\r')) {
--n;
}
Buf[n++] = (char)c;
}
if ((c == EOF) && ferror(yyin)) {
gpmsg(GPE_SCANNER, NULL, "Input in flex scanner failed.");
}
return n;
}
else {
gpmsg(GPE_SCANNER, NULL, "Interactive scanner should be used.");
return 0;
}
}
else {
/* in macro expansion */
if (state.src_list.last->mac_body) {
n = strlen(state.src_list.last->mac_body->src_line);
if (n > (Max_size - 1)) {
n = Max_size - 2;
}
strncpy(Buf, state.src_list.last->mac_body->src_line, n);
Buf[n++] = '\n'; /* add newline */
return n;
}
else {
Buf[0] = Buf[1] = YY_END_OF_BUFFER_CHAR;
return 0;
}
}
}
static _inline int gp_yyinput(char *Buf, size_t Max_size) {
int result = gp_input(Buf, Max_size);
if (result) {
/* preprocess line */
preprocess_line(Buf, &result, Max_size);
state.src_list.last->last_char_is_nl = (Buf[result - 1] == '\n');
}
else if (!state.src_list.last->last_char_is_nl) {
*Buf = '\n';
result = 1;
state.src_list.last->last_char_is_nl = true;
}
return result;
}
#define YY_INPUT(buf, result, max_size) result = gp_yyinput(buf, max_size)
enum{
INITIAL=0,
bquote=1,
lnquote=2,
define=3,
definition=4,
defargs=5,
macpar=6,
};
static int yy_init_globals();
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int yylex_destroy();
int yyget_debug();
void yyset_debug(int debug_flag);
void* yyget_extra();
void yyset_extra(void* user_defined);
FILE *yyget_in();
void yyset_in(FILE*_in_str);
FILE *yyget_out();
void yyset_out(FILE*_out_str);
int yyget_leng();
char *yyget_text();
int yyget_lineno();
void yyset_lineno(int _line_number);
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
#ifndef YY_SKIP_YYWRAP
int yywrap ();
#endif
#ifndef YY_NO_UNPUT
static void yyunput (int c,char *buf_ptr );
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,const char *,int );
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (const char * );
#endif
#ifndef YY_NO_INPUT
static int yyinput ();
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
* is returned in "result".
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}\
\
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
* we don't want an extra ';' after the "return" because that will cause
* some compilers to complain about unreachable statements.
*/
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif
/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif
/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
/* end tables serialization structures and prototypes */
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
extern int yylex (void);
#define YY_DECL int yylex (void)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
if ( yyleng > 0 ) \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
/** The main scanner function which does all the work.
*/
YY_DECL
{
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
int yy_act;
if ( !(yy_init) )
{
(yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
if ( ! yyout )
yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
yy_create_buffer(yyin,YY_BUF_SIZE );
}
yy_load_buffer_state( );
}
{
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
/* Support of yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
yy_match:
do
{
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
(yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 511 )
yy_c = yy_meta[(unsigned) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 2377 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
do_action: /* This label is used only to access EOF actions. */
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = (yy_hold_char);
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
goto yy_find_action;
case 1:
YY_RULE_SETUP
{
yylval.cs = "include";
BEGIN(bquote);
return IDENTIFIER;
}
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(bquote):
case YY_STATE_EOF(lnquote):
case YY_STATE_EOF(define):
case YY_STATE_EOF(definition):
case YY_STATE_EOF(defargs):
case YY_STATE_EOF(macpar):
{
if (_found_eof()) {
yyterminate();
}
}
YY_BREAK
case 2:
YY_RULE_SETUP
{
BEGIN(lnquote);
yylval.cs = "title";
return IDENTIFIER;
}
YY_BREAK
case 3:
YY_RULE_SETUP
{
BEGIN(lnquote);
yylval.cs = "subtitle";
return IDENTIFIER;
}
YY_BREAK
case 4:
YY_RULE_SETUP
{
return CBLOCK;
}
YY_BREAK
case 5:
YY_RULE_SETUP
{
yylval.s = GP_Strdup(yytext);
return ERRORLEVEL;
}
YY_BREAK
case 6:
YY_RULE_SETUP
{
return ENDC;
}
YY_BREAK
case 7:
YY_RULE_SETUP
{
/* fill with ( ) as first argument */
yylval.i = FILL;
return FILL;
}
YY_BREAK
case 8:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
{
yylval.cs = "#define";
return DEFINE;
}
YY_BREAK
case 9:
YY_RULE_SETUP
{
BEGIN(define);
yylval.cs = "#define";
return DEFINE;
}
YY_BREAK
case 10:
YY_RULE_SETUP
{
BEGIN(defargs);
yylval.s = GP_Strndup(yytext, yyleng - 1);
return IDENT_BRACKET;
}
YY_BREAK
case 11:
YY_RULE_SETUP
{
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 12:
YY_RULE_SETUP
{
BEGIN(definition);
yylval.i = yytext[0];
return ')';
}
YY_BREAK
case 13:
YY_RULE_SETUP
{
BEGIN(definition);
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 14:
YY_RULE_SETUP
{
if (force_ident) {
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
else {
yylval.i = UPPER;
return UPPER;
}
}
YY_BREAK
case 15:
YY_RULE_SETUP
{
if (force_ident) {
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
else {
yylval.i = HIGH;
return HIGH;
}
}
YY_BREAK
case 16:
YY_RULE_SETUP
{
if (force_ident) {
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
else {
yylval.i = LOW;
return LOW;
}
}
YY_BREAK
case 17:
YY_RULE_SETUP
{
yylval.s = GP_Strdup(yytext);
return LIST;
}
YY_BREAK
case 18:
YY_RULE_SETUP
{
force_ident = true;
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 19:
YY_RULE_SETUP
{
yylval.s = GP_Strdup(yytext);
return PROCESSOR;
}
YY_BREAK
case 20:
YY_RULE_SETUP
{
/* #if and if can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 21:
YY_RULE_SETUP
{
/* #elif and elif can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 22:
YY_RULE_SETUP
{
/* #else and else can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 23:
YY_RULE_SETUP
{
/* #endif and endif can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 24:
YY_RULE_SETUP
{
/* #ifdef and ifdef can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 25:
YY_RULE_SETUP
{
/* #elifdef and elifdef can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 26:
YY_RULE_SETUP
{
/* #ifndef and ifndef can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 27:
YY_RULE_SETUP
{
/* #elifndef and elifndef can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 28:
YY_RULE_SETUP
{
/* #undefine can appear in column 1 */
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 29:
YY_RULE_SETUP
{
yylval.s = GP_Strdup(yytext);
return DEBUG_LINE;
}
YY_BREAK
case 30:
YY_RULE_SETUP
{
bool has_colon;
const symbol_t *sym;
const macro_head_t *head;
has_colon = false;
if (yytext[strlen(yytext) - 1] == ':') {
yytext[strlen(yytext) - 1] = '\0';
has_colon = true;
}
yylval.s = GP_Strdup(yytext);
switch (_identify(yytext)) {
case ID_DIRECTIVES: {
gpmsg(GPW_DIR_COLUMN_ONE, NULL, yytext);
if (has_colon) {
gpmsg(GPE_BADCHAR, NULL, ':');
}
return IDENTIFIER;
break;
}
case ID_MACROS: {
/* Macro invocation */
BEGIN(macpar);
sym = gp_sym_get_symbol(state.stMacros, yytext);
head = (const macro_head_t *)gp_sym_get_symbol_annotation(sym);
/* TODO: This condition shoul be probably removed
* since the symbol table is reinitialized before
* the second pass. */
if (head->line_number == state.src_list.last->line_number) {
return LABEL;
}
else {
gpmsg(GPW_MACRO_COLUMN_ONE, NULL, yytext);
if (has_colon) {
gpmsg(GPE_BADCHAR, NULL, ':');
}
return IDENTIFIER;
}
break;
}
case ID_OPCODES: {
gpmsg(GPW_OP_COLUMN_ONE, NULL, yytext);
if (has_colon) {
gpmsg(GPE_BADCHAR, NULL, ':');
}
return IDENTIFIER;
break;
}
case ID_UNKNOWN_TYPE:
default:
return LABEL;
break;
}
}
YY_BREAK
case 31:
YY_RULE_SETUP
{
if (gp_sym_get_symbol(state.stMacros, yytext)) {
/* Macro invocation. */
BEGIN(macpar);
}
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
YY_BREAK
case 32:
YY_RULE_SETUP
{
yylval.i = string_to_int(yytext + 2, 16);
return NUMBER;
}
YY_BREAK
case 33:
YY_RULE_SETUP
{
if (force_ident) {
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
else if (state.radix == 16) {
yylval.i = string_to_int(yytext, 16);
return NUMBER;
}
else {
yytext[yyleng - 1] = '\0';
yylval.i = string_to_int(yytext, 2);
return NUMBER;
}
}
YY_BREAK
case 34:
YY_RULE_SETUP
{
yytext[yyleng - 1] = '\0';
yylval.i = string_to_int(yytext + 2, 2);
return NUMBER;
}
YY_BREAK
case 35:
YY_RULE_SETUP
{
if (force_ident) {
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
else {
yytext[yyleng - 1] = '\0';
yylval.i = string_to_int(yytext, 8);
return NUMBER;
}
}
YY_BREAK
case 36:
YY_RULE_SETUP
{
yytext[yyleng - 1] = '\0';
yylval.i = string_to_int(yytext + 2, 8);
return NUMBER;
}
YY_BREAK
case 37:
YY_RULE_SETUP
{
if (force_ident) {
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
else if (state.radix == 16) {
yylval.i = string_to_int(yytext, 16);
return NUMBER;
}
else {
yytext[yyleng - 1] = '\0';
yylval.i = string_to_int(yytext, 10);
return NUMBER;
}
}
YY_BREAK
case 38:
YY_RULE_SETUP
{
yytext[yyleng - 1] = '\0';
yylval.i = string_to_int(yytext + 2, 10);
return NUMBER;
}
YY_BREAK
case 39:
YY_RULE_SETUP
{
yylval.i = string_to_int(yytext + 1, 10);
return NUMBER;
}
YY_BREAK
case 40:
YY_RULE_SETUP
{
if (force_ident) {
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
else {
yytext[yyleng - 1] = '\0';
yylval.i = string_to_int(yytext, 16);
return NUMBER;
}
}
YY_BREAK
case 41:
YY_RULE_SETUP
{
yytext[yyleng - 1] = '\0';
yylval.i = string_to_int(yytext + 2, 16);
return NUMBER;
}
YY_BREAK
case 42:
YY_RULE_SETUP
{
if (force_ident) {
yylval.s = GP_Strdup(yytext);
return IDENTIFIER;
}
else if (force_decimal) {
yylval.i = string_to_int(yytext, 10);
return NUMBER;
}
else {
yylval.i = string_to_int(yytext, state.radix);
return NUMBER;
}
}
YY_BREAK
case 43:
YY_RULE_SETUP
{
if ((yyleng > 1) && (yytext[yyleng - 1] == '"')) {
--yyleng;
}
else {
gpmsg0(GPW_MISSING_QUOTE, NULL);
}
yylval.s = GP_Strndup(yytext + 1, yyleng - 1);
BEGIN(INITIAL);
return STRING;
}
YY_BREAK
case 44:
YY_RULE_SETUP
{
const char *pc = convert_escape_chars(yytext + 1, &yylval.i,false);
if (pc != &yytext[yyleng - 1]) {
gpmsg(GPE_ILLEGAL_ARGU, NULL, "Expected single character.");
}
return NUMBER;
}
YY_BREAK
case 45:
YY_RULE_SETUP
{
yylval.i = yytext[2];
return NUMBER;
}
YY_BREAK
case 46:
YY_RULE_SETUP
{
yylval.s = GP_Strndup(yytext + 1, yyleng - 2);
BEGIN(INITIAL);
return STRING;
}
YY_BREAK
case 47:
YY_RULE_SETUP
{ /*"*/
/* unquoted (special-case) string */
yylval.s = GP_Strdup(yytext);
BEGIN(INITIAL);
return STRING;
}
YY_BREAK
case 48:
YY_RULE_SETUP
{ /*"*/
/* if valid, must match with length >= unquoted token below */
yylval.s = GP_Strndup(yytext + 1, yyleng - 2);
BEGIN(INITIAL);
return STRING;
}
YY_BREAK
case 49:
YY_RULE_SETUP
{
/* full-line (special-case) string */
/* must begin and end with non-whitespace */
yylval.s = GP_Strdup(yytext);
BEGIN(INITIAL);
return STRING;
}
YY_BREAK
case 50:
YY_RULE_SETUP
OPERATOR(LSH);
YY_BREAK
case 51:
YY_RULE_SETUP
OPERATOR(RSH);
YY_BREAK
case 52:
YY_RULE_SETUP
OPERATOR(GREATER_EQUAL);
YY_BREAK
case 53:
YY_RULE_SETUP
OPERATOR(LESS_EQUAL);
YY_BREAK
case 54:
YY_RULE_SETUP
OPERATOR(EQUAL);
YY_BREAK
case 55:
YY_RULE_SETUP
OPERATOR(NOT_EQUAL);
YY_BREAK
case 56:
YY_RULE_SETUP
OPERATOR(LOGICAL_AND);
YY_BREAK
case 57:
YY_RULE_SETUP
OPERATOR(LOGICAL_OR);
YY_BREAK
case 58:
YY_RULE_SETUP
OPERATOR(ASSIGN_PLUS);
YY_BREAK
case 59:
YY_RULE_SETUP
OPERATOR(ASSIGN_MINUS);
YY_BREAK
case 60:
YY_RULE_SETUP
OPERATOR(ASSIGN_MULTIPLY);
YY_BREAK
case 61:
YY_RULE_SETUP
OPERATOR(ASSIGN_DIVIDE);
YY_BREAK
case 62:
YY_RULE_SETUP
OPERATOR(ASSIGN_MODULUS);
YY_BREAK
case 63:
YY_RULE_SETUP
OPERATOR(ASSIGN_LSH);
YY_BREAK
case 64:
YY_RULE_SETUP
OPERATOR(ASSIGN_RSH);
YY_BREAK
case 65:
YY_RULE_SETUP
OPERATOR(ASSIGN_AND);
YY_BREAK
case 66:
YY_RULE_SETUP
OPERATOR(ASSIGN_OR);
YY_BREAK
case 67:
YY_RULE_SETUP
OPERATOR(ASSIGN_XOR);
YY_BREAK
case 68:
YY_RULE_SETUP
OPERATOR(INCREMENT);
YY_BREAK
case 69:
YY_RULE_SETUP
OPERATOR(DECREMENT);
YY_BREAK
case 70:
YY_RULE_SETUP
OPERATOR(TBL_POST_INC);
YY_BREAK
case 71:
YY_RULE_SETUP
OPERATOR(TBL_POST_DEC);
YY_BREAK
case 72:
YY_RULE_SETUP
OPERATOR(TBL_PRE_INC);
YY_BREAK
case 73:
YY_RULE_SETUP
YY_BREAK
case 74:
YY_RULE_SETUP
{
#define CHUNK 64
static bool emit_comma = false;
unsigned len = CHUNK;
unsigned i = 0;
char*buf = new char[len];
int c = yytext[0];
bool prev_esc = false;
int _state = 0;
if (emit_comma) {
unput(c);
emit_comma = false;
yylval.i = ',';
return ',';
}
/* skip leading spaces */
while (isspace(c)) c = yyinput();
for (; ; ) {
switch (c) {
case ',':
if (_state != 0) {
goto no_esc;
}
emit_comma = true;
goto skip_trailing;
case ';':
if (_state != 0) {
goto no_esc;
}
/* eat the rest of line */
while (((c = yyinput()) != EOF) && (c != '\n'))
;
/* fall through */
case '\n':
unput('\n');
/* fall through */
skip_trailing:
/* skip trailing spaces */
while ((i > 0) && isspace((unsigned char)buf[i - 1])) {
--i;
}
/* fall through */
case EOF:
yylval.s = GP_Strndup(buf, i);
free(buf);
return IDENTIFIER;
case '\\':
prev_esc = !prev_esc;
break;
case '"':
case '\'':
/* escaping out of string doesn't have any special meaning */
if ((_state == 0) || ((_state != 0) && !prev_esc)) {
_state = (_state == 0) ? c : ((_state == c) ? 0 : _state);
}
/* fall through */
default:
no_esc:
prev_esc = false;
break;
}
buf[i++] = c;
if (len <= i) {
len += CHUNK;
buf = (char*)GP_Realloc(buf, len);
}
c = yyinput();
}
}
YY_BREAK
case 75:
/* rule 75 can match eol */
YY_RULE_SETUP
{
force_decimal = false;
force_ident = false;
BEGIN(INITIAL); /* switch to INITIAL state */
return yytext[0];
}
YY_BREAK
case 76:
YY_RULE_SETUP
{
BEGIN(INITIAL); /* switch to INITIAL state */
}
YY_BREAK
case 77:
YY_RULE_SETUP
{
yylval.i = yytext[0];
return yytext[0];
}
YY_BREAK
case 78:
YY_RULE_SETUP
ECHO;
YY_BREAK
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
*yy_cp = (yy_hold_char);
YY_RESTORE_YY_MORE_OFFSET
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a pnew file or input source. It's
* possible that this happened because the user
* just pointed yyin at a pnew source and called
* yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the pnew input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
* of the first EOB in the buffer, since yy_c_buf_p will
* already have been incremented past the NUL character
* (since all states make transitions on EOB to the
* end-of-buffer state). Contrast this with the test
* in input().
*/
if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state( );
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
* yy_get_previous_state() go ahead and do it
* for us because it doesn't know how to deal
* with the possibility of jamming (and we don't
* want to build jamming into it because then it
* will run more slowly).
*/
yy_next_state = yy_try_NUL_trans( yy_current_state );
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
yy_cp = ++(yy_c_buf_p);
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
yy_cp = (yy_c_buf_p);
goto yy_find_action;
}
}
else switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_END_OF_FILE:
{
(yy_did_buffer_switch_on_eof) = 0;
if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
* yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
}
else
{
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
(yy_c_buf_p) =
(yytext_ptr) + yy_amount_of_matched_text;
yy_current_state = yy_get_previous_state( );
yy_cp = (yy_c_buf_p);
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
(yy_c_buf_p) =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
yy_current_state = yy_get_previous_state( );
yy_cp = (yy_c_buf_p);
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
goto yy_find_action;
}
break;
}
default:
YY_FATAL_ERROR(
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
} /* end of user's declarations */
} /* end of yylex */
/* yy_get_next_buffer - try to read in a pnew buffer
*
* Returns a code representing an action:
* EOB_ACT_LAST_MATCH -
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer (void)
{
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
yy_size_t number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
}
else
{
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
}
}
/* Try to read more data. */
/* First move last chars to start of buffer. */
number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
else
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
(yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
if ( (yy_n_chars) == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
yyrestart(yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
else
ret_val = EOB_ACT_CONTINUE_SCAN;
if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
}
(yy_n_chars) += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
return ret_val;
}
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state (void)
{
yy_state_type yy_current_state;
char *yy_cp;
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
(yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 511 )
yy_c = yy_meta[(unsigned) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
}
return yy_current_state;
}
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
int yy_is_jam;
char *yy_cp = (yy_c_buf_p);
YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
(yy_last_accepting_cpos) = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 511 )
yy_c = yy_meta[(unsigned) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
yy_is_jam = (yy_current_state == 510);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
static void yyunput (int c, char * yy_bp )
{
char *yy_cp;
yy_cp = (yy_c_buf_p);
/* undo effects of setting up yytext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
int number_to_move = (yy_n_chars) + 2;
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
(yytext_ptr) = yy_bp;
(yy_hold_char) = *yy_cp;
(yy_c_buf_p) = yy_cp;
}
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput ()
#else
static int input (void)
#endif
{
int c;
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
/* This was really a NUL. */
*(yy_c_buf_p) = '\0';
else
{ /* need more input */
int offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart(yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
if ( yywrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
(yy_c_buf_p) = (yytext_ptr) + offset;
break;
}
}
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
*(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
return c;
}
#endif /* ifndef YY_NO_INPUT */
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*
* @note This function does not reset the start condition to @c INITIAL .
*/
void yyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
yy_create_buffer(yyin,YY_BUF_SIZE );
}
yy_init_buffer(YY_CURRENT_BUFFER,input_file );
yy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The pnew input buffer.
*
*/
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
* yypush_buffer_state(new_buffer);
*/
yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
static void yy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
*
* @return the allocated buffer state.
*/
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
yy_init_buffer(b,file );
return b;
}
/** Destroy the buffer.
* @param b a buffer created with yy_create_buffer()
*
*/
void yy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
yyfree((void *) b->yy_ch_buf );
yyfree((void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
*/
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
/* If b is the current buffer, then yy_init_buffer was _probably_
* called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
b->yy_bs_lineno = 1;
b->yy_bs_column = 0;
}
b->yy_is_interactive = 1;
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
void yy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
b->yy_n_chars = 0;
/* We always need two end-of-buffer characters. The first causes
* a transition to the end-of-buffer state. The second causes
* a jam in that state.
*/
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
b->yy_buf_pos = &b->yy_ch_buf[0];
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
yy_load_buffer_state( );
}
/** Pushes the pnew state onto the stack. The pnew state becomes
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The pnew state.
*
*/
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
yyensure_buffer_stack();
/* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
*(yy_c_buf_p) = (yy_hold_char);
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
/* Only push if top exists. Otherwise, replace top. */
if (YY_CURRENT_BUFFER)
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
/* copied from yy_switch_to_buffer. */
yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/** Removes and deletes the top of the stack, if present.
* The next element becomes the pnew top.
*
*/
void yypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
static void yyensure_buffer_stack (void)
{
int num_to_alloc;
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
}
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the pnew slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
}
}
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return NULL;
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
yy_switch_to_buffer(b );
return b;
}
/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead.
*/
YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
return yy_scan_bytes(yystr,(int) strlen(yystr) );
}
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = (yy_size_t) _yybytes_len + 2;
buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < (unsigned)_yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer(buf,n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
*/
b->yy_is_our_buffer = 1;
return b;
}
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
static void yynoreturn yy_fatal_error (const char* msg )
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* Redefine yyless() so it works in section 3 code. */
#undef yyless
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
yy_size_t yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = (yy_hold_char); \
(yy_c_buf_p) = yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
yyleng = yyless_macro_arg; \
} \
while ( 0 )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
*
*/
int yyget_lineno (void)
{
return yylineno;
}
/** Get the input stream.
*
*/
FILE *yyget_in (void)
{
return yyin;
}
/** Get the output stream.
*
*/
FILE *yyget_out (void)
{
return yyout;
}
/** Get the length of the current token.
*
*/
int yyget_leng (void)
{
return yyleng;
}
/** Get the current token.
*
*/
char *yyget_text (void)
{
return yytext;
}
/** Set the current line number.
* @param _line_number line number
*
*/
void yyset_lineno (int _line_number )
{
yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param _in_str A readable stream.
*
* @see yy_switch_to_buffer
*/
void yyset_in (FILE * _in_str )
{
yyin = _in_str ;
}
void yyset_out (FILE * _out_str )
{
yyout = _out_str ;
}
int yyget_debug (void)
{
return yy_flex_debug;
}
void yyset_debug (int _bdebug )
{
yy_flex_debug = _bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
* This function is called from yylex_destroy(), so don't allocate here.
*/
(yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
(yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
yyin = stdin;
yyout = stdout;
#else
yyin = NULL;
yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
* yylex_init()
*/
return 0;
}
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
yypop_buffer_state();
}
/* Destroy the stack itself. */
yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
* yylex() is called, initialization will occur. */
yy_init_globals( );
return 0;
}
/*
* Internal utility routines.
*/
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (const char * s )
{
int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
void *yyalloc (yy_size_t size )
{
return malloc(size);
}
void *yyrealloc (void * ptr, yy_size_t size )
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* because both ANSI C and C++ allow castless assignment from
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
return realloc(ptr, size);
}
void yyfree (void * ptr )
{
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
void open_src(const char *Name, bool Is_include) {
extern FILE *yyin;
char *lower_case_name;
if (state.src_list.last) {
state.src_list.last->yybuf = YY_CURRENT_BUFFER;
}
source_context_t*pnew = (source_context_t*)gp_list_node_new(sizeof(source_context_t));
pnew->f = fopen(Name, "rt");
if (pnew->f) {
pnew->name = GP_Strdup(Name);
}
else if (Is_include && (strchr(Name, PATH_SEPARATOR_CHAR) == 0)) {
/* If include file and no PATH_SEPARATOR_CHAR in name, try searching include path. */
file_search_paths(pnew, Name);
if (pnew->f == NULL) {
/* We didn't find a match so check for lower case. This is mainly for
Microchip examples and some includes in which filenames were written
without regard to case. */
lower_case_name = gp_strdup_lower_case(Name);
file_search_paths(pnew, lower_case_name);
free(lower_case_name);
if (pnew->f) {
gpmsg0(GPW_UNKNOWN, "Found lower case match for include filename.");
}
}
}
if (pnew->f == NULL) {
if (state.src_list.last) {
gpmsg(GPE_NOENT, NULL, Name);
}
else {
perror(Name);
exit(1);
}
}
else {
yyin = pnew->f;
if (state.src_list.last) {
yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
}
if (state.use_absolute_path) {
pnew->name = gp_absolute_path(pnew->name);
}
pnew->type = SRC_FILE;
pnew->line_number = 1;
pnew->loop_number = 1;
pnew->file_symbol = (state.debug_info) ? NULL : coff_add_file_sym(pnew->name, Is_include);
if (state.src_list.first == NULL) {
/* This list at present yet empty. */
gp_list_set_delete_node_func(&state.src_list, file_delete_node);
}
gp_list_node_append(&state.src_list, pnew);
state.src_list.last->fc = file_add(FT_SRC, pnew->name);
deps_add(pnew->name);
if (!Is_include) {
/* it is the top level file so initialize the lexer */
force_decimal = false;
force_ident = false;
}
state.src_list.last->last_char_is_nl = true;
state.found_end = false;
}
}
void
execute_macro(macro_head_t *Head, bool Is_while)
{
source_context_t *ctx;
source_context_t *pnew;
ctx = state.src_list.last;
assert(ctx);
ctx->yybuf = YY_CURRENT_BUFFER;
/* Store the stack so it can be returned when the macro is complete. */
ctx->astack = state.astack;
/* Create pnew source_context. */
pnew = (source_context_t*)gp_list_node_new(sizeof(source_context_t));
pnew->name = GP_Strdup(Head->src_name);
pnew->type = (Is_while) ? SRC_WHILE : SRC_MACRO;
pnew->line_number = Head->line_number + 1;
pnew->loop_number = 1;
pnew->file_symbol = Head->file_symbol;
pnew->mac_head = Head;
pnew->mac_body = Head->body;
gp_list_node_append(&state.src_list, pnew);
state.src_list.last->fc = file_add(FT_SRC, pnew->name); /* scan list for fc */
yy_switch_to_buffer(yy_create_buffer(NULL,YY_BUF_SIZE));
}
void
repeat_while(void)
{
source_context_t *ctx;
macro_head_t *head;
ctx = state.src_list.last;
head = ctx->mac_head;
ctx->mac_body = head->body;
ctx->line_number = head->line_number + 1;
++(ctx->loop_number);
yy_delete_buffer(YY_CURRENT_BUFFER);
yy_switch_to_buffer(yy_create_buffer(NULL,YY_BUF_SIZE));
}
void
close_file(void)
{
source_context_t *ctx;
ctx = state.src_list.last;
if (IN_FILE_EXPANSION) {
if (ctx->f) {
fclose(ctx->f);
}
if (ctx->prev == NULL) {
/* This is the first source. */
coff_cleanup_before_eof();
}
if (!state.debug_info) {
coff_add_eof_sym();
}
gp_list_node_delete(&state.src_list, ctx);
}
else if (ctx->type == SRC_MACRO) {
gp_list_node_remove(&state.src_list, ctx);
state.stTop = gp_sym_pop_table(state.stTop);
state.stMacroParams = gp_sym_pop_table(state.stMacroParams);
if (state.src_list.last->astack != state.astack) {
gpmsg(GPE_ILLEGAL_NESTING, NULL);
}
assert(state.stTop);
assert(state.stMacroParams);
gp_list_node_free(&state.src_list, ctx);
}
else if (ctx->type == SRC_WHILE) {
gp_list_node_delete(&state.src_list, ctx);
}
}
void
execute_exitm(void)
{
const amode_t *upper;
amode_t *old;
/* The macro is ended early, so return the stack to its previous state. */
upper = state.src_list.last->prev->astack;
while ((state.astack) && (state.astack != upper)) {
old = state.astack;
state.astack = state.astack->upper;
free(old);
}
close_file();
if (state.src_list.last) {
yy_delete_buffer(YY_CURRENT_BUFFER);
yy_switch_to_buffer(state.src_list.last->yybuf);
}
}
/* found end directive, close all files and stop the parser */
bool
found_end(void)
{
/* close all open files */
while (state.src_list.last) {
close_file();
}
/* make sure the buffer is empty when pass 2 starts */
if (YY_CURRENT_BUFFER) {
yy_flush_buffer(YY_CURRENT_BUFFER);
}
return true;
}
static bool
_found_eof(void)
{
source_context_t *ctx;
bool terminate;
enum src_types prev_type;
ctx = state.src_list.last;
terminate = false;
if (IN_WHILE_EXPANSION) {
if (eval_maybe_evaluate(ctx->mac_head->parms)) {
if (ctx->loop_number > WHILE_LOOP_COUNT_MAX) {
gpmsg(GPE_BAD_WHILE_LOOP, NULL);
}
else {
/* repeat the while loop */
repeat_while();
return false;
}
}
}
prev_type = state.src_list.last->type;
close_file();
ctx = state.src_list.last;
if (ctx) {
/* Just an include file. */
yy_delete_buffer(YY_CURRENT_BUFFER);
yy_switch_to_buffer(ctx->yybuf);
if ((state.pass == 2) && (prev_type == SRC_WHILE)) {
/* Force ENDW listing */
state.lst.line.linetype = gpasm_state::Lst::Line::LTY_DIR;
/* Line number was alreay incremented, so it has to be decremented,
source line listed and line number incremented again. */
--(ctx->line_number);
lst_format_line(ctx->curr_src_line.line, 0);
++(ctx->line_number);
}
}
else {
if (!state.found_end) {
gpmsg0(GPE_ILLEGAL_COND, "Illegal condition: EOF encountered before END.");
}
terminate = found_end();
}
return terminate;
}
static enum identtype
_identify(const char *Text)
{
enum identtype type;
const symbol_t *sym;
if ((sym = gp_sym_get_symbol(state.stMacroParams, Text))) {
type = ID_MACRO_PARAMS;
}
else if ((sym = gp_sym_get_symbol(state.stDefines, Text))) {
type = ID_DEFINES;
}
else if ((sym = gp_sym_get_symbol(state.stDirective, Text))) {
type = ID_DIRECTIVES;
if ((state.mpasm_compatible) && (strcasecmp(Text, "idlocs") == 0)) {
type = ID_UNKNOWN_TYPE;
}
}
else if ((sym = gp_sym_get_symbol(state.stBuiltin, Text))) {
type = ID_OPCODES;
}
else if ((sym = gp_sym_get_symbol(state.stGlobal, Text))) {
type = ID_GLOBALS;
}
else if ((sym = gp_sym_get_symbol(state.stMacros, Text))) {
type = ID_MACROS;
}
else {
type = ID_UNKNOWN_TYPE;
}
return type;
}
Detected encoding: UTF-8 | 0
|