1 /* A lexical scanner generated by flex */
3 /* scanner skeleton version:
4 * $Id: initscan.c,v 1.2 1994/06/24 10:57:01 ceriel Exp $
12 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
25 /* use prototypes in function declarations */
28 /* the "const" storage-class-modifier is valid */
31 #else /* ! __cplusplus */
37 void *malloc( size_t );
47 #endif /* ! __cplusplus */
61 #define YY_PROTO(proto) proto
63 #define YY_PROTO(proto) ()
64 /* we can't get here if it's an ANSI C compiler, or a C++ compiler,
65 * so it's got to be a K&R compiler, and therefore there's no standard
66 * place from which to include these definitions
74 /* amount of stuff to slurp up with each read */
75 #ifndef YY_READ_BUF_SIZE
76 #define YY_READ_BUF_SIZE 8192
79 /* returned upon end-of-file */
82 /* copy whatever the last rule matched to the standard output */
84 /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
85 /* this used to be an fputs(), but since the string might contain NUL's,
88 #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
90 /* gets input and stuffs it into "buf". number of characters read, or YY_NULL,
91 * is returned in "result".
93 #define YY_INPUT(buf,result,max_size) \
94 if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
95 YY_FATAL_ERROR( "read() in flex scanner failed" );
98 /* no semi-colon after return; correct usage is to write "yyterminate();" -
99 * we don't want an extra ';' after the "return" because that will cause
100 * some compilers to complain about unreachable statements.
102 #define yyterminate() return ( YY_NULL )
104 /* report a fatal error */
106 /* The funky do-while is used to turn this macro definition into
107 * a single C statement (which needs a semi-colon terminator).
108 * This avoids problems with code like:
110 * if ( something_happens )
111 * YY_FATAL_ERROR( "oops, the something happened" );
115 * Prior to using the do-while the compiler would get upset at the
116 * "else" because it interpreted the "if" statement as being all
117 * done when it reached the ';' after the YY_FATAL_ERROR() call.
120 #define YY_FATAL_ERROR(msg) \
123 (void) fputs( msg, stderr ); \
124 (void) putc( '\n', stderr ); \
129 /* default yywrap function - always treat EOF as an EOF */
132 /* enter a start condition. This macro really ought to take a parameter,
133 * but we do it the disgusting crufty way forced on us by the ()-less
134 * definition of BEGIN
136 #define BEGIN yy_start = 1 + 2 *
138 /* action number for EOF rule of a given start state */
139 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
141 /* special action meaning "start processing a new file" */
142 #define YY_NEW_FILE \
145 yy_init_buffer( yy_current_buffer, yyin ); \
146 yy_load_buffer_state(); \
150 /* default declaration of generated scanner - a define so the user can
151 * easily add parameters
153 #define YY_DECL int yylex YY_PROTO(( void ))
155 /* code executed at the end of each rule */
156 #define YY_BREAK break;
158 #define YY_END_OF_BUFFER_CHAR 0
161 #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
164 typedef struct yy_buffer_state *YY_BUFFER_STATE;
166 #define YY_CHAR unsigned char
169 /* scan.l - scanner for flex input */
172 * Copyright (c) 1990 The Regents of the University of California.
173 * All rights reserved.
175 * This code is derived from software contributed to Berkeley by
178 * The United States Government has rights in this work pursuant
179 * to contract no. DE-AC03-76SF00098 between the United States
180 * Department of Energy and the University of California.
182 * Redistribution and use in source and binary forms are permitted provided
183 * that: (1) source distributions retain this entire copyright notice and
184 * comment, and (2) distributions including binaries display the following
185 * acknowledgement: ``This product includes software developed by the
186 * University of California, Berkeley and its contributors'' in the
187 * documentation or other materials provided with the distribution and in
188 * all advertising materials mentioning features or use of this software.
189 * Neither the name of the University nor the names of its contributors may
190 * be used to endorse or promote products derived from this software without
191 * specific prior written permission.
192 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
193 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
194 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
198 static char rcsid[] =
199 "@(#) $Id: initscan.c,v 1.2 1994/06/24 10:57:01 ceriel Exp $ (LBL)";
207 #define ACTION_ECHO fprintf( temp_action_file, "%s", yytext )
208 #define MARK_END_OF_PROLOG fprintf( temp_action_file, "%%%% end of prolog\n" );
215 yylval = yytext[0]; \
219 (void) strcpy( nmstr, (char *) yytext ); \
222 #define PUT_BACK_STRING(str, start) \
223 for ( i = strlen( (char *) (str) ) - 1; i >= start; --i ) \
226 #define CHECK_REJECT(str) \
227 if ( all_upper( str ) ) \
230 #define CHECK_YYMORE(str) \
231 if ( all_lower( str ) ) \
234 #define SECT2PROLOG 2
246 #define BRACEERROR 14
248 #define ACTION_COMMENT 16
249 #define ACTION_STRING 17
250 #define PERCENT_BRACE_ACTION 18
252 #define CODEBLOCK_2 20
256 /* done after the current pattern has been matched and before the
257 * corresponding action - sets up yytext
259 #define YY_DO_BEFORE_ACTION \
261 yyleng = yy_cp - yy_bp; \
262 yy_hold_char = *yy_cp; \
266 #define EOB_ACT_CONTINUE_SCAN 0
267 #define EOB_ACT_END_OF_FILE 1
268 #define EOB_ACT_LAST_MATCH 2
270 /* return all but the first 'n' matched characters back to the input stream */
274 /* undo effects of setting up yytext */ \
275 *yy_cp = yy_hold_char; \
276 yy_c_buf_p = yy_cp = yy_bp + n; \
277 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
281 #define unput(c) yyunput( c, yytext )
284 struct yy_buffer_state
288 YY_CHAR *yy_ch_buf; /* input buffer */
289 YY_CHAR *yy_buf_pos; /* current position in input buffer */
291 /* size of input buffer in bytes, not including room for EOB characters*/
294 /* number of characters read into yy_ch_buf, not including EOB characters */
297 int yy_eof_status; /* whether we've seen an EOF on this buffer */
298 #define EOF_NOT_SEEN 0
299 /* "pending" happens when the EOF has been seen but there's still
302 #define EOF_PENDING 1
306 static YY_BUFFER_STATE yy_current_buffer;
308 /* we provide macros for accessing buffer states in case in the
309 * future we want to put the buffer states in a more general
312 #define YY_CURRENT_BUFFER yy_current_buffer
315 /* yy_hold_char holds the character lost when yytext is formed */
316 static YY_CHAR yy_hold_char;
318 static int yy_n_chars; /* number of characters read into yy_ch_buf */
322 #ifndef YY_USER_ACTION
323 #define YY_USER_ACTION
330 extern YY_CHAR *yytext;
332 extern FILE *yyin, *yyout;
337 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
339 #define YY_END_OF_BUFFER 121
340 typedef int yy_state_type;
341 static const short int yy_accept[341] =
343 0, 0, 0, 0, 0, 0, 119, 119, 0, 0,
344 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
345 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
346 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
347 0, 0, 0, 0, 121, 19, 7, 18, 19, 16,
348 1, 17, 19, 19, 19, 15, 67, 59, 60, 53,
349 67, 66, 51, 67, 67, 67, 50, 49, 67, 52,
350 120, 47, 119, 119, 28, 29, 28, 28, 28, 28,
351 31, 30, 32, 73, 120, 69, 70, 72, 74, 88,
352 89, 86, 85, 87, 75, 77, 76, 75, 81, 80,
354 81, 81, 83, 83, 83, 84, 99, 104, 103, 105,
355 105, 100, 100, 100, 97, 98, 120, 33, 91, 90,
356 22, 24, 23, 107, 109, 108, 111, 113, 114, 115,
357 95, 95, 96, 95, 95, 95, 95, 38, 35, 34,
358 38, 38, 44, 42, 45, 44, 44, 41, 41, 41,
359 40, 41, 7, 18, 0, 16, 1, 17, 0, 2,
360 14, 8, 0, 12, 4, 0, 0, 5, 0, 3,
361 15, 59, 60, 0, 0, 56, 0, 0, 0, 117,
362 117, 117, 55, 54, 55, 50, 49, 63, 50, 0,
363 47, 46, 119, 119, 28, 28, 28, 28, 28, 31,
365 30, 71, 72, 85, 118, 118, 118, 78, 79, 82,
366 99, 0, 102, 0, 101, 100, 100, 100, 0, 33,
367 22, 20, 107, 106, 111, 112, 95, 95, 95, 92,
368 95, 95, 95, 38, 35, 38, 38, 42, 0, 43,
369 43, 43, 42, 40, 0, 13, 14, 8, 8, 0,
370 12, 4, 0, 0, 0, 5, 0, 6, 57, 0,
371 58, 0, 64, 0, 0, 117, 117, 55, 55, 65,
372 63, 28, 28, 28, 25, 0, 118, 118, 100, 100,
373 0, 21, 92, 92, 95, 95, 38, 38, 0, 39,
374 43, 43, 0, 11, 4, 0, 11, 0, 0, 5,
376 0, 0, 0, 117, 28, 28, 118, 100, 100, 95,
377 95, 38, 38, 43, 0, 9, 0, 0, 0, 28,
378 28, 100, 100, 95, 95, 38, 38, 0, 0, 26,
379 27, 93, 94, 93, 94, 36, 37, 10, 62, 0
382 static const YY_CHAR yy_ec[256] =
384 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
385 1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 1, 5, 1, 6, 7, 8, 9, 1, 10, 11,
388 11, 12, 11, 13, 14, 11, 15, 16, 16, 16,
389 16, 16, 16, 16, 16, 16, 16, 1, 1, 17,
390 1, 18, 11, 1, 24, 25, 26, 27, 28, 29,
391 23, 23, 23, 30, 31, 23, 32, 33, 34, 31,
392 23, 35, 36, 37, 38, 23, 23, 39, 40, 23,
393 19, 20, 21, 22, 23, 1, 24, 25, 26, 27,
395 28, 29, 23, 23, 23, 30, 31, 23, 32, 33,
396 34, 31, 23, 35, 36, 37, 38, 23, 23, 39,
397 40, 23, 41, 42, 43, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 static const YY_CHAR yy_meta[44] =
416 1, 2, 3, 2, 2, 4, 1, 1, 1, 5,
417 1, 6, 1, 7, 5, 8, 1, 1, 1, 9,
418 10, 1, 11, 12, 12, 12, 12, 12, 12, 11,
419 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
423 static const short int yy_base[404] =
425 0, 43, 85, 126, 1371, 1370, 1369, 1353, 168, 1346,
426 104, 108, 211, 0, 1332, 1320, 120, 252, 95, 119,
427 137, 144, 100, 141, 295, 0, 1327, 1323, 113, 336,
428 254, 255, 257, 258, 253, 268, 379, 0, 338, 421,
429 0, 0, 273, 460, 1325, 1442, 281, 1442, 1287, 0,
430 287, 1442, 1279, 472, 1257, 0, 1442, 425, 1442, 1442,
431 147, 1442, 1239, 1235, 78, 513, 433, 1442, 83, 1442,
432 1248, 0, 1247, 1442, 0, 1442, 0, 1218, 1205, 1194,
433 0, 342, 1442, 1442, 1442, 1442, 1202, 0, 1442, 1442,
434 1442, 1442, 1201, 1442, 1442, 1442, 1442, 79, 1442, 1442,
436 103, 1198, 1442, 0, 248, 1442, 0, 1442, 1442, 252,
437 1199, 0, 1173, 1158, 1442, 1442, 1185, 1442, 1442, 1442,
438 0, 1442, 1170, 0, 1442, 1152, 0, 1442, 1442, 0,
439 0, 346, 1442, 1123, 0, 1125, 1105, 0, 352, 1442,
440 1116, 1103, 1442, 356, 1442, 1100, 329, 1442, 360, 1093,
441 1101, 333, 441, 1442, 445, 0, 449, 1442, 1101, 1442,
442 365, 453, 1094, 466, 0, 480, 330, 0, 1095, 1442,
443 0, 555, 1442, 1044, 1077, 1442, 1051, 133, 456, 1442,
444 1059, 0, 0, 1442, 584, 563, 1442, 0, 1442, 1071,
445 0, 1442, 1063, 1442, 0, 0, 1010, 1007, 627, 0,
447 484, 1442, 0, 998, 1442, 992, 0, 1442, 1442, 1442,
448 0, 421, 1442, 0, 1442, 0, 971, 964, 992, 1442,
449 0, 962, 0, 1442, 0, 1442, 0, 488, 921, 670,
450 0, 717, 714, 0, 497, 715, 712, 569, 573, 1442,
451 727, 0, 577, 726, 581, 1442, 585, 0, 590, 738,
452 597, 0, 712, 683, 691, 0, 670, 1442, 1442, 623,
453 1442, 591, 1442, 458, 702, 590, 0, 0, 0, 1442,
454 0, 576, 569, 0, 1442, 593, 575, 0, 560, 546,
455 567, 1442, 0, 0, 541, 529, 534, 527, 730, 1442,
456 500, 0, 509, 1442, 0, 734, 1442, 468, 467, 0,
458 462, 704, 724, 1442, 461, 438, 1442, 440, 425, 433,
459 405, 413, 398, 1442, 404, 1442, 359, 259, 332, 338,
460 346, 334, 331, 257, 253, 226, 137, 133, 81, 0,
461 0, 0, 0, 0, 0, 0, 0, 1442, 1442, 1442,
462 753, 766, 779, 792, 805, 818, 831, 844, 857, 870,
463 883, 896, 909, 922, 935, 948, 955, 967, 980, 986,
464 998, 1011, 1024, 1037, 1050, 1063, 1070, 1082, 1089, 1101,
465 1114, 1127, 1140, 1150, 1157, 1169, 1182, 1195, 1208, 1221,
466 1234, 1241, 1253, 1266, 1279, 1282, 1284, 1296, 1309, 1315,
467 1327, 1339, 1345, 1357, 1363, 1375, 1382, 1388, 1393, 1405,
472 static const short int yy_def[404] =
474 340, 340, 341, 341, 342, 342, 343, 343, 340, 9,
475 344, 344, 340, 13, 345, 345, 346, 346, 347, 347,
476 348, 348, 349, 349, 340, 25, 350, 350, 345, 345,
477 351, 351, 352, 352, 353, 353, 340, 37, 354, 354,
478 37, 37, 355, 356, 340, 340, 340, 340, 340, 357,
479 340, 340, 358, 359, 340, 360, 340, 340, 340, 340,
480 340, 340, 340, 361, 362, 340, 340, 340, 340, 340,
481 363, 364, 365, 340, 366, 340, 367, 367, 367, 366,
482 368, 340, 340, 340, 340, 340, 340, 369, 340, 340,
483 340, 340, 340, 340, 340, 340, 340, 362, 340, 340,
485 370, 371, 340, 372, 362, 340, 373, 340, 340, 374,
486 340, 375, 375, 375, 340, 340, 376, 340, 340, 340,
487 377, 340, 340, 378, 340, 340, 379, 340, 340, 380,
488 381, 381, 340, 381, 382, 382, 382, 383, 340, 340,
489 383, 383, 340, 340, 340, 340, 384, 340, 340, 340,
490 340, 384, 340, 340, 340, 357, 340, 340, 358, 340,
491 340, 385, 340, 340, 386, 340, 340, 387, 388, 340,
492 360, 340, 340, 340, 389, 340, 340, 361, 361, 340,
493 340, 390, 391, 340, 391, 340, 340, 392, 340, 363,
494 364, 340, 365, 340, 366, 367, 367, 367, 340, 368,
496 340, 340, 369, 340, 340, 340, 393, 340, 340, 340,
497 373, 374, 340, 374, 340, 375, 375, 375, 376, 340,
498 377, 394, 378, 340, 379, 340, 381, 381, 381, 340,
499 382, 382, 382, 383, 340, 383, 383, 340, 340, 340,
500 340, 395, 340, 340, 340, 340, 340, 385, 385, 396,
501 340, 397, 396, 340, 340, 398, 388, 340, 340, 389,
502 340, 340, 340, 361, 361, 340, 399, 391, 185, 340,
503 392, 367, 367, 199, 340, 400, 340, 401, 375, 375,
504 394, 340, 230, 402, 382, 382, 383, 383, 340, 340,
505 340, 403, 396, 340, 397, 396, 340, 340, 340, 398,
507 340, 361, 265, 340, 367, 367, 340, 375, 375, 382,
508 382, 383, 383, 340, 340, 340, 340, 361, 361, 367,
509 367, 375, 375, 382, 382, 383, 383, 340, 340, 367,
510 367, 375, 375, 382, 382, 383, 383, 340, 340, 0,
511 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
512 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
513 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
514 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
515 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
516 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
521 static const short int yy_nxt[1486] =
523 46, 47, 48, 47, 47, 46, 46, 46, 49, 46,
524 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
525 46, 46, 50, 50, 50, 50, 50, 50, 50, 50,
526 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
527 46, 46, 46, 46, 51, 52, 51, 51, 46, 53,
528 46, 54, 46, 46, 46, 46, 46, 55, 46, 46,
529 46, 46, 46, 46, 46, 56, 56, 56, 56, 56,
530 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
531 56, 56, 56, 46, 46, 46, 58, 59, 58, 58,
532 60, 188, 61, 181, 181, 62, 62, 96, 339, 62,
534 97, 63, 85, 64, 65, 82, 83, 82, 82, 82,
535 83, 82, 82, 104, 98, 119, 182, 182, 206, 105,
536 106, 96, 91, 189, 97, 66, 62, 67, 68, 67,
537 67, 60, 92, 61, 69, 93, 62, 62, 98, 85,
538 62, 207, 63, 85, 64, 65, 85, 70, 176, 176,
539 100, 176, 179, 263, 104, 120, 101, 100, 102, 338,
540 105, 106, 94, 101, 337, 102, 66, 62, 75, 75,
541 76, 75, 75, 75, 75, 75, 75, 75, 75, 75,
542 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
543 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
545 77, 77, 78, 77, 77, 77, 77, 79, 75, 75,
546 75, 84, 84, 85, 84, 84, 84, 84, 84, 84,
547 84, 84, 84, 86, 84, 84, 84, 84, 87, 84,
548 84, 84, 84, 88, 88, 88, 88, 88, 88, 88,
549 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
550 88, 84, 84, 84, 91, 128, 122, 122, 129, 125,
551 125, 213, 336, 181, 92, 123, 123, 93, 126, 126,
552 128, 214, 130, 129, 144, 145, 144, 144, 179, 263,
553 335, 146, 153, 154, 153, 153, 182, 130, 157, 158,
554 157, 157, 147, 334, 94, 107, 107, 108, 107, 107,
556 109, 107, 107, 107, 110, 107, 107, 107, 107, 111,
557 107, 107, 107, 107, 107, 107, 107, 112, 112, 112,
558 112, 112, 112, 112, 112, 112, 112, 112, 112, 113,
559 112, 112, 112, 112, 114, 115, 107, 116, 119, 139,
560 140, 139, 139, 201, 241, 201, 201, 228, 241, 228,
561 228, 179, 263, 235, 229, 235, 235, 238, 333, 238,
562 238, 243, 254, 243, 243, 255, 247, 242, 247, 247,
563 332, 242, 141, 331, 330, 244, 329, 142, 120, 131,
564 132, 133, 132, 132, 131, 131, 131, 134, 131, 131,
565 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
567 131, 135, 135, 135, 135, 135, 135, 135, 135, 135,
568 135, 135, 135, 136, 135, 135, 135, 135, 137, 131,
569 131, 131, 139, 140, 139, 139, 172, 173, 172, 172,
570 213, 328, 327, 174, 186, 187, 186, 186, 326, 325,
571 214, 174, 153, 154, 153, 153, 245, 246, 245, 245,
572 157, 158, 157, 157, 249, 141, 249, 249, 324, 323,
573 142, 149, 145, 149, 149, 322, 175, 251, 150, 251,
574 251, 264, 321, 302, 175, 151, 178, 179, 263, 152,
575 162, 245, 246, 245, 253, 201, 320, 201, 201, 228,
576 317, 228, 228, 316, 265, 163, 229, 164, 235, 163,
578 235, 235, 163, 315, 163, 163, 164, 165, 166, 167,
579 168, 294, 169, 183, 183, 240, 183, 183, 183, 183,
580 183, 183, 183, 183, 183, 183, 183, 183, 184, 183,
581 183, 183, 183, 183, 183, 185, 185, 185, 185, 185,
582 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
583 185, 185, 185, 183, 183, 183, 172, 173, 172, 172,
584 313, 312, 311, 174, 186, 187, 186, 186, 310, 282,
585 238, 174, 238, 238, 289, 290, 289, 289, 243, 309,
586 243, 243, 245, 246, 245, 245, 247, 308, 247, 247,
587 205, 249, 244, 249, 249, 275, 175, 269, 251, 269,
589 251, 251, 306, 305, 175, 180, 269, 269, 269, 269,
590 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
591 269, 269, 269, 269, 301, 261, 270, 274, 274, 275,
592 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
593 274, 274, 274, 274, 274, 274, 274, 274, 274, 276,
594 276, 276, 276, 276, 276, 276, 276, 276, 276, 276,
595 276, 276, 276, 276, 276, 276, 276, 274, 274, 274,
596 283, 283, 258, 283, 283, 283, 283, 283, 283, 283,
597 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
598 283, 283, 284, 284, 284, 284, 284, 284, 284, 284,
600 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
601 283, 283, 283, 296, 297, 296, 296, 303, 299, 318,
602 298, 179, 263, 179, 263, 303, 303, 303, 303, 303,
603 303, 289, 290, 289, 289, 296, 297, 296, 296, 319,
604 294, 244, 291, 288, 287, 286, 285, 319, 319, 319,
605 319, 319, 319, 57, 57, 57, 57, 57, 57, 57,
606 57, 57, 57, 57, 57, 57, 71, 71, 71, 71,
607 71, 71, 71, 71, 71, 71, 71, 71, 71, 73,
608 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
609 73, 73, 81, 81, 81, 81, 81, 81, 81, 81,
611 81, 81, 81, 81, 81, 85, 85, 85, 85, 85,
612 85, 85, 85, 85, 85, 85, 85, 85, 90, 90,
613 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
614 90, 95, 95, 95, 95, 95, 95, 95, 95, 95,
615 95, 95, 95, 95, 99, 99, 99, 99, 99, 99,
616 99, 99, 99, 99, 99, 99, 99, 103, 103, 103,
617 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
618 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
619 117, 117, 117, 121, 121, 121, 121, 121, 121, 121,
620 121, 121, 121, 121, 121, 121, 124, 124, 124, 124,
622 124, 124, 124, 124, 124, 124, 124, 124, 124, 127,
623 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
624 127, 127, 138, 138, 138, 138, 138, 138, 138, 138,
625 138, 138, 138, 138, 138, 143, 143, 143, 143, 143,
626 143, 143, 143, 143, 143, 143, 143, 143, 148, 148,
627 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
628 148, 156, 156, 230, 282, 156, 156, 159, 159, 159,
629 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
630 161, 161, 161, 161, 161, 161, 161, 161, 161, 161,
631 161, 161, 171, 171, 220, 280, 171, 171, 178, 178,
633 279, 178, 178, 178, 178, 178, 178, 277, 178, 178,
634 178, 180, 180, 204, 180, 180, 180, 180, 180, 180,
635 180, 180, 180, 180, 190, 190, 190, 190, 190, 190,
636 190, 190, 190, 190, 190, 190, 190, 192, 273, 272,
637 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
638 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
639 193, 193, 193, 195, 195, 194, 195, 195, 195, 195,
640 195, 195, 195, 191, 266, 195, 196, 196, 262, 261,
641 196, 196, 200, 200, 259, 200, 200, 200, 200, 200,
642 200, 200, 200, 200, 200, 203, 203, 258, 250, 203,
644 203, 205, 205, 160, 205, 205, 205, 205, 205, 205,
645 205, 205, 205, 205, 208, 208, 244, 208, 208, 208,
646 208, 208, 208, 208, 208, 208, 208, 210, 210, 239,
647 210, 210, 210, 210, 210, 210, 239, 210, 210, 210,
648 211, 211, 237, 236, 233, 211, 211, 211, 211, 211,
649 212, 212, 232, 212, 212, 212, 212, 212, 212, 212,
650 212, 212, 212, 216, 216, 230, 224, 216, 216, 219,
651 219, 219, 219, 219, 219, 219, 219, 219, 219, 219,
652 219, 219, 221, 221, 222, 221, 221, 220, 221, 221,
653 221, 221, 221, 221, 221, 223, 223, 218, 223, 223,
655 217, 223, 223, 223, 223, 223, 223, 223, 225, 225,
656 215, 209, 225, 225, 225, 225, 204, 225, 225, 225,
657 225, 226, 226, 202, 226, 226, 226, 226, 226, 226,
658 226, 226, 226, 226, 227, 227, 199, 227, 227, 227,
659 227, 227, 227, 227, 198, 197, 227, 231, 231, 194,
660 191, 231, 231, 234, 179, 177, 234, 234, 234, 234,
661 234, 234, 234, 234, 234, 234, 240, 240, 170, 240,
662 240, 240, 240, 240, 240, 240, 240, 240, 240, 248,
663 248, 160, 248, 248, 248, 248, 248, 248, 248, 248,
664 248, 248, 252, 252, 256, 256, 257, 257, 257, 257,
666 257, 257, 257, 257, 257, 257, 257, 257, 257, 260,
667 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
668 260, 260, 267, 155, 340, 118, 267, 268, 268, 118,
669 268, 268, 268, 268, 268, 268, 268, 268, 268, 271,
670 271, 89, 271, 271, 271, 271, 271, 271, 271, 271,
671 271, 271, 278, 89, 80, 74, 278, 281, 281, 281,
672 281, 281, 281, 281, 281, 281, 281, 281, 281, 281,
673 292, 74, 72, 72, 292, 293, 293, 293, 293, 293,
674 293, 293, 293, 293, 293, 293, 293, 293, 295, 295,
675 340, 340, 295, 295, 300, 300, 340, 340, 300, 300,
677 304, 340, 340, 340, 304, 276, 276, 276, 276, 276,
678 276, 276, 276, 276, 276, 276, 276, 276, 307, 340,
679 340, 340, 307, 284, 284, 340, 284, 284, 284, 284,
680 284, 284, 284, 284, 284, 284, 314, 340, 340, 340,
681 314, 45, 340, 340, 340, 340, 340, 340, 340, 340,
682 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
683 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
684 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
685 340, 340, 340, 340, 340
688 static const short int yy_chk[1486] =
690 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
691 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
692 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
693 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
694 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
695 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
696 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
697 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
698 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,
699 3, 69, 3, 65, 98, 3, 3, 19, 329, 3,
701 19, 3, 23, 3, 3, 11, 11, 11, 11, 12,
702 12, 12, 12, 23, 19, 29, 65, 98, 101, 23,
703 23, 20, 17, 69, 20, 3, 3, 4, 4, 4,
704 4, 4, 17, 4, 4, 17, 4, 4, 20, 21,
705 4, 101, 4, 24, 4, 4, 22, 4, 61, 61,
706 21, 61, 178, 178, 24, 29, 21, 22, 21, 328,
707 24, 24, 17, 22, 327, 22, 4, 4, 9, 9,
708 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
709 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
710 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
712 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
713 9, 13, 13, 13, 13, 13, 13, 13, 13, 13,
714 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
715 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
716 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
717 13, 13, 13, 13, 18, 35, 31, 32, 35, 33,
718 34, 110, 326, 105, 18, 31, 32, 18, 33, 34,
719 36, 110, 35, 36, 43, 43, 43, 43, 318, 318,
720 325, 43, 47, 47, 47, 47, 105, 36, 51, 51,
721 51, 51, 43, 324, 18, 25, 25, 25, 25, 25,
723 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
724 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
725 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
726 25, 25, 25, 25, 25, 25, 25, 25, 30, 39,
727 39, 39, 39, 82, 147, 82, 82, 132, 152, 132,
728 132, 319, 319, 139, 132, 139, 139, 144, 323, 144,
729 144, 149, 167, 149, 149, 167, 161, 147, 161, 161,
730 322, 152, 39, 321, 320, 149, 317, 39, 30, 37,
731 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
732 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
734 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
735 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
736 37, 37, 40, 40, 40, 40, 58, 58, 58, 58,
737 212, 315, 313, 58, 67, 67, 67, 67, 312, 311,
738 212, 67, 153, 153, 153, 153, 155, 155, 155, 155,
739 157, 157, 157, 157, 162, 40, 162, 162, 310, 309,
740 40, 44, 44, 44, 44, 308, 58, 164, 44, 164,
741 164, 179, 306, 264, 67, 44, 179, 264, 264, 44,
742 54, 166, 166, 166, 166, 201, 305, 201, 201, 228,
743 301, 228, 228, 299, 179, 54, 228, 54, 235, 54,
745 235, 235, 54, 298, 54, 54, 54, 54, 54, 54,
746 54, 293, 54, 66, 66, 291, 66, 66, 66, 66,
747 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
748 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
749 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
750 66, 66, 66, 66, 66, 66, 172, 172, 172, 172,
751 288, 287, 286, 172, 186, 186, 186, 186, 285, 281,
752 238, 186, 238, 238, 239, 239, 239, 239, 243, 280,
753 243, 243, 245, 245, 245, 245, 247, 279, 247, 247,
754 277, 249, 243, 249, 249, 276, 172, 185, 251, 185,
756 251, 251, 273, 272, 186, 266, 185, 185, 185, 185,
757 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
758 185, 185, 185, 185, 262, 260, 185, 199, 199, 199,
759 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
760 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
761 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
762 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
763 230, 230, 257, 230, 230, 230, 230, 230, 230, 230,
764 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
765 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
767 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
768 230, 230, 230, 253, 253, 253, 253, 265, 255, 302,
769 254, 265, 265, 302, 302, 265, 265, 265, 265, 265,
770 265, 289, 289, 289, 289, 296, 296, 296, 296, 303,
771 250, 244, 241, 237, 236, 233, 232, 303, 303, 303,
772 303, 303, 303, 341, 341, 341, 341, 341, 341, 341,
773 341, 341, 341, 341, 341, 341, 342, 342, 342, 342,
774 342, 342, 342, 342, 342, 342, 342, 342, 342, 343,
775 343, 343, 343, 343, 343, 343, 343, 343, 343, 343,
776 343, 343, 344, 344, 344, 344, 344, 344, 344, 344,
778 344, 344, 344, 344, 344, 345, 345, 345, 345, 345,
779 345, 345, 345, 345, 345, 345, 345, 345, 346, 346,
780 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
781 346, 347, 347, 347, 347, 347, 347, 347, 347, 347,
782 347, 347, 347, 347, 348, 348, 348, 348, 348, 348,
783 348, 348, 348, 348, 348, 348, 348, 349, 349, 349,
784 349, 349, 349, 349, 349, 349, 349, 349, 349, 349,
785 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
786 350, 350, 350, 351, 351, 351, 351, 351, 351, 351,
787 351, 351, 351, 351, 351, 351, 352, 352, 352, 352,
789 352, 352, 352, 352, 352, 352, 352, 352, 352, 353,
790 353, 353, 353, 353, 353, 353, 353, 353, 353, 353,
791 353, 353, 354, 354, 354, 354, 354, 354, 354, 354,
792 354, 354, 354, 354, 354, 355, 355, 355, 355, 355,
793 355, 355, 355, 355, 355, 355, 355, 355, 356, 356,
794 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
795 356, 357, 357, 229, 222, 357, 357, 358, 358, 358,
796 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
797 359, 359, 359, 359, 359, 359, 359, 359, 359, 359,
798 359, 359, 360, 360, 219, 218, 360, 360, 361, 361,
800 217, 361, 361, 361, 361, 361, 361, 206, 361, 361,
801 361, 362, 362, 204, 362, 362, 362, 362, 362, 362,
802 362, 362, 362, 362, 363, 363, 363, 363, 363, 363,
803 363, 363, 363, 363, 363, 363, 363, 364, 198, 197,
804 364, 364, 364, 364, 364, 364, 364, 364, 364, 364,
805 365, 365, 365, 365, 365, 365, 365, 365, 365, 365,
806 365, 365, 365, 366, 366, 193, 366, 366, 366, 366,
807 366, 366, 366, 190, 181, 366, 367, 367, 177, 175,
808 367, 367, 368, 368, 174, 368, 368, 368, 368, 368,
809 368, 368, 368, 368, 368, 369, 369, 169, 163, 369,
811 369, 370, 370, 159, 370, 370, 370, 370, 370, 370,
812 370, 370, 370, 370, 371, 371, 151, 371, 371, 371,
813 371, 371, 371, 371, 371, 371, 371, 372, 372, 150,
814 372, 372, 372, 372, 372, 372, 146, 372, 372, 372,
815 373, 373, 142, 141, 137, 373, 373, 373, 373, 373,
816 374, 374, 136, 374, 374, 374, 374, 374, 374, 374,
817 374, 374, 374, 375, 375, 134, 126, 375, 375, 376,
818 376, 376, 376, 376, 376, 376, 376, 376, 376, 376,
819 376, 376, 377, 377, 123, 377, 377, 117, 377, 377,
820 377, 377, 377, 377, 377, 378, 378, 114, 378, 378,
822 113, 378, 378, 378, 378, 378, 378, 378, 379, 379,
823 111, 102, 379, 379, 379, 379, 93, 379, 379, 379,
824 379, 380, 380, 87, 380, 380, 380, 380, 380, 380,
825 380, 380, 380, 380, 381, 381, 80, 381, 381, 381,
826 381, 381, 381, 381, 79, 78, 381, 382, 382, 73,
827 71, 382, 382, 383, 64, 63, 383, 383, 383, 383,
828 383, 383, 383, 383, 383, 383, 384, 384, 55, 384,
829 384, 384, 384, 384, 384, 384, 384, 384, 384, 385,
830 385, 53, 385, 385, 385, 385, 385, 385, 385, 385,
831 385, 385, 386, 386, 387, 387, 388, 388, 388, 388,
833 388, 388, 388, 388, 388, 388, 388, 388, 388, 389,
834 389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
835 389, 389, 390, 49, 45, 28, 390, 391, 391, 27,
836 391, 391, 391, 391, 391, 391, 391, 391, 391, 392,
837 392, 16, 392, 392, 392, 392, 392, 392, 392, 392,
838 392, 392, 393, 15, 10, 8, 393, 394, 394, 394,
839 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
840 395, 7, 6, 5, 395, 396, 396, 396, 396, 396,
841 396, 396, 396, 396, 396, 396, 396, 396, 397, 397,
842 0, 0, 397, 397, 398, 398, 0, 0, 398, 398,
844 399, 0, 0, 0, 399, 400, 400, 400, 400, 400,
845 400, 400, 400, 400, 400, 400, 400, 400, 401, 0,
846 0, 0, 401, 402, 402, 0, 402, 402, 402, 402,
847 402, 402, 402, 402, 402, 402, 403, 0, 0, 0,
848 403, 340, 340, 340, 340, 340, 340, 340, 340, 340,
849 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
850 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
851 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
852 340, 340, 340, 340, 340
855 static yy_state_type yy_last_accepting_state;
856 static YY_CHAR *yy_last_accepting_cpos;
858 /* the intent behind this definition is that it'll catch
859 * any uses of REJECT which flex missed
861 #define REJECT reject_used_but_not_detected
862 #define yymore() yymore_used_but_not_detected
863 #define YY_MORE_ADJ 0
865 /* these variables are all declared out here so that section 3 code can
868 /* points to current character in buffer */
869 static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
870 static int yy_init = 1; /* whether we need to initialize */
871 static int yy_start = 0; /* start state number */
873 /* flag which is used to allow yywrap()'s to do buffer switches
874 * instead of setting up a fresh yyin. A bit of a hack ...
876 static int yy_did_buffer_switch_on_eof;
878 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
879 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
880 static int yy_get_next_buffer YY_PROTO(( void ));
881 static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
882 void yyrestart YY_PROTO(( FILE *input_file ));
883 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
884 void yy_load_buffer_state YY_PROTO(( void ));
885 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
886 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
887 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
889 #define yy_new_buffer yy_create_buffer
892 static int yyinput YY_PROTO(( void ));
894 static int input YY_PROTO(( void ));
899 register yy_state_type yy_current_state;
900 register YY_CHAR *yy_cp, *yy_bp;
904 static int bracelevel, didadef;
905 int i, indented_code, checking_used, new_xlation;
906 int doing_codeblock = false;
907 Char nmdef[MAXLINE], myesc();
915 yy_start = 1; /* first start state */
923 if ( yy_current_buffer )
924 yy_init_buffer( yy_current_buffer, yyin );
926 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
928 yy_load_buffer_state();
933 while ( 1 ) /* loops until end-of-file is reached */
937 /* support of yytext */
938 *yy_cp = yy_hold_char;
940 /* yy_bp points to the position in yy_ch_buf of the start of the
945 yy_current_state = yy_start;
946 if ( yy_bp[-1] == '\n' )
951 register YY_CHAR yy_c = yy_ec[*yy_cp];
952 if ( yy_accept[yy_current_state] )
954 yy_last_accepting_state = yy_current_state;
955 yy_last_accepting_cpos = yy_cp;
957 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
959 yy_current_state = yy_def[yy_current_state];
960 if ( yy_current_state >= 341 )
961 yy_c = yy_meta[yy_c];
963 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
966 while ( yy_current_state != 340 );
967 yy_cp = yy_last_accepting_cpos;
968 yy_current_state = yy_last_accepting_state;
971 yy_act = yy_accept[yy_current_state];
976 do_action: /* this label is used only to access EOF actions */
981 case 0: /* must backtrack */
982 /* undo the effects of YY_DO_BEFORE_ACTION */
983 *yy_cp = yy_hold_char;
984 yy_cp = yy_last_accepting_cpos;
985 yy_current_state = yy_last_accepting_state;
990 indented_code = true; BEGIN(CODEBLOCK);
994 ++linenum; /* treat as a comment */
998 ECHO; BEGIN(C_COMMENT);
1012 line_directive_out( stdout );
1013 indented_code = false;
1019 return ( WHITESPACE );
1025 line_directive_out( stdout );
1033 pinpoint_message( "warning - %%used/%%unused have been deprecated" );
1034 checking_used = REALLY_USED; BEGIN(USED_LIST);
1040 checking_used = REALLY_NOT_USED; BEGIN(USED_LIST);
1041 pinpoint_message( "warning - %%used/%%unused have been deprecated" );
1042 checking_used = REALLY_NOT_USED; BEGIN(USED_LIST);
1050 "old-style lex command at line %d ignored:\n\t%s",
1058 /* ignore old lex directive */
1065 (int *) malloc( sizeof( int ) * (unsigned) csize );
1069 "dynamic memory failure building %t table" );
1071 for ( i = 0; i < csize; ++i )
1081 synerr( "unrecognized '%' directive" );
1086 (void) strcpy( nmstr, (char *) yytext );
1097 ++linenum; /* allows blank lines in section 1 */
1101 ++linenum; return ( '\n' );
1105 synerr( "illegal character" ); BEGIN(RECOVER);
1109 ECHO; BEGIN(INITIAL);
1113 ++linenum; ECHO; BEGIN(INITIAL);
1129 ++linenum; BEGIN(INITIAL);
1133 ECHO; CHECK_REJECT(yytext);
1137 ECHO; CHECK_YYMORE(yytext);
1148 if ( indented_code )
1154 /* separates name and definition */
1159 (void) strcpy( (char *) nmdef, (char *) yytext );
1161 for ( i = strlen( (char *) nmdef ) - 1;
1163 nmdef[i] == ' ' || nmdef[i] == '\t';
1167 nmdef[i + 1] = '\0';
1169 ndinstal( nmstr, nmdef );
1177 synerr( "incomplete name definition" );
1184 ++linenum; BEGIN(INITIAL); RETURNNAME;
1188 ++linenum; BEGIN(INITIAL);
1197 if ( all_upper( yytext ) )
1198 reject_really_used = checking_used;
1200 synerr( "unrecognized %used/%unused construct" );
1206 if ( all_lower( yytext ) )
1207 yymore_really_used = checking_used;
1209 synerr( "unrecognized %used/%unused construct" );
1214 synerr( "unrecognized %used/%unused construct" );
1218 ++linenum; BEGIN(INITIAL);
1222 ++num_xlations; new_xlation = true;
1226 synerr( "bad row in translation table" );
1230 /* ignore whitespace */
1235 xlation[myesc( yytext )] =
1236 (new_xlation ? num_xlations : -num_xlations);
1237 new_xlation = false;
1243 xlation[yytext[0]] =
1244 (new_xlation ? num_xlations : -num_xlations);
1245 new_xlation = false;
1253 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1254 yy_c_buf_p = yy_cp -= 1;
1255 YY_DO_BEFORE_ACTION; /* set up yytext again */
1266 ++linenum; ACTION_ECHO;
1268 case YY_STATE_EOF(SECT2PROLOG):
1270 MARK_END_OF_PROLOG; yyterminate();
1274 ++linenum; /* allow blank lines in section 2 */
1279 indented_code = (yytext[0] != '%');
1280 doing_codeblock = true;
1283 if ( indented_code )
1291 BEGIN(SC); return ( '<' );
1299 BEGIN(QUOTE); return ( '"' );
1302 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1303 yy_c_buf_p = yy_cp = yy_bp + 1;
1304 YY_DO_BEFORE_ACTION; /* set up yytext again */
1306 BEGIN(NUM); return ( '{' );
1313 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1314 yy_c_buf_p = yy_cp = yy_bp + 1;
1315 YY_DO_BEFORE_ACTION; /* set up yytext again */
1323 BEGIN(PERCENT_BRACE_ACTION);
1329 continued_action = true; ++linenum; return ( '\n' );
1334 /* this rule is separate from the one below because
1335 * otherwise we get variable trailing context, so
1336 * we can't build the scanner using -{f,F}
1339 continued_action = false;
1345 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1346 yy_c_buf_p = yy_cp -= 1;
1347 YY_DO_BEFORE_ACTION; /* set up yytext again */
1351 continued_action = false;
1358 ++linenum; return ( '\n' );
1369 return ( EOF ); /* to stop the parser */
1377 (void) strcpy( nmstr, (char *) yytext );
1379 /* check to see if we've already encountered this ccl */
1380 if ( (cclval = ccllookup( (Char *) nmstr )) )
1388 /* we fudge a bit. We know that this ccl will
1389 * soon be numbered as lastccl + 1 by cclinit
1391 cclinstal( (Char *) nmstr, lastccl + 1 );
1393 /* push back everything but the leading bracket
1394 * so the ccl can be rescanned
1396 PUT_BACK_STRING((Char *) nmstr, 1);
1406 register Char *nmdefptr;
1409 (void) strcpy( nmstr, (char *) yytext );
1410 nmstr[yyleng - 1] = '\0'; /* chop trailing brace */
1412 /* lookup from "nmstr + 1" to chop leading brace */
1413 if ( ! (nmdefptr = ndlookup( nmstr + 1 )) )
1414 synerr( "undefined {name}" );
1417 { /* push back name surrounded by ()'s */
1419 PUT_BACK_STRING(nmdefptr, 0);
1426 return ( yytext[0] );
1434 ++linenum; return ( '\n' );
1442 BEGIN(SECT2); return ( '>' );
1445 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1446 yy_c_buf_p = yy_cp = yy_bp + 1;
1447 YY_DO_BEFORE_ACTION; /* set up yytext again */
1449 BEGIN(CARETISBOL); return ( '>' );
1457 synerr( "bad start condition name" );
1461 BEGIN(SECT2); return ( '^' );
1469 BEGIN(SECT2); return ( '"' );
1474 synerr( "missing quote" );
1481 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1482 yy_c_buf_p = yy_cp = yy_bp + 1;
1483 YY_DO_BEFORE_ACTION; /* set up yytext again */
1485 BEGIN(CCL); return ( '^' );
1488 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1489 yy_c_buf_p = yy_cp = yy_bp + 1;
1490 YY_DO_BEFORE_ACTION; /* set up yytext again */
1496 BEGIN(CCL); yylval = '-'; return ( CHAR );
1500 BEGIN(CCL); RETURNCHAR;
1503 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1504 yy_c_buf_p = yy_cp = yy_bp + 1;
1505 YY_DO_BEFORE_ACTION; /* set up yytext again */
1515 BEGIN(SECT2); return ( ']' );
1520 yylval = myctoi( yytext );
1530 BEGIN(SECT2); return ( '}' );
1535 synerr( "bad character inside {}'s" );
1543 synerr( "missing }" );
1551 synerr( "bad name in {}'s" ); BEGIN(SECT2);
1555 synerr( "missing }" ); ++linenum; BEGIN(SECT2);
1565 CHECK_REJECT(yytext);
1572 CHECK_YYMORE(yytext);
1584 if ( bracelevel == 0 ||
1585 (doing_codeblock && indented_code) )
1587 if ( ! doing_codeblock )
1588 fputs( "\tYY_BREAK\n", temp_action_file );
1590 doing_codeblock = false;
1595 /* Reject and YYmore() are checked for above, in PERCENT_BRACE_ACTION */
1598 ACTION_ECHO; ++bracelevel;
1602 ACTION_ECHO; --bracelevel;
1614 ACTION_ECHO; BEGIN(ACTION_COMMENT);
1618 ACTION_ECHO; /* character constant */
1622 ACTION_ECHO; BEGIN(ACTION_STRING);
1629 if ( bracelevel == 0 )
1631 fputs( "\tYY_BREAK\n", temp_action_file );
1642 ACTION_ECHO; BEGIN(ACTION);
1654 ++linenum; ACTION_ECHO;
1670 ++linenum; ACTION_ECHO;
1674 ACTION_ECHO; BEGIN(ACTION);
1680 case YY_STATE_EOF(ACTION):
1681 case YY_STATE_EOF(ACTION_COMMENT):
1682 case YY_STATE_EOF(ACTION_STRING):
1685 synerr( "EOF encountered inside an action" );
1692 yylval = myesc( yytext );
1699 yylval = myesc( yytext );
1710 YY_FATAL_ERROR( "flex scanner jammed" );
1712 case YY_STATE_EOF(INITIAL):
1713 case YY_STATE_EOF(SECT2):
1714 case YY_STATE_EOF(SECT3):
1715 case YY_STATE_EOF(CODEBLOCK):
1716 case YY_STATE_EOF(PICKUPDEF):
1717 case YY_STATE_EOF(SC):
1718 case YY_STATE_EOF(CARETISBOL):
1719 case YY_STATE_EOF(NUM):
1720 case YY_STATE_EOF(QUOTE):
1721 case YY_STATE_EOF(FIRSTCCL):
1722 case YY_STATE_EOF(CCL):
1723 case YY_STATE_EOF(RECOVER):
1724 case YY_STATE_EOF(BRACEERROR):
1725 case YY_STATE_EOF(C_COMMENT):
1726 case YY_STATE_EOF(PERCENT_BRACE_ACTION):
1727 case YY_STATE_EOF(USED_LIST):
1728 case YY_STATE_EOF(CODEBLOCK_2):
1729 case YY_STATE_EOF(XLATION):
1732 case YY_END_OF_BUFFER:
1734 /* amount of text matched not including the EOB char */
1735 int yy_amount_of_matched_text = yy_cp - yytext - 1;
1737 /* undo the effects of YY_DO_BEFORE_ACTION */
1738 *yy_cp = yy_hold_char;
1740 /* note that here we test for yy_c_buf_p "<=" to the position
1741 * of the first EOB in the buffer, since yy_c_buf_p will
1742 * already have been incremented past the NUL character
1743 * (since all states make transitions on EOB to the end-
1744 * of-buffer state). Contrast this with the test in yyinput().
1746 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1747 /* this was really a NUL */
1749 yy_state_type yy_next_state;
1751 yy_c_buf_p = yytext + yy_amount_of_matched_text;
1753 yy_current_state = yy_get_previous_state();
1755 /* okay, we're now positioned to make the
1756 * NUL transition. We couldn't have
1757 * yy_get_previous_state() go ahead and do it
1758 * for us because it doesn't know how to deal
1759 * with the possibility of jamming (and we
1760 * don't want to build jamming into it because
1761 * then it will run more slowly)
1764 yy_next_state = yy_try_NUL_trans( yy_current_state );
1766 yy_bp = yytext + YY_MORE_ADJ;
1768 if ( yy_next_state )
1770 /* consume the NUL */
1771 yy_cp = ++yy_c_buf_p;
1772 yy_current_state = yy_next_state;
1778 yy_cp = yy_last_accepting_cpos;
1779 yy_current_state = yy_last_accepting_state;
1780 goto yy_find_action;
1784 else switch ( yy_get_next_buffer() )
1786 case EOB_ACT_END_OF_FILE:
1788 yy_did_buffer_switch_on_eof = 0;
1792 /* note: because we've taken care in
1793 * yy_get_next_buffer() to have set up yytext,
1794 * we can now set up yy_c_buf_p so that if some
1795 * total hoser (like flex itself) wants
1796 * to call the scanner after we return the
1797 * YY_NULL, it'll still work - another YY_NULL
1798 * will get returned.
1800 yy_c_buf_p = yytext + YY_MORE_ADJ;
1802 yy_act = YY_STATE_EOF((yy_start - 1) / 2);
1808 if ( ! yy_did_buffer_switch_on_eof )
1814 case EOB_ACT_CONTINUE_SCAN:
1815 yy_c_buf_p = yytext + yy_amount_of_matched_text;
1817 yy_current_state = yy_get_previous_state();
1820 yy_bp = yytext + YY_MORE_ADJ;
1823 case EOB_ACT_LAST_MATCH:
1825 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1827 yy_current_state = yy_get_previous_state();
1830 yy_bp = yytext + YY_MORE_ADJ;
1831 goto yy_find_action;
1838 printf( "action # %d\n", yy_act );
1841 "fatal flex scanner internal error--no action found" );
1847 /* yy_get_next_buffer - try to read in a new buffer
1850 * int yy_get_next_buffer();
1852 * returns a code representing an action
1853 * EOB_ACT_LAST_MATCH -
1854 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1855 * EOB_ACT_END_OF_FILE - end of file
1858 static int yy_get_next_buffer()
1861 register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
1862 register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
1863 register int number_to_move, i;
1866 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1868 "fatal flex scanner internal error--end of buffer missed" );
1870 /* try to read more data */
1872 /* first move last chars to start of buffer */
1873 number_to_move = yy_c_buf_p - yytext;
1875 for ( i = 0; i < number_to_move; ++i )
1876 *(dest++) = *(source++);
1878 if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
1879 /* don't do the read, it's not guaranteed to return an EOF,
1886 int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
1888 if ( num_to_read > YY_READ_BUF_SIZE )
1889 num_to_read = YY_READ_BUF_SIZE;
1891 else if ( num_to_read <= 0 )
1892 YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
1894 /* read in more data */
1895 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1896 yy_n_chars, num_to_read );
1899 if ( yy_n_chars == 0 )
1901 if ( number_to_move == 1 )
1903 ret_val = EOB_ACT_END_OF_FILE;
1904 yy_current_buffer->yy_eof_status = EOF_DONE;
1909 ret_val = EOB_ACT_LAST_MATCH;
1910 yy_current_buffer->yy_eof_status = EOF_PENDING;
1915 ret_val = EOB_ACT_CONTINUE_SCAN;
1917 yy_n_chars += number_to_move;
1918 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1919 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1921 /* yytext begins at the second character in yy_ch_buf; the first
1922 * character is the one which preceded it before reading in the latest
1923 * buffer; it needs to be kept around in case it's a newline, so
1924 * yy_get_previous_state() will have with '^' rules active
1927 yytext = &yy_current_buffer->yy_ch_buf[1];
1933 /* yy_get_previous_state - get the state just before the EOB char was reached
1936 * yy_state_type yy_get_previous_state();
1939 static yy_state_type yy_get_previous_state()
1942 register yy_state_type yy_current_state;
1943 register YY_CHAR *yy_cp;
1945 register YY_CHAR *yy_bp = yytext;
1947 yy_current_state = yy_start;
1948 if ( yy_bp[-1] == '\n' )
1951 for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1953 register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
1954 if ( yy_accept[yy_current_state] )
1956 yy_last_accepting_state = yy_current_state;
1957 yy_last_accepting_cpos = yy_cp;
1959 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1961 yy_current_state = yy_def[yy_current_state];
1962 if ( yy_current_state >= 341 )
1963 yy_c = yy_meta[yy_c];
1965 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1968 return ( yy_current_state );
1972 /* yy_try_NUL_trans - try to make a transition on the NUL character
1975 * next_state = yy_try_NUL_trans( current_state );
1978 #ifdef YY_USE_PROTOS
1979 static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
1981 static yy_state_type yy_try_NUL_trans( yy_current_state )
1982 register yy_state_type yy_current_state;
1986 register int yy_is_jam;
1987 register YY_CHAR *yy_cp = yy_c_buf_p;
1989 register YY_CHAR yy_c = 1;
1990 if ( yy_accept[yy_current_state] )
1992 yy_last_accepting_state = yy_current_state;
1993 yy_last_accepting_cpos = yy_cp;
1995 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1997 yy_current_state = yy_def[yy_current_state];
1998 if ( yy_current_state >= 341 )
1999 yy_c = yy_meta[yy_c];
2001 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2002 yy_is_jam = (yy_current_state == 340);
2004 return ( yy_is_jam ? 0 : yy_current_state );
2008 #ifdef YY_USE_PROTOS
2009 static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
2011 static void yyunput( c, yy_bp )
2013 register YY_CHAR *yy_bp;
2017 register YY_CHAR *yy_cp = yy_c_buf_p;
2019 /* undo effects of setting up yytext */
2020 *yy_cp = yy_hold_char;
2022 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2023 { /* need to shift things up to make room */
2024 register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
2025 register YY_CHAR *dest =
2026 &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
2027 register YY_CHAR *source =
2028 &yy_current_buffer->yy_ch_buf[number_to_move];
2030 while ( source > yy_current_buffer->yy_ch_buf )
2031 *--dest = *--source;
2033 yy_cp += dest - source;
2034 yy_bp += dest - source;
2035 yy_n_chars = yy_current_buffer->yy_buf_size;
2037 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2038 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2041 if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
2046 /* note: the formal parameter *must* be called "yy_bp" for this
2047 * macro to now work correctly
2049 YY_DO_BEFORE_ACTION; /* set up yytext again */
2054 static int yyinput()
2061 YY_CHAR *yy_cp = yy_c_buf_p;
2063 *yy_cp = yy_hold_char;
2065 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2067 /* yy_c_buf_p now points to the character we want to return.
2068 * If this occurs *before* the EOB characters, then it's a
2069 * valid NUL; if not, then we've hit the end of the buffer.
2071 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2072 /* this was really a NUL */
2076 { /* need more input */
2077 yytext = yy_c_buf_p;
2080 switch ( yy_get_next_buffer() )
2082 case EOB_ACT_END_OF_FILE:
2086 yy_c_buf_p = yytext + YY_MORE_ADJ;
2093 return ( yyinput() );
2100 case EOB_ACT_CONTINUE_SCAN:
2101 yy_c_buf_p = yytext + YY_MORE_ADJ;
2104 case EOB_ACT_LAST_MATCH:
2106 YY_FATAL_ERROR( "unexpected last match in yyinput()" );
2108 YY_FATAL_ERROR( "unexpected last match in input()" );
2115 yy_hold_char = *++yy_c_buf_p;
2121 #ifdef YY_USE_PROTOS
2122 void yyrestart( FILE *input_file )
2124 void yyrestart( input_file )
2129 yy_init_buffer( yy_current_buffer, input_file );
2130 yy_load_buffer_state();
2134 #ifdef YY_USE_PROTOS
2135 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2137 void yy_switch_to_buffer( new_buffer )
2138 YY_BUFFER_STATE new_buffer;
2142 if ( yy_current_buffer == new_buffer )
2145 if ( yy_current_buffer )
2147 /* flush out information for old buffer */
2148 *yy_c_buf_p = yy_hold_char;
2149 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2150 yy_current_buffer->yy_n_chars = yy_n_chars;
2153 yy_current_buffer = new_buffer;
2154 yy_load_buffer_state();
2156 /* we don't actually know whether we did this switch during
2157 * EOF (yywrap()) processing, but the only time this flag
2158 * is looked at is after yywrap() is called, so it's safe
2159 * to go ahead and always set it.
2161 yy_did_buffer_switch_on_eof = 1;
2165 #ifdef YY_USE_PROTOS
2166 void yy_load_buffer_state( void )
2168 void yy_load_buffer_state()
2172 yy_n_chars = yy_current_buffer->yy_n_chars;
2173 yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2174 yyin = yy_current_buffer->yy_input_file;
2175 yy_hold_char = *yy_c_buf_p;
2179 #ifdef YY_USE_PROTOS
2180 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2182 YY_BUFFER_STATE yy_create_buffer( file, size )
2190 b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
2193 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2195 b->yy_buf_size = size;
2197 /* yy_ch_buf has to be 2 characters longer than the size given because
2198 * we need to put in 2 end-of-buffer characters.
2200 b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
2202 if ( ! b->yy_ch_buf )
2203 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2205 yy_init_buffer( b, file );
2211 #ifdef YY_USE_PROTOS
2212 void yy_delete_buffer( YY_BUFFER_STATE b )
2214 void yy_delete_buffer( b )
2219 if ( b == yy_current_buffer )
2220 yy_current_buffer = (YY_BUFFER_STATE) 0;
2222 free( (char *) b->yy_ch_buf );
2227 #ifdef YY_USE_PROTOS
2228 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2230 void yy_init_buffer( b, file )
2236 b->yy_input_file = file;
2238 /* we put in the '\n' and start reading from [1] so that an
2239 * initial match-at-newline will be true.
2242 b->yy_ch_buf[0] = '\n';
2245 /* we always need two end-of-buffer characters. The first causes
2246 * a transition to the end-of-buffer state. The second causes
2247 * a jam in that state.
2249 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2250 b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
2252 b->yy_buf_pos = &b->yy_ch_buf[1];
2254 b->yy_eof_status = EOF_NOT_SEEN;
2263 if ( --num_input_files > 0 )
2265 set_input_file( *++input_files );
2274 /* set_input_file - open the given file (if NULL, stdin) for scanning */
2276 void set_input_file( file )
2283 yyin = fopen( infilename, "r" );
2286 lerrsf( "can't open %s", file );
2292 infilename = "<stdin>";