1 /* A lexical scanner generated by flex */ 2 3 /* Scanner skeleton version: 4 * $Header: /home/ncvs/src/usr.bin/lex/initscan.c,v 1.1.1.1 1994/08/24 13:10:32 csgr Exp $ 5 */ 6 7 #define FLEX_SCANNER 8 9 #include <stdio.h> 10 11 12 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 13 #ifdef c_plusplus 14 #ifndef __cplusplus 15 #define __cplusplus 16 #endif 17 #endif 18 19 20 #ifdef __cplusplus 21 22 #include <stdlib.h> 23 #include <unistd.h> 24 25 /* Use prototypes in function declarations. */ 26 #define YY_USE_PROTOS 27 28 /* The "const" storage-class-modifier is valid. */ 29 #define YY_USE_CONST 30 31 #else /* ! __cplusplus */ 32 33 #ifdef __STDC__ 34 35 #define YY_USE_PROTOS 36 #define YY_USE_CONST 37 38 #endif /* __STDC__ */ 39 #endif /* ! __cplusplus */ 40 41 42 #ifdef __TURBOC__ 43 #define YY_USE_CONST 44 #endif 45 46 47 #ifndef YY_USE_CONST 48 #ifndef const 49 #define const 50 #endif 51 #endif 52 53 54 #ifdef YY_USE_PROTOS 55 #define YY_PROTO(proto) proto 56 #else 57 #define YY_PROTO(proto) () 58 #endif 59 60 /* Returned upon end-of-file. */ 61 #define YY_NULL 0 62 63 /* Promotes a possibly negative, possibly signed char to an unsigned 64 * integer for use as an array index. If the signed char is negative, 65 * we want to instead treat it as an 8-bit unsigned char, hence the 66 * double cast. 67 */ 68 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 69 70 /* Enter a start condition. This macro really ought to take a parameter, 71 * but we do it the disgusting crufty way forced on us by the ()-less 72 * definition of BEGIN. 73 */ 74 #define BEGIN yy_start = 1 + 2 * 75 76 /* Translate the current start state into a value that can be later handed 77 * to BEGIN to return to the state. 78 */ 79 #define YY_START ((yy_start - 1) / 2) 80 81 /* Action number for EOF rule of a given start state. */ 82 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 83 84 /* Special action meaning "start processing a new file". Now included 85 * only for backward compatibility with previous versions of flex. 86 */ 87 #define YY_NEW_FILE yyrestart( yyin ) 88 89 #define YY_END_OF_BUFFER_CHAR 0 90 91 /* Size of default input buffer. */ 92 #define YY_BUF_SIZE 16384 93 94 typedef struct yy_buffer_state *YY_BUFFER_STATE; 95 96 extern int yyleng; 97 extern FILE *yyin, *yyout; 98 99 #ifdef __cplusplus 100 extern "C" { 101 #endif 102 extern int yywrap YY_PROTO(( void )); 103 #ifdef __cplusplus 104 } 105 #endif 106 107 #define EOB_ACT_CONTINUE_SCAN 0 108 #define EOB_ACT_END_OF_FILE 1 109 #define EOB_ACT_LAST_MATCH 2 110 111 /* The funky do-while in the following #define is used to turn the definition 112 * int a single C statement (which needs a semi-colon terminator). This 113 * avoids problems with code like: 114 * 115 * if ( condition_holds ) 116 * yyless( 5 ); 117 * else 118 * do_something_else(); 119 * 120 * Prior to using the do-while the compiler would get upset at the 121 * "else" because it interpreted the "if" statement as being all 122 * done when it reached the ';' after the yyless() call. 123 */ 124 125 /* Return all but the first 'n' matched characters back to the input stream. */ 126 127 #define yyless(n) \ 128 do \ 129 { \ 130 /* Undo effects of setting up yytext. */ \ 131 *yy_cp = yy_hold_char; \ 132 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 133 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 134 } \ 135 while ( 0 ) 136 137 #define unput(c) yyunput( c, yytext_ptr ) 138 139 140 struct yy_buffer_state 141 { 142 FILE *yy_input_file; 143 144 char *yy_ch_buf; /* input buffer */ 145 char *yy_buf_pos; /* current position in input buffer */ 146 147 /* Size of input buffer in bytes, not including room for EOB 148 * characters. 149 */ 150 int yy_buf_size; 151 152 /* Number of characters read into yy_ch_buf, not including EOB 153 * characters. 154 */ 155 int yy_n_chars; 156 157 /* Whether this is an "interactive" input source; if so, and 158 * if we're using stdio for input, then we want to use getc() 159 * instead of fread(), to make sure we stop fetching input after 160 * each newline. 161 */ 162 int yy_is_interactive; 163 164 /* Whether to try to fill the input buffer when we reach the 165 * end of it. 166 */ 167 int yy_fill_buffer; 168 169 int yy_buffer_status; 170 #define YY_BUFFER_NEW 0 171 #define YY_BUFFER_NORMAL 1 172 /* When an EOF's been seen but there's still some text to process 173 * then we mark the buffer as YY_EOF_PENDING, to indicate that we 174 * shouldn't try reading from the input source any more. We might 175 * still have a bunch of tokens to match, though, because of 176 * possible backing-up. 177 * 178 * When we actually see the EOF, we change the status to "new" 179 * (via yyrestart()), so that the user can continue scanning by 180 * just pointing yyin at a new input file. 181 */ 182 #define YY_BUFFER_EOF_PENDING 2 183 }; 184 185 static YY_BUFFER_STATE yy_current_buffer = 0; 186 187 /* We provide macros for accessing buffer states in case in the 188 * future we want to put the buffer states in a more general 189 * "scanner state". 190 */ 191 #define YY_CURRENT_BUFFER yy_current_buffer 192 193 194 /* yy_hold_char holds the character lost when yytext is formed. */ 195 static char yy_hold_char; 196 197 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 198 199 200 int yyleng; 201 202 /* Points to current character in buffer. */ 203 static char *yy_c_buf_p = (char *) 0; 204 static int yy_init = 1; /* whether we need to initialize */ 205 static int yy_start = 0; /* start state number */ 206 207 /* Flag which is used to allow yywrap()'s to do buffer switches 208 * instead of setting up a fresh yyin. A bit of a hack ... 209 */ 210 static int yy_did_buffer_switch_on_eof; 211 212 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 213 void yyrestart YY_PROTO(( FILE *input_file )); 214 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 215 void yy_load_buffer_state YY_PROTO(( void )); 216 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 217 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 218 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 219 220 static int yy_start_stack_ptr = 0; 221 static int yy_start_stack_depth = 0; 222 static int *yy_start_stack = 0; 223 static void yy_push_state YY_PROTO(( int new_state )); 224 static void yy_pop_state YY_PROTO(( void )); 225 static int yy_top_state YY_PROTO(( void )); 226 227 static void *yy_flex_alloc YY_PROTO(( unsigned int )); 228 static void *yy_flex_realloc YY_PROTO(( void *, unsigned int )); 229 static void yy_flex_free YY_PROTO(( void * )); 230 231 #define yy_new_buffer yy_create_buffer 232 233 #define INITIAL 0 234 #define SECT2 1 235 #define SECT2PROLOG 2 236 #define SECT3 3 237 #define CODEBLOCK 4 238 #define PICKUPDEF 5 239 #define SC 6 240 #define CARETISBOL 7 241 #define NUM 8 242 #define QUOTE 9 243 #define FIRSTCCL 10 244 #define CCL 11 245 #define ACTION 12 246 #define RECOVER 13 247 #define BRACEERROR 14 248 #define C_COMMENT 15 249 #define ACTION_COMMENT 16 250 #define ACTION_STRING 17 251 #define PERCENT_BRACE_ACTION 18 252 #define USED_LIST 19 253 #define CODEBLOCK_2 20 254 typedef unsigned char YY_CHAR; 255 typedef int yy_state_type; 256 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 257 extern char *yytext; 258 #define yytext_ptr yytext 259 260 #ifndef yytext_ptr 261 static void yy_flex_strncpy YY_PROTO(( char *, const char *, int )); 262 #endif 263 264 #ifdef __cplusplus 265 static int yyinput YY_PROTO(( void )); 266 #else 267 static int input YY_PROTO(( void )); 268 #endif 269 270 static yy_state_type yy_get_previous_state YY_PROTO(( void )); 271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 272 static int yy_get_next_buffer YY_PROTO(( void )); 273 static void yy_fatal_error YY_PROTO(( const char msg[] )); 274 275 /* Done after the current pattern has been matched and before the 276 * corresponding action - sets up yytext. 277 */ 278 #define YY_DO_BEFORE_ACTION \ 279 yytext_ptr = yy_bp; \ 280 yyleng = yy_cp - yy_bp; \ 281 yy_hold_char = *yy_cp; \ 282 *yy_cp = '\0'; \ 283 yy_c_buf_p = yy_cp; 284 285 #define YY_END_OF_BUFFER 113 286 static const short int yy_accept[408] = 287 { 0, 288 0, 0, 0, 0, 41, 41, 110, 110, 0, 0, 289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 292 0, 0, 113, 111, 6, 17, 111, 15, 1, 16, 293 111, 111, 111, 14, 60, 53, 54, 60, 47, 60, 294 59, 60, 60, 60, 60, 44, 43, 60, 60, 45, 295 46, 41, 42, 41, 40, 39, 40, 40, 110, 110, 296 26, 27, 26, 26, 26, 26, 26, 26, 29, 28, 297 30, 29, 65, 61, 62, 64, 66, 80, 81, 80, 298 299 78, 77, 79, 67, 69, 67, 68, 67, 72, 72, 300 72, 74, 76, 74, 74, 74, 75, 92, 97, 92, 301 96, 98, 98, 93, 93, 93, 90, 91, 111, 31, 302 111, 83, 111, 82, 20, 22, 20, 21, 101, 102, 303 101, 100, 103, 105, 103, 106, 107, 88, 88, 89, 304 88, 88, 88, 88, 88, 88, 36, 33, 32, 36, 305 36, 36, 88, 6, 17, 0, 17, 15, 1, 16, 306 0, 16, 13, 7, 0, 0, 0, 3, 0, 4, 307 0, 2, 14, 53, 54, 0, 0, 0, 54, 50, 308 50, 0, 0, 57, 0, 108, 108, 108, 49, 48, 309 310 49, 44, 43, 0, 43, 56, 44, 41, 42, 40, 311 39, 39, 37, 38, 110, 110, 26, 27, 26, 26, 312 26, 26, 29, 28, 30, 63, 64, 81, 77, 69, 313 109, 109, 109, 70, 71, 76, 73, 92, 97, 0, 314 95, 0, 94, 93, 93, 93, 0, 31, 0, 31, 315 31, 83, 20, 22, 18, 101, 102, 101, 102, 102, 316 99, 103, 105, 104, 88, 88, 88, 89, 85, 88, 317 88, 88, 36, 33, 32, 36, 36, 84, 13, 7, 318 0, 12, 0, 0, 0, 0, 3, 0, 0, 4, 319 0, 5, 0, 51, 0, 52, 0, 0, 57, 0, 320 321 57, 57, 108, 108, 49, 49, 58, 56, 37, 38, 322 26, 26, 26, 23, 26, 0, 109, 109, 93, 93, 323 0, 19, 0, 85, 85, 88, 88, 36, 36, 12, 324 0, 0, 0, 3, 0, 0, 4, 5, 5, 52, 325 52, 0, 57, 57, 57, 57, 108, 26, 26, 23, 326 23, 0, 109, 93, 93, 19, 19, 88, 88, 36, 327 36, 0, 0, 0, 10, 0, 57, 57, 57, 57, 328 26, 26, 93, 93, 88, 88, 36, 36, 0, 0, 329 0, 0, 57, 57, 24, 25, 86, 87, 86, 87, 330 34, 35, 0, 9, 0, 0, 11, 55, 9, 9, 331 332 0, 0, 8, 0, 8, 8, 0 333 } ; 334 335 static const int yy_ec[256] = 336 { 0, 337 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 338 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 340 1, 2, 1, 5, 1, 6, 7, 1, 8, 9, 341 9, 10, 9, 11, 12, 9, 13, 14, 14, 14, 342 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, 343 1, 16, 9, 1, 22, 23, 24, 25, 26, 27, 344 21, 21, 28, 29, 30, 21, 31, 32, 33, 34, 345 21, 35, 36, 37, 38, 21, 21, 39, 40, 21, 346 17, 18, 19, 20, 21, 1, 22, 23, 24, 25, 347 348 26, 27, 21, 21, 28, 29, 30, 21, 31, 32, 349 33, 34, 21, 35, 36, 37, 38, 21, 21, 39, 350 40, 21, 41, 42, 43, 1, 1, 1, 1, 1, 351 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 352 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 353 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 354 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 355 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 356 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 358 359 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 360 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 361 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 362 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 364 1, 1, 1, 1, 1 365 } ; 366 367 static const int yy_meta[44] = 368 { 0, 369 1, 2, 3, 1, 4, 1, 1, 5, 1, 6, 370 1, 7, 5, 8, 1, 1, 1, 9, 10, 1, 371 11, 12, 12, 12, 12, 12, 12, 11, 11, 11, 372 11, 11, 11, 11, 11, 11, 13, 11, 11, 11, 373 5, 1, 14 374 } ; 375 376 static const short int yy_base[470] = 377 { 0, 378 0, 43, 85, 126, 89, 102, 1611, 1610, 168, 1605, 379 108, 111, 211, 0, 1591, 1590, 252, 254, 116, 119, 380 98, 122, 144, 146, 297, 0, 93, 104, 338, 340, 381 149, 151, 257, 266, 268, 274, 383, 0, 425, 428, 382 1596, 1595, 1607, 1615, 278, 1602, 1602, 0, 281, 1600, 383 1600, 462, 1592, 0, 1615, 431, 1597, 1597, 1615, 285, 384 1615, 1584, 1580, 331, 503, 437, 1593, 1593, 110, 1580, 385 1615, 0, 1590, 1590, 0, 1590, 1588, 221, 1587, 1615, 386 0, 1585, 1585, 1615, 0, 1561, 1546, 1511, 0, 1551, 387 1543, 1543, 1615, 1615, 1498, 0, 1615, 1615, 1500, 1487, 388 389 1615, 1463, 1615, 1615, 1466, 1460, 1615, 332, 1615, 333, 390 126, 1615, 1411, 1398, 0, 334, 1615, 0, 1383, 1383, 391 1615, 341, 1371, 0, 1354, 1336, 1615, 1615, 271, 1371, 392 287, 1370, 1366, 1615, 0, 1362, 1349, 1331, 290, 1335, 393 347, 1325, 0, 1323, 1310, 1615, 0, 0, 350, 1306, 394 1287, 1246, 1615, 0, 1249, 1227, 0, 1264, 1261, 1255, 395 1225, 1197, 1213, 351, 1213, 1213, 1615, 0, 358, 1198, 396 1193, 1615, 0, 0, 443, 361, 447, 0, 342, 0, 397 363, 1615, 0, 451, 1191, 1188, 1149, 365, 1615, 1615, 398 1185, 1181, 1155, 1135, 423, 1615, 1125, 0, 0, 1615, 399 400 546, 588, 1121, 1108, 1615, 0, 1615, 0, 1615, 0, 401 0, 1095, 0, 0, 1088, 1615, 0, 1615, 0, 1061, 402 1041, 630, 0, 1069, 1615, 1615, 0, 1615, 838, 1615, 403 1615, 837, 0, 1615, 1615, 1615, 1615, 0, 1615, 434, 404 1615, 0, 1615, 0, 821, 817, 373, 843, 376, 1615, 405 842, 1615, 0, 1615, 463, 467, 834, 471, 1615, 833, 406 1615, 0, 1615, 1615, 0, 441, 793, 1615, 673, 0, 407 805, 802, 0, 830, 1615, 795, 792, 1615, 0, 0, 408 594, 818, 817, 597, 784, 790, 0, 775, 786, 0, 409 473, 807, 478, 1615, 486, 806, 590, 776, 790, 588, 410 411 469, 703, 793, 0, 0, 0, 1615, 0, 0, 0, 412 780, 772, 0, 800, 800, 730, 788, 0, 775, 767, 413 600, 795, 602, 0, 773, 772, 764, 770, 762, 1615, 414 610, 772, 751, 0, 740, 745, 0, 1615, 765, 1615, 415 764, 740, 488, 803, 601, 817, 1615, 742, 730, 1615, 416 760, 760, 1615, 738, 726, 1615, 756, 735, 723, 733, 417 721, 714, 716, 726, 1615, 724, 602, 831, 715, 658, 418 512, 473, 454, 459, 435, 438, 422, 430, 606, 410, 419 357, 342, 338, 278, 0, 0, 0, 0, 0, 0, 420 0, 0, 614, 255, 618, 131, 1615, 1615, 1615, 156, 421 422 620, 622, 153, 625, 1615, 95, 1615, 858, 872, 886, 423 900, 914, 928, 942, 956, 970, 984, 998, 1012, 1026, 424 1040, 1054, 1062, 1075, 1081, 1094, 1108, 1122, 1136, 1150, 425 1164, 1178, 1186, 1199, 1207, 1220, 1234, 1248, 1262, 1272, 426 1280, 1293, 1307, 1321, 1335, 1349, 1363, 1371, 1384, 1398, 427 1412, 1416, 1419, 1432, 1446, 1460, 710, 1474, 1487, 1501, 428 1515, 711, 1529, 1537, 1544, 712, 743, 1557, 1571 429 } ; 430 431 static const short int yy_def[470] = 432 { 0, 433 407, 407, 408, 408, 409, 410, 411, 411, 407, 9, 434 412, 412, 407, 13, 413, 413, 414, 414, 415, 415, 435 416, 416, 417, 417, 407, 25, 418, 418, 413, 413, 436 419, 419, 420, 420, 421, 421, 407, 37, 422, 422, 437 37, 37, 407, 407, 407, 407, 407, 423, 407, 407, 438 407, 424, 407, 425, 407, 407, 407, 407, 407, 407, 439 407, 407, 426, 427, 407, 407, 407, 407, 407, 407, 440 407, 428, 407, 428, 429, 430, 429, 429, 431, 407, 441 432, 407, 432, 407, 433, 433, 433, 432, 434, 407, 442 407, 434, 407, 407, 407, 435, 407, 407, 407, 407, 443 444 407, 407, 407, 407, 407, 407, 407, 427, 407, 436, 445 437, 407, 407, 407, 438, 427, 407, 439, 407, 439, 446 407, 440, 407, 441, 441, 441, 407, 407, 442, 407, 447 442, 407, 407, 407, 443, 407, 443, 407, 444, 407, 448 444, 407, 445, 407, 445, 407, 446, 447, 447, 407, 449 447, 447, 407, 448, 448, 448, 449, 407, 407, 449, 450 449, 449, 447, 407, 407, 407, 407, 423, 407, 407, 451 407, 407, 450, 451, 407, 407, 407, 452, 407, 453, 452 454, 407, 425, 407, 407, 407, 407, 455, 407, 407, 453 407, 407, 407, 456, 426, 407, 407, 457, 458, 407, 454 455 407, 407, 407, 407, 407, 459, 407, 428, 407, 429, 456 430, 430, 460, 461, 431, 407, 432, 407, 433, 433, 457 433, 407, 434, 407, 407, 407, 435, 407, 407, 407, 458 407, 407, 462, 407, 407, 407, 407, 439, 407, 440, 459 407, 440, 407, 441, 441, 441, 442, 407, 442, 407, 460 407, 407, 443, 407, 463, 444, 407, 444, 407, 407, 461 407, 445, 407, 407, 447, 447, 447, 407, 407, 448, 462 448, 448, 449, 407, 407, 449, 449, 407, 450, 451, 463 407, 407, 407, 407, 407, 407, 464, 407, 407, 465, 464 454, 407, 454, 407, 455, 407, 455, 407, 456, 456, 465 466 456, 456, 407, 466, 458, 201, 407, 459, 460, 461, 467 433, 433, 222, 407, 222, 222, 407, 467, 441, 441, 468 463, 407, 463, 269, 269, 448, 448, 449, 449, 407, 469 407, 407, 407, 464, 407, 407, 465, 407, 407, 407, 470 407, 407, 456, 456, 456, 456, 407, 433, 433, 407, 471 407, 316, 407, 441, 441, 407, 407, 448, 448, 449, 472 449, 407, 407, 407, 407, 407, 456, 456, 456, 456, 473 433, 433, 441, 441, 448, 448, 449, 449, 468, 407, 474 407, 407, 456, 456, 433, 433, 441, 441, 448, 448, 475 449, 449, 468, 407, 468, 407, 407, 407, 407, 407, 476 477 469, 469, 407, 469, 407, 407, 0, 407, 407, 407, 478 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 479 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 480 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 481 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 482 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 483 407, 407, 407, 407, 407, 407, 407, 407, 407 484 } ; 485 486 static const short int yy_nxt[1659] = 487 { 0, 488 44, 45, 46, 47, 44, 44, 44, 44, 44, 44, 489 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 490 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 491 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 492 44, 44, 44, 44, 49, 50, 51, 44, 44, 52, 493 44, 44, 44, 44, 44, 53, 44, 44, 44, 44, 494 44, 44, 44, 54, 54, 54, 54, 54, 54, 54, 495 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 496 54, 54, 54, 44, 44, 44, 56, 57, 58, 59, 497 60, 73, 74, 61, 61, 130, 131, 61, 405, 62, 498 499 44, 63, 64, 76, 73, 77, 130, 131, 78, 90, 500 91, 92, 90, 91, 92, 110, 206, 111, 105, 106, 501 107, 105, 106, 107, 44, 65, 61, 66, 67, 68, 502 59, 60, 69, 108, 61, 61, 108, 235, 61, 110, 503 70, 111, 63, 64, 235, 71, 113, 114, 113, 114, 504 207, 136, 137, 136, 137, 115, 405, 115, 138, 399, 505 138, 116, 117, 116, 117, 401, 65, 61, 81, 81, 506 82, 83, 81, 81, 81, 81, 81, 84, 81, 81, 507 81, 81, 81, 81, 81, 81, 81, 81, 85, 85, 508 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 509 510 85, 85, 86, 85, 85, 85, 85, 87, 81, 81, 511 81, 93, 93, 44, 93, 93, 93, 93, 93, 93, 512 94, 94, 93, 93, 93, 93, 95, 93, 93, 93, 513 93, 96, 96, 96, 96, 96, 96, 96, 96, 96, 514 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 515 96, 93, 93, 93, 99, 100, 99, 100, 399, 140, 516 141, 213, 101, 214, 101, 102, 142, 102, 140, 141, 517 144, 145, 146, 248, 249, 142, 144, 145, 146, 164, 518 165, 166, 169, 170, 171, 147, 190, 191, 192, 251, 519 249, 147, 257, 258, 103, 300, 103, 118, 118, 119, 520 521 120, 121, 118, 118, 122, 118, 118, 118, 118, 123, 522 118, 118, 118, 118, 118, 118, 118, 124, 124, 124, 523 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 524 124, 125, 124, 124, 124, 124, 126, 127, 118, 128, 525 132, 133, 132, 133, 197, 197, 232, 197, 241, 260, 526 258, 266, 164, 165, 166, 300, 267, 398, 242, 169, 527 170, 171, 281, 282, 283, 292, 293, 296, 297, 198, 528 198, 233, 198, 288, 284, 248, 249, 289, 251, 249, 529 134, 397, 134, 148, 149, 150, 151, 148, 148, 152, 530 148, 148, 153, 148, 148, 148, 148, 148, 148, 148, 531 532 148, 148, 148, 154, 154, 154, 154, 154, 154, 154, 533 154, 154, 154, 154, 154, 154, 154, 155, 154, 154, 534 154, 154, 156, 148, 148, 148, 158, 159, 160, 158, 535 159, 160, 184, 185, 186, 396, 301, 187, 202, 203, 536 204, 241, 266, 187, 281, 282, 283, 267, 281, 282, 537 283, 242, 184, 185, 186, 392, 284, 187, 391, 161, 538 284, 302, 161, 390, 162, 322, 323, 162, 174, 257, 539 258, 389, 188, 260, 258, 292, 293, 285, 188, 286, 540 339, 293, 345, 175, 388, 176, 300, 176, 296, 297, 541 387, 176, 188, 176, 176, 177, 176, 178, 386, 179, 542 543 180, 367, 181, 199, 199, 300, 199, 199, 199, 199, 544 199, 199, 199, 199, 199, 199, 200, 199, 199, 199, 545 199, 199, 199, 201, 201, 201, 201, 201, 201, 201, 546 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 547 201, 201, 201, 199, 199, 199, 305, 305, 385, 305, 548 305, 305, 305, 305, 305, 305, 305, 306, 305, 306, 549 305, 305, 305, 305, 305, 305, 306, 306, 306, 306, 550 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 551 306, 306, 306, 306, 306, 306, 305, 305, 307, 202, 552 203, 204, 341, 297, 187, 281, 282, 283, 331, 282, 553 554 283, 343, 322, 323, 357, 323, 299, 284, 394, 395, 555 284, 331, 282, 283, 369, 383, 394, 395, 300, 300, 556 400, 395, 403, 404, 403, 404, 344, 406, 404, 188, 557 313, 313, 314, 315, 313, 313, 313, 313, 313, 316, 558 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 559 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 560 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 561 313, 313, 313, 324, 324, 300, 324, 324, 324, 324, 562 324, 324, 325, 324, 324, 324, 324, 324, 324, 324, 563 324, 324, 324, 325, 325, 325, 325, 325, 325, 325, 564 565 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 566 325, 325, 325, 324, 324, 324, 346, 304, 318, 347, 567 300, 304, 318, 347, 346, 346, 346, 346, 346, 346, 568 316, 316, 300, 352, 316, 316, 316, 316, 316, 382, 569 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 570 353, 381, 380, 379, 353, 378, 377, 376, 375, 356, 571 374, 373, 351, 350, 372, 371, 366, 340, 338, 365, 572 316, 316, 316, 325, 325, 364, 325, 325, 325, 325, 573 325, 325, 363, 325, 325, 325, 325, 325, 325, 325, 574 325, 325, 325, 362, 361, 360, 359, 358, 356, 355, 575 576 354, 231, 351, 350, 349, 348, 196, 300, 342, 340, 577 338, 336, 335, 325, 325, 325, 368, 333, 332, 330, 578 300, 330, 329, 328, 368, 368, 368, 368, 368, 368, 579 370, 274, 327, 326, 300, 269, 259, 259, 370, 370, 580 370, 370, 370, 370, 384, 250, 250, 320, 300, 319, 581 317, 229, 384, 384, 384, 384, 384, 384, 55, 55, 582 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 583 55, 55, 72, 72, 72, 72, 72, 72, 72, 72, 584 72, 72, 72, 72, 72, 72, 75, 75, 75, 75, 585 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 586 587 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 588 79, 79, 79, 79, 89, 89, 89, 89, 89, 89, 589 89, 89, 89, 89, 89, 89, 89, 89, 44, 44, 590 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 591 44, 44, 98, 98, 98, 98, 98, 98, 98, 98, 592 98, 98, 98, 98, 98, 98, 104, 104, 104, 104, 593 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 594 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 595 109, 109, 109, 109, 112, 112, 112, 112, 112, 112, 596 112, 112, 112, 112, 112, 112, 112, 112, 129, 129, 597 598 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 599 129, 129, 135, 135, 135, 135, 135, 135, 135, 135, 600 135, 135, 135, 135, 135, 135, 139, 139, 139, 139, 601 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 602 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 603 143, 143, 143, 143, 157, 157, 157, 157, 157, 157, 604 157, 157, 157, 157, 157, 157, 157, 157, 168, 168, 605 224, 312, 168, 168, 168, 173, 173, 173, 173, 173, 606 173, 173, 173, 173, 173, 173, 173, 183, 183, 311, 607 216, 183, 183, 183, 194, 194, 212, 194, 194, 194, 608 609 194, 194, 194, 194, 194, 194, 194, 194, 196, 196, 610 205, 196, 196, 196, 196, 196, 196, 196, 196, 196, 611 196, 196, 208, 208, 205, 208, 208, 208, 208, 208, 612 208, 208, 208, 208, 208, 208, 210, 210, 303, 210, 613 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 614 211, 211, 300, 211, 211, 211, 211, 211, 211, 211, 615 211, 211, 211, 211, 215, 215, 215, 215, 215, 215, 616 215, 215, 215, 215, 215, 215, 215, 215, 217, 217, 617 298, 217, 217, 190, 217, 217, 217, 217, 190, 294, 618 189, 217, 219, 219, 189, 172, 219, 219, 219, 223, 619 620 223, 172, 223, 223, 223, 223, 223, 223, 223, 223, 621 223, 223, 223, 227, 227, 167, 167, 227, 227, 227, 622 231, 231, 278, 231, 231, 231, 231, 231, 231, 231, 623 231, 231, 231, 231, 234, 234, 277, 234, 234, 234, 624 234, 234, 234, 234, 234, 234, 234, 234, 237, 237, 625 276, 237, 237, 237, 237, 237, 237, 275, 237, 237, 626 237, 237, 238, 238, 275, 274, 272, 238, 238, 238, 627 238, 238, 240, 240, 271, 240, 240, 240, 240, 240, 628 240, 240, 240, 240, 240, 240, 244, 244, 269, 268, 629 244, 244, 244, 247, 247, 247, 247, 247, 247, 247, 630 631 247, 247, 247, 247, 247, 247, 247, 253, 253, 268, 632 253, 253, 263, 253, 253, 253, 253, 253, 253, 253, 633 253, 256, 256, 256, 256, 256, 263, 256, 256, 256, 634 256, 256, 256, 256, 256, 262, 262, 261, 259, 262, 635 262, 262, 262, 255, 262, 262, 262, 262, 262, 264, 636 264, 254, 264, 264, 264, 264, 264, 264, 264, 264, 637 264, 264, 264, 265, 265, 254, 265, 265, 252, 265, 638 265, 265, 265, 252, 250, 246, 265, 270, 270, 245, 639 243, 270, 270, 270, 273, 239, 239, 273, 273, 273, 640 273, 273, 273, 273, 273, 273, 273, 273, 279, 279, 641 642 236, 279, 279, 279, 279, 279, 279, 279, 279, 279, 643 279, 279, 280, 280, 236, 280, 280, 280, 280, 280, 644 280, 280, 280, 280, 280, 280, 287, 287, 287, 290, 645 290, 290, 291, 291, 291, 291, 291, 291, 291, 291, 646 291, 291, 291, 291, 291, 291, 295, 295, 295, 295, 647 295, 295, 295, 295, 295, 295, 295, 295, 295, 295, 648 299, 299, 230, 299, 299, 299, 299, 299, 299, 230, 649 299, 299, 299, 299, 305, 305, 229, 305, 305, 305, 650 305, 305, 305, 305, 305, 305, 305, 308, 308, 228, 651 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 652 653 308, 309, 309, 228, 309, 309, 309, 309, 309, 309, 654 309, 309, 309, 309, 309, 310, 310, 226, 310, 310, 655 310, 310, 310, 310, 310, 310, 310, 310, 310, 321, 656 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 657 321, 321, 321, 334, 334, 225, 225, 334, 334, 334, 658 337, 337, 224, 222, 337, 337, 337, 393, 393, 393, 659 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 660 393, 402, 402, 402, 402, 402, 402, 402, 402, 402, 661 402, 402, 402, 402, 402, 221, 220, 218, 218, 216, 662 209, 212, 209, 209, 193, 205, 205, 195, 193, 189, 663 664 189, 182, 172, 172, 167, 167, 407, 163, 163, 97, 665 97, 88, 80, 80, 43, 407, 407, 407, 407, 407, 666 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 667 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 668 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 669 407, 407, 407, 407, 407, 407, 407, 407 670 } ; 671 672 static const short int yy_chk[1659] = 673 { 0, 674 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 675 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 676 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 677 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 678 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 679 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 680 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 681 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 682 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 683 3, 5, 5, 3, 3, 27, 27, 3, 406, 3, 684 685 21, 3, 3, 6, 6, 6, 28, 28, 6, 11, 686 11, 11, 12, 12, 12, 21, 69, 21, 19, 19, 687 19, 20, 20, 20, 22, 3, 3, 4, 4, 4, 688 4, 4, 4, 19, 4, 4, 20, 111, 4, 22, 689 4, 22, 4, 4, 111, 4, 23, 23, 24, 24, 690 69, 31, 31, 32, 32, 23, 403, 24, 31, 400, 691 32, 23, 23, 24, 24, 396, 4, 4, 9, 9, 692 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 693 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 694 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 695 696 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 697 9, 13, 13, 13, 13, 13, 13, 13, 13, 13, 698 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 699 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 700 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 701 13, 13, 13, 13, 17, 17, 18, 18, 394, 33, 702 33, 78, 17, 78, 18, 17, 33, 18, 34, 34, 703 35, 35, 35, 129, 129, 34, 36, 36, 36, 45, 704 45, 45, 49, 49, 49, 35, 60, 60, 60, 131, 705 131, 36, 139, 139, 17, 384, 18, 25, 25, 25, 706 707 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 708 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 709 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 710 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 711 29, 29, 30, 30, 64, 108, 110, 116, 122, 141, 712 141, 149, 164, 164, 164, 383, 149, 382, 122, 169, 713 169, 169, 176, 176, 176, 181, 181, 188, 188, 64, 714 108, 110, 116, 179, 176, 247, 247, 179, 249, 249, 715 29, 381, 30, 37, 37, 37, 37, 37, 37, 37, 716 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 717 718 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 719 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 720 37, 37, 37, 37, 37, 37, 39, 39, 39, 40, 721 40, 40, 56, 56, 56, 380, 195, 56, 66, 66, 722 66, 240, 266, 66, 175, 175, 175, 266, 177, 177, 723 177, 240, 184, 184, 184, 378, 175, 184, 377, 39, 724 177, 195, 40, 376, 39, 255, 255, 40, 52, 256, 725 256, 375, 56, 258, 258, 291, 291, 175, 66, 177, 726 293, 293, 301, 52, 374, 52, 301, 52, 295, 295, 727 373, 52, 184, 52, 52, 52, 52, 52, 372, 52, 728 729 52, 343, 52, 65, 65, 343, 65, 65, 65, 65, 730 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 731 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 732 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 733 65, 65, 65, 65, 65, 65, 201, 201, 371, 201, 734 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 735 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 736 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 737 201, 201, 201, 201, 201, 201, 201, 201, 201, 202, 738 202, 202, 297, 297, 202, 281, 281, 281, 284, 284, 739 740 284, 300, 321, 321, 323, 323, 300, 281, 379, 379, 741 284, 331, 331, 331, 345, 367, 393, 393, 345, 367, 742 395, 395, 401, 401, 402, 402, 300, 404, 404, 202, 743 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 744 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 745 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 746 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 747 222, 222, 222, 269, 269, 370, 269, 269, 269, 269, 748 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 749 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 750 751 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, 752 269, 269, 269, 269, 269, 269, 302, 457, 462, 466, 753 302, 457, 462, 466, 302, 302, 302, 302, 302, 302, 754 316, 316, 369, 316, 316, 316, 316, 316, 316, 366, 755 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, 756 467, 364, 363, 362, 467, 361, 360, 359, 358, 357, 757 355, 354, 352, 351, 349, 348, 342, 341, 339, 336, 758 316, 316, 316, 325, 325, 335, 325, 325, 325, 325, 759 325, 325, 333, 325, 325, 325, 325, 325, 325, 325, 760 325, 325, 325, 332, 329, 328, 327, 326, 322, 320, 761 762 319, 317, 315, 314, 312, 311, 303, 299, 298, 296, 763 292, 289, 288, 325, 325, 325, 344, 286, 285, 283, 764 344, 282, 277, 276, 344, 344, 344, 344, 344, 344, 765 346, 274, 272, 271, 346, 267, 260, 257, 346, 346, 766 346, 346, 346, 346, 368, 251, 248, 246, 368, 245, 767 232, 229, 368, 368, 368, 368, 368, 368, 408, 408, 768 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 769 408, 408, 409, 409, 409, 409, 409, 409, 409, 409, 770 409, 409, 409, 409, 409, 409, 410, 410, 410, 410, 771 410, 410, 410, 410, 410, 410, 410, 410, 410, 410, 772 773 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 774 411, 411, 411, 411, 412, 412, 412, 412, 412, 412, 775 412, 412, 412, 412, 412, 412, 412, 412, 413, 413, 776 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 777 413, 413, 414, 414, 414, 414, 414, 414, 414, 414, 778 414, 414, 414, 414, 414, 414, 415, 415, 415, 415, 779 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 780 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 781 416, 416, 416, 416, 417, 417, 417, 417, 417, 417, 782 417, 417, 417, 417, 417, 417, 417, 417, 418, 418, 783 784 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 785 418, 418, 419, 419, 419, 419, 419, 419, 419, 419, 786 419, 419, 419, 419, 419, 419, 420, 420, 420, 420, 787 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 788 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 789 421, 421, 421, 421, 422, 422, 422, 422, 422, 422, 790 422, 422, 422, 422, 422, 422, 422, 422, 423, 423, 791 224, 221, 423, 423, 423, 424, 424, 424, 424, 424, 792 424, 424, 424, 424, 424, 424, 424, 425, 425, 220, 793 215, 425, 425, 425, 426, 426, 212, 426, 426, 426, 794 795 426, 426, 426, 426, 426, 426, 426, 426, 427, 427, 796 204, 427, 427, 427, 427, 427, 427, 427, 427, 427, 797 427, 427, 428, 428, 203, 428, 428, 428, 428, 428, 798 428, 428, 428, 428, 428, 428, 429, 429, 197, 429, 799 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 800 430, 430, 194, 430, 430, 430, 430, 430, 430, 430, 801 430, 430, 430, 430, 431, 431, 431, 431, 431, 431, 802 431, 431, 431, 431, 431, 431, 431, 431, 432, 432, 803 193, 432, 432, 192, 432, 432, 432, 432, 191, 187, 804 186, 432, 433, 433, 185, 171, 433, 433, 433, 434, 805 806 434, 170, 434, 434, 434, 434, 434, 434, 434, 434, 807 434, 434, 434, 435, 435, 166, 165, 435, 435, 435, 808 436, 436, 163, 436, 436, 436, 436, 436, 436, 436, 809 436, 436, 436, 436, 437, 437, 162, 437, 437, 437, 810 437, 437, 437, 437, 437, 437, 437, 437, 438, 438, 811 161, 438, 438, 438, 438, 438, 438, 160, 438, 438, 812 438, 438, 439, 439, 159, 158, 156, 439, 439, 439, 813 439, 439, 440, 440, 155, 440, 440, 440, 440, 440, 814 440, 440, 440, 440, 440, 440, 441, 441, 152, 151, 815 441, 441, 441, 442, 442, 442, 442, 442, 442, 442, 816 817 442, 442, 442, 442, 442, 442, 442, 443, 443, 150, 818 443, 443, 145, 443, 443, 443, 443, 443, 443, 443, 819 443, 444, 444, 444, 444, 444, 144, 444, 444, 444, 820 444, 444, 444, 444, 444, 445, 445, 142, 140, 445, 821 445, 445, 445, 138, 445, 445, 445, 445, 445, 446, 822 446, 137, 446, 446, 446, 446, 446, 446, 446, 446, 823 446, 446, 446, 447, 447, 136, 447, 447, 133, 447, 824 447, 447, 447, 132, 130, 126, 447, 448, 448, 125, 825 123, 448, 448, 448, 449, 120, 119, 449, 449, 449, 826 449, 449, 449, 449, 449, 449, 449, 449, 450, 450, 827 828 114, 450, 450, 450, 450, 450, 450, 450, 450, 450, 829 450, 450, 451, 451, 113, 451, 451, 451, 451, 451, 830 451, 451, 451, 451, 451, 451, 452, 452, 452, 453, 831 453, 453, 454, 454, 454, 454, 454, 454, 454, 454, 832 454, 454, 454, 454, 454, 454, 455, 455, 455, 455, 833 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 834 456, 456, 106, 456, 456, 456, 456, 456, 456, 105, 835 456, 456, 456, 456, 458, 458, 102, 458, 458, 458, 836 458, 458, 458, 458, 458, 458, 458, 459, 459, 100, 837 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 838 839 459, 460, 460, 99, 460, 460, 460, 460, 460, 460, 840 460, 460, 460, 460, 460, 461, 461, 95, 461, 461, 841 461, 461, 461, 461, 461, 461, 461, 461, 461, 463, 842 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 843 463, 463, 463, 464, 464, 92, 91, 464, 464, 464, 844 465, 465, 90, 88, 465, 465, 465, 468, 468, 468, 845 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 846 468, 469, 469, 469, 469, 469, 469, 469, 469, 469, 847 469, 469, 469, 469, 469, 87, 86, 83, 82, 79, 848 77, 76, 74, 73, 70, 68, 67, 63, 62, 58, 849 850 57, 53, 51, 50, 47, 46, 43, 42, 41, 16, 851 15, 10, 8, 7, 407, 407, 407, 407, 407, 407, 852 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 853 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 854 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 855 407, 407, 407, 407, 407, 407, 407, 407 856 } ; 857 858 static yy_state_type yy_last_accepting_state; 859 static char *yy_last_accepting_cpos; 860 861 /* The intent behind this definition is that it'll catch 862 * any uses of REJECT which flex missed. 863 */ 864 #define REJECT reject_used_but_not_detected 865 #define yymore() yymore_used_but_not_detected 866 #define YY_MORE_ADJ 0 867 char *yytext; 868 # line 1 "scan.l" 869 /* scan.l - scanner for flex input */ 870 # line 4 "scan.l" 871 /*- 872 * Copyright (c) 1990 The Regents of the University of California. 873 * All rights reserved. 874 * 875 * This code is derived from software contributed to Berkeley by 876 * Vern Paxson. 877 * 878 * The United States Government has rights in this work pursuant 879 * to contract no. DE-AC03-76SF00098 between the United States 880 * Department of Energy and the University of California. 881 * 882 * Redistribution and use in source and binary forms are permitted provided 883 * that: (1) source distributions retain this entire copyright notice and 884 * comment, and (2) distributions including binaries display the following 885 * acknowledgement: ``This product includes software developed by the 886 * University of California, Berkeley and its contributors'' in the 887 * documentation or other materials provided with the distribution and in 888 * all advertising materials mentioning features or use of this software. 889 * Neither the name of the University nor the names of its contributors may 890 * be used to endorse or promote products derived from this software without 891 * specific prior written permission. 892 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 893 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 894 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 895 */ 896 897 /* $Header: /home/ncvs/src/usr.bin/lex/initscan.c,v 1.1.1.1 1994/08/24 13:10:32 csgr Exp $ */ 898 899 #include "flexdef.h" 900 #include "parse.h" 901 902 #define ACTION_ECHO add_action( yytext ) 903 #define MARK_END_OF_PROLOG mark_prolog(); 904 905 #define YY_DECL \ 906 int flexscan() 907 908 #define RETURNCHAR \ 909 yylval = (unsigned char) yytext[0]; \ 910 return CHAR; 911 912 #define RETURNNAME \ 913 strcpy( nmstr, yytext ); \ 914 return NAME; 915 916 #define PUT_BACK_STRING(str, start) \ 917 for ( i = strlen( str ) - 1; i >= start; --i ) \ 918 unput((str)[i]) 919 920 #define CHECK_REJECT(str) \ 921 if ( all_upper( str ) ) \ 922 reject = true; 923 924 #define CHECK_YYMORE(str) \ 925 if ( all_lower( str ) ) \ 926 yymore_used = true; 927 928 /* Macros after this point can all be overridden by user definitions in 929 * section 1. 930 */ 931 932 #ifdef YY_MALLOC_DECL 933 YY_MALLOC_DECL 934 #else 935 #if __STDC__ 936 #ifndef __cplusplus 937 #include <stdlib.h> 938 #endif 939 #else 940 /* Just try to get by without declaring the routines. This will fail 941 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 942 * or sizeof(void*) != sizeof(int). 943 */ 944 #endif 945 #endif 946 947 /* Amount of stuff to slurp up with each read. */ 948 #ifndef YY_READ_BUF_SIZE 949 #define YY_READ_BUF_SIZE 8192 950 #endif 951 952 /* Copy whatever the last rule matched to the standard output. */ 953 954 #ifndef ECHO 955 /* This used to be an fputs(), but since the string might contain NUL's, 956 * we now use fwrite(). 957 */ 958 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 959 #endif 960 961 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 962 * is returned in "result". 963 */ 964 #ifndef YY_INPUT 965 #define YY_INPUT(buf,result,max_size) \ 966 if ( yy_current_buffer->yy_is_interactive ) \ 967 { \ 968 int c = getc( yyin ); \ 969 result = c == EOF ? 0 : 1; \ 970 buf[0] = (char) c; \ 971 } \ 972 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 973 && ferror( yyin ) ) \ 974 YY_FATAL_ERROR( "input in flex scanner failed" ); 975 #endif 976 977 /* No semi-colon after return; correct usage is to write "yyterminate();" - 978 * we don't want an extra ';' after the "return" because that will cause 979 * some compilers to complain about unreachable statements. 980 */ 981 #ifndef yyterminate 982 #define yyterminate() return YY_NULL 983 #endif 984 985 /* Number of entries by which start-condition stack grows. */ 986 #ifndef YY_START_STACK_INCR 987 #define YY_START_STACK_INCR 25 988 #endif 989 990 /* Report a fatal error. */ 991 #ifndef YY_FATAL_ERROR 992 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 993 #endif 994 995 /* Default declaration of generated scanner - a define so the user can 996 * easily add parameters. 997 */ 998 #ifndef YY_DECL 999 #define YY_DECL int yylex YY_PROTO(( void )) 1000 #endif 1001 1002 /* Code executed at the beginning of each rule, after yytext and yyleng 1003 * have been set up. 1004 */ 1005 #ifndef YY_USER_ACTION 1006 #define YY_USER_ACTION 1007 #endif 1008 1009 /* Code executed at the end of each rule. */ 1010 #ifndef YY_BREAK 1011 #define YY_BREAK break; 1012 #endif 1013 1014 YY_DECL 1015 { 1016 register yy_state_type yy_current_state; 1017 register char *yy_cp, *yy_bp; 1018 register int yy_act; 1019 1020 # line 82 "scan.l" 1021 1022 static int bracelevel, didadef, indented_code, checking_used; 1023 1024 int doing_codeblock = false; 1025 int i; 1026 Char nmdef[MAXLINE], myesc(); 1027 1028 1029 1030 if ( yy_init ) 1031 { 1032 #ifdef YY_USER_INIT 1033 YY_USER_INIT; 1034 #endif 1035 1036 if ( ! yy_start ) 1037 yy_start = 1; /* first start state */ 1038 1039 if ( ! yyin ) 1040 yyin = stdin; 1041 1042 if ( ! yyout ) 1043 yyout = stdout; 1044 1045 if ( yy_current_buffer ) 1046 yy_init_buffer( yy_current_buffer, yyin ); 1047 else 1048 yy_current_buffer = 1049 yy_create_buffer( yyin, YY_BUF_SIZE ); 1050 1051 yy_load_buffer_state(); 1052 1053 yy_init = 0; 1054 } 1055 1056 while ( 1 ) /* loops until end-of-file is reached */ 1057 { 1058 yy_cp = yy_c_buf_p; 1059 1060 /* Support of yytext. */ 1061 *yy_cp = yy_hold_char; 1062 1063 /* yy_bp points to the position in yy_ch_buf of the start of 1064 * the current run. 1065 */ 1066 yy_bp = yy_cp; 1067 1068 yy_current_state = yy_start; 1069 if ( yy_bp[-1] == '\n' ) 1070 ++yy_current_state; 1071 yy_match: 1072 do 1073 { 1074 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 1075 if ( yy_accept[yy_current_state] ) 1076 { 1077 yy_last_accepting_state = yy_current_state; 1078 yy_last_accepting_cpos = yy_cp; 1079 } 1080 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1081 { 1082 yy_current_state = (int) yy_def[yy_current_state]; 1083 if ( yy_current_state >= 408 ) 1084 yy_c = yy_meta[(unsigned int) yy_c]; 1085 } 1086 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1087 ++yy_cp; 1088 } 1089 while ( yy_base[yy_current_state] != 1615 ); 1090 1091 yy_find_action: 1092 yy_act = yy_accept[yy_current_state]; 1093 1094 YY_DO_BEFORE_ACTION; 1095 1096 1097 do_action: /* This label is used only to access EOF actions. */ 1098 1099 1100 switch ( yy_act ) 1101 { /* beginning of action switch */ 1102 case 0: /* must back up */ 1103 /* undo the effects of YY_DO_BEFORE_ACTION */ 1104 *yy_cp = yy_hold_char; 1105 yy_cp = yy_last_accepting_cpos; 1106 yy_current_state = yy_last_accepting_state; 1107 goto yy_find_action; 1108 1109 case 1: 1110 YY_USER_ACTION 1111 # line 90 "scan.l" 1112 indented_code = true; BEGIN(CODEBLOCK); 1113 YY_BREAK 1114 case 2: 1115 YY_USER_ACTION 1116 # line 91 "scan.l" 1117 ACTION_ECHO; BEGIN(C_COMMENT); 1118 YY_BREAK 1119 case 3: 1120 YY_USER_ACTION 1121 # line 92 "scan.l" 1122 return SCDECL; 1123 YY_BREAK 1124 case 4: 1125 YY_USER_ACTION 1126 # line 93 "scan.l" 1127 return XSCDECL; 1128 YY_BREAK 1129 case 5: 1130 YY_USER_ACTION 1131 # line 94 "scan.l" 1132 { 1133 ++linenum; 1134 line_directive_out( (FILE *) 0 ); 1135 indented_code = false; 1136 BEGIN(CODEBLOCK); 1137 } 1138 YY_BREAK 1139 case 6: 1140 YY_USER_ACTION 1141 # line 101 "scan.l" 1142 return WHITESPACE; 1143 YY_BREAK 1144 case 7: 1145 YY_USER_ACTION 1146 # line 103 "scan.l" 1147 { 1148 sectnum = 2; 1149 bracelevel = 0; 1150 mark_defs1(); 1151 line_directive_out( (FILE *) 0 ); 1152 BEGIN(SECT2PROLOG); 1153 return SECTEND; 1154 } 1155 YY_BREAK 1156 case 8: 1157 YY_USER_ACTION 1158 # line 112 "scan.l" 1159 { 1160 if ( lex_compat ) 1161 warn( "%pointer incompatible with -l option" ); 1162 else 1163 yytext_is_array = false; 1164 ++linenum; 1165 } 1166 YY_BREAK 1167 case 9: 1168 YY_USER_ACTION 1169 # line 119 "scan.l" 1170 { 1171 if ( C_plus_plus ) 1172 warn( "%array incompatible with -+ option" ); 1173 else 1174 yytext_is_array = true; 1175 ++linenum; 1176 } 1177 YY_BREAK 1178 case 10: 1179 YY_USER_ACTION 1180 # line 127 "scan.l" 1181 { 1182 warn( "%used/%unused have been deprecated" ); 1183 checking_used = REALLY_USED; BEGIN(USED_LIST); 1184 } 1185 YY_BREAK 1186 case 11: 1187 YY_USER_ACTION 1188 # line 131 "scan.l" 1189 { 1190 warn( "%used/%unused have been deprecated" ); 1191 checking_used = REALLY_NOT_USED; BEGIN(USED_LIST); 1192 } 1193 YY_BREAK 1194 case 12: 1195 YY_USER_ACTION 1196 # line 137 "scan.l" 1197 ++linenum; /* ignore */ 1198 YY_BREAK 1199 case 13: 1200 YY_USER_ACTION 1201 # line 139 "scan.l" 1202 synerr( "unrecognized '%' directive" ); 1203 YY_BREAK 1204 case 14: 1205 YY_USER_ACTION 1206 # line 141 "scan.l" 1207 { 1208 strcpy( nmstr, yytext ); 1209 didadef = false; 1210 BEGIN(PICKUPDEF); 1211 } 1212 YY_BREAK 1213 case 15: 1214 YY_USER_ACTION 1215 # line 147 "scan.l" 1216 RETURNNAME; 1217 YY_BREAK 1218 case 16: 1219 YY_USER_ACTION 1220 # line 148 "scan.l" 1221 ++linenum; /* allows blank lines in section 1 */ 1222 YY_BREAK 1223 case 17: 1224 YY_USER_ACTION 1225 # line 149 "scan.l" 1226 ++linenum; return '\n'; 1227 YY_BREAK 1228 case 18: 1229 YY_USER_ACTION 1230 # line 152 "scan.l" 1231 ACTION_ECHO; BEGIN(INITIAL); 1232 YY_BREAK 1233 case 19: 1234 YY_USER_ACTION 1235 # line 153 "scan.l" 1236 ++linenum; ACTION_ECHO; BEGIN(INITIAL); 1237 YY_BREAK 1238 case 20: 1239 YY_USER_ACTION 1240 # line 154 "scan.l" 1241 ACTION_ECHO; 1242 YY_BREAK 1243 case 21: 1244 YY_USER_ACTION 1245 # line 155 "scan.l" 1246 ACTION_ECHO; 1247 YY_BREAK 1248 case 22: 1249 YY_USER_ACTION 1250 # line 156 "scan.l" 1251 ++linenum; ACTION_ECHO; 1252 YY_BREAK 1253 case 23: 1254 YY_USER_ACTION 1255 # line 159 "scan.l" 1256 ++linenum; BEGIN(INITIAL); 1257 YY_BREAK 1258 case 24: 1259 YY_USER_ACTION 1260 # line 160 "scan.l" 1261 ACTION_ECHO; CHECK_REJECT(yytext); 1262 YY_BREAK 1263 case 25: 1264 YY_USER_ACTION 1265 # line 161 "scan.l" 1266 ACTION_ECHO; CHECK_YYMORE(yytext); 1267 YY_BREAK 1268 case 26: 1269 YY_USER_ACTION 1270 # line 162 "scan.l" 1271 ACTION_ECHO; 1272 YY_BREAK 1273 case 27: 1274 YY_USER_ACTION 1275 # line 163 "scan.l" 1276 { 1277 ++linenum; 1278 ACTION_ECHO; 1279 if ( indented_code ) 1280 BEGIN(INITIAL); 1281 } 1282 YY_BREAK 1283 case 28: 1284 YY_USER_ACTION 1285 # line 171 "scan.l" 1286 /* separates name and definition */ 1287 YY_BREAK 1288 case 29: 1289 YY_USER_ACTION 1290 # line 173 "scan.l" 1291 { 1292 strcpy( (char *) nmdef, yytext ); 1293 1294 /* Skip trailing whitespace. */ 1295 for ( i = strlen( (char *) nmdef ) - 1; 1296 i >= 0 && (nmdef[i] == ' ' || nmdef[i] == '\t'); 1297 --i ) 1298 ; 1299 1300 nmdef[i + 1] = '\0'; 1301 1302 ndinstal( nmstr, nmdef ); 1303 didadef = true; 1304 } 1305 YY_BREAK 1306 case 30: 1307 YY_USER_ACTION 1308 # line 188 "scan.l" 1309 { 1310 if ( ! didadef ) 1311 synerr( "incomplete name definition" ); 1312 BEGIN(INITIAL); 1313 ++linenum; 1314 } 1315 YY_BREAK 1316 case 31: 1317 YY_USER_ACTION 1318 # line 195 "scan.l" 1319 ++linenum; BEGIN(INITIAL); RETURNNAME; 1320 YY_BREAK 1321 case 32: 1322 YY_USER_ACTION 1323 # line 198 "scan.l" 1324 ++linenum; BEGIN(INITIAL); 1325 YY_BREAK 1326 case 33: 1327 YY_USER_ACTION 1328 # line 199 "scan.l" 1329 1330 YY_BREAK 1331 case 34: 1332 YY_USER_ACTION 1333 # line 200 "scan.l" 1334 { 1335 if ( all_upper( yytext ) ) 1336 reject_really_used = checking_used; 1337 else 1338 synerr( 1339 "unrecognized %used/%unused construct" ); 1340 } 1341 YY_BREAK 1342 case 35: 1343 YY_USER_ACTION 1344 # line 207 "scan.l" 1345 { 1346 if ( all_lower( yytext ) ) 1347 yymore_really_used = checking_used; 1348 else 1349 synerr( 1350 "unrecognized %used/%unused construct" ); 1351 } 1352 YY_BREAK 1353 case 36: 1354 YY_USER_ACTION 1355 # line 214 "scan.l" 1356 synerr( "unrecognized %used/%unused construct" ); 1357 YY_BREAK 1358 case 37: 1359 YY_USER_ACTION 1360 # line 217 "scan.l" 1361 ++bracelevel; yyless( 2 ); /* eat only %{ */ 1362 YY_BREAK 1363 case 38: 1364 YY_USER_ACTION 1365 # line 218 "scan.l" 1366 --bracelevel; yyless( 2 ); /* eat only %} */ 1367 YY_BREAK 1368 case 39: 1369 YY_USER_ACTION 1370 # line 220 "scan.l" 1371 ACTION_ECHO; /* indented code in prolog */ 1372 YY_BREAK 1373 case 40: 1374 YY_USER_ACTION 1375 # line 222 "scan.l" 1376 { /* non-indented code */ 1377 if ( bracelevel <= 0 ) 1378 { /* not in %{ ... %} */ 1379 yyless( 0 ); /* put it all back */ 1380 mark_prolog(); 1381 BEGIN(SECT2); 1382 } 1383 else 1384 ACTION_ECHO; 1385 } 1386 YY_BREAK 1387 case 41: 1388 YY_USER_ACTION 1389 # line 233 "scan.l" 1390 ACTION_ECHO; 1391 YY_BREAK 1392 case 42: 1393 YY_USER_ACTION 1394 # line 234 "scan.l" 1395 ++linenum; ACTION_ECHO; 1396 YY_BREAK 1397 case YY_STATE_EOF(SECT2PROLOG): 1398 # line 236 "scan.l" 1399 { 1400 mark_prolog(); 1401 sectnum = 0; 1402 yyterminate(); /* to stop the parser */ 1403 } 1404 YY_BREAK 1405 case 43: 1406 YY_USER_ACTION 1407 # line 242 "scan.l" 1408 ++linenum; /* allow blank lines in section 2 */ 1409 YY_BREAK 1410 case 44: 1411 YY_USER_ACTION 1412 # line 244 "scan.l" 1413 { 1414 indented_code = (yytext[0] != '%'); 1415 doing_codeblock = true; 1416 bracelevel = 1; 1417 1418 if ( indented_code ) 1419 ACTION_ECHO; 1420 1421 BEGIN(CODEBLOCK_2); 1422 } 1423 YY_BREAK 1424 case 45: 1425 YY_USER_ACTION 1426 # line 255 "scan.l" 1427 BEGIN(SC); return '<'; 1428 YY_BREAK 1429 case 46: 1430 YY_USER_ACTION 1431 # line 256 "scan.l" 1432 return '^'; 1433 YY_BREAK 1434 case 47: 1435 YY_USER_ACTION 1436 # line 257 "scan.l" 1437 BEGIN(QUOTE); return '"'; 1438 YY_BREAK 1439 case 48: 1440 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 1441 yy_c_buf_p = yy_cp = yy_bp + 1; 1442 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1443 YY_USER_ACTION 1444 # line 258 "scan.l" 1445 BEGIN(NUM); return '{'; 1446 YY_BREAK 1447 case 49: 1448 YY_USER_ACTION 1449 # line 259 "scan.l" 1450 BEGIN(BRACEERROR); 1451 YY_BREAK 1452 case 50: 1453 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 1454 yy_c_buf_p = yy_cp = yy_bp + 1; 1455 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1456 YY_USER_ACTION 1457 # line 260 "scan.l" 1458 return '$'; 1459 YY_BREAK 1460 case 51: 1461 YY_USER_ACTION 1462 # line 262 "scan.l" 1463 { 1464 bracelevel = 1; 1465 BEGIN(PERCENT_BRACE_ACTION); 1466 return '\n'; 1467 } 1468 YY_BREAK 1469 case 52: 1470 YY_USER_ACTION 1471 # line 267 "scan.l" 1472 continued_action = true; ++linenum; return '\n'; 1473 YY_BREAK 1474 case 53: 1475 YY_USER_ACTION 1476 # line 269 "scan.l" 1477 { 1478 /* This rule is separate from the one below because 1479 * otherwise we get variable trailing context, so 1480 * we can't build the scanner using -{f,F}. 1481 */ 1482 bracelevel = 0; 1483 continued_action = false; 1484 BEGIN(ACTION); 1485 return '\n'; 1486 } 1487 YY_BREAK 1488 case 54: 1489 YY_USER_ACTION 1490 # line 280 "scan.l" 1491 { 1492 bracelevel = 0; 1493 continued_action = false; 1494 BEGIN(ACTION); 1495 unput( '\n' ); /* so <ACTION> sees it */ 1496 return '\n'; 1497 } 1498 YY_BREAK 1499 case 55: 1500 YY_USER_ACTION 1501 # line 288 "scan.l" 1502 return EOF_OP; 1503 YY_BREAK 1504 case 56: 1505 YY_USER_ACTION 1506 # line 290 "scan.l" 1507 { 1508 sectnum = 3; 1509 BEGIN(SECT3); 1510 yyterminate(); /* to stop the parser */ 1511 } 1512 YY_BREAK 1513 case 57: 1514 YY_USER_ACTION 1515 # line 296 "scan.l" 1516 { 1517 int cclval; 1518 1519 strcpy( nmstr, yytext ); 1520 1521 /* Check to see if we've already encountered this 1522 * ccl. 1523 */ 1524 if ( (cclval = ccllookup( (Char *) nmstr )) ) 1525 { 1526 if ( input() != ']' ) 1527 synerr( "bad character class" ); 1528 1529 yylval = cclval; 1530 ++cclreuse; 1531 return PREVCCL; 1532 } 1533 else 1534 { 1535 /* We fudge a bit. We know that this ccl will 1536 * soon be numbered as lastccl + 1 by cclinit. 1537 */ 1538 cclinstal( (Char *) nmstr, lastccl + 1 ); 1539 1540 /* Push back everything but the leading bracket 1541 * so the ccl can be rescanned. 1542 */ 1543 yyless( 1 ); 1544 1545 BEGIN(FIRSTCCL); 1546 return '['; 1547 } 1548 } 1549 YY_BREAK 1550 case 58: 1551 YY_USER_ACTION 1552 # line 330 "scan.l" 1553 { 1554 register Char *nmdefptr; 1555 Char *ndlookup(); 1556 1557 strcpy( nmstr, yytext + 1 ); 1558 nmstr[yyleng - 2] = '\0'; /* chop trailing brace */ 1559 1560 if ( ! (nmdefptr = ndlookup( nmstr )) ) 1561 format_synerr( "undefined definition {%s}", 1562 nmstr ); 1563 1564 else 1565 { /* push back name surrounded by ()'s */ 1566 int len = strlen( (char *) nmdefptr ); 1567 1568 if ( lex_compat || nmdefptr[0] == '^' || 1569 (len > 0 && nmdefptr[len - 1] == '$') ) 1570 { /* don't use ()'s after all */ 1571 PUT_BACK_STRING((char *) nmdefptr, 0); 1572 1573 if ( nmdefptr[0] == '^' ) 1574 BEGIN(CARETISBOL); 1575 } 1576 1577 else 1578 { 1579 unput(')'); 1580 PUT_BACK_STRING((char *) nmdefptr, 0); 1581 unput('('); 1582 } 1583 } 1584 } 1585 YY_BREAK 1586 case 59: 1587 YY_USER_ACTION 1588 # line 363 "scan.l" 1589 return (unsigned char) yytext[0]; 1590 YY_BREAK 1591 case 60: 1592 YY_USER_ACTION 1593 # line 364 "scan.l" 1594 RETURNCHAR; 1595 YY_BREAK 1596 case 61: 1597 YY_USER_ACTION 1598 # line 367 "scan.l" 1599 return (unsigned char) yytext[0]; 1600 YY_BREAK 1601 case 62: 1602 YY_USER_ACTION 1603 # line 368 "scan.l" 1604 BEGIN(SECT2); return '>'; 1605 YY_BREAK 1606 case 63: 1607 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 1608 yy_c_buf_p = yy_cp = yy_bp + 1; 1609 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1610 YY_USER_ACTION 1611 # line 369 "scan.l" 1612 BEGIN(CARETISBOL); return '>'; 1613 YY_BREAK 1614 case 64: 1615 YY_USER_ACTION 1616 # line 370 "scan.l" 1617 RETURNNAME; 1618 YY_BREAK 1619 case 65: 1620 YY_USER_ACTION 1621 # line 371 "scan.l" 1622 { 1623 format_synerr( "bad <start condition>: %s", yytext ); 1624 } 1625 YY_BREAK 1626 case 66: 1627 YY_USER_ACTION 1628 # line 375 "scan.l" 1629 BEGIN(SECT2); return '^'; 1630 YY_BREAK 1631 case 67: 1632 YY_USER_ACTION 1633 # line 378 "scan.l" 1634 RETURNCHAR; 1635 YY_BREAK 1636 case 68: 1637 YY_USER_ACTION 1638 # line 379 "scan.l" 1639 BEGIN(SECT2); return '"'; 1640 YY_BREAK 1641 case 69: 1642 YY_USER_ACTION 1643 # line 381 "scan.l" 1644 { 1645 synerr( "missing quote" ); 1646 BEGIN(SECT2); 1647 ++linenum; 1648 return '"'; 1649 } 1650 YY_BREAK 1651 case 70: 1652 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 1653 yy_c_buf_p = yy_cp = yy_bp + 1; 1654 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1655 YY_USER_ACTION 1656 # line 389 "scan.l" 1657 BEGIN(CCL); return '^'; 1658 YY_BREAK 1659 case 71: 1660 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 1661 yy_c_buf_p = yy_cp = yy_bp + 1; 1662 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1663 YY_USER_ACTION 1664 # line 390 "scan.l" 1665 return '^'; 1666 YY_BREAK 1667 case 72: 1668 YY_USER_ACTION 1669 # line 391 "scan.l" 1670 BEGIN(CCL); RETURNCHAR; 1671 YY_BREAK 1672 case 73: 1673 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ 1674 yy_c_buf_p = yy_cp = yy_bp + 1; 1675 YY_DO_BEFORE_ACTION; /* set up yytext again */ 1676 YY_USER_ACTION 1677 # line 393 "scan.l" 1678 return '-'; 1679 YY_BREAK 1680 case 74: 1681 YY_USER_ACTION 1682 # line 394 "scan.l" 1683 RETURNCHAR; 1684 YY_BREAK 1685 case 75: 1686 YY_USER_ACTION 1687 # line 395 "scan.l" 1688 BEGIN(SECT2); return ']'; 1689 YY_BREAK 1690 case 76: 1691 YY_USER_ACTION 1692 # line 396 "scan.l" 1693 { 1694 synerr( "bad character class" ); 1695 BEGIN(SECT2); 1696 return ']'; 1697 } 1698 YY_BREAK 1699 case 77: 1700 YY_USER_ACTION 1701 # line 403 "scan.l" 1702 { 1703 yylval = myctoi( yytext ); 1704 return NUMBER; 1705 } 1706 YY_BREAK 1707 case 78: 1708 YY_USER_ACTION 1709 # line 408 "scan.l" 1710 return ','; 1711 YY_BREAK 1712 case 79: 1713 YY_USER_ACTION 1714 # line 409 "scan.l" 1715 BEGIN(SECT2); return '}'; 1716 YY_BREAK 1717 case 80: 1718 YY_USER_ACTION 1719 # line 411 "scan.l" 1720 { 1721 synerr( "bad character inside {}'s" ); 1722 BEGIN(SECT2); 1723 return '}'; 1724 } 1725 YY_BREAK 1726 case 81: 1727 YY_USER_ACTION 1728 # line 417 "scan.l" 1729 { 1730 synerr( "missing }" ); 1731 BEGIN(SECT2); 1732 ++linenum; 1733 return '}'; 1734 } 1735 YY_BREAK 1736 case 82: 1737 YY_USER_ACTION 1738 # line 425 "scan.l" 1739 synerr( "bad name in {}'s" ); BEGIN(SECT2); 1740 YY_BREAK 1741 case 83: 1742 YY_USER_ACTION 1743 # line 426 "scan.l" 1744 synerr( "missing }" ); ++linenum; BEGIN(SECT2); 1745 YY_BREAK 1746 case 84: 1747 YY_USER_ACTION 1748 # line 429 "scan.l" 1749 ACTION_ECHO; BEGIN(ACTION_COMMENT); 1750 YY_BREAK 1751 case 85: 1752 YY_USER_ACTION 1753 # line 430 "scan.l" 1754 bracelevel = 0; 1755 YY_BREAK 1756 case 86: 1757 YY_USER_ACTION 1758 # line 431 "scan.l" 1759 { 1760 ACTION_ECHO; 1761 CHECK_REJECT(yytext); 1762 } 1763 YY_BREAK 1764 case 87: 1765 YY_USER_ACTION 1766 # line 435 "scan.l" 1767 { 1768 ACTION_ECHO; 1769 CHECK_YYMORE(yytext); 1770 } 1771 YY_BREAK 1772 case 88: 1773 YY_USER_ACTION 1774 # line 439 "scan.l" 1775 ACTION_ECHO; 1776 YY_BREAK 1777 case 89: 1778 YY_USER_ACTION 1779 # line 440 "scan.l" 1780 { 1781 ++linenum; 1782 ACTION_ECHO; 1783 if ( bracelevel == 0 || 1784 (doing_codeblock && indented_code) ) 1785 { 1786 if ( ! doing_codeblock ) 1787 add_action( "\tYY_BREAK\n" ); 1788 1789 doing_codeblock = false; 1790 BEGIN(SECT2); 1791 } 1792 } 1793 YY_BREAK 1794 /* Reject and YYmore() are checked for above, in PERCENT_BRACE_ACTION */ 1795 case 90: 1796 YY_USER_ACTION 1797 # line 456 "scan.l" 1798 ACTION_ECHO; ++bracelevel; 1799 YY_BREAK 1800 case 91: 1801 YY_USER_ACTION 1802 # line 457 "scan.l" 1803 ACTION_ECHO; --bracelevel; 1804 YY_BREAK 1805 case 92: 1806 YY_USER_ACTION 1807 # line 458 "scan.l" 1808 ACTION_ECHO; 1809 YY_BREAK 1810 case 93: 1811 YY_USER_ACTION 1812 # line 459 "scan.l" 1813 ACTION_ECHO; 1814 YY_BREAK 1815 case 94: 1816 YY_USER_ACTION 1817 # line 460 "scan.l" 1818 ACTION_ECHO; BEGIN(ACTION_COMMENT); 1819 YY_BREAK 1820 case 95: 1821 YY_USER_ACTION 1822 # line 461 "scan.l" 1823 ACTION_ECHO; /* character constant */ 1824 YY_BREAK 1825 case 96: 1826 YY_USER_ACTION 1827 # line 462 "scan.l" 1828 ACTION_ECHO; BEGIN(ACTION_STRING); 1829 YY_BREAK 1830 case 97: 1831 YY_USER_ACTION 1832 # line 463 "scan.l" 1833 { 1834 ++linenum; 1835 ACTION_ECHO; 1836 if ( bracelevel == 0 ) 1837 { 1838 add_action( "\tYY_BREAK\n" ); 1839 BEGIN(SECT2); 1840 } 1841 } 1842 YY_BREAK 1843 case 98: 1844 YY_USER_ACTION 1845 # line 472 "scan.l" 1846 ACTION_ECHO; 1847 YY_BREAK 1848 case 99: 1849 YY_USER_ACTION 1850 # line 474 "scan.l" 1851 { 1852 ACTION_ECHO; 1853 if ( doing_codeblock ) 1854 BEGIN(CODEBLOCK_2); 1855 else 1856 BEGIN(ACTION); 1857 } 1858 YY_BREAK 1859 case 100: 1860 YY_USER_ACTION 1861 # line 482 "scan.l" 1862 ACTION_ECHO; 1863 YY_BREAK 1864 case 101: 1865 YY_USER_ACTION 1866 # line 483 "scan.l" 1867 ACTION_ECHO; 1868 YY_BREAK 1869 case 102: 1870 YY_USER_ACTION 1871 # line 484 "scan.l" 1872 ++linenum; ACTION_ECHO; 1873 YY_BREAK 1874 case 103: 1875 YY_USER_ACTION 1876 # line 486 "scan.l" 1877 ACTION_ECHO; 1878 YY_BREAK 1879 case 104: 1880 YY_USER_ACTION 1881 # line 487 "scan.l" 1882 ACTION_ECHO; 1883 YY_BREAK 1884 case 105: 1885 YY_USER_ACTION 1886 # line 488 "scan.l" 1887 ++linenum; ACTION_ECHO; 1888 YY_BREAK 1889 case 106: 1890 YY_USER_ACTION 1891 # line 489 "scan.l" 1892 ACTION_ECHO; BEGIN(ACTION); 1893 YY_BREAK 1894 case 107: 1895 YY_USER_ACTION 1896 # line 490 "scan.l" 1897 ACTION_ECHO; 1898 YY_BREAK 1899 case YY_STATE_EOF(ACTION): 1900 case YY_STATE_EOF(ACTION_COMMENT): 1901 case YY_STATE_EOF(ACTION_STRING): 1902 # line 492 "scan.l" 1903 { 1904 synerr( "EOF encountered inside an action" ); 1905 yyterminate(); 1906 } 1907 YY_BREAK 1908 case 108: 1909 YY_USER_ACTION 1910 # line 498 "scan.l" 1911 { 1912 yylval = myesc( (Char *) yytext ); 1913 return CHAR; 1914 } 1915 YY_BREAK 1916 case 109: 1917 YY_USER_ACTION 1918 # line 503 "scan.l" 1919 { 1920 yylval = myesc( (Char *) yytext ); 1921 BEGIN(CCL); 1922 return CHAR; 1923 } 1924 YY_BREAK 1925 case 110: 1926 YY_USER_ACTION 1927 # line 510 "scan.l" 1928 ECHO; 1929 YY_BREAK 1930 case YY_STATE_EOF(SECT3): 1931 # line 511 "scan.l" 1932 sectnum = 0; yyterminate(); 1933 YY_BREAK 1934 case 111: 1935 YY_USER_ACTION 1936 # line 513 "scan.l" 1937 format_synerr( "bad character: %s", yytext ); 1938 YY_BREAK 1939 case 112: 1940 YY_USER_ACTION 1941 # line 515 "scan.l" 1942 YY_FATAL_ERROR( "flex scanner jammed" ); 1943 YY_BREAK 1944 case YY_STATE_EOF(INITIAL): 1945 case YY_STATE_EOF(SECT2): 1946 case YY_STATE_EOF(CODEBLOCK): 1947 case YY_STATE_EOF(PICKUPDEF): 1948 case YY_STATE_EOF(SC): 1949 case YY_STATE_EOF(CARETISBOL): 1950 case YY_STATE_EOF(NUM): 1951 case YY_STATE_EOF(QUOTE): 1952 case YY_STATE_EOF(FIRSTCCL): 1953 case YY_STATE_EOF(CCL): 1954 case YY_STATE_EOF(RECOVER): 1955 case YY_STATE_EOF(BRACEERROR): 1956 case YY_STATE_EOF(C_COMMENT): 1957 case YY_STATE_EOF(PERCENT_BRACE_ACTION): 1958 case YY_STATE_EOF(USED_LIST): 1959 case YY_STATE_EOF(CODEBLOCK_2): 1960 yyterminate(); 1961 1962 case YY_END_OF_BUFFER: 1963 { 1964 /* Amount of text matched not including the EOB char. */ 1965 int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1; 1966 1967 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1968 *yy_cp = yy_hold_char; 1969 1970 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 1971 { 1972 /* We're scanning a new file or input source. It's 1973 * possible that this happened because the user 1974 * just pointed yyin at a new source and called 1975 * yylex(). If so, then we have to assure 1976 * consistency between yy_current_buffer and our 1977 * globals. Here is the right place to do so, because 1978 * this is the first action (other than possibly a 1979 * back-up) that will match for the new input source. 1980 */ 1981 yy_n_chars = yy_current_buffer->yy_n_chars; 1982 yy_current_buffer->yy_input_file = yyin; 1983 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 1984 } 1985 1986 /* Note that here we test for yy_c_buf_p "<=" to the position 1987 * of the first EOB in the buffer, since yy_c_buf_p will 1988 * already have been incremented past the NUL character 1989 * (since all states make transitions on EOB to the 1990 * end-of-buffer state). Contrast this with the test 1991 * in input(). 1992 */ 1993 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1994 { /* This was really a NUL. */ 1995 yy_state_type yy_next_state; 1996 1997 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 1998 1999 yy_current_state = yy_get_previous_state(); 2000 2001 /* Okay, we're now positioned to make the NUL 2002 * transition. We couldn't have 2003 * yy_get_previous_state() go ahead and do it 2004 * for us because it doesn't know how to deal 2005 * with the possibility of jamming (and we don't 2006 * want to build jamming into it because then it 2007 * will run more slowly). 2008 */ 2009 2010 yy_next_state = yy_try_NUL_trans( yy_current_state ); 2011 2012 yy_bp = yytext_ptr + YY_MORE_ADJ; 2013 2014 if ( yy_next_state ) 2015 { 2016 /* Consume the NUL. */ 2017 yy_cp = ++yy_c_buf_p; 2018 yy_current_state = yy_next_state; 2019 goto yy_match; 2020 } 2021 2022 else 2023 { 2024 yy_cp = yy_c_buf_p; 2025 goto yy_find_action; 2026 } 2027 } 2028 2029 else switch ( yy_get_next_buffer() ) 2030 { 2031 case EOB_ACT_END_OF_FILE: 2032 { 2033 yy_did_buffer_switch_on_eof = 0; 2034 2035 if ( yywrap() ) 2036 { 2037 /* Note: because we've taken care in 2038 * yy_get_next_buffer() to have set up 2039 * yytext, we can now set up 2040 * yy_c_buf_p so that if some total 2041 * hoser (like flex itself) wants to 2042 * call the scanner after we return the 2043 * YY_NULL, it'll still work - another 2044 * YY_NULL will get returned. 2045 */ 2046 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 2047 2048 yy_act = YY_STATE_EOF(YY_START); 2049 goto do_action; 2050 } 2051 2052 else 2053 { 2054 if ( ! yy_did_buffer_switch_on_eof ) 2055 YY_NEW_FILE; 2056 } 2057 break; 2058 } 2059 2060 case EOB_ACT_CONTINUE_SCAN: 2061 yy_c_buf_p = 2062 yytext_ptr + yy_amount_of_matched_text; 2063 2064 yy_current_state = yy_get_previous_state(); 2065 2066 yy_cp = yy_c_buf_p; 2067 yy_bp = yytext_ptr + YY_MORE_ADJ; 2068 goto yy_match; 2069 2070 case EOB_ACT_LAST_MATCH: 2071 yy_c_buf_p = 2072 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 2073 2074 yy_current_state = yy_get_previous_state(); 2075 2076 yy_cp = yy_c_buf_p; 2077 yy_bp = yytext_ptr + YY_MORE_ADJ; 2078 goto yy_find_action; 2079 } 2080 break; 2081 } 2082 2083 default: 2084 YY_FATAL_ERROR( 2085 "fatal flex scanner internal error--no action found" ); 2086 } /* end of action switch */ 2087 } /* end of scanning one token */ 2088 } /* end of yylex */ 2089 2090 2091 /* yy_get_next_buffer - try to read in a new buffer 2092 * 2093 * Returns a code representing an action: 2094 * EOB_ACT_LAST_MATCH - 2095 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 2096 * EOB_ACT_END_OF_FILE - end of file 2097 */ 2098 2099 static int yy_get_next_buffer() 2100 { 2101 register char *dest = yy_current_buffer->yy_ch_buf; 2102 register char *source = yytext_ptr - 1; /* copy prev. char, too */ 2103 register int number_to_move, i; 2104 int ret_val; 2105 2106 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 2107 YY_FATAL_ERROR( 2108 "fatal flex scanner internal error--end of buffer missed" ); 2109 2110 if ( yy_current_buffer->yy_fill_buffer == 0 ) 2111 { /* Don't try to fill the buffer, so this is an EOF. */ 2112 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 2113 { 2114 /* We matched a singled characater, the EOB, so 2115 * treat this as a final EOF. 2116 */ 2117 return EOB_ACT_END_OF_FILE; 2118 } 2119 2120 else 2121 { 2122 /* We matched some text prior to the EOB, first 2123 * process it. 2124 */ 2125 return EOB_ACT_LAST_MATCH; 2126 } 2127 } 2128 2129 /* Try to read more data. */ 2130 2131 /* First move last chars to start of buffer. */ 2132 number_to_move = yy_c_buf_p - yytext_ptr; 2133 2134 for ( i = 0; i < number_to_move; ++i ) 2135 *(dest++) = *(source++); 2136 2137 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 2138 /* don't do the read, it's not guaranteed to return an EOF, 2139 * just force an EOF 2140 */ 2141 yy_n_chars = 0; 2142 2143 else 2144 { 2145 int num_to_read = 2146 yy_current_buffer->yy_buf_size - number_to_move - 1; 2147 2148 while ( num_to_read <= 0 ) 2149 { /* Not enough room in the buffer - grow it. */ 2150 #ifdef YY_USES_REJECT 2151 YY_FATAL_ERROR( 2152 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 2153 #else 2154 2155 /* just a shorter name for the current buffer */ 2156 YY_BUFFER_STATE b = yy_current_buffer; 2157 2158 int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf; 2159 2160 b->yy_buf_size *= 2; 2161 b->yy_ch_buf = (char *) 2162 yy_flex_realloc( (void *) b->yy_ch_buf, 2163 b->yy_buf_size ); 2164 2165 if ( ! b->yy_ch_buf ) 2166 YY_FATAL_ERROR( 2167 "fatal error - scanner input buffer overflow" ); 2168 2169 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 2170 2171 num_to_read = yy_current_buffer->yy_buf_size - 2172 number_to_move - 1; 2173 #endif 2174 } 2175 2176 if ( num_to_read > YY_READ_BUF_SIZE ) 2177 num_to_read = YY_READ_BUF_SIZE; 2178 2179 /* Read in more data. */ 2180 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 2181 yy_n_chars, num_to_read ); 2182 } 2183 2184 if ( yy_n_chars == 0 ) 2185 { 2186 if ( number_to_move - YY_MORE_ADJ == 1 ) 2187 { 2188 ret_val = EOB_ACT_END_OF_FILE; 2189 yyrestart( yyin ); 2190 } 2191 2192 else 2193 { 2194 ret_val = EOB_ACT_LAST_MATCH; 2195 yy_current_buffer->yy_buffer_status = 2196 YY_BUFFER_EOF_PENDING; 2197 } 2198 } 2199 2200 else 2201 ret_val = EOB_ACT_CONTINUE_SCAN; 2202 2203 yy_n_chars += number_to_move; 2204 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 2205 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 2206 2207 /* yytext begins at the second character in yy_ch_buf; the first 2208 * character is the one which preceded it before reading in the latest 2209 * buffer; it needs to be kept around in case it's a newline, so 2210 * yy_get_previous_state() will have with '^' rules active. 2211 */ 2212 2213 yytext_ptr = &yy_current_buffer->yy_ch_buf[1]; 2214 2215 return ret_val; 2216 } 2217 2218 2219 /* yy_get_previous_state - get the state just before the EOB char was reached */ 2220 2221 static yy_state_type yy_get_previous_state() 2222 { 2223 register yy_state_type yy_current_state; 2224 register char *yy_cp; 2225 2226 register char *yy_bp = yytext_ptr; 2227 2228 yy_current_state = yy_start; 2229 if ( yy_bp[-1] == '\n' ) 2230 ++yy_current_state; 2231 2232 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 2233 { 2234 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 2235 if ( yy_accept[yy_current_state] ) 2236 { 2237 yy_last_accepting_state = yy_current_state; 2238 yy_last_accepting_cpos = yy_cp; 2239 } 2240 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 2241 { 2242 yy_current_state = (int) yy_def[yy_current_state]; 2243 if ( yy_current_state >= 408 ) 2244 yy_c = yy_meta[(unsigned int) yy_c]; 2245 } 2246 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 2247 } 2248 2249 return yy_current_state; 2250 } 2251 2252 2253 /* yy_try_NUL_trans - try to make a transition on the NUL character 2254 * 2255 * synopsis 2256 * next_state = yy_try_NUL_trans( current_state ); 2257 */ 2258 2259 #ifdef YY_USE_PROTOS 2260 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 2261 #else 2262 static yy_state_type yy_try_NUL_trans( yy_current_state ) 2263 yy_state_type yy_current_state; 2264 #endif 2265 { 2266 register int yy_is_jam; 2267 register char *yy_cp = yy_c_buf_p; 2268 2269 register YY_CHAR yy_c = 1; 2270 if ( yy_accept[yy_current_state] ) 2271 { 2272 yy_last_accepting_state = yy_current_state; 2273 yy_last_accepting_cpos = yy_cp; 2274 } 2275 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 2276 { 2277 yy_current_state = (int) yy_def[yy_current_state]; 2278 if ( yy_current_state >= 408 ) 2279 yy_c = yy_meta[(unsigned int) yy_c]; 2280 } 2281 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 2282 yy_is_jam = (yy_current_state == 407); 2283 2284 return yy_is_jam ? 0 : yy_current_state; 2285 } 2286 2287 2288 #ifdef YY_USE_PROTOS 2289 static void yyunput( int c, register char *yy_bp ) 2290 #else 2291 static void yyunput( c, yy_bp ) 2292 int c; 2293 register char *yy_bp; 2294 #endif 2295 { 2296 register char *yy_cp = yy_c_buf_p; 2297 2298 /* undo effects of setting up yytext */ 2299 *yy_cp = yy_hold_char; 2300 2301 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 2302 { /* need to shift things up to make room */ 2303 /* +2 for EOB chars. */ 2304 register int number_to_move = yy_n_chars + 2; 2305 register char *dest = &yy_current_buffer->yy_ch_buf[ 2306 yy_current_buffer->yy_buf_size + 2]; 2307 register char *source = 2308 &yy_current_buffer->yy_ch_buf[number_to_move]; 2309 2310 while ( source > yy_current_buffer->yy_ch_buf ) 2311 *--dest = *--source; 2312 2313 yy_cp += dest - source; 2314 yy_bp += dest - source; 2315 yy_n_chars = yy_current_buffer->yy_buf_size; 2316 2317 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 2318 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 2319 } 2320 2321 if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) 2322 yy_cp[-2] = '\n'; 2323 2324 *--yy_cp = (char) c; 2325 2326 2327 /* Note: the formal parameter *must* be called "yy_bp" for this 2328 * macro to now work correctly. 2329 */ 2330 YY_DO_BEFORE_ACTION; /* set up yytext again */ 2331 } 2332 2333 2334 #ifdef __cplusplus 2335 static int yyinput() 2336 #else 2337 static int input() 2338 #endif 2339 { 2340 int c; 2341 2342 *yy_c_buf_p = yy_hold_char; 2343 2344 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 2345 { 2346 /* yy_c_buf_p now points to the character we want to return. 2347 * If this occurs *before* the EOB characters, then it's a 2348 * valid NUL; if not, then we've hit the end of the buffer. 2349 */ 2350 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 2351 /* This was really a NUL. */ 2352 *yy_c_buf_p = '\0'; 2353 2354 else 2355 { /* need more input */ 2356 yytext_ptr = yy_c_buf_p; 2357 ++yy_c_buf_p; 2358 2359 switch ( yy_get_next_buffer() ) 2360 { 2361 case EOB_ACT_END_OF_FILE: 2362 { 2363 if ( yywrap() ) 2364 { 2365 yy_c_buf_p = 2366 yytext_ptr + YY_MORE_ADJ; 2367 return EOF; 2368 } 2369 2370 YY_NEW_FILE; 2371 #ifdef __cplusplus 2372 return yyinput(); 2373 #else 2374 return input(); 2375 #endif 2376 } 2377 2378 case EOB_ACT_CONTINUE_SCAN: 2379 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 2380 break; 2381 2382 case EOB_ACT_LAST_MATCH: 2383 #ifdef __cplusplus 2384 YY_FATAL_ERROR( 2385 "unexpected last match in yyinput()" ); 2386 #else 2387 YY_FATAL_ERROR( 2388 "unexpected last match in input()" ); 2389 #endif 2390 } 2391 } 2392 } 2393 2394 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 2395 *yy_c_buf_p = '\0'; /* preserve yytext */ 2396 yy_hold_char = *++yy_c_buf_p; 2397 2398 return c; 2399 } 2400 2401 2402 #ifdef YY_USE_PROTOS 2403 void yyrestart( FILE *input_file ) 2404 #else 2405 void yyrestart( input_file ) 2406 FILE *input_file; 2407 #endif 2408 { 2409 if ( ! yy_current_buffer ) 2410 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 2411 2412 yy_init_buffer( yy_current_buffer, input_file ); 2413 yy_load_buffer_state(); 2414 } 2415 2416 2417 #ifdef YY_USE_PROTOS 2418 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 2419 #else 2420 void yy_switch_to_buffer( new_buffer ) 2421 YY_BUFFER_STATE new_buffer; 2422 #endif 2423 { 2424 if ( yy_current_buffer == new_buffer ) 2425 return; 2426 2427 if ( yy_current_buffer ) 2428 { 2429 /* Flush out information for old buffer. */ 2430 *yy_c_buf_p = yy_hold_char; 2431 yy_current_buffer->yy_buf_pos = yy_c_buf_p; 2432 yy_current_buffer->yy_n_chars = yy_n_chars; 2433 } 2434 2435 yy_current_buffer = new_buffer; 2436 yy_load_buffer_state(); 2437 2438 /* We don't actually know whether we did this switch during 2439 * EOF (yywrap()) processing, but the only time this flag 2440 * is looked at is after yywrap() is called, so it's safe 2441 * to go ahead and always set it. 2442 */ 2443 yy_did_buffer_switch_on_eof = 1; 2444 } 2445 2446 2447 #ifdef YY_USE_PROTOS 2448 void yy_load_buffer_state( void ) 2449 #else 2450 void yy_load_buffer_state() 2451 #endif 2452 { 2453 yy_n_chars = yy_current_buffer->yy_n_chars; 2454 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 2455 yyin = yy_current_buffer->yy_input_file; 2456 yy_hold_char = *yy_c_buf_p; 2457 } 2458 2459 2460 #ifdef YY_USE_PROTOS 2461 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 2462 #else 2463 YY_BUFFER_STATE yy_create_buffer( file, size ) 2464 FILE *file; 2465 int size; 2466 #endif 2467 { 2468 YY_BUFFER_STATE b; 2469 2470 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 2471 2472 if ( ! b ) 2473 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 2474 2475 b->yy_buf_size = size; 2476 2477 /* yy_ch_buf has to be 2 characters longer than the size given because 2478 * we need to put in 2 end-of-buffer characters. 2479 */ 2480 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 2481 2482 if ( ! b->yy_ch_buf ) 2483 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 2484 2485 yy_init_buffer( b, file ); 2486 2487 return b; 2488 } 2489 2490 2491 #ifdef YY_USE_PROTOS 2492 void yy_delete_buffer( YY_BUFFER_STATE b ) 2493 #else 2494 void yy_delete_buffer( b ) 2495 YY_BUFFER_STATE b; 2496 #endif 2497 { 2498 if ( b == yy_current_buffer ) 2499 yy_current_buffer = (YY_BUFFER_STATE) 0; 2500 2501 yy_flex_free( (void *) b->yy_ch_buf ); 2502 yy_flex_free( (void *) b ); 2503 } 2504 2505 2506 #ifdef YY_USE_PROTOS 2507 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 2508 #else 2509 void yy_init_buffer( b, file ) 2510 YY_BUFFER_STATE b; 2511 FILE *file; 2512 #endif 2513 { 2514 b->yy_input_file = file; 2515 2516 /* We put in the '\n' and start reading from [1] so that an 2517 * initial match-at-newline will be true. 2518 */ 2519 2520 b->yy_ch_buf[0] = '\n'; 2521 b->yy_n_chars = 1; 2522 2523 /* We always need two end-of-buffer characters. The first causes 2524 * a transition to the end-of-buffer state. The second causes 2525 * a jam in that state. 2526 */ 2527 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 2528 b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; 2529 2530 b->yy_buf_pos = &b->yy_ch_buf[1]; 2531 2532 b->yy_is_interactive = file ? isatty( fileno(file) ) : 0; 2533 2534 b->yy_fill_buffer = 1; 2535 2536 b->yy_buffer_status = YY_BUFFER_NEW; 2537 } 2538 2539 2540 #ifdef YY_USE_PROTOS 2541 static void yy_push_state( int new_state ) 2542 #else 2543 static void yy_push_state( new_state ) 2544 int new_state; 2545 #endif 2546 { 2547 if ( yy_start_stack_ptr >= yy_start_stack_depth ) 2548 { 2549 int new_size; 2550 2551 yy_start_stack_depth += YY_START_STACK_INCR; 2552 new_size = yy_start_stack_depth * sizeof( int ); 2553 2554 if ( ! yy_start_stack ) 2555 yy_start_stack = (int *) yy_flex_alloc( new_size ); 2556 2557 else 2558 yy_start_stack = (int *) yy_flex_realloc( 2559 (void *) yy_start_stack, new_size ); 2560 2561 if ( ! yy_start_stack ) 2562 YY_FATAL_ERROR( 2563 "out of memory expanding start-condition stack" ); 2564 } 2565 2566 yy_start_stack[yy_start_stack_ptr++] = YY_START; 2567 2568 BEGIN(new_state); 2569 } 2570 2571 2572 static void yy_pop_state() 2573 { 2574 if ( --yy_start_stack_ptr < 0 ) 2575 YY_FATAL_ERROR( "start-condition stack underflow" ); 2576 2577 BEGIN(yy_start_stack[yy_start_stack_ptr]); 2578 } 2579 2580 2581 static int yy_top_state() 2582 { 2583 return yy_start_stack[yy_start_stack_ptr - 1]; 2584 } 2585 2586 2587 #ifdef YY_USE_PROTOS 2588 static void yy_fatal_error( const char msg[] ) 2589 #else 2590 static void yy_fatal_error( msg ) 2591 char msg[]; 2592 #endif 2593 { 2594 (void) fprintf( stderr, "%s\n", msg ); 2595 exit( 1 ); 2596 } 2597 2598 2599 2600 /* Redefine yyless() so it works in section 3 code. */ 2601 2602 #undef yyless 2603 #define yyless(n) \ 2604 do \ 2605 { \ 2606 /* Undo effects of setting up yytext. */ \ 2607 yytext[yyleng] = yy_hold_char; \ 2608 yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ 2609 yy_hold_char = *yy_c_buf_p; \ 2610 *yy_c_buf_p = '\0'; \ 2611 yyleng = n; \ 2612 } \ 2613 while ( 0 ) 2614 2615 2616 /* Internal utility routines. */ 2617 2618 #ifndef yytext_ptr 2619 #ifdef YY_USE_PROTOS 2620 static void yy_flex_strncpy( char *s1, const char *s2, int n ) 2621 #else 2622 static void yy_flex_strncpy( s1, s2, n ) 2623 char *s1; 2624 const char *s2; 2625 int n; 2626 #endif 2627 { 2628 register int i; 2629 for ( i = 0; i < n; ++i ) 2630 s1[i] = s2[i]; 2631 } 2632 #endif 2633 2634 2635 #ifdef YY_USE_PROTOS 2636 static void *yy_flex_alloc( unsigned int size ) 2637 #else 2638 static void *yy_flex_alloc( size ) 2639 unsigned int size; 2640 #endif 2641 { 2642 return (void *) malloc( size ); 2643 } 2644 2645 #ifdef YY_USE_PROTOS 2646 static void *yy_flex_realloc( void *ptr, unsigned int size ) 2647 #else 2648 static void *yy_flex_realloc( ptr, size ) 2649 void *ptr; 2650 unsigned int size; 2651 #endif 2652 { 2653 return (void *) realloc( ptr, size ); 2654 } 2655 2656 #ifdef YY_USE_PROTOS 2657 static void yy_flex_free( void *ptr ) 2658 #else 2659 static void yy_flex_free( ptr ) 2660 void *ptr; 2661 #endif 2662 { 2663 free( ptr ); 2664 } 2665 # line 515 "scan.l" 2666 2667 2668 2669 int yywrap() 2670 { 2671 if ( --num_input_files > 0 ) 2672 { 2673 set_input_file( *++input_files ); 2674 return 0; 2675 } 2676 2677 else 2678 return 1; 2679 } 2680 2681 2682 /* set_input_file - open the given file (if NULL, stdin) for scanning */ 2683 2684 void set_input_file( file ) 2685 char *file; 2686 { 2687 if ( file ) 2688 { 2689 infilename = file; 2690 yyin = fopen( infilename, "r" ); 2691 2692 if ( yyin == NULL ) 2693 lerrsf( "can't open %s", file ); 2694 } 2695 2696 else 2697 { 2698 yyin = stdin; 2699 infilename = "<stdin>"; 2700 } 2701 } 2702 2703 2704 /* Wrapper routines for accessing the scanner's malloc routines. */ 2705 2706 void *flex_alloc( size ) 2707 unsigned int size; 2708 { 2709 return yy_flex_alloc( size ); 2710 } 2711 2712 void *flex_realloc( ptr, size ) 2713 void *ptr; 2714 unsigned int size; 2715 { 2716 return yy_flex_realloc( ptr, size ); 2717 } 2718 2719 void flex_free( ptr ) 2720 void *ptr; 2721 { 2722 yy_flex_free( ptr ); 2723 } 2724