This is ldlex.c in view mode; [Download] [Up]
/* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/flex-2.4.7/RCS/flex.skl,v 1.2 94/08/03 11:13:24 vern Exp $ */ #define FLEX_SCANNER #include <stdio.h> /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include <stdlib.h> #include <unistd.h> /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #ifdef __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #define YY_USE_CONST #endif #ifndef YY_USE_CONST #ifndef const #define const #endif #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #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 int) (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. */ #define YY_START ((yy_start - 1) / 2) /* 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 new file". Now included * only for backward compatibility with previous versions of flex. */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #ifdef __cplusplus extern "C" { #endif extern int yywrap YY_PROTO(( void )); #ifdef __cplusplus } #endif #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) 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 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 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 "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* 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". */ #define YY_CURRENT_BUFFER yy_current_buffer /* 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 = (char *) 0; static int yy_init = 1; /* 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; static void yyunput YY_PROTO(( int c, char *buf_ptr )); void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; static void yy_push_state YY_PROTO(( int new_state )); static void yy_pop_state YY_PROTO(( void )); static int yy_top_state YY_PROTO(( void )); static void *yy_flex_alloc YY_PROTO(( unsigned int )); static void *yy_flex_realloc YY_PROTO(( void *, unsigned int )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define INITIAL 0 #define SCRIPT 1 #define EXPRESSION 2 #define BOTH 3 #define DEFSYMEXP 4 #define MRI 5 typedef unsigned char YY_CHAR; typedef int yy_state_type; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; extern char *yytext; #define yytext_ptr yytext #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, const char *, int )); #endif #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( 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 = yy_cp - yy_bp; \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_END_OF_BUFFER 126 static const short int yy_accept[799] = { 0, 0, 0, 119, 119, 0, 0, 0, 0, 0, 0, 0, 0, 126, 125, 123, 122, 121, 32, 123, 119, 38, 29, 44, 43, 34, 35, 28, 36, 119, 37, 8, 8, 45, 46, 39, 40, 27, 33, 8, 8, 8, 8, 8, 8, 119, 119, 119, 119, 119, 119, 119, 119, 119, 10, 9, 8, 87, 85, 119, 42, 30, 41, 31, 124, 122, 32, 124, 118, 38, 29, 44, 43, 34, 35, 28, 36, 118, 37, 8, 8, 45, 46, 39, 40, 27, 33, 8, 8, 8, 118, 118, 10, 9, 8, 118, 42, 30, 41, 31, 118, 8, 8, 8, 8, 8, 8, 8, 8, 118, 118, 118, 118, 118, 118, 118, 118, 118, 8, 8, 87, 85, 4, 3, 2, 4, 5, 4, 91, 117, 92, 28, 117, 8, 8, 40, 8, 8, 8, 8, 8, 8, 117, 117, 117, 117, 117, 117, 8, 8, 8, 8, 117, 117, 117, 117, 15, 0, 120, 119, 8, 8, 26, 24, 22, 20, 21, 1, 23, 8, 119, 18, 17, 14, 16, 19, 8, 8, 119, 90, 119, 119, 119, 119, 8, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 8, 119, 119, 119, 25, 13, 118, 6, 6, 20, 21, 23, 8, 7, 7, 8, 0, 14, 8, 7, 7, 7, 8, 118, 90, 7, 8, 118, 118, 118, 8, 118, 8, 8, 8, 8, 8, 118, 118, 118, 118, 8, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 8, 118, 118, 4, 4, 4, 4, 117, 6, 6, 92, 8, 7, 7, 7, 8, 117, 8, 7, 117, 7, 117, 117, 117, 117, 117, 117, 117, 8, 117, 117, 117, 117, 117, 117, 117, 117, 11, 12, 119, 8, 119, 119, 119, 119, 119, 119, 8, 119, 119, 119, 119, 119, 72, 119, 119, 119, 119, 119, 57, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 88, 86, 119, 118, 118, 7, 118, 8, 118, 118, 118, 118, 118, 8, 118, 118, 118, 118, 118, 8, 118, 118, 118, 118, 118, 72, 118, 118, 118, 118, 118, 57, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 88, 86, 4, 117, 117, 117, 117, 117, 93, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 108, 117, 117, 117, 117, 117, 117, 119, 52, 119, 119, 78, 119, 82, 119, 119, 119, 119, 68, 119, 119, 119, 83, 119, 119, 76, 119, 54, 119, 119, 119, 119, 119, 75, 119, 119, 119, 119, 119, 119, 119, 119, 119, 118, 52, 118, 118, 54, 118, 118, 118, 118, 118, 78, 118, 82, 118, 118, 118, 68, 118, 118, 118, 83, 118, 118, 76, 118, 118, 118, 118, 118, 75, 118, 118, 118, 118, 118, 118, 8, 117, 117, 117, 97, 96, 117, 105, 100, 103, 117, 117, 106, 117, 117, 109, 117, 114, 110, 112, 117, 115, 119, 51, 49, 119, 119, 119, 81, 53, 74, 119, 119, 62, 119, 119, 119, 119, 119, 119, 119, 119, 119, 77, 119, 119, 119, 119, 119, 119, 118, 51, 118, 118, 118, 118, 118, 49, 118, 118, 81, 53, 74, 118, 118, 62, 118, 118, 118, 118, 118, 118, 118, 118, 77, 118, 118, 118, 117, 98, 95, 117, 105, 105, 102, 117, 117, 117, 117, 114, 114, 111, 119, 119, 119, 119, 119, 119, 50, 47, 119, 80, 48, 61, 119, 119, 119, 58, 119, 73, 59, 119, 119, 118, 118, 80, 58, 118, 118, 118, 118, 118, 118, 50, 47, 118, 48, 61, 118, 118, 118, 118, 73, 59, 117, 117, 104, 101, 117, 117, 113, 119, 119, 119, 63, 119, 89, 79, 119, 84, 119, 119, 119, 69, 119, 119, 118, 63, 118, 118, 118, 118, 118, 118, 89, 79, 118, 84, 118, 118, 69, 117, 117, 117, 117, 107, 119, 119, 119, 119, 119, 119, 67, 119, 116, 119, 107, 118, 116, 118, 118, 118, 118, 118, 118, 118, 67, 107, 94, 99, 116, 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118, 118, 118, 118, 119, 119, 119, 119, 119, 60, 119, 119, 118, 118, 118, 118, 118, 118, 118, 60, 119, 119, 119, 71, 119, 119, 119, 118, 118, 118, 118, 118, 71, 118, 65, 119, 119, 119, 119, 119, 118, 118, 65, 118, 118, 118, 119, 119, 70, 119, 119, 118, 118, 118, 118, 70, 119, 119, 56, 55, 56, 55, 118, 118, 119, 119, 118, 118, 119, 119, 118, 118, 119, 119, 118, 118, 119, 119, 118, 118, 119, 119, 118, 118, 119, 119, 118, 118, 64, 119, 64, 118, 119, 118, 66, 66, 0 } ; static const int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 1, 6, 7, 8, 1, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 1, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 15, 47, 48, 49, 50, 15, 51, 1, 52, 1, 53, 54, 55, 56, 57, 58, 59, 60, 61, 15, 62, 63, 64, 65, 66, 67, 15, 68, 69, 70, 71, 15, 15, 72, 15, 73, 74, 75, 76, 77, 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, 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 } ; static const int yy_meta[78] = { 0, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 3, 4, 3, 5, 5, 6, 6, 3, 1, 1, 4, 1, 1, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 5, 6, 6, 6, 6, 6, 6, 5, 5, 5, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 6, 5, 1, 1, 1, 3 } ; static const short int yy_base[811] = { 0, 0, 0, 0, 0, 77, 0, 149, 0, 215, 0, 292, 0, 1503, 1504, 1504, 1504, 1504, 1480, 1496, 353, 1504, 148, 1504, 1504, 1478, 1477, 0, 1476, 0, 146, 395, 1425, 0, 1504, 137, 1474, 138, 1504, 136, 354, 333, 344, 125, 355, 1459, 1456, 144, 140, 155, 153, 1448, 371, 1467, 0, 0, 117, 1434, 1422, 1428, 1504, 354, 1504, 0, 1504, 1504, 1466, 1482, 451, 1504, 188, 1504, 1504, 1464, 1463, 1504, 1462, 0, 189, 493, 1411, 1504, 1504, 192, 1460, 362, 1504, 549, 410, 411, 162, 1448, 1504, 1504, 430, 1419, 1504, 367, 1504, 0, 597, 398, 426, 498, 465, 555, 599, 479, 604, 1443, 1440, 357, 368, 389, 353, 1432, 600, 1451, 621, 536, 1418, 1406, 669, 1504, 1504, 0, 1504, 711, 1504, 759, 0, 1504, 0, 0, 1401, 1504, 801, 439, 457, 405, 459, 544, 453, 1447, 1429, 1425, 1440, 1426, 528, 609, 408, 533, 433, 1414, 1398, 1408, 1504, 1459, 1504, 0, 0, 1391, 1504, 1504, 1504, 0, 0, 1504, 0, 0, 612, 1440, 1504, 0, 1504, 1439, 371, 373, 1427, 0, 1420, 1414, 498, 1428, 473, 1427, 1411, 1418, 1414, 1410, 1415, 630, 1412, 1411, 1408, 1410, 1399, 501, 1412, 1400, 1414, 1417, 531, 1402, 1391, 1414, 1395, 1395, 305, 1371, 1376, 1361, 1504, 1504, 0, 849, 1361, 1504, 1504, 0, 1360, 1359, 1504, 1504, 627, 1504, 664, 675, 676, 0, 0, 1397, 0, 706, 717, 1382, 1392, 1378, 726, 1353, 788, 696, 0, 827, 746, 1386, 1380, 523, 1394, 855, 1393, 1377, 1384, 1380, 1376, 1381, 752, 1378, 1377, 1374, 1376, 559, 1379, 1367, 1381, 1384, 583, 1369, 1382, 1363, 1363, 863, 1339, 1344, 0, 1330, 0, 0, 0, 916, 1329, 0, 565, 645, 594, 0, 0, 1367, 754, 1366, 1370, 1355, 1353, 1370, 1357, 1365, 1366, 1364, 1341, 641, 1319, 1318, 1300, 1293, 1305, 1267, 1274, 1274, 1504, 1504, 1289, 637, 1296, 1299, 1296, 1281, 1275, 1297, 645, 1294, 1278, 1283, 1293, 1290, 0, 1280, 1276, 1269, 1282, 1281, 0, 1272, 1266, 1273, 1269, 1276, 1266, 1263, 1276, 1261, 1258, 1259, 1271, 1257, 1262, 1266, 1230, 0, 0, 1238, 1277, 1254, 765, 1261, 882, 1247, 1251, 1260, 1222, 1230, 913, 1259, 1256, 1241, 1235, 1252, 787, 1249, 1233, 1238, 1248, 1245, 0, 1234, 1225, 1216, 1224, 1223, 0, 1214, 1216, 1220, 1210, 1207, 1220, 1205, 1202, 1203, 1202, 1207, 1211, 0, 0, 858, 972, 1202, 587, 1211, 1199, 0, 1201, 1193, 1208, 1206, 1205, 1197, 1188, 1193, 1164, 1162, 0, 1164, 1157, 1170, 1168, 1167, 1153, 1186, 0, 1183, 1185, 0, 1175, 0, 1174, 1179, 1172, 1167, 0, 1170, 1184, 1167, 0, 1167, 1166, 0, 1167, 0, 1169, 1182, 1168, 1155, 1163, 0, 1171, 1164, 1152, 1155, 1144, 1152, 1150, 1115, 1111, 1140, 0, 1137, 1136, 0, 1148, 1133, 1108, 1104, 1134, 0, 1124, 0, 1123, 1122, 1117, 0, 1120, 1134, 1117, 0, 1117, 1116, 0, 1117, 1119, 1124, 1111, 1119, 0, 1127, 1120, 1108, 1107, 1117, 1120, 894, 1112, 1104, 1108, 0, 0, 1120, 1030, 0, 0, 1102, 1110, 0, 1115, 1078, 0, 1087, 1106, 0, 0, 1071, 0, 1093, 0, 0, 1095, 1107, 1106, 0, 0, 0, 1082, 1105, 0, 1100, 1083, 1100, 1096, 1085, 1078, 1096, 1088, 1079, 0, 1082, 1064, 1077, 1058, 1030, 1042, 1054, 0, 1069, 1069, 1066, 1024, 1036, 0, 1051, 1063, 0, 0, 0, 1039, 1062, 0, 1057, 1040, 1062, 1048, 1041, 1059, 1051, 1043, 0, 1036, 1054, 1035, 1033, 0, 1040, 1032, 0, 1182, 0, 1048, 1049, 1002, 1002, 0, 1258, 0, 1027, 1025, 1017, 1040, 1040, 1037, 0, 0, 1021, 0, 0, 1012, 1015, 1010, 1023, 1008, 1019, 0, 0, 988, 1005, 1012, 1027, 0, 997, 978, 995, 1001, 993, 1017, 1013, 0, 0, 992, 0, 981, 976, 971, 984, 981, 0, 0, 976, 980, 0, 0, 974, 947, 0, 987, 988, 975, 0, 974, 0, 0, 514, 0, 984, 968, 978, 0, 952, 948, 978, 0, 974, 948, 944, 976, 957, 956, 0, 0, 691, 0, 966, 950, 0, 963, 963, 958, 929, 0, 941, 958, 946, 940, 942, 946, 0, 947, 0, 911, 0, 938, 0, 909, 921, 938, 926, 920, 922, 927, 0, 0, 0, 0, 0, 920, 923, 917, 925, 907, 905, 915, 886, 913, 884, 897, 901, 891, 897, 881, 874, 872, 883, 870, 869, 862, 0, 869, 840, 866, 832, 845, 854, 843, 849, 836, 0, 828, 842, 830, 0, 836, 824, 790, 817, 788, 800, 815, 803, 0, 814, 0, 791, 782, 788, 779, 743, 764, 735, 0, 758, 748, 755, 746, 771, 0, 751, 709, 729, 702, 707, 732, 0, 713, 719, 0, 0, 0, 0, 708, 713, 696, 699, 682, 679, 677, 668, 669, 666, 667, 655, 654, 646, 633, 640, 620, 621, 595, 565, 551, 524, 509, 479, 448, 454, 0, 433, 0, 432, 379, 354, 0, 0, 1504, 1334, 1340, 1344, 1348, 203, 1350, 1354, 1360, 1366, 1372, 1378, 1384 } ; static const short int yy_def[811] = { 0, 799, 799, 798, 3, 798, 5, 5, 7, 798, 9, 798, 11, 798, 798, 798, 798, 798, 798, 800, 801, 798, 798, 798, 798, 798, 801, 801, 801, 801, 801, 801, 31, 801, 798, 798, 801, 798, 798, 31, 31, 31, 31, 31, 31, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 31, 801, 801, 801, 798, 798, 798, 801, 798, 798, 798, 800, 802, 798, 798, 798, 798, 798, 798, 798, 798, 802, 802, 798, 79, 798, 798, 798, 798, 798, 798, 802, 87, 87, 802, 802, 798, 798, 87, 802, 798, 798, 798, 802, 802, 803, 803, 100, 100, 100, 100, 100, 100, 802, 802, 802, 802, 802, 802, 802, 802, 802, 100, 100, 802, 802, 804, 798, 798, 804, 798, 804, 798, 805, 806, 798, 805, 79, 79, 798, 805, 136, 136, 136, 136, 136, 805, 805, 805, 805, 805, 805, 136, 136, 136, 136, 805, 805, 805, 805, 798, 800, 798, 801, 31, 31, 798, 798, 798, 801, 801, 798, 801, 801, 31, 798, 798, 801, 798, 798, 31, 31, 801, 801, 801, 801, 801, 801, 31, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 31, 801, 801, 801, 798, 798, 802, 802, 215, 798, 798, 802, 79, 79, 798, 798, 102, 798, 87, 87, 87, 802, 802, 802, 802, 87, 87, 802, 802, 802, 87, 802, 100, 100, 102, 100, 100, 802, 802, 802, 802, 100, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 100, 802, 802, 804, 127, 127, 804, 805, 805, 279, 806, 136, 136, 136, 805, 805, 805, 136, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 136, 805, 805, 805, 805, 805, 805, 805, 805, 798, 798, 801, 31, 801, 801, 801, 801, 801, 801, 31, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 100, 802, 87, 802, 87, 802, 802, 802, 802, 802, 100, 802, 802, 802, 802, 802, 100, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 127, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 805, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 394, 805, 805, 805, 805, 805, 805, 807, 805, 805, 805, 805, 805, 805, 805, 805, 805, 808, 805, 805, 805, 805, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 805, 805, 805, 805, 809, 807, 805, 805, 805, 805, 805, 810, 808, 805, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 805, 805, 805, 805, 805, 805, 805, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 805, 805, 805, 805, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, 805, 805, 805, 805, 801, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 802, 801, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 802, 801, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 802, 801, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 802, 801, 801, 801, 801, 801, 802, 802, 802, 802, 802, 801, 801, 801, 801, 802, 802, 802, 802, 801, 801, 802, 802, 801, 801, 802, 802, 801, 801, 802, 802, 801, 801, 802, 802, 801, 801, 802, 802, 801, 801, 802, 802, 801, 801, 802, 802, 801, 802, 801, 802, 0, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798 } ; static const short int yy_nxt[1582] = { 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 29, 45, 46, 29, 29, 47, 48, 49, 50, 29, 51, 29, 52, 53, 29, 29, 29, 29, 29, 54, 55, 29, 56, 32, 32, 32, 32, 32, 29, 29, 29, 29, 57, 29, 29, 58, 29, 29, 59, 29, 29, 29, 29, 60, 61, 62, 63, 64, 65, 17, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 88, 89, 88, 88, 77, 77, 77, 77, 77, 77, 77, 90, 77, 77, 77, 77, 91, 77, 77, 77, 77, 77, 77, 92, 93, 77, 94, 88, 88, 88, 88, 88, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 95, 77, 77, 77, 77, 96, 97, 98, 99, 100, 162, 167, 171, 172, 174, 175, 176, 186, 177, 194, 101, 102, 168, 195, 163, 208, 178, 192, 103, 104, 105, 106, 107, 108, 179, 109, 110, 193, 196, 111, 112, 113, 114, 159, 115, 235, 116, 117, 197, 198, 162, 159, 199, 200, 167, 236, 118, 119, 119, 119, 119, 119, 159, 242, 163, 219, 120, 171, 172, 121, 64, 64, 14, 64, 64, 122, 64, 64, 64, 64, 64, 123, 64, 124, 125, 125, 101, 102, 64, 64, 64, 126, 64, 64, 127, 127, 127, 127, 127, 127, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 64, 64, 125, 127, 127, 127, 127, 127, 127, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 64, 64, 64, 125, 15, 16, 128, 15, 15, 129, 15, 15, 15, 15, 130, 15, 131, 15, 132, 132, 133, 134, 15, 15, 15, 135, 15, 15, 136, 137, 138, 139, 140, 141, 132, 132, 132, 132, 132, 142, 132, 143, 144, 145, 132, 132, 146, 147, 132, 132, 132, 132, 132, 15, 15, 132, 148, 139, 149, 139, 150, 151, 132, 132, 132, 132, 152, 132, 153, 154, 132, 132, 155, 132, 132, 132, 132, 15, 15, 15, 132, 160, 161, 182, 184, 346, 183, 212, 159, 161, 161, 161, 161, 161, 161, 174, 175, 257, 185, 187, 212, 180, 188, 797, 259, 189, 262, 258, 260, 263, 264, 202, 311, 181, 203, 204, 159, 161, 161, 161, 161, 161, 161, 161, 161, 310, 205, 159, 796, 235, 206, 161, 161, 161, 161, 161, 161, 159, 159, 261, 213, 169, 284, 169, 223, 284, 223, 233, 233, 233, 233, 234, 278, 213, 159, 278, 159, 214, 214, 161, 161, 161, 161, 161, 161, 214, 214, 233, 169, 233, 169, 223, 223, 223, 223, 288, 284, 214, 170, 215, 216, 224, 795, 794, 301, 214, 278, 216, 216, 216, 216, 216, 216, 241, 284, 238, 284, 292, 793, 223, 289, 223, 792, 293, 278, 303, 278, 241, 290, 798, 304, 230, 245, 230, 318, 216, 216, 216, 216, 216, 216, 220, 220, 791, 246, 230, 241, 230, 251, 220, 221, 220, 221, 220, 220, 243, 222, 244, 230, 223, 230, 223, 333, 222, 230, 231, 230, 315, 334, 316, 668, 222, 230, 232, 230, 669, 159, 220, 220, 220, 220, 220, 220, 790, 241, 284, 223, 339, 223, 340, 284, 230, 363, 230, 364, 278, 224, 226, 226, 789, 278, 284, 230, 241, 230, 226, 227, 226, 228, 226, 226, 278, 229, 299, 291, 230, 231, 230, 788, 229, 380, 230, 284, 230, 232, 247, 356, 229, 248, 230, 302, 230, 278, 226, 226, 226, 226, 226, 226, 385, 787, 386, 230, 491, 230, 240, 241, 241, 230, 492, 230, 284, 241, 241, 241, 241, 241, 241, 241, 249, 266, 278, 786, 267, 237, 230, 284, 230, 252, 241, 230, 253, 230, 250, 254, 268, 278, 785, 159, 269, 159, 241, 241, 241, 241, 241, 241, 230, 325, 230, 784, 326, 230, 798, 230, 798, 783, 230, 284, 230, 300, 327, 284, 782, 781, 159, 271, 159, 278, 425, 418, 780, 278, 779, 230, 159, 230, 275, 276, 395, 798, 233, 798, 233, 778, 276, 276, 276, 276, 276, 276, 214, 233, 233, 233, 352, 777, 776, 775, 214, 159, 408, 214, 214, 241, 774, 773, 682, 159, 351, 214, 214, 683, 276, 276, 276, 276, 276, 276, 276, 276, 772, 230, 233, 230, 233, 771, 276, 276, 276, 276, 276, 276, 214, 233, 770, 233, 277, 354, 277, 769, 214, 768, 233, 214, 233, 767, 766, 765, 230, 764, 230, 214, 214, 241, 276, 276, 276, 276, 276, 276, 214, 763, 762, 277, 360, 277, 279, 280, 761, 373, 284, 230, 374, 230, 280, 280, 280, 280, 280, 280, 278, 233, 375, 233, 760, 358, 759, 397, 758, 757, 756, 214, 755, 754, 241, 241, 753, 454, 230, 214, 230, 752, 280, 280, 280, 280, 280, 280, 282, 282, 456, 751, 230, 230, 230, 230, 282, 283, 282, 284, 282, 282, 750, 285, 749, 748, 286, 287, 286, 747, 285, 746, 745, 744, 241, 743, 742, 741, 285, 230, 230, 230, 230, 740, 282, 282, 282, 282, 282, 282, 350, 739, 230, 286, 230, 286, 216, 216, 738, 737, 351, 736, 241, 735, 216, 216, 216, 216, 216, 216, 241, 734, 733, 732, 230, 366, 230, 731, 730, 230, 230, 230, 230, 274, 729, 274, 728, 727, 230, 726, 230, 725, 216, 216, 216, 216, 216, 216, 233, 724, 233, 230, 723, 230, 722, 456, 721, 230, 214, 230, 274, 350, 274, 720, 719, 230, 214, 230, 718, 286, 241, 286, 358, 280, 280, 717, 716, 715, 714, 713, 712, 280, 280, 280, 280, 280, 280, 711, 230, 710, 230, 286, 709, 286, 708, 454, 286, 707, 286, 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, 280, 280, 280, 280, 280, 280, 230, 696, 230, 286, 695, 286, 694, 693, 692, 691, 690, 689, 688, 394, 489, 489, 687, 686, 685, 684, 681, 680, 489, 489, 489, 489, 489, 489, 679, 678, 677, 676, 675, 674, 673, 672, 671, 670, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 489, 489, 489, 489, 489, 489, 571, 571, 655, 571, 571, 654, 571, 571, 571, 571, 571, 653, 571, 652, 651, 650, 649, 648, 647, 571, 571, 571, 571, 571, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 571, 571, 571, 578, 578, 597, 578, 578, 596, 578, 578, 578, 578, 578, 595, 578, 594, 593, 592, 591, 590, 589, 578, 578, 578, 578, 578, 588, 587, 586, 585, 584, 583, 582, 581, 580, 577, 576, 575, 574, 573, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 578, 578, 578, 571, 571, 535, 571, 571, 534, 571, 571, 571, 571, 571, 533, 571, 532, 531, 530, 529, 528, 527, 571, 571, 571, 571, 571, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 490, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 571, 571, 571, 578, 578, 474, 578, 578, 473, 578, 578, 578, 578, 578, 472, 578, 471, 470, 469, 468, 467, 466, 578, 578, 578, 578, 578, 465, 464, 463, 462, 461, 460, 459, 458, 457, 455, 453, 241, 452, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 424, 423, 422, 421, 420, 419, 417, 416, 415, 414, 578, 578, 578, 14, 14, 14, 14, 14, 14, 157, 157, 157, 157, 157, 157, 159, 159, 159, 159, 214, 214, 214, 214, 274, 274, 278, 413, 278, 278, 281, 412, 281, 281, 281, 281, 572, 411, 572, 572, 572, 572, 579, 410, 579, 579, 579, 579, 571, 409, 571, 571, 571, 571, 578, 407, 578, 578, 578, 578, 406, 405, 404, 403, 402, 401, 400, 399, 398, 396, 278, 393, 392, 391, 390, 389, 388, 387, 384, 383, 382, 381, 379, 378, 377, 376, 372, 371, 370, 369, 368, 367, 365, 362, 361, 359, 357, 356, 355, 353, 798, 798, 214, 349, 348, 347, 345, 344, 343, 342, 341, 338, 337, 336, 335, 332, 331, 330, 329, 328, 324, 323, 322, 321, 320, 319, 317, 314, 313, 312, 309, 308, 159, 158, 307, 306, 305, 298, 297, 296, 295, 294, 798, 273, 272, 270, 265, 256, 255, 239, 237, 225, 798, 218, 217, 164, 158, 156, 211, 210, 209, 207, 201, 191, 190, 173, 159, 166, 165, 164, 158, 156, 798, 13, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798 } ; static const short int yy_chk[1582] = { 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 22, 30, 35, 35, 37, 37, 39, 43, 39, 48, 7, 7, 30, 48, 22, 56, 39, 47, 7, 7, 7, 7, 7, 7, 39, 7, 7, 47, 49, 7, 7, 7, 7, 56, 7, 90, 7, 7, 49, 50, 70, 43, 50, 50, 78, 90, 7, 7, 7, 7, 7, 7, 39, 803, 70, 78, 7, 83, 83, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 20, 20, 41, 42, 208, 41, 61, 208, 20, 20, 20, 20, 20, 20, 85, 85, 111, 42, 44, 97, 40, 44, 795, 112, 44, 114, 111, 112, 114, 114, 52, 177, 40, 52, 52, 41, 20, 20, 20, 20, 20, 20, 31, 31, 176, 52, 42, 794, 113, 52, 31, 31, 31, 31, 31, 31, 40, 44, 113, 61, 31, 139, 31, 101, 150, 101, 88, 89, 88, 89, 89, 139, 97, 176, 150, 177, 88, 89, 31, 31, 31, 31, 31, 31, 88, 89, 94, 31, 94, 31, 101, 102, 101, 102, 137, 137, 94, 31, 68, 68, 101, 793, 791, 150, 94, 137, 68, 68, 68, 68, 68, 68, 104, 138, 94, 140, 142, 789, 102, 138, 102, 788, 142, 138, 152, 140, 107, 140, 102, 152, 104, 104, 104, 184, 68, 68, 68, 68, 68, 68, 79, 79, 787, 104, 107, 103, 107, 107, 79, 79, 79, 79, 79, 79, 103, 79, 103, 104, 79, 104, 79, 197, 79, 103, 103, 103, 182, 197, 182, 637, 79, 107, 103, 107, 637, 184, 79, 79, 79, 79, 79, 79, 786, 119, 148, 79, 202, 79, 202, 151, 103, 247, 103, 247, 148, 79, 87, 87, 785, 151, 141, 119, 105, 119, 87, 87, 87, 87, 87, 87, 141, 87, 148, 141, 87, 87, 87, 784, 87, 261, 105, 282, 105, 87, 105, 261, 87, 105, 119, 151, 119, 282, 87, 87, 87, 87, 87, 87, 266, 783, 266, 87, 396, 87, 100, 100, 106, 105, 396, 105, 284, 108, 100, 100, 100, 100, 100, 100, 106, 116, 284, 782, 116, 116, 106, 149, 106, 108, 118, 108, 108, 108, 106, 108, 116, 149, 781, 170, 116, 170, 100, 100, 100, 100, 100, 100, 118, 191, 118, 780, 191, 106, 224, 106, 224, 779, 108, 299, 108, 149, 191, 283, 778, 777, 170, 118, 170, 299, 318, 311, 776, 283, 775, 118, 170, 118, 122, 122, 283, 224, 226, 224, 226, 774, 122, 122, 122, 122, 122, 122, 226, 227, 228, 227, 228, 773, 772, 771, 226, 311, 299, 227, 228, 241, 770, 769, 655, 318, 227, 227, 228, 655, 122, 122, 122, 122, 122, 122, 127, 127, 768, 241, 233, 241, 233, 767, 127, 127, 127, 127, 127, 127, 233, 234, 766, 234, 127, 234, 127, 765, 233, 764, 238, 234, 238, 759, 758, 756, 241, 755, 241, 234, 238, 244, 127, 127, 127, 127, 127, 127, 238, 754, 753, 127, 244, 127, 129, 129, 752, 256, 288, 244, 256, 244, 129, 129, 129, 129, 129, 129, 288, 352, 256, 352, 751, 238, 749, 288, 748, 747, 746, 352, 745, 743, 366, 240, 742, 352, 244, 352, 244, 741, 129, 129, 129, 129, 129, 129, 136, 136, 366, 740, 366, 240, 366, 240, 136, 136, 136, 136, 136, 136, 739, 136, 738, 737, 136, 136, 136, 735, 136, 733, 732, 731, 243, 730, 729, 728, 136, 366, 240, 366, 240, 727, 136, 136, 136, 136, 136, 136, 240, 726, 243, 136, 243, 136, 215, 215, 724, 723, 243, 722, 249, 720, 215, 215, 215, 215, 215, 215, 271, 719, 718, 717, 215, 249, 215, 716, 715, 243, 249, 243, 249, 393, 714, 393, 713, 712, 271, 710, 271, 709, 215, 215, 215, 215, 215, 215, 354, 708, 354, 215, 707, 215, 706, 354, 705, 249, 354, 249, 393, 215, 393, 704, 703, 271, 354, 271, 702, 489, 360, 489, 271, 279, 279, 701, 700, 699, 698, 697, 696, 279, 279, 279, 279, 279, 279, 695, 360, 694, 360, 279, 693, 279, 692, 360, 489, 691, 489, 690, 684, 683, 682, 681, 680, 679, 678, 676, 674, 279, 279, 279, 279, 279, 279, 360, 672, 360, 279, 670, 279, 669, 668, 667, 666, 665, 663, 662, 279, 394, 394, 661, 660, 658, 657, 652, 651, 394, 394, 394, 394, 394, 394, 650, 649, 648, 647, 645, 644, 643, 641, 640, 639, 634, 632, 631, 630, 628, 627, 624, 623, 620, 619, 618, 617, 394, 394, 394, 394, 394, 394, 496, 496, 616, 496, 496, 614, 496, 496, 496, 496, 496, 611, 496, 610, 609, 608, 607, 606, 605, 496, 496, 496, 496, 496, 603, 602, 601, 600, 597, 596, 595, 594, 593, 592, 589, 586, 585, 584, 583, 582, 581, 577, 576, 575, 574, 570, 569, 567, 566, 565, 564, 562, 561, 560, 559, 558, 557, 556, 555, 553, 552, 548, 547, 545, 544, 543, 542, 541, 539, 538, 537, 536, 535, 496, 496, 496, 506, 506, 534, 506, 506, 533, 506, 506, 506, 506, 506, 531, 506, 530, 529, 528, 527, 526, 525, 506, 506, 506, 506, 506, 524, 523, 521, 520, 516, 515, 514, 511, 509, 505, 503, 502, 500, 499, 495, 492, 491, 490, 488, 487, 486, 485, 484, 483, 481, 480, 479, 478, 477, 475, 474, 472, 471, 470, 468, 467, 466, 464, 462, 461, 460, 459, 458, 456, 455, 453, 452, 451, 450, 506, 506, 506, 572, 572, 449, 572, 572, 448, 572, 572, 572, 572, 572, 447, 572, 446, 445, 444, 442, 441, 440, 572, 572, 572, 572, 572, 439, 438, 436, 434, 433, 431, 430, 429, 427, 426, 425, 424, 422, 420, 419, 417, 416, 415, 414, 413, 412, 411, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 398, 397, 395, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 377, 376, 572, 572, 572, 579, 579, 375, 579, 579, 374, 579, 579, 579, 579, 579, 373, 579, 371, 370, 369, 368, 367, 365, 579, 579, 579, 579, 579, 364, 363, 362, 361, 359, 358, 357, 356, 355, 353, 351, 350, 349, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 329, 328, 327, 326, 325, 323, 322, 321, 320, 319, 317, 316, 315, 314, 313, 312, 310, 307, 306, 305, 579, 579, 579, 799, 799, 799, 799, 799, 799, 800, 800, 800, 800, 800, 800, 801, 801, 801, 801, 802, 802, 802, 802, 804, 804, 805, 304, 805, 805, 806, 303, 806, 806, 806, 806, 807, 302, 807, 807, 807, 807, 808, 301, 808, 808, 808, 808, 809, 300, 809, 809, 809, 809, 810, 298, 810, 810, 810, 810, 297, 296, 295, 294, 293, 292, 291, 290, 289, 287, 280, 275, 273, 272, 270, 269, 268, 267, 265, 264, 263, 262, 260, 259, 258, 257, 255, 254, 253, 252, 251, 250, 248, 246, 245, 239, 237, 236, 235, 231, 221, 220, 216, 211, 210, 209, 207, 206, 205, 204, 203, 201, 200, 199, 198, 196, 195, 194, 193, 192, 190, 189, 188, 187, 186, 185, 183, 181, 180, 178, 175, 171, 161, 157, 155, 154, 153, 147, 146, 145, 144, 143, 134, 121, 120, 117, 115, 110, 109, 95, 91, 84, 80, 76, 74, 73, 67, 66, 59, 58, 57, 53, 51, 46, 45, 36, 32, 28, 26, 25, 19, 18, 13, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, 798 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* 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 char *yytext; # line 1 "./ldlex.l" # line 2 "./ldlex.l" /* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. GLD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GLD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GLD; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This was written by steve chamberlain sac@cygnus.com */ #include <ansidecl.h> #include <stdio.h> #include "bfd.h" #include "sysdep.h" #include "ld.h" #include "ldgram.h" #include "ldmisc.h" #include "ldexp.h" #include "ldlang.h" #include "ldfile.h" #include "ldlex.h" #include "ldmain.h" #define EOF_NOT_SEEN 0 /* The type of top-level parser input. yylex and yyparse (indirectly) both check this. */ input_type parser_input; /* Radix to use for bfd_scan_vma -- 0 (default to base 10) or 16. */ int hex_mode; /* Line number in the current input file. (FIXME Actually, it doesn't appear to get reset for each file?) */ unsigned int lineno = 1; /* Support for flex reading from more than one input file (stream). `include_stack' is flex's input state for each open file; `file_name_stack' is the file names. If `include_stack_ptr' is 0, we haven't started reading anything yet. Otherwise, stack elements 0 through `include_stack_ptr - 1' are valid. */ #undef YY_INPUT #define YY_INPUT(buf,result,max_size) yy_input(buf, &result, max_size) #define MAX_INCLUDE_DEPTH 10 static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; static char *file_name_stack[MAX_INCLUDE_DEPTH]; static unsigned int include_stack_ptr = 0; static YY_BUFFER_STATE yy_create_string_buffer PARAMS ((const char *string, size_t size)); static void yy_input PARAMS ((char *, int *result, int max_size)); static void comment PARAMS ((void)); static void lex_warn_invalid PARAMS ((char *where, char *what)); /* STATES EXPRESSION definitely in an expression SCRIPT definitely in a script BOTH either EXPRESSION or SCRIPT DEFSYMEXP in an argument to -defsym MRI in an MRI script */ #define RTOKEN(x) { yylval.token = x; return x; } /* Some versions of flex want this. */ #ifndef yywrap int yywrap () { return 1; } #endif /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include <stdlib.h> #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #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 (void) fwrite( yytext, yyleng, 1, yyout ) #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->yy_is_interactive ) \ { \ int c = getc( yyin ); \ result = c == EOF ? 0 : 1; \ buf[0] = (char) c; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #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 /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* 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 break; #endif YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; # line 109 "./ldlex.l" if (parser_input != input_selected) { /* The first token of the input determines the initial parser state. */ input_type t = parser_input; parser_input = input_selected; switch (t) { case input_script: return INPUT_SCRIPT; break; case input_mri_script: return INPUT_MRI_SCRIPT; break; case input_defsym: return INPUT_DEFSYM; break; default: abort (); } } if ( yy_init ) { #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 ) yy_init_buffer( yy_current_buffer, yyin ); else yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); yy_init = 0; } while ( 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_match: do { register 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 >= 799 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 1504 ); yy_find_action: 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_USER_ACTION # line 125 "./ldlex.l" { comment(); } YY_BREAK case 2: YY_USER_ACTION # line 128 "./ldlex.l" { RTOKEN('-');} YY_BREAK case 3: YY_USER_ACTION # line 129 "./ldlex.l" { RTOKEN('+');} YY_BREAK case 4: YY_USER_ACTION # line 130 "./ldlex.l" { yylval.name = buystring(yytext); return NAME; } YY_BREAK case 5: YY_USER_ACTION # line 131 "./ldlex.l" { RTOKEN('='); } YY_BREAK case 6: YY_USER_ACTION # line 133 "./ldlex.l" { yylval.integer = bfd_scan_vma (yytext+1, 0,16); return INT; } YY_BREAK case 7: YY_USER_ACTION # line 138 "./ldlex.l" { int ibase ; switch (yytext[yyleng-1]) { case 'X': case 'H': ibase = 16; break; case 'O': ibase = 8; break; case 'B': ibase = 2; break; default: ibase = 10; } yylval.integer = bfd_scan_vma (yytext+1, 0, ibase); return INT; } YY_BREAK case 8: YY_USER_ACTION # line 158 "./ldlex.l" { yylval.integer = bfd_scan_vma (yytext, 0, hex_mode); if (yytext[yyleng-1]=='M' || yytext[yyleng-1] == 'm') { yylval.integer *= 1024*1024; } if (yytext[yyleng-1]=='K' || yytext[yyleng-1]=='k') { yylval.integer *= 1024; } return INT; } YY_BREAK case 9: YY_USER_ACTION # line 171 "./ldlex.l" { RTOKEN(']');} YY_BREAK case 10: YY_USER_ACTION # line 172 "./ldlex.l" { RTOKEN('[');} YY_BREAK case 11: YY_USER_ACTION # line 173 "./ldlex.l" { RTOKEN(LSHIFTEQ);} YY_BREAK case 12: YY_USER_ACTION # line 174 "./ldlex.l" { RTOKEN(RSHIFTEQ);} YY_BREAK case 13: YY_USER_ACTION # line 175 "./ldlex.l" { RTOKEN(OROR);} YY_BREAK case 14: YY_USER_ACTION # line 176 "./ldlex.l" { RTOKEN(EQ);} YY_BREAK case 15: YY_USER_ACTION # line 177 "./ldlex.l" { RTOKEN(NE);} YY_BREAK case 16: YY_USER_ACTION # line 178 "./ldlex.l" { RTOKEN(GE);} YY_BREAK case 17: YY_USER_ACTION # line 179 "./ldlex.l" { RTOKEN(LE);} YY_BREAK case 18: YY_USER_ACTION # line 180 "./ldlex.l" { RTOKEN(LSHIFT);} YY_BREAK case 19: YY_USER_ACTION # line 181 "./ldlex.l" { RTOKEN(RSHIFT);} YY_BREAK case 20: YY_USER_ACTION # line 182 "./ldlex.l" { RTOKEN(PLUSEQ);} YY_BREAK case 21: YY_USER_ACTION # line 183 "./ldlex.l" { RTOKEN(MINUSEQ);} YY_BREAK case 22: YY_USER_ACTION # line 184 "./ldlex.l" { RTOKEN(MULTEQ);} YY_BREAK case 23: YY_USER_ACTION # line 185 "./ldlex.l" { RTOKEN(DIVEQ);} YY_BREAK case 24: YY_USER_ACTION # line 186 "./ldlex.l" { RTOKEN(ANDEQ);} YY_BREAK case 25: YY_USER_ACTION # line 187 "./ldlex.l" { RTOKEN(OREQ);} YY_BREAK case 26: YY_USER_ACTION # line 188 "./ldlex.l" { RTOKEN(ANDAND);} YY_BREAK case 27: YY_USER_ACTION # line 189 "./ldlex.l" { RTOKEN('>');} YY_BREAK case 28: YY_USER_ACTION # line 190 "./ldlex.l" { RTOKEN(',');} YY_BREAK case 29: YY_USER_ACTION # line 191 "./ldlex.l" { RTOKEN('&');} YY_BREAK case 30: YY_USER_ACTION # line 192 "./ldlex.l" { RTOKEN('|');} YY_BREAK case 31: YY_USER_ACTION # line 193 "./ldlex.l" { RTOKEN('~');} YY_BREAK case 32: YY_USER_ACTION # line 194 "./ldlex.l" { RTOKEN('!');} YY_BREAK case 33: YY_USER_ACTION # line 195 "./ldlex.l" { RTOKEN('?');} YY_BREAK case 34: YY_USER_ACTION # line 196 "./ldlex.l" { RTOKEN('*');} YY_BREAK case 35: YY_USER_ACTION # line 197 "./ldlex.l" { RTOKEN('+');} YY_BREAK case 36: YY_USER_ACTION # line 198 "./ldlex.l" { RTOKEN('-');} YY_BREAK case 37: YY_USER_ACTION # line 199 "./ldlex.l" { RTOKEN('/');} YY_BREAK case 38: YY_USER_ACTION # line 200 "./ldlex.l" { RTOKEN('%');} YY_BREAK case 39: YY_USER_ACTION # line 201 "./ldlex.l" { RTOKEN('<');} YY_BREAK case 40: YY_USER_ACTION # line 202 "./ldlex.l" { RTOKEN('=');} YY_BREAK case 41: YY_USER_ACTION # line 203 "./ldlex.l" { RTOKEN('}') ; } YY_BREAK case 42: YY_USER_ACTION # line 204 "./ldlex.l" { RTOKEN('{'); } YY_BREAK case 43: YY_USER_ACTION # line 205 "./ldlex.l" { RTOKEN(')');} YY_BREAK case 44: YY_USER_ACTION # line 206 "./ldlex.l" { RTOKEN('(');} YY_BREAK case 45: YY_USER_ACTION # line 207 "./ldlex.l" { RTOKEN(':'); } YY_BREAK case 46: YY_USER_ACTION # line 208 "./ldlex.l" { RTOKEN(';');} YY_BREAK case 47: YY_USER_ACTION # line 209 "./ldlex.l" { RTOKEN(MEMORY);} YY_BREAK case 48: YY_USER_ACTION # line 210 "./ldlex.l" { RTOKEN(ORIGIN);} YY_BREAK case 49: YY_USER_ACTION # line 211 "./ldlex.l" { RTOKEN(BLOCK);} YY_BREAK case 50: YY_USER_ACTION # line 212 "./ldlex.l" { RTOKEN(LENGTH);} YY_BREAK case 51: YY_USER_ACTION # line 213 "./ldlex.l" { RTOKEN(ALIGN_K);} YY_BREAK case 52: YY_USER_ACTION # line 214 "./ldlex.l" { RTOKEN(ADDR);} YY_BREAK case 53: YY_USER_ACTION # line 215 "./ldlex.l" { RTOKEN(ENTRY);} YY_BREAK case 54: YY_USER_ACTION # line 216 "./ldlex.l" { RTOKEN(NEXT);} YY_BREAK case 55: YY_USER_ACTION # line 217 "./ldlex.l" { RTOKEN(SIZEOF_HEADERS);} YY_BREAK case 56: YY_USER_ACTION # line 218 "./ldlex.l" { RTOKEN(SIZEOF_HEADERS);} YY_BREAK case 57: YY_USER_ACTION # line 219 "./ldlex.l" { RTOKEN(MAP);} YY_BREAK case 58: YY_USER_ACTION # line 220 "./ldlex.l" { RTOKEN(SIZEOF);} YY_BREAK case 59: YY_USER_ACTION # line 221 "./ldlex.l" { RTOKEN(TARGET_K);} YY_BREAK case 60: YY_USER_ACTION # line 222 "./ldlex.l" { RTOKEN(SEARCH_DIR);} YY_BREAK case 61: YY_USER_ACTION # line 223 "./ldlex.l" { RTOKEN(OUTPUT);} YY_BREAK case 62: YY_USER_ACTION # line 224 "./ldlex.l" { RTOKEN(INPUT);} YY_BREAK case 63: YY_USER_ACTION # line 225 "./ldlex.l" { RTOKEN(DEFINED);} YY_BREAK case 64: YY_USER_ACTION # line 226 "./ldlex.l" { RTOKEN(CREATE_OBJECT_SYMBOLS);} YY_BREAK case 65: YY_USER_ACTION # line 227 "./ldlex.l" { RTOKEN( CONSTRUCTORS);} YY_BREAK case 66: YY_USER_ACTION # line 228 "./ldlex.l" { RTOKEN(FORCE_COMMON_ALLOCATION);} YY_BREAK case 67: YY_USER_ACTION # line 229 "./ldlex.l" { RTOKEN(SECTIONS);} YY_BREAK case 68: YY_USER_ACTION # line 230 "./ldlex.l" { RTOKEN(FILL);} YY_BREAK case 69: YY_USER_ACTION # line 231 "./ldlex.l" { RTOKEN(STARTUP);} YY_BREAK case 70: YY_USER_ACTION # line 232 "./ldlex.l" { RTOKEN(OUTPUT_FORMAT);} YY_BREAK case 71: YY_USER_ACTION # line 233 "./ldlex.l" { RTOKEN( OUTPUT_ARCH);} YY_BREAK case 72: YY_USER_ACTION # line 234 "./ldlex.l" { RTOKEN(HLL);} YY_BREAK case 73: YY_USER_ACTION # line 235 "./ldlex.l" { RTOKEN(SYSLIB);} YY_BREAK case 74: YY_USER_ACTION # line 236 "./ldlex.l" { RTOKEN(FLOAT);} YY_BREAK case 75: YY_USER_ACTION # line 237 "./ldlex.l" { RTOKEN( QUAD);} YY_BREAK case 76: YY_USER_ACTION # line 238 "./ldlex.l" { RTOKEN( LONG);} YY_BREAK case 77: YY_USER_ACTION # line 239 "./ldlex.l" { RTOKEN( SHORT);} YY_BREAK case 78: YY_USER_ACTION # line 240 "./ldlex.l" { RTOKEN( BYTE);} YY_BREAK case 79: YY_USER_ACTION # line 241 "./ldlex.l" { RTOKEN(NOFLOAT);} YY_BREAK case 80: YY_USER_ACTION # line 242 "./ldlex.l" { RTOKEN(NOLOAD);} YY_BREAK case 81: YY_USER_ACTION # line 243 "./ldlex.l" { RTOKEN(DSECT);} YY_BREAK case 82: YY_USER_ACTION # line 244 "./ldlex.l" { RTOKEN(COPY);} YY_BREAK case 83: YY_USER_ACTION # line 245 "./ldlex.l" { RTOKEN(INFO);} YY_BREAK case 84: YY_USER_ACTION # line 246 "./ldlex.l" { RTOKEN(OVERLAY);} YY_BREAK case 85: YY_USER_ACTION # line 247 "./ldlex.l" { RTOKEN(ORIGIN);} YY_BREAK case 86: YY_USER_ACTION # line 248 "./ldlex.l" { RTOKEN(ORIGIN);} YY_BREAK case 87: YY_USER_ACTION # line 249 "./ldlex.l" { RTOKEN( LENGTH);} YY_BREAK case 88: YY_USER_ACTION # line 250 "./ldlex.l" { RTOKEN( LENGTH);} YY_BREAK case 89: YY_USER_ACTION # line 251 "./ldlex.l" { RTOKEN(INCLUDE);} YY_BREAK case 90: YY_USER_ACTION # line 252 "./ldlex.l" { RTOKEN(AT);} YY_BREAK case 91: YY_USER_ACTION # line 253 "./ldlex.l" { ++ lineno; RTOKEN(NEWLINE); } YY_BREAK case 92: YY_USER_ACTION # line 254 "./ldlex.l" { /* Mri comment line */ } YY_BREAK case 93: YY_USER_ACTION # line 255 "./ldlex.l" { RTOKEN(ENDWORD); } YY_BREAK case 94: YY_USER_ACTION # line 256 "./ldlex.l" { RTOKEN(ALIGNMOD);} YY_BREAK case 95: YY_USER_ACTION # line 257 "./ldlex.l" { RTOKEN(ALIGN_K);} YY_BREAK case 96: YY_USER_ACTION # line 259 "./ldlex.l" { RTOKEN(CHIP); } YY_BREAK case 97: YY_USER_ACTION # line 260 "./ldlex.l" { RTOKEN(BASE); } YY_BREAK case 98: YY_USER_ACTION # line 261 "./ldlex.l" { RTOKEN(ALIAS); } YY_BREAK case 99: YY_USER_ACTION # line 262 "./ldlex.l" { RTOKEN(TRUNCATE); } YY_BREAK case 100: YY_USER_ACTION # line 263 "./ldlex.l" { RTOKEN(LOAD); } YY_BREAK case 101: YY_USER_ACTION # line 264 "./ldlex.l" { RTOKEN(PUBLIC); } YY_BREAK case 102: YY_USER_ACTION # line 265 "./ldlex.l" { RTOKEN(ORDER); } YY_BREAK case 103: YY_USER_ACTION # line 266 "./ldlex.l" { RTOKEN(NAMEWORD); } YY_BREAK case 104: YY_USER_ACTION # line 267 "./ldlex.l" { RTOKEN(FORMAT); } YY_BREAK case 105: YY_USER_ACTION # line 268 "./ldlex.l" { RTOKEN(LIST); /* LIST and ignore to end of line */ } YY_BREAK case 106: YY_USER_ACTION # line 269 "./ldlex.l" { RTOKEN(SECT); } YY_BREAK case 107: YY_USER_ACTION # line 270 "./ldlex.l" { RTOKEN(ABSOLUTE); } YY_BREAK case 108: YY_USER_ACTION # line 271 "./ldlex.l" { RTOKEN(ENDWORD); } YY_BREAK case 109: YY_USER_ACTION # line 272 "./ldlex.l" { RTOKEN(CHIP); } YY_BREAK case 110: YY_USER_ACTION # line 273 "./ldlex.l" { RTOKEN(LOAD); } YY_BREAK case 111: YY_USER_ACTION # line 274 "./ldlex.l" { RTOKEN(ORDER); } YY_BREAK case 112: YY_USER_ACTION # line 275 "./ldlex.l" { RTOKEN(NAMEWORD); } YY_BREAK case 113: YY_USER_ACTION # line 276 "./ldlex.l" { RTOKEN(FORMAT); } YY_BREAK case 114: YY_USER_ACTION # line 277 "./ldlex.l" { RTOKEN(LIST); /* LIST and ignore to end of line */ } YY_BREAK case 115: YY_USER_ACTION # line 278 "./ldlex.l" { RTOKEN(SECT); } YY_BREAK case 116: YY_USER_ACTION # line 279 "./ldlex.l" { RTOKEN(ABSOLUTE); } YY_BREAK case 117: YY_USER_ACTION # line 281 "./ldlex.l" { /* Filename without commas, needed to parse mri stuff */ yylval.name = buystring(yytext); return NAME; } YY_BREAK case 118: YY_USER_ACTION # line 288 "./ldlex.l" { yylval.name = buystring(yytext); return NAME; } YY_BREAK case 119: YY_USER_ACTION # line 292 "./ldlex.l" { yylval.name = buystring(yytext); return NAME; } YY_BREAK case 120: YY_USER_ACTION # line 296 "./ldlex.l" { /* No matter the state, quotes give what's inside */ yylval.name = buystring(yytext+1); yylval.name[yyleng-2] = 0; return NAME; } YY_BREAK case 121: YY_USER_ACTION # line 303 "./ldlex.l" { lineno++;} YY_BREAK case 122: YY_USER_ACTION # line 304 "./ldlex.l" YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(SCRIPT): case YY_STATE_EOF(EXPRESSION): case YY_STATE_EOF(BOTH): case YY_STATE_EOF(DEFSYMEXP): case YY_STATE_EOF(MRI): # line 306 "./ldlex.l" { include_stack_ptr--; if (include_stack_ptr == 0) { yyterminate(); } else { yy_switch_to_buffer(include_stack[include_stack_ptr]); } BEGIN(SCRIPT); ldfile_input_filename = file_name_stack[include_stack_ptr-1]; return END; } YY_BREAK case 123: YY_USER_ACTION # line 324 "./ldlex.l" lex_warn_invalid(" in script", yytext); YY_BREAK case 124: YY_USER_ACTION # line 325 "./ldlex.l" lex_warn_invalid(" in expression", yytext); YY_BREAK case 125: YY_USER_ACTION # line 327 "./ldlex.l" ECHO; YY_BREAK case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new 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 new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->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->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->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 yylex */ /* yy_get_next_buffer - try to read in a new 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() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr - 1; /* copy prev. char, too */ register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->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 singled characater, 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_c_buf_p - yytext_ptr; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->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_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf; b->yy_buf_size *= 2; b->yy_ch_buf = (char *) yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size ); 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->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); } if ( yy_n_chars == 0 ) { if ( number_to_move - YY_MORE_ADJ == 1 ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; /* yytext begins at the second character in yy_ch_buf; the first * character is the one which preceded it before reading in the latest * buffer; it needs to be kept around in case it's a newline, so * yy_get_previous_state() will have with '^' rules active. */ yytext_ptr = &yy_current_buffer->yy_ch_buf[1]; 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() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register 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 >= 799 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) 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 ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register 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 >= 799 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 798); return yy_is_jam ? 0 : yy_current_state; } #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += dest - source; yy_bp += dest - source; yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) yy_cp[-2] = '\n'; *--yy_cp = (char) c; /* Note: the formal parameter *must* be called "yy_bp" for this * macro to now work correctly. */ YY_DO_BEFORE_ACTION; /* set up yytext again */ } #ifdef __cplusplus static int yyinput() #else static int input() #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->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ yytext_ptr = yy_c_buf_p; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { if ( yywrap() ) { yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; return EOF; } YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; break; case EOB_ACT_LAST_MATCH: #ifdef __cplusplus YY_FATAL_ERROR( "unexpected last match in yyinput()" ); #else YY_FATAL_ERROR( "unexpected last match in input()" ); #endif } } } 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; return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { 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->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = 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; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( 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 *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { b->yy_input_file = file; /* We put in the '\n' and start reading from [1] so that an * initial match-at-newline will be true. */ b->yy_ch_buf[0] = '\n'; b->yy_n_chars = 1; /* 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[1] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[1]; b->yy_is_interactive = file ? isatty( fileno(file) ) : 0; b->yy_fill_buffer = 1; b->yy_buffer_status = YY_BUFFER_NEW; } #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { int new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #ifdef YY_USE_PROTOS static void yy_fatal_error( const char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( 1 ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, const char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; const char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( unsigned int size ) #else static void *yy_flex_alloc( size ) unsigned int size; #endif { return (void *) xmalloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, unsigned int size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; unsigned int size; #endif { return (void *) realloc( ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } # line 327 "./ldlex.l" /* Switch flex to reading script file NAME, open on FILE, saving the current input info on the include stack. */ void lex_push_file (file, name) FILE *file; char *name; { if (include_stack_ptr >= MAX_INCLUDE_DEPTH) { einfo("%F:includes nested too deeply\n"); } file_name_stack[include_stack_ptr] = name; include_stack[include_stack_ptr] = YY_CURRENT_BUFFER; include_stack_ptr++; yyin = file; yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); BEGIN (SCRIPT); } /* Return a newly created flex input buffer containing STRING, which is SIZE bytes long. */ static YY_BUFFER_STATE yy_create_string_buffer (string, size) CONST char *string; size_t size; { YY_BUFFER_STATE b; /* Calls to m-alloc get turned by sed into xm-alloc. */ b = (YY_BUFFER_STATE) xmalloc (sizeof (struct yy_buffer_state)); b->yy_input_file = 0; 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 = (YY_CHAR *) xmalloc ((unsigned) (b->yy_buf_size + 3)); b->yy_ch_buf[0] = '\n'; strcpy (b->yy_ch_buf+1, string); b->yy_ch_buf[size+1] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[size+2] = YY_END_OF_BUFFER_CHAR; b->yy_n_chars = size+1; b->yy_buf_pos = &b->yy_ch_buf[1]; /* b->yy_eof_status = EOF_NOT_SEEN; */ return b; } /* Switch flex to reading from STRING, saving the current input info on the include stack. */ void lex_redirect (string) CONST char *string; { YY_BUFFER_STATE tmp; yy_init = 0; if (include_stack_ptr >= MAX_INCLUDE_DEPTH) { einfo("%F: macros nested too deeply\n"); } file_name_stack[include_stack_ptr] = "redirect"; include_stack[include_stack_ptr] = YY_CURRENT_BUFFER; include_stack_ptr++; tmp = yy_create_string_buffer (string, strlen (string)); yy_switch_to_buffer (tmp); BEGIN (SCRIPT); } /* Functions to switch to a different flex start condition, saving the current start condition on `state_stack'. */ static int state_stack[MAX_INCLUDE_DEPTH * 2]; static int *state_stack_p = state_stack; void ldlex_script () { *(state_stack_p)++ = yy_start; BEGIN (SCRIPT); } void ldlex_mri_script () { *(state_stack_p)++ = yy_start; BEGIN (MRI); } void ldlex_defsym () { *(state_stack_p)++ = yy_start; BEGIN (DEFSYMEXP); } void ldlex_expression () { *(state_stack_p)++ = yy_start; BEGIN (EXPRESSION); } void ldlex_both () { *(state_stack_p)++ = yy_start; BEGIN (BOTH); } void ldlex_popstate () { yy_start = *(--state_stack_p); } /* Place up to MAX_SIZE characters in BUF and return in *RESULT either the number of characters read, or 0 to indicate EOF. */ static void yy_input (buf, result, max_size) char *buf; int *result; int max_size; { *result = 0; if (yy_current_buffer->yy_input_file) { if (yyin) { *result = read (fileno (yyin), (char *) buf, max_size); if (*result < 0) einfo ("%F%P: read in flex scanner failed"); } } } /* Eat the rest of a C-style comment. */ static void comment () { int c; while (1) { c = input(); while (c != '*' && c != EOF) { if (c == '\n') lineno++; c = input(); } if (c == '*') { c = input(); while (c == '*') c = input(); if (c == '/') break; /* found the end */ } if (c == '\n') lineno++; if (c == EOF) { einfo( "%F%P: EOF in comment\n"); break; } } } /* Warn the user about a garbage character WHAT in the input in context WHERE. */ static void lex_warn_invalid (where, what) char *where, *what; { fprintf(stderr, "%s: ignoring invalid character `%s'%s\n", program_name, what, where); }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.